TORPEX 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

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

nx_core

Number of radial points in the PFR regions

4

nx_sol

Number of radial points in the SOL regions

4

ny_inner_lower_divertor

Number of poloidal points in the inner, lower leg

4

ny_inner_upper_divertor

Number of poloidal points in the inner, upper leg

4

ny_outer_lower_divertor

Number of poloidal points in the outer, lower leg

4

ny_outer_upper_divertor

Number of poloidal points in the outer, upper leg

4

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

psi value of the ‘core’ (used as default for PFR regions)

Required

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

psi value of the PFRs

Required

psi_pf_lower

psi value of the lower PFR

Required

psi_pf_upper

psi value of the upper PFR

Required

psi_sol

psi value of the SOL

Required

psi_sol_inner

psi value of the inner SOL

Required

psi_spacing_separatrix_multiplier

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

1.0

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)

line

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

saddle_point_p1

None

[0.85, -0.15]

saddle_point_p2

None

[0.85, 0.15]

sfunc_checktol

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

1e-13

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

y_boundary_guards

Number of y-boundary cells

0