ECOGEN 6.0
Evolutive, Compressible, Open, Genuine, Easy, N-phase
Loading...
Searching...
No Matches
FluxEuler.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 FLUXEULER_H
32#define FLUXEULER_H
33
34#include "../Flux.h"
35
38class FluxEuler : public Flux
39{
40 public:
41 FluxEuler();
42 ~FluxEuler() 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 addFluxRotatingRegion(double coefA) override;
49 void subtractFluxRotatingRegion(double coefA) override;
50 void multiply(double scalar) override;
51 void setBufferFlux(Cell& cell) override;
52 void buildCons(Phase** phase, Mixture* /*mixture*/) override;
53 void buildPrim(Phase** phase, Mixture* /*mixture*/) override;
54 void setToZero() override;
55 void addNonCons(double /*coefA*/, const Cell* /*cell*/, const Coord& /*normal*/, const Coord& /*tangent*/, const Coord& /*binormal*/) override {};
56 void
57 subtractNonCons(double /*coefA*/, const Cell* /*cell*/, const Coord& /*normal*/, const Coord& /*tangent*/, const Coord& /*binormal*/) override {};
58
59 void addFluxSmooth1D(double coefA, const Coord& normal, Cell* cell) override;
60 void substractFluxSmooth1D(double coefA, const Coord& normal, Cell* cell) override;
61
62 void addSymmetricTerms(Phase** phases, Mixture* /*mixture*/, const double& r, const double& v) override;
63 void prepSourceTermsGravity(const Coord& g) override;
64 void prepSourceTermsHeating(const double& q) override;
65 void prepSourceTermsMRF(Cell* cell, const Coord& omega) override;
66 void prepSourceTermsPlaneWave(const Cell* cell, const double& sourceMomentum, const Coord& pulseDirection) override;
67
68 //Moving Reference Frame
69 void addNonConsMrfFlux(Phase** /*phases*/) override {};
70
71 // Accessors
72 //----------
73 const Coord& getMomentum() const override { return m_momentum; };
74 const double& getMassMix() const override { return m_mass; };
75 const double& getEnergyMix() const override { return m_energ; };
76 void setCons(const Flux* cons) override;
77
78 protected:
79 double m_mass;
81 double m_energ;
82
83 private:
84 friend class ModEuler;
85 // To modify if needed, example: to add a class APEViscosity, add friend class APEViscosity.
86 friend class APEuler;
87 friend class APEViscosity;
88 friend class APEConductivity;
90 friend class ModNEqDEM;
91 friend class RiemannSolverHLLC;
92 friend class RiemannSolverExact;
93};
94
95#endif // FLUXEULER_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
friend class APEuler
Definition FluxEuler.h:86
friend class APEViscosity
Definition FluxEuler.h:87
friend class APETurbulenceSmagorinsky
Definition FluxEuler.h:89
FluxEuler()
Definition FluxEuler.cpp:35
void addFluxSmooth1D(double coefA, const Coord &normal, Cell *cell) override
Compute additionnal flux for 1D geometry with smooth varying cross sectionFlux).
Definition FluxEuler.cpp:153
Coord m_momentum
momentum
Definition FluxEuler.h:80
void setToZero() override
set each attribute of the flux to zero
Definition FluxEuler.cpp:144
void prepSourceTermsGravity(const Coord &g) override
Gravity source term.
Definition FluxEuler.cpp:196
void addNonConsMrfFlux(Phase **) override
Definition FluxEuler.h:69
void subtractFlux(double coefA) override
Subtract flux to the corresponding model buffer flux.
Definition FluxEuler.cpp:65
friend class RiemannSolverHLLC
Because a variable of type FluxEuler is used in RiemannSolverHLLC to store local fluxes and we need a...
Definition FluxEuler.h:91
const Coord & getMomentum() const override
Definition FluxEuler.h:73
void setCons(const Flux *cons) override
Definition FluxEuler.cpp:243
void buildPrim(Phase **phase, Mixture *) override
Build the primitive variables for a given cell from conservative one.
Definition FluxEuler.cpp:116
void buildCons(Phase **phase, Mixture *) override
Build the conservative variables for a given cell from primitive one.
Definition FluxEuler.cpp:105
void multiply(double scalar) override
multiply the flux of the corresponding model by a constant
Definition FluxEuler.cpp:74
void substractFluxSmooth1D(double coefA, const Coord &normal, Cell *cell) override
Compute additionnal flux for 1D geometry with smooth varying cross section.
Definition FluxEuler.cpp:164
void addNonCons(double, const Cell *, const Coord &, const Coord &, const Coord &) override
Add non conservative term to the flux.
Definition FluxEuler.h:55
void prepSourceTermsMRF(Cell *cell, const Coord &omega) override
MRF source term.
Definition FluxEuler.cpp:212
friend class RiemannSolverExact
Because a variable of type FluxEuler is used in RiemannSolverExact to store local fluxes and we need ...
Definition FluxEuler.h:92
void addSymmetricTerms(Phase **phases, Mixture *, const double &r, const double &v) override
Add symetric terms.
Definition FluxEuler.cpp:175
void printFlux() const override
Definition FluxEuler.cpp:43
friend class ModEuler
Definition FluxEuler.h:84
const double & getEnergyMix() const override
Definition FluxEuler.h:75
double m_mass
mass
Definition FluxEuler.h:79
double m_energ
total energy
Definition FluxEuler.h:81
void prepSourceTermsPlaneWave(const Cell *cell, const double &sourceMomentum, const Coord &pulseDirection) override
This prepares Plane-Gaussian-pulse and Plane-Sinusoidal-pulse source terms.
Definition FluxEuler.cpp:231
void prepSourceTermsHeating(const double &q) override
Heating source term.
Definition FluxEuler.cpp:185
friend class APEConductivity
Definition FluxEuler.h:88
friend class ModNEqDEM
Because a variable of type FluxEuler is used in ModNEqDEM to store local fluxes and we need a write a...
Definition FluxEuler.h:90
void setBufferFlux(Cell &cell) override
Temporary store the conservative variables of a given cell.
Definition FluxEuler.cpp:101
const double & getMassMix() const override
Definition FluxEuler.h:74
void subtractFluxRotatingRegion(double coefA) override
Subtract flux to the rotating region in MRF context.
Definition FluxEuler.cpp:92
void addFlux(double coefA) override
Add flux to the corresponding model flux.
Definition FluxEuler.cpp:47
void addFluxRotatingRegion(double coefA) override
Add flux to the rotating region in MRF context.
Definition FluxEuler.cpp:83
~FluxEuler() override
Definition FluxEuler.cpp:39
void subtractNonCons(double, const Cell *, const Coord &, const Coord &, const Coord &) override
Subtract non conservative term to the flux.
Definition FluxEuler.h:57
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