![]() |
|
Like an InsertionBoundary but generates particles of multiple types. Note that, as a child of InsertionBoundary, this class has a member called particleToCopy_, which is a pointer to a particle. This pointer needs to point to something arbitrary but it doesn't matter what the value is. More...
#include <PolydisperseInsertionBoundary.h>
Inheritance diagram for PolydisperseInsertionBoundary:Public Member Functions | |
| PolydisperseInsertionBoundary () | |
| Constructor; sets everything to 0. More... | |
| PolydisperseInsertionBoundary (const PolydisperseInsertionBoundary &other) | |
| Copy constructor with deep copy. More... | |
| ~PolydisperseInsertionBoundary () override | |
| Destructor: default destructor. More... | |
| PolydisperseInsertionBoundary * | copy () const override |
| Creates a copy on the heap and returns a pointer. More... | |
| void | setGeometry (int maxFailed, Vec3D posMin, Vec3D posMax, Vec3D velMin, Vec3D velMax) |
| Set position and velocity of inserted particles. More... | |
| BaseParticle * | getGenerandum (unsigned int spec) const |
| Get the particles that need to be copied. More... | |
| void | addGenerandum (BaseParticle *generandum, double probability, double sizeDispersity) |
| Add a new prototype of particle to be copied. More... | |
| void | setGenerandum (unsigned int spec, BaseParticle *generandum, double probability, double sizeDispersity) |
| Change a particle to be copied. More... | |
| BaseParticle * | generateParticle (RNG &random) override |
| Generates a particle from the possible species. More... | |
| void | placeParticle (BaseParticle *p, RNG &random) override |
| Places the particle in a random position with a random velocity. More... | |
| void | read (std::istream &is) override |
| reads boundary properties from istream More... | |
| void | write (std::ostream &os) const override |
| writes boundary properties to ostream More... | |
| std::string | getName () const override |
| Returns the name of the object. More... | |
Public Member Functions inherited from InsertionBoundary | |
| InsertionBoundary () | |
| InsertionBoundary (const InsertionBoundary &other) | |
| Copy constructor (with deep copy) More... | |
| ~InsertionBoundary () override | |
| Destructor: delete the particle that has to be copied at every insertion. More... | |
| virtual void | shiftBoundary (Vec3D shift) |
| virtual function that shifts the boundary. More... | |
| virtual void | rotateBoundary (Vec3D angle) |
| virtual function that rotates the boundary. More... | |
| void | checkBoundaryBeforeTimeStep (DPMBase *md) override |
| Fills the boundary with particles. More... | |
| void | insertParticles (DPMBase *md) |
| Fill a certain domain with particles. More... | |
| unsigned int | getNumberOfParticlesInserted () const |
| Gets the number of particles inserted by the boundary. More... | |
| Mdouble | getMassOfParticlesInserted () const |
| Gets the mass of particles inserted by the boundary. More... | |
| Mdouble | getVolumeOfParticlesInserted () const |
| Gets the volume of particles inserted by the boundary. More... | |
| void | reset () |
| resets particle property counter variables. More... | |
| void | activate () |
| Turns on the InsertionBoundary. More... | |
| void | deactivate () |
| Turns off the InsertionBoundary. More... | |
| bool | isActivated () |
| Returns whether the InsertionBoundary is activated. More... | |
| unsigned int | getMaxFailed () const |
| Gets the number of times that the boundary may fail to insert a particle. More... | |
| void | setParticleToCopy (std::vector< BaseParticle * > particleToCopy) |
| Sets multiple different particles that will be inserted through the insertion boundary. More... | |
| void | setParticleToCopy (BaseParticle *particleToCopy) |
| Sets the particle that will be inserted through the insertion boundary. More... | |
| std::vector< BaseParticle * > | getParticleToCopy () |
| Gets the particles that will be inserted through the insertion boundary. More... | |
| Mdouble | getVolumeFlowRate () const |
| Gets the volume flow rate of the insertion routine. More... | |
| void | setVolumeFlowRate (Mdouble volumeFlowRate) |
| Sets the volume flow rate of the insertion routine. More... | |
| Mdouble | getInitialVolume () const |
| Gets the initialVolume() . More... | |
| void | setInitialVolume (Mdouble initialVolume) |
| Gets the Volume which should be inserted by the insertion routine. More... | |
| void | setPSD (const PSD psd) |
| Sets the range of particle radii that may be generated from a user defined PSD. More... | |
| void | setPSD (std::vector< PSD > psd, std::vector< Mdouble > probability) |
| Sets the ranges of particle radii that may be generated from user defined PSDs. More... | |
| std::vector< PSD > | getPSD () |
| Gets the particle size distributions set by the user. More... | |
| void | setVariableVolumeFlowRate (const std::vector< Mdouble > &variableCumulativeVolumeFlowRate, Mdouble samplingInterval) |
| Sets a variable volume flow rate. More... | |
| bool | insertParticle (Mdouble time) |
| Checks the inserted total volume and returns if a particle is still allowed to be inserted. More... | |
| bool | getCheckParticleForInteraction () const |
| Gets the variable that checks if a particle has an interaction. More... | |
| void | setCheckParticleForInteraction (bool checkParticleForInteraction) |
| Sets the variable that checks if a particle has an interaction. More... | |
| void | setManualInsertion (bool manualInsertion) |
| Set the flag for a manual PSD insertion routine. More... | |
Public Member Functions inherited from BaseBoundary | |
| BaseBoundary () | |
| default constructor. More... | |
| BaseBoundary (const BaseBoundary &b) | |
| copy constructor More... | |
| ~BaseBoundary () override | |
| destructor More... | |
| virtual void | createPeriodicParticle (BaseParticle *p UNUSED, ParticleHandler &pH UNUSED) |
| Creates a periodic particle in case of periodic boundaries in serial build. More... | |
| virtual void | createPeriodicParticles (ParticleHandler &pH UNUSED) |
| Creates periodic copies of given particle in case of periodic boundaries. More... | |
| virtual void | checkBoundaryAfterParticlesMove (ParticleHandler &pH) |
| Virtual function that does things to particles, each time step after particles have moved. More... | |
| virtual void | actionsBeforeTimeLoop () |
| Virtual function that does something after DPMBase::setupInitialConditions but before the first time step. More... | |
| virtual void | modifyGhostAfterCreation (BaseParticle *particle, int i) |
| virtual void | writeVTK (std::fstream &file) |
| void | setHandler (BoundaryHandler *handler) |
| Sets the boundary's BoundaryHandler. More... | |
| BoundaryHandler * | getHandler () const |
| Returns the boundary's BoundaryHandler. More... | |
Public Member Functions inherited from BaseObject | |
| BaseObject ()=default | |
| Default constructor. More... | |
| BaseObject (const BaseObject &p)=default | |
| Copy constructor, copies all the objects BaseObject contains. More... | |
| virtual | ~BaseObject ()=default |
| virtual destructor More... | |
| virtual void | moveInHandler (unsigned int index) |
| Except that it is virtual, it does the same thing as setIndex() does. More... | |
| void | setIndex (unsigned int index) |
| Allows one to assign an index to an object in the handler/container. More... | |
| void | setId (unsigned long id) |
| Assigns a unique identifier to each object in the handler (container) which remains constant even after the object is deleted from the container/handler. More... | |
| unsigned int | getIndex () const |
| Returns the index of the object in the handler. More... | |
| unsigned int | getId () const |
| Returns the unique identifier of any particular object. More... | |
| void | setGroupId (unsigned groupId) |
| unsigned | getGroupId () const |
Public Attributes | |
| std::vector< BaseParticle * > | generanda_ |
| Prototypes of the particles that can be generated. More... | |
| std::vector< Mdouble > | probabilitates_ |
| The probabilities of generating each type of particle. These probabilities are not normalised. More... | |
| std::vector< Mdouble > | sizeDispersities_ |
| The dispersity allowed in the particle size. More... | |
| Vec3D | posMin_ |
| As in CubeInsertionBoundary. JMFT: TODO: Later we should completely separate InsertionBoundary geometry from their 'intrinsics', so that the code from CubeInsertionBoundary can be recycled. More... | |
| Vec3D | posMax_ |
| Vec3D | velMin_ |
| Vec3D | velMax_ |
| std::vector< unsigned int > | numbersInserted_ |
| For keeping track of how much of each prototype we have inserted. More... | |
| std::vector< Mdouble > | massesInserted_ |
| std::vector< Mdouble > | volumesInserted_ |
Public Attributes inherited from InsertionBoundary | |
| std::vector< BaseParticle * > | particleToCopy_ |
| read Distribution class from file. / friend std::istream& operator>>(std::istream& is, InsertionBoundary::Distribution& type); More... | |
| unsigned int | maxFailed_ |
| Number of times that the wall may fail to insert a particle. More... | |
| unsigned int | numberOfParticlesInserted_ |
| Number of particles that are already inserted. More... | |
| Mdouble | massInserted_ |
| Total mass of particles inserted. More... | |
| Mdouble | volumeInserted_ |
| Total volume of particles inserted. More... | |
| bool | isActivated_ |
| The InsertionBoundary is activated by default. If the InsertionBoundary is deactivated, then it introduces no particles (useful for trying to maintain a certain insertion rate). More... | |
| Mdouble | volumeFlowRate_ |
| Mdouble | initialVolume_ |
| std::vector< Mdouble > | variableCumulativeVolumeFlowRate_ |
| Mdouble | samplingInterval_ |
| bool | checkParticleForInteraction_ |
| Checks if a particle has an interaction with a wall or other particles. More... | |
| std::vector< PSD > | particleSizeDistributionVector_ |
| Defines a particle size distribution as an object of the PSD class; if particleSizeDistributionVector_ is empty, distribution_ is used instead. More... | |
| Vec3D | velMin_ |
| Minimum and maximum velocity of the particles to be inserted. More... | |
| Vec3D | velMax_ |
| bool | isManuallyInserting_ |
| A flag to enable a top-down class-by-class manual insertion of a PSD; default is FALSE. More... | |
| std::vector< Mdouble > | probability_ |
| vector of probabilities in range [0,1] which determine the mixing ratio of partice size distributions. More... | |
| int | chosenSpecies_ |
| stores the chosen species for each timestep. More... | |
| BaseParticle * | p0 = nullptr |
| pointer to the next particle that should be inserted (needs to be stored across time steps). More... | |
Like an InsertionBoundary but generates particles of multiple types. Note that, as a child of InsertionBoundary, this class has a member called particleToCopy_, which is a pointer to a particle. This pointer needs to point to something arbitrary but it doesn't matter what the value is.
| PolydisperseInsertionBoundary::PolydisperseInsertionBoundary | ( | ) |
Constructor; sets everything to 0.
Deprecated boundary which was used to insert PSDs into Mercury.
Referenced by copy().
| PolydisperseInsertionBoundary::PolydisperseInsertionBoundary | ( | const PolydisperseInsertionBoundary & | other | ) |
Copy constructor with deep copy.
References generanda_, i, massesInserted_, numbersInserted_, posMax_, posMin_, probabilitates_, sizeDispersities_, velMax_, velMin_, and volumesInserted_.
|
override |
| void PolydisperseInsertionBoundary::addGenerandum | ( | BaseParticle * | generandum, |
| double | probability, | ||
| double | sizeDispersity | ||
| ) |
Add a new prototype of particle to be copied.
References BaseParticle::copy(), generanda_, INFO, logger, massesInserted_, numbersInserted_, probabilitates_, sizeDispersities_, and volumesInserted_.
|
overridevirtual |
Creates a copy on the heap and returns a pointer.
Implements BaseBoundary.
References INFO, logger, and PolydisperseInsertionBoundary().
|
overridevirtual |
Generates a particle from the possible species.
Reimplemented from InsertionBoundary.
References check(), generanda_, RNG::getRandomNumber(), i, logger, massesInserted_, numbersInserted_, Global_Physical_Variables::P, p, probabilitates_, UniformPSDSelfTest::radius, sizeDispersities_, and VERBOSE.
| BaseParticle* PolydisperseInsertionBoundary::getGenerandum | ( | unsigned int | spec | ) | const |
Get the particles that need to be copied.
|
overridevirtual |
Returns the name of the object.
Implements BaseObject.
|
overridevirtual |
Places the particle in a random position with a random velocity.
Implements InsertionBoundary.
References RNG::getRandomNumber(), Global_Physical_Variables::P, posMax_, posMin_, velMax_, velMin_, Vec3D::X, Vec3D::Y, and Vec3D::Z.
|
overridevirtual |
reads boundary properties from istream
Reimplemented from InsertionBoundary.
References InsertionBoundary::read().
| void PolydisperseInsertionBoundary::setGenerandum | ( | unsigned int | spec, |
| BaseParticle * | generandum, | ||
| double | probability, | ||
| double | sizeDispersity | ||
| ) |
Change a particle to be copied.
References BaseParticle::copy(), ERROR, generanda_, INFO, logger, massesInserted_, numbersInserted_, probabilitates_, sizeDispersities_, volumesInserted_, and WARN.
| void PolydisperseInsertionBoundary::setGeometry | ( | int | maxFailed, |
| Vec3D | posMin, | ||
| Vec3D | posMax, | ||
| Vec3D | velMin, | ||
| Vec3D | velMax | ||
| ) |
Set position and velocity of inserted particles.
References InsertionBoundary::maxFailed_, posMax_, posMin_, velMax_, and velMin_.
|
overridevirtual |
writes boundary properties to ostream
Reimplemented from InsertionBoundary.
References generanda_, i, logger, posMax_, posMin_, probabilitates_, sizeDispersities_, velMax_, velMin_, VERBOSE, and InsertionBoundary::write().
| std::vector<BaseParticle*> PolydisperseInsertionBoundary::generanda_ |
Prototypes of the particles that can be generated.
Referenced by addGenerandum(), generateParticle(), PolydisperseInsertionBoundary(), setGenerandum(), write(), and ~PolydisperseInsertionBoundary().
| std::vector<Mdouble> PolydisperseInsertionBoundary::massesInserted_ |
Referenced by addGenerandum(), generateParticle(), PolydisperseInsertionBoundary(), and setGenerandum().
For keeping track of how much of each prototype we have inserted.
Referenced by addGenerandum(), generateParticle(), PolydisperseInsertionBoundary(), and setGenerandum().
| Vec3D PolydisperseInsertionBoundary::posMax_ |
Referenced by placeParticle(), PolydisperseInsertionBoundary(), setGeometry(), and write().
| Vec3D PolydisperseInsertionBoundary::posMin_ |
As in CubeInsertionBoundary. JMFT: TODO: Later we should completely separate InsertionBoundary geometry from their 'intrinsics', so that the code from CubeInsertionBoundary can be recycled.
Referenced by placeParticle(), PolydisperseInsertionBoundary(), setGeometry(), and write().
| std::vector<Mdouble> PolydisperseInsertionBoundary::probabilitates_ |
The probabilities of generating each type of particle. These probabilities are not normalised.
Referenced by addGenerandum(), generateParticle(), PolydisperseInsertionBoundary(), setGenerandum(), and write().
| std::vector<Mdouble> PolydisperseInsertionBoundary::sizeDispersities_ |
The dispersity allowed in the particle size.
Referenced by addGenerandum(), generateParticle(), PolydisperseInsertionBoundary(), setGenerandum(), and write().
| Vec3D PolydisperseInsertionBoundary::velMax_ |
Referenced by placeParticle(), PolydisperseInsertionBoundary(), setGeometry(), and write().
| Vec3D PolydisperseInsertionBoundary::velMin_ |
Referenced by placeParticle(), PolydisperseInsertionBoundary(), setGeometry(), and write().
| std::vector<Mdouble> PolydisperseInsertionBoundary::volumesInserted_ |
Referenced by addGenerandum(), PolydisperseInsertionBoundary(), and setGenerandum().