39 namespace diameterModels
57 tmp<volScalarField> tInvDsm
71 const sizeGroup& fi = sizeGroups_[i];
81 Foam::diameterModels::velocityGroup::fSum()
const 83 tmp<volScalarField> tsumSizeGroups
97 sumSizeGroups += sizeGroups_[i];
100 return tsumSizeGroups;
104 void Foam::diameterModels::velocityGroup::renormalize()
106 Info<<
"Renormalizing sizeGroups for velocityGroup " 113 sizeGroups_[i] *=
pos(sizeGroups_[i]);
118 sizeGroups_[i] /= fSum_;
124 Foam::diameterModels::velocityGroup::mvconvection()
const 132 phase_.alphaRhoPhi(),
133 phase_.mesh().divScheme
135 "div(" + phase_.alphaRhoPhi()().
name() +
",f)" 153 popBalName_(diameterProperties.
lookup(
"populationBalance")),
174 formFactor_(
"formFactor",
dimless, diameterProperties),
177 diameterProperties.
lookup(
"sizeGroups"),
227 "renormalizeAtRestart",
246 ||
mag(1 -
max(fSum_).value()) >= 1
e-5
247 ||
mag(1 -
min(fSum_).value()) >= 1
e-5
251 <<
" Initial values of the sizeGroups belonging to velocityGroup " 253 <<
" must add to" <<
nl <<
" unity. This condition might be" 254 <<
" violated due to wrong entries in the" <<
nl 255 <<
" velocityGroupCoeffs subdictionary or bad initial conditions in" 256 <<
" the startTime" <<
nl 257 <<
" directory. The sizeGroups can be renormalized at every" 258 <<
" timestep or at restart" <<
nl 259 <<
" only by setting the corresponding switch renormalize or" 260 <<
" renormalizeAtRestart" <<
nl 261 <<
" in the fvSolution subdictionary " << popBalName_ <<
"." 262 <<
" Note that boundary conditions are not" <<
nl <<
"renormalized." 268 fields_.add(sizeGroups_[i]);
286 mvConvection_ = mvconvection();
294 Info<< this->phase().
name() <<
" Sauter mean diameter, min, max = " 295 << d_.weightedAverage(d_.mesh().V()).value()
296 <<
' ' <<
min(d_).value()
297 <<
' ' <<
max(d_).value()
302 Info<< phase_.name() <<
" sizeGroups-sum volume fraction, min, max = " 303 << fSum_.weightedAverage(phase_.mesh().V()).value()
304 <<
' ' <<
min(fSum_).value()
305 <<
' ' <<
max(fSum_).value()
310 phase_.mesh().solverDict(popBalName_).getOrDefault<
Switch>
addToRunTimeSelectionTable(diameterModel, constant, dictionary)
errorManipArg< error, int > exit(error &err, const int errNo=1)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
virtual bool read(const dictionary &phaseProperties)=0
Read phaseProperties dictionary.
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
A list of keyword definitions, which are a keyword followed by a number of values (eg...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Helper class to manage multi-specie phase properties.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
virtual ~velocityGroup()
Destructor.
dimensionedSphericalTensor inv(const dimensionedSphericalTensor &dt)
constexpr char nl
The newline '\n' character (0x0a)
Ostream & endl(Ostream &os)
Add newline and flush stream.
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.
defineTypeNameAndDebug(constant, 0)
const dimensionSet dimless
Dimensionless.
Lookup type of boundary radiation properties.
velocityGroup(const dictionary &diameterProperties, const phaseModel &phase)
Construct from components.
Macros for easy insertion into run-time selection tables.
#define forAll(list, i)
Loop across all elements in list.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
dimensionedScalar pos(const dimensionedScalar &ds)
const dimensionedScalar e
Elementary charge.
const phaseModel & phase() const
Return the phase.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
This class represents a single sizeGroup belonging to a velocityGroup. The main property of a sizeGro...
Abstract base-class for dispersed-phase particle diameter models.
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
const Mesh & mesh() const noexcept
Return mesh.
const dimensionSet dimDensity
virtual bool read(const dictionary &diameterProperties)
Read diameterProperties dictionary.
void preSolve()
Corrections before populationBalanceModel::solve()
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
void postSolve()
Corrections after populationBalanceModel::solve()
tmp< fv::convectionScheme< scalar > > mvConvection(fv::convectionScheme< scalar >::New(mesh, fields, phi, mesh.divScheme("div(phi,Yi_h)")))
static tmp< convectionScheme< Type > > New(const fvMesh &mesh, const surfaceScalarField &faceFlux, Istream &schemeData)
Return a pointer to a new convectionScheme created on freestore.
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
Single incompressible phase derived from the phase-fraction. Used as part of the multiPhaseMixture fo...
const word & name() const
virtual tmp< volScalarField > d() const
Return the Sauter-mean diameter.
messageStream Info
Information stream (stdout output on master, null elsewhere)
Internal & ref(const bool updateAccessTime=true)
Same as internalFieldRef()
dimensioned< Type > weightedAverage(const DimensionedField< scalar, GeoMesh > &weightField) const
Calculate and return weighted average.
A class for managing temporary objects.
static tmp< GeometricField< scalar, fvPatchField, volMesh > > New(const word &name, const Mesh &mesh, const dimensionSet &dims, const word &patchFieldType=fvPatchField< scalar >::calculatedType())
Return tmp field from name, mesh, dimensions and patch type.
Defines the attributes of an object for which implicit objectRegistry management is supported...
Single incompressible phase derived from the phase-fraction. Used as part of the multiPhaseMixture fo...
const phaseModel & phase_