[P]arallel [Hi]gh-order [Li]brary for [P]DEs  Latest
Parallel High-Order Library for PDEs through hp-adaptive Discontinuous Galerkin methods
parameters_flow_solver.cpp
1 #include <deal.II/base/mpi.h>
2 #include <deal.II/base/utilities.h>
3 #include <deal.II/base/conditional_ostream.h>
4 
5 #include "parameters_flow_solver.h"
6 
7 #include <string>
8 
9 //for checking output directories
10 #include <sys/types.h>
11 #include <sys/stat.h>
12 
13 namespace PHiLiP {
14 
15 namespace Parameters {
16 
17 void FlowSolverParam::declare_parameters(dealii::ParameterHandler &prm)
18 {
19  prm.enter_subsection("flow_solver");
20  {
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 | "
26  " naca0012 | "
27  " burgers_rewienski_snapshot | "
28  " burgers_inviscid | "
29  " convection_diffusion | "
30  " advection | "
31  " periodic_1D_unsteady | "
32  " gaussian_bump | "
33  " isentropic_vortex | "
34  " kelvin_helmholtz_instability | "
35  " non_periodic_cube_flow | "
36  " sod_shock_tube | "
37  " low_density_2d | "
38  " leblanc_shock_tube | "
39  " shu_osher_problem | "
40  " advection_limiter | "
41  " burgers_limiter "),
42  "The type of flow we want to simulate. "
43  "Choices are "
44  " <taylor_green_vortex | "
45  " decaying_homogeneous_isotropic_turbulence | "
46  " burgers_viscous_snapshot | "
47  " naca0012 | "
48  " burgers_rewienski_snapshot | "
49  " burgers_inviscid | "
50  " convection_diffusion | "
51  " advection | "
52  " periodic_1D_unsteady | "
53  " gaussian_bump | "
54  " isentropic_vortex | "
55  " kelvin_helmholtz_instability | "
56  " non_periodic_cube_flow | "
57  " sod_shock_tube | "
58  " low_density_2d | "
59  " leblanc_shock_tube | "
60  " shu_osher_problem | "
61  " advection_limiter | "
62  " burgers_limiter >. ");
63 
64  prm.declare_entry("poly_degree", "1",
65  dealii::Patterns::Integer(0, dealii::Patterns::Integer::max_int_value),
66  "Polynomial order (P) of the basis functions for DG.");
67 
68  prm.declare_entry("max_poly_degree_for_adaptation", "0",
69  dealii::Patterns::Integer(0, dealii::Patterns::Integer::max_int_value),
70  "Maxiumum possible polynomial order (P) of the basis functions for DG "
71  "when doing adaptive simulations. Default is 0 which actually sets "
72  "the value to poly_degree in the code, indicating no adaptation.");
73 
74  prm.declare_entry("final_time", "1",
75  dealii::Patterns::Double(0, dealii::Patterns::Double::max_double_value),
76  "Final solution time.");
77 
78  prm.declare_entry("constant_time_step", "0",
79  dealii::Patterns::Double(0, dealii::Patterns::Double::max_double_value),
80  "Constant time step.");
81 
82  prm.declare_entry("courant_friedrichs_lewy_number", "1",
83  dealii::Patterns::Double(0, dealii::Patterns::Double::max_double_value),
84  "Courant-Friedrich-Lewy (CFL) number for constant time step.");
85 
86  prm.declare_entry("unsteady_data_table_filename", "unsteady_data_table",
87  dealii::Patterns::FileName(dealii::Patterns::FileName::FileType::input),
88  "Filename of the unsteady data table output file: unsteady_data_table_filename.txt.");
89 
90  prm.declare_entry("steady_state", "false",
91  dealii::Patterns::Bool(),
92  "Solve steady-state solution. False by default (i.e. unsteady by default).");
93 
94  prm.declare_entry("error_adaptive_time_step", "false",
95  dealii::Patterns::Bool(),
96  "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).");
97 
98  prm.declare_entry("adaptive_time_step", "false",
99  dealii::Patterns::Bool(),
100  "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).");
101 
102  prm.declare_entry("steady_state_polynomial_ramping", "false",
103  dealii::Patterns::Bool(),
104  "For steady-state cases, does polynomial ramping if set to true. False by default.");
105 
106  prm.declare_entry("sensitivity_table_filename", "sensitivity_table",
107  dealii::Patterns::FileName(dealii::Patterns::FileName::FileType::input),
108  "Filename for the sensitivity data table output file: sensitivity_table_filename.txt.");
109 
110  prm.declare_entry("restart_computation_from_file", "false",
111  dealii::Patterns::Bool(),
112  "Restarts the computation from the restart file. False by default.");
113 
114  prm.declare_entry("output_restart_files", "false",
115  dealii::Patterns::Bool(),
116  "Output restart files for restarting the computation. False by default.");
117 
118  prm.declare_entry("restart_files_directory_name", ".",
119  dealii::Patterns::FileName(dealii::Patterns::FileName::FileType::input),
120  "Name of directory for writing and reading restart files. Current directory by default.");
121 
122  prm.declare_entry("restart_file_index", "1",
123  dealii::Patterns::Integer(1, dealii::Patterns::Integer::max_int_value),
124  "Index of restart file from which the computation will be restarted from. 1 by default.");
125 
126  prm.declare_entry("output_restart_files_every_x_steps", "1",
127  dealii::Patterns::Integer(1,dealii::Patterns::Integer::max_int_value),
128  "Outputs the restart files every x steps.");
129 
130  prm.declare_entry("output_restart_files_every_dt_time_intervals", "0.0",
131  dealii::Patterns::Double(0,dealii::Patterns::Double::max_double_value),
132  "Outputs the restart files at time intervals of dt.");
133 
134  prm.enter_subsection("grid");
135  {
136  prm.declare_entry("input_mesh_filename", "",
137  dealii::Patterns::FileName(dealii::Patterns::FileName::FileType::input),
138  "Filename of the input mesh: input_mesh_filename.msh. For cases that import a mesh file.");
139 
140  prm.declare_entry("grid_degree", "1",
141  dealii::Patterns::Integer(1, dealii::Patterns::Integer::max_int_value),
142  "Polynomial degree of the grid. Curvilinear grid if set greater than 1; default is 1.");
143 
144  prm.declare_entry("grid_left_bound", "0.0",
145  dealii::Patterns::Double(-dealii::Patterns::Double::max_double_value, dealii::Patterns::Double::max_double_value),
146  "Left bound of domain for hyper_cube mesh based cases.");
147 
148  prm.declare_entry("grid_right_bound", "1.0",
149  dealii::Patterns::Double(-dealii::Patterns::Double::max_double_value, dealii::Patterns::Double::max_double_value),
150  "Right bound of domain for hyper_cube mesh based cases.");
151 
152  prm.declare_entry("number_of_grid_elements_per_dimension", "4",
153  dealii::Patterns::Integer(1, dealii::Patterns::Integer::max_int_value),
154  "Number of grid elements per dimension for hyper_cube mesh based cases.");
155 
156  prm.declare_entry("number_of_mesh_refinements", "0",
157  dealii::Patterns::Integer(0, dealii::Patterns::Integer::max_int_value),
158  "Number of mesh refinements for Gaussian bump and naca0012 based cases.");
159 
160  prm.declare_entry("use_gmsh_mesh", "false",
161  dealii::Patterns::Bool(),
162  "Use the input .msh file which calls read_gmsh. False by default.");
163 
164  prm.declare_entry("mesh_reader_verbose_output", "false",
165  dealii::Patterns::Bool(),
166  "Flag for verbose (true) or quiet (false) mesh reader output.");
167 
168  prm.enter_subsection("gmsh_boundary_IDs");
169  {
170 
171  prm.declare_entry("use_periodic_BC_in_x", "false",
172  dealii::Patterns::Bool(),
173  "Use periodic boundary condition in the x-direction. False by default.");
174 
175  prm.declare_entry("use_periodic_BC_in_y", "false",
176  dealii::Patterns::Bool(),
177  "Use periodic boundary condition in the y-direction. False by default.");
178 
179  prm.declare_entry("use_periodic_BC_in_z", "false",
180  dealii::Patterns::Bool(),
181  "Use periodic boundary condition in the z-direction. False by default.");
182 
183  prm.declare_entry("x_periodic_id_face_1", "2001",
184  dealii::Patterns::Integer(1, dealii::Patterns::Integer::max_int_value),
185  "Boundary ID for the first periodic boundary face in the x-direction.");
186 
187  prm.declare_entry("x_periodic_id_face_2", "2002",
188  dealii::Patterns::Integer(1, dealii::Patterns::Integer::max_int_value),
189  "Boundary ID for the second periodic boundary face in the x-direction.");
190 
191  prm.declare_entry("y_periodic_id_face_1", "2003",
192  dealii::Patterns::Integer(1, dealii::Patterns::Integer::max_int_value),
193  "Boundary ID for the first periodic boundary face in the y-direction.");
194 
195  prm.declare_entry("y_periodic_id_face_2", "2004",
196  dealii::Patterns::Integer(1, dealii::Patterns::Integer::max_int_value),
197  "Boundary ID for the second periodic boundary face in the y-direction.");
198 
199  prm.declare_entry("z_periodic_id_face_1", "2005",
200  dealii::Patterns::Integer(1, dealii::Patterns::Integer::max_int_value),
201  "Boundary ID for the first periodic boundary face in the z-direction.");
202 
203  prm.declare_entry("z_periodic_id_face_2", "2006",
204  dealii::Patterns::Integer(1, dealii::Patterns::Integer::max_int_value),
205  "Boundary ID for the second periodic boundary face in the z-direction.");
206  }
207  prm.leave_subsection();
208 
209  prm.enter_subsection("gaussian_bump");
210  {
211  prm.declare_entry("channel_length", "3.0",
212  dealii::Patterns::Double(0, dealii::Patterns::Double::max_double_value),
213  "Lenght of channel for gaussian bump meshes.");
214 
215  prm.declare_entry("channel_height", "0.8",
216  dealii::Patterns::Double(0, dealii::Patterns::Double::max_double_value),
217  "Height of channel for gaussian bump meshes.");
218 
219  prm.declare_entry("bump_height", "0.0625",
220  dealii::Patterns::Double(0, dealii::Patterns::Double::max_double_value),
221  "Height of the bump for gaussian bump meshes.");
222 
223  prm.declare_entry("number_of_subdivisions_in_x_direction", "0",
224  dealii::Patterns::Integer(0, dealii::Patterns::Integer::max_int_value),
225  "Number of subdivisions in the x direction for gaussian bump meshes.");
226 
227  prm.declare_entry("number_of_subdivisions_in_y_direction", "0",
228  dealii::Patterns::Integer(0, dealii::Patterns::Integer::max_int_value),
229  "Number of subdivisions in the y direction for gaussian bump meshes.");
230 
231  prm.declare_entry("number_of_subdivisions_in_z_direction", "0",
232  dealii::Patterns::Integer(0, dealii::Patterns::Integer::max_int_value),
233  "Number of subdivisions in the z direction for gaussian bump meshes.");
234  }
235  prm.leave_subsection();
236  }
237  prm.leave_subsection();
238 
239  prm.enter_subsection("taylor_green_vortex");
240  {
241  prm.declare_entry("expected_kinetic_energy_at_final_time", "1",
242  dealii::Patterns::Double(0, dealii::Patterns::Double::max_double_value),
243  "For integration test purposes, expected kinetic energy at final time.");
244 
245  prm.declare_entry("expected_theoretical_dissipation_rate_at_final_time", "1",
246  dealii::Patterns::Double(0, dealii::Patterns::Double::max_double_value),
247  "For integration test purposes, expected theoretical kinetic energy dissipation rate at final time.");
248 
249  prm.declare_entry("density_initial_condition_type", "uniform",
250  dealii::Patterns::Selection(
251  " uniform | "
252  " isothermal "),
253  "The type of density initialization. "
254  "Choices are "
255  " <uniform | "
256  " isothermal>.");
257 
258  prm.declare_entry("do_calculate_numerical_entropy", "false",
259  dealii::Patterns::Bool(),
260  "Flag to calculate numerical entropy and write to file. By default, do not calculate.");
261 
262  }
263  prm.leave_subsection();
264 
265  prm.enter_subsection("kelvin_helmholtz_instability");
266  {
267  prm.declare_entry("atwood_number", "0.5",
268  dealii::Patterns::Double(0.0, 1.0),
269  "Atwood number, which characterizes the density difference "
270  "between the layers of fluid.");
271  }
272  prm.leave_subsection();
273 
274  prm.declare_entry("apply_initial_condition_method", "interpolate_initial_condition_function",
275  dealii::Patterns::Selection(
276  " interpolate_initial_condition_function | "
277  " project_initial_condition_function | "
278  " read_values_from_file_and_project "),
279  "The method used for applying the initial condition. "
280  "Choices are "
281  " <interpolate_initial_condition_function | "
282  " project_initial_condition_function | "
283  " read_values_from_file_and_project>.");
284 
285  prm.declare_entry("input_flow_setup_filename_prefix", "setup",
286  dealii::Patterns::FileName(dealii::Patterns::FileName::FileType::input),
287  "Filename prefix of the input flow setup file. "
288  "Example: 'setup' for files named setup-0000i.dat, where i is the MPI rank. "
289  "For initializing the flow with values from a file. "
290  "To be set when apply_initial_condition_method is read_values_from_file_and_project.");
291 
292  prm.enter_subsection("output_velocity_field");
293  {
294  prm.declare_entry("output_velocity_field_at_fixed_times", "false",
295  dealii::Patterns::Bool(),
296  "Output velocity field (at equidistant nodes) at fixed times. False by default.");
297 
298  prm.declare_entry("output_velocity_field_times_string", " ",
299  dealii::Patterns::FileName(dealii::Patterns::FileName::FileType::input),
300  "String of the times at which to output the velocity field. "
301  "Example: '0.0 1.0 2.0 3.0 ' or '0.0 1.0 2.0 3.0'");
302 
303  prm.declare_entry("output_vorticity_magnitude_field_in_addition_to_velocity", "false",
304  dealii::Patterns::Bool(),
305  "Output vorticity magnitude field in addition to velocity field. False by default.");
306 
307  prm.declare_entry("output_flow_field_files_directory_name", ".",
308  dealii::Patterns::FileName(dealii::Patterns::FileName::FileType::input),
309  "Name of directory for writing flow field files. Current directory by default.");
310  }
311  prm.leave_subsection();
312 
313  prm.declare_entry("end_exactly_at_final_time", "true",
314  dealii::Patterns::Bool(),
315  "Flag to adjust the last timestep such that the simulation "
316  "ends exactly at final_time. True by default.");
317  }
318  prm.leave_subsection();
319 }
320 
321 void FlowSolverParam::parse_parameters(dealii::ParameterHandler &prm)
322 {
323  const int mpi_rank = dealii::Utilities::MPI::this_mpi_process(MPI_COMM_WORLD);
324  dealii::ConditionalOStream pcout(std::cout, mpi_rank==0);
325  prm.enter_subsection("flow_solver");
326  {
327  const std::string flow_case_type_string = prm.get("flow_case_type");
328  if (flow_case_type_string == "taylor_green_vortex") {flow_case_type = taylor_green_vortex;}
329  else if (flow_case_type_string == "decaying_homogeneous_isotropic_turbulence")
330  {flow_case_type = decaying_homogeneous_isotropic_turbulence;}
331  else if (flow_case_type_string == "burgers_viscous_snapshot") {flow_case_type = burgers_viscous_snapshot;}
332  else if (flow_case_type_string == "burgers_rewienski_snapshot") {flow_case_type = burgers_rewienski_snapshot;}
333  else if (flow_case_type_string == "naca0012") {flow_case_type = naca0012;}
334  else if (flow_case_type_string == "burgers_inviscid") {flow_case_type = burgers_inviscid;}
335  else if (flow_case_type_string == "convection_diffusion") {flow_case_type = convection_diffusion;}
336  else if (flow_case_type_string == "advection") {flow_case_type = advection;}
337  else if (flow_case_type_string == "periodic_1D_unsteady") {flow_case_type = periodic_1D_unsteady;}
338  else if (flow_case_type_string == "gaussian_bump") {flow_case_type = gaussian_bump;}
339  else if (flow_case_type_string == "isentropic_vortex") {flow_case_type = isentropic_vortex;}
340  else if (flow_case_type_string == "kelvin_helmholtz_instability")
341  {flow_case_type = kelvin_helmholtz_instability;}
342  else if (flow_case_type_string == "non_periodic_cube_flow") {flow_case_type = non_periodic_cube_flow;}
343  else if (flow_case_type_string == "sod_shock_tube") {flow_case_type = sod_shock_tube;}
344  else if (flow_case_type_string == "low_density_2d") {flow_case_type = low_density_2d;}
345  else if (flow_case_type_string == "leblanc_shock_tube") {flow_case_type = leblanc_shock_tube;}
346  else if (flow_case_type_string == "shu_osher_problem") {flow_case_type = shu_osher_problem;}
347  else if (flow_case_type_string == "advection_limiter") {flow_case_type = advection_limiter;}
348  else if (flow_case_type_string == "burgers_limiter") {flow_case_type = burgers_limiter;}
349 
350  poly_degree = prm.get_integer("poly_degree");
351 
352  // get max poly degree for adaptation
353  max_poly_degree_for_adaptation = prm.get_integer("max_poly_degree_for_adaptation");
354  // -- set value to poly_degree if it is the default value
356  final_time = prm.get_double("final_time");
357  constant_time_step = prm.get_double("constant_time_step");
358  courant_friedrichs_lewy_number = prm.get_double("courant_friedrichs_lewy_number");
359  unsteady_data_table_filename = prm.get("unsteady_data_table_filename");
360  steady_state = prm.get_bool("steady_state");
361  steady_state_polynomial_ramping = prm.get_bool("steady_state_polynomial_ramping");
362  error_adaptive_time_step = prm.get_bool("error_adaptive_time_step");
363  adaptive_time_step = prm.get_bool("adaptive_time_step");
364  sensitivity_table_filename = prm.get("sensitivity_table_filename");
365  restart_computation_from_file = prm.get_bool("restart_computation_from_file");
366  output_restart_files = prm.get_bool("output_restart_files");
367  restart_files_directory_name = prm.get("restart_files_directory_name");
368  // Check if directory exists - see https://stackoverflow.com/a/18101042
369  struct stat info_restart;
370  if( stat( restart_files_directory_name.c_str(), &info_restart ) != 0 ){
371  pcout << "Error: No restart files directory named " << restart_files_directory_name << " exists." << std::endl
372  << "Please create the directory and restart. Aborting..." << std::endl;
373  std::abort();
374  }
375  restart_file_index = prm.get_integer("restart_file_index");
376  output_restart_files_every_x_steps = prm.get_integer("output_restart_files_every_x_steps");
377  output_restart_files_every_dt_time_intervals = prm.get_double("output_restart_files_every_dt_time_intervals");
378 
379  prm.enter_subsection("grid");
380  {
381  input_mesh_filename = prm.get("input_mesh_filename");
382  grid_degree = prm.get_integer("grid_degree");
383  grid_left_bound = prm.get_double("grid_left_bound");
384  grid_right_bound = prm.get_double("grid_right_bound");
385  number_of_grid_elements_per_dimension = prm.get_integer("number_of_grid_elements_per_dimension");
386  number_of_mesh_refinements = prm.get_integer("number_of_mesh_refinements");
387  use_gmsh_mesh = prm.get_bool("use_gmsh_mesh");
388  mesh_reader_verbose_output = prm.get_bool("mesh_reader_verbose_output");
389 
390  prm.enter_subsection("gmsh_boundary_IDs");
391  {
392  use_periodic_BC_in_x = prm.get_bool("use_periodic_BC_in_x");
393  use_periodic_BC_in_y = prm.get_bool("use_periodic_BC_in_y");
394  use_periodic_BC_in_z = prm.get_bool("use_periodic_BC_in_z");
395  x_periodic_id_face_1 = prm.get_integer("x_periodic_id_face_1");
396  x_periodic_id_face_2 = prm.get_integer("x_periodic_id_face_2");
397  y_periodic_id_face_1 = prm.get_integer("y_periodic_id_face_1");
398  y_periodic_id_face_2 = prm.get_integer("y_periodic_id_face_2");
399  z_periodic_id_face_1 = prm.get_integer("z_periodic_id_face_1");
400  z_periodic_id_face_2 = prm.get_integer("z_periodic_id_face_2");
401  }
402  prm.leave_subsection();
403 
404  prm.enter_subsection("gaussian_bump");
405  {
406  number_of_subdivisions_in_x_direction = prm.get_integer("number_of_subdivisions_in_x_direction");
407  number_of_subdivisions_in_y_direction = prm.get_integer("number_of_subdivisions_in_y_direction");
408  number_of_subdivisions_in_z_direction = prm.get_integer("number_of_subdivisions_in_z_direction");
409  channel_length = prm.get_double("channel_length");
410  channel_height = prm.get_double("channel_height");
411  bump_height = prm.get_double("bump_height");
412  }
413  prm.leave_subsection();
414  }
415  prm.leave_subsection();
416 
417  prm.enter_subsection("taylor_green_vortex");
418  {
419  expected_kinetic_energy_at_final_time = prm.get_double("expected_kinetic_energy_at_final_time");
420  expected_theoretical_dissipation_rate_at_final_time = prm.get_double("expected_theoretical_dissipation_rate_at_final_time");
421 
422  const std::string density_initial_condition_type_string = prm.get("density_initial_condition_type");
423  if (density_initial_condition_type_string == "uniform") {density_initial_condition_type = uniform;}
424  else if (density_initial_condition_type_string == "isothermal") {density_initial_condition_type = isothermal;}
425  do_calculate_numerical_entropy = prm.get_bool("do_calculate_numerical_entropy");
426  }
427  prm.leave_subsection();
428 
429  prm.enter_subsection("kelvin_helmholtz_instability");
430  {
431  atwood_number = prm.get_double("atwood_number");
432  }
433  prm.leave_subsection();
434 
435  const std::string apply_initial_condition_method_string = prm.get("apply_initial_condition_method");
436  if (apply_initial_condition_method_string == "interpolate_initial_condition_function") {apply_initial_condition_method = interpolate_initial_condition_function;}
437  else if (apply_initial_condition_method_string == "project_initial_condition_function") {apply_initial_condition_method = project_initial_condition_function;}
438  else if (apply_initial_condition_method_string == "read_values_from_file_and_project") {apply_initial_condition_method = read_values_from_file_and_project;}
439 
440  input_flow_setup_filename_prefix = prm.get("input_flow_setup_filename_prefix");
441 
442  prm.enter_subsection("output_velocity_field");
443  {
444  output_velocity_field_at_fixed_times = prm.get_bool("output_velocity_field_at_fixed_times");
445  output_velocity_field_times_string = prm.get("output_velocity_field_times_string");
447  output_vorticity_magnitude_field_in_addition_to_velocity = prm.get_bool("output_vorticity_magnitude_field_in_addition_to_velocity");
448  output_flow_field_files_directory_name = prm.get("output_flow_field_files_directory_name");
449  // Check if directory exists - see https://stackoverflow.com/a/18101042
450  struct stat info_flow;
451  if( stat( output_flow_field_files_directory_name.c_str(), &info_flow ) != 0 ){
452  pcout << "Error: No flow field files directory named " << output_flow_field_files_directory_name << " exists." << std::endl
453  << "Please create the directory and restart. Aborting..." << std::endl;
454  std::abort();
455  }
456  }
457  prm.leave_subsection();
458 
459  end_exactly_at_final_time = prm.get_bool("end_exactly_at_final_time");
460  }
461  prm.leave_subsection();
462 }
463 
464 } // Parameters namespace
465 } // PHiLiP namespace
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 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.
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.
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.
double courant_friedrichs_lewy_number
Courant-Friedrich-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.
bool output_velocity_field_at_fixed_times
Flag for outputting velocity field at fixed times.
int z_periodic_id_face_1
Custom Boundary IDs for the first periodic face in the z-direction.
unsigned int grid_degree
Parameters related to mesh generation.
double constant_time_step
Constant time step.
bool restart_computation_from_file
Restart computation from restart file.
double channel_height
Height of channel for gaussian bump case.
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.
Definition: ADTypes.hpp:10
void parse_parameters(dealii::ParameterHandler &prm)
Parses input file and sets the variables.
double bump_height
Height of gaussian bump.
bool mesh_reader_verbose_output
< Flag for verbose (true) or quiet (false) mesh reader output
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.
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.
unsigned int restart_file_index
Index of desired restart file for restarting the computation from.
int output_restart_files_every_x_steps
Outputs the restart files every x steps.
bool use_periodic_BC_in_y
Flag for using periodic boundary conditions in the y-direction.
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
unsigned int number_of_times_to_output_velocity_field
Number of fixed times to output the velocity field.
double atwood_number
For KHI, the atwood number.
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.
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.
ApplyInitialConditionMethod apply_initial_condition_method
Selected ApplyInitialConditionMethod from the input file.
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.