![]() |
ECOGEN 6.0
Evolutive, Compressible, Open, Genuine, Easy, N-phase
|
Abstract class for mathematical flow models. More...
#include <Model.h>
Inherited by ModEuler, ModEulerHomogeneous, ModExtendedNavierStokesKorteweg1D, ModNEq, ModPTUEq, ModUEq, and ModUEqTotEnergy.
Public Member Functions | |
| Model (const std::string &name, const int &numbTransports) | |
| Generic model constructor. | |
| virtual | ~Model () |
| virtual void | allocateCons (Flux **) |
| Allocate conservative variable arrays. | |
| virtual void | allocatePhase (Phase **) |
| Instanciate fluid phase variable. | |
| virtual void | allocatePhaseSolid (Phase **) |
| Instanciate solid phase variable. | |
| virtual void | allocatePhaseGradient (GradPhase **) |
| Instanciate gradient phase variable. | |
| virtual void | allocatePhaseSolidGradient (GradPhase **) |
| Instanciate gradient solid-phase variable. | |
| virtual void | allocateMixture (Mixture **) |
| Instanciate mixture variable. | |
| virtual void | allocateMixtureGradient (GradMixture **) |
| Instanciate gradient mixture 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 | fulfillState (Phase **, Mixture *) |
| Complete a thermodynamics state frome minimum variables depending on the model. | |
| virtual void | fulfillStateResume (Phase **, Mixture *) |
| Complete some variables if necessary when resuming a simulation. | |
| virtual void | initializeAugmentedVariables (Cell *) |
| Complete the augmented variables (such as the ones of Navier-Stokes-Korteweg model). | |
| virtual void | solveRiemannIntern (Cell &, Cell &, const double &, const double &, double &, std::vector< double > &=DEFAULT_VEC_INTERFACE_DATA) const |
| Cell to cell Riemann solver. | |
| virtual void | solveRiemannInternMRF (Cell &, Cell &, const double &, const double &, double &, const Coord &, const Coord &, const Coord &, const Coord &, const Coord &) const |
| Cell to cell Riemann solver + compute fluxBuffMRF for MRF interface. | |
| virtual void | solveRiemannWall (Cell &, const double &, double &, std::vector< double > &) const |
| Wall half Riemann solver. | |
| virtual void | solveRiemannSymmetry (Cell &cellLeft, const double &dxLeft, double &dtMax, std::vector< double > &boundData) const |
| Symmetry half Riemann solver. | |
| virtual void | solveRiemannMovingWall (Cell &, const double &, double &, double, std::vector< double > &) const |
| Moving wall half Riemann solver. | |
| virtual void | solveRiemannInletTank (Cell &, const double &, double &, const double *, const double *, const double &, const double &, std::vector< double > &) const |
| Inlet tank half Riemann solver. | |
| virtual void | solveRiemannInletInjStagState (Cell &, const double &, double &, const double, const double *, const double *, const double *, std::vector< double > &) const |
| Inlet injection using stagnation state half Riemann solver. | |
| virtual void | solveRiemannInletInjTemp (Cell &, const double &, double &, const double, const double *, const double *, std::vector< double > &) const |
| Inlet injection using temperature half Riemann solver. | |
| virtual void | solveRiemannOutletPressure (Cell &, const double &, double &, const double, std::vector< double > &) const |
| Outlet at imposed pressure half Riemann solver. | |
| virtual void | solveRiemannOutletMassflow (Cell &, const double &, double &, const double, std::vector< double > &) 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 &, Cell &) |
| Cell to cell Riemann solver for transport equations. | |
| virtual void | solveRiemannTransportWall () |
| Wall half Riemann solver for transport equations. | |
| virtual void | solveRiemannTransportMovingWall (Cell &, double) |
| Moving wall half Riemann solver for transport equations. | |
| virtual void | solveRiemannTransportInletInjStagState (Cell &, double *) |
| Inlet injection using stagnation state half Riemann solver for transport equations. | |
| virtual void | solveRiemannTransportInletTank (Cell &, double *) |
| Inlet tank half Riemann solver for transport equations. | |
| virtual void | solveRiemannTransportOutletPressure (Cell &, double *) |
| Outlet at imposed pressure half Riemann solver for transport equations. | |
| virtual void | reverseProjection (const Coord, const Coord, const Coord) const |
| Flux reverse projection in the absolute Cartesian coordinate system. | |
| 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 | lowMachSoundSpeed (double &, const double &, double &, const double &=Errors::defaultDouble, double &=Tools::uselessDouble) const |
| virtual void | addNonConsMrfFlux (Phase **) |
| virtual void | reverseProjectionMrfFlux (const Coord, const Coord, const Coord) 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_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 double | selectScalar (Phase **, Mixture *, Transport *, Variable, int=0) const |
| Select a specific scalar variable. | |
| virtual const double & | getSM () |
| Return the local fluid velocity. | |
| virtual const Coord & | getVelocity (const Cell *) const |
| Return the fluid velocity of the corresponding cell. | |
| virtual Coord & | getVelocity (Cell *) |
| virtual const Coord & | getVectorP (const Cell *) const |
| virtual Coord & | getVectorP (Cell *) |
| std::vector< Relaxation * > * | getRelaxations () |
| void | printInfo () const |
| virtual const std::string & | whoAmI () const |
| virtual void | setSmoothCrossSection1d (const bool &) |
| 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). | |
Protected Attributes | |
| 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) | |
Abstract class for mathematical flow models.
| Model::Model | ( | const std::string & | name, |
| const int & | numbTransports ) |
Generic model constructor.
| name | model name |
| numbTransports | number of additional transport equations |
|
virtual |
|
inlinevirtual |
|
inlinevirtual |
Allocate conservative variable arrays.
| cons | conservative variable array to allocate |
Reimplemented in ModEuler, ModEulerHomogeneous, ModExtendedNavierStokesKorteweg1D, ModNEq, ModNEqDEM, ModNEqHLL, ModNEqHLLAC, ModNEqHLLC4Waves, ModPTUEq, ModPUEq, ModUEq, and ModUEqTotEnergy.
| void Model::allocateEos | ( | Cell & | cell | ) | const |
Associate equations of state.
| cell | original cell for equation of state linking |
|
inlinevirtual |
Instanciate mixture variable.
| mixture | mixture to instanciate |
Reimplemented in ModEuler, ModEulerHomogeneous, ModExtendedNavierStokesKorteweg1D, ModNEq, ModPTUEq, ModPUEq, ModUEq, and ModUEqTotEnergy.
|
inlinevirtual |
Instanciate gradient mixture variable.
| mixture | mixture to instanciate |
Reimplemented in ModEuler, ModEulerHomogeneous, ModNEq, ModPTUEq, and ModUEq.
|
inlinevirtual |
Instanciate fluid phase variable.
| phase | phase to instanciate |
Reimplemented in ModEuler, ModEulerHomogeneous, ModExtendedNavierStokesKorteweg1D, ModNEq, ModPTUEq, ModPUEq, ModUEq, and ModUEqTotEnergy.
|
inlinevirtual |
Instanciate gradient phase variable.
| phase | phase to instanciate |
Reimplemented in ModEuler, ModEulerHomogeneous, ModNEq, ModPTUEq, and ModUEq.
|
inlinevirtual |
Instanciate solid phase variable.
| phase | phase to instanciate |
|
inlinevirtual |
Instanciate gradient solid-phase variable.
| phase | phase to instanciate |
|
inlinevirtual |
Return if compaction is activated or not.
| k | phase number |
|
inlinevirtual |
Compute the compaction plasticity term of the fluid/solid for relaxation.
| k | phase number |
| alpha | volume fraction ( \( \alpha \)) |
| density | density ( \( \rho \)) |
| lambda | compaction variable ( \( \lambda \)) |
| pc | compaction pressure ( \( p_c \)) |
| f | compaction function f ( \( f \)) return \( \dlambda \) (compaction plasticity) |
|
inlinevirtual |
Compute the compaction pressure term including the derivative d kappa_k / d alpha_k.
| k | phase number |
| alpha | volume fraction ( \( \alpha \)) |
| density | density ( \( \rho \)) |
| lambda | compaction variable ( \( \lambda \)) return \( \frac{\partial \kappa_k}{\partial \alpha_k} \) (compaction pressure) |
|
inlinevirtual |
Compute the compaction pressure term including the derivative d kappa_k / d xi_k.
| k | phase number |
| alpha | volume fraction ( \( \alpha \)) |
| density | density ( \( \rho \)) |
| lambda | compaction variable ( \( \lambda \)) return \( \frac{\partial \kappa_k}{\partial \xi_k} \) (compaction pressure) |
|
inlinevirtual |
Compute the elastic energy of the solid.
| k | phase number |
| cobase | cobase tensor ( \( e^\beta \)) |
|
inlinevirtual |
Compute the elastic energy and stress tensor of the solid.
| k | phase number |
| cobase | cobase tensor ( \( e^\beta \)) |
| pressure | pressure ( \( p \)) |
| density | density ( \( \rho \)) |
| elasticEnergy | elastic energy ( \( e^e \)) |
| stressTensor | stress tensor ( \( \sigma \)) |
|
inlinevirtual |
Return the compaction energy of the fluid/solid.
| k | phase number |
| alpha | volume fraction ( \( \alpha \)) |
| density | density ( \( \rho \)) |
| lambda | compaction variable ( \( \lambda \)) return \( \kappa \) (compaction energy) |
|
inlinevirtual |
Compute the square longitudinal wave speed of the solid.
| k | phase number |
| phase | phase object |
Energy correction after relaxations (only for PUEq model).
| cell | cell |
| type | primitive-variable type |
Reimplemented in ModPUEq.
Complete a thermodynamics state frome minimum variables depending on the model.
| phases | phases array variables |
| mixture | mixture variables |
Reimplemented in ModEuler, ModEulerHomogeneous, ModExtendedNavierStokesKorteweg1D, ModNEq, ModPTUEq, ModUEq, and ModUEqTotEnergy.
Complete some variables if necessary when resuming a simulation.
| phases | phases array variables |
| mixture | mixture variables |
Reimplemented in ModEuler, ModEulerHomogeneous, ModExtendedNavierStokesKorteweg1D, ModNEq, ModPTUEq, ModPUEq, ModUEq, and ModUEqTotEnergy.
|
inlinevirtual |
Return the chi modulus for each phase.
|
inlinevirtual |
Return the reference density for each phase.
|
inlinevirtual |
Return the compaction reference density of phase k.
| k | phase number |
|
inlinevirtual |
Return the limit of elasticity for each phase.
|
inlinevirtual |
Return the elastic parameter a of the one-parameter model for each phase.
|
inline |
|
inline |
|
inlinevirtual |
Return the shear modulus for each phase.
|
inlinevirtual |
Return the local fluid velocity.
Reimplemented in ModEuler, ModEulerHomogeneous, ModExtendedNavierStokesKorteweg1D, ModNEq, ModPTUEq, ModUEq, and ModUEqTotEnergy.
Reimplemented in ModEuler, ModEulerHomogeneous, ModExtendedNavierStokesKorteweg1D, ModNEq, ModPTUEq, ModUEq, and ModUEqTotEnergy.
Return the fluid velocity of the corresponding cell.
| cell | pointer to corresponding cell |
Reimplemented in ModEuler, ModEulerHomogeneous, ModExtendedNavierStokesKorteweg1D, ModNEq, ModPTUEq, ModUEq, and ModUEqTotEnergy.
|
inlinevirtual |
Complete the augmented variables (such as the ones of Navier-Stokes-Korteweg model).
| cell | cell |
Reimplemented in ModEuler, ModEulerHomogeneous, ModExtendedNavierStokesKorteweg1D, ModNEq, ModPTUEq, ModUEq, and ModUEqTotEnergy.
| void Model::initializeRelaxation | ( | Cell * | cell | ) | const |
Initialize the theoritical critical pressure of the fluid (only required for PTMu relax).
| cell | cell to get the eos |
|
inlinevirtual |
|
inlinevirtual |
| void Model::printInfo | ( | ) | const |
|
inlinevirtual |
Read compaction parameters.
| elementCompaction | XML element |
| fileName | string name of readed XML file |
| k | phase number |
|
inlinevirtual |
Read solid parameters.
| elementSolid | XML element |
| fileName | string name of readed XML file |
| k | phase number |
Run all the relaxations.
| cell | cell |
| dt | time step |
| type | primitive-variable type |
|
inlinevirtual |
Flux reverse projection in the absolute Cartesian coordinate system.
| normal | normal vector associated to the cell interface |
| tangent | tangent vector associated to the cell interface |
| binormal | binormal vector associated to the cell interface |
Reimplemented in ModEuler, ModEulerHomogeneous, ModExtendedNavierStokesKorteweg1D, ModNEq, ModPTUEq, ModUEq, and ModUEqTotEnergy.
|
inlinevirtual |
Select a specific scalar variable.
| phases | phases array variables |
| mixture | mixture variables |
| vecTransports | vector of transport variables |
| nameVariables | Name of the variable to select |
| numPhases | Phases number's |
Reimplemented in ModEuler, ModEulerHomogeneous, ModExtendedNavierStokesKorteweg1D, ModNEq, ModPTUEq, ModPUEq, ModUEq, and ModUEqTotEnergy.
|
inline |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
Set the geometric distance over which the in-cell slopes extrapolate (cell width along the face normal).
| slopeDistance | distance from the face back to the opposite face of the cell |
Reimplemented in ModNEqDEM.
|
inlinevirtual |
Reimplemented in ModEuler, ModEulerHomogeneous, and ModUEq.
|
inlinevirtual |
Inlet injection using stagnation state half Riemann solver.
| cellLeft | left cell |
| dxLeft | left characteristic lenght |
| dtMax | maximum explicit time step |
| m0 | specific mass flow rate (kg.s-1.m-2) |
| ak0 | volume fraction array of injected fluids |
| rhok0 | density array of injected fluids |
| pk0 | pressure array of injected fluids |
| boundData | boundary dataset used for output |
Reimplemented in ModEuler, and ModUEq.
|
inlinevirtual |
Inlet injection using temperature half Riemann solver.
| cellLeft | left cell |
| dxLeft | left characteristic lenght |
| dtMax | maximum explicit time step |
| m0 | specific mass flow rate (kg.s-1.m-2) |
| Tk0 | temperature of injected fluid (same for both phases) |
| ak0 | volume fraction of each injected phase |
| boundData | boundary dataset used for output |
Reimplemented in ModEuler, and ModUEq.
|
inlinevirtual |
Inlet tank half Riemann solver.
| cellLeft | left cell |
| dxLeft | left characteristic lenght |
| dtMax | maximum explicit time step |
| ak0 | volume fraction array of fluids in tank |
| rhok0 | density array of fluids in tank |
| pk0 | pressure array of fluids in tank |
| boundData | boundary dataset used for output |
Reimplemented in ModEuler, ModPTUEq, and ModUEq.
|
inlinevirtual |
Cell to cell Riemann solver.
| cellLeft | left cell |
| cellRight | right cell |
| dxLeft | left characteristic lenght |
| dxRight | right characteristic lenght |
| dtMax | maximum explicit time step |
| boundData | boundary dataset used for output |
Reimplemented in ModEuler, ModEulerHomogeneous, ModExtendedNavierStokesKorteweg1D, ModNEq, ModNEqDEM, ModPTUEq, ModUEq, and ModUEqTotEnergy.
|
inlinevirtual |
Cell to cell Riemann solver + compute fluxBuffMRF for MRF interface.
| cellLeft | left cell |
| cellRight | right cell |
| dxLeft | left characteristic lenght |
| dxRight | right characteristic lenght |
| dtMax | maximum explicit time step |
| omega | rotating velocity |
| normal | face normal |
| tangent | face tangent |
| binormal | face binormal |
| position | face position |
Reimplemented in ModEuler, and ModUEq.
|
inlinevirtual |
Moving wall half Riemann solver.
| cellLeft | left cell |
| dxLeft | left characteristic lenght |
| dtMax | maximum explicit time step |
| wallVelocity | moving wall velocity (in its normal direction) |
| boundData | boundary dataset used for output |
Reimplemented in ModEuler, and ModUEq.
|
inlinevirtual |
No flux half Riemann solver (return null flux to use with 1D geometry with smooth varying cross section).
Reimplemented in ModEuler, ModExtendedNavierStokesKorteweg1D, and ModUEq.
|
inlinevirtual |
Outlet at imposed massflow half Riemann solver.
| cellLeft | left cell |
| dxLeft | left characteristic lenght |
| dtMax | maximum explicit time step |
| m0 | specific mass flow rate (kg.s-1.m-2) |
| boundData | boundary dataset used for output |
Reimplemented in ModEuler, and ModUEq.
|
inlinevirtual |
|
inlinevirtual |
Symmetry half Riemann solver.
| cellLeft | left cell |
| dxLeft | left characteristic lenght |
| dtMax | maximum explicit time step |
| boundData | boundary dataset used for output |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
Wall half Riemann solver.
| cellLeft | left cell |
| dxLeft | left characteristic lenght |
| dtMax | maximum explicit time step |
| boundData | boundary dataset used for output |
Reimplemented in ModEuler, ModExtendedNavierStokesKorteweg1D, ModNEqDEM, ModPTUEq, and ModUEq.
|
inlinevirtual |
Reimplemented in ModEuler, ModEulerHomogeneous, ModExtendedNavierStokesKorteweg1D, ModNEq, ModPTUEq, ModUEq, and ModUEqTotEnergy.
|
protected |
Low-Mach preconditioning (default: false).
|
protected |
Minimum Mach number limit for L-M preconditionning used when local Mach number is below this value (default: 0.01).
|
protected |
Name of the required model.
|
protected |
Vector of relaxation procedure.
|
protected |
1D geometry with smooth cross section variation (default: false)