26 #ifndef BOUNDARIES_INSERTIONBOUNDARY_H
27 #define BOUNDARIES_INSERTIONBOUNDARY_H
181 void read(std::istream& is)
override;
186 void write(std::ostream& os)
const override;
216 void setPSD(std::vector<PSD> psd, std::vector<Mdouble> probability);
221 std::vector<PSD>
getPSD();
Definition: BaseBoundary.h:49
Definition: BaseParticle.h:54
The DPMBase header includes quite a few header files, defining all the handlers, which are essential....
Definition: DPMBase.h:77
Boundary structure for boundaries used for insertion of particles.
Definition: InsertionBoundary.h:50
bool isActivated()
Returns whether the InsertionBoundary is activated.
Definition: InsertionBoundary.cc:392
void activate()
Turns on the InsertionBoundary.
Definition: InsertionBoundary.cc:375
virtual void placeParticle(BaseParticle *p, RNG &random)=0
Purely virtual function that generates the extrinsic properties (position, velocity) of a particle.
Mdouble getInitialVolume() const
Gets the initialVolume() .
Definition: InsertionBoundary.cc:634
Mdouble getVolumeOfParticlesInserted() const
Gets the volume of particles inserted by the boundary.
Definition: InsertionBoundary.cc:356
InsertionBoundary()
Definition: InsertionBoundary.cc:38
void setVolumeFlowRate(Mdouble volumeFlowRate_)
Sets the volume flow rate of the insertion routine.
Definition: InsertionBoundary.cc:625
unsigned int getMaxFailed() const
Gets the number of times that the boundary may fail to insert a particle.
Definition: InsertionBoundary.cc:401
Mdouble samplingInterval_
Definition: InsertionBoundary.h:318
int chosenSpecies_
stores the chosen species for each timestep.
Definition: InsertionBoundary.h:349
void setParticleToCopy(std::vector< BaseParticle * > particleToCopy)
Sets multiple different particles that will be inserted through the insertion boundary.
Definition: InsertionBoundary.cc:411
unsigned int maxFailed_
Number of times that the wall may fail to insert a particle.
Definition: InsertionBoundary.h:270
unsigned int numberOfParticlesInserted_
Number of particles that are already inserted.
Definition: InsertionBoundary.h:275
void setPSD(const PSD psd)
Sets the range of particle radii that may be generated from a user defined PSD.
Definition: InsertionBoundary.cc:675
~InsertionBoundary() override
Destructor: delete the particle that has to be copied at every insertion.
Definition: InsertionBoundary.cc:90
void write(std::ostream &os) const override
Writes the boundary's id_ and maxFailed_.
Definition: InsertionBoundary.cc:559
bool isManuallyInserting_
A flag to enable a top-down class-by-class manual insertion of a PSD; default is FALSE.
Definition: InsertionBoundary.h:339
bool insertParticle(Mdouble time)
Checks the inserted total volume and returns if a particle is still allowed to be inserted.
Definition: InsertionBoundary.cc:150
void setCheckParticleForInteraction(bool checkParticleForInteraction)
Sets the variable that checks if a particle has an interaction.
Definition: InsertionBoundary.cc:727
Mdouble initialVolume_
Definition: InsertionBoundary.h:307
void reset()
resets particle property counter variables.
Definition: InsertionBoundary.cc:365
bool isActivated_
The InsertionBoundary is activated by default. If the InsertionBoundary is deactivated,...
Definition: InsertionBoundary.h:293
bool checkParticleForInteraction_
Checks if a particle has an interaction with a wall or other particles.
Definition: InsertionBoundary.h:323
void deactivate()
Turns off the InsertionBoundary.
Definition: InsertionBoundary.cc:383
unsigned int getNumberOfParticlesInserted() const
Gets the number of particles inserted by the boundary.
Definition: InsertionBoundary.cc:338
Vec3D velMin_
Minimum and maximum velocity of the particles to be inserted.
Definition: InsertionBoundary.h:334
virtual BaseParticle * generateParticle(RNG &random)
Sets the properties of the InsertionBoundary for a single particle type / virtual void set(BaseParti...
Definition: InsertionBoundary.cc:103
void checkBoundaryBeforeTimeStep(DPMBase *md) override
Fills the boundary with particles.
Definition: InsertionBoundary.cc:184
std::vector< PSD > getPSD()
Gets the particle size distributions set by the user.
Definition: InsertionBoundary.cc:700
Mdouble getVolumeFlowRate() const
Gets the volume flow rate of the insertion routine.
Definition: InsertionBoundary.cc:617
bool getCheckParticleForInteraction() const
Gets the variable that checks if a particle has an interaction.
Definition: InsertionBoundary.cc:718
Mdouble massInserted_
Total mass of particles inserted.
Definition: InsertionBoundary.h:280
void setInitialVolume(Mdouble initialVolume)
Gets the Volume which should be inserted by the insertion routine.
Definition: InsertionBoundary.cc:643
std::vector< Mdouble > probability_
vector of probabilities in range [0,1] which determine the mixing ratio of partice size distributions...
Definition: InsertionBoundary.h:344
void setManualInsertion(bool manualInsertion)
Set the flag for a manual PSD insertion routine.
Definition: InsertionBoundary.cc:709
std::vector< PSD > particleSizeDistributionVector_
Defines a particle size distribution as an object of the PSD class; if particleSizeDistributionVector...
Definition: InsertionBoundary.h:329
Mdouble getMassOfParticlesInserted() const
Gets the mass of particles inserted by the boundary.
Definition: InsertionBoundary.cc:347
std::vector< BaseParticle * > getParticleToCopy()
Gets the particles that will be inserted through the insertion boundary.
Definition: InsertionBoundary.cc:458
void setVariableVolumeFlowRate(const std::vector< Mdouble > &variableCumulativeVolumeFlowRate, Mdouble samplingInterval)
Sets a variable volume flow rate.
Definition: InsertionBoundary.cc:658
std::vector< BaseParticle * > particleToCopy_
read Distribution class from file. / friend std::istream& operator>>(std::istream& is,...
Definition: InsertionBoundary.h:265
Mdouble volumeFlowRate_
Definition: InsertionBoundary.h:304
Vec3D velMax_
Definition: InsertionBoundary.h:334
Mdouble volumeInserted_
Total volume of particles inserted.
Definition: InsertionBoundary.h:285
std::vector< Mdouble > variableCumulativeVolumeFlowRate_
Definition: InsertionBoundary.h:315
void read(std::istream &is) override
Reads the boundary's id_ and maxFailed_.
Definition: InsertionBoundary.cc:471
void insertParticles(DPMBase *md)
Fill a certain domain with particles.
Definition: InsertionBoundary.cc:328
Contains a vector with radii and probabilities of a user defined particle size distribution (PSD)
Definition: PSD.h:65
This is a class that generates random numbers i.e. named the Random Number Generator (RNG).
Definition: RNG.h:53