61 const bool registerObject
72 phase.
mesh().time().name(),
131 void Foam::populationBalanceModel::precomputeCoalescenceAndBreakup()
133 coalescenceModel_->precompute();
135 breakupModel_->precompute();
139 void Foam::populationBalanceModel::birthByCoalescence
150 phases_[j]()*fs_[j]()*phases_[
k]()*fs_[
k]()
153 for (
label i = j; i < nGroups(); i++)
157 if (Eta.value() == 0)
continue;
162 *vs_[i]/(vs_[j]*vs_[
k])*Eta*
rate*alphaFjk
167 const phaseInterface interfaceij(phases_[i], phases_[j]);
169 if (dmdtfs_.found(interfaceij))
171 dmdtfs_[interfaceij] +=
172 (interfaceij.index(phases_[i]) == 0 ? +1 : -1)
173 *vs_[j]/vjk*Sui*phases_[j].
rho();
176 const phaseInterface interfaceik(phases_[i], phases_[
k]);
178 if (dmdtfs_.found(interfaceik))
180 dmdtfs_[interfaceik] +=
181 (interfaceik.index(phases_[i]) == 0 ? +1 : -1)
182 *vs_[
k]/vjk*Sui*phases_[
k].
rho();
185 shapeModel_->addCoalescence(Sui, i, j,
k);
190 void Foam::populationBalanceModel::deathByCoalescence
197 Sp_[i] -=
rate*phases_[i]*fs_[j]*phases_[j]/vs_[j];
201 Sp_[j] -=
rate*phases_[j]*phases_[i]*fs_[i]/vs_[i];
205 void Foam::populationBalanceModel::birthByDaughterSizeDistributionBreakup
211 for (
label i = 0; i <=
k; i++)
217 *daughterSizeDistributionBreakupModel_->dsd().nik(i,
k)
222 const phaseInterface interface(phases_[i], phases_[
k]);
224 if (dmdtfs_.found(interface))
226 dmdtfs_[interface] +=
227 (interface.index(phases_[i]) == 0 ? +1 : -1)
228 *Sui*phases_[
k].
rho();
231 shapeModel_->addBreakup(Sui, i,
k);
236 void Foam::populationBalanceModel::deathByDaughterSizeDistributionBreakup
242 Sp_[i] -=
rate*phases_[i];
246 void Foam::populationBalanceModel::birthByBinaryBreakup
258 vs_[i]*binaryBreakupDeltas_[i][j]/vs_[j]*
Su
263 const phaseInterface interfaceij(phases_[i], phases_[j]);
265 if (dmdtfs_.found(interfaceij))
267 dmdtfs_[interfaceij] +=
268 (interfaceij.index(phases_[i]) == 0 ? +1 : -1)
269 *Sui*phases_[j].
rho();
272 shapeModel_->addBreakup(Sui, i, j);
281 if (Eta.value() == 0)
continue;
285 vs_[
k]*binaryBreakupDeltas_[i][j]*Eta/vs_[j]*
Su
290 const phaseInterface interfacekj(phases_[
k], phases_[j]);
292 if (dmdtfs_.found(interfacekj))
294 dmdtfs_[interfacekj] +=
295 (interfacekj.index(phases_[
k]) == 0 ? +1 : -1)
296 *Suk*phases_[j].
rho();
299 shapeModel_->addBreakup(Suk,
k, j);
304 void Foam::populationBalanceModel::deathByBinaryBreakup
311 Sp_[i] -=
rate*phases_[i]*binaryBreakupDeltas_[j][i];
315 void Foam::populationBalanceModel::computeCoalescenceAndBreakup()
317 shapeModel_->reset();
330 if (coalescenceModel_->coalesces())
332 forAll(coalescencePairs_, coalescencePairi)
334 const label i = coalescencePairs_[coalescencePairi].first();
335 const label j = coalescencePairs_[coalescencePairi].second();
337 tmp<volScalarField::Internal> trate = coalescenceModel_->rate(i, j);
339 birthByCoalescence(i, j, trate());
341 deathByCoalescence(i, j, trate());
345 if (daughterSizeDistributionBreakupModel_)
349 tmp<volScalarField::Internal> trate =
350 daughterSizeDistributionBreakupModel_->rate(i);
352 birthByDaughterSizeDistributionBreakup(i, trate());
354 deathByDaughterSizeDistributionBreakup(i, trate());
358 if (binaryBreakupModel_)
360 forAll(binaryBreakupPairs_, binaryBreakupPairi)
362 const label i = binaryBreakupPairs_[binaryBreakupPairi].first();
363 const label j = binaryBreakupPairs_[binaryBreakupPairi].second();
365 tmp<volScalarField::Internal> trate =
366 binaryBreakupModel_->rate(j, i);
368 birthByBinaryBreakup(j, i, trate());
370 deathByBinaryBreakup(j, i, trate());
376 void Foam::populationBalanceModel::precomputeExpansion()
378 forAll(uniquePhases_, uniquePhasei)
380 const phaseModel& phase = uniquePhases_[uniquePhasei];
395 Foam::populationBalanceModel::expansionSus
398 const UPtrList<volScalarField>& flds
401 auto fiFld = [&](
const label deltai)
405 ? tmp<volScalarField::Internal>(fs_[i + deltai])
406 : fs_[i + deltai]()*flds[i + deltai]();
409 Pair<tmp<volScalarField::Internal>> tSus;
414 posPart(expansionRates_[phases_[i - 1].index()])
415 *vs_[i]/(vs_[i] - vs_[i - 1])
419 if (i != nGroups() - 1)
422 -
negPart(expansionRates_[phases_[i + 1].index()])
423 *vs_[i]/(vs_[i + 1] - vs_[i])
431 void Foam::populationBalanceModel::computeExpansion()
433 forAllIter(dmdtfTable, expansionDmdtfs_, dmdtfIter)
440 label uniquePhasei = 0;
441 uniquePhasei < uniquePhases_.size() - 1;
445 const phaseModel& phase0 = uniquePhases_[uniquePhasei];
446 const phaseModel& phase1 = uniquePhases_[uniquePhasei + 1];
448 const label i0 = uniqueDiameters_[uniquePhasei].iLast();
449 const label i1 = uniqueDiameters_[uniquePhasei + 1].iFirst();
451 Pair<tmp<volScalarField::Internal>> tSus0 = expansionSus(i0);
452 Pair<tmp<volScalarField::Internal>> tSus1 = expansionSus(i1);
454 const phaseInterface interface01(phase0, phase1);
456 expansionDmdtfs_[interface01] +=
457 (interface01.index(phase0) == 0 ? -1 : +1)
458 *(- tSus0.second()*phase0.rho() + tSus1.first()*phase1.rho());
463 void Foam::populationBalanceModel::precomputeModelSources()
470 Foam::populationBalanceModel::modelSourceRhoSus
473 const UPtrList<volScalarField>& flds
478 Pair<tmp<volScalarField::Internal>> tRhoSus;
482 const label iPopBalEnd = Sui == 0 ? 0 : nGroups() - 1;
484 if (i == iPopBalEnd)
continue;
486 const label iVelGrpEnd =
487 Sui == 0 ? diameters_[i].iFirst() : diameters_[i].iLast();
489 if (i != iVelGrpEnd)
continue;
491 const label iOther = i + (Sui == 0 ? -1 : +1);
493 forAll(fluid_.fvModels(), modeli)
495 if (!isA<fvSpecificSource>(fluid_.fvModels()[modeli]))
continue;
497 const fvSpecificSource& source =
498 refCast<const fvSpecificSource>(fluid_.fvModels()[modeli]);
502 source.addsSupToField(phases_[iOther].volScalarField::name())
503 && isA<growthFvScalarFieldSource>(fldi.sources()[source.name()])
506 const growthFvScalarFieldSource& growthSource =
507 refCast<const growthFvScalarFieldSource>
509 fldi.sources()[source.name()]
514 Pair<tmp<volScalarField::Internal>> sourceCoeffs =
515 growthSource.sourceCoeffs(source);
529 void Foam::populationBalanceModel::computeModelSources()
531 forAllIter(dmdtfTable, modelSourceDmdtfs_, dmdtfIter)
536 forAll(uniquePhases_, uniquePhasei)
538 const label i0 = uniqueDiameters_[uniquePhasei].iLast();
540 if (i0 == nGroups() - 1)
continue;
542 const label i1 = i0 + 1;
544 Pair<tmp<volScalarField::Internal>> tRhoSus0 = modelSourceRhoSus(i0);
545 Pair<tmp<volScalarField::Internal>> tRhoSus1 = modelSourceRhoSus(i1);
547 const phaseInterface interface01(phases_[i0], phases_[i1]);
548 const scalar
sign = interface01.index(phases_[i0]) == 0 ? -1 : +1;
550 if (tRhoSus0.second().valid())
552 modelSourceDmdtfs_[interface01] -=
sign*tRhoSus0.second();
555 if (tRhoSus1.first().valid())
557 modelSourceDmdtfs_[interface01] -=
sign*tRhoSus1.first();
563 void Foam::populationBalanceModel::computeDilatationErrors()
565 PtrList<volScalarField::Internal> modelSourceDmdts(fluid_.phases().size());
568 const phaseInterface interface(fluid_, dmdtfIter.key());
570 addField(interface.phase1(),
"dmdt", *dmdtfIter(), modelSourceDmdts);
571 addField(interface.phase2(),
"dmdt", - *dmdtfIter(), modelSourceDmdts);
574 forAll(uniquePhases_, uniquePhasei)
576 const phaseModel& phase = uniquePhases_[uniquePhasei];
577 const diameterModels::populationBalance& diameter =
578 uniqueDiameters_[uniquePhasei];
582 dilatationErrors_.set
589 for (
label i = diameter.iFirst(); i <= diameter.iLast(); ++ i)
591 dilatationErrors_[phase.index()] -=
592 Su_[i] + expansionSu(i) + (Sp_[i] + expansionSp(i))*fs_[i];
595 if (modelSourceDmdts.set(phase.index()))
597 dilatationErrors_[phase.index()] -=
598 modelSourceDmdts[phase.index()]/
rho;
604 bool Foam::populationBalanceModel::updateSources()
606 const bool result = sourceUpdateCounter_ % sourceUpdateInterval() == 0;
608 ++ sourceUpdateCounter_;
621 ? Pair<dimensionedScalar>
628 -vs_[i-1]/(vs_[i] - vs_[i-1]),
629 1/(vs_[i] - vs_[i-1])
641 ? Pair<dimensionedScalar>
648 vs_[i+1]/(vs_[i+1] - vs_[i]),
649 -1/(vs_[i+1] - vs_[i])
661 ? Pair<dimensionedScalar>
668 -1/vs_[i-1]/(1/vs_[i] - 1/vs_[i-1]),
669 1/(1/vs_[i] - 1/vs_[i-1])
681 ? Pair<dimensionedScalar>
688 1/vs_[i+1]/(1/vs_[i+1] - 1/vs_[i]),
689 -1/(1/vs_[i+1] - 1/vs_[i])
707 fluid.
time().constant(),
712 mesh_(fluid_.
mesh()),
718 IOobject::groupName(
"alpha", typeDict().
lookup(
"continuousPhase"))
732 modelSourceDmdtfs_(),
733 expansionRates_(fluid_.phases().size()),
734 dilatationErrors_(fluid_.phases().size()),
735 shapeModel_(nullptr),
739 daughterSizeDistributionBreakupModel_(nullptr),
740 binaryBreakupModel_(nullptr),
741 binaryBreakupDeltas_(),
742 binaryBreakupPairs_(),
746 sourceUpdateCounter_(0)
762 if (!isA<diameterModels::populationBalance>(phase.
diameter()))
continue;
765 refCast<const diameterModels::populationBalance>(phase.
diameter());
769 uniquePhases_.append(&phase);
770 uniqueDiameters_.append(&diameter);
776 phases_.set(
nGroups + i, &phase);
777 diameters_.set(
nGroups + i, &diameter);
787 <<
"A population balance model requires a minimum of 3 groups but "
820 typeDict().subDict(
"sphericalDiameters")
821 )->dimensionedCoordinates();
839 forAll(uniquePhases_, uniquePhasei)
841 const phaseModel& phase = uniquePhases_[uniquePhasei];
843 uniqueDiameters_[uniquePhasei];
850 <<
": dSph = " << dSphs_[i].value()
851 <<
", min/average/max fraction = "
852 <<
min(fs_[i]()).value() <<
'/'
853 <<
average(fs_[i]()).value() <<
'/'
854 <<
max(fs_[i]()).value() <<
endl;
899 forAll(uniquePhases_, uniquePhasei)
903 label uniquePhasej = 0;
904 uniquePhasej < uniquePhasei;
910 uniquePhases_[uniquePhasei],
911 uniquePhases_[uniquePhasej]
976 using namespace populationBalance;
983 if (coalescenceModel_->coalesces())
987 for (
label j = 0; j <= i; j++)
989 coalescencePairs_.append(
labelPair(i, j));
996 if (isA<breakupModels::daughterSizeDistribution>(breakupModel_()))
998 daughterSizeDistributionBreakupModel_ =
999 &refCast<breakupModels::daughterSizeDistribution>(breakupModel_());
1001 if (isA<breakupModels::binary>(breakupModel_()))
1003 binaryBreakupModel_ =
1004 &refCast<breakupModels::binary>(breakupModel_());
1006 if (binaryBreakupModel_)
1008 binaryBreakupDeltas_.setSize(
nGroups());
1012 binaryBreakupDeltas_.set
1020 i == 0 ? vs_.first() : (vs_[i - 1] + vs_[i])/2
1024 i ==
nGroups() - 1 ? vs_.last() : (vs_[i] + vs_[i + 1])/2
1029 binaryBreakupDeltas_[i].set
1034 "binaryBreakupDelta_"
1038 vMid0 < 0.5*vs_[j] && 0.5*vs_[j] < vMid1
1039 ?
mag(0.5*vs_[j] - vMid0)
1040 : 0.5*vs_[j] < vMid0
1052 while (binaryBreakupDeltas_[j][i].value() != 0)
1054 binaryBreakupPairs_.append(
labelPair(i, j));
1062 forAll(uniquePhases_, uniquePhasei)
1066 uniqueDiameters_[uniquePhasei]
1085 return shapeModel_();
1094 return shapeModel_->a(i);
1103 return shapeModel_->d(i);
1203 if (
d.sampleQ() != 3)
1206 <<
"The volumetric allocation coefficient should be evaluated "
1207 <<
"with a volumetrically sampled distribution (i.e., sampleQ "
1208 <<
"should equal 3)"
1239 const bool isFirst = is.
first() == 0;
1246 ?
d.min()*(1 - small)
1247 : dSphs_[is.
first() - 1].value(),
1248 dSphs_[is.
first()].value(),
1249 dSphs_[is.
second()].value(),
1251 ?
d.max()*(1 + small)
1252 : dSphs_[is.
second() + 1].value()
1260 d.integralPDFxPow(
dSphs, 0,
true)
1264 d.integralPDFxPow(
dSphs, -3,
true)
1283 etaVCoeffs0.
first().value()
1284 *(integralPDFs[1] - integralPDFs[0])
1285 + etaVCoeffs0.
second().value()
1286 *(integralPDFByVs[1] - integralPDFByVs[0])
1287 + integralPDFs[2] - integralPDFs[1]
1288 + etaVCoeffs1.
first().value()
1289 *(integralPDFs[3] - integralPDFs[2])
1290 + etaVCoeffs1.
second().value()
1291 *(integralPDFByVs[3] - integralPDFByVs[2]);
1301 const label i0 = diameters_[i].iFirst();
1302 const label iNm1 = diameters_[i].iLast();
1316 max(groupIntegralPDFetaV, dimlessRootVSmall/diameters_[i].
nGroups())
1317 /
max(phaseIntegralPDFetaV, dimlessRootVSmall);
1347 continuousPhase_.
name()
1384 expansionRates_[phases_[i].index()];
1394 tSp =
negPart(expansionRate)*vs_[i]/(vs_[i] - vs_[i - 1]);
1399 tSp.
ref() -=
posPart(expansionRate)*vs_[i]/(vs_[i + 1] - vs_[i]);
1426 tRhoSus.
first().valid() && tRhoSus.
second().valid()
1428 : tRhoSus.
first().valid() ? tRhoSus.
first()/phases_[i].rho()
1429 : tRhoSus.
second().valid() ? tRhoSus.
second()/phases_[i].rho()
1446 const bool updateSrc = updateSources();
1448 if (nCorr > 0 && updateSrc)
1450 precomputeCoalescenceAndBreakup();
1452 precomputeExpansion();
1453 precomputeModelSources();
1456 scalar maxInitialResidual = 1;
1457 while (++iCorr <= nCorr && maxInitialResidual > tolerance)
1459 Info<<
"populationBalance " << this->
name()
1460 <<
": Iteration " << iCorr <<
endl;
1464 computeCoalescenceAndBreakup();
1467 computeModelSources();
1469 computeDilatationErrors();
1471 maxInitialResidual = 0;
1484 +
fvm::Sp(-(1 - small)*dilatationErrors_[phase.
index()], fi)
1506 maxInitialResidual =
max
1508 fiEqn.
solve().initialResidual(),
1519 Info<<
"populationBalance " << this->
name() <<
": Group fraction "
1523 if (
solverDict().lookupOrDefault<Switch>(
"scale",
true))
1525 Info<<
"populationBalance " << this->
name()
1526 <<
": Scaling group fractions " <<
endl;
1533 forAll(uniquePhases_, uniquePhasei)
1536 uniqueDiameters_[uniquePhasei];
1542 fs_[i].internalFieldRef() /= fSum;
1544 fs_[i].correctBoundaryConditions();
1550 forAll(uniquePhases_, uniquePhasei)
1553 uniqueDiameters_[uniquePhasei];
1558 <<
": Group fraction sum min/average/max = "
1559 <<
min(fSum).value() <<
'/'
1565 shapeModel_->solve();
1571 shapeModel_->correct();
1573 if (uniquePhases_.size() <= 1)
return;
1576 if (alphas_.empty())
1600 forAll(uniquePhases_, uniquePhasei)
1605 uniquePhases_[uniquePhasei],
1606 uniquePhases_[uniquePhasei].residualAlpha()
1622 forAll(uniquePhases_, uniquePhasei)
1627 uniquePhases_[uniquePhasei],
1628 uniquePhases_[uniquePhasei].residualAlpha()
1631 /uniquePhases_[uniquePhasei].d();
1682 forAll(uniquePhases_, uniquePhasei)
1687 uniquePhases_[uniquePhasei],
1688 uniquePhases_[uniquePhasei].residualAlpha()
1691 *uniquePhases_[uniquePhasei].U();
#define forAll(list, i)
Loop across all elements in list.
#define forAllIter(Container, container, iter)
Iterate across all elements in the container object of type.
#define forAllConstIter(Container, container, iter)
Iterate across all elements in the container object of type.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
static tmp< DimensionedField< Type, GeoMesh, PrimitiveField > > New(const word &name, const GeoMesh &mesh, const dimensionSet &, const PrimitiveField< Type > &)
Return a temporary field constructed from name, mesh,.
dimensioned< Type > weightedAverage(const DimensionedField< scalar, GeoMesh, PrimitiveField2 > &) const
Calculate and return weighted average.
const GeoMesh & mesh() const
Return mesh.
Generic GeometricField class.
DimensionedField< Type, GeoMesh, PrimitiveField > Internal
Type of the internal field from which this GeometricField is derived.
static tmp< GeometricField< Type, GeoMesh, PrimitiveField > > New(const word &name, const Internal &, const PtrList< Patch > &, const HashPtrTable< Source > &=HashPtrTable< Source >())
Return a temporary field constructed from name,.
bool insert(const Key &, const T &newElmt)
Insert a new hashedEntry.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
const Time & time() const
Return time.
readOption
Enumeration defining the read options.
bool & registerObject()
Register object created from this IOobject with registry if true.
IOobject(const word &name, const fileName &instance, const objectRegistry ®istry, readOption r=NO_READ, writeOption w=NO_WRITE, bool registerObject=true)
Construct from name, instance, registry, io options.
const word & name() const
Return name.
static word groupName(Name name, const word &group)
writeOption
Enumeration defining the write options.
bool good() const
Return true if next operation might succeed.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
An ordered pair of two objects of type <Type> with first() and second() elements.
const Type & second() const
Return second.
const Type & first() const
Return first.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
bool empty() const
Return true if the UPtrList is empty (ie, size() is zero)
const phaseModel & phase() const
Return the phase.
This diameter model computes the diameter from multiple size group diameters and fractions provided b...
label iLast() const
Return the index of the last group of this phase.
label iFirst() const
Return the index of the first group of this phase.
label nGroups() const
Return the number of groups in this phase.
const word & popBalName() const
Return name of populationBalance this populationBalance belongs to.
tmp< volScalarField::Internal > fSum() const
...
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
const dictionary & subDict(const word &) const
Find and return a sub-dictionary.
ITstream & lookupBackwardsCompatible(const wordList &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream, trying a list of keywords.
const dictionary & optionalTypeDict(const word &typeName) const
Find and return an optional type sub-dictionary.
const word & name() const
Return const reference to name.
Base class for statistical distributions.
bool constrain(fvMatrix< Type > &eqn) const
Apply constraints to an equation.
A special matrix type and solver, designed for finite volume solutions of scalar equations....
void relax(const scalar alpha)
Relax matrix (for steady-state solution).
SolverPerformance< Type > solve(const dictionary &)
Solve segregated or coupled returning the solution statistics.
tmp< fvMatrix< Type > > source(const VolField< Type > &field) const
Return source for an equation.
const Type & lookupType(const word &group=word::null) const
Lookup and return the object of the given Type.
static autoPtr< oneDimensionalDiscretisation > New(const word &name, const dimensionSet &dims, const label n, const dictionary &dict)
Selector.
Templated abstract base class for multiphase compressible momentum transport models.
Class to represent an interface between phases. Derivations can further specify the configuration of ...
virtual word name() const
Name.
tmp< volScalarField > sigma() const
Surface tension coefficient.
const dimensionedScalar & residualAlpha() const
Return the residual phase-fraction for given phase.
const diameterModel & diameter() const
Return a reference to the diameterModel of the phase.
label index() const
Return the index of the phase.
const word & name() const
Return the name of this phase.
virtual const volScalarField & rho() const =0
Return the density field.
virtual tmp< surfaceScalarField > alphaPhi() const =0
Return the volumetric flux of the phase.
Class to represent a system of phases.
Foam::fvModels & fvModels(fvMesh &mesh)
Access the fvModels.
Foam::fvConstraints & fvConstraints(fvMesh &mesh)
Access the fvConstraints.
const phaseModelList & phases() const
Return the phase models.
const pimpleNoLoopControl & pimple() const
Return pimpleNoLoopControl.
bool finalIter() const
Flag to indicate the final iteration.
Model for tracking the evolution of a dispersed phase size distribution due to coalescence (synonymou...
tmp< volScalarField::Internal > Sp(const label i) const
Return the implicit coalescence and breakup source term.
const dimensionedScalar & v(const label i) const
Access the representative volumes diameters of a group.
const PtrList< dimensionedScalar > & dSphs() const
Access the representative spherical diameters of the groups.
const phaseSystem & fluid() const
Return reference to the phaseSystem.
bool writeData(Ostream &) const
Dummy write for regIOobject.
void correct()
Correct derived quantities.
bool solveOnFinalIterOnly() const
Solve on final pimple iteration only.
populationBalanceModel(const phaseSystem &fluid, const word &name)
Construct for a fluid and with a given name.
tmp< volScalarField::Internal > expansionSp(const label i) const
Return the implicit expansion source term.
tmp< volScalarField::Internal > expansionSu(const label i, const UPtrList< volScalarField > &flds=UPtrList< volScalarField >()) const
Return the explicit expansion source term.
dimensionedScalar eta(const label i, const dimensionedScalar &v) const
Return the number allocation coefficient for a single volume.
label nGroups() const
Return the number of groups in the population balance.
tmp< volScalarField::Internal > modelSourceSu(const label i, const UPtrList< volScalarField > &flds=UPtrList< volScalarField >()) const
Return the explicit model source source term.
static tmp< volScalarField > groupField(const word &name, const label i, const phaseModel &phase)
Read and return a group-associated field.
dimensionedScalar etaV(const label i, const dimensionedScalar &v) const
Return the volume allocation coefficient for a single volume.
const populationBalance::shapeModel & shape() const
Access the shape model.
static IOobject groupFieldIo(const word &name, const label i, const phaseModel &phase, const IOobject::readOption r=IOobject::NO_READ, const IOobject::writeOption w=IOobject::NO_WRITE, const bool registerObject=true)
Return IO for a group-associated field.
const tmp< volScalarField > sigmaWithContinuousPhase(const phaseModel &dispersedPhase) const
Return the surface tension coefficient between a given dispersed.
const fvMesh & mesh() const
Return reference to the mesh.
tmp< volScalarField > d(const label i) const
Return the representative diameter of the group.
const phaseCompressibleMomentumTransportModel & continuousTurbulence() const
Return reference to momentumTransport model of the continuous phase.
tmp< volScalarField > a(const label i) const
Return the representative surface area of the group.
virtual ~populationBalanceModel()
Destructor.
void solve()
Solve the population balance equation.
const dictionary & solverDict() const
Return solution settings dictionary for this populationBalance.
Base class for modelling the shape of the particles belonging to a size class through alternative dia...
Enables the printing of a dictionary and subsequently looked-up defaulted entries.
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
A class for managing temporary objects.
T & ref() const
Return non-const reference or generate a fatal error.
Templated form of IOobject providing type information for file reading and header type checking.
bool headerOk()
Read header (uses typeGlobalFile to find file) and check.
Template function which returns the un-mangled name of a given type. Useful for types which do not ha...
A class for handling words, derived from string.
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Calculate the first temporal derivative.
Calculate the divergence of the given field.
Calculate the matrix for the first temporal derivative.
Calculate the matrix for the divergence of the given field and flux.
Calculate the matrix for implicit and explicit sources.
volScalarField alpha(IOobject("alpha", runTime.name(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
tmp< VolField< Type > > ddt(const dimensioned< Type > dt, const fvMesh &mesh)
tmp< VolField< Type > > Su(const VolField< Type > &su, const VolField< Type > &vf)
tmp< VolField< Type > > div(const SurfaceField< Type > &ssf)
tmp< fvMatrix< Type > > S(const Pair< tmp< volScalarField::Internal >> &, const VolField< Type > &)
tmp< fvMatrix< Type > > div(const surfaceScalarField &flux, const VolField< Type > &vf, const word &name)
tmp< fvMatrix< Type > > Sp(const volScalarField::Internal &, const VolField< Type > &)
tmp< fvMatrix< Type > > SuSp(const volScalarField::Internal &, const VolField< Type > &)
tmp< fvMatrix< Type > > ddt(const VolField< Type > &vf)
const unitSet & lookup(const word &unitName)
Lookup and return the named unit from the table.
errorManipArg< error, int > exit(error &err, const int errNo=1)
Pair< label > labelPair
Label pair.
const dimensionSet & dimless
Ostream & decrIndent(Ostream &os)
Decrement the indent level.
dimensionedScalar sign(const dimensionedScalar &ds)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Ostream & endl(Ostream &os)
Add newline and flush stream.
void addField(const label phasei, const word &name, tmp< GeoField > field, PtrList< GeoField > &fieldList)
const dimensionSet & dimLength
dimensioned< Type > average(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
const dimensionSet & dimVolume
Ostream & incrIndent(Ostream &os)
Increment the indent level.
dimensionedScalar negPart(const dimensionedScalar &ds)
const dimensionSet & dimVelocity
void inv(pointPatchField< tensor > &, const pointPatchField< tensor > &)
const dimensionSet & dimTime
VolField< scalar > volScalarField
dimensioned< Type > min(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
const dimensionSet & dimDensity
word typedName(Name name)
Return the name of the object within the given type.
tmp< fvMatrix< Type > > correction(const fvMatrix< Type > &)
Return the correction form of the given matrix.
void pow3(LagrangianPatchField< scalar > &f, const LagrangianPatchField< scalar > &f1)
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
Ostream & indentOrNl(Ostream &os)
Indent stream or add newline if indent level == 0.
tmp< DimensionedField< scalar, GeoMesh, Field > > mag(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
defineTypeNameAndDebug(atmosphericBoundaryLayer, 0)
Ostream & indent(Ostream &os)
Indent stream.
tmp< DimensionedField< TypeR, GeoMesh, Field > > New(const tmp< DimensionedField< TypeR, GeoMesh, Field >> &tdf1, const word &name, const dimensionSet &dimensions)
dimensionedScalar posPart(const dimensionedScalar &ds)
dimensioned< Type > max(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.