5 #ifndef BOUNDARIES_INSERTIONBOUNDARY_H
6 #define BOUNDARIES_INSERTIONBOUNDARY_H
176 void read(std::istream& is)
override;
181 void write(std::ostream& os)
const override;
211 void setPSD(std::vector<PSD> psd, std::vector<Mdouble> probability);
216 std::vector<PSD>
getPSD();
Matrix2d md
Definition: MatrixBase_cast.cpp:1
float * p
Definition: Tutorial_Map_using.cpp:9
Definition: BaseBoundary.h:28
Definition: BaseParticle.h:33
The DPMBase header includes quite a few header files, defining all the handlers, which are essential....
Definition: DPMBase.h:56
Boundary structure for boundaries used for insertion of particles.
Definition: InsertionBoundary.h:29
bool isActivated()
Returns whether the InsertionBoundary is activated.
Definition: InsertionBoundary.cc:359
void activate()
Turns on the InsertionBoundary.
Definition: InsertionBoundary.cc:342
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:611
Mdouble getVolumeOfParticlesInserted() const
Gets the volume of particles inserted by the boundary.
Definition: InsertionBoundary.cc:323
InsertionBoundary()
Definition: InsertionBoundary.cc:17
unsigned int getMaxFailed() const
Gets the number of times that the boundary may fail to insert a particle.
Definition: InsertionBoundary.cc:368
Mdouble samplingInterval_
Definition: InsertionBoundary.h:313
int chosenSpecies_
stores the chosen species for each timestep.
Definition: InsertionBoundary.h:344
void setParticleToCopy(std::vector< BaseParticle * > particleToCopy)
Sets multiple different particles that will be inserted through the insertion boundary.
Definition: InsertionBoundary.cc:378
unsigned int maxFailed_
Number of times that the wall may fail to insert a particle.
Definition: InsertionBoundary.h:265
unsigned int numberOfParticlesInserted_
Number of particles that are already inserted.
Definition: InsertionBoundary.h:270
void setPSD(const PSD psd)
Sets the range of particle radii that may be generated from a user defined PSD.
Definition: InsertionBoundary.cc:652
~InsertionBoundary() override
Destructor: delete the particle that has to be copied at every insertion.
Definition: InsertionBoundary.cc:69
void write(std::ostream &os) const override
Writes the boundary's id_ and maxFailed_.
Definition: InsertionBoundary.cc:536
bool isManuallyInserting_
A flag to enable a top-down class-by-class manual insertion of a PSD; default is FALSE.
Definition: InsertionBoundary.h:334
bool insertParticle(Mdouble time)
Checks the inserted total volume and returns if a particle is still allowed to be inserted.
Definition: InsertionBoundary.cc:129
void setCheckParticleForInteraction(bool checkParticleForInteraction)
Sets the variable that checks if a particle has an interaction.
Definition: InsertionBoundary.cc:712
Mdouble initialVolume_
Definition: InsertionBoundary.h:302
void reset()
resets particle property counter variables.
Definition: InsertionBoundary.cc:332
bool isActivated_
The InsertionBoundary is activated by default. If the InsertionBoundary is deactivated,...
Definition: InsertionBoundary.h:288
bool checkParticleForInteraction_
Checks if a particle has an interaction with a wall or other particles.
Definition: InsertionBoundary.h:318
void deactivate()
Turns off the InsertionBoundary.
Definition: InsertionBoundary.cc:350
unsigned int getNumberOfParticlesInserted() const
Gets the number of particles inserted by the boundary.
Definition: InsertionBoundary.cc:305
Vec3D velMin_
Minimum and maximum velocity of the particles to be inserted.
Definition: InsertionBoundary.h:329
virtual BaseParticle * generateParticle(RNG &random)
Sets the properties of the InsertionBoundary for a single particle type / virtual void set(BaseParti...
Definition: InsertionBoundary.cc:82
void setVolumeFlowRate(Mdouble volumeFlowRate)
Sets the volume flow rate of the insertion routine.
Definition: InsertionBoundary.cc:602
void checkBoundaryBeforeTimeStep(DPMBase *md) override
Fills the boundary with particles.
Definition: InsertionBoundary.cc:163
std::vector< PSD > getPSD()
Gets the particle size distributions set by the user.
Definition: InsertionBoundary.cc:685
Mdouble getVolumeFlowRate() const
Gets the volume flow rate of the insertion routine.
Definition: InsertionBoundary.cc:594
virtual void rotateBoundary(Vec3D angle)
virtual function that rotates the boundary.
Definition: InsertionBoundary.cc:403
bool getCheckParticleForInteraction() const
Gets the variable that checks if a particle has an interaction.
Definition: InsertionBoundary.cc:703
Mdouble massInserted_
Total mass of particles inserted.
Definition: InsertionBoundary.h:275
void setInitialVolume(Mdouble initialVolume)
Gets the Volume which should be inserted by the insertion routine.
Definition: InsertionBoundary.cc:620
std::vector< Mdouble > probability_
vector of probabilities in range [0,1] which determine the mixing ratio of partice size distributions...
Definition: InsertionBoundary.h:339
virtual void shiftBoundary(Vec3D shift)
virtual function that shifts the boundary.
Definition: InsertionBoundary.cc:398
void setManualInsertion(bool manualInsertion)
Set the flag for a manual PSD insertion routine.
Definition: InsertionBoundary.cc:694
std::vector< PSD > particleSizeDistributionVector_
Defines a particle size distribution as an object of the PSD class; if particleSizeDistributionVector...
Definition: InsertionBoundary.h:324
Mdouble getMassOfParticlesInserted() const
Gets the mass of particles inserted by the boundary.
Definition: InsertionBoundary.cc:314
std::vector< BaseParticle * > getParticleToCopy()
Gets the particles that will be inserted through the insertion boundary.
Definition: InsertionBoundary.cc:435
void setVariableVolumeFlowRate(const std::vector< Mdouble > &variableCumulativeVolumeFlowRate, Mdouble samplingInterval)
Sets a variable volume flow rate.
Definition: InsertionBoundary.cc:635
BaseParticle * p0
pointer to the next particle that should be inserted (needs to be stored across time steps).
Definition: InsertionBoundary.h:349
std::vector< BaseParticle * > particleToCopy_
read Distribution class from file. / friend std::istream& operator>>(std::istream& is,...
Definition: InsertionBoundary.h:260
Mdouble volumeFlowRate_
Definition: InsertionBoundary.h:299
Vec3D velMax_
Definition: InsertionBoundary.h:329
Mdouble volumeInserted_
Total volume of particles inserted.
Definition: InsertionBoundary.h:280
std::vector< Mdouble > variableCumulativeVolumeFlowRate_
Definition: InsertionBoundary.h:310
void read(std::istream &is) override
Reads the boundary's id_ and maxFailed_.
Definition: InsertionBoundary.cc:448
void insertParticles(DPMBase *md)
Fill a certain domain with particles.
Definition: InsertionBoundary.cc:295
Contains a vector with radii and probabilities of a user defined particle size distribution (PSD)
Definition: PSD.h:47
This is a class that generates random numbers i.e. named the Random Number Generator (RNG).
Definition: RNG.h:32
Definition: Kernel/Math/Vector.h:30
double angle(const double &t)
Angular position as a function of time t.
Definition: jeffery_orbit.cc:98