ECOGEN 4.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{
42public:
44 APEViscosity(int& numberQPA, Eos** eos);
45 virtual ~APEViscosity();
46
47 virtual void addQuantityAddPhys(Cell* cell);
48
49 virtual void solveFluxAddPhys(CellInterface* cellInterface);
50 virtual void solveFluxAddPhysBoundary(CellInterface* cellInterface);
61 void solveFluxViscosityInner(const Coord& velocityLeft, const Coord& velocityRight, const Coord& gradULeft, const Coord& gradURight, const Coord& gradVLeft, const Coord& gradVRight,
62 const Coord& gradWLeft, const Coord& gradWRight, const double& mu) const;
69 void solveFluxViscosityNonReflecting(const Coord& velocityLeft, const Coord& gradULeft, const Coord& gradVLeft, const Coord& gradWLeft, const double& muLeft) const;
75 void solveFluxViscosityWall(const Coord& velocityLeft, const double& muLeft, const double& distLeft, Coord& velocityWall = Coord::defaultCoordNonConst) const;
81 void solveFluxViscositySymmetry(const Coord& gradULeft, const Coord& gradVLeft, const Coord& gradWLeft, const double& muLeft) const;
83 void solveFluxViscosityOther() const;
84 virtual void addNonCons(Cell* /*cell*/) {};
85 virtual void addSymmetricTermsRadialAxisOnX(Cell* /*cell*/) { Errors::errorMessage("addSymmetricTermsX not implemented for used additional physic"); };
86 virtual void addSymmetricTermsRadialAxisOnY(Cell* /*cell*/) { Errors::errorMessage("addSymmetricTermsY not implemented for used additional physic"); };
87
88 virtual void communicationsAddPhys(const int& dim, const int& lvl);
89
90protected:
91
92private:
93 double m_mu;
95
109};
110
111#endif // APEVISCOSITY_H
double mu
Relaxation coefficient. Herein, the relaxation coefficient is identical for all phase_k–phase_j combi...
Definition RelaxationPFinite.cpp:36
Definition APEViscosity.h:41
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:233
Coord m_binormal
Binormal vector of the corresponding face for the flux computation (buffer)
Definition APEViscosity.h:108
double m_mu
Dynamic viscosity (kg/m/s or Pa.s) (taken from the EOS classe) (buffer)
Definition APEViscosity.h:93
virtual void addQuantityAddPhys(Cell *cell)
Add the quantities for the additional physic.
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:216
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:208
virtual void solveFluxAddPhysBoundary(CellInterface *cellInterface)
Solve the additional physic flux at a domain boundary.
Definition APEViscosity.cpp:95
Coord m_gradWRight
Right gradient of the velocity in the z-direction for the flux computation (buffer)
Definition APEViscosity.h:104
Tensor m_tensorLeft
Left tensor of the velocity gradients (buffer)
Definition APEViscosity.h:100
Tensor m_tensorRight
Right tensor of the velocity gradients (buffer)
Definition APEViscosity.h:105
virtual void communicationsAddPhys(const int &dim, const int &lvl)
Communication of the additional physics quantities for parallel purposes with Adaptive Mesh Refinemen...
Definition APEViscosity.cpp:265
APEViscosity()
Definition APEViscosity.cpp:35
virtual void addSymmetricTermsRadialAxisOnY(Cell *)
Add the symmetrical terms of the corresponding additional physic in a cell (when radial axis is on Y)
Definition APEViscosity.h:86
virtual void addSymmetricTermsRadialAxisOnX(Cell *)
Add the symmetrical terms of the corresponding additional physic in a cell (when radial axis is on X)
Definition APEViscosity.h:85
Coord m_velocityRight
Right velocity vector for the flux computation (buffer)
Definition APEViscosity.h:101
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:146
Coord m_gradVRight
Right gradient of the velocity in the y-direction for the flux computation (buffer)
Definition APEViscosity.h:103
int m_numQPA
Number of the associated variable for each cell (m_vecGrandeursAddPhys)
Definition APEViscosity.h:94
virtual void solveFluxAddPhys(CellInterface *cellInterface)
Solve the additional physic flux between two cells.
Definition APEViscosity.cpp:58
Coord m_gradWLeft
Left gradient of the velocity in the z-direction for the flux computation (buffer)
Definition APEViscosity.h:99
virtual void addNonCons(Cell *)
Add the non-conservative terms of the corresponding additional physic in a cell.
Definition APEViscosity.h:84
Coord m_gradVLeft
Left gradient of the velocity in the y-direction for the flux computation (buffer)
Definition APEViscosity.h:98
Coord m_tangent
Tangent vector of the corresponding face for the flux computation (buffer)
Definition APEViscosity.h:107
Coord m_gradULeft
Left gradient of the velocity in the x-direction for the flux computation (buffer)
Definition APEViscosity.h:97
void solveFluxViscosityOther() const
Solve the viscosity flux at a boundary with non-defined type yet.
Definition APEViscosity.cpp:252
Coord m_velocityLeft
Left velocity vector for the flux computation (buffer)
Definition APEViscosity.h:96
Coord m_normal
Normal vector of the corresponding face for the flux computation (buffer)
Definition APEViscosity.h:106
virtual ~APEViscosity()
Definition APEViscosity.cpp:47
Coord m_gradURight
Right gradient of the velocity in the x-direction for the flux computation (buffer)
Definition APEViscosity.h:102
General class for additional physics for the Euler model.
Definition APEuler.h:41
Definition CellInterface.h:52
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:54
static void errorMessage(const std::string &message)
Definition Errors.cpp:56
Class for a matrix 3x3 system object.
Definition Tensor.h:46