27 #include "surfaceTensionModel.H" 28 #include "aspectRatioModel.H" 29 #include "surfaceInterpolate.H" 33 #include "dragModel.H" 34 #include "BlendedInterfacialModel.H" 50 const phaseModelList& phaseModels
53 tmp<surfaceScalarField> tmpPhi
74 const dictTable& modelDicts
79 const phasePairKey& key = iter.key();
82 if (phasePairs_.found(key))
86 else if (key.ordered())
95 phaseModels_[key.first()],
96 phaseModels_[key.second()]
112 phaseModels_[key.first()],
113 phaseModels_[key.second()]
134 mesh.time().constant(),
136 IOobject::MUST_READ_IF_MODIFIED,
143 phaseModels_(
lookup(
"phases"), phaseModel::iNew(*this)),
145 phi_(calcPhi(phaseModels_)),
162 label movingPhasei = 0;
163 label stationaryPhasei = 0;
164 label anisothermalPhasei = 0;
165 label multiComponentPhasei = 0;
168 phaseModel& phase = phaseModels_[
phasei];
169 movingPhasei += !phase.stationary();
170 stationaryPhasei += phase.stationary();
171 anisothermalPhasei += !phase.isothermal();
172 multiComponentPhasei += !phase.pure();
174 movingPhaseModels_.resize(movingPhasei);
175 stationaryPhaseModels_.resize(stationaryPhasei);
176 anisothermalPhaseModels_.resize(anisothermalPhasei);
177 multiComponentPhaseModels_.resize(multiComponentPhasei);
180 stationaryPhasei = 0;
181 anisothermalPhasei = 0;
182 multiComponentPhasei = 0;
185 phaseModel& phase = phaseModels_[
phasei];
186 if (!phase.stationary())
188 movingPhaseModels_.set(movingPhasei ++, &phase);
190 if (phase.stationary())
192 stationaryPhaseModels_.set(stationaryPhasei ++, &phase);
194 if (!phase.isothermal())
196 anisothermalPhaseModels_.set(anisothermalPhasei ++, &phase);
200 multiComponentPhaseModels_.set(multiComponentPhasei ++, &phase);
210 blendingMethods_.insert
223 generatePairsAndSubModels(
"surfaceTension", surfaceTensionModels_);
224 generatePairsAndSubModels(
"aspectRatio", aspectRatioModels_);
241 const label nMovingPhases = movingPhaseModels_.size();
243 tmp<volScalarField>
rho(movingPhaseModels_[0]*movingPhaseModels_[0].
rho());
244 for (
label movingPhasei = 1; movingPhasei < nMovingPhases; ++ movingPhasei)
247 movingPhaseModels_[movingPhasei]
248 *movingPhaseModels_[movingPhasei].rho();
251 if (stationaryPhaseModels_.empty())
257 for (
label movingPhasei = 1; movingPhasei < nMovingPhases; ++ movingPhasei)
259 alpha += movingPhaseModels_[movingPhasei];
268 const label nMovingPhases = movingPhaseModels_.size();
270 tmp<volVectorField>
U(movingPhaseModels_[0]*movingPhaseModels_[0].
U());
271 for (
label movingPhasei = 1; movingPhasei < nMovingPhases; ++ movingPhasei)
274 movingPhaseModels_[movingPhasei]
275 *movingPhaseModels_[movingPhasei].U();
278 if (stationaryPhaseModels_.empty())
284 for (
label movingPhasei = 1; movingPhasei < nMovingPhases; ++ movingPhasei)
286 alpha += movingPhaseModels_[movingPhasei];
296 if (aspectRatioModels_.found(key))
298 return aspectRatioModels_[key]->E();
304 aspectRatioModel::typeName +
":E",
315 if (surfaceTensionModels_.found(key))
317 return surfaceTensionModels_[key]->sigma();
323 surfaceTensionModel::typeName +
":sigma",
347 PtrList<volScalarField> dmdts(this->phaseModels_.size());
361 phaseModels_[
phasei].correct();
368 bool updateDpdt =
false;
372 phaseModels_[
phasei].correctKinematics();
374 updateDpdt = updateDpdt || phaseModels_[
phasei].thermo().dpdt();
389 phaseModels_[
phasei].correctThermo();
398 phaseModels_[
phasei].correctTurbulence();
407 phaseModels_[
phasei].correctEnergyTransport();
420 readOK &= phaseModels_[
phasei].read();
442 return vf/vf.
mesh().time().deltaT();
455 return sf/sf.
mesh().time().deltaT();
static const word propertiesName
Default name of the phase properties dictionary.
void generatePairs(const dictTable &modelDicts)
Generate pairs.
#define forAll(list, i)
Loop across all elements in list.
tmp< volScalarField > E(const phasePairKey &key) const
Return the aspect-ratio for a pair.
virtual void correctTurbulence()
Correct the turbulence.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
static const surfaceScalarField & localRDeltaTf(const fvMesh &mesh)
Return the reciprocal of the local face time-step.
virtual bool read()
Read object.
virtual void solve()
Solve for the phase fractions.
tmp< volScalarField > sigma(const phasePairKey &key) const
Return the surface tension coefficient for a pair.
virtual tmp< volScalarField > dmdt(const phasePairKey &key) const
Return the mass transfer rate for a pair.
rhoReactionThermo & thermo
static tmp< GeometricField< scalar, fvsPatchField, surfaceMesh > > New(const word &name, const Mesh &, const dimensionSet &, const word &patchFieldType=fvsPatchField< scalar >::calculatedType())
Return a temporary field constructed from name, mesh, dimensionSet.
tmp< GeometricField< Type, fvPatchField, volMesh > > ddt(const dimensioned< Type > dt, const fvMesh &mesh)
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Calculate the first temporal derivative.
virtual void correctKinematics()
Correct the kinematics.
stressControl lookup("compactNormalStress") >> compactNormalStress
static bool enabled(const fvMesh &mesh)
Return true if LTS is enabled.
phaseSystem(const fvMesh &mesh)
Construct from fvMesh.
A class for handling words, derived from string.
static word groupName(Name name, const word &group)
tmp< volVectorField > U() const
Return the mixture velocity.
static autoPtr< blendingMethod > New(const word &modelName, const dictionary &dict, const wordList &phaseNames)
virtual void correctThermo()
Correct the thermodynamics.
static const volScalarField & localRDeltaT(const fvMesh &mesh)
Return the reciprocal of the local time-step.
const dimensionSet dimPressure
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
virtual void correct()
Correct the fluid properties other than those listed below.
tmp< volScalarField > rho() const
Return the mixture density.
virtual PtrList< volScalarField > dmdts() const
Return the mass transfer rates for each phase.
const Mesh & mesh() const
Return mesh.
defineTypeNameAndDebug(combustionModel, 0)
word name(const complex &)
Return a string representation of a complex.
tmp< volScalarField > byDt(const volScalarField &vf)
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
virtual void correctEnergyTransport()
Correct the energy transport e.g. alphat.
tmp< surfaceScalarField > calcPhi(const phaseModelList &phaseModels) const
Calculate and return the mixture flux.
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
static const dimensionSet dimSigma
Surface tension coefficient dimensions.
virtual ~phaseSystem()
Destructor.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
virtual bool read()
Read base phaseProperties dictionary.
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
phasePairKey()
Construct null.
volScalarField alpha(IOobject("alpha", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
A class for managing temporary objects.
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField