ECOGEN 4.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 virtual ~FluxEulerHomogeneous();
47
48 virtual void printFlux() const;
49 virtual void addFlux(double coefA);
50 virtual void addFlux(Flux* flux);
51 virtual void subtractFlux(double coefA);
52 virtual void multiply(double scalar);
53 virtual void setBufferFlux(Cell& cell);
54 virtual void buildCons(Phase** phase, Mixture* mixture);
55 virtual void buildPrim(Phase** phase, Mixture* mixture);
56 virtual void setToZero();
57 virtual void addNonCons(double /*coefA*/, const Cell* /*cell*/, const Coord& /*normal*/, const Coord& /*tangent*/, const Coord& /*binormal*/) {};
58 virtual void subtractNonCons(double /*coefA*/, const Cell* /*cell*/, const Coord& /*normal*/, const Coord& /*tangent*/, const Coord& /*binormal*/) {};
59
60 virtual void addFluxSmooth1D(double coefA, const Coord& normal, Cell* cell);
61 virtual void substractFluxSmooth1D(double coefA, const Coord& normal, Cell* cell);
62
63 // Accessors
64 //----------
65 virtual const Coord& getMomentum() const { return m_momentum; };
66 virtual const double& getMassMix() const { return m_mass; };
67 virtual const double& getEnergyMix() const { return m_energ; };
68 virtual void setCons(const Flux* cons);
69
70 protected:
71 double m_mass;
73 double m_energ;
74
75 private:
76
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
82#endif // FLUXEULERHOMOGENEOUS_H
83
84
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
virtual void addFlux(double coefA)
Add flux to the corresponding model flux.
Definition FluxEulerHomogeneous.cpp:50
virtual void subtractFlux(double coefA)
Subtract flux to the corresponding model buffer flux.
Definition FluxEulerHomogeneous.cpp:68
virtual void subtractNonCons(double, const Cell *, const Coord &, const Coord &, const Coord &)
Subtract non conservative term to the flux.
Definition FluxEulerHomogeneous.h:58
virtual const double & getEnergyMix() const
Definition FluxEulerHomogeneous.h:67
virtual void buildPrim(Phase **phase, Mixture *mixture)
Build the primitive variables for a given cell from conservative one.
Definition FluxEulerHomogeneous.cpp:119
double m_mass
mass
Definition FluxEulerHomogeneous.h:71
virtual ~FluxEulerHomogeneous()
Definition FluxEulerHomogeneous.cpp:39
virtual void substractFluxSmooth1D(double coefA, const Coord &normal, Cell *cell)
Compute additionnal flux for 1D geometry with smooth varying cross section.
Definition FluxEulerHomogeneous.cpp:176
virtual void setCons(const Flux *cons)
Definition FluxEulerHomogeneous.cpp:187
Coord m_momentum
momentum
Definition FluxEulerHomogeneous.h:72
virtual void addFluxSmooth1D(double coefA, const Coord &normal, Cell *cell)
Compute additionnal flux for 1D geometry with smooth varying cross sectionFlux).
Definition FluxEulerHomogeneous.cpp:165
virtual void printFlux() const
Definition FluxEulerHomogeneous.cpp:43
virtual void multiply(double scalar)
multiply the flux of the corresponding model by a constant
Definition FluxEulerHomogeneous.cpp:77
FluxEulerHomogeneous()
Definition FluxEulerHomogeneous.cpp:35
virtual const double & getMassMix() const
Definition FluxEulerHomogeneous.h:66
double m_energ
total energy
Definition FluxEulerHomogeneous.h:73
virtual void addNonCons(double, const Cell *, const Coord &, const Coord &, const Coord &)
Add non conservative term to the flux.
Definition FluxEulerHomogeneous.h:57
virtual void buildCons(Phase **phase, Mixture *mixture)
Build the conservative variables for a given cell from primitive one.
Definition FluxEulerHomogeneous.cpp:93
virtual void setToZero()
set each attribute of the flux to zero
Definition FluxEulerHomogeneous.cpp:156
virtual void setBufferFlux(Cell &cell)
Temporary store the conservative variables of a given cell.
Definition FluxEulerHomogeneous.cpp:86
virtual const Coord & getMomentum() const
Definition FluxEulerHomogeneous.h:65
Abstract class for conservative variables and fluxes.
Definition Flux.h:43
Abstract class for mixture variables.
Definition Mixture.h:43
Model class for Homogeneous Euler mathematical system of equations (velocity and thermodynamical equi...
Definition ModEulerHomogeneous.h:45
Abstract class for a phase.
Definition Phase.h:47