ASCOT5
|
Header file for E_1DS.c. More...
#include "../offload.h"
#include "../ascot5.h"
#include "../error.h"
#include "../spline/interp.h"
#include "../B_field.h"
Go to the source code of this file.
Data Structures | |
struct | E_1DS_data |
1D spline electric field parameters on the target More... | |
Functions | |
int | E_1DS_init (E_1DS_data *data, int nrho, real rhomin, real rhomax, real reff, real *dvdrho) |
Initialize 1DS electric field data. | |
void | E_1DS_free (E_1DS_data *data) |
Free allocated resources. | |
void | E_1DS_offload (E_1DS_data *data) |
Offload data to the accelerator. | |
a5err | E_1DS_eval_E (real E[3], real r, real phi, real z, E_1DS_data *Edata, B_field_data *Bdata) |
Evaluate 1D spline radial electric field. | |
Header file for E_1DS.c.
Contains declaration of E_1DS_field_offload_data and E_1DS_field_data structs.
Definition in file E_1DS.h.
int E_1DS_init | ( | E_1DS_data * | data, |
int | nrho, | ||
real | rhomin, | ||
real | rhomax, | ||
real | reff, | ||
real * | dvdrho ) |
Initialize 1DS electric field data.
data | pointer to the data struct |
nrho | number of points in the rho grid |
rhomin | minimum rho value in the grid |
rhomax | maximum rho value in the grid |
reff | effective minor radius |
dvdrho | gradient of the potential |
void E_1DS_free | ( | E_1DS_data * | data | ) |
void E_1DS_offload | ( | E_1DS_data * | data | ) |
a5err E_1DS_eval_E | ( | real | E[3], |
real | r, | ||
real | phi, | ||
real | z, | ||
E_1DS_data * | Edata, | ||
B_field_data * | Bdata ) |
Evaluate 1D spline radial electric field.
This function evaluates the 1D spline potential gradient of the plasma at the given radial coordinate using linear interpolation, and then calculates the radial electric field by multiplying that with the rho-gradient. Gradient of rho is obtained via magnetic field module.
E | array where the electric field will be stored (E_r -> E[1], E_phi -> E[1], E_z -> E[2]) |
r | R-coordiante [m] |
phi | phi-coordinate [rad] |
z | z-coordiante [m] |
Edata | pointer to electric field data |
Bdata | pointer to magnetic field data |