Expand description
§Choosing a scheme
The validation pages measure each option; this page reads them as advice. Every statement links to the case that shows it. Nothing here is a default of the code: it is what the evidence supports.
§At a glance
| You want | Use | Because |
|---|---|---|
| A robust scheme for gas flow with shocks | muscl with van_leer, hllc, SSP-RK3 | Positive and finite on all five of Toro’s tests; second order in $L_1$ on smooth data (1D) |
| More accuracy on shocks and smooth flow together | weno5, primitive variables | Beats MUSCL on four of Toro’s five tests and on Shu and Osher’s; survives test 5 at Courant number 0.3 or less (high order) |
| The smallest error on smooth flow with weak shocks | upwind5 or upwind11 | About twice as accurate as weno5 on Shu and Osher’s problem; but they oscillate at strong shocks and fail on every strong problem |
| A moving interface | weno5 or upwind11 | First-order upwind loses 99.4% of Zalesak’s disk in one turn (high order) |
| A cylindrical or spherical gas | first_order or muscl | The stencil-rule schemes and Lax-Wendroff are refused there (limitations) |
§Flux scheme and order in higher dimensions
The linear rules and Weno5 reach their design order in one dimension. In two and three the unsplit finite-volume operator
uses the face-centre value as the face average, so they are second order there whatever the rule; the level set keeps its
order in every dimension because it works on point values (methods). Pay for a wide stencil
in 2D and 3D only for its smaller error, not for a higher order.
§Riemann flux
hllcfor a gas: it keeps an isolated contact exactly and is robust (1D).hllis as robust but smears a contact over 43 cells where HLLC has none (limitations). The difference is small once MUSCL sharpens the contact (Sod: 1.65e-3 against 1.73e-3).exactsolves the Riemann problem exactly at every face: the reference the approximate fluxes are judged against.local_lax_friedrichsworks for any equation and is diffusive: it smears a shock more than Godunov’s flux does.godunovandengquist_osherare the scalar choices;roe_no_fixis kept to show an expansion shock and should not be used (limitations).
§Variables of the reconstruction
| Variables | Pick when | Evidence |
|---|---|---|
| primitive | the default for weno5 on strong problems | survives tests 1 to 4, and test 5 at Courant number 0.3 or less |
| characteristic | the smooth part dominates | 12% to 24% better on Shu and Osher’s problem; fails near vacuum (test 2); costs 1.8 times the time of the conserved variables |
| conserved | a linear rule | for a linear rule all three give the same answer to round-off, and conserved is cheapest; for weno5 it wins no case |
§Time integrator and Courant number
- SSP-RK3 is the integrator for everything above first order; the linear rules require it (or better) and a Courant number below their limit, 1.43 for fifth order and 1.04 for eleventh (stability limits).
- SSP-RK2 is enough for MUSCL, with a Courant number of at most one half.
- Forward Euler only with the first-order scheme.
§Dimensions and splitting
Unsplit treats the axes alike and is exactly symmetric under swapping them. Strang needs only the per-axis Courant limit and adds a splitting error, which is small on configuration 3 (mean density agrees to 1e-7). Lax-Wendroff needs Strang in 2D (2D).
§Reinitialising a level set
Do not, unless something needs a distance function (normals, curvature). The pseudo-time method is accurate near the interface but confined to its band and about 85 times dearer; fast sweeping is cheap and global but first order and runs on one thread. Both round the thin features they cannot resolve (comparison).