dA_s/dt Neural-Network Training Outputs

This page is generated from in-code XGC I/O metadata by utils/python/documentation/document_outputs.py.

Real-coordinate field data for training and benchmarking a neural-network estimate of the symplectic vector-potential evolution dA_s/dt in mixed-variable electromagnetic XGC1 runs (diag_dadt_nn_input_on). One file xgc.dAdt_nn_input.<gstep>.ipc<0|1>.bp is written per time step and Runge-Kutta stage; ipc0 holds the stage-1 fields at the beginning of the step and ipc1 the stage-2 fields at the midpoint. Every diag_dadt_nn_input_period steps a window of 3 consecutive steps is written (tindex and window_offset identify the window and the position inside it), so that each step has the following step available for building its training target. All node arrays are on the local physical plane before field-following conversion and gyroaveraging; vector components are (psi, theta, parallel) independent of sml_grad_psitheta. The A_h residual accumulated over the previous full step, Ah_backup_real, is the ingredient of the training target together with the dA_s/dt estimate that produced it.

xgc.dAdt_nn_input.*.bp

Variable

Units

Description

Context

A_real

T m

Real-coordinate total perturbed parallel vector potential A_s + A_h on the local physical plane. The symplectic part is A_real - Ah_real.

Ah_backup_real

T m

Real-coordinate Hamiltonian vector potential right before the most recent pullback, i.e. the residual A_h accumulated over the previous full time step with the dA_s/dt estimate of that step. Updated at ipc=0 only.

Ah_real

T m

Real-coordinate Hamiltonian vector potential on the local physical plane after the field solve of this stage. Zero at ipc=0 because the pullback has just moved A_h into A_s.

E_para_em_real

V/m

Ideal-MHD estimate of dA_s/dt on the local plane: filtered and damped real-coordinate -b.grad(phi) before any correction. Zero for the Electrostatic pullback method.

E_real

V/m

Real-coordinate electric field -grad(phi) before field-following conversion and gyroaveraging on [node, component], with components [psi, theta, parallel] independent of sml_grad_psitheta. psi_hat = grad(psi)/|grad(psi)|, theta_hat = psi_hat rotated counter-clockwise by 90 degrees (same convention as epsi/etheta in xgc.3d); poloidal components are zero where |grad(psi)| vanishes.

bfield

T

Equilibrium magnetic-field magnitude at each mesh node.

correction_real

V/m

Real-coordinate correction added to the ideal-MHD estimate during this RK stage: C_n for IntegralFeedback, the non-ideal memory C_n for LinearGain, the network term N_E*MLP(x) for NeuralNetwork; zero otherwise. With em_pullback_filter_correction this is the correction before the filter; the correction actually added is dAdt_guess_real - E_para_em_real.

dA_real

T

Real-coordinate negative gradient of the total perturbed parallel vector potential, -grad(A_s + A_h), before field-following conversion and gyroaveraging on [node, component], with components [psi, theta, parallel]; same basis convention as E_real.

dAdt_guess_real

V/m

Real-coordinate dA_s/dt estimate actually used for this stage (ideal-MHD estimate plus correction), before field-following conversion. Zero for the Electrostatic pullback method.

dAhdt_real

V/m

Most recently observed real-coordinate growth rate of A_h on the local plane: Ah_backup_real/dt at ipc=0 (residual of the previous full step) and Ah_real/(dt/2) at ipc=1 (residual of the first RK stage). This is the quantity that drives the IntegralFeedback correction.

dt_stage

s

Time interval over which the dAdt_guess_real of this stage is applied to A_s: dt/2 at ipc=0 and dt at ipc=1. Not the interval over which Ah_real or Ah_backup_real accumulated.

gstep

Non-negative integer

XGC global simulation time step.

ipc

Non-negative integer

Zero-based Runge-Kutta stage index.

nnode

Positive integer

Number of 2D mesh nodes.

nphi

Positive integer

Number of toroidal mesh planes.

pot_real

V

Real-coordinate perturbed electric potential dpot (turbulent potential used for the electric field) on the local physical plane.

psi

T m^2

Poloidal magnetic flux at each mesh node.

pullback_method

Integer index

dA_s/dt estimate used by the mixed-variable pullback: 0 Electrostatic (dA_s/dt=0), 1 IdealMHD (-b.grad(phi)), 2 IntegralFeedback (-b.grad(phi) + C_n, C_n = C_{n-1} + k*(dA_h/dt)_n), 3 LinearGain (a*(-b.grad(phi)) + b*C_n + c*R), 4 NeuralNetwork (-b.grad(phi) + N_E*MLP(x)).

time

s

Simulation time.

tindex

Non-negative integer

Index of the output window this file belongs to. Each window covers 3 consecutive time steps, which share the same tindex.

window_offset

Non-negative integer

Position of this time step inside its output window: 0 for the first (triggered) step, 1 and 2 for the two following steps. The training target of a step uses Ah_backup_real of the next step in the window.