Gyredocs
Depth Practice
API

Gyre/Verification

Order of accuracy

In one minuteConvergence studies with exact solutions. The design rate p + 1 is required where it is established (the advected density wave, steady manufactured solutions on Cartesian meshes, heat conduction, convection-dominated flow); elsewhere the guaranteed rate p is required and the observed rate is reported.

Written at L2 Practice goes to L4 Theory 2875 words Markdown

Advected density wave#

PassedAdvected density wave4 of 4 checks passed · 40.98 s · quick suite

A smooth density wave carried by a uniform flow is an exact solution of the Euler equations. It isolates the convective operator and the explicit time integrator. The density is advected linearly, so the design order p + 1 of the split-form DGSEM with a Roe interface flux is what the checks require.

  • p = 1: observed order (finest pair)1.926expected >= 1.80 (design rate p + 1 = 2, tolerance 0.2)pass
  • p = 2: observed order (finest pair)2.994expected >= 2.80 (design rate p + 1 = 3, tolerance 0.2)pass
  • p = 3: observed order (finest pair)3.998expected >= 3.80 (design rate p + 1 = 4, tolerance 0.2)pass
  • p = 4: observed order (finest pair)5.011expected >= 4.80 (design rate p + 1 = 5, tolerance 0.2)pass

Run notes Observed order minus the design rate p + 1 on the finest mesh pair, over all degrees: -0.07 to +0.01.

gyre 0.4.0 · 39979fcf90 · · gpu · NVIDIA GeForce RTX 3060 Ti · quick suite · record (JSON)Same code as this build

Density error after convectionAdvected density wave
Data table
hp = 1p = 2p = 3p = 4
0.1250.02445110.001255255.2276e-052.0736e-06
0.06250.007168471.6201e-043.4487e-066.8806e-08
0.031250.001886122.0333e-052.1592e-072.1334e-09

gyre 0.4.0 · 39979fcf90 · · gpu · NVIDIA GeForce RTX 3060 Ti · quick suite · record (JSON)Same code as this build

A density wave carried by a uniform flow exercises the convective operator, the interface flux and the time integrator in a setting where the exact solution is known. The study requires the design order p+1p+1 (tolerance 0.2) for every degree tested.

Errors and observed ordersAdvected density wave
pNL2 errororder
180.0244511—
1160.007168471.77016
1320.001886121.92624
280.00125525—
2161.6201e-042.95377
2322.0333e-052.99425
385.2276e-05—
3163.4487e-063.92201
3322.1592e-073.99753
482.0736e-06—
4166.8806e-084.91346
4322.1334e-095.01128

gyre 0.4.0 · 39979fcf90 · · gpu · NVIDIA GeForce RTX 3060 Ti · quick suite · record (JSON)Same code as this build

Isentropic vortex#

PassedIsentropic vortex convection10 of 10 checks passed · 65.18 s · quick suite

A strong isentropic vortex convected through a periodic domain for one time unit, on Cartesian meshes and on meshes warped by 4 % of the domain size (degree-4 geometry). The order checks require the rate p that consistency guarantees, not the design rate p + 1, which is not established for this strongly nonlinear unsteady problem. One case is repeated with a five-fold smaller time step to test whether the measured error is spatial, and the error on curved meshes is required to stay within a factor 1.5 of the Cartesian one.

  • p = 2, Cartesian: observed order (finest pair)2.596expected >= 1.80 (guaranteed rate p = 2, tolerance 0.2; design rate 3)pass
  • p = 3, Cartesian: observed order (finest pair)3.486expected >= 2.80 (guaranteed rate p = 3, tolerance 0.2; design rate 4)pass
  • p = 4, Cartesian: observed order (finest pair)4.051expected >= 3.80 (guaranteed rate p = 4, tolerance 0.2; design rate 5)pass
  • p = 2, curved: observed order (finest pair)2.628expected >= 1.80 (guaranteed rate p = 2, tolerance 0.2; design rate 3)pass
  • p = 2: curved / Cartesian error on the finest mesh1.006expected < 1.5pass
  • p = 3, curved: observed order (finest pair)3.525expected >= 2.80 (guaranteed rate p = 3, tolerance 0.2; design rate 4)pass
  • p = 3: curved / Cartesian error on the finest mesh0.9722expected < 1.5pass
  • p = 4, curved: observed order (finest pair)4.173expected >= 3.80 (guaranteed rate p = 4, tolerance 0.2; design rate 5)pass
  • p = 4: curved / Cartesian error on the finest mesh0.996expected < 1.5pass
  • time-step independence (p = 4, N = 16): relative change of the error for a 5x smaller step8.79e-08expected < 1e-3pass

Run notes Observed orders on the finest mesh pair: p = 2: 2.60 (Cartesian), 2.63 (curved); p = 3: 3.49 (Cartesian), 3.53 (curved); p = 4: 4.05 (Cartesian), 4.17 (curved). All of them lie between the guaranteed rate p and the design rate p + 1. Observed order minus the design rate: -0.95 to -0.37. A five-fold smaller time step changed the error of the p = 4, N = 16 case by a relative 8.8e-08: at that resolution the error is spatial, so time integration does not explain a rate below p + 1. Curved-to-Cartesian error ratio on the finest meshes: 0.97 to 1.01.

gyre 0.4.0 · 39979fcf90 · · gpu · NVIDIA GeForce RTX 3060 Ti · quick suite · record (JSON)Same code as this build

Density error at t = 1Isentropic vortex convection

Reference lines show the design rate p + 1.

Data table
serieshnormalised L2 error of density
p = 2, Cartesian10.00272098
p = 2, Cartesian0.54.6335e-04
p = 2, Cartesian0.257.6634e-05
p = 3, Cartesian14.8464e-04
p = 3, Cartesian0.54.3365e-05
p = 3, Cartesian0.253.8697e-06
p = 4, Cartesian20.00140628
p = 4, Cartesian17.4780e-05
p = 4, Cartesian0.54.5114e-06
p = 2, curved10.00278432
p = 2, curved0.54.7664e-04
p = 2, curved0.257.7106e-05
p = 3, curved15.0349e-04
p = 3, curved0.54.3313e-05
p = 3, curved0.253.7620e-06
p = 4, curved20.00151026
p = 4, curved18.1038e-05
p = 4, curved0.54.4933e-06

gyre 0.4.0 · 39979fcf90 · · gpu · NVIDIA GeForce RTX 3060 Ti · quick suite · record (JSON)Same code as this build

For this strongly nonlinear unsteady problem the design rate p+1p+1 is not established, so the order checks require the rate pp that consistency guarantees (tolerance 0.2). Reduced rates are a documented characteristic of Gauss–Lobatto collocation schemes for nonlinear problems. Two further checks: the error on curved meshes (4 % warp, degree-4 geometry) must stay within a factor 1.5 of the Cartesian one at each degree, and one case is repeated with a five-fold smaller time step. The orders that were observed, their distance from the design rate and the curved-to-Cartesian error ratios are stated in the run notes under the status above, which the study generates from its own numbers.

Errors and observed ordersIsentropic vortex convection
meshpNL2 errororder
Cartesian2160.00272098—
Cartesian2324.6335e-042.55397
Cartesian2647.6634e-052.59602
Cartesian3164.8464e-04—
Cartesian3324.3365e-053.48233
Cartesian3643.8697e-063.48624
Cartesian480.00140628—
Cartesian4167.4780e-054.23308
Cartesian4324.5114e-064.051
curved2160.00278432—
curved2324.7664e-042.54636
curved2647.7106e-052.62798
curved3165.0349e-04—
curved3324.3313e-053.5391
curved3643.7620e-063.52522
curved480.00151026—
curved4168.1038e-054.22005
curved4324.4933e-064.17275

gyre 0.4.0 · 39979fcf90 · · gpu · NVIDIA GeForce RTX 3060 Ti · quick suite · record (JSON)Same code as this build

A fourth-order time integrator at fixed CFL number has an error that falls like h4h^4, so a measured order near 4 at p=4p = 4 invites the explanation that time integration dominates. The study tests this directly: a p=4p = 4 case is repeated with a five-fold smaller time step, and the check requires the error to change by less than one part in a thousand. When it passes, the error at that resolution is spatial and time integration does not explain a rate below p+1p + 1; the run notes state which conclusion the numbers of the run support.

Manufactured solution: Euler#

PassedManufactured solution: Euler6 of 6 checks passed · 212.5 s · quick suite

A smooth trigonometric state is forced to be an exact steady solution by a source term generated with automatic differentiation of the physics kernels. Dirichlet data enter weakly through the interface Riemann flux. The nonlinear system is solved with the pseudo-transient Newton–Krylov solver, started from the nodal values of the exact solution, whose residual is the truncation error. The study therefore verifies the spatial operator and the boundary treatment, and that the implicit solver removes that residual; it does not test convergence from a distant initial state (see the solver-convergence study). Curved meshes are warped by 5 % with degree-4 geometry.

  • p = 1, Cartesian: observed order (finest pair)1.911expected >= 1.75 (design rate p + 1 = 2, tolerance 0.25)pass
  • p = 2, Cartesian: observed order (finest pair)2.969expected >= 2.75 (design rate p + 1 = 3, tolerance 0.25)pass
  • p = 3, Cartesian: observed order (finest pair)3.979expected >= 3.75 (design rate p + 1 = 4, tolerance 0.25)pass
  • p = 1, curved: observed order (finest pair)1.873expected >= 1.35 (empirical floor p + 0.35 for coarse warped meshes; guaranteed rate 1, design rate 2)pass
  • p = 2, curved: observed order (finest pair)2.597expected >= 2.35 (empirical floor p + 0.35 for coarse warped meshes; guaranteed rate 2, design rate 3)pass
  • p = 3, curved: observed order (finest pair)3.825expected >= 3.35 (empirical floor p + 0.35 for coarse warped meshes; guaranteed rate 3, design rate 4)pass

gyre 0.4.0 · 39979fcf90 · · gpu · NVIDIA GeForce RTX 3060 Ti · quick suite · record (JSON)Same code as this build

Error of the conserved stateManufactured solution: Euler

Observed order minus the design rate p + 1 on the finest mesh pair: Cartesian -0.09 to -0.02, curved -0.40 to -0.13. On the curved meshes the observed order increased with every refinement for every degree.

Data table
hp = 1, Cartesianp = 2, Cartesianp = 3, Cartesianp = 1, curvedp = 2, curvedp = 3, curved
0.250.07532560.004486361.8968e-040.08098660.007430040.00117036
0.1250.02097515.8940e-041.2419e-050.02289860.001268289.6953e-05
0.06250.005577847.5265e-057.8738e-070.006251392.0961e-046.8413e-06

gyre 0.4.0 · 39979fcf90 · · gpu · NVIDIA GeForce RTX 3060 Ti · quick suite · record (JSON)Same code as this build

A smooth trigonometric state with ±10 %\pm 10\,\% variations around a Mach 0.5 mean flow is made an exact steady solution by a source term. The source is generated by forward-mode automatic differentiation of the same flux kernels the solver uses (gyre.mms.manufactured_source), so no hand-derived expression can be wrong. Dirichlet data enter through the interface Riemann flux. The Newton iteration starts from the nodal values of the exact solution, whose residual is the truncation error, and is converged to 10−1110^{-11} of the residual of a uniform state; convergence from a distant state is the subject of the solver-convergence study.

Cartesian meshes are checked against the design rate p+1p + 1 (tolerance 0.25). On the curved meshes (5 % warp, degree-4 geometry) the check is p+0.35p + 0.35: an empirical regression floor between the guaranteed rate pp and the design rate, not a bound from theory. The chart note is generated from the run: the observed order minus the design rate, and whether the curved-mesh order rose under refinement.

Errors and observed ordersManufactured solution: Euler
meshpNL2 errororder
Cartesian140.0753256—
Cartesian180.02097511.84446
Cartesian1160.005577841.9109
Cartesian240.00448636—
Cartesian285.8940e-042.92824
Cartesian2167.5265e-052.96919
Cartesian341.8968e-04—
Cartesian381.2419e-053.93293
Cartesian3167.8738e-073.9794
curved140.0809866—
curved180.02289861.82242
curved1160.006251391.87301
curved240.00743004—
curved280.001268282.55049
curved2162.0961e-042.59713
curved340.00117036—
curved389.6953e-053.59353
curved3166.8413e-063.82494

gyre 0.4.0 · 39979fcf90 · · gpu · NVIDIA GeForce RTX 3060 Ti · quick suite · record (JSON)Same code as this build

Manufactured solutions: Navier–Stokes#

PassedManufactured solutions: Navier–Stokes14 of 14 checks passed · 1225 s · quick suite

Viscous manufactured solutions with Dirichlet walls, solved implicitly with p-multigrid from the nodal values of the exact solution (the solve removes the truncation-error residual). 4 regimes are separated: heat conduction (quiescent); diffusion dominated, Re = 10; diffusion dominated, no mean flow, Re = 10; convection dominated, Re = 1000. Orders are reported per primitive variable. Every regime must reach the rate p that consistency guarantees; heat conduction and convection-dominated flow, where the coupling between pressure and velocity is absent or hyperbolic, are also checked against the design rate p + 1. In the diffusion-dominated regimes, where only the rate p is required of the state, the velocity is held to an empirical floor of p + 0.4 between the meshes 8 → 16; the floor was measured on that pair and is not a property of the scheme, so it is applied to the same pair at every level.

  • heat conduction (quiescent), p = 2: state order3.601expected >= 1.75 (guaranteed rate p = 2, tolerance 0.25; design rate 3)pass
  • heat conduction (quiescent), p = 2: near-optimal state order3.601expected >= 2.60 (design rate p + 1 = 3, tolerance 0.4)pass
  • heat conduction (quiescent), p = 3: state order3.998expected >= 2.75 (guaranteed rate p = 3, tolerance 0.25; design rate 4)pass
  • heat conduction (quiescent), p = 3: near-optimal state order3.998expected >= 3.60 (design rate p + 1 = 4, tolerance 0.4)pass
  • diffusion dominated, Re = 10, p = 2: state order2.333expected >= 1.75 (guaranteed rate p = 2, tolerance 0.25; design rate 3)pass
  • diffusion dominated, Re = 10, p = 2: velocity order between the meshes 8 → 162.727expected >= 2.40 (empirical floor p + 0.4, measured on this mesh pair; guaranteed rate p = 2, design rate 3)pass
  • diffusion dominated, Re = 10, p = 3: state order3.794expected >= 2.75 (guaranteed rate p = 3, tolerance 0.25; design rate 4)pass
  • diffusion dominated, Re = 10, p = 3: velocity order between the meshes 8 → 164.194expected >= 3.40 (empirical floor p + 0.4, measured on this mesh pair; guaranteed rate p = 3, design rate 4)pass
  • diffusion dominated, no mean flow, Re = 10, p = 2: state order1.991expected >= 1.75 (guaranteed rate p = 2, tolerance 0.25; design rate 3)pass
  • diffusion dominated, no mean flow, Re = 10, p = 2: velocity order between the meshes 8 → 162.572expected >= 2.40 (empirical floor p + 0.4, measured on this mesh pair; guaranteed rate p = 2, design rate 3)pass
  • convection dominated, Re = 1000, p = 2: state order2.852expected >= 1.75 (guaranteed rate p = 2, tolerance 0.25; design rate 3)pass
  • convection dominated, Re = 1000, p = 2: near-optimal state order2.852expected >= 2.60 (design rate p + 1 = 3, tolerance 0.4)pass
  • convection dominated, Re = 1000, p = 3: state order3.919expected >= 2.75 (guaranteed rate p = 3, tolerance 0.25; design rate 4)pass
  • convection dominated, Re = 1000, p = 3: near-optimal state order3.919expected >= 3.60 (design rate p + 1 = 4, tolerance 0.4)pass

Run notes State orders on the finest mesh pair. Within 0.4 of the design rate p + 1: heat conduction (quiescent) (p = 2: 3.60); heat conduction (quiescent) (p = 3: 4.00); diffusion dominated, Re = 10 (p = 3: 3.79); convection dominated, Re = 1000 (p = 2: 2.85); convection dominated, Re = 1000 (p = 3: 3.92). Further below it: diffusion dominated, Re = 10 (p = 2: 2.33, slowest variable pressure at 2.34); diffusion dominated, no mean flow, Re = 10 (p = 2: 1.99, slowest variable pressure at 1.99). Only the guaranteed rate p is required of the state in the regimes that are not checked against the design rate; in the diffusion-dominated ones the velocity must also reach p + 0.4 between the meshes 8 → 16, the pair on which that empirical floor was measured (the finest pair of this run), and on the finest pair its order minus that of pressure was +0.39 to +0.58 in this run. The per-variable orders are in the table. Symmetry of the viscous operator and the order of the diffusion discretization on its own are the subject of the viscous-operator and 1-D model studies.

gyre 0.4.0 · 39979fcf90 · · gpu · NVIDIA GeForce RTX 3060 Ti · quick suite · record (JSON)Same code as this build

Error of the conserved state by regimeManufactured solutions: Navier–Stokes
Data table
hheat conduction (quiescent), p = 2heat conduction (quiescent), p = 3diffusion dominated, Re = 10, p = 2diffusion dominated, Re = 10, p = 3diffusion dominated, no mean flow, Re = 10, p = 2convection dominated, Re = 1000, p = 2convection dominated, Re = 1000, p = 3
0.250.003678572.3907e-040.0112885.1011e-040.02015540.004537431.9839e-04
0.1253.7490e-041.5520e-050.002488393.8539e-050.005395326.2237e-041.3382e-05
0.06253.0899e-059.7099e-074.9402e-042.7784e-060.001356978.6201e-058.8491e-07

gyre 0.4.0 · 39979fcf90 · · gpu · NVIDIA GeForce RTX 3060 Ti · quick suite · record (JSON)Same code as this build

Observed orders on the finest mesh pairManufactured solutions: Navier–Stokes
regimepL2 error (finest)statevelocitypressuretemperature
heat conduction (quiescent)23.0899e-053.600883.64333.600463.05238
heat conduction (quiescent)39.7099e-073.998494.945913.997954.58993
diffusion dominated, Re = 1024.9402e-042.332562.726872.336633.1517
diffusion dominated, Re = 1032.7784e-063.793964.193543.797764.61291
diffusion dominated, no mean flow, Re = 1020.001356971.991322.571811.990472.70647
convection dominated, Re = 100028.6201e-052.8522.994772.841672.95746
convection dominated, Re = 100038.8491e-073.918623.980753.905754.11096

gyre 0.4.0 · 39979fcf90 · · gpu · NVIDIA GeForce RTX 3060 Ti · quick suite · record (JSON)Same code as this build

Every regime must reach the rate pp that consistency guarantees (tolerance 0.25). Beyond that:

  • Heat conduction in a quiescent gas — the diffusion operator alone — and convection-dominated flow (Re=1000Re = 1000 on the unit box) are also checked against the design rate p+1p+1 (tolerance 0.4). There the coupling between pressure and velocity is absent or hyperbolic.
  • Diffusion-dominated flow (Re=10Re = 10), with and without a mean flow: only the rate pp is required of the state. The velocity is additionally held to an empirical floor of p+0.4p + 0.4 between the meshes 8 → 16. That floor was measured on that mesh pair and is not a property of the scheme.

The table reports the observed order per primitive variable, and the run notes under the status state, from the numbers of the run, which regimes came within 0.4 of the design rate and which variable was slowest where they did not.

The explanation in this block is a conjecture that fits the measurements; no study in the repository isolates the mechanism. When viscous terms dominate the momentum balance, the system behaves like the compressible analogue of the Stokes problem: velocity is determined by an elliptic equation, and pressure (with density and total energy, which contain it) plays the role of the multiplier that enforces the continuity constraint. For equal-order velocity–pressure discretizations of such saddle-point problems the classical estimate bounds the L2L^2 error of pressure by the H1H^1 error of velocity — order pp, one below the velocity’s L2L^2 rate. That bound is a guarantee, not a prediction; the observed pressure orders are in the table. When convection dominates, pressure and velocity are instead coupled hyperbolically, and the design rate p+1p+1 is checked.

Two pieces of evidence show that the diffusion operator on its own is not the cause; they do not exercise the coupled system and so do not confirm the Stokes-like mechanism:

  1. the discrete heat-conduction and viscous-stress operators are symmetric to round-off (discrete invariants);
  2. an independent one-dimensional implementation of the same BR2/Gauss–Lobatto formulation, including the nonlinear work term u τu\,\tau of the energy equation, converges at p+1p+1 for every degree on uniform and non-uniform grids:
Observed orders on the finest pair (η = 2)Independent 1-D model of the BR2 formulation
gridpL2 error uorder uL2 error Torder T
uniform16.8751e-051.986313.6884e-051.93671
uniform23.4142e-073.017961.0618e-073.09137
uniform33.5915e-093.992685.6670e-104.20343
uniform46.0971e-125.003741.3510e-125.46181
non-uniform17.8943e-052.267234.1248e-052.173
non-uniform24.2637e-073.59151.3261e-073.75993
non-uniform34.6638e-094.555567.3161e-104.89335
non-uniform49.7043e-125.988812.1334e-126.64666

gyre 0.4.0 · 39979fcf90 · · cpu · quick suite · record (JSON)Same code as this build

Against the hypothesis: the manufactured solution runs at Mach 0.5, where pressure is a thermodynamic variable and not a constraint multiplier, and three other candidates in this discretization have not been excluded — Gauss–Lobatto under-integration of the BR2 form, the penalty η=2d\eta = 2d sitting exactly on the coercivity bound, and the non-conservative gradient in (u,T)(\mathbf u, T). The discriminating studies (rate against Mach number, Gauss against Gauss–Lobatto quadrature, a sweep of η\eta) have not been run; see viscous terms.

Practical consequence, which rests on the measured rates and not on the explanation: in boundary layers and wakes resolved at cell Reynolds numbers of order one, plan resolution for pressure-derived quantities with a rate nearer pp than p+1p+1.

    ↑ ↓ moveEnter open[ ] change depthResults show section and depth level