|
ASCOT5
|
Header file for gctransform.c. More...
#include "ascot5.h"Go to the source code of this file.
Functions | |
| void | gctransform_setorder (int order) |
| Set the order of the transformation. | |
| DECLARE_TARGET_SIMD void | gctransform_particle2guidingcenter (real mass, real charge, real *B_dB, real r, real phi, real z, real pr, real pphi, real pz, real *R, real *Phi, real *Z, real *ppar, real *mu, real *zeta) |
| Transform particle to guiding center phase space. | |
| DECLARE_TARGET_SIMD void | gctransform_guidingcenter2particle (real mass, real charge, real *B_dB, real R, real Phi, real Z, real ppar, real mu, real zeta, real *r, real *phi, real *z, real *pparprt, real *muprt, real *zetaprt) |
| Transform guiding center to particle phase space. | |
| DECLARE_TARGET_SIMD void | gctransform_pparmuzeta2prpphipz (real mass, real charge, real *B_dB, real phi, real ppar, real mu, real zeta, real *pr, real *pphi, real *pz) |
| Transform particle ppar, mu, and zeta to momentum vector. | |
Header file for gctransform.c.
Definition in file gctransform.h.
| void gctransform_setorder | ( | int | order | ) |
Set the order of the transformation.
| order | order which is either zero or one |
Definition at line 62 of file gctransform.c.
| DECLARE_TARGET_SIMD void gctransform_particle2guidingcenter | ( | real | mass, |
| real | charge, | ||
| real * | B_dB, | ||
| real | r, | ||
| real | phi, | ||
| real | z, | ||
| real | pr, | ||
| real | pphi, | ||
| real | pz, | ||
| real * | R, | ||
| real * | Phi, | ||
| real * | Z, | ||
| real * | ppar, | ||
| real * | mu, | ||
| real * | zeta ) |
Transform particle to guiding center phase space.
The transformation is done from coordinates [r, phi, z, pr, pphi, pz] to [R, Phi, Z, ppar, mu, zeta]. If particle is neutral, the transformation will be in zeroth order both in real and momentum space as that transformation is valid when q = 0.
| mass | mass [kg] |
| charge | charge [C] |
| B_dB | gradient of magnetic field vector at particle position |
| r | particle R coordinate [m] |
| phi | particle phi coordinate [rad] |
| z | particle z coordinate [m] |
| pr | particle momentum R component [kg m/s] |
| pphi | particle momentum phi component [kg m/s] |
| pz | particle momentum z component [kg m/s] |
| R | pointer to guiding center R coordinate [m] |
| Phi | pointer to guiding center phi coordinate [rad] |
| Z | pointer to guiding center z coordinate [m] |
| ppar | pointer to guiding center parallel momentum [kg m/s] |
| mu | pointer to guiding center magnetic moment [J/T] |
| zeta | pointer to guiding center gyroangle [rad] |
Definition at line 90 of file gctransform.c.
| DECLARE_TARGET_SIMD void gctransform_guidingcenter2particle | ( | real | mass, |
| real | charge, | ||
| real * | B_dB, | ||
| real | R, | ||
| real | Phi, | ||
| real | Z, | ||
| real | ppar, | ||
| real | mu, | ||
| real | zeta, | ||
| real * | r, | ||
| real * | phi, | ||
| real * | z, | ||
| real * | pparprt, | ||
| real * | muprt, | ||
| real * | zetaprt ) |
Transform guiding center to particle phase space.
The transformation is done from coordinates [R, Phi, Z, ppar, mu] to [r, phi, z, ppar_prt, mu_prt, zeta_prt]. If particle is neutral, the transformation will be in zeroth order both in real and momentum space as that transformation is valid when q = 0.
| mass | mass [kg] |
| charge | charge [C] |
| B_dB | gradient of magnetic field vector at guiding center position |
| R | guiding center R coordinate [m] |
| Phi | guiding center phi coordinate [rad] |
| Z | guiding center z coordinate [m] |
| ppar | guiding center parallel momentum [kg m/s] |
| mu | guiding center magnetic moment [J/T] |
| zeta | guiding center gyroangle [rad] |
| r | pointer to particle R coordinate [m] |
| phi | pointer to particle phi coordinate [rad] |
| z | pointer to particle z coordinate [m] |
| pparprt | pointer to particle parallel momentum [kg m/s] |
| muprt | pointer to particle magnetic moment [J/T] |
| zetaprt | pointer to particle gyroangle [rad] |
Definition at line 329 of file gctransform.c.
| DECLARE_TARGET_SIMD void gctransform_pparmuzeta2prpphipz | ( | real | mass, |
| real | charge, | ||
| real * | B_dB, | ||
| real | phi, | ||
| real | ppar, | ||
| real | mu, | ||
| real | zeta, | ||
| real * | pr, | ||
| real * | pphi, | ||
| real * | pz ) |
Transform particle ppar, mu, and zeta to momentum vector.
The transformation is done from coordinates [R, Phi, Z, ppar, mu] to [r, phi, z, pr, pphi, pz]. The transformation is done to first order.
| mass | mass [kg] |
| charge | charge [C] |
| B_dB | gradient of magnetic field vector at particle position |
| phi | particle phi coordinate [rad] |
| ppar | particle parallel momentum [kg m/s] |
| mu | particle magnetic moment [J/T] |
| zeta | particle gyroangle [rad] |
| pr | pointer to particle momentum R-component [kg m/s] |
| pphi | pointer to particle momentum phi-component [kg m/s] |
| pz | pointer to particle momentum z-component [kg m/s] |
Definition at line 554 of file gctransform.c.