Discrete invariants
In one minuteSummation by parts, free-stream preservation, conservation and entropy conservation are algebraic identities of the scheme. They hold to round-off, in two and three dimensions, on curved meshes.
These studies do not measure convergence; they check identities that are either satisfied to machine precision or broken.
Summation-by-parts operators#
Gauss–Lobatto collocation operators: the SBP identity M D + (M D)^T = B, quadrature exactness to degree 2p-1, exact differentiation of degree-p polynomials, skew-symmetry of the flux-differencing matrix M S and consistency of the p-multigrid transfers.
- largest defect over all identities and degrees6.22e-15expected < 1e-11pass
gyre 0.4.0 · 39979fcf90 · · cpu · quick suite · record (JSON)Same code as this build
| p | SBP | quadrature (deg <= 2p-1) | differentiation | skew(M S) | Pi I - 1 |
|---|---|---|---|---|---|
| 1 | 0 | 0 | 0 | 0 | 2.2204e-16 |
| 2 | 0 | 2.2204e-16 | 0 | 0 | 4.9960e-16 |
| 3 | 3.3307e-16 | 5.5511e-17 | 8.8818e-16 | 4.4409e-16 | 0 |
| 4 | 1.1102e-15 | 3.3307e-16 | 1.7764e-15 | 8.8818e-16 | 4.4409e-16 |
| 5 | 1.3866e-15 | 2.2204e-16 | 2.6645e-15 | 1.9984e-15 | 4.4409e-16 |
| 6 | 2.2128e-15 | 1.9429e-16 | 4.4409e-15 | 1.5543e-15 | 4.4409e-15 |
| 7 | 1.8936e-15 | 1.1102e-16 | 3.1086e-15 | 2.2204e-15 | 1.8874e-15 |
| 8 | 2.5535e-15 | 4.4409e-16 | 6.2172e-15 | 3.7748e-15 | 1.1423e-15 |
gyre 0.4.0 · 39979fcf90 · · cpu · quick suite · record (JSON)Same code as this build
For every polynomial degree: the SBP identity ; exactness of LGL quadrature up to degree (and, in the unit tests, inexactness at ); exact differentiation of polynomials up to degree ; skew-symmetry of the flux-differencing matrix ; and that projection after prolongation is the identity on the coarse space of the p-multigrid transfers.
Free-stream preservation#
A uniform flow must remain an exact steady state on arbitrarily curved elements. This requires discrete metric identities: cross-product metrics in 2-D and the conservative-curl form in 3-D. Meshes are smoothly warped periodic boxes (6 % amplitude); the table reports the largest weak residual of the uniform state and the closure of each element's discrete surface (geometric conservation law).
- max |Rw| of uniform flow and GCL defect2.91e-15expected < 1e-11pass
gyre 0.4.0 · 39979fcf90 · · cpu · quick suite · record (JSON)Same code as this build
| dim | elements | p | geometry degree | viscous | min J / max J | max |Rw| | surface closure |
|---|---|---|---|---|---|---|---|
| 2-D | 6x5 | 3 | 4 | no | 0.451047 | 1.3492e-15 | 3.0531e-16 |
| 2-D | 6x5 | 3 | 4 | yes | 0.451047 | 1.3368e-15 | 3.0531e-16 |
| 2-D | 4x4 | 5 | 4 | no | 0.453556 | 2.8560e-15 | 4.9960e-16 |
| 2-D | 4x4 | 5 | 4 | yes | 0.453556 | 2.9091e-15 | 4.9960e-16 |
| 3-D | 3x3x3 | 2 | 2 | no | 0.276159 | 2.6316e-16 | 3.4694e-17 |
| 3-D | 3x3x3 | 2 | 2 | yes | 0.276159 | 2.6316e-16 | 3.4694e-17 |
| 3-D | 3x3x3 | 3 | 3 | no | 0.417089 | 3.2526e-16 | 6.9823e-17 |
| 3-D | 3x3x3 | 3 | 3 | yes | 0.417089 | 3.2823e-16 | 6.9823e-17 |
gyre 0.4.0 · 39979fcf90 · · cpu · quick suite · record (JSON)Same code as this build
In three dimensions the naive cross-product metrics break the discrete metric identities on curved elements; the conservative curl form restores them. The 3-D rows of the table are therefore a direct test of that construction. The last column is the closure of each element’s discrete surface, , the geometric conservation law.
Conservation and entropy#
The rate of change of the discrete mathematical entropy, -w^T Rw, is evaluated on warped periodic meshes for combinations of two-point volume fluxes and interface fluxes. The state is a periodic field carrying a 3 % node-wise perturbation, so it jumps across every element face, the curved interior faces included. Split-form DGSEM with an entropy-conservative two-point flux satisfies a discrete entropy balance exactly for any nodal state: the checks require the rate to vanish to round-off for the entropy-conservative pairings, to be clearly non-zero for the volume fluxes that are not entropy conservative, and to be negative, well above round-off, when an upwind interface flux adds dissipation. A second table tests the interface fluxes alone on random pairs of states far apart: the entropy-stable ones (llf, es_roe) must produce no entropy for any pair, which is the property the proof rests on; the classical solvers are shown for comparison.
- 2-D ranocha / ec: |d/dt entropy|5.98e-15expected < 1e-11pass
- 2-D ranocha / ec: conservation defect4.46e-14expected < 1e-11pass
- 2-D chandrashekar / ec: |d/dt entropy|8.10e-15expected < 1e-11pass
- 2-D chandrashekar / ec: conservation defect4.88e-14expected < 1e-11pass
- 2-D kennedy_gruber / ec: not entropy conservative5.98e-04expected > 1e-8pass
- 2-D kennedy_gruber / ec: conservation defect4.24e-14expected < 1e-11pass
- 2-D central / ec: not entropy conservative4.57e-04expected > 1e-8pass
- 2-D central / ec: conservation defect4.31e-14expected < 1e-11pass
- 2-D ranocha / llf: entropy dissipated-0.0551expected < -1e-8pass
- 2-D ranocha / llf: conservation defect4.66e-14expected < 1e-11pass
- 2-D ranocha / es_roe: entropy dissipated-0.01835expected < -1e-8pass
- 2-D ranocha / es_roe: conservation defect4.46e-14expected < 1e-11pass
- 2-D chandrashekar / es_roe: entropy dissipated-0.01835expected < -1e-8pass
- 2-D chandrashekar / es_roe: conservation defect4.73e-14expected < 1e-11pass
- 2-D ranocha / roe: entropy dissipated-0.01835expected < -1e-8pass
- 2-D ranocha / roe: conservation defect4.13e-14expected < 1e-11pass
- 2-D ranocha / hllc: entropy dissipated-0.01834expected < -1e-8pass
- 2-D ranocha / hllc: conservation defect4.09e-14expected < 1e-11pass
- 3-D ranocha / ec: |d/dt entropy|3.69e-15expected < 1e-11pass
- 3-D ranocha / ec: conservation defect1.20e-14expected < 1e-11pass
- 3-D chandrashekar / ec: |d/dt entropy|3.52e-15expected < 1e-11pass
- 3-D chandrashekar / ec: conservation defect1.17e-14expected < 1e-11pass
- 3-D kennedy_gruber / ec: not entropy conservative0.001198expected > 1e-8pass
- 3-D kennedy_gruber / ec: conservation defect2.69e-15expected < 1e-11pass
- 3-D central / ec: not entropy conservative0.007444expected > 1e-8pass
- 3-D central / ec: conservation defect1.82e-15expected < 1e-11pass
- 3-D ranocha / llf: entropy dissipated-0.05432expected < -1e-8pass
- 3-D ranocha / llf: conservation defect1.18e-14expected < 1e-11pass
- 3-D ranocha / es_roe: entropy dissipated-0.01778expected < -1e-8pass
- 3-D ranocha / es_roe: conservation defect1.16e-14expected < 1e-11pass
- 3-D chandrashekar / es_roe: entropy dissipated-0.01778expected < -1e-8pass
- 3-D chandrashekar / es_roe: conservation defect1.23e-14expected < 1e-11pass
- 3-D ranocha / roe: entropy dissipated-0.01783expected < -1e-8pass
- 3-D ranocha / roe: conservation defect1.36e-15expected < 1e-11pass
- 3-D ranocha / hllc: entropy dissipated-0.01782expected < -1e-8pass
- 3-D ranocha / hllc: conservation defect8.19e-16expected < 1e-11pass
- 2-D llf: largest two-state entropy production over 5000 random pairs-0.05717expected < 0pass
- 2-D es_roe: largest two-state entropy production over 5000 random pairs-0.03018expected < 0pass
- 3-D llf: largest two-state entropy production over 5000 random pairs-0.2282expected < 0pass
- 3-D es_roe: largest two-state entropy production over 5000 random pairs-0.04117expected < 0pass
- classical solvers (roe, hllc) violate the two-state inequality for some pairs (cases of 4)2expected >= 1 (why they carry no proof)pass
gyre 0.4.0 · 39979fcf90 · · cpu · quick suite · record (JSON)Same code as this build
Measured here: with an entropy-conservative volume flux and the dissipation-free interface flux the entropy rate is at most 8.1e-15 in magnitude; with the upwind interface fluxes it lies between -5.5e-02 and -1.8e-02.
Data table
| volume flux / interface flux | 2-D | 3-D |
|---|---|---|
| ranocha / ec | 5.9781e-15 | 3.6880e-15 |
| chandrashekar / ec | 8.0969e-15 | 3.5232e-15 |
| kennedy_gruber / ec | 5.9810e-04 | 0.00119758 |
| central / ec | 4.5667e-04 | 0.00744448 |
| ranocha / llf | 0.0550953 | 0.0543174 |
| ranocha / es_roe | 0.0183493 | 0.0177799 |
| chandrashekar / es_roe | 0.0183493 | 0.0177799 |
| ranocha / roe | 0.0183487 | 0.0178301 |
| ranocha / hllc | 0.0183448 | 0.0178184 |
gyre 0.4.0 · 39979fcf90 · · cpu · quick suite · record (JSON)Same code as this build
| dim | volume flux | interface flux | d/dt ∫ η | |Σ Rw| |
|---|---|---|---|---|
| 2-D | ranocha | ec | -5.9781e-15 | 4.4631e-14 |
| 2-D | chandrashekar | ec | -8.0969e-15 | 4.8850e-14 |
| 2-D | kennedy_gruber | ec | -5.9810e-04 | 4.2411e-14 |
| 2-D | central | ec | -4.5667e-04 | 4.3077e-14 |
| 2-D | ranocha | llf | -0.0550953 | 4.6629e-14 |
| 2-D | ranocha | es_roe | -0.0183493 | 4.4631e-14 |
| 2-D | chandrashekar | es_roe | -0.0183493 | 4.7296e-14 |
| 2-D | ranocha | roe | -0.0183487 | 4.1300e-14 |
| 2-D | ranocha | hllc | -0.0183448 | 4.0856e-14 |
| 3-D | ranocha | ec | -3.6880e-15 | 1.1970e-14 |
| 3-D | chandrashekar | ec | -3.5232e-15 | 1.1685e-14 |
| 3-D | kennedy_gruber | ec | -0.00119758 | 2.6854e-15 |
| 3-D | central | ec | -0.00744448 | 1.8180e-15 |
| 3-D | ranocha | llf | -0.0543174 | 1.1796e-14 |
| 3-D | ranocha | es_roe | -0.0177799 | 1.1602e-14 |
| 3-D | chandrashekar | es_roe | -0.0177799 | 1.2261e-14 |
| 3-D | ranocha | roe | -0.0178301 | 1.3600e-15 |
| 3-D | ranocha | hllc | -0.0178184 | 8.1879e-16 |
gyre 0.4.0 · 39979fcf90 · · cpu · quick suite · record (JSON)Same code as this build
The state of the study is a smooth periodic field with a node-wise random perturbation of 3 %, so every interface carries a jump and the interface flux is exercised on every face, curved interior faces included.
With an entropy-conservative volume flux and a dissipation-free interface flux (ec), the
discrete entropy changes only at round-off level on a warped mesh — it is conserved. The
Kennedy–Gruber and central fluxes, which are not entropy conservative, produce or destroy
entropy at a rate many orders of magnitude larger (see the table). With upwind interface fluxes
(llf, es_roe, roe, hllc) the rate must be negative with a margin: the check requires a
rate below , three orders above the tolerance of the conservative pairings, so that a
round-off value of either sign cannot pass. Entropy is dissipated, as the second law requires.
For small jumps the matrix dissipation of es_roe removes entropy at the rate of the
classical Roe flux, about a third of the scalar dissipation of llf in this study.
| dim | interface flux | pairs | largest production | pairs with production > 0 [%] |
|---|---|---|---|---|
| 2-D | llf | 5000 | -0.0571705 | 0 |
| 2-D | es_roe | 5000 | -0.0301779 | 0 |
| 2-D | roe | 5000 | 1365.06 | 18.5 |
| 2-D | hllc | 5000 | -0.0156571 | 0 |
| 3-D | llf | 5000 | -0.228196 | 0 |
| 3-D | es_roe | 5000 | -0.0411714 | 0 |
| 3-D | roe | 5000 | 812.676 | 19.18 |
| 3-D | hllc | 5000 | -0.0401914 | 0 |
gyre 0.4.0 · 39979fcf90 · · cpu · quick suite · record (JSON)Same code as this build
The second table tests the interface fluxes alone, on random pairs of states far apart: the entropy-stable fluxes produce no entropy for any pair, the classical Roe flux does for a share of them (why). In every case mass, momentum and energy are conserved to round-off.
Structure of the viscous operator#
At a quiescent state the energy–energy and momentum–momentum blocks of the weak-form Jacobian are exactly the discrete heat-conduction and viscous-stress operators. Their symmetry (the hallmark of an adjoint-consistent diffusion discretization) and positive semi-definiteness are checked on Cartesian and warped meshes with periodic and Dirichlet boundaries, and the Jacobian sparsity pattern is checked to be compact (face neighbours only), which element-block preconditioning relies on.
- warp=0.0, periodic, p=2: asymmetry2.70e-16expected < 1e-12pass
- warp=0.0, periodic, p=2: smallest eigenvalue-5.45e-16expected >= -1e-12pass
- warp=0.0, periodic, p=3: asymmetry2.54e-16expected < 1e-12pass
- warp=0.0, periodic, p=3: smallest eigenvalue-1.89e-15expected >= -1e-12pass
- warp=0.0, Dirichlet, p=2: asymmetry1.17e-16expected < 1e-12pass
- warp=0.0, Dirichlet, p=2: smallest eigenvalue0.02524expected >= -1e-12pass
- warp=0.0, Dirichlet, p=3: asymmetry1.44e-16expected < 1e-12pass
- warp=0.0, Dirichlet, p=3: smallest eigenvalue0.0147expected >= -1e-12pass
- warp=0.05, periodic, p=2: asymmetry2.82e-16expected < 1e-12pass
- warp=0.05, periodic, p=2: smallest eigenvalue5.54e-17expected >= -1e-12pass
- warp=0.05, periodic, p=3: asymmetry2.93e-16expected < 1e-12pass
- warp=0.05, periodic, p=3: smallest eigenvalue-5.08e-16expected >= -1e-12pass
- warp=0.05, Dirichlet, p=2: asymmetry1.60e-16expected < 1e-12pass
- warp=0.05, Dirichlet, p=2: smallest eigenvalue0.02478expected >= -1e-12pass
- warp=0.05, Dirichlet, p=3: asymmetry1.64e-16expected < 1e-12pass
- warp=0.05, Dirichlet, p=3: smallest eigenvalue0.0144expected >= -1e-12pass
- element couplings outside the face-neighbour stencil0expected == 0pass
gyre 0.4.0 · 39979fcf90 · · cpu · quick suite · record (JSON)Same code as this build
| warp | boundaries | p | asym. (heat) | asym. (stress) | min eig (heat) | min eig (stress) |
|---|---|---|---|---|---|---|
| 0 | periodic | 2 | 2.7046e-16 | 2.0254e-16 | -5.4470e-16 | 6.5560e-16 |
| 0 | periodic | 3 | 2.2839e-16 | 2.5421e-16 | 1.1123e-16 | -1.8926e-15 |
| 0 | Dirichlet | 2 | 7.9058e-17 | 1.1709e-16 | 0.0423156 | 0.0252442 |
| 0 | Dirichlet | 3 | 6.5254e-17 | 1.4417e-16 | 0.0246366 | 0.0147011 |
| 0.05 | periodic | 2 | 1.9043e-16 | 2.8210e-16 | 1.5375e-15 | 5.5369e-17 |
| 0.05 | periodic | 3 | 2.3864e-16 | 2.9273e-16 | 1.1192e-15 | -5.0847e-16 |
| 0.05 | Dirichlet | 2 | 5.4250e-17 | 1.5964e-16 | 0.0417777 | 0.0247796 |
| 0.05 | Dirichlet | 3 | 1.3399e-16 | 1.6369e-16 | 0.0242548 | 0.0143994 |
gyre 0.4.0 · 39979fcf90 · · cpu · quick suite · record (JSON)Same code as this build
At a quiescent state the energy–energy block of the Jacobian is the discrete heat-conduction operator and the momentum–momentum block is the discrete viscous-stress operator (including the cross-derivative coupling). Both are symmetric to round-off and positive semi-definite, on warped meshes and with Dirichlet walls. A separate check confirms that the full Jacobian only couples face neighbours.