Abstract
In this study, we proposed a weighted loss hard constraint physics-informed neural networks (PINNs) called WHC-PINN. WHC-PINN solves hyperbolic equations with the aid of a gradient weighting approach and by applying hard constraints. Euler equations are chosen for analysis and validation of WHC-PINN, as they represent a common and useful model for compressible fluid flow that includes shock waves and contact discontinuities. This is an important test case from a practical point of view, as resolving discontinuities with PINNs remains challenging. Accordingly, we explore two well-known fundamental problems of Euler equations, i.e., Riemann, and the converging-diverging nozzle. While solvers in other studies have successfully addressed one of the converging-diverging nozzle or Riemann problems with different formulations, our proposed solver can tackle both problems with the unified conservative formulations by incorporating specific features. Furthermore, given the distinct nature of the two selection problems, WHC-PINN solver is capable of addressing both initial value and boundary value problems, and we think that WHC-PINN is a step forward in using PINNs as a general-purpose compressible flow solver. Through comparing WHC-PINN results and analytical solutions, WHC-PINN could accurately capture the shock locations.