Skip to content

Commit 5cf1983

Browse files
committed
Tests: Add READMEs & (single) Case Files (refactor)
1 parent 0799a28 commit 5cf1983

File tree

338 files changed

+25090
-54
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

338 files changed

+25090
-54
lines changed

.gitignore

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ __pycache__
1616

1717
.DS_Store
1818

19-
/tests/**/*.log
20-
/tests/*.txt
2119
/tests/*/**
22-
!/tests/golden.txt
20+
!/tests/*/golden.txt
21+
!/tests/*/case.py
22+
!/tests/*/README.md
2323

2424
# NVIDIA Nsight Compute
2525
*.nsys-rep

src/post_process/m_data_output.fpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -779,7 +779,7 @@ contains
779779
! Writing the curve object associated with the local process
780780
! to the formatted database slave file
781781
err = DBPUTCURVE(dbfile, trim(varname), len_trim(varname), &
782-
x_cc(0:m), q_sf, precision, m + 1, &
782+
x_cc(0:m), q_sf, DB_DOUBLE, m + 1, &
783783
DB_F77NULL, ierr)
784784
785785
! Assembling the local grid and flow variable data for the
@@ -798,7 +798,7 @@ contains
798798
err = DBPUTCURVE(dbroot, trim(varname), &
799799
len_trim(varname), &
800800
x_root_cc, q_root_sf, &
801-
precision, m_root + 1, &
801+
DB_DOUBLE, m_root + 1, &
802802
DB_F77NULL, ierr)
803803
end if
804804

tests/043B535A/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# tests/043B535A
2+
3+
2D -> 1 Fluid(s) -> riemann_solver=2 -> model_eqns=3: [case.py](case.py).

tests/043B535A/case.py

Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
#!/usr/bin/env python3
2+
#
3+
# tests/043B535A/case.py:
4+
# 2D -> 1 Fluid(s) -> riemann_solver=2 -> model_eqns=3
5+
6+
import json
7+
import argparse
8+
9+
parser = argparse.ArgumentParser(
10+
prog="tests/043B535A/case.py",
11+
description="tests/043B535A/case.py: 2D -> 1 Fluid(s) -> riemann_solver=2 -> model_eqns=3",
12+
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
13+
14+
parser.add_argument("dict", type=str, metavar="DICT", help=argparse.SUPPRESS)
15+
16+
ARGS = vars(parser.parse_args())
17+
18+
ARGS["dict"] = json.loads(ARGS["dict"])
19+
20+
case = {
21+
"run_time_info": "T",
22+
"m": 49,
23+
"n": 39,
24+
"p": 0,
25+
"dt": 0.0005,
26+
"t_step_start": 0,
27+
"t_step_stop": 50,
28+
"t_step_save": 50,
29+
"num_patches": 3,
30+
"model_eqns": 3,
31+
"alt_soundspeed": "F",
32+
"num_fluids": 1,
33+
"adv_alphan": "T",
34+
"mpp_lim": "F",
35+
"mixture_err": "F",
36+
"time_stepper": 3,
37+
"weno_order": 5,
38+
"weno_eps": 1e-16,
39+
"mapped_weno": "F",
40+
"null_weights": "F",
41+
"mp_weno": "F",
42+
"riemann_solver": 2,
43+
"wave_speeds": 1,
44+
"avg_state": 2,
45+
"format": 1,
46+
"precision": 2,
47+
"prim_vars_wrt": "F",
48+
"parallel_io": "F",
49+
"patch_icpp(1)%pres": 1.0,
50+
"patch_icpp(1)%alpha_rho(1)": 1.0,
51+
"patch_icpp(1)%alpha(1)": 1.0,
52+
"patch_icpp(2)%pres": 0.5,
53+
"patch_icpp(2)%alpha_rho(1)": 0.5,
54+
"patch_icpp(2)%alpha(1)": 1.0,
55+
"patch_icpp(3)%pres": 0.1,
56+
"patch_icpp(3)%alpha_rho(1)": 0.125,
57+
"patch_icpp(3)%alpha(1)": 1.0,
58+
"fluid_pp(1)%gamma": 2.5000000000000004,
59+
"fluid_pp(1)%pi_inf": 0.0,
60+
"bubbles": "F",
61+
"Ca": 0.9769178386380458,
62+
"Web": 13.927835051546392,
63+
"Re_inv": 0.009954269975623245,
64+
"pref": 101325.0,
65+
"rhoref": 1000.0,
66+
"bubble_model": 3,
67+
"polytropic": "T",
68+
"polydisperse": "F",
69+
"thermal": 3,
70+
"R0ref": 1e-05,
71+
"patch_icpp(1)%r0": 1,
72+
"patch_icpp(1)%v0": 0,
73+
"patch_icpp(2)%r0": 1,
74+
"patch_icpp(2)%v0": 0,
75+
"patch_icpp(3)%r0": 1,
76+
"patch_icpp(3)%v0": 0,
77+
"qbmm": "F",
78+
"dist_type": 2,
79+
"poly_sigma": 0.3,
80+
"R0_type": 1,
81+
"sigR": 0.1,
82+
"sigV": 0.1,
83+
"rhoRV": 0.0,
84+
"Monopole": "F",
85+
"num_mono": 1,
86+
"Mono(1)%loc(1)": 0.5,
87+
"Mono(1)%mag": 1.0,
88+
"Mono(1)%length": 0.25,
89+
"Mono(1)%dir": 1.0,
90+
"Mono(1)%npulse": 1,
91+
"Mono(1)%pulse": 1,
92+
"cu_mpi": "F",
93+
"x_domain%beg": 0.0,
94+
"x_domain%end": 1.0,
95+
"y_domain%beg": 0.0,
96+
"y_domain%end": 1.0,
97+
"bc_x%beg": -3,
98+
"bc_x%end": -3,
99+
"bc_y%beg": -3,
100+
"bc_y%end": -3,
101+
"patch_icpp(1)%geometry": 3,
102+
"patch_icpp(1)%y_centroid": 0.05,
103+
"patch_icpp(1)%length_y": 0.1,
104+
"patch_icpp(2)%y_centroid": 0.45,
105+
"patch_icpp(2)%length_y": 0.7,
106+
"patch_icpp(3)%y_centroid": 0.9,
107+
"patch_icpp(3)%length_y": 0.2,
108+
"patch_icpp(1)%x_centroid": 0.5,
109+
"patch_icpp(1)%length_x": 1,
110+
"patch_icpp(1)%vel(1)": 0.0,
111+
"patch_icpp(1)%vel(2)": 0.0,
112+
"patch_icpp(2)%geometry": 3,
113+
"patch_icpp(2)%x_centroid": 0.5,
114+
"patch_icpp(2)%length_x": 1,
115+
"patch_icpp(2)%vel(1)": 0.0,
116+
"patch_icpp(2)%vel(2)": 0.0,
117+
"patch_icpp(3)%geometry": 3,
118+
"patch_icpp(3)%x_centroid": 0.5,
119+
"patch_icpp(3)%length_x": 1,
120+
"patch_icpp(3)%vel(1)": 0.0,
121+
"patch_icpp(3)%vel(2)": 0.0
122+
}
123+
mods = {}
124+
125+
if "post_process" in ARGS["dict"]["targets"]:
126+
mods = {
127+
'parallel_io' : 'T', 'cons_vars_wrt' : 'T',
128+
'prim_vars_wrt': 'T', 'alpha_rho_wrt(1)': 'T',
129+
'rho_wrt' : 'T', 'mom_wrt(1)' : 'T',
130+
'vel_wrt(1)' : 'T', 'E_wrt' : 'T',
131+
'pres_wrt' : 'T', 'alpha_wrt(1)' : 'T',
132+
'gamma_wrt' : 'T', 'heat_ratio_wrt' : 'T',
133+
'pi_inf_wrt' : 'T', 'pres_inf_wrt' : 'T',
134+
'c_wrt' : 'T',
135+
}
136+
137+
if case['p'] != 0:
138+
mods['fd_order'] = 1
139+
mods['omega_wrt'] = 'T'
140+
141+
print(json.dumps({**case, **mods}))

tests/07C33719/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# tests/07C33719
2+
3+
3D -> Cylindrical -> Viscous: [case.py](case.py).

tests/07C33719/case.py

Lines changed: 171 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,171 @@
1+
#!/usr/bin/env python3
2+
#
3+
# tests/07C33719/case.py:
4+
# 3D -> Cylindrical -> Viscous
5+
6+
import json
7+
import argparse
8+
9+
parser = argparse.ArgumentParser(
10+
prog="tests/07C33719/case.py",
11+
description="tests/07C33719/case.py: 3D -> Cylindrical -> Viscous",
12+
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
13+
14+
parser.add_argument("dict", type=str, metavar="DICT", help=argparse.SUPPRESS)
15+
16+
ARGS = vars(parser.parse_args())
17+
18+
ARGS["dict"] = json.loads(ARGS["dict"])
19+
20+
case = {
21+
"run_time_info": "T",
22+
"m": 29,
23+
"n": 29,
24+
"p": 29,
25+
"dt": 1e-11,
26+
"t_step_start": 0,
27+
"t_step_stop": 50,
28+
"t_step_save": 50,
29+
"num_patches": 3,
30+
"model_eqns": 2,
31+
"alt_soundspeed": "F",
32+
"num_fluids": 2,
33+
"adv_alphan": "T",
34+
"mpp_lim": "F",
35+
"mixture_err": "F",
36+
"time_stepper": 3,
37+
"weno_order": 5,
38+
"weno_eps": 1e-16,
39+
"mapped_weno": "F",
40+
"null_weights": "F",
41+
"mp_weno": "F",
42+
"riemann_solver": 2,
43+
"wave_speeds": 1,
44+
"avg_state": 2,
45+
"format": 1,
46+
"precision": 2,
47+
"prim_vars_wrt": "F",
48+
"parallel_io": "F",
49+
"patch_icpp(1)%pres": 1.0,
50+
"patch_icpp(1)%alpha_rho(1)": 0.81,
51+
"patch_icpp(1)%alpha(1)": 0.9,
52+
"patch_icpp(2)%pres": 0.5,
53+
"patch_icpp(2)%alpha_rho(1)": 0.25,
54+
"patch_icpp(2)%alpha(1)": 0.5,
55+
"patch_icpp(3)%pres": 0.1,
56+
"patch_icpp(3)%alpha_rho(1)": 0.08,
57+
"patch_icpp(3)%alpha(1)": 0.2,
58+
"fluid_pp(1)%gamma": 2.5000000000000004,
59+
"fluid_pp(1)%pi_inf": 0.0,
60+
"bubbles": "F",
61+
"Ca": 0.9769178386380458,
62+
"Web": 13.927835051546392,
63+
"Re_inv": 0.009954269975623245,
64+
"pref": 101325.0,
65+
"rhoref": 1000.0,
66+
"bubble_model": 3,
67+
"polytropic": "T",
68+
"polydisperse": "F",
69+
"thermal": 3,
70+
"R0ref": 1e-05,
71+
"patch_icpp(1)%r0": 1,
72+
"patch_icpp(1)%v0": 0,
73+
"patch_icpp(2)%r0": 1,
74+
"patch_icpp(2)%v0": 0,
75+
"patch_icpp(3)%r0": 1,
76+
"patch_icpp(3)%v0": 0,
77+
"qbmm": "F",
78+
"dist_type": 2,
79+
"poly_sigma": 0.3,
80+
"R0_type": 1,
81+
"sigR": 0.1,
82+
"sigV": 0.1,
83+
"rhoRV": 0.0,
84+
"Monopole": "F",
85+
"num_mono": 1,
86+
"Mono(1)%loc(1)": 0.5,
87+
"Mono(1)%mag": 1.0,
88+
"Mono(1)%length": 0.25,
89+
"Mono(1)%dir": 1.0,
90+
"Mono(1)%npulse": 1,
91+
"Mono(1)%pulse": 1,
92+
"cu_mpi": "F",
93+
"x_domain%beg": 0.0,
94+
"x_domain%end": 5.0,
95+
"y_domain%beg": 0.0,
96+
"y_domain%end": 1.0,
97+
"z_domain%beg": 0.0,
98+
"z_domain%end": 6.283185307179586,
99+
"bc_x%beg": -3,
100+
"bc_x%end": -3,
101+
"bc_y%beg": -13,
102+
"bc_y%end": -3,
103+
"bc_z%beg": -1,
104+
"bc_z%end": -1,
105+
"patch_icpp(1)%geometry": 10,
106+
"patch_icpp(1)%z_centroid": 0.0,
107+
"patch_icpp(1)%length_z": -1000000.0,
108+
"patch_icpp(2)%z_centroid": 0.0,
109+
"patch_icpp(2)%length_z": -1000000.0,
110+
"patch_icpp(3)%z_centroid": 0.0,
111+
"patch_icpp(3)%length_z": -1000000.0,
112+
"patch_icpp(1)%y_centroid": 0.0,
113+
"patch_icpp(1)%length_y": -1000000.0,
114+
"patch_icpp(1)%x_centroid": 0.5,
115+
"patch_icpp(1)%length_x": 1.0,
116+
"patch_icpp(1)%vel(1)": 0.0,
117+
"patch_icpp(1)%vel(2)": 0.0,
118+
"patch_icpp(1)%vel(3)": 0.0,
119+
"patch_icpp(2)%geometry": 10,
120+
"patch_icpp(2)%y_centroid": 0.0,
121+
"patch_icpp(2)%length_y": -1000000.0,
122+
"patch_icpp(2)%x_centroid": 2.5,
123+
"patch_icpp(2)%length_x": 3.0,
124+
"patch_icpp(2)%vel(1)": 0.0,
125+
"patch_icpp(2)%vel(2)": 0.0,
126+
"patch_icpp(2)%vel(3)": 0.0,
127+
"patch_icpp(3)%geometry": 10,
128+
"patch_icpp(3)%y_centroid": 0.0,
129+
"patch_icpp(3)%length_y": -1000000.0,
130+
"patch_icpp(3)%x_centroid": 4.5,
131+
"patch_icpp(3)%length_x": 1.0,
132+
"patch_icpp(3)%vel(1)": 0.0,
133+
"patch_icpp(3)%vel(2)": 0.0,
134+
"patch_icpp(3)%vel(3)": 0.0,
135+
"cyl_coord": "T",
136+
"patch_icpp(1)%radius": 1.0,
137+
"patch_icpp(2)%radius": 1.0,
138+
"patch_icpp(3)%radius": 1.0,
139+
"fluid_pp(2)%gamma": 2.5,
140+
"fluid_pp(2)%pi_inf": 0.0,
141+
"patch_icpp(1)%alpha_rho(2)": 0.19,
142+
"patch_icpp(1)%alpha(2)": 0.1,
143+
"patch_icpp(2)%alpha_rho(2)": 0.25,
144+
"patch_icpp(2)%alpha(2)": 0.5,
145+
"patch_icpp(3)%alpha_rho(2)": 0.0225,
146+
"patch_icpp(3)%alpha(2)": 0.8,
147+
"fluid_pp(1)%Re(1)": 0.0001,
148+
"fluid_pp(1)%Re(2)": 0.0001,
149+
"fluid_pp(2)%Re(1)": 0.0001,
150+
"fluid_pp(2)%Re(2)": 0.0001,
151+
"weno_Re_flux": "F"
152+
}
153+
mods = {}
154+
155+
if "post_process" in ARGS["dict"]["targets"]:
156+
mods = {
157+
'parallel_io' : 'T', 'cons_vars_wrt' : 'T',
158+
'prim_vars_wrt': 'T', 'alpha_rho_wrt(1)': 'T',
159+
'rho_wrt' : 'T', 'mom_wrt(1)' : 'T',
160+
'vel_wrt(1)' : 'T', 'E_wrt' : 'T',
161+
'pres_wrt' : 'T', 'alpha_wrt(1)' : 'T',
162+
'gamma_wrt' : 'T', 'heat_ratio_wrt' : 'T',
163+
'pi_inf_wrt' : 'T', 'pres_inf_wrt' : 'T',
164+
'c_wrt' : 'T',
165+
}
166+
167+
if case['p'] != 0:
168+
mods['fd_order'] = 1
169+
mods['omega_wrt'] = 'T'
170+
171+
print(json.dumps({**case, **mods}))

tests/0879E062/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# tests/0879E062
2+
3+
1D -> 2 Fluid(s) -> riemann_solver=1 -> avg_state=1: [case.py](case.py).

0 commit comments

Comments
 (0)