41 #include "phaseModel.H" 61 class surfaceTensionModel;
63 class nonOrthogonalSolutionControl;
99 HashPtrTable<volScalarField>,
114 autoPtr<surfaceTensionModel>,
152 volScalarField
dpdt_;
173 static const bool fillFields_ =
false;
181 const phaseModelList& phaseModels
185 template<
class ModelType>
202 const volScalarField&
alpha1,
203 const volScalarField&
alpha2 210 const volScalarField&
alpha1,
211 const volScalarField&
alpha2 281 inline const phaseModelList&
phases()
const;
284 inline phaseModelList&
phases();
287 inline const phaseModelPartialList&
movingPhases()
const;
321 inline const volScalarField&
dpdt()
const;
324 inline volScalarField&
dpdt();
346 template<
class ModelType>
350 template<
class ModelType,
class ... InterfaceTypes>
360 template<
class ModelType>
373 template<
class ModelType>
385 template<
class ValueType>
398 template<
class ValueType>
401 const word& valueName,
413 template<
class ModelType>
420 template<
class ModelType>
424 template<
class ModelType>
437 template<
class>
class PatchField,
451 template<
class>
class PatchField,
478 const phaseInterfaceKey& key,
492 const phaseInterfaceKey& key
595 const bool includeVirtualMass =
false 652 const volScalarField&
p_rgh,
static const word propertiesName
Default name of the phase properties dictionary.
pressureReference & pressureReference
virtual PtrList< surfaceScalarField > AFfs() const =0
Return the implicit force coefficients for the face-based.
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.
virtual void correctTurbulence()
Correct the turbulence.
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))
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.
virtual autoPtr< heatTransferTable > heatTransfer() const =0
Return the heat transfer matrices.
HashPtrTable< HashPtrTable< volScalarField >, phaseInterfaceKey, phaseInterfaceKey::hash > dmidtfTable
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.
virtual autoPtr< momentumTransferTable > momentumTransfer()=0
Return the momentum transfer matrices for the cell-based.
tmp< volScalarField > nearInterface() const
Indicator of the proximity of the interface.
Class to represent an interface between phases. Derivations can further specify the configuration of ...
void correctBoundaryFlux()
Correct fixed-flux BCs to be consistent with the velocity BCs.
HashTable< autoPtr< surfaceTensionModel >, phaseInterfaceKey, phaseInterfaceKey::hash > surfaceTensionModelTable
phaseModelList phaseModels_
Phase models.
static const dictionary & modelSubDict(const dictionary &dict)
Return the dictionary from which to construct a low-level.
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.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
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.
const fileName & name() const
Return the dictionary name.
void generateInterfacialModels(const dictionary &dict, const phaseInterface &interface, PtrList< phaseInterface > &interfaces, PtrList< ModelType > &models) const
Generate interfacial-model lists.
phaseSystem(const fvMesh &mesh)
Construct from fvMesh.
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.schemes().setFluxRequired(p_rgh.name());PtrList< volScalarField > rAUs
Class to represent a system of phases and model interfacial transfers between them.
A class for handling words, derived from string.
virtual tmp< volScalarField > dmdtf(const phaseInterfaceKey &key) const
Return the mass transfer rate for an interface.
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.
bool foundInterfacialModel(const phaseInterface &interface) const
Check availability of a sub model for a given interface.
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.
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.
void generateInterfacialValues(const dictionary &dict, HashTable< ValueType, phaseInterfaceKey, phaseInterfaceKey::hash > &values) const
Generate interfacial-model tables.
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.
IOMRFZoneList MRF_
Optional MRF zones.
PtrList< surfaceScalarField > rAUfs
HashPtrTable< volScalarField, phaseInterfaceKey, phaseInterfaceKey::hash > dmdtfTable
dictionary interfacialDict(const word &name) const
Return the dictionary containing interfacial model or value.
tmp< volScalarField > divU
volScalarField sf(fieldObject, mesh)
const volScalarField & dpdt() const
Return the rate of change of the pressure.
bool incompressible() const
Return incompressibility.
tmp< volScalarField > byDt(const volScalarField &vf)
tmp< volScalarField > sigma(const phaseInterfaceKey &key) const
Return the surface tension coefficient for an interface.
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.
const ModelType & lookupInterfacialModel(const phaseInterface &interface) const
Return a sub model for an interface.
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.
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...
void setMixtureU(const volVectorField &Um)
Re-normalise the velocity of the phases.
void validateMassTransfer(const phaseInterface &interface) const
Check that mass transfer is supported across the given interface.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
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 dimensionedScalar & deltaN() const
Stabilisation for normalisation of the interface normal.
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...
virtual bool implicitPhasePressure() const
Returns true if the phase pressure is treated implicitly.
word modelName() const
Return the model name. This is the same as the model's typename.
HashTable< scalar, phaseInterfaceKey, phaseInterfaceKey::hash > cAlphaTable
virtual void correctSpecies()
Correct the species mass fractions.