36 namespace diameterModels
54 tmp<volScalarField> tInvDsm
61 phase_.time().timeName(),
73 const sizeGroup& fi = sizeGroups_[i];
83 Foam::diameterModels::velocityGroup::fSum()
const 85 tmp<volScalarField> tsumSizeGroups
92 phase_.time().timeName(),
104 sumSizeGroups += sizeGroups_[i];
107 return tsumSizeGroups;
111 void Foam::diameterModels::velocityGroup::renormalize()
114 <<
" renormalizing sizeGroups" 120 sizeGroups_[i] *=
pos(sizeGroups_[i]);
125 sizeGroups_[i] /= fSum_;
131 Foam::diameterModels::velocityGroup::mvconvection()
const 139 phase_.alphaRhoPhi(),
140 phase_.mesh().divScheme
142 "div(" + phase_.alphaRhoPhi()().
name() +
",f)" 155 const dictionary& diameterProperties,
156 const phaseModel& phase
159 diameterModel(diameterProperties, phase),
160 popBalName_(diameterProperties.
lookup(
"populationBalance")),
181 formFactor_(
"formFactor",
dimless, diameterProperties),
184 diameterProperties.
lookup(
"sizeGroups"),
185 sizeGroup::iNew(phase, *this)
209 IOobject::groupName(
"d", phase.
name()),
222 IOobject::groupName(
"source", phase.
name()),
232 phase_.
mesh().solverDict(popBalName_).lookupOrDefault<Switch>
234 "renormalizeAtRestart",
238 phase_.
mesh().solverDict(popBalName_).lookupOrDefault<Switch>
252 mag(1 - fSum_.weightedAverage(fSum_.mesh().V()).value()) >= 1
e-5
253 ||
mag(1 -
max(fSum_).value()) >= 1
e-5
254 ||
mag(1 -
min(fSum_).value()) >= 1
e-5
258 <<
" Initial values of the sizeGroups belonging to velocityGroup " 260 <<
" must add to" <<
nl <<
" unity. This condition might be" 261 <<
" violated due to wrong entries in the" <<
nl 262 <<
" velocityGroupCoeffs subdictionary or bad initial conditions in" 263 <<
" the startTime" <<
nl 264 <<
" directory. The sizeGroups can be renormalized at every" 265 <<
" timestep or at restart" <<
nl 266 <<
" only by setting the corresponding switch renormalize or" 267 <<
" renormalizeAtRestart" <<
nl 268 <<
" in the fvSolution subdictionary " << popBalName_ <<
"." 269 <<
" Note that boundary conditions are not" <<
nl <<
"renormalized." 275 fields_.add(sizeGroups_[i]);
293 mvConvection_ = mvconvection();
301 Info<< this->
phase().
name() <<
" Sauter mean diameter, min, max = " 302 << d_.weightedAverage(d_.mesh().V()).value()
303 <<
' ' <<
min(d_).value()
304 <<
' ' <<
max(d_).value()
309 Info<< phase_.
name() <<
" sizeGroups-sum volume fraction, min, max = " 310 << fSum_.weightedAverage(phase_.
mesh().V()).value()
311 <<
' ' <<
min(fSum_).value()
312 <<
' ' <<
max(fSum_).value()
317 phase_.
mesh().solverDict(popBalName_).lookupOrDefault<Switch>
330 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.
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.