Go to the documentation of this file.
30 #include "surfaceTensionModel.H"
31 #include "aspectRatioModel.H"
32 #include "surfaceInterpolate.H"
36 #include "dragModel.H"
37 #include "BlendedInterfacialModel.H"
77 const dictTable& modelDicts
89 else if (
key.ordered())
139 IOobject::MUST_READ_IF_MODIFIED,
146 phaseModels_(lookup(
"phases"), phaseModel::iNew(*this)),
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();
310 aspectRatioModel::typeName +
":E",
321 if (surfaceTensionModels_.found(
key))
323 return surfaceTensionModels_[
key]->sigma();
329 surfaceTensionModel::typeName +
":sigma",
374 bool updateDpdt =
false;
378 phase.correctKinematics();
380 updateDpdt = updateDpdt ||
phase.thermo().dpdt();
395 phase.correctThermo();
404 phase.correctTurbulence();
413 phase.correctEnergyTransport();
446 return vf/vf.mesh().time().deltaT();
459 return sf/sf.mesh().time().deltaT();
phaseModelPartialList stationaryPhaseModels_
Stationary phase models.
Single incompressible phase derived from the phase-fraction. Used as part of the multiPhaseMixture fo...
const dimensionSet dimPressure
bool read(const dictionary &phaseDict)
Read base transportProperties dictionary.
static const volScalarField & localRDeltaT(const fvMesh &mesh)
Return the reciprocal of the local time-step.
tmp< surfaceScalarField > calcPhi(const phaseModelList &phaseModels) const
Calculate and return the mixture flux.
A class for handling words, derived from Foam::string.
List< Key > toc() const
The table of contents (the keys) in unsorted order.
virtual volScalarField & p()
Pressure [Pa].
surfaceTensionModelTable surfaceTensionModels_
Surface tension models.
Single incompressible phase derived from the phase-fraction. Used as part of the multiPhaseMixture fo...
A class for managing temporary objects.
tmp< volScalarField > sigma(const phasePairKey &key) const
Return the surface tension coefficient for a pair.
const dimensionSet dimDensity
phaseModelPartialList movingPhaseModels_
Moving phase models.
dictionary()
Default construct, a top-level empty dictionary.
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
psiReactionThermo & thermo
static const dimensionSet dimSigma
Coefficient dimensions.
phaseSystem(const fvMesh &mesh)
Construct from fvMesh.
virtual bool read()
Read object.
auto key(const Type &t) -> typename std::enable_if< std::is_enum< Type >::value, typename std::underlying_type< Type >::type >::type
static const surfaceScalarField & localRDeltaTf(const fvMesh &mesh)
Return the reciprocal of the local face time-step.
bool insert(const Key &key, const T &obj)
Copy insert a new entry, not overwriting existing entries.
blendingMethodTable blendingMethods_
Blending methods.
tmp< volVectorField > U() const
Mixture U.
virtual ~phaseSystem()
Destructor.
virtual tmp< volScalarField > dmdt(const phasePairKey &key) const =0
Return interfacial source mass rate per phase pair.
virtual PtrList< volScalarField > dmdts() const
Return the mass transfer rates for each phase.
#define forAllConstIter(Container, container, iter)
Iterate across all elements in the container object.
#define forAll(list, i)
Loop across all elements in list.
static tmp< GeometricField< scalar, fvPatchField, volMesh > > New(const word &name, const Mesh &mesh, const dimensionSet &ds, const word &patchFieldType=fvPatchField< scalar >::calculatedType())
Return tmp field from name, mesh, dimensions and patch type.
static bool enabled(const fvMesh &mesh)
Return true if LTS is enabled.
void correct()
Correct the phase properties.
tmp< volScalarField > trho
void resize(const label newLen)
Change the size of the list.
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
surfaceScalarField phi_
Mixture total volumetric flux.
void generatePairsAndSubModels(const word &modelName, HashTable< autoPtr< modelType >, phasePairKey, phasePairKey::hash > &models)
Generate pairs and sub-model tables.
virtual void correctKinematics()
Correct the kinematics.
const dictionary & subDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a sub-dictionary.
virtual void correct()
Correct the mixture thermos.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
phaseModelPartialList anisothermalPhaseModels_
Anisothermal phase models.
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
GeometricField< scalar, fvPatchField, volMesh > volScalarField
An ordered or unorder pair of phase names. Typically specified as follows.
virtual void correctEnergyTransport()
Correct the energy transport e.g. alphat.
static const word propertiesName
Default name of the phase properties dictionary.
virtual void solve()=0
Solve for the phase transport equations.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
Global function forwards to reuseTmpDimensionedField::New.
virtual void correctTurbulence()
Correct the turbulence.
aspectRatioModelTable aspectRatioModels_
Aspect ratio models.
const T * set(const label i) const
phaseModelTable phaseModels_
Phase models.
forAllConstIters(mixture.phases(), phase)
virtual void correctThermo()
Correct the thermodynamics.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
phasePairTable phasePairs_
Phase pairs.
Calculate the first temporal derivative.
tmp< GeometricField< Type, fvPatchField, volMesh > > ddt(const dimensioned< Type > dt, const fvMesh &mesh)
static word groupName(StringType base, const word &group)
Create dot-delimited name.group string.
bool found(const Key &key) const
Return true if hashed entry is found in table.
tmp< volScalarField > byDt(const volScalarField &vf)
virtual tmp< volScalarField > rho() const
Return the mixture density.
constant condensation/saturation model.
static autoPtr< blendingMethod > New(const word &modelName, const dictionary &dict, const wordList &phaseNames)
phaseModelPartialList multiComponentPhaseModels_
Multi-component phase models.
defineTypeNameAndDebug(combustionModel, 0)
virtual bool read()
Read base phaseProperties dictionary.
static tmp< GeometricField< Type, faePatchField, edgeMesh > > interpolate(const GeometricField< Type, faPatchField, areaMesh > &tvf, const edgeScalarField &faceFlux, Istream &schemeData)
Interpolate field onto faces using scheme given by Istream.
tmp< volScalarField > E(const phasePairKey &key) const
Return the aspect-ratio for a pair.
const dimensionSet dimless
Dimensionless.
void generatePairs(const dictTable &modelDicts)
Generate pairs.