GVEC parameter list#
This is a list of all parameters that can be set in the GVEC parameter file. We group the parameters by the following (sub-)categories:
Initialization parameters#
GVEC has basically two modes of initialization, see whichInitequilibrium parameter.
One choice is starting from scratch, by specifying the boundary, initial axis guess and profiles in the GVEC parameter file.
The other choice allows starting from an existing VMEC solution (wout file), which is read in GVEC, the boundary and magnetic axis are taken, as well as the profiles. This also sets some defaults for the GVEC discretization parameters, to match what has been used in VMEC, like the Fourier series of the variables. Many things, like discretization parameters, the boundary, axis and profiles, can then still be changed by setting them explicitly in the GVEC parameterfile.
ProjectName
ProjectName
Project name, used for all output files, must be a string without spaces
Type: string
Default: GVEC
whichInitEquilibrium
whichInitEquilibrium
How initial guess is computed. Either from boundary and axis parameters, or from VMEC file.
Type: integer
Allowed Values:
|
from axis and boundary parameters |
|
from VMEC file, needs: |
Default: 0
VMECwoutfile
VMECwoutfile
full file name of vmec solution file, either as netcdf or as nemec output,
needs VMECwoutfile_format
required if: whichInitEquilibrium=1
Type: string
VMECwoutfile_format
VMECwoutfile_format
Choose which VMEC wout file format, either netcdf or ascii/binary format from NEMEC
The filename is specified in VMECwoutfile
required if: whichInitEquilibrium=1
Type: string
Allowed Values:
|
netcdf format |
|
ascii format from older vmec (nemec) |
|
binary format from older vmec (nemec) |
Default: 0
init_LA
init_LA
Recompute \(\lambda\) at the start of the simulation, from the initial guess of \(X^1\) and \(X^2\)
Type: logical
Allowed Values:
|
if |
|
recompute \(\lambda\) from mapping |
Default: True
init_fromBConly
init_fromBConly
Only active for initialization from VMEC solution, whichInitEquilibrium=1.
Type: logical
Allowed Values:
|
use the full VMEC solution |
|
only use axis and boundary from VMEC |
Default: False
reinit_BC
reinit_BC
Only active for initialization from VMEC solution, whichInitEquilibrium=1 and init_fromBConly=T.
Defines how axis and boundary are initialized, can be partly from VMEC file and partly from GVEC parameters.
Type: integer
Allowed Values:
|
default: keep vmec axis and boundary |
|
keep vmec boundary, overwrite axis |
|
keep vmec axis, overwrite boundary |
|
overwrite axis and boundary |
Default: -1
Discretization parameters#
There are three solution variables in GVEC, \(X^1\), \(X^2\) and \(\lambda\) (in the parameter names, they are simply X1, X2 and LA). They are scalar unknowns, described by a B-Spline discretization in the radial direction \(\rho\) and a double-periodic Fourier series in the poloidal angle \(\vartheta\) and the toroidal angle \(\zeta\), see coordinate conventions.
The B-Spline is defined by a polynomial degree \(p\) and a radial grid, which is for now provided by the number of elements and a grid type. The Fourier series is defined by maximum mode numbers \(m_\text{max},n_\text{max}\) in poloidal and toroidal direction, respectively. Also, they can be specified as sine, cosine or full sine/cosine series.
Note that each variable has its own discretization parameters, which can be set separately.
sgrid_nElems (mandatory parameter)
sgrid_nElems
Number of elements in the radial grid, used for B-Spline in all variables \(X^1,X^2,\lambda\)
Can be chosen independently of the B-Spline polynomial degree.
The case of 1 element is equivalent using a polynomial in \(\rho\in[0,1]\).
required if: sgrid_grid_type!=-1
Type: integer
Allowed Values: \(> 0\)
sgrid_grid_type
sgrid_grid_type
Type of radial grid, used for B-Spline in all variables \(X^1,X^2,\lambda\)
Type: integer
Allowed Values:
|
uniform grid |
|
finer towards the edge |
|
finer towards the axis |
|
finer towards axis and edge |
|
uniform in the axis region and finer towards edge |
|
custom grid, needs |
Default: 0
sgrid_rho
sgrid_rho
Positions of the B-Spline elements in the radial direction \(\rho\).
The values must be monotonically increasing and include the two endpoints \(\rho=0\) and \(\rho=1\).
sgrid_nElems is set automatically from the size of the array.
required if: sgrid_grid_type=-1
Type: array of real
fac_nyq
fac_nyq
Nyquist factor, factor between the maximum mode number and the number of integration points in poloidal and toroidal directions.
if fac_nyq=-1, mn_nyq must be provided instead.
Type: integer
Allowed Values: \(\geq 2\) or \(-1\)
Default: 4
mn_nyq
mn_nyq
Number of integration points \(n_\vartheta,n_\zeta\) in poloidal and toroidal directions.
required if: fac_nyq=-1
Type: array of integer of size 2
Allowed Values: \(n_\vartheta\geq 2m_\text{max}+1\) and \(n_\zeta\geq 2n_\text{max}+1\)
nfp (mandatory if not part of hmap)
nfp
This parameter sets the number of field periods \(N_{FP}\)
required if: not which_hmap=20 or which_hmap=21
Type: integer
Allowed Values: \(> 0\)
X1_mn_max (mandatory if whichInitEquilibrium=0)
X1_mn_max
The solution is described by three variables \(X^1,X^2,\lambda\) with a B-Spline discretization in radial direction\(\rho\) and a double-periodic Fourier series in the poloidal angle \(\vartheta\) and the toroidal angle \(\zeta\).
This parameter sets maximum poloidal and toroidal mode numbers \(m_\text{max}\),\(n_\text{max}\) of the variable\(X^1\)
Overwrites the default, which is only set if whichInitEquilibrium=1 (initialize with VMEC file).
required if: whichInitEquilibrium=0
Type: array of integer of size 2
Allowed Values: \(m_\text{max}\gt 0,n_\text{max}\ge 0\)
Default: only if whichInitEquilibrium=1, the default is set to the maximum mode numbers from the VMEC solution file.
X2_mn_max (mandatory if whichInitEquilibrium=0)
X2_mn_max
The solution is described by three variables \(X^1,X^2,\lambda\) with a B-Spline discretization in radial direction\(\rho\) and a double-periodic Fourier series in the poloidal angle \(\vartheta\) and the toroidal angle \(\zeta\).
This parameter sets maximum poloidal and toroidal mode numbers \(m_\text{max}\),\(n_\text{max}\) of the variable\(X^2\)
Overwrites the default, which is only set if whichInitEquilibrium=1 (initialize with VMEC file).
required if: whichInitEquilibrium=0
Type: array of integer of size 2
Allowed Values: \(m_\text{max}\gt 0,n_\text{max}\ge 0\)
Default: only if whichInitEquilibrium=1, the default is set to the maximum mode numbers from the VMEC solution file.
LA_mn_max (mandatory if whichInitEquilibrium=0)
LA_mn_max
The solution is described by three variables \(X^1,X^2,\lambda\) with a B-Spline discretization in radial direction\(\rho\) and a double-periodic Fourier series in the poloidal angle \(\vartheta\) and the toroidal angle \(\zeta\).
This parameter sets maximum poloidal and toroidal mode numbers \(m_\text{max}\),\(n_\text{max}\) of the variable\(\lambda\)
Overwrites the default, which is only set if whichInitEquilibrium=1 (initialize with VMEC file).
required if: whichInitEquilibrium=0
Type: array of integer of size 2
Allowed Values: \(m_\text{max}\gt 0,n_\text{max}\ge 0\)
Default: only if whichInitEquilibrium=1, the default is set to the maximum mode numbers from the VMEC solution file.
X1_sin_cos
X1_sin_cos
The solution is described by three variables \(X^1,X^2,\lambda\) with a B-Spline discretization in radial direction\(\rho\) and a double-periodic Fourier series in the poloidal angle \(\vartheta\) and the toroidal angle \(\zeta\).
This parameter sets which Fourier modes are active for the variable\(X^1\), thus allows to impose stellarator symmetry.
Type: string
Allowed Values:
|
only use \(\sin(m\vartheta-n\zeta)\), with \(\{m=0,1\leq n\leq n_\text{max}\,\, 1\leq m\leq m_\text{max},-n_\text{max}\leq n\leq n_\text{max}\}\) |
|
only use \(\cos(m\vartheta-n\zeta)\), with \(\{m=0,0\leq n\leq n_\text{max}\,; \,1\leq m\leq m_\text{max},-n_\text{max}\leq n\leq n_\text{max}\}\) |
|
use both sine and cosine modes |
Default: _cos_ if whichInitEquilibrium=0. Ff whichInitEquilibrium=1, the default is set from the VMEC solution.
X2_sin_cos
X2_sin_cos
The solution is described by three variables \(X^1,X^2,\lambda\) with a B-Spline discretization in radial direction\(\rho\) and a double-periodic Fourier series in the poloidal angle \(\vartheta\) and the toroidal angle \(\zeta\).
This parameter sets which Fourier modes are active for the variable\(X^2\), thus allows to impose stellarator symmetry.
Type: string
Allowed Values:
|
only use \(\sin(m\vartheta-n\zeta)\), with \(\{m=0,1\leq n\leq n_\text{max}\,\, 1\leq m\leq m_\text{max},-n_\text{max}\leq n\leq n_\text{max}\}\) |
|
only use \(\cos(m\vartheta-n\zeta)\), with \(\{m=0,0\leq n\leq n_\text{max}\,; \,1\leq m\leq m_\text{max},-n_\text{max}\leq n\leq n_\text{max}\}\) |
|
use both sine and cosine modes |
Default: _sin_ if whichInitEquilibrium=0. Ff whichInitEquilibrium=1, the default is set from the VMEC solution.
LA_sin_cos
LA_sin_cos
The solution is described by three variables \(X^1,X^2,\lambda\) with a B-Spline discretization in radial direction\(\rho\) and a double-periodic Fourier series in the poloidal angle \(\vartheta\) and the toroidal angle \(\zeta\).
This parameter sets which Fourier modes are active for the variable\(\lambda\), thus allows to impose stellarator symmetry.
Type: string
Allowed Values:
|
only use \(\sin(m\vartheta-n\zeta)\), with \(\{m=0,1\leq n\leq n_\text{max}\,\, 1\leq m\leq m_\text{max},-n_\text{max}\leq n\leq n_\text{max}\}\) |
|
only use \(\cos(m\vartheta-n\zeta)\), with \(\{m=0,0\leq n\leq n_\text{max}\,; \,1\leq m\leq m_\text{max},-n_\text{max}\leq n\leq n_\text{max}\}\) |
|
use both sine and cosine modes |
Default: _sin_ if whichInitEquilibrium=0. Ff whichInitEquilibrium=1, the default is set from the VMEC solution.
X1X2_deg (mandatory parameter)
X1X2_deg
The solution is described by three variables \(X^1,X^2,\lambda\) with a B-Spline discretization in radial direction\(\rho\) and a double-periodic Fourier series in the poloidal angle \(\vartheta\) and the toroidal angle \(\zeta\).
This parameter sets the polynomial degree \(p\) of the B-Spline, for the variables \(X^1,X^2\).
required input!
Type: integer
Allowed Values: \(>0\)
X1X2_continuity
X1X2_continuity
The solution is described by three variables \(X^1,X^2,\lambda\) with a B-Spline discretization in radial direction\(\rho\) and a double-periodic Fourier series in the poloidal angle \(\vartheta\) and the toroidal angle \(\zeta\).
This parameter sets the continuity of the B-Spline, for the variables \(X^1,X^2\).
For now, only a continuity of \(p-1\) is possible, with \(p\) from X1X2_deg.
Type: integer
Allowed Values: \(\geq 0\)
Default: X1X2_deg-1
LA_deg (mandatory parameter)
LA_deg
The solution is described by three variables \(X^1,X^2,\lambda\) with a B-Spline discretization in radial direction\(\rho\) and a double-periodic Fourier series in the poloidal angle \(\vartheta\) and the toroidal angle \(\zeta\).
This parameter sets the polynomial degree \(p\) of the B-Spline, for the variable \(\lambda\).
required input!
Type: integer
Allowed Values: \(>0\)
LA_continuity
LA_continuity
The solution is described by three variables \(X^1,X^2,\lambda\) with a B-Spline discretization in radial direction\(\rho\) and a double-periodic Fourier series in the poloidal angle \(\vartheta\) and the toroidal angle \(\zeta\).
This parameter sets the continuity of the B-Spline, for the variable \(\lambda\).
For now, only a continuity of \(p-1\) is possible, with \(p\) from LA_deg.
Type: integer
Allowed Values: \(\geq 0\)
Default: LA_deg-1
Boundary and axis parameters#
For the variables \(X^1\) and \(X^2\), the boundary and initial guess for the axis must be specified.
One possibility is to provide the coefficients of the sine and cosine Fourier modes with poloidal mode number \(m\) and toroidal mode number \(n\). The initial guess for the axis is also given as cosine and sine Fourier mode coefficients, but obviously only toroidal modes. Alternatively, for simple enough geometries, the axis can also be guessed by setting init_average_axis=True.
Another possibility is to provide a specific dataset via a netcdf file, that contains the positions of the boundary on a regular grid in \(\vartheta\) and \(\zeta\), so \(X^1(\vartheta_i,\zeta_j), X^2(\vartheta_i,\zeta_j)\) values.
X1_b_cos(m;n)
X1_b_cos(m;n)
The boundary is described by two variables \(X^1(\vartheta,\zeta)\),\(X^2(\vartheta,\zeta)\), as a double-periodic Fourier series.
This parameter sets the coefficient of the Fourier mode of \(X^1\) variable, with basis function \(\cos(m\vartheta-n N_{FP}\zeta)\). The number of field periods \(N_{FP}\).
In (m;n), m and n must be set to the actual poloidal (\(m\)) and toroidal (\(n\)) mode number (excluding the \(N_{FP}\) factor).
The maximum mode number \(m_\text{max}\),\(n_\text{max}\) is provided by X1_mn_max.
ignored if X1_sin_cos=_cos_
required if: whichInitEquilibrium=0.
Type: real
Allowed Values: Coefficients are read for mode numbers \(\{m=0,0\le n\le n_\text{max}\}\) and \(\{1\le m\le m_\text{max},-n_\text{max}\le n\le n_\text{max}\}\)
Default: 0
X1_b_sin(m;n)
X1_b_sin(m;n)
The boundary is described by two variables \(X^1(\vartheta,\zeta)\),\(X^2(\vartheta,\zeta)\), as a double-periodic Fourier series.
This parameter sets the coefficient of the Fourier mode of \(X^1\) variable, with basis function \(\sin(m\vartheta-n N_{FP}\zeta)\). The number of field periods \(N_{FP}\).
In (m;n), m and n must be set to the actual poloidal (\(m\)) and toroidal (\(n\)) mode number (excluding the \(N_{FP}\) factor).
The maximum mode number \(m_\text{max}\),\(n_\text{max}\) is provided by X1_mn_max.
ignored if X1_sin_cos=_sin_
required if: whichInitEquilibrium=0.
Type: real
Allowed Values: Coefficients are read for mode numbers \(\{m=0,0\le n\le n_\text{max}\}\) and \(\{1\le m\le m_\text{max},-n_\text{max}\le n\le n_\text{max}\}\)
Default: 0
X2_b_cos(m;n)
X2_b_cos(m;n)
The boundary is described by two variables \(X^1(\vartheta,\zeta)\),\(X^2(\vartheta,\zeta)\), as a double-periodic Fourier series.
This parameter sets the coefficient of the Fourier mode of \(X^2\) variable, with basis function \(\cos(m\vartheta-n N_{FP}\zeta)\). The number of field periods \(N_{FP}\).
In (m;n), m and n must be set to the actual poloidal (\(m\)) and toroidal (\(n\)) mode number (excluding the \(N_{FP}\) factor).
The maximum mode number \(m_\text{max}\),\(n_\text{max}\) is provided by X2_mn_max.
ignored if X2_sin_cos=_cos_
required if: whichInitEquilibrium=0.
Type: real
Allowed Values: Coefficients are read for mode numbers \(\{m=0,0\le n\le n_\text{max}\}\) and \(\{1\le m\le m_\text{max},-n_\text{max}\le n\le n_\text{max}\}\)
Default: 0
X2_b_sin(m;n)
X2_b_sin(m;n)
The boundary is described by two variables \(X^1(\vartheta,\zeta)\),\(X^2(\vartheta,\zeta)\), as a double-periodic Fourier series.
This parameter sets the coefficient of the Fourier mode of \(X^2\) variable, with basis function \(\sin(m\vartheta-n N_{FP}\zeta)\). The number of field periods \(N_{FP}\).
In (m;n), m and n must be set to the actual poloidal (\(m\)) and toroidal (\(n\)) mode number (excluding the \(N_{FP}\) factor).
The maximum mode number \(m_\text{max}\),\(n_\text{max}\) is provided by X2_mn_max.
ignored if X2_sin_cos=_sin_
required if: whichInitEquilibrium=0.
Type: real
Allowed Values: Coefficients are read for mode numbers \(\{m=0,0\le n\le n_\text{max}\}\) and \(\{1\le m\le m_\text{max},-n_\text{max}\le n\le n_\text{max}\}\)
Default: 0
init_average_axis
average_axis_move_X1
average_axis_move_X1
Offset the axis in \(X^1\) direction, from the position found by the average init_average_axis=True
Type: real
Default: 0.0
average_axis_move_X2
average_axis_move_X2
Offset the axis in \(X^2\) direction, from the position found by the average init_average_axis=True
Type: real
Default: 0.0
X1_a_cos(0;n)
X1_a_cos(0;n)
This parameter sets the Fourier mode of the initial axis guess for the \(X^1\) variable, with basis function \(\cos(-n N_{FP}\zeta)\). The number of field periods \(N_{FP}\).
in (0;n), n must be set to the actual toroidal mode number \(n\) (excluding the \(N_{FP}\) factor).
The maximum mode number \(n_\text{max}\) is provided by X1_mn_max.
ignored if X1_sin_cos=_cos_,
also ignored if init_average_axis=True.
required if: whichInitEquilibrium=0.
Type: real
Allowed Values: Coefficients are read for mode numbers \(\{0\le n\le n_\text{max}\}\)
Default: 0
X1_a_sin(0;n)
X1_a_sin(0;n)
This parameter sets the Fourier mode of the initial axis guess for the \(X^1\) variable, with basis function \(\sin(-n N_{FP}\zeta)\). The number of field periods \(N_{FP}\).
in (0;n), n must be set to the actual toroidal mode number \(n\) (excluding the \(N_{FP}\) factor).
The maximum mode number \(n_\text{max}\) is provided by X1_mn_max.
ignored if X1_sin_cos=_sin_,
also ignored if init_average_axis=True.
required if: whichInitEquilibrium=0.
Type: real
Allowed Values: Coefficients are read for mode numbers \(\{0\le n\le n_\text{max}\}\)
Default: 0
X2_a_cos(0;n)
X2_a_cos(0;n)
This parameter sets the Fourier mode of the initial axis guess for the \(X^2\) variable, with basis function \(\cos(-n N_{FP}\zeta)\). The number of field periods \(N_{FP}\).
in (0;n), n must be set to the actual toroidal mode number \(n\) (excluding the \(N_{FP}\) factor).
The maximum mode number \(n_\text{max}\) is provided by X2_mn_max.
ignored if X2_sin_cos=_cos_,
also ignored if init_average_axis=True.
required if: whichInitEquilibrium=0.
Type: real
Allowed Values: Coefficients are read for mode numbers \(\{0\le n\le n_\text{max}\}\)
Default: 0
X2_a_sin(0;n)
X2_a_sin(0;n)
This parameter sets the Fourier mode of the initial axis guess for the \(X^2\) variable, with basis function \(\sin(-n N_{FP}\zeta)\). The number of field periods \(N_{FP}\).
in (0;n), n must be set to the actual toroidal mode number \(n\) (excluding the \(N_{FP}\) factor).
The maximum mode number \(n_\text{max}\) is provided by X2_mn_max.
ignored if X2_sin_cos=_sin_,
also ignored if init_average_axis=True.
required if: whichInitEquilibrium=0.
Type: real
Allowed Values: Coefficients are read for mode numbers \(\{0\le n\le n_\text{max}\}\)
Default: 0
boundary_perturb
boundary_perturb
Add boundary perturbations to intial state, also after a restart.
Type: logical
Allowed Values: True or False
Default: False
boundary_perturb_type
boundary_perturb_type
The type of blending of the boundary perturbation towards the core. legacy (default) selects a fixed gaussian blending. cosm selects a blending using a cosine function to the power of m.
Type: string
Allowed Values: legacy or cosm
Default: legacy
boundary_perturb_depth
boundary_perturb_depth
Depth of the boundary perturbation in the radial coordinate. Only affects boundary_perturb_type=cosm.
Type: real
Default: 0.6
X1pert_b_cos(m,n)
X1pert_b_cos(m,n)
This parameter sets the coefficient of the Fourier mode that is added as a perturbation at the boundary, for the \(X^1\) variable, with basis function \(\cos(m\vartheta-n N_{FP}\zeta)\). The number of field periods \(N_{FP}\).
m,n must be replaced by the poloidal (\(m\)) and toroidal (\(n\)) mode number (excluding the \(N_{FP}\) factor).
The maximum mode number \(m_\text{max}\),\(n_\text{max}\) is provided by X1_mn_max.
ignored if X1_sin_cos=_cos_
required if: boundary_perturb=True.
Type: real
Allowed Values: Coefficients are read for mode numbers \(\{m=0,0\le n\le n_\text{max}\}\) and \(\{1\le m\le m_\text{max},-n_\text{max}\le n\le n_\text{max}\}\)
Default: 0
X1pert_b_sin(m,n)
X1pert_b_sin(m,n)
This parameter sets the coefficient of the Fourier mode that is added as a perturbation at the boundary, for the \(X^1\) variable, with basis function \(\sin(m\vartheta-n N_{FP}\zeta)\). The number of field periods \(N_{FP}\).
m,n must be replaced by the poloidal (\(m\)) and toroidal (\(n\)) mode number (excluding the \(N_{FP}\) factor).
The maximum mode number \(m_\text{max}\),\(n_\text{max}\) is provided by X1_mn_max.
ignored if X1_sin_cos=_sin_
required if: boundary_perturb=True.
Type: real
Allowed Values: Coefficients are read for mode numbers \(\{m=0,0\le n\le n_\text{max}\}\) and \(\{1\le m\le m_\text{max},-n_\text{max}\le n\le n_\text{max}\}\)
Default: 0
X2pert_b_cos(m,n)
X2pert_b_cos(m,n)
This parameter sets the coefficient of the Fourier mode that is added as a perturbation at the boundary, for the \(X^2\) variable, with basis function \(\cos(m\vartheta-n N_{FP}\zeta)\). The number of field periods \(N_{FP}\).
m,n must be replaced by the poloidal (\(m\)) and toroidal (\(n\)) mode number (excluding the \(N_{FP}\) factor).
The maximum mode number \(m_\text{max}\),\(n_\text{max}\) is provided by X2_mn_max.
ignored if X2_sin_cos=_cos_
required if: boundary_perturb=True.
Type: real
Allowed Values: Coefficients are read for mode numbers \(\{m=0,0\le n\le n_\text{max}\}\) and \(\{1\le m\le m_\text{max},-n_\text{max}\le n\le n_\text{max}\}\)
Default: 0
X2pert_b_sin(m,n)
X2pert_b_sin(m,n)
This parameter sets the coefficient of the Fourier mode that is added as a perturbation at the boundary, for the \(X^2\) variable, with basis function \(\sin(m\vartheta-n N_{FP}\zeta)\). The number of field periods \(N_{FP}\).
m,n must be replaced by the poloidal (\(m\)) and toroidal (\(n\)) mode number (excluding the \(N_{FP}\) factor).
The maximum mode number \(m_\text{max}\),\(n_\text{max}\) is provided by X2_mn_max.
ignored if X2_sin_cos=_sin_
required if: boundary_perturb=True.
Type: real
Allowed Values: Coefficients are read for mode numbers \(\{m=0,0\le n\le n_\text{max}\}\) and \(\{1\le m\le m_\text{max},-n_\text{max}\le n\le n_\text{max}\}\)
Default: 0
GetBoundaryFromFile
GetBoundaryFromFile
Instead of providing fourier modes for the boundary \(X^1,X^2\), use a dataset stored in a netcdf file that contains the \(X^1,X^2\) positions on a regular grid in \(\vartheta,\zeta\).
Type: integer
Allowed Values:
|
off |
|
read from specific netcdf file |
Default: -1
boundary_filename
boundary_filename
Full file name of the boundary data netcdf file.
required if: GetBoundaryFromFile=1
Type: string
scale_minor_radius
scale_minor_radius
scale \(X^1, X^2\) boundary data from file by a constant factor. The parameter is used in combination with the G-Frame hmap, where the boundary is typically centered around \(X^1=X^2=0\).
required if: GetBoundaryFromFile=1
Type: real
Default: 1.0
Profile parameters#
The profiles for the rotational transform (iota) and pressure (pres) are defined over a normalized radial coordinate \(s=\rho^2 \in [0,1]\), where the radial coordinate \(\rho\sim\sqrt{\Phi}\) is proportional to the square root of the torodial magnetic flux, so \(\rho=0\) is the magnetic axis. The profile can be defined either by a polynomial, by B-spline coefficients and a knot sequence, or by a set of point-value pairs which are then interpolated.
PhiEdge
PhiEdge
Total toroidal magnetic flux \(\Phi\) at the boundary. Defines the \(\Phi\) profile. A positive sign means that the toroidal magnetic field points in positive \(\zeta\) direction.
Note that internally, GVEC then uses \(\Phi_\text{edge}/(2\pi)\).
Type: real
Default: 1.0
iota_type (mandatory if whichInitEquilibrium=0)
iota_type
Type of profile to represent the rotational transform iota(s). Can be a polynomial, B-Spline or a set of points which is then interpolated
Note: the profile is always given as a function of the normalized magnetic flux \(s\), with \(s=0\) as the magnetic axis, and \(s=1\) at the boundary. The normalized radius-like coordinate is \(\rho=\sqrt{s}\).
required if: whichInitEquilibrium=0
Type: string
Allowed Values:
|
polynomial represenation, needs |
|
B-Spline representation, needs |
|
Cubic spline interpolation from point values at s-positions, needs |
iota_coefs
iota_coefs
Depending on the type of profile of the rotational transform iota(s):
if
iota_type=polynomial, it sets the coefficients \(c_0 + c_1 s + c_2 s^2 \dots\)if
iota_type=bspline, these are the B-Spline coefficients (which need to be compatible to the knotsiota_knots)
required if: iota_type is polynomial or bspline
Type: array of real of any size
iota_knots
iota_knots
Required for the B-Spline profile of the rotational transform iota(s):
The knots must be in the range of \(s=[0,1]\) and must be monotonically increasing.
They must have the same multiplicity of the first knot at \(s=0\) and the last knot at \(s=1\). The degree of the B-Spline is deduced from the multiplicity.
Knots need to be compatible with the B-Spline coefficients iota_coefs
required if: iota_type is bspline
Type: array of real of any size
iota_rho2
iota_rho2
Required for the cubic spline interpolation of the rotational transform iota(s):
These are the radial point positions, in the normalized magnetic flux
They must cover the range of \(s=[0,1]\) and must be monotonically increasing.
Point positions must of same size as the values, specified by iota_vals
required if: iota_type is interpolation
Type: array of real of any size
iota_vals
iota_vals
Required for the cubic spline interpolation of the rotational transform iota(s):
These are the values of iota at the radial point positions, in the normalized magnetic flux
Point positions must of same size as the values, specified by iota_rho2
required if: iota_type is interpolation
Type: array of real of any size
iota_BC_type_axis
iota_BC_type_axis
Boundary condition at \(s=0\) for the cubic spline interpolation of the rotational transform iota(s)
required if: iota_type is interpolation
Type: string
Allowed Values:
|
Makes the third derivative continuous at the second grid point |
|
Sets the first derivative at the boundary \(s=0\), either to zero or to the provided first value of |
|
Sets the second derivative at the boundary \(s=0\), either to zero or to the provided first value of |
Default: "not_a_knot"
iota_BC_type_edge
iota_BC_type_edge
Boundary condition at \(s=1\) for the cubic spline interpolation of the rotational transform iota(s)
required if: iota_type is interpolation
Type: string
Allowed Values:
|
Makes the third derivative continuous at the second to last grid point |
|
Sets the first derivative at the boundary \(s=1\), either to zero or to the provided second value of |
|
Sets the second derivative at the boundary \(s=0\), either to zero or to the provided second value of |
Default: "not_a_knot"
iota_BC_vals
iota_BC_vals
Values for the first / second derivative, at \(s=0\) and \(s=1\), for the cubic spline interpolation of the rotational transform iota(s).
required if: iota_type is interpolation , and if iota_BC_type_axis or iota_BC_type_edge is different from "not_a_knot"
Type: array of real of size 2
Default: (/0.0,0.0/))
iota_scale
iota_scale
Scales the rotational transform iota(s) by a constant.
See profile definition iota_type
Type: real
Default: 1.0
pres_type (mandatory if whichInitEquilibrium=0)
pres_type
Type of profile to represent the pressure pres(s). Can be a polynomial, B-Spline or a set of points which is then interpolated
Note: the profile is always given as a function of the normalized magnetic flux \(s\), with \(s=0\) as the magnetic axis, and \(s=1\) at the boundary. The normalized radius-like coordinate is \(\rho=\sqrt{s}\).
required if: whichInitEquilibrium=0
Type: string
Allowed Values:
|
polynomial represenation, needs |
|
B-Spline representation, needs |
|
Cubic spline interpolation from point values at s-positions, needs |
pres_coefs
pres_coefs
Depending on the type of profile of the pressure pres(s):
if
pres_type=polynomial, it sets the coefficients \(c_0 + c_1 s + c_2 s^2 \dots\)if
pres_type=bspline, these are the B-Spline coefficients (which need to be compatible to the knotspres_knots)
required if: pres_type is polynomial or bspline
Type: array of real of any size
pres_knots
pres_knots
Required for the B-Spline profile of the pressure pres(s):
The knots must be in the range of \(s=[0,1]\) and must be monotonically increasing.
They must have the same multiplicity of the first knot at \(s=0\) and the last knot at \(s=1\). The degree of the B-Spline is deduced from the multiplicity.
Knots need to be compatible with the B-Spline coefficients pres_coefs
required if: pres_type is bspline
Type: array of real of any size
pres_rho2
pres_rho2
Required for the cubic spline interpolation of the pressure pres(s):
These are the radial point positions, in the normalized magnetic flux
They must cover the range of \(s=[0,1]\) and must be monotonically increasing.
Point positions must of same size as the values, specified by pres_vals
required if: pres_type is interpolation
Type: array of real of any size
pres_vals
pres_vals
Required for the cubic spline interpolation of the pressure pres(s):
These are the values of pres at the radial point positions, in the normalized magnetic flux
Point positions must of same size as the values, specified by pres_rho2
required if: pres_type is interpolation
Type: array of real of any size
pres_BC_type_axis
pres_BC_type_axis
Boundary condition at \(s=0\) for the cubic spline interpolation of the pressure pres(s)
required if: pres_type is interpolation
Type: string
Allowed Values:
|
Makes the third derivative continuous at the second grid point |
|
Sets the first derivative at the boundary \(s=0\), either to zero or to the provided first value of |
|
Sets the second derivative at the boundary \(s=0\), either to zero or to the provided first value of |
Default: "not_a_knot"
pres_BC_type_edge
pres_BC_type_edge
Boundary condition at \(s=1\) for the cubic spline interpolation of the pressure pres(s)
required if: pres_type is interpolation
Type: string
Allowed Values:
|
Makes the third derivative continuous at the second to last grid point |
|
Sets the first derivative at the boundary \(s=1\), either to zero or to the provided second value of |
|
Sets the second derivative at the boundary \(s=0\), either to zero or to the provided second value of |
Default: "not_a_knot"
pres_BC_vals
pres_BC_vals
Values for the first / second derivative, at \(s=0\) and \(s=1\), for the cubic spline interpolation of the pressure pres(s).
required if: pres_type is interpolation , and if pres_BC_type_axis or pres_BC_type_edge is different from "not_a_knot"
Type: array of real of size 2
Default: (/0.0,0.0/))
pres_scale
pres_scale
Scales the pressure pres(s) by a constant.
See profile definition pres_type
Type: real
Default: 1.0
init_with_profile_iota
init_with_profile_iota
Only relevant for VMEC readin, whichInitEquilibrium=1. Possibility to replace rotational transform profile from VMEC.
Type: logical
Allowed Values:
|
the rotational transform profile is defined from GVEC parameters |
|
default, the rotational transform profile is interpolated from the VMEC data |
Default: False
init_with_profile_pres
init_with_profile_pres
Only relevant for VMEC readin, whichInitEquilibrium=1. Possibility to replace pressure profile from VMEC.
Type: logical
Allowed Values:
|
the pressure profile is defined from GVEC parameters |
|
default, the pressure profile is interpolated from the VMEC data |
Default: False
Minimizer parameters#
In GVEC, the total MHD energy \(W_{MHD}\) is minimized using a gradient based method. The iteration stops if the norms of the gradients is below a given threshold, or at the maximum number of iterations. One can write intermediate results to disk in a given interval of iterations, and also log information on major quantities during the minimization in an iteration interval to a log-file.
MinimizerType
MinimizerType
Switch for minimization method.
Type: integer
Allowed Values:
|
gradient descent |
|
accelerated gradient descent |
Default: 10
PrecondType
PrecondType
Switch for radial preconditioner onto the gradient of the energy functional.
Build and invert approximate Hessian for each mode.
Makes the start timestep start_dt of the order of unity.
Type: integer
Allowed Values:
|
off |
|
on |
Default: 1
start_dt
start_dt
Initial pseudo-timestep for gradient descent.Is automatically reduced, if too large.
It can happen that automatism fails, especially if the Jacobian inverts in the first iterations. Then start_dt needs to be reduced by hand.
Type: real
Allowed Values: \(<1\) and \(>0\)
Default: 0.1
maxIter
maxIter
Maximum iteration count, stopping criterion for minimization.
Type: integer
Default: 5000
minimize_tol
minimize_tol
Stopping criterion for minimization: tolerance on the norm of the force residual in \(X^1,X^2,\lambda\).Note that the square root of the norm is taken \(\sqrt{|F|^2}\).
The norm is computed of forces after preconditioning and application of the boundary conditions.
Type: real
Allowed Values: >1.0e-8 , since the square root of the norm is taken
Default: 1.0e-12, means its off
dW_allowed
dW_allowed
Minimum of change in total energy per iteration step. Should be always decreasing, but numerically, one can allow for small positive change.
Type: real
Default: 1.0e-10
outputIter
outputIter
Interval of iterations, where Statefiles and visualization files are written.
Type: integer
Default: =maxIter
logIter
logIter
Interval of iterations, where logging quantities are printed to screen and to logfile.
Type: integer
Default: =maxIter
nLogScreen
nLogScreen
Number of times the screen output of the logging is skipped (=1: no skip).
Type: integer
Default: 1
doCheckDistance
doCheckDistance
In the logging, compare the change of the positions \(X^1,X^1\) to the solution of the last log.
Type: logical
Default: False
doCheckAxis
doCheckAxis
Log the X1,X2 positions of the axis.
Type: logical
Default: True
hmap parameters#
The hmap is an exchangeable function that specifies how the \((q^1,q^2,q^3)=(X^1,X^2,\zeta)\) variables are mapped to Cartesian coordinates \((x,y,z)\). The simplest map is a straight periodic cylinder, or the cylinder coordinates. There is a more academic knot-map, and then two types of axis-following frames, the Frenet frame given only by a closed 3D curve, provided as a Fourier series in \(R,Z\). And the generalized frame, or G-Frame, where a curve and the normal and binormal vector are given as at point positions/vectors in cartesian coordinates, which are provided via a dataset in a netcdf file.
which_hmap
which_hmap
Select which hmap between \(X^1,X^2,\zeta\) coordinates and cartesian coordinates, \((x,y,z)\).
Type: integer
Allowed Values:
|
cylinder coordinates, \(x=X^1\cos(\zeta),y=-X^1\sin(\zeta),z=X^2\) |
|
straight cylinder \(x=X^1,y=L\zeta/(2\pi),z=X^2\) |
|
knot |
|
Frenet frame based on Fourier modes of axis in \(R,Z,\phi\) |
|
G-Frame, based on axis and N,B vectors in cartesian space (read from netcdf file) |
Default: 1
hmap_cyl_len (only if which_hmap=3)
hmap_cyl_len
Length of the domain in Z=zeta*len
Type: real
Allowed Values: \(>0\)
Default: 1.0
hmap_knot_kl (only if which_hmap=10)
hmap_knot_kl
Type of the knot, \((k,l)\)-torus parameter
Type: array of integer of size 2
Default: (/2,3/)
hmap_knot_major_radius (only if which_hmap=10)
hmap_knot_major_radius
Knot major radius
Type: real
Allowed Values: \(>0\)
Default: 1.0
hmap_knot_delta_shift (only if which_hmap=10)
hmap_knot_delta_shift
Knot delta shift
Type: real
Default: 0.4
hmap_n_max (only if which_hmap=20)
hmap_n_max
Frenet frame: Number of fourier modes of the axis (excluding \(N_{FP}\) factor)
Type: integer
Allowed Values: \(\geq 0\)
Default: 10
hmap_nfp (only if which_hmap=20)
hmap_nfp
Frenet frame: Number of field periods of the axis
Type: integer
Allowed Values: \(\geq 1\)
Default: 1
hmap_omnig (only if which_hmap=20)
hmap_omnig
Frenet frame: omingeneity of axis, if true, sign flips of the frame are assumed at \(\zeta=0,\pi/n_{FP},2\pi/n_{FP},...\)
Type: logical
Default: False
hmap_rc (only if which_hmap=20)
hmap_rc
Frenet frame: cosine Fourier mode coefficients of axis \(R(\zeta)\) position.
\(\cos(n N_{FP} \zeta)\), from \(n=0,...n_{max}\)
Type: array of real of size hmap_n_max+1
Default: zeros
hmap_rs (only if which_hmap=20)
hmap_rs
Frenet frame: sine Fourier mode coefficients of axis \(R(\zeta)\) position.
\(\sin(n N_{FP} \zeta)\), from \(n=0,...n_{max}\)
Type: array of real of size hmap_n_max+1
Default: zeros
hmap_zc (only if which_hmap=20)
hmap_zc
Frenet frame: cosine Fourier mode coefficients of axis \(Z(\zeta)\) position.
\(\cos(n N_{FP} \zeta)\), from \(n=0,...n_{max}\)
Type: array of real of size hmap_n_max+1
Default: zeros
hmap_zs (only if which_hmap=20)
hmap_zs
Frenet frame: sine Fourier mode coefficients of axis \(Z(\zeta)\) position.
\(\sin(n N_{FP} \zeta)\), from \(n=0,...n_{max}\)
Type: array of real of size hmap_n_max+1
Default: zeros
hmap_nvisu
hmap_nvisu
Number of points along the axis per field period, for visualization of the T,N,B frame on a full turn
active for Frenet and G-Frame, which_hmap=20/21
default -1 is no visualization
Type: integer
Default: -1
hmap_ncfile (mandatory if which_hmap=21)
hmap_ncfile
G-Frame: full name of netcdf file that contains the cartesian coordinates of the axis, N and B vectors.
required if: which_hmap=21
Type: string
Visualization and output parameters#
Even though the visualization can now be done via the python bindings, the fortran executable also allows for a number of visualization output files during the minimization run, with *visu*.csv for 1D data and as paraview files (*visu*.vtu) for 3D data. The 3D data can also be written as a netcdf file (*visu*.nc).
outFileType
outFileType
File type of visualization output.
Type: integer
Allowed Values:
|
all visualization files as |
|
all visualization files are structured array netcdf file |
|
option |
Default: 1
SFLout
SFLout
Switch for visualization after straight-field line transform, either PEST or Boozer.
Type: integer
Allowed Values:
|
off |
|
without SFL transform, still writes |
|
PEST, writes |
|
Boozer writes |
Default: -1
SFLout_mn_max (only if SFLout>-1)
SFLout_mn_max
Number of modes used in PEST / Boozer transform. If set to -1, this number is computed as 4 times the maximum mode number of the solution variables.
Type: array of integer of size 2
Allowed Values: needs to be \(>=\) the maximum mode number of the solution variables
Default: (/-1,-1/)
SFLout_relambda (only if SFLout>-1)
SFLout_relambda
Recompute lambda for pest and boozer (strongly recommended for boozer!)
Type: boolean
Default: True
SFLout_mn_pts (only if SFLout>-1)
SFLout_mn_pts
Number of visualization grid points in \(\vartheta,\zeta\) direction, always on one field period!
Type: array of integer of size 2
Default: (/40,40/)
SFLout_endpoint (only if SFLout>-1)
SFLout_endpoint
Include the periodic endpoint at the end of the field period in the visualization points
Type: logical
Default: False
SFLout_radialPos (only if SFLout>-1)
SFLout_radialPos
Which flux surface positions (in \(\\rho~\\sqrt{}\)(magn.flux) are used for the SFL visualization.
Type: array of real of any size
Allowed Values: \(0\leq ho_i\leq 1\)
Default: (/1.0/)
visu1D
visu1D
Visualize data over radius \(\rho\) (profiles and fourier modes).
Type: integer
Allowed Values:
|
off |
|
1d profiles and modes \(X^1\),\(X^2\),\(\lambda\) |
|
1st radial derivative of modes \(X^1\),\(X^2\),\(\lambda\) |
|
2nd radial derivative of modes \(X^1\),\(X^2\),\(\lambda\) |
|
absolute value of modes \(X^1\),\(X^2\),\(\lambda\) |
|
absolute value of modes \(X^1\),\(X^2\),\(\lambda\) divided by \( ho^m\): |
Default: -1
np_1d
np_1d
For visu1d: number of visualization points in \(\rho\), per B-Spline element!
Type: integer
Allowed Values: \(>0\)
Default: 5
visu2D
visu2D
Visualize boundary and/or solution as poloidal planes, still in 3D space.
Type: integer
Allowed Values:
|
off |
|
boundary visualization files |
|
poloidal plane visualization files |
|
option |
Default: -1
np_visu_BC
np_visu_BC
For visu2D: number of visualization points \(n_\vartheta,n_\zeta\) of the boundary
Type: array of integer of size 2
Allowed Values: \(>0\)
Default: (/20,30/)
visu3D
visu3D
Visualize full volumetric solution in 3D space.
Type: integer
Allowed Values:
|
off |
|
visualiztion files |
Default: -1
visu_min
visu_min
General lower bound in \(\rho,\vartheta,\zeta\) directions for visualization. Is used to set the defaults of the other lower bounds
Type: array of real of size 3
Allowed Values: \(0 \leq \rho\leq 1,-1 \leq \vartheta/(2\pi)\leq 1,,-1 \leq \zeta/(2\pi)\leq 1\)
Default: (/0.,0.,0./)
visu_max
visu_max
General upper bound in \(\rho,\vartheta,\zeta\) directions for visualization. Is used to set the defaults of the other upper bounds. Note that for visualization of a field period, the range in zeta must be \(1/N_{FP}\).
Type: array of real of size 3
Allowed Values: \(0 \leq \rho\leq 1,-1 \leq \vartheta/(2\pi)\leq 1,,-1 \leq \zeta/(2\pi)\leq 1\)
Default: (/1.,1.,1./)
visu_BC_min
visu_BC_min
For visu2D: Lower bound in \(\vartheta,\zeta\) directions for boundary visualization.
Type: array of real of size 2
Allowed Values: \(-1 \leq \vartheta/(2\pi)\leq 1,,-1 \leq \zeta/(2\pi)\leq 1\)
Default: =visu_min(2:3)
visu_BC_max
visu_BC_max
For visu2D: Upper bound in \(\vartheta,\zeta\) directions for boundary visualization.
Type: array of real of size 2
Allowed Values: \(-1 \leq \vartheta/(2\pi)\leq 1,,-1 \leq \zeta/(2\pi)\leq 1\)
Default: =visu_max(2:3)
np_visu_planes
np_visu_planes
For visu2D: Number of visualization points \(n_\rho,n_\vartheta,n_\zeta\), with \(n_\zeta\) the number of poloidal planes. \(n_\rho\), is per B-Spline element. In \(\vartheta\), the number is multiplied with \(n_\rho\).
Type: array of integer of size 3
Default: (/5,12,10/)
visu_planes_min
visu_planes_min
For visu2D: Lower bound in \(\rho,\vartheta,\zeta\) directions for poloidal planes visualization.
Type: array of real of size 3
Allowed Values: \(0 \leq \rho\leq 1,-1 \leq \vartheta/(2\pi)\leq 1,,-1 \leq \zeta/(2\pi)\leq 1\)
Default: =visu_min(1:3)
visu_planes_max
visu_planes_max
For visu2D: Upper bound in \(\rho,\vartheta,\zeta\) directions for poloidal planes visualization.
Type: array of real of size 3
Allowed Values: \(0 \leq \rho\leq 1,-1 \leq \vartheta/(2\pi)\leq 1,,-1 \leq \zeta/(2\pi)\leq 1\)
Default: =visu_max(1:3)
np_visu_3D
np_visu_3D
For visu3D: Number of visualization points \(n_\rho,n_\vartheta,n_\zeta\). \(n_\rho\), is per B-Spline element. In \(\vartheta\), the number is multiplied with \(n_\rho\).
Type: array of integer of size 3
Default: (/5,12,10/)
visu_3D_min
visu_3D_min
For visu3D: Lower bound in \(\rho,\vartheta,\zeta\) directions for 3D volume visualization.
Type: array of real of size 3
Allowed Values: \(0 \leq \rho\leq 1,-1 \leq \vartheta/(2\pi)\leq 1,,-1 \leq \zeta/(2\pi)\leq 1\)
Default: =visu_min(1:3)
visu_3D_max
visu_3D_max
For visu3D: Upper bound in \(\rho,\vartheta,\zeta\) directions for 3D volume visualization.
Type: array of real of size 3
Allowed Values: \(0 \leq \rho\leq 1,-1 \leq \vartheta/(2\pi)\leq 1,,-1 \leq \zeta/(2\pi)\leq 1\)
Default: =visu_max(1:3)