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"
85 if (phasePairs_.found(key))
98 phaseModels_[key.first()],
115 phaseModels_[key.first()],
116 phaseModels_[key.
second()]
137 mesh.time().constant(),
139 IOobject::MUST_READ_IF_MODIFIED,
148 phi_(calcPhi(phaseModels_)),
155 mesh.time().timeName(),
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();
177 movingPhaseModels_.resize(movingPhasei);
178 stationaryPhaseModels_.resize(stationaryPhasei);
179 anisothermalPhaseModels_.resize(anisothermalPhasei);
180 multiComponentPhaseModels_.resize(multiComponentPhasei);
183 stationaryPhasei = 0;
184 anisothermalPhasei = 0;
185 multiComponentPhasei = 0;
189 if (!
phase.stationary())
191 movingPhaseModels_.set(movingPhasei ++, &
phase);
193 if (
phase.stationary())
195 stationaryPhaseModels_.set(stationaryPhasei ++, &
phase);
197 if (!
phase.isothermal())
199 anisothermalPhaseModels_.set(anisothermalPhasei ++, &
phase);
203 multiComponentPhaseModels_.set(multiComponentPhasei ++, &
phase);
208 phi_.writeOpt() = IOobject::AUTO_WRITE;
213 blendingMethods_.insert
226 generatePairsAndSubModels(
"surfaceTension", surfaceTensionModels_);
227 generatePairsAndSubModels(
"aspectRatio", aspectRatioModels_);
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();
const T & second() const noexcept
Return second element, which is also the last element.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Single incompressible phase derived from the phase-fraction. Used as part of the multiPhaseMixture fo...
const dimensionSet dimPressure
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Description for mass transfer between a pair of phases. The direction of the mass transfer is from th...
bool read(const dictionary &phaseDict)
Read base transportProperties dictionary.
static const volScalarField & localRDeltaT(const fvMesh &mesh)
Return the reciprocal of the local time-step.
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
Dimensionless.
tmp< surfaceScalarField > calcPhi(const phaseModelList &phaseModels) const
Calculate and return the mixture flux.
A class for handling words, derived from Foam::string.
virtual volScalarField & p()
Pressure [Pa].
Single incompressible phase derived from the phase-fraction. Used as part of the multiPhaseMixture fo...
A class for managing temporary objects.
virtual void solve()
Solve for the phase fractions.
tmp< volScalarField > sigma(const phasePairKey &key) const
Return the surface tension coefficient for a pair.
const dimensionSet dimDensity
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.
static const surfaceScalarField & localRDeltaTf(const fvMesh &mesh)
Return the reciprocal of the local face time-step.
tmp< volVectorField > U() const
Return the mixture velocity.
virtual ~phaseSystem()
Destructor.
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
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
word name(const complex &c)
Return string representation of complex.
const cellModel * lookup(const word &modelName)
Deprecated(2017-11) equivalent to cellModel::ptr static method.
virtual void correctKinematics()
Correct the kinematics.
virtual void correct()
Correct the fluid properties other than those listed below.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
Return a pointer to a new phase created on freestore.
virtual void correctEnergyTransport()
Correct the energy transport e.g. alphat.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
static const word propertiesName
Default name of the phase properties dictionary.
virtual tmp< volScalarField > dmdt(const phasePairKey &key) const
Return the mass transfer rate for a pair.
Mesh data needed to do the Finite Volume discretisation.
bool ordered() const
Return the ordered flag.
A HashTable similar to std::unordered_map.
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.
forAllConstIters(mixture.phases(), phase)
static word groupName(StringType name, const word &group)
Create dot-delimited name.group.
virtual void correctThermo()
Correct the thermodynamics.
Calculate the first temporal derivative.
tmp< GeometricField< Type, fvPatchField, volMesh > > ddt(const dimensioned< Type > dt, const fvMesh &mesh)
tmp< volScalarField > byDt(const volScalarField &vf)
tmp< volScalarField > rho() const
Return the mixture density.
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.
void generatePairs(const dictTable &modelDicts)
Generate pairs.