![]() |
|
Inherits from InsertionBoundary Some images are useful to better understand the structure of both the hopper-chute combination, as of the hopper insertion boundary itself: More...
#include <HopperInsertionBoundary.h>
Inheritance diagram for HopperInsertionBoundary:Public Member Functions | |
| HopperInsertionBoundary () | |
| Default constructor. Sets all properties to 0. More... | |
| HopperInsertionBoundary (const HopperInsertionBoundary &other) | |
| Copy constructor. More... | |
| HopperInsertionBoundary * | copy () const override |
| copy method, returns a pointer to a copy. More... | |
| void | set (std::vector< BaseParticle * > particleToCopy, unsigned int maxFailed, double yMin, double yMax, double chuteAngle, double fixedParticleRadius, bool isHopperCentred_, int hopperDim, double hopperAngle, double hopperLength, double hopperExitLength, double hopperHeight, double lift, double fillPercent) |
| Sets all boundary properties at once. More... | |
| void | set (BaseParticle *particleToCopy, unsigned int maxFailed, double yMin, double yMax, double chuteAngle, double fixedParticleRadius, bool isHopperCentred_, int hopperDim, double hopperAngle, double hopperLength, double hopperExitLength, double hopperHeight, double lift, double fillPercent) |
| Sets all boundary properties at once. More... | |
| void | set (BaseParticle *particleToCopy, unsigned int maxFailed, double yMin, double yMax, Mdouble rMin, Mdouble rMax, double chuteAngle, double fixedParticleRadius, bool isHopperCentred_, int hopperDim, double hopperAngle, double hopperLength, double hopperExitLength, double hopperHeight, double lift, double fillPercent) |
| old style set function which assumes a uniform psd. More... | |
| void | placeParticle (BaseParticle *p, RNG &random) override |
| This places an inflow particle in the top 50% of the hopper i.e. between gamma=0.5 and gamma=1.0. 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 BaseParticle * | generateParticle (RNG &random) |
| Sets the properties of the InsertionBoundary for a single particle type / virtual void set(BaseParticle* particleToCopy, unsigned int maxFailed, Vec3D velMin, Vec3D velMax, double radMin, double radMax)=0;. 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... | |
| void | read (std::istream &is) override |
| Reads the boundary's id_ and maxFailed_. More... | |
| void | write (std::ostream &os) const override |
| Writes the boundary's id_ and maxFailed_. 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 | |
| double | yMin_ |
| The minimum and maximum y-positions of the particle for a hopper with vertical walls in the y-direction ('1D hopper'). For the '2D hopper', these variables have no physical meaning, except for the fact that the insertion boundary is centered in the y-direction at (yMax_ - yMin_)/2 . More... | |
| double | yMax_ |
| double | chuteAngle_ |
| Angle of the chute as compared to the horizontal plane. More... | |
| double | hopperAngle_ |
| Angle of the hopper as compared to the vertical plane. More... | |
| double | fixedParticleRadius_ |
| double | hopperLength_ |
| The horizontal (AB-direction) width at the top of the hopper. More... | |
| double | hopperExitLength_ |
| The horizontal (AB-direction) width at the square exit of the hopper. More... | |
| double | hopperHeight_ |
| The vertical (AC-direction) height of the hopper, measured from the top of the hopper to the start of the chute. More... | |
| bool | isHopperCentred__ |
| double | fillPercent_ |
| Percentage of the height of the insertion boundary up to which it should be filled. The part to be filled reaches from the top of the hopper down to {fillPercent * (top - 'position A')}. More... | |
| double | lift_ |
| int | hopperDim_ |
| Either 1 or 2. If 1, the insertion boundary has vertical walls in the y extrema. This is used e.g. for a hopper with periodic walls in the y-direction. If 2, the insertion boundary has the form of an inverted (truncated) pyramid, with equally inclined walls in both AB and Y directions. More... | |
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... | |
Inherits from InsertionBoundary Some images are useful to better understand the structure of both the hopper-chute combination, as of the hopper insertion boundary itself:
| HopperInsertionBoundary::HopperInsertionBoundary | ( | ) |
Default constructor. Sets all properties to 0.
Default constructor. Sets all properties to 0. Calls the InsertionBoundary parent default constructor as well.
References chuteAngle_, fillPercent_, fixedParticleRadius_, hopperAngle_, hopperDim_, hopperExitLength_, hopperHeight_, hopperLength_, isHopperCentred__, lift_, yMax_, and yMin_.
Referenced by copy().
| HopperInsertionBoundary::HopperInsertionBoundary | ( | const HopperInsertionBoundary & | other | ) |
Copy constructor.
Copy constructor. Calls InsertionBoundary parent copy constructor.
References chuteAngle_, fillPercent_, fixedParticleRadius_, hopperAngle_, hopperDim_, hopperExitLength_, hopperHeight_, hopperLength_, isHopperCentred__, lift_, yMax_, and yMin_.
|
overridevirtual |
copy method, returns a pointer to a copy.
Copy method. Creates a copy on the heap.
Implements BaseBoundary.
References HopperInsertionBoundary().
|
overridevirtual |
Returns the name of the object.
Returns the name of the object class
Implements BaseObject.
|
overridevirtual |
This places an inflow particle in the top 50% of the hopper i.e. between gamma=0.5 and gamma=1.0.
This function places random particles inside the hopper. The space in which the particles are placed in a (truncated) triangle in 2D, or a (truncated) pyramid in 3D. Some aspects of the hopper geometry and definitions which are useful in order to understand this particle placement code are:
See also the images provided at the top of this class' documentation.
| [in] | random | random number generator |
Bram: Where does the '40' come from??
The 'one-dimensional' hopper has sloped walls in the AB extrema, while the walls in the AD (Y) extrema are vertical. 'delta' is the randomly generated Y-position of the particle and lies between yMin_ and yMax_ (with a particle radius distance from the extrema on either side).
The 'two-dimensional' hopper has sloped walls in the extrema of both (horizontal) AB and AD directions. I.e., the HopperInsertionBoundary has the form of an inverted (and possibly truncated) pyramid. The possible Y-positions of the generated particle (i.e. delta) in this case is dependent of both the vertical AC-position gamma, and the hopper angle (in this case in the form of its cosine, Hc).
Implements InsertionBoundary.
References calibrate::c, chuteAngle_, mathsFunc::cos(), MultiOpt::delta, fillPercent_, mathsFunc::gamma(), RNG::getRandomNumber(), hopperAngle_, hopperDim_, hopperExitLength_, hopperHeight_, hopperLength_, isHopperCentred__, lift_, p, s, mathsFunc::sin(), yMax_, and yMin_.
|
overridevirtual |
reads boundary properties from istream
Reads the boundary properties from an istream
| [in,out] | is | the istream |
Implements BaseBoundary.
References chuteAngle_, fillPercent_, fixedParticleRadius_, hopperAngle_, hopperDim_, hopperExitLength_, hopperHeight_, hopperLength_, isHopperCentred__, lift_, InsertionBoundary::read(), oomph::Global_string_for_annotation::string(), yMax_, and yMin_.
| void HopperInsertionBoundary::set | ( | BaseParticle * | particleToCopy, |
| unsigned int | maxFailed, | ||
| double | yMin, | ||
| double | yMax, | ||
| double | chuteAngle, | ||
| double | fixedParticleRadius, | ||
| bool | isHopperCentred_, | ||
| int | hopperDim, | ||
| double | hopperAngle, | ||
| double | hopperLength, | ||
| double | hopperExitLength, | ||
| double | hopperHeight, | ||
| double | lift, | ||
| double | fillPercent | ||
| ) |
Sets all boundary properties at once.
Sets all the properties of the chute insertion boundary. See also the images provided at the top of this class' documentation.
| [in] | particleToCopy | Pointer to the BaseParticle which is used as a basis for the particles to be inserted |
| [in] | maxFailed | The maximum number of times the insertion of a particle may be tried and failed before the insertion of particles is considered done. NB: this property is used in the parent's InsertionBoundary::checkBoundaryBeforeTimeStep(). |
| [in] | yMin | The minimum y-position of the particle for a hopper with vertical walls in the y-direction ('1D hopper') |
| [in] | yMax | The maximum y-position of the particle for a hopper with vertical walls in the y-direction ('1D hopper') |
| [in] | chuteAngle | Angle of the chute as compared to the horizontal plane |
| [in] | fixedParticleRadius | |
| [in] | isHopperCentred_ | |
| [in] | hopperDim | Either 1 or 2. If 1, the insertion boundary has vertical walls in the y extrema. This is used e.g. for a hopper with periodic walls in the y-direction. If 2, the insertion boundary has the form of an inverted (truncated) pyramid, with equally inclined walls in both AB and Y directions. |
| [in] | hopperAngle | The angle of the hopper walls relative to the vertical (AC). |
| [in] | hopperLength | The horizontal (AB-dir.) width at the top of the hopper |
| [in] | hopperExitLength | The horizontal (AB-dir.) width at the square exit of the hopper |
| [in] | hopperHeight | The vertical (AC-dir.) height of the hopper, measured from the top of the hopper to the start of the chute. |
| [in] | lift | |
| [in] | fillPercent | Percentage of the height of the insertion boundary up to which it should be filled. The part to be filled reaches from the top of the hopper down to {fillPercent * (top - 'position A')}. |
References chuteAngle_, fillPercent_, fixedParticleRadius_, hopperAngle_, hopperDim_, hopperExitLength_, hopperHeight_, hopperLength_, isHopperCentred__, lift_, InsertionBoundary::maxFailed_, InsertionBoundary::setParticleToCopy(), yMax_, and yMin_.
| void HopperInsertionBoundary::set | ( | BaseParticle * | particleToCopy, |
| unsigned int | maxFailed, | ||
| double | yMin, | ||
| double | yMax, | ||
| Mdouble | rMin, | ||
| Mdouble | rMax, | ||
| double | chuteAngle, | ||
| double | fixedParticleRadius, | ||
| bool | isHopperCentred_, | ||
| int | hopperDim, | ||
| double | hopperAngle, | ||
| double | hopperLength, | ||
| double | hopperExitLength, | ||
| double | hopperHeight, | ||
| double | lift, | ||
| double | fillPercent | ||
| ) |
old style set function which assumes a uniform psd.
old style set function which also assumes a uniform psd. Note if you want a specific PSD do not use but this is quicker for a uniform in size PSD
References set(), PSD::setDistributionUniform(), and InsertionBoundary::setPSD().
| void HopperInsertionBoundary::set | ( | std::vector< BaseParticle * > | particleToCopy, |
| unsigned int | maxFailed, | ||
| double | yMin, | ||
| double | yMax, | ||
| double | chuteAngle, | ||
| double | fixedParticleRadius, | ||
| bool | isHopperCentred_, | ||
| int | hopperDim, | ||
| double | hopperAngle, | ||
| double | hopperLength, | ||
| double | hopperExitLength, | ||
| double | hopperHeight, | ||
| double | lift, | ||
| double | fillPercent | ||
| ) |
Sets all boundary properties at once.
Sets all the properties of the chute insertion boundary. See also the images provided at the top of this class' documentation.
| [in] | particleToCopy | Vector of pointers to the BaseParticles which are used as a basis for the particles to be inserted |
| [in] | maxFailed | The maximum number of times the insertion of a particle may be tried and failed before the insertion of particles is considered done. NB: this property is used in the parent's InsertionBoundary::checkBoundaryBeforeTimeStep(). |
| [in] | yMin | The minimum y-position of the particle for a hopper with vertical walls in the y-direction ('1D hopper') |
| [in] | yMax | The maximum y-position of the particle for a hopper with vertical walls in the y-direction ('1D hopper') |
| [in] | chuteAngle | Angle of the chute as compared to the horizontal plane |
| [in] | fixedParticleRadius | |
| [in] | isHopperCentred_ | |
| [in] | hopperDim | Either 1 or 2. If 1, the insertion boundary has vertical walls in the y extrema. This is used e.g. for a hopper with periodic walls in the y-direction. If 2, the insertion boundary has the form of an inverted (truncated) pyramid, with equally inclined walls in both AB and Y directions. |
| [in] | hopperAngle | The angle of the hopper walls relative to the vertical (AC). |
| [in] | hopperLength | The horizontal (AB-dir.) width at the top of the hopper |
| [in] | hopperExitLength | The horizontal (AB-dir.) width at the square exit of the hopper |
| [in] | hopperHeight | The vertical (AC-dir.) height of the hopper, measured from the top of the hopper to the start of the chute. |
| [in] | lift | |
| [in] | fillPercent | Percentage of the height of the insertion boundary up to which it should be filled. The part to be filled reaches from the top of the hopper down to {fillPercent * (top - 'position A')}. |
References chuteAngle_, fillPercent_, fixedParticleRadius_, hopperAngle_, hopperDim_, hopperExitLength_, hopperHeight_, hopperLength_, isHopperCentred__, lift_, InsertionBoundary::maxFailed_, InsertionBoundary::setParticleToCopy(), yMax_, and yMin_.
Referenced by set(), FullRestartTest::setupInitialConditions(), and ChuteWithHopper::setupInitialConditions().
|
overridevirtual |
writes boundary properties to ostream
Writes boundary's properties to an ostream
| [in] | os | the ostream |
Implements BaseBoundary.
References chuteAngle_, fillPercent_, fixedParticleRadius_, hopperAngle_, hopperDim_, hopperExitLength_, hopperHeight_, hopperLength_, isHopperCentred__, lift_, InsertionBoundary::write(), yMax_, and yMin_.
| double HopperInsertionBoundary::chuteAngle_ |
Angle of the chute as compared to the horizontal plane.
Referenced by HopperInsertionBoundary(), placeParticle(), read(), set(), and write().
| double HopperInsertionBoundary::fillPercent_ |
Percentage of the height of the insertion boundary up to which it should be filled. The part to be filled reaches from the top of the hopper down to {fillPercent * (top - 'position A')}.
Referenced by HopperInsertionBoundary(), placeParticle(), read(), set(), and write().
| double HopperInsertionBoundary::fixedParticleRadius_ |
Referenced by HopperInsertionBoundary(), read(), set(), and write().
| double HopperInsertionBoundary::hopperAngle_ |
Angle of the hopper as compared to the vertical plane.
Referenced by HopperInsertionBoundary(), placeParticle(), read(), set(), and write().
| int HopperInsertionBoundary::hopperDim_ |
Either 1 or 2. If 1, the insertion boundary has vertical walls in the y extrema. This is used e.g. for a hopper with periodic walls in the y-direction. If 2, the insertion boundary has the form of an inverted (truncated) pyramid, with equally inclined walls in both AB and Y directions.
Referenced by HopperInsertionBoundary(), placeParticle(), read(), set(), and write().
| double HopperInsertionBoundary::hopperExitLength_ |
The horizontal (AB-direction) width at the square exit of the hopper.
Referenced by HopperInsertionBoundary(), placeParticle(), read(), set(), and write().
| double HopperInsertionBoundary::hopperHeight_ |
The vertical (AC-direction) height of the hopper, measured from the top of the hopper to the start of the chute.
Referenced by HopperInsertionBoundary(), placeParticle(), read(), set(), and write().
| double HopperInsertionBoundary::hopperLength_ |
The horizontal (AB-direction) width at the top of the hopper.
Referenced by HopperInsertionBoundary(), placeParticle(), read(), set(), and write().
| bool HopperInsertionBoundary::isHopperCentred__ |
Referenced by HopperInsertionBoundary(), placeParticle(), read(), set(), and write().
| double HopperInsertionBoundary::lift_ |
Referenced by HopperInsertionBoundary(), placeParticle(), read(), set(), and write().
| double HopperInsertionBoundary::yMax_ |
Referenced by HopperInsertionBoundary(), placeParticle(), read(), set(), and write().
| double HopperInsertionBoundary::yMin_ |
The minimum and maximum y-positions of the particle for a hopper with vertical walls in the y-direction ('1D hopper'). For the '2D hopper', these variables have no physical meaning, except for the fact that the insertion boundary is centered in the y-direction at (yMax_ - yMin_)/2 .
Referenced by HopperInsertionBoundary(), placeParticle(), read(), set(), and write().