Physics-Informed Neural Networks: Fundamentals
A PINN represents a field as a neural network and trains it to satisfy a PDE via automatic differentiation, turning solving into optimization.
The core idea
A physics-informed neural network (PINN) approximates the solution of a PDE, say psi(R,Z) for the breeder equilibrium, by a neural network psi_theta with weights theta. Instead of fitting data alone, it is trained so its own derivatives satisfy the governing equation at sampled collocation points. Automatic differentiation gives those derivatives exactly, so the PDE residual becomes a loss to minimize.
PDE: N[psi](x) = 0 on domain Omega
Boundary: B[psi](x) = 0 on boundary dOmega
PINN ansatz: psi ~ psi_theta(x) (neural network)
Residual at x: r_theta(x) = N[psi_theta](x)
computed with exact autodiff derivatives of psi_theta
Why autodiff makes it work
The differential operator is applied to the network itself. For Grad-Shafranov the loss needs second derivatives of psi_theta with respect to R and Z; autodiff produces these to machine precision, not by finite differences. This is what lets a mesh-free network satisfy an elliptic PDE. The same mechanism handles the burner's axial ambipolar operator.
# PDE residual via automatic differentiation (schematic)
def gs_residual(net, R, Z, pprime, ffprime):
psi = net(R, Z)
psi_R = grad(psi, R)
psi_RR = grad(psi_R, R)
psi_ZZ = grad(grad(psi, Z), Z)
delta_star = psi_RR - psi_R / R + psi_ZZ
return delta_star + mu0*R**2*pprime(psi) + ffprime(psi)
Universal approximation, with caveats
Neural networks are universal approximators, so in principle psi_theta can represent the true solution. In practice PINNs have well-known training pathologies: stiff loss landscapes, spectral bias toward low frequencies, and competition between residual and boundary terms. The stack treats these seriously - covered on the loss-construction, conditioning, and hard-constraint pages - because an under-trained PINN is a wrong equilibrium, not just an inaccurate one.
- Mesh-free: no grid generation, natural for changing breeder shapes.
- Inverse-ready: unknown profiles can be trained as extra parameters.
- Fast at inference: one forward pass replaces an iterative solve.
- Must be benchmarked against FEM before it is trusted in the twin.
In the Kronos stack PINNs are always validated against the FEM ground truth and carry a residual-based confidence score; they accelerate the twin but never bypass the offline verification path.