MercuryDPM
Beta
|
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>
Public Member Functions | |
HopperInsertionBoundary () | |
Default constructor. Sets all properties to 0. More... | |
HopperInsertionBoundary (const HopperInsertionBoundary &other) | |
Copy constructor. More... | |
virtual HopperInsertionBoundary * | copy () const |
copy method, returns a pointer to a copy. More... | |
void | set (BaseParticle *particleToCopy, int maxFailed, double yMin, double yMax, double radMin, double radMax, 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... | |
virtual BaseParticle * | generateParticle (RNG &random) |
This creates 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) |
reads boundary properties from istream More... | |
MERCURY_DEPRECATED void | oldRead (std::istream &is) |
deprecated version of CubeInsertionBoundary::read(). More... | |
void | write (std::ostream &os) const |
writes boundary properties to ostream More... | |
virtual std::string | getName () const |
Returns the name of the object. More... | |
Public Member Functions inherited from InsertionBoundary | |
InsertionBoundary () | |
Default constructor: set everything to 0/nullptr. More... | |
InsertionBoundary (const InsertionBoundary &other) | |
Copy constructor (with deep copy) More... | |
virtual | ~InsertionBoundary () |
Destructor: delete the particle that has to be copied at every insertion. More... | |
void | set (BaseParticle *particleToCopy, unsigned int maxFailed) |
Sets the particle that will be inserted and the maximum number of times for which insertion may fail. More... | |
virtual void | checkBoundaryBeforeTimeStep (DPMBase *md) |
Fills the boundary with particles. More... | |
unsigned int | getNumberOfParticlesInserted () const |
Gets the number of particles inserted by the boundary. More... | |
void | setMaxFailed (unsigned int maxFailed) |
Sets the number of times that the wall may fail to insert a particle. More... | |
unsigned int | getMaxFailed () const |
Gets the number of times that the boundary may fail to insert a particle. More... | |
void | setParticleToCopy (BaseParticle *particleToCopy) |
Sets the particle that will be inserted through the insertion boundary. More... | |
BaseParticle * | getParticleToCopy () const |
Gets the particle that will be inserted through the insertion boundary. More... | |
void | read (std::istream &is) |
Reads the boundary's id_ and maxFailed_. More... | |
void | write (std::ostream &os) const |
Writes the boundary's id_ and maxFailed_. More... | |
Public Member Functions inherited from BaseBoundary | |
BaseBoundary () | |
default constructor. More... | |
BaseBoundary (const BaseBoundary &b) | |
copy constructor More... | |
virtual | ~BaseBoundary () |
destructor More... | |
virtual void | createPeriodicParticles (BaseParticle *P UNUSED, ParticleHandler &pH UNUSED) |
Creates periodic copies of given particle in case of periodic boundaries. More... | |
virtual bool | checkBoundaryAfterParticleMoved (BaseParticle *P UNUSED, ParticleHandler &pH UNUSED) |
Checks if given particle passed the boundary. More... | |
virtual void | checkBoundaryBeforeTimeStep (DPMBase *md UNUSED) |
Fills a (3D) boundary with particles. More... | |
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 constructor. More... | |
BaseObject (const BaseObject &p) | |
Copy constructor, copies all the objects BaseObject contains. More... | |
virtual | ~BaseObject () |
virtual destructor More... | |
virtual void | moveInHandler (const unsigned int index) |
Except that it is virtual, it does the same thing as setIndex() does. More... | |
void | setIndex (const unsigned int index) |
Allows one to assign an index to an object in the handler/container. More... | |
void | setId (const unsigned int 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... | |
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 | radMin_ |
Minimum and maximum radii of the inserted particles. More... | |
double | radMax_ |
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... | |
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:
Definition at line 47 of file HopperInsertionBoundary.h.
HopperInsertionBoundary::HopperInsertionBoundary | ( | ) |
Default constructor. Sets all properties to 0.
Default constructor. Sets all properties to 0. Calls the InsertionBoundary parent default constructor as well.
Definition at line 34 of file HopperInsertionBoundary.cc.
References chuteAngle_, fillPercent_, fixedParticleRadius_, hopperAngle_, hopperDim_, hopperExitLength_, hopperHeight_, hopperLength_, isHopperCentred__, lift_, radMax_, radMin_, yMax_, and yMin_.
Referenced by copy().
HopperInsertionBoundary::HopperInsertionBoundary | ( | const HopperInsertionBoundary & | other | ) |
Copy constructor.
Copy constructor. Calls InsertionBoundary parent copy constructor.
Definition at line 55 of file HopperInsertionBoundary.cc.
References chuteAngle_, fillPercent_, fixedParticleRadius_, hopperAngle_, hopperDim_, hopperExitLength_, hopperHeight_, hopperLength_, isHopperCentred__, lift_, radMax_, radMin_, yMax_, and yMin_.
|
virtual |
copy method, returns a pointer to a copy.
Copy method. Creates a copy on the heap.
Implements BaseBoundary.
Definition at line 78 of file HopperInsertionBoundary.cc.
References HopperInsertionBoundary().
|
virtual |
This creates an inflow particle in the top 50% of the hopper i.e. between gamma=0.5 and gamma=1.0.
This function generates random particles inside the hopper. The space in which the particles are generated is 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 generation 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.
Definition at line 179 of file HopperInsertionBoundary.cc.
References A, chuteAngle_, BaseParticle::copy(), fillPercent_, mathsFunc::gamma(), InsertionBoundary::getParticleToCopy(), BaseParticle::getRadius(), RNG::getRandomNumber(), hopperAngle_, hopperDim_, hopperExitLength_, hopperHeight_, hopperLength_, isHopperCentred__, lift_, BaseInteractable::move(), radMax_, radMin_, BaseInteractable::setPosition(), BaseParticle::setRadius(), BaseInteractable::setVelocity(), yMax_, and yMin_.
|
virtual |
Returns the name of the object.
Returns the name of the object class
Implements BaseObject.
Definition at line 325 of file HopperInsertionBoundary.cc.
void HopperInsertionBoundary::oldRead | ( | std::istream & | is | ) |
deprecated version of CubeInsertionBoundary::read().
Deprecated version of read().
Definition at line 276 of file HopperInsertionBoundary.cc.
References chuteAngle_, fillPercent_, fixedParticleRadius_, hopperAngle_, hopperDim_, hopperExitLength_, hopperHeight_, hopperLength_, isHopperCentred__, lift_, radMax_, radMin_, InsertionBoundary::setMaxFailed(), yMax_, and yMin_.
|
virtual |
reads boundary properties from istream
Reads the boundary properties from an istream
[in,out] | is | the istream |
Implements BaseBoundary.
Definition at line 252 of file HopperInsertionBoundary.cc.
References chuteAngle_, fillPercent_, fixedParticleRadius_, hopperAngle_, hopperDim_, hopperExitLength_, hopperHeight_, hopperLength_, isHopperCentred__, lift_, radMax_, radMin_, InsertionBoundary::read(), yMax_, and yMin_.
void HopperInsertionBoundary::set | ( | BaseParticle * | particleToCopy, |
int | maxFailed, | ||
double | yMin, | ||
double | yMax, | ||
double | radMin, | ||
double | radMax, | ||
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] | radMin | Minimum radius of inserted particles |
[in] | radMax | Maximum radius of inserted particles |
[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')}. |
Definition at line 123 of file HopperInsertionBoundary.cc.
References chuteAngle_, fillPercent_, fixedParticleRadius_, hopperAngle_, hopperDim_, hopperExitLength_, hopperHeight_, hopperLength_, isHopperCentred__, lift_, radMax_, radMin_, InsertionBoundary::setMaxFailed(), InsertionBoundary::setParticleToCopy(), yMax_, and yMin_.
Referenced by ChuteWithHopper::setupInitialConditions().
|
virtual |
writes boundary properties to ostream
Writes boundary's properties to an ostream
[in] | os | the ostream |
Implements BaseBoundary.
Definition at line 302 of file HopperInsertionBoundary.cc.
References chuteAngle_, fillPercent_, fixedParticleRadius_, hopperAngle_, hopperDim_, hopperExitLength_, hopperHeight_, hopperLength_, isHopperCentred__, lift_, radMax_, radMin_, InsertionBoundary::write(), yMax_, and yMin_.
double HopperInsertionBoundary::chuteAngle_ |
Angle of the chute as compared to the horizontal plane.
Definition at line 115 of file HopperInsertionBoundary.h.
Referenced by generateParticle(), HopperInsertionBoundary(), oldRead(), 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')}.
Definition at line 153 of file HopperInsertionBoundary.h.
Referenced by generateParticle(), HopperInsertionBoundary(), oldRead(), read(), set(), and write().
double HopperInsertionBoundary::fixedParticleRadius_ |
Definition at line 125 of file HopperInsertionBoundary.h.
Referenced by HopperInsertionBoundary(), oldRead(), read(), set(), and write().
double HopperInsertionBoundary::hopperAngle_ |
Angle of the hopper as compared to the vertical plane.
Definition at line 120 of file HopperInsertionBoundary.h.
Referenced by generateParticle(), HopperInsertionBoundary(), oldRead(), 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.
Definition at line 166 of file HopperInsertionBoundary.h.
Referenced by generateParticle(), HopperInsertionBoundary(), oldRead(), read(), set(), and write().
double HopperInsertionBoundary::hopperExitLength_ |
The horizontal (AB-direction) width at the square exit of the hopper.
Definition at line 135 of file HopperInsertionBoundary.h.
Referenced by generateParticle(), HopperInsertionBoundary(), oldRead(), 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.
Definition at line 141 of file HopperInsertionBoundary.h.
Referenced by generateParticle(), HopperInsertionBoundary(), oldRead(), read(), set(), and write().
double HopperInsertionBoundary::hopperLength_ |
The horizontal (AB-direction) width at the top of the hopper.
Definition at line 130 of file HopperInsertionBoundary.h.
Referenced by generateParticle(), HopperInsertionBoundary(), oldRead(), read(), set(), and write().
bool HopperInsertionBoundary::isHopperCentred__ |
Definition at line 146 of file HopperInsertionBoundary.h.
Referenced by generateParticle(), HopperInsertionBoundary(), oldRead(), read(), set(), and write().
double HopperInsertionBoundary::lift_ |
Definition at line 158 of file HopperInsertionBoundary.h.
Referenced by generateParticle(), HopperInsertionBoundary(), oldRead(), read(), set(), and write().
double HopperInsertionBoundary::radMax_ |
Definition at line 111 of file HopperInsertionBoundary.h.
Referenced by generateParticle(), HopperInsertionBoundary(), oldRead(), read(), set(), and write().
double HopperInsertionBoundary::radMin_ |
Minimum and maximum radii of the inserted particles.
Definition at line 111 of file HopperInsertionBoundary.h.
Referenced by generateParticle(), HopperInsertionBoundary(), oldRead(), read(), set(), and write().
double HopperInsertionBoundary::yMax_ |
Definition at line 106 of file HopperInsertionBoundary.h.
Referenced by generateParticle(), HopperInsertionBoundary(), oldRead(), 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 .
Definition at line 106 of file HopperInsertionBoundary.h.
Referenced by generateParticle(), HopperInsertionBoundary(), oldRead(), read(), set(), and write().