32 #include "phasePairKey.H" 38 namespace diameterModels
59 numberWeighted_(
dict.getOrDefault<
Switch>(
"numberWeighted", false)),
104 if (
fluid.phasePairs().found(pairKeys_[
k]))
108 forAll(popBal_.velocityGroups(), j)
110 const velocityGroup& vgj = popBal_.velocityGroups()[j];
113 forAll(vgj.sizeGroups(), i)
115 const sizeGroup& fi = vgj.sizeGroups()[i];
118 fi*
max(fi.phase(), SMALL)
119 /(numberWeighted_ ? fi.x() : fi.d());
134 const velocityGroup& vg = popBal_.sizeGroups()[i].VelocityGroup();
138 const phasePair& pair =
139 popBal_.fluid().phasePairs()[pairKeys_[
k]];
141 if (pair.contains(vg.phase()))
149 const scalar iDmdtSign =
150 vg.phase().name() == pair.first() ? +1 : -1;
152 const sizeGroup& fi = popBal_.sizeGroups()[i];
154 tmp<volScalarField> dDriftRate
156 iDmdtSign*iDmdt/(fi.phase().rho()*W_[
k])
159 if (!numberWeighted_)
161 dDriftRate.ref() *= fi.x()/fi.d();
164 driftRate += dDriftRate;
Base class for drift models.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Class that solves the univariate population balance equation by means of a class method (also called ...
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
dimensionedSphericalTensor inv(const dimensionedSphericalTensor &dt)
const populationBalanceModel & popBal_
Reference to the populationBalanceModel.
A simple wrapper around bool so that it can be read as a word: true/false, on/off, yes/no, any/none. Also accepts 0/1 as a string and shortcuts t/f, y/n.
label k
Boltzmann constant.
const Time & time() const
Return the top-level database.
Lookup type of boundary radiation properties.
Macros for easy insertion into run-time selection tables.
phaseChange(const populationBalanceModel &popBal, const dictionary &dict)
Construct from a population balance model and a dictionary.
#define forAll(list, i)
Loop across all elements in list.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
const dimensionSet dimVolume(pow3(dimLength))
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.
Class to represent a system of phases and model interfacial transfers between them.
const phaseSystem & fluid() const
Return reference to the phaseSystem.
const Mesh & mesh() const noexcept
Return mesh.
virtual void addToDriftRate(volScalarField &driftRate, const label i)
Add to driftRate.
static word timeName(const scalar t, const int precision=precision_)
Return a time name for the given scalar time value formatted with the given precision.
virtual word name() const
Pair name.
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
virtual void correct()
Correct diameter independent expressions.
bool contains(const phaseModel &phase) const
Return true if this phasePair contains the given phase.
const fvMesh & mesh() const
Return reference to the mesh.
Defines the attributes of an object for which implicit objectRegistry management is supported...
addToRunTimeSelectionTable(driftModel, constantDrift, dictionary)
Description for mass transfer between a pair of phases. The direction of the mass transfer is from th...
defineTypeNameAndDebug(constantDrift, 0)
static constexpr const zero Zero
Global zero (0)