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
executable file
·103 lines (101 loc) · 3.54 KB
/
Copy pathcase.py
File metadata and controls
executable file
·103 lines (101 loc) · 3.54 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
#!/usr/bin/env python3
import json
import math
eps = 1e-8
Nx = 699
Ny = 299
print(
json.dumps(
{
# Logistics
"run_time_info": "F",
# Computational Domain Parameters
"x_domain%beg": 0.0,
"x_domain%end": 7.0,
"y_domain%beg": 0.0,
"y_domain%end": 3.0,
"m": int(Nx),
"n": int(Ny),
"p": 0,
"cfl_adap_dt": "T",
"cfl_target": 0.8,
"n_start": 0,
"t_stop": 4.0,
"t_save": 0.04,
# Simulation Algorithm Parameters
"num_patches": 3,
"model_eqns": "5eq",
"alt_soundspeed": "F",
"num_fluids": 2,
"time_stepper": "rk3",
"riemann_solver": "lax_friedrichs",
"elliptic_smoothing": "T",
"elliptic_smoothing_iters": 50,
"igr": "T",
"igr_order": 5,
"igr_iter_solver": 1,
"num_igr_iters": 3,
"num_igr_warm_start_iters": 30,
"alf_factor": 10,
"bc_x%beg": -3, # 11,
"bc_x%end": -3, # 12
"bc_y%beg": -3,
"bc_y%end": -3,
# Formatted Database Files Structure Parameters
"format": "silo",
"precision": "double",
"prim_vars_wrt": "T",
"schlieren_wrt": "T",
"fd_order": 4,
"schlieren_alpha(1)": 0.5,
"schlieren_alpha(2)": 0.5,
"parallel_io": "T",
# Patch 1: Left state
"patch_icpp(1)%geometry": 3,
"patch_icpp(1)%x_centroid": 0.5,
"patch_icpp(1)%y_centroid": 3,
"patch_icpp(1)%length_x": 1,
"patch_icpp(1)%length_y": 6,
"patch_icpp(1)%vel(1)": 0.0,
"patch_icpp(1)%vel(2)": 0.0,
"patch_icpp(1)%pres": 1.0,
"patch_icpp(1)%alpha_rho(1)": (1 - eps) * 1.0,
"patch_icpp(1)%alpha_rho(2)": eps,
"patch_icpp(1)%alpha(1)": 1 - eps,
"patch_icpp(1)%alpha(2)": eps,
# Patch 2: Top right state
"patch_icpp(2)%geometry": 3,
"patch_icpp(2)%alter_patch(1)": "T",
"patch_icpp(2)%x_centroid": 4,
"patch_icpp(2)%y_centroid": 2.25,
"patch_icpp(2)%length_x": 6,
"patch_icpp(2)%length_y": 1.5,
"patch_icpp(2)%vel(1)": 0.0,
"patch_icpp(2)%vel(2)": 0.0,
"patch_icpp(2)%pres": 0.1,
"patch_icpp(2)%alpha_rho(1)": (1 - eps) * 0.125,
"patch_icpp(2)%alpha_rho(2)": eps,
"patch_icpp(2)%alpha(1)": 1 - eps,
"patch_icpp(2)%alpha(2)": eps,
# Patch 3: Bottom right state
"patch_icpp(3)%geometry": 3,
"patch_icpp(3)%alter_patch(1)": "T",
"patch_icpp(3)%x_centroid": 4,
"patch_icpp(3)%y_centroid": 0.75,
"patch_icpp(3)%length_x": 6,
"patch_icpp(3)%length_y": 1.5,
"patch_icpp(3)%vel(1)": 0.0,
"patch_icpp(3)%vel(2)": 0.0,
"patch_icpp(3)%pres": 0.1,
"patch_icpp(3)%alpha_rho(1)": eps,
"patch_icpp(3)%alpha_rho(2)": (1 - eps) * 1.0,
"patch_icpp(3)%alpha(1)": eps, # 0.95
"patch_icpp(3)%alpha(2)": 1 - eps, # 0.05,
# Fluids Physical Parameters
"fluid_pp(1)%gamma": 1.0 / (1.5 - 1.0),
"fluid_pp(1)%eos": "ideal_gas",
"fluid_pp(2)%gamma": 1.0 / (1.4 - 1.0),
"fluid_pp(2)%eos": "ideal_gas",
}
)
)