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

Patch injection. More...

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

Public Types

enum  velocityType { vtFixedValue, vtPatchValue, vtZeroGradient }
 
- Public Types inherited from InjectionModel< CloudType >
enum  parcelBasis { pbNumber, pbMass, pbFixed }
 
typedef CloudType::parcelType parcelType
 
- Public Types inherited from CloudSubModelBase< CloudType >
typedef CloudType cloudType
 

Public Member Functions

 TypeName ("patchInjection")
 
 PatchInjection (const dictionary &dict, CloudType &owner, const word &modelName)
 
 PatchInjection (const PatchInjection< CloudType > &im)
 
virtual autoPtr< InjectionModel< CloudType > > clone () const
 
virtual ~PatchInjection ()=default
 
virtual void updateMesh ()
 
virtual scalar timeEnd () const
 
virtual label parcelsToInject (const scalar time0, const scalar time1)
 
virtual scalar volumeToInject (const scalar time0, const scalar time1)
 
virtual void setPositionAndCell (const label parcelI, const label nParcels, const scalar time, vector &position, label &cellOwner, label &tetFacei, label &tetPti)
 
virtual void setProperties (const label parcelI, const label nParcels, const scalar time, typename CloudType::parcelType &parcel)
 
virtual bool fullyDescribed () const
 
virtual bool validInjection (const label parcelI)
 
virtual void updateMesh (const polyMesh &mesh)
 
label setPositionAndCell (const fvMesh &mesh, const scalar fraction01, Random &rnd, vector &position, label &cellOwner, label &tetFacei, label &tetPti)
 
virtual label setPositionAndCell (const fvMesh &mesh, Random &rnd, vector &position, label &cellOwner, label &tetFacei, label &tetPti)
 
- Public Member Functions inherited from InjectionModel< CloudType >
 TypeName ("injectionModel")
 
 declareRunTimeSelectionTable (autoPtr, InjectionModel, dictionary,(const dictionary &dict, CloudType &owner, const word &modelType),(dict, owner, modelType))
 
 InjectionModel (CloudType &owner)
 
 InjectionModel (const dictionary &dict, CloudType &owner, const word &modelName, const word &modelType)
 
 InjectionModel (const InjectionModel< CloudType > &im)
 
virtual ~InjectionModel ()=default
 
scalar timeStart () const
 
scalar volumeTotal () const
 
scalar massTotal () const
 
scalar massInjected () const
 
label injectorID () const
 
virtual scalar averageParcelMass ()
 
label nInjections () const
 
label parcelsAddedTotal () const
 
template<class TrackCloudType >
void inject (TrackCloudType &cloud, typename CloudType::parcelType::trackingData &td)
 
template<class TrackCloudType >
void injectSteadyState (TrackCloudType &cloud, typename CloudType::parcelType::trackingData &td, const scalar trackTime)
 
virtual void info (Ostream &os)
 
- 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)
 
- Public Member Functions inherited from patchInjectionBase
 patchInjectionBase (const polyMesh &mesh, const word &patchName)
 
 patchInjectionBase (const patchInjectionBase &pib)
 
virtual ~patchInjectionBase ()=default
 
virtual void updateMesh (const polyMesh &mesh)
 
label setPositionAndCell (const fvMesh &mesh, const scalar fraction01, Random &rnd, vector &position, label &cellOwner, label &tetFacei, label &tetPti)
 
virtual label setPositionAndCell (const fvMesh &mesh, Random &rnd, vector &position, label &cellOwner, label &tetFacei, label &tetPti)
 
label whichProc (const scalar fraction01) const
 

Static Public Attributes

static const Enum< velocityTypevelocityTypeNames_
 

Additional Inherited Members

- Static Public Member Functions inherited from InjectionModel< CloudType >
static autoPtr< InjectionModel< CloudType > > New (const dictionary &dict, CloudType &owner)
 
static autoPtr< InjectionModel< CloudType > > New (const dictionary &dict, const word &modelName, const word &modelType, CloudType &owner)
 
- Protected Member Functions inherited from InjectionModel< CloudType >
virtual bool prepareForNextTimeStep (const scalar time, label &newParcels, scalar &newVolumeFraction)
 
virtual bool findCellAtPosition (label &celli, label &tetFacei, label &tetPti, vector &position, bool errorOnNotFound=true)
 
virtual scalar setNumberOfParticles (const label parcels, const scalar volumeFraction, const scalar diameter, const scalar rho)
 
virtual void postInjectCheck (const label parcelsAdded, const scalar massAdded)
 
- Protected Member Functions inherited from subModelBase
bool inLine () const
 
- Protected Attributes inherited from InjectionModel< CloudType >
scalar SOI_
 
scalar volumeTotal_
 
scalar massTotal_
 
autoPtr< Function1< scalar > > massFlowRate_
 
scalar massInjected_
 
label nInjections_
 
label parcelsAddedTotal_
 
parcelBasis parcelBasis_
 
scalar nParticleFixed_
 
scalar time0_
 
scalar timeStep0_
 
scalar minParticlesPerParcel_
 
scalar delayedVolume_
 
label injectorID_
 
bool ignoreOutOfBounds_
 
- 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_
 
- Protected Attributes inherited from patchInjectionBase
const word patchName_
 
const label patchId_
 
scalar patchArea_
 
vectorList patchNormal_
 
labelList cellOwners_
 
faceList triFace_
 
labelList triToFace_
 
scalarList triCumulativeMagSf_
 
scalarList sumTriMagSf_
 

Detailed Description

template<class CloudType>
class Foam::PatchInjection< CloudType >

Patch injection.

User specifies:

Properties:

Source files

Definition at line 65 of file PatchInjection.H.

Member Enumeration Documentation

◆ velocityType

Enumerator
vtFixedValue 

User supplied fixed value.

vtPatchValue 

Patch face values.

vtZeroGradient 

Patch internal cell values.

Definition at line 75 of file PatchInjection.H.

Constructor & Destructor Documentation

◆ PatchInjection() [1/2]

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

Definition at line 40 of file PatchInjection.C.

References DSMCCloud< ParcelType >::mesh(), and TimeState::userTimeToTime().

Here is the call graph for this function:

◆ PatchInjection() [2/2]

Definition at line 102 of file PatchInjection.C.

◆ ~PatchInjection()

virtual ~PatchInjection ( )
virtualdefault

Member Function Documentation

◆ TypeName()

TypeName ( "patchInjection"  )

◆ clone()

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

Implements InjectionModel< CloudType >.

Definition at line 136 of file PatchInjection.H.

◆ updateMesh() [1/2]

void updateMesh
virtual

Reimplemented from InjectionModel< CloudType >.

Definition at line 122 of file PatchInjection.C.

References mesh.

◆ timeEnd()

Foam::scalar timeEnd
virtual

Implements InjectionModel< CloudType >.

Definition at line 129 of file PatchInjection.C.

◆ parcelsToInject()

Foam::label parcelsToInject ( const scalar  time0,
const scalar  time1 
)
virtual

Implements InjectionModel< CloudType >.

Definition at line 137 of file PatchInjection.C.

References Random::globalPosition(), and DSMCCloud< ParcelType >::rndGen().

Here is the call graph for this function:

◆ volumeToInject()

Foam::scalar volumeToInject ( const scalar  time0,
const scalar  time1 
)
virtual

Implements InjectionModel< CloudType >.

Definition at line 169 of file PatchInjection.C.

◆ setPositionAndCell() [1/3]

void setPositionAndCell ( const label  parcelI,
const label  nParcels,
const scalar  time,
vector position,
label &  cellOwner,
label &  tetFacei,
label &  tetPti 
)
virtual

Implements InjectionModel< CloudType >.

Definition at line 185 of file PatchInjection.C.

References mesh, and rndGen.

◆ setProperties()

void setProperties ( const label  parcelI,
const label  nParcels,
const scalar  time,
typename CloudType::parcelType parcel 
)
virtual

Implements InjectionModel< CloudType >.

Definition at line 211 of file PatchInjection.C.

References Foam::abort(), Foam::endl(), Foam::FatalError, FatalErrorInFunction, U, and WarningInFunction.

Here is the call graph for this function:

◆ fullyDescribed()

bool fullyDescribed
virtual

Implements InjectionModel< CloudType >.

Definition at line 285 of file PatchInjection.C.

◆ validInjection()

bool validInjection ( const label  parcelI)
virtual

Implements InjectionModel< CloudType >.

Definition at line 292 of file PatchInjection.C.

◆ updateMesh() [2/2]

void updateMesh

Definition at line 75 of file patchInjectionBase.C.

◆ setPositionAndCell() [2/3]

Foam::label setPositionAndCell

Definition at line 141 of file patchInjectionBase.C.

◆ setPositionAndCell() [3/3]

Foam::label setPositionAndCell

Definition at line 265 of file patchInjectionBase.C.

Member Data Documentation

◆ velocityTypeNames_

const Foam::Enum< typename Foam::PatchInjection< CloudType >::velocityType > velocityTypeNames_
static

Definition at line 83 of file PatchInjection.H.


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