Quick start¶
This page computes the alpha-particle loss fraction of a public
quasi-axisymmetric reactor-scale VMEC equilibrium (Landreman and Paul 2022,
from the simsopt test files) with examples/simple.in.
Run¶
From the repository root, after Installation:
mkdir -p run
cp examples/simple.in run/
curl -L -o run/wout.nc https://github.com/hiddenSymmetries/simsopt/raw/master/tests/test_files/wout_LandremanPaul2021_QA_reactorScale_lowres_reference.nc
cd run
../build/simple.x simple.in
&config
trace_time = 1d-2 ! slowing down time, s
sbeg = 0.3d0 ! starting s (normalzed toroidal flux) for particles.
ntestpart = 128 ! number of test particles
netcdffile = 'wout.nc' ! name of VMEC file in NETCDF format
isw_field_type = 2 ! -1: Testing, 0: Canonical, 1: VMEC, 2: Boozer, 3: Meiss, 4: Albert
/
The run traces 128 alpha particles of 3.5 MeV for 10 ms, started on the
surface \(s = 0.3\) (normalised toroidal flux) with random angles and
uniformly random pitch \(\lambda = v_\parallel/v\). isw_field_type = 2
integrates in Boozer coordinates. All other keys keep the defaults of
examples/simple_full.in. The run takes 20–30 s on a workstation; most of
it is field setup, which the log reports phase by phase.
Result¶
tail -1 confined_fraction.dat
1.0000000000000000E-002 0.70312500000000000 0.29687500000000000 128
The columns are time (s), confined fraction of passing markers, confined
fraction of trapped markers and the number of numerically resolved markers.
The loss fraction at 10 ms is \(1 - f_\text{pass} - f_\text{trap} = 0\):
no marker left the plasma. Starts are random, so another run differs; in this
optimised configuration 0 to a few of 128 markers are lost. Add
deterministic = .true. for a fixed seed.
orbit_exit_code.dat shows code 3 for about half of the markers: deeply
passing markers (trapping parameter \(\le\) contr_pp) are counted as
confined without tracing. times_lost.dat holds the loss time and end state
of every marker. Outputs describes all files and codes.
Next¶
Tutorial 1: Loss fraction from a VMEC equilibrium: QA versus QH with statistical errors.
Running SIMPLE: markers, time, integrator, starts, collisions.
Model and methods: what is computed.