FLUX-SURFACE GEOMETRY

Coordinates

GYRO/CGYRO/NEO use a right-handed (positively-oriented), field-aligned coordinate system \((r,\theta,\alpha)\) and the Clebsch field representation

\[\mathbf{B} =\nabla \alpha \times \nabla \psi (r) \; ,\]

where \(\psi\) is the poloidal flux divided by \(2\pi\) and

\[\alpha =\varphi +\nu (r,\theta )\]

is the Clebsch angle. Here, \(\varphi\) is the toroidal angle, oriented as shown in the figure below, and \(\theta\) is the poloidal angle which increases as one moves counterclockwise along the flux-surface (shown in blue).

The coordinate systems \((R,Z,\varphi)\) and \((r,\theta,\varphi)\) are positively oriented.

Bounding-box method

In the MXH parameterization [ACB20], we use the bounding-box method to define

  • minor radius \(r\)

  • major radius \(R_0\)

  • elongation \(\kappa\)

  • elevation \(Z_0\)

via the flux-surface contour extrema

\[\begin{split}2 r = & \max_\ell(R) - \min_\ell(R) \; , \\ 2 \kappa r = & \max_\ell(Z) - \min_\ell(Z) \; , \\ 2 R_0 = & \max_\ell(R) + \min_\ell(R) \; , \\ 2 Z_0 = & \max_\ell(Z) + \min_\ell(Z) \; .\end{split}\]

Effective field

The effective field strength, \(B_{\rm {unit}}\), is defined as

\[B_\mathrm{unit} = \frac{1}{r} \frac{d\chi _{t}}{dr} \; ,\]

where \(\chi _{t}\) is the toroidal flux divided by \(2\pi\). This gives the roughly equivalent field that would be obtained if the flux surface was deformed to a circle.

Equilibria

GYRO/CGYRO/NEO can be run using circular equilibrium or shaped Grad-Shafranov equilibrium.

(1) Circular equilibrium

The flux surfaces, which are not local G-S equilibria, have the form:

\[\begin{split}R(r,\theta) &= R_0 + r \cos \theta \\ Z(r,\theta) &= r \sin \theta \\\end{split}\]

where \(\nu(r,\theta) = -q(r) \theta\).

(2) Shaped Grad-Shafranov equilibrium

The flux surfaces, which are local G-S equilibria, have the new MXH3 parameterization [ACB20]:

\[\begin{split}R(r,\theta) &= R_0(r) + r \cos \theta_R \\ Z(r,\theta) &= Z_0(r) + \kappa(r) r \sin \theta\end{split}\]

where \(\nu(r,\theta)\) is computed numerically. The harmonic angle \(\theta_R\) is

\[\theta_R = \theta + c_0(r) + \sum_{n=1}^{3} \left[ c_n(r) \cos n \theta + s_n(r) \sin n \theta \right]\]
Shape moments

Table of geometry parameters

Symbol

input.cgyro parameter

input.neo parameter

meaning

\(r/a\)

RMIN

RMIN_OVER_A

minor radius

\(R_0(r)/a\)

RMAJ

RMAJ_OVER_A

major radius

\(\partial R_0/\partial r\)

SHIFT

SHIFT

Shafranov shift

\(Z_0(r)/a\)

ZMAG

ZMAG_OVER_A

elevation

\(\partial Z_0/\partial r\)

DZMAG

S_ZMAG

elevation shift

\(q\)

Q

Q

safety factor

\(s\)

S

SHEAR

shear

\(\kappa\)

KAPPA

KAPPA

elongation

\(s_\kappa\)

S_KAPPA

S_KAPPA

\(\delta = \sin s_1\)

DELTA

DELTA

triangularity

\(s_\delta\)

S_DELTA

S_DELTA

\(\zeta = -s_2\)

ZETA

ZETA

squareness

\(s_\zeta\)

S_ZETA

S_ZETA

\(c_0\)

SHAPE_COS0

SHAPE_COS0

tilt

\(s_{c_0}\)

SHAPE_S_COS0

SHAPE_S_COS0

\(c_1\)

SHAPE_COS1

SHAPE_COS1

ovality

\(s_{c_1}\)

SHAPE_S_COS1

SHAPE_S_COS1

\(c_2\)

SHAPE_COS2

SHAPE_COS2

\(s_{c_2}\)

SHAPE_S_COS2

SHAPE_S_COS2

\(c_3\)

SHAPE_COS3

SHAPE_COS3

\(s_{c_3}\)

SHAPE_S_COS3

SHAPE_S_COS3

\(s_3\)

SHAPE_SIN3

SHAPE_SIN3

\(s_{s_3}\)

SHAPE_S_SIN3

SHAPE_S_SIN3

\(\beta_e\)

BETAE_UNIT

NA

\(\beta_*\) scaling

BETA_STAR_SCALE

BETA_STAR

BTCCW

BTCCW

BTCCW

IPCCW

IPCCW

IPCCW

For further information about geometry and normalization conventions, consult the GYRO Technical Guide [CB10].

Magnetic field orientation

GACODE uses a right-handed (positively-oriented), field-aligned coordinate system \((r,\theta,\varphi)\), whereas DIII-D uses a (positively-oriented) cylindrical system \((R,\phi,Z)\). Looking down on the tokamak from above, the orientation of the GACODE toroidal angle is clockwise, whereas the DIII-D toroidal angle is counter-clockwise:

flux surface
flux surface

In reality, quantities like the safety factor and poloidal flux have definite signs. Historically, these signs have been suppressed or neglected in both theory and modeling. For proper treatment of momentum transport, however, these signs must be retained. We can infer typically neglected signs by knowing IPCCW and BTCCW. For example:

  • sign(\(B_{\rm tor}\)) = -BTCCW

  • sign(\(B_{\rm pol}\)) = -IPCCW

  • sign(\(\psi_{\rm pol}\)) = -IPCCW

  • sign(\(q\)) = IPCCW \(\times\) BTCCW

The standard configuration in DIII-D is shown below.

flux surface

This corresponds to IPCCW = 1 and BTCCW =-1. Thus, in GACODE coordinates, we expect:

  • sign(\(B_{\rm tor}\)) = 1

  • sign(\(B_{\rm pol}\)) = -1

  • sign(\(\psi_{\rm pol}\)) = -1

  • sign(\(q\)) = -1

In other words, the safety factor and poloidal flux are negative in the typical case. This will be reflected in a properly-constructed input.gacode file.