This injector injects particles in a number of cones. The user specifies a position and a direction to inject at, and two angles to inject between. Optionally, this injector can introduce particles over a disc, instead of at a point, in which case inner and outer diameters of the disc are also specified. More...
Public Types | |
enum | injectionMethod { imPoint, imDisc } |
Injection method enumeration. More... | |
enum | flowType { ftConstantVelocity, ftPressureDrivenVelocity, ftFlowRateAndDischarge } |
Flow type enumeration. More... | |
Public Types inherited from InjectionModel< CloudType > | |
enum | parcelBasis { pbNumber, pbMass, pbFixed } |
Parcel basis representation options. More... | |
typedef CloudType::parcelType | parcelType |
Convenience typedef for parcelType. More... | |
Public Types inherited from CloudSubModelBase< CloudType > | |
typedef CloudType | cloudType |
Type of cloud this model was instantiated for. More... | |
Public Member Functions | |
TypeName ("coneInjection") | |
Runtime type information. More... | |
ConeInjection (const dictionary &dict, CloudType &owner, const word &modelName) | |
Construct from dictionary. More... | |
ConeInjection (const ConeInjection< CloudType > &im) | |
Construct copy. More... | |
virtual autoPtr< InjectionModel< CloudType > > | clone () const |
Construct and return a clone. More... | |
virtual | ~ConeInjection () |
Destructor. More... | |
virtual void | topoChange () |
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... | |
Public Member Functions inherited from InjectionModel< CloudType > | |
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 TrackCloudType > | |
void | inject (TrackCloudType &cloud, typename CloudType::parcelType::trackingData &td) |
Main injection loop. More... | |
template<class TrackCloudType > | |
void | injectSteadyState (TrackCloudType &cloud, typename CloudType::parcelType::trackingData &td, const scalar trackTime) |
Main injection loop - steady-state. More... | |
virtual void | info (Ostream &os) |
Write injection info to stream. More... | |
Public Member Functions inherited from CloudSubModelBase< CloudType > | |
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) | |
Copy constructor. More... | |
virtual | ~CloudSubModelBase () |
Destructor. More... | |
const CloudType & | owner () const |
Return const access to the owner cloud. More... | |
virtual bool | writeTime () 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... | |
Public Member Functions inherited from subModelBase | |
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) | |
Copy constructor. 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 void | cacheFields (const bool store) |
Cache dependent 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... | |
void | operator= (const subModelBase &)=delete |
Disallow default bitwise assignment. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from InjectionModel< CloudType > | |
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... | |
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. 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... | |
Protected Member Functions inherited from subModelBase | |
bool | inLine () const |
Flag to indicate whether data is/was read in-line. More... | |
Protected Attributes inherited from InjectionModel< CloudType > | |
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... | |
TimeFunction1< 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... | |
Protected Attributes inherited from CloudSubModelBase< CloudType > | |
CloudType & | owner_ |
Reference to the cloud. More... | |
Protected Attributes inherited from subModelBase | |
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... | |
This injector injects particles in a number of cones. The user specifies a position and a direction to inject at, and two angles to inject between. Optionally, this injector can introduce particles over a disc, instead of at a point, in which case inner and outer diameters of the disc are also specified.
The velocity is specified either as constant, or it is calculated from an injection pressure, or it is calculated from the injector mass flow rate and a discharge coefficient; i.e.:
Constant velocity:
Pressure driven velocity:
Flow rate and discharge:
Property | Description | Required | Default |
---|---|---|---|
position | The injection position | yes | |
direction | The injection direction | yes | |
thetaInner | The inner cone angle | yes | |
thetaOuter | The outer cone angle | yes | |
injectionMethod | Inject at a point or on a disc | no | point |
dInner | The inner disc diameter | if disc or flowRateAndDischarge | |
dInner | The outer disc diameter | if disc or flowRateAndDischarge | |
flowType | Inject with constantVelocity, pressureDrivenVelocity or flowRateAndDischarge | no | constantVelocity |
Umag | The injection velocity | if constantVelocity | |
Pinj | The injection pressure | if pressureDrivenVelocity | |
Cd | The discharge coefficient | if flowRateAndDischarge |
Example specification:
injectionModels { model1 { type coneInjection; // Times SOI 0; duration 1; // Quantities massTotal 0; // <-- not used with these settings parcelBasisType fixed; parcelsPerSecond 1000000; flowRateProfile constant 1; nParticle 1; // Sizes sizeDistribution { type fixedValue; fixedValueDistribution { value 0.0025; } } // Geometry position (-0.15 -0.1 0); direction (1 0 0); thetaInner 0; thetaOuter 45; // - Inject at a point injectionMethod point; //// - Or, inject over a disc: //injectionMethod disc; //dInner 0; //dOuter 0.05; // Velocity // - Inject with constant velocity flowType constantVelocity; Umag 1; //// - Or, inject with flow rate and discharge coefficient //// This also requires massTotal, dInner and dOuter //flowType flowRateAndDischarge; //Cd 0.9; //// - Or, inject at a pressure //flowType pressureDrivenVelocity; //Pinj 10e5; } }
Definition at line 212 of file ConeInjection.H.
enum injectionMethod |
Injection method enumeration.
Enumerator | |
---|---|
imPoint | |
imDisc |
Definition at line 219 of file ConeInjection.H.
enum flowType |
Flow type enumeration.
Enumerator | |
---|---|
ftConstantVelocity | |
ftPressureDrivenVelocity | |
ftFlowRateAndDischarge |
Definition at line 226 of file ConeInjection.H.
ConeInjection | ( | const dictionary & | dict, |
CloudType & | owner, | ||
const word & | modelName | ||
) |
Construct from dictionary.
Definition at line 113 of file ConeInjection.C.
ConeInjection | ( | const ConeInjection< CloudType > & | im | ) |
Construct copy.
Definition at line 204 of file ConeInjection.C.
|
virtual |
Destructor.
Definition at line 234 of file ConeInjection.C.
Referenced by ConeInjection< CloudType >::clone().
TypeName | ( | "coneInjection" | ) |
Runtime type information.
|
inlinevirtual |
Construct and return a clone.
Implements InjectionModel< CloudType >.
Definition at line 331 of file ConeInjection.H.
References ConeInjection< CloudType >::fullyDescribed(), ConeInjection< CloudType >::parcelsToInject(), ConeInjection< CloudType >::setPositionAndCell(), ConeInjection< CloudType >::setProperties(), ConeInjection< CloudType >::timeEnd(), ConeInjection< CloudType >::topoChange(), ConeInjection< CloudType >::validInjection(), ConeInjection< CloudType >::volumeToInject(), and ConeInjection< CloudType >::~ConeInjection().
|
virtual |
Set injector locations when mesh is updated.
Reimplemented from InjectionModel< CloudType >.
Definition at line 241 of file ConeInjection.C.
Referenced by ConeInjection< CloudType >::clone().
|
virtual |
Return the end-of-injection time.
Implements InjectionModel< CloudType >.
Definition at line 258 of file ConeInjection.C.
References ConeInjection< CloudType >::parcelsToInject().
Referenced by ConeInjection< CloudType >::clone().
|
virtual |
Number of parcels to introduce relative to SOI.
Implements InjectionModel< CloudType >.
Definition at line 266 of file ConeInjection.C.
References ConeInjection< CloudType >::volumeToInject().
Referenced by ConeInjection< CloudType >::clone(), and ConeInjection< CloudType >::timeEnd().
|
virtual |
Volume of parcels to introduce relative to SOI.
Implements InjectionModel< CloudType >.
Definition at line 288 of file ConeInjection.C.
References ConeInjection< CloudType >::setPositionAndCell().
Referenced by ConeInjection< CloudType >::clone(), and ConeInjection< CloudType >::parcelsToInject().
|
virtual |
Set the injection position and owner cell, tetFace and tetPt.
Implements InjectionModel< CloudType >.
Definition at line 306 of file ConeInjection.C.
References Foam::cos(), Random::globalScalar01(), n, Foam::normalised(), Foam::perpendicular(), rndGen(), ConeInjection< CloudType >::setProperties(), Foam::sin(), Foam::sqr(), Foam::sqrt(), and Foam::constant::mathematical::twoPi().
Referenced by ConeInjection< CloudType >::clone(), and ConeInjection< CloudType >::volumeToInject().
|
virtual |
Set the parcel properties.
Implements InjectionModel< CloudType >.
Definition at line 374 of file ConeInjection.C.
References Foam::cos(), Foam::degToRad(), Foam::mag(), VectorSpace< Vector< scalar >, scalar, 3 >::max, n, Foam::normalised(), Foam::perpendicular(), Foam::constant::mathematical::pi(), rho, rndGen(), Random::scalar01(), Foam::sin(), Foam::sqr(), Foam::sqrt(), and Foam::constant::mathematical::twoPi().
Referenced by ConeInjection< CloudType >::clone(), and ConeInjection< CloudType >::setPositionAndCell().
|
virtual |
Flag to identify whether model fully describes the parcel.
Implements InjectionModel< CloudType >.
Definition at line 478 of file ConeInjection.C.
Referenced by ConeInjection< CloudType >::clone().
Return flag to identify whether or not injection of parcelI is.
permitted
Implements InjectionModel< CloudType >.
Definition at line 485 of file ConeInjection.C.
Referenced by ConeInjection< CloudType >::clone().