41 #include "phaseModel.H" 60 template<
class modelType>
class BlendedInterfacialModel;
61 class surfaceTensionModel;
62 class aspectRatioModel;
97 HashPtrTable<volScalarField>,
120 autoPtr<surfaceTensionModel>,
129 autoPtr<aspectRatioModel>,
197 static const bool fillFields_ =
false;
205 const phaseModelList& phaseModels
212 template<
class modelType>
215 const dictTable& modelDicts,
225 template<
class modelType>
235 const bool correctFixedFluxBCs =
true 239 template<
class modelType>
249 const bool correctFixedFluxBCs =
true 253 template<
class modelType>
263 const bool correctFixedFluxBCs =
true 310 surfaceVectorField::Boundary& nHatb
334 const phasePairKey& key
387 inline const phaseModelList&
phases()
const;
390 inline phaseModelList&
phases();
393 inline const phaseModelPartialList&
movingPhases()
const;
417 inline const phasePairTable&
phasePairs()
const;
445 template<
class modelType>
449 template<
class modelType>
453 template<
class modelType>
461 template<
class modelType>
469 template<
class modelType>
473 template<
class modelType>
484 template<
class>
class PatchField,
498 template<
class>
class PatchField,
527 const phasePairKey& key,
626 const bool includeVirtualMass =
false
const BlendedInterfacialModel< modelType > & lookupBlendedSubModel(const phasePair &key) const
Return a blended sub model between a phase pair.
static const word propertiesName
Default name of the phase properties dictionary.
Hashing function class, shared by all the derived classes.
virtual PtrList< surfaceScalarField > AFfs() const =0
Return the implicit force coefficients for the face-based.
void generatePairs(const dictTable &modelDicts)
Generate pairs.
virtual void partialEliminationf(const PtrList< surfaceScalarField > &rAUfs, const PtrList< surfaceScalarField > &alphafs, const PtrList< surfaceScalarField > &phiKdPhifs)=0
Solve the drag system for the new fluxes.
fv::options & fvOptions() const
Access the fvOptions.
const phaseModelPartialList & movingPhases() const
Return the models for phases that are moving.
surfaceTensionModelTable surfaceTensionModels_
Surface tension models.
tmp< volScalarField > E(const phasePairKey &key) const
Return the aspect-ratio for a pair.
virtual void correctTurbulence()
Correct the turbulence.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
virtual tmp< volScalarField > Kd(const phasePairKey &key) const =0
Return the drag coefficient for phase pair.
virtual PtrList< surfaceScalarField > phiFfs(const PtrList< surfaceScalarField > &rAUfs)=0
Return the force fluxes for the face-based algorithm.
virtual autoPtr< specieTransferTable > specieTransfer() const =0
Return the specie transfer matrices.
tmp< surfaceScalarField > nHatf(const volScalarField &alpha1, const volScalarField &alpha2) const
Normal to interface between two phases dotted with face areas.
declareRunTimeSelectionTable(autoPtr, phaseSystem, dictionary,(const fvMesh &mesh),(mesh))
HashTable< autoPtr< phasePair >, phasePairKey, phasePairKey::hash > phasePairTable
A list of keyword definitions, which are a keyword followed by any number of values (e...
const dimensionedScalar deltaN_
Stabilisation for normalisation of the interface normal.
PtrList< surfaceScalarField > alphafs(phases.size())
HashPtrTable< fvVectorMatrix > momentumTransferTable
void setMixturePhi(const PtrList< surfaceScalarField > &alphafs, const surfaceScalarField &phim)
Re-normalise the flux of the phases.
phasePairTable phasePairs_
Phase pairs.
const modelType & lookupSubModel(const phasePair &key) const
Return a sub model between a phase pair.
bool foundBlendedSubModel(const phasePair &key) const
Check availability of a blended sub model for a given phase pair.
virtual autoPtr< heatTransferTable > heatTransfer() const =0
Return the heat transfer matrices.
tmp< volScalarField > sigma(const phasePairKey &key) const
Return the surface tension coefficient for a pair.
volScalarField dpdt_
Rate of change of pressure.
TypeName("phaseSystem")
Runtime type information.
virtual autoPtr< momentumTransferTable > momentumTransferf()=0
Return the momentum transfer matrices for the face-based.
tmp< volScalarField > K(const phaseModel &alpha1, const phaseModel &alpha2) const
Curvature of interface between two phases.
HashPtrTable< fvScalarMatrix > heatTransferTable
phaseModelPartialList stationaryPhaseModels_
Stationary phase models.
HashPtrTable< fvScalarMatrix > specieTransferTable
virtual PtrList< surfaceScalarField > ddtCorrByAs(const PtrList< volScalarField > &rAUs, const bool includeVirtualMass=false) const =0
Return the flux corrections for the cell-based algorithm.
A HashTable specialization for hashing pointers.
void createSubModels(const dictTable &modelDicts, HashTable< autoPtr< modelType >, phasePairKey, phasePairKey::hash > &models)
Generate pairs and sub-model tables.
HashTable< autoPtr< surfaceTensionModel >, phasePairKey, phasePairKey::hash > surfaceTensionModelTable
virtual autoPtr< momentumTransferTable > momentumTransfer()=0
Return the momentum transfer matrices for the cell-based.
virtual tmp< volScalarField > Vm(const phasePairKey &key) const =0
Return the virtual mass coefficient for phase pair.
tmp< volScalarField > nearInterface() const
Indicator of the proximity of the interface.
HashPtrTable< HashPtrTable< volScalarField >, phasePairKey, phasePairKey::hash > dmidtfTable
phaseModelList phaseModels_
Phase models.
phaseModelPartialList multiComponentPhaseModels_
Multi-component phase models.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
const phaseModelPartialList & stationaryPhases() const
Return the models for phases that are stationary.
virtual void solve(const PtrList< volScalarField > &rAUs, const PtrList< surfaceScalarField > &rAUfs)
Solve for the phase fractions.
tmp< surfaceScalarField > surfaceTension(const phaseModel &phase) const
Return the surface tension force.
const phasePairTable & phasePairs() const
Return the phase pairs.
const phaseModelList & phases() const
Return the phase models.
virtual void correctContinuityError()
Correct the continuity errors.
virtual PtrList< volVectorField > KdUByAs(const PtrList< volScalarField > &rAUs) const =0
Return the explicit part of the drag force.
virtual void correctKinematics()
Correct the kinematics.
Dimension set for the base types.
An ordered pair of two objects of type <T> with first() and second() elements.
phaseSystem(const fvMesh &mesh)
Construct from fvMesh.
Class to represent a system of phases and model interfacial transfers between them.
Info<< "Reading field p_rgh\"<< endl;volScalarField p_rgh(IOobject("p_rgh", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh);label pRefCell=0;scalar pRefValue=0.0;if(fluid.incompressible()){ p=max(p_rgh+fluid.rho() *gh, pMin);if(p_rgh.needReference()) { setRefCell(p, p_rgh, pimple.dict(), pRefCell, pRefValue);p+=dimensionedScalar("p", p.dimensions(), pRefValue - getRefCellValue(p, pRefCell));p_rgh=p - fluid.rho() *gh;}}mesh.setFluxRequired(p_rgh.name());PtrList< volScalarField > rAUs
HashPtrTable< volScalarField, phasePairKey, phasePairKey::hash > dmdtfTable
tmp< volVectorField > U() const
Return the mixture velocity.
volScalarField & alpha1(mixture.alpha1())
const IOMRFZoneList & MRF() const
Return MRF zones.
const phaseModelPartialList & anisothermalPhases() const
Return the models for phases that have variable temperature.
virtual void correctThermo()
Correct the thermodynamics.
PtrListDictionary< phaseModel > phaseModelList
const phaseModel & otherPhase(const phaseModel &phase) const
Return the phase not given as an argument in a two-phase system.
word referencePhaseName_
Name of optional reference phase which is not solved for.
UPtrList< phaseModel > phaseModelPartialList
const fvMesh & mesh_
Reference to the mesh.
static autoPtr< phaseSystem > New(const fvMesh &mesh)
virtual PtrList< surfaceScalarField > phiFs(const PtrList< volScalarField > &rAUs)=0
Return the force fluxes for the cell-based algorithm.
bool foundSubModel(const phasePair &key) const
Check availability of a sub model for a given phase pair.
const word & name() const
Name function is needed to disambiguate those inherited.
An STL-conforming hash table.
phaseModelPartialList anisothermalPhaseModels_
Anisothermal phase models.
cAlphaTable cAlphas_
Interface compression coefficients.
tmp< surfaceVectorField > nHatfv(const volScalarField &alpha1, const volScalarField &alpha2) const
Normal to interface between two phases.
phaseModelPartialList movingPhaseModels_
Moving phase models.
virtual void correct()
Correct the fluid properties other than those listed below.
tmp< volScalarField > rho() const
Return the mixture density.
virtual PtrList< volScalarField > dmdts() const
Return the mass transfer rates for each phase.
tmp< volScalarField > sumAlphaMoving() const
Return the sum of the phase fractions of the moving phases.
aspectRatioModelTable aspectRatioModels_
Aspect ratio models.
IOMRFZoneList MRF_
Optional MRF zones.
PtrList< surfaceScalarField > rAUfs
volScalarField sf(fieldObject, mesh)
const volScalarField & dpdt() const
Return the rate of change of the pressure.
bool incompressible() const
Return incompressibility.
virtual tmp< surfaceScalarField > Kdf(const phasePairKey &key) const =0
Return the face drag coefficient for phase pair.
tmp< volScalarField > byDt(const volScalarField &vf)
virtual void correctReactions()
Correct the reactions.
virtual void partialElimination(const PtrList< volScalarField > &rAUs, const PtrList< volVectorField > &KdUByAs, const PtrList< surfaceScalarField > &alphafs, const PtrList< surfaceScalarField > &phiKdPhis)=0
Solve the drag system for the new velocities and fluxes.
virtual void correctEnergyTransport()
Correct the energy transport e.g. alphat.
void fillFields(const word &name, const dimensionSet &dims, PtrList< GeometricField< Type, PatchField, GeoMesh >> &fieldList) const
Fill up gaps in a phase-indexed list of fields with zeros.
Forward declarations of fvMatrix specializations.
tmp< surfaceScalarField > calcPhi(const phaseModelList &phaseModels) const
Calculate and return the mixture flux.
const surfaceScalarField & phi() const
Return the mixture flux.
virtual ~phaseSystem()
Destructor.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
virtual bool read()
Read base phaseProperties dictionary.
blendingMethodTable blendingMethods_
Blending methods.
HashTable< autoPtr< blendingMethod >, word, word::hash > blendingMethodTable
void generatePairsAndSubModels(const word &modelName, HashTable< autoPtr< modelType >, phasePairKey, phasePairKey::hash > &models, const bool correctFixedFluxBCs=true)
Generate pairs and sub-model tables.
Mesh data needed to do the Finite Volume discretisation.
virtual PtrList< surfaceScalarField > DByAfs(const PtrList< volScalarField > &rAUs, const PtrList< surfaceScalarField > &rAUfs) const =0
Return the phase diffusivity.
Single incompressible phase derived from the phase-fraction. Used as part of the multiPhaseMixture fo...
HashTable< autoPtr< aspectRatioModel >, phasePairKey, phasePairKey::hash > aspectRatioModelTable
HashTable< scalar, phasePairKey, phasePairKey::hash > cAlphaTable
void setMixtureU(const volVectorField &Um)
Re-normalise the velocity of the phases.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
static word modelName(Name name, const word &model)
Return the name of the object within the given model.
void correctContactAngle(const phaseModel &alpha1, const phaseModel &alpha2, surfaceVectorField::Boundary &nHatb) const
Correction for the boundary condition on the unit normal nHat on.
surfaceScalarField phi_
Total volumetric flux.
Generic mesh wrapper used by volMesh, surfaceMesh, pointMesh etc.
virtual PtrList< surfaceScalarField > phiKdPhifs(const PtrList< surfaceScalarField > &rAUfs) const =0
Return the force fluxes for the face-based algorithm.
A class for managing temporary objects.
virtual PtrList< surfaceScalarField > phiKdPhis(const PtrList< volScalarField > &rAUs) const =0
Return the force fluxes for the cell-based algorithm.
const phaseModelPartialList & multiComponentPhases() const
Return the models for phases that have multiple species.
const fvMesh & mesh() const
Return the mesh.
Single incompressible phase derived from the phase-fraction. Used as part of the multiPhaseMixture fo...
List of MRF zones with IO functionality. MRF zones are specified by a list of dictionary entries...
HashTable< dictionary, phasePairKey, phasePairKey::hash > dictTable
virtual bool implicitPhasePressure() const
Returns true if the phase pressure is treated implicitly.
virtual void correctSpecies()
Correct the species mass fractions.
virtual tmp< volScalarField > dmdtf(const phasePairKey &key) const
Return the mass transfer rate for an interface.