This function object calculates and outputs volume-averaged 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 multiphaseEulerFoam solver. It can be applied to a specific cellZone or the entire domain. The function type determines whether the density function and its moments are based on the number of dispersed phase elements in a size group or their total volume. More...
Public Types | |
enum | functionType { ftMoments, ftStdDev, ftNumber, ftVolume } |
Function type enumeration. More... | |
enum | coordinateType { ctVolume, ctArea, ctDiameter, ctProjectedAreaDiameter } |
Coordinate type enumeration. More... | |
Public Types inherited from volRegion | |
enum | regionTypes { vrtCellZone, vrtAll } |
Region type enumeration. More... | |
Public Member Functions | |
TypeName ("sizeDistribution") | |
Runtime type information. More... | |
sizeDistribution (const word &name, const Time &runTime, const dictionary &dict) | |
Construct from Time and dictionary. More... | |
sizeDistribution (const sizeDistribution &)=delete | |
Disallow default bitwise copy construction. More... | |
virtual | ~sizeDistribution () |
Destructor. More... | |
virtual bool | read (const dictionary &) |
Read the sizeDistribution data. More... | |
virtual bool | execute () |
Execute, currently does nothing. More... | |
virtual bool | end () |
Execute at the final time-loop, currently does nothing. More... | |
virtual bool | write () |
Calculate and write the size distribution. More... | |
void | operator= (const sizeDistribution &)=delete |
Disallow default bitwise assignment. More... | |
Public Member Functions inherited from fvMeshFunctionObject | |
TypeName ("fvMeshFunctionObject") | |
Runtime type information. More... | |
fvMeshFunctionObject (const word &name, const Time &runTime, const dictionary &dict) | |
Construct from Time and dictionary. More... | |
fvMeshFunctionObject (const word &name, const objectRegistry &obr, const dictionary &dict) | |
Construct from the region objectRegistry and dictionary. More... | |
fvMeshFunctionObject (const fvMeshFunctionObject &)=delete | |
Disallow default bitwise copy construction. More... | |
virtual | ~fvMeshFunctionObject () |
Destructor. More... | |
void | operator= (const fvMeshFunctionObject &)=delete |
Disallow default bitwise assignment. More... | |
Public Member Functions inherited from regionFunctionObject | |
TypeName ("regionFunctionObject") | |
Runtime type information. More... | |
regionFunctionObject (const word &name, const Time &runTime, const dictionary &dict) | |
Construct from Time and dictionary. More... | |
regionFunctionObject (const word &name, const objectRegistry &obr, const dictionary &dict) | |
Construct from the region objectRegistry and dictionary. More... | |
regionFunctionObject (const regionFunctionObject &)=delete | |
Disallow default bitwise copy construction. More... | |
virtual | ~regionFunctionObject () |
Destructor. More... | |
void | operator= (const regionFunctionObject &)=delete |
Disallow default bitwise assignment. More... | |
Public Member Functions inherited from functionObject | |
ClassName ("functionObject") | |
virtual const word & | type () const =0 |
Runtime type information. More... | |
declareRunTimeSelectionTable (autoPtr, functionObject, dictionary,(const word &name, const Time &runTime, const dictionary &dict),(name, runTime, dict)) | |
functionObject (const word &name) | |
Construct from components. More... | |
autoPtr< functionObject > | clone () const |
Return clone. More... | |
functionObject (const functionObject &)=delete | |
Disallow default bitwise copy construction. More... | |
virtual | ~functionObject () |
Destructor. More... | |
const word & | name () const |
Return the name of this functionObject. More... | |
virtual bool | executeAtStart () const |
Return true if the functionObject should be executed at the start. More... | |
virtual scalar | timeToNextWrite () |
Called by Time::adjustTimeStep(). Allows the functionObject to. More... | |
virtual void | updateMesh (const mapPolyMesh &mpm) |
Update for changes of mesh. More... | |
virtual void | movePoints (const polyMesh &mesh) |
Update for changes of mesh. More... | |
void | operator= (const functionObject &)=delete |
Disallow default bitwise assignment. More... | |
Public Member Functions inherited from volRegion | |
TypeName ("volRegion") | |
Run-time type information. More... | |
volRegion (const fvMesh &mesh, const dictionary &dict) | |
Construct from fvMesh and dictionary. More... | |
virtual | ~volRegion () |
Destructor. More... | |
bool | read (const dictionary &) |
Read from dictionary. More... | |
const regionTypes & | regionType () const |
Return the region type. More... | |
const labelList & | cellIDs () const |
Return the local list of cell IDs. More... | |
label | nCells () const |
Return the number of cells in the region. More... | |
scalar | V () const |
Return total volume of the region. More... | |
Public Member Functions inherited from logFiles | |
logFiles (const objectRegistry &obr, const word &prefix) | |
Construct from objectRegistry and prefix. More... | |
logFiles (const logFiles &)=delete | |
Disallow default bitwise copy construction. More... | |
virtual | ~logFiles () |
Destructor. More... | |
const wordList & | names () const |
Return const access to the names. More... | |
PtrList< OFstream > & | files () |
Return access to the files. More... | |
OFstream & | file () |
Return access to the file (if only 1) More... | |
OFstream & | file (const label i) |
Return file 'i'. More... | |
void | operator= (const logFiles &)=delete |
Disallow default bitwise assignment. More... | |
Public Member Functions inherited from writeFile | |
writeFile (const objectRegistry &obr, const word &prefix) | |
Construct from objectRegistry and prefix. More... | |
writeFile (const writeFile &)=delete | |
Disallow default bitwise copy construction. More... | |
~writeFile () | |
Destructor. More... | |
void | initStream (Ostream &os) const |
Initialise the output stream for writing. More... | |
fileName | baseFileDir () const |
Return the base directory for output. More... | |
fileName | baseTimeDir () const |
Return the base directory for the current time value. More... | |
Omanip< int > | valueWidth (const label offset=0) const |
Return the value width when writing to stream with optional offset. More... | |
void | writeCommented (Ostream &os, const string &str) const |
Write a commented string to stream. More... | |
void | writeTabbed (Ostream &os, const string &str) const |
Write a tabbed string to stream. More... | |
void | writeHeader (Ostream &os, const string &str) const |
Write a commented header to stream. More... | |
void | writeTime (Ostream &os) const |
Write the current time to stream. More... | |
template<class Type > | |
void | writeHeaderValue (Ostream &os, const string &property, const Type &value) const |
Write a (commented) header property and value pair. More... | |
label | charWidth () const |
Return width of character stream output. More... | |
void | operator= (const writeFile &)=delete |
Disallow default bitwise assignment. More... | |
Static Public Attributes | |
static const NamedEnum< functionType, 4 > | functionTypeNames_ |
Ordinate type names. More... | |
static const NamedEnum< coordinateType, 4 > | coordinateTypeNames_ |
Coordinate type names. More... | |
Static Public Attributes inherited from functionObject | |
static bool | postProcess |
Global post-processing mode switch. More... | |
Static Public Attributes inherited from volRegion | |
static const NamedEnum< regionTypes, 2 > | regionTypeNames_ |
Region type names. More... | |
Static Public Attributes inherited from writeFile | |
static const word | outputPrefix |
Directory prefix. More... | |
static label | addChars = 8 |
Additional characters for writing. More... | |
Protected Member Functions | |
tmp< scalarField > | filterField (const scalarField &field) const |
Filter field according to cellIds. More... | |
void | correctVolAverages () |
Correct volume averages. More... | |
void | writeMoments () |
Write moments. More... | |
void | writeStdDev () |
Write standard deviation. More... | |
void | writeDistribution () |
Write distribution. More... | |
virtual void | writeFileHeader (const label i) |
Output file header information for functionType moments. More... | |
void | writeGraph (const coordSet &coords, const word &functionTypeName, const scalarField &values) |
Output function for all functionType number/volume. More... | |
Protected Member Functions inherited from regionFunctionObject | |
template<class ObjectType > | |
bool | foundObject (const word &fieldName) const |
Find field in the objectRegistry. More... | |
template<class ObjectType > | |
void | cannotFindObject (const word &fieldName) |
Prints a warning message that fieldName cannot be found. More... | |
void | cannotFindObject (const word &fieldName) |
Prints a warning message that fieldName cannot be found. More... | |
template<class ObjectType > | |
const ObjectType & | lookupObject (const word &fieldName) const |
Lookup object from the objectRegistry. More... | |
template<class ObjectType > | |
ObjectType & | lookupObjectRef (const word &fieldName) |
Lookup non-const object reference from the objectRegistry. More... | |
template<class ObjectType > | |
bool | store (const tmp< ObjectType > &tfield) |
Store the given field in the objectRegistry. More... | |
template<class ObjectType > | |
bool | store (const word &fieldName, const tmp< ObjectType > &tfield, bool cacheable=false) |
Store the given field in the objectRegistry under the given name. More... | |
bool | writeObject (const word &fieldName) |
Write field if present in objectRegistry. More... | |
bool | clearObject (const word &fieldName) |
Clear field from the objectRegistry if present. More... | |
Protected Member Functions inherited from volRegion | |
void | writeFileHeader (const writeFile &wf, Ostream &file) |
Output file header information. More... | |
Protected Member Functions inherited from logFiles | |
virtual void | createFiles () |
Create the output file. More... | |
virtual void | resetNames (const wordList &names) |
Reset the list of names from a wordList. More... | |
virtual void | resetName (const word &name) |
Reset the list of names to a single name entry. More... | |
Protected Attributes | |
const fvMesh & | mesh_ |
Reference to fvMesh. More... | |
writeFile | file_ |
File containing data for all functionTypes except moments. More... | |
autoPtr< setWriter< scalar > > | scalarFormatter_ |
Output formatter, set to raw. More... | |
const Foam::diameterModels::populationBalanceModel & | popBal_ |
Reference to populationBalanceModel. More... | |
functionType | functionType_ |
Function to evaluate. More... | |
coordinateType | coordinateType_ |
Abscissa type. More... | |
scalarField | N_ |
List of volume-averaged number concentrations. More... | |
scalarField | a_ |
List of volume-averaged surface areas. More... | |
scalarField | d_ |
List of volume-averaged diameters. More... | |
Switch | normalise_ |
Normalise number/volume concentrations. More... | |
Switch | densityFunction_ |
Determines whether density function is calculated. More... | |
Switch | geometric_ |
Geometric standard deviation/density function. More... | |
label | maxOrder_ |
Highest moment order. More... | |
pointField | bins_ |
Bins (representative volume/area/diameter) More... | |
label | binCmpt_ |
Bin component used according to chosen coordinate type. More... | |
Protected Attributes inherited from fvMeshFunctionObject | |
const fvMesh & | mesh_ |
Reference to the fvMesh. More... | |
Protected Attributes inherited from regionFunctionObject | |
const Time & | time_ |
Reference to the Time. More... | |
const objectRegistry & | obr_ |
Reference to the region objectRegistry. More... | |
Protected Attributes inherited from volRegion | |
regionTypes | regionType_ |
Region type. More... | |
word | regionName_ |
Region name (patch, zone, etc.) More... | |
label | regionID_ |
Region ID (patch ID, zone ID, etc.) More... | |
Protected Attributes inherited from logFiles | |
wordList | names_ |
File names. More... | |
PtrList< OFstream > | filePtrs_ |
File pointer. More... | |
Protected Attributes inherited from writeFile | |
const objectRegistry & | fileObr_ |
Reference to the region objectRegistry. More... | |
const word | prefix_ |
Prefix. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from functionObject | |
static autoPtr< functionObject > | New (const word &name, const Time &, const dictionary &) |
Select from dictionary, based on its "type" entry. More... | |
Public Attributes inherited from functionObject | |
Switch | log |
Switch write log to Info. More... | |
Switch | executeAtStart_ |
Switch write log to Info. More... | |
This function object calculates and outputs volume-averaged 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 multiphaseEulerFoam solver. It can be applied to a specific cellZone or the entire domain. The function type determines whether the density function and its moments are based on the number of dispersed phase elements in a size group or their total volume.
Example of function object specification:
numberDensity { type sizeDistribution; libs ("libmultiphaseEulerFoamFunctionObjects.so"); ... populationBalance bubbles; regionType cellZone; name zone0; functionType number; coordinateType volume; densityFunction yes; }
Property | Description | Required | Default value |
---|---|---|---|
type | type name: sizeDistribution | yes | |
populationBalance | corresponding populationBalance | yes | |
functionType | number/volume/moments/stdDev | yes | |
coordinateType | used for density/moment calculation | yes | |
normalise | normalise concentrations | no | no |
densityFunction | compute densityFunction | no | no |
logBased | use log of coordinate for density | no | no |
maxOrder | maxim order of moment output | no | 3 |
Definition at line 136 of file sizeDistribution.H.
enum functionType |
Function type enumeration.
Enumerator | |
---|---|
ftMoments | |
ftStdDev | |
ftNumber | |
ftVolume |
Definition at line 147 of file sizeDistribution.H.
enum coordinateType |
Coordinate type enumeration.
Enumerator | |
---|---|
ctVolume | |
ctArea | |
ctDiameter | |
ctProjectedAreaDiameter |
Definition at line 159 of file sizeDistribution.H.
sizeDistribution | ( | const word & | name, |
const Time & | runTime, | ||
const dictionary & | dict | ||
) |
Construct from Time and dictionary.
|
delete |
Disallow default bitwise copy construction.
|
virtual |
Destructor.
|
protected |
Filter field according to cellIds.
|
protected |
Correct volume averages.
|
protected |
Write moments.
|
protected |
Write standard deviation.
|
protected |
Write distribution.
|
protectedvirtual |
Output file header information for functionType moments.
Implements logFiles.
|
protected |
Output function for all functionType number/volume.
TypeName | ( | "sizeDistribution" | ) |
Runtime type information.
|
virtual |
Read the sizeDistribution data.
Reimplemented from regionFunctionObject.
|
virtual |
Execute, currently does nothing.
Implements functionObject.
|
virtual |
Execute at the final time-loop, currently does nothing.
Reimplemented from functionObject.
|
virtual |
Calculate and write the size distribution.
Reimplemented from logFiles.
|
delete |
Disallow default bitwise assignment.
|
static |
Ordinate type names.
Definition at line 156 of file sizeDistribution.H.
|
static |
Coordinate type names.
Definition at line 168 of file sizeDistribution.H.
|
protected |
Reference to fvMesh.
Definition at line 176 of file sizeDistribution.H.
|
protected |
File containing data for all functionTypes except moments.
Definition at line 179 of file sizeDistribution.H.
Output formatter, set to raw.
Definition at line 182 of file sizeDistribution.H.
|
protected |
Reference to populationBalanceModel.
Definition at line 185 of file sizeDistribution.H.
|
protected |
Function to evaluate.
Definition at line 188 of file sizeDistribution.H.
|
protected |
Abscissa type.
Definition at line 191 of file sizeDistribution.H.
|
protected |
List of volume-averaged number concentrations.
Definition at line 194 of file sizeDistribution.H.
|
protected |
List of volume-averaged surface areas.
Definition at line 197 of file sizeDistribution.H.
|
protected |
List of volume-averaged diameters.
Definition at line 200 of file sizeDistribution.H.
|
protected |
Normalise number/volume concentrations.
Definition at line 203 of file sizeDistribution.H.
|
protected |
Determines whether density function is calculated.
Definition at line 206 of file sizeDistribution.H.
|
protected |
Geometric standard deviation/density function.
Definition at line 209 of file sizeDistribution.H.
|
protected |
Highest moment order.
Definition at line 212 of file sizeDistribution.H.
|
protected |
Bins (representative volume/area/diameter)
Definition at line 215 of file sizeDistribution.H.
|
protected |
Bin component used according to chosen coordinate type.
Definition at line 218 of file sizeDistribution.H.