analytic_divertor_equilibrium_m Module



Derived Types

type, public, abstract, extends(divertor_equilibrium_t) ::  analytic_divertor_equilibrium_t

Components

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

Read more…
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

Type-Bound Procedures

procedure, public, pass(self) :: absb
procedure, public, pass(self) :: bpol
procedure(init), public, deferred, pass(self) :: init
procedure(display), public, deferred, pass(self) :: display
procedure(debug), public, deferred, pass(self) :: debug
procedure(bx), public, deferred, pass(self) :: bx
procedure(by), public, deferred, pass(self) :: by
procedure(btor), public, deferred, pass(self) :: btor
procedure, public :: is_axisymmetric
procedure, public :: rho
procedure, public :: jacobian
procedure, public :: epol
procedure, public :: erad
procedure, public, nopass :: make_polygon
procedure, public :: make_polygon_from_params
procedure, public :: polygon_projection
procedure, public :: in_vessel
procedure, public :: mag_axis_loc
procedure, public :: on_grid
procedure, public :: district
procedure(psi), public, deferred, pass(self) :: psi
procedure, public :: check_privflux_regions

Subroutines

public subroutine check_privflux_regions(self, x, y, phi, local_rhomin, local_rhomin_exists, local_rhomax, local_rhomax_exists)

For simple X-point geometries, can set any points below the X-point as private flux if not in the SOL

Arguments

Type IntentOptional 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