ExaDG
Loading...
Searching...
No Matches
parameters.h
1/* ______________________________________________________________________
2 *
3 * ExaDG - High-Order Discontinuous Galerkin for the Exa-Scale
4 *
5 * Copyright (C) 2021 by the ExaDG authors
6 *
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <https://www.gnu.org/licenses/>.
19 * ______________________________________________________________________
20 */
21
22#ifndef EXADG_COMPRESSIBLE_NAVIER_STOKES_USER_INTERFACE_PARAMETERS_H_
23#define EXADG_COMPRESSIBLE_NAVIER_STOKES_USER_INTERFACE_PARAMETERS_H_
24
25// ExaDG
26#include <exadg/compressible_navier_stokes/user_interface/enum_types.h>
27#include <exadg/grid/grid_data.h>
28#include <exadg/operators/inverse_mass_parameters.h>
29#include <exadg/time_integration/restart_data.h>
30#include <exadg/time_integration/solver_info_data.h>
31#include <exadg/utilities/print_functions.h>
32
33namespace ExaDG
34{
35namespace CompNS
36{
37class Parameters
38{
39public:
40 // standard constructor that initializes parameters with default values
41 Parameters();
42
43 void
44 check() const;
45
46 void
47 print(dealii::ConditionalOStream const & pcout, std::string const & name) const;
48
49private:
50 void
51 print_parameters_mathematical_model(dealii::ConditionalOStream const & pcout) const;
52
53 void
54 print_parameters_physical_quantities(dealii::ConditionalOStream const & pcout) const;
55
56 void
57 print_parameters_temporal_discretization(dealii::ConditionalOStream const & pcout) const;
58
59 void
60 print_parameters_spatial_discretization(dealii::ConditionalOStream const & pcout) const;
61
62 void
63 print_parameters_solver(dealii::ConditionalOStream const & pcout) const;
64
65 void
66 print_parameters_numerical_parameters(dealii::ConditionalOStream const & pcout) const;
67
68public:
69 /**************************************************************************************/
70 /* */
71 /* MATHEMATICAL MODEL */
72 /* */
73 /**************************************************************************************/
74
75 // description: see enum declaration
76 EquationType equation_type;
77
78 // if the rhs f is unequal zero, set right_hand_side = true
79 bool right_hand_side;
80
81 /**************************************************************************************/
82 /* */
83 /* PHYSICAL QUANTITIES */
84 /* */
85 /**************************************************************************************/
86
87 // start time of simulation
88 double start_time;
89
90 // end time of simulation
91 double end_time;
92
93 // dynamic viscosity
94 double dynamic_viscosity;
95
96 // reference density needed to calculate the kinematic viscosity from the specified
97 // dynamic viscosity
98 double reference_density;
99
100 // heat_capacity_ratio
101 double heat_capacity_ratio;
102
103 // thermal conductivity
104 double thermal_conductivity;
105
106 // specific gas constant
107 double specific_gas_constant;
108
109 // maximum temperature (needed to calculate time step size according to CFL condition)
110 double max_temperature;
111
112 /**************************************************************************************/
113 /* */
114 /* TEMPORAL DISCRETIZATION */
115 /* */
116 /**************************************************************************************/
117
118 // temporal discretization method
119 TemporalDiscretization temporal_discretization;
120
121 // order of time integration scheme
122 unsigned int order_time_integrator;
123
124 // number of Runge-Kutta stages
125 unsigned int stages;
126
127 // calculation of time step size
128 TimeStepCalculation calculation_of_time_step_size;
129
130 // user specified time step size: note that this time_step_size is the first
131 // in a series of time_step_size's when performing temporal convergence tests,
132 // i.e., delta_t = time_step_size, time_step_size/2, ...
133 double time_step_size;
134
135 // maximum number of time steps
136 unsigned int max_number_of_time_steps;
137
138 // number of refinements for temporal discretization
139 unsigned int n_refine_time;
140
141 // maximum velocity needed when calculating the time step according to cfl-condition
142 double max_velocity;
143
144 // cfl number
145 double cfl_number;
146
147 // diffusion number (relevant number for limitation of time step size
148 // when treating the diffusive term explicitly)
149 double diffusion_number;
150
151 // exponent of fe_degree used in the calculation of the CFL time step size
152 double exponent_fe_degree_cfl;
153
154 // exponent of fe_degree used in the calculation of the diffusion time step size
155 double exponent_fe_degree_viscous;
156
157 // set this variable to true to start the simulation from restart files
158 bool restarted_simulation;
159
160 // Restart
161 RestartData restart_data;
162
163 // show solver performance (wall time, number of iterations)
164 SolverInfoData solver_info_data;
165
166 /**************************************************************************************/
167 /* */
168 /* SPATIAL DISCRETIZATION */
169 /* */
170 /**************************************************************************************/
171
172 // Grid data
173 GridData grid;
174
175 // Mapping
176 unsigned int mapping_degree;
177
178 // polynomial degree of shape functions
179 unsigned int degree;
180
181 QuadratureRule n_q_points_convective, n_q_points_viscous;
182
183 // diffusive term: Symmetric interior penalty Galerkin (SIPG) discretization
184 // interior penalty parameter scaling factor: default value is 1.0
185 double IP_factor;
186
187 /**************************************************************************************/
188 /* */
189 /* NUMERICAL PARAMETERS */
190 /* */
191 /**************************************************************************************/
192
193 // detect instabilities (norm of solution vector grows by a large factor from one time
194 // step to the next
195 bool detect_instabilities;
196
197 // use combined operator for viscous term and convective term in order to improve run
198 // time
199 bool use_combined_operator;
200
201 /**************************************************************************************/
202 /* */
203 /* Solver parameters for mass matrix problem */
204 /* */
205 /**************************************************************************************/
206 // These parameters are only relevant if the inverse mass can not be realized as a
207 // matrix-free operator evaluation. The typical use case is a DG formulation with non
208 // hypercube elements (e.g. simplex elements).
209
210 InverseMassParameters inverse_mass_operator;
211};
212
213} // namespace CompNS
214} // namespace ExaDG
215
216#endif /* EXADG_COMPRESSIBLE_NAVIER_STOKES_USER_INTERFACE_PARAMETERS_H_ */
Definition driver.cpp:33
Definition grid_data.h:88
Definition inverse_mass_parameters.h:54
Definition restart_data.h:38
Definition solver_info_data.h:38