36 #ifndef multiphaseInterSystem_H 37 #define multiphaseInterSystem_H 41 #include "phaseModel.H" 42 #include "phasePair.H" 43 #include "orderedPhasePair.H" 59 namespace multiphaseInter
61 class surfaceTensionModel;
188 template<
class modelType>
201 template<
class modelType>
215 template<
class modelType>
218 const word& modelName,
229 template<
class modelType>
232 const word& modelName,
244 template<
class modelType>
247 const word& modelName,
298 virtual tmp<volScalarField>
he 305 virtual tmp<scalarField>
he 509 tmp<volScalarField>
mut()
const;
512 tmp<volScalarField>
muEff()
const;
515 tmp<volScalarField>
nut()
const;
518 tmp<volScalarField>
nuEff()
const;
522 tmp<volScalarField>
kappaEff()
const;
526 tmp<scalarField>
kappaEff(
const label patchi)
const;
529 tmp<volScalarField>
alphaEff()
const;
532 tmp<scalarField>
alphaEff(
const label patchi)
const;
550 tmp<volVectorField>
U()
const;
561 const phasePairKey&
key 566 virtual tmp<volScalarField>
coeffs(
const word&
key)
const;
578 virtual tmp<volScalarField>
dmdt(
const phasePairKey&
key)
const = 0;
598 const multiphaseInter::phaseModel& phase,
601 const word speciesName
611 virtual void solve() = 0;
649 template <
class modelType>
653 template <
class modelType>
virtual tmp< volScalarField > coeffs(const word &key) const
Return coefficients (1/rho)
void generatePairsAndSubModels(const word &modelName, HashTable< autoPtr< modelType >, phasePairKey, phasePairKey::hash > &models)
Generate pairs and sub-model tables.
const fvMesh & mesh() const
Return mesh.
virtual tmp< volScalarField > Cv() const
Return Cv of the mixture.
void generatePairs(const dictTable &modelDicts)
Generate pairs.
const phaseModelTable & phases() const
Constant access the phases.
virtual bool incompressible() const
Return true if the equation of state is incompressible for all.
List< word > names(const UPtrList< T > &list, const UnaryMatchPredicate &matcher)
List of names generated by calling name() for each list item and filtered for matches.
Abstract base-class for fluid and solid thermodynamic properties.
const surfaceScalarField & phi() const
Constant access to the total flux.
virtual tmp< volScalarField > hc() const
Chemical enthalpy of the mixture [J/kg].
void setTurbulence(compressibleTurbulenceModel &turb)
Set turbulence model.
static const word phasePropertiesName
Default name of the phase properties dictionary.
multiphaseInterSystem(const fvMesh &mesh)
Construct from fvMesh.
TypeName("multiphaseInterSystem")
Runtime type information.
virtual bool read()
Read base phaseProperties dictionary.
virtual tmp< volScalarField > mu() const
Dynamic viscosity of mixture [kg/m/s].
virtual volScalarField & he()
Return access to the internal energy field [J/Kg].
virtual tmp< scalarField > rhoEoS(const scalarField &p, const scalarField &T, const labelList &cells) const
Density from pressure and temperature.
compressible::turbulenceModel & turb
virtual tmp< volScalarField > alphahe() const
Thermal diffusivity for energy of mixture [kg/m/s].
virtual void correctMassSources(const volScalarField &T)=0
Correct mass sources.
tmp< volScalarField > alphaEff() const
Effective thermal turbulent diffusivity of mixture [kg/m/s].
virtual word thermoName() const
Return the name of the thermo physics.
virtual const volScalarField & T() const
Temperature [K].
surfaceTensionModelTable surfaceTensionModels_
Surface tension models.
const volScalarField & alpha2
Base-class for all transport models used by the compressible turbulence models.
virtual tmp< volScalarField > gamma() const
Gamma = Cp/Cv [].
DimensionedField< scalar, volMesh > Internal
The internal field type from which this GeometricField is derived.
tmp< volScalarField > kappaEff() const
Effective thermal turbulent diffusivity for temperature.
virtual tmp< volScalarField > dmdt(const phasePairKey &key) const =0
Return interfacial source mass rate per phase pair.
Hashing functor for phasePairKey.
virtual void correct()
Correct the mixture thermos.
virtual volScalarField & p()
Pressure [Pa].
tmp< volScalarField > K(const volScalarField &alpha1, const volScalarField &alpha2) const
Interface curvature.
void createSubModels(const dictTable &modelDicts, HashTable< autoPtr< modelType >, phasePairKey, phasePairKey::hash > &models)
Generate pairs and sub-model tables using pair keys.
virtual ~multiphaseInterSystem()
Destructor.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
HashTable< autoPtr< multiphaseInter::phaseModel > > phaseModelTable
const fvMesh & mesh_
Reference to the mesh.
virtual void correctTurbulence()
Correct the turbulence.
const dimensionedScalar & Prt() const
Return Prandt number.
virtual void solve()=0
Solve for the phase transport equations.
surfaceScalarField phi_
Mixture total volumetric flux.
virtual bool includeVolChange()=0
Add volume change in pEq.
compressibleTurbulenceModel * turbulence() const
Return pointer to turbulence model.
dimensionedScalar Prt_
Turbulent Prandt number.
A class for handling words, derived from Foam::string.
virtual tmp< volScalarField > surfaceTensionCoeff(const phasePairKey &key) const
Return the surface tension coefficient.
virtual void alphaTransfer(SuSpTable &Su, SuSpTable &Sp)=0
Calculate mass transfer for alpha's.
HashTable< autoPtr< phasePair >, phasePairKey, phasePairKey::hash > phasePairTable
static const GeometricField< scalar, fvPatchField, volMesh > & null() noexcept
Return a null GeometricField (reference to a nullObject).
HashTable< autoPtr< multiphaseInter::surfaceTensionModel >, phasePairKey, phasePairKey::hash > surfaceTensionModelTable
const phasePairTable & totalPhasePairs() const
Constant access the total phase pairs.
surfaceScalarField rhoPhi_
Mixture total mass flux.
A HashTable similar to std::unordered_map.
An ordered or unorder pair of phase names. Typically specified as follows.
void calcMu()
Calculate and return the laminar viscosity.
tmp< surfaceScalarField > generatePhi(const HashTable< autoPtr< multiphaseInter::phaseModel >> &phaseModels) const
Generate the mixture flux.
Abstract base class for turbulence models (RAS, LES and laminar).
virtual tmp< volScalarField > kappa() const
Thermal diffusivity for temperature of mixture [J/m/s/K].
HashTable< volScalarField::Internal > SuSpTable
phasePairTable totalPhasePairs_
Total ordered phase pairs in the system.
virtual tmp< volScalarField > W() const
Molecular weight [kg/kmol] of the mixture.
tmp< volScalarField > nearInterface() const
Near Interface of alpha'n.
interfacePorousModelTable interfacePorousModelTable_
Interface porous models.
phasePairTable phasePairs_
Phase pairs.
const dimensionedScalar h
Planck constant.
HashTable< autoPtr< multiphaseInter::phaseModel > > generatePhaseModels(const wordList &names) const
Generate the phases.
wordList phaseNames_
Phase names.
void generatePairsTable()
Generate pair table.
HashTable< autoPtr< porousModel >, phasePairKey, phasePairKey::hash > interfacePorousModelTable
phaseModelTable phaseModels_
Phase models.
tmp< surfaceVectorField > nHatfv(const volScalarField &alpha1, const volScalarField &alpha2) const
Interface normal surface vector.
const modelType & lookupSubModel(const phasePair &key) const
Access a sub model between a phase pair.
Forward declarations of fvMatrix specializations.
virtual tmp< volScalarField > nu() const
Kinematic viscosity of mixture [m^2/s].
tmp< volScalarField > mut() const
Return the turbulent dynamic viscosity.
auto key(const Type &t) -> typename std::enable_if< std::is_enum< Type >::value, typename std::underlying_type< Type >::type >::type
tmp< volVectorField > nVolHatfv(const volScalarField &alpha1, const volScalarField &alpha2) const
Interface normal volField vector.
virtual tmp< fvScalarMatrix > volTransfer(const volScalarField &p)=0
Return the volumetric rate transfer matrix.
Mesh data needed to do the Finite Volume discretisation.
fvMatrix< vector > fvVectorMatrix
tmp< volScalarField > nuEff() const
Return the effective kinematic viscosity.
tmp< volScalarField > nut() const
Return the turbulent kinematic viscosity.
tmp< surfaceScalarField > nHatf(const volScalarField &alpha1, const volScalarField &alpha2) const
Interface normal surface vector.
virtual tmp< volScalarField > Cp() const
Return Cp of the mixture.
tmp< surfaceScalarField > surfaceTensionForce() const
Calculate surface tension of the mixture.
virtual tmp< volScalarField > Cpv() const
Heat capacity at constant pressure/volume [J/kg/K].
virtual tmp< fvScalarMatrix > heatTransfer(const volScalarField &T)=0
Return the heat transfer matrices.
compressibleTurbulenceModel * turb_
Turbulence model.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
virtual void massSpeciesTransfer(const multiphaseInter::phaseModel &phase, volScalarField::Internal &Su, volScalarField::Internal &Sp, const word speciesName)=0
Calculate mass transfer for species.
volScalarField mu_
Dynamic viscocity.
A class for managing temporary objects.
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
const surfaceScalarField & rhoPhi() const
Constant access to the mixture mass flux.
HashTable< dictionary, phasePairKey, phasePairKey::hash > dictTable
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
tmp< volVectorField > U() const
Mixture U.
Description for mass transfer between a pair of phases. The direction of the mass transfer is from th...
virtual tmp< scalarField > THE(const scalarField &h, const scalarField &p, const scalarField &T0, const labelList &cells) const
Temperature from enthalpy/internal energy for cell-set.
virtual tmp< volScalarField > CpByCpv() const
Heat capacity ratio [].
void addInterfacePorosity(fvVectorMatrix &UEqn)
Add interface porosity on phasePair.
virtual tmp< volScalarField > rho() const
Return the mixture density.
tmp< volScalarField > muEff() const
Return the effective dynamic viscosity.
virtual bool isochoric() const
Return true if the equation of state is isochoric for all phasses.
const volScalarField & alpha1