Skip to content

Commit 94d7c9e

Browse files
author
Anand
committed
Add Lax Friedrichs Riemann Solver (set riemann_solver = 5)
1 parent 1bb0097 commit 94d7c9e

File tree

3 files changed

+839
-31
lines changed

3 files changed

+839
-31
lines changed

src/simulation/include/inline_riemann.fpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878

7979
#:def compute_low_Mach_correction()
8080

81-
if (riemann_solver == 1) then
81+
if (riemann_solver == 1 .or. riemann_solver == 5) then
8282

8383
zcoef = min(1._wp, max(vel_L_rms**5.e-1_wp/c_L, vel_R_rms**5.e-1_wp/c_R))
8484
pcorr = 0._wp

src/simulation/m_checker.fpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,15 +142,16 @@ contains
142142
!> Checks constraints on Riemann solver parameters
143143
impure subroutine s_check_inputs_riemann_solver
144144
@:PROHIBIT(riemann_solver /= 2 .and. model_eqns == 3, "6-equation model (model_eqns = 3) requires riemann_solver = 2")
145-
@:PROHIBIT(riemann_solver < 1 .or. riemann_solver > 4, "riemann_solver must be 1, 2, 3, or 4")
145+
@:PROHIBIT(riemann_solver < 1 .or. riemann_solver > 5, "riemann_solver must be 1, 2, 3, 4 or 5")
146146
@:PROHIBIT(all(wave_speeds /= (/dflt_int, 1, 2/)), "wave_speeds must be 1 or 2")
147147
@:PROHIBIT(riemann_solver == 3 .and. wave_speeds /= dflt_int, "Exact Riemann (riemann_solver = 3) does not support wave_speeds")
148148
@:PROHIBIT(all(avg_state /= (/dflt_int, 1, 2/)), "Unsupported value of avg_state")
149-
@:PROHIBIT(riemann_solver /= 3 .and. wave_speeds == dflt_int, "wave_speeds must be set if riemann_solver != 3")
150-
@:PROHIBIT(riemann_solver /= 3 .and. avg_state == dflt_int, "avg_state must be set if riemann_solver != 3")
149+
@:PROHIBIT(riemann_solver /= 3 .and. riemann_solver /= 5 .and. wave_speeds == dflt_int, "wave_speeds must be set if riemann_solver != 3,5")
150+
@:PROHIBIT(riemann_solver /= 3 .and. riemann_solver /= 5 .and. avg_state == dflt_int, "avg_state must be set if riemann_solver != 3,5")
151151
@:PROHIBIT(all(low_Mach /= (/0, 1, 2/)), "low_Mach must be 0, 1 or 2")
152152
@:PROHIBIT(riemann_solver /= 2 .and. low_Mach == 2, "low_Mach = 2 requires riemann_solver = 2")
153153
@:PROHIBIT(low_Mach /= 0 .and. all(model_eqns /= (/2, 3/)), "low_Mach = 1 or 2 requires model_eqns = 2 or 3")
154+
@:PROHIBIT(riemann_solver == 5 .and. cyl_coord .and. viscous, "Lax Friedrichs with cylincrical viscous flux not supported")
154155
end subroutine s_check_inputs_riemann_solver
155156

156157
!> Checks constraints on geometry and precision

0 commit comments

Comments
 (0)