1+ #!/usr/bin/env python3
2+ import math
3+ import json
4+
5+ # Numerical setup
6+ Nx = 201 # Number of grid points in x
7+ Ny = 201 # Number of grid points in y
8+ dx = 1. / (1. * (Nx + 1 )) # Grid spacing in x
9+ dy = 1. / (1. * (Ny + 1 )) # Grid spacing in y
10+
11+ Tend = 64E-06 # End time
12+ Nt = 2000 # 2000 # Number of time steps
13+ mydt = Tend / (1. * Nt ) # Time step size
14+
15+ # Configuring case dictionary
16+ print (json .dumps ({
17+ # Logistics ================================================
18+ 'run_time_info' : 'F' ,
19+ # ==========================================================
20+
21+ # Computational Domain Parameters ==========================
22+ 'x_domain%beg' : 0.E+00 , # x start
23+ 'x_domain%end' : 2.E+00 , # x end
24+ 'y_domain%beg' : 0.E+00 , # y start
25+ 'y_domain%end' : 1.E+00 , # y end
26+ 'm' : Nx , # Number of grid points in x direction
27+ 'n' : Ny , # Number of grid points in y direction
28+ 'p' : 0 , # Number of grid points in z (for 3D, change this)
29+ 'dt' : 1e-6 , # Time step size
30+ 't_step_start' : 0 , # Start time
31+ 't_step_stop' : Nt , # End time
32+ 't_step_save' : 10 , # Save frequency
33+ # ==========================================================
34+
35+ # Simulation Algorithm Parameters ==========================
36+ 'num_patches' : 1 , # Two patches
37+ 'model_eqns' : 2 , # Number of model equations
38+ 'alt_soundspeed' : 'F' ,
39+ 'num_fluids' : 2 ,
40+ 'low_Mach' : 0 ,
41+ 'mpp_lim' : 'F' ,
42+ # ' mixture_err' : 'F',
43+ 'time_stepper' : 3 ,
44+ 'weno_order' : 5 ,
45+ 'weno_eps' : 1.E-16 ,
46+ 'weno_Re_flux' : 'F' ,
47+ 'weno_avg' : 'F' ,
48+ 'mapped_weno' : 'F' ,
49+ 'null_weights' : 'F' ,
50+ 'mp_weno' : 'F' ,
51+ 'riemann_solver' : 1 ,
52+ 'wave_speeds' : 1 ,
53+ 'avg_state' : 2 ,
54+ 'bc_x%beg' : - 3 ,
55+ 'bc_x%end' : - 3 ,
56+ 'bc_y%beg' : - 3 , # Boundary conditions for y direction
57+ 'bc_y%end' : - 3 ,
58+ 'num_bc_patches' : 1 ,
59+ 'patch_bc(1)%type' : - 17 ,
60+ 'patch_bc(1)%dir' : 1 ,
61+ 'patch_bc(1)%loc' : - 1 ,
62+ 'patch_bc(1)%geometry' : 1 ,
63+ 'patch_bc(1)%centroid(1)' : 0 ,
64+ 'patch_bc(1)%centroid(2)' : 0.5 ,
65+ 'patch_bc(1)%length(2)' : 0.26 ,
66+ 'patch_bc(1)%vel(1)' : 10 ,
67+ 'patch_bc(1)%vel(2)' : 0 ,
68+ # ==========================================================
69+
70+ # Turning on IB ================================
71+ 'ib' : 'T' ,
72+ 'num_ibs' : 2 ,
73+
74+ # ==========================================================
75+
76+ # Formatted Database Files Structure Parameters ============
77+ 'format' : 1 ,
78+ 'precision' : 2 ,
79+ 'prim_vars_wrt' :'T' ,
80+ 'parallel_io' :'F' ,
81+ # ==========================================================
82+
83+ # Patch 1 (background flow) ===================
84+ 'patch_icpp(1)%geometry' : 3 , # 2D geometry
85+ 'patch_icpp(1)%x_centroid' : 1.0 , # x-center
86+ 'patch_icpp(1)%y_centroid' : 0.5 , # y-center
87+ 'patch_icpp(1)%length_x' : 2.0 , # x-length
88+ 'patch_icpp(1)%length_y' : 1.0 , # y-length
89+ 'patch_icpp(1)%vel(1)' : 0.0 ,
90+ 'patch_icpp(1)%vel(2)' : 0.0 , # y-velocity '100*sin(3*x*pi)'
91+ 'patch_icpp(1)%pres' : 1.E5 , # Pressure
92+ 'patch_icpp(1)%alpha_rho(1)' : 1000 , # Density
93+ 'patch_icpp(1)%alpha_rho(2)' : 0. ,
94+ 'patch_icpp(1)%alpha(1)' : 1 ,
95+ 'patch_icpp(1)%alpha(2)' : 0. ,
96+ 'patch_icpp(1)%tau_e(1)' : 0.0 ,
97+
98+
99+ # ==========================================================
100+
101+ # Patch 2 (hypo material in the center) ================
102+ 'patch_ib(1)%geometry' : 3 , # 2D geometry
103+ # 'patch_ib(1)%hcid' : 201,
104+ 'patch_ib(1)%x_centroid' : 0.5 , # x-center
105+ 'patch_ib(1)%y_centroid' : 0.65 , # y-center
106+ 'patch_ib(1)%length_x' : 1.0 , # x-length
107+ 'patch_ib(1)%length_y' : 0.04 , # y-length
108+ 'patch_ib(1)%slip' : 'T' ,
109+
110+ # ==========================================================
111+
112+ # Patch 3 (hypo material in the center) ================
113+ 'patch_ib(2)%geometry' : 3 , # 2D geometry
114+ # 'patch_ib(1)%hcid' : 201,
115+ 'patch_ib(2)%x_centroid' : 0.5 , # x-center
116+ 'patch_ib(2)%y_centroid' : 0.35 , # y-center
117+ 'patch_ib(2)%length_x' : 1.0 , # x-length
118+ 'patch_ib(2)%length_y' : 0.04 , # y-length
119+ 'patch_ib(2)%slip' : 'T' ,
120+
121+ # Fluids Physical Parameters ===============================
122+ 'fluid_pp(1)%gamma' : 1.E+00 / (6.12E+00 - 1.E+00 ),
123+ 'fluid_pp(1)%pi_inf' : 6.12E+00 * 3.43E+08 / (6.12E+00 - 1.E+00 ),
124+ # 'fluid_pp(1)%G' : 0,
125+ 'fluid_pp(2)%gamma' : 1.E+00 / (1.3E+00 - 1.E+00 ),
126+ 'fluid_pp(2)%pi_inf' : 1.3E+00 * 2.E+08 / (1.3E+00 - 1.E+00 ),
127+ # 'fluid_pp(2)%G' : 2.7E+05/(2.E+00*(1.E+00 + 0.4E+00)),
128+ 'fluid_pp(2)%G' : 1.E7 ,
129+ # ==========================================================
130+ }))
0 commit comments