|
ASCOT5
|
2D linearly interpolated plasma More...
#include <stdio.h>#include <stdlib.h>#include <math.h>#include "../ascot5.h"#include "../error.h"#include "../consts.h"#include "../print.h"#include "../linint/linint.h"#include "plasma_2D.h"Go to the source code of this file.
Functions | |
| int | plasma_2D_init (plasma_2D_data *data, int nr, int nz, int nion, real r_min, real r_max, real z_min, real z_max, int *anum, int *znum, real *mass, real *charge, real *Te, real *Ti, real *ne, real *ni, real *vtor) |
| Initialize 2D plasma data and check inputs. | |
| void | plasma_2D_free (plasma_2D_data *data) |
| Free allocated resources. | |
| void | plasma_2D_offload (plasma_2D_data *data) |
| Offload data to the accelerator. | |
| a5err | plasma_2D_eval_temp (real *temp, real r, real z, int species, plasma_2D_data *pls_data) |
| Evaluate plasma temperature. | |
| a5err | plasma_2D_eval_dens (real *dens, real r, real z, int species, plasma_2D_data *pls_data) |
| Evaluate plasma density. | |
| a5err | plasma_2D_eval_densandtemp (real *dens, real *temp, real r, real z, plasma_2D_data *pls_data) |
| Evaluate plasma density and temperature for all species. | |
| a5err | plasma_2D_eval_flow (real *vflow, real r, real z, plasma_2D_data *pls_data) |
| Evalate plasma flow along the field lines. | |
2D linearly interpolated plasma
Plasma data which is defined in a (R,z) uniform grid from which the values are interpolated linearly.
Definition in file plasma_2D.c.
| int plasma_2D_init | ( | plasma_2D_data * | data, |
| int | nr, | ||
| int | nz, | ||
| int | nion, | ||
| real | r_min, | ||
| real | r_max, | ||
| real | z_min, | ||
| real | z_max, | ||
| int * | anum, | ||
| int * | znum, | ||
| real * | mass, | ||
| real * | charge, | ||
| real * | Te, | ||
| real * | Ti, | ||
| real * | ne, | ||
| real * | ni, | ||
| real * | vtor ) |
Initialize 2D plasma data and check inputs.
| data | pointer to the data struct |
Definition at line 25 of file plasma_2D.c.
| void plasma_2D_free | ( | plasma_2D_data * | data | ) |
Free allocated resources.
| data | pointer to the data struct |
Definition at line 98 of file plasma_2D.c.
| void plasma_2D_offload | ( | plasma_2D_data * | data | ) |
Offload data to the accelerator.
| data | pointer to the data struct |
Definition at line 119 of file plasma_2D.c.
| a5err plasma_2D_eval_temp | ( | real * | temp, |
| real | r, | ||
| real | z, | ||
| int | species, | ||
| plasma_2D_data * | pls_data ) |
Evaluate plasma temperature.
This function evaluates the temperature of a plasma species at the given radial coordinate using linear interpolation.
| temp | pointer to where evaluated temperature [J] is stored |
| r | R coordinate |
| z | z coordinate |
| species | index of plasma species |
| pls_data | pointer to plasma data struct |
Definition at line 137 of file plasma_2D.c.
| a5err plasma_2D_eval_dens | ( | real * | dens, |
| real | r, | ||
| real | z, | ||
| int | species, | ||
| plasma_2D_data * | pls_data ) |
Evaluate plasma density.
This function evaluates the density of a plasma species at the given radial coordinate using linear interpolation.
| dens | pointer to where evaluated density [m^-3] is stored |
| r | R coordinate |
| z | z coordinate |
| species | index of plasma species |
| pls_data | pointer to plasma data struct |
Definition at line 162 of file plasma_2D.c.
| a5err plasma_2D_eval_densandtemp | ( | real * | dens, |
| real * | temp, | ||
| real | r, | ||
| real | z, | ||
| plasma_2D_data * | pls_data ) |
Evaluate plasma density and temperature for all species.
This function evaluates the density and temperature of all plasma species at the given radial coordinate using linear interpolation.
| dens | pointer to where interpolated densities [m^-3] are stored |
| temp | pointer to where interpolated temperatures [J] are stored |
| r | R coordinate |
| z | z coordinate |
| pls_data | pointer to plasma data struct |
Definition at line 186 of file plasma_2D.c.
| a5err plasma_2D_eval_flow | ( | real * | vflow, |
| real | r, | ||
| real | z, | ||
| plasma_2D_data * | pls_data ) |
Evalate plasma flow along the field lines.
| vflow | pointer where the flow value is stored [m/s] |
| r | R coordinate |
| z | z coordinate |
| pls_data | pointer to plasma data |
Definition at line 209 of file plasma_2D.c.