FLUX-SURFACE GEOMETRY

Clebsch coordinates

GYRO/CGYRO/NEO use a right-handed (positively-oriented), field-aligned coordinate system (r,θ,α) and the Clebsch field representation [KK58]

B=α×ψsuch thatBα=Bψ=0

where ψ is the poloidal flux divided by 2π and

α=φ+ν(r,θ)

is the Clebsch angle. Here, φ is the toroidal angle, oriented as shown in the figure below, and θ is the poloidal angle which increases as one moves counterclockwise along the flux-surface (shown in blue). In these coordinates, the Jacobian is

Jψ1ψ×θα=1ψ×θφ.

Since the coordinates (ψ,θ,α) and (ψ,θ,φ) form right-handed systems, the Jacobian Jψ is positive-definite. In the latter coordinates, the magnetic field becomes

B=φ×ψ+νθθ×ψ

Using the definition of the safety factor, q(ψ), we may deduce

q(ψ)12π02πBφBθdθ=12π02π(νθ)dθ=ν(ψ,0)ν(ψ,2π)2π.

For concreteness, we choose the following boundary conditions for ν:

ν(ψ,2π)= 2πq(ψ),ν(ψ,0)= 0.

By writing B in the standard form

B=φ×ψ+I(ψ)φ,

we can derive the following integral for ν:

ν(ψ,θ)=I(ψ)0θJψ|φ|2dθ.

In the case of concentric (unshifted) circular flux surfaces, one will obtain the approximate result ν(ψ,θ)q(ψ)θ. Finally, we remark that the coordinate systems (R,Z,φ) and (r,θ,φ) are positively oriented.

Bounding-box method

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

  • minor radius r

  • major radius R0

  • elongation κ

  • elevation Z0

via the flux-surface contour extrema

2r=max(R)min(R),2κr=max(Z)min(Z),2R0=max(R)+min(R),2Z0=max(Z)+min(Z).

Effective field

The effective field strength, Bunit, is defined as

Bunit=1rdχtdr,

where χt is the toroidal flux divided by 2π. 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:

R(r,θ)=R0+rcosθZ(r,θ)=rsinθ

where ν(r,θ)=q(r)θ.

(2) Shaped Grad-Shafranov equilibrium

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

R(r,θ)=R0(r)+rcosθRZ(r,θ)=Z0(r)+κ(r)rsinθ

where ν(r,θ) is computed numerically. The harmonic angle θR is

θR=θ+c0(r)+n=13[cn(r)cosnθ+sn(r)sinnθ]
Shape moments

Table of geometry parameters

Symbol

input.cgyro parameter

input.neo parameter

meaning

r/a

RMIN

RMIN_OVER_A

minor radius

R0(r)/a

RMAJ

RMAJ_OVER_A

major radius

R0/r

SHIFT

SHIFT

Shafranov shift

Z0(r)/a

ZMAG

ZMAG_OVER_A

elevation

Z0/r

DZMAG

S_ZMAG

elevation shift

q

Q

Q

safety factor

s

S

SHEAR

shear

κ

KAPPA

KAPPA

elongation

sκ

S_KAPPA

S_KAPPA

δ=sins1

DELTA

DELTA

triangularity

sδ

S_DELTA

S_DELTA

ζ=s2

ZETA

ZETA

squareness

sζ

S_ZETA

S_ZETA

c0

SHAPE_COS0

SHAPE_COS0

tilt

sc0

SHAPE_S_COS0

SHAPE_S_COS0

c1

SHAPE_COS1

SHAPE_COS1

ovality

sc1

SHAPE_S_COS1

SHAPE_S_COS1

c2

SHAPE_COS2

SHAPE_COS2

sc2

SHAPE_S_COS2

SHAPE_S_COS2

c3

SHAPE_COS3

SHAPE_COS3

sc3

SHAPE_S_COS3

SHAPE_S_COS3

s3

SHAPE_SIN3

SHAPE_SIN3

ss3

SHAPE_S_SIN3

SHAPE_S_SIN3

βe

BETAE_UNIT

NA

β 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,θ,φ), whereas DIII-D uses a (positively-oriented) cylindrical system (R,ϕ,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(Btor) = -BTCCW

  • sign(Bpol) = -IPCCW

  • sign(ψpol) = -IPCCW

  • sign(q) = IPCCW × 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(Btor) = 1

  • sign(Bpol) = -1

  • sign(ψ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.

Toroidal and poloidal flux

We can start from the general forms of the toroidal and poloidal fluxes [DHCS91]

Ψt StBdS=12πVtBφdV,Ψp SpBdS=12πVpBθdV.

Explicitly inserting the field-aligned coordinate system of the previous section, and differentiating these with respect to ψ, gives

dΨtdψ= 12π02πdφ02πdθBφJψ,= 12π02πdφ02πdθBφBθ,= 2πq(ψ),
dΨpdψ= 12π02πdφ02πdθBθJψ,= 12π02πdφ02πdθ,= 2π.

Thus, ψ is the poloidal flux divided by 2π. For this reason, it is useful to also define the toroidal flux divided by 2π:

χt12πΨt.

According to these conventions,

dΨt=qdΨpanddχt=qdψ.