ECOGEN 6.0
Evolutive, Compressible, Open, Genuine, Easy, N-phase
Loading...
Searching...
No Matches
FluxEulerHomogeneous.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 FLUXEULERHOMOGENEOUS_H
32#define FLUXEULERHOMOGENEOUS_H
33
34#include "../Flux.h"
35
37
38#include "ModEulerHomogeneous.h"
39
43{
44 public:
46 ~FluxEulerHomogeneous() 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 multiply(double scalar) override;
53 void setBufferFlux(Cell& cell) override;
54 void buildCons(Phase** phase, Mixture* mixture) override;
55 void buildPrim(Phase** phase, Mixture* mixture) override;
56 void setToZero() override;
57 void addNonCons(double /*coefA*/, const Cell* /*cell*/, const Coord& /*normal*/, const Coord& /*tangent*/, const Coord& /*binormal*/) override {};
58 void
59 subtractNonCons(double /*coefA*/, const Cell* /*cell*/, const Coord& /*normal*/, const Coord& /*tangent*/, const Coord& /*binormal*/) override {};
60
61 void addFluxSmooth1D(double coefA, const Coord& normal, Cell* cell) override;
62 void substractFluxSmooth1D(double coefA, const Coord& normal, Cell* cell) override;
63
64 // Accessors
65 //----------
66 const Coord& getMomentum() const override { return m_momentum; };
67 const double& getMassMix() const override { return m_mass; };
68 const double& getEnergyMix() const override { return m_energ; };
69 void setCons(const Flux* cons) override;
70
71 protected:
72 double m_mass;
74 double m_energ;
75
76 private:
77 friend class ModEulerHomogeneous;
78 //friend class PAEHuler; // To modify if needed, example: to add a class PAEHViscosity, add friend class PAEHViscosity.
79};
80
81#endif // FLUXEULERHOMOGENEOUS_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
Model class for Homogeneous Euler Flux (liquid-vapor in thermodynamical equilibrium).
Definition FluxEulerHomogeneous.h:43
const Coord & getMomentum() const override
Definition FluxEulerHomogeneous.h:66
friend class ModEulerHomogeneous
Definition FluxEulerHomogeneous.h:77
~FluxEulerHomogeneous() override
Definition FluxEulerHomogeneous.cpp:39
double m_mass
mass
Definition FluxEulerHomogeneous.h:72
void addNonCons(double, const Cell *, const Coord &, const Coord &, const Coord &) override
Add non conservative term to the flux.
Definition FluxEulerHomogeneous.h:57
void subtractFlux(double coefA) override
Subtract flux to the corresponding model buffer flux.
Definition FluxEulerHomogeneous.cpp:65
void addFluxSmooth1D(double coefA, const Coord &normal, Cell *cell) override
Compute additionnal flux for 1D geometry with smooth varying cross sectionFlux).
Definition FluxEulerHomogeneous.cpp:158
Coord m_momentum
momentum
Definition FluxEulerHomogeneous.h:73
const double & getEnergyMix() const override
Definition FluxEulerHomogeneous.h:68
void buildPrim(Phase **phase, Mixture *mixture) override
Build the primitive variables for a given cell from conservative one.
Definition FluxEulerHomogeneous.cpp:112
const double & getMassMix() const override
Definition FluxEulerHomogeneous.h:67
FluxEulerHomogeneous()
Definition FluxEulerHomogeneous.cpp:35
void addFlux(double coefA) override
Add flux to the corresponding model flux.
Definition FluxEulerHomogeneous.cpp:47
void setCons(const Flux *cons) override
Definition FluxEulerHomogeneous.cpp:180
void substractFluxSmooth1D(double coefA, const Coord &normal, Cell *cell) override
Compute additionnal flux for 1D geometry with smooth varying cross section.
Definition FluxEulerHomogeneous.cpp:169
void setToZero() override
set each attribute of the flux to zero
Definition FluxEulerHomogeneous.cpp:149
void subtractNonCons(double, const Cell *, const Coord &, const Coord &, const Coord &) override
Subtract non conservative term to the flux.
Definition FluxEulerHomogeneous.h:59
double m_energ
total energy
Definition FluxEulerHomogeneous.h:74
void printFlux() const override
Definition FluxEulerHomogeneous.cpp:43
void multiply(double scalar) override
multiply the flux of the corresponding model by a constant
Definition FluxEulerHomogeneous.cpp:74
void setBufferFlux(Cell &cell) override
Temporary store the conservative variables of a given cell.
Definition FluxEulerHomogeneous.cpp:83
void buildCons(Phase **phase, Mixture *mixture) override
Build the conservative variables for a given cell from primitive one.
Definition FluxEulerHomogeneous.cpp:87
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