In order to represent the fields in a compact form toroidal coordinates are often used. In these coordinates the various coordinates and quantities are represented by periodic functions in the poloidal (theta) and toroidal (phi) directions. This allows the representation of quantities on a given radial surface in terms of trigonometric function (sine and cosine). The choice of radial coordinate can vary, but is almost always normalized to some edge value (say toroidal flux in VMEC). This allows quantities in 3D to be represented by continuous functions in the poloidal and toroidal direction and a discrete set of points in the radial direction. Thus on any radial surface the value of a parameter is known to machine accuracy at any point. Of course the accuracy of this representation is a function of the ability to represent a spatially varying quantity with a truncated trigonometric series. In general any quantity can be represented by

or

Here the angle per field period (zeta) has been utilized in place of the total toroidal angle (phi). The two are related by the periodicity of the toroidal domain

Finally, it is often more convenient to write the kernel of the trigonometric functions in terms of normalized values instead of radians.

The choice of trigonometric function for a given quantity is determined by the symmetry of the problem. For systems with stellarator symmetry (up-down in the phi=0 plane), the cylindrical radial coordinate (R) has a even symmetry (cosine) while the vertical coordinate (Z) has a odd symmetry (sine). In general, toroidal coordinates do not require this symmetry and quantities are functions of a series of both odd and even coefficients

Here the superscripts denote that the coefficients are different values.

There are three choices of kernel. Although they are simply a choice of sign, they have been named after the codes which employ them. Here they are

Name

Convention

VMEC

(mu-nv)

NESCOIL

(mu+nv)

PIES

(nv-mu)

Conversion between these conventions is straightforward. Going from VMEC to NESCOIL simply requires that an array be flipped about the toroidal mode index (n=0), thus n=-n and -n=n (NESCOIL TO VMEC is the same conversion). The VMEC convention is just the negative kernel of the PIES convention, so only the odd (sine) coefficients need be multiplied by -1, remember:

Thus conversion from one convention is simply a matter of flipping arrays about the toroidal mode index (n) and negating odd coefficients (sin).

Curvilinear coordinates

In the toroidal domain a cylindrical coordinates system is used to express the location of points in space. This position vector in this coordinate system may be written

where s is the normalized minor radial coordinate, u and v are the normalized angular coordinates, and R and Z are functions of the toroidal coordinates. The position function R and Z are written

and

The second term in each equation can be dropped if stellarator symmetry is assumed. Vectors may be represented in terms of their contravariant (sup, up, top) components or covariant (sub, dn, bottom) components through the relation

The covariant and contravariant basis vectors may be written

and

Contravariant Vector Components

This allows us to write the covariant basis vectors in terms of cartesian unit vectors

Here the derivative of phi with respect to the normalized toroidal angle is kept general. This allows the cartesian components of a vector to be written in terms of the contravariant components:

and

The components in cylindrical coordinates may also be written in terms of the contravariant components:

and

It is important to note that when working with different coordinate systems a chain-rule can be used to convert derivatives

The surface normal vector (N, which does not have unit length) can be written as the cross product of the covariant basis vectors

allowing the cartesian surface normal components to be written

This vector integrated can be treated as the product of the surface normal vector (unit length) and the differential surface element

Princeton Plasma Physics Laboratory (PPPL) cannot guarantee the quality of the information on the PPPL wiki sites, nor does the content reflect the official voice of PPPL. Please read the terms and conditions of use.

## Toroidal Coordinate Systems

## Introduction

In order to represent the fields in a compact form toroidal coordinates are often used. In these coordinates the various coordinates and quantities are represented by periodic functions in the poloidal (theta) and toroidal (phi) directions. This allows the representation of quantities on a given radial surface in terms of trigonometric function (sine and cosine). The choice of radial coordinate can vary, but is almost always normalized to some edge value (say toroidal flux in VMEC). This allows quantities in 3D to be represented by continuous functions in the poloidal and toroidal direction and a discrete set of points in the radial direction. Thus on any radial surface the value of a parameter is known to machine accuracy at any point. Of course the accuracy of this representation is a function of the ability to represent a spatially varying quantity with a truncated trigonometric series. In general any quantity can be represented byor

Here the angle per field period (zeta) has been utilized in place of the total toroidal angle (phi). The two are related by the periodicity of the toroidal domain

Finally, it is often more convenient to write the kernel of the trigonometric functions in terms of normalized values instead of radians.

The choice of trigonometric function for a given quantity is determined by the symmetry of the problem. For systems with stellarator symmetry (up-down in the phi=0 plane), the cylindrical radial coordinate (R) has a even symmetry (cosine) while the vertical coordinate (Z) has a odd symmetry (sine). In general, toroidal coordinates do not require this symmetry and quantities are functions of a series of both odd and even coefficients

Here the superscripts denote that the coefficients are different values.

There are three choices of kernel. Although they are simply a choice of sign, they have been named after the codes which employ them. Here they are

Thus conversion from one convention is simply a matter of flipping arrays about the toroidal mode index (n) and negating odd coefficients (sin).

## Curvilinear coordinates

In the toroidal domain a cylindrical coordinates system is used to express the location of points in space. This position vector in this coordinate system may be writtenwhere s is the normalized minor radial coordinate, u and v are the normalized angular coordinates, and R and Z are functions of the toroidal coordinates. The position function R and Z are written

and

The second term in each equation can be dropped if stellarator symmetry is assumed. Vectors may be represented in terms of their contravariant (sup, up, top) components or covariant (sub, dn, bottom) components through the relation

The covariant and contravariant basis vectors may be written

and

## Contravariant Vector Components

This allows us to write the covariant basis vectors in terms of cartesian unit vectorsHere the derivative of phi with respect to the normalized toroidal angle is kept general. This allows the cartesian components of a vector to be written in terms of the contravariant components:

and

The components in cylindrical coordinates may also be written in terms of the contravariant components:

and

It is important to note that when working with different coordinate systems a chain-rule can be used to convert derivatives

The surface normal vector (N, which does not have unit length) can be written as the cross product of the covariant basis vectors

allowing the cartesian surface normal components to be written

This vector integrated can be treated as the product of the surface normal vector (unit length) and the differential surface element