ExaDG
Loading...
Searching...
No Matches
enum_types.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 INCLUDE_EXADG_INCOMPRESSIBLE_NAVIER_STOKES_USER_INTERFACE_ENUM_TYPES_H_
23#define INCLUDE_EXADG_INCOMPRESSIBLE_NAVIER_STOKES_USER_INTERFACE_ENUM_TYPES_H_
24
25#include <string>
26
27namespace ExaDG
28{
29namespace IncNS
30{
31/**************************************************************************************/
32/* */
33/* MATHEMATICAL MODEL */
34/* */
35/**************************************************************************************/
36
37/*
38 * ProblemType refers to the underlying physics of the flow problem and describes
39 * whether the considered flow problem is expected to be a steady or unsteady solution
40 * of the incompressible Navier-Stokes equations. This essentially depends on the
41 * Reynolds number but, for example, also on the boundary conditions (in case of
42 * time dependent boundary conditions, the problem type is always unsteady).
43 */
44enum class ProblemType
45{
46 Undefined,
47 Steady,
48 Unsteady
49};
50
51/*
52 * EquationType describes the physical/mathematical model that has to be solved,
53 * i.e., Stokes equations or Navier-Stokes equations
54 */
55enum class EquationType
56{
57 Undefined,
58 Stokes,
59 Euler,
60 NavierStokes
61};
62
63/*
64 * Formulation of viscous term: divergence formulation or Laplace formulation
65 */
66enum class FormulationViscousTerm
67{
68 Undefined,
69 DivergenceFormulation,
70 LaplaceFormulation
71};
72
73/*
74 * Formulation of convective term: divergence formulation or convective formulation
75 */
76enum class FormulationConvectiveTerm
77{
78 Undefined,
79 DivergenceFormulation,
80 ConvectiveFormulation
81};
82
83enum class MeshMovementType
84{
85 Function,
86 Poisson,
87 Elasticity
88};
89
90/**************************************************************************************/
91/* */
92/* PHYSICAL QUANTITIES */
93/* */
94/**************************************************************************************/
95
96// there are currently no enums for this section
97
98
99
100/**************************************************************************************/
101/* */
102/* TEMPORAL DISCRETIZATION */
103/* */
104/**************************************************************************************/
105
106/*
107 * SolverType refers to the numerical solution of the incompressible Navier-Stokes
108 * equations and describes whether a steady or an unsteady solver is used.
109 * While it does not make sense to solve an unsteady problem with a steady solver,
110 * a steady problem can be solved (potentially more efficiently) by using an
111 * unsteady solver.
112 */
113enum class SolverType
114{
115 Undefined,
116 Steady,
117 Unsteady
118};
119
120/*
121 * Temporal discretization method
122 */
123enum class TemporalDiscretization
124{
125 Undefined,
126 BDFDualSplittingScheme,
127 BDFPressureCorrection,
128 BDFCoupledSolution
129};
130
131/*
132 * The convective term can be treated explicitly (Explicit) or implicitly (Implicit).
133 */
134enum class TreatmentOfConvectiveTerm
135{
136 Undefined,
137 Explicit,
138 Implicit
139};
140
141/*
142 * The possibly variable viscosity can be treated explicitly (Explicit) or implicitly (Implicit).
143 */
144enum class TreatmentOfVariableViscosity
145{
146 Undefined,
147 Explicit,
148 Implicit
149};
150
151/*
152 * calculation of time step size
153 */
154enum class TimeStepCalculation
155{
156 Undefined,
157 UserSpecified,
158 CFL,
159 MaxEfficiency // only relevant for analytical test cases with optimal rates of
160 // convergence in space
161};
162
163/*
164 * Pseudo-timestepping for steady-state problems:
165 * Define convergence criterion that is used to terminate simulation
166 *
167 * option ResidualSteadyNavierStokes:
168 * - evaluate residual of steady, coupled incompressible Navier-Stokes equations
169 * and terminate simulation if norm of residual fulfills tolerances
170 * - can be used for the coupled solution approach
171 * - can be used for the pressure-correction scheme in case the incremental
172 * formulation is used (for the nonincremental formulation the steady-state
173 * solution cannot fulfill the residual of the steady Navier-Stokes equations
174 * in general due to the splitting error)
175 * - cannot be used for the dual splitting scheme (due to the splitting error
176 * the residual of the steady Navier-Stokes equations is not fulfilled)
177 *
178 * option SolutionIncrement:
179 * - calculate solution increment from one time step to the next and terminate
180 * simulation if solution doesn't change any more (defined by tolerances)
181 */
182enum class ConvergenceCriterionSteadyProblem
183{
184 Undefined,
185 ResidualSteadyNavierStokes,
186 SolutionIncrement
187};
188
189/**************************************************************************************/
190/* */
191/* SPATIAL DISCRETIZATION */
192/* */
193/**************************************************************************************/
194
195/*
196 * Spatial discretization method.
197 *
198 * HDIV implies Raviart-Thomas
199 */
200enum class SpatialDiscretization
201{
202 L2,
203 HDIV
204};
205
206/*
207 * Polynomial degree of pressure shape functions in relation to velocity degree
208 */
209enum class DegreePressure
210{
211 MixedOrder,
212 EqualOrder
213};
214
215/*
216 * Type of imposition of Dirichlet BC's:
217 *
218 * direct: u⁺ = g
219 * mirror: u⁺ = -u⁻ + 2g
220 *
221 * We normally use the option Mirror as default setup.
222 * A direct imposition might be advantageous with respect to the CFL condition
223 * possibly allowing to use larger time step sizes (approximately 20 percent)
224 * depending on other parameters of the spatial discretization (divergence versus
225 * convective formulation of convective term, upwind factor, and use of divergence
226 * and continuity penalty terms).
227 */
228enum class TypeDirichletBCs
229{
230 Direct,
231 Mirror
232};
233
234/*
235 * Interior penalty formulation of viscous term:
236 * SIPG (symmetric IP) or NIPG (non-symmetric IP)
237 *
238 * - use SIPG as default option (sub-optimal rates of convergence observed for NIPG)
239 */
240enum class InteriorPenaltyFormulation
241{
242 Undefined,
243 SIPG,
244 NIPG
245};
246
247/*
248 * Penalty term in case of divergence formulation:
249 * not symmetrized: penalty term identical to Laplace formulation, tau * [[u]]
250 * symmetrized: penalty term = tau * ([[u]] + [[u]]^T)
251 *
252 * - use Symmetrized as default
253 */
254enum class PenaltyTermDivergenceFormulation
255{
256 Undefined,
257 Symmetrized,
258 NotSymmetrized
259};
260
261/*
262 * Different options for adjusting the pressure level in case of pure Dirichlet
263 * boundary conditions
264 *
265 * - use ApplyZeroMeanValue as default (this option is always possible)
266 */
267enum class AdjustPressureLevel
268{
269 ApplyZeroMeanValue,
270 ApplyAnalyticalMeanValue,
271 ApplyAnalyticalSolutionInPoint
272};
273
274/*
275 * Formulation of velocity divergence term
276 */
277enum class FormulationVelocityDivergenceTerm
278{
279 Weak,
280 Strong
281};
282
283/*
284 * Formulation of pressure gradient term
285 */
286enum class FormulationPressureGradientTerm
287{
288 Weak,
289 Strong
290};
291
292/*
293 * Continuity penalty term: apply penalty term to all velocity components or to
294 * normal components only.
295 *
296 * - use Normal as default
297 */
298enum class ContinuityPenaltyComponents
299{
300 Undefined,
301 All,
302 Normal
303};
304
305/*
306 * Different options for calculation of penalty parameter
307 *
308 * - use ConvectiveTerm as default
309 */
310enum class TypePenaltyParameter
311{
312 Undefined,
313 ConvectiveTerm,
314 ViscousTerm,
315 ViscousAndConvectiveTerms
316};
317
318/**************************************************************************************/
319/* */
320/* NUMERICAL PARAMETERS AND SOLVERS */
321/* */
322/**************************************************************************************/
323
324/*
325 * Specify the operator type to be used for multigrid (which can differ from the
326 * equation type)
327 */
328enum class MultigridOperatorType
329{
330 Undefined,
331 ReactionDiffusion,
332 ReactionConvectionDiffusion
333};
334
335/*
336 * QuadratureRule
337 */
338enum class QuadratureRuleLinearization
339{
340 Standard,
341 Overintegration32k
342};
343
344/**************************************************************************************/
345/* */
346/* HIGH-ORDER DUAL SPLITTING SCHEME */
347/* */
348/**************************************************************************************/
349
350
351/*
352 * Solver for pressure Poisson equation:
353 *
354 * use CG (conjugate gradient) method as default. FGMRES might be necessary
355 * if a Krylov method is used inside the preconditioner (e.g., as multigrid
356 * smoother or as multigrid coarse grid solver)
357 */
358enum class SolverPressurePoisson
359{
360 CG,
361 FGMRES
362};
363
364/*
365 * Preconditioner type for solution of pressure Poisson equation:
366 *
367 * use Multigrid as default
368 */
369enum class PreconditionerPressurePoisson
370{
371 None,
372 PointJacobi,
373 BlockJacobi,
374 Multigrid
375};
376
377/*
378 * Type of projection solver
379 *
380 * - use CG as default
381 */
382enum class SolverProjection
383{
384 CG,
385 FGMRES
386};
387
388/*
389 * Preconditioner type for solution of projection step:
390 *
391 * use InverseMassMatrix as default. As a rule of thumb, only try other
392 * preconditioners if the number of iterations is significantly larger than 10.
393 */
394enum class PreconditionerProjection
395{
396 None,
397 InverseMassMatrix,
398 PointJacobi,
399 BlockJacobi,
400 Multigrid
401};
402
403/*
404 * Solver type for solution of viscous step:
405 *
406 * use CG (conjugate gradient) method as default and GMRES if the problem
407 * is non-symmetric (Divergence formulation of viscous term, but note that often
408 * CG also works in this case).
409 * FGMRES might be necessary if a Krylov method is used inside the preconditioner
410 * (e.g., as multigrid smoother or as multigrid coarse grid solver).
411 */
412enum class SolverViscous
413{
414 CG,
415 GMRES,
416 FGMRES
417};
418
419/*
420 * Preconditioner type for solution of viscous step:
421 *
422 * Use InverseMassMatrix as default. As a rule of thumb, only try other
423 * preconditioners if the number of iterations is significantly larger than 10.
424 */
425enum class PreconditionerViscous
426{
427 None,
428 InverseMassMatrix,
429 PointJacobi,
430 BlockJacobi,
431 Multigrid
432};
433
434/**************************************************************************************/
435/* */
436/* PRESSURE-CORRECTION SCHEME */
437/* */
438/**************************************************************************************/
439
440/*
441 * Solver type for solution of momentum equation
442 *
443 * - use CG for symmetric problems and GMRES for non-symmetric problems as default
444 *
445 * - FGMRES might be necessary if a Krylov method is used inside the preconditioner
446 * (e.g., as multigrid smoother or as multigrid coarse grid solver).
447 */
448enum class SolverMomentum
449{
450 CG,
451 GMRES,
452 FGMRES
453};
454
455/*
456 * Preconditioner type for solution of momentum equation:
457 *
458 * see coupled solution approach below
459 */
460
461
462/**************************************************************************************/
463/* */
464/* COUPLED NAVIER-STOKES SOLVER */
465/* */
466/**************************************************************************************/
467
468/*
469 * Solver for linearized Navier-Stokes problem
470 *
471 * - use GMRES as default.
472 *
473 * - FGMRES might be necessary if a Krylov method is used inside the preconditioner
474 * (e.g., as multigrid smoother or as multigrid coarse grid solver).
475 */
476enum class SolverCoupled
477{
478 GMRES,
479 FGMRES
480};
481
482/*
483 * Preconditioner type for linearized Navier-Stokes problem
484 *
485 * - use BlockTriangular as default (typically best option in terms of time-to-solution, i.e.
486 * BlockDiagonal needs significantly more iterations and BlockTriangularFactorization reduces
487 * number of iterations only slightly but is significantly more expensive)
488 */
489enum class PreconditionerCoupled
490{
491 None,
492 BlockDiagonal,
493 BlockTriangular,
494 BlockTriangularFactorization
495};
496
497/*
498 * preconditioner for velocity/momentum operator
499 *
500 * steady problems:
501 *
502 * - use Multigrid as default
503 *
504 * unsteady problems:
505 *
506 * - use InverseMassMatrix as default. As a rule of thumb, only try other
507 * preconditioners if the number of iterations is significantly larger than 10.
508 */
509enum class MomentumPreconditioner
510{
511 None,
512 PointJacobi,
513 BlockJacobi,
514 InverseMassMatrix,
515 Multigrid
516};
517
518/*
519 * Preconditioner for (2,2) pressure/Schur complement block in case of block preconditioning
520 *
521 * default setup:
522 *
523 * - InverseMassMatrix for steady Stokes problems
524 * - CahouetChabard for unsteady Stokes problems or unsteady Navier-Stokes problems
525 * with convective term treated explicitly
526 * - PressureConvectionDiffusion for steady/unsteady Navier-Stokes problems with convective term
527 * treated implicitly
528 */
529enum class SchurComplementPreconditioner
530{
531 None,
532 InverseMassMatrix,
533 LaplaceOperator,
534 CahouetChabard,
535 PressureConvectionDiffusion
536};
537
538} // namespace IncNS
539} // namespace ExaDG
540
541#endif /* INCLUDE_EXADG_INCOMPRESSIBLE_NAVIER_STOKES_USER_INTERFACE_ENUM_TYPES_H_ */
Definition driver.cpp:33