Shafranov Profile Explorer

This browser-side companion to Problem 13.2 takes the large-aspect-ratio circular profiles p(r) = p̂ (1 - r²/a²) and jφ(r) = ĵ (1 - r²/a²)ν, then enforces the lecture-style constraints on q(0), q(a), and βp. The result is a compact way to inspect how the pressure/current peaking fixes q(r), the internal inductance i, the Shafranov shift Δ(r), the required vertical field, and the boundary asymmetry factor.

Keeps the model in the large-aspect-ratio regime while setting the logarithm in the vertical-field formula.

Physical scale in meters. Together with R0/a it sets the major radius.

Used with q(a) to infer the plasma current from the cylindrical edge relation.

Fixes the current-profile peaking through ν = q(a)/q(0) - 1.

Sets the total plasma current through the large-aspect-ratio cylindrical estimate.

Sets the pressure amplitude, which then feeds the shift, asymmetry, and vertical-field requirements.

The sliders are currently matched to the lecture’s default exercise values: q(0) ≈ 1, q(a) = 3, and βp = 1/2.

Profile Families and Derived Equilibrium Quantities

The large panel compares the normalized pressure, toroidal-current, and poloidal-field profiles. The smaller panels track the safety factor and the inward integration of the Shafranov-shift equation. All reported numbers are computed directly from the chosen profile family, not entered by hand.

Safety-Factor Profile

The lecture’s profile ansatz implies a closed-form shape for q(r), with the edge value fixed by the cylindrical estimate.

Shafranov Shift

The shift is obtained by integrating Eq. 13.48 inward from the fixed-boundary condition Δ(a) = 0.

Model summary. The app uses the lecture’s circular large-aspect-ratio relations

p(r) = p̂ (1 - r²/a²), jφ(r) = ĵ (1 - r²/a²)ν, q(a) = 2πa²B0/(μ0R0Ip), and Bv = μ0Ipp + (ℓi - 3)/2 + ln(8R0/a)]/(4πR0).