34 namespace diameterModels
60 popBalName_(diameterProperties.
lookup(
"populationBalance")),
62 nGroups_(diameterProperties.
lookup<
label>(
"nGroups")),
91 if (popBalPtr_ ==
nullptr)
106 popBal().uniqueDiameters();
109 label uniquePhasei = -1;
110 forAll(uniqueDiameters, uniquePhasej)
112 if (&uniqueDiameters[uniquePhasej] ==
this)
114 uniquePhasei = uniquePhasej;
125 : uniqueDiameters[uniquePhasei - 1].iLast() + 1;
155 for (
label i = iFirst(); i <= iLast(); ++ i)
157 sumFiAbyV += popBal.
f(i)*popBal.
a(i)/popBal.
v(i);
160 return phase()*tsumFiAbyV;
178 for (
label i = iFirst(); i <= iLast(); ++ i)
180 sumFi += popBal.
f(i)();
217 for (
label i = iFirst(); i <= iLast(); ++ i)
219 sumFi +=
max(popBal.
f(i), rootVSmall);
220 sumFiAbyV +=
max(popBal.
f(i), rootVSmall)*popBal.
a(i)/popBal.
v(i);
223 d_ = 6*sumFi/tsumFiAbyV;
225 Info<<
indent << phase().
name() <<
" min/Sauter-mean/max diameter = "
226 <<
min(d_).value() <<
'/' << d_.weightedAverage(d_.mesh().V()).value()
227 <<
'/' <<
max(d_).value() <<
endl;
#define forAll(list, i)
Loop across all elements in list.
Macros for easy insertion into run-time selection tables.
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,.
Generic GeometricField class.
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,.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
virtual const fileName & name() const
Return the name of the stream.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
Abstract base-class for dispersed-phase particle diameter models.
virtual bool read()
Read diameter properties dictionary.
This diameter model computes the diameter from multiple size group diameters and fractions provided b...
virtual void correct()
Correct the model.
populationBalance(const dictionary &diameterProperties, const phaseModel &phase)
Construct from dictionary and phase.
label iFirst() const
Return the index of the first group of this phase.
virtual tmp< volScalarField > d() const
Get the diameter field.
const populationBalanceModel & popBal() const
Return the populationBalance this populationBalance belongs to.
virtual ~populationBalance()
Destructor.
virtual tmp< volScalarField > Av() const
Get the surface area per unit volume field.
tmp< volScalarField::Internal > fSum() const
...
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
const Type & lookupObject(const word &name) const
Lookup and return the object of the given Type and name.
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...
const volScalarField & f(const label i) const
Access a group fraction.
const dimensionedScalar & v(const label i) const
Access the representative volumes diameters of a group.
const phaseSystem & fluid() const
Return reference to the phaseSystem.
bool solveOnFinalIterOnly() const
Solve on final pimple iteration only.
const fvMesh & mesh() const
Return reference to the mesh.
tmp< volScalarField > a(const label i) const
Return the representative surface area of the group.
A class for managing temporary objects.
T & ref() const
Return non-const reference or generate a fatal error.
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
addNamedToRunTimeSelectionTable(diameterModel, populationBalance, dictionary, velocityGroup)
addToRunTimeSelectionTable(diameterModel, constant, dictionary)
defineTypeNameAndDebug(constant, 0)
const unitSet & lookup(const word &unitName)
Lookup and return the named unit from the table.
const dimensionSet & dimless
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.
const dimensionSet & dimLength
void inv(pointPatchField< tensor > &, const pointPatchField< tensor > &)
dimensioned< Type > min(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
Ostream & indent(Ostream &os)
Indent stream.
dimensioned< Type > max(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.