WIP: Add non-conservative 2D Euler equations with gravity potential#79
WIP: Add non-conservative 2D Euler equations with gravity potential#79
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #79 +/- ##
==========================================
- Coverage 97.08% 96.31% -0.78%
==========================================
Files 37 38 +1
Lines 5010 5345 +335
==========================================
+ Hits 4864 5148 +284
- Misses 146 197 +51 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Co-authored-by: Benedict Geihe <bgeihe@uni-koeln.de>
e5b5534 to
57ebc3b
Compare
…mework/TrixiAtmo.jl into arr/euler_gravity_geopotential
…mework/TrixiAtmo.jl into arr/euler_gravity_geopotential
|
@amrueda What still needs to be done for this PR to be ready? |
…and removed unused functions
MarcoArtiano
left a comment
There was a problem hiding this comment.
Thanks, I left a few comments.
| f0, f0) | ||
| end | ||
|
|
||
| function flux_nonconservative_waruszewski(u_ll, u_rr, orientation::Integer, |
There was a problem hiding this comment.
Do we need to support StructuredMesh?
There was a problem hiding this comment.
For simple cases, it's nice to be able to test with the TreeMesh or StructuredMesh solver :)
| # Calculate 2D flux for a single point | ||
| @inline function Trixi.flux(u, orientation::Integer, | ||
| equations::CompressibleEulerEquationsWithGravity2D) | ||
| rho, rho_v1, rho_v2, rho_etot, phi = u |
There was a problem hiding this comment.
I don't remember if we already discussed about that. I'm sorry.
Since the equations already mentions that this is with gravity, I would naturally assume that the rho_e is indeed the total energy, without the need to specify.
|
|
||
| Should be used together with [`UnstructuredMesh2D`](@ref). | ||
| """ | ||
| @inline function Trixi.boundary_condition_slip_wall(u_inner, |
There was a problem hiding this comment.
In atmospheric flows I think we could avoid this a bit more expensive boundary condition and use the other more simple already implemented.
I'm note sure if actually there are differences and one has an advantage over the other.
There was a problem hiding this comment.
I have added this BC because it's very robust and has been shown to be entropy stable. See, e.g.,
Hindenlang, F. J., Gassner, G. J., & Kopriva, D. A. (2020, August). Stability of wall boundary condition procedures for discontinuous Galerkin spectral element approximations of the compressible Euler equations. In Spectral and High Order Methods for Partial Differential Equations ICOSAHOM 2018: Selected Papers from the ICOSAHOM Conference, London, UK, July 9-13, 2018 (pp. 3-19). Cham: Springer International Publishing.
The classical reflective slip-wall BC that uses the numerical flux function is only provably ES for some Riemann solvers, such as LLF, HLL, HLLC (see paper). However, there's no guarantee that it will also be ES for other Riemann solvers. I don't know if LMARS provides entropy stability, for example.
You are right that this is probably not critical in most atmospheric science cases, but the additional robustness might be important in some cases. For instance, when simulating the blast from a volcano eruption ;)
I don't think this BC is intrinsically more expensive than the reflective boundary condition that uses the surface numerical flux function. In particular, the numerical flux function needs to compute the maximum wave speed and pressure, which is essentially what is needed for this BC.
…servative_waruszewski_etal
This set of equations extends the
CompressibleEulerEquations2Dby incorporating geopotential energy into the total energyrho_e. This ensures that the energy equation remains a conservation law, even in the presence of gravitational effects. Additionally, the source terms in the momentum equations are treated as non-conservative terms rather than point-wise source terms, following:We implement the non-conservative term

flux_nonconservative_waruszewski, which provides well-balancedness (to machine precision accuracy) for isothermal hydrostatic equilibria:Other standard benchmark tests are provided as well:
RisingBubble_afterBugFix_lmars.mp4