ECOGEN 6.0
Evolutive, Compressible, Open, Genuine, Easy, N-phase
Loading...
Searching...
No Matches
ModExtendedNavierStokesKorteweg1D.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 MODEXTENDEDNAVIERSTOKESKORTEWEG1D_H
32#define MODEXTENDEDNAVIERSTOKESKORTEWEG1D_H
33
34#include "../Model.h"
35#include "../../Order1/Cell.h"
38
42{
43 public:
46 ModExtendedNavierStokesKorteweg1D(const int& numbTransports);
53 ModExtendedNavierStokesKorteweg1D(const int& numbTransports, const double& lambda, const double& beta, const double& tau, const double& eps);
62 const std::string& name, const int& numbTransports, const double& lambda, const double& beta, const double& tau, const double& eps);
64
65 void allocateCons(Flux** cons) override;
66 void allocatePhase(Phase** phase) override;
67 void allocateMixture(Mixture** mixture) override;
68
70 void fulfillState(Phase** /*phases*/, Mixture* /*mixture*/) override;
71
73 void fulfillStateResume(Phase** /*phases*/, Mixture* /*mixture*/) override {};
74
77 void initializeAugmentedVariables(Cell* cell) override;
78
79 //Fluid-flow Riemann solvers
80 //--------------------------
81 void solveRiemannIntern(Cell& cellLeft,
82 Cell& cellRight,
83 const double& dxLeft,
84 const double& dxRight,
85 double& dtMax,
86 std::vector<double>& /*boundData*/ = DEFAULT_VEC_INTERFACE_DATA) const override;
87
88 void solveRiemannWall(Cell& cellLeft, const double& dxLeft, double& dtMax, std::vector<double>& boundData) const override;
89 void solveRiemannNullFlux() const override;
90
91 void reverseProjection(const Coord normal, const Coord tangent, const Coord binormal) const override;
92
93 //Accessors
94 //---------
101 double selectScalar(Phase** phases, Mixture* /*mixture*/, Transport* transports, Variable nameVariable, int num = 0) const override;
102 const double& getSM() override
103 {
104 Errors::errorMessage("getSM not available for required model");
106 };
107 const Coord& getVelocity(const Cell* cell) const override { return cell->getPhase(0)->getVelocity(); };
108 Coord& getVelocity(Cell* cell) override { return cell->getPhase(0)->getVelocity(); };
109
110 const std::string& whoAmI() const override { return m_name; };
111
112 //Methods specific to Extended Navier-Stokes-Korteweg
113 //----------------------------------
135 virtual void computeMaxWaveSpeed(const double& rhoL,
136 const double& rhoR,
137 const double& uL,
138 const double& uR,
139 const double& rhoSurEtaL,
140 const double& rhoSurEtaR,
141 const double& vecPxL,
142 const double& vecPxR,
143 const double& kappaL,
144 const double& kappaR,
145 const double& kappaPrimeL,
146 const double& kappaPrimeR,
147 const double& kappaSecondL,
148 const double& kappaSecondR,
149 const double& c2L,
150 const double& c2R,
151 double& sL,
152 double& sR) const;
153
154 private:
155 static const std::string NAME;
156};
157
158#endif // MODEXTENDEDNAVIERSTOKESKORTEWEG1D_H
static std::vector< double > DEFAULT_VEC_INTERFACE_DATA(VarBoundary::SIZE, 0.)
Variable
Enumeration for the flow variables.
Definition Tools.h:163
@ lambda
Definition Tools.h:174
Base class for a mesh cell.
Definition Cell.h:59
virtual Phase * getPhase(const int &phaseNumber, Prim=vecPhases) const
Definition Cell.cpp:898
Class for a coordinate system object such as coordinates of the vertex or a vector.
Definition Coord.h:43
static void errorMessage(const std::string &message_)
Definition Errors.cpp:56
static constexpr double defaultDouble
Definition Errors.h:99
Abstract class for conservative variables and fluxes.
Definition Flux.h:43
Abstract class for mixture variables.
Definition Mixture.h:43
void solveRiemannWall(Cell &cellLeft, const double &dxLeft, double &dtMax, std::vector< double > &boundData) const override
Wall half Riemann solver.
Definition ModExtendedNavierStokesKorteweg1D.cpp:266
void fulfillState(Phase **, Mixture *) override
Definition ModExtendedNavierStokesKorteweg1D.cpp:99
void initializeAugmentedVariables(Cell *cell) override
Complete the augmented variables (such as the ones of Navier-Stokes-Korteweg model).
Definition ModExtendedNavierStokesKorteweg1D.cpp:106
ModExtendedNavierStokesKorteweg1D(const int &numbTransports)
ExtendedNavierStokesKorteweg1D model constructor.
Definition ModExtendedNavierStokesKorteweg1D.cpp:38
static const std::string NAME
Definition ModExtendedNavierStokesKorteweg1D.h:155
double selectScalar(Phase **phases, Mixture *, Transport *transports, Variable nameVariable, int num=0) const override
Select a specific scalar variable.
Definition ModExtendedNavierStokesKorteweg1D.cpp:402
void allocateCons(Flux **cons) override
Allocate conservative variable arrays.
Definition ModExtendedNavierStokesKorteweg1D.cpp:87
const double & getSM() override
Return the local fluid velocity.
Definition ModExtendedNavierStokesKorteweg1D.h:102
const std::string & whoAmI() const override
Definition ModExtendedNavierStokesKorteweg1D.h:110
void allocatePhase(Phase **phase) override
Instanciate fluid phase variable.
Definition ModExtendedNavierStokesKorteweg1D.cpp:91
Coord & getVelocity(Cell *cell) override
Definition ModExtendedNavierStokesKorteweg1D.h:108
const Coord & getVelocity(const Cell *cell) const override
Return the fluid velocity of the corresponding cell.
Definition ModExtendedNavierStokesKorteweg1D.h:107
~ModExtendedNavierStokesKorteweg1D() override
Definition ModExtendedNavierStokesKorteweg1D.cpp:76
void allocateMixture(Mixture **mixture) override
Instanciate mixture variable.
Definition ModExtendedNavierStokesKorteweg1D.cpp:95
void fulfillStateResume(Phase **, Mixture *) override
Definition ModExtendedNavierStokesKorteweg1D.h:73
void reverseProjection(const Coord normal, const Coord tangent, const Coord binormal) const override
Flux reverse projection in the absolute Cartesian coordinate system.
Definition ModExtendedNavierStokesKorteweg1D.cpp:341
void solveRiemannIntern(Cell &cellLeft, Cell &cellRight, const double &dxLeft, const double &dxRight, double &dtMax, std::vector< double > &=DEFAULT_VEC_INTERFACE_DATA) const override
Cell to cell Riemann solver.
Definition ModExtendedNavierStokesKorteweg1D.cpp:132
virtual void computeMaxWaveSpeed(const double &rhoL, const double &rhoR, const double &uL, const double &uR, const double &rhoSurEtaL, const double &rhoSurEtaR, const double &vecPxL, const double &vecPxR, const double &kappaL, const double &kappaR, const double &kappaPrimeL, const double &kappaPrimeR, const double &kappaSecondL, const double &kappaSecondR, const double &c2L, const double &c2R, double &sL, double &sR) const
Compute maximal wave speed using Davis approximation and eigenvalues of hyperbolic equations.
Definition ModExtendedNavierStokesKorteweg1D.cpp:349
void solveRiemannNullFlux() const override
No flux half Riemann solver (return null flux to use with 1D geometry with smooth varying cross secti...
Definition ModExtendedNavierStokesKorteweg1D.cpp:329
std::string m_name
Name of the required model.
Definition Model.h:576
Model(const std::string &name, const int &numbTransports)
Generic model constructor.
Definition Model.cpp:35
Abstract class for a phase.
Definition Phase.h:47
virtual Coord & getVelocity()
Definition Phase.h:261
Class for additional transport equations.
Definition Transport.h:41