Public Types | Public Member Functions | Private Member Functions | Private Attributes
ConeNozzleInjection< CloudType > Class Template Reference

Cone injection. More...

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

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 ("coneNozzleInjection")
 Runtime type information. More...
 
 ConeNozzleInjection (const dictionary &dict, CloudType &owner, const word &modelName)
 Construct from dictionary. More...
 
 ConeNozzleInjection (const ConeNozzleInjection< CloudType > &im)
 Construct copy. More...
 
virtual autoPtr< InjectionModel< CloudType > > clone () const
 Construct and return a clone. More...
 
virtual ~ConeNozzleInjection ()
 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. 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 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...
 
- 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)
 Construct as copy. More...
 
virtual ~CloudSubModelBase ()
 Destructor. More...
 
const CloudTypeowner () const
 Return const access to the owner cloud. More...
 
virtual bool outputTime () const
 Flag to indicate when to write a property. More...
 
CloudTypeowner ()
 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)
 Construct as copy. More...
 
virtual ~subModelBase ()
 Destructor. More...
 
const wordmodelName () const
 Return const access to the name of the sub-model. More...
 
const dictionarydict () const
 Return const access to the cloud dictionary. More...
 
const wordbaseName () const
 Return const access to the base name of the sub-model. More...
 
const wordmodelType () const
 Return const access to the sub-model type. More...
 
const dictionarycoeffDict () const
 Return const access to the coefficients dictionary. More...
 
const dictionaryproperties () 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 Member Functions

void setInjectionMethod ()
 Set the injection type. More...
 
void setFlowType ()
 Set the injection flow type. More...
 

Private Attributes

injectionMethod injectionMethod_
 Point/disc injection method. More...
 
flowType flowType_
 Flow type. More...
 
const scalar outerDiameter_
 Outer nozzle diameter [m]. More...
 
const scalar innerDiameter_
 Inner nozzle diameter [m]. More...
 
scalar duration_
 Injection duration [s]. More...
 
vector position_
 Injector position [m]. More...
 
label injectorCell_
 Cell containing injector position []. More...
 
label tetFaceI_
 Index of tet face for injector cell. More...
 
label tetPtI_
 Index of tet point for injector cell. More...
 
vector direction_
 Injector direction []. More...
 
const label parcelsPerSecond_
 Number of parcels to introduce per second []. More...
 
const TimeDataEntry< scalar > flowRateProfile_
 Flow rate profile relative to SOI []. More...
 
const TimeDataEntry< scalar > thetaInner_
 Inner half-cone angle relative to SOI [deg]. More...
 
const TimeDataEntry< scalar > thetaOuter_
 Outer half-cone angle relative to SOI [deg]. More...
 
const autoPtr< distributionModels::distributionModelsizeDistribution_
 Parcel size PDF model. More...
 
vector tanVec1_
 First tangential vector. More...
 
vector tanVec2_
 Second tangential vector. More...
 
vector normal_
 Injection vector orthogonal to direction. More...
 
scalar UMag_
 Constant velocity [m/s]. More...
 
TimeDataEntry< scalar > Cd_
 Discharge coefficient, relative to SOI [m/s]. More...
 
TimeDataEntry< scalar > Pinj_
 Injection pressure [Pa]. 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...
 
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...
 
- Protected Attributes inherited from CloudSubModelBase< CloudType >
CloudTypeowner_
 Reference to the cloud. More...
 
- Protected Attributes inherited from subModelBase
const word modelName_
 Name of the sub-model. More...
 
dictionaryproperties_
 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...
 

Detailed Description

template<class CloudType>
class Foam::ConeNozzleInjection< CloudType >

Cone injection.

User specifies

Additional

Source files

Definition at line 73 of file ConeNozzleInjection.H.

Member Enumeration Documentation

◆ injectionMethod

Injection method enumeration.

Enumerator
imPoint 
imDisc 

Definition at line 80 of file ConeNozzleInjection.H.

◆ flowType

enum flowType

Flow type enumeration.

Enumerator
ftConstantVelocity 
ftPressureDrivenVelocity 
ftFlowRateAndDischarge 

Definition at line 87 of file ConeNozzleInjection.H.

Constructor & Destructor Documentation

◆ ConeNozzleInjection() [1/2]

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

Construct from dictionary.

Definition at line 99 of file ConeNozzleInjection.C.

References Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::mag(), Foam::nl, rndGen(), DSMCCloud< ParcelType >::rndGen(), and Vector< scalar >::zero.

Here is the call graph for this function:

◆ ConeNozzleInjection() [2/2]

Construct copy.

Definition at line 207 of file ConeNozzleInjection.C.

◆ ~ConeNozzleInjection()

Destructor.

Definition at line 239 of file ConeNozzleInjection.C.

Member Function Documentation

◆ setInjectionMethod()

void setInjectionMethod
private

Set the injection type.

Definition at line 36 of file ConeNozzleInjection.C.

References Foam::exit(), Foam::FatalError, and FatalErrorInFunction.

Here is the call graph for this function:

◆ setFlowType()

void setFlowType
private

Set the injection flow type.

Definition at line 67 of file ConeNozzleInjection.C.

References Foam::exit(), Foam::FatalError, and FatalErrorInFunction.

Here is the call graph for this function:

◆ TypeName()

TypeName ( "coneNozzleInjection"  )

Runtime type information.

◆ clone()

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

Construct and return a clone.

Implements InjectionModel< CloudType >.

Definition at line 198 of file ConeNozzleInjection.H.

◆ updateMesh()

void updateMesh
virtual

Set injector locations when mesh is updated.

Reimplemented from InjectionModel< CloudType >.

Definition at line 246 of file ConeNozzleInjection.C.

◆ timeEnd()

Foam::scalar timeEnd
virtual

Return the end-of-injection time.

Implements InjectionModel< CloudType >.

Definition at line 270 of file ConeNozzleInjection.C.

◆ parcelsToInject()

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

Number of parcels to introduce relative to SOI.

Implements InjectionModel< CloudType >.

Definition at line 278 of file ConeNozzleInjection.C.

◆ volumeToInject()

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

Volume of parcels to introduce relative to SOI.

Implements InjectionModel< CloudType >.

Definition at line 296 of file ConeNozzleInjection.C.

◆ setPositionAndCell()

void setPositionAndCell ( const label  parcelI,
const label  nParcels,
const scalar  time,
vector position,
label cellOwner,
label tetFaceI,
label tetPtI 
)
virtual

Set the injection position and owner cell.

Implements InjectionModel< CloudType >.

Definition at line 314 of file ConeNozzleInjection.C.

References beta(), Foam::cos(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::nl, rndGen(), DSMCCloud< ParcelType >::rndGen(), Foam::sin(), and Foam::constant::mathematical::twoPi().

Here is the call graph for this function:

◆ setProperties()

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

Set the parcel properties.

Implements InjectionModel< CloudType >.

Definition at line 369 of file ConeNozzleInjection.C.

References Foam::constant::atomic::alpha, Foam::cos(), Foam::mag(), Foam::constant::mathematical::pi(), rho, rndGen(), DSMCCloud< ParcelType >::rndGen(), Foam::sin(), and Foam::sqrt().

Here is the call graph for this function:

◆ fullyDescribed()

bool fullyDescribed
virtual

Flag to identify whether model fully describes the parcel.

Implements InjectionModel< CloudType >.

Definition at line 434 of file ConeNozzleInjection.C.

◆ validInjection()

bool validInjection ( const label  parcelI)
virtual

Return flag to identify whether or not injection of parcelI is.

permitted

Implements InjectionModel< CloudType >.

Definition at line 441 of file ConeNozzleInjection.C.

Field Documentation

◆ injectionMethod_

injectionMethod injectionMethod_
private

Point/disc injection method.

Definition at line 100 of file ConeNozzleInjection.H.

◆ flowType_

flowType flowType_
private

Flow type.

Definition at line 103 of file ConeNozzleInjection.H.

◆ outerDiameter_

const scalar outerDiameter_
private

Outer nozzle diameter [m].

Definition at line 106 of file ConeNozzleInjection.H.

◆ innerDiameter_

const scalar innerDiameter_
private

Inner nozzle diameter [m].

Definition at line 109 of file ConeNozzleInjection.H.

◆ duration_

scalar duration_
private

Injection duration [s].

Definition at line 112 of file ConeNozzleInjection.H.

◆ position_

vector position_
private

Injector position [m].

Definition at line 115 of file ConeNozzleInjection.H.

◆ injectorCell_

label injectorCell_
private

Cell containing injector position [].

Definition at line 118 of file ConeNozzleInjection.H.

◆ tetFaceI_

label tetFaceI_
private

Index of tet face for injector cell.

Definition at line 121 of file ConeNozzleInjection.H.

◆ tetPtI_

label tetPtI_
private

Index of tet point for injector cell.

Definition at line 124 of file ConeNozzleInjection.H.

◆ direction_

vector direction_
private

Injector direction [].

Definition at line 127 of file ConeNozzleInjection.H.

◆ parcelsPerSecond_

const label parcelsPerSecond_
private

Number of parcels to introduce per second [].

Definition at line 130 of file ConeNozzleInjection.H.

◆ flowRateProfile_

const TimeDataEntry<scalar> flowRateProfile_
private

Flow rate profile relative to SOI [].

Definition at line 133 of file ConeNozzleInjection.H.

◆ thetaInner_

const TimeDataEntry<scalar> thetaInner_
private

Inner half-cone angle relative to SOI [deg].

Definition at line 136 of file ConeNozzleInjection.H.

◆ thetaOuter_

const TimeDataEntry<scalar> thetaOuter_
private

Outer half-cone angle relative to SOI [deg].

Definition at line 139 of file ConeNozzleInjection.H.

◆ sizeDistribution_

const autoPtr<distributionModels::distributionModel> sizeDistribution_
private

Parcel size PDF model.

Definition at line 142 of file ConeNozzleInjection.H.

◆ tanVec1_

vector tanVec1_
private

First tangential vector.

Definition at line 148 of file ConeNozzleInjection.H.

◆ tanVec2_

vector tanVec2_
private

Second tangential vector.

Definition at line 151 of file ConeNozzleInjection.H.

◆ normal_

vector normal_
private

Injection vector orthogonal to direction.

Definition at line 154 of file ConeNozzleInjection.H.

◆ UMag_

scalar UMag_
private

Constant velocity [m/s].

Definition at line 160 of file ConeNozzleInjection.H.

◆ Cd_

TimeDataEntry<scalar> Cd_
private

Discharge coefficient, relative to SOI [m/s].

Definition at line 163 of file ConeNozzleInjection.H.

◆ Pinj_

TimeDataEntry<scalar> Pinj_
private

Injection pressure [Pa].

Definition at line 166 of file ConeNozzleInjection.H.


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