Appearance
Ohmic decay and the visco-resistive Alfvén wave
| ID | Group | Milestone | Backends | Figure | Regression |
|---|---|---|---|---|---|
| VV-5 | Dissipative terms (M4) | M4 (#65) | CPU, FNL | yes | alfven-resistive |
Case and scope
A transverse field viscous/waves.py) integrates the
What the case catches. The Ohmic flux has its own kernels, a curl form whose cross terms an axis-aligned wave never reads, and a sign that the plan in #65 printed wrong (an anti-diffusion; see numerics). Each defect is a number the exact linear mode pins:
- a sign error grows the field;
- a missing cross term changes the diagonal rate;
- a coefficient error changes every rate;
- a wrong temperature on MHD (a wrong slot, or a wrong
read from the MHD auxiliary state by the viscous and heat fluxes) shows on the acoustic leg on MHD and nowhere else: the constant laws of the Alfvén leg never read .
Models and numerics
| Item | Choice | Code |
|---|---|---|
| Equations | ideal MHD (mhd-ideal), | models |
| Divergence control | none (mhd-none) on the Ohmic and acoustic legs; GLM, mhd-glm) on the Alfvén leg | GLM; adam_flume_cpu_mhd_glm_kernels.F90 |
| Ohmic flux | curl form, dissipative_order 4 or 2 | add_resistive_fluxes_o4, add_resistive_fluxes_o2, adam_flume_cpu_dissipation_kernels.F90; compute_resistive_flux, adam_flume_dissipation_library.F90; numerics |
| Viscous and heat fluxes | as in VV-1, the temperature from the MHD auxiliary state | add_dissipative_fluxes_o4, adam_flume_cpu_dissipation_kernels.F90 |
| Inviscid fluxes | WENO5 flux splitting, characteristic variables | compute_residuals_weno, adam_flume_cpu_object.F90 |
| Time | runge-kutta-ssp-54, CFL 0.2 | adam_rk_object.F90 |
| FNL backend | the same fluxes as device kernels | add_resistive_fluxes_o4_dev, adam_flume_fnl_dissipation_kernels.F90 |
Initial and boundary conditions
| Item | Value |
|---|---|
| Domain | |
| Grid | quadtree, |
| Ranks | 2 |
| Initial condition | sine-wave in its magnetic mode (acoustic mode, |
| Boundaries | periodic on the extrapolation on the |
| Leg | Model | Direction | dissipative_order | Coefficients | |||
|---|---|---|---|---|---|---|---|
| Ohmic x | mhd-none | 4 and 2 | 0 | 32 / 64 / 128 | 0.5 | ||
| Ohmic diagonal | mhd-none | 45° (the cross terms | 4 | 0 | 24 / 48 / 96 | 0.1 | |
| Alfvén x | mhd-glm | 4 | 32 / 64 / 128 | 0.5 | |||
| acoustic on MHD | mhd-none | 4 | 0 | 32 / 64 / 128 | 0.5 |
The rates the oracle holds: Ohmic
Input files
| File | Role |
|---|---|
src/tests/flume/verification/viscous/waves.py | make --mode magnetic writes each input; oracle integrates the linear |
src/tests/flume/verification/viscous/check.sh --legs vv5 | runs the five ladders (--np N; FLUME_EXE selects the backend) |
src/tests/flume/regression/alfven-resistive/input.ini | the frozen visco-resistive Alfvén wave at 45°, MHD-GLM, |
make_doc_figures.py (fig_viscous, fig_viscous_ladders) | the figures, from the CPU and FNL work directories of viscous/check.sh |
bash
cd src/tests/flume/verification/viscous && ./check.sh --legs vv5 # CPU
FLUME_EXE=$PWD/../../../../../exe/adam_flume_fnl ./check.sh --legs vv5 # FNLResults

Middle panel: the five VV-5 ladders, each normalised by its coarsest error, against the order-2 and order-4 slopes.

Centre: the VV-5 ladders as absolute RMS errors, CPU (filled, solid) and FNL (open, dotted), which coincide. Right: the decay against the exact rate,
Oracle: as VV-1, the observed order of the finest pair
| Leg | N | RMS error (CPU) | Order (CPU) | FNL |
|---|---|---|---|---|
| Ohmic x, order 4 | 32 / 64 / 128 | +3.99, +4.00 | the same | |
| Ohmic x, order 2 | 32 / 64 / 128 | +2.00, +2.00 | the same | |
| Ohmic diagonal, order 4 | 24 / 48 / 96 | +3.99, +4.00 | the same | |
| Alfvén x, order 4 | 32 / 64 / 128 | +5.85, +5.66 | the same | |
| acoustic on MHD, order 4 | 32 / 64 / 128 | +5.60, +6.27 |
CPU and FNL on 2 ranks, identical to the printed digits except the round-off of the acoustic leg's odd part.
| Quantity | Measured | Reference |
|---|---|---|
| Ohmic decay | ||
| Alfvén damping | ||
| acoustic amplitude on MHD, 32 cells (CPU) | VV-2 on Euler, CPU: |
Related cases: the same oracle on Euler is VV-1 and VV-2; the energy budget and the divergence of the same resistive flux with GLM and EGLM are in VV-6; the diagonal Ohmic wave crosses 2:1 seams in VV-8.
Findings
- The measured Ohmic rate is the derived one: the sign printed in the #65 plan was wrong, the code's is right.
- Along
the Ohmic decay of is the same equation as the shear wave's in VV-1, and its errors are the VV-1 errors scaled by the amplitude, to three digits: two kernels, one stencil. - The Alfvén wave's error is dominated by the inviscid WENO part, as on the acoustic wave, hence the order above four.
- The acoustic wave on MHD reproduces VV-2 on Euler: the measured amplitude agrees to ten digits at 32 cells; the RMS errors agree to three, the inviscid parts of the two models being different kernels.
- The diagonal runs without divergence control. With GLM or EGLM the same ladder measured +7.65 then +1.72, and +3.32 from 96 to 192 cells. The cause is the ideal scheme: run with
, where the exact field is static, GLM's upwinding ( ) damps it at fifth order ( at 48 cells, at 96), with the opposite sign to the Ohmic error and as large, so the two cancel near 48 cells and a 24/48/96 ladder is not asymptotic. Without divergence control the field stays at round-off. A smaller time step (CFL 0.05) changed no printed digit, so neither error is temporal. GLM and EGLM with resistivity are covered by VV-6. - The magnetic amplitude is
: the wave's magnetic pressure drives an flow that advects it at , odd in (no twin cancels it), relative here. - #85 asks for the decay against the exact rate as a figure; the published figure shows the error ladders only.