Coordinate transformations Cartesian (x,y) <-> Polar (rho, theta) rho is normalized flux surface label theta is geometric poloidal angle, measured ccw from +x with respect to magnetic axis
Jacobian of polar coordinate system To compute derivatives on rho, finite difference is used N.B. currently only axisymmetric (2D), proper inclusion of toroidal phi will change this function
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(equilibrium_t), | intent(inout) | :: | equi |
Equilibrium |
||
| real(kind=FP), | intent(in) | :: | x |
Cartesian coordinate x |
||
| real(kind=FP), | intent(in) | :: | y |
Cartesian coordinate y |
||
| real(kind=FP), | intent(in) | :: | phi |
Toroidal angle |
Coordinate transformation from polar to Cartesian
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(equilibrium_t), | intent(inout) | :: | equi |
Equilibrium |
||
| real(kind=FP), | intent(in) | :: | x |
Cartesian coordinate x |
||
| real(kind=FP), | intent(in) | :: | y |
Cartesian coordinate y |
||
| real(kind=FP), | intent(in) | :: | phi |
Toroidal angle |
||
| real(kind=FP), | intent(out) | :: | rho |
Polar coordinate rho (normalized flux surface label) |
||
| real(kind=FP), | intent(out) | :: | theta |
Polar coordinate theta (geometric poloidal angle) |
Coordinate transformation from Cartesian to polar
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(equilibrium_t), | intent(inout) | :: | equi |
Equilibrium |
||
| real(kind=FP), | intent(in) | :: | rho |
Polar coordinate rho |
||
| real(kind=FP), | intent(in) | :: | theta |
Polar coordinate theta (geometric poloidal angle) |
||
| real(kind=FP), | intent(in) | :: | phi |
Toroidal angle |
||
| real(kind=FP), | intent(out) | :: | x |
Cartesian coordinate x |
||
| real(kind=FP), | intent(out) | :: | y |
Cartesian coordinate y |