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

Model class for the velocity-equilibrium system of equations. More...

#include <ModUEq.h>

Inherits Model.

Inherited by ModPUEq.

Public Member Functions

 ModUEq (const int &numbTransports, const int &numbPhases)
 UEq model constructor.
 
 ModUEq (const std::string &name, const int &numbTransports)
 Generic model constructor (used by derived classes)
 
virtual ~ModUEq ()
 
virtual void allocateCons (Flux **cons)
 Allocate conservative variable arrays.
 
virtual void allocatePhase (Phase **phase)
 Instanciate fluid phase variable.
 
virtual void allocateMixture (Mixture **mixture)
 Instanciate mixture variable.
 
virtual void allocatePhaseGradient (GradPhase **phase)
 Instanciate gradient phase variable.
 
virtual void allocateMixtureGradient (GradMixture **mixture)
 Instanciate gradient mixture variable.
 
virtual void fulfillState (Phase **phases, Mixture *mixture)
 
virtual void fulfillStateRestart (Phase **, Mixture *)
 
virtual void initializeAugmentedVariables (Cell *)
 
virtual void solveRiemannIntern (Cell &cellLeft, Cell &cellRight, const double &dxLeft, const double &dxRight, double &dtMax, std::vector< double > &boundData=DEFAULT_VEC_INTERFACE_DATA) const
 Cell to cell Riemann solver.
 
virtual 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
 Cell to cell Riemann solver + compute fluxBuffMRF for MRF interface.
 
virtual void solveRiemannWall (Cell &cellLeft, const double &dxLeft, double &dtMax, std::vector< double > &boundData) const
 Wall half Riemann solver.
 
virtual void solveRiemannInletTank (Cell &cellLeft, const double &dxLeft, double &dtMax, const double *ak0, const double *rhok0, const double &p0, const double &, std::vector< double > &boundData) const
 Inlet tank half Riemann solver.
 
virtual void solveRiemannInletInjStagState (Cell &cellLeft, const double &dxLeft, double &dtMax, const double m0, const double *ak0, const double *rhok0, const double *pk0, std::vector< double > &boundData) const
 Inlet injection using stagnation state half Riemann solver.
 
virtual void solveRiemannInletInjTemp (Cell &cellLeft, const double &dxLeft, double &dtMax, const double m0, const double *Tk0, const double *ak0, std::vector< double > &boundData) const
 Inlet injection using temperature half Riemann solver.
 
virtual void solveRiemannOutletPressure (Cell &cellLeft, const double &dxLeft, double &dtMax, const double p0, std::vector< double > &boundData) const
 Outlet at imposed pressure half Riemann solver.
 
virtual void solveRiemannOutletMassflow (Cell &cellLeft, const double &dxLeft, double &dtMax, const double m0, std::vector< double > &boundData) const
 Outlet at imposed massflow half Riemann solver.
 
virtual void solveRiemannNullFlux () const
 No flux half Riemann solver (return null flux to use with 1D geometry with smooth varying cross section)
 
virtual void solveRiemannTransportIntern (Cell &cellLeft, Cell &cellRight)
 Cell to cell Riemann solver for transport equations.
 
virtual void solveRiemannTransportWall ()
 Wall half Riemann solver for transport equations.
 
virtual void solveRiemannTransportPiston (Cell &cellLeft, double uPiston)
 Piston half Riemann solver for transport equations.
 
virtual void solveRiemannTransportInletTank (Cell &cellLeft, double *valueTransports)
 Inlet tank half Riemann solver for transport equations.
 
virtual void solveRiemannTransportInletInjStagState (Cell &cellLeft, double *valueTransports)
 Inlet injection using stagnation state half Riemann solver for transport equations.
 
virtual void solveRiemannTransportOutletPressure (Cell &cellLeft, double *valueTransport)
 Outlet at imposed pressure half Riemann solver for transport equations.
 
virtual void reverseProjection (const Coord normal, const Coord tangent, const Coord binormal) const
 Flux reverse projection in the absolute Cartesian coordinate system.
 
virtual void lowMachSoundSpeed (double &machRef, const double &uL, double &cL, const double &uR=Errors::defaultDouble, double &cR=Tools::uselessDouble) const
 
virtual void setLowMach (const bool &lowMach)
 
virtual void setMachRefMin (const double &machRefMin)
 
virtual void addNonConsMrfFlux (Phase **phases)
 
virtual void reverseProjectionMrfFlux (const Coord normal, const Coord tangent, const Coord binormal) const
 
virtual double selectScalar (Phase **phases, Mixture *mixture, Transport *transports, Variable nameVariable, int num=0) const
 Select a specific scalar variable.
 
virtual const double & getSM ()
 Return the local fluid velocity.
 
virtual const CoordgetVelocity (const Cell *cell) const
 Return the fluid velocity of the corresponding cell.
 
virtual CoordgetVelocity (Cell *cell)
 
virtual const std::string & whoAmI () const
 
virtual void setSmoothCrossSection1d (const bool &applySmooth)
 
- 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 solveRiemannPiston (Cell &, const double &, double &, std::vector< double > &, const double &) const
 Piston half Riemann solver.
 
void relaxations (Cell *cell, const double &dt, Prim type=vecPhases) const
 
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 (const int &, const double &, const double &, const double &) const
 Compute the compaction pressure of the fluid/solid for relaxation.
 
virtual double computeDerivativeCompactionFunctionF (const int &, const double &, const double &) const
 Compute the derivative of the compaction function f with respect to xi.
 
virtual double computeCompactionPlasticity (const int &, const double &, const double &, const double &, const 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 * 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 CoordgetVectorP (const Cell *) const
 
virtual CoordgetVectorP (Cell *)
 
std::vector< Relaxation * > * getRelaxations ()
 
void printInfo () const
 
virtual const bool & isSmoothCrossSection1d () const
 

Static Private Attributes

static const std::string NAME = "VELOCITYEQ"
 

Friends

class FluxUEq
 

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 the velocity-equilibrium system of equations.

Constructor & Destructor Documentation

◆ ModUEq() [1/2]

ModUEq::ModUEq ( const int &  numbTransports,
const int &  numbPhases 
)

UEq model constructor.

Parameters
numbTransportsnumber of additional transport equations
numbPhasesnumber of phases

◆ ModUEq() [2/2]

ModUEq::ModUEq ( const std::string &  name,
const int &  numbTransports 
)

Generic model constructor (used by derived classes)

Parameters
namemodel name
numbTransportsnumber of additional transport equations

◆ ~ModUEq()

ModUEq::~ModUEq ( )
virtual

Member Function Documentation

◆ addNonConsMrfFlux()

void ModUEq::addNonConsMrfFlux ( Phase **  phases)
virtual

Reimplemented from Model.

◆ allocateCons()

void ModUEq::allocateCons ( Flux **  )
virtual

Allocate conservative variable arrays.

Parameters
consconservative variable array to allocate

Reimplemented from Model.

Reimplemented in ModPUEq.

◆ allocateMixture()

void ModUEq::allocateMixture ( Mixture **  )
virtual

Instanciate mixture variable.

Parameters
mixturemixture to instanciate

Reimplemented from Model.

Reimplemented in ModPUEq.

◆ allocateMixtureGradient()

void ModUEq::allocateMixtureGradient ( GradMixture **  )
virtual

Instanciate gradient mixture variable.

Parameters
mixturemixture to instanciate

Reimplemented from Model.

◆ allocatePhase()

void ModUEq::allocatePhase ( Phase **  )
virtual

Instanciate fluid phase variable.

Parameters
phasephase to instanciate

Reimplemented from Model.

Reimplemented in ModPUEq.

◆ allocatePhaseGradient()

void ModUEq::allocatePhaseGradient ( GradPhase **  )
virtual

Instanciate gradient phase variable.

Parameters
phasephase to instanciate

Reimplemented from Model.

◆ fulfillState()

void ModUEq::fulfillState ( Phase **  phases,
Mixture mixture 
)
virtual

Complete multiphase state from volume fractions, pressures, densities and velocity

Reimplemented from Model.

◆ fulfillStateRestart()

virtual void ModUEq::fulfillStateRestart ( Phase **  ,
Mixture  
)
inlinevirtual

Does nothing for this model

Reimplemented from Model.

Reimplemented in ModPUEq.

◆ getSM()

const double & ModUEq::getSM ( )
virtual

Return the local fluid velocity.

Returns
the velocity solution of the local Riemann problem

Reimplemented from Model.

◆ getVelocity() [1/2]

virtual Coord & ModUEq::getVelocity ( Cell cell)
inlinevirtual

Reimplemented from Model.

◆ getVelocity() [2/2]

virtual const Coord & ModUEq::getVelocity ( const Cell ) const
inlinevirtual

Return the fluid velocity of the corresponding cell.

Parameters
cellpointer to corresponding cell
Returns
velocity

Reimplemented from Model.

◆ initializeAugmentedVariables()

virtual void ModUEq::initializeAugmentedVariables ( Cell )
inlinevirtual

Does nothing for this model

Reimplemented from Model.

◆ lowMachSoundSpeed()

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

Reimplemented from Model.

◆ reverseProjection()

void ModUEq::reverseProjection ( const Coord  ,
const Coord  ,
const Coord   
) const
virtual

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 ModUEq::reverseProjectionMrfFlux ( const Coord  normal,
const Coord  tangent,
const Coord  binormal 
) const
virtual

Reimplemented from Model.

◆ selectScalar()

double ModUEq::selectScalar ( Phase **  phases,
Mixture mixture,
Transport transports,
Variable  nameVariable,
int  num = 0 
) const
virtual

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.

Reimplemented in ModPUEq.

◆ setLowMach()

virtual void ModUEq::setLowMach ( const bool &  lowMach)
inlinevirtual

Reimplemented from Model.

◆ setMachRefMin()

virtual void ModUEq::setMachRefMin ( const double &  machRefMin)
inlinevirtual

Reimplemented from Model.

◆ setSmoothCrossSection1d()

virtual void ModUEq::setSmoothCrossSection1d ( const bool &  applySmooth)
inlinevirtual

Reimplemented from Model.

◆ solveRiemannInletInjStagState()

void ModUEq::solveRiemannInletInjStagState ( Cell ,
const double &  ,
double &  ,
const double  ,
const double *  ,
const double *  ,
const double *  ,
std::vector< double > &   
) const
virtual

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.

◆ solveRiemannInletInjTemp()

void ModUEq::solveRiemannInletInjTemp ( Cell ,
const double &  ,
double &  ,
const double  ,
const double *  ,
const double *  ,
std::vector< double > &   
) const
virtual

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.

◆ solveRiemannInletTank()

void ModUEq::solveRiemannInletTank ( Cell ,
const double &  ,
double &  ,
const double *  ,
const double *  ,
const double &  ,
const double &  ,
std::vector< double > &   
) const
virtual

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.

◆ solveRiemannIntern()

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

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.

◆ solveRiemannInternMRF()

void ModUEq::solveRiemannInternMRF ( Cell ,
Cell ,
const double &  ,
const double &  ,
double &  ,
const Coord ,
const Coord ,
const Coord ,
const Coord ,
const Coord  
) const
virtual

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.

◆ solveRiemannNullFlux()

void ModUEq::solveRiemannNullFlux ( ) const
virtual

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

Reimplemented from Model.

◆ solveRiemannOutletMassflow()

void ModUEq::solveRiemannOutletMassflow ( Cell ,
const double &  ,
double &  ,
const double  ,
std::vector< double > &   
) const
virtual

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.

◆ solveRiemannOutletPressure()

void ModUEq::solveRiemannOutletPressure ( Cell ,
const double &  ,
double &  ,
const double  ,
std::vector< double > &   
) const
virtual

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.

◆ solveRiemannTransportInletInjStagState()

void ModUEq::solveRiemannTransportInletInjStagState ( Cell ,
double *   
)
virtual

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

Parameters
cellLeftleft cell
valueTransportsarray of transport quantities injected

Reimplemented from Model.

◆ solveRiemannTransportInletTank()

void ModUEq::solveRiemannTransportInletTank ( Cell ,
double *   
)
virtual

Inlet tank half Riemann solver for transport equations.

Parameters
cellLeftleft cell
valueTransportsarray of transport quantities in tank

Reimplemented from Model.

◆ solveRiemannTransportIntern()

void ModUEq::solveRiemannTransportIntern ( Cell ,
Cell  
)
virtual

Cell to cell Riemann solver for transport equations.

Parameters
cellLeftleft cell
cellRightright cell

Reimplemented from Model.

◆ solveRiemannTransportOutletPressure()

void ModUEq::solveRiemannTransportOutletPressure ( Cell ,
double *   
)
virtual

Outlet at imposed pressure half Riemann solver for transport equations.

Parameters
cellLeftleft cell
valueTransportsarray of external transport quantities

Reimplemented from Model.

◆ solveRiemannTransportPiston()

void ModUEq::solveRiemannTransportPiston ( Cell ,
double   
)
virtual

Piston half Riemann solver for transport equations.

Parameters
cellLeftleft cell
uPistonpiston velocity

Reimplemented from Model.

◆ solveRiemannTransportWall()

void ModUEq::solveRiemannTransportWall ( )
virtual

Wall half Riemann solver for transport equations.

Reimplemented from Model.

◆ solveRiemannWall()

void ModUEq::solveRiemannWall ( Cell ,
const double &  ,
double &  ,
std::vector< double > &   
) const
virtual

Wall half Riemann solver.

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

Reimplemented from Model.

◆ whoAmI()

virtual const std::string & ModUEq::whoAmI ( ) const
inlinevirtual

Reimplemented from Model.

Friends And Related Symbol Documentation

◆ FluxUEq

friend class FluxUEq
friend

Member Data Documentation

◆ NAME

const std::string ModUEq::NAME = "VELOCITYEQ"
staticprivate

The documentation for this class was generated from the following files: