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_FLUID_STRUCTURE_INTERACTION_ACCELERATION_SCHEMES_PARAMETERS_H_
23#define EXADG_FLUID_STRUCTURE_INTERACTION_ACCELERATION_SCHEMES_PARAMETERS_H_
24
25// deal.II
26#include <deal.II/base/parameter_handler.h>
27#include <deal.II/base/patterns.h>
28
29// ExaDG
30#include <exadg/utilities/enum_patterns.h>
31
32namespace ExaDG
33{
34namespace FSI
35{
36enum class AccelerationMethod
37{
38 Undefined,
39 Aitken,
40 IQN_ILS,
41 IQN_IMVLS
42};
43
44// The initial guess used in the FSI coupling loop is computed using an extrapolation of suitable
45// order (defined within the single-field time integrators) or the last iterate from the previous
46// time step.
47enum class InitialGuessCouplingScheme
48{
49 SolutionExtrapolatedToEndOfTimeStep,
50 ConvergedSolutionOfPreviousTimeStep
51};
52
53struct Parameters
54{
55 Parameters()
56 : acceleration_method(AccelerationMethod::Undefined),
57 abs_tol(1.e-12),
58 rel_tol(1.e-3),
59 omega_init(0.1),
60 initial_guess_coupling_scheme(
61 InitialGuessCouplingScheme::SolutionExtrapolatedToEndOfTimeStep),
62 reused_time_steps(0),
63 partitioned_iter_max(100),
64 geometric_tolerance(1.e-10),
65 update_ale(true),
66 update_fluid_velocity(true),
67 update_fluid_pressure(true)
68 {
69 }
70
71 void
72 add_parameters(dealii::ParameterHandler & prm, std::string const & subsection_name = "FSI")
73 {
74 prm.enter_subsection(subsection_name);
75 {
76 prm.add_parameter("AccelerationMethod",
77 acceleration_method,
78 "Acceleration method.",
79 Patterns::Enum<AccelerationMethod>(),
80 true);
81 prm.add_parameter(
82 "AbsTol", abs_tol, "Absolute solver tolerance.", dealii::Patterns::Double(0.0, 1.0), true);
83 prm.add_parameter(
84 "RelTol", rel_tol, "Relative solver tolerance.", dealii::Patterns::Double(0.0, 1.0), true);
85 prm.add_parameter("OmegaInit",
86 omega_init,
87 "Initial relaxation parameter.",
88 dealii::Patterns::Double(0.0, 1.0),
89 true);
90 prm.add_parameter("InitialGuessCouplingScheme",
91 initial_guess_coupling_scheme,
92 "Scheme for initial guess for the FSI coupling loop at every time step.",
93 Patterns::Enum<InitialGuessCouplingScheme>(),
94 false);
95 prm.add_parameter("ReusedTimeSteps",
96 reused_time_steps,
97 "Number of time steps reused for acceleration.",
98 dealii::Patterns::Integer(0, 100),
99 false);
100 prm.add_parameter("PartitionedIterMax",
101 partitioned_iter_max,
102 "Maximum number of fixed-point iterations.",
103 dealii::Patterns::Integer(1, 1000),
104 true);
105 prm.add_parameter("GeometricTolerance",
106 geometric_tolerance,
107 "Tolerance used to locate points at FSI interface.",
108 dealii::Patterns::Double(0.0, 1.0),
109 false);
110 prm.add_parameter("UpdateALE",
111 update_ale,
112 "Include ALE update in the strong coupling.",
113 dealii::Patterns::Bool(),
114 false);
115 prm.add_parameter("UpdateFluidVelocity",
116 update_fluid_velocity,
117 "Include fluid velocity subproblem in the strong coupling.",
118 dealii::Patterns::Bool(),
119 false);
120 prm.add_parameter("UpdateFluidPressure",
121 update_fluid_pressure,
122 "Include fluid pressure subproblem in the strong coupling.",
123 dealii::Patterns::Bool(),
124 false);
125 }
126 prm.leave_subsection();
127 }
128
129 AccelerationMethod acceleration_method;
130 double abs_tol;
131 double rel_tol;
132 double omega_init;
133 InitialGuessCouplingScheme initial_guess_coupling_scheme;
134 unsigned int reused_time_steps;
135 unsigned int partitioned_iter_max;
136
137 // tolerance used to locate points at the fluid-structure interface
138 double geometric_tolerance;
139
140 // Semi-implicit coupling variants iteratively update only a subset of all
141 // fields after the first coupling step. Stability properties are altered,
142 // but temporal order of accuracy is preserved starting from suitable
143 // extrapolations in time controlled via `InitialGuessCouplingScheme`.
144 bool update_ale;
145 bool update_fluid_velocity;
146 bool update_fluid_pressure;
147};
148
149} // namespace FSI
150} // namespace ExaDG
151
152#endif /* EXADG_FLUID_STRUCTURE_INTERACTION_ACCELERATION_SCHEMES_PARAMETERS_H_ */
Definition driver.cpp:33