Expand description
§Convergence and analytics
This page collects the quantitative evidence in one place: every measured order of convergence next to the order the scheme is designed for, the conservation and equality checks, and the exact solutions that supply the reference values. The method is on the verification page, and each case is on its geometry page.
§Observed orders of convergence
“Expected” is the design order of the scheme in that norm on that problem. Pairwise orders are between successive resolutions, as defined in Verification method; “fit” is the least-squares slope.
§Smooth solutions
| Problem | Scheme | Norm | Expected | Measured | Page |
|---|---|---|---|---|---|
Advection, $\sin2\pi x$, 128 to 2048 cells | upwind, forward Euler | $L_1$ | 1 | 0.988 (fit) | 1D |
| Lax-Wendroff | $L_1$, $L_2$, $L_\infty$ | 2 | 2.000 (fit), all three | ||
| MUSCL van Leer, SSP-RK3 | $L_1$ | 2 | 2.032 (fit) | ||
| MUSCL van Leer, SSP-RK3 | $L_2$, $L_\infty$ | below 2 (limiter clips extrema) | 1.756, 1.392 (fit) | ||
Burgers, $\sin2\pi x$, $t=0.1$, 100 to 800 cells | MUSCL, SSP-RK3, Godunov | $L_1$ | 2 | 1.99, 2.02, 2.07 | 1D |
| MUSCL, SSP-RK3, Godunov | $L_2$ | below 2 | 1.75, 1.76, 1.76 | ||
| first order, forward Euler | $L_1$ | 1 | 0.94, 0.96, 0.98 | ||
| Euler density wave, 100 to 800 cells | MUSCL, SSP-RK3, HLLC | $L_1$ | 2 | 2.02, 2.03, 2.04 | 1D |
| first order, forward Euler | $L_1$ | 1 | 0.94, 0.97, 0.99 | ||
| Water shock tube (stiffened gas) against its exact solution, 100 to 800 cells | MUSCL, SSP-RK2, HLLC | $L_1$ density; pressure | about 1 (discontinuities) | 0.84; 0.99 (fit) | 1D |
| Copper impact (Mie-Gruneisen) against the shock-speed relation, 100 to 800 cells | MUSCL, SSP-RK2, HLLC | $L_1$ density; pressure | about 1 (discontinuities) | 1.01; 1.03 (fit) | 1D |
| Isentropic vortex, 32 to 64 cells | MUSCL, SSP-RK3, HLLC | mean abs. error | 2 | 2.11 | 2D |
| Diagonal advection, 2D | upwind; MUSCL; Lax-Wendroff with Strang splitting | 1; 2; 2 | asserted by the tests within the tolerance in each | 2D | |
| Cylindrical sound wave, 100 to 800 cells | MUSCL, SSP-RK3, HLLC | $L_1$ | 2 | 1.97, 1.97, 2.06 (fit 2.00) | cylindrical |
| Spherical sound wave, 50 to 400 cells | MUSCL, SSP-RK3, HLLC | $L_1$ | 2 | 1.72, 1.67, 1.88 | spherical |
| Spherical sound wave through Python | MUSCL | $L_1$ | 2 | 1.67, 1.88, 2.03 (fit 1.86) | |
| Solid-body rotation (exact steady state), 32 to 256 cells | MUSCL, SSP-RK3, HLLC | radial momentum, $L_1$ | 2 | 3.33, 3.09, 2.86 (faster than design: the profiles are quadratic) | cylindrical |
| first order | radial momentum, $L_1$ | 1 | 1.48, 1.03, 0.97 | ||
| Spherical sound wave, 200 to 1600 cells | first order | $L_1$ | 1 | 0.70, 0.82, 0.90 (tending to 1) | |
| Level-set derivative of a smooth function, semi-discrete | WENO5; Upwind5; Upwind11; first-order upwind | 5; 5; 11; 1 | 5.00 (1D and 2D); 5.00; 10.9; 1.00 | high order | |
| Reversing vortex, 64 to 128 cells | WENO5; Upwind5; Upwind11 | shape | 5 (design) | 4.5; 4.6; 5.2 | high order |
| Gradient of a reinitialised circle, 32 to 128 cells | fast sweeping | $\lvert\nabla\phi\rvert-1$ | 1 | 1.25 | high order |
| A bubble carried by a uniform flow (two gases), 24 to 96 cells | coupled solver, MUSCL, WENO5, SSP-RK3 | $L_\infty$ of $\phi$ | at least 2.5 (required) | 4.99, 5.00 | coupled materials |
| Coupling of the flow and the interface in time (a pressure wave moving the interface), Courant 0.4 to 0.05 | coupled solver, SSP-RK3 | $L_\infty$ of $\phi$ against a step 64 times smaller | 3 | 2.91 (fit) | coupled materials |
| Extension of the state along the normal round a circle, 48 to 192 cells | first-order upwind, layer by layer | largest error in the band | 1 | 0.62, 0.90 (tending to 1) | coupled materials |

Representative smooth cases, each series divided by its own coarsest error, on logarithmic axes. The slopes are the observed orders.
The sound-wave orders rise towards 2 as the grid is refined: the coarsest grids are not yet in the asymptotic range. That is why the harness requires the finest pair, not only the fit, to be within tolerance.
§Problems with shocks
With a shock in the domain no scheme is better than first order in $L_1$, so the quantity checked is a position or a plateau, and the order is
reported for information.
| Problem | Reference | Result | Page |
|---|---|---|---|
| Burgers shock | Rankine-Hugoniot position 0.5 | 0.50001 | 1D |
Burgers sine, shock at $t=0.4$ | characteristic equation, 0.847576 | 0.847570 | 1D |
Sod plateau $p_*$, $u_*$ | 0.30313, 0.927453 | 0.30313, 0.92746 | 1D |
Toro test 3 plateau $p_*$, $u_*$ | 460.894, 19.5975 | 460.93, 19.5955 | 1D |
Toro test 4 plateau $p_*$, $u_*$ | 1691.647, 8.68977 | 1691.06 (mean), 8.687 | |
| Noh, cylinder, shock position | 0.2 | 0.19875 | cylindrical |
| Noh, sphere, shock position | 0.2 | 0.19875 | spherical |
| Noh, post-shock density (cylinder, sphere) | 16, 64 | 15.93, 63.12 | |
Noh $L_1$ order (cylinder 100 to 200 then 200 to 400; sphere) | about 1 | 1.85, 0.62; 0.94, 0.93 | |
| Sedov blast, cylinder, shock radius | 0.71310 | 0.71375 | cylindrical |
| Sedov blast, sphere, shock radius | 0.69096 | 0.69375 | spherical |
Sedov $L_1$ density error at 800 cells (cylinder; sphere), a bound, not an order | below 5e-3 | 2.54e-3; 2.59e-3 | |
Sedov $L_1$ order, fit over 100 to 800 cells (cylinder; sphere) | at most about 1 (finite-size ball) | 0.79; 0.78 | |
| Blast against a fine run, finest pair (cylinder; sphere) | about 1 | 1.08; 1.09 | cylindrical, spherical |
| Planar shock in 2D | Rankine-Hugoniot position | within 0.05 cell | 2D |
§Conservation
Relative drift of the integrated quantity from the first to the last snapshot; closed or periodic domains.
| Problem | Mass | Energy | Page |
|---|---|---|---|
| Advection upwind / Lax-Wendroff / MUSCL, 1000 cells | 2.7e-15 / 1.1e-15 / 7.7e-14 | 1D | |
| Sod, open ends (mass, energy) | 2.0e-16 | 1.6e-16 | |
| Stationary contact | 0 | 0 | |
| Isentropic vortex, one full period | 9e-14 (also both momenta) | 9e-14 | 2D |
| 3D blast, 8 blocks | 1.1e-15 | 1.5e-15 | 3D |
| 3D blast, 64 blocks, 8 threads | 4.4e-16 | 0 | |
| Spherical blast | 1.1e-13 | 2.4e-13 | spherical |
| Cylindrical blast | 9.5e-14 | 1.5e-13 | cylindrical |
| Axisymmetric can | 0 | 0 | |
| Swirling ring in a closed can, unsplit (angular momentum 0) | 0 | 1.8e-16 | cylindrical |
| Swirling ring in a closed can, Strang (angular momentum 0) | 0 | 0 |
With open ends the quantity changes by exactly the time integral of the boundary flux, and that is what is tested (the Sod momentum gain of 0.225, the Burgers integral gain of 0.2).
§Exact and independent solutions
| Solution | What it is | Where | Verified by |
|---|---|---|---|
| Linear advection | translation of the initial data | $u_0(x-at)$ | closed form |
| Burgers, shock and fan | Rankine-Hugoniot speed; the fan $(x-x_0)/t$ | src/pymerlin/exact_solutions/burgers.py (riemann); tests/common/burgers_exact.rs | equations/burgers_reference.rs (8 tests: speed, linear fan, integrates to the boundary flux, odd transonic fan, zero-time limit) |
| Burgers, smooth | method of characteristics, $x=\xi+tu_0(\xi)$ | burgers.py (sine) | equations/burgers_reference.rs: the characteristic relation, periodicity, the mean |
| Euler, Riemann problem | exact star pressure, velocity and the sampled solution | src/pymerlin/exact_solutions/euler.py; Rust ExactRiemann | Toro’s Tables 4.1 and 4.2; conservation of the sampled solution; mirror symmetry; continuity across the contact |
| Isentropic vortex | exact advected vortex | tests/equations/euler2d.rs | the second-order convergence itself; carried without changing the totals |
| Sound wave, sphere | $f(r-ct)/r$ potential | src/pymerlin/exact_solutions/acoustic.py; tests/geometry/acoustic.rs | the wave-equation residual; initial data of the shipped files |
| Sound wave, cylinder | Hankel transform of the initial pulse, with Bessel functions from their integral form | acoustic.py | the same checks, pymerlin check --self-test acoustic (7 checks) |
| Noh’s implosion | exact density, velocity and pressure | tests/geometry/noh.rs | the plateau and the shock position |
| Sedov-Taylor blast, cylinder and sphere | the similarity solution, integrated numerically from the shock to the centre; $\alpha$ from the energy | src/pymerlin/exact_solutions/sedov.py | pymerlin check --self-test sedov (17 checks): $\alpha=0.851$ for the sphere with $\gamma=1.4$, the swept-up mass for three geometries and three $\gamma$, the three equations by finite differences, the shock jump |
| Solid-body rotation | $w=\Omega r$ with the balancing pressure, constant density | tests/geometry/swirl.rs | the error falling faster than second order; without the centrifugal term it would not fall |
The Python solutions are separate from the Rust code on purpose, so that a mistake in one is not repeated in the other. The checks outside cargo test
(pymerlin check --self-test euler, --self-test schlieren, --self-test acoustic, --self-test sedov, pymerlin convergence for the two sound waves and the two Sedov blasts,
pymerlin check for HDF5 against CSV, and the thread-scaling check) run in continuous integration.
§Equality checks
| Compared | Result | Page |
|---|---|---|
| 1, 2, 3, 4, 6, 8 threads, 200 by 200 gas problem | 0 differing values | 3D |
| Convergence studies on any thread count | identical errors and fitted order (2.1104) | |
| File run against library run | bit for bit | 1D |
| HDF5 against CSV | bit-identical | 1D |
2D without $z$ dependence against the 1D cylinder | bit for bit | cylindrical |
Gas with swirl and $w=0$ against the gas without swirl | bit for bit | cylindrical |
| 1D embedded in 2D against the 1D tube | bit for bit | 2D |