ECOGEN 6.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 ~FluxUEqTotEnergy() override;
48
49 void printFlux() const override;
50 void addFlux(double coefA) override;
51 void addFlux(Flux* flux) override;
52 void subtractFlux(double coefA) override;
53 void multiply(double scalar) override;
54 void setBufferFlux(Cell& cell) override;
55 void buildCons(Phase** phases, Mixture* mixture) override;
56 void buildPrim(Phase** phases, Mixture* mixture) override;
57 void setToZero() override;
58 void addNonCons(double coefA, const Cell* cell, const Coord& /*normal*/, const Coord& /*tangent*/, const Coord& /*binormal*/) override;
59 void subtractNonCons(double coefA, const Cell* cell, const Coord& /*normal*/, const Coord& /*tangent*/, const Coord& /*binormal*/) override;
60
61 // Accessors
62 //----------
63 const double& getAlpha(const int& numPhase) const override { return m_alpha[numPhase]; };
64 const double& getMass(const int& numPhase) const override { return m_mass[numPhase]; };
65 const double& getTotEnergy(const int& numPhase) const override { return m_totEnerg[numPhase]; };
66 const Coord& getMomentum() const override { return m_momentum; };
67 void setCons(const Flux* cons) override;
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
const Coord & getMomentum() const override
Definition FluxUEqTotEnergy.h:66
void addNonCons(double coefA, const Cell *cell, const Coord &, const Coord &, const Coord &) override
Add non conservative term to the flux.
Definition FluxUEqTotEnergy.cpp:198
double * m_alpha
Volume fraction array.
Definition FluxUEqTotEnergy.h:70
void setToZero() override
set each attribute of the flux to zero
Definition FluxUEqTotEnergy.cpp:186
~FluxUEqTotEnergy() override
Definition FluxUEqTotEnergy.cpp:48
void multiply(double scalar) override
multiply the flux of the corresponding model by a constant
Definition FluxUEqTotEnergy.cpp:98
void setCons(const Flux *cons) override
Definition FluxUEqTotEnergy.cpp:244
const double & getMass(const int &numPhase) const override
Definition FluxUEqTotEnergy.h:64
const double & getAlpha(const int &numPhase) const override
Definition FluxUEqTotEnergy.h:63
const double & getTotEnergy(const int &numPhase) const override
Definition FluxUEqTotEnergy.h:65
void buildPrim(Phase **phases, Mixture *mixture) override
Build the primitive variables for a given cell from conservative one.
Definition FluxUEqTotEnergy.cpp:129
void setBufferFlux(Cell &cell) override
Temporary store the conservative variables of a given cell.
Definition FluxUEqTotEnergy.cpp:110
void buildCons(Phase **phases, Mixture *mixture) override
Build the conservative variables for a given cell from primitive one.
Definition FluxUEqTotEnergy.cpp:114
Coord m_momentum
Momentum array.
Definition FluxUEqTotEnergy.h:73
void subtractFlux(double coefA) override
Subtract flux to the corresponding model buffer flux.
Definition FluxUEqTotEnergy.cpp:86
double * m_totEnerg
Specific total energy array.
Definition FluxUEqTotEnergy.h:72
void subtractNonCons(double coefA, const Cell *cell, const Coord &, const Coord &, const Coord &) override
Subtract non conservative term to the flux.
Definition FluxUEqTotEnergy.cpp:221
void addFlux(double coefA) override
Add flux to the corresponding model flux.
Definition FluxUEqTotEnergy.cpp:62
friend class ModUEqTotEnergy
Definition FluxUEqTotEnergy.h:77
double * m_alphap
One of the non-conservative flux for phasic total energy.
Definition FluxUEqTotEnergy.h:74
FluxUEqTotEnergy(const int &numbPhases)
Definition FluxUEqTotEnergy.cpp:38
void printFlux() const override
Definition FluxUEqTotEnergy.cpp:58
double * m_mass
Mass array.
Definition FluxUEqTotEnergy.h:71
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