41 #include "phaseModel.H" 61 template<
class modelType>
class BlendedInterfacialModel;
62 class surfaceTensionModel;
63 class aspectRatioModel;
65 class nonOrthogonalSolutionControl;
100 HashPtrTable<volScalarField>,
123 autoPtr<surfaceTensionModel>,
132 autoPtr<aspectRatioModel>,
200 static const bool fillFields_ =
false;
208 const phaseModelList& phaseModels
215 template<
class modelType>
218 const dictTable& modelDicts,
228 template<
class modelType>
238 const bool correctFixedFluxBCs =
true 242 template<
class modelType>
252 const bool correctFixedFluxBCs =
true 256 template<
class modelType>
266 const bool correctFixedFluxBCs =
true 270 template<
class modelType>
309 surfaceVectorField::Boundary& nHatb
332 const phasePairKey& key
385 inline const phaseModelList&
phases()
const;
388 inline phaseModelList&
phases();
391 inline const phaseModelPartialList&
movingPhases()
const;
415 inline const phasePairTable&
phasePairs()
const;
452 template<
class modelType>
456 template<
class modelType>
460 template<
class modelType>
468 template<
class modelType>
476 template<
class modelType>
480 template<
class modelType>
491 template<
class>
class PatchField,
505 template<
class>
class PatchField,
534 const phasePairKey& key,
645 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.
pressureReference & pressureReference
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.
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.
pimpleNoLoopControl & pimple
const Foam::fvModels & fvModels() const
Access the fvModels.
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.
virtual PtrList< volScalarField > d2mdtdps() const
Return the mass transfer pressure implicit coefficients.
const Foam::fvConstraints & fvConstraints() const
Access the fvConstraints.
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())
Info<< "Reading field p_rgh\"<< endl;volScalarField p_rgh(IOobject("p_rgh", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh);if(fluid.found("pMin")){ IOWarningInFunction(fluid)<< "Pressure limits, pMin and pMax, are now read from "<< pimple.dict().name()<< endl;}pressureReference pressureReference(p, p_rgh, pimple.dict(), fluid.incompressible());if(fluid.incompressible()){ p=p_rgh+fluid.rho() *gh;}if(p_rgh.needReference() &&fluid.incompressible()){ p+=dimensionedScalar("p", p.dimensions(), pressureReference.refValue() - getRefCellValue(p, pressureReference.refCell()));}p_rgh=p - fluid.rho() *gh;mesh.setFluxRequired(p_rgh.name());PtrList< volScalarField > rAUs
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.
volScalarField & alpha1(mixture.alpha1())
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.
void correctPhi(const volScalarField &p_rgh, const tmp< volScalarField > &divU, const pressureReference &pressureReference, nonOrthogonalSolutionControl &pimple)
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 specialisation for hashing pointers.
Provides controls for the pressure reference in closed-volume simulations.
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.
void correctBoundaryFlux()
Correct fixed-flux BCs to be consistent with the velocity BCs.
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.
const fileName & name() const
Return the dictionary name.
phaseSystem(const fvMesh &mesh)
Construct from fvMesh.
Class to represent a system of phases and model interfacial transfers between them.
HashPtrTable< volScalarField, phasePairKey, phasePairKey::hash > dmdtfTable
tmp< volVectorField > U() const
Return the mixture velocity.
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.
An STL-conforming hash table.
void validateMassTransfer(const phasePair &key) const
Check that mass transfer is supported across the given interface.
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
tmp< volScalarField > divU
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 specialisations.
tmp< surfaceScalarField > calcPhi(const phaseModelList &phaseModels) const
Calculate and return the mixture flux.
const surfaceScalarField & phi() const
Return the mixture flux.
virtual ~phaseSystem()
Destructor.
Finite volume constraints.
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...
Non-orthogonal solution control class. Provides non-orthogonal-loop control methods.
virtual void meshUpdate()
Update the fluid properties for mesh changes.
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.