30#include "surfaceTensionModel.H"
31#include "aspectRatioModel.H"
32#include "surfaceInterpolate.H"
37#include "BlendedInterfacialModel.H"
85 if (phasePairs_.found(key))
89 else if (key.ordered())
98 phaseModels_[key.first()],
99 phaseModels_[key.second()]
115 phaseModels_[key.first()],
116 phaseModels_[key.second()]
148 phi_(calcPhi(phaseModels_)),
165 label movingPhasei = 0;
166 label stationaryPhasei = 0;
167 label anisothermalPhasei = 0;
168 label multiComponentPhasei = 0;
172 movingPhasei += !
phase.stationary();
173 stationaryPhasei +=
phase.stationary();
174 anisothermalPhasei += !
phase.isothermal();
175 multiComponentPhasei += !
phase.pure();
183 stationaryPhasei = 0;
184 anisothermalPhasei = 0;
185 multiComponentPhasei = 0;
189 if (!
phase.stationary())
193 if (
phase.stationary())
197 if (!
phase.isothermal())
244 auto phasei = movingPhaseModels_.cbegin();
253 if (stationaryPhaseModels_.empty())
258 phasei = movingPhaseModels_.cbegin();
272 auto phasei = movingPhaseModels_.cbegin();
281 if (stationaryPhaseModels_.empty())
286 phasei = movingPhaseModels_.cbegin();
302 if (aspectRatioModels_.found(key))
304 return aspectRatioModels_[key]->E();
321 if (surfaceTensionModels_.found(key))
323 return surfaceTensionModels_[key]->sigma();
378 bool updateDpdt =
false;
382 phase.correctKinematics();
384 updateDpdt = updateDpdt ||
phase.thermo().dpdt();
390 dpdt_ =
fvc::ddt(phaseModels_.cbegin()().thermo().p());
399 phase.correctThermo();
408 phase.correctTurbulence();
417 phase.correctEnergyTransport();
446 return fv::localEulerDdt::localRDeltaT(vf.
mesh())*vf;
450 return vf/vf.
mesh().time().deltaT();
459 return fv::localEulerDdt::localRDeltaTf(sf.
mesh())*sf;
463 return sf/sf.
mesh().time().deltaT();
tmp< volScalarField > dmdt() const
Return the blended mass transfer rate.
wordList toc() const
Return the table of contents (as a sorted list)
const Mesh & mesh() const
Return mesh.
A HashTable similar to std::unordered_map.
bool insert(const Key &key, const T &obj)
Copy insert a new entry, not overwriting existing entries.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Defines the attributes of an object for which implicit objectRegistry management is supported,...
static word groupName(StringType base, const word &group)
Create dot-delimited name.group string.
writeOption writeOpt() const noexcept
The write option.
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
static autoPtr< Time > New()
Construct (dummy) Time - no functionObjects or libraries.
const T * set(const label i) const
void resize(const label newLen)
Change the size of the list.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
virtual bool enabled() const
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
const dictionary & subDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a sub-dictionary.
Mesh data needed to do the Finite Volume discretisation.
constant condensation/saturation model.
Single incompressible phase derived from the phase-fraction. Used as part of the multiPhaseMixture fo...
An ordered or unorder pair of phase names. Typically specified as follows.
Description for mass transfer between a pair of phases. The direction of the mass transfer is from th...
Class to represent a system of phases and model interfacial transfers between them.
phaseModelPartialList stationaryPhaseModels_
Stationary phase models.
virtual void correctKinematics()
Correct the kinematics.
virtual void correctEnergyTransport()
Correct the energy transport e.g. alphat.
static const word propertiesName
Default name of the phase properties dictionary.
void generatePairs(const dictTable &modelDicts)
Generate pairs.
phaseModelList phaseModels_
Phase models.
phaseModelPartialList movingPhaseModels_
Moving phase models.
const surfaceScalarField & phi() const
Return the mixture flux.
virtual void correctThermo()
Correct the thermodynamics.
virtual void correct()
Correct the fluid properties other than those listed below.
tmp< volScalarField > sigma(const phasePairKey &key) const
Return the surface tension coefficient for a pair.
phaseModelPartialList multiComponentPhaseModels_
Multi-component phase models.
phaseModelPartialList anisothermalPhaseModels_
Anisothermal phase models.
tmp< volVectorField > U() const
Return the mixture velocity.
tmp< surfaceScalarField > calcPhi(const phaseModelList &phaseModels) const
Calculate and return the mixture flux.
aspectRatioModelTable aspectRatioModels_
Aspect ratio models.
surfaceTensionModelTable surfaceTensionModels_
Surface tension models.
virtual void correctTurbulence()
Correct the turbulence.
void generatePairsAndSubModels(const word &modelName, HashTable< autoPtr< modelType >, phasePairKey, phasePairKey::hash > &models)
Generate pairs and sub-model tables.
virtual PtrList< volScalarField > dmdts() const
Return the mass transfer rates for each phase.
surfaceScalarField phi_
Total volumetric flux.
virtual ~phaseSystem()
Destructor.
tmp< volScalarField > rho() const
Return the mixture density.
blendingMethodTable blendingMethods_
Blending methods.
tmp< volScalarField > E(const phasePairKey &key) const
Return the aspect-ratio for a pair.
virtual void solve()
Solve for the phase fractions.
virtual bool read()
Read base phaseProperties dictionary.
Single incompressible phase derived from the phase-fraction. Used as part of the multiPhaseMixture fo...
void correct()
Correct the phase properties.
bool read(const dictionary &phaseDict)
Read base transportProperties dictionary.
Lookup type of boundary radiation properties.
static const dimensionSet dimSigma
Coefficient dimensions.
virtual bool read()
Read object.
A class for managing temporary objects.
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
Calculate the first temporal derivative.
static tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > interpolate(const GeometricField< Type, fvPatchField, volMesh > &tvf, const surfaceScalarField &faceFlux, Istream &schemeData)
Interpolate field onto faces using scheme given by Istream.
tmp< GeometricField< Type, fvPatchField, volMesh > > ddt(const dimensioned< Type > dt, const fvMesh &mesh)
const dimensionSet dimPressure
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
const dimensionSet dimless
Dimensionless.
tmp< volScalarField > byDt(const volScalarField &vf)
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
const dimensionSet dimDensity
tmp< volScalarField > trho
#define forAll(list, i)
Loop across all elements in list.
#define forAllConstIters(container, iter)
Iterate across all elements of the container object with const access.
#define forAllConstIter(Container, container, iter)
Iterate across all elements in the container object.
static const char *const typeName
The type name used in ensight case files.