Skip to main content
Sandbox Physics

Magnetic Reconnection

Where does the energy go when a magnetic field rearranges? Magnetic stresses accelerate the plasma. Electric resistance and viscosity convert part of the magnetic and fluid energy into heat. A thin nonideal region lets magnetic flux change its connection to the moving fluid.

Drag a magnetic footpoint, then follow the field, the flow and the energy released as heat.

Interactive modelMagnetic Reconnection
Actual selected N68 field, current and flow
Field at the probe0.8730.873
Flow at the probe0.1810.181
Electric current at the probe−0.971-0.971
Local Ohmic power0.01880.0188
Field at probe0.2850.285
Current at probe−0.0641-0.0641
Flow at probe0.02150.0215
Accumulated heat0.001350.00135

Magnetic stresses launch outflows

One numerical state

Selected physical time 1 tA1\,t_A

Field energy becomes motion and heat

00.33401
t/tA,E/(B02/μ0)t/t_A,\quad E/(B_0^2/\mu_0)

Domain-mean energy densities. Blue: magnetic. Green: kinetic. Orange and purple: Ohmic and viscous heat.

(EB+EK+QΩ+Qν)/E0=1.000(E_B+E_K+Q_\Omega+Q_\nu)/E_0=1.000

Magnetic flux between the two nulls

0.99101
t/tA,[ψ(O)−ψ(X)]/(B0L0)t/t_A,\quad[\psi(O)-\psi(X)]/(B_0L_0)

Gold: the selected island’s signed flux contrast. Both nulls can undergo diffusion.

ψ˙(O)−ψ˙(X)=Ez(X)−Ez(O)\dot\psi(O)-\dot\psi(X)=E_z(X)-E_z(O)
What this calculation resolves

The four fixed cases release an initially stressed periodic field. Local induction, finer-grid fields and time-step errors are checked separately from the global energy sum. A retained coarse ideal case demonstrates why conservation alone is insufficient. Solar footpoint driving, flare onset, particles and emitted light need additional models.

The canvas preview samples a verified 128-grid Python state; the full saved input is checked before JavaScript evolution.

Where the input energy goes

0.0196000.9
Wall inputWB+WνW_B+W_\nuMagnetic changeΔEB\Delta E_BKineticEKE_KOhmic heatQΩQ_\OmegaViscous heatQνQ_\nu

The initial magnetic energy is subtracted only from the magnetic-change curve. Both magnetic and viscous wall work are included in the input.

One physical state

Select a contour with the blue ring

The square has equal coordinate scales. Copper edges are conducting walls; solid beads follow their material positions.

x/L0, y/L0∈[−1,1],tA=L0/vAx/L_0,\ y/L_0\in[-1,1],\quad t_A=L_0/v_A

Current colour saturates at the displayed limits; flow arrows are enlarged. Their motion follows accepted model time.

−2≤j/j0≤2-2\leq j/j_0\leq2
Flux, energy and model limits(x,y)/L0=(0.25,0.12)(x,y)/L_0=(0.25,0.12)ψX/ψ0=1.43×10−4\psi_X/\psi_0=1.43\times10^{-4}
EB+EK+QΩ+Qν−WB−Wν=43\begin{aligned}E_B+E_K+Q_\Omega+Q_\nu\\{}-W_B-W_\nu=\tfrac43\end{aligned}
δE/E0=−7.77×10−12\delta_E/E_0=-7.77\times10^{-12}
j0=B0μ0L0,Eu=B02L02μ0j_0=\frac{B_0}{\mu_0L_0},\quad E_u=\frac{B_0^2L_0^2}{\mu_0}
ψ0=B0L0,q0=B02μ0tA\psi_0=B_0L_0,\quad q_0=\frac{B_0^2}{\mu_0t_A}

The transported boundary flux fixes the gauge. The blue line is the sampled contour component through its seed; pairing close to a null is not reported. The fluid is planar, incompressible, viscous and resistive, with no temperature equation. Model time has no assigned solar-second calibration; dissipated heat is not a predicted light curve.

Move a conductor and its magnetic footpoint moves with it. The bent field pushes the fluid, while concentrated current turns part of the work into heat. Choose an endpoint and watch the same field, flow and energy respond.

How the conductor gives energy to the field

The hollow circle says where the upper material point should finish. The solid bead shows where it is now. Moving the circle does not instantly draw a new field: the calculation starts again from one shared prepared state, with the same initial position, speed and acceleration.

The conductor carries its boundary flux along. Magnetic tension then accelerates the fluid. Resistance dissipates energy where current is strong, and viscosity does so where neighbouring fluid elements shear past each other. The two accumulated heat quantities keep their physical meaning even when the conductor turns back.

Q˙Ω=∫ηj2 dA,Q˙ν=∫2νS:S dA\dot Q_\Omega=\int\eta j^2\,dA,\qquad\dot Q_\nu=\int2\nu\mathbf S:\mathbf S\,dA
  1. Predict whether unloading can make accumulated heat decrease. Choose “Release the load” and follow the solid bead and heat curve: the conductor can turn back while dissipated heat continues to grow.
  2. Choose “Out and back”. Its endpoint is close to the starting coordinate, yet the inherited forward speed carries the solid bead past it before the return. Watch the bead as the model clock advances.
  3. Pause and move the probe across a current layer. Then move the blue seed to inspect another actual flux-contour branch. Neither measurement drives the boundary.

This is a planar incompressible viscous-resistive conducting box. Its heat is an energy account, not a predicted solar light curve. The bounded target interval has finite independent comparisons; real-time requests do not each run that longer reference calculation.

Sources and further reading

Follow magnetic energy into motion and heat

BackgroundA bent magnetic field exerts a force on the surrounding plasma. The resulting motion can concentrate current into a thin layer, where resistance lets magnetic flux move relative to the fluid.

Why it mattersSolar flares release stored magnetic energy, but a useful first calculation must identify what it actually evolves. This small periodic model follows the field and fluid together.

Focus question
Where does magnetic energy go in this model?
One-sentence intuition
The magnetic field accelerates the fluid; electric resistance and viscosity feed separate dissipative reservoirs.

Core mathematical model

Flux carried by the moving fluid

∂tψ+v⋅∇ψ=η∇2ψ\partial_t\psi+\mathbf v\cdot\nabla\psi=\eta\nabla^2\psi

Magnetic contours follow constant ψ\psi. Here η\eta is dimensionless magnetic diffusivity. The ideal case sets it to zero.

Two coupled divergence-free fields

B=(ψy,−ψx),v=(ϕy,−ϕx)\mathbf B=(\psi_y,-\psi_x),\qquad\mathbf v=(\phi_y,-\phi_x)

The magnetic potential and the streamfunction supply the field and velocity in the same periodic plane.

The closed unforced energy sum

EB+EK+QΩ+Qν=E0E_B+E_K+Q_\Omega+Q_\nu=E_0

The initial energy moves between magnetic and kinetic forms and accumulates in the two heat reservoirs. These normalized reservoirs do not determine a temperature.

Both magnetic nulls can diffuse

ddt[ψ(O)−ψ(X)]=Ez(X)−Ez(O)\frac{d}{dt}[\psi(O)-\psi(X)]=E_z(X)-E_z(O)

A closed periodic island also diffuses at its O point. The difference needs both local electric fields.

Common difficulties

Field lines as objects

Typical misconceptionA drawn magnetic line is a thread made of particles.

Better mental modelThe line is a contour describing the instantaneous field. A fluid element follows the velocity, which is a different vector field.

Energy as the only numerical test

Typical misconceptionAn almost perfect energy sum proves that reconnection is resolved.

Better mental modelA retained low-grid ideal example conserves global quantities while changing flux at magnetic nulls incorrectly. Local induction and a finer grid must also agree.

Heat as brightness

Typical misconceptionThe dissipated-energy curve is the light curve of a solar flare.

Better mental modelCalculating emitted X-rays also needs density, thermodynamics, conduction, radiation and instrument response. The GOES tutorial analyzes measured band irradiance separately.

Run the experiment

  1. 01

    Find the outflow

    Watch the default state, then drag the gold probe across the bright current layer.

    What to observe: The green arrows and probe values trace the calculated fluid velocity. The gold curve is the magnetic contour through the probe.
  2. 02

    Remove irreversible heating

    Choose Ideal flow and inspect the two energy curves.

    What to observe: Magnetic and fluid energy exchange while the dissipative reservoirs remain zero over the tested short interval.
  3. 03

    Change the actual transport process

    Compare Diffusion and Viscosity, returning to the same saved time in the advanced group.

    What to observe: Diffusion acts on the magnetic field. Viscosity damps the fluid. Their different energy curves follow different solutions.
  4. 04

    Check a saved state

    Save JSON and the history CSV. Compare the selected time, field map, probe and energy values.

    What to observe: They retain the same case and numerical state; normalized values need a specified physical length, field and density before solar units can be assigned.

Related experiments and articles

What this page links to directly

See every article series on the content map →

Continue exploring

Magnetic fields, disks and jets

What do magnetic fields do in disks, jets and hot plasma, and what light do we see from them?

  1. LabAlfvén WavesPluck the field line, then strengthen the field and watch the two waves travel faster.
  2. You are hereMagnetic ReconnectionDrag the probe through the current layer and follow magnetic energy turning into flow and heat.
  3. LabMagnetorotational Instability and Angular Momentum TransportChange the magnetic coupling and disk shear, and see whether the channel grows or oscillates.
  4. LabBlack Hole Light LabChange the gas supply and viewing inclination, then compare the disk’s brightness and spectrum.
  5. LabRelativistic Jets and Apparent Superluminal MotionDrag the viewing direction and compare the apparent speed and brightness of the two jet knots.
  6. LabAGN Bubbles and Pressure WavesTurn the jet axis toward you and compare the dark cavities the outburst leaves in cluster gas.

From magnetic stress to reconnection · Reading path

From magnetic stress to reconnection

Articles on this path that use this experiment, followed by the other experiments they suggest.

  1. ArticleWhere a solar flare finds its energy
  2. ArticleWhen magnetic flux follows the fluid
  3. ArticleHow a thin current sheet sets the pace
  4. ArticleFollow energy through a reconnection calculation
  5. ArticleRecompute a flare from one GOES file
  6. ArticleCheck a Sweet–Parker current sheet against the grid
  7. ArticleWhere the fluid picture of reconnection runs out
Something broken, confusing, or missing on this page?Tell us
What kind of feedback?

Sent with this page’s address, its Lab ID, the site language and your device type. Please leave out personal details. Feedback is kept for up to 12 months.Privacy policy