| 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) |
|||
| logical, | public | :: | flip_Z | = | .false. |
Inverts the Z direction, which is equivalent to reversing the field direction Default false, use true to flip the equilibrium vertically (magnetic axis position unchanged). |
|
| real(kind=FP), | public | :: | poloidal_field_factor | = | 1.0_FP |
Poloidal field factor, which can be used to reverse the helicity |
|
| type(closed_polygon2d_t), | public | :: | divertor_polygon |
Closed polygon which defines the divertor |
|||
| type(closed_polygon2d_t), | public | :: | exclusion_polygon |
Closed polygon which marks points as being off the grid Use default first-wall + divertor polygon if false (default), or from parameter file if true Use default exclusion polygon if false (default), or from parameter file if true |
|||
| logical, | public | :: | invert_divertor_polygon |
Flips the divertor polygon from being assumed concave to convex. |
|||
| logical, | public | :: | invert_exclusion_polygon |
Flips the exclusion polygon from being assumed concave to convex. |
|||
| real(kind=FP), | public | :: | axis_Btor |
Toroidal field at the the magnetic axis -- used to normalise magnetic field |
|||
| real(kind=FP), | public | :: | O_point_psi |
Poloidal flux of the magnetic axis -- used to define the 0-point of rho |
|||
| real(kind=FP), | public | :: | X_point_psi |
Poloidal flux of the (primary) seperatrix -- used to define the 1-point of rho |
|||
| character(len=:), | public, | allocatable | :: | district_definition |
Indicates, how districts are defined 'flux': Based on the limiting flux surface rho_max (default) 'wall': Based on divertor and exclusion polygons |
||
| real(kind=FP), | public | :: | R0 |
Non-normalised magentic axis radius |
|||
| real(kind=FP), | public | :: | Z0 |
Non-normalised magentic axis vertical position |
|||
| real(kind=FP), | public | :: | RX |
Normalised primary x-point radius |
|||
| real(kind=FP), | public | :: | ZX |
Normalised primary x-point vertical position |
|||
| real(kind=FP), | public | :: | rhomin_privflux | ||||
| real(kind=FP), | public | :: | a | ||||
| real(kind=FP), | public | :: | rx2 | ||||
| real(kind=FP), | public | :: | zx2 | ||||
| real(kind=FP), | public | :: | normpol | ||||
| real(kind=FP), | public | :: | normtor | ||||
| real(kind=FP), | public | :: | c1 | ||||
| real(kind=FP), | public | :: | c2 | ||||
| real(kind=FP), | public | :: | c3 | ||||
| real(kind=FP), | public | :: | c4 | ||||
| real(kind=FP), | public | :: | c5 | ||||
| real(kind=FP), | public | :: | c6 | ||||
| real(kind=FP), | public | :: | c7 | ||||
| real(kind=FP), | public | :: | c8 | ||||
| real(kind=FP), | public | :: | c9 | ||||
| real(kind=FP), | public | :: | c10 | ||||
| real(kind=FP), | public | :: | c11 | ||||
| real(kind=FP), | public | :: | c12 |
Absolute value of magnetic field.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(equilibrium_t), | intent(in) | :: | self | |||
| real(kind=FP), | intent(in) | :: | x |
3D position (x and y normalized) |
||
| real(kind=FP), | intent(in) | :: | y |
3D position (x and y normalized) |
||
| real(kind=FP), | intent(in) | :: | phi |
3D position (x and y normalized) |
Magnetic field component b poloidal normalised to absolute value of B (on axis)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(equilibrium_t), | intent(in) | :: | self | |||
| real(kind=FP), | intent(in) | :: | x |
3D position (x and y normalized) |
||
| real(kind=FP), | intent(in) | :: | y |
3D position (x and y normalized) |
||
| real(kind=FP), | intent(in) | :: | phi |
3D position (x and y normalized) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(divertor_equilibrium_t), | intent(in) | :: | self |
Flux surface label normalised such that rho = 0 at the magnetic axis, and rho = 1 at the seperatrix
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(divertor_equilibrium_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(divertor_equilibrium_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(divertor_equilibrium_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(divertor_equilibrium_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 |
Initialises a polygon object "polygon" with points {X_points, Y_points} If local_min and local_max are given, a limiting_polygon2d_t is created, which stores these limits for later recall N.b. X_points and Y_points should be given normalised
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | N_points | |||
| real(kind=FP), | intent(in), | dimension(N_points) | :: | X_points | ||
| real(kind=FP), | intent(in), | dimension(N_points) | :: | Y_points | ||
| class(polygon2d_t), | intent(out) | :: | polygon | |||
| real(kind=FP), | intent(in), | optional | :: | local_min | ||
| real(kind=FP), | intent(in), | optional | :: | local_max | ||
| logical, | intent(in), | optional | :: | use_local_min | ||
| logical, | intent(in), | optional | :: | use_local_max |
Makes polygon from
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(divertor_equilibrium_t), | intent(in) | :: | self | |||
| integer, | intent(in) | :: | N_points | |||
| real(kind=FP), | intent(in), | dimension(N_points) | :: | X_points | ||
| real(kind=FP), | intent(in), | dimension(N_points) | :: | Y_points | ||
| class(polygon2d_t), | intent(out) | :: | polygon |
Find the x and y components of a unit vector along the nearest polygon edge The polygon boundary dV is expected to have positive (counterclockwise) orientation Can check this with signed_area (in initialisation)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(divertor_equilibrium_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) | :: | projection_x | |||
| real(kind=FP), | intent(out) | :: | projection_y |
Returns whether a point (x, y, phi) lies inside the divertor vessel Not especially performant, would be better to check if the point is outside of flux limits rather than checking the full district routine
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(divertor_equilibrium_t), | intent(in) | :: | self | |||
| real(kind=FP), | intent(in) | :: | x |
3D position (x and y normalized) |
||
| real(kind=FP), | intent(in) | :: | y |
3D position (x and y normalized) |
||
| real(kind=FP), | intent(in) | :: | phi |
3D position (x and y normalized) |
Returns the coordinates of magnetic axis
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(divertor_equilibrium_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 |
Returns whether a point (x, y, phi) lies on the computational grid
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(divertor_equilibrium_t), | intent(in) | :: | self | |||
| real(kind=FP), | intent(in) | :: | x |
3D position (x and y normalized) |
||
| real(kind=FP), | intent(in) | :: | y |
3D position (x and y normalized) |
||
| real(kind=FP), | intent(in) | :: | phi |
3D position (x and y normalized) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(divertor_equilibrium_t), | intent(in) | :: | self | |||
| real(kind=FP), | intent(in) | :: | x | |||
| real(kind=FP), | intent(in) | :: | y | |||
| real(kind=FP), | intent(in) | :: | phi |
For simple X-point geometries, can set any points below the X-point as private flux if not in the SOL
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(analytic_divertor_equilibrium_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(inout) | :: | local_rhomin | |||
| logical, | intent(out) | :: | local_rhomin_exists | |||
| real(kind=FP), | intent(inout) | :: | local_rhomax | |||
| logical, | intent(out) | :: | local_rhomax_exists |