carthy_equilibrium_m Module

Module containing the implementation of an analytic tokamak equilibrium as described by Carthy (Phys. Plasmas 1999 https://doi.org/10.1063/1.873630) N.b. this equilibrium is axisymmetric - phi, when required, is not used



Derived Types

type, public, extends(analytic_divertor_equilibrium_t) ::  carthy_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, 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, public :: check_privflux_regions
procedure, public :: init
procedure, public :: display
procedure, public :: debug
procedure, public :: psi
procedure, public :: bx
procedure, public :: by
procedure, public :: btor