Skip to content

Commit a4536e8

Browse files
authored
Acoustic Source: Fix Equations & Add Transducer Arrays & Refactor (#522)
1 parent b4dc8ad commit a4536e8

File tree

154 files changed

+16867
-778
lines changed

Some content is hidden

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

154 files changed

+16867
-778
lines changed

benchmarks/viscous_weno5_sgb_mono/case.py renamed to benchmarks/viscous_weno5_sgb_acoustic/case.py

Lines changed: 26 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
#!/usr/bin/env python3
22

3-
# Benchmark viscosity_weno_Re_flux_T_weno_order_5_bubbles_T_bubble_mode_3_monopole_T
3+
# Benchmark viscosity_weno_Re_flux_T_weno_order_5_bubbles_T_bubble_mode_3_acoustic_T
44
# Additional Benchmarked Features
55
# - viscosity enabled
66
# - weno_Re_flux : T
77
# - weno_order : 5
88
# - bubbles : T
99
# - bubble_model : 3
10-
# - monopole : T
10+
# - acoustic_source : T
1111

1212
import json, math, argparse
1313

@@ -28,7 +28,7 @@
2828
procs = DICT["nodes"] * DICT["tasks_per_node"]
2929
ncells = math.floor(ppg * procs * ARGS["gbpp"])
3030
s = math.floor((ncells / 2.0) ** (1/3))
31-
Nx, Ny, Nz = s, s, 2*s
31+
Nx, Ny, Nz = 2*s, s, s
3232

3333
x0 = 10.E-04
3434
y0 = 10.E-04
@@ -86,8 +86,8 @@
8686
cfl = 0.01
8787
Ldomain = 20.E-03
8888
L = Ldomain/x0
89-
dz = L/float(Nz)
90-
dt = cfl*dz*c0/cact
89+
dx = L/float(Nx)
90+
dt = cfl*dx*c0/cact
9191
Lpulse = 0.3*Ldomain
9292
Tpulse = Lpulse/cact
9393

@@ -98,12 +98,12 @@
9898
# ==========================================================
9999

100100
# Computational Domain Parameters ==========================
101-
'x_domain%beg' : -5.E-03/x0,
102-
'x_domain%end' : 5.E-03/x0,
101+
'x_domain%beg' : -10.E-03/x0,
102+
'x_domain%end' : 10.E-03/x0,
103103
'y_domain%beg' : -5.E-03/y0,
104-
'y_domain%end' : 5.E-03/y0,
105-
'z_domain%beg' : -10.E-03/z0,
106-
'z_domain%end' : 10.E-03/z0,
104+
'y_domain%end' : 5.E-03/y0,
105+
'z_domain%beg' : -5.E-03/z0,
106+
'z_domain%end' : 5.E-03/z0,
107107
'stretch_x' : 'F',
108108
'cyl_coord' : 'F',
109109
'm' : Nx,
@@ -154,9 +154,9 @@
154154
'patch_icpp(1)%x_centroid' : 0.,
155155
'patch_icpp(1)%y_centroid' : 0.,
156156
'patch_icpp(1)%z_centroid' : 0.,
157-
'patch_icpp(1)%length_x' : 10.E-03/x0,
157+
'patch_icpp(1)%length_x' : 20.E-03/x0,
158158
'patch_icpp(1)%length_y' : 10.E-03/y0,
159-
'patch_icpp(1)%length_z' : 20.E-03/z0,
159+
'patch_icpp(1)%length_z' : 10.E-03/z0,
160160
'patch_icpp(1)%vel(1)' : 0.0,
161161
'patch_icpp(1)%vel(2)' : 0.0,
162162
'patch_icpp(1)%vel(3)' : 0.0,
@@ -172,9 +172,9 @@
172172
'patch_icpp(2)%x_centroid' : 0.,
173173
'patch_icpp(2)%y_centroid' : 0.,
174174
'patch_icpp(2)%z_centroid' : 0.,
175-
'patch_icpp(2)%length_x' : 10.E-03/x0,
175+
'patch_icpp(2)%length_x' : 5.E-03/x0,
176176
'patch_icpp(2)%length_y' : 10.E-03/y0,
177-
'patch_icpp(2)%length_z' : 5.E-03/z0,
177+
'patch_icpp(2)%length_z' : 10.E-03/z0,
178178
'patch_icpp(2)%alter_patch(1)' : 'T',
179179
'patch_icpp(2)%vel(1)' : 0.0,
180180
'patch_icpp(2)%vel(2)' : 0.0,
@@ -228,15 +228,18 @@
228228
# ==========================================================
229229

230230
# Acoustic source ==========================================
231-
'Monopole' : 'T',
232-
'num_mono' : 1,
233-
'Mono(1)%support' : 4,
234-
'Mono(1)%loc(3)' : -5.E-03/x0,
235-
'Mono(1)%npulse' : 1,
236-
'Mono(1)%dir' : 1.,
237-
'Mono(1)%pulse' : 1,
238-
'Mono(1)%mag' : pa,
239-
'Mono(1)%length' : (1./(300000.))*cact/x0,
231+
'acoustic_source' : 'T',
232+
'num_source' : 1,
233+
'acoustic(1)%support' : 3,
234+
'acoustic(1)%loc(1)' : -5.E-03/x0,
235+
'acoustic(1)%loc(2)' : 0.,
236+
'acoustic(1)%length' : 1.0/x0,
237+
'acoustic(1)%height' : 1.0/x0,
238+
'acoustic(1)%npulse' : 1,
239+
'acoustic(1)%dir' : 1.,
240+
'acoustic(1)%pulse' : 1,
241+
'acoustic(1)%mag' : pa,
242+
'acoustic(1)%wavelength' : (1./(300000.))*cact/x0,
240243
# ==========================================================
241244
}))
242245

docs/documentation/case.md

Lines changed: 112 additions & 53 deletions
Large diffs are not rendered by default.

docs/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888
<div class="flex flex-row items-center">
8989
<img class="h-10 bg-white" src="res/logo.png" />
9090
<div class="flex-1 font-semibold text-center">
91-
Bubble collapse from monopole
91+
Bubble collapse from acoustic source
9292
</div>
9393
<a class="w-10 text-center" href="#">
9494
<i class="fa-solid fa-arrow-up-right-from-square"></i>
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
#!/usr/bin/env python3
2+
3+
import json
4+
5+
# Configuring case dictionary
6+
print(json.dumps({
7+
# Logistics ================================================================
8+
'run_time_info' : 'T',
9+
# ==========================================================================
10+
11+
# Computational Domain Parameters ==========================================
12+
'x_domain%beg' : 0,
13+
'x_domain%end' : 0.001,
14+
'm' : 199,
15+
'n' : 0,
16+
'p' : 0,
17+
'dt' : 2e-9,
18+
't_step_start' : 0,
19+
't_step_stop' : 250,
20+
't_step_save' : 1,
21+
# ==========================================================================
22+
23+
# Simulation Algorithm Parameters ==========================================
24+
'num_patches' : 1,
25+
'model_eqns' : 2,
26+
'alt_soundspeed' : 'F',
27+
'num_fluids' : 1,
28+
'adv_alphan' : 'T',
29+
'mpp_lim' : 'F',
30+
'mixture_err' : 'F',
31+
'time_stepper' : 3,
32+
'weno_order' : 5,
33+
'weno_eps' : 1.E-16,
34+
'teno' : 'T',
35+
'teno_CT' : 1E-8,
36+
'null_weights' : 'F',
37+
'mp_weno' : 'F',
38+
'riemann_solver' : 2,
39+
'wave_speeds' : 1,
40+
'avg_state' : 2,
41+
'bc_x%beg' : -6,
42+
'bc_x%end' : -6,
43+
# ==========================================================================
44+
45+
# Formatted Database Files Structure Parameters ============================
46+
'format' : 2,
47+
'precision' : 2,
48+
'prim_vars_wrt' :'T',
49+
'rho_wrt' :'T',
50+
'parallel_io' :'T',
51+
# ==========================================================================
52+
53+
# Patch 1 Liquid ===========================================================
54+
'patch_icpp(1)%geometry' : 1,
55+
'patch_icpp(1)%x_centroid' : 0.0005,
56+
'patch_icpp(1)%length_x' : 0.001,
57+
'patch_icpp(1)%vel(1)' : 0.0,
58+
'patch_icpp(1)%pres' : 1E+05,
59+
'patch_icpp(1)%alpha_rho(1)' : 1100,
60+
'patch_icpp(1)%alpha(1)' : 1.0,
61+
# ==========================================================================
62+
63+
# Acoustic source ==========================================================
64+
'acoustic_source' : 'T',
65+
'num_source' : 1,
66+
'acoustic(1)%support' : 1,
67+
'acoustic(1)%dipole' : 'T',
68+
'acoustic(1)%loc(1)' : 0.0005,
69+
'acoustic(1)%pulse' : 2,
70+
'acoustic(1)%npulse' : 1,
71+
'acoustic(1)%dir' : 1.,
72+
'acoustic(1)%mag' : 1.,
73+
'acoustic(1)%gauss_sigma_time' : 2E-8,
74+
'acoustic(1)%delay' : 1E-7,
75+
# ==========================================================================
76+
77+
# Fluids Physical Parameters ===============================================
78+
'fluid_pp(1)%gamma' : 1.E+00/(4.4E+00-1.E+00),
79+
'fluid_pp(1)%pi_inf' : 4.4E+00*5.57E+08/(4.4E+00 - 1.E+00),
80+
# ==========================================================================
81+
}))
82+
83+
# ==============================================================================
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
#!/usr/bin/env python3
2+
3+
import json
4+
5+
# Configuring case dictionary
6+
print(json.dumps({
7+
# Logistics ================================================================
8+
'run_time_info' : 'T',
9+
# ==========================================================================
10+
11+
# Computational Domain Parameters ==========================================
12+
'x_domain%beg' : 0,
13+
'x_domain%end' : 0.001,
14+
'm' : 199,
15+
'n' : 0,
16+
'p' : 0,
17+
'dt' : 2e-9,
18+
't_step_start' : 0,
19+
't_step_stop' : 250,
20+
't_step_save' : 1,
21+
# ==========================================================================
22+
23+
# Simulation Algorithm Parameters ==========================================
24+
'num_patches' : 1,
25+
'model_eqns' : 2,
26+
'alt_soundspeed' : 'F',
27+
'num_fluids' : 1,
28+
'adv_alphan' : 'T',
29+
'mpp_lim' : 'F',
30+
'mixture_err' : 'F',
31+
'time_stepper' : 3,
32+
'weno_order' : 5,
33+
'weno_eps' : 1.E-16,
34+
'teno' : 'T',
35+
'teno_CT' : 1E-8,
36+
'null_weights' : 'F',
37+
'mp_weno' : 'F',
38+
'riemann_solver' : 2,
39+
'wave_speeds' : 1,
40+
'avg_state' : 2,
41+
'bc_x%beg' : -6,
42+
'bc_x%end' : -6,
43+
# ==========================================================================
44+
45+
# Formatted Database Files Structure Parameters ============================
46+
'format' : 2,
47+
'precision' : 2,
48+
'prim_vars_wrt' :'T',
49+
'rho_wrt' :'T',
50+
'parallel_io' :'T',
51+
# ==========================================================================
52+
53+
# Patch 1 Liquid ===========================================================
54+
'patch_icpp(1)%geometry' : 1,
55+
'patch_icpp(1)%x_centroid' : 0.0005,
56+
'patch_icpp(1)%length_x' : 0.001,
57+
'patch_icpp(1)%vel(1)' : 0.0,
58+
'patch_icpp(1)%pres' : 1E+05,
59+
'patch_icpp(1)%alpha_rho(1)' : 1100,
60+
'patch_icpp(1)%alpha(1)' : 1.0,
61+
# ==========================================================================
62+
63+
# Acoustic source ==========================================================
64+
'acoustic_source' : 'T',
65+
'num_source' : 1,
66+
'acoustic(1)%support' : 1,
67+
'acoustic(1)%loc(1)' : 0.0001,
68+
'acoustic(1)%pulse' : 2,
69+
'acoustic(1)%npulse' : 1,
70+
'acoustic(1)%dir' : 1.,
71+
'acoustic(1)%mag' : 1.,
72+
'acoustic(1)%gauss_sigma_dist' : 2E-8*1493,
73+
'acoustic(1)%delay' : 1E-7,
74+
# ==========================================================================
75+
76+
# Fluids Physical Parameters ===============================================
77+
'fluid_pp(1)%gamma' : 1.E+00/(4.4E+00-1.E+00),
78+
'fluid_pp(1)%pi_inf' : 4.4E+00*5.57E+08/(4.4E+00 - 1.E+00),
79+
# ==========================================================================
80+
}))
81+
82+
# ==============================================================================
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
#!/usr/bin/env python3
2+
3+
import json
4+
5+
# Configuring case dictionary
6+
print(json.dumps({
7+
# Logistics ================================================================
8+
'run_time_info' : 'T',
9+
# ==========================================================================
10+
11+
# Computational Domain Parameters ==========================================
12+
'x_domain%beg' : 0,
13+
'x_domain%end' : 0.001,
14+
'm' : 199,
15+
'n' : 0,
16+
'p' : 0,
17+
'dt' : 2e-9,
18+
't_step_start' : 0,
19+
't_step_stop' : 250,
20+
't_step_save' : 1,
21+
# ==========================================================================
22+
23+
# Simulation Algorithm Parameters ==========================================
24+
'num_patches' : 1,
25+
'model_eqns' : 2,
26+
'alt_soundspeed' : 'F',
27+
'num_fluids' : 1,
28+
'adv_alphan' : 'T',
29+
'mpp_lim' : 'F',
30+
'mixture_err' : 'F',
31+
'time_stepper' : 3,
32+
'weno_order' : 5,
33+
'weno_eps' : 1.E-16,
34+
'teno' : 'T',
35+
'teno_CT' : 1E-8,
36+
'null_weights' : 'F',
37+
'mp_weno' : 'F',
38+
'riemann_solver' : 2,
39+
'wave_speeds' : 1,
40+
'avg_state' : 2,
41+
'bc_x%beg' : -6,
42+
'bc_x%end' : -6,
43+
# ==========================================================================
44+
45+
# Formatted Database Files Structure Parameters ============================
46+
'format' : 2,
47+
'precision' : 2,
48+
'prim_vars_wrt' :'T',
49+
'rho_wrt' :'T',
50+
'parallel_io' :'T',
51+
# ==========================================================================
52+
53+
# Patch 1 Liquid ===========================================================
54+
'patch_icpp(1)%geometry' : 1,
55+
'patch_icpp(1)%x_centroid' : 0.0005,
56+
'patch_icpp(1)%length_x' : 0.001,
57+
'patch_icpp(1)%vel(1)' : 0.0,
58+
'patch_icpp(1)%pres' : 1E+05,
59+
'patch_icpp(1)%alpha_rho(1)' : 1100,
60+
'patch_icpp(1)%alpha(1)' : 1.0,
61+
# ==========================================================================
62+
63+
# Acoustic source ==========================================================
64+
'acoustic_source' : 'T',
65+
'num_source' : 1,
66+
'acoustic(1)%support' : 1,
67+
'acoustic(1)%loc(1)' : 0.0001,
68+
'acoustic(1)%pulse' : 2,
69+
'acoustic(1)%npulse' : 1,
70+
'acoustic(1)%dir' : 1.,
71+
'acoustic(1)%mag' : 1.,
72+
'acoustic(1)%gauss_sigma_time' : 2E-8,
73+
'acoustic(1)%delay' : 1E-7,
74+
# ==========================================================================
75+
76+
# Fluids Physical Parameters ===============================================
77+
'fluid_pp(1)%gamma' : 1.E+00/(4.4E+00-1.E+00),
78+
'fluid_pp(1)%pi_inf' : 4.4E+00*5.57E+08/(4.4E+00 - 1.E+00),
79+
# ==========================================================================
80+
}))
81+
82+
# ==============================================================================

0 commit comments

Comments
 (0)