Estimates of dA_s/dt in the mixed-variable pullback
In the explicit electromagnetic model with the mixed-variable formulation
(sml_electromagnetic=.true., sml_em_mixed_variable=.true.) the parallel
vector potential is split into a symplectic part \(A_s\) and a Hamiltonian part
\(A_h\). The pullback transformation at the end of every time step moves
\(A_h\) into \(A_s\), and the electron equations of motion need an estimate of
\(\partial A_s/\partial t\) during the step. sml_em_pullback_method selects it:
Electrostatic(default)\(\partial A_s/\partial t = 0\).
IdealMHDThe ideal Ohm’s law, \(\partial A_s/\partial t = -\mathbf{b}\cdot\nabla\phi\) (filtered like the fields in
push_Asand damped bysml_em_pullback_dampfac). Its error appears as the growth of \(A_h\) within the step, which the pullback removes; the error grows with the time step.IntegralFeedback\(\partial A_s/\partial t = -\mathbf{b}\cdot\nabla\phi + C_n\) with \(C_n = C_{n-1} + k\,(\partial A_h/\partial t)_n\), an integral feedback on the observed growth of \(A_h\) with gain \(k\) =
em_pullback_feedback_gain. \(C_n\) is not checkpointed: a restarted run re-accumulates it from zero.LinearGain\(\partial A_s/\partial t = a\,e_n + b\,C_n + c\,R_n\) per Runge-Kutta stage, with \(e_n\) the ideal-MHD estimate, \(C_n = (1-k)\,C_{n-1} + k\,(r_{n-1} - e_{n-1})\) the memory of the previous step’s non-ideal rate (\(r_{n-1}\): observed \(\partial A_s/\partial t\) of the previous step, \(e_{n-1}\): its ideal-MHD estimate) and \(R_n\) an observed rate (\(r_{n-1}\) at the first stage, the rate of the first half step of the total \(A_\parallel\) at the second stage). The gains
em_pullback_lin_{ideal,nonideal,rate}_gain_ipc{1,2}default to \(a=1\), \(b=c=0\), which reproduces the ideal-MHD estimate; see the fitted values below.NeuralNetwork\(\partial A_s/\partial t = e_n + N_E\,\mathrm{MLP}(x_n)\): the ideal-MHD estimate plus a per-node multilayer-perceptron correction, one network per Runge-Kutta stage, with weights read at start-up from
em_pullback_nn_file_ipc1andem_pullback_nn_file_ipc2(ADIOS2 BP or text files written by the exporter of the dAdt_prediction training project). The inputs are the local normalized fields of the stage, their time derivatives, the previous step’s non-ideal rate and node constants from the equilibrium profiles; \(N_E\) is the flux-surface rms of the \(n\neq 0\) part of \(e_n\). The input definition and the training range of every input are attributes of the weight file and are checked at start-up; nodes whose inputs leave the training range (em_pullback_nn_range_check,em_pullback_nn_range_margin,em_pullback_nn_range_check_skip) use the ideal-MHD estimate. The full input list is described inXGC_core/cpp/solvers/dAdt_nn_pullback.hpp.
The settings of IntegralFeedback, LinearGain and NeuralNetwork are read from the
namelist em_pullback_param (inputs em_pullback_*); sml_em_pullback_method itself stays in
sml_param. With em_pullback_filter_correction=.true. (and sml_em_dasdt_filter_on=.true.)
the correction added to the ideal-MHD estimate passes through the same Fourier filter and
hyperviscosity that push_As applies to \(\partial A_s/\partial t\), so that the markers
feel only the mode content of the correction that \(A_s\) receives. The filter is applied
on the Ampere field boundary, like the ideal-MHD estimate; push_As also sets the estimate to
zero outside the current boundary, which excludes the nodes near the wall, so the two still differ
there for the ideal-MHD part and the correction alike.
IntegralFeedback, LinearGain and NeuralNetwork assume that every step is an electromagnetic step
with the same time step. They are not supported with the EM/ES switching of the RMP
penetration mode (ptb_3db_mode=2), where electrostatic steps have no pullback residual
and the time step changes at each switch; such inputs stop at startup.
Training data
diag_dadt_nn_input_on writes the real-coordinate fields, the observed growth rate of
\(A_h\) and the total \(A_\parallel\) of three consecutive steps every
diag_dadt_nn_input_period steps, for any pullback method
(dA_s/dt Neural-Network Training Outputs). The LinearGain gains and the networks are fitted to these
files.
LinearGain gains fitted to training data
The gains below were least-squares fits to training data of a circular core case with
total-f kinetic electrons, \(\beta_e = 0.5\,\%\), 16 toroidal planes in a one-third
wedge and sml_dt = \(10^{-4}\) toroidal transit times. The first stage was fitted
to \((A_s(n+1)-A_s(n))/\Delta t\), the second stage to the same target using the
observed first-half-step rate of the total \(A_\parallel\) as \(R\). The same values
also held at half the time step. They are not the defaults; set them in the input to use
them:
Input |
First stage (ipc1) |
Second stage (ipc2) |
|---|---|---|
|
0.95 |
0.61 |
|
0.95 |
0.585 |
|
0.0 |
0.295 |
with em_pullback_feedback_gain = 1 (pure persistence of the previous step’s
non-ideal part). On that case the fitted LinearGain estimate reduced the rms error of the
estimate only marginally at the first stage and by about 17 % at the second stage relative
to persistence of the previous non-ideal rate; the NeuralNetwork estimate reduces it by an
order of magnitude.