ECOGEN 6.0
Evolutive, Compressible, Open, Genuine, Easy, N-phase
Loading...
Searching...
No Matches
APEViscosity.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 APEVISCOSITY_H
32#define APEVISCOSITY_H
33
34#include "../APEuler.h"
35#include "QAPViscosity.h"
36#include "../../Eos/Eos.h"
37
40class APEViscosity : public APEuler
41{
42 public:
44 APEViscosity(int& numberQPA, Eos** eos);
45 ~APEViscosity() override;
46
47 void addQuantityAddPhys(Cell* cell) override;
48
49 void solveFluxAddPhys(CellInterface* cellInterface) override;
50 void solveFluxAddPhysBoundary(CellInterface* cellInterface) override;
61 void solveFluxViscosityInner(const Coord& velocityLeft,
62 const Coord& velocityRight,
63 const Coord& gradULeft,
64 const Coord& gradURight,
65 const Coord& gradVLeft,
66 const Coord& gradVRight,
67 const Coord& gradWLeft,
68 const Coord& gradWRight,
69 const double& mu) const;
77 const Coord& velocityLeft, const Coord& gradULeft, const Coord& gradVLeft, const Coord& gradWLeft, const double& muLeft) const;
83 void solveFluxViscosityWall(const Coord& velocityLeft,
84 const double& muLeft,
85 const double& distLeft,
86 Coord& velocityWall = Coord::defaultCoordNonConst) const;
92 void solveFluxViscositySymmetry(const Coord& gradULeft, const Coord& gradVLeft, const Coord& gradWLeft, const double& muLeft) const;
94 void solveFluxViscosityOther() const;
95 void addNonCons(Cell* /*cell*/) override {};
96 void addSymmetricTermsRadialAxisOnX(Cell* /*cell*/) override
97 {
98 Errors::errorMessage("addSymmetricTermsX not implemented for used additional physic");
99 };
100 void addSymmetricTermsRadialAxisOnY(Cell* /*cell*/) override
101 {
102 Errors::errorMessage("addSymmetricTermsY not implemented for used additional physic");
103 };
104
105 void communicationsAddPhys(const int& dim, const int& lvl) override;
106
108 virtual void computeTurbulenceParameters() const override;
109
110 protected:
111 private:
112 double m_mu;
114
128};
129
130#endif // APEVISCOSITY_H
double mu
Relaxation coefficient. Herein, the relaxation coefficient is identical for all phase_k–phase_j combi...
Definition RelaxationPFinite.cpp:36
void solveFluxViscositySymmetry(const Coord &gradULeft, const Coord &gradVLeft, const Coord &gradWLeft, const double &muLeft) const
Solve the viscosity flux at a boundary with a symmetry type.
Definition APEViscosity.cpp:258
Coord m_binormal
Binormal vector of the corresponding face for the flux computation (buffer).
Definition APEViscosity.h:127
double m_mu
Dynamic viscosity (kg/m/s or Pa.s) (taken from the EOS class) (buffer).
Definition APEViscosity.h:112
void addQuantityAddPhys(Cell *cell) override
Add the quantities for the additional physics.
Definition APEViscosity.cpp:51
void solveFluxViscosityWall(const Coord &velocityLeft, const double &muLeft, const double &distLeft, Coord &velocityWall=Coord::defaultCoordNonConst) const
Solve the viscosity flux at a boundary with a wall type in MRF case.
Definition APEViscosity.cpp:241
void solveFluxAddPhys(CellInterface *cellInterface) override
Solve the additional physics flux between two cells.
Definition APEViscosity.cpp:55
void addSymmetricTermsRadialAxisOnX(Cell *) override
Add the symmetrical terms of the corresponding additional physics in a cell (when radial axis is on X...
Definition APEViscosity.h:96
void solveFluxViscosityNonReflecting(const Coord &velocityLeft, const Coord &gradULeft, const Coord &gradVLeft, const Coord &gradWLeft, const double &muLeft) const
Solve the viscosity flux at a boundary with a non-reflecting type.
Definition APEViscosity.cpp:233
Coord m_gradWRight
Right gradient of the velocity in the z-direction for the flux computation (buffer).
Definition APEViscosity.h:123
Tensor m_tensorLeft
Left tensor of the velocity gradients (buffer).
Definition APEViscosity.h:119
Tensor m_tensorRight
Right tensor of the velocity gradients (buffer).
Definition APEViscosity.h:124
APEViscosity()
Definition APEViscosity.cpp:35
Coord m_velocityRight
Right velocity vector for the flux computation (buffer).
Definition APEViscosity.h:120
void solveFluxViscosityInner(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 double &mu) const
Solve the viscosity flux between two cells.
Definition APEViscosity.cpp:163
Coord m_gradVRight
Right gradient of the velocity in the y-direction for the flux computation (buffer).
Definition APEViscosity.h:122
int m_numQPA
Number of the associated variable for each cell (m_vecGrandeursAddPhys).
Definition APEViscosity.h:113
Coord m_gradWLeft
Left gradient of the velocity in the z-direction for the flux computation (buffer).
Definition APEViscosity.h:118
Coord m_gradVLeft
Left gradient of the velocity in the y-direction for the flux computation (buffer).
Definition APEViscosity.h:117
void communicationsAddPhys(const int &dim, const int &lvl) override
Communication of the additional physics quantities for parallel purposes with Adaptive Mesh Refinemen...
Definition APEViscosity.cpp:290
void addSymmetricTermsRadialAxisOnY(Cell *) override
Add the symmetrical terms of the corresponding additional physics in a cell (when radial axis is on Y...
Definition APEViscosity.h:100
Coord m_tangent
Tangent vector of the corresponding face for the flux computation (buffer).
Definition APEViscosity.h:126
Coord m_gradULeft
Left gradient of the velocity in the x-direction for the flux computation (buffer).
Definition APEViscosity.h:116
void solveFluxViscosityOther() const
Solve the viscosity flux at a boundary with non-defined type yet.
Definition APEViscosity.cpp:277
Coord m_velocityLeft
Left velocity vector for the flux computation (buffer).
Definition APEViscosity.h:115
Coord m_normal
Normal vector of the corresponding face for the flux computation (buffer).
Definition APEViscosity.h:125
void solveFluxAddPhysBoundary(CellInterface *cellInterface) override
Solve the additional physics flux at a domain boundary.
Definition APEViscosity.cpp:91
Coord m_gradURight
Right gradient of the velocity in the x-direction for the flux computation (buffer).
Definition APEViscosity.h:121
virtual void computeTurbulenceParameters() const override
Print the diagnostics for turbulence decay cases.
Definition APEViscosity.cpp:299
void addNonCons(Cell *) override
Add the non-conservative terms of the corresponding additional physics in a cell.
Definition APEViscosity.h:95
~APEViscosity() override
Definition APEViscosity.cpp:47
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
static Coord defaultCoordNonConst
Default Coord object (non-const version).
Definition Coord.h:58
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