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