Public Member Functions | List of all members
regionSizeDistribution Class Reference

This function object creates a size distribution via interrogating a continuous phase fraction field. More...

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

Public Member Functions

 TypeName ("regionSizeDistribution")
 Runtime type information. More...
 
 regionSizeDistribution (const word &name, const objectRegistry &, const dictionary &, const bool loadFromFiles=false)
 Construct for given objectRegistry and dictionary. More...
 
virtual ~regionSizeDistribution ()
 
virtual const wordname () const
 Return name of the set of regionSizeDistribution. More...
 
virtual void read (const dictionary &)
 Read the regionSizeDistribution data. More...
 
virtual void execute ()
 Execute, currently does nothing. More...
 
virtual void end ()
 Execute at the final time-loop, currently does nothing. More...
 
virtual void timeSet ()
 Called when time was set at the end of the Time::operator++. More...
 
virtual void write ()
 Calculate the regionSizeDistribution and write. More...
 
virtual void updateMesh (const mapPolyMesh &)
 Update for changes of mesh. More...
 
virtual void movePoints (const polyMesh &)
 Update for changes of mesh. More...
 
template<class Type >
Foam::Map< Type > regionSum (const regionSplit &regions, const Field< Type > &fld) const
 
template<class Type >
Foam::List< Type > extractData (const UList< label > &keys, const Map< Type > &regionData) const
 
- Public Member Functions inherited from functionObjectFile
 functionObjectFile (const objectRegistry &obr, const word &prefix)
 Construct null. More...
 
 functionObjectFile (const objectRegistry &obr, const word &prefix, const word &name)
 Construct from components. More...
 
 functionObjectFile (const objectRegistry &obr, const word &prefix, const wordList &names)
 Construct from components. More...
 
virtual ~functionObjectFile ()
 Destructor. More...
 
const wordListnames () const
 Return const access to the names. More...
 
OFstreamfile ()
 Return access to the file (if only 1) More...
 
PtrList< OFstream > & files ()
 Return access to the files. More...
 
OFstreamfile (const label i)
 Return file 'i'. 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...
 
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...
 

Additional Inherited Members

- Static Public Attributes inherited from functionObjectFile
static const word outputPrefix = "postProcessing"
 Directory prefix. More...
 
static label addChars = 7
 Additional characters for writing. More...
 
- Protected Member Functions inherited from functionObjectFile
virtual void initStream (Ostream &os) const
 Initialise the output stream for writing. More...
 
virtual fileName baseFileDir () const
 Return the base directory for output. More...
 
virtual fileName baseTimeDir () const
 Return the base directory for the current time value. More...
 
virtual void createFiles ()
 Create the output file. More...
 
virtual void writeFileHeader (const label i=0)
 File header information. 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...
 
virtual Omanip< int > valueWidth (const label offset=0) const
 Return the value width when writing to stream with optional offset. More...
 
 functionObjectFile (const functionObjectFile &)
 Disallow default bitwise copy construct. More...
 
void operator= (const functionObjectFile &)
 Disallow default bitwise assignment. More...
 

Detailed Description

This function object creates a size distribution via interrogating a continuous phase fraction field.

Looks up a phase-fraction (alpha) field and splits the mesh into regions based on where the field is below the threshold value. These regions ("droplets") can now be analysed.

Regions:

Output (volume scalar) fields include:

Histogram:

Example of function object specification:

regionSizeDistribution1
{
    type            regionSizeDistribution;
    functionObjectLibs ("libfieldFunctionObjects.so");
    ...
    field           alpha;
    patches         (inlet);
    threshold       0.4;
    fields          (p U);
    nBins           100;
    maxDiameter     0.5e-4;
    minDiameter     0;
    setFormat       gnuplot;
    coordinateSystem
    {
        type            cartesian;
        origin          (0 0 0);
        e3              (0 1 1);
        e1              (1 0 0);
    }
}


Function object usage

Property Description Required Default value
type type name: regionSizeDistribution yes
field phase field to interrogate yes
patches patches from which the liquid core is identified yes
threshold phase fraction applied to delimit regions yes
fields fields to sample yes
nBins number of bins for histogram yes
maxDiameter maximum region equivalent diameter yes
minDiameter minimum region equivalent diameter no 0
setFormat writing format yes
coordinateSystem transformation for vector fields no
See also
Foam::functionObject Foam::OutputFilterFunctionObject
Source files

Definition at line 187 of file regionSizeDistribution.H.

Constructor & Destructor Documentation

regionSizeDistribution ( const word name,
const objectRegistry obr,
const dictionary dict,
const bool  loadFromFiles = false 
)

Construct for given objectRegistry and dictionary.

Allow the possibility to load fields from files

Definition at line 318 of file regionSizeDistribution.C.

References Foam::endl(), Foam::nl, Foam::read(), and WarningIn.

Here is the call graph for this function:

~regionSizeDistribution ( )
virtual

Definition at line 357 of file regionSizeDistribution.C.

Member Function Documentation

TypeName ( "regionSizeDistribution"  )

Runtime type information.

virtual const word& name ( ) const
inlinevirtual
void read ( const dictionary dict)
virtual

Read the regionSizeDistribution data.

Definition at line 363 of file regionSizeDistribution.C.

References Foam::endl(), format(), dictionary::found(), Foam::Info, dictionary::lookup(), writer< Type >::New(), and dictionary::readIfPresent().

Referenced by regionSizeDistribution::name().

Here is the call graph for this function:

Here is the caller graph for this function:

void execute ( )
virtual

Execute, currently does nothing.

Definition at line 390 of file regionSizeDistribution.C.

Referenced by regionSizeDistribution::name().

Here is the caller graph for this function:

void end ( )
virtual

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

Definition at line 396 of file regionSizeDistribution.C.

Referenced by regionSizeDistribution::name().

Here is the caller graph for this function:

void timeSet ( )
virtual

Called when time was set at the end of the Time::operator++.

Definition at line 402 of file regionSizeDistribution.C.

Referenced by regionSizeDistribution::name().

Here is the caller graph for this function:

void write ( )
virtual

Calculate the regionSizeDistribution and write.

Reimplemented from functionObjectFile.

Definition at line 408 of file regionSizeDistribution.C.

References alphaPtr, HashTable< T, label, Hash< label > >::begin(), HashTable< T, Key, Hash >::begin(), GeometricField< Type, PatchField, GeoMesh >::boundaryField(), Foam::cbrt(), Field< Type >::component(), Vector< Cmpt >::componentNames, fvPatchField< Type >::coupled(), delta, Foam::dimless, Foam::fvc::domainIntegrate(), HashTableCore::end(), Foam::endl(), HashTable< T, label, Hash< label > >::erase(), HashTable< T, Key, Hash >::erase(), polyMesh::faceNeighbour(), polyMesh::faceOwner(), Foam::findStrings(), fld(), forAll, forAllConstIter(), forAllIter, HashTable< T, Key, Hash >::found(), Foam::gSum(), Foam::Info, internalField(), GeometricField< Type, PatchField, GeoMesh >::internalField(), HashTable< T, Key, Hash >::iteratorBase::key(), Foam::mag(), UPstream::master(), mesh, IOobject::MUST_READ, IOobject::name(), primitiveMesh::nCells(), VectorSpace< Vector< Cmpt >, Cmpt, 3 >::nComponents, primitiveMesh::nFaces(), primitiveMesh::nInternalFaces(), Foam::nl, IOobject::NO_READ, IOobject::NO_WRITE, regionSplit::nRegions(), fvPatch::patch(), fvPatchField< Type >::patch(), fvPatchField< Type >::patchInternalField(), fvPatchField< Type >::patchNeighbourField(), Foam::constant::mathematical::pi(), Foam::pow(), List< T >::size(), HashTable< T, label, Hash< label > >::sortedToc(), polyPatch::start(), token::TAB, fvMesh::time(), Time::timeName(), Foam::type(), Field< Type >::typeName, fvMesh::V(), regIOobject::write(), and x.

Referenced by regionSizeDistribution::name().

Here is the call graph for this function:

Here is the caller graph for this function:

virtual void updateMesh ( const mapPolyMesh )
inlinevirtual

Update for changes of mesh.

Definition at line 342 of file regionSizeDistribution.H.

virtual void movePoints ( const polyMesh )
inlinevirtual

Update for changes of mesh.

Definition at line 346 of file regionSizeDistribution.H.

Foam::Map<Type> regionSum ( const regionSplit regions,
const Field< Type > &  fld 
) const

Definition at line 34 of file regionSizeDistributionTemplates.C.

References forAll, and regionSplit::nRegions().

Here is the call graph for this function:

Foam::List<Type> extractData ( const UList< label > &  keys,
const Map< Type > &  regionData 
) const

Definition at line 66 of file regionSizeDistributionTemplates.C.

References forAll, and UList< T >::size().

Here is the call graph for this function:


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