Documentation 6b54b78464
Loading...
Searching...
No Matches
CFluidIteration.hpp
Go to the documentation of this file.
1/*!
2 * \file CIteration.hpp
3 * \brief Headers of the iteration classes used by SU2_CFD.
4 * Each CIteration class represents an available physics package.
5 * \author F. Palacios, T. Economon
6 * \version 8.5.0 "Harrier"
7 *
8 * SU2 Project Website: https://su2code.github.io
9 *
10 * The SU2 Project is maintained by the SU2 Foundation
11 * (http://su2foundation.org)
12 *
13 * Copyright 2012-2026, SU2 Contributors (cf. AUTHORS.md)
14 *
15 * SU2 is free software; you can redistribute it and/or
16 * modify it under the terms of the GNU Lesser General Public
17 * License as published by the Free Software Foundation; either
18 * version 2.1 of the License, or (at your option) any later version.
19 *
20 * SU2 is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
23 * Lesser General Public License for more details.
24 *
25 * You should have received a copy of the GNU Lesser General Public
26 * License along with SU2. If not, see <http://www.gnu.org/licenses/>.
27 */
28
29#pragma once
30
31#include "CIteration.hpp"
32
33/*!
34 * \class CFluidIteration
35 * \ingroup Drivers
36 * \brief Class for driving an iteration of the fluid system.
37 * \author T. Economon
38 */
40 public:
41 /*!
42 * \brief Constructor of the class.
43 * \param[in] config - Definition of the particular problem.
44 */
45 explicit CFluidIteration(const CConfig* config) : CIteration(config) {}
46
47 /*!
48 * \brief Preprocessing to prepare for an iteration of the physics.
49 * \param[in] ??? - Description here.
50 */
51 void Preprocess(COutput* output, CIntegration**** integration, CGeometry**** geometry, CSolver***** solver,
52 CNumerics****** numerics, CConfig** config, CSurfaceMovement** surface_movement,
53 CVolumetricMovement*** grid_movement, CFreeFormDefBox*** FFDBox, unsigned short val_iZone,
54 unsigned short val_iInst) override;
55
56 /*!
57 * \brief Perform a single iteration of the fluid system.
58 * \param[in] output - Pointer to the COutput class.
59 * \param[in] integration - Container vector with all the integration methods.
60 * \param[in] geometry - Geometrical definition of the problem.
61 * \param[in] solver - Container vector with all the solutions.
62 * \param[in] numerics - Description of the numerical method (the way in which the equations are solved).
63 * \param[in] config - Definition of the particular problem.
64 * \param[in] surface_movement - Surface movement classes of the problem.
65 * \param[in] grid_movement - Volume grid movement classes of the problem.
66 * \param[in] FFDBox - FFD FFDBoxes of the problem.
67 * \param[in] val_iZone - Index of the zone.
68 * \param[in] val_iInst - Index of the instance layer.
69 */
70 void Iterate(COutput* output, CIntegration**** integration, CGeometry**** geometry, CSolver***** solver,
71 CNumerics****** numerics, CConfig** config, CSurfaceMovement** surface_movement,
72 CVolumetricMovement*** grid_movement, CFreeFormDefBox*** FFDBox, unsigned short val_iZone,
73 unsigned short val_iInst) override;
74
75 /*!
76 * \brief Perform auxiliary solvers iterations after the main flow solver.
77 * \param[in] integration - Container vector with all the integration methods.
78 * \param[in] geometry - Geometrical definition of the problem.
79 * \param[in] solver - Container vector with all the solutions.
80 * \param[in] numerics - Description of the numerical method (the way in which the equations are solved).
81 * \param[in] config - Definition of the particular problem.
82 * \param[in] val_iZone - Index of the zone.
83 * \param[in] val_iInst - Index of the instance layer.
84 * \param[in] main_solver - Main solver.
85 * \param[in] frozen_visc - Flag for frozen viscosity.
86 */
87 void CommonAuxiliarySolvers(CIntegration**** integration, CGeometry**** geometry, CSolver***** solver,
88 CNumerics****** numerics, CConfig** config, unsigned short val_iZone,
89 unsigned short val_iInst, MAIN_SOLVER main_solver, bool frozen_visc);
90
91 /*!
92 * \brief Iterate the fluid system for a number of Inner_Iter iterations.
93 * \param[in] output - Pointer to the COutput class.
94 * \param[in] integration - Container vector with all the integration methods.
95 * \param[in] geometry - Geometrical definition of the problem.
96 * \param[in] solver - Container vector with all the solutions.
97 * \param[in] numerics - Description of the numerical method (the way in which the equations are solved).
98 * \param[in] config - Definition of the particular problem.
99 * \param[in] surface_movement - Surface movement classes of the problem.
100 * \param[in] grid_movement - Volume grid movement classes of the problem.
101 * \param[in] FFDBox - FFD FFDBoxes of the problem.
102 */
103 void Solve(COutput* output, CIntegration**** integration, CGeometry**** geometry, CSolver***** solver,
104 CNumerics****** numerics, CConfig** config, CSurfaceMovement** surface_movement,
105 CVolumetricMovement*** grid_movement, CFreeFormDefBox*** FFDBox, unsigned short val_iZone,
106 unsigned short val_iInst) override;
107
108 /*!
109 * \brief Updates the containers for the fluid system.
110 * \param[in] ??? - Description here.
111 */
112 void Update(COutput* output, CIntegration**** integration, CGeometry**** geometry, CSolver***** solver,
113 CNumerics****** numerics, CConfig** config, CSurfaceMovement** surface_movement,
114 CVolumetricMovement*** grid_movement, CFreeFormDefBox*** FFDBox, unsigned short val_iZone,
115 unsigned short val_iInst) override;
116
117 /*!
118 * \brief Monitors the convergence and other metrics for the fluid system.
119 * \param[in] ??? - Description here.
120 */
121 bool Monitor(COutput* output, CIntegration**** integration, CGeometry**** geometry, CSolver***** solver,
122 CNumerics****** numerics, CConfig** config, CSurfaceMovement** surface_movement,
123 CVolumetricMovement*** grid_movement, CFreeFormDefBox*** FFDBox, unsigned short val_iZone,
124 unsigned short val_iInst) override;
125
126 /*!
127 * \brief Monitors and updates ramps
128 * \param[in] geometry_container - Geometrical definition of the problem
129 * \param[in] config_container - Defintion of the particular problem
130 * \param[in] ExtIter - The current iteration of the problem
131 * \param[in] iZone - The current zone
132 * \param[in] ramp_flag - Flag indicating type of ramp (grid or boundary)
133 */
134 void UpdateRamps(CGeometry**** geometry_container, CConfig** config_container, unsigned long iter, unsigned short iZone, RAMP_TYPE ramp_flag);
135
136 /*!
137 * \brief Postprocesses the fluid system before heading to another physics system or the next iteration.
138 * \param[in] solver - Container vector with all the solutions.
139 * \param[in] geometry - Geometrical definition of the problem.
140 * \param[in] config - Definition of the particular problem.
141 */
142 void Postprocess(COutput* output, CIntegration**** integration, CGeometry**** geometry, CSolver***** solver,
143 CNumerics****** numerics, CConfig** config, CSurfaceMovement** surface_movement,
144 CVolumetricMovement*** grid_movement, CFreeFormDefBox*** FFDBox, unsigned short val_iZone,
145 unsigned short val_iInst) override;
146
147 private:
148
149 /*!
150 * \brief Imposes a gust via the grid velocities.
151 * \author S. Padron
152 * \param[in] config - Definition of the particular problem.
153 * \param[in] geometry - Geometrical definition of the problem.
154 * \param[in] solver - Container vector with all the solutions.
155 */
156 void SetWind_GustField(CConfig* config, CGeometry** geometry, CSolver*** solver);
157
158 /*!
159 * \brief Reads and initializes the vortex positions, strengths and gradient.
160 * \author S. Padron
161 * \param[in] nVortex - number of vortices.
162 * \param[in] x0 - Vector of x-loc of the vortices.
163 * \param[in] y0 - Vector of y-loc of the vortices.
164 * \param[in] vort_strength - Vector of vortex strengths.
165 * \param[in] r_core - Vector of vortex core size.
166 */
167 void InitializeVortexDistribution(unsigned long& nVortex, vector<su2double>& x0, vector<su2double>& y0,
168 vector<su2double>& vort_strength, vector<su2double>& r_core);
169
170 /*!
171 * \brief Fixed CL monitoring function
172 * \author J. Mukhopadhaya
173 * \param[in] output - Pointer to the COutput class.
174 * \param[in] geometry - Geometrical definition of the problem.
175 * \param[in] solver - Pointer to the flow solver
176 * \param[in] config - Definition of the particular problem.
177 * \return Boolean indicating weather calculation should be stopped
178 */
179 bool MonitorFixed_CL(COutput* output, CGeometry* geometry, CSolver** solver, CConfig* config);
180
181 /*!
182 * \brief Store old aeroelastic solutions
183 * \param[in,out] config - Definition of the particular problem.
184 */
185 void SetDualTime_Aeroelastic(CConfig* config) const;
186
187};
Headers of the iteration classes used by SU2_CFD. Each CIteration class represents an available physi...
Main class for defining the problem; basically this class reads the configuration file,...
Definition CConfig.hpp:64
Class for driving an iteration of the fluid system.
Definition CFluidIteration.hpp:39
void Postprocess(COutput *output, CIntegration ****integration, CGeometry ****geometry, CSolver *****solver, CNumerics ******numerics, CConfig **config, CSurfaceMovement **surface_movement, CVolumetricMovement ***grid_movement, CFreeFormDefBox ***FFDBox, unsigned short val_iZone, unsigned short val_iInst) override
Postprocesses the fluid system before heading to another physics system or the next iteration.
Definition CFluidIteration.cpp:397
void Update(COutput *output, CIntegration ****integration, CGeometry ****geometry, CSolver *****solver, CNumerics ******numerics, CConfig **config, CSurfaceMovement **surface_movement, CVolumetricMovement ***grid_movement, CFreeFormDefBox ***FFDBox, unsigned short val_iZone, unsigned short val_iInst) override
Updates the containers for the fluid system.
Definition CFluidIteration.cpp:170
bool Monitor(COutput *output, CIntegration ****integration, CGeometry ****geometry, CSolver *****solver, CNumerics ******numerics, CConfig **config, CSurfaceMovement **surface_movement, CVolumetricMovement ***grid_movement, CFreeFormDefBox ***FFDBox, unsigned short val_iZone, unsigned short val_iInst) override
Monitors the convergence and other metrics for the fluid system.
Definition CFluidIteration.cpp:231
void CommonAuxiliarySolvers(CIntegration ****integration, CGeometry ****geometry, CSolver *****solver, CNumerics ******numerics, CConfig **config, unsigned short val_iZone, unsigned short val_iInst, MAIN_SOLVER main_solver, bool frozen_visc)
Perform auxiliary solvers iterations after the main flow solver.
Definition CFluidIteration.cpp:117
void Preprocess(COutput *output, CIntegration ****integration, CGeometry ****geometry, CSolver *****solver, CNumerics ******numerics, CConfig **config, CSurfaceMovement **surface_movement, CVolumetricMovement ***grid_movement, CFreeFormDefBox ***FFDBox, unsigned short val_iZone, unsigned short val_iInst) override
Preprocessing to prepare for an iteration of the physics.
Definition CFluidIteration.cpp:31
CFluidIteration(const CConfig *config)
Constructor of the class.
Definition CFluidIteration.hpp:45
void Iterate(COutput *output, CIntegration ****integration, CGeometry ****geometry, CSolver *****solver, CNumerics ******numerics, CConfig **config, CSurfaceMovement **surface_movement, CVolumetricMovement ***grid_movement, CFreeFormDefBox ***FFDBox, unsigned short val_iZone, unsigned short val_iInst) override
Perform a single iteration of the fluid system.
Definition CFluidIteration.cpp:57
void UpdateRamps(CGeometry ****geometry_container, CConfig **config_container, unsigned long iter, unsigned short iZone, RAMP_TYPE ramp_flag)
Monitors and updates ramps.
Definition CFluidIteration.cpp:299
void Solve(COutput *output, CIntegration ****integration, CGeometry ****geometry, CSolver *****solver, CNumerics ******numerics, CConfig **config, CSurfaceMovement **surface_movement, CVolumetricMovement ***grid_movement, CFreeFormDefBox ***FFDBox, unsigned short val_iZone, unsigned short val_iInst) override
Iterate the fluid system for a number of Inner_Iter iterations.
Definition CFluidIteration.cpp:412
Class for defining the free form FFDBox structure.
Definition CFreeFormDefBox.hpp:38
Parent class for defining the geometry of the problem (complete geometry, multigrid agglomerated geom...
Definition CGeometry.hpp:75
Main class for doing the space integration, time integration, and monitoring of a system of Partial D...
Definition CIntegration.hpp:47
Parent class for defining a single iteration of a physics problem.
Definition CIteration.hpp:50
Class for defining the numerical methods.
Definition CNumerics.hpp:48
Class for writing the convergence history and to write solution data to file.
Definition COutput.hpp:68
Definition CSolver.hpp:71
Class for moving the surface numerical grid.
Definition CSurfaceMovement.hpp:38
Class for moving the volumetric numerical grid.
Definition CVolumetricMovement.hpp:37
MAIN_SOLVER
different solver types for the CFD component
Definition option_structure.hpp:302
RAMP_TYPE
Definition option_structure.hpp:2120