30 #include "surfaceTensionModel.H" 31 #include "aspectRatioModel.H" 32 #include "surfaceInterpolate.H" 36 #include "dragModel.H" 37 #include "BlendedInterfacialModel.H" 75 const dictTable& modelDicts
80 const phasePairKey&
key = iter.key();
83 if (phasePairs_.found(
key))
87 else if (
key.ordered())
96 phaseModels_[
key.first()],
97 phaseModels_[
key.second()]
113 phaseModels_[
key.first()],
114 phaseModels_[
key.second()]
135 mesh.time().constant(),
137 IOobject::READ_MODIFIED,
145 phaseModels_(lookup(
"phases"), phaseModel::iNew(*this)),
147 phi_(calcPhi(phaseModels_)),
164 label movingPhasei = 0;
165 label stationaryPhasei = 0;
166 label anisothermalPhasei = 0;
167 label multiComponentPhasei = 0;
171 movingPhasei += !phase.stationary();
172 stationaryPhasei += phase.stationary();
173 anisothermalPhasei += !phase.isothermal();
174 multiComponentPhasei += !phase.pure();
182 stationaryPhasei = 0;
183 anisothermalPhasei = 0;
184 multiComponentPhasei = 0;
188 if (!phase.stationary())
192 if (phase.stationary())
196 if (!phase.isothermal())
243 auto phasei = movingPhaseModels_.cbegin();
252 if (stationaryPhaseModels_.empty())
257 phasei = movingPhaseModels_.cbegin();
271 auto phasei = movingPhaseModels_.cbegin();
280 if (stationaryPhaseModels_.empty())
285 phasei = movingPhaseModels_.cbegin();
301 if (aspectRatioModels_.found(
key))
303 return aspectRatioModels_[
key]->E();
319 if (surfaceTensionModels_.found(
key))
321 return surfaceTensionModels_[
key]->sigma();
328 reactingMultiphaseEuler::surfaceTensionModel::typeName,
"sigma" 379 bool updateDpdt =
false;
381 for (phaseModel& phase : phaseModels_)
383 phase.correctKinematics();
385 updateDpdt = updateDpdt || phase.thermo().dpdt();
400 phase.correctThermo();
409 phase.correctTurbulence();
418 phase.correctEnergyTransport();
429 for (phaseModel& phase : phaseModels_)
431 readOK &= phase.read();
451 return vf/vf.
mesh().time().deltaT();
464 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.
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.
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 word groupName(StringType base, const word &group)
Create dot-delimited name.group string.
static word scopedName(const std::string &scope, const word &name)
Create scope:name or scope_name 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 expressions::valueTypeCode::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 entries 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. Any new entries are nullptr.
const dimensionSet dimPressure
phaseModelPartialList anisothermalPhaseModels_
Anisothermal phase models.
virtual void solve()
Solve for the phase fractions.
static tmp< GeometricField< scalar, fvsPatchField, surfaceMesh > > New(const word &name, IOobjectOption::registerOption regOpt, const Mesh &mesh, const dimensionSet &dims, const word &patchFieldType=fvsPatchField< scalar >::calculatedType())
Return tmp field (NO_READ, NO_WRITE) from name, mesh, dimensions and patch type. [Takes current timeN...
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...
wordList toc() const
The table of contents (as a sorted list)
Do not request registration (bool: false)
forAllConstIters(mixture.phases(), phase)
const T * set(const label i) const
Return const pointer to element (can be nullptr), or nullptr for out-of-range access (ie...
static constexpr const zero Zero
Global zero (0)