[P]arallel [Hi]gh-order [Li]brary for [P]DEs  Latest
Parallel High-Order Library for PDEs through hp-adaptive Discontinuous Galerkin methods
parameters_physics_model.cpp
1 #include "parameters/parameters_physics_model.h"
2 
3 namespace PHiLiP {
4 namespace Parameters {
5 
6 void PhysicsModelParam::declare_parameters (dealii::ParameterHandler &prm)
7 {
8  prm.enter_subsection("physics_model");
9  {
10  prm.enter_subsection("large_eddy_simulation");
11  {
12  prm.declare_entry("euler_turbulence","false",
13  dealii::Patterns::Bool(),
14  "Set as false by default (i.e. Navier-Stokes is the baseline physics). "
15  "If true, sets the baseline physics to the Euler equations.");
16 
17  prm.declare_entry("SGS_model_type", "smagorinsky",
18  dealii::Patterns::Selection(
19  " smagorinsky | "
20  " wall_adaptive_local_eddy_viscosity | "
21  " vreman"),
22  "Enum of sub-grid scale models."
23  "Choices are "
24  " <smagorinsky | "
25  " wall_adaptive_local_eddy_viscosity | "
26  " vreman>.");
27 
28  prm.declare_entry("turbulent_prandtl_number", "0.6",
29  dealii::Patterns::Double(1e-15, dealii::Patterns::Double::max_double_value),
30  "Turbulent Prandlt number (default is 0.6)");
31 
32  prm.declare_entry("smagorinsky_model_constant", "0.1",
33  dealii::Patterns::Double(1e-15, dealii::Patterns::Double::max_double_value),
34  "Smagorinsky model constant (default is 0.1)");
35 
36  prm.declare_entry("WALE_model_constant", "0.325",
37  dealii::Patterns::Double(1e-15, dealii::Patterns::Double::max_double_value),
38  "WALE (Wall-Adapting Local Eddy-viscosity) eddy viscosity model constant (default is 0.325)");
39 
40  prm.declare_entry("vreman_model_constant", "0.025",
41  dealii::Patterns::Double(1e-15, dealii::Patterns::Double::max_double_value),
42  "Vreman eddy viscosity model constant (default is 0.025)");
43 
44  prm.declare_entry("ratio_of_filter_width_to_cell_size", "1.0",
45  dealii::Patterns::Double(1e-15, dealii::Patterns::Double::max_double_value),
46  "Ratio of the large eddy simulation filter width to the cell size (default is 1)");
47 
48  }
49  prm.leave_subsection();
50 
51  prm.enter_subsection("reynolds_averaged_navier_stokes");
52  {
53  prm.declare_entry("euler_turbulence","false",
54  dealii::Patterns::Bool(),
55  "Set as false by default (i.e. Navier-Stokes is the baseline physics). "
56  "If true, sets the baseline physics to the Euler equations.");
57 
58  prm.declare_entry("RANS_model_type", "SA_negative",
59  dealii::Patterns::Selection(
60  " SA_negative "),
61  "Enum of reynolds_averaged_navier_stokes models."
62  "Choices are "
63  " <SA_negative>");
64 
65  prm.declare_entry("turbulent_prandtl_number", "0.6",
66  dealii::Patterns::Double(1e-15, dealii::Patterns::Double::max_double_value),
67  "Turbulent Prandlt number (default is 0.6)");
68 
69  }
70  prm.leave_subsection();
71  }
72  prm.leave_subsection();
73 }
74 
75 void PhysicsModelParam::parse_parameters (dealii::ParameterHandler &prm)
76 {
77  prm.enter_subsection("physics_model");
78  {
79  prm.enter_subsection("large_eddy_simulation");
80  {
81  euler_turbulence = prm.get_bool("euler_turbulence");
82 
83  const std::string SGS_model_type_string = prm.get("SGS_model_type");
84  if(SGS_model_type_string == "smagorinsky") SGS_model_type = smagorinsky;
85  if(SGS_model_type_string == "wall_adaptive_local_eddy_viscosity") SGS_model_type = wall_adaptive_local_eddy_viscosity;
86  if(SGS_model_type_string == "vreman") SGS_model_type = vreman;
87 
88  turbulent_prandtl_number = prm.get_double("turbulent_prandtl_number");
89  smagorinsky_model_constant = prm.get_double("smagorinsky_model_constant");
90  WALE_model_constant = prm.get_double("WALE_model_constant");
91  vreman_model_constant = prm.get_double("vreman_model_constant");
92  ratio_of_filter_width_to_cell_size = prm.get_double("ratio_of_filter_width_to_cell_size");
93  }
94  prm.leave_subsection();
95 
96  prm.enter_subsection("reynolds_averaged_navier_stokes");
97  {
98  euler_turbulence = prm.get_bool("euler_turbulence");
99 
100  const std::string RANS_model_type_string = prm.get("RANS_model_type");
101  if(RANS_model_type_string == "SA_negative") RANS_model_type = SA_negative;
102 
103  turbulent_prandtl_number = prm.get_double("turbulent_prandtl_number");
104  }
105  prm.leave_subsection();
106  }
107  prm.leave_subsection();
108 }
109 
110 } // Parameters namespace
111 } // PHiLiP namespace
void parse_parameters(dealii::ParameterHandler &prm)
Parses input file and sets the variables.
static void declare_parameters(dealii::ParameterHandler &prm)
Declares the possible variables and sets the defaults.
Files for the baseline physics.
Definition: ADTypes.hpp:10
SubGridScaleModel SGS_model_type
Store the SubGridScale (SGS) model type.
double smagorinsky_model_constant
Eddy-viscosity model constants:
double vreman_model_constant
Vreman eddy viscosity model constant.
ReynoldsAveragedNavierStokesModel RANS_model_type
Store the Reynolds-averaged Navier-Stokes (RANS) model type.
double turbulent_prandtl_number
Turbulent flow characteristics:
double ratio_of_filter_width_to_cell_size
Ratio of the large eddy simulation filter width to the cell size.
double WALE_model_constant
WALE (Wall-Adapting Local Eddy-viscosity) eddy viscosity model constant.