36 namespace diameterModels
54 tmp<volScalarField> tInvDsm
68 const sizeGroup& fi = sizeGroups_[i];
78 Foam::diameterModels::velocityGroup::fSum()
const 80 tmp<volScalarField> tsumSizeGroups
94 sumSizeGroups += sizeGroups_[i];
97 return tsumSizeGroups;
101 void Foam::diameterModels::velocityGroup::renormalize()
103 Info<<
"Renormalizing sizeGroups for velocityGroup " 110 sizeGroups_[i] *=
pos(sizeGroups_[i]);
115 sizeGroups_[i] /= fSum_;
121 Foam::diameterModels::velocityGroup::mvconvection()
const 129 phase_.alphaRhoPhi(),
130 phase_.mesh().divScheme
132 "div(" + phase_.alphaRhoPhi()().
name() +
",f)" 145 const dictionary& diameterProperties,
146 const phaseModel& phase
149 diameterModel(diameterProperties, phase),
150 popBalName_(diameterProperties.
lookup(
"populationBalance")),
171 formFactor_(
"formFactor",
dimless, diameterProperties),
174 diameterProperties.
lookup(
"sizeGroups"),
175 sizeGroup::iNew(phase, *this)
199 IOobject::groupName(
"d", phase.
name()),
212 IOobject::groupName(
"source", phase.
name()),
222 phase_.
mesh().solverDict(popBalName_).lookupOrDefault<Switch>
224 "renormalizeAtRestart",
228 phase_.
mesh().solverDict(popBalName_).lookupOrDefault<Switch>
242 mag(1 - fSum_.weightedAverage(fSum_.mesh().V()).value()) >= 1
e-5
243 ||
mag(1 -
max(fSum_).value()) >= 1
e-5
244 ||
mag(1 -
min(fSum_).value()) >= 1
e-5
248 <<
" Initial values of the sizeGroups belonging to velocityGroup " 250 <<
" must add to" <<
nl <<
" unity. This condition might be" 251 <<
" violated due to wrong entries in the" <<
nl 252 <<
" velocityGroupCoeffs subdictionary or bad initial conditions in" 253 <<
" the startTime" <<
nl 254 <<
" directory. The sizeGroups can be renormalized at every" 255 <<
" timestep or at restart" <<
nl 256 <<
" only by setting the corresponding switch renormalize or" 257 <<
" renormalizeAtRestart" <<
nl 258 <<
" in the fvSolution subdictionary " << popBalName_ <<
"." 259 <<
" Note that boundary conditions are not" <<
nl <<
"renormalized." 265 fields_.add(sizeGroups_[i]);
283 mvConvection_ = mvconvection();
291 Info<< this->
phase().
name() <<
" Sauter mean diameter, min, max = " 292 << d_.weightedAverage(d_.mesh().V()).value()
293 <<
' ' <<
min(d_).value()
294 <<
' ' <<
max(d_).value()
299 Info<< phase_.
name() <<
" sizeGroups-sum volume fraction, min, max = " 300 << fSum_.weightedAverage(phase_.
mesh().V()).value()
301 <<
' ' <<
min(fSum_).value()
302 <<
' ' <<
max(fSum_).value()
307 phase_.
mesh().solverDict(popBalName_).lookupOrDefault<Switch>
320 read(
const dictionary& phaseProperties)
#define forAll(list, i)
Loop across all elements in list.
virtual tmp< volScalarField > d() const
Return the Sauter-mean diameter.
errorManipArg< error, int > exit(error &err, const int errNo=1)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
dimensionedSphericalTensor inv(const dimensionedSphericalTensor &dt)
virtual bool read(const dictionary &phaseProperties)=0
Read phaseProperties dictionary.
Ostream & endl(Ostream &os)
Add newline and flush stream.
const word & name() const
velocityGroup(const dictionary &diameterProperties, const phaseModel &phase)
Construct from components.
const phaseModel & phase() const
Return const-reference to the phase.
Macros for easy insertion into run-time selection tables.
static tmp< GeometricField< scalar, fvPatchField, volMesh > > New(const word &name, const Mesh &, const dimensionSet &, const word &patchFieldType=fvPatchField< scalar >::calculatedType())
Return a temporary field constructed from name, mesh, dimensionSet.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
dimensionedScalar pos(const dimensionedScalar &ds)
stressControl lookup("compactNormalStress") >> compactNormalStress
virtual ~velocityGroup()
Destructor.
void min(const dimensioned< Type > &)
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
const Mesh & mesh() const
Return mesh.
defineTypeNameAndDebug(combustionModel, 0)
word name(const complex &)
Return a string representation of a complex.
const dimensionSet dimDensity
Internal & ref()
Return a reference to the dimensioned internal field.
void preSolve()
Corrections before populationBalanceModel::solve()
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
void max(const 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)
dimensioned< scalar > mag(const dimensioned< Type > &)
const doubleScalar e
Elementary charge.
virtual bool read(const dictionary &diameterProperties)
Read diameterProperties dictionary.
A class for managing temporary objects.