SOPHIA XT
Sign in
Notebook archive · Physics

Plasma, fluids and fields, computed in the page

Every model on this page runs in the visitor's browser: the induction equation in a rotating conductor, a Faraday disc with the conductivity of mercury, tearing modes in a current sheet, the Ω effect in Couette flow, D-D tunnelling with electron screening, Einstein-Cartan torsion, and lattice-Boltzmann flow. After them come incompressible and boundary-layer solvers and a dual-disc magnetic confinement concept with a live Grad-Shafranov solver. The equations each model solves sit beside it, and every number in a readout is computed from that model.

Sophia and Thomas Garren, SOPHIA XT Every readout is computed from the model beside it Nothing on the page is a recording
A charged particle bouncing along a dipole field Computed in your browser
Induction · mercury

A conductor stirred through a magnetic field

Mercury is liquid at room temperature with an electrical conductivity of 1.04 × 10⁶ S/m (CRC Handbook of Chemistry and Physics, 20 °C). Its magnetic diffusivity \eta = 1/(\mu_0\sigma) is 0.765 m²/s, so a field soaks through a mercury volume of size L in a time of order L²/η, about a third of a second across half a metre. Flow at speed U works against that diffusion, and the magnetic Reynolds number Rm = UL/η says which wins.

The induction equation holds the whole contest. Its first term carries field lines with the flow and stretches them where the flow shears; the second smooths them at the rate η sets. Differential rotation, where the angular velocity changes with radius, shears a field that crosses the axis into an azimuthal one. That is the Ω effect, and it is the half of a dynamo that liquid-metal experiments reach most easily.

The first figure solves the equation in two dimensions for a prescribed rotation\;\omega(r) = \omega_0/(1 + (r/a)^4) in a uniform applied field. The lines wind, the azimuthal component grows with the shear, and at large Rm the flux is expelled from the rotating core, the result Weiss (1966) found for the same problem. The Faraday disc after it takes the same conductivity into a geometry with a closed-form answer.

\begin{gathered} \frac{\partial \mathbf{B}}{\partial t} = \nabla \times (\mathbf{v} \times \mathbf{B}) + \eta \nabla^2 \mathbf{B} \\[4pt] \eta = \frac{1}{\mu_0 \sigma} \end{gathered}

The induction equation: advection and stretching by the flow against resistive diffusion.

R_m = \frac{UL}{\eta} = \mu_0 \sigma U L

Magnetic Reynolds number. For mercury at 1 m/s over 0.5 m, Rm = 0.65; the rotating-conductor figure spans 2 to 2000.

\mathbf{B} = \nabla \times (A\,\hat{\mathbf{z}}), \qquad \frac{\partial A}{\partial t} + \mathbf{v}\cdot\nabla A = \eta\,\nabla^2 A

In two dimensions the field is a flux function A whose contours are field lines; this is the equation the first figure integrates.

\mathbf{J} = \sigma\,(\mathbf{E} + \mathbf{v}\times\mathbf{B}), \qquad \mathbf{F} = \mathbf{J}\times\mathbf{B}

Ohm's law in a moving conductor and the Lorentz force density that couples the field back to the flow.

Induction equation · differential rotation
Field lines wound by a rotating conductor
field lines (A contours) r = a B_φ / B₀
Rm = ω₀a²/η
100
Turns ω₀t/2π
0.65
Φ_core / Φ₀
-0.246
max |B| / B₀
3.23
B_φ rms (core) / B₀
1.51
Hg: ω₀a² at this Rm
76.5m²/s
The flux function A obeys ∂A/∂t + v·∇A = η∇²A with v = ω(r)(−y, x) and ω(r) = ω₀/(1 + (r/a)⁴); field lines are contours of A, drawn in cyan, and the colour is the azimuthal component B_φ the shear creates, blue one way and mint the other. The edge holds a uniform B₀x̂. Advection is an exact rotational back-trace with cubic interpolation; diffusion is explicit and sub-stepped. Φ_core is the flux crossing the core diameter: it swings sign as the core turns the field with it, and at large Rm the swings die away as the field is expelled from the rotating region. The last readout converts the Rm shown to the ω₀a² mercury would need, using η = 1/(μ₀σ) = 0.765 m²/s.

A disc turning in an axial field is the oldest electrical machine. Every element of the conductor at radius r moves at ωr across B and sees a motional field ωrB directed along the radius, so the potential climbs as ½ωBr² from the axle to the rim. Contacts at the axle and the rim collect the difference.

\varepsilon = \int_{r_i}^{R} \omega r B\, dr = \tfrac{1}{2}\,\omega B\,(R^2 - r_i^2)

The homopolar EMF. The current the disc can drive is set by its own radial resistance ln(R/rᵢ)/(2πσh).

\delta = \sqrt{\frac{2}{\mu_0 \sigma \omega_f}} = \sqrt{\frac{\eta}{\pi f}}

Skin depth: how far an alternating field at frequency f penetrates the conductor. In mercury it is 70 mm at 50 Hz and 16 mm at 1 kHz.

Faraday disc · closed form
A mercury disc as a homopolar generator
Fixed
σ (Hg, 20 °C)1.04×10⁶S/m
η = 1/(μ₀σ)0.765m²/s
Disc thickness h10mm
Axle contact r_i5mm
δ = h at2440Hz
EMF ε = ½ωB(R² − r_i²)
0.249V
R_int = ln(R/r_i)/2πσh
45.8μΩ
I short-circuit
5440A
Matched-load power
339W
Torque at I_sc
13.6N·m
Rim speed ωR
10m/s
Rm = ωR²/η
1.31
δ at f
69.8mm
Colour on the disc is the potential V(r) = ½ωBr² a rotating conductor develops in an axial field; the rings are equipotentials at half, three-quarters and the full radius. The EMF between axle and rim contacts is ε = ½ωB(R² − r_i²). The disc's own radial resistance, ln(R/r_i)/(2πσh) with mercury's conductivity, gives the short-circuit current, the matched-load power ε²/4R_int and the torque the load pulls. The lower plot is the skin depth √(η/πf): an alternating field at the marked frequency penetrates mercury to that depth, and the dashed lines show where it equals the disc's radius and thickness.

Resistivity also lets field lines break and rejoin. Where a flow presses oppositely directed field together into a thin current sheet, the sheet tears into a chain of magnetic islands at a rate set by the Lundquist number S = Lv_A/η, the same ratio as Rm with the Alfvén speed as the velocity. The figure below draws that process from the tearing-mode growth rates; the sheared flows of the dual-disc confinement concept act on exactly this.

Analytic tearing model · Harris sheet
Plasmoid chain in a reconnecting current sheet
ψ contours separatrix ×X-point ○O-point |J|
γ_max τ_A ≈ S^(1/4)
10.0
γ τ_A, n = 1
7.1×10⁻³
k_max L ≈ S^(3/8)
32
Dominant mode
n = 5
X-points
5
O-points
5
ε / ε_sat
0.039
Phase
linear
Field lines are contours of ψ = B₀a ln cosh(y/a) + Σₙ εₙ(t) cos(kₙx + φₙ) sech(κₙy); the heat map is the current density |∇²ψ|. Mode amplitudes grow at the rates of the plasmoid instability, γ_max ≈ S^¼ v_A/L with the fastest mode at k_max L ≈ S^⅜ (Loureiro, Schekochihin & Cowley 2007), against the single-mode tearing scaling γ ∝ S^−⅗. White crosses mark X-points, mint rings mark O-points, mint contours are separatrices.
Ω effect · differential rotation

Shear makes an azimuthal field out of a radial one

Between two coaxial cylinders turning at different rates the steady flow is the circular Couette profile Ω(r) = A + B/r², with A and B fixed by the two wall speeds. A radial field B_r = B₀r₁/r threading the annulus is divergence-free, is a steady solution of the diffusion operator, and is left alone by the azimuthal flow. The shear r dΩ/dr is not so gentle with the azimuthal component: it feeds B_φ at the rate rB_r dΩ/dr, so B_φ grows linearly in time until diffusion, working against it over the gap width, holds it at a level of order Rm B₀.

The figure integrates that equation on a radial grid with B_φ = 0 at both walls. The wound lines on the left are field lines traced through the computed field, with dφ/dr = B_φ/(rB_r), so the winding is the toroidal field. The dashed white profile is the steady state from a direct solve of the same equation; the dotted amber one is the ideal-MHD growth with no diffusion. The Ω-effect rate in the readout is the peak of |rB_r dΩ/dr|/B₀, which for this profile sits at the inner wall.

\begin{gathered} \Omega(r) = A + \frac{B}{r^2} \\[4pt] A = \frac{\Omega_2 r_2^2 - \Omega_1 r_1^2}{r_2^2 - r_1^2} \\[4pt] B = \frac{(\Omega_1 - \Omega_2)\, r_1^2 r_2^2}{r_2^2 - r_1^2} \end{gathered}

Circular Couette flow between cylinders at r₁ and r₂; the shear is r dΩ/dr = −2B/r².

\frac{\partial B_\phi}{\partial t} = r B_r \frac{d\Omega}{dr} + \eta\left(\nabla^2 - \frac{1}{r^2}\right) B_\phi

The azimuthal component of the induction equation for an axisymmetric field in an azimuthal flow. B_r = B₀r₁/r is unchanged by it.

Ω effect · circular Couette flow
Shear turns a radial field into an azimuthal one
Rm = ΔΩ d²/η
23.7
Peak |r dΩ/dr| / Ω₁
2
Ω rate ∂ₜ(B_φ/B₀)
21/τ
Inner turns
0.01
|B_φ|max / B₀ now
0.0745
|B_φ|max / B₀ steady
2.59
The annulus between r₁ and r₂ = 2r₁ carries the Couette profile Ω(r) = A + B/r² set by the two wall speeds. A radial seed field B₀r₁/r threads it. The azimuthal component obeys ∂B_φ/∂t = rB_r dΩ/dr + η(∇² − 1/r²)B_φ with B_φ = 0 at both walls; it grows at the shear rate at first and settles where diffusion balances the source. The lines on the left are field lines traced through the computed field with dφ/dr = B_φ/(rB_r), brighter mint where B_φ is larger. The dashed white profile is the steady state from a direct solve of the same equation; the dotted amber one is the ideal-MHD growth with no diffusion. The Ω-effect rate is the peak of |rB_r dΩ/dr|/B₀, which sits at the inner wall.
Screening model · WKB

Tunnelling through the Coulomb barrier, with and without screening

Two deuterons at a relative energy E face a Coulomb barrier that stands near 480 keV at the nuclear radius. Below that they react by tunnelling. For a pure Coulomb potential the WKB probability is the Gamow factor exp(−2πη), with the Sommerfeld parameter η = Z₁Z₂α/(v/c); for D-D, 2πη = √(E_G/E) with E_G = 986 keV. The cross-section is that factor times S(E)/E, where the astrophysical S-factor varies slowly. The figure uses the Bosch and Hale (1992) parametrisation of S(E) for both D-D branches.

Electrons around the nuclei lower the barrier. In the adiabatic picture of Assenbaum, Langanke and Rolfs (1987) their effect is a constant drop U_e in the potential inside the turning point, so the reaction at energy E proceeds as the bare one would at E + U_e, an enhancement f(E) = exp(πηU_e/E) when U_e ≪ E. Greife et al. (1995) measured U_e = 25 ± 5 eV for a D₂ gas target. Raiola et al. (2002) measured several hundred electronvolts in deuterated metals, with the largest values near 800 eV, and the same group's survey of the periodic table (Raiola et al. 2004) modelled the difference with the Debye length of the metal's quasi-free electrons.

The slider sets U_e and the presets carry those measured values. The readouts give the enhancement at the probe energy, the cross-sections, and the Debye and Thomas-Fermi lengths for the chosen electron density together with the U_e each implies. The last readout evaluates the Gamow factor at E = U_e, the effective energy of a deuteron pair with no kinetic energy of its own: at 300 eV it is 10⁻²⁵.

\begin{gathered} \eta = \frac{Z_1 Z_2 e^2}{4\pi\varepsilon_0 \hbar v} \\[4pt] 2\pi\eta = \sqrt{\frac{E_G}{E}} \\[4pt] E_G = 2\mu c^2 (\pi\alpha Z_1 Z_2)^2 \end{gathered}

Sommerfeld parameter and Gamow energy; μ is the reduced mass, 937.8 MeV/c² for D-D.

\begin{gathered} \sigma(E) = \frac{S(E)}{E}\, e^{-2\pi\eta(E)} \\[4pt] P_{\mathrm{WKB}} = \exp\!\left[-\frac{2}{\hbar}\int_{r_n}^{r_c} \sqrt{2\mu\,(V(r) - E)}\; dr\right] \end{gathered}

Cross-section through the S-factor, and the WKB integral from the nuclear radius to the classical turning point r_c = e²/(4πε₀E).

\begin{gathered} f(E) = \frac{\sigma_{\mathrm{s}}(E)}{\sigma_{\mathrm{b}}(E)} = \frac{\sigma_{\mathrm{b}}(E + U_e)}{\sigma_{\mathrm{b}}(E)} \\[4pt] f(E) \approx \exp\!\left(\frac{\pi\eta(E)\,U_e}{E}\right) \end{gathered}

Screening enhancement, Assenbaum, Langanke and Rolfs (1987); the exponential form holds for U_e ≪ E.

\begin{gathered} \lambda_D = \sqrt{\frac{\varepsilon_0 k_B T}{n_e e^2}} \\[4pt] \lambda_{TF} = \sqrt{\frac{2\varepsilon_0 E_F}{3 n_e e^2}} \\[4pt] U_e = \frac{e^2}{4\pi\varepsilon_0\,\lambda} \end{gathered}

Debye length of a classical electron gas and Thomas-Fermi length of a degenerate one, each with the screening energy it implies.

Screening model · WKB
D-D tunnelling with and without electron screening
Constants
E_G = B_G² (D-D)985.8keV
S(0), both branches109keV·b
r_n = 1.2(2^⅓ + 2^⅓)3.02fm
V_c at r_n476keV
T for λ_D293K
η at E
2.23
exp(−2πη)
7.98×10⁻⁷
WKB with r_n
4.97×10⁻⁶
f = exp(πηU_e/E)
1.04
σ(E+U_e)/σ(E)
1.03
σ bare
1.79×10⁻⁵b
σ screened
1.84×10⁻⁵b
λ_D at n_e, 293 K
4.53pm
U_e from λ_D
318eV
λ_TF (E_F = 6.1 eV)
57.4pm
U_e from λ_TF
25.1eV
exp(−2πη) at U_e
5.77×10⁻⁸⁷
Left: the Coulomb barrier e²/4πε₀r between two deuterons, the probe energy E and its classical turning point r_c; the dashed mint curve is the barrier lowered by U_e and the mint ring its shorter turning point. Right: the D-D cross-section from S(E)exp(−2πη)/E with the Bosch and Hale (1992) S-factors for both branches, bare in cyan and screened in mint, on a log axis over 1 to 300 keV, with the enhancement f(E) below it in the exponential form exp(πηU_e/E) and as the exact ratio σ(E + U_e)/σ(E). The presets carry the D₂ gas-target value of Greife et al. (1995) and the range Raiola et al. (2002) measured in deuterated metals. The screening lengths are the Debye length of a classical electron gas at 293 K and the Thomas-Fermi length of a degenerate one at the same density.
Einstein-Cartan · spin-torsion coupling

How much torsion spin produces

Einstein-Cartan theory lets the connection carry an antisymmetric part, the torsion tensor, and ties it to the spin density of matter by an algebraic equation. Torsion does not propagate: where the spin density vanishes, the theory is general relativity. Cartan's equation and the modified Einstein equation are set out here in the form given by Hehl, von der Heyde, Kerlick and Nester (1976).

Because the coupling is algebraic, the size of the effect follows from the spin density alone. For a fully polarised fermion gas the spin density is nħ/2, the torsion is 4πℓ_P²n, and its contribution to the effective energy density relative to the rest mass is (π/2)ℓ_P²ƛ_C n. The figure plots both against mass density. At nuclear density the ratio is 1.4 × 10⁻⁴¹; it reaches one near 2 × 10⁵⁸ kg/m³, forty orders of magnitude above the densest matter in a neutron star.

T^{\lambda}{}_{\mu\nu} = \Gamma^{\lambda}{}_{\mu\nu} - \Gamma^{\lambda}{}_{\nu\mu}

The torsion tensor: the antisymmetric part of the affine connection.

\begin{gathered} T^{\lambda}{}_{\mu\nu} + \delta^{\lambda}_{\mu}\, T^{\sigma}{}_{\nu\sigma} - \delta^{\lambda}_{\nu}\, T^{\sigma}{}_{\mu\sigma} = \kappa\, s^{\lambda}{}_{\mu\nu} \\[4pt] \kappa = \frac{8\pi G}{c^4} \end{gathered}

Cartan's equation: the modified torsion equals the spin tensor with the gravitational coupling. For a totally antisymmetric spin tensor the trace terms vanish and T = κs.

\begin{gathered} G_{\mu\nu}(\{\}) = \kappa\, T^{\mathrm{eff}}_{\mu\nu} \\[4pt] \rho_{\mathrm{eff}} = \rho - \frac{2\pi G}{c^4}\, s^2 \\[4pt] p_{\mathrm{eff}} = p - \frac{2\pi G}{c^4}\, s^2 \end{gathered}

The Einstein equation on the Riemannian part of the connection, with the spin-squared terms of a Weyssenhoff fluid in mass-density units; s² = ½ s_{μν}s^{μν}.

\begin{gathered} s = \tfrac{1}{2}\,\xi n\hbar \\[4pt] |T| \sim \kappa c\, s = 4\pi\,\xi\,\ell_P^2\, n \\[4pt] \frac{2\pi G s^2/c^4}{n m} = \frac{\pi}{2}\,\xi^2\,\ell_P^2\,\bar\lambda_C\, n \end{gathered}

Polarised fermions of number density n and polarisation ξ; ℓ_P² = ħG/c³ and ƛ_C = ħ/(mc). These are the curves the figure draws.

Einstein-Cartan · spin-torsion scaling
Torsion against density
ρ at n₀ = 0.16 fm⁻³
2.7×10¹⁷kg/m³
Spin density ξn₀ħ/2
8.4×10⁹J·s/m³
Torsion at n₀
5.3×10⁻²⁵m⁻¹
Its length 1/T
1.9×10²⁴m
Torsion / mass at n₀
1.4×10⁻⁴¹
Crossover density
1.9×10⁵⁸kg/m³
Crossover / nuclear
7.3×10⁴⁰
ℓ_P² = ħG/c³
2.61×10⁻⁷⁰m²
Both curves follow from Cartan's equation with the spin density of a polarised fermion gas, s = ξnħ/2. The upper plot is the torsion κcs = 4πξℓ_P²n in inverse metres; the lower is the spin-squared term 2πGs²/c⁴ of the effective energy density divided by the rest-mass density nm, which is (π/2)ξ²ℓ_P²ƛ_C n. Amber guides mark water, a white-dwarf core and nuclear density; the ember guide is where the torsion term equals the mass term. Below the crossover the effect is the ratio read off the lower curve, and at nuclear density it is the number in the readout.
Lattice Boltzmann · D2Q9

Flow past a cylinder

The Navier-Stokes equations balance a fluid element's inertia against pressure and viscous stress. One number, the Reynolds number Re = UD/ν, fixes the character of flow past a body of size D: steady and symmetric at low Re, then a pair of standing eddies, then, above Re ≈ 47 for a cylinder, a wake that sheds vortices alternately from each side at a frequency the Strouhal number St = fD/U reports.

The figure does not integrate Navier-Stokes directly. It runs a lattice-Boltzmann scheme, nine discrete velocities on a square grid relaxing toward local equilibrium, whose long-wavelength limit is the same incompressible equations with a viscosity set by the relaxation time. The Reynolds number is the slider; the Strouhal number is measured from the transverse velocity at the amber probe as the wake passes it.

\begin{gathered} \frac{\partial \mathbf{u}}{\partial t} + (\mathbf{u}\cdot\nabla)\mathbf{u} = -\frac{1}{\rho}\nabla p + \nu\,\nabla^2 \mathbf{u} \\[4pt] \nabla\cdot\mathbf{u} = 0 \end{gathered}

Incompressible Navier-Stokes: u is velocity, p pressure, ρ density and ν kinematic viscosity.

Re = \frac{UD}{\nu}, \qquad St = \frac{fD}{U}, \qquad \nu = \frac{1}{3}\left(\tau - \tfrac{1}{2}\right)

Reynolds and Strouhal numbers, and the lattice viscosity the BGK relaxation time τ gives in lattice units.

Lattice Boltzmann · D2Q9
Vortex shedding past a cylinder
Re = u₀D/ν
120
τ (lattice)
—
Strouhal St = fD/u₀
measuring
|u|max / u₀
—
Lattice steps
0
Steps / s
—
Single-relaxation-time (BGK) lattice Boltzmann on a 240 × 96 channel with bounce-back walls, an equilibrium inlet at u₀ = 0.08 lattice units, a zero-gradient outlet and a 16-cell cylinder. The colour is vorticity ∂v/∂x − ∂u/∂y, blue clockwise and mint counter-clockwise. Above Re ≈ 47 the wake goes unsteady and a Kármán street forms; the Strouhal number is measured from sign changes of the transverse velocity at the amber probe.
Navier–Stokes

An incompressible solver with a dye source

Navier–Stokes · stable fluids · projection method
An incompressible solver with a dye source
dye vorticity −/+ speed
Re
1995
ν (cells²/step)
—
|u|max
—cells/step
|ω|max
—1/step
Kinetic energy
—
max |∇·u| after projection
—
Steps
0
ms / step
—
Stam's stable-fluids scheme with MacCormack advection: implicit viscous diffusion by Gauss–Seidel, a semi-Lagrangian trace back along the velocity and a second trace forward whose round-trip error corrects the first (Selle et al. 2008), then a pressure projection that solves ∇²p = ∇·u* and subtracts ∇p. The channel is periodic in x with no-slip walls above and below. In the shear-layer mode a weak body force relaxes the flow toward u = U tanh(y/δ) so the Kelvin–Helmholtz roll-up keeps feeding energy in at the large scale; dye is released from six points on the interface so streaklines trace the roll-up. In plume mode a Gaussian body force just above the lower wall drives fluid upward and releases dye in it, swaying slowly so the column buckles. The scheme is unconditionally stable and dissipative, so the Reynolds number is nominal: ν is set from it, and the solver's numerical diffusion adds to that. The divergence readout is the residual the 16 projection sweeps leave behind.

Momentum and continuity

For an incompressible fluid with kinematic viscosity \nu,

\frac{\partial \mathbf{u}}{\partial t} + (\mathbf{u} \cdot \nabla)\mathbf{u} = -\frac{1}{\rho}\nabla p + \nu \nabla^2 \mathbf{u} + \mathbf{f}, \qquad \nabla \cdot \mathbf{u} = 0

The four terms on the left and right are local acceleration, advection, pressure gradient, viscous diffusion and body force. The continuity condition is not an evolution equation; it is a constraint the pressure enforces, which is what the projection step does.

The projection method

Stam's scheme (1999) advances a provisional velocity \mathbf{u}^* with forcing, implicit diffusion and semi-Lagrangian advection, then removes its divergence with a pressure solve:

\nabla^2 p = \nabla \cdot \mathbf{u}^*, \qquad \mathbf{u} = \mathbf{u}^* - \nabla p

This is the Helmholtz–Hodge decomposition: any field is a divergence-free part plus a gradient, and subtracting the gradient leaves the part that satisfies continuity. Implicit diffusion and back-traced advection make the scheme stable for any time step, at the cost of numerical dissipation, which is why the solver's Reynolds number is nominal and the divergence residual is shown.

Reynolds number

Re = \frac{\rho U L}{\mu} = \frac{U L}{\nu}

The ratio of inertial to viscous stresses, and the one parameter that fixes the flow regime once geometry is set. For pipe flow the classical transition sits near Re \approx 2300, with fully turbulent flow above about 4000; for the cylinder in the next figure the wake goes unsteady near Re \approx 47. Both figures take Re from a slider and set \nu from it.

Vorticity transport

\frac{D\boldsymbol{\omega}}{Dt} = (\boldsymbol{\omega} \cdot \nabla)\mathbf{u} + \nu \nabla^2 \boldsymbol{\omega}, \qquad \boldsymbol{\omega} = \nabla \times \mathbf{u}

The curl of the momentum equation. The first term on the right is vortex stretching and tilting; in two dimensions the vorticity is normal to the plane and that term vanishes, so vorticity is only advected and diffused. That is why the vorticity view of the solver is the clearest one, and why two-dimensional turbulence cascades differently from three-dimensional, as the spectrum figure below shows.

Vortex shedding

Circulation, vorticity and the Strouhal number

The wake itself is the lattice-Boltzmann figure in the section on flow past a cylinder. Three quantities describe it.

Circulation
\Gamma = \oint_C \mathbf{u} \cdot d\mathbf{l}

The line integral of velocity around a closed contour; by Stokes' theorem, the vorticity flux through it.

Vorticity
\omega_z = \frac{\partial v}{\partial x} - \frac{\partial u}{\partial y}

The colour in the wake figure: blue for clockwise, mint for counter-clockwise, shed alternately from the two sides of the cylinder.

Strouhal number
St = \frac{f D}{U}

Measured live from the sign changes of the transverse velocity at the probe. For a circular cylinder in the laminar shedding range it sits near 0.2.

Boundary layer

The laminar profile, solved two ways

Boundary layer · Blasius by shooting · implicit march
The laminar profile, solved two ways
f″(0) by shooting
0.33206
Secant iterations
6
η₉₉ → δ₉₉/√(νx/U)
4.910
δ*/√(νx/U)
1.7208
θ/√(νx/U)
0.6641
Shape factor H
2.591
C_f √Re_x = 2f″(0)
0.6641
Marched C_f / Blasius at L
1.002
Max |Δ(u/U)| at x = L
0.0015
Stations
4
Left: the Blasius profile f′(η) in mint, from RK4 integration of f‴ + ½ f f″ = 0 with a secant search on f″(0) until f′(10) = 1. The dashed curves are u/U at four stations of a separate solution of the boundary-layer equations u u_x + v u_y = ν u_yy, u_x + v_y = 0, marched in x from a uniform profile at x = 0.02 L with an implicit tridiagonal solve in y at each of 480 stations; plotted against η they collapse onto Blasius, which is the similarity argument made visible. Right: the marched u/U field with its 0.5, 0.9 and 0.99 contours and the similarity thickness δ₉₉ = η₉₉ √(νx/U). The displacement and momentum thicknesses, the shape factor and the friction coefficient in the readouts are quadratures of the computed f, and the Reynolds slider changes ν in the march to show that the layer scales as √(νx/U).

Blasius similarity

Near a flat plate the boundary-layer equations admit a similarity solution. With \eta = y\sqrt{U/\nu x} and stream function \psi = \sqrt{\nu U x}\, f(\eta), so that u/U = f'(\eta),

f''' + \tfrac{1}{2} f f'' = 0, \qquad f(0) = f'(0) = 0, \qquad f'(\eta \to \infty) = 1

A two-point boundary value problem: the figure shoots on f''(0) until the far condition holds. From the solution,

\delta_{99} = \eta_{99}\sqrt{\frac{\nu x}{U}}, \qquad C_f = \frac{2 f''(0)}{\sqrt{Re_x}}, \qquad \delta^* = \int_0^\infty \Big(1 - \frac{u}{U}\Big)\,dy, \qquad \theta = \int_0^\infty \frac{u}{U}\Big(1 - \frac{u}{U}\Big)\,dy

with H = \delta^*/\theta the shape factor. Every one of these appears in the readouts as a quadrature of the computed f, not as a typed constant; the familiar values, \eta_{99} \approx 4.91, C_f\sqrt{Re_x} \approx 0.664, H \approx 2.59, are what the quadratures return.

Marching the full equations

The boundary-layer equations themselves, without the similarity assumption, are

u\frac{\partial u}{\partial x} + v\frac{\partial u}{\partial y} = \nu\frac{\partial^2 u}{\partial y^2}, \qquad \frac{\partial u}{\partial x} + \frac{\partial v}{\partial y} = 0

Parabolic in x, so they can be marched downstream. At each station the figure solves the y-direction implicitly, a tridiagonal system, then integrates continuity for v. Started from a uniform profile the march forgets its start within a few percent of the plate and lands on the Blasius curve; the maximum deviation at the trailing edge is a readout.

Past transition the layer is turbulent, and the empirical power-law fits replace the similarity solution:

\frac{u}{U} \approx \Big(\frac{y}{\delta}\Big)^{1/7}, \qquad \delta \approx 0.37\, x\, Re_x^{-1/5}, \qquad C_f \approx 0.059\, Re_x^{-1/5}, \qquad H \approx 1.3

A turbulent layer grows as x^{4/5} rather than x^{1/2} and carries several times the wall shear.

Potential flow

Streamlines, pressure and lift from a few singularities

Potential flow · superposition · Kutta–Joukowski
Streamlines, pressure and lift from a handful of singularities
L′ = ρUΓ (Kutta–Joukowski)
4.000
L′ by momentum integral
4.000
D′ by momentum integral
0.000
Cp min
-5.80
Stagnation points
2
θ_s = asin(−Γ/4πUa)
-18.6°
RK4 steps
10,353
4πUa
12.57
The velocity field is a uniform stream plus, for the cylinder, a doublet of strength Ua² and a point vortex Γ at the centre; for the Rankine oval a source and a sink of equal strength with the vortex; for the pair two counter-rotating vortices. Streamlines are traced by fourth-order Runge–Kutta in arc length from seeds on the left edge; colour is the pressure coefficient Cp = 1 − |V|²/U², cyan for suction and amber for pressure. Ember dots are stagnation points, found by a Newton iteration on V = 0 from grid minima of the speed. Lift is reported from L′ = ρUΓ and, independently, from the pressure and momentum flux integrated around the dashed circle; the two agree, the drag integral is zero, and that is d'Alembert's paradox stated numerically. For the cylinder the stagnation points meet at the bottom when Γ = 4πUa and leave the surface beyond it.

Superposition

Irrotational, incompressible flow has a velocity potential with \nabla^2\phi = 0, and Laplace's equation is linear: solutions add. In the complex plane the elements on the page are

W(z) = U e^{-i\alpha} z + \sum_k \frac{m_k}{2\pi}\ln(z - z_k) + \frac{i\Gamma}{2\pi}\ln z + \frac{U a^2 e^{i\alpha}}{z}, \qquad u - iv = \frac{dW}{dz}

uniform stream, sources and sinks, a clockwise vortex and a doublet. Stream plus doublet is a cylinder of radius a; adding the vortex moves its stagnation points to \sin\theta_s = -\Gamma/4\pi U a, and they leave the surface when |\Gamma| > 4\pi U a.

Kutta–Joukowski, checked

The lift per unit span on any closed body in a uniform stream with circulation \Gamma around it is

L' = \rho U \Gamma

and the drag is zero. The figure does not take that on trust: it integrates pressure from Bernoulli, p = p_\infty + \tfrac{1}{2}\rho(U^2 - |\mathbf{V}|^2), together with the momentum flux around a circle enclosing the body,

\mathbf{F} = -\oint_C \big( p\,\hat{\mathbf{n}} + \rho\,\mathbf{V}(\mathbf{V} \cdot \hat{\mathbf{n}}) \big)\, ds

and reports both the lift and the drag that come out. The lift matches \rho U \Gamma to the quadrature's precision and the drag is zero to the same precision, which is d'Alembert's paradox measured rather than stated. The pressure coefficient in the colour field is C_p = 1 - |\mathbf{V}|^2/U^2, so the cylinder's minimum of −3 at the shoulders with no circulation is a check on the field.

Turbulence

Where the energy sits across scales

Turbulence · energy spectrum · FFT of the solver field
Where the energy sits across scales
Fitted slope
—
Kolmogorov / Kraichnan
−1.67 / −3
Fit range k
—
Peak at k
—
Σ E(k)
—
Field
—
Every 220 ms the figure takes the velocity field of the solver above (or its own copy if that one is off screen), transforms u and v along the periodic direction on every second row, averages ½(|û|² + |v̂|²) over rows, and keeps a running average over the last couple of seconds to get E(k). Energy enters at the forcing scale, the peak at low k, and cascades to smaller scales until numerical and viscous dissipation remove it. The mint line is a least-squares fit over the shaded range; the dashed references are the −5/3 law of three-dimensional inertial-range turbulence and the −3 law of the two-dimensional enstrophy cascade below the forcing scale. A dissipative 2D solver at these grid sizes sits at or below −3 in the mid range; the fit reports what it measures. The upturn at the last few wavenumbers is grid-scale noise, energy that reaches the smallest resolved scale faster than the scheme removes it.

The cascade

In three dimensions, energy injected at a large scale is passed to smaller eddies until viscosity dissipates it at the Kolmogorov scale. In the inertial range between, Kolmogorov's 1941 argument gives the spectrum from the dissipation rate \varepsilon alone:

E(k) = C_K\, \varepsilon^{2/3} k^{-5/3}, \qquad \eta = \Big(\frac{\nu^3}{\varepsilon}\Big)^{1/4}, \qquad \tau_\eta = \Big(\frac{\nu}{\varepsilon}\Big)^{1/2}, \qquad u_\eta = (\nu\varepsilon)^{1/4}

In two dimensions vortex stretching is absent and enstrophy is conserved as well as energy, so there are two cascades (Kraichnan 1967): energy goes to larger scales as k^{-5/3} and enstrophy to smaller scales as k^{-3}. The solver above is two-dimensional and forced at the largest scale, so the mid range should sit near −3, steeper still where numerical dissipation bites. The figure's fitted slope is the measurement.

Averaged equations and closures

Engineering solvers rarely resolve the cascade. Splitting u_i = \bar{u}_i + u_i' and averaging gives the Reynolds-averaged equations,

\frac{\partial \bar{u}_i}{\partial t} + \bar{u}_j\frac{\partial \bar{u}_i}{\partial x_j} = -\frac{1}{\rho}\frac{\partial \bar{p}}{\partial x_i} + \nu\frac{\partial^2 \bar{u}_i}{\partial x_j \partial x_j} - \frac{\partial}{\partial x_j}\overline{u_i' u_j'}

with the Reynolds stress \overline{u_i' u_j'} left to a model. The two-equation closures carry the turbulent kinetic energy k and a dissipation variable:

\frac{Dk}{Dt} = P_k - \varepsilon + \frac{\partial}{\partial x_j}\Big[\Big(\nu + \frac{\nu_t}{\sigma_k}\Big)\frac{\partial k}{\partial x_j}\Big], \qquad \frac{D\varepsilon}{Dt} = C_{\varepsilon 1}\frac{\varepsilon}{k}P_k - C_{\varepsilon 2}\frac{\varepsilon^2}{k} + \frac{\partial}{\partial x_j}\Big[\Big(\nu + \frac{\nu_t}{\sigma_\varepsilon}\Big)\frac{\partial \varepsilon}{\partial x_j}\Big]

with eddy viscosity \nu_t = C_\mu k^2/\varepsilon in the k–\varepsilon model, or in the k–\omega form better behaved at walls,

\frac{Dk}{Dt} = P_k - \beta^* k\omega + \frac{\partial}{\partial x_j}\Big[(\nu + \sigma_k \nu_t)\frac{\partial k}{\partial x_j}\Big], \qquad \frac{D\omega}{Dt} = \alpha\frac{\omega}{k}P_k - \beta\omega^2 + \frac{\partial}{\partial x_j}\Big[(\nu + \sigma_\omega \nu_t)\frac{\partial \omega}{\partial x_j}\Big], \qquad \nu_t = \frac{k}{\omega}

None of these run on the page; they are here because they are what the direct solvers above are usually replaced by at engineering Reynolds numbers.

Dimensionless numbers

The ratios that fix a flow

NumberDefinitionRatioOn this page
ReynoldsRe = \dfrac{\rho U L}{\mu} = \dfrac{U L}{\nu}inertia to viscous stressthe slider on the solver and the cylinder wake
StrouhalSt = \dfrac{f L}{U}shedding frequency to flow ratemeasured at the probe in the cylinder wake
MachMa = \dfrac{U}{c}flow speed to sound speedbelow 0.3 the incompressible equations on this page hold
FroudeFr = \dfrac{U}{\sqrt{g L}}inertia to gravityfree-surface flows, not modelled here
WeberWe = \dfrac{\rho U^2 L}{\sigma}inertia to surface tensiondroplet break-up, not modelled here
PrandtlPr = \dfrac{\nu}{\alpha} = \dfrac{c_p \mu}{k}momentum to heat diffusivitycoupled heat transfer, not modelled here
Implementation

The projection step, as it runs here

fluidCore.ts · project()
1// One projection step, as it runs on this page (fluidCore.ts).
2// u, v are cell-centred velocities; the channel is periodic in x.
3privateproject(u, v, p, div, iters){
4for(let j =1; j < ny -1; j++){
5const row = j * nx;
6for(let i =0; i < nx; i++){
7const l = row +(i ===0? nx -1: i -1);
8const r = row +(i === nx -1?0: i +1);
9// divergence of the provisional field, h = 1
10 div[row + i]=-0.5*(u[r]- u[l]+ v[row + i + nx]- v[row + i - nx]);
11 p[row + i]=0;
12}
13}
14this.bounds(0, div);this.bounds(0, p);
15// Gauss–Seidel on ∇²p = ∇·u*
16this.linSolve(0, p, div,1,4, iters);
17// subtract the gradient: u ← u* − ∇p
18for(let j =1; j < ny -1; j++){
19const row = j * nx;
20for(let i =0; i < nx; i++){
21const l = row +(i ===0? nx -1: i -1);
22const r = row +(i === nx -1?0: i +1);
23 u[row + i]-=0.5*(p[r]- p[l]);
24 v[row + i]-=0.5*(p[row + i + nx]- p[row + i - nx]);
25}
26}
27this.bounds(1, u);this.bounds(1, v);
28}

The full solver is under three hundred lines: forcing, two implicit diffusion solves, two semi-Lagrangian advections, this projection, then the dye. The lattice-Boltzmann wake is a separate three-hundred-line D2Q9 kernel. Both run at the frame rate on a laptop, which is the point of building them in the page rather than showing pictures of them.

Open problems

What a browser solver leaves out

Numerical dissipation

Semi-Lagrangian advection with linear interpolation smears small scales; the effective Reynolds number is well below the nominal one and the spectrum falls off steeper than −3. Higher-order interpolation, vorticity confinement or a MacCormack correction recover some of it; a spectral or finite-volume scheme recovers more at a cost the page cannot pay at frame rate.

Resolution

Grid cells set the smallest eddy the solvers can hold. At 256 × 96 and 240 × 96 there is roughly a decade of scales between the forcing and the grid, which is enough to see a cascade and not enough to measure an exponent to two figures.

Two dimensions

Both direct solvers are planar. Real wakes and shear layers go three-dimensional above modest Reynolds numbers, and the cascade changes direction. The Kármán street's Strouhal number stays close to its two-dimensional value, which is why the measurement in the wake figure is meaningful; the spectrum's slope does not.

Walls and separation

The boundary-layer march stops where the pressure gradient turns adverse and the layer separates; the marching equations become singular there (Goldstein 1948). Predicting separation and the transition to turbulence upstream of it is what most of practical aerodynamics is about, and neither is on this page.

For comparison · magnetic confinement

The conventional route to a confined plasma

A tokamak holds a D-shaped plasma with a strong toroidal field from a ring of coils and a poloidal field from the plasma's own current; the two twist into helical field lines that keep the plasma off the wall. The rendering shows the coil set, the central solenoid, the vessel in cutaway, the plasma cross-section with its pressure map, and field lines wound with the safety factor rising from 1 on axis to 3.6 at the edge. The next section carries the Grad-Shafranov solver and the dual-disc concept this rendering is drawn against. Compact high-field machines of the SPARC class reach 12 T on axis at a major radius under two metres, and Professor Nuno Loureiro's work on magnetic reconnection and plasma turbulence informed the physics basis of this class of machine.

Concept rendering · compact high-field tokamak
SPARC-class machine in cutaway
Drag to orbit · hover for parts TF coil · central solenoid · PF coil · plasma · divertor · vessel
SPARC-class values
Major radius R₀1.85m
Minor radius a0.97m
Aspect ratio1.9
B on axis12.2T
Plasma current8.7MA
Elongation κ1.8
Triangularity δ0.5
TF coils18
Concept rendering of a compact high-field tokamak of the SPARC class.

Dual Rotating Plate Disc Configuration

Concept · dual counter-rotating discs
Magnetic confinement between two rotating tungsten-lined discs
Drag to orbit
Concept parameters
Disc diameter0.40m
Separation0.25m
ω₁ (upper)1050rad/s
ω₂ (lower)950rad/s
B at disc face3.2T
B in compression zone9.7T
Liningtungsten
Field lines are traced with RK4 through the sum of the two opposed azimuthal fields, 3.2 T at each disc face and decaying toward the midplane, and the poloidal field of the compression torus between them. Lines from the upper disc are cyan, from the lower disc mint, and the loops closing on the torus are white; tracers move along them. The amber column at the right is the azimuthal flow profile across the midplane, ω₁r above and ω₂r below in opposite senses.
Design targets

What the concept is designed to reach

10²¹ m⁻³
Plasma density
Target density in the central compression zone
>10 keV
Temperature
Target ion temperature in the compression zone
2.3 s
Confinement time τ_E
Energy confinement time the model estimates
8.5%
Beta β
Ratio of plasma pressure to magnetic pressure at the target

How It Works

1

Counter-Rotating Tungsten Discs

Two parallel tungsten-lined discs (diameter 0.40 m, separation 0.25 m) rotate in opposite directions at differential velocities: ω₁ = 1050 rad/s (upper, clockwise) and ω₂ = 950 rad/s (lower, counter-clockwise). The tungsten lining gives the field-shaping surfaces a sputtering threshold well above that of carbon divertor tiles.

2

Opposing Magnetic Fields

Each rotating tungsten disc generates a toroidal magnetic field. The counter-rotation sets the two fields against each other so they form a compressed magnetic bottle in the central region. The design puts 3.2 T at the disc surfaces and 9.7 T in the compression zone.

3

Plasma Compression Zone

The magnetohydrodynamic (MHD) interaction between opposing fields forms a high-compression torus at the geometric center. This zone is designed to reach a plasma density of 10²¹ m⁻³ at temperatures above 10 keV, the range the Lawson criterion sets for deuterium-tritium ignition.

4

MHD Stability Control

The differential rotational velocity (Δω = 100 rad/s) induces a sheared poloidal plasma flow that works against the major MHD instabilities: tearing modes, kink modes, and edge-localized modes (ELMs). On this basis the model estimates a confinement time of 2.3 s at β = 8.5%.

Abstract

We present a magnetic confinement concept built on two counter-rotating tungsten-lined plate discs whose opposed toroidal fields meet in a central compression zone. The discs are 0.40 m across and 0.25 m apart and turn at 1050 and 950 rad/s in opposite senses. The design targets a plasma density of 10²¹ m⁻³ at temperatures above 10 keV in that zone.

The tungsten lining gives the field-shaping surfaces a sputtering threshold well above that of carbon. From the Grad–Shafranov equilibrium, the β definition and the Lawson product set out below, the model estimates an energy confinement time of 2.3 s at β = 8.5%. The solver on this page relaxes the equilibrium live and reports q₀, β and the flux-surface shape from the converged ψ; the panel beside the Lawson block carries the triple product the targets give.

The differential rotation, Δω = 100 rad/s, drives a sheared azimuthal flow across the midplane, and the tearing growth-rate expression below carries the shear term that works against tearing and kink modes. The reconnection model beside it shows the plasmoid chain that shear acts on.

Mathematical Foundations

Magnetohydrodynamic Equilibrium

The force balance equation governing plasma equilibrium in the dual-disc configuration:

\nabla p = \mathbf{J} \times \mathbf{B}

Where the current density \mathbf{J} is determined by Ampère's law:

\mathbf{J} = \frac{1}{\mu_0} \nabla \times \mathbf{B}

Grad-Shafranov Equation

For axisymmetric toroidal equilibrium, the magnetic flux function \psi satisfies:

R^2 \nabla \cdot \left(\frac{1}{R^2} \nabla \psi \right) = -\mu_0 R^2 \frac{dp}{d\psi} - \frac{1}{2} \frac{dF^2}{d\psi}

Where R is the major radius, p(\psi) is the plasma pressure, and F(\psi) = RB_\phi is the poloidal current function.

With the Solov'ev choice p = p_0 \psi and F^2 = F_0^2 + 2 F_1 \psi the right-hand side is a fixed function of R, and the equation is linear in \psi. The solver beside this block relaxes it on an (R, Z) grid with successive over-relaxation and reports q_0, \beta and the shape of the last closed flux surface from the converged \psi. The first preset is the compression torus of this concept; the second is a compact tokamak for scale.

Live solver · Solov'ev equilibrium
Grad–Shafranov relaxation on an (R, Z) grid
R₀ 0.12 m · a 0.06 m · B₀ 9.7 T
q₀ on axis
—
β (volume)
—
β_p
—
p on axis
—Pa
κ of LCFS
—
δ of LCFS
—
Sweeps
0
Residual
—
Successive over-relaxation of R∂_R(R⁻¹∂_Rψ) + ∂²_Zψ = −μ₀R²p′(ψ) − FF′(ψ) with p and F² linear in ψ, so the source is (1 − A)R²/R₀² + A in normalised units and A sets the pressure share. The edge of the grid carries the closed-form Solov'ev solution for the chosen boundary; the interior starts flat. Plasma current fixes the flux scale ψ₀, and q₀, β and the LCFS shape are read off the converged ψ. The fill inside the last closed surface is the pressure.

Plasma Beta & Confinement

The plasma beta parameter, ratio of plasma pressure to magnetic pressure:

\beta = \frac{2\mu_0 \langle p \rangle}{B^2}

Lawson criterion for breakeven fusion (D-T reaction):

n \tau_E T \geq 3 \times 10^{21} \text{ m}^{-3} \cdot \text{s} \cdot \text{keV}

Where n is density, \tau_E is energy confinement time, and T is temperature. The panel beside this block evaluates both expressions: β from the solver's converged pressure and field, and the triple product from the design targets with p = 2 n k_B T.

Live values
What the equations give
From the Grad–Shafranov solver
β (volume avg.)
—
q₀ on axis
—
β_p
—
Solver state
off-screen
From the design targets
n T τ_E
2.30×10²²keV·s·m⁻³
÷ Lawson 3×10²¹
7.7×
p = 2nkT
3.20×10⁶Pa
β at 9.7 T
9 %
B for β = 8.5 %
9.7T
τ_E at threshold
0.30s

Differential Rotation Dynamics

The counter-rotating discs create a sheared azimuthal flow with velocity profile:

v_\phi(z) = \begin{cases} \omega_1 r & z > 0 \\ -\omega_2 r & z < 0 \end{cases}

The shear enters the tearing-mode growth rate as a subtractive term:

\gamma = \frac{k_\parallel v_A}{\sqrt{2\pi}} \exp\left(-\frac{\Delta'}{2k_\theta r_s}\right) - \frac{(\omega_1 + \omega_2)k_\theta r}{2}

The reconnection model below shows what the shear acts on: a current sheet tearing into a chain of plasmoids, with the single-mode growth rate scaling as S^{-3/5} and the plasmoid instability asS^{1/4}\, v_A / L (Loureiro, Schekochihin & Cowley 2007).

Analytic tearing model · Harris sheet
Plasmoid chain in a reconnecting current sheet
ψ contours separatrix ×X-point ○O-point |J|
γ_max τ_A ≈ S^(1/4)
10.0
γ τ_A, n = 1
7.1×10⁻³
k_max L ≈ S^(3/8)
32
Dominant mode
n = 5
X-points
0
O-points
0
ε / ε_sat
0.018
Phase
linear
Field lines are contours of ψ = B₀a ln cosh(y/a) + Σₙ εₙ(t) cos(kₙx + φₙ) sech(κₙy); the heat map is the current density |∇²ψ|. Mode amplitudes grow at the rates of the plasmoid instability, γ_max ≈ S^¼ v_A/L with the fastest mode at k_max L ≈ S^⅜ (Loureiro, Schekochihin & Cowley 2007), against the single-mode tearing scaling γ ∝ S^−⅗. White crosses mark X-points, mint rings mark O-points, mint contours are separatrices.

Magnetic Flux Compression

Conservation of magnetic flux during compression (frozen-in flux condition):

\frac{\partial \mathbf{B}}{\partial t} = \nabla \times (\mathbf{v} \times \mathbf{B})

For adiabatic compression with compression ratio C = V_i/V_f:

B_f = C^{2/3} B_i, \quad T_f = C^{2/3} T_i, \quad n_f = C \cdot n_i
Live in the browser

How the Constellation agents split the problem

Production runs are posted to sophiaxt.com/lab/live.
sophia-1
Equilibrium
reads · Grad–Shafranov solver
Waiting for the solver to scroll into view.
sophia-2
Transport
reads · Design targets
Triple product from the targets: n T τ_E = 1.0×10²¹ × 10 × 2.3 = 2.30×10²² keV·s·m⁻³, which is 7.7× the D-T threshold of 3×10²¹.
τ_E at threshold for these n and T: 0.30 s · plasma pressure 2 n k T = 3.20×10⁶ Pa
sophia-3
Shaping · coils
reads · Reconnection model
Waiting for the solver to scroll into view.
Tearing amplitudes at S = 1.0×10⁴: mode n = 5 of 12 leads, ε/ε_sat = 0.039, 5 O-points and 5 X-points, phase linear, t = 0.49 τ_A.
sophia-4
Verifier
reads · All of the above
β = 2μ₀p/B² at B = 9.7 T with p = 2 n k T gives 9 %; the β target of 8.5 % at this pressure needs B = 9.7 T.
γ_max τ_A ≈ S^(1/4) = 10.0 against the single-mode γ τ_A = 7.1×10⁻³, ratio 1.4×10³ at S = 1.0×10⁴.

Computational Implementation

MHD Equilibrium Solver

1import numpy as np
2from scipy.sparse import diags
3from scipy.sparse.linalg import spsolve
4
5defsolve_grad_shafranov(R, Z, psi_boundary, pressure_profile, current_profile, max_iter=1000):
6"""
7 Solve the Grad-Shafranov equation for plasma equilibrium
8
9 Parameters:
10 -----------
11 R, Z : ndarray
12 Radial and vertical grid coordinates
13 psi_boundary : ndarray
14 Boundary conditions for magnetic flux
15 pressure_profile : callable
16 Pressure as a function of psi: p(psi)
17 current_profile : callable
18 Poloidal current function: F(psi)
19 """
20 nR, nZ = R.shape
21 dR = R[1,0]- R[0,0]
22 dZ = Z[0,1]- Z[0,0]
23
24 psi = np.zeros_like(R)
25 psi[:,0]= psi_boundary[:,0]
26 psi[:,-1]= psi_boundary[:,-1]
27 psi[0,:]= psi_boundary[0,:]
28 psi[-1,:]= psi_boundary[-1,:]
29
30for iteration inrange(max_iter):
31 psi_old = psi.copy()
32
33for i inrange(1, nR-1):
34for j inrange(1, nZ-1):
35 R_ij = R[i, j]
36
37# Second derivatives
38 d2psi_dR2 =(psi[i+1,j]-2*psi[i,j]+ psi[i-1,j])/ dR**2
39 d2psi_dZ2 =(psi[i,j+1]-2*psi[i,j]+ psi[i,j-1])/ dZ**2
40 dpsi_dR =(psi[i+1,j]- psi[i-1,j])/(2*dR)
41
42# Source term
43 p = pressure_profile(psi[i,j])
44 F = current_profile(psi[i,j])
45 dp_dpsi =(pressure_profile(psi[i,j]+1e-6)- p)/1e-6
46 dF2_dpsi =(current_profile(psi[i,j]+1e-6)**2- F**2)/1e-6
47
48 mu_0 =4*np.pi*1e-7
49 source =-mu_0 * R_ij**2* dp_dpsi -0.5* dF2_dpsi
50
51# Update psi using successive over-relaxation
52 omega =1.5# Relaxation parameter
53 psi_new =((d2psi_dR2 + d2psi_dZ2 - dpsi_dR/R_ij + source)*
54(dR*dZ)**2/(2*(dR**2+ dZ**2)))
55 psi[i,j]=(1-omega)*psi[i,j]+ omega*psi_new
56
57# Check convergence
58 residual = np.max(np.abs(psi - psi_old))
59if residual <1e-6:
60print(f"Converged in {iteration} iterations")
61break
62
63return psi
64
65# Calculate beta parameter
66defcalculate_beta(density, temperature, magnetic_field):
67"""Calculate plasma beta"""
68 k_B =1.380649e-23# Boltzmann constant
69 mu_0 =4*np.pi*1e-7
70
71 plasma_pressure = density * k_B * temperature
72 magnetic_pressure = magnetic_field**2/(2*mu_0)
73
74return plasma_pressure / magnetic_pressure

Particle-in-Cell Plasma Simulation

1#include<vector>
2#include<cmath>
3#include<random>
4
5structParticle{
6double x, y, z;// Position
7double vx, vy, vz;// Velocity
8double charge;// Charge
9double mass;// Mass
10};
11
12classPlasmaSimulator{
13private:
14 std::vector<Particle> particles;
15double omega1, omega2;// Disc rotation rates
16double B0;// Base magnetic field
17double dt;// Timestep
18
19// Magnetic field at position
20voidmagneticField(double x,double y,double z,
21double& Bx,double& By,double& Bz){
22double r = std::sqrt(x*x + y*y);
23
24if(z >0){
25// Upper disc contribution
26 Bx =-B0 * omega1 * y /1000;
27 By = B0 * omega1 * x /1000;
28 Bz = B0 *(1.0- std::exp(-std::abs(z)/0.1));
29}else{
30// Lower disc contribution
31 Bx = B0 * omega2 * y /1000;
32 By =-B0 * omega2 * x /1000;
33 Bz =-B0 *(1.0- std::exp(-std::abs(z)/0.1));
34}
35}
36
37public:
38PlasmaSimulator(int nParticles,double omega1_,double omega2_,double B0_)
39:omega1(omega1_),omega2(omega2_),B0(B0_),dt(1e-9){
40
41// Initialize particles
42 std::random_device rd;
43 std::mt19937 gen(rd());
44 std::normal_distribution<>dis(0.0,0.05);
45
46for(int i =0; i < nParticles; i++){
47 Particle p;
48 p.x =dis(gen);
49 p.y =dis(gen);
50 p.z =dis(gen);
51 p.vx =dis(gen)*1e4;
52 p.vy =dis(gen)*1e4;
53 p.vz =dis(gen)*1e4;
54 p.charge =1.602e-19;
55 p.mass =1.672e-27;
56 particles.push_back(p);
57}
58}
59
60voidstep(){
61for(auto& p : particles){
62double Bx, By, Bz;
63magneticField(p.x, p.y, p.z, Bx, By, Bz);
64
65// Lorentz force: F = q(v × B)
66double Fx = p.charge *(p.vy * Bz - p.vz * By);
67double Fy = p.charge *(p.vz * Bx - p.vx * Bz);
68double Fz = p.charge *(p.vx * By - p.vy * Bx);
69
70// Update velocity (Boris pusher for stability)
71 p.vx +=(Fx / p.mass)* dt;
72 p.vy +=(Fy / p.mass)* dt;
73 p.vz +=(Fz / p.mass)* dt;
74
75// Update position
76 p.x += p.vx * dt;
77 p.y += p.vy * dt;
78 p.z += p.vz * dt;
79}
80}
81
82doublecalculateAverageDensity(){
83// Calculate density in central region
84double volume =0.001;// 1 cm³
85int count =0;
86for(constauto& p : particles){
87double r = std::sqrt(p.x*p.x + p.y*p.y + p.z*p.z);
88if(r <0.1) count++;
89}
90return count / volume;
91}
92};

Download the full research paper

The full paper: the MHD model, the simulation set-up and the engineering specification of the concept.

Download the PDF
How the figures run

Each figure is a TypeScript model drawn on a canvas in the visitor's browser; nothing on this page is a recording. The induction solver works on a 104 × 104 grid with an exact rotational back-trace and explicit diffusion; the Couette solver on 160 radial points with a tridiagonal solve for its steady state; the lattice-Boltzmann channel is 240 × 96 cells; the reconnection model carries twelve tearing modes; the tunnelling and torsion figures are closed-form curves evaluated on the fly.

Every canvas stops when it leaves the screen or the tab is hidden, caps its resolution at 1.5 device pixels per CSS pixel, budgets its stepping to a few milliseconds per frame, and renders a single still when the visitor has asked for reduced motion. The constants come from the CRC Handbook for mercury, Bosch and Hale (1992) for the D-D S-factors, and CODATA values elsewhere.

From the notebook archive

Ten essays and one
remembrance.

The notebook keeps the long reading: essays and side studies from the lab, each with figures that compute in the page. Current work and results are in the research index.

  1. 01 Spatial comprehension Plane fitting, tracking through occlusion, relation graphs and occupancy maps, computed on a point cloud.
  2. 02 Telemetric pathfinding Replanning when the map changes, sharing a grid between agents, and deciding from telemetry when a plan is stale.
  3. 03 AGI alignment Oversight for systems that outgrow their evaluators, with a live preference model.
  4. 04 Physics You are reading this one.
  5. 05 Quantum computing Circuits, error correction and qutrits, simulated in the page.
  6. 06 The agentic web What changes when software agents, not people, read the pages.
  7. 07 Ethical AI Fairness metrics, federated learning, differential privacy, and how a model is made to persuade.
  8. 08 Digital feudalism Who owns what a billion people wrote, and what that does to the commons.
  9. 09 Rico Inf Curve Particle streams in a four-singularity well, and the propellantless ship sized to the numbers.
  10. 10 AI and humanity An essay and analysis of where the two curves meet.
  11. · In memoriam: Nuno F. Loureiro A tribute to the plasma physicist, 1977 to 2025.