Computing Library › Ml For Fusion
Ml For Fusion

Physics-Informed Networks for Grad-Shafranov

Physics-informed neural networks solve the Grad-Shafranov equilibrium equation by minimizing the PDE residual directly, needing few or no labeled solutions.

The idea

A physics-informed neural network (PINN) represents the poloidal flux psi(R,z) as a neural network and trains it by minimizing the residual of the governing partial differential equation rather than by fitting precomputed labels. For the Grad-Shafranov equation the residual is the elliptic operator applied to psi minus the nonlinear right-hand side built from pressure and current profiles.

Loss construction

Kronos motion — grad shafranov

The total loss combines three terms: the PDE residual sampled at interior collocation points, a boundary-condition term enforcing psi on the plasma boundary or vessel wall, and optionally a data term if a few measured or simulated points are available. Automatic differentiation computes the spatial derivatives of the network output exactly, so no finite-difference grid is required.

python
# residual for the Grad-Shafranov operator, schematic
# psi = network(R, z); derivatives via autodiff
R2_term = d2psi_dR2 - (1.0/R)*dpsi_dR + d2psi_dz2
rhs = -mu0 * R**2 * dp_dpsi - FdF_dpsi
residual = R2_term - rhs
loss = (residual**2).mean() + bc_weight*bc_loss

Strengths and limits

PINNs shine when the same geometry must be solved repeatedly with varying profile parameters, since a single network can be conditioned on those parameters and reused. They are less competitive for one-off high-accuracy solves, where established fixed-boundary solvers remain the standard.

In a design context, PINN equilibria are treated as fast approximations feeding scenario studies for concepts such as the Hyperion breeder, then confirmed with a verified solver. This keeps the machine's simulation status honest: predictions are computational, cross-checked, and never a substitute for measured behavior of hardware not yet built.