ECOGEN 4.0
Evolutive, Compressible, Open, Genuine, Easy, N-phase
Loading...
Searching...
No Matches
FluxUEqTotEnergy.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 FLUXUEQTOTENERGY_H
32#define FLUXUEQTOTENERGY_H
33
34#include <iostream>
35#include "../Flux.h"
36
38
39#include "ModUEqTotEnergy.h"
40
43class FluxUEqTotEnergy : public Flux
44{
45 public:
46 FluxUEqTotEnergy(const int& numbPhases);
47 virtual ~FluxUEqTotEnergy();
48
49 virtual void printFlux() const;
50 virtual void addFlux(double coefA);
51 virtual void addFlux(Flux* flux);
52 virtual void subtractFlux(double coefA);
53 virtual void multiply(double scalar);
54 virtual void setBufferFlux(Cell& cell);
55 virtual void buildCons(Phase** phases, Mixture* mixture);
56 virtual void buildPrim(Phase** phases, Mixture* mixture);
57 virtual void setToZero();
58 virtual void addNonCons(double coefA, const Cell* cell, const Coord& /*normal*/, const Coord& /*tangent*/, const Coord& /*binormal*/);
59 virtual void subtractNonCons(double coefA, const Cell* cell, const Coord& /*normal*/, const Coord& /*tangent*/, const Coord& /*binormal*/);
60
61 // Accessors
62 //----------
63 virtual const double& getAlpha(const int& numPhase) const { return m_alpha[numPhase]; };
64 virtual const double& getMass(const int& numPhase) const { return m_mass[numPhase]; };
65 virtual const double& getTotEnergy(const int& numPhase) const { return m_totEnerg[numPhase]; };
66 virtual const Coord& getMomentum() const { return m_momentum; };
67 virtual void setCons(const Flux* cons);
68
69 protected:
70 double* m_alpha;
71 double* m_mass;
72 double* m_totEnerg;
74 double* m_alphap;
75
76 private:
77 friend class ModUEqTotEnergy;
78};
79
80#endif // FLUXUEQTOTENERGY_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 the velocity-equilibrium system of equations.
Definition FluxUEqTotEnergy.h:44
virtual const Coord & getMomentum() const
Definition FluxUEqTotEnergy.h:66
double * m_alpha
Volume fraction array.
Definition FluxUEqTotEnergy.h:70
virtual void setToZero()
set each attribute of the flux to zero
Definition FluxUEqTotEnergy.cpp:192
virtual const double & getAlpha(const int &numPhase) const
Definition FluxUEqTotEnergy.h:63
virtual void buildPrim(Phase **phases, Mixture *mixture)
Build the primitive variables for a given cell from conservative one.
Definition FluxUEqTotEnergy.cpp:137
virtual ~FluxUEqTotEnergy()
Definition FluxUEqTotEnergy.cpp:48
virtual void setBufferFlux(Cell &cell)
Temporary store the conservative variables of a given cell.
Definition FluxUEqTotEnergy.cpp:114
virtual void multiply(double scalar)
multiply the flux of the corresponding model by a constant
Definition FluxUEqTotEnergy.cpp:101
virtual void addFlux(double coefA)
Add flux to the corresponding model flux.
Definition FluxUEqTotEnergy.cpp:65
virtual void setCons(const Flux *cons)
Definition FluxUEqTotEnergy.cpp:250
virtual const double & getMass(const int &numPhase) const
Definition FluxUEqTotEnergy.h:64
virtual void subtractNonCons(double coefA, const Cell *cell, const Coord &, const Coord &, const Coord &)
Subtract non conservative term to the flux.
Definition FluxUEqTotEnergy.cpp:227
virtual void buildCons(Phase **phases, Mixture *mixture)
Build the conservative variables for a given cell from primitive one.
Definition FluxUEqTotEnergy.cpp:121
virtual const double & getTotEnergy(const int &numPhase) const
Definition FluxUEqTotEnergy.h:65
Coord m_momentum
Momentum array.
Definition FluxUEqTotEnergy.h:73
double * m_totEnerg
Specific total energy array.
Definition FluxUEqTotEnergy.h:72
virtual void addNonCons(double coefA, const Cell *cell, const Coord &, const Coord &, const Coord &)
Add non conservative term to the flux.
Definition FluxUEqTotEnergy.cpp:204
virtual void subtractFlux(double coefA)
Subtract flux to the corresponding model buffer flux.
Definition FluxUEqTotEnergy.cpp:89
double * m_alphap
One of the non-conservative flux for phasic total energy.
Definition FluxUEqTotEnergy.h:74
virtual void printFlux() const
Definition FluxUEqTotEnergy.cpp:58
double * m_mass
Mass array.
Definition FluxUEqTotEnergy.h:71
Abstract class for conservative variables and fluxes.
Definition Flux.h:43
Abstract class for mixture variables.
Definition Mixture.h:43
Definition ModUEqTotEnergy.h:45
Abstract class for a phase.
Definition Phase.h:47