|
26 | 26 | s = math.floor((ncells / 2.0) ** (1/3)) |
27 | 27 | Nx, Ny, Nz = 2*s, s, s |
28 | 28 |
|
29 | | -Mu = 1.84E-05 |
30 | | -gam_a = 1.4 |
31 | | - |
32 | | -D = 0.1 |
33 | 29 |
|
34 | 30 | # Configuring case dictionary |
35 | 31 | print(json.dumps({ |
36 | | - # Logistics ================================================================ |
37 | | - 'run_time_info' : 'T', |
38 | | - # ========================================================================== |
39 | | - |
40 | | - # Computational Domain Parameters ========================================== |
41 | | - # x direction |
42 | | - 'x_domain%beg' : -5*D, |
43 | | - 'x_domain%end' : 5.0*D, |
44 | | - # y direction |
45 | | - 'y_domain%beg' : -2.5*D, |
46 | | - 'y_domain%end' : 2.5*D, |
47 | | - # z direction |
48 | | - 'z_domain%beg' : -2.5*D, |
49 | | - 'z_domain%end' : 2.5*D, |
50 | | - |
51 | | - 'cyl_coord' : 'F', |
52 | | - 'm' : Nx, |
53 | | - 'n' : Ny, |
54 | | - 'p' : Nz, |
55 | | - 'dt' : 1.0E-7, |
56 | | - 't_step_start' : 0, |
57 | | - 't_step_stop' : int(20*(45*size + 5)), |
58 | | - 't_step_save' : int(4*(45*size + 5)), |
59 | | - # ========================================================================== |
60 | | - |
61 | | - # Simulation Algorithm Parameters ========================================== |
62 | | - # Only one patches are necessary, the air tube |
63 | | - 'num_patches' : 1, |
64 | | - # Use the 5 equation model |
65 | | - 'model_eqns' : 2, |
66 | | - # 6 equations model does not need the K \div(u) term |
67 | | - 'alt_soundspeed' : 'F', |
68 | | - # One fluids: air |
69 | | - 'num_fluids' : 1, |
70 | | - # Advect both volume fractions |
71 | | - 'adv_alphan' : 'T', |
72 | | - # No need to ensure the volume fractions sum to unity at the end of each |
73 | | - # time step |
74 | | - 'mpp_lim' : 'F', |
75 | | - # Correct errors when computing speed of sound |
76 | | - 'mixture_err' : 'T', |
77 | | - # Use TVD RK3 for time marching |
78 | | - 'time_stepper' : 3, |
79 | | - # Reconstruct the primitive variables to minimize spurious |
80 | | - # Use WENO5 |
81 | | - 'weno_order' : 5, |
82 | | - 'weno_eps' : 1.E-16, |
83 | | - 'weno_Re_flux' : 'T', |
84 | | - 'weno_avg' : 'T', |
85 | | - 'avg_state' : 2, |
86 | | - 'mapped_weno' : 'T', |
87 | | - 'null_weights' : 'F', |
88 | | - 'mp_weno' : 'T', |
89 | | - 'riemann_solver' : 2, |
90 | | - 'wave_speeds' : 1, |
91 | | - # We use ghost-cell extrapolation |
92 | | - 'bc_x%beg' : -3, |
93 | | - 'bc_x%end' : -3, |
94 | | - 'bc_y%beg' : -3, |
95 | | - 'bc_y%end' : -3, |
96 | | - 'bc_z%beg' : -3, |
97 | | - 'bc_z%end' : -3, |
98 | | - # Set IB to True and add 1 patch |
99 | | - 'ib' : 'T', |
100 | | - 'num_ibs' : 1, |
101 | | - # ========================================================================== |
102 | | - |
103 | | - # Formatted Database Files Structure Parameters ============================ |
104 | | - 'format' : 1, |
105 | | - 'precision' : 2, |
106 | | - 'prim_vars_wrt' :'T', |
107 | | - 'E_wrt' :'T', |
108 | | - 'parallel_io' :'T', |
109 | | - # ========================================================================== |
110 | | - |
111 | | - # Patch: Constant Tube filled with air ===================================== |
112 | | - # Specify the cylindrical air tube grid geometry |
113 | | - 'patch_icpp(1)%geometry' : 9, |
114 | | - 'patch_icpp(1)%x_centroid' : 0.0, |
115 | | - # Uniform medium density, centroid is at the center of the domain |
116 | | - 'patch_icpp(1)%y_centroid' : 0.0, |
117 | | - 'patch_icpp(1)%z_centroid' : 0.0, |
118 | | - 'patch_icpp(1)%length_x' : 10*D, |
119 | | - 'patch_icpp(1)%length_y' : 5*D, |
120 | | - 'patch_icpp(1)%length_z' : 5*D, |
121 | | - # Specify the patch primitive variables |
122 | | - 'patch_icpp(1)%vel(1)' : 527.2E+00, |
123 | | - 'patch_icpp(1)%vel(2)' : 0.0E+00, |
124 | | - 'patch_icpp(1)%vel(3)' : 0.0E+00, |
125 | | - 'patch_icpp(1)%pres' : 10918.2549, |
126 | | - 'patch_icpp(1)%alpha_rho(1)' : 0.2199, |
127 | | - 'patch_icpp(1)%alpha(1)' : 1.E+00, |
128 | | - # # ======================================================================== |
129 | | - |
130 | | - # Patch: Sphere Immersed Boundary ======================================== |
131 | | - 'patch_ib(1)%geometry' : 8, |
132 | | - 'patch_ib(1)%x_centroid' : -3.0E-3, |
133 | | - 'patch_ib(1)%y_centroid' : 0.0, |
134 | | - 'patch_ib(1)%z_centroid' : 0.0, |
135 | | - 'patch_ib(1)%radius' : D/2, |
136 | | - 'patch_ib(1)%slip' : 'T', |
137 | | - # ========================================================================== |
138 | | - |
139 | | - # Fluids Physical Parameters =============================================== |
140 | | - 'fluid_pp(1)%gamma' : 1.E+00/(gam_a-1.E+00), # 2.50(Not 1.40) |
141 | | - 'fluid_pp(1)%pi_inf' : 0, |
142 | | - 'fluid_pp(1)%Re(1)' : 7535533.2, |
143 | | - # ========================================================================== |
| 32 | + # Logistics ================================================ |
| 33 | + 'run_time_info' : 'T', |
| 34 | + # ========================================================== |
| 35 | + |
| 36 | + # Computational Domain Parameters ========================== |
| 37 | + 'x_domain%beg' : 0.E+00, |
| 38 | + 'x_domain%end' : 1.E+00, |
| 39 | + 'y_domain%beg' : 0.E+00, |
| 40 | + 'y_domain%end' : 2.E+00, |
| 41 | + 'z_domain%beg' : 0.E+00, |
| 42 | + 'z_domain%end' : 1.E+00, |
| 43 | + 'm' : Nx, |
| 44 | + 'n' : Ny, |
| 45 | + 'p' : Nz, |
| 46 | + 'dt' : 1e-8, |
| 47 | + 't_step_start' : 0, |
| 48 | + 't_step_stop' : int(60*(95*size + 5)), |
| 49 | + 't_step_save' : int(12*(95*size + 5)), |
| 50 | + # ========================================================== |
| 51 | + |
| 52 | + # Simulation Algorithm Parameters ========================== |
| 53 | + 'num_patches' : 2, |
| 54 | + 'model_eqns' : 2, |
| 55 | + 'alt_soundspeed' : 'F', |
| 56 | + 'num_fluids' : 2, |
| 57 | + 'adv_alphan' : 'T', |
| 58 | + 'mpp_lim' : 'F', |
| 59 | + 'mixture_err' : 'F', |
| 60 | + 'time_stepper' : 3, |
| 61 | + 'weno_order' : 3, |
| 62 | + 'weno_eps' : 1.E-16, |
| 63 | + 'weno_Re_flux' : 'F', |
| 64 | + 'weno_avg' : 'F', |
| 65 | + 'mapped_weno' : 'F', |
| 66 | + 'null_weights' : 'F', |
| 67 | + 'mp_weno' : 'F', |
| 68 | + 'riemann_solver' : 1, |
| 69 | + 'wave_speeds' : 1, |
| 70 | + 'avg_state' : 2, |
| 71 | + 'bc_x%beg' : -3, |
| 72 | + 'bc_x%end' : -3, |
| 73 | + 'bc_y%beg' : -3, |
| 74 | + 'bc_y%end' : -3, |
| 75 | + 'bc_z%beg' : -3, |
| 76 | + 'bc_z%end' : -3, |
| 77 | + # ========================================================== |
| 78 | + |
| 79 | + # Turning on Hypoelasticity ================================ |
| 80 | + 'hypoelasticity' : 'T', |
| 81 | + # ========================================================== |
| 82 | + |
| 83 | + # Formatted Database Files Structure Parameters ============ |
| 84 | + 'format' : 1, |
| 85 | + 'precision' : 2, |
| 86 | + 'prim_vars_wrt' :'T', |
| 87 | + 'parallel_io' :'F', |
| 88 | + # ========================================================== |
| 89 | + |
| 90 | + # Patch 1 L ================================================ |
| 91 | + 'patch_icpp(1)%geometry' : 9, |
| 92 | + 'patch_icpp(1)%x_centroid' : 0.35, |
| 93 | + 'patch_icpp(1)%y_centroid' : 1.0, |
| 94 | + 'patch_icpp(1)%z_centroid' : 0.5, |
| 95 | + 'patch_icpp(1)%length_x' : 0.7, |
| 96 | + 'patch_icpp(1)%length_y' : 2, |
| 97 | + 'patch_icpp(1)%length_z' : 1, |
| 98 | + 'patch_icpp(1)%vel(1)' : 0.0, |
| 99 | + 'patch_icpp(1)%vel(2)' : 0.0, |
| 100 | + 'patch_icpp(1)%vel(3)' : 0.0, |
| 101 | + 'patch_icpp(1)%pres' : 1E+09, |
| 102 | + 'patch_icpp(1)%alpha_rho(1)' : 1000, |
| 103 | + 'patch_icpp(1)%alpha_rho(2)' : 0., |
| 104 | + 'patch_icpp(1)%alpha(1)' : 1, |
| 105 | + 'patch_icpp(1)%alpha(2)' : 0., |
| 106 | + 'patch_icpp(1)%tau_e(1)' : 0.0, |
| 107 | + # ========================================================== |
| 108 | + |
| 109 | + # Patch 2 R ================================================ |
| 110 | + 'patch_icpp(2)%geometry' : 9, |
| 111 | + 'patch_icpp(2)%x_centroid' : 0.85, |
| 112 | + 'patch_icpp(2)%y_centroid' : 1.0, |
| 113 | + 'patch_icpp(2)%z_centroid' : 0.5, |
| 114 | + 'patch_icpp(2)%length_x' : 0.3, |
| 115 | + 'patch_icpp(2)%length_y' : 2.0, |
| 116 | + 'patch_icpp(2)%length_z' : 1.0, |
| 117 | + 'patch_icpp(2)%vel(1)' : 0, |
| 118 | + 'patch_icpp(2)%vel(2)' : 0, |
| 119 | + 'patch_icpp(2)%vel(3)' : 0, |
| 120 | + 'patch_icpp(2)%pres' : 1E+05, |
| 121 | + 'patch_icpp(2)%alpha_rho(1)' : 0., |
| 122 | + 'patch_icpp(2)%alpha_rho(2)' : 50., |
| 123 | + 'patch_icpp(2)%alpha(1)' : 0, |
| 124 | + 'patch_icpp(2)%alpha(2)' : 1, |
| 125 | + 'patch_icpp(2)%tau_e(1)' : 0.0, |
| 126 | + # ========================================================== |
| 127 | + |
| 128 | + # Fluids Physical Parameters =============================== |
| 129 | + 'fluid_pp(1)%gamma' : 1.E+00/(4.4E+00-1.E+00), |
| 130 | + 'fluid_pp(1)%pi_inf' : 4.4E+00*6.E+08/(4.4E+00 - 1.E+00), |
| 131 | + 'fluid_pp(1)%G' : 1.E+09, |
| 132 | + 'fluid_pp(2)%gamma' : 1.E+00/(1.4E+00-1.E+00), |
| 133 | + 'fluid_pp(2)%pi_inf' : 0., |
| 134 | + 'fluid_pp(2)%G' : 0., |
| 135 | + # ========================================================== |
144 | 136 | })) |
| 137 | +# ============================================================================== |
0 commit comments