forked from MFlowCode/MFC
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcase.py
More file actions
74 lines (73 loc) · 2.59 KB
/
Copy pathcase.py
File metadata and controls
74 lines (73 loc) · 2.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#!/usr/bin/env python3
import json
# Configuring case dictionary
print(
json.dumps(
{
# Logistics
"run_time_info": "T",
# Computational Domain Parameters
"x_domain%beg": 0.0e00,
"x_domain%end": 1.0e00,
"m": 199,
"n": 0,
"p": 0,
"dt": 5.0e-08,
"t_step_start": 0,
"t_step_stop": 15000,
"t_step_save": 1000,
# Simulation Algorithm Parameters
"num_patches": 2,
"model_eqns": "6eq",
"alt_soundspeed": "F",
"num_fluids": 2,
"mpp_lim": "T",
"mixture_err": "T",
"time_stepper": "rk3",
"weno_order": 3,
"weno_eps": 1.0e-16,
"weno_Re_flux": "F",
"weno_avg": "F",
"mapped_weno": "T",
"null_weights": "F",
"mp_weno": "F",
"riemann_solver": "hllc",
"wave_speeds": "direct",
"avg_state": "arithmetic",
"bc_x%beg": -3,
"bc_x%end": -3,
# Formatted Database Files Structure Parameters
"format": "silo",
"precision": "double",
"prim_vars_wrt": "T",
"parallel_io": "T",
# Patch 1: Left state
"patch_icpp(1)%geometry": 1,
"patch_icpp(1)%x_centroid": 0.25e00,
"patch_icpp(1)%length_x": 0.5e00,
"patch_icpp(1)%vel(1)": -100.0e00,
"patch_icpp(1)%pres": 1.0e05,
"patch_icpp(1)%alpha_rho(1)": 1000.0e00 * 0.99e00,
"patch_icpp(1)%alpha_rho(2)": 10.0e00 * 0.01e00,
"patch_icpp(1)%alpha(1)": 0.99e00,
"patch_icpp(1)%alpha(2)": 0.01e00,
# Patch 2: Right state
"patch_icpp(2)%geometry": 1,
"patch_icpp(2)%x_centroid": 0.75e00,
"patch_icpp(2)%length_x": 0.5e00,
"patch_icpp(2)%alter_patch(1)": "T",
"patch_icpp(2)%vel(1)": 100.0e00,
"patch_icpp(2)%pres": 1.0e05,
"patch_icpp(2)%alpha_rho(1)": 1000.0e00 * 0.99e00,
"patch_icpp(2)%alpha_rho(2)": 10.0e00 * 0.01e00,
"patch_icpp(2)%alpha(1)": 0.99e00,
"patch_icpp(2)%alpha(2)": 0.01e00,
# Fluids Physical Parameters
"fluid_pp(1)%gamma": 1.0e00 / (4.4e00 - 1.0e00),
"fluid_pp(1)%eos": "stiffened_gas",
"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",
}
)
)