Public Types | Public Member Functions | Protected Member Functions | List of all members
ParticleCollector< CloudType > Class Template Reference

Function object to collect the parcel mass- and mass flow rate over a set of polygons. The polygons can either be specified by sets of user- supplied points, or in a concentric circles arrangement. If a parcel is 'collected', it can be flagged to be removed from the domain using the removeCollected entry. More...

Inheritance diagram for ParticleCollector< CloudType >:
Inheritance graph
[legend]
Collaboration diagram for ParticleCollector< CloudType >:
Collaboration graph
[legend]

Public Types

enum  modeType { mtPolygon, mtConcentricCircle, mtUnknown }
 
- Public Types inherited from CloudSubModelBase< CloudType >
typedef CloudType cloudType
 

Public Member Functions

 TypeName ("particleCollector")
 
 ParticleCollector (const dictionary &dict, CloudType &owner, const word &modelName)
 
 ParticleCollector (const ParticleCollector< CloudType > &pc)
 
virtual autoPtr< CloudFunctionObject< CloudType > > clone () const
 
virtual ~ParticleCollector ()=default
 
bool resetOnWrite () const
 
virtual void postMove (parcelType &p, const scalar dt, const point &position0, bool &keepParticle)
 
- Public Member Functions inherited from CloudFunctionObject< CloudType >
 TypeName ("cloudFunctionObject")
 
 declareRunTimeSelectionTable (autoPtr, CloudFunctionObject, dictionary,(const dictionary &dict, CloudType &owner, const word &modelName),(dict, owner, modelName))
 
 CloudFunctionObject (CloudType &owner)
 
 CloudFunctionObject (const dictionary &dict, CloudType &owner, const word &objectType, const word &modelName)
 
 CloudFunctionObject (const CloudFunctionObject< CloudType > &ppm)
 
virtual ~CloudFunctionObject ()=default
 
virtual void preEvolve (const typename parcelType::trackingData &td)
 
virtual void postEvolve (const typename parcelType::trackingData &td)
 
virtual void postPatch (const parcelType &p, const polyPatch &pp, bool &keepParticle)
 
virtual void postFace (const parcelType &p, bool &keepParticle)
 
const fileNameoutputDir () const
 
fileName writeTimeDir () const
 
- Public Member Functions inherited from CloudSubModelBase< CloudType >
 CloudSubModelBase (CloudType &owner)
 
 CloudSubModelBase (CloudType &owner, const dictionary &dict, const word &baseName, const word &modelType, const word &dictExt="Coeffs")
 
 CloudSubModelBase (const word &modelName, CloudType &owner, const dictionary &dict, const word &baseName, const word &modelType)
 
 CloudSubModelBase (const CloudSubModelBase< CloudType > &smb)
 
virtual ~CloudSubModelBase ()
 
const CloudTypeowner () const
 
virtual bool writeTime () const
 
virtual fileName localPath () const
 
CloudTypeowner ()
 
virtual void write (Ostream &os) const
 
- Public Member Functions inherited from subModelBase
 subModelBase (dictionary &properties)
 
 subModelBase (dictionary &properties, const dictionary &dict, const word &baseName, const word &modelType, const word &dictExt="Coeffs")
 
 subModelBase (const word &modelName, dictionary &properties, const dictionary &dict, const word &baseName, const word &modelType)
 
 subModelBase (const subModelBase &smb)
 
virtual ~subModelBase ()
 
const wordmodelName () const
 
const dictionarydict () const
 
const wordbaseName () const
 
const wordmodelType () const
 
const dictionarycoeffDict () const
 
const dictionaryproperties () const
 
virtual bool defaultCoeffs (const bool printMsg) const
 
virtual bool active () const
 
virtual void cacheFields (const bool store)
 
template<class Type >
Type getBaseProperty (const word &entryName, const Type &defaultValue=Type(Zero)) const
 
template<class Type >
void getBaseProperty (const word &entryName, Type &value) const
 
template<class Type >
void setBaseProperty (const word &entryName, const Type &value)
 
bool getModelDict (const word &entryName, dictionary &dict) const
 
template<class Type >
void getModelProperty (const word &entryName, Type &value) const
 
template<class Type >
Type getModelProperty (const word &entryName, const Type &defaultValue=Type(Zero)) const
 
template<class Type >
void setModelProperty (const word &entryName, const Type &value)
 

Protected Member Functions

void write ()
 
- Protected Member Functions inherited from subModelBase
bool inLine () const
 

Additional Inherited Members

- Static Public Member Functions inherited from CloudFunctionObject< CloudType >
static autoPtr< CloudFunctionObject< CloudType > > New (const dictionary &dict, CloudType &owner, const word &objectType, const word &modelName)
 
- Protected Attributes inherited from CloudSubModelBase< CloudType >
CloudTypeowner_
 
- Protected Attributes inherited from subModelBase
const word modelName_
 
dictionaryproperties_
 
const dictionary dict_
 
const word baseName_
 
const word modelType_
 
const dictionary coeffDict_
 

Detailed Description

template<class CloudType>
class Foam::ParticleCollector< CloudType >

Function object to collect the parcel mass- and mass flow rate over a set of polygons. The polygons can either be specified by sets of user- supplied points, or in a concentric circles arrangement. If a parcel is 'collected', it can be flagged to be removed from the domain using the removeCollected entry.

Example usage:

particleCollector1
{
    type            particleCollector;

    mode            concentricCircle;
    origin          (0.05 0.025 0.005);
    radius          (0.01 0.025 0.05);
    nSector         10;
    refDir          (1 0 0);
    normal          (0 0 1);

    negateParcelsOppositeNormal no;
    removeCollected no;
    surfaceFormat   vtk;
    resetOnWrite    no;
    log             yes;
}

particleCollector2
{
    type            particleCollector;

    mode            polygon;
    polygons
    (
        (
            (0 0 0)
            (1 0 0)
            (1 1 0)
            (0 1 0)
        )
        (
            (0 0 1)
            (1 0 1)
            (1 1 1)
            (0 1 1)
        )
    );
    normal          (0 0 1);

    negateParcelsOppositeNormal no;
    removeCollected no;
    surfaceFormat   vtk;
    resetOnWrite    no;
    log             yes;
}
Source files

Definition at line 108 of file ParticleCollector.H.

Member Enumeration Documentation

◆ modeType

enum modeType
Enumerator
mtPolygon 
mtConcentricCircle 
mtUnknown 

Definition at line 114 of file ParticleCollector.H.

Constructor & Destructor Documentation

◆ ParticleCollector() [1/2]

ParticleCollector ( const dictionary dict,
CloudType owner,
const word modelName 
)

Definition at line 509 of file ParticleCollector.C.

References Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, forAll, Foam::mag(), Foam::mode(), and Foam::normalised().

Here is the call graph for this function:

◆ ParticleCollector() [2/2]

Definition at line 596 of file ParticleCollector.C.

◆ ~ParticleCollector()

virtual ~ParticleCollector ( )
virtualdefault

Member Function Documentation

◆ write()

void write
protectedvirtual

◆ TypeName()

TypeName ( "particleCollector"  )

◆ clone()

virtual autoPtr<CloudFunctionObject<CloudType> > clone ( ) const
inlinevirtual

Reimplemented from CloudFunctionObject< CloudType >.

Definition at line 261 of file ParticleCollector.H.

◆ resetOnWrite()

bool resetOnWrite
inline

Definition at line 23 of file ParticleCollectorI.H.

◆ postMove()

void postMove ( parcelType &  p,
const scalar  dt,
const point position0,
bool keepParticle 
)
virtual

Reimplemented from CloudFunctionObject< CloudType >.

Definition at line 630 of file ParticleCollector.C.

References forAll, Foam::mag(), and p.

Here is the call graph for this function:

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