ECOGEN 6.0
Evolutive, Compressible, Open, Genuine, Easy, N-phase
Loading...
Searching...
No Matches
APETurbulenceSmagorinsky.h
Go to the documentation of this file.
1//
2// ,---. ,--, .---. ,--, ,---. .-. .-.
3// | .-' .' .') / .-. ) .' .' | .-' | \| |
4// | `-. | |(_) | | |(_) | | __ | `-. | | |
5// | .-' \ \ | | | | \ \ ( _) | .-' | |\ |
6// | `--. \ `-. \ `-' / \ `-) ) | `--. | | |)|
7// /( __.' \____\ )---' )\____/ /( __.' /( (_)
8// (__) (_) (__) (__) (__)
9// Official webSite: https://code-mphi.github.io/ECOGEN/
10//
11// This file is part of ECOGEN.
12//
13// ECOGEN is the legal property of its developers, whose names
14// are listed in the copyright file included with this source
15// distribution.
16//
17// ECOGEN is free software: you can redistribute it and/or modify
18// it under the terms of the GNU General Public License as published
19// by the Free Software Foundation, either version 3 of the License,
20// or (at your option) any later version.
21//
22// ECOGEN is distributed in the hope that it will be useful,
23// but WITHOUT ANY WARRANTY; without even the implied warranty of
24// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25// GNU General Public License for more details.
26//
27// You should have received a copy of the GNU General Public License
28// along with ECOGEN (file LICENSE).
29// If not, see <http://www.gnu.org/licenses/>.
30
31#ifndef APETURBULENCESMAGORINSKY_H
32#define APETURBULENCESMAGORINSKY_H
33
34#include "../APEuler.h"
35#include "QAPTurbulence.h"
36#include "../../Eos/Eos.h"
37
41{
42 public:
49 APETurbulenceSmagorinsky(int& numberQPA, Eos** eos, tinyxml2::XMLElement* elementSmagorinsky, std::string fileName);
51
52 void addQuantityAddPhys(Cell* cell) override;
53
54 void solveFluxAddPhys(CellInterface* cellInterface) override;
55 void solveFluxAddPhysBoundary(CellInterface* cellInterface) override;
75 void solveFluxTurbulenceInner(CellInterface* cellInterface,
76 const Coord& velocityLeft,
77 const Coord& velocityRight,
78 const Coord& gradULeft,
79 const Coord& gradURight,
80 const Coord& gradVLeft,
81 const Coord& gradVRight,
82 const Coord& gradWLeft,
83 const Coord& gradWRight,
84 const Coord& gradTLeft,
85 const Coord& gradTRight,
86 const double& gamma,
87 const double& cv,
88 const double& mu,
89 const double& lambda,
90 const double& rhoLeft,
91 const double& rhoRight,
92 const double& cellVolumeLeft,
93 const Tensor& strainRateLeft,
94 const Tensor& strainRateRight) const;
105 const Coord& velocityLeft,
106 const Coord& gradULeft,
107 const Coord& gradVLeft,
108 const Coord& gradWLeft,
109 const Coord& gradTLeft,
110 const double& rhoLeft,
111 const double& cellVolumeLeft,
112 const Tensor& strainRateLeft) const;
118 // void solveFluxTurbulenceWall(const Coord& velocityLeft,
119 // const double& rhoLeft,
120 // const double& distLeft,
121 // Coord& velocityWall = Coord::defaultCoordNonConst) const;
130 void solveFluxTurbulenceSymmetry(CellInterface* cellInterface,
131 const Coord& gradULeft,
132 const Coord& gradVLeft,
133 const Coord& gradWLeft,
134 const double& rhoLeft,
135 const double& cellVolumeLeft,
136 const Tensor& strainRateLeft,
137 const double& mu) const;
139 void solveFluxTurbulenceOther() const;
140 void addNonCons(Cell* /*cell*/) override {};
141 void addSymmetricTermsRadialAxisOnX(Cell* /*cell*/) override
142 {
143 Errors::errorMessage("addSymmetricTermsX not implemented for used additional physic");
144 };
145 void addSymmetricTermsRadialAxisOnY(Cell* /*cell*/) override
146 {
147 Errors::errorMessage("addSymmetricTermsY not implemented for used additional physic");
148 };
149
150 void communicationsAddPhys(const int& dim, const int& lvl) override;
151
153 virtual void computeTurbulenceParameters() const override;
154
155 protected:
156 private:
157 bool m_Ducros;
158 double m_Cs;
159 double m_Ci;
160 double m_PrT;
161 double m_cv;
162 double m_gamma;
163 double m_mu;
164 double m_lambda;
166
182};
183
184#endif // APETURBULENCESMAGORINSKY_H
double mu
Relaxation coefficient. Herein, the relaxation coefficient is identical for all phase_k–phase_j combi...
Definition RelaxationPFinite.cpp:36
@ lambda
Definition Tools.h:174
void addSymmetricTermsRadialAxisOnY(Cell *) override
Add the symmetrical terms of the corresponding additional physics in a cell (when radial axis is on Y...
Definition APETurbulenceSmagorinsky.h:145
Coord m_gradVRight
Right gradient of the velocity in the y-direction for the flux computation (buffer).
Definition APETurbulenceSmagorinsky.h:175
Coord m_velocityLeft
Left velocity vector for the flux computation (buffer).
Definition APETurbulenceSmagorinsky.h:167
Coord m_gradTRight
Right vector of the temperature gradients (buffer).
Definition APETurbulenceSmagorinsky.h:178
double m_PrT
Turbulent Prandtl number (nondimensional) (buffer).
Definition APETurbulenceSmagorinsky.h:160
void addQuantityAddPhys(Cell *cell) override
Add the quantities for the additional physics.
Definition APETurbulenceSmagorinsky.cpp:70
Coord m_gradTLeft
Left vector of the temperature gradients (buffer).
Definition APETurbulenceSmagorinsky.h:172
void addSymmetricTermsRadialAxisOnX(Cell *) override
Add the symmetrical terms of the corresponding additional physics in a cell (when radial axis is on X...
Definition APETurbulenceSmagorinsky.h:141
Coord m_gradURight
Right gradient of the velocity in the x-direction for the flux computation (buffer).
Definition APETurbulenceSmagorinsky.h:174
Coord m_velocityRight
Right velocity vector for the flux computation (buffer).
Definition APETurbulenceSmagorinsky.h:173
Tensor m_tensorRight
Right tensor of the velocity gradients (buffer).
Definition APETurbulenceSmagorinsky.h:177
Coord m_gradWLeft
Left gradient of the velocity in the z-direction for the flux computation (buffer).
Definition APETurbulenceSmagorinsky.h:170
void communicationsAddPhys(const int &dim, const int &lvl) override
Communication of the additional physics quantities for parallel purposes with Adaptive Mesh Refinemen...
Definition APETurbulenceSmagorinsky.cpp:570
double m_gamma
Polytropic constant (nondimensional) (taken from the EOS class) (buffer).
Definition APETurbulenceSmagorinsky.h:162
double m_lambda
Thermal conductivity (W/(m.K)) of phase (taken from the EOS class) (buffer).
Definition APETurbulenceSmagorinsky.h:164
void solveFluxAddPhysBoundary(CellInterface *cellInterface) override
Solve the additional physics flux at a domain boundary.
Definition APETurbulenceSmagorinsky.cpp:141
Coord m_gradVLeft
Left gradient of the velocity in the y-direction for the flux computation (buffer).
Definition APETurbulenceSmagorinsky.h:169
int m_numQPA
Number of the associated variable for each cell (m_vecGrandeursAddPhys).
Definition APETurbulenceSmagorinsky.h:165
Coord m_tangent
Tangent vector of the corresponding face for the flux computation (buffer).
Definition APETurbulenceSmagorinsky.h:180
void solveFluxTurbulenceInner(CellInterface *cellInterface, const Coord &velocityLeft, const Coord &velocityRight, const Coord &gradULeft, const Coord &gradURight, const Coord &gradVLeft, const Coord &gradVRight, const Coord &gradWLeft, const Coord &gradWRight, const Coord &gradTLeft, const Coord &gradTRight, const double &gamma, const double &cv, const double &mu, const double &lambda, const double &rhoLeft, const double &rhoRight, const double &cellVolumeLeft, const Tensor &strainRateLeft, const Tensor &strainRateRight) const
Solve the turbulence flux between two cells.
Definition APETurbulenceSmagorinsky.cpp:245
void addNonCons(Cell *) override
Add the non-conservative terms of the corresponding additional physics in a cell.
Definition APETurbulenceSmagorinsky.h:140
Tensor m_tensorLeft
Left tensor of the velocity gradients (buffer).
Definition APETurbulenceSmagorinsky.h:171
void solveFluxTurbulenceSymmetry(CellInterface *cellInterface, const Coord &gradULeft, const Coord &gradVLeft, const Coord &gradWLeft, const double &rhoLeft, const double &cellVolumeLeft, const Tensor &strainRateLeft, const double &mu) const
Solve the turbulence flux at a boundary with a wall type in MRF case.
Definition APETurbulenceSmagorinsky.cpp:477
double m_cv
Volume calorific energy (J/kg/K) (taken from the EOS class) (buffer).
Definition APETurbulenceSmagorinsky.h:161
void solveFluxTurbulenceNonReflecting(CellInterface *cellInterface, const Coord &velocityLeft, const Coord &gradULeft, const Coord &gradVLeft, const Coord &gradWLeft, const Coord &gradTLeft, const double &rhoLeft, const double &cellVolumeLeft, const Tensor &strainRateLeft) const
Solve the turbulence flux at a boundary with a non-reflecting type.
Definition APETurbulenceSmagorinsky.cpp:433
Coord m_binormal
Binormal vector of the corresponding face for the flux computation (buffer).
Definition APETurbulenceSmagorinsky.h:181
Coord m_normal
Normal vector of the corresponding face for the flux computation (buffer).
Definition APETurbulenceSmagorinsky.h:179
double m_Ci
Coefficient modelling the trace of the SGS stress tensor (nondimensional) (buffer).
Definition APETurbulenceSmagorinsky.h:159
void solveFluxTurbulenceOther() const
Solve the turbulence flux at a boundary with non-defined type yet.
Definition APETurbulenceSmagorinsky.cpp:557
virtual void computeTurbulenceParameters() const override
Print the diagnostics for turbulence decay cases.
Definition APETurbulenceSmagorinsky.cpp:580
double m_Cs
Coefficient modelling the off-diagonal terms of the SGS stress tensor (nondimensional) (buffer).
Definition APETurbulenceSmagorinsky.h:158
bool m_Ducros
Bool to turn on/off the Ducros flow sensor.
Definition APETurbulenceSmagorinsky.h:157
void solveFluxAddPhys(CellInterface *cellInterface) override
Solve the additional physics flux between two cells.
Definition APETurbulenceSmagorinsky.cpp:74
Coord m_gradWRight
Right gradient of the velocity in the z-direction for the flux computation (buffer).
Definition APETurbulenceSmagorinsky.h:176
APETurbulenceSmagorinsky()
Definition APETurbulenceSmagorinsky.cpp:37
~APETurbulenceSmagorinsky() override
Definition APETurbulenceSmagorinsky.cpp:66
double m_mu
Dynamic viscosity (Pa.s) (molecular: taken from the EOS class) (buffer).
Definition APETurbulenceSmagorinsky.h:163
Coord m_gradULeft
Left gradient of the velocity in the x-direction for the flux computation (buffer).
Definition APETurbulenceSmagorinsky.h:168
APEuler()
Definition APEuler.cpp:35
Definition CellInterface.h:48
Base class for a mesh cell.
Definition Cell.h:59
Class for a coordinate system object such as coordinates of the vertex or a vector.
Definition Coord.h:43
General class for Equation of State (EOS).
Definition Eos.h:62
static void errorMessage(const std::string &message_)
Definition Errors.cpp:56
Class for a matrix 3x3 system object.
Definition Tensor.h:57
Definition tinyxml2.h:1148