WENO3-NN: A maximum-order three-point data-driven weighted essentially non-oscillatory scheme
Highlights
- •A low-dissipation data-driven third-order WENO scheme (WENO3-NN) is proposed.
- •Additional loss on the reconstruction weights yields maximum-order convergence.
- •The network smoothness measure facilitates interpretation and generalization.
- •Very good performance on canonical test cases, including strong shock interactions.
- •Error magnitudes and wavenumber resolution comparable to or better than WENO5-JS.
Abstract
Keywords
1. Introduction
2. Review of WENO schemes
3. WENO3-NN
3.1. Neural network basics
3.2. WENO3-NN Architecture

Fig. 1. Schematic of the WENO3-NN architecture. The cell-averaged input stencil is passed to the Delta layer which extracts the Galilean invariant features Δj. The Δj are the input of the neural network which calculates . During training are used for reconstructing the cell-face values. At test time, the final WENO weights are obtained after application of the ENO layer. For legibility, the neural network is depicted with two hidden layers.
3.3. Training
Table 1. Training dataset. represents a uniform distribution, represents the Bernoulli distribution.
Function f(x) | Parameters | Number of samples |
---|---|---|
4000 for each k | ||
ul(x < 0.5)+ur(x > 0.5) | 8000 | |
(−1)ax + δ(x > 0.5) | 4000 | |
4000 | ||
4000 |
3.4. Convergence behavior

Fig. 2. Convergence behavior of the WENO3-NN compared with other third-order WENO schemes.
3.5. Behavior at smooth extreme points and discontinuities

Fig. 3. Comparison of the smoothness measures of selected WENO schemes for Eq. (23).

Fig. 4. Comparison of the smoothness measures of selected WENO schemes for Eq. (24).
4. Results
4.1. Linear advection

Fig. 5. Linear advection of GSTE at t = 10.0. Resolution N = 200.

Fig. 6. Linear advection of the discontinuous initial condition in Eq. (28) at t = 10.0. Resolution N = 200.

Fig. 7. Linear advection of at t = 10.0. Resolution N = 100.
4.2. Shock-tube problems

Fig. 8. Sod shock tube at t = 0.2. Resolution N = 200.

Fig. 9. Lax shock tube at t = 0.14. Resolution N = 200.

Fig. 10. 123 problem at t = 0.15. Resolution N = 200.
4.3. Interacting blast waves

Fig. 11. Interacting blast waves at t = 0.038. Top: N = 400, bottom: N = 800.
4.4. Shock-density wave interaction

Fig. 12. Shock-density wave interaction at t = 1.8. Top: N = 400, bottom: N = 800.
4.5. Gresho vortex advection

Fig. 13. Gresho vortex at t = 84.515. Pressure contours are shown from lowest (blue) to highest (red). Resolution 96 × 96. (For interpretation of the colors in the figure(s), the reader is referred to the web version of this article.)
4.6. Double Mach reflection of a strong shock

Fig. 14. Double Mach reflection at t = 0.2. Density contours. Resolution 1024 × 256. The figure is drawn with 40 equally spaced density contours between 1.85 and 21.5.
4.7. Rayleigh-Taylor instability

Fig. 15. Rayleigh-Taylor instability at t = 1.95. 20 equally spaced density contours between 0.85 and 2.25 are drawn. Resolution 128 × 512.

Fig. 16. Rayleigh-Taylor instability at t = 1.95. 20 equally spaced density contours between 0.85 and 2.25 are drawn. Resolution 256 × 1024.
4.8. Approximate dispersion relation

Fig. 17. Approximate dispersion relations for selected schemes.
4.9. Online computational cost
Table 2. Average computational performance of selected WENO schemes.
Scheme | GPU time per cell and time step (in ns) | Normalized cost |
---|---|---|
WENO3-JS | 389 | 1.00 |
WENO3-Z | 396 | 1.02 |
WENO3-N | 411 | 1.06 |
WENO3-NN1 | 1676 | 4.31 |
WENO3-NN2 | 1743 | 4.48 |
WENO5-JS | 561 | 1.44 |
5. Conclusion
CRediT authorship contribution statement
Declaration of Competing Interest
Acknowledgements
Appendix A.
A.1. Dataset

Fig. 18. Exemplary three-point stencil in which the finite-volume representation (green points) of a discontinuous function (orange line) and a smooth function (blue line) becomes identical.
A.2. Model training
Table 3. Model hyperparameters.
Parameter | Value range |
---|---|
α | [0, 1E-2, 3E-2, 1E-1, 3E-1, 1] |
βd | [1E-2, 1E-1, 1] |
βW | 1E-9 |
ceno | 2E-4 |

Fig. 19. Loss history for WENO3-NN1 (left) and WENO3-NN2 (right).
A.3. Influence of hyperparameters

Fig. 20. Influence of the hyperparameters on the NN weight function for . Left: βd = 0.1, right: α = 0.1.
A.4. Cutoff threshold of the ENO layer

Fig. 21. Evaluation of the output weights of WENO3-NN for Eq. (A.1) with and without ENO layer. Left: pure network output (without ENO layer), right: post-processed network output (with ENO layer).
A.5. Convergence for the linear advection equation

Fig. 22. L1,L2, and L∞ errors of WENO3-JS/Z/N/NN1/NN2 and WENO5-JS/Z for the linear advection equation with .
A.6. Pointwise error for linear advection and shocktube tests

Fig. 23. Pointwise error distributions for the linear advection of the multiwave Eq. (27) (top left), the discontinuity Eq. (28) (top right), and of (bottom center) at t = 10.0.

Fig. 24. Absolute pointwise error distribution of density and velocity for the Sod test case defined by Eq. (29).

Fig. 25. Absolute pointwise error distribution of density and velocity for the Lax test case defined by Eq. (30).

Fig. 26. Absolute pointwise error distribution of density and velocity for the 123 test case defined by Eq. (31).
Table 4. L1 errors of various WENO schemes for the linear advection equation and shocktube problems of the Euler equation. Linear advection tests include , the multiwave in Eq. (27), and the discontinuity in Eq. (28). The Sod, Lax, and 123 shocktube problems are defined by Eqs. (29), (30), and (31).
Empty Cell | GSTE | Disc. | Sod | Lax | 123 | |
---|---|---|---|---|---|---|
WENO3-JS | 1.180E-1 | 3.702E-1 | 8.260E-2 | 1.636E-2 | 3.949E-2 | 2.540E-2 |
WENO3-Z | 5.552E-2 | 2.343E-1 | 5.902E-2 | 1.272E-2 | 2.931E-2 | 2.317E-2 |
WENO3-N | 4.197E-2 | 1.969E-1 | 5.225E-2 | 1.188E-2 | 3.153E-2 | 2.255E-2 |
WENO3-NN1 | 2.661E-2 | 1.651E-1 | 4.355E-2 | 1.078E-2 | 2.527E-2 | 1.973E-2 |
WENO3-NN2 | 2.445E-2 | 1.609E-1 | 4.235E-2 | 1.035E-2 | 2.416E-2 | 1.967E-2 |
WENO5-JS | 2.572E-3 | 9.964E-2 | 2.634E-2 | 1.106E-2 | 2.590E-2 | 2.393E-2 |
WENO5-Z | 1.930E-3 | 7.731E-2 | 2.335E-2 | 8.113E-3 | 1.900E-2 | 2.282E- 2 |
References
- [1]Efficient implementation of weighted ENO schemesJ. Comput. Phys., 126 (1) (1996), pp. 202-228, 10.1006/jcph.1996.0130
- [2]Mapped weighted essentially non-oscillatory schemes: achieving optimal order near critical pointsJ. Comput. Phys., 207 (2) (2005), pp. 542-567, 10.1016/j.jcp.2005.01.023
- [3]An improved weighted essentially non-oscillatory scheme for hyperbolic conservation lawsJ. Comput. Phys., 227 (6) (2008), pp. 3191-3211, 10.1016/j.jcp.2007.11.038
- [4]An adaptive central-upwind weighted essentially non-oscillatory schemeJ. Comput. Phys., 229 (23) (2010), pp. 8952-8965, 10.1016/j.jcp.2010.08.019
- [5]Scale separation for implicit large eddy simulationJ. Comput. Phys., 230 (19) (2011), pp. 7240-7249, 10.1016/j.jcp.2011.05.023
- [6]A family of high-order targeted ENO schemes for compressible-fluid simulationsJ. Comput. Phys., 305 (2016), pp. 333-359, 10.1016/j.jcp.2015.10.037
- [7]A data-driven physics-informed finite-volume scheme for nonclassical undercompressive shocksJ. Comput. Phys., 437 (2021), Article 110324, 10.1016/j.jcp.2021.110324
- [8]Enhancement of shock-capturing methods via machine learningTheor. Comput. Fluid Dyn., 34 (4) (2020), pp. 483-496, 10.1007/s00162-020-00531-1
- [9]Essentially non-oscillatory and weighted essentially non-oscillatory schemes for hyperbolic conservation lawsAdv. Numer. Approx. Nonlin. Hyperbol. Eq., 97 (1998), pp. 325-432, 10.1007/bfb0096355
- [10]Adam: a method for stochastic optimization3rd International Conference on Learning Representations, ICLR 2015 - Conference Track Proceedings, International Conference on Learning Representations, ICLR (2015)
- [11]Searching for activation functions
- [12]A high-resolution hybrid scheme for hyperbolic conservation lawsInt. J. Numer. Methods Fluids, 78 (3) (2015), pp. 162-187, 10.1002/fld
- [13]Modified third and fifth order WENO schemes for inviscid compressible flowsNumer. Algorithms (2020), 10.1007/s11075-020-01039-9
- [14]Riemann Solvers and Numerical Methods for Fluid Dynamics: A Practical Introduction(3rd edition), Springer Verlag (2009)
- [15]Accuracy of the weighted essentially non-oscillatory conservative finite difference schemesJ. Comput. Phys., 250 (2013), pp. 347-372, 10.1016/j.jcp.2013.05.018
- [16]An improved WENO-Z schemeJ. Comput. Phys., 313 (January 2016), pp. 726-753, 10.1016/j.jcp.2016.01.038
- [17]A survey of several finite difference methods for systems of nonlinear hyperbolic conservation lawsJ. Comput. Phys., 27 (1) (1978), pp. 1-31, 10.1016/0021-9991(78)90023-2
- [18]Weak solutions of nonlinear hyperbolic equations and their numerical computationCommun. Pure Appl. Math., 7 (1) (1954), pp. 159-193, 10.1002/cpa.3160070112
- [19]On Godunov-type methods near low densitiesJ. Comput. Phys., 92 (2) (1991), pp. 273-295, 10.1016/0021-9991(91)90211-3
- [20]The numerical simulation of two-dimensional fluid flow with strong shocksJ. Comput. Phys., 54 (1) (1984), pp. 115-173
- [21]Efficient Implementation of Essentially Non-oscillatory Shock-Capturing Schemes, IISpringer (1989), pp. 328-374
- [22]On the spectral properties of shock-capturing schemesJ. Comput. Phys., 219 (2) (2006), pp. 489-497, 10.1016/j.jcp.2006.07.009
- [23]JAX: composable transformations of Python+NumPy programshttp://github.com/google/jax (2018)
Cited by (12)
JAX-Fluids 2.0: Towards HPC for differentiable CFD of compressible two-phase flows
2025, Computer Physics CommunicationsA deep reinforcement learning framework for dynamic optimization of numerical schemes for compressible flow simulations
2023, Journal of Computational PhysicsCitation Excerpt :Data-driven methods based on artificial neural networks (ANNs) or Gaussian processes (GPs) gain significance in CFD due to their ability to learn complex, nonlinear relation from data. They have been integrated with the numerical solvers to produce physically consistent solutions [20–26]. Due to different characteristics of subgrid scales, traditional optimization strategies, such as those based on spectral properties [7] or based on evolutionary [15] as well as Bayesian optimization [24,25], may not be effective in finding the optimal solutions.
JAX-Fluids: A fully-differentiable high-order computational fluid dynamics solver for compressible two-phase flows
2023, Computer Physics CommunicationsCitation Excerpt :Upon proper training, they are then plugged into an existing CFD solver for evaluation of down-stream tasks. Examples include training of explicit subgrid scale models in large eddy simulations [33], interface reconstruction in multiphase flows [34,35], and cell face reconstruction in shock-capturing schemes [36,37]. Although the offline training of ML models is relatively easy, there are several drawbacks to this approach.
Weak baselines and reporting biases lead to overoptimism in machine learning for fluid-related partial differential equations
2024, Nature Machine IntelligenceReview of the High-Order TENO Schemes for Compressible Gas Dynamics and Turbulence
2023, Archives of Computational Methods in EngineeringBAYESIAN OPTIMIZATION ON FIFTH-ORDER TARGETED ENO SCHEME FOR COMPRESSIBLE FLOWS
2022, WCCM-APCOM 2022 - 15th World Congress on Computational Mechanics and 8th Asian Pacific Congress on Computational Mechanics: Pursuing the Infinite Potential of Computational Mechanics