(untitled) (Communications in Computational Physics, 2024)
With continuous developments in various techniques, machine learning is becoming increasingly viable and promising in the field of fluid mechanics. In this article, we present a machine learning approach for enhancing the resolution and robustness of the weighted compact nonlinear scheme (WCNS). We employ a neural network as a weighting function in the WCNS scheme and follow a data-driven approach to train this neural network. Neural networks can learn a new smoothness measure and calculate a weight function inherently. To facilitate the machine learning task and train with fewer data, we integrate the prior knowledge into the learning process, such as a Galilean invariant input layer and CNS polynomials. The normalization in the Delta layer (the so-called Delta layer is used to calculate input features) ensures that the WCNS3-NN schemes achieve a scale-invariant property (Si-property) with an arbitrary scale of a function, and an essentially non-oscillatory approximation of a discontinuous function (ENO-property). The Si-property and ENO-property of the data-driven WCNS schemes are validated numerically. Several one- and two-dimensional benchmark examples, including strong shocks and shock-density wave interactions, are presented to demonstrate the advantages of the proposed method.