35 namespace functionObjects
59 popBalName_(
dict.lookupOrDefault(
"populationBalance",
word::null)),
60 phaseName_(
dict.lookupOrDefault(
"phase",
word::null)),
66 const bool havePopBal = popBalName_ !=
word::null;
67 const bool havePhase = phaseName_ !=
word::null;
68 if (havePopBal == havePhase)
71 << (havePopBal ?
"both" :
"neither") <<
" of keywords "
72 <<
"populationBalance " << (havePopBal ?
"and" :
"or")
73 <<
" phase defined in dictionary " <<
dict.name()
101 <<
"The " <<
typeName <<
" function cannot be executed at run-time"
121 fi == popBal.
etaV(i, distribution_());
129 popBal.
phases()[i].name(),
136 if (diameterPtrs.size() > 1)
154 alphas += iter()->phase();
167 const label i0 = iter()->iFirst();
168 const label i1 = iter()->iLast();
181 refCast<diameterModels::populationBalance>
186 ).
phases()[phaseName_].diameter()
197 fi == popBal.
etaV(i, distribution_());
#define forAll(list, i)
Loop across all elements in list.
#define forAllConstIter(Container, container, iter)
Iterate across all elements in the container object of type.
Macros for easy insertion into run-time selection tables.
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,.
An STL-conforming hash table.
const word & name() const
Return name.
static word groupName(Name name, const word &group)
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
This diameter model computes the diameter from multiple size group diameters and fractions provided b...
label iLast() const
Return the index of the last group of this phase.
label iFirst() const
Return the index of the first group of this phase.
const word & popBalName() const
Return name of populationBalance this populationBalance belongs to.
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Base class for statistical distributions.
Abstract base-class for Time/database functionObjects.
static bool postProcess
Global post-processing mode switch.
Specialisation of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
virtual bool read(const dictionary &)
Read optional controls.
Sets the population balance size distribution by overwriting the values in the group fraction fields ...
virtual ~populationBalanceSetSizeDistribution()
Destructor.
populationBalanceSetSizeDistribution(const word &name, const Time &runTime, const dictionary &dict)
Construct from Time and dictionary.
virtual bool execute()
Execute. Does nothing.
virtual bool write()
Calculate and write the group fraction fields.
Class to represent a system of phases.
static const word propertiesName
Default name of the phase properties dictionary.
const phaseModelList & phases() const
Return the phase models.
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 UPtrList< const diameterModels::populationBalance > & diameters() const
Access the list of diameter models associated with each group.
dimensionedScalar etaV(const label i, const dimensionedScalar &v) const
Return the volume allocation coefficient for a single volume.
const UPtrList< const phaseModel > & phases() const
Access the list of phases associated with each group.
const PtrList< volScalarField > & fs() const
Access the group fractions.
virtual bool write(const bool write=true) const
Write using setting from DB.
A class for managing temporary objects.
T & ref() const
Return non-const reference or generate a fatal error.
Template function which returns the un-mangled name of a given type. Useful for types which do not ha...
A class for handling words, derived from string.
static const word null
An empty word.
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
volScalarField alpha(IOobject("alpha", runTime.name(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
#define WarningInFunction
Report a warning using Foam::Warning.
defineTypeNameAndDebug(fvMeshFunctionObject, 0)
addToRunTimeSelectionTable(functionObject, fvModel, dictionary)
errorManipArg< error, int > exit(error &err, const int errNo=1)
Pair< label > labelPair
Label pair.
const dimensionSet & dimless
Ostream & decrIndent(Ostream &os)
Decrement the indent level.
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
Ostream & incrIndent(Ostream &os)
Increment the indent level.
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
Ostream & indent(Ostream &os)
Indent stream.
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.