Skip to content

Commit 9645ccb

Browse files
authored
Add simulation setup for 2D jet in crossflow
This script sets up parameters for a 2D jet in crossflow simulation, including free stream conditions, jet inlet conditions, viscosities, simulation parameters, and case dictionary for the simulation.
1 parent 1023a4f commit 9645ccb

1 file changed

Lines changed: 115 additions & 0 deletions

File tree

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
import math
2+
import json
3+
4+
#Free stream
5+
p_inf=16281
6+
rho_inf=0.416
7+
c_inf=math.sqrt(1.4*p_inf/rho_inf)
8+
vel_inf = 2.5*c_inf
9+
10+
#Jet inlet conditions
11+
p_J = 1.0 * p_inf
12+
vel_J = 41.0
13+
rho_J = 1000.0
14+
15+
#Viscosities
16+
mu_inf = 1.85e-5
17+
mu_J = 2.67e-3
18+
19+
d_jet = 1.2e-3
20+
21+
#Simulation parameters
22+
Ny = 3999
23+
Nx = 11999
24+
time_end = 5e-4
25+
cfl = 0.6
26+
eps=1e-8
27+
28+
#Case dictionary
29+
30+
print(
31+
json.dumps(
32+
{
33+
#Logistics
34+
"run_time_info": "T",
35+
#Computational domain parameters
36+
"x_domain%beg": -40*d_jet,
37+
"x_domain%end": 60*d_jet,
38+
"y_domain%beg": 0.0,
39+
"y_domain%end": 35*d_jet,
40+
"m": int(Nx),
41+
"n": int(Ny),
42+
"p": 0,
43+
"cfl_adap_dt": "T",
44+
"t_stop": time_end,
45+
"t_save": time_end/50,
46+
"n_start":0,
47+
"cfl_target": cfl,
48+
#Simulation algorithm parameters
49+
"num_patches": 2,
50+
"model_eqns": 3,
51+
"alt_soundspeed": "F",
52+
"num_fluids": 2,
53+
"mpp_lim": "T",
54+
"mixture_err": "F",
55+
"time_stepper": 3,
56+
"recon_type": 2,
57+
"muscl_order": 2,
58+
"muscl_lim": 1,
59+
"riemann_solver": 2,
60+
"wave_speeds": 1,
61+
"avg_state": 2,
62+
"elliptic_smoothing":"T",
63+
"elliptic_smoothing_iters": 10, #50,
64+
"bc_x%beg": -17,
65+
"bc_x%end": -12,
66+
"bc_y%beg": -17,
67+
"bc_y%end": -3,
68+
"num_bc_patches": 0,
69+
#Formatted Database File Structures
70+
"format": 1,
71+
"precision": 2,
72+
"prim_vars_wrt": "T",
73+
"parallel_io": "T",
74+
#Patch 1: Free stream
75+
"patch_icpp(1)%geometry": 3,
76+
"patch_icpp(1)%x_centroid": 0.0,
77+
"patch_icpp(1)%y_centroid":50*djet,
78+
"patch_icpp(1)%length_x": 1000*djet,
79+
"patch_icpp(1)%length_y": 1000*djet,
80+
"patch_icpp(1)%vel(1)": f"{vel_inf} * tanh(y / {d_jet / 4})",
81+
"patch_icpp(1)%vel(2)": 0.0,
82+
"patch_icpp(1)%pres": p_inf,
83+
"patch_icpp(1)%alpha_rho(1)": rho_inf*(1.0-eps),
84+
"patch_icpp(1)%alpha(1)": 1.0-eps,
85+
"patch_icpp(1)%alpha_rho(2)":eps,
86+
"patch_icpp(1)%alpha(2)": eps,
87+
#Patch 2: Jet
88+
"patch_icpp(2)%geometry": 3,
89+
"patch_icpp(2)%alter_patch(1)": "T",
90+
"patch_icpp(2)%x_centroid": 0.0,
91+
"patch_icpp(2)%y_centroid": 0.0,
92+
"patch_icpp(2)%length_x": d_jet,
93+
"patch_icpp(2)%length_y": d_jet,
94+
"patch_icpp(2)%vel(1)": 0.0,
95+
"patch_icpp(2)%vel(2)": vel_J,
96+
"patch_icpp(2)%pres": p_J,
97+
"patch_icpp(2)%alpha_rho(1)": eps,
98+
"patch_icpp(2)%alpha(1)": eps,
99+
"patch_icpp(2)%alpha_rho(2)":(1.0-eps)*rho_J,
100+
"patch_icpp(2)%alpha(2)": 1.0-eps,
101+
#Fluid properties
102+
"fluid_pp(1)%gamma": 1.00/(1.4-1.0),
103+
"fluid_pp(1)%pi_inf": 0.0,
104+
"fluid_pp(2)%gamma": 1.0/(6.12-1.0),
105+
"fluid_pp(2)%pi_inf": 6.12 * 3.43e8 / (6.12 - 1),
106+
"viscous": "T",
107+
"fluid_pp(1)%Re(1)": 1/mu_inf,
108+
"fluid_pp(2)%Re(1)": 1/mu_J,
109+
"surface_tension": "T",
110+
"cf_wrt": "T",
111+
"sigma": 0.072,
112+
}
113+
)
114+
)
115+

0 commit comments

Comments
 (0)