Skip to content

Geometry Objects

dexter.GeometryObject: TypeAlias = LarGeometry | NcGeometry module-attribute

Available Geometry objects.

  • LarGeometry: Analytical Large Aspect Ratio Geometry of a circular device.
  • NcGeometry: Geometry of a realistic configuration.

dexter.LarGeometry(baxis: float, raxis: float, rlast: float)

Bases: MachineObject, Geometry

Analytical Large Aspect Ratio Geometry of a circular device.

Parameters:

  • baxis (float) –

    The magnetic field strength on the axis $B_0$ in $[T]$.

  • raxis (float) –

    The horizontal position of the magnetic axis $R_0$ in $[m]$.

  • rlast (float) –

    The $r$ coordinate's value at the last closed flux surface in $[m]$.

Attributes:

  • psit_last (MagneticFlux) –

    The value of the toroidal flux at the last closed flux surface, in Normalized units.

Notes
  • No $\psi$ bounds checks are performed in evaluations.

  • Evaluations methods that calculate or accept $\psi_p$ as a parameter always raise an Exception, since $\psi_p$ is defined through the q-factor.

  • The Jacobian is not available, since it is defined through $q$, $g$, $I$ and $B$.

  • In LAR equilibria, it holds that $R_0 \equiv R_{geo}$.

Example
>>> geometry = dex.LarGeometry(
...     baxis=2, # Tesla
...     raxis=1.75, # meters
...     rlast=0.5, # meters
... )

A LAR configuration's geometry is described by the following formulas:

$$ r(\psi_t) = \sqrt{2\psi_t} $$

$$ \psi_t(r) = r^2/2 $$

$$ R(\psi_t, \theta) = R_{geo} + R_{geo}\sqrt{2\psi_t}\cos\theta $$

$$ Z(\psi_t, \theta) = R_{geo}\sqrt{2\psi_t}\sin\theta $$


dexter.NcGeometry(path: str, interp1d_type: Interpolation1dType, interp2d_type: Interpolation2dType)

Bases: MachineObject, Geometry

Geometry of a realistic configuration.

Stores fluxes, angles and lab variables’ data, and provides interpolation methods between them.

Parameters:

  • path (str) –

    The path to the NetCDF file.

  • interp1d_type (Interpolation1dType) –

    The 1D interpolation type for the 1D quantities.

  • interp2d_type (Interpolation2dType) –

    The 2D interpolation type for the 2D quantities.

Attributes:

  • path (str) –

    The path to the netCDF file.

  • netcdf_version (NetCDFVersion) –

    The netCDF file's version (SemVer).

  • interp1d_type (Interpolation1dType) –

    The 1D interpolation type.

  • interp2d_type (Interpolation2dType) –

    The 2D interpolation type.

  • shape (ArrayShape) –

    The $(\psi,\theta)$ shape of the 2D arrays.

  • psit_last (MagneticFlux | None) –

    The value of the last closed toroidal flux $\psi_{t,LCFS}$.

  • psip_last (MagneticFlux | None) –

    The value of the last closed poloidal flux $\psi_{p,LCFS}$.

  • psit_array (Array1 | None) –

    The toroidal flux' values.

  • psip_array (Array1 | None) –

    The poloidal flux' values.

  • theta_array (Array1) –

    The poloidal angle $\theta$ values.

  • r_array (Array1) –

    The radial coordinate $r$ values, in $[m]$.

  • rlab_array (Array2) –

    The $R$ values, in $[m]$.

  • zlab_array (Array2) –

    The $Z$ values, in $[m]$.

  • jacobian_array (Array2 | None) –

    The Jacobian $J$ values, in $[m]$.

Example
>>> geometry = dex.NcGeometry(path, "Cubic", "Bicubic")