ECOGEN 6.0
Evolutive, Compressible, Open, Genuine, Easy, N-phase
Loading...
Searching...
No Matches
ModEuler Class Reference

Model class for Euler mathematical system of equations (single phase). More...

#include <ModEuler.h>

Inherits Model.

Collaboration diagram for ModEuler:
[legend]

Public Member Functions

 ModEuler (const int &numbTransports)
 Euler model constructor.
 ~ModEuler () override
void allocateCons (Flux **cons) override
 Allocate conservative variable arrays.
void allocatePhase (Phase **phase) override
 Instanciate fluid phase variable.
void allocateMixture (Mixture **mixture) override
 Instanciate mixture variable.
void allocatePhaseGradient (GradPhase **phase) override
 Instanciate gradient phase variable.
void allocateMixtureGradient (GradMixture **mixture) override
 Instanciate gradient mixture variable.
void fulfillState (Phase **phases, Mixture *) override
void fulfillStateResume (Phase **, Mixture *) override
void initializeAugmentedVariables (Cell *) override
void solveRiemannIntern (Cell &cellLeft, Cell &cellRight, const double &dxLeft, const double &dxRight, double &dtMax, std::vector< double > &boundData=DEFAULT_VEC_INTERFACE_DATA) const override
 Cell to cell Riemann solver.
void solveRiemannInternMRF (Cell &cellLeft, Cell &cellRight, const double &dxLeft, const double &dxRight, double &dtMax, const Coord &omega, const Coord &normal, const Coord &tangent, const Coord &binormal, const Coord &position) const override
 Cell to cell Riemann solver + compute fluxBuffMRF for MRF interface.
void solveRiemannWall (Cell &cellLeft, const double &dxLeft, double &dtMax, std::vector< double > &boundData) const override
 Wall half Riemann solver.
void solveRiemannMovingWall (Cell &cellLeft, const double &dxLeft, double &dtMax, double wallVelocity, std::vector< double > &boundData) const override
 Moving wall half Riemann solver.
void solveRiemannInletTank (Cell &cellLeft, const double &dxLeft, double &dtMax, const double *, const double *rhok0, const double &p0, const double &, std::vector< double > &boundData) const override
 Inlet tank half Riemann solver.
void solveRiemannInletInjStagState (Cell &cellLeft, const double &dxLeft, double &dtMax, const double m0, const double *, const double *rhok0, const double *pk0, std::vector< double > &boundData) const override
 Inlet injection using stagnation state half Riemann solver.
void solveRiemannInletInjTemp (Cell &cellLeft, const double &dxLeft, double &dtMax, const double m0, const double *Tk0, const double *, std::vector< double > &boundData) const override
 Inlet injection using temperature half Riemann solver.
void solveRiemannOutletPressure (Cell &cellLeft, const double &dxLeft, double &dtMax, const double p0, std::vector< double > &boundData) const override
 Outlet at imposed pressure half Riemann solver.
void solveRiemannOutletMassflow (Cell &cellLeft, const double &dxLeft, double &dtMax, const double m0, std::vector< double > &boundData) const override
 Outlet at imposed massflow half Riemann solver.
void solveRiemannNullFlux () const override
 No flux half Riemann solver (return null flux to use with 1D geometry with smooth varying cross section).
void solveRiemannTransportIntern (Cell &cellLeft, Cell &cellRight) override
 Cell to cell Riemann solver for transport equations.
void solveRiemannTransportWall () override
 Wall half Riemann solver for transport equations.
void solveRiemannTransportMovingWall (Cell &cellLeft, double wallVelocity) override
 Moving wall half Riemann solver for transport equations.
void solveRiemannTransportInletTank (Cell &cellLeft, double *valueTransports) override
 Inlet tank half Riemann solver for transport equations.
void solveRiemannTransportInletInjStagState (Cell &cellLeft, double *valueTransports) override
 Inlet injection using stagnation state half Riemann solver for transport equations.
void solveRiemannTransportOutletPressure (Cell &cellLeft, double *valueTransport) override
 Outlet at imposed pressure half Riemann solver for transport equations.
void reverseProjection (const Coord normal, const Coord tangent, const Coord binormal) const override
 Flux reverse projection in the absolute Cartesian coordinate system.
void lowMachSoundSpeed (double &machRef, const double &uL, double &cL, const double &uR=Errors::defaultDouble, double &cR=Tools::uselessDouble) const override
void addNonConsMrfFlux (Phase **phases) override
void reverseProjectionMrfFlux (const Coord normal, const Coord tangent, const Coord binormal) const override
double selectScalar (Phase **phases, Mixture *, Transport *transports, Variable nameVariable, int num=0) const override
 Select a specific scalar variable.
const double & getSM () override
 Return the local fluid velocity.
const Coord & getVelocity (const Cell *cell) const override
 Return the fluid velocity of the corresponding cell.
Coord & getVelocity (Cell *cell) override
const std::string & whoAmI () const override
void setSmoothCrossSection1d (const bool &applySmooth) override
Public Member Functions inherited from Model
 Model (const std::string &name, const int &numbTransports)
 Generic model constructor.
virtual ~Model ()
virtual void allocatePhaseSolid (Phase **)
 Instanciate solid phase variable.
virtual void allocatePhaseSolidGradient (GradPhase **)
 Instanciate gradient solid-phase variable.
void allocateEos (Cell &cell) const
 Associate equations of state.
void initializeRelaxation (Cell *cell) const
 Initialize the theoritical critical pressure of the fluid (only required for PTMu relax).
virtual void solveRiemannSymmetry (Cell &cellLeft, const double &dxLeft, double &dtMax, std::vector< double > &boundData) const
 Symmetry half Riemann solver.
void relaxations (Cell *cell, const double &dt, Prim type=vecPhases) const
 Run all the relaxations.
virtual void correctionEnergy (Cell *, Prim=vecPhases) const
 Energy correction after relaxations (only for PUEq model).
virtual void readCompactionParameters (tinyxml2::XMLElement *, std::string, const int &)
 Read compaction parameters.
virtual bool compaction (const int &) const
 Return if compaction is activated or not.
virtual const double & getDensityReference (const int &) const
 Return the compaction reference density of phase k.
virtual double computeEnergyCompaction (const int &, const double &, const double &, const double &) const
 Return the compaction energy of the fluid/solid.
virtual double computeCompactionPressure_dkappadxi (const int &, const double &, const double &, const double &) const
 Compute the compaction pressure term including the derivative d kappa_k / d xi_k.
virtual double computeCompactionPressure_dkappadalpha (const int &, const double &, const double &, const double &) const
 Compute the compaction pressure term including the derivative d kappa_k / d alpha_k.
virtual double computeCompactionPlasticity (const int &, const double &, const double &, const double &, const double &, double &) const
 Compute the compaction plasticity term of the fluid/solid for relaxation.
virtual void readSolidParameters (tinyxml2::XMLElement *, std::string, const int &)
 Read solid parameters.
virtual const double * getDensityReference () const
 Return the reference density for each phase.
virtual const double * getElasticParameterA () const
 Return the elastic parameter a of the one-parameter model for each phase.
virtual const double * getShearModulus () const
 Return the shear modulus for each phase.
virtual const double * getChi () const
 Return the chi modulus for each phase.
virtual const double * getElasticityLimit () const
 Return the limit of elasticity for each phase.
virtual double computeElasticEnergy (const int &, const Tensor &) const
 Compute the elastic energy of the solid.
virtual void computeElasticEnergyAndStressTensor (const int &, const Tensor &, const double &, const double &, double &, Tensor &) const
 Compute the elastic energy and stress tensor of the solid.
virtual double computeSquareLongitudinalWaveSpeed (const int &, const Phase &)
 Compute the square longitudinal wave speed of the solid.
virtual const Coord & getVectorP (const Cell *) const
virtual Coord & getVectorP (Cell *)
std::vector< Relaxation * > * getRelaxations ()
void printInfo () const
virtual const bool & isSmoothCrossSection1d () const
const bool & getLowMach () const
void setLowMach (const bool &lowMach)
virtual void setMachRefMin (const double &machRefMin)
virtual void setPhaseSlope (Phase &, int)
 Set the slope values for the extrapolation within the cell.
virtual void setSlopeDistance (const double &)
 Set the geometric distance over which the in-cell slopes extrapolate (cell width along the face normal).

Static Private Attributes

static const std::string NAME = "EULER"

Additional Inherited Members

Protected Attributes inherited from Model
std::string m_name
 Name of the required model.
std::vector< Relaxation * > m_relaxations
 Vector of relaxation procedure.
bool m_lowMach
 Low-Mach preconditioning (default: false).
double m_machRefMin
 Minimum Mach number limit for L-M preconditionning used when local Mach number is below this value (default: 0.01).
bool m_smoothCrossSection1d
 1D geometry with smooth cross section variation (default: false)

Detailed Description

Model class for Euler mathematical system of equations (single phase).

Constructor & Destructor Documentation

◆ ModEuler()

ModEuler::ModEuler ( const int & numbTransports)

Euler model constructor.

Parameters
numbTransportsnumber of additional transport equations
Here is the call graph for this function:

◆ ~ModEuler()

ModEuler::~ModEuler ( )
override

Member Function Documentation

◆ addNonConsMrfFlux()

void ModEuler::addNonConsMrfFlux ( Phase ** phases)
overridevirtual

Reimplemented from Model.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ allocateCons()

void ModEuler::allocateCons ( Flux ** )
overridevirtual

Allocate conservative variable arrays.

Parameters
consconservative variable array to allocate

Reimplemented from Model.

◆ allocateMixture()

void ModEuler::allocateMixture ( Mixture ** )
overridevirtual

Instanciate mixture variable.

Parameters
mixturemixture to instanciate

Reimplemented from Model.

◆ allocateMixtureGradient()

void ModEuler::allocateMixtureGradient ( GradMixture ** )
overridevirtual

Instanciate gradient mixture variable.

Parameters
mixturemixture to instanciate

Reimplemented from Model.

◆ allocatePhase()

void ModEuler::allocatePhase ( Phase ** )
overridevirtual

Instanciate fluid phase variable.

Parameters
phasephase to instanciate

Reimplemented from Model.

◆ allocatePhaseGradient()

void ModEuler::allocatePhaseGradient ( GradPhase ** )
overridevirtual

Instanciate gradient phase variable.

Parameters
phasephase to instanciate

Reimplemented from Model.

◆ fulfillState()

void ModEuler::fulfillState ( Phase ** phases,
Mixture *  )
overridevirtual

Complete single fluid state from pressure, density and velocity

Reimplemented from Model.

Here is the call graph for this function:

◆ fulfillStateResume()

void ModEuler::fulfillStateResume ( Phase ** ,
Mixture *  )
inlineoverridevirtual

Does nothing for this model

Reimplemented from Model.

◆ getSM()

const double & ModEuler::getSM ( )
overridevirtual

Return the local fluid velocity.

Returns
the velocity solution of the local Riemann problem

Reimplemented from Model.

◆ getVelocity() [1/2]

Coord & ModEuler::getVelocity ( Cell * cell)
inlineoverridevirtual

Reimplemented from Model.

Here is the call graph for this function:

◆ getVelocity() [2/2]

const Coord & ModEuler::getVelocity ( const Cell * ) const
inlineoverridevirtual

Return the fluid velocity of the corresponding cell.

Parameters
cellpointer to corresponding cell
Returns
velocity

Reimplemented from Model.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ initializeAugmentedVariables()

void ModEuler::initializeAugmentedVariables ( Cell * )
inlineoverridevirtual

Does nothing for this model

Reimplemented from Model.

◆ lowMachSoundSpeed()

void ModEuler::lowMachSoundSpeed ( double & machRef,
const double & uL,
double & cL,
const double & uR = Errors::defaultDouble,
double & cR = Tools::uselessDouble ) const
overridevirtual

Reimplemented from Model.

Here is the caller graph for this function:

◆ reverseProjection()

void ModEuler::reverseProjection ( const Coord ,
const Coord ,
const Coord  ) const
overridevirtual

Flux reverse projection in the absolute Cartesian coordinate system.

Parameters
normalnormal vector associated to the cell interface
tangenttangent vector associated to the cell interface
binormalbinormal vector associated to the cell interface

Reimplemented from Model.

◆ reverseProjectionMrfFlux()

void ModEuler::reverseProjectionMrfFlux ( const Coord normal,
const Coord tangent,
const Coord binormal ) const
overridevirtual

Reimplemented from Model.

Here is the call graph for this function:

◆ selectScalar()

double ModEuler::selectScalar ( Phase ** phases,
Mixture * ,
Transport * transports,
Variable nameVariable,
int num = 0 ) const
overridevirtual

Select a specific scalar variable.

Parameters
phasesphases array variables
mixturemixture variables
vecTransportsvector of transport variables
nameVariablesName of the variable to select
numPhasesPhases number's

Reimplemented from Model.

Here is the call graph for this function:

◆ setSmoothCrossSection1d()

void ModEuler::setSmoothCrossSection1d ( const bool & applySmooth)
inlineoverridevirtual

Reimplemented from Model.

◆ solveRiemannInletInjStagState()

void ModEuler::solveRiemannInletInjStagState ( Cell & ,
const double & ,
double & ,
const double ,
const double * ,
const double * ,
const double * ,
std::vector< double > &  ) const
overridevirtual

Inlet injection using stagnation state half Riemann solver.

Parameters
cellLeftleft cell
dxLeftleft characteristic lenght
dtMaxmaximum explicit time step
m0specific mass flow rate (kg.s-1.m-2)
ak0volume fraction array of injected fluids
rhok0density array of injected fluids
pk0pressure array of injected fluids
boundDataboundary dataset used for output

Reimplemented from Model.

Here is the call graph for this function:

◆ solveRiemannInletInjTemp()

void ModEuler::solveRiemannInletInjTemp ( Cell & ,
const double & ,
double & ,
const double ,
const double * ,
const double * ,
std::vector< double > &  ) const
overridevirtual

Inlet injection using temperature half Riemann solver.

Parameters
cellLeftleft cell
dxLeftleft characteristic lenght
dtMaxmaximum explicit time step
m0specific mass flow rate (kg.s-1.m-2)
Tk0temperature of injected fluid (same for both phases)
ak0volume fraction of each injected phase
boundDataboundary dataset used for output

Reimplemented from Model.

Here is the call graph for this function:

◆ solveRiemannInletTank()

void ModEuler::solveRiemannInletTank ( Cell & ,
const double & ,
double & ,
const double * ,
const double * ,
const double & ,
const double & ,
std::vector< double > &  ) const
overridevirtual

Inlet tank half Riemann solver.

Parameters
cellLeftleft cell
dxLeftleft characteristic lenght
dtMaxmaximum explicit time step
ak0volume fraction array of fluids in tank
rhok0density array of fluids in tank
pk0pressure array of fluids in tank
boundDataboundary dataset used for output

Reimplemented from Model.

Here is the call graph for this function:

◆ solveRiemannIntern()

void ModEuler::solveRiemannIntern ( Cell & ,
Cell & ,
const double & ,
const double & ,
double & ,
std::vector< double > & = DEFAULT_VEC_INTERFACE_DATA ) const
overridevirtual

Cell to cell Riemann solver.

Parameters
cellLeftleft cell
cellRightright cell
dxLeftleft characteristic lenght
dxRightright characteristic lenght
dtMaxmaximum explicit time step
boundDataboundary dataset used for output

Reimplemented from Model.

Here is the call graph for this function:

◆ solveRiemannInternMRF()

void ModEuler::solveRiemannInternMRF ( Cell & ,
Cell & ,
const double & ,
const double & ,
double & ,
const Coord & ,
const Coord & ,
const Coord & ,
const Coord & ,
const Coord &  ) const
overridevirtual

Cell to cell Riemann solver + compute fluxBuffMRF for MRF interface.

Parameters
cellLeftleft cell
cellRightright cell
dxLeftleft characteristic lenght
dxRightright characteristic lenght
dtMaxmaximum explicit time step
omegarotating velocity
normalface normal
tangentface tangent
binormalface binormal
positionface position

Reimplemented from Model.

Here is the call graph for this function:

◆ solveRiemannMovingWall()

void ModEuler::solveRiemannMovingWall ( Cell & ,
const double & ,
double & ,
double ,
std::vector< double > &  ) const
overridevirtual

Moving wall half Riemann solver.

Parameters
cellLeftleft cell
dxLeftleft characteristic lenght
dtMaxmaximum explicit time step
wallVelocitymoving wall velocity (in its normal direction)
boundDataboundary dataset used for output

Reimplemented from Model.

Here is the call graph for this function:

◆ solveRiemannNullFlux()

void ModEuler::solveRiemannNullFlux ( ) const
overridevirtual

No flux half Riemann solver (return null flux to use with 1D geometry with smooth varying cross section).

Reimplemented from Model.

◆ solveRiemannOutletMassflow()

void ModEuler::solveRiemannOutletMassflow ( Cell & ,
const double & ,
double & ,
const double ,
std::vector< double > &  ) const
overridevirtual

Outlet at imposed massflow half Riemann solver.

Parameters
cellLeftleft cell
dxLeftleft characteristic lenght
dtMaxmaximum explicit time step
m0specific mass flow rate (kg.s-1.m-2)
boundDataboundary dataset used for output

Reimplemented from Model.

Here is the call graph for this function:

◆ solveRiemannOutletPressure()

void ModEuler::solveRiemannOutletPressure ( Cell & ,
const double & ,
double & ,
const double ,
std::vector< double > &  ) const
overridevirtual

Outlet at imposed pressure half Riemann solver.

Parameters
cellLeftleft cell
dxLeftleft characteristic lenght
dtMaxmaximum explicit time step
p0external pressure
boundDataboundary dataset used for output

Reimplemented from Model.

Here is the call graph for this function:

◆ solveRiemannTransportInletInjStagState()

void ModEuler::solveRiemannTransportInletInjStagState ( Cell & ,
double *  )
overridevirtual

Inlet injection using stagnation state half Riemann solver for transport equations.

Parameters
cellLeftleft cell
valueTransportsarray of transport quantities injected

Reimplemented from Model.

Here is the call graph for this function:

◆ solveRiemannTransportInletTank()

void ModEuler::solveRiemannTransportInletTank ( Cell & ,
double *  )
overridevirtual

Inlet tank half Riemann solver for transport equations.

Parameters
cellLeftleft cell
valueTransportsarray of transport quantities in tank

Reimplemented from Model.

Here is the call graph for this function:

◆ solveRiemannTransportIntern()

void ModEuler::solveRiemannTransportIntern ( Cell & ,
Cell &  )
overridevirtual

Cell to cell Riemann solver for transport equations.

Parameters
cellLeftleft cell
cellRightright cell

Reimplemented from Model.

Here is the call graph for this function:

◆ solveRiemannTransportMovingWall()

void ModEuler::solveRiemannTransportMovingWall ( Cell & ,
double  )
overridevirtual

Moving wall half Riemann solver for transport equations.

Parameters
cellLeftleft cell
wallVelocitymoving wall velocity (in its normal direction)

Reimplemented from Model.

Here is the call graph for this function:

◆ solveRiemannTransportOutletPressure()

void ModEuler::solveRiemannTransportOutletPressure ( Cell & ,
double *  )
overridevirtual

Outlet at imposed pressure half Riemann solver for transport equations.

Parameters
cellLeftleft cell
valueTransportsarray of external transport quantities

Reimplemented from Model.

Here is the call graph for this function:

◆ solveRiemannTransportWall()

void ModEuler::solveRiemannTransportWall ( )
overridevirtual

Wall half Riemann solver for transport equations.

Reimplemented from Model.

◆ solveRiemannWall()

void ModEuler::solveRiemannWall ( Cell & ,
const double & ,
double & ,
std::vector< double > &  ) const
overridevirtual

Wall half Riemann solver.

Parameters
cellLeftleft cell
dxLeftleft characteristic lenght
dtMaxmaximum explicit time step
boundDataboundary dataset used for output

Reimplemented from Model.

Here is the call graph for this function:

◆ whoAmI()

const std::string & ModEuler::whoAmI ( ) const
inlineoverridevirtual

Reimplemented from Model.

Member Data Documentation

◆ NAME

const std::string ModEuler::NAME = "EULER"
staticprivate

The documentation for this class was generated from the following files:
  • /home/runner/work/ECOGEN/ECOGEN/doc_sources/src/Models/Euler/ModEuler.h
  • /home/runner/work/ECOGEN/ECOGEN/doc_sources/src/Models/Euler/ModEuler.cpp