The BNORM code calculates the Fourier coefficients of the magnetic field normal to the VMEC surface.

It achieves this by utilizing the covariant magnetic field on the VMEC surface to construct a surface current. It creates input files for the NESCOIL program.

Theory

The purpose of this code is to calculate the Fourier components of outward normal components of the magnetic field. This information is passed to the NESCOIL routine. The code achieves this by first using the covariant magnetic field to construct a surface current density

This surface current is then used to construct the vector potential everywhere on VMEC surface. The calculation of the vector potential requires special treatment for singularities. At a given point x the vector potential due to all other points on the surface is calculated. Then a subroutine is called to handle contribution to the vector potential by the point x. The curl of this vector potential then provides the normal component of the magnetic field on the VMEC surface.

Compilation

BNORM 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 BNORM code takes the VMEC 'wout' file as it's only input file.

Execution

To run BNORM with a given input file simply pass the name of the VMEC output file to BNORM like so (input file named input.test):

Here we've redirected screen output (trapping error messages) to 'bnorm_log.test' and put the process in the background. The code takes one optional parameter, the coil separation in generalized units.

Output Data Format

The BNORM code outputs two files the 'bnorm.suffix' file and 'nescin.suffix' file (where suffix is the suffix of the VMEC 'wout' file). The first file contains the Fourier coefficients of the normal B-Field. The second file is the input file for the NESCOIL code.

The 'bnorm' file has a list of the m, n, and bnormal Fourier coefficients. For information on the 'nescin' file please see the NESCOIL page.

Visualization

There are no specific routines to visualize the data in the 'bnorm' file. However, the matlabVMEC routines should allow a user to plot the values stored in the 'bnorm' file. The bnorm values are calculated from the covariant components of the magnetic field from VMEC. Thus, the Fourier coefficients should have the same parity (cosine) as the covariant components.

Tutorials

After running VMEC, simply call the code with the VMEC 'wout' file as it's input parameter as explained above. This should produce the 'bnorm' and 'nescin' files.

## BNORM

## Table of Contents

It achieves this by utilizing the covariant magnetic field on the VMEC surface to construct a surface current. It creates input files for the NESCOIL program.

## Theory

The purpose of this code is to calculate the Fourier components of outward normal components of the magnetic field. This information is passed to the NESCOIL routine. The code achieves this by first using the covariant magnetic field to construct a surface current density

This surface current is then used to construct the vector potential everywhere on VMEC surface. The calculation of the vector potential requires special treatment for singularities. At a given point x the vector potential due to all other points on the surface is calculated. Then a subroutine is called to handle contribution to the vector potential by the point x. The curl of this vector potential then provides the normal component of the magnetic field on the VMEC surface.

## Compilation

BNORM 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 BNORM code takes the VMEC 'wout' file as it's only input file.## Execution

To run BNORM with a given input file simply pass the name of the VMEC output file to BNORM like so (input file named input.test):Here we've redirected screen output (trapping error messages) to 'bnorm_log.test' and put the process in the background. The code takes one optional parameter, the coil separation in generalized units.

## Output Data Format

The BNORM code outputs two files the 'bnorm.suffix' file and 'nescin.suffix' file (where suffix is the suffix of the VMEC 'wout' file). The first file contains the Fourier coefficients of the normal B-Field. The second file is the input file for the NESCOIL code.The 'bnorm' file has a list of the m, n, and bnormal Fourier coefficients. For information on the 'nescin' file please see the NESCOIL page.

## Visualization

There are no specific routines to visualize the data in the 'bnorm' file. However, the matlabVMEC routines should allow a user to plot the values stored in the 'bnorm' file. The bnorm values are calculated from the covariant components of the magnetic field from VMEC. Thus, the Fourier coefficients should have the same parity (cosine) as the covariant components.## Tutorials

After running VMEC, simply call the code with the VMEC 'wout' file as it's input parameter as explained above. This should produce the 'bnorm' and 'nescin' files.