77#ifndef InjectedParticleDistributionInjection_H
78#define InjectedParticleDistributionInjection_H
94template<
class CloudType>
165 TypeName(
"injectedParticleDistributionInjection");
210 virtual scalar
volumeToInject(
const scalar time0,
const scalar time1);
219 const label nParcels,
231 const label nParcels,
const CloudType & owner() const
Return const access to the owner cloud.
Templated base class for dsmc cloud.
ParcelType parcelType
Type of parcel the cloud was instantiated for.
Interrogates an injectedParticleCloud to convert the raw particle data into a set of 'binned' injecto...
label nParcelsInjected0_
Number of parcels injected in last step (local proc only)
void initialise()
Initialise injectors.
bool applyDistributionMassTotal_
Flag to apply mass calculated from distribution instead of.
scalarList endTime_
List of end time per injector.
const word cloudName_
Name of cloud used to seed the new particles.
label currentSamplei_
Current sample.
virtual autoPtr< InjectionModel< CloudType > > clone() const
Construct and return a clone.
PtrList< distributionModels::general > sizeDistribution_
List of size distribution model per injector.
virtual scalar volumeToInject(const scalar time0, const scalar time1)
Volume of parcels to introduce relative to SOI.
virtual label parcelsToInject(const scalar time0, const scalar time1)
Number of parcels to introduce relative to SOI.
void info(Ostream &os)
Write injection info to stream.
label nParcelsInjected_
Running total of number of parcels injected.
scalarList startTime_
List of start time per injector.
vector positionOffset_
Position offset to apply to input positions.
virtual bool validInjection(const label parcelI)
Return flag to identify whether or not injection of parcelI is.
scalar binWidth_
Bin width when generating particle distributions.
scalarList volumeFlowRate_
List of volume flow rate per injector [m3/s].
List< vectorList > position_
List of position per injector.
List< vectorList > U_
List of parcel velocity per injector.
virtual void setProperties(const label parcelI, const label nParcels, const scalar time, typename CloudType::parcelType &parcel)
Set the parcel properties.
TypeName("injectedParticleDistributionInjection")
Runtime type information.
Switch ignoreOutOfBounds_
Flag to suppress errors if particle injection site is out-of-bounds.
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 ~InjectedParticleDistributionInjection()
Destructor.
scalar parcelsPerInjector_
Target number of parcels to inject per injector.
label currentInjectori_
Current injector.
virtual void updateMesh()
Set injector locations when mesh is updated.
virtual bool fullyDescribed() const
Flag to identify whether model fully describes the parcel.
label resampleSize_
Resample size.
scalar timeEnd() const
Return the end-of-injection time.
Templated injection model class.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
const dictionary & dict() const
Return const access to the cloud dictionary.
const word & modelName() const
Return const access to the name of the sub-model.
A class for handling words, derived from Foam::string.
OBJstream os(runTime.globalPath()/outputName)
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.