Tokamak options

Option

Description

Default

N_norm_prefactor

Prefactor that multiplys ny_total to give the normalization factor for the total number of points in contours. The normalisation factor is used to scale the grid spacing with the total number of points, which keeps the spacing functions consistent when the resolution is changed

1.0

extrapolate_profiles

Use an exponential decay for the pressure outside the separatrix, based on the value and gradient at the plasma edge

False

finecontour_Nfine

Number of points on each FineContour. Increase for more accurate interpolation or distance calculations

100

finecontour_atol

Absolute tolerance for refinement of FineContours

1e-12

finecontour_diagnose

Print and display some information to help diagnose failures in FineContour refinement and adjustment

False

finecontour_extend_prefactor

Prefactor to increase estimate for number of points to extend FineContour when y_boundary_guards>0. May be useful to decrease in case of FineContour creation failures if the target end is very close to a region with problematic psi (e.g. coils, centre column). If the value is too small, may result in extrapolation using FineContour points which is likely to be poorly constrained.

2.0

finecontour_maxits

Maximum number of iterations for refinement and adjustment of a FineContour

200

finecontour_overdamping_factor

Damping factor 0<f<=1 used to stabilise iterations in FineContour.equaliseSpacing. Values towards 0 are most stable but make the smallest updates. Values towards 1 are less stable but potentially faster.

0.8

leg_extend

Extend divertor legs by this length [m]

0.0

leg_extend_lower_inner

Extend lower inner divertor leg

0.0

leg_extend_lower_outer

Extend lower outer divertor leg

0.0

leg_extend_upper_inner

Extend upper inner divertor leg

0.0

leg_extend_upper_outer

Extend upper outer divertor leg

0.0

leg_refine_atol

Tolerance used when iteratively refining the position of start points of legs around an X-point.

1e-05

leg_refine_maxits

Maximum number of iterations for iterative refinement of start points of legs around an X-point.

1000

leg_trace_atol

Tolerance used when calling scipy.integrate.solve_ivp to follow the divertor legs. Default is 0.01*refine_atol.

2e-10

nx_core

Number of radial points in the core

5

nx_inter_sep

Number of radial points in the inter-separatrix region

0

nx_pf

Number of radial points in the PF region Note: Currently can’t be varied due to BOUT++ limitations

5

nx_sol

Number of radial points in the SOL

5

nx_sol_inner

Number of radial points in the outer SOL. Note: Currently can’t be varied due to BOUT++ limitations

5

nx_sol_outer

Number of radial points in the inner SOL. Note: Currently can’t be varied due to BOUT++ limitations

5

ny_inner_divertor

Number of poloidal points in the inner divertor(s)

4

ny_inner_lower_divertor

Number of poloidal points in the inner, lower divertor

4

ny_inner_sol

Number of poloidal points in the inboard SOL upstream of the X-point(s)

4

ny_inner_upper_divertor

Number of poloidal points in the inner, upper divertor

4

ny_outer_divertor

Number of poloidal points in the outer divertor(s)

4

ny_outer_lower_divertor

Number of poloidal points in the outer, lower divertor

4

ny_outer_sol

Number of poloidal points in the outboard SOL upstream of the X-point(s)

4

ny_outer_upper_divertor

Number of poloidal points in the outer, upper divertor

4

ny_sol

Number of poloidal points in the SOL upstream of the X-point(s)

8

orthogonal

Is grid orthogonal?

True

poloidal_spacing_delta_psi

Small increment in psi used to find vector along grad(psi) at end of separatrix segment. Use None for an automatically selected increment.

None

poloidal_spacing_method

Method to use for poloidal spacing function: ‘sqrt’ for getSqrtPoloidalSpacingFunction; ‘monotonic’ for getMonotonicPoloidalDistanceFunc; ‘linear’ for getLinearPoloidalDistanceFunc

sqrt

poloidalfunction_diagnose

Print and plot extra information to diagnose when a poloidal spacing function has an error

False

psi_core

Unnormalised poloidal flux value at the core boundary, used in mesh generation. Overrides psinorm_core if this value is given, if the option is none, then calculated from psinorm_core

None

psi_divide_twopi

Divide poloidal flux, and so poloidal field, by 2pi

False

psi_interpolation_method

Method to use for interpolating psi from the eqdsk file. Possible values are: ‘spline’ for scipy.interpolate.RectBivariateSpline;’dct’ for a discrete cosine transform.

spline

psi_pf_lower

Unnormalised poloidal flux value at the lower PFR boundary, used in mesh generation. Overrides psinorm_pf_lower if this value is given, if the option is none, then calculated from psinorm_pf_lower

None

psi_pf_upper

Unnormalised poloidal flux value at the upper PFR boundary, used in mesh generation. Overrides psinorm_pf_upper if this value is given, if the option is none, then calculated from psinorm_pf_upper

None

psi_sol

Unnormalised poloidal flux value at the SOL boundary, used in mesh generation. Overrides psinorm_sol if this value is given, if the option is none, then calculated from psinorm_sol

None

psi_sol_inner

Unnormalised poloidal flux value at the inner SOL boundary, used in mesh generation. Overrides psinorm_sol_inner if this value is given, if the option is none, then calculated from psinorm_sol_inner

None

psi_spacing_separatrix_multiplier

Factor modifying radial spacing at separatrics: <1 to make points closer, >1 to make points further apart

1.0

psinorm_core

Normalised psi of the inner radial (core) boundary

0.9

psinorm_pf

Normalised psi of the inner radial boundary in the PFR

0.9

psinorm_pf_lower

Normalised psi of the inner radial boundary in the lower PFR

0.9

psinorm_pf_upper

Normalised psi of the inner radial boundary in the upper PFR

0.9

psinorm_sol

Normalised psi of the outer radial (SOL) boundary

1.1

psinorm_sol_inner

Normalised psi of the outer radial boundary in the inner SOL

1.1

refine_atol

Absolute tolerance for refinement of points

2e-08

refine_methods

Ordered list of methods to try when refining points. Valid names are: ‘newton’ - Newton iteration; ‘line’ - a line search; ‘integrate’ integrate along psi gradient; ‘integrate+newton’ integrate, then refine with Newton; ‘none’ - no refinement (always succeeds)

[‘integrate+newton’, ‘integrate’]

refine_timeout

Timeout for refining FineContour objects in seconds. Set to None to disable the timeout; can be useful for debugging as exceptions may get lost due to a separate thread being used to run the refine() method with a timeout. If you get func_timeout.exceptions.FunctionTimedOut exceptions and you are sure there is no problem with the grid, you could try increasing this value.

10.0

refine_width

Width for line search when refining points

1e-05

reverse_Bt

Reverse the sign of toroidal magnetic field Bt.

False

reverse_current

Reverse the sign of the poloidal field

False

sfunc_checktol

Tolerance to check for small negative values that are not significantly different from zero in poloidal spacing functions

1e-13

start_at_upper_outer

Start gridding double-null at upper-outer divertor instead of lower-inner. Warning: this option was added to enable backward compatibility with restart files from simulations in upper-disconnected-double-null configuration using grid files from the IDL hypnotoad; it is not well tested and not recommended to use.

False

target_all_poloidal_spacing_length

Spacing at the wall end of a region (used for orthogonal grids). Use None to not constrain the spacing.

None

target_inner_lower_poloidal_spacing_length

Spacing at the wall end of the inner, lower divertor leg region (used for orthogonal grids). Use None to not constrain the spacing.

None

target_inner_upper_poloidal_spacing_length

Spacing at the wall end of the inner, upper divertor leg region (used for orthogonal grids). Use None to not constrain the spacing. Note an upper single null equilibrium will not use this setting, but rather target_inner_lower_poloidal_spacing_length, for reasons of implementation convenience.

None

target_outer_lower_poloidal_spacing_length

Spacing at the wall end of the outer, lower divertor leg region (used for orthogonal grids). Use None to not constrain the spacing.

None

target_outer_upper_poloidal_spacing_length

Spacing at the wall end of the outer, upper lower divertor leg region (used for orthogonal grids). Use None to not constrain the spacing. Note an upper single null equilibrium will not use this setting, but rather target_outer_lower_poloidal_spacing_length, for reasons of implementation convenience.

None

xpoint_offset

Tolerance for placing intial positions for tracing perpendiculars that should start exactly at an X-point, but initial positions to be slightly displaced from the null so code can follow Grad(psi). This is a numerical fudge factor that may need to be increased for low-resolution input equilibria.

0.1

xpoint_poloidal_spacing_length

Spacing at the X-point end of a region (used for orthogonal grids).

0.05

xpoint_refine_atol

Tolerance used when iteratively refining the position of an X-point that has been identified.

1e-06

xpoint_refine_maxits

Maximum number of iterations for iterative refinement of the position of an X-point that has been identified.

1000

y_boundary_guards

Number of y-boundary cells

0