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();
302 return tmp<volScalarField>
308 aspectRatioModel::typeName +
":E",
309 this->mesh_.time().timeName(),
326 if (surfaceTensionModels_.found(key))
328 return surfaceTensionModels_[key]->sigma();
332 return tmp<volScalarField>
338 surfaceTensionModel::typeName +
":sigma",
339 this->mesh_.time().timeName(),
358 return tmp<volScalarField>
365 this->mesh_.time().timeName(),
377 PtrList<volScalarField> dmdts(this->phaseModels_.size());
391 phaseModels_[
phasei].correct();
398 bool updateDpdt =
false;
402 phaseModels_[
phasei].correctKinematics();
404 updateDpdt = updateDpdt || phaseModels_[
phasei].thermo().dpdt();
419 phaseModels_[
phasei].correctThermo();
428 phaseModels_[
phasei].correctTurbulence();
437 phaseModels_[
phasei].correctEnergyTransport();
450 readOK &= phaseModels_[
phasei].read();
472 return vf/vf.
mesh().time().deltaT();
485 return sf/sf.
mesh().time().deltaT();
A simple container for copying or transferring objects of type <T>.
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
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.
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.
virtual bool read()
Read base phaseProperties dictionary.
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
phasePairKey()
Construct null.
A class for managing temporary objects.
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
virtual Xfer< PtrList< volScalarField > > dmdts() const
Return the mass transfer rates for each phase.