-
Notifications
You must be signed in to change notification settings - Fork 137
Expand file tree
/
Copy pathcase.py
More file actions
executable file
·81 lines (78 loc) · 2.41 KB
/
case.py
File metadata and controls
executable file
·81 lines (78 loc) · 2.41 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
79
80
81
#!/usr/bin/python
import json
import math
# Numerical setup
Nx = 399
dx = 1.0 / (1.0 * (Nx + 1))
Tend = 6.4e-05
Nt = 200
mydt = Tend / (1.0 * Nt)
# 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": Nx,
"n": 0,
"p": 0,
"dt": mydt,
"t_step_start": 0,
"t_step_stop": int(Nt),
"t_step_save": int(math.ceil(Nt / 1.0)),
# Simulation Algorithm Parameters
"num_patches": 2,
"model_eqns": 2,
"alt_soundspeed": "F",
"num_fluids": 1,
"mpp_lim": "F",
"mixture_err": "F",
"time_stepper": 3,
"weno_order": 3,
"weno_eps": 1.0e-16,
"weno_Re_flux": "F",
"weno_avg": "F",
"mapped_weno": "F",
"null_weights": "F",
"mp_weno": "F",
"riemann_solver": 1,
"wave_speeds": 1,
"avg_state": 2,
"bc_x%beg": -3,
"bc_x%end": -3,
# Turning on Hypoelasticity
"hypoelasticity": "T",
"fd_order": 4,
# Formatted Database Files Structure Parameters
"format": 1,
"precision": 2,
"prim_vars_wrt": "T",
"parallel_io": "F",
# Patch 1 L
"patch_icpp(1)%geometry": 1,
"patch_icpp(1)%x_centroid": 0.25,
"patch_icpp(1)%length_x": 0.5,
"patch_icpp(1)%vel(1)": 10.0,
"patch_icpp(1)%pres": 1e05,
"patch_icpp(1)%alpha_rho(1)": 1000,
"patch_icpp(1)%alpha(1)": 1.0,
"patch_icpp(1)%tau_e(1)": 0.0,
# Patch 2 R
"patch_icpp(2)%geometry": 1,
"patch_icpp(2)%x_centroid": 0.75,
"patch_icpp(2)%length_x": 0.5,
"patch_icpp(2)%vel(1)": -10.0,
"patch_icpp(2)%pres": 1e05,
"patch_icpp(2)%alpha_rho(1)": 1000,
"patch_icpp(2)%alpha(1)": 1.0,
"patch_icpp(2)%tau_e(1)": 0.0,
# Fluids Physical Parameters
"fluid_pp(1)%gamma": 1.0e00 / (4.4e00 - 1.0e00),
"fluid_pp(1)%pi_inf": 4.4e00 * 6.0e08 / (4.4e00 - 1.0e00),
"fluid_pp(1)%G": 0.5e09,
}
)
)