30 #include "surfaceTensionModel.H" 31 #include "aspectRatioModel.H" 32 #include "surfaceInterpolate.H" 36 #include "dragModel.H" 37 #include "BlendedInterfacialModel.H" 77 const dictTable& modelDicts
82 const phasePairKey&
key = iter.key();
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()]
137 mesh.time().constant(),
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 reactingMultiphaseEuler::surfaceTensionModel::typeName +
":sigma",
343 const phasePairKey&
key 378 bool updateDpdt =
false;
380 for (phaseModel& phase : phaseModels_)
382 phase.correctKinematics();
384 updateDpdt = updateDpdt || phase.thermo().dpdt();
399 phase.correctThermo();
408 phase.correctTurbulence();
417 phase.correctEnergyTransport();
428 for (phaseModel& phase : phaseModels_)
430 readOK &= phase.read();
450 return vf/vf.
mesh().time().deltaT();
463 return sf/sf.
mesh().time().deltaT();
virtual void correctKinematics()
Correct the kinematics.
virtual void correctEnergyTransport()
Correct the energy transport e.g. alphat.
void generatePairs(const dictTable &modelDicts)
Generate pairs.
surfaceTensionModelTable surfaceTensionModels_
Surface tension models.
static const surfaceScalarField & localRDeltaTf(const fvMesh &mesh)
Return the reciprocal of the local face time-step.
virtual bool read()
Read object.
virtual tmp< volScalarField > dmdt(const phasePairKey &key) const
Return the mass transfer rate for a pair.
tmp< volScalarField > trho
phaseModelPartialList stationaryPhaseModels_
Stationary phase models.
wordList toc() const
Return the table of contents (as a sorted list)
const dimensionSet dimless
Dimensionless.
void correct()
Correct the phase properties.
#define forAllConstIter(Container, container, iter)
Iterate across all elements in the container object.
const dictionary & subDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a sub-dictionary.
phaseModelList phaseModels_
Phase models.
const T * set(const label i) const
Return const pointer to element (can be nullptr), or nullptr for out-of-range access (ie...
virtual void correctTurbulence()
Correct the turbulence.
phaseModelPartialList multiComponentPhaseModels_
Multi-component phase models.
#define forAll(list, i)
Loop across all elements in list.
virtual volScalarField & p()
Pressure [Pa].
tmp< GeometricField< Type, fvPatchField, volMesh > > ddt(const dimensioned< Type > dt, const fvMesh &mesh)
dictionary()
Default construct, a top-level empty dictionary.
tmp< volScalarField > rho() const
Return the mixture density.
virtual void correctThermo()
Correct the thermodynamics.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
bool insert(const Key &key, const T &obj)
Copy insert a new entry, not overwriting existing entries.
Calculate the first temporal derivative.
psiReactionThermo & thermo
tmp< volScalarField > sigma(const phasePairKey &key) const
Return the surface tension coefficient for a pair.
static tmp< GeometricField< scalar, fvsPatchField, surfaceMesh > > New(const word &name, const Mesh &mesh, const dimensionSet &ds, const word &patchFieldType=fvsPatchField< scalar >::calculatedType())
Return tmp field from name, mesh, dimensions and patch type.
static word groupName(StringType base, const word &group)
Create dot-delimited name.group string.
writeOption writeOpt() const noexcept
Get the write option.
static bool enabled(const fvMesh &mesh)
Return true if LTS is enabled.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
phaseSystem(const fvMesh &mesh)
Construct from fvMesh.
static autoPtr< blendingMethod > New(const word &modelName, const dictionary &dict, const wordList &phaseNames)
virtual bool read()
Read base phaseProperties dictionary.
A class for handling words, derived from Foam::string.
label size() const noexcept
The number of elements in the list.
tmp< volScalarField > E(const phasePairKey &key) const
Return the aspect-ratio for a pair.
tmp< volScalarField > byDt(const volScalarField &vf)
static const volScalarField & localRDeltaT(const fvMesh &mesh)
Return the reciprocal of the local time-step.
void resize(const label newLen)
Change the size of the list.
const dimensionSet dimPressure
phaseModelPartialList anisothermalPhaseModels_
Anisothermal phase models.
virtual void solve()
Solve for the phase fractions.
An ordered or unorder pair of phase names. Typically specified as follows.
phaseModelPartialList movingPhaseModels_
Moving phase models.
const Mesh & mesh() const noexcept
Return mesh.
aspectRatioModelTable aspectRatioModels_
Aspect ratio models.
defineTypeNameAndDebug(combustionModel, 0)
static const dimensionSet dimSigma
Coefficient dimensions.
static const word propertiesName
Default name of the phase properties dictionary.
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.
const dimensionSet dimDensity
void generatePairsAndSubModels(const word &modelName, HashTable< autoPtr< modelType >, phasePairKey, phasePairKey::hash > &models)
Generate pairs and sub-model tables.
const surfaceScalarField & phi() const
Return the mixture flux.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
auto key(const Type &t) -> typename std::enable_if< std::is_enum< Type >::value, typename std::underlying_type< Type >::type >::type
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers...
virtual void correct()
Correct the fluid properties other than those listed below.
blendingMethodTable blendingMethods_
Blending methods.
Automatically write from objectRegistry::writeObject()
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
tmp< volVectorField > U() const
Return the mixture velocity.
tmp< surfaceScalarField > calcPhi(const phaseModelList &phaseModels) const
Calculate and return the mixture flux.
Single incompressible phase derived from the phase-fraction. Used as part of the multiPhaseMixture fo...
virtual ~phaseSystem()
Destructor.
virtual PtrList< volScalarField > dmdts() const
Return the mass transfer rates for each phase.
surfaceScalarField phi_
Total volumetric flux.
A class for managing temporary objects.
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
Single incompressible phase derived from the phase-fraction. Used as part of the multiPhaseMixture fo...
forAllConstIters(mixture.phases(), phase)