Skip to content

Commit 5c307b7

Browse files
authored
fix gresho mach (#288)
inputs parameters are not case sensitive, so change the name to mach also we were missing the 1/2 in the p0 initialization
1 parent 1a76bf0 commit 5c307b7

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

pyro/compressible/problems/gresho.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
PROBLEM_PARAMS = {"gresho.rho0": 1.0, # density in the domain
1313
"gresho.r": 0.2, # radial location of peak velocity
14-
"gresho.M": 0.1, # Mach number
14+
"gresho.mach": 0.1, # Mach number
1515
"gresho.t_r": 1.0} # reference time (used for setting peak velocity)
1616

1717

@@ -36,7 +36,7 @@ def init_data(my_data, rp):
3636
gamma = rp.get_param("eos.gamma")
3737

3838
rho0 = rp.get_param("gresho.rho0")
39-
M = rp.get_param("gresho.M")
39+
M = rp.get_param("gresho.mach")
4040

4141
rr = rp.get_param("gresho.r")
4242
t_r = rp.get_param("gresho.t_r")
@@ -54,7 +54,7 @@ def init_data(my_data, rp):
5454
#
5555
# where u_phi peaks at 5 * rr
5656

57-
p0 = rho0 * q_r**2 * (5 * rr)**2 / (gamma * M**2)
57+
p0 = rho0 * q_r**2 * (5 * rr)**2 / (gamma * M**2) - 12.5 * rr**2
5858

5959
pres = myg.scratch_array()
6060
u_phi = myg.scratch_array()

pyro/compressible/problems/inputs.gresho

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ yrboundary = periodic
2727
[gresho]
2828
r = 0.2
2929
rho0 = 1.0
30-
M = 0.1
30+
mach = 0.1
3131
t_r = 1.0
3232

3333
[compressible]

0 commit comments

Comments
 (0)