ECOGEN 6.0
Evolutive, Compressible, Open, Genuine, Easy, N-phase
Loading...
Searching...
No Matches
ModNEqDEM.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 MODNEQDEM_H
32#define MODNEQDEM_H
33
36
37class ModNEqDEM;
38
39#include "FluxNEqDEM.h"
40#include "../Euler/FluxEuler.h"
41
44class ModNEqDEM : public ModNEq
45{
46 public:
52 ModNEqDEM(const int& numbTransports, const int& numbPhases, const bool& solverType, TypeContactAreas typeContactAreas);
56 ModNEqDEM(const std::string& name, const int& numbTransports);
57 ~ModNEqDEM() override;
58
59 void allocateCons(Flux** cons) override;
60
61 //Fluid-flow Riemann solvers
62 //--------------------------
63 void solveRiemannIntern(Cell& cellLeft,
64 Cell& cellRight,
65 const double& dxLeft,
66 const double& dxRight,
67 double& dtMax,
68 std::vector<double>& /*boundData*/ = DEFAULT_VEC_INTERFACE_DATA) const override; // Riemann between two computed cells
70 void solveRiemannWall(Cell& cellLeft, const double& dxLeft, double& dtMax, std::vector<double>& /*boundData*/) const override;
71 // virtual void solveRiemannInternMRF(Cell& cellLeft, Cell& cellRight, const double& dxLeft, const double& dxRight, double& dtMax, const Coord& omega,
72 // const Coord& normal, const Coord& tangent, const Coord& binormal, const Coord& position) const;
73 // virtual void solveRiemannInletTank(Cell& cellLeft, const double& dxLeft, double& dtMax, const double* ak0, const double* rhok0, const double& p0,
74 // const double& /*T0*/, std::vector<double>& boundData) const;
75
76 // virtual void solveRiemannInletInjStagState(Cell& cellLeft, const double& dxLeft, double& dtMax, const double m0, const double* ak0,
77 // const double* rhok0, const double* pk0, std::vector<double>& boundData) const;
78
79 // virtual void solveRiemannInletInjTemp(Cell& cellLeft, const double& dxLeft, double& dtMax, const double m0, const double* Tk0, const double* ak0,
80 // std::vector<double>& boundData) const;
81
82 // virtual void solveRiemannOutletPressure(Cell& cellLeft, const double& dxLeft, double& dtMax, const double p0, std::vector<double>& boundData) const;
83
84 // virtual void solveRiemannOutletMassflow(Cell& cellLeft, const double& dxLeft, double& dtMax, const double m0, std::vector<double>& boundData) const;
85
86 // virtual void solveRiemannNullFlux() const;
87
88 void setPhaseSlope(Phase& phaseSlope, int k) override;
89 void setSlopeDistance(const double& slopeDistance) override;
90
91 protected:
95 mutable std::vector<PhaseNEq>
97 mutable double m_slopeDistance = 0.;
98 mutable std::vector<double> m_alphaLeft;
99 mutable std::vector<double> m_alphaRight;
100
101 private:
102 static const std::string NAME;
103};
104
105#endif // MODNEQDEM_H
static std::vector< double > DEFAULT_VEC_INTERFACE_DATA(VarBoundary::SIZE, 0.)
TypeContactAreas
Enumeration for the type of contact areas for the DEM.
Definition Tools.h:188
Base class for a mesh cell.
Definition Cell.h:59
Model class for Euler Flux (single phase).
Definition FluxEuler.h:39
Abstract class for conservative variables and fluxes.
Definition Flux.h:43
Model class for the non-equilibrium system of equations using the DEM.
Definition ModNEqDEM.h:45
~ModNEqDEM() override
Definition ModNEqDEM.cpp:71
std::vector< PhaseNEq > m_phaseSlope
Buffer to store the in-cell phase (primitive) slopes of each phase for second-order extrapolation in ...
Definition ModNEqDEM.h:96
void solveRiemannWall(Cell &cellLeft, const double &dxLeft, double &dtMax, std::vector< double > &) const override
Call Riemann solver with wall BC.
Definition ModNEqDEM.cpp:220
double m_slopeDistance
Geometric distance over which the in-cell slopes extrapolate (cell width along the face normal).
Definition ModNEqDEM.h:97
void setSlopeDistance(const double &slopeDistance) override
Set the geometric distance over which the in-cell slopes extrapolate (cell width along the face norma...
Definition ModNEqDEM.cpp:89
std::vector< double > m_alphaRight
Volume fractions from the right cell (used to compute contact areas).
Definition ModNEqDEM.h:99
FluxEuler m_fluxEuler
Definition ModNEqDEM.h:93
void setPhaseSlope(Phase &phaseSlope, int k) override
Set the slope values for the extrapolation within the cell.
Definition ModNEqDEM.cpp:85
RiemannSolver * m_RiemannSolver
Riemann solver pointer to either specific RP Euler solvers such as the HLLC or the exact (for Euler m...
Definition ModNEqDEM.h:92
std::vector< double > m_alphaLeft
Volume fractions from the left cell (used to compute contact areas).
Definition ModNEqDEM.h:98
void solveRiemannIntern(Cell &cellLeft, Cell &cellRight, const double &dxLeft, const double &dxRight, double &dtMax, std::vector< double > &=DEFAULT_VEC_INTERFACE_DATA) const override
Cell to cell Riemann solver.
Definition ModNEqDEM.cpp:95
void allocateCons(Flux **cons) override
Allocate conservative variable arrays.
Definition ModNEqDEM.cpp:81
ModNEqDEM(const int &numbTransports, const int &numbPhases, const bool &solverType, TypeContactAreas typeContactAreas)
NEq model constructor.
Definition ModNEqDEM.cpp:37
static const std::string NAME
Definition ModNEqDEM.h:102
ModNEq(const int &numbTransports, const int &numbPhases)
NEq model constructor.
Definition ModNEq.cpp:37
Abstract class for a phase.
Definition Phase.h:47
RiemannSolver abstract class for the non-equilibrium system of equations.
Definition RiemannSolver.h:41