-
Notifications
You must be signed in to change notification settings - Fork 145
Expand file tree
/
Copy pathcase.py
More file actions
78 lines (76 loc) · 2.42 KB
/
case.py
File metadata and controls
78 lines (76 loc) · 2.42 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
75
76
77
78
#!/usr/bin/env python3
import json
eps = 1e-9
# Configuring case dictionary
print(
json.dumps(
{
# Logistics
"run_time_info": "T",
# Computational Domain Parameters
"x_domain%beg": 0.0e00,
"x_domain%end": 4.0e00,
"stretch_x": "T",
"a_x": 7,
"x_stretch%beg": -2,
"x_stretch%end": 2,
"y_domain%beg": 0.0e00,
"y_domain%end": 4.0e00,
"stretch_y": "T",
"a_y": 7,
"y_stretch%beg": -2,
"y_stretch%end": 2,
"m": 199,
"n": 199,
"p": 0,
"dt": 5.0e-06,
"t_step_start": 0,
"t_step_stop": 2000,
"t_step_save": 200,
# Simulation Algorithm Parameters
"num_patches": 1,
"model_eqns": 3,
"alt_soundspeed": "F",
"num_fluids": 2,
"mpp_lim": "T",
"mixture_err": "T",
"time_stepper": 3,
"weno_order": 5,
"weno_eps": 1.0e-16,
"mapped_weno": "T",
"null_weights": "F",
"mp_weno": "F",
"riemann_solver": 2,
"wave_speeds": 1,
"avg_state": 2,
"bc_x%beg": -2,
"bc_x%end": -7,
"bc_y%beg": -2,
"bc_y%end": -7,
# Formatted Database Files Structure Parameters
"format": 1,
"precision": 2,
"prim_vars_wrt": "T",
"parallel_io": "T",
# Patch 1: Base
"patch_icpp(1)%geometry": 3,
"patch_icpp(1)%hcid": 200,
"patch_icpp(1)%x_centroid": 4.0,
"patch_icpp(1)%y_centroid": 4.0,
"patch_icpp(1)%length_x": 8.0,
"patch_icpp(1)%length_y": 8.0,
"patch_icpp(1)%vel(1)": 0.0,
"patch_icpp(1)%vel(2)": 0.0,
"patch_icpp(1)%pres": 10,
"patch_icpp(1)%alpha_rho(1)": (1 - eps) * 1000,
"patch_icpp(1)%alpha_rho(2)": eps * 1,
"patch_icpp(1)%alpha(1)": 1 - eps,
"patch_icpp(1)%alpha(2)": eps,
# Fluids Physical Parameters
"fluid_pp(1)%gamma": 1.0e00 / (2.35e00 - 1.0e00),
"fluid_pp(1)%pi_inf": 2.35e00 * 1.0e09 / (2.35e00 - 1.0e00),
"fluid_pp(2)%gamma": 1.0e00 / (1.4e00 - 1.0e00),
"fluid_pp(2)%pi_inf": 0.0e00,
}
)
)