Appearance
Viscous waves
| ID | Group | Milestone | Backends | Figure | Regression |
|---|---|---|---|---|---|
| VV-1, VV-2 | Dissipative terms (M4) | M4 (#65) | CPU, FNL | yes | shear-viscous |
Case and scope
A small sine wave on a gas at rest is one Fourier mode of the linearised compressible Navier–Stokes equations. The oracle (viscous/waves.py) integrates that mode exactly,
- VV-1, the shear wave: the transverse velocity
; the error is measured on . It pins the order of the viscous flux. - VV-2, the right-running acoustic wave with a conductivity as well, so
and act together; the error is measured on .
What the case catches: a dissipative flux that is consistent and still wrong in its order (a missing correction term), its coefficient (a missing 4/3, a conductivity without
Models and numerics
| Item | Choice | Code |
|---|---|---|
| Equations | compressible Navier–Stokes, ideal gas, | models |
| Dissipative fluxes | dissipative_order = 4 (conservative fourth-order flux with the Shu–Osher correction) or 2 (compact central) | add_dissipative_fluxes, adam_flume_cpu_object.F90; add_dissipative_fluxes_o4, add_dissipative_fluxes_o2, adam_flume_cpu_dissipation_kernels.F90; compute_dissipative_flux, adam_flume_dissipation_library.F90; numerics |
| Inviscid fluxes | WENO5 (weno-u-5) flux splitting on characteristic variables (scheme_space = weno) | compute_residuals_weno, adam_flume_cpu_object.F90; numerics |
| Time | SSP Runge–Kutta, 5 stages, 4th order (runge-kutta-ssp-54), CFL 0.2, the diffusive limit included | adam_rk_object.F90; compute_lambda_max_dissipative, adam_flume_cpu_euler_kernels.F90 |
| Boundaries | periodic in extrapolation on the null | set_boundary_conditions, adam_flume_cpu_object.F90 |
| FNL backend | the same fluxes as device kernels | add_dissipative_fluxes_dev, adam_flume_fnl_object.F90; add_dissipative_fluxes_o4_dev, adam_flume_fnl_dissipation_kernels.F90 |
Initial and boundary conditions
| Item | Value |
|---|---|
| Domain | |
| Grid | quadtree, ngc = 3. A wave along an axis keeps the other in-plane axis: active and thin for the shear wave (4 blocks of 6 cells across it, because FLUME freezes the momentum normal to a null direction, which would freeze the shear), null (1 cell) for the acoustic wave |
| Ranks | 2 |
| Initial condition | sine-wave, |
| Boundaries | periodic on the extrapolation on the |
| Leg | Mode | Direction | dissipative_order | ||||
|---|---|---|---|---|---|---|---|
| VV-1 shear x | shear | 4 | 0.01, 0 | 32 / 64 / 128 | 0.5 | ||
| VV-1 shear y | shear | 4 | 0.01, 0 | 32 / 64 / 128 | 0.5 | ||
| VV-1 shear x, order 2 | shear | 2 | 0.01, 0 | 32 / 64 / 128 | 0.5 | ||
| VV-1 shear diagonal | shear | 45° (both directions active: the cross terms | 4 | 0.01, 0 | 24 / 48 / 96 | 0.1 | |
| VV-2 acoustic | acoustic, and its | 4 | 0.01, 0.02 | 32 / 64 / 128 | 0.5 |
A sound wave steepens at
Input files
| File | Role |
|---|---|
src/tests/flume/verification/viscous/waves.py | make writes each input; oracle integrates the linear mode exactly and judges the ladder |
src/tests/flume/verification/viscous/check.sh --legs vv1,vv2 | runs the ladders (--np N; FLUME_EXE selects the backend) |
src/tests/flume/regression/shear-viscous/input.ini | the frozen diagonal shear wave, |
make_doc_figures.py (fig_viscous, fig_viscous_fields, fig_viscous_ladders) | the figures, from the CPU (and, for the ladders, FNL) work directories of viscous/check.sh |
bash
cd src/tests/flume/verification/viscous && ./check.sh --legs vv1,vv2 # CPU
FLUME_EXE=$PWD/../../../../../exe/adam_flume_fnl ./check.sh --legs vv1,vv2 # FNLResults

Left: the Navier–Stokes ladders (VV-1 to VV-4), each normalised by its coarsest error, against the order-2 and order-4 slopes; middle: the Ohmic ladders (VV-5); right: Becker's shock (VV-4).

Absolute RMS errors of the VV-1 and VV-2 legs (left) and of the VV-5 legs (centre), CPU (filled, solid) and FNL (open, dotted), which coincide; right, the Ohmic decay: the measured amplitude of the mode over the exact one.

Top row: the diagonal shear wave on the uniform
Oracle: the observed order of the finest pair
| Leg | N | RMS error (CPU) | Order (CPU) | FNL |
|---|---|---|---|---|
| shear x, order 4 | 32 / 64 / 128 | +3.99, +4.00 | the same to the printed digits | |
| shear y, order 4 | 32 / 64 / 128 | identical to x, bit for bit | +3.99, +4.00 | the same |
| shear x, order 2 | 32 / 64 / 128 | +2.00, +2.00 | the same | |
| shear diagonal, order 4 | 24 / 48 / 96 | +5.86, +5.57 | the same | |
| acoustic, order 4 | 32 / 64 / 128 | +5.60, +6.28 |
Every leg passes on both backends (2 ranks). On FNL the numbers are the same to the printed digits except where the round-off of the run itself shows: the acoustic odd part, whose
Related cases: the same oracle drives Ohmic decay and the Alfvén wave; the diagonal waves cross 2:1 seams in VV-7 and VV-8; the run-by-run backend comparison is in CPU and FNL agree.
Findings
- The measured decay rate of the shear wave is
to relative at 128 cells. - The diagonal wave converges faster than its design order: on the diagonal the leading truncation errors of the
and fluxes appear to cancel. - On the acoustic wave the error is dominated by the inviscid WENO part, not by the viscous one. VV-2 therefore checks that
and enter with the right coefficients (the measured amplitude equals the exact one to relative), and VV-1 pins the order of the dissipative flux. - The measured acoustic rate,
, differs by 4% from the first-order Kirchhoff–Stokes rate : here , and the exact linear oracle carries that correction. - #85 lists absolute shear and acoustic ladders (RMS error against
with reference slopes) as a figure still to extend fig_viscouswith; the published figure shows the ladders normalised by their coarsest error.