ECOGEN 6.0
Evolutive, Compressible, Open, Genuine, Easy, N-phase
Loading...
Searching...
No Matches
FluxExtendedNavierStokesKorteweg1D.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 FLUXEXTENDEDNAVIERSTOKESKORTEWEG1D_H
32#define FLUXEXTENDEDNAVIERSTOKESKORTEWEG1D_H
33
34#include "../Flux.h"
35
39{
40 public:
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 multiply(double scalar) override;
49 void setBufferFlux(Cell& cell) override;
50 void buildCons(Phase** phase, Mixture* /*mixture*/) override;
51 void buildPrim(Phase** phase, Mixture* /*mixture*/) override;
52 void setToZero() override;
53 void addNonCons(double /*coefA*/, const Cell* /*cell*/, const Coord& /*normal*/, const Coord& /*tangent*/, const Coord& /*binormal*/) override {};
54 void
55 subtractNonCons(double /*coefA*/, const Cell* /*cell*/, const Coord& /*normal*/, const Coord& /*tangent*/, const Coord& /*binormal*/) override {};
56
57 void addSymmetricTerms(Phase** /*phases*/, Mixture* /*mixture*/, const double& /*r*/, const double& /*v*/) override {};
58 void prepSourceTermsGravity(const Coord& /*g*/) override {};
59 void prepSourceTermsHeating(const double& /*q*/) override {};
60 void prepSourceTermsMRF(Cell* /*cell*/, const Coord& /*omega*/) override {};
61 void prepSourceTermsPlaneWave(const Cell* /*cell*/, const double& /*sourceMomentum*/, const Coord& /*pulseDirection*/) override {};
62
63 // Accessors
64 //----------
65 const double& getMassMix() const override { return m_mass; };
66 const double& getEqOmega() const override { return m_eqOmega; };
67 const double& getEqDensitySurEta() const override { return m_eqDensitySurEta; };
68 const Coord& getMomentum() const override { return m_momentum; };
69 const Coord& getEqVectorP() const override { return m_eqVectorP; };
70 const double& getEnergyMix() const override { return m_energ; };
71 void setCons(const Flux* cons) override;
72
73 protected:
74 double m_mass;
75 double m_eqOmega;
79 double m_energ;
80
81 private:
83 // To modify if needed, example: to add a class APEViscosity, add friend class APEViscosity.
84};
85
86extern double lambdaEK, betaEK, tauEK, epsEK;
87
88#endif // FLUXEXTENDEDNAVIERSTOKESKORTEWEG1D_H
double lambdaEK
Definition PhaseExtendedNavierStokesKorteweg1D.cpp:37
double betaEK
Definition FluxExtendedNavierStokesKorteweg1D.h:86
double epsEK
Simulation parameters for the Extended Navier-Stokes-Korteweg.
Definition FluxExtendedNavierStokesKorteweg1D.h:86
double tauEK
Definition FluxExtendedNavierStokesKorteweg1D.h:86
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
void printFlux() const override
Definition FluxExtendedNavierStokesKorteweg1D.cpp:45
double m_eqDensitySurEta
Eta equation.
Definition FluxExtendedNavierStokesKorteweg1D.h:76
void addNonCons(double, const Cell *, const Coord &, const Coord &, const Coord &) override
Add non conservative term to the flux.
Definition FluxExtendedNavierStokesKorteweg1D.h:53
double m_eqOmega
Omega equation (omega: time derivative of eta).
Definition FluxExtendedNavierStokesKorteweg1D.h:75
void prepSourceTermsHeating(const double &) override
Heating source term.
Definition FluxExtendedNavierStokesKorteweg1D.h:59
double m_energ
Total energy.
Definition FluxExtendedNavierStokesKorteweg1D.h:79
void subtractFlux(double coefA) override
Subtract flux to the corresponding model buffer flux.
Definition FluxExtendedNavierStokesKorteweg1D.cpp:77
Coord m_momentum
Momentum.
Definition FluxExtendedNavierStokesKorteweg1D.h:77
void prepSourceTermsPlaneWave(const Cell *, const double &, const Coord &) override
This prepares Plane-Gaussian-pulse and Plane-Sinusoidal-pulse source terms.
Definition FluxExtendedNavierStokesKorteweg1D.h:61
double m_mass
Mass.
Definition FluxExtendedNavierStokesKorteweg1D.h:74
void setToZero() override
set each attribute of the flux to zero
Definition FluxExtendedNavierStokesKorteweg1D.cpp:164
FluxExtendedNavierStokesKorteweg1D()
Definition FluxExtendedNavierStokesKorteweg1D.cpp:35
Coord m_eqVectorP
Equation for vector P (P: gradient of eta).
Definition FluxExtendedNavierStokesKorteweg1D.h:78
friend class ModExtendedNavierStokesKorteweg1D
Definition FluxExtendedNavierStokesKorteweg1D.h:82
void setBufferFlux(Cell &cell) override
Temporary store the conservative variables of a given cell.
Definition FluxExtendedNavierStokesKorteweg1D.cpp:101
void buildPrim(Phase **phase, Mixture *) override
Build the primitive variables for a given cell from conservative one.
Definition FluxExtendedNavierStokesKorteweg1D.cpp:122
const double & getEnergyMix() const override
Definition FluxExtendedNavierStokesKorteweg1D.h:70
const double & getMassMix() const override
Definition FluxExtendedNavierStokesKorteweg1D.h:65
void addSymmetricTerms(Phase **, Mixture *, const double &, const double &) override
Add symetric terms.
Definition FluxExtendedNavierStokesKorteweg1D.h:57
void addFlux(double coefA) override
Add flux to the corresponding model flux.
Definition FluxExtendedNavierStokesKorteweg1D.cpp:53
void subtractNonCons(double, const Cell *, const Coord &, const Coord &, const Coord &) override
Subtract non conservative term to the flux.
Definition FluxExtendedNavierStokesKorteweg1D.h:55
void buildCons(Phase **phase, Mixture *) override
Build the conservative variables for a given cell from primitive one.
Definition FluxExtendedNavierStokesKorteweg1D.cpp:108
void setCons(const Flux *cons) override
Definition FluxExtendedNavierStokesKorteweg1D.cpp:176
~FluxExtendedNavierStokesKorteweg1D() override
Definition FluxExtendedNavierStokesKorteweg1D.cpp:41
const Coord & getMomentum() const override
Definition FluxExtendedNavierStokesKorteweg1D.h:68
void prepSourceTermsGravity(const Coord &) override
Gravity source term.
Definition FluxExtendedNavierStokesKorteweg1D.h:58
void prepSourceTermsMRF(Cell *, const Coord &) override
MRF source term.
Definition FluxExtendedNavierStokesKorteweg1D.h:60
const double & getEqOmega() const override
Definition FluxExtendedNavierStokesKorteweg1D.h:66
void multiply(double scalar) override
multiply the flux of the corresponding model by a constant
Definition FluxExtendedNavierStokesKorteweg1D.cpp:89
const Coord & getEqVectorP() const override
Definition FluxExtendedNavierStokesKorteweg1D.h:69
const double & getEqDensitySurEta() const override
Definition FluxExtendedNavierStokesKorteweg1D.h:67
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