FLUX-SURFACE GEOMETRY
Clebsch coordinates
GYRO/CGYRO/NEO use a right-handed (positively-oriented), field-aligned coordinate system
where
is the Clebsch angle. Here,
Since the coordinates
Using the definition of the safety factor,
For concreteness, we choose the following boundary conditions for
By writing
we can derive the following integral for
In the case of concentric (unshifted) circular flux surfaces, one will obtain the approximate result
Bounding-box method
In the MXH parameterization [ACB20], we use the bounding-box method to define
minor radius
major radius
elongation
elevation
via the flux-surface contour extrema
Effective field
The effective field strength,
where
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:
where
CGYRO: EQUILIBRIUM_MODEL = 1
NEO: EQUILIBRIUM_MODEL = 0
(2) Shaped Grad-Shafranov equilibrium
The flux surfaces, which are local G-S equilibria, have the new MXH3 parameterization [ACB20]:
where
are anti-symmetric moments and are symmetric moments.CGYRO: EQUILIBRIUM_MODEL = 2
NEO: EQUILIBRIUM_MODEL = 2 or PROFILE_EQUILIBRIUM_MODEL = 1
For experimental profiles, shape parameters are auto-generated from profile data.

Table of geometry parameters
Symbol |
input.cgyro parameter |
input.neo parameter |
meaning |
---|---|---|---|
minor radius |
|||
major radius |
|||
Shafranov shift |
|||
elevation |
|||
elevation shift |
|||
safety factor |
|||
shear |
|||
elongation |
|||
triangularity |
|||
squareness |
|||
tilt |
|||
ovality |
|||
NA |
|||
BTCCW |
|||
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


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(
) = -BTCCWsign(
) = -IPCCWsign(
) = -IPCCWsign(
) = IPCCW BTCCW
The standard configuration in DIII-D is shown below.

This corresponds to IPCCW = 1 and BTCCW =-1. Thus, in GACODE coordinates, we expect:
sign(
) = 1sign(
) = -1sign(
) = -1sign(
) = -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.
Toroidal and poloidal flux
We can start from the general forms of the toroidal and poloidal fluxes [DHCS91]
Explicitly inserting the field-aligned coordinate system of the previous section, and differentiating these with respect to
Thus,
According to these conventions,