ECOGEN 6.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 ~FluxPTUEq() override;
43
44 void printFlux() const override;
45 void addFlux(double coefA) override;
46 void addFlux(Flux* flux) override;
47 void subtractFlux(double coefA) override;
48 void multiply(double scalar) override;
49 void setBufferFlux(Cell& cell) override;
50 void buildCons(Phase** phases, Mixture* mixture) override;
51 void buildPrim(Phase** phases, Mixture* mixture) override;
52 void setToZero() override;
53 void addNonCons(double /*coefA*/, const Cell* /*cell*/, const Coord& /*normal*/, const Coord& /*tangent*/, const Coord& /*binormal*/) override {};
54 void
55 subtractNonCons(double /*coefA*/, const Cell* /*cell*/, const Coord& /*normal*/, const Coord& /*tangent*/, const Coord& /*binormal*/) override {};
56
57 void prepSourceTermsHeating(const double& q) override;
58
59 // Accessors
60 //----------
61 const double& getMass(const int& numPhase) const override { return m_mass[numPhase]; };
62 const Coord& getMomentum() const override { return m_momentum; };
63 const double& getEnergyMix() const override { return m_energMixture; };
64 void setCons(const Flux* cons) override;
65
66 protected:
67 double* m_mass;
70
71 private:
72 friend class ModPTUEq;
73 // To modify if needed, example: To add a class APPTUEqViscosity, add friend class APPTUEqViscosity.
74};
75
76#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
const Coord & getMomentum() const override
Definition FluxPTUEq.h:62
const double & getEnergyMix() const override
Definition FluxPTUEq.h:63
FluxPTUEq(const int &numbPhases)
Definition FluxPTUEq.cpp:36
const double & getMass(const int &numPhase) const override
Definition FluxPTUEq.h:61
double * m_mass
mass array
Definition FluxPTUEq.h:67
void buildPrim(Phase **phases, Mixture *mixture) override
Build the primitive variables for a given cell from conservative one.
Definition FluxPTUEq.cpp:111
void addNonCons(double, const Cell *, const Coord &, const Coord &, const Coord &) override
Add non conservative term to the flux.
Definition FluxPTUEq.h:53
void setToZero() override
set each attribute of the flux to zero
Definition FluxPTUEq.cpp:148
void printFlux() const override
Definition FluxPTUEq.cpp:44
void subtractNonCons(double, const Cell *, const Coord &, const Coord &, const Coord &) override
Subtract non conservative term to the flux.
Definition FluxPTUEq.h:55
Coord m_momentum
momentum array
Definition FluxPTUEq.h:68
void subtractFlux(double coefA) override
Subtract flux to the corresponding model buffer flux.
Definition FluxPTUEq.cpp:70
~FluxPTUEq() override
Definition FluxPTUEq.cpp:40
void setBufferFlux(Cell &cell) override
Temporary store the conservative variables of a given cell.
Definition FluxPTUEq.cpp:92
void multiply(double scalar) override
multiply the flux of the corresponding model by a constant
Definition FluxPTUEq.cpp:81
friend class ModPTUEq
Definition FluxPTUEq.h:72
void setCons(const Flux *cons) override
Definition FluxPTUEq.cpp:172
void buildCons(Phase **phases, Mixture *mixture) override
Build the conservative variables for a given cell from primitive one.
Definition FluxPTUEq.cpp:96
void prepSourceTermsHeating(const double &q) override
Heating source term.
Definition FluxPTUEq.cpp:159
void addFlux(double coefA) override
Add flux to the corresponding model flux.
Definition FluxPTUEq.cpp:48
double m_energMixture
mixture energy
Definition FluxPTUEq.h:69
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