Skip to content

Isentropic vortex: order of accuracy ​

IDGroupMilestoneBackendsFigureRegression
V2, RV-2EulerM1 (#35), M3 (#47)CPU (all schemes), FNL (weno, weno-riemann LLF and HLLC)yesvortex-periodic

Case and scope ​

An exact smooth solution of the Euler equations: an isentropic vortex (Shu 1998, ICASE 97-65, §5.1) convected diagonally by the free stream through a doubly periodic box. Every run is compared cell by cell with the exact solution, and the observed order between successive resolutions, p=log2⁡(EN/E2N), must reach the design order.

What the case catches: a loss of design order on smooth flows, which Sod cannot see (WENO is first order at discontinuities):

  • a wrong stencil weight or reconstruction table;
  • a wrong ghost fill across periodic block faces, across blocks and across ranks;
  • a first-order boundary treatment.

Models and numerics ​

ItemChoiceCode
Equationscompressible Euler, ideal gas, γ=1.4models
Space, wenoWENO5 (weno-u-5) flux splitting on characteristic variablescompute_residuals_weno, adam_flume_cpu_object.F90; compute_face_split_fluxes, adam_flume_euler_library.F90
Space, weno-riemann (RV-2)WENO5 interpolation (characteristic), LLF, HLL or HLLC, the 6th-order flux correction with the WENO-weight sensorcompute_residuals_riemann, adam_flume_cpu_object.F90; initialize_interpolation, adam_weno_object.F90
TimeSSP Runge–Kutta, 5 stages, 4th order (runge-kutta-ssp-54), CFL 0.1 (small, so the space error dominates the time error)adam_rk_object.F90
Initial conditionthe isentropic-vortex kindisentropic_vortex, adam_flume_ic_object.F90
Boundarieslibrary periodicity in x and y (across blocks and ranks)update_ghost, adam_flume_cpu_object.F90; boundary conditions
FNL backendthe same kernels on the deviceadam_flume_fnl_object.F90

Initial and boundary conditions ​

ItemValue
Domain[0,1]2, z null
Gridquadtree (ratio = 4, nk = 1), 16 blocks (4 per side) of 162, 322, 642 cells: 642, 1282, 2562 cells, ngc = 3
Ranks2 (8/8 blocks)
Free stream(ρ,u,v,w,p)=(1,1,1,0,1)
Vortexcentre (0.5,0.5), radius 0.07 (tails e−25 at the box edge), strength 5
Initial conditionisentropic-vortex
Boundariesperiodic on x and y; extrapolation on the null z faces
Final timet=0.1 (the vortex centre moves by (0.1,0.1))

Input files ​

FileRole
src/tests/flume/verification/vortex/vortex-n{064,128,256}.inithe ladder
src/tests/flume/verification/vortex/check.shV2: runs the ladder (--np N, --legs v2; FLUME_EXE selects the backend), order bound 4.5
src/tests/flume/verification/vortex/vortex_oracle.pythe exact density, L1 and L∞ errors, the finest-pair order, the null-z copies identical
src/tests/flume/verification/riemann-flux/check.sh --legs vortexRV-2: the ladder on weno-riemann, order bound 4.8
src/tests/flume/verification/make_doc_figures.py (fig_vortex)the figure, from the work directories of the two scripts
bash
cd src/tests/flume/verification/vortex && ./check.sh                    # V2, CPU
FLUME_EXE=$PWD/../../../../../exe/adam_flume_fnl ./check.sh             # V2, FNL
cd ../riemann-flux && ./check.sh --legs vortex --solver hllc            # RV-2 (also llf, hll)

Results ​

Isentropic vortex

Left: density at t=0.1, 1282 cells, weno-riemann HLLC. Right: L1(ρ) against the cells per side for the four schemes, with the order-5 slope.

SchemeBound (finest-pair order)L1(ρ), 2562Order 128 → 256FNL
weno (split)4.5 (V2)8.38⋅10−85.79the same
weno-riemann LLF4.8 (RV-2)1.42⋅10−75.64the same
weno-riemann HLL4.8 (RV-2)8.98⋅10−86.26not run
weno-riemann HLLC4.8 (RV-2)8.04⋅10−86.49the same

The full ladders on the CPU:

SchemeL1(ρ), 642 / 1282 / 2562
weno (split)8.218⋅10−5 / 4.621⋅10−6 / 8.379⋅10−8
weno-riemann LLF, WENO-weight sensor1.182⋅10−4 / 7.073⋅10−6 / 1.415⋅10−7
weno-riemann LLF, sensor none9.113⋅10−5 / 4.748⋅10−6 / 1.415⋅10−7

Related cases: Sod checks the same schemes at discontinuities; the MHD orders are in Order of accuracy.

Findings ​

  • The order is asserted on the finest pair only. From 642 to 1282 it is lower (4.15 for the splitting scheme): at 642 the vortex radius spans 4.5 cells and the WENO weights are still far from the linear ones.
  • At 2562 the WENO-weight sensor of weno-riemann is inactive (the same digits with and without it); at 1282 it trips at the vortex extrema and costs a factor 1.5. The library weights use the exponent of S=3, the NumPy prototype 2.
  • LLF is 1.7× more dissipative than the splitting scheme on the vortex; HLL and HLLC close the gap, and HLLC is the most accurate of the four.
  • The quadtree layout is bitwise identical to the octree one with a null z axis, and 16 times cheaper.
  • The earlier verification page and the figure's panel title called the run "one period"; the input runs to t=0.1, one tenth of the period of the diagonal convection through the unit box (the title is corrected since #85 R1).