Skip to content

Commit 1609707

Browse files
Add rotating mibms (#1014)
Co-authored-by: Ben Wilfong <[email protected]>
1 parent 5c9d069 commit 1609707

File tree

21 files changed

+1109
-412
lines changed

21 files changed

+1109
-412
lines changed

examples/2D_ibm_airfoil/case.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,12 @@
9494
"patch_ib(1)%t": 0.15,
9595
"patch_ib(1)%p": 0.4,
9696
"patch_ib(1)%m": 0.02,
97-
"patch_ib(1)%theta": 30,
97+
"patch_ib(1)%angles(3)": -0.5235987756, # 30 degrees clockwise rotation, in radians
9898
# Fluids Physical Parameters
9999
# Use the same stiffness as the air bubble
100-
"fluid_pp(1)%gamma": 1.0e00 / (gam_a - 1.0e00), # 2.50(Not 1.40)
100+
"fluid_pp(1)%gamma": 1.0e00 / (gam_a - 1.0e00), # 2.50 (Not 1.40)
101101
"fluid_pp(1)%pi_inf": 0,
102-
"fluid_pp(2)%gamma": 1.0e00 / (gam_b - 1.0e00), # 2.50(Not 1.40)
102+
"fluid_pp(2)%gamma": 1.0e00 / (gam_b - 1.0e00), # 2.50 (Not 1.40)
103103
"fluid_pp(2)%pi_inf": 0,
104104
}
105105
)
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
import json
2+
import math
3+
4+
Mu = 1.84e-05
5+
gam_a = 1.4
6+
7+
# Configuring case dictionary
8+
print(
9+
json.dumps(
10+
{
11+
# Logistics
12+
"run_time_info": "T",
13+
# Computational Domain Parameters
14+
# For these computations, the cylinder is placed at the (0,0,0)
15+
# domain origin.
16+
# axial direction
17+
"x_domain%beg": 0.0e00,
18+
"x_domain%end": 6.0e-03,
19+
# r direction
20+
"y_domain%beg": 0.0e00,
21+
"y_domain%end": 6.0e-03,
22+
"cyl_coord": "F",
23+
"m": 200,
24+
"n": 200,
25+
"p": 0,
26+
"dt": 6.0e-6,
27+
"t_step_start": 0,
28+
"t_step_stop": 2500, # 10000,
29+
"t_step_save": 250,
30+
# Simulation Algorithm Parameters
31+
# Only one patches are necessary, the air tube
32+
"num_patches": 1,
33+
# Use the 5 equation model
34+
"model_eqns": 2,
35+
"alt_soundspeed": "F",
36+
# One fluids: air
37+
"num_fluids": 1,
38+
# time step
39+
"mpp_lim": "F",
40+
# Correct errors when computing speed of sound
41+
"mixture_err": "T",
42+
# Use TVD RK3 for time marching
43+
"time_stepper": 3,
44+
# Use WENO5
45+
"weno_order": 5,
46+
"weno_eps": 1.0e-16,
47+
"weno_Re_flux": "T",
48+
"weno_avg": "T",
49+
"avg_state": 2,
50+
"mapped_weno": "T",
51+
"null_weights": "F",
52+
"mp_weno": "T",
53+
"riemann_solver": 2,
54+
"wave_speeds": 1,
55+
# We use ghost-cell
56+
"bc_x%beg": -3,
57+
"bc_x%end": -3,
58+
"bc_y%beg": -3,
59+
"bc_y%end": -3,
60+
# Set IB to True and add 1 patch
61+
"ib": "T",
62+
"num_ibs": 1,
63+
"viscous": "T",
64+
# Formatted Database Files Structure Parameters
65+
"format": 1,
66+
"precision": 2,
67+
"prim_vars_wrt": "T",
68+
"E_wrt": "T",
69+
"parallel_io": "T",
70+
# Patch: Constant Tube filled with air
71+
# Specify the cylindrical air tube grid geometry
72+
"patch_icpp(1)%geometry": 3,
73+
"patch_icpp(1)%x_centroid": 3.0e-03,
74+
# Uniform medium density, centroid is at the center of the domain
75+
"patch_icpp(1)%y_centroid": 3.0e-03,
76+
"patch_icpp(1)%length_x": 6.0e-03,
77+
"patch_icpp(1)%length_y": 6.0e-03,
78+
# Specify the patch primitive variables
79+
"patch_icpp(1)%vel(1)": 0.00e00,
80+
"patch_icpp(1)%vel(2)": 0.0e00,
81+
"patch_icpp(1)%pres": 1.0e00,
82+
"patch_icpp(1)%alpha_rho(1)": 1.0e00,
83+
"patch_icpp(1)%alpha(1)": 10.0e00,
84+
# Patch: Cylinder Immersed Boundary
85+
"patch_ib(1)%geometry": 3,
86+
"patch_ib(1)%x_centroid": 4.5e-03,
87+
"patch_ib(1)%y_centroid": 3.0e-03,
88+
"patch_ib(1)%length_x": 0.6e-03,
89+
"patch_ib(1)%length_y": 0.6e-03,
90+
"patch_ib(1)%slip": "F",
91+
"patch_ib(1)%moving_ibm": 1,
92+
"patch_ib(1)%vel(1)": -0.05,
93+
"patch_ib(1)%angles(1)": 0.0, # x-axis rotation in radians
94+
"patch_ib(1)%angles(2)": 0.0, # y-axis rotation
95+
"patch_ib(1)%angles(3)": 0.78539816339, # z-axis rotation
96+
"patch_ib(1)%angular_vel(1)": 0.0, # x-axis rotational velocity in radians per second
97+
"patch_ib(1)%angular_vel(2)": 0.0, # y-axis rotation
98+
"patch_ib(1)%angular_vel(3)": 100.0, # z-axis rotation
99+
# Fluids Physical Parameters
100+
"fluid_pp(1)%gamma": 1.0e00 / (gam_a - 1.0e00), # 2.50(Not 1.40)
101+
"fluid_pp(1)%pi_inf": 0,
102+
"fluid_pp(1)%Re(1)": 2500000,
103+
}
104+
)
105+
)
Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
import json
2+
import math
3+
4+
Mu = 1.84e-05
5+
gam_a = 1.4
6+
7+
# Configuring case dictionary
8+
print(
9+
json.dumps(
10+
{
11+
# Logistics
12+
"run_time_info": "T",
13+
# Computational Domain Parameters
14+
# For these computations, the sphere is placed (3,3,3)*e-3
15+
# domain origin.
16+
"x_domain%beg": 0.0e00,
17+
"x_domain%end": 6.0e-03,
18+
"y_domain%beg": 0.0e00,
19+
"y_domain%end": 6.0e-03,
20+
"z_domain%beg": 0.0e00,
21+
"z_domain%end": 6.0e-03,
22+
"cyl_coord": "F",
23+
"m": 49,
24+
"n": 49,
25+
"p": 49,
26+
"dt": 6.0e-6,
27+
"t_step_start": 0,
28+
"t_step_stop": 250,
29+
"t_step_save": 25,
30+
# Simulation Algorithm Parameters
31+
# Only one patches are necessary, the air tube
32+
"num_patches": 1,
33+
# Use the 5 equation model
34+
"model_eqns": 2,
35+
"alt_soundspeed": "F",
36+
# One fluids: air
37+
"num_fluids": 1,
38+
# time step
39+
"mpp_lim": "F",
40+
# Correct errors when computing speed of sound
41+
"mixture_err": "T",
42+
# Use TVD RK3 for time marching
43+
"time_stepper": 3,
44+
# Use WENO5
45+
"weno_order": 5,
46+
"weno_eps": 1.0e-16,
47+
"weno_Re_flux": "T",
48+
"weno_avg": "T",
49+
"avg_state": 2,
50+
"mapped_weno": "T",
51+
"null_weights": "F",
52+
"mp_weno": "T",
53+
"riemann_solver": 2,
54+
"wave_speeds": 1,
55+
# We use ghost-cell
56+
"bc_x%beg": -3,
57+
"bc_x%end": -3,
58+
"bc_y%beg": -3,
59+
"bc_y%end": -3,
60+
"bc_z%beg": -3,
61+
"bc_z%end": -3,
62+
# Set IB to True and add 1 patch
63+
"ib": "T",
64+
"num_ibs": 1,
65+
"viscous": "T",
66+
# Formatted Database Files Structure Parameters
67+
"format": 1,
68+
"precision": 2,
69+
"prim_vars_wrt": "T",
70+
"E_wrt": "T",
71+
"parallel_io": "T",
72+
# Patch: Constant Tube filled with air
73+
# Specify the cylindrical air tube grid geometry
74+
"patch_icpp(1)%geometry": 9,
75+
# Uniform medium density, centroid is at the center of the domain
76+
"patch_icpp(1)%x_centroid": 3.0e-03,
77+
"patch_icpp(1)%y_centroid": 3.0e-03,
78+
"patch_icpp(1)%z_centroid": 3.0e-03,
79+
"patch_icpp(1)%length_x": 6.0e-03,
80+
"patch_icpp(1)%length_y": 6.0e-03,
81+
"patch_icpp(1)%length_z": 6.0e-03,
82+
# Specify the patch primitive variables
83+
"patch_icpp(1)%vel(1)": 0.00e00,
84+
"patch_icpp(1)%vel(2)": 0.0e00,
85+
"patch_icpp(1)%vel(3)": 0.0e00,
86+
"patch_icpp(1)%pres": 1.0e00,
87+
"patch_icpp(1)%alpha_rho(1)": 1.0e00,
88+
"patch_icpp(1)%alpha(1)": 10.0e00,
89+
# Patch: Cylinder Immersed Boundary
90+
"patch_ib(1)%geometry": 8,
91+
"patch_ib(1)%x_centroid": 3.0e-03,
92+
"patch_ib(1)%y_centroid": 3.0e-03,
93+
"patch_ib(1)%z_centroid": 3.0e-03,
94+
"patch_ib(1)%radius": 1e-03,
95+
"patch_ib(1)%slip": "F",
96+
"patch_ib(1)%moving_ibm": 1,
97+
"patch_ib(1)%vel(1)": 0.0,
98+
"patch_ib(1)%angles(1)": 0.0, # x-axis rotation in radians
99+
"patch_ib(1)%angles(2)": 0.0, # y-axis rotation
100+
"patch_ib(1)%angles(3)": 0.0, # z-axis rotation
101+
"patch_ib(1)%angular_vel(1)": 0.0, # x-axis rotational velocity in radians per second
102+
"patch_ib(1)%angular_vel(2)": 0.0, # y-axis rotation
103+
"patch_ib(1)%angular_vel(3)": 100.0, # z-axis rotation
104+
# Fluids Physical Parameters
105+
"fluid_pp(1)%gamma": 1.0e00 / (gam_a - 1.0e00), # 2.50(Not 1.40)
106+
"fluid_pp(1)%pi_inf": 0,
107+
"fluid_pp(1)%Re(1)": 2500000,
108+
}
109+
)
110+
)

0 commit comments

Comments
 (0)