MercuryDPM  Trunk
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...

HopperInsertionBoundarycopy () const override
copy method, returns a pointer to a copy. More...

void set (BaseParticle *particleToCopy, unsigned 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...

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

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 ()
Default constructor: set everything to 0/nullptr. More...

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

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 BaseParticlegenerateParticle (RNG &random)
Virtual function that generates the intrinsic properties (species, radius) of one particle. More...

void checkBoundaryBeforeTimeStep (DPMBase *md) override
Fills the boundary with particles. More...

void insertParticles (DPMBase *md)

unsigned int getNumberOfParticlesInserted () const
Gets the number of particles inserted by the boundary. More...

double getMassOfParticlesInserted () const

double getVolumeOfParticlesInserted () const

void reset ()

void activate ()
Turns on the InsertionBoundary. More...

void deactivate ()
Turns off the InsertionBoundary. More...

bool isActivated ()
Returns whether the InsertionBoundary is activated. 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...

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

void setVolumeFlowRate (Mdouble volumeFlowRate_)

Mdouble getInitialVolume () const

void setInitialVolume (Mdouble initialVolume)

void setPSD (PSD psd)
Sets the range of particle radii that may be generated from a user defined PSD. More...

PSD getPSD ()

void setDistribution (Distribution distribution)
Sets the range of particle radii that may be generated to custom distributions. More...

Distribution getDistribution ()
Gets the range of particle radii that may be generated. More...

void setVariableVolumeFlowRate (const std::vector< Mdouble > &variableCumulativeVolumeFlowRate, Mdouble samplingInterval)

bool insertParticle (Mdouble time)

bool getCheckParticleForInteraction () const

void setCheckParticleForInteraction (bool checkParticleForInteraction)

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

BoundaryHandlergetHandler () 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 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 Types inherited from InsertionBoundary
enum  Distribution { Distribution::Uniform, Distribution::Normal_1_5 }
Defines a custom particle size distribution; distribution_ will always be used, unless particleSizeDistribution_ is non-empty. More...

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

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< MdoublevariableCumulativeVolumeFlowRate_

Mdouble samplingInterval_

bool checkParticleForInteraction_

PSD particleSizeDistribution_
Defines a particle size distribution as an object of the PSD class; if particleSizeDistribution_ is empty, distribution_ is used instead. More...

Minimum and maximum radii of the generated particles. More...

Distribution distribution_ = Distribution::Uniform
defines a custom particle size distribution, which by default is uniform More...

bool isManuallyInserting_
A flag to enable a top-down class-by-class manual insertion of a PSD; default is FALSE. 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:

Image clarifying the definitions of the data members hopperLength_, hopperExitLength, hopperHeight_ and hopperAngle_.
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 48 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.

Referenced by copy().

35 {
36  yMin_ = 0.0;
37  yMax_ = 0.0;
38  chuteAngle_ = 0.0;
40  isHopperCentred__ = true;
41  hopperDim_ = 0;
42  hopperAngle_ = 0.0;
43  hopperLength_ = 0.0;
44  hopperExitLength_ = 0.0;
45  hopperHeight_ = 0.0;
46  lift_ = 0.0;
47  fillPercent_ = 0.0;
48 }
double hopperExitLength_
The horizontal (AB-direction) width at the square exit of the hopper.
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 53 of file HopperInsertionBoundary.cc.

54  : InsertionBoundary(other)
55 {
56  yMin_ = other.yMin_;
57  yMax_ = other.yMax_;
58  chuteAngle_ = other.chuteAngle_;
61  hopperDim_ = other.hopperDim_;
62  hopperAngle_ = other.hopperAngle_;
66  lift_ = other.lift_;
67  fillPercent_ = other.fillPercent_;
68 }
double hopperExitLength_
The horizontal (AB-direction) width at the square exit of the hopper.
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
overridevirtual

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 74 of file HopperInsertionBoundary.cc.

References HopperInsertionBoundary().

75 {
76 #ifdef DEBUG_CONSTRUCTOR
77  std::cout << "HopperInsertionBoundary::copy() const finished" << std::endl;
78 #endif
79  return new HopperInsertionBoundary(*this);
80 }
HopperInsertionBoundary()
Default constructor. Sets all properties to 0.
 std::string HopperInsertionBoundary::getName ( ) const
overridevirtual

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 316 of file HopperInsertionBoundary.cc.

317 {
318  return "HopperInsertionBoundary";
319 }
 void HopperInsertionBoundary::oldRead ( std::istream & is )

Deprecated:

Definition at line 267 of file HopperInsertionBoundary.cc.

268 {
269  int maxFailed;
270  std::string dummy;
271  is >> dummy >> maxFailed
272  >> dummy >> yMin_
273  >> dummy >> yMax_
276  >> dummy >> chuteAngle_
278  >> dummy >> isHopperCentred__
279  >> dummy >> hopperDim_
280  >> dummy >> hopperAngle_
281  >> dummy >> hopperLength_
282  >> dummy >> hopperExitLength_
283  >> dummy >> hopperHeight_
284  >> dummy >> lift_
285  >> dummy >> fillPercent_;
286  setMaxFailed(maxFailed);
287 }
double hopperExitLength_
The horizontal (AB-direction) width at the square exit of the hopper.
double hopperHeight_
The vertical (AC-direction) height of the hopper, measured from the top of the hopper to the start of...
Minimum and maximum radii of the generated particles.
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::placeParticle ( BaseParticle * p, RNG & random )
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:

• 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 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] random random 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 176 of file HopperInsertionBoundary.cc.

177 {
178  //Define an orthogonal coordinate system this is useful in the hopper, see
179  //diagram in html documentation for details.
180  static Mdouble s = mathsFunc::sin(chuteAngle_);
181  static Mdouble c = mathsFunc::cos(chuteAngle_);
182  static Mdouble Hc = mathsFunc::cos(hopperAngle_);
183  static Mdouble Ht = mathsFunc::sin(hopperAngle_) / Hc; //tangent
184  static Vec3D AB = Vec3D(c, 0.0, s);
185  static Vec3D AC = Vec3D(-s, 0.0, c);
186  static Vec3D AD = Vec3D(0.0, 1.0, 0.0);
187
188  //Point A is located in the centre of the hopper.
189  static Vec3D A = Vec3D(isHopperCentred__ ? 40 : 0.0,
190  (yMax_ - yMin_) / 2.0,
191  s * (-0.5 * (hopperLength_ - hopperExitLength_)) + c * hopperHeight_)
192  + AB * 0.5 * hopperLength_
193  + AC * (-0.5 * hopperLength_ / Ht);
194
195  Mdouble gamma = random.getRandomNumber((100.0 - fillPercent_) / 100.0, 1.0);
196  //std::cout<<"gamma="<<gamma<<"fillPercent="<<fillPercent_<<std::endl;
197
198  Mdouble delta;
199
200  if (hopperDim_ == 1)
201  {
209  delta = random.getRandomNumber(-0.5, 0.5) * (yMax_ - yMin_ - 2.0 * p->getRadius());
215
216  }
217  else
218  {
227  delta = (random.getRandomNumber(-1.0, 1.0) * (0.5 * gamma * hopperLength_ - p->getRadius() / Hc));
228  }
229  //std::cout<<A<<" "<<AC<<" "<<AB<<" "<<AD<<" "<<Hc<<" "<<Ht<<"gamma="<<gamma<<" "<<hopperLength_<<" "<<delta<<std::endl;
230  p->setPosition(A
231  + AC * (gamma * 0.5 * hopperLength_ / Ht)
232  + AB * (random.getRandomNumber(-1.0, 1.0) * (0.5 * gamma * hopperLength_ - p->getRadius() / Hc))
234
235  p->move(Vec3D(0.0, 0.0, lift_));
236  p->setVelocity(Vec3D(0.0, 0.0, 0.0));
237 }
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 Mdouble
Definition: GeneralDefine.h:34
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.
Mdouble getRandomNumber()
This is a random generating routine can be used for initial positions.
Definition: RNG.cc:143
int hopperDim_
Either 1 or 2. If 1, the insertion boundary has vertical walls in the y extrema. This is used e...
Mdouble cos(Mdouble x)
Definition: ExtendedMath.cc:64
Mdouble sin(Mdouble x)
Definition: ExtendedMath.cc:44
double hopperAngle_
Angle of the hopper as compared to the vertical plane.
Definition: BaseParticle.h:345
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.
Definition: Vector.h:49
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')}.
 void HopperInsertionBoundary::read ( std::istream & is )
overridevirtual

Reads the boundary properties from an istream

Parameters
 [in,out] is the istream

Implements BaseBoundary.

Definition at line 243 of file HopperInsertionBoundary.cc.

244 {
246  std::string dummy;
247  is >> dummy >> yMin_
248  >> dummy >> yMax_
251  >> dummy >> chuteAngle_
253  >> dummy >> isHopperCentred__
254  >> dummy >> hopperDim_
255  >> dummy >> hopperAngle_
256  >> dummy >> hopperLength_
257  >> dummy >> hopperExitLength_
258  >> dummy >> hopperHeight_
259  >> dummy >> lift_
260  >> dummy >> fillPercent_;
261 }
double hopperExitLength_
The horizontal (AB-direction) width at the square exit of the hopper.
double hopperHeight_
The vertical (AC-direction) height of the hopper, measured from the top of the hopper to the start of...
Minimum and maximum radii of the generated particles.
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')}.
Reads the boundary's id_ and maxFailed_.
 void HopperInsertionBoundary::set ( BaseParticle * particleToCopy, unsigned 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] 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 119 of file HopperInsertionBoundary.cc.

Referenced by ChuteWithHopper::setupInitialConditions().

124 {
125  setParticleToCopy(particleToCopy);
126  setMaxFailed(maxFailed);
127  yMin_ = yMin;
128  yMax_ = yMax;
131  chuteAngle_ = chuteAngle;
133  isHopperCentred__ = isHopperCentred_;
134  hopperDim_ = hopperDim;
135  hopperAngle_ = hopperAngle;
136  hopperLength_ = hopperLength;
137  hopperExitLength_ = hopperExitLength;
138  hopperHeight_ = hopperHeight;
139  lift_ = lift;
140  fillPercent_ = fillPercent;
141 }
double hopperExitLength_
The horizontal (AB-direction) width at the square exit of the hopper.
double hopperHeight_
The vertical (AC-direction) height of the hopper, measured from the top of the hopper to the start of...
Minimum and maximum radii of the generated particles.
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
overridevirtual

writes boundary properties to ostream

Writes boundary's properties to an ostream

Parameters
 [in] os the ostream

Implements BaseBoundary.

Definition at line 293 of file HopperInsertionBoundary.cc.

294 {
296  os << " yMin " << yMin_
297  << " yMax " << yMax_
300  << " chuteAngle " << chuteAngle_
302  << " isHopperCentred_ " << isHopperCentred__
303  << " hopperDim " << hopperDim_
304  << " hopperAngle " << hopperAngle_
305  << " hopperLength " << hopperLength_
306  << " hopperExitLength " << hopperExitLength_
307  << " hopperHeight " << hopperHeight_
308  << " lift " << lift_
309  << " fillPercent " << fillPercent_;
310 }
double hopperExitLength_
The horizontal (AB-direction) width at the square exit of the hopper.
double hopperHeight_
The vertical (AC-direction) height of the hopper, measured from the top of the hopper to the start of...
Minimum and maximum radii of the generated particles.
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.
void write(std::ostream &os) const override
Writes the boundary's id_ and maxFailed_.
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 Data Documentation

 double HopperInsertionBoundary::chuteAngle_

Angle of the chute as compared to the horizontal plane.

Definition at line 114 of file HopperInsertionBoundary.h.

 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 152 of file HopperInsertionBoundary.h.

Definition at line 124 of file HopperInsertionBoundary.h.

 double HopperInsertionBoundary::hopperAngle_

Angle of the hopper as compared to the vertical plane.

Definition at line 119 of file HopperInsertionBoundary.h.

 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 165 of file HopperInsertionBoundary.h.

 double HopperInsertionBoundary::hopperExitLength_

The horizontal (AB-direction) width at the square exit of the hopper.

Definition at line 134 of file HopperInsertionBoundary.h.

 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 140 of file HopperInsertionBoundary.h.

 double HopperInsertionBoundary::hopperLength_

The horizontal (AB-direction) width at the top of the hopper.

Definition at line 129 of file HopperInsertionBoundary.h.

 bool HopperInsertionBoundary::isHopperCentred__
 double HopperInsertionBoundary::lift_
 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 109 of file HopperInsertionBoundary.h.