We design a scheme for the Euler equations under gravitational fields based on our subcell hydrostatic reconstruction framework.
To give a proper definition of the nonconservative product terms due to the gravitational potential, we first separate the singularity to be an infinitely thin layer, on where the potential is smoothed by defining an intermediate potential without disturbing its monotonicity ; then the physical variables are extended and controlled to be consistent with the Rayleigh-Taylor stability, which contribute the positivity-preserving property to keep the nonnegativity of both gas density and pressure even with vacuum states. By using the hydrostatic equilibrium state variables the well-balanced property is obtained to maintain the steady state even with vacuum fronts. In addition, we proved the full discrete discrete entropy inequality, which preserve the convergence of the solution to the physical solution, with an error term which tends to zero as the mesh size approaches to zero if the potential is Lipschitz continuous. The new scheme is very natural to understand and easy to implement.
The numerical experiments demonstrate the scheme's robustness to resolve the nonlinear waves and vacuum fronts.