This code calculates the transformation to Boozer coordinates ^{[1]} of a VMEC equilibria.

Theory

The BOOZ_XFORM code ^{[2]} transforms the VMEC field-line coordinate system to the straight field-line coordinates introduced by Boozer (Fusionwiki link). The Boozer coordinates allow the magnetic field to be written in the form

where the subscript indicates the quantities are generalized toroidal and poloidal coordinates (xi and theta respectively). The code transforms the coordinates and magnetic field. The output quantities are in terms of the Fourier coefficients of the transformed quantities. It is important to note that Boozer coordinates may require many more Fourier modes than the equivalent VMEC representation to maintain accuracy. In general, it is useful to choose between 5 and 6 times more poloidal and 2-3 times more toroidal Fourier resolution than those found in the VMEC equilibria. The following file provides a detailed description of the Boozer transformation preformed by the code:

Note: As of v6.9 only stellarator symmetric equilibria can be transformed. The version distributed with VMEC 8.47 can handle non-stellarator symmetric equilibria.

Compilation

BOOZ_XFORM is a component of the STELLOPT suite of codes. It is contained within the 'stellopt.zip' file. Compilation of the STELLOPT suite is discussed on the STELLOPT Compilation Page.

Input Data Format

The BOOZ_XFORM code takes an input filename as a command line argument. The input file contains the number of theta and zeta harmonics to use, the filename extension of the wout file to read, and a list of surfaces on which to calculate the transform. Typically the user will choose surfaces located at 1/4, 1/2, and 3/4 the way from the axis to the edge of the equilibrium. The choice of surface must coincide with a VMEC index. For example, if the user wished to specify 72 poloidal harmonics, 15 toroidal harmonics, the 'wout.test' file, and surfaces 25, 50 and 75, the file would look like:

72 15
'test'
25 50 75

Execution

The BOOZ_XFORM code takes a command line (see above) and optional output suppression arguments (T/F). For example, if the user had an input file entitled 'in_booz.test' the code could be executed by:

The transformed R, Z, p and |B| quantities are output into a file 'boozmn.ext' where ext is the VMEC file extension specified in the input file. The STELLOPT library provides a fortran function for reading this file: read_boozer_file.f. This file can be included in a code through read_booz_mod. The output file is a binary file a general prescription for reading the file can be found below (taken from read_boozer_file):

Note that this is for version v1.0. The latest version v2.0 outputs in netCDF format.

Visualization

Once read from the output file the BOOZ_XFORM data can be transformed to real space much the way VMEC data is. It is important to note that this code utilizes a trigonometric argument of the form (mu-nv). In Boozer coordinates the toroidal angle is optimized so before preforming a coordinate transformation the user should first transform the pmns (sin function) and add the values to the toroidal angle. This angle should then be used for transforming the remaining quantities.

## BOOZ_XFORM

This code calculates the transformation to Boozer coordinates^{[1]}of a VMEC equilibria.## Theory

The BOOZ_XFORM code^{[2]}transforms the VMEC field-line coordinate system to the straight field-line coordinates introduced by Boozer (Fusionwiki link). The Boozer coordinates allow the magnetic field to be written in the formwhere the subscript indicates the quantities are generalized toroidal and poloidal coordinates (xi and theta respectively). The code transforms the coordinates and magnetic field. The output quantities are in terms of the Fourier coefficients of the transformed quantities. It is important to note that Boozer coordinates may require many more Fourier modes than the equivalent VMEC representation to maintain accuracy. In general, it is useful to choose between 5 and 6 times more poloidal and 2-3 times more toroidal Fourier resolution than those found in the VMEC equilibria. The following file provides a detailed description of the Boozer transformation preformed by the code:

Note: As of v6.9 only stellarator symmetric equilibria can be transformed. The version distributed with VMEC 8.47 can handle non-stellarator symmetric equilibria.

## Compilation

BOOZ_XFORM is a component of the STELLOPT suite of codes. It is contained within the 'stellopt.zip' file. Compilation of the STELLOPT suite is discussed on the STELLOPT Compilation Page.## Input Data Format

The BOOZ_XFORM code takes an input filename as a command line argument. The input file contains the number of theta and zeta harmonics to use, the filename extension of the wout file to read, and a list of surfaces on which to calculate the transform. Typically the user will choose surfaces located at 1/4, 1/2, and 3/4 the way from the axis to the edge of the equilibrium. The choice of surface must coincide with a VMEC index. For example, if the user wished to specify 72 poloidal harmonics, 15 toroidal harmonics, the 'wout.test' file, and surfaces 25, 50 and 75, the file would look like:## Execution

The BOOZ_XFORM code takes a command line (see above) and optional output suppression arguments (T/F). For example, if the user had an input file entitled 'in_booz.test' the code could be executed by:## Output Data Format

The transformed R, Z, p and |B| quantities are output into a file 'boozmn.ext' where ext is the VMEC file extension specified in the input file. The STELLOPT library provides a fortran function for reading this file: read_boozer_file.f. This file can be included in a code through read_booz_mod. The output file is a binary file a general prescription for reading the file can be found below (taken from read_boozer_file):Note that this is for version v1.0. The latest version v2.0 outputs in netCDF format.

## Visualization

Once read from the output file the BOOZ_XFORM data can be transformed to real space much the way VMEC data is. It is important to note that this code utilizes a trigonometric argument of the form (mu-nv). In Boozer coordinates the toroidal angle is optimized so before preforming a coordinate transformation the user should first transform the pmns (sin function) and add the values to the toroidal angle. This angle should then be used for transforming the remaining quantities.## Tutorials

Boozer Transformation for NCSX-Like Configuration