1 #include <deal.II/base/mpi.h> 2 #include <deal.II/base/utilities.h> 3 #include <deal.II/base/conditional_ostream.h> 5 #include "parameters_flow_solver.h" 10 #include <sys/types.h> 15 namespace Parameters {
19 prm.enter_subsection(
"flow_solver");
21 prm.declare_entry(
"flow_case_type",
"taylor_green_vortex",
22 dealii::Patterns::Selection(
23 " taylor_green_vortex | " 24 " decaying_homogeneous_isotropic_turbulence | " 25 " burgers_viscous_snapshot | " 27 " burgers_rewienski_snapshot | " 28 " burgers_inviscid | " 29 " convection_diffusion | " 31 " periodic_1D_unsteady | " 34 " isentropic_vortex | " 35 " kelvin_helmholtz_instability | " 36 " dipole_wall_collision_normal | " 37 " dipole_wall_collision_oblique | " 38 " non_periodic_cube_flow | " 41 " leblanc_shock_tube | " 42 " shu_osher_problem | " 43 " advection_limiter | " 45 " double_mach_reflection | " 46 " shock_diffraction | " 47 " astrophysical_jet | " 48 " strong_vortex_shock_wave | " 49 " turbulent_airfoil_3D |" 50 " multi_species_vortex_advection |" 51 " multi_species_vortex_advection_high_temp | " 52 " multi_species_sod_shock_tube |" 53 " multi_species_isentropic_vortex |" 54 " multi_species_taylor_green_vortex_smooth |" 55 " multi_species_taylor_green_vortex_sharp |"),
56 "The type of flow we want to simulate. " 58 " <taylor_green_vortex | " 59 " decaying_homogeneous_isotropic_turbulence | " 60 " burgers_viscous_snapshot | " 62 " burgers_rewienski_snapshot | " 63 " burgers_inviscid | " 64 " convection_diffusion | " 66 " periodic_1D_unsteady | " 69 " isentropic_vortex | " 70 " kelvin_helmholtz_instability | " 71 " dipole_wall_collision_normal | " 72 " dipole_wall_collision_oblique | " 73 " non_periodic_cube_flow | " 76 " leblanc_shock_tube | " 77 " shu_osher_problem | " 78 " advection_limiter | " 80 " double_mach_reflection | " 81 " shock_diffraction | " 82 " astrophysical_jet | " 83 " strong_vortex_shock_wave | " 84 " turbulent_airfoil_3D | " 85 " multi_species_vortex_advection | " 86 " multi_species_vortex_advection_high_temp " 87 " multi_species_sod_shock_tube | " 88 " multi_species_isentropic_vortex | " 89 " multi_species_taylor_green_vortex_smooth | " 90 " multi_species_taylor_green_vortex_sharp>. ");
92 prm.declare_entry(
"poly_degree",
"1",
93 dealii::Patterns::Integer(0, dealii::Patterns::Integer::max_int_value),
94 "Polynomial order (P) of the basis functions for DG.");
96 prm.declare_entry(
"max_poly_degree_for_adaptation",
"0",
97 dealii::Patterns::Integer(0, dealii::Patterns::Integer::max_int_value),
98 "Maxiumum possible polynomial order (P) of the basis functions for DG " 99 "when doing adaptive simulations. Default is 0 which actually sets " 100 "the value to poly_degree in the code, indicating no adaptation.");
102 prm.declare_entry(
"final_time",
"1",
103 dealii::Patterns::Double(0, dealii::Patterns::Double::max_double_value),
104 "Final solution time.");
106 prm.declare_entry(
"constant_time_step",
"0",
107 dealii::Patterns::Double(0, dealii::Patterns::Double::max_double_value),
108 "Constant time step.");
110 prm.declare_entry(
"courant_friedrichs_lewy_number",
"1",
111 dealii::Patterns::Double(0, dealii::Patterns::Double::max_double_value),
112 "Courant-Friedrich-Lewy (CFL) number for constant time step.");
114 prm.declare_entry(
"unsteady_data_table_filename",
"unsteady_data_table",
115 dealii::Patterns::FileName(dealii::Patterns::FileName::FileType::input),
116 "Filename of the unsteady data table output file: unsteady_data_table_filename.txt.");
118 prm.declare_entry(
"steady_state",
"false",
119 dealii::Patterns::Bool(),
120 "Solve steady-state solution. False by default (i.e. unsteady by default).");
122 prm.declare_entry(
"error_adaptive_time_step",
"false",
123 dealii::Patterns::Bool(),
124 "Adapt the time step on the fly for unsteady flow simulations according to an estimate of temporal error. False by default (i.e. constant time step by default).");
126 prm.declare_entry(
"adaptive_time_step",
"false",
127 dealii::Patterns::Bool(),
128 "Adapt the time step on the fly for unsteady flow simulations according to a CFL condition. False by default (i.e. constant time step by default).");
130 prm.declare_entry(
"steady_state_polynomial_ramping",
"false",
131 dealii::Patterns::Bool(),
132 "For steady-state cases, does polynomial ramping if set to true. False by default.");
134 prm.declare_entry(
"sensitivity_table_filename",
"sensitivity_table",
135 dealii::Patterns::FileName(dealii::Patterns::FileName::FileType::input),
136 "Filename for the sensitivity data table output file: sensitivity_table_filename.txt.");
138 prm.declare_entry(
"restart_computation_from_file",
"false",
139 dealii::Patterns::Bool(),
140 "Restarts the computation from the restart file. False by default.");
142 prm.declare_entry(
"output_restart_files",
"false",
143 dealii::Patterns::Bool(),
144 "Output restart files for restarting the computation. False by default.");
146 prm.declare_entry(
"restart_files_directory_name",
".",
147 dealii::Patterns::FileName(dealii::Patterns::FileName::FileType::input),
148 "Name of directory for writing and reading restart files. Current directory by default.");
150 prm.declare_entry(
"restart_file_index",
"1",
151 dealii::Patterns::Integer(1, dealii::Patterns::Integer::max_int_value),
152 "Index of restart file from which the computation will be restarted from. 1 by default.");
154 prm.declare_entry(
"output_restart_files_every_x_steps",
"1",
155 dealii::Patterns::Integer(1,dealii::Patterns::Integer::max_int_value),
156 "Outputs the restart files every x steps.");
158 prm.declare_entry(
"output_restart_files_every_dt_time_intervals",
"0.0",
159 dealii::Patterns::Double(0,dealii::Patterns::Double::max_double_value),
160 "Outputs the restart files at time intervals of dt.");
162 prm.declare_entry(
"write_unsteady_data_table_file_every_dt_time_intervals",
"0.0",
163 dealii::Patterns::Double(0,dealii::Patterns::Double::max_double_value),
164 "Writes the unsteady data table file at time intervals of dt. " 165 "If set to zero, it outputs at every time step.");
167 prm.declare_entry(
"expected_order_at_final_time",
"0.0",
168 dealii::Patterns::Double(0.0, 10.0),
169 "For convergence tests related to limiters, expected order of accuracy for final run.");
171 prm.enter_subsection(
"grid");
173 prm.declare_entry(
"input_mesh_filename",
"",
174 dealii::Patterns::FileName(dealii::Patterns::FileName::FileType::input),
175 "Filename of the input mesh: input_mesh_filename.msh. For cases that import a mesh file.");
177 prm.declare_entry(
"grid_degree",
"1",
178 dealii::Patterns::Integer(1, dealii::Patterns::Integer::max_int_value),
179 "Polynomial degree of the grid. Curvilinear grid if set greater than 1; default is 1.");
181 prm.declare_entry(
"grid_left_bound",
"0.0",
182 dealii::Patterns::Double(-dealii::Patterns::Double::max_double_value, dealii::Patterns::Double::max_double_value),
183 "Left bound of domain for hyper_cube mesh based cases.");
185 prm.declare_entry(
"grid_right_bound",
"1.0",
186 dealii::Patterns::Double(-dealii::Patterns::Double::max_double_value, dealii::Patterns::Double::max_double_value),
187 "Right bound of domain for hyper_cube mesh based cases.");
189 prm.declare_entry(
"number_of_grid_elements_per_dimension",
"4",
190 dealii::Patterns::Integer(1, dealii::Patterns::Integer::max_int_value),
191 "Number of grid elements per dimension for hyper_cube mesh based cases.");
193 prm.declare_entry(
"number_of_mesh_refinements",
"0",
194 dealii::Patterns::Integer(0, dealii::Patterns::Integer::max_int_value),
195 "Number of mesh refinements for Gaussian bump and naca0012 based cases.");
197 prm.declare_entry(
"use_gmsh_mesh",
"false",
198 dealii::Patterns::Bool(),
199 "Use the input .msh file which calls read_gmsh. False by default.");
201 prm.declare_entry(
"mesh_reader_verbose_output",
"false",
202 dealii::Patterns::Bool(),
203 "Flag for verbose (true) or quiet (false) mesh reader output.");
205 prm.enter_subsection(
"gmsh_boundary_IDs");
208 prm.declare_entry(
"use_periodic_BC_in_x",
"false",
209 dealii::Patterns::Bool(),
210 "Use periodic boundary condition in the x-direction. False by default.");
212 prm.declare_entry(
"use_periodic_BC_in_y",
"false",
213 dealii::Patterns::Bool(),
214 "Use periodic boundary condition in the y-direction. False by default.");
216 prm.declare_entry(
"use_periodic_BC_in_z",
"false",
217 dealii::Patterns::Bool(),
218 "Use periodic boundary condition in the z-direction. False by default.");
220 prm.declare_entry(
"x_periodic_id_face_1",
"2001",
221 dealii::Patterns::Integer(1, dealii::Patterns::Integer::max_int_value),
222 "Boundary ID for the first periodic boundary face in the x-direction.");
224 prm.declare_entry(
"x_periodic_id_face_2",
"2002",
225 dealii::Patterns::Integer(1, dealii::Patterns::Integer::max_int_value),
226 "Boundary ID for the second periodic boundary face in the x-direction.");
228 prm.declare_entry(
"y_periodic_id_face_1",
"2003",
229 dealii::Patterns::Integer(1, dealii::Patterns::Integer::max_int_value),
230 "Boundary ID for the first periodic boundary face in the y-direction.");
232 prm.declare_entry(
"y_periodic_id_face_2",
"2004",
233 dealii::Patterns::Integer(1, dealii::Patterns::Integer::max_int_value),
234 "Boundary ID for the second periodic boundary face in the y-direction.");
236 prm.declare_entry(
"z_periodic_id_face_1",
"2005",
237 dealii::Patterns::Integer(1, dealii::Patterns::Integer::max_int_value),
238 "Boundary ID for the first periodic boundary face in the z-direction.");
240 prm.declare_entry(
"z_periodic_id_face_2",
"2006",
241 dealii::Patterns::Integer(1, dealii::Patterns::Integer::max_int_value),
242 "Boundary ID for the second periodic boundary face in the z-direction.");
244 prm.leave_subsection();
246 prm.enter_subsection(
"gaussian_bump");
248 prm.declare_entry(
"channel_length",
"3.0",
249 dealii::Patterns::Double(0, dealii::Patterns::Double::max_double_value),
250 "Lenght of channel for gaussian bump meshes.");
252 prm.declare_entry(
"channel_height",
"0.8",
253 dealii::Patterns::Double(0, dealii::Patterns::Double::max_double_value),
254 "Height of channel for gaussian bump meshes.");
256 prm.declare_entry(
"bump_height",
"0.0625",
257 dealii::Patterns::Double(0, dealii::Patterns::Double::max_double_value),
258 "Height of the bump for gaussian bump meshes.");
260 prm.declare_entry(
"number_of_subdivisions_in_x_direction",
"0",
261 dealii::Patterns::Integer(0, dealii::Patterns::Integer::max_int_value),
262 "Number of subdivisions in the x direction for gaussian bump meshes.");
264 prm.declare_entry(
"number_of_subdivisions_in_y_direction",
"0",
265 dealii::Patterns::Integer(0, dealii::Patterns::Integer::max_int_value),
266 "Number of subdivisions in the y direction for gaussian bump meshes.");
268 prm.declare_entry(
"number_of_subdivisions_in_z_direction",
"0",
269 dealii::Patterns::Integer(0, dealii::Patterns::Integer::max_int_value),
270 "Number of subdivisions in the z direction for gaussian bump meshes.");
272 prm.leave_subsection();
274 prm.enter_subsection(
"grid_rectangle");
276 prm.declare_entry(
"grid_top_bound",
"0.0",
277 dealii::Patterns::Double(-dealii::Patterns::Double::max_double_value, dealii::Patterns::Double::max_double_value),
278 "Left bound of domain for hyper_cube mesh based cases.");
280 prm.declare_entry(
"grid_bottom_bound",
"0.0",
281 dealii::Patterns::Double(-dealii::Patterns::Double::max_double_value, dealii::Patterns::Double::max_double_value),
282 "Right bound of domain for hyper_cube mesh based cases.");
284 prm.declare_entry(
"grid_z_lower_bound",
"0.0",
285 dealii::Patterns::Double(-dealii::Patterns::Double::max_double_value, dealii::Patterns::Double::max_double_value),
286 "Left bound of domain for hyper_cube mesh based cases.");
288 prm.declare_entry(
"grid_z_upper_bound",
"0.0",
289 dealii::Patterns::Double(-dealii::Patterns::Double::max_double_value, dealii::Patterns::Double::max_double_value),
290 "Right bound of domain for hyper_cube mesh based cases.");
292 prm.declare_entry(
"number_of_grid_elements_x",
"1",
293 dealii::Patterns::Integer(1, dealii::Patterns::Integer::max_int_value),
294 "Number of grid elements in the x-direction.");
296 prm.declare_entry(
"number_of_grid_elements_y",
"1",
297 dealii::Patterns::Integer(1, dealii::Patterns::Integer::max_int_value),
298 "Number of grid elements in the y-direction.");
300 prm.declare_entry(
"number_of_grid_elements_z",
"1",
301 dealii::Patterns::Integer(1, dealii::Patterns::Integer::max_int_value),
302 "Number of grid elements in the z-direction.");
304 prm.leave_subsection();
307 prm.leave_subsection();
309 prm.enter_subsection(
"taylor_green_vortex");
311 prm.declare_entry(
"expected_kinetic_energy_at_final_time",
"1",
312 dealii::Patterns::Double(0, dealii::Patterns::Double::max_double_value),
313 "For integration test purposes, expected kinetic energy at final time.");
315 prm.declare_entry(
"expected_theoretical_dissipation_rate_at_final_time",
"1",
316 dealii::Patterns::Double(0, dealii::Patterns::Double::max_double_value),
317 "For integration test purposes, expected theoretical kinetic energy dissipation rate at final time.");
319 prm.declare_entry(
"density_initial_condition_type",
"uniform",
320 dealii::Patterns::Selection(
323 "The type of density initialization. " 328 prm.declare_entry(
"do_calculate_numerical_entropy",
"false",
329 dealii::Patterns::Bool(),
330 "Flag to calculate numerical entropy and write to file. By default, do not calculate.");
332 prm.declare_entry(
"check_nonphysical_flow_case_behavior",
"true",
333 dealii::Patterns::Bool(),
334 "Flag to check if non-physical case dependant behaviour is encounted. By default, false.");
336 prm.leave_subsection();
338 prm.enter_subsection(
"channel_flow");
340 prm.declare_entry(
"channel_friction_velocity_reynolds_number",
"590",
341 dealii::Patterns::Double(0, dealii::Patterns::Double::max_double_value),
342 "Channel Reynolds number based on wall friction velocity. Default is 590.");
344 prm.declare_entry(
"turbulent_channel_number_of_cells_x_direction",
"4",
345 dealii::Patterns::Integer(0, dealii::Patterns::Integer::max_int_value),
346 "Number of cells in the x-direction for channel flow case.");
348 prm.declare_entry(
"turbulent_channel_number_of_cells_y_direction",
"16",
349 dealii::Patterns::Integer(0, dealii::Patterns::Integer::max_int_value),
350 "Number of cells in the y-direction for channel flow case.");
352 prm.declare_entry(
"turbulent_channel_number_of_cells_z_direction",
"2",
353 dealii::Patterns::Integer(0, dealii::Patterns::Integer::max_int_value),
354 "Number of cells in the z-direction for channel flow case.");
356 prm.declare_entry(
"turbulent_channel_domain_length_x_direction",
"6.283185307179586476",
357 dealii::Patterns::Double(0, dealii::Patterns::Double::max_double_value),
358 "Channel domain length for x-direction. Default is 2*PI.");
360 prm.declare_entry(
"turbulent_channel_domain_length_y_direction",
"2.0",
361 dealii::Patterns::Double(0, dealii::Patterns::Double::max_double_value),
362 "Channel domain length for y-direction. Default is 2.0.");
364 prm.declare_entry(
"turbulent_channel_domain_length_z_direction",
"3.141592653589793238",
365 dealii::Patterns::Double(0, dealii::Patterns::Double::max_double_value),
366 "Channel domain length for x-direction. Default is PI.");
368 prm.declare_entry(
"turbulent_channel_mesh_stretching_function_type",
"gullbrand",
369 dealii::Patterns::Selection(
371 " carton_de_wiart_et_al | " 372 " uniform_mesh_no_stretching | " 374 "The type of mesh stretching function for channel flow case. " 377 " carton_de_wiart_et_al | " 378 " uniform_mesh_no_stretching | " 380 prm.declare_entry(
"xvelocity_initial_condition_type",
"laminar",
381 dealii::Patterns::Selection(
385 "The type of x-velocity initialization. " 390 prm.declare_entry(
"relaxation_coefficient_for_turbulent_channel_flow_source_term",
"0.0",
391 dealii::Patterns::Double(-dealii::Patterns::Double::max_double_value, dealii::Patterns::Double::max_double_value),
392 "Relaxation coefficient for the turbulent channel flow source term. Default is 0.");
393 prm.declare_entry(
"expected_average_wall_shear_stress_at_final_time",
"1",
394 dealii::Patterns::Double(0, dealii::Patterns::Double::max_double_value),
395 "For integration test purposes, expected average wall shear stress at final time.");
396 prm.declare_entry(
"expected_skin_friction_coefficient_at_final_time",
"1",
397 dealii::Patterns::Double(0, dealii::Patterns::Double::max_double_value),
398 "For integration test purposes, expected skin friction coefficient at final time.");
400 prm.leave_subsection();
402 prm.enter_subsection(
"dipole_wall_collision");
404 prm.declare_entry(
"do_use_stretched_mesh",
"false",
405 dealii::Patterns::Bool(),
406 "Flag to use stretched mesh. By default, false (i.e. use uniform mesh).");
407 prm.declare_entry(
"do_compute_angular_momentum",
"false",
408 dealii::Patterns::Bool(),
409 "Flag to compute the angular momentum. By default, false.");
410 prm.declare_entry(
"expected_enstrophy_at_final_time",
"1",
411 dealii::Patterns::Double(0, dealii::Patterns::Double::max_double_value),
412 "For integration test purposes, expected enstrophy at final time.");
413 prm.declare_entry(
"expected_palinstrophy_at_final_time",
"1",
414 dealii::Patterns::Double(0, dealii::Patterns::Double::max_double_value),
415 "For integration test purposes, expected palinstrophy at final time.");
417 prm.leave_subsection();
419 prm.enter_subsection(
"kelvin_helmholtz_instability");
421 prm.declare_entry(
"atwood_number",
"0.5",
422 dealii::Patterns::Double(0.0, 1.0),
423 "Atwood number, which characterizes the density difference " 424 "between the layers of fluid.");
426 prm.leave_subsection();
428 prm.enter_subsection(
"ESFR_parameter_tests");
430 prm.declare_entry(
"number_ESFR_parameter_values",
"0",
431 dealii::Patterns::Integer(),
432 "Number of tested ESFR parameter values");
433 prm.declare_entry(
"ESFR_parameter_values_start",
"1e-3",
434 dealii::Patterns::Double(0.0, dealii::Patterns::Double::max_double_value),
435 "Minimum ESFR parameter values >0 since logspace vector");
437 prm.declare_entry(
"ESFR_parameter_values_end",
"1e-3",
438 dealii::Patterns::Double(0.0, dealii::Patterns::Double::max_double_value),
439 "Maximum ESFR parameter values >0 since logspace vector");
441 prm.leave_subsection();
443 prm.declare_entry(
"apply_initial_condition_method",
"interpolate_initial_condition_function",
444 dealii::Patterns::Selection(
445 " interpolate_initial_condition_function | " 446 " project_initial_condition_function | " 447 " read_values_from_file_and_project "),
448 "The method used for applying the initial condition. " 450 " <interpolate_initial_condition_function | " 451 " project_initial_condition_function | " 452 " read_values_from_file_and_project>.");
454 prm.declare_entry(
"input_flow_setup_filename_prefix",
"setup",
455 dealii::Patterns::FileName(dealii::Patterns::FileName::FileType::input),
456 "Filename prefix of the input flow setup file. " 457 "Example: 'setup' for files named setup-0000i.dat, where i is the MPI rank. " 458 "For initializing the flow with values from a file. " 459 "To be set when apply_initial_condition_method is read_values_from_file_and_project.");
461 prm.enter_subsection(
"output_velocity_field");
463 prm.declare_entry(
"output_velocity_field_at_fixed_times",
"false",
464 dealii::Patterns::Bool(),
465 "Output velocity field (at equidistant nodes) at fixed times. False by default.");
467 prm.declare_entry(
"output_velocity_field_times_string",
" ",
468 dealii::Patterns::FileName(dealii::Patterns::FileName::FileType::input),
469 "String of the times at which to output the velocity field. " 470 "Example: '0.0 1.0 2.0 3.0 ' or '0.0 1.0 2.0 3.0'");
472 prm.declare_entry(
"output_vorticity_magnitude_field_in_addition_to_velocity",
"false",
473 dealii::Patterns::Bool(),
474 "Output vorticity magnitude field in addition to velocity field. False by default.");
476 prm.declare_entry(
"output_density_field_in_addition_to_velocity",
"false",
477 dealii::Patterns::Bool(),
478 "Output density field in addition to velocity field. False by default.");
479 prm.declare_entry(
"output_viscosity_field_in_addition_to_velocity",
"false",
480 dealii::Patterns::Bool(),
481 "Output viscosity field in addition to velocity field. False by default.");
483 prm.declare_entry(
"do_compute_time_averaged_solution",
"false",
484 dealii::Patterns::Bool(),
485 "Compute time-averaged solution for turbulent cases on the fly. False by default.");
486 prm.declare_entry(
"time_to_start_averaging",
"0.0",
487 dealii::Patterns::Double(0, dealii::Patterns::Double::max_double_value),
488 "Time to start time-averaged solution. 0.0 default.");
489 prm.declare_entry(
"do_compute_Reynolds_stress",
"false",
490 dealii::Patterns::Bool(),
491 "Compute Reynolds stresses on the fly. False by default.");
492 prm.declare_entry(
"time_to_start_computing_Reynolds_stress",
"0.0",
493 dealii::Patterns::Double(0, dealii::Patterns::Double::max_double_value),
494 "Time to start computing Reynolds stresse. 0.0 default.");
495 prm.declare_entry(
"output_flow_field_files_directory_name",
".",
496 dealii::Patterns::FileName(dealii::Patterns::FileName::FileType::input),
497 "Name of directory for writing flow field files. Current directory by default.");
499 prm.declare_entry(
"output_velocity_number_of_subvisions",
"2",
500 dealii::Patterns::Integer(1, dealii::Patterns::Integer::max_int_value),
501 "Number of subdivisions to apply when writting the velocity field at equidistant nodes.");
503 prm.leave_subsection();
505 prm.declare_entry(
"end_exactly_at_final_time",
"true",
506 dealii::Patterns::Bool(),
507 "Flag to adjust the last timestep such that the simulation " 508 "ends exactly at final_time. True by default.");
510 prm.declare_entry(
"do_compute_unsteady_data_and_write_to_table",
"true",
511 dealii::Patterns::Bool(),
512 "Flag for computing unsteady data and writting to table. True by default.");
514 prm.leave_subsection();
519 const int mpi_rank = dealii::Utilities::MPI::this_mpi_process(MPI_COMM_WORLD);
520 dealii::ConditionalOStream pcout(std::cout, mpi_rank==0);
521 prm.enter_subsection(
"flow_solver");
523 const std::string flow_case_type_string = prm.get(
"flow_case_type");
524 if (flow_case_type_string ==
"taylor_green_vortex") {
flow_case_type = taylor_green_vortex;}
525 else if (flow_case_type_string ==
"decaying_homogeneous_isotropic_turbulence")
527 else if (flow_case_type_string ==
"burgers_viscous_snapshot") {
flow_case_type = burgers_viscous_snapshot;}
528 else if (flow_case_type_string ==
"burgers_rewienski_snapshot") {
flow_case_type = burgers_rewienski_snapshot;}
529 else if (flow_case_type_string ==
"naca0012") {
flow_case_type = naca0012;}
530 else if (flow_case_type_string ==
"burgers_inviscid") {
flow_case_type = burgers_inviscid;}
531 else if (flow_case_type_string ==
"convection_diffusion") {
flow_case_type = convection_diffusion;}
532 else if (flow_case_type_string ==
"advection") {
flow_case_type = advection;}
533 else if (flow_case_type_string ==
"periodic_1D_unsteady") {
flow_case_type = periodic_1D_unsteady;}
534 else if (flow_case_type_string ==
"gaussian_bump") {
flow_case_type = gaussian_bump;}
535 else if (flow_case_type_string ==
"channel_flow") {
flow_case_type = channel_flow;}
536 else if (flow_case_type_string ==
"isentropic_vortex") {
flow_case_type = isentropic_vortex;}
537 else if (flow_case_type_string ==
"kelvin_helmholtz_instability")
539 else if (flow_case_type_string ==
"non_periodic_cube_flow") {
flow_case_type = non_periodic_cube_flow;}
540 else if (flow_case_type_string ==
"turbulent_airfoil_3D") {
flow_case_type = turbulent_airfoil_3D;}
542 else if (flow_case_type_string ==
"sod_shock_tube") {
flow_case_type = sod_shock_tube;}
543 else if (flow_case_type_string ==
"low_density") {
flow_case_type = low_density;}
544 else if (flow_case_type_string ==
"leblanc_shock_tube") {
flow_case_type = leblanc_shock_tube;}
545 else if (flow_case_type_string ==
"shu_osher_problem") {
flow_case_type = shu_osher_problem;}
546 else if (flow_case_type_string ==
"advection_limiter") {
flow_case_type = advection_limiter;}
547 else if (flow_case_type_string ==
"burgers_limiter") {
flow_case_type = burgers_limiter;}
548 else if (flow_case_type_string ==
"dipole_wall_collision_normal")
550 else if (flow_case_type_string ==
"dipole_wall_collision_oblique")
552 else if (flow_case_type_string ==
"double_mach_reflection") {
flow_case_type = double_mach_reflection;}
553 else if (flow_case_type_string ==
"shock_diffraction") {
flow_case_type = shock_diffraction;}
554 else if (flow_case_type_string ==
"astrophysical_jet") {
flow_case_type = astrophysical_jet;}
555 else if (flow_case_type_string ==
"strong_vortex_shock_wave") {
flow_case_type = strong_vortex_shock_wave;}
557 else if (flow_case_type_string ==
"multi_species_vortex_advection") {
flow_case_type = multi_species_vortex_advection;}
558 else if (flow_case_type_string ==
"multi_species_vortex_advection_high_temp") {
flow_case_type = multi_species_vortex_advection_high_temp;}
559 else if (flow_case_type_string ==
"multi_species_sod_shock_tube") {
flow_case_type = multi_species_sod_shock_tube;}
560 else if (flow_case_type_string ==
"multi_species_isentropic_vortex") {
flow_case_type = multi_species_isentropic_vortex;}
561 else if (flow_case_type_string ==
"multi_species_taylor_green_vortex_smooth") {
flow_case_type = multi_species_taylor_green_vortex_smooth;}
562 else if (flow_case_type_string ==
"multi_species_taylor_green_vortex_sharp") {
flow_case_type = multi_species_taylor_green_vortex_sharp;}
584 struct stat info_restart;
587 <<
"Please create the directory and restart. Aborting..." << std::endl;
597 prm.enter_subsection(
"grid");
608 prm.enter_subsection(
"gmsh_boundary_IDs");
620 prm.leave_subsection();
622 prm.enter_subsection(
"gaussian_bump");
631 prm.leave_subsection();
633 prm.enter_subsection(
"grid_rectangle");
644 prm.leave_subsection();
646 prm.leave_subsection();
649 prm.enter_subsection(
"taylor_green_vortex");
654 const std::string density_initial_condition_type_string = prm.get(
"density_initial_condition_type");
660 prm.leave_subsection();
662 prm.enter_subsection(
"channel_flow");
671 const std::string turbulent_channel_mesh_stretching_function_type_string = prm.get(
"turbulent_channel_mesh_stretching_function_type");
675 else if (turbulent_channel_mesh_stretching_function_type_string ==
"uniform_mesh_no_stretching")
677 const std::string xvelocity_initial_condition_type_string = prm.get(
"xvelocity_initial_condition_type");
685 prm.leave_subsection();
687 prm.enter_subsection(
"dipole_wall_collision");
694 prm.leave_subsection();
696 prm.enter_subsection(
"kelvin_helmholtz_instability");
700 prm.leave_subsection();
702 prm.enter_subsection(
"ESFR_parameter_tests");
708 prm.leave_subsection();
710 const std::string apply_initial_condition_method_string = prm.get(
"apply_initial_condition_method");
711 if (apply_initial_condition_method_string ==
"interpolate_initial_condition_function") {
apply_initial_condition_method = interpolate_initial_condition_function;}
712 else if (apply_initial_condition_method_string ==
"project_initial_condition_function") {
apply_initial_condition_method = project_initial_condition_function;}
713 else if (apply_initial_condition_method_string ==
"read_values_from_file_and_project") {
apply_initial_condition_method = read_values_from_file_and_project;}
717 prm.enter_subsection(
"output_velocity_field");
732 struct stat info_flow;
735 <<
"Please create the directory and restart. Aborting..." << std::endl;
741 prm.leave_subsection();
746 prm.leave_subsection();
bool do_compute_Reynolds_stress
Flag for computing time-averaged Reynolds stresses.
int number_of_subdivisions_in_y_direction
Number of subdivisions in y direction for gaussian bump case.
int y_periodic_id_face_2
Custom Boundary IDs for the second periodic face in the y-direction.
double channel_length
Width of channel for gaussian bump case.
double final_time
Final solution time.
int y_periodic_id_face_1
Custom Boundary IDs for the first periodic face in the y-direction.
double expected_average_wall_shear_stress_at_final_time
double output_restart_files_every_dt_time_intervals
Outputs the restart files at time intervals of dt.
bool error_adaptive_time_step
Computes time step based on error.
int x_periodic_id_face_1
Custom Boundary IDs for the first periodic face in the x-direction.
bool check_nonphysical_flow_case_behavior
For TGV, flag to check if non-physical case dependant behaviour is encounted.
int number_of_subdivisions_in_z_direction
Number of subdivisions in z direction for gaussian bump case.
FlowCaseType flow_case_type
Selected FlowCaseType from the input file.
unsigned int number_of_grid_elements_per_dimension
Number of grid elements per dimension for hyper_cube mesh based cases.
unsigned int number_of_grid_elements_z
Number of subdivisions in z direction for a rectangle grid.
bool steady_state
Flag for solving steady state solution.
int z_periodic_id_face_2
Custom Boundary IDs for the first periodic face in the z-direction.
int turbulent_channel_number_of_cells_z_direction
For channel flow, number of cells in z-direction.
double courant_friedrichs_lewy_number
Courant-Friedrichs-Lewy (CFL) number for constant time step.
bool adaptive_time_step
Flag for computing the time step on the fly.
bool output_vorticity_magnitude_field_in_addition_to_velocity
Flag for outputting vorticity magnitude field in addition to velocity field.
int turbulent_channel_number_of_cells_x_direction
For channel flow, number of cells in x-direction.
bool output_velocity_field_at_fixed_times
Flag for outputting velocity field at fixed times.
double turbulent_channel_domain_length_y_direction
For channel flow, domain length in y-direction.
int z_periodic_id_face_1
Custom Boundary IDs for the first periodic face in the z-direction.
double ESFR_parameter_values_start
For user defined FR parameter tests, value of starting FR param.
unsigned int grid_degree
Parameters related to mesh generation.
double constant_time_step
Constant time step.
double grid_bottom_bound
Minimum y bound of domain for a rectangle grid.
bool restart_computation_from_file
Restart computation from restart file.
double turbulent_channel_friction_velocity_reynolds_number
For channel flow, channel Reynolds number based on wall friction velocity.
XVelocityInitialConditionType xvelocity_initial_condition_type
Selected XVelocityInitialConditionType from the input file.
int number_ESFR_parameter_values
For user defined FR parameter tests, number of values to be tested.
double channel_height
Height of channel for gaussian bump case.
double ESFR_parameter_values_end
For user defined FR parameter tests, value of final FR param.
bool use_periodic_BC_in_z
Flag for using periodic boundary conditions in the z-direction.
bool output_restart_files
Output the restart files.
Files for the baseline physics.
void parse_parameters(dealii::ParameterHandler &prm)
Parses input file and sets the variables.
double time_to_start_averaging
Flag for starting time-averaged solution.
unsigned int output_velocity_number_of_subvisions
Number of subdivisions to apply when writting the velocity field at equidistant nodes.
double grid_z_lower_bound
Minimum z bound of domain for a rectangle grid.
double bump_height
Height of gaussian bump.
bool do_compute_angular_momentum
For dipole wall collision, flag to compute angular momentum.
bool mesh_reader_verbose_output
< Flag for verbose (true) or quiet (false) mesh reader output
bool output_viscosity_field_in_addition_to_velocity
Flag for outputting viscosity field in addition to velocity field.
unsigned int poly_degree
Polynomial order (P) of the basis functions for DG.
bool do_calculate_numerical_entropy
For TGV, flag to calculate and write numerical entropy.
bool steady_state_polynomial_ramping
Flag for steady state polynomial ramping.
double grid_z_upper_bound
Maximum z bound of domain for a rectangle grid.
std::string output_velocity_field_times_string
String of velocity field output times.
double grid_left_bound
Left bound of domain for hyper_cube mesh based cases.
double write_unsteady_data_table_file_every_dt_time_intervals
Writes the unsteady data table file at time intervals of dt.
std::string input_flow_setup_filename_prefix
double expected_palinstrophy_at_final_time
double expected_kinetic_energy_at_final_time
double expected_order_at_final_time
For limiter convergence tests, specify expected order at final time.
unsigned int restart_file_index
Index of desired restart file for restarting the computation from.
double expected_enstrophy_at_final_time
bool do_compute_unsteady_data_and_write_to_table
Flag for computing unsteady data and writting to table.
int output_restart_files_every_x_steps
Outputs the restart files every x steps.
unsigned int number_of_grid_elements_x
Number of subdivisions in x direction for a rectangle grid.
double grid_top_bound
Maximum y bound of domain for a rectangle grid.
double turbulent_channel_domain_length_z_direction
For channel flow, domain length in z-direction.
bool do_compute_time_averaged_solution
Flag for computing time-averaged solution.
bool use_periodic_BC_in_y
Flag for using periodic boundary conditions in the y-direction.
bool do_use_stretched_mesh
For dipole wall collision, flag to use stretched mesh.
double turbulent_channel_domain_length_x_direction
For channel flow, domain length in x-direction.
double expected_theoretical_dissipation_rate_at_final_time
std::string input_mesh_filename
bool end_exactly_at_final_time
Flag to adjust the last timestep such that the simulation ends exactly at final_time.
int number_of_mesh_refinements
Number of refinements for naca0012 and Gaussian bump based cases.
bool use_gmsh_mesh
< Flag for using input mesh file
int turbulent_channel_number_of_cells_y_direction
For channel flow, number of cells in y-direction.
unsigned int number_of_times_to_output_velocity_field
Number of fixed times to output the velocity field.
unsigned int number_of_grid_elements_y
Number of subdivisions in y direction for a rectangle grid.
std::string unsteady_data_table_filename
double atwood_number
For KHI, the atwood number.
TurbulentChannelMeshStretchingFunctionType turbulent_channel_mesh_stretching_function_type
Selected DensityInitialConditionType from the input file.
double time_to_start_computing_Reynolds_stress
Flag for starting to compute Reynolds stresses. This needs to be after the time-averaging has started...
double relaxation_coefficient_for_turbulent_channel_flow_source_term
For channel flow, relaxation coefficient for the source term.
int x_periodic_id_face_2
Custom Boundary IDs for the second periodic face in the x-direction.
static void declare_parameters(dealii::ParameterHandler &prm)
Declares the possible variables and sets the defaults.
double grid_right_bound
Right bound of domain for hyper_cube mesh based cases.
bool output_density_field_in_addition_to_velocity
Flag for outputting density field in addition to velocity field.
int number_of_subdivisions_in_x_direction
Number of subdivisions in x direction for gaussian bump case.
std::string restart_files_directory_name
Name of directory for writing and reading restart files.
std::string sensitivity_table_filename
ApplyInitialConditionMethod apply_initial_condition_method
Selected ApplyInitialConditionMethod from the input file.
double expected_skin_friction_coefficient_at_final_time
unsigned int max_poly_degree_for_adaptation
Maximum polynomial order of the DG basis functions for adaptation.
bool use_periodic_BC_in_x
Flag for using periodic boundary conditions in the x-direction.
DensityInitialConditionType density_initial_condition_type
Selected DensityInitialConditionType from the input file.
std::string output_flow_field_files_directory_name
Name of directory for writing flow field files.