|
2 | 2 | import cantera as ct |
3 | 3 |
|
4 | 4 | parser = argparse.ArgumentParser( |
5 | | - prog="2D_detonation", |
| 5 | + prog="2D_Detonation", |
6 | 6 | formatter_class=argparse.ArgumentDefaultsHelpFormatter) |
7 | 7 |
|
8 | 8 | parser.add_argument("--mfc", type=json.loads, default='{}', metavar="DICT", |
|
87 | 87 | 'precision' : 2, |
88 | 88 | 'prim_vars_wrt' : 'T', |
89 | 89 | 'chem_wrt_T' : 'T', |
90 | | - 'vel_wrt(1)' : 'T', |
91 | | - 'vel_wrt(2)' : 'T', |
92 | | - 'pres_wrt' : 'T', |
93 | 90 | # ========================================================================== |
94 | | - # 'rho_wrt' : 'T', |
95 | | - |
96 | | - |
97 | 91 | 'patch_icpp(1)%geometry' : 3, |
98 | 92 | 'patch_icpp(1)%x_centroid' : L/2, |
99 | 93 | 'patch_icpp(1)%y_centroid' : L/8, |
|
104 | 98 | 'patch_icpp(1)%pres' : sol_R.P, |
105 | 99 | 'patch_icpp(1)%alpha(1)' : 1, |
106 | 100 | 'patch_icpp(1)%alpha_rho(1)' : sol_R.density, |
107 | | - # 'patch_icpp(1)%Y(1)' : 0.5, |
108 | | - # 'patch_icpp(1)%Y(2)' : 0.5, |
109 | 101 | # ========================================================================== |
110 | 102 | # ========================================================================== |
111 | 103 | # ========================================================================== |
112 | | - |
113 | 104 | 'patch_icpp(2)%geometry' : 7, |
114 | 105 | 'patch_icpp(2)%x_centroid' : L/4, |
115 | 106 | 'patch_icpp(2)%y_centroid' : L/8, |
|
124 | 115 | # 'patch_icpp(1)%alter_patch(1)' : 'F', |
125 | 116 | 'patch_icpp(2)%alter_patch(1)' : 'T', |
126 | 117 | # ========================================================================== |
127 | | - |
128 | | - # ========================================================================== |
129 | | - #'patch_icpp(3)%geometry' : 21, |
130 | | - #'patch_icpp(3)%x_centroid' : 3*L/2, |
131 | | - #'patch_icpp(3)%y_centroid' : L/4, |
132 | | - #'patch_icpp(3)%length_x' : L, |
133 | | - #'patch_icpp(3)%length_y' : L/2, |
134 | | - #'patch_icpp(3)%vel(1)' : 0, |
135 | | - #'patch_icpp(3)%vel(2)' : 100, |
136 | | - #'patch_icpp(3)%model_scale(1)' : 1/20.0, |
137 | | - #'patch_icpp(3)%model_scale(2)' : 1/2.0, |
138 | | - #'patch_icpp(3)%model_scale(3)' : 1/10.0, |
139 | | - #'patch_icpp(3)%model_translate(1)' : L/2+L/1.2, |
140 | | - #'patch_icpp(3)%model_translate(2)' : L/4, |
141 | | - #'patch_icpp(3)%model_translate(3)' : 0, |
142 | | - #'patch_icpp(3)%model_threshold' : 0.5, |
143 | | - #'patch_icpp(3)%model_spc' : 'mfc-small.stl', |
144 | | - #'patch_icpp(3)%pres' : 1000*sol_R.P, |
145 | | - #'patch_icpp(3)%alpha(1)' : 1, |
146 | | - #'patch_icpp(3)%alpha_rho(1)' : sol_R.density, |
147 | | - #'patch_icpp(3)%model_filepath' : 'mfc-small.stl', |
148 | | - #'patch_icpp(3)%alter_patch(1)' : 'T', |
149 | | - #'patch_icpp(3)%alter_patch(2)' : 'T', |
150 | | - # ========================================================================== |
151 | | - |
152 | | - # 'vel_wrt(1)' : 'T', |
153 | | - #'vel_wrt(2)' : 'T', |
154 | | - # 'pres_wrt' : 'T', |
155 | | - |
156 | 118 | # Fluids Physical Parameters =============================================== |
157 | 119 | 'fluid_pp(1)%gamma' : 1.0E+00/(4.4E+00-1.0E+00), |
158 | 120 | 'fluid_pp(1)%pi_inf' : 0, |
|
162 | 124 | if args.chemistry: |
163 | 125 | for i in range(len(sol_L.Y)): |
164 | 126 | case[f'chem_wrt_Y({1})'] = 'T' |
165 | | - case[f'patch_icpp(1)%Y({i+1})'] = sol_L.Y[i] |
166 | | - # case[f'patch_icpp(2)%Y({i+1})'] = sol_L.Y[i] |
167 | | - # #case[f'patch_icpp(3)%Y({i+1})'] = sol_L.Y[i] |
168 | 127 |
|
169 | 128 | if __name__ == '__main__': |
170 | 129 | print(json.dumps(case)) |
0 commit comments