ECOGEN 4.0
Evolutive, Compressible, Open, Genuine, Easy, N-phase
Loading...
Searching...
No Matches
FluxPTUEq.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 FLUXPTUEQ_H
32#define FLUXPTUEQ_H
33
34#include "../Flux.h"
35
38class FluxPTUEq : public Flux
39{
40 public:
41 FluxPTUEq(const int& numbPhases);
42 virtual ~FluxPTUEq();
43
44 virtual void printFlux() const;
45 virtual void addFlux(double coefA);
46 virtual void addFlux(Flux* flux);
47 virtual void subtractFlux(double coefA);
48 virtual void multiply(double scalar);
49 virtual void setBufferFlux(Cell& cell);
50 virtual void buildCons(Phase** phases, Mixture* mixture);
51 virtual void buildPrim(Phase** phases, Mixture* mixture);
52 virtual void setToZero();
53 virtual void addNonCons(double /*coefA*/, const Cell* /*cell*/, const Coord& /*normal*/, const Coord& /*tangent*/, const Coord& /*binormal*/) {};
54 virtual void subtractNonCons(double /*coefA*/, const Cell* /*cell*/, const Coord& /*normal*/, const Coord& /*tangent*/, const Coord& /*binormal*/) {};
55
56 virtual void prepSourceTermsHeating(const double& q);
57
58 // Accessors
59 //----------
60 virtual const double& getMass(const int& numPhase) const { return m_mass[numPhase]; };
61 virtual const Coord& getMomentum() const { return m_momentum; };
62 virtual const double& getEnergyMix() const { return m_energMixture; };
63 virtual void setCons(const Flux* cons);
64
65 protected:
66 double* m_mass;
69
70 private:
71 friend class ModPTUEq;
72 // To modify if needed, example: To add a class APPTUEqViscosity, add friend class APPTUEqViscosity.
73};
74
75#endif // FLUXPTUEQ_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
Flux class for pressure-temperature-velocity (mechanical and thermal equilibrium) system of equations...
Definition FluxPTUEq.h:39
virtual void subtractFlux(double coefA)
Subtract flux to the corresponding model buffer flux.
Definition FluxPTUEq.cpp:79
virtual const Coord & getMomentum() const
Definition FluxPTUEq.h:61
virtual void multiply(double scalar)
multiply the flux of the corresponding model by a constant
Definition FluxPTUEq.cpp:90
virtual void buildCons(Phase **phases, Mixture *mixture)
Build the conservative variables for a given cell from primitive one.
Definition FluxPTUEq.cpp:109
virtual void subtractNonCons(double, const Cell *, const Coord &, const Coord &, const Coord &)
Subtract non conservative term to the flux.
Definition FluxPTUEq.h:54
virtual void addFlux(double coefA)
Add flux to the corresponding model flux.
Definition FluxPTUEq.cpp:57
double * m_mass
mass array
Definition FluxPTUEq.h:66
virtual void setCons(const Flux *cons)
Definition FluxPTUEq.cpp:185
virtual ~FluxPTUEq()
Definition FluxPTUEq.cpp:43
Coord m_momentum
momentum array
Definition FluxPTUEq.h:67
virtual void setToZero()
set each attribute of the flux to zero
Definition FluxPTUEq.cpp:161
virtual const double & getMass(const int &numPhase) const
Definition FluxPTUEq.h:60
virtual void prepSourceTermsHeating(const double &q)
Heating source term.
Definition FluxPTUEq.cpp:172
virtual const double & getEnergyMix() const
Definition FluxPTUEq.h:62
virtual void buildPrim(Phase **phases, Mixture *mixture)
Build the primitive variables for a given cell from conservative one.
Definition FluxPTUEq.cpp:125
virtual void setBufferFlux(Cell &cell)
Temporary store the conservative variables of a given cell.
Definition FluxPTUEq.cpp:102
virtual void addNonCons(double, const Cell *, const Coord &, const Coord &, const Coord &)
Add non conservative term to the flux.
Definition FluxPTUEq.h:53
virtual void printFlux() const
Definition FluxPTUEq.cpp:50
double m_energMixture
mixture energy
Definition FluxPTUEq.h:68
Abstract class for conservative variables and fluxes.
Definition Flux.h:43
Abstract class for mixture variables.
Definition Mixture.h:43
Model class for pressure-temperature-velocity (mechanical and thermal equilibrium) system of equation...
Definition ModPTUEq.h:42
Abstract class for a phase.
Definition Phase.h:47