Running SIMPLE¶
This page covers the settings of a run. Field inputs are in Field sources and coordinates, outputs in Outputs.
Method: Integrators.
Command line and threads¶
OMP_NUM_THREADS=16 simple.x [config_file]
simple.x reads simple.in or the given file, resolves relative input
paths against the working directory and writes all results there. Markers are
distributed over OpenMP threads. On multi-socket nodes,
OMP_PROC_BIND=spread OMP_PLACES=cores keeps threads on separate cores.
Field setup before tracing is partly serial; the log reports the time of
each phase. GPU runs: GPU tracing; cluster jobs: Clusters.
Time and markers¶
Key |
Default |
Meaning |
|---|---|---|
|
|
tracing time in s; markers not lost by then count as confined |
|
1024 |
number of markers \(N\); a loss fraction \(f\) has standard error \(\sqrt{f(1-f)/N}\) |
|
10000 |
output times (macrosteps) up to
|
|
|
|
|
256 |
steps per path length \(2\pi R_0\) at speed \(v_0\) |
|
|
markers with \(\kappa \le\) |
|
0 |
1: all passing markers count as confined |
|
|
fixed seed |
Confidence intervals: Plotting results. Fewer steps: Numerical settings. \(\kappa\) (trapping parameter): Guiding-centre model.
Species and energy¶
n_e (charge number, default 2), n_d (mass number, default 4d0)
and facE_al (default 1d0, energy \(E_0 = 3.5\,\text{MeV}/\)
facE_al) set the species: 100 keV protons are n_e = 1, n_d = 1d0,
facE_al = 35d0 (collisionless only, see below).
Start positions¶
|
Start positions |
|---|---|
1 (default) |
Random points on one field line on the surface |
2 |
Read |
3 |
Read an ANTS-format file ( |
4 |
Random batch of |
5 |
Uniform random \(s\) in the range set by |
6 |
Read |
7 |
D-T fusion births from |
Modes 1, 5 and 7 write start.dat; generate_start_only = .true. stops
after that. Generated markers have \(v/v_0 = 1\) and pitch
\(\lambda = v_\parallel/v\) uniform in \([-1, 1]\). Angles are in
radians and are not wrapped.
Integrators¶
|
Method |
Order |
Notes |
|---|---|---|---|
1 (default) |
symplectic Euler, explicit-implicit |
1 |
cheapest per step |
2 |
symplectic Euler, implicit-explicit |
1 |
adjoint of 1 |
3 |
implicit midpoint |
2 |
symmetric |
4–7 |
Gauss-Legendre, 1–4 stages |
2, 4, 6, 8 |
one Newton solve for all stages |
15 |
Lobatto IIIA-IIIB, 3 stages |
4 |
partitioned |
0 |
adaptive Runge-Kutta 4(5) |
adaptive |
not symplectic; any |
-1 |
as 0 |
adaptive |
skips loading |
integmode > 0 needs canonical coordinates (integ_coords not 1 or 5).
Implicit steps are solved by Newton iteration to relative tolerance
relerr (default 1d-13), which also sets the Runge-Kutta tolerance.
symplectic_newton_warning_mode = .true. (default) accepts bounded Newton
corrections at the iteration limit and retries a failed step with smaller
symplectic steps, then with Runge-Kutta. Markers that still fail get a
numerical exit code (101–105), loss time NaN and count as unresolved, not
lost. .false. ends the marker at the first failure. Tolerances:
Numerical settings.
Collisions¶
swcoll = .true. adds Coulomb collisions with electrons and two ion
species (am1, am2, Z1, Z2; default D and T). Density and
temperature profiles \(f(s)\) come from &profiles, either
'power_series' \(f = f_0 \sum_{n=1}^{10} c_n s^{n-1}\) or
'two_power' \(f = f_0 (1 - s^{p_1})^{p_2}\):
&config
swcoll = .true.
am1 = 2d0, am2 = 3d0, Z1 = 1d0, Z2 = 1d0 ! D and T
/
&profiles
profile_type = 'two_power'
Te_scale = 1.5d4, Te_p1 = 2d0, Te_p2 = 1d0 ! eV
Ti1_scale = 1.5d4, Ti1_p1 = 2d0, Ti1_p2 = 1d0
Ti2_scale = 1.5d4, Ti2_p1 = 2d0, Ti2_p2 = 1d0
ni1_scale = 5d19, ni1_p1 = 2d0, ni1_p2 = 0.5d0 ! m^-3
ni2_scale = 5d19, ni2_p1 = 2d0, ni2_p2 = 0.5d0
/
Limits that change results:
The operator uses alpha mass and charge.
n_dmust be 4 (other values stop withv0_coll != v0) andn_eis ignored;facE_alsets the energy.Collisions cannot be combined with classification (
tcut > 0,class_plot,fast_class), full orbits or GPU tracing.trace_timemust cover the slowing-down time for complete heat loads. The marker energy at loss is \((v/v_0)^2 E_0\), from column 4 of the end state.
Collision operator: Collisions.
Restart and batches¶
restart = .true. reads times_lost.dat and orbit_exit_code.dat;
markers with exit code 0, 1, 2 or 4 keep their result, the others are traced
again. batch_size smaller than ntestpart traces a random subset of
the start positions, whose indices go to batch.dat (reuse_batch =
.true. reads them back).