-
Notifications
You must be signed in to change notification settings - Fork 144
Description
In #2022 #2695 #2718 #2734 #2755 the second-order finite volume scheme on subcells was introduced. Currently, this is limited to conservative systems only, see e.g.
Trixi.jl/src/solvers/dgsem_tree/dg_1d.jl
Lines 310 to 312 in 7e3481e
| @inline function calcflux_fvO2!(fstar1_L, fstar1_R, u, | |
| mesh::Union{TreeMesh{1}, StructuredMesh{1}}, | |
| nonconservative_terms::False, |
with flux computation
Trixi.jl/src/solvers/dgsem_tree/dg_1d.jl
Lines 365 to 369 in 7e3481e
| flux = volume_flux_fv(prim2cons(u_l, equations), prim2cons(u_r, equations), | |
| 1, equations) # orientation 1: x direction | |
| set_node_vars!(fstar1_L, flux, equations, dg, i) | |
| set_node_vars!(fstar1_R, flux, equations, dg, i) |
It would be trivial to extend the flux computation with a non-conservative part like here:
Trixi.jl/src/solvers/dgsem_tree/dg_1d.jl
Lines 295 to 300 in 7e3481e
| f1_L = f1 + 0.5f0 * nonconservative_flux(u_ll, u_rr, 1, equations) | |
| f1_R = f1 + 0.5f0 * nonconservative_flux(u_rr, u_ll, 1, equations) | |
| # Copy to temporary storage | |
| set_node_vars!(fstar1_L, f1_L, equations, dg, i) | |
| set_node_vars!(fstar1_R, f1_R, equations, dg, i) |
However, the choice of variables that should be limited is not trivial. Consider for instance the quasi 1D compressible Euler equations, the only 1D nonconservative system in the main repository of Trixi. This carries the nozzle width a
Trixi.jl/src/equations/compressible_euler_quasi_1d.jl
Lines 40 to 42 in 7e3481e
| The nozzle width function ``a(x)`` is set inside the initial condition routine | |
| for a particular problem setup. To test the conservative form of the compressible Euler equations one can set the | |
| nozzle width variable ``a`` to one. |
which is included in the variables
Trixi.jl/src/equations/compressible_euler_quasi_1d.jl
Lines 65 to 70 in 7e3481e
| function varnames(::typeof(cons2cons), ::CompressibleEulerEquationsQuasi1D) | |
| return ("a_rho", "a_rho_v1", "a_e", "a") | |
| end | |
| function varnames(::typeof(cons2prim), ::CompressibleEulerEquationsQuasi1D) | |
| return ("rho", "v1", "p", "a") | |
| end |
and would thus also be limited
Trixi.jl/src/solvers/dgsem_tree/dg_1d.jl
Lines 359 to 362 in 7e3481e
| ## Reconstruct values at interfaces with limiting ## | |
| u_l, u_r = reconstruction_mode(u_ll, u_lr, u_rl, u_rr, | |
| sc_interface_coords, i, | |
| slope_limiter, dg) |
This is problematic (I conducted preliminary studies which proved difficult - even when excluding a from the limited variables). So some more work is required here. I guess the same is true for MHD due to the divergence cleaning speed psi.