Skip to content
2 changes: 0 additions & 2 deletions examples/1D_advection_convergence/case.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,8 @@
"patch_icpp(1)%alpha(2)": "0.5 - 0.2 * sin(2.0 * pi * x / lx)",
"fluid_pp(1)%gamma": 1.0 / (gamma - 1.0),
"fluid_pp(1)%eos": "ideal_gas",
"fluid_pp(1)%pi_inf": 0.0,
"fluid_pp(2)%gamma": 1.0 / (gamma - 1.0),
"fluid_pp(2)%eos": "ideal_gas",
"fluid_pp(2)%pi_inf": 0.0,
**scheme_params,
}
)
Expand Down
1 change: 0 additions & 1 deletion examples/1D_brio_wu/case.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@
# Fluids Physical Parameters
"fluid_pp(1)%gamma": 1.0e00 / (2.0e00 - 1.0e00),
"fluid_pp(1)%eos": "ideal_gas",
"fluid_pp(1)%pi_inf": 0.0,
}
)
)
1 change: 0 additions & 1 deletion examples/1D_brio_wu_hlld/case.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@
# Fluids Physical Parameters
"fluid_pp(1)%gamma": 1.0e00 / (2.0e00 - 1.0e00),
"fluid_pp(1)%eos": "ideal_gas",
"fluid_pp(1)%pi_inf": 0.0,
}
)
)
1 change: 0 additions & 1 deletion examples/1D_brio_wu_rmhd/case.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@
# Fluids Physical Parameters
"fluid_pp(1)%gamma": 1.0e00 / (2.0e00 - 1.0e00),
"fluid_pp(1)%eos": "ideal_gas",
"fluid_pp(1)%pi_inf": 0.0,
}
)
)
2 changes: 0 additions & 2 deletions examples/1D_convergence/case.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,8 @@
# Fluids Physical Parameters
"fluid_pp(1)%gamma": 1.0e00 / (1.4 - 1.0e00),
"fluid_pp(1)%eos": "ideal_gas",
"fluid_pp(1)%pi_inf": 0.0,
"fluid_pp(2)%gamma": 1.0e00 / (1.4 - 1.0e00),
"fluid_pp(2)%eos": "ideal_gas",
"fluid_pp(2)%pi_inf": 0.0,
}
)
)
1 change: 0 additions & 1 deletion examples/1D_dai_woodward/case.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@
# Fluids Physical Parameters
"fluid_pp(1)%gamma": 1.0e00 / ((5.0 / 3.0) - 1.0e00),
"fluid_pp(1)%eos": "ideal_gas",
"fluid_pp(1)%pi_inf": 0.0,
},
)
)
1 change: 0 additions & 1 deletion examples/1D_dai_woodward_hlld/case.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@
# Fluids Physical Parameters
"fluid_pp(1)%gamma": 1.0e00 / ((5.0 / 3.0) - 1.0e00),
"fluid_pp(1)%eos": "ideal_gas",
"fluid_pp(1)%pi_inf": 0.0,
},
)
)
1 change: 0 additions & 1 deletion examples/1D_euler_convergence/case.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@
"patch_icpp(1)%alpha(1)": 1.0,
"fluid_pp(1)%gamma": 1.0 / (gamma - 1.0),
"fluid_pp(1)%eos": "ideal_gas",
"fluid_pp(1)%pi_inf": 0.0,
**scheme_params,
}
)
Expand Down
1 change: 0 additions & 1 deletion examples/1D_hypo_2materials/case.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@
"fluid_pp(1)%G": 1.0e09,
"fluid_pp(2)%gamma": 1.0e00 / (1.4e00 - 1.0e00),
"fluid_pp(2)%eos": "ideal_gas",
"fluid_pp(2)%pi_inf": 0.0,
"fluid_pp(2)%G": 0.0,
}
)
Expand Down
1 change: 0 additions & 1 deletion examples/1D_kapilashocktube/case.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@
"fluid_pp(1)%pi_inf": 4.4e00 * 6.0e08 / (4.4e00 - 1.0e00),
"fluid_pp(2)%gamma": 1.0e00 / (1.4e00 - 1.0e00),
"fluid_pp(2)%eos": "ideal_gas",
"fluid_pp(2)%pi_inf": 0.0e00,
}
)
)
1 change: 0 additions & 1 deletion examples/1D_laxshocktube/case.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@
# air: an ideal gas, so it carries no stiffness and pi_inf is not read
"fluid_pp(1)%eos": "ideal_gas",
"fluid_pp(1)%gamma": 1.0e00 / (1.4 - 1.0e00),
"fluid_pp(1)%pi_inf": 0.0,
}
)
)
70 changes: 70 additions & 0 deletions examples/1D_mg_acoustic/case.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
"""
Right-moving acoustic pulse in a single Mie-Gruneisen fluid at its reference state.
The pulse is a simple wave (drho, dp = c^2 drho, du = c drho/rho0) so only the right-going
characteristic carries it; the harness measures its speed against the general analytic c.
"""

import argparse
import json
import math

parser = argparse.ArgumentParser(description="1D Mie-Gruneisen acoustic pulse")
parser.add_argument("--mfc", type=json.loads, default="{}", metavar="DICT")
parser.add_argument("-N", type=int, default=200)
parser.add_argument("--cfl", type=float, default=0.4)
args = parser.parse_args()

rho0, p0, c0, s, gruneisen = 1.0, 1.0, 1.0, 1.5, 0.4
c = math.sqrt(c0**2 + (1.0 + gruneisen) * p0 / rho0) # the frozen speed at the reference state
amp, x0, width = 1.0e-4, 0.3, 0.05
N, L, T_end = args.N, 1.0, 0.4
dt = args.cfl * (L / N) / c
Nt = math.ceil(T_end / dt)
dt = T_end / Nt
pulse = f"{amp}*exp(-((x - {x0})/{width})**2)"

print(
json.dumps(
{
"run_time_info": "F",
"x_domain%beg": 0.0,
"x_domain%end": L,
"m": N - 1,
"n": 0,
"p": 0,
"dt": dt,
"t_step_start": 0,
"t_step_stop": Nt,
"t_step_save": Nt,
"num_patches": 1,
"model_eqns": 2,
"num_fluids": 1,
"time_stepper": 3,
"recon_type": "weno",
"weno_order": 5,
"weno_eps": 1.0e-16,
"mapped_weno": "T",
"riemann_solver": 2,
"wave_speeds": 1,
"avg_state": 2,
"bc_x%beg": -3,
"bc_x%end": -3,
"format": 1,
"precision": 2,
"prim_vars_wrt": "T",
"parallel_io": "F",
"patch_icpp(1)%geometry": 1,
"patch_icpp(1)%x_centroid": 0.5,
"patch_icpp(1)%length_x": L,
"patch_icpp(1)%alpha_rho(1)": f"{rho0} + {pulse}",
"patch_icpp(1)%alpha(1)": 1.0,
"patch_icpp(1)%vel(1)": f"{c}/{rho0}*{pulse}",
"patch_icpp(1)%pres": f"{p0} + {c}**2*{pulse}",
"fluid_pp(1)%eos": "mie_gruneisen",
"fluid_pp(1)%mg_rho0": rho0,
"fluid_pp(1)%mg_c0": c0,
"fluid_pp(1)%mg_s": s,
"fluid_pp(1)%mg_gruneisen": gruneisen,
}
)
)
71 changes: 71 additions & 0 deletions examples/1D_mg_impact/case.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
"""
Symmetric impact of two Mie-Gruneisen slabs approaching at relative speed U.
Each slab is brought to rest by a shock with particle-velocity jump U/2, so the shock state
lies exactly on the Hugoniot u_s = c0 + s u_p; the harness checks the shock speed and the
plateau density against that relation.
"""

import argparse
import json
import math

parser = argparse.ArgumentParser(description="1D Mie-Gruneisen symmetric impact")
parser.add_argument("--mfc", type=json.loads, default="{}", metavar="DICT")
parser.add_argument("-N", type=int, default=800)
parser.add_argument("--U", type=float, default=1.0, help="closing speed of the two slabs")
parser.add_argument("--cfl", type=float, default=0.4)
args = parser.parse_args()

rho0, p0, c0, s, gruneisen = 1.0, 1.0e-3, 1.0, 1.5, 0.4
N, L, T_end = args.N, 1.0, 0.2
dt = args.cfl * (L / N) / (c0 + (s + 1.0) * args.U)
Nt = math.ceil(T_end / dt)
dt = T_end / Nt

case = {
"run_time_info": "F",
"x_domain%beg": 0.0,
"x_domain%end": L,
"m": N - 1,
"n": 0,
"p": 0,
"dt": dt,
"t_step_start": 0,
"t_step_stop": Nt,
"t_step_save": Nt,
"num_patches": 2,
"model_eqns": 2,
"num_fluids": 1,
"time_stepper": 3,
"recon_type": "weno",
"weno_order": 5,
"weno_eps": 1.0e-16,
"mapped_weno": "T",
"riemann_solver": 2,
"wave_speeds": 1,
"avg_state": 2,
"bc_x%beg": -3,
"bc_x%end": -3,
"format": 1,
"precision": 2,
"prim_vars_wrt": "T",
"parallel_io": "F",
"fluid_pp(1)%eos": "mie_gruneisen",
"fluid_pp(1)%mg_rho0": rho0,
"fluid_pp(1)%mg_c0": c0,
"fluid_pp(1)%mg_s": s,
"fluid_pp(1)%mg_gruneisen": gruneisen,
}
for pid, (x_c, vel) in enumerate([(0.25, 0.5 * args.U), (0.75, -0.5 * args.U)], start=1):
case.update(
{
f"patch_icpp({pid})%geometry": 1,
f"patch_icpp({pid})%x_centroid": x_c,
f"patch_icpp({pid})%length_x": 0.5 * L,
f"patch_icpp({pid})%alpha_rho(1)": rho0,
f"patch_icpp({pid})%alpha(1)": 1.0,
f"patch_icpp({pid})%vel(1)": vel,
f"patch_icpp({pid})%pres": p0,
}
)
print(json.dumps(case))
1 change: 0 additions & 1 deletion examples/1D_mhd_smooth_alfven_wave/case.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@
# Fluids Physical Parameters
"fluid_pp(1)%gamma": 1.0e00 / (5.0 / 3.0 - 1.0e00),
"fluid_pp(1)%eos": "ideal_gas",
"fluid_pp(1)%pi_inf": 0.0,
}
)
)
1 change: 0 additions & 1 deletion examples/1D_shuosher_analytical/case.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@
# Fluids Physical Parameters
"fluid_pp(1)%gamma": 1.0e00 / (1.4 - 1.0e00),
"fluid_pp(1)%eos": "ideal_gas",
"fluid_pp(1)%pi_inf": 0.0,
}
)
)
1 change: 0 additions & 1 deletion examples/1D_shuosher_old/case.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@
# Fluids Physical Parameters
"fluid_pp(1)%gamma": 1.0e00 / (1.4 - 1.0e00),
"fluid_pp(1)%eos": "ideal_gas",
"fluid_pp(1)%pi_inf": 0.0,
}
)
)
1 change: 0 additions & 1 deletion examples/1D_shuosher_teno5/case.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@
# Fluids Physical Parameters
"fluid_pp(1)%gamma": 1.0e00 / (1.4 - 1.0e00),
"fluid_pp(1)%eos": "ideal_gas",
"fluid_pp(1)%pi_inf": 0.0,
}
)
)
1 change: 0 additions & 1 deletion examples/1D_shuosher_teno7/case.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@
# Fluids Physical Parameters
"fluid_pp(1)%gamma": 1.0e00 / (1.4 - 1.0e00),
"fluid_pp(1)%eos": "ideal_gas",
"fluid_pp(1)%pi_inf": 0.0,
}
)
)
1 change: 0 additions & 1 deletion examples/1D_shuosher_wenojs5/case.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@
# Fluids Physical Parameters
"fluid_pp(1)%gamma": 1.0e00 / (1.4 - 1.0e00),
"fluid_pp(1)%eos": "ideal_gas",
"fluid_pp(1)%pi_inf": 0.0,
}
)
)
1 change: 0 additions & 1 deletion examples/1D_shuosher_wenom5/case.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@
# Fluids Physical Parameters
"fluid_pp(1)%gamma": 1.0e00 / (1.4 - 1.0e00),
"fluid_pp(1)%eos": "ideal_gas",
"fluid_pp(1)%pi_inf": 0.0,
}
)
)
1 change: 0 additions & 1 deletion examples/1D_shuosher_wenoz5/case.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@
# Fluids Physical Parameters
"fluid_pp(1)%gamma": 1.0e00 / (1.4 - 1.0e00),
"fluid_pp(1)%eos": "ideal_gas",
"fluid_pp(1)%pi_inf": 0.0,
}
)
)
1 change: 0 additions & 1 deletion examples/1D_sod_convergence/case.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@
"patch_icpp(2)%alpha(1)": 1.0,
"fluid_pp(1)%gamma": 1.0 / (gamma - 1.0),
"fluid_pp(1)%eos": "ideal_gas",
"fluid_pp(1)%pi_inf": 0.0,
**scheme_params,
}
)
Expand Down
1 change: 0 additions & 1 deletion examples/1D_sodshocktube/case.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@
# air: an ideal gas, so it carries no stiffness and pi_inf is not read
"fluid_pp(1)%eos": "ideal_gas",
"fluid_pp(1)%gamma": 1.0e00 / (1.4 - 1.0e00),
"fluid_pp(1)%pi_inf": 0.0,
}
)
)
1 change: 0 additions & 1 deletion examples/1D_sodshocktube_muscl/case.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@
# Fluids Physical Parameters
"fluid_pp(1)%gamma": 1.0e00 / (1.4 - 1.0e00),
"fluid_pp(1)%eos": "ideal_gas",
"fluid_pp(1)%pi_inf": 0.0,
}
)
)
1 change: 0 additions & 1 deletion examples/1D_titarevtorro/case.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@
# Fluids Physical Parameters
"fluid_pp(1)%gamma": 1.0e00 / (1.4 - 1.0e00),
"fluid_pp(1)%eos": "ideal_gas",
"fluid_pp(1)%pi_inf": 0.0,
}
)
)
1 change: 0 additions & 1 deletion examples/1D_titarevtorro_analytical/case.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@
# Fluids Physical Parameters
"fluid_pp(1)%gamma": 1.0e00 / (1.4 - 1.0e00),
"fluid_pp(1)%eos": "ideal_gas",
"fluid_pp(1)%pi_inf": 0.0,
}
)
)
1 change: 0 additions & 1 deletion examples/1D_vacuum/case.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@
"fluid_pp(1)%pi_inf": 4.4e00 * 6.0e08 / (4.4e00 - 1.0e00),
"fluid_pp(2)%gamma": 1.0e00 / (1.4e00 - 1.0e00),
"fluid_pp(2)%eos": "ideal_gas",
"fluid_pp(2)%pi_inf": 0.0e00,
}
)
)
1 change: 0 additions & 1 deletion examples/1D_vacuum_restart/case.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@
"fluid_pp(1)%pi_inf": 4.4e00 * 6.0e08 / (4.4e00 - 1.0e00),
"fluid_pp(2)%gamma": 1.0e00 / (1.4e00 - 1.0e00),
"fluid_pp(2)%eos": "ideal_gas",
"fluid_pp(2)%pi_inf": 0.0e00,
}
)
)
1 change: 0 additions & 1 deletion examples/2D_GreshoVortex/case.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@
# Fluids Physical Parameters
"fluid_pp(1)%gamma": 1.0e00 / (gam - 1.0e00),
"fluid_pp(1)%eos": "ideal_gas",
"fluid_pp(1)%pi_inf": 0.0,
}
)
)
2 changes: 0 additions & 2 deletions examples/2D_IGR_2fluid/case.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,9 @@
# Fluid Parameters (Gas)
"fluid_pp(1)%gamma": 1.0e00 / (1.4e00 - 1.0e00),
"fluid_pp(1)%eos": "ideal_gas",
"fluid_pp(1)%pi_inf": 0.0e00,
"fluid_pp(1)%Re(1)": 1e5,
"fluid_pp(2)%gamma": 1.0e00 / (1.4e00 - 1.0e00),
"fluid_pp(2)%eos": "ideal_gas",
"fluid_pp(2)%pi_inf": 0.0e00,
"fluid_pp(2)%Re(1)": 1e5,
# Ambient pressure
"patch_icpp(1)%geometry": 3,
Expand Down
2 changes: 0 additions & 2 deletions examples/2D_IGR_triple_point/case.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,8 @@
# Fluids Physical Parameters
"fluid_pp(1)%gamma": 1.0 / (1.5 - 1.0),
"fluid_pp(1)%eos": "ideal_gas",
"fluid_pp(1)%pi_inf": 0,
"fluid_pp(2)%gamma": 1.0 / (1.4 - 1.0),
"fluid_pp(2)%eos": "ideal_gas",
"fluid_pp(2)%pi_inf": 0.0,
}
)
)
1 change: 0 additions & 1 deletion examples/2D_TaylorGreenVortex/case.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@
# Fluids Physical Parameters
"fluid_pp(1)%gamma": 1.0e00 / (gam_a - 1.0e00),
"fluid_pp(1)%eos": "ideal_gas",
"fluid_pp(1)%pi_inf": 0.0,
# Shear viscosity of STD air
"fluid_pp(1)%Re(1)": 1 / Mu,
}
Expand Down
Loading
Loading