Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
sizeDistribution Class Reference

This function object calculates and outputs information about the size distribution of the dispersed phase, such as the number density function or its moments. It is designed to be used exclusively with the population balance modeling functionality of the reactingEulerFoam solvers. It can be applied to a specific cellZone or the entire domain. More...

Inheritance diagram for sizeDistribution:
Inheritance graph
[legend]
Collaboration diagram for sizeDistribution:
Collaboration graph
[legend]

Public Types

enum  selectionModeTypes { rtCellZone, rtAll }
 
enum  functionTypes { ftNdf, ftVdf, ftNc, ftMom }
 
enum  abszissaTypes { atDiameter, atVolume }
 

Public Member Functions

 TypeName ("sizeDistribution")
 
 sizeDistribution (const word &name, const Time &runTime, const dictionary &dict)
 
virtual ~sizeDistribution ()
 
const dictionarydict () const
 
const labelListcellId () const
 
const fvMeshmesh () const
 
virtual bool read (const dictionary &dict)
 
virtual bool execute ()
 
virtual bool write ()
 
- Public Member Functions inherited from fvMeshFunctionObject
 TypeName ("fvMeshFunctionObject")
 
 fvMeshFunctionObject (const word &name, const Time &runTime, const dictionary &dict)
 
 fvMeshFunctionObject (const word &name, const objectRegistry &obr, const dictionary &dict)
 
virtual ~fvMeshFunctionObject ()=default
 
- Public Member Functions inherited from regionFunctionObject
 TypeName ("regionFunctionObject")
 
 regionFunctionObject (const word &name, const Time &runTime, const dictionary &dict)
 
 regionFunctionObject (const word &name, const objectRegistry &obr, const dictionary &dict)
 
virtual ~regionFunctionObject ()=default
 
template<class ObjectType >
const ObjectType * lookupObjectPtr (const word &fieldName) const
 
template<class ObjectType >
ObjectType * lookupObjectRefPtr (const word &fieldName) const
 
- Public Member Functions inherited from stateFunctionObject
 stateFunctionObject (const word &name, const Time &runTime)
 
virtual ~stateFunctionObject ()=default
 
dictionarypropertyDict ()
 
bool foundProperty (const word &entryName) const
 
void clearTrigger ()
 
label getTrigger () const
 
bool setTrigger (const label triggeri, bool increaseOnly=true)
 
bool getDict (const word &entryName, dictionary &dict) const
 
bool getObjectDict (const word &objectName, const word &entryName, dictionary &dict) const
 
template<class Type >
Type getProperty (const word &entryName, const Type &defaultValue=Type(Zero)) const
 
template<class Type >
bool getProperty (const word &entryName, Type &value) const
 
template<class Type >
void setProperty (const word &entryName, const Type &value)
 
template<class Type >
Type getObjectProperty (const word &objectName, const word &entryName, const Type &defaultValue=Type(Zero)) const
 
template<class Type >
bool getObjectProperty (const word &objectName, const word &entryName, Type &value) const
 
template<class Type >
void setObjectProperty (const word &objectName, const word &entryName, const Type &value)
 
template<class Type >
void setResult (const word &entryName, const Type &value)
 
template<class Type >
void setObjectResult (const word &objectName, const word &entryName, const Type &value)
 
template<class Type >
Type getResult (const word &entryName, const Type &defaultValue=Type(Zero)) const
 
template<class Type >
Type getObjectResult (const word &objectName, const word &entryName, const Type &defaultValue=Type(Zero)) const
 
template<class Type >
bool getObjectResult (const word &objectName, const word &entryName, Type &value) const
 
word resultType (const word &entryName) const
 
word objectResultType (const word &objectName, const word &entryName) const
 
wordList objectResultEntries () const
 
wordList objectResultEntries (const word &objectName) const
 
void writeResultEntries (Ostream &os) const
 
void writeResultEntries (const word &objectName, Ostream &os) const
 
void writeAllResultEntries (Ostream &os) const
 
- Public Member Functions inherited from timeFunctionObject
 timeFunctionObject (const word &name, const Time &runTime)
 
virtual ~timeFunctionObject ()=default
 
const Timetime () const
 
objectRegistrystoredObjects ()
 
const objectRegistrystoredObjects () const
 
- Public Member Functions inherited from functionObject
 declareRunTimeSelectionTable (autoPtr, functionObject, dictionary,(const word &name, const Time &runTime, const dictionary &dict),(name, runTime, dict))
 
 functionObject (const word &name, const bool withNamePrefix=defaultUseNamePrefix)
 
autoPtr< functionObjectclone () const
 
virtual ~functionObject ()=default
 
virtual const wordtype () const =0
 
const wordname () const noexcept
 
bool useNamePrefix () const noexcept
 
bool useNamePrefix (bool on) noexcept
 
virtual bool execute (const label subIndex)
 
virtual bool end ()
 
virtual bool adjustTimeStep ()
 
virtual bool filesModified () const
 
virtual void updateMesh (const mapPolyMesh &mpm)
 
virtual void movePoints (const polyMesh &mesh)
 
- Public Member Functions inherited from writeFile
 writeFile (const objectRegistry &obr, const fileName &prefix, const word &name="undefined", const bool writeToFile=true)
 
 writeFile (const objectRegistry &obr, const fileName &prefix, const word &name, const dictionary &dict, const bool writeToFile=true)
 
 writeFile (const writeFile &wf)
 
virtual ~writeFile ()=default
 
virtual OFstreamfile ()
 
virtual bool writeToFile () const
 
virtual bool canWriteHeader () const
 
virtual label charWidth () const
 
virtual void writeCommented (Ostream &os, const string &str) const
 
virtual void writeTabbed (Ostream &os, const string &str) const
 
virtual void writeHeader (Ostream &os, const string &str) const
 
virtual void writeCurrentTime (Ostream &os) const
 
virtual void writeBreak (Ostream &os) const
 
template<class Type >
void writeHeaderValue (Ostream &os, const string &property, const Type &value) const
 

Static Public Attributes

static const Enum< selectionModeTypesselectionModeTypeNames_
 
static const Enum< functionTypesfunctionTypeNames_
 
static const Enum< abszissaTypesabszissaTypeNames_
 
- Static Public Attributes inherited from functionObject
static int debug
 
static bool postProcess
 
static bool defaultUseNamePrefix
 
static word outputPrefix
 
- Static Public Attributes inherited from writeFile
static label addChars = 8
 

Protected Member Functions

void initialise (const dictionary &dict)
 
void setCellZoneCells ()
 
scalar volume () const
 
void combineFields (scalarField &field)
 
tmp< scalarFieldfilterField (const scalarField &field) const
 
void writeFileHeader (const label i=0)
 
- Protected Member Functions inherited from fvMeshFunctionObject
 fvMeshFunctionObject (const fvMeshFunctionObject &)=delete
 
void operator= (const fvMeshFunctionObject &)=delete
 
- Protected Member Functions inherited from regionFunctionObject
virtual const objectRegistryobr () const
 
template<class ObjectType >
bool foundObject (const word &fieldName) const
 
template<class ObjectType >
const ObjectType * cfindObject (const word &fieldName) const
 
template<class ObjectType >
const ObjectType * findObject (const word &fieldName) const
 
template<class ObjectType >
ObjectType * findObject (const word &fieldName)
 
template<class ObjectType >
ObjectType * getObjectPtr (const word &fieldName) const
 
template<class ObjectType >
const ObjectType & lookupObject (const word &fieldName) const
 
template<class ObjectType >
ObjectType & lookupObjectRef (const word &fieldName) const
 
template<class ObjectType >
bool store (word &fieldName, const tmp< ObjectType > &tfield, bool cacheable=false)
 
template<class ObjectType >
bool storeInDb (const word &fieldName, const tmp< ObjectType > &tfield, const objectRegistry &obr)
 
bool writeObject (const word &fieldName)
 
bool clearObject (const word &fieldName)
 
void clearObjects (const wordList &objNames)
 
 regionFunctionObject (const regionFunctionObject &)=delete
 
void operator= (const regionFunctionObject &)=delete
 
- Protected Member Functions inherited from stateFunctionObject
const functionObjects::propertiesstateDict () const
 
functionObjects::propertiesstateDict ()
 
 stateFunctionObject (const stateFunctionObject &)=delete
 
void operator= (const stateFunctionObject &)=delete
 
- Protected Member Functions inherited from timeFunctionObject
void clearOutputObjects (const wordList &objNames)
 
 timeFunctionObject (const timeFunctionObject &)=delete
 
void operator= (const timeFunctionObject &)=delete
 
- Protected Member Functions inherited from functionObject
word scopedName (const word &name) const
 
- Protected Member Functions inherited from writeFile
void initStream (Ostream &os) const
 
fileName baseFileDir () const
 
fileName baseTimeDir () const
 
virtual autoPtr< OFstreamcreateFile (const word &name, scalar timeValue) const
 
virtual autoPtr< OFstreamcreateFile (const word &name) const
 
virtual void resetFile (const word &name)
 
Omanip< int > valueWidth (const label offset=0) const
 
void operator= (const writeFile &)=delete
 

Protected Attributes

dictionary dict_
 
selectionModeTypes selectionModeType_
 
word selectionModeTypeName_
 
functionTypes functionType_
 
abszissaTypes abszissaType_
 
label nCells_
 
labelList cellId_
 
scalar volume_
 
bool writeVolume_
 
const Foam::diameterModels::populationBalanceModelpopBal_
 
List< scalar > N_
 
label momentOrder_
 
const Switch normalize_
 
scalar sumN_
 
scalar sumV_
 
- Protected Attributes inherited from fvMeshFunctionObject
const fvMeshmesh_
 
- Protected Attributes inherited from regionFunctionObject
word subRegistryName_
 
const objectRegistryobr_
 
const objectRegistryobrPtr_
 
- Protected Attributes inherited from timeFunctionObject
const Timetime_
 
- Protected Attributes inherited from writeFile
const objectRegistryfileObr_
 
const fileName prefix_
 
word fileName_
 
autoPtr< OFstreamfilePtr_
 
label writePrecision_
 
bool writeToFile_
 
bool updateHeader_
 
bool writtenHeader_
 
bool useUserTime_
 
scalar startTime_
 

Additional Inherited Members

- Static Public Member Functions inherited from functionObject
static autoPtr< functionObjectNew (const word &name, const Time &runTime, const dictionary &dict)
 
- Public Attributes inherited from functionObject
bool log
 

Detailed Description

This function object calculates and outputs information about the size distribution of the dispersed phase, such as the number density function or its moments. It is designed to be used exclusively with the population balance modeling functionality of the reactingEulerFoam solvers. It can be applied to a specific cellZone or the entire domain.

Example of function object specification:

box.all.numberDensity.volume.bubbles
{
    type sizeDistribution;
    libs (reactingEulerFoamFunctionObjects);
    writeControl    outputTime;
    writeInterval   1;
    log             true;
    ...
    functionType        numberDensity;
    abszissaType        volume;
    selectionMode       all;
    populationBalanceModel   bubbles;
    normalize           true;
}
Usage
Property Description Required Default value
type type name: sizeDistribution yes
functionType numberDensity, volumeDensity, numberConcentration,
moments yes
abszissaType volume, diameter yes
momentOrder Write moment up to given order no 0
selectionMode Evaluate for cellZone or entire mesh yes
cellZone Required if selectionMode is cellZone
populationBalanceModel Respective populationBalanceModel yes
normalize Normalization no
See also
Foam::diameterModels::populationBalanceModel Foam::functionObject Foam::functionObjects::fvMeshFunctionObject Foam::functionObjects::writeFile
Source files

Definition at line 144 of file sizeDistribution.H.

Member Enumeration Documentation

◆ selectionModeTypes

Enumerator
rtCellZone 
rtAll 

Definition at line 155 of file sizeDistribution.H.

◆ functionTypes

Enumerator
ftNdf 
ftVdf 
ftNc 
ftMom 

Definition at line 166 of file sizeDistribution.H.

◆ abszissaTypes

Enumerator
atDiameter 
atVolume 

Definition at line 179 of file sizeDistribution.H.

Constructor & Destructor Documentation

◆ sizeDistribution()

sizeDistribution ( const word name,
const Time runTime,
const dictionary dict 
)

Definition at line 339 of file sizeDistribution.C.

References dict, Foam::name(), and Foam::read().

Here is the call graph for this function:

◆ ~sizeDistribution()

~sizeDistribution ( )
virtual

Definition at line 380 of file sizeDistribution.C.

Member Function Documentation

◆ initialise()

void initialise ( const dictionary dict)
protected

Definition at line 77 of file sizeDistribution.C.

References dict, Foam::endl(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, FatalIOErrorInLookup, Foam::Info, Foam::name(), Foam::nl, and Foam::fieldTypes::volume.

Here is the call graph for this function:

◆ setCellZoneCells()

void setCellZoneCells ( )
protected

◆ volume()

Foam::scalar volume ( ) const
protected

Definition at line 207 of file sizeDistribution.C.

References Foam::gSum(), and mesh.

Here is the call graph for this function:

◆ combineFields()

void combineFields ( scalarField field)
protected

Definition at line 213 of file sizeDistribution.C.

References field(), Pstream::gatherList(), UPstream::master(), UPstream::myProcNo(), and UPstream::nProcs().

Here is the call graph for this function:

◆ filterField()

Foam::tmp< Foam::scalarField > filterField ( const scalarField field) const
protected

Definition at line 235 of file sizeDistribution.C.

References field().

Here is the call graph for this function:

◆ writeFileHeader()

void writeFileHeader ( const label  i = 0)
protected

Definition at line 244 of file sizeDistribution.C.

References sizeGroup::d(), Foam::endl(), forAll, Foam::tab, dimensioned::value(), Foam::writeHeader(), and sizeGroup::x().

Here is the call graph for this function:

◆ TypeName()

TypeName ( "sizeDistribution"  )

◆ dict()

const dictionary& dict ( ) const
inline

Definition at line 284 of file sizeDistribution.H.

References sizeDistribution::dict_.

Referenced by sizeDistribution::setCellZoneCells().

Here is the caller graph for this function:

◆ cellId()

const labelList& cellId ( ) const
inline

Definition at line 290 of file sizeDistribution.H.

References sizeDistribution::cellId_.

◆ mesh()

const fvMesh& mesh ( ) const
inline

Definition at line 296 of file sizeDistribution.H.

References regionFunctionObject::obr_.

Referenced by sizeDistribution::setCellZoneCells().

Here is the caller graph for this function:

◆ read()

bool read ( const dictionary dict)
virtual

Reimplemented from writeFile.

Definition at line 386 of file sizeDistribution.C.

References dict, regionFunctionObject::read(), and writeFile::read().

Here is the call graph for this function:

◆ execute()

bool execute ( )
virtual

Implements functionObject.

Definition at line 402 of file sizeDistribution.C.

◆ write()

bool write ( )
virtual

Member Data Documentation

◆ selectionModeTypeNames_

Definition at line 162 of file sizeDistribution.H.

Referenced by sizeDistribution::setCellZoneCells().

◆ functionTypeNames_

Definition at line 175 of file sizeDistribution.H.

◆ abszissaTypeNames_

Definition at line 186 of file sizeDistribution.H.

◆ dict_

dictionary dict_
protected

◆ selectionModeType_

selectionModeTypes selectionModeType_
protected

Definition at line 197 of file sizeDistribution.H.

Referenced by sizeDistribution::setCellZoneCells().

◆ selectionModeTypeName_

word selectionModeTypeName_
protected

Definition at line 200 of file sizeDistribution.H.

Referenced by sizeDistribution::setCellZoneCells().

◆ functionType_

functionTypes functionType_
protected

Definition at line 203 of file sizeDistribution.H.

◆ abszissaType_

abszissaTypes abszissaType_
protected

Definition at line 206 of file sizeDistribution.H.

◆ nCells_

label nCells_
protected

Definition at line 209 of file sizeDistribution.H.

Referenced by sizeDistribution::setCellZoneCells().

◆ cellId_

labelList cellId_
protected

◆ volume_

scalar volume_
protected

Definition at line 215 of file sizeDistribution.H.

◆ writeVolume_

bool writeVolume_
protected

Definition at line 218 of file sizeDistribution.H.

◆ popBal_

Definition at line 221 of file sizeDistribution.H.

◆ N_

List<scalar> N_
protected

Definition at line 224 of file sizeDistribution.H.

◆ momentOrder_

label momentOrder_
protected

Definition at line 227 of file sizeDistribution.H.

◆ normalize_

const Switch normalize_
protected

Definition at line 230 of file sizeDistribution.H.

◆ sumN_

scalar sumN_
protected

Definition at line 233 of file sizeDistribution.H.

◆ sumV_

scalar sumV_
protected

Definition at line 236 of file sizeDistribution.H.


The documentation for this class was generated from the following files: