Replays an set of particle data based on an injectedParticleCloud, using the assumption of one particle per parcel. More...
#include <InjectedParticleInjection.H>


Public Member Functions | |
| TypeName ("injectedParticleInjection") | |
| Runtime type information. | |
| InjectedParticleInjection (const dictionary &dict, CloudType &owner, const word &modelName) | |
| Construct from dictionary. | |
| InjectedParticleInjection (const InjectedParticleInjection< CloudType > &im) | |
| Construct copy. | |
| virtual autoPtr< InjectionModel< CloudType > > | clone () const |
| Construct and return a clone. | |
| virtual | ~InjectedParticleInjection ()=default |
| Destructor. | |
| virtual void | updateMesh () |
| Set injector locations when mesh is updated. | |
| scalar | timeEnd () const |
| Return the end-of-injection time. | |
| virtual label | parcelsToInject (const scalar time0, const scalar time1) |
| Number of parcels to introduce relative to SOI. | |
| virtual scalar | volumeToInject (const scalar time0, const scalar time1) |
| Volume of parcels to introduce relative to SOI. | |
| virtual void | setPositionAndCell (const label parceli, const label nParcels, const scalar time, vector &position, label &cellOwner, label &tetFacei, label &tetPti) |
| Set the injection position and owner cell, tetFace and tetPt. | |
| virtual void | setProperties (const label parceli, const label nParcels, const scalar time, typename CloudType::parcelType &parcel) |
| Set the parcel properties. | |
| virtual bool | fullyDescribed () const |
| Flag to identify whether model fully describes the parcel. | |
| virtual bool | validInjection (const label parceli) |
| Return flag to identify whether or not injection of parcelI is. | |
| void | info () |
| Write injection info. | |
| Public Member Functions inherited from InjectionModel< CloudType > | |
| TypeName ("injectionModel") | |
| Runtime type information. | |
| declareRunTimeSelectionTable (autoPtr, InjectionModel, dictionary,(const dictionary &dict, CloudType &owner, const word &modelType),(dict, owner, modelType)) | |
| Declare runtime constructor selection table. | |
| InjectionModel (CloudType &owner) | |
| Construct null from owner. | |
| InjectionModel (const dictionary &dict, CloudType &owner, const word &modelName, const word &modelType) | |
| Construct from dictionary. | |
| InjectionModel (const InjectionModel< CloudType > &im) | |
| Construct copy. | |
| virtual | ~InjectionModel ()=default |
| Destructor. | |
| scalar | timeStart () const |
| Return the start-of-injection time. | |
| scalar | volumeTotal () const |
| Return the total volume to be injected across the event. | |
| scalar | massTotal () const |
| Return mass of particles to introduce. | |
| scalar | massInjected () const |
| Return mass of particles injected (cumulative). | |
| label | injectorID () const |
| Return injectorID. | |
| virtual scalar | averageParcelMass () |
| Return the average parcel mass over the injection period. | |
| label | nInjections () const |
| Return the number of injections. | |
| label | parcelsAddedTotal () const |
| Return the total number parcels added. | |
| template<class TrackCloudType> | |
| void | inject (TrackCloudType &cloud, typename CloudType::parcelType::trackingData &td) |
| Main injection loop. | |
| template<class TrackCloudType> | |
| void | injectSteadyState (TrackCloudType &cloud, typename CloudType::parcelType::trackingData &td, const scalar trackTime) |
| Main injection loop - steady-state. | |
| Public Member Functions inherited from CloudSubModelBase< CloudType > | |
| CloudSubModelBase (CloudType &owner) | |
| Construct null from owner cloud. | |
| CloudSubModelBase (CloudType &owner, const dictionary &dict, const word &baseName, const word &modelType, const word &dictExt="Coeffs") | |
| Construct from owner cloud without name. | |
| CloudSubModelBase (const word &modelName, CloudType &owner, const dictionary &dict, const word &baseName, const word &modelType) | |
| Construct from owner cloud with name. | |
| CloudSubModelBase (const CloudSubModelBase< CloudType > &smb) | |
| Construct as copy. | |
| virtual | ~CloudSubModelBase ()=default |
| Destructor. | |
| const CloudType & | owner () const |
| Return const access to the owner cloud. | |
| virtual bool | writeTime () const |
| Flag to indicate when to write a property. | |
| virtual fileName | localPath () const |
| Output directory. | |
| CloudType & | owner () |
| Return non-const access to the owner cloud for manipulation. | |
| virtual void | write (Ostream &os) const |
| Write to os. | |
| Public Member Functions inherited from subModelBase | |
| subModelBase (dictionary &properties) | |
| Construct null. | |
| subModelBase (dictionary &properties, const dictionary &dict, const word &baseName, const word &modelType, const word &dictExt="Coeffs") | |
| Construct from components without name. | |
| subModelBase (const word &modelName, dictionary &properties, const dictionary &dict, const word &baseName, const word &modelType) | |
| Construct from components with name. | |
| subModelBase (const subModelBase &smb) | |
| Construct as copy. | |
| virtual | ~subModelBase ()=default |
| Destructor. | |
| const word & | modelName () const |
| Return const access to the name of the sub-model. | |
| const dictionary & | dict () const |
| Return const access to the cloud dictionary. | |
| const word & | baseName () const |
| Return const access to the base name of the sub-model. | |
| const word & | modelType () const |
| Return const access to the sub-model type. | |
| const dictionary & | coeffDict () const |
| Return const access to the coefficients dictionary. | |
| const dictionary & | properties () const |
| Return const access to the properties dictionary. | |
| virtual bool | defaultCoeffs (const bool printMsg) const |
| Returns true if defaultCoeffs is true and outputs on printMsg. | |
| virtual bool | active () const |
| Return the model 'active' status - default active = true. | |
| virtual void | cacheFields (const bool store) |
| Cache dependent sub-model fields. | |
| template<class Type> | |
| Type | getBaseProperty (const word &entryName, const Type &defaultValue=Type(Zero)) const |
| Retrieve generic property from the base model. | |
| template<class Type> | |
| void | getBaseProperty (const word &entryName, Type &value) const |
| Retrieve generic property from the base model. | |
| template<class Type> | |
| void | setBaseProperty (const word &entryName, const Type &value) |
| Add generic property to the base model. | |
| bool | getModelDict (const word &entryName, dictionary &dict) const |
| Retrieve dictionary, return true if set. | |
| template<class Type> | |
| bool | getModelProperty (const word &entryName, Type &value) const |
| Retrieve generic property from the sub-model. | |
| template<class Type> | |
| Type | getModelProperty (const word &entryName, const Type &defaultValue=Type(Zero)) const |
| Retrieve generic property from the sub-model. | |
| template<class Type> | |
| void | setModelProperty (const word &entryName, const Type &value) |
| Add generic property to the sub-model. | |
Protected Member Functions | |
| void | initialise () |
| Initialise injectors. | |
| Protected Member Functions inherited from InjectionModel< CloudType > | |
| virtual bool | prepareForNextTimeStep (const scalar time, label &newParcels, scalar &newVolumeFraction) |
| Determine properties for next time step/injection interval. | |
| virtual bool | findCellAtPosition (label &celli, label &tetFacei, label &tetPti, vector &position, bool errorOnNotFound=true) |
| Find the cell that contains the supplied position. | |
| virtual scalar | setNumberOfParticles (const label parcels, const scalar volumeFraction, const scalar diameter, const scalar rho) |
| Set number of particles to inject given parcel properties. | |
| virtual void | postInjectCheck (const label parcelsAdded, const scalar massAdded) |
| Post injection checks. | |
| Protected Member Functions inherited from subModelBase | |
| bool | inLine () const |
| Flag to indicate whether data is/was read in-line. | |
Protected Attributes | |
| const word | cloudName_ |
| Name of cloud used to seed the new particles. | |
| labelList | injectorCells_ |
| List of cell label per injector. | |
| labelList | injectorTetFaces_ |
| List of tetFace label per injector. | |
| labelList | injectorTetPts_ |
| List of tetPt label per injector. | |
| scalarList | time_ |
| List of injection time per particle [s]. | |
| vectorList | position_ |
| List of position per particle [m]. | |
| vector | positionOffset_ |
| Position offset to apply to input positions. | |
| scalarList | diameter_ |
| List of diameter per particle [m]. | |
| vectorList | U_ |
| List of velocity per particle [m/s]. | |
| scalarList | volume_ |
| List of volume per particle [m3]. | |
| Switch | ignoreOutOfBounds_ |
| Flag to suppress errors if particle injection site is out-of-bounds. | |
| label | currentParticlei_ |
| Index of current particle. | |
| Protected Attributes inherited from InjectionModel< CloudType > | |
| scalar | SOI_ |
| Start of injection [s]. | |
| scalar | volumeTotal_ |
| Total volume of particles introduced by this injector [m^3] Note: scaled to ensure massTotal is achieved. | |
| scalar | massTotal_ |
| Total mass to inject [kg]. | |
| autoPtr< Function1< scalar > > | massFlowRate_ |
| Mass flow rate profile for steady calculations. | |
| scalar | massInjected_ |
| Total mass injected to date [kg]. | |
| label | nInjections_ |
| Number of injections counter. | |
| label | parcelsAddedTotal_ |
| Running counter of total number of parcels added. | |
| parcelBasis | parcelBasis_ |
| Parcel basis enumeration. | |
| scalar | nParticleFixed_ |
| nParticle to assign to parcels when the 'fixed' basis is selected | |
| scalar | time0_ |
| Continuous phase time at start of injection time step [s]. | |
| scalar | timeStep0_ |
| Time at start of injection time step [s]. | |
| scalar | minParticlesPerParcel_ |
| Minimum number of particles used to represent each parcel default = 1. | |
| scalar | delayedVolume_ |
| Volume that should have been injected, but would lead to less than minParticlesPerParcel_ particle per parcel. | |
| label | injectorID_ |
| Optional injector ID. | |
| bool | ignoreOutOfBounds_ |
| Optional flag to indicate that injections attempted outside the mesh should be ignored. | |
| Protected Attributes inherited from CloudSubModelBase< CloudType > | |
| CloudType & | owner_ |
| Reference to the cloud. | |
| Protected Attributes inherited from subModelBase | |
| const word | modelName_ |
| Name of the sub-model. | |
| dictionary & | properties_ |
| Reference to properties dictionary e.g. for restart. | |
| const dictionary | dict_ |
| Copy of dictionary used during construction. | |
| const word | baseName_ |
| Name of the sub-model base class. | |
| const word | modelType_ |
| Type of the sub-model. | |
| const dictionary | coeffDict_ |
| Coefficients dictionary. | |
Additional Inherited Members | |
| Public Types inherited from InjectionModel< CloudType > | |
| enum | parcelBasis { pbNumber , pbMass , pbFixed } |
| Parcel basis representation options i.e constant number of particles OR constant mass per parcel. More... | |
| typedef CloudType::parcelType | parcelType |
| Convenience typedef for parcelType. | |
| Public Types inherited from CloudSubModelBase< CloudType > | |
| typedef CloudType | cloudType |
| Type of cloud this model was instantiated for. | |
| Static Public Member Functions inherited from InjectionModel< CloudType > | |
| static autoPtr< InjectionModel< CloudType > > | New (const dictionary &dict, CloudType &owner) |
| Selector with lookup from dictionary. | |
| static autoPtr< InjectionModel< CloudType > > | New (const dictionary &dict, const word &modelName, const word &modelType, CloudType &owner) |
| Selector with name and type. | |
| Public Attributes inherited from subModelBase | |
| bool | log |
| Flag to write log into Info. | |
Replays an set of particle data based on an injectedParticleCloud, using the assumption of one particle per parcel.
model1
{
type injectedParticleInjection;
SOI 0;
massTotal 0; // Place holder only
parcelBasisType fixed;
nParticle 1; // 1 particle per parcel
cloud eulerianParticleCloud;
positionOffset (-0.025 2 -0.025);
}
Definition at line 71 of file InjectedParticleInjection.H.
| InjectedParticleInjection | ( | const dictionary & | dict, |
| CloudType & | owner, | ||
| const word & | modelName ) |
Construct from dictionary.
Definition at line 132 of file InjectedParticleInjection.C.
References cloudName_, subModelBase::coeffDict(), DSMCCloud< ParcelType >::constProps(), currentParticlei_, diameter_, subModelBase::dict(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, subModelBase::getModelProperty(), Foam::GlobalIOList< Tuple2< scalar, vector > >::typeName, ignoreOutOfBounds_, InjectionModel< CloudType >::InjectionModel(), injectorCells_, injectorTetFaces_, injectorTetPts_, InjectionModel< CloudType >::massTotal_, subModelBase::modelName(), CloudSubModelBase< CloudType >::owner(), InjectionModel< CloudType >::parcelBasis_, InjectionModel< CloudType >::pbFixed, position_, positionOffset_, time_, U_, updateMesh(), volume_, and InjectionModel< CloudType >::volumeTotal_.
Referenced by clone(), InjectedParticleInjection(), and TypeName().


| InjectedParticleInjection | ( | const InjectedParticleInjection< CloudType > & | im | ) |
Construct copy.
Definition at line 188 of file InjectedParticleInjection.C.
References cloudName_, currentParticlei_, diameter_, ignoreOutOfBounds_, InjectedParticleInjection(), InjectionModel< CloudType >::InjectionModel(), injectorCells_, injectorTetFaces_, injectorTetPts_, position_, positionOffset_, time_, U_, and volume_.

|
virtualdefault |
Destructor.
|
protected |
Initialise injectors.
Definition at line 31 of file InjectedParticleInjection.C.
References Pstream::allGatherList(), cloudName_, Foam::ListListOps::combine(), diameter_, Foam::endl(), forAll, Foam::Info, mesh, Foam::min(), UPstream::myProcNo(), UPstream::nProcs(), CloudSubModelBase< CloudType >::owner(), p, UPstream::parRun(), Foam::constant::mathematical::pi(), position_, positionOffset_, Foam::pow3(), HashTable< T, Key, Hash >::size(), UList< T >::size(), Foam::sortedOrder(), time_, List< T >::transfer(), U, U_, volume_, and InjectionModel< CloudType >::volumeTotal_.

| TypeName | ( | "injectedParticleInjection" | ) |
Runtime type information.
References subModelBase::dict(), InjectedParticleInjection(), subModelBase::modelName(), and CloudSubModelBase< CloudType >::owner().

|
inlinevirtual |
Construct and return a clone.
Implements InjectionModel< CloudType >.
Definition at line 179 of file InjectedParticleInjection.H.
References InjectedParticleInjection().

|
virtual |
Set injector locations when mesh is updated.
Reimplemented from InjectionModel< CloudType >.
Definition at line 212 of file InjectedParticleInjection.C.
References diameter_, Foam::endl(), InjectionModel< CloudType >::findCellAtPosition(), forAll, ignoreOutOfBounds_, Foam::Info, injectorCells_, injectorTetFaces_, injectorTetPts_, Foam::inplaceSubset(), position_, time_, U_, bitSet::unset(), and volume_.
Referenced by InjectedParticleInjection().


|
virtual |
Return the end-of-injection time.
Implements InjectionModel< CloudType >.
Definition at line 255 of file InjectedParticleInjection.C.
References Foam::max(), and time_.

|
virtual |
Number of parcels to introduce relative to SOI.
Implements InjectionModel< CloudType >.
Definition at line 262 of file InjectedParticleInjection.C.
|
virtual |
Volume of parcels to introduce relative to SOI.
Implements InjectionModel< CloudType >.
Definition at line 282 of file InjectedParticleInjection.C.
|
virtual |
Set the injection position and owner cell, tetFace and tetPt.
Implements InjectionModel< CloudType >.
Definition at line 302 of file InjectedParticleInjection.C.
References currentParticlei_, injectorCells_, injectorTetFaces_, injectorTetPts_, and position_.
|
virtual |
Set the parcel properties.
Implements InjectionModel< CloudType >.
Definition at line 326 of file InjectedParticleInjection.C.
References currentParticlei_, diameter_, DSMCParcel< ParcelType >::U(), and U_.

|
virtual |
Flag to identify whether model fully describes the parcel.
Implements InjectionModel< CloudType >.
Definition at line 343 of file InjectedParticleInjection.C.
|
virtual |
Return flag to identify whether or not injection of parcelI is.
permitted
Implements InjectionModel< CloudType >.
Definition at line 350 of file InjectedParticleInjection.C.
|
virtual |
Write injection info.
Reimplemented from InjectionModel< CloudType >.
Definition at line 360 of file InjectedParticleInjection.C.
References currentParticlei_, diameter_, InjectionModel< CloudType >::info(), position_, subModelBase::setModelProperty(), time_, U_, volume_, and CloudSubModelBase< CloudType >::writeTime().

Name of cloud used to seed the new particles.
Definition at line 82 of file InjectedParticleInjection.H.
Referenced by initialise(), InjectedParticleInjection(), and InjectedParticleInjection().
List of cell label per injector.
Definition at line 87 of file InjectedParticleInjection.H.
Referenced by InjectedParticleInjection(), InjectedParticleInjection(), setPositionAndCell(), and updateMesh().
List of tetFace label per injector.
Definition at line 92 of file InjectedParticleInjection.H.
Referenced by InjectedParticleInjection(), InjectedParticleInjection(), setPositionAndCell(), and updateMesh().
List of tetPt label per injector.
Definition at line 97 of file InjectedParticleInjection.H.
Referenced by InjectedParticleInjection(), InjectedParticleInjection(), setPositionAndCell(), and updateMesh().
|
protected |
List of injection time per particle [s].
Definition at line 102 of file InjectedParticleInjection.H.
Referenced by info(), initialise(), InjectedParticleInjection(), InjectedParticleInjection(), parcelsToInject(), timeEnd(), updateMesh(), and volumeToInject().
|
protected |
List of position per particle [m].
Definition at line 107 of file InjectedParticleInjection.H.
Referenced by info(), initialise(), InjectedParticleInjection(), InjectedParticleInjection(), setPositionAndCell(), and updateMesh().
Position offset to apply to input positions.
Definition at line 112 of file InjectedParticleInjection.H.
Referenced by initialise(), InjectedParticleInjection(), and InjectedParticleInjection().
|
protected |
List of diameter per particle [m].
Definition at line 117 of file InjectedParticleInjection.H.
Referenced by info(), initialise(), InjectedParticleInjection(), InjectedParticleInjection(), setProperties(), and updateMesh().
|
protected |
List of velocity per particle [m/s].
Definition at line 122 of file InjectedParticleInjection.H.
Referenced by info(), initialise(), InjectedParticleInjection(), InjectedParticleInjection(), setProperties(), and updateMesh().
|
protected |
List of volume per particle [m3].
Definition at line 127 of file InjectedParticleInjection.H.
Referenced by info(), initialise(), InjectedParticleInjection(), InjectedParticleInjection(), updateMesh(), and volumeToInject().
Flag to suppress errors if particle injection site is out-of-bounds.
Definition at line 132 of file InjectedParticleInjection.H.
Referenced by InjectedParticleInjection(), InjectedParticleInjection(), and updateMesh().
|
protected |
Index of current particle.
Definition at line 137 of file InjectedParticleInjection.H.
Referenced by info(), InjectedParticleInjection(), InjectedParticleInjection(), setPositionAndCell(), and setProperties().