# Equilibrium (Soloviev)

The **Equilibrium** tab solves the Soloviev variant of the Grad-Shafranov equation — a closed-form analytic solution that the textbooks use as the verification anchor for any numerical equilibrium solver.

## What you get

- ψ(R, Z) on a configurable grid (default 65×65, max 257×257).
- Magnetic axis location and ψ value.
- Pressure profile p(ψ_n) and safety factor q(ψ_n).
- Plasma current I_p in MA.
- Toroidal beta β_t and normalized beta β_N.

## Inputs

| Field | Meaning | ITER value |
|---|---|---|
| R₀ | major radius (m) | 6.2 |
| a | minor radius (m) | 2.0 |
| κ | elongation | 1.7 |
| δ | triangularity | 0.33 |
| B₀ | toroidal field at R₀ (T) | 5.3 |
| β_p | poloidal beta | 0.5 |

## Why this matters

A Soloviev solution is the **only** equilibrium you can verify to machine precision without comparing against another numerical solver. If a GS solver doesn't reproduce Soloviev, nothing else it produces can be trusted.

## What the 2D plot shows

- **Blue heatmap** — ψ value (cooler = inside plasma).
- **Light blue contours** — flux surfaces at equal ψ.
- **Yellow contour** — outermost flux surface (separatrix proxy at 95%).
- **Red cross** — magnetic axis.

The axis should land near R₀ for symmetric inputs. Triangularity δ > 0 will tilt the surfaces; this is visible at δ > 0.3.

## Reference

Soloviev 1968, [Sov. Phys. JETP 26, 400](http://jetp.ras.ru/cgi-bin/dn/e_026_02_0400.pdf).
For shaped extensions: Cerfon & Freidberg 2010, [Phys. Plasmas 17, 032502](https://doi.org/10.1063/1.3328818).
