All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
sizeDistribution Class Reference

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...

Inheritance diagram for sizeDistribution:
Collaboration diagram for sizeDistribution:

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 wordtype () 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< functionObjectclone () const
 Return clone. More...
 
 functionObject (const functionObject &)=delete
 Disallow default bitwise copy construction. More...
 
virtual ~functionObject ()
 Destructor. More...
 
const wordname () 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 regionTypesregionType () const
 Return the region type. More...
 
const labelListcellIDs () 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 wordListnames () const
 Return const access to the names. More...
 
PtrList< OFstream > & files ()
 Return access to the files. More...
 
OFstreamfile ()
 Return access to the file (if only 1) More...
 
OFstreamfile (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< scalarFieldfilterField (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 fvMeshmesh_
 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::populationBalanceModelpopBal_
 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 fvMeshmesh_
 Reference to the fvMesh. More...
 
- Protected Attributes inherited from regionFunctionObject
const Timetime_
 Reference to the Time. More...
 
const objectRegistryobr_
 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< OFstreamfilePtrs_
 File pointer. More...
 
- Protected Attributes inherited from writeFile
const objectRegistryfileObr_
 Reference to the region objectRegistry. More...
 
const word prefix_
 Prefix. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from functionObject
static autoPtr< functionObjectNew (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...
 

Detailed Description

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;
}
Usage
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
Source files

Definition at line 136 of file sizeDistribution.H.

Member Enumeration Documentation

◆ functionType

Function type enumeration.

Enumerator
ftMoments 
ftStdDev 
ftNumber 
ftVolume 

Definition at line 147 of file sizeDistribution.H.

◆ coordinateType

Coordinate type enumeration.

Enumerator
ctVolume 
ctArea 
ctDiameter 
ctProjectedAreaDiameter 

Definition at line 159 of file sizeDistribution.H.

Constructor & Destructor Documentation

◆ sizeDistribution() [1/2]

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

Construct from Time and dictionary.

◆ sizeDistribution() [2/2]

sizeDistribution ( const sizeDistribution )
delete

Disallow default bitwise copy construction.

◆ ~sizeDistribution()

virtual ~sizeDistribution ( )
virtual

Destructor.

Member Function Documentation

◆ filterField()

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

Filter field according to cellIds.

◆ correctVolAverages()

void correctVolAverages ( )
protected

Correct volume averages.

◆ writeMoments()

void writeMoments ( )
protected

Write moments.

◆ writeStdDev()

void writeStdDev ( )
protected

Write standard deviation.

◆ writeDistribution()

void writeDistribution ( )
protected

Write distribution.

◆ writeFileHeader()

virtual void writeFileHeader ( const label  i)
protectedvirtual

Output file header information for functionType moments.

Implements logFiles.

◆ writeGraph()

void writeGraph ( const coordSet coords,
const word functionTypeName,
const scalarField values 
)
protected

Output function for all functionType number/volume.

◆ TypeName()

TypeName ( "sizeDistribution"  )

Runtime type information.

◆ read()

virtual bool read ( const dictionary )
virtual

Read the sizeDistribution data.

Reimplemented from regionFunctionObject.

◆ execute()

virtual bool execute ( )
virtual

Execute, currently does nothing.

Implements functionObject.

◆ end()

virtual bool end ( )
virtual

Execute at the final time-loop, currently does nothing.

Reimplemented from functionObject.

◆ write()

virtual bool write ( )
virtual

Calculate and write the size distribution.

Reimplemented from logFiles.

◆ operator=()

void operator= ( const sizeDistribution )
delete

Disallow default bitwise assignment.

Member Data Documentation

◆ functionTypeNames_

const NamedEnum<functionType, 4> functionTypeNames_
static

Ordinate type names.

Definition at line 156 of file sizeDistribution.H.

◆ coordinateTypeNames_

const NamedEnum<coordinateType, 4> coordinateTypeNames_
static

Coordinate type names.

Definition at line 168 of file sizeDistribution.H.

◆ mesh_

const fvMesh& mesh_
protected

Reference to fvMesh.

Definition at line 176 of file sizeDistribution.H.

◆ file_

writeFile file_
protected

File containing data for all functionTypes except moments.

Definition at line 179 of file sizeDistribution.H.

◆ scalarFormatter_

autoPtr<setWriter<scalar> > scalarFormatter_
protected

Output formatter, set to raw.

Definition at line 182 of file sizeDistribution.H.

◆ popBal_

Reference to populationBalanceModel.

Definition at line 185 of file sizeDistribution.H.

◆ functionType_

functionType functionType_
protected

Function to evaluate.

Definition at line 188 of file sizeDistribution.H.

◆ coordinateType_

coordinateType coordinateType_
protected

Abscissa type.

Definition at line 191 of file sizeDistribution.H.

◆ N_

scalarField N_
protected

List of volume-averaged number concentrations.

Definition at line 194 of file sizeDistribution.H.

◆ a_

scalarField a_
protected

List of volume-averaged surface areas.

Definition at line 197 of file sizeDistribution.H.

◆ d_

scalarField d_
protected

List of volume-averaged diameters.

Definition at line 200 of file sizeDistribution.H.

◆ normalise_

Switch normalise_
protected

Normalise number/volume concentrations.

Definition at line 203 of file sizeDistribution.H.

◆ densityFunction_

Switch densityFunction_
protected

Determines whether density function is calculated.

Definition at line 206 of file sizeDistribution.H.

◆ geometric_

Switch geometric_
protected

Geometric standard deviation/density function.

Definition at line 209 of file sizeDistribution.H.

◆ maxOrder_

label maxOrder_
protected

Highest moment order.

Definition at line 212 of file sizeDistribution.H.

◆ bins_

pointField bins_
protected

Bins (representative volume/area/diameter)

Definition at line 215 of file sizeDistribution.H.

◆ binCmpt_

label binCmpt_
protected

Bin component used according to chosen coordinate type.

Definition at line 218 of file sizeDistribution.H.


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