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

Patch interaction model to perform parcel transfer and recycle from one patch to another. More...

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

Public Member Functions

 TypeName ("recycleInteraction")
 
 RecycleInteraction (const dictionary &dict, CloudType &cloud)
 
 RecycleInteraction (const RecycleInteraction< CloudType > &pim)
 
virtual autoPtr< PatchInteractionModel< CloudType > > clone () const
 
virtual ~RecycleInteraction ()=default
 
virtual bool correct (typename CloudType::parcelType &p, const polyPatch &pp, bool &keepParticle)
 
virtual void postEvolve ()
 
virtual void info (Ostream &os)
 
- Public Member Functions inherited from PatchInteractionModel< CloudType >
 TypeName ("patchInteractionModel")
 
 declareRunTimeSelectionTable (autoPtr, PatchInteractionModel, dictionary,(const dictionary &dict, CloudType &owner),(dict, owner))
 
 PatchInteractionModel (CloudType &owner)
 
 PatchInteractionModel (const dictionary &dict, CloudType &owner, const word &type)
 
 PatchInteractionModel (const PatchInteractionModel< CloudType > &pim)
 
virtual autoPtr< PatchInteractionModel< CloudType > > clone () const=0
 
virtual ~PatchInteractionModel ()=default
 
const wordUName () const
 
const scalar & Urmax () const
 
virtual void addToEscapedParcels (const scalar mass)
 

Protected Types

typedef CloudType::parcelType parcelType
 

Protected Member Functions

virtual void writeFileHeader (Ostream &os)
 

Protected Attributes

const fvMeshmesh_
 
List< Pair< word > > recyclePatches_
 
List< Pair< label > > recyclePatchesIds_
 
List< IDLList< parcelType > > recycledParcels_
 
List< List< label > > nRemoved_
 
List< List< scalar > > massRemoved_
 
List< List< label > > nInjected_
 
List< List< scalar > > massInjected_
 
Map< label > injIdToIndex_
 
PtrList< patchInjectionBaseinjectionPatchPtr_
 
const scalar recycleFraction_
 
bool outputByInjectorId_
 
- Protected Attributes inherited from PatchInteractionModel< CloudType >
const word UName_
 
label escapedParcels_
 
scalar escapedMass_
 
scalar Urmax_
 

Additional Inherited Members

- Public Types inherited from PatchInteractionModel< CloudType >
enum  interactionType
 
- Static Public Member Functions inherited from PatchInteractionModel< CloudType >
static autoPtr< PatchInteractionModel< CloudType > > New (const dictionary &dict, CloudType &owner)
 
static word interactionTypeToWord (const interactionType &itEnum)
 
static interactionType wordToInteractionType (const word &itWord)
 
- Static Public Attributes inherited from PatchInteractionModel< CloudType >
static wordList interactionTypeNames_
 

Detailed Description

template<class CloudType>
class Foam::RecycleInteraction< CloudType >

Patch interaction model to perform parcel transfer and recycle from one patch to another.

Parcels that hit a given 'outflow' patch are recycled to a given 'inflow' patch, with optional:

Usage
Minimal example by using constant/reactingCloud1Properties.subModels.multiInteractionCoeffs
multiInteractionCoeffs
{
    ...

    model1
    {
        // Mandatory entries (unmodifiable)
        patchInteractionModel    recycleInteraction;

        recycleInteractionCoeffs
        {
            recyclePatches
            (
                (<outletPatch1> <inletPatch1>)
                (<outletPatch2> <inletPatch2>)
                ...
            );

            recycleFraction      0.8; // [0-1]

            // Optional entries (unmodifiable)
            outputByInjectorId   false;
        }
    }

    ...
}

where the entries mean:

Property Description Type Reqd Dflt
patchInteractionModel Type name: recycleInteraction word yes -
recyclePatches Names of outlet-inlet patch pairs (word word) yes -
recycleFraction Fraction of parcels recycled from outlet to inlet scalar yes -
outputByInjectorId Flag to output escaped/mass particles sorted by injectorID bool no false
Source files

Definition at line 141 of file RecycleInteraction.H.

Member Typedef Documentation

◆ parcelType

typedef CloudType::parcelType parcelType
protected

Definition at line 147 of file RecycleInteraction.H.

Constructor & Destructor Documentation

◆ RecycleInteraction() [1/2]

RecycleInteraction ( const dictionary dict,
CloudType cloud 
)

Definition at line 57 of file RecycleInteraction.C.

References forAll, and Foam::Zero.

◆ RecycleInteraction() [2/2]

Definition at line 127 of file RecycleInteraction.C.

◆ ~RecycleInteraction()

virtual ~RecycleInteraction ( )
virtualdefault

Member Function Documentation

◆ writeFileHeader()

void writeFileHeader ( Ostream os)
protectedvirtual

Reimplemented from PatchInteractionModel< CloudType >.

Definition at line 26 of file RecycleInteraction.C.

References forAll, Foam::name(), and os().

Here is the call graph for this function:

◆ TypeName()

TypeName ( "recycleInteraction"  )

◆ clone()

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

Definition at line 213 of file RecycleInteraction.H.

◆ correct()

bool correct ( typename CloudType::parcelType p,
const polyPatch pp,
bool keepParticle 
)
virtual

Implements PatchInteractionModel< CloudType >.

Definition at line 150 of file RecycleInteraction.C.

References forAll, patchIdentifier::index(), and p.

Here is the call graph for this function:

◆ postEvolve()

void postEvolve
virtual

Reimplemented from PatchInteractionModel< CloudType >.

Definition at line 197 of file RecycleInteraction.C.

References List::append(), PstreamBuffers::clear(), List::clear(), PstreamBuffers::finishedSends(), forAll, forAllIters, fractions(), mesh, n, reduce(), and rndGen.

Here is the call graph for this function:

◆ info()

void info ( Ostream os)
virtual

Reimplemented from PatchInteractionModel< CloudType >.

Definition at line 365 of file RecycleInteraction.C.

References Foam::endl(), forAll, forAllConstIters(), Foam::nl, os(), List::setSize(), Foam::tab, and Foam::Zero.

Here is the call graph for this function:

Member Data Documentation

◆ mesh_

const fvMesh& mesh_
protected

Definition at line 152 of file RecycleInteraction.H.

◆ recyclePatches_

List<Pair<word> > recyclePatches_
protected

Definition at line 155 of file RecycleInteraction.H.

◆ recyclePatchesIds_

List<Pair<label> > recyclePatchesIds_
protected

Definition at line 158 of file RecycleInteraction.H.

◆ recycledParcels_

List<IDLList<parcelType> > recycledParcels_
protected

Definition at line 161 of file RecycleInteraction.H.

◆ nRemoved_

List<List<label> > nRemoved_
protected

Definition at line 167 of file RecycleInteraction.H.

◆ massRemoved_

List<List<scalar> > massRemoved_
protected

Definition at line 170 of file RecycleInteraction.H.

◆ nInjected_

List<List<label> > nInjected_
protected

Definition at line 173 of file RecycleInteraction.H.

◆ massInjected_

List<List<scalar> > massInjected_
protected

Definition at line 176 of file RecycleInteraction.H.

◆ injIdToIndex_

Map<label> injIdToIndex_
protected

Definition at line 180 of file RecycleInteraction.H.

◆ injectionPatchPtr_

PtrList<patchInjectionBase> injectionPatchPtr_
protected

Definition at line 183 of file RecycleInteraction.H.

◆ recycleFraction_

const scalar recycleFraction_
protected

Definition at line 186 of file RecycleInteraction.H.

◆ outputByInjectorId_

bool outputByInjectorId_
protected

Definition at line 189 of file RecycleInteraction.H.


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