32#include "phasePairKey.H"
53 const populationBalanceModel& popBal,
57 driftModel(popBal,
dict),
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;
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
const Mesh & mesh() const noexcept
Return const reference to mesh.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
const word & name() const noexcept
Return the object name.
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.
const T & first() const noexcept
Access the first element.
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
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.
const phaseModel & phase() const
Return the phase.
Base class for drift models.
const populationBalanceModel & popBal() const
Return reference to the populationBalanceModel.
const populationBalanceModel & popBal_
Reference to the populationBalanceModel.
driftModel(const populationBalanceModel &popBal, const dictionary &dict)
Drift induced by interfacial phase change. By default phase change mass flux is distributed between s...
phaseChange(const populationBalanceModel &popBal, const dictionary &dict)
Construct from a population balance model and a dictionary.
virtual void correct()
Correct diameter independent expressions.
virtual void addToDriftRate(volScalarField &driftRate, const label i)
Add to driftRate.
Class that solves the univariate population balance equation by means of a class method (also called ...
const phaseSystem & fluid() const
Return reference to the phaseSystem.
const fvMesh & mesh() const
Return reference to the mesh.
This class represents a single sizeGroup belonging to a velocityGroup. The main property of a sizeGro...
const dimensionedScalar & d() const
Return representative diameter of the sizeGroup.
const dimensionedScalar & x() const
Return representative volume of the sizeGroup.
const phaseModel & phase() const
Return const-reference to the phase.
This diameterModel is intended for use with a populationBalanceModel in order to simulate polydispers...
const PtrList< sizeGroup > & sizeGroups() const
Return sizeGroups belonging to this velocityGroup.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
const Time & time() const
Return the top-level database.
const dimensionedScalar & rho() const
const word & name() const
Description for mass transfer between a pair of phases. The direction of the mass transfer is from th...
virtual word name() const
Pair name.
bool contains(const phaseModel &phase) const
Return true if this phasePair contains the given phase.
Class to represent a system of phases and model interfacial transfers between them.
Lookup type of boundary radiation properties.
A class for managing temporary objects.
T & ref() const
Return non-const reference to the contents of a non-null managed pointer.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
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.
static constexpr const zero Zero
Global zero (0).
dimensionedSphericalTensor inv(const dimensionedSphericalTensor &dt)
const dimensionSet dimVolume(pow3(dimLength))
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
#define forAll(list, i)
Loop across all elements in list.