Inflation injection - creates new particles by splitting existing particles within in a set of generation cells, then inflating them to a target diameter within the generation cells and an additional set of inflation cells. More...
Public Member Functions | |
TypeName ("inflationInjection") | |
Runtime type information. More... | |
InflationInjection (const dictionary &dict, CloudType &owner, const word &modelName) | |
Construct from dictionary. More... | |
InflationInjection (const InflationInjection< CloudType > &im) | |
Construct copy. More... | |
virtual autoPtr< InjectionModel< CloudType > > | clone () const |
Construct and return a clone. More... | |
virtual | ~InflationInjection () |
Destructor. More... | |
virtual void | updateMesh () |
Set injector locations when mesh is updated. More... | |
scalar | timeEnd () const |
Return the end-of-injection time. More... | |
virtual label | parcelsToInject (const scalar time0, const scalar time1) |
Number of parcels to introduce relative to SOI. More... | |
virtual scalar | volumeToInject (const scalar time0, const scalar time1) |
Volume of parcels to introduce relative to SOI. More... | |
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. More... | |
virtual void | setProperties (const label parcelI, const label nParcels, const scalar time, typename CloudType::parcelType &parcel) |
Set the parcel properties. More... | |
virtual bool | fullyDescribed () const |
Flag to identify whether model fully describes the parcel. More... | |
virtual bool | validInjection (const label parcelI) |
Return flag to identify whether or not injection of parcelI is. More... | |
![]() | |
TypeName ("injectionModel") | |
Runtime type information. More... | |
declareRunTimeSelectionTable (autoPtr, InjectionModel, dictionary,(const dictionary &dict, CloudType &owner, const word &modelType),(dict, owner, modelType)) | |
Declare runtime constructor selection table. More... | |
InjectionModel (CloudType &owner) | |
Construct null from owner. More... | |
InjectionModel (const dictionary &dict, CloudType &owner, const word &modelName, const word &modelType) | |
Construct from dictionary. More... | |
InjectionModel (const InjectionModel< CloudType > &im) | |
Construct copy. More... | |
virtual | ~InjectionModel () |
Destructor. More... | |
scalar | timeStart () const |
Return the start-of-injection time. More... | |
scalar | volumeTotal () const |
Return the total volume to be injected across the event. More... | |
scalar | massTotal () const |
Return mass of particles to introduce. More... | |
scalar | massInjected () const |
Return mass of particles injected (cumulative) More... | |
virtual scalar | averageParcelMass () |
Return the average parcel mass over the injection period. More... | |
label | nInjections () const |
Return the number of injections. More... | |
label | parcelsAddedTotal () const |
Return the total number parcels added. More... | |
template<class TrackData > | |
void | inject (TrackData &td) |
Main injection loop. More... | |
template<class TrackData > | |
void | injectSteadyState (TrackData &td, const scalar trackTime) |
Main injection loop - steady-state. More... | |
virtual void | info (Ostream &os) |
Write injection info to stream. More... | |
![]() | |
CloudSubModelBase (CloudType &owner) | |
Construct null from owner cloud. More... | |
CloudSubModelBase (CloudType &owner, const dictionary &dict, const word &baseName, const word &modelType, const word &dictExt="Coeffs") | |
Construct from owner cloud without name. More... | |
CloudSubModelBase (const word &modelName, CloudType &owner, const dictionary &dict, const word &baseName, const word &modelType) | |
Construct from owner cloud with name. More... | |
CloudSubModelBase (const CloudSubModelBase< CloudType > &smb) | |
Construct as copy. More... | |
virtual | ~CloudSubModelBase () |
Destructor. More... | |
const CloudType & | owner () const |
Return const access to the owner cloud. More... | |
virtual bool | outputTime () const |
Flag to indicate when to write a property. More... | |
CloudType & | owner () |
Return non-const access to the owner cloud for manipulation. More... | |
virtual void | write (Ostream &os) const |
Write. More... | |
![]() | |
subModelBase (dictionary &properties) | |
Construct null. More... | |
subModelBase (dictionary &properties, const dictionary &dict, const word &baseName, const word &modelType, const word &dictExt="Coeffs") | |
Construct from components without name. More... | |
subModelBase (const word &modelName, dictionary &properties, const dictionary &dict, const word &baseName, const word &modelType) | |
Construct from components with name. More... | |
subModelBase (const subModelBase &smb) | |
Construct as copy. More... | |
virtual | ~subModelBase () |
Destructor. More... | |
const word & | modelName () const |
Return const access to the name of the sub-model. More... | |
const dictionary & | dict () const |
Return const access to the cloud dictionary. More... | |
const word & | baseName () const |
Return const access to the base name of the sub-model. More... | |
const word & | modelType () const |
Return const access to the sub-model type. More... | |
const dictionary & | coeffDict () const |
Return const access to the coefficients dictionary. More... | |
const dictionary & | properties () const |
Return const access to the properties dictionary. More... | |
virtual bool | defaultCoeffs (const bool printMsg) const |
Returns true if defaultCoeffs is true and outputs on printMsg. More... | |
virtual bool | active () const |
Return the model 'active' status - default active = true. More... | |
virtual void | cacheFields (const bool store) |
Cache dependant sub-model fields. More... | |
template<class Type > | |
Type | getBaseProperty (const word &entryName, const Type &defaultValue=pTraits< Type >::zero) const |
Retrieve generic property from the base model. More... | |
template<class Type > | |
void | getBaseProperty (const word &entryName, Type &value) const |
Retrieve generic property from the base model. More... | |
template<class Type > | |
void | setBaseProperty (const word &entryName, const Type &value) |
Add generic property to the base model. More... | |
template<class Type > | |
void | getModelProperty (const word &entryName, Type &value) const |
Retrieve generic property from the sub-model. More... | |
template<class Type > | |
Type | getModelProperty (const word &entryName, const Type &defaultValue=pTraits< Type >::zero) const |
Retrieve generic property from the sub-model. More... | |
template<class Type > | |
void | setModelProperty (const word &entryName, const Type &value) |
Add generic property to the sub-model. More... | |
Private Attributes | |
word | generationSetName_ |
Name of cellSet for generating new particles. More... | |
word | inflationSetName_ |
Name of cellSet for inflating new particles. More... | |
labelList | generationCells_ |
Set of cells to generate particles in. More... | |
labelList | inflationCells_ |
Set of cells to inflate particles in, includes all. More... | |
scalar | duration_ |
Injection duration [s]. More... | |
TimeDataEntry< scalar > | flowRateProfile_ |
Flow rate profile relative to SOI [m3/s]. More... | |
TimeDataEntry< scalar > | growthRate_ |
Growth rate of particle diameters towards target [m/s]. More... | |
DynamicList< vectorPairScalarPair > | newParticles_ |
Positions, velocities, diameters and target diameters of. More... | |
scalar | volumeAccumulator_ |
Accumulation variable to carry over volume from one injection. More... | |
scalar | fraction_ |
Fraction of injection controlled by this processor. More... | |
Switch | selfSeed_ |
Switch to control whether or not the injector is allowed. More... | |
scalar | dSeed_ |
Diameter with which to create new seed particles. More... | |
const autoPtr< distributionModels::distributionModel > | sizeDistribution_ |
Parcel size distribution model. More... | |
Additional Inherited Members | |
![]() | |
enum | parcelBasis { pbNumber, pbMass, pbFixed } |
Parcel basis representation options. More... | |
typedef CloudType::parcelType | parcelType |
Convenience typedef for parcelType. More... | |
![]() | |
typedef CloudType | cloudType |
Type of cloud this model was instantiated for. More... | |
![]() | |
static autoPtr< InjectionModel< CloudType > > | New (const dictionary &dict, CloudType &owner) |
Selector with lookup from dictionary. More... | |
static autoPtr< InjectionModel< CloudType > > | New (const dictionary &dict, const word &modelName, const word &modelType, CloudType &owner) |
Selector with name and type. More... | |
![]() | |
virtual bool | prepareForNextTimeStep (const scalar time, label &newParcels, scalar &newVolumeFraction) |
Determine properties for next time step/injection interval. More... | |
virtual bool | findCellAtPosition (label &cellI, label &tetFaceI, label &tetPtI, vector &position, bool errorOnNotFound=true) |
Find the cell that contains the supplied position. More... | |
virtual scalar | setNumberOfParticles (const label parcels, const scalar volumeFraction, const scalar diameter, const scalar rho) |
Set number of particles to inject given parcel properties. More... | |
virtual void | postInjectCheck (const label parcelsAdded, const scalar massAdded) |
Post injection checks. More... | |
![]() | |
bool | inLine () const |
Flag to indicate whether data is/was read in-line. More... | |
![]() | |
scalar | SOI_ |
Start of injection [s]. More... | |
scalar | volumeTotal_ |
Total volume of particles introduced by this injector [m^3]. More... | |
scalar | massTotal_ |
Total mass to inject [kg]. More... | |
TimeDataEntry< scalar > | massFlowRate_ |
Mass flow rate profile for steady calculations. More... | |
scalar | massInjected_ |
Total mass injected to date [kg]. More... | |
label | nInjections_ |
Number of injections counter. More... | |
label | parcelsAddedTotal_ |
Running counter of total number of parcels added. More... | |
parcelBasis | parcelBasis_ |
Parcel basis enumeration. More... | |
scalar | nParticleFixed_ |
nParticle to assign to parcels when the 'fixed' basis More... | |
scalar | time0_ |
Continuous phase time at start of injection time step [s]. More... | |
scalar | timeStep0_ |
Time at start of injection time step [s]. More... | |
scalar | delayedVolume_ |
Volume that should have been injected, but would lead to. More... | |
label | injectorID_ |
Optional injector ID. More... | |
![]() | |
CloudType & | owner_ |
Reference to the cloud. More... | |
![]() | |
const word | modelName_ |
Name of the sub-model. More... | |
dictionary & | properties_ |
Reference to properties dictionary e.g. for restart. More... | |
const dictionary | dict_ |
Copy of dictionary used during construction. More... | |
const word | baseName_ |
Name of the sub-model base class. More... | |
const word | modelType_ |
Type of the sub-model. More... | |
const dictionary | coeffDict_ |
Coefficients dictionary. More... | |
Inflation injection - creates new particles by splitting existing particles within in a set of generation cells, then inflating them to a target diameter within the generation cells and an additional set of inflation cells.
Definition at line 63 of file InflationInjection.H.
InflationInjection | ( | const dictionary & | dict, |
CloudType & | owner, | ||
const word & | modelName | ||
) |
Construct from dictionary.
Definition at line 38 of file InflationInjection.C.
References primitiveMesh::cellVolumes(), forAll, lookup(), mesh, DSMCCloud< ParcelType >::mesh(), UPstream::parRun(), Foam::readScalar(), Foam::reduce(), and HashTable::toc().
InflationInjection | ( | const InflationInjection< CloudType > & | im | ) |
Construct copy.
Definition at line 126 of file InflationInjection.C.
|
virtual |
Destructor.
Definition at line 150 of file InflationInjection.C.
TypeName | ( | "inflationInjection" | ) |
Runtime type information.
|
inlinevirtual |
Construct and return a clone.
Implements InjectionModel< CloudType >.
Definition at line 133 of file InflationInjection.H.
|
virtual |
Set injector locations when mesh is updated.
Reimplemented from InjectionModel< CloudType >.
Definition at line 157 of file InflationInjection.C.
|
virtual |
Return the end-of-injection time.
Implements InjectionModel< CloudType >.
Definition at line 164 of file InflationInjection.C.
|
virtual |
Number of parcels to introduce relative to SOI.
Implements InjectionModel< CloudType >.
Definition at line 172 of file InflationInjection.C.
References cellOccupancy, DSMCCloud< ParcelType >::cellOccupancy(), Foam::ListListOps::combine(), Cloud::deleteParticle(), Foam::endl(), forAll, HashTable::found(), Pstream::gatherList(), HashSet< Key, Hash >::insert(), UPstream::master(), Foam::max(), mesh, DSMCCloud< ParcelType >::mesh(), Foam::min(), minValue, UPstream::myProcNo(), UPstream::nProcs(), UPstream::parRun(), cachedRandom::position(), R, DSMCCloud< ParcelType >::rndGen(), cachedRandom::sample01(), Pstream::scatter(), Foam::sqrt(), WarningInFunction, x, and Vector< scalar >::zero.
|
virtual |
Volume of parcels to introduce relative to SOI.
Implements InjectionModel< CloudType >.
Definition at line 424 of file InflationInjection.C.
|
virtual |
Set the injection position and owner cell, tetFace and tetPt.
Implements InjectionModel< CloudType >.
Definition at line 442 of file InflationInjection.C.
|
virtual |
Set the parcel properties.
Implements InjectionModel< CloudType >.
Definition at line 467 of file InflationInjection.C.
|
virtual |
Flag to identify whether model fully describes the parcel.
Implements InjectionModel< CloudType >.
Definition at line 483 of file InflationInjection.C.
|
virtual |
Return flag to identify whether or not injection of parcelI is.
permitted
Implements InjectionModel< CloudType >.
Definition at line 490 of file InflationInjection.C.
|
private |
Name of cellSet for generating new particles.
Definition at line 70 of file InflationInjection.H.
|
private |
Name of cellSet for inflating new particles.
Definition at line 73 of file InflationInjection.H.
|
private |
Set of cells to generate particles in.
Definition at line 76 of file InflationInjection.H.
|
private |
Set of cells to inflate particles in, includes all.
generation cells
Definition at line 80 of file InflationInjection.H.
|
private |
Injection duration [s].
Definition at line 83 of file InflationInjection.H.
|
private |
Flow rate profile relative to SOI [m3/s].
Definition at line 86 of file InflationInjection.H.
|
private |
Growth rate of particle diameters towards target [m/s].
Definition at line 89 of file InflationInjection.H.
|
private |
Positions, velocities, diameters and target diameters of.
new particles after splitting
Definition at line 93 of file InflationInjection.H.
|
private |
Accumulation variable to carry over volume from one injection.
to the next
Definition at line 97 of file InflationInjection.H.
|
private |
Fraction of injection controlled by this processor.
Definition at line 100 of file InflationInjection.H.
|
private |
Switch to control whether or not the injector is allowed.
to create new particles in empty cells
Definition at line 104 of file InflationInjection.H.
|
private |
Diameter with which to create new seed particles.
Definition at line 107 of file InflationInjection.H.
|
private |
Parcel size distribution model.
Definition at line 110 of file InflationInjection.H.
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.