30#include "surfaceTensionModel.H"
31#include "aspectRatioModel.H"
32#include "surfaceInterpolate.H"
37#include "BlendedInterfacialModel.H"
53 const phaseModelList& phaseModels
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()]
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();
const Mesh & mesh() const noexcept
Return const reference to mesh.
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())
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
IOdictionary(const IOobject &io, const dictionary *fallback=nullptr)
Construct given an IOobject and optional fallback dictionary content.
@ NO_REGISTER
Do not request registration (bool: false).
@ REGISTER
Request registration (bool: true).
@ NO_WRITE
Ignore writing from objectRegistry::writeObject().
@ AUTO_WRITE
Automatically write from objectRegistry::writeObject().
Defines the attributes of an object for which implicit objectRegistry management is supported,...
const Time & time() const noexcept
Return Time associated with the objectRegistry.
static word scopedName(const std::string &scope, const word &name)
Create scope:name or scope_name string.
static word groupName(StringType base, const word &group)
Create dot-delimited name.group string.
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
static autoPtr< blendingMethod > New(const word &modelName, const dictionary &dict, const wordList &phaseNames)
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.
dictionary()
Default construct, a top-level empty dictionary.
Mesh data needed to do the Finite Volume discretisation.
static const surfaceScalarField & localRDeltaTf(const fvMesh &mesh)
Return the reciprocal of the local face time-step.
static const volScalarField & localRDeltaT(const fvMesh &mesh)
Return the reciprocal of the local time-step.
static bool enabled(const fvMesh &mesh)
Return true if LTS is enabled.
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.
virtual tmp< volScalarField > dmdt(const phasePairKey &key) const
Return the mass transfer rate for a pair.
static const word propertiesName
Default name of the phase properties dictionary.
void generatePairs(const dictTable &modelDicts)
Generate pairs.
const fvMesh & mesh_
Reference to the mesh.
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.
PtrListDictionary< phaseModel > phaseModelList
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.
phasePairTable phasePairs_
Phase pairs.
surfaceScalarField phi_
Total volumetric flux.
phaseSystem(const fvMesh &mesh)
Construct from fvMesh.
virtual ~phaseSystem()
Destructor.
const fvMesh & mesh() const
Return the mesh.
tmp< volScalarField > rho() const
Return the mixture density.
IOMRFZoneList MRF_
Optional MRF zones.
volScalarField dpdt_
Rate of change of pressure.
blendingMethodTable blendingMethods_
Blending methods.
tmp< volScalarField > E(const phasePairKey &key) const
Return the aspect-ratio for a pair.
HashTable< dictionary, phasePairKey, phasePairKey::hash > dictTable
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.
T & ref() const
Return non-const reference to the contents of a non-null managed pointer.
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
Calculate the first temporal derivative.
Different types of constants.
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)
constexpr auto key(const Type &t) noexcept
Helper function to return the enum value.
const dimensionSet dimPressure
const dimensionSet dimless
Dimensionless.
tmp< volScalarField > byDt(const volScalarField &vf)
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
GeometricField< scalar, fvPatchField, volMesh > volScalarField
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
static constexpr const zero Zero
Global zero (0).
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
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.