ECOGEN 6.0
Evolutive, Compressible, Open, Genuine, Easy, N-phase
Loading...
Searching...
No Matches
FluxNEq.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 FLUXNEQ_H
32#define FLUXNEQ_H
33
34#include "../../Flux.h"
35
36class FluxNEq;
37
38#include "../ModNEq/ModNEq.h"
39
42class FluxNEq : public Flux
43{
44 public:
45 FluxNEq(const int& numbPhases);
46 ~FluxNEq() override;
47
48 void printFlux() const override;
49 void addFlux(double coefA) override;
50 void addFlux(Flux* flux) override;
51 void subtractFlux(double coefA) override;
52 void addFluxRotatingRegion(double coefA) override;
53 void subtractFluxRotatingRegion(double coefA) override;
54 void multiply(double scalar) override;
55 void setBufferFlux(Cell& cell) override;
56 void buildCons(Phase** phases, Mixture* /*mixture*/) override;
57 void buildPrim(Phase** phases, Mixture* mixture) override;
58 virtual void setToZero() override;
59 virtual void
60 addNonCons(double /*coefA*/, const Cell* /*cell*/, const Coord& /*normal*/, const Coord& /*tangent*/, const Coord& /*binormal*/) override
61 {
62 Errors::errorMessage("addNonCons not available for required model");
63 }
64 virtual void
65 subtractNonCons(double /*coefA*/, const Cell* /*cell*/, const Coord& /*normal*/, const Coord& /*tangent*/, const Coord& /*binormal*/) override
66 {
67 Errors::errorMessage("substractNonCons not available for required model");
68 }
69
74 virtual void addSymmetricTerms(Phase** phases, Mixture* mixture, const double& r, const double& v) override;
75
76 // Accessors
77 //----------
78 const double& getAlpha(const int& numPhase) const override { return m_alpha[numPhase]; };
79 const double& getMass(const int& numPhase) const override { return m_mass[numPhase]; };
80 const double& getEnergy(const int& numPhase) const override { return m_energ[numPhase]; };
81 const Coord& getMomentum(const int& numPhase) const override { return m_momentum[numPhase]; };
82 void setCons(const Flux* cons) override;
83
84 protected:
85 double* m_alpha;
86 double* m_mass;
87 double* m_energ;
89 double m_uI;
90 double m_pI;
91
92 private:
93 friend class ModNEq;
94 // To modify if needed, example: To add a class APUEqViscosity, add friend class APUEqViscosity.
95 friend class APUEqSurfaceTension;
96 friend class APUEqViscosity;
97 friend class APUEqConductivity;
98 friend class RiemannSolverHLLC;
99 friend class RiemannSolverExact;
100 friend class ModNEqHLL;
101 friend class ModNEqHLLAC;
102 friend class ModNEqHLLC4Waves;
103};
104
105#endif // FLUXNEQ_H
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 void errorMessage(const std::string &message_)
Definition Errors.cpp:56
Flux class for the non-equilibrium system of equations.
Definition FluxNEq.h:43
friend class ModNEqHLLAC
Definition FluxNEq.h:101
void buildCons(Phase **phases, Mixture *) override
Build the conservative variables for a given cell from primitive one.
Definition FluxNEq.cpp:136
void addFlux(double coefA) override
Add flux to the corresponding model flux.
Definition FluxNEq.cpp:60
void setBufferFlux(Cell &cell) override
Temporary store the conservative variables of a given cell.
Definition FluxNEq.cpp:132
virtual void subtractNonCons(double, const Cell *, const Coord &, const Coord &, const Coord &) override
Subtract non conservative term to the flux.
Definition FluxNEq.h:65
double m_uI
interfacial velocity
Definition FluxNEq.h:89
void subtractFlux(double coefA) override
Subtract flux to the corresponding model buffer flux.
Definition FluxNEq.cpp:84
void setCons(const Flux *cons) override
Definition FluxNEq.cpp:225
double * m_alpha
volume fraction array
Definition FluxNEq.h:85
friend class ModNEqHLLC4Waves
Definition FluxNEq.h:102
friend class RiemannSolverHLLC
RiemannSolverHLLC need to access to flux variables to solve discontinuity problem.
Definition FluxNEq.h:98
double * m_energ
specific total energy array
Definition FluxNEq.h:87
friend class APUEqViscosity
Definition FluxNEq.h:96
friend class APUEqSurfaceTension
Definition FluxNEq.h:95
const double & getMass(const int &numPhase) const override
Definition FluxNEq.h:79
void printFlux() const override
Definition FluxNEq.cpp:56
double m_pI
interfacial pressure
Definition FluxNEq.h:90
~FluxNEq() override
Definition FluxNEq.cpp:46
friend class RiemannSolverExact
RiemannSolverExact need to access to flux variables to solve discontinuity problem.
Definition FluxNEq.h:99
void addFluxRotatingRegion(double coefA) override
Add flux to the rotating region in MRF context.
Definition FluxNEq.cpp:96
friend class ModNEqHLL
Definition FluxNEq.h:100
Coord * m_momentum
momentum array
Definition FluxNEq.h:88
void buildPrim(Phase **phases, Mixture *mixture) override
Build the primitive variables for a given cell from conservative one.
Definition FluxNEq.cpp:148
virtual void addSymmetricTerms(Phase **phases, Mixture *mixture, const double &r, const double &v) override
Adds a geometric source term to simulate symmetry along one axis (cylindrical axisymmetry) or two axe...
Definition FluxNEq.cpp:212
void multiply(double scalar) override
multiply the flux of the corresponding model by a constant
Definition FluxNEq.cpp:120
friend class APUEqConductivity
Definition FluxNEq.h:97
const double & getAlpha(const int &numPhase) const override
Definition FluxNEq.h:78
const double & getEnergy(const int &numPhase) const override
Definition FluxNEq.h:80
FluxNEq(const int &numbPhases)
Definition FluxNEq.cpp:36
friend class ModNEq
Definition FluxNEq.h:93
void subtractFluxRotatingRegion(double coefA) override
Subtract flux to the rotating region in MRF context.
Definition FluxNEq.cpp:108
const Coord & getMomentum(const int &numPhase) const override
Definition FluxNEq.h:81
virtual void addNonCons(double, const Cell *, const Coord &, const Coord &, const Coord &) override
Add non conservative term to the flux.
Definition FluxNEq.h:60
virtual void setToZero() override
set each attribute of the flux to zero
Definition FluxNEq.cpp:198
double * m_mass
mass array
Definition FluxNEq.h:86
Abstract class for conservative variables and fluxes.
Definition Flux.h:43
Flux()
Definition Flux.cpp:39
Abstract class for mixture variables.
Definition Mixture.h:43
Abstract class for a phase.
Definition Phase.h:47