Input file reference¶
vmex accepts two input formats, auto-detected by
vmex.core.input.VmecInput.from_file():
the classic VMEC2000
&INDATAFortran namelist (input.<case>), andVMEC++-style JSON (
.jsonsuffix or leading{) with identical key names.
Both round-trip: VmecInput.to_json writes a VMEC++-schema JSON deck that
parses back to the same input. All VMEC2000 defaults and readin.f
normalizations are applied on construction (see the
vmex.core.input docstring for the exact rules).
INDATA variables¶
Symmetry and resolution¶
Variable |
Default |
Meaning |
|---|---|---|
|
|
non-stellarator-symmetric mode (enables the |
|
1 |
number of field periods |
|
6 |
poloidal modes |
|
0 |
toroidal modes |
|
0 |
angular grid points (0 selects the VMEC default) |
Multigrid ladder and stepping¶
Variable |
Default |
Meaning |
|---|---|---|
|
|
radial surfaces per multigrid stage |
|
|
force tolerance per stage (converged when |
|
|
iteration cap per stage |
|
1.0 |
initial time step |
|
1.0 |
constraint-force multiplier (spectral condensation) |
|
|
radial-flux remap polynomial |
|
1.0 |
total enclosed toroidal flux [Wb] |
|
10 |
iterations between progress prints |
Pressure profile¶
Variable |
Default |
Meaning |
|---|---|---|
|
|
one of |
|
zeros |
profile coefficients (dense, indices 0..20) |
|
— |
spline knots in |
|
1.0 |
pressure scale factor [Pa] |
|
0.0 |
adiabatic index (JSON alias: |
|
1.0 |
pressure pedestal location in |
Current and iota profiles¶
Variable |
Default |
Meaning |
|---|---|---|
|
0 |
0: prescribed iota ( |
|
|
current profile type; |
|
zeros / — |
current profile coefficients / spline knots and values |
|
0.0 |
total toroidal current [A] |
|
|
iota profile type |
|
zeros / — |
iota profile coefficients / spline knots and values |
|
1.0 |
profile-argument expansion factor |
Axis and boundary shape¶
Variable |
Default |
Meaning |
|---|---|---|
|
zeros |
axis initial guess, cos/sin coefficients for |
|
zeros |
asymmetric axis partners ( |
|
zeros |
boundary Fourier coefficients of \(R\cos / Z\sin(m\theta - n\,\mathrm{NFP}\,\zeta)\) |
|
zeros |
asymmetric boundary partners ( |
Free boundary¶
Variable |
Default |
Meaning |
|---|---|---|
|
|
free-boundary mode; forced |
|
|
MAKEGRID vacuum-field file, or |
|
— |
external coil-group currents [A] |
|
1 |
vacuum-solve cadence ( |
|
-1 |
boundary spectral filtering |
|
|
2D preconditioner selection (accepted for compatibility) |
VMEC++-style JSON¶
The JSON schema follows vmecpp.VmecInput verbatim: the keys are the
lower-case INDATA names (lasym, nfp, mpol, ntor, ntheta, nzeta, ns_array,
ftol_array, niter_array, delt, tcon0, aphi, phiedge, nstep, pmass_type, am,
am_aux_s, am_aux_f, pres_scale, adiabatic_index, spres_ped, ncurr,
pcurr_type, ac, ac_aux_s, ac_aux_f, curtor, piota_type, ai, ai_aux_s,
ai_aux_f, bloat, raxis_c, zaxis_s, raxis_s, zaxis_c, rbc, zbs, rbs, zbc,
lfreeb, mgrid_file, extcur, nvacskip, ...).
Boundary coefficients are sparse lists of
{"n": int, "m": int, "value": float} objects; axis arrays are dense of
length ntor + 1:
{
"lasym": false,
"nfp": 5,
"mpol": 5,
"ntor": 4,
"ns_array": [31],
"ftol_array": [1e-12],
"niter_array": [2000],
"phiedge": 0.5,
"raxis_c": [1.0, 0.1, 0.0, 0.0, 0.0],
"zaxis_s": [0.0, 0.1, 0.0, 0.0, 0.0],
"rbc": [
{"n": 0, "m": 0, "value": 1.0},
{"n": 0, "m": 1, "value": 0.3}
],
"zbs": [
{"n": 0, "m": 1, "value": 0.3}
]
}
Extensions beyond VMEC++ (ignored by VMEC++ but accepted here): the spline and pedestal profile types listed above, with the same key names as INDATA.