MercuryDPM  Alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
HopperInsertionBoundary Class Reference

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...
 
virtual HopperInsertionBoundarycopy () 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 BaseParticlegenerateParticle (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...
 
BaseParticlegetParticleToCopy () 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...
 
BoundaryHandlergetHandler () 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...
 

Additional Inherited Members

- Protected Attributes inherited from InsertionBoundary
BaseParticleparticleToCopy_
 Particle that will be inserted through the insertion boundary. 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...
 

Detailed Description

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:

hopper.jpg
Image clarifying the definitions of the data members hopperLength_, hopperExitLength, hopperHeight_ and hopperAngle_.
hopper_add_particle.jpg
Image shows the AC and AB directions used to determine a particle position inside the hopper. NB: the X and Z directions are in the same plane, but pointed along the chute and normal to the chute, respectively.
Todo:
(BvdH) Better graphical diagrams are needed for further clarification, as well as some property renaming.

Definition at line 47 of file HopperInsertionBoundary.h.

Constructor & Destructor Documentation

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().

35 {
36  yMin_ = 0.0;
37  yMax_ = 0.0;
38  radMin_ = 0.0;
39  radMax_ = 0.0;
40  chuteAngle_ = 0.0;
42  isHopperCentred__ = true;
43  hopperDim_ = 0;
44  hopperAngle_ = 0.0;
45  hopperLength_ = 0.0;
46  hopperExitLength_ = 0.0;
47  hopperHeight_ = 0.0;
48  lift_ = 0.0;
49  fillPercent_ = 0.0;
50 }
double hopperExitLength_
The horizontal (AB-direction) width at the square exit of the hopper.
double radMin_
Minimum and maximum radii of the inserted particles.
InsertionBoundary()
Default constructor: set everything to 0/nullptr.
double hopperHeight_
The vertical (AC-direction) height of the hopper, measured from the top of the hopper to the start of...
double hopperLength_
The horizontal (AB-direction) width at the top of the hopper.
int hopperDim_
Either 1 or 2. If 1, the insertion boundary has vertical walls in the y extrema. This is used e...
double hopperAngle_
Angle of the hopper as compared to the vertical plane.
double chuteAngle_
Angle of the chute as compared to the horizontal plane.
double yMin_
The minimum and maximum y-positions of the particle for a hopper with vertical walls in the y-directi...
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')}.
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_.

56  : InsertionBoundary(other)
57 {
58  yMin_ = other.yMin_;
59  yMax_ = other.yMax_;
60  radMin_ = other.radMin_;
61  radMax_ = other.radMax_;
62  chuteAngle_ = other.chuteAngle_;
65  hopperDim_ = other.hopperDim_;
66  hopperAngle_ = other.hopperAngle_;
70  lift_ = other.lift_;
71  fillPercent_ = other.fillPercent_;
72 }
double hopperExitLength_
The horizontal (AB-direction) width at the square exit of the hopper.
double radMin_
Minimum and maximum radii of the inserted particles.
InsertionBoundary()
Default constructor: set everything to 0/nullptr.
double hopperHeight_
The vertical (AC-direction) height of the hopper, measured from the top of the hopper to the start of...
double hopperLength_
The horizontal (AB-direction) width at the top of the hopper.
int hopperDim_
Either 1 or 2. If 1, the insertion boundary has vertical walls in the y extrema. This is used e...
double hopperAngle_
Angle of the hopper as compared to the vertical plane.
double chuteAngle_
Angle of the chute as compared to the horizontal plane.
double yMin_
The minimum and maximum y-positions of the particle for a hopper with vertical walls in the y-directi...
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')}.

Member Function Documentation

HopperInsertionBoundary * HopperInsertionBoundary::copy ( ) const
virtual

copy method, returns a pointer to a copy.

Copy method. Creates a copy on the heap.

Returns
Pointer to the copy.

Implements BaseBoundary.

Definition at line 78 of file HopperInsertionBoundary.cc.

References HopperInsertionBoundary().

79 {
80 #ifdef DEBUG_CONSTRUCTOR
81  std::cout << "HopperInsertionBoundary::copy() const finished" << std::endl;
82 #endif
83  return new HopperInsertionBoundary(*this);
84 }
HopperInsertionBoundary()
Default constructor. Sets all properties to 0.
BaseParticle * HopperInsertionBoundary::generateParticle ( RNG random)
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:

  • In the hopper simulation, the direction of the CHUTE is defined to be the X-direction, while the normal of the chute is defined to be the Z-direction. This means that gravity is NOT in the negative Z-direction, but is actually on an angle w.r.t. the X and Z axes. NB: AC and AB are unit vectors in the direction of negative gravity and the 'normal' horizontal plane, respectively.
  • The third dimensional direction, which points into the plane spanned by the X and Z directions, or the AC and AB directions alternatively, is equal for either of the two definitions. Ergo, AD = the unit vector in the Y-direction. This dimension is not used in the 2D case.
  • The hopper is filled with particles from the base of the inverted triangle/pyramid (which defines the upper part of the hopper) down to a certain percentage fillPercent_ of the hopper depth. fillPercent_=100 will fill entire inverted triangle/pyramid down to it tip (position A). 'gamma' is the random height between the base and given fillPercent_ at which the generated particle is placed. NB: 'down' in this case means negative AC (vertical) direction.

See also the images provided at the top of this class' documentation.

Todo:
(BvdH) make a nice (InkScape) diagram with all useful properties in one image, and some angles explaining the definitions of AB and AC directions, the P->setPosition operation and the calculation of the Z-direction of the Vec3D A position.
Parameters
[in]randomrandom number generator
Returns
pointer to the particle generated

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).

Bug:
for periodic walls this should be only minus one particle radius, this should be fixed at some point. Thomas' response: using one particle radius gives problems when the wall is not orthogonal to the y-direction; the distance has to be slightly higher than one; if you can figure out the exact value, then correct it please.
Todo:
Thomas, could you check if this bug is still valid? (BvdH)

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(), mathsFunc::cos(), 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(), mathsFunc::sin(), yMax_, and yMin_.

180 {
181  // create particle and assign a random radius
184 
185  //Define an orthogonal coordinate system this is useful in the hopper, see
186  //diagram in html documentation for details.
187  static Mdouble s = mathsFunc::sin(chuteAngle_);
188  static Mdouble c = mathsFunc::cos(chuteAngle_);
189  static Mdouble Hc = mathsFunc::cos(hopperAngle_);
190  static Mdouble Ht = mathsFunc::sin(hopperAngle_)/Hc; //tangent
191  static Vec3D AB = Vec3D(c, 0.0, s);
192  static Vec3D AC = Vec3D(-s, 0.0, c);
193  static Vec3D AD = Vec3D(0.0, 1.0, 0.0);
194 
195  //Point A is located in the centre of the hopper.
196  static Vec3D A = Vec3D(isHopperCentred__ ? 40 : 0.0,
197  (yMax_ - yMin_) / 2.0,
198  s * (-0.5 * (hopperLength_ - hopperExitLength_)) + c * hopperHeight_)
199  + AB * 0.5 * hopperLength_
200  + AC * (-0.5 * hopperLength_ / Ht);
201 
202  Mdouble gamma = random.getRandomNumber((100.0 - fillPercent_) / 100.0, 1.0);
203  //std::cout<<"gamma="<<gamma<<"fillPercent="<<fillPercent_<<std::endl;
204 
205  Mdouble delta;
206 
207  if (hopperDim_ == 1)
208  {
216  delta = random.getRandomNumber(-0.5, 0.5) * (yMax_ - yMin_ - 2.0 * P->getRadius());
222 
223  }
224  else
225  {
234  delta = (random.getRandomNumber(-1.0, 1.0) * (0.5 * gamma * hopperLength_ - P->getRadius() / Hc));
235  }
236  //std::cout<<A<<" "<<AC<<" "<<AB<<" "<<AD<<" "<<Hc<<" "<<Ht<<"gamma="<<gamma<<" "<<hopperLength_<<" "<<delta<<std::endl;
237  P->setPosition(A
238  + AC * (gamma * 0.5 * hopperLength_ / Ht)
239  + AB * (random.getRandomNumber(-1.0, 1.0) * (0.5 * gamma * hopperLength_ - P->getRadius() / Hc))
240  + AD * delta);
241 
242  P->move(Vec3D(0.0, 0.0, lift_));
243  P->setVelocity(Vec3D(0.0, 0.0, 0.0));
244 
245  return P;
246 }
double hopperExitLength_
The horizontal (AB-direction) width at the square exit of the hopper.
void setVelocity(const Vec3D &velocity)
set the velocity of the BaseInteractable.
double radMin_
Minimum and maximum radii of the inserted particles.
double Mdouble
double hopperHeight_
The vertical (AC-direction) height of the hopper, measured from the top of the hopper to the start of...
double hopperLength_
The horizontal (AB-direction) width at the top of the hopper.
int hopperDim_
Either 1 or 2. If 1, the insertion boundary has vertical walls in the y extrema. This is used e...
void setRadius(const Mdouble radius)
Sets the particle's radius_ (and adjusts the mass_ accordingly, based on the particle's species) ...
Mdouble cos(Mdouble x)
Definition: ExtendedMath.cc:60
Mdouble sin(Mdouble x)
Definition: ExtendedMath.cc:42
double hopperAngle_
Angle of the hopper as compared to the vertical plane.
BaseParticle * getParticleToCopy() const
Gets the particle that will be inserted through the insertion boundary.
Mdouble getRadius() const
Returns the particle's radius_.
double chuteAngle_
Angle of the chute as compared to the horizontal plane.
void setPosition(const Vec3D &position)
Sets the position of this BaseInteractable.
Mdouble gamma(Mdouble gamma_in)
This is the gamma function returns the true value for the half integer value.
Implementation of a 3D vector (by Vitaliy).
Definition: Vector.h:45
virtual void move(const Vec3D &move)
Moves this BaseInteractable by adding an amount to the position.
double yMin_
The minimum and maximum y-positions of the particle for a hopper with vertical walls in the y-directi...
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')}.
Mdouble getRandomNumber(Mdouble min, Mdouble max)
This is a random generating routine can be used for initial positions.
Definition: RNG.cc:101
virtual BaseParticle * copy() const
Particle copy method. It calls to copy constructor of this Particle, useful for polymorfism.
std::string HopperInsertionBoundary::getName ( ) const
virtual

Returns the name of the object.

Returns the name of the object class

Returns
the object's class' name, i.e. 'HopperInsertionBoundary'

Implements BaseObject.

Definition at line 325 of file HopperInsertionBoundary.cc.

326 {
327  return "HopperInsertionBoundary";
328 }
void HopperInsertionBoundary::oldRead ( std::istream &  is)

deprecated version of CubeInsertionBoundary::read().

Deprecated version of read().

Deprecated:
Should be gone by Mercury 2.0. Instead, use CubeInsertionBoundary::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_.

277 {
278  int maxFailed;
279  std::string dummy;
280  is >> dummy >> maxFailed
281  >> dummy >> yMin_
282  >> dummy >> yMax_
283  >> dummy >> radMin_
284  >> dummy >> radMax_
285  >> dummy >> chuteAngle_
286  >> dummy >> fixedParticleRadius_
287  >> dummy >> isHopperCentred__
288  >> dummy >> hopperDim_
289  >> dummy >> hopperAngle_
290  >> dummy >> hopperLength_
291  >> dummy >> hopperExitLength_
292  >> dummy >> hopperHeight_
293  >> dummy >> lift_
294  >> dummy >> fillPercent_;
295  setMaxFailed(maxFailed);
296 }
double hopperExitLength_
The horizontal (AB-direction) width at the square exit of the hopper.
double radMin_
Minimum and maximum radii of the inserted particles.
double hopperHeight_
The vertical (AC-direction) height of the hopper, measured from the top of the hopper to the start of...
double hopperLength_
The horizontal (AB-direction) width at the top of the hopper.
void setMaxFailed(unsigned int maxFailed)
Sets the number of times that the wall may fail to insert a particle.
int hopperDim_
Either 1 or 2. If 1, the insertion boundary has vertical walls in the y extrema. This is used e...
double hopperAngle_
Angle of the hopper as compared to the vertical plane.
double chuteAngle_
Angle of the chute as compared to the horizontal plane.
double yMin_
The minimum and maximum y-positions of the particle for a hopper with vertical walls in the y-directi...
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')}.
void HopperInsertionBoundary::read ( std::istream &  is)
virtual

reads boundary properties from istream

Reads the boundary properties from an istream

Parameters
[in,out]isthe 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_.

253 {
255  std::string dummy;
256  is >> dummy >> yMin_
257  >> dummy >> yMax_
258  >> dummy >> radMin_
259  >> dummy >> radMax_
260  >> dummy >> chuteAngle_
261  >> dummy >> fixedParticleRadius_
262  >> dummy >> isHopperCentred__
263  >> dummy >> hopperDim_
264  >> dummy >> hopperAngle_
265  >> dummy >> hopperLength_
266  >> dummy >> hopperExitLength_
267  >> dummy >> hopperHeight_
268  >> dummy >> lift_
269  >> dummy >> fillPercent_;
270 }
double hopperExitLength_
The horizontal (AB-direction) width at the square exit of the hopper.
double radMin_
Minimum and maximum radii of the inserted particles.
double hopperHeight_
The vertical (AC-direction) height of the hopper, measured from the top of the hopper to the start of...
double hopperLength_
The horizontal (AB-direction) width at the top of the hopper.
int hopperDim_
Either 1 or 2. If 1, the insertion boundary has vertical walls in the y extrema. This is used e...
double hopperAngle_
Angle of the hopper as compared to the vertical plane.
double chuteAngle_
Angle of the chute as compared to the horizontal plane.
void read(std::istream &is)
Reads the boundary's id_ and maxFailed_.
double yMin_
The minimum and maximum y-positions of the particle for a hopper with vertical walls in the y-directi...
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')}.
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.

Parameters
[in]particleToCopyPointer to the BaseParticle which is used as a basis for the particles to be inserted
[in]maxFailedThe 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]yMinThe minimum y-position of the particle for a hopper with vertical walls in the y-direction ('1D hopper')
[in]yMaxThe maximum y-position of the particle for a hopper with vertical walls in the y-direction ('1D hopper')
[in]radMinMinimum radius of inserted particles
[in]radMaxMaximum radius of inserted particles
[in]chuteAngleAngle of the chute as compared to the horizontal plane
[in]fixedParticleRadius
[in]isHopperCentred_
[in]hopperDimEither 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]hopperAngleThe angle of the hopper walls relative to the vertical (AC).
[in]hopperLengthThe horizontal (AB-dir.) width at the top of the hopper
[in]hopperExitLengthThe horizontal (AB-dir.) width at the square exit of the hopper
[in]hopperHeightThe vertical (AC-dir.) height of the hopper, measured from the top of the hopper to the start of the chute.
[in]lift
[in]fillPercentPercentage 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().

127 {
128  setParticleToCopy(particleToCopy);
129  setMaxFailed(maxFailed);
130  yMin_ = yMin;
131  yMax_ = yMax;
132  radMin_ = radMin;
133  radMax_ = radMax;
134  chuteAngle_ = chuteAngle;
135  fixedParticleRadius_ = fixedParticleRadius;
136  isHopperCentred__ = isHopperCentred_;
137  hopperDim_ = hopperDim;
138  hopperAngle_ = hopperAngle;
139  hopperLength_ = hopperLength;
140  hopperExitLength_ = hopperExitLength;
141  hopperHeight_ = hopperHeight;
142  lift_ = lift;
143  fillPercent_ = fillPercent;
144 }
double hopperExitLength_
The horizontal (AB-direction) width at the square exit of the hopper.
double radMin_
Minimum and maximum radii of the inserted particles.
double hopperHeight_
The vertical (AC-direction) height of the hopper, measured from the top of the hopper to the start of...
double hopperLength_
The horizontal (AB-direction) width at the top of the hopper.
void setMaxFailed(unsigned int maxFailed)
Sets the number of times that the wall may fail to insert a particle.
int hopperDim_
Either 1 or 2. If 1, the insertion boundary has vertical walls in the y extrema. This is used e...
void setParticleToCopy(BaseParticle *particleToCopy)
Sets the particle that will be inserted through the insertion boundary.
double hopperAngle_
Angle of the hopper as compared to the vertical plane.
double chuteAngle_
Angle of the chute as compared to the horizontal plane.
double yMin_
The minimum and maximum y-positions of the particle for a hopper with vertical walls in the y-directi...
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')}.
void HopperInsertionBoundary::write ( std::ostream &  os) const
virtual

writes boundary properties to ostream

Writes boundary's properties to an ostream

Parameters
[in]osthe 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_.

303  {
305  os << " yMin " << yMin_
306  << " yMax " << yMax_
307  << " radMin " << radMin_
308  << " radMax " << radMax_
309  << " chuteAngle " << chuteAngle_
310  << " fixedParticleRadius " << fixedParticleRadius_
311  << " isHopperCentred_ " << isHopperCentred__
312  << " hopperDim " << hopperDim_
313  << " hopperAngle " << hopperAngle_
314  << " hopperLength " << hopperLength_
315  << " hopperExitLength " << hopperExitLength_
316  << " hopperHeight " << hopperHeight_
317  << " lift " << lift_
318  << " fillPercent " << fillPercent_;
319 }
double hopperExitLength_
The horizontal (AB-direction) width at the square exit of the hopper.
double radMin_
Minimum and maximum radii of the inserted particles.
double hopperHeight_
The vertical (AC-direction) height of the hopper, measured from the top of the hopper to the start of...
double hopperLength_
The horizontal (AB-direction) width at the top of the hopper.
int hopperDim_
Either 1 or 2. If 1, the insertion boundary has vertical walls in the y extrema. This is used e...
double hopperAngle_
Angle of the hopper as compared to the vertical plane.
double chuteAngle_
Angle of the chute as compared to the horizontal plane.
double yMin_
The minimum and maximum y-positions of the particle for a hopper with vertical walls in the y-directi...
void write(std::ostream &os) const
Writes the boundary's id_ and maxFailed_.
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')}.

Member Data Documentation

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__
double HopperInsertionBoundary::lift_
double HopperInsertionBoundary::radMax_
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_
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().


The documentation for this class was generated from the following files: