26 #include "phaseChange.H" 29 #include "phasePairKey.H" 35 namespace diameterModels
50 const populationBalanceModel& popBal,
51 const dictionary& dict
54 driftModel(popBal, dict),
55 pairKeys_(dict.
lookup(
"pairs")),
56 numberWeighted_(dict.lookupOrDefault<Switch>(
"numberWeighted", false)),
63 const phasePair& pair = fluid.phasePairs()[pairKeys_[i]];
101 if (fluid.phasePairs().found(pairKeys_[k]))
103 const phasePair& pair = fluid.phasePairs()[pairKeys_[
k]];
108 if (pair.contains(vgj.phase()))
110 forAll(vgj.sizeGroups(), i)
112 const sizeGroup& fi = vgj.sizeGroups()[i];
115 fi*
max(fi.phase(), small)
116 /(numberWeighted_ ? fi.x() : fi.d());
135 const phasePair& pair =
138 if (pair.contains(vg.phase()))
146 const scalar iDmdtSign =
147 vg.phase().name() == pair.first() ? +1 : -1;
151 tmp<volScalarField> dDriftRate
153 iDmdtSign*iDmdt/(fi.phase().rho()*W_[
k])
156 if (!numberWeighted_)
158 dDriftRate.ref() *= fi.x()/fi.d();
161 driftRate += dDriftRate;
#define forAll(list, i)
Loop across all elements in list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
virtual void addToDriftRate(volScalarField &driftRate, const label i)
Add to driftRate.
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
dimensionedSphericalTensor inv(const dimensionedSphericalTensor &dt)
virtual void correct()
Correct diameter independent expressions.
const populationBalanceModel & popBal_
Reference to the populationBalanceModel.
static word timeName(const scalar, const int precision=precision_)
Return time name of given scalar time.
label k
Boltzmann constant.
const Time & time() const
Return the top-level database.
const Type & lookupObject(const word &name) const
Lookup and return the object of the given Type.
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.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
const phasePairTable & phasePairs() const
Return the phase pairs.
const dimensionSet dimVolume(pow3(dimLength))
const UPtrList< velocityGroup > & velocityGroups() const
Return the velocityGroups belonging to this populationBalance.
stressControl lookup("compactNormalStress") >> compactNormalStress
const phaseSystem & fluid() const
Return reference to the phaseSystem.
static word groupName(Name name, const word &group)
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
defineTypeNameAndDebug(combustionModel, 0)
const UPtrList< sizeGroup > & sizeGroups() const
Return the sizeGroups belonging to this populationBalance.
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
const fvMesh & mesh() const
Return reference to the mesh.