[*] W. Dommaschk, "Representations for vacuum potentials in stellarators", Computer Physics Communications 40, pg. 203 (1986)
Definition of Dommaschk potentials [*]. Fully 3D equilibrium
Reads in boundary / exclusion polygon data from NetCDF
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(dommaschk_t), | intent(in) | :: | self |
Instance of the type |
||
| character(len=*), | intent(in) | :: | filename |
NetCDF filename |
||
| character(len=*), | intent(in) | :: | variable |
NetCDF variable name |
||
| real(kind=FP), | dimension(:), allocatable | :: | phi_array |
Toroidal angles of each polygon |
||
| real(kind=FP), | intent(out), | dimension(:,:,:), allocatable | :: | polygon_vertices |
Closed polygon vertices at each toroidal angle |
Reads in flux surface polygon data from NetCDF
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(dommaschk_t), | intent(inout) | :: | self |
Instance of the type |
||
| character(len=*), | intent(in) | :: | filename |
NetCDF filename |
Type implementing 3D vacuum fields as described by Dommaschk [*]. These are determined with toroidal mode numbers m, poloidal mode numbers l, the number of field periods, and fitting coefficients which are specific to each magnetic configuration.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| logical, | public | :: | initialized | = | .false. | ||
| real(kind=FP), | public | :: | x0 |
Magnetic axis x = R/R0 (in normalised units) |
|||
| real(kind=FP), | public | :: | y0 |
Magnetic axis y = Z/R0 (in normalised units) |
|||
| real(kind=FP), | public | :: | phi0 | = | 0.0_FP |
Magnetic axis phi |
|
| real(kind=FP), | public | :: | xmin |
Box limits |
|||
| real(kind=FP), | public | :: | xmax |
Box limits |
|||
| real(kind=FP), | public | :: | ymin |
Box limits |
|||
| real(kind=FP), | public | :: | ymax |
Box limits |
|||
| real(kind=FP), | public | :: | rhomax |
Global limits for rho (rho = normalised psi, n.b. there may also be region-specific limits defined in equi) |
|||
| real(kind=FP), | public | :: | rhomin |
Global limits for rho (rho = normalised psi, n.b. there may also be region-specific limits defined in equi) |
|||
| real(kind=FP), | public, | dimension(:,:,:), allocatable | :: | CD_r_coef |
Coefficients of the R terms of the C^D_{m,k} function. See Eqs. 31 and 32 in [*] |
||
| real(kind=FP), | public, | dimension(:,:,:), allocatable | :: | CN_r_coef |
Coefficients of the R terms of the C^N_{m,k} function. See Eqs. 31 and 32 in [*] |
||
| real(kind=FP), | public, | dimension(:,:,:), allocatable | :: | C_r_power |
Powers of the R terms of the C^D_{m,k} and C^N_{m,k} functions. See Eqs. 31 and 32 in [*] |
||
| real(kind=FP), | public, | dimension(:,:,:), allocatable | :: | CD_lnr_coef |
Coefficients of the log(R) terms of the C^D_{m,k} function. See Eqs. 31 and 32 in [*] |
||
| real(kind=FP), | public, | dimension(:,:,:), allocatable | :: | CN_lnr_coef |
Coefficients of the log(R) terms of the C^N_{m,k} function. See Eqs. 31 and 32 in [*] |
||
| real(kind=FP), | public, | dimension(:,:,:), allocatable | :: | C_lnr_power |
Powers of the log(R) terms of the C^D_{m,k} and C^N_{m,k} functions. See Eqs. 31 and 32 in [*] |
||
| real(kind=FP), | public, | dimension(:,:,:), allocatable | :: | dCD_dR_r_coef |
Coefficients of the R terms of the derivative with respect to R of the C^D_{m,k} function |
||
| real(kind=FP), | public, | dimension(:,:,:), allocatable | :: | dCN_dR_r_coef |
Coefficients of the R terms of the derivative with respect to R of the C^N_{m,k} function |
||
| real(kind=FP), | public, | dimension(:,:,:), allocatable | :: | dC_dR_r_power |
Powers of the R terms of the derivatives with respect to R of the C^D_{m,k} and C^N_{m,k} functions. See Eqs. 31 and 32 in [*] |
||
| real(kind=FP), | public, | dimension(:,:,:), allocatable | :: | dCD_dR_lnr_coef |
Coefficients of the log(R) terms of the derivative with respect to R of the C^D_{m,k} function |
||
| real(kind=FP), | public, | dimension(:,:,:), allocatable | :: | dCN_dR_lnr_coef |
Coefficients of the log(R) terms of the derivative with respect to R of the C^N_{m,k} function |
||
| real(kind=FP), | public, | dimension(:,:,:), allocatable | :: | dC_dR_lnr_power |
Powers of the log(R) terms of the derivatives with respect to R of the C^D_{m,k} and C^N_{m,k} functions |
||
| real(kind=FP), | public, | dimension(:,:,:), allocatable | :: | I_mn_coef |
Coefficients of the Z terms of the I_{m,n} function. See Eqs. 3, 8, and 9 in [*] |
||
| real(kind=FP), | public, | dimension(:,:,:), allocatable | :: | I_mn_power |
Powers of the Z terms of the I_{m,n} function. See Eqs. 3, 8, and 9 in [*] |
||
| real(kind=FP), | public, | dimension(:,:,:), allocatable | :: | dI_dZ_coef |
Coefficients of the Z terms of the derivative with respect to Z of the I_{m,n} function |
||
| real(kind=FP), | public, | dimension(:,:,:), allocatable | :: | dI_dZ_power |
Powers of the Z terms of the derivative with respect to Z of the I_{m,n} function. |
| procedure, public, pass(self) :: absb | |
| procedure, public, pass(self) :: bpol | |
| procedure, public :: get_l_pol | |
| procedure, public :: get_m_tor_consecutive | |
| procedure, public :: get_num_field_periods | |
| procedure, public :: init | |
| procedure, public :: display | |
| procedure, public :: debug | |
| procedure, public :: is_axisymmetric | |
| procedure, public :: rho | |
| procedure, public :: bx | |
| procedure, public :: by | |
| procedure, public :: btor | |
| procedure, public :: jacobian | |
| procedure, public :: epol | |
| procedure, public :: erad | |
| procedure, public :: district | |
| procedure, public :: in_vessel | |
| procedure, public :: mag_axis_loc |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(dommaschk_t), | intent(in) | :: | self |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(dommaschk_t), | intent(in) | :: | self |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(dommaschk_t), | intent(in) | :: | self |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(dommaschk_t), | intent(in) | :: | self |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(dommaschk_t), | intent(in) | :: | self | |||
| real(kind=FP), | intent(in) | :: | x | |||
| real(kind=FP), | intent(in) | :: | y | |||
| real(kind=FP), | intent(in) | :: | phi |
Evaluates the radial component of the vacuum magnetic field B according to B_R = dV/dR
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(dommaschk_t), | intent(in) | :: | self | |||
| real(kind=FP), | intent(in) | :: | x | |||
| real(kind=FP), | intent(in) | :: | y | |||
| real(kind=FP), | intent(in) | :: | phi |
Evaluates the radial component of the vacuum magnetic field B according to B_Z = dV/dZ
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(dommaschk_t), | intent(in) | :: | self | |||
| real(kind=FP), | intent(in) | :: | x | |||
| real(kind=FP), | intent(in) | :: | y | |||
| real(kind=FP), | intent(in) | :: | phi |
Evaluates the poloidal component of the vacuum magnetic field B according to B_phi = 1/R dV/dphi
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(dommaschk_t), | intent(in) | :: | self | |||
| real(kind=FP), | intent(in) | :: | x | |||
| real(kind=FP), | intent(in) | :: | y | |||
| real(kind=FP), | intent(in) | :: | phi |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(dommaschk_t), | intent(in) | :: | self | |||
| real(kind=FP), | intent(in) | :: | x | |||
| real(kind=FP), | intent(in) | :: | y | |||
| real(kind=FP), | intent(in) | :: | phi |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(dommaschk_t), | intent(in) | :: | self | |||
| real(kind=FP), | intent(in) | :: | x | |||
| real(kind=FP), | intent(in) | :: | y | |||
| real(kind=FP), | intent(in) | :: | phi |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(dommaschk_t), | intent(in) | :: | self | |||
| real(kind=FP), | intent(in) | :: | x | |||
| real(kind=FP), | intent(in) | :: | y | |||
| real(kind=FP), | intent(in) | :: | phi |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(dommaschk_t), | intent(inout) | :: | self | |||
| character(len=*), | intent(in), | optional | :: | filename |
Check fitting_coef for consistency. The first condition (from Eq. 12 in [*]) is strict, while the second and third (from Eq. 13a) only enforce stellarator symmetry, which can be violated. Hence, only a warning is provided there.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(dommaschk_t), | intent(inout) | :: | self |
Compute and store C^D_{m,k}(R) and C^N_{m,k}(R) (Eq. 31 and 32)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(dommaschk_t), | intent(inout) | :: | self |
Compute and store D_{m,n} and N_{m,n} (as used in Eq. 12 in [*]) via Eq. 3
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(dommaschk_t), | intent(inout) | :: | self |
Determine the magnetic field normalization with the un-normalized value of btor evaluated at the location of the magnetic axis. This is used to normalize all subsequent magnetic field calculations.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(dommaschk_t), | intent(inout) | :: | self |
Calculates the value of rho for every surface in the given rho file. Used later in rho calculation, to interpolate between surfaces
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(dommaschk_t), | intent(inout) | :: | self |
Initializes two arrays (equidistant in phi) of x- and y-coordinates of magnetic axis within the first field period calculated via field line tracing. These are used as data points for fast interpolation in 'mag_axis_loc'
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(dommaschk_t), | intent(inout) | :: | self |
Instance of class |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(dommaschk_t), | intent(in) | :: | self |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(dommaschk_t), | intent(in) | :: | self |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(dommaschk_t), | intent(in) | :: | self | |||
| real(kind=FP), | intent(in) | :: | x | |||
| real(kind=FP), | intent(in) | :: | y | |||
| real(kind=FP), | intent(in) | :: | phi | |||
| real(kind=FP), | intent(out) | :: | epolx | |||
| real(kind=FP), | intent(out) | :: | epoly |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(dommaschk_t), | intent(in) | :: | self | |||
| real(kind=FP), | intent(in) | :: | x | |||
| real(kind=FP), | intent(in) | :: | y | |||
| real(kind=FP), | intent(in) | :: | phi | |||
| real(kind=FP), | intent(out) | :: | eradx | |||
| real(kind=FP), | intent(out) | :: | erady |
Returns the coordinates of magnetic axis
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(dommaschk_t), | intent(in) | :: | self |
Instance of class |
||
| real(kind=FP), | intent(in) | :: | phi |
Toroidal angle |
||
| real(kind=FP), | intent(out) | :: | axis_x |
x-coordinate of the magnetic axis |
||
| real(kind=FP), | intent(out) | :: | axis_y |
y-coordinate of the magnetic axis |