34 namespace diameterModels
45 Foam::diameterModels::velocityGroup::dsm()
const
47 tmp<volScalarField> tsumFi
56 tmp<volScalarField> tsumFiAbyV
71 const sizeGroup& fi = sizeGroups_[i];
73 sumFi +=
max(fi, rootVSmall);
74 sumFiAbyV +=
max(fi, rootVSmall)*fi.a()/fi.x();
77 return 6*sumFi/tsumFiAbyV;
82 Foam::diameterModels::velocityGroup::fSum()
const
84 tmp<volScalarField> tsumSizeGroups
98 sumSizeGroups += sizeGroups_[i];
101 return tsumSizeGroups;
105 void Foam::diameterModels::velocityGroup::scale()
107 Info<<
"Scaling sizeGroups for velocityGroup " << phase().name() <<
endl;
111 sizeGroups_[i].max(0);
118 sizeGroups_[i] /= fSum;
120 sizeGroups_[i].correctBoundaryConditions();
134 popBalName_(diameterProperties.lookup(
"populationBalance")),
138 diameterProperties.lookup(
"sizeGroups"),
181 if (popBalPtr_ ==
nullptr)
214 sumFiAbyV += fi*fi.
a()/fi.
x();
217 return phase()*tsumFiAbyV;
229 sizeGroups_[i].correct();
239 Info<< phase().name() <<
" sizeGroups-sum volume fraction, min, max = "
241 <<
' ' <<
min(fSum).value()
242 <<
' ' <<
max(fSum).value()
247 Info<< this->phase().name() <<
" Sauter mean diameter, min, max = "
248 << d_.weightedAverage(d_.mesh().V()).value()
249 <<
' ' <<
min(d_).value()
250 <<
' ' <<
max(d_).value()
#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...
const Mesh & mesh() const
Return mesh.
dimensioned< Type > weightedAverage(const DimensionedField< scalar, GeoMesh, PrimitiveField2 > &) const
Calculate and return weighted average.
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...
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
Abstract base-class for dispersed-phase particle diameter models.
const phaseModel & phase() const
Return the phase.
virtual bool read(const dictionary &phaseProperties)
Read phaseProperties dictionary.
static groups & New(const word &popBalName, const objectRegistry &db)
Lookup in the registry or construct new.
void insert(velocityGroup &group)
Insert a velocity group into the table.
Model for tracking the evolution of a dispersed phase size distribution due to coalescence (synonymou...
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.
const dictionary & solverDict() const
Return solution settings dictionary for this populationBalance.
Single size class fraction field representing a fixed particle volume as defined by the user through ...
const dimensionedScalar & x() const
Return representative volume of the sizeGroup.
const tmp< volScalarField > a() const
Return representative surface area of the sizeGroup.
Computes the Sauter mean diameter based on a user specified size distribution, defined in terms of si...
virtual void correct()
Correct the model.
const populationBalanceModel & popBal() const
Return the populationBalance this velocityGroup belongs to.
virtual bool read(const dictionary &diameterProperties)
Read diameterProperties dictionary.
virtual tmp< volScalarField > d() const
Get the diameter field.
velocityGroup(const dictionary &diameterProperties, const phaseModel &phase)
Construct from dictionary and phase.
virtual ~velocityGroup()
Destructor.
virtual tmp< volScalarField > Av() const
Get the surface area per unit volume field.
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
T lookupOrDefault(const word &, const T &, const bool writeDefault=writeOptionalEntries > 0) const
Find and return a T, if not found return the given default.
const Type & lookupObject(const word &name) const
Lookup and return the object of the given Type and name.
Helper class to manage multi-specie phase properties.
const pimpleNoLoopControl & pimple() const
Return pimpleNoLoopControl.
bool finalIter() const
Flag to indicate the final iteration.
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)
addToRunTimeSelectionTable(diameterModel, constant, dictionary)
defineTypeNameAndDebug(constant, 0)
Ostream & endl(Ostream &os)
Add newline and flush stream.
const dimensionSet dimless
const dimensionSet dimLength
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
VolField< scalar > volScalarField
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
void inv(LagrangianPatchField< tensor > &f, const LagrangianPatchField< tensor > &f1)
tmp< DimensionedField< TypeR, GeoMesh, Field > > New(const tmp< DimensionedField< TypeR, GeoMesh, Field >> &tdf1, const word &name, const dimensionSet &dimensions)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.