ECOGEN 4.0
Evolutive, Compressible, Open, Genuine, Easy, N-phase
Loading...
Searching...
No Matches
ModEulerHomogeneous.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 MODEULERHOMOGENEOUSOUS_H
32#define MODEULERHOMOGENEOUSOUS_H
33
34#include "../Model.h"
35#include "../../Order1/Cell.h"
36#include "MixEulerHomogeneous.h"
37
39
41
45{
46 public:
51 ModEulerHomogeneous(const int& numbTransports, const int liquid = 0, const int vapor = 1);
52 virtual ~ModEulerHomogeneous();
53
54 virtual void allocateCons(Flux** cons);
55 virtual void allocatePhase(Phase** phase);
56 virtual void allocateMixture(Mixture** mixture);
57 void allocatePhaseGradient(GradPhase** phase);
59
60 virtual void fulfillState(Phase** phases, Mixture* mixture);
61
63 virtual void fulfillStateRestart(Phase** /*phases*/, Mixture* /*mixture*/) {};
64
66 virtual void initializeAugmentedVariables(Cell* /*cell*/) {};
67
68 //Hydrodynamic Riemann solvers
69 //----------------------------
70 virtual void solveRiemannIntern(Cell& cellLeft, Cell& cellRight, const double& dxLeft, const double& dxRight, double& dtMax, std::vector<double> &boundData = DEFAULT_VEC_INTERFACE_DATA) const;
71 virtual void reverseProjection(const Coord normal, const Coord tangent, const Coord binormal) const;
72
73 //Accessors
74 //---------
81 virtual double selectScalar(Phase** phases, Mixture* mixture, Transport* transports, Variable nameVariable, int num = 0) const;
82 virtual const double& getSM();
83 virtual const Coord& getVelocity(const Cell* cell) const { return cell->getMixture()->getVelocity(); };
84 virtual Coord& getVelocity(Cell* cell) { return cell->getMixture()->getVelocity(); };
85 int getLiq();
86 int getVap();
87 virtual const std::string& whoAmI() const { return m_name; };
88 virtual void setSmoothCrossSection1d(const bool& applySmooth) { m_smoothCrossSection1d = applySmooth; };
89
90 protected:
91
92 private:
93 static const std::string NAME;
94 int m_liq;
95 int m_vap;
96
98};
99
100#endif // MODEULERHOMOGENEOUSOUS_H
static std::vector< double > DEFAULT_VEC_INTERFACE_DATA(VarBoundary::SIZE, 0.)
Variable
Enumeration for the flow variables.
Definition Tools.h:78
Base class for a mesh cell.
Definition Cell.h:59
virtual Mixture * getMixture(Prim=vecPhases) const
Definition Cell.cpp:536
Class for a coordinate system object such as coordinates of the vertex or a vector.
Definition Coord.h:43
Model class for Homogeneous Euler Flux (liquid-vapor in thermodynamical equilibrium)
Definition FluxEulerHomogeneous.h:43
Abstract class for conservative variables and fluxes.
Definition Flux.h:43
Mixture variable gradients. Stored for 2nd-order computation on unstructured mesh (O2 NS)
Definition GradMixture.h:45
Phase variable gradients. Stored for 2nd-order computation on unstructured mesh (O2 NS)
Definition GradPhase.h:44
Abstract class for mixture variables.
Definition Mixture.h:43
virtual const Coord & getVelocity() const
Definition Mixture.h:194
Model class for Homogeneous Euler mathematical system of equations (velocity and thermodynamical equi...
Definition ModEulerHomogeneous.h:45
static const std::string NAME
Definition ModEulerHomogeneous.h:93
virtual void setSmoothCrossSection1d(const bool &applySmooth)
Definition ModEulerHomogeneous.h:88
int getVap()
Definition ModEulerHomogeneous.cpp:237
virtual void reverseProjection(const Coord normal, const Coord tangent, const Coord binormal) const
Flux reverse projection in the absolute Cartesian coordinate system.
Definition ModEulerHomogeneous.cpp:223
int m_vap
Vapor phase number for phase change.
Definition ModEulerHomogeneous.h:95
void allocateMixtureGradient(GradMixture **mixture)
Instanciate gradient mixture variable.
Definition ModEulerHomogeneous.cpp:83
virtual void initializeAugmentedVariables(Cell *)
Definition ModEulerHomogeneous.h:66
virtual void solveRiemannIntern(Cell &cellLeft, Cell &cellRight, const double &dxLeft, const double &dxRight, double &dtMax, std::vector< double > &boundData=DEFAULT_VEC_INTERFACE_DATA) const
Cell to cell Riemann solver.
Definition ModEulerHomogeneous.cpp:109
virtual const Coord & getVelocity(const Cell *cell) const
Return the fluid velocity of the corresponding cell.
Definition ModEulerHomogeneous.h:83
virtual Coord & getVelocity(Cell *cell)
Definition ModEulerHomogeneous.h:84
virtual void allocatePhase(Phase **phase)
Instanciate fluid phase variable.
Definition ModEulerHomogeneous.cpp:62
virtual double selectScalar(Phase **phases, Mixture *mixture, Transport *transports, Variable nameVariable, int num=0) const
Select a specific scalar variable.
Definition ModEulerHomogeneous.cpp:246
virtual const std::string & whoAmI() const
Definition ModEulerHomogeneous.h:87
virtual ~ModEulerHomogeneous()
Definition ModEulerHomogeneous.cpp:48
virtual void allocateCons(Flux **cons)
Allocate conservative variable arrays.
Definition ModEulerHomogeneous.cpp:55
virtual void fulfillState(Phase **phases, Mixture *mixture)
Complete a thermodynamics state frome minimum variables depending on the model.
Definition ModEulerHomogeneous.cpp:90
int m_liq
Liquid phase number for phase change.
Definition ModEulerHomogeneous.h:94
virtual const double & getSM()
Return the local fluid velocity.
Definition ModEulerHomogeneous.cpp:216
virtual void fulfillStateRestart(Phase **, Mixture *)
Definition ModEulerHomogeneous.h:63
int getLiq()
Definition ModEulerHomogeneous.cpp:230
virtual void allocateMixture(Mixture **mixture)
Instanciate mixture variable.
Definition ModEulerHomogeneous.cpp:69
void allocatePhaseGradient(GradPhase **phase)
Instanciate gradient phase variable.
Definition ModEulerHomogeneous.cpp:76
Abstract class for mathematical flow models.
Definition Model.h:50
std::string m_name
Name of the required model.
Definition Model.h:346
bool m_smoothCrossSection1d
1D geometry with smooth cross section variation (default: false)
Definition Model.h:351
Abstract class for a phase.
Definition Phase.h:47
Class for additional transport equations.
Definition Transport.h:41