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 (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 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 BaseParticlegenerateParticle (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...
 
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< PSDgetPSD ()
 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...
 
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 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< MdoublevariableCumulativeVolumeFlowRate_
 
Mdouble samplingInterval_
 
bool checkParticleForInteraction_
 Checks if a particle has an interaction with a wall or other particles. More...
 
std::vector< PSDparticleSizeDistributionVector_
 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< Mdoubleprobability_
 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...
 

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.

Constructor & Destructor Documentation

◆ HopperInsertionBoundary() [1/2]

HopperInsertionBoundary::HopperInsertionBoundary ( )

Default constructor. Sets all properties to 0.

Default constructor. Sets all properties to 0. Calls the InsertionBoundary parent default constructor as well.

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 yMin_
The minimum and maximum y-positions of the particle for a hopper with vertical walls in the y-directi...
Definition: HopperInsertionBoundary.h:108
double fixedParticleRadius_
Definition: HopperInsertionBoundary.h:123
double hopperExitLength_
The horizontal (AB-direction) width at the square exit of the hopper.
Definition: HopperInsertionBoundary.h:133
int hopperDim_
Either 1 or 2. If 1, the insertion boundary has vertical walls in the y extrema. This is used e....
Definition: HopperInsertionBoundary.h:164
double hopperAngle_
Angle of the hopper as compared to the vertical plane.
Definition: HopperInsertionBoundary.h:118
double hopperHeight_
The vertical (AC-direction) height of the hopper, measured from the top of the hopper to the start of...
Definition: HopperInsertionBoundary.h:139
double hopperLength_
The horizontal (AB-direction) width at the top of the hopper.
Definition: HopperInsertionBoundary.h:128
double lift_
Definition: HopperInsertionBoundary.h:156
bool isHopperCentred__
Definition: HopperInsertionBoundary.h:144
double fillPercent_
Percentage of the height of the insertion boundary up to which it should be filled....
Definition: HopperInsertionBoundary.h:151
double yMax_
Definition: HopperInsertionBoundary.h:108
double chuteAngle_
Angle of the chute as compared to the horizontal plane.
Definition: HopperInsertionBoundary.h:113
InsertionBoundary()
Definition: InsertionBoundary.cc:38

References chuteAngle_, fillPercent_, fixedParticleRadius_, hopperAngle_, hopperDim_, hopperExitLength_, hopperHeight_, hopperLength_, isHopperCentred__, lift_, yMax_, and yMin_.

Referenced by copy().

◆ HopperInsertionBoundary() [2/2]

HopperInsertionBoundary::HopperInsertionBoundary ( const HopperInsertionBoundary other)

Copy constructor.

Copy constructor. Calls InsertionBoundary parent copy constructor.

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 }

References chuteAngle_, fillPercent_, fixedParticleRadius_, hopperAngle_, hopperDim_, hopperExitLength_, hopperHeight_, hopperLength_, isHopperCentred__, lift_, yMax_, and yMin_.

Member Function Documentation

◆ copy()

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.

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.
Definition: HopperInsertionBoundary.cc:34

References HopperInsertionBoundary().

◆ getName()

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.

338 {
339  return "HopperInsertionBoundary";
340 }

◆ placeParticle()

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

228 {
229  //Define an orthogonal coordinate system this is useful in the hopper, see
230  //diagram in html documentation for details.
231  static Mdouble s = mathsFunc::sin(chuteAngle_);
232  static Mdouble c = mathsFunc::cos(chuteAngle_);
233  static Mdouble Hc = mathsFunc::cos(hopperAngle_);
234  static Mdouble Ht = mathsFunc::sin(hopperAngle_) / Hc; //tangent
235  static Vec3D AB = Vec3D(c, 0.0, s);
236  static Vec3D AC = Vec3D(-s, 0.0, c);
237  static Vec3D AD = Vec3D(0.0, 1.0, 0.0);
238 
239  //Point A is located in the centre of the hopper.
240  static Vec3D A = Vec3D(isHopperCentred__ ? 40 : 0.0,
241  (yMax_ - yMin_) / 2.0,
242  s * (-0.5 * (hopperLength_ - hopperExitLength_)) + c * hopperHeight_)
243  + AB * 0.5 * hopperLength_
244  + AC * (-0.5 * hopperLength_ / Ht);
245 
246  Mdouble gamma = random.getRandomNumber((100.0 - fillPercent_) / 100.0, 1.0);
247  //std::cout<<"gamma="<<gamma<<"fillPercent="<<fillPercent_<<std::endl;
248 
249  Mdouble delta;
250 
251  if (hopperDim_ == 1)
252  {
265  delta = random.getRandomNumber(-0.5, 0.5) * (yMax_ - yMin_ - 2.0 * p->getRadius());
266 
267  }
268  else
269  {
278  delta = (random.getRandomNumber(-1.0, 1.0) * (0.5 * gamma * hopperLength_ - p->getRadius() / Hc));
279  }
280  //std::cout<<A<<" "<<AC<<" "<<AB<<" "<<AD<<" "<<Hc<<" "<<Ht<<"gamma="<<gamma<<" "<<hopperLength_<<" "<<delta<<std::endl;
281  p->setPosition(A
282  + AC * (gamma * 0.5 * hopperLength_ / Ht)
283  + AB * (random.getRandomNumber(-1.0, 1.0) * (0.5 * gamma * hopperLength_ - p->getRadius() / Hc))
284  + AD * delta);
285 
286  p->move(Vec3D(0.0, 0.0, lift_));
287  p->setVelocity(Vec3D(0.0, 0.0, 0.0));
288 }
@ A
Definition: StatisticsVector.h:42
void setVelocity(const Vec3D &velocity)
set the velocity of the BaseInteractable.
Definition: BaseInteractable.cc:350
virtual void setPosition(const Vec3D &position)
Sets the position of this BaseInteractable.
Definition: BaseInteractable.h:239
virtual void move(const Vec3D &move)
Moves this BaseInteractable by adding an amount to the position.
Definition: BaseInteractable.cc:215
Mdouble getRadius() const
Returns the particle's radius.
Definition: BaseParticle.h:348
Mdouble getRandomNumber()
This is a random generating routine can be used for initial positions.
Definition: RNG.cc:143
Definition: Vector.h:51
Mdouble cos(Mdouble x)
Definition: ExtendedMath.cc:64
Mdouble gamma(Mdouble gamma_in)
This is the gamma function returns the true value for the half integer value.
Definition: ExtendedMath.cc:137
Mdouble sin(Mdouble x)
Definition: ExtendedMath.cc:44

References A, chuteAngle_, mathsFunc::cos(), fillPercent_, mathsFunc::gamma(), BaseParticle::getRadius(), RNG::getRandomNumber(), hopperAngle_, hopperDim_, hopperExitLength_, hopperHeight_, hopperLength_, isHopperCentred__, lift_, BaseInteractable::move(), BaseInteractable::setPosition(), BaseInteractable::setVelocity(), mathsFunc::sin(), yMax_, and yMin_.

◆ read()

void HopperInsertionBoundary::read ( std::istream &  is)
overridevirtual

reads boundary properties from istream

Reads the boundary properties from an istream

Parameters
[in,out]isthe istream

Implements BaseBoundary.

295 {
297  std::string dummy;
298  is >> dummy >> yMin_
299  >> dummy >> yMax_
300  >> dummy >> chuteAngle_
301  >> dummy >> fixedParticleRadius_
302  >> dummy >> isHopperCentred__
303  >> dummy >> hopperDim_
304  >> dummy >> hopperAngle_
305  >> dummy >> hopperLength_
306  >> dummy >> hopperExitLength_
307  >> dummy >> hopperHeight_
308  >> dummy >> lift_
309  >> dummy >> fillPercent_;
310 }
void read(std::istream &is) override
Reads the boundary's id_ and maxFailed_.
Definition: InsertionBoundary.cc:471

References chuteAngle_, fillPercent_, fixedParticleRadius_, hopperAngle_, hopperDim_, hopperExitLength_, hopperHeight_, hopperLength_, isHopperCentred__, lift_, InsertionBoundary::read(), yMax_, and yMin_.

◆ set() [1/2]

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.

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]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')}.
177 {
178  setParticleToCopy(particleToCopy);
179  maxFailed_ = maxFailed;
180  yMin_ = yMin;
181  yMax_ = yMax;
182  chuteAngle_ = chuteAngle;
183  fixedParticleRadius_ = fixedParticleRadius;
184  isHopperCentred__ = isHopperCentred_;
185  hopperDim_ = hopperDim;
186  hopperAngle_ = hopperAngle;
187  hopperLength_ = hopperLength;
188  hopperExitLength_ = hopperExitLength;
189  hopperHeight_ = hopperHeight;
190  lift_ = lift;
191  fillPercent_ = fillPercent;
192 }
void setParticleToCopy(std::vector< BaseParticle * > particleToCopy)
Sets multiple different particles that will be inserted through the insertion boundary.
Definition: InsertionBoundary.cc:411
unsigned int maxFailed_
Number of times that the wall may fail to insert a particle.
Definition: InsertionBoundary.h:270

References chuteAngle_, fillPercent_, fixedParticleRadius_, hopperAngle_, hopperDim_, hopperExitLength_, hopperHeight_, hopperLength_, isHopperCentred__, lift_, InsertionBoundary::maxFailed_, InsertionBoundary::setParticleToCopy(), yMax_, and yMin_.

◆ set() [2/2]

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.

Parameters
[in]particleToCopyVector of pointers to the BaseParticles which are 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]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')}.
121 {
122  setParticleToCopy(particleToCopy);
123  maxFailed_ = maxFailed;
124  yMin_ = yMin;
125  yMax_ = yMax;
126  chuteAngle_ = chuteAngle;
127  fixedParticleRadius_ = fixedParticleRadius;
128  isHopperCentred__ = isHopperCentred_;
129  hopperDim_ = hopperDim;
130  hopperAngle_ = hopperAngle;
131  hopperLength_ = hopperLength;
132  hopperExitLength_ = hopperExitLength;
133  hopperHeight_ = hopperHeight;
134  lift_ = lift;
135  fillPercent_ = fillPercent;
136 }

References chuteAngle_, fillPercent_, fixedParticleRadius_, hopperAngle_, hopperDim_, hopperExitLength_, hopperHeight_, hopperLength_, isHopperCentred__, lift_, InsertionBoundary::maxFailed_, InsertionBoundary::setParticleToCopy(), yMax_, and yMin_.

Referenced by FullRestartTest::setupInitialConditions(), and ChuteWithHopper::setupInitialConditions().

◆ write()

void HopperInsertionBoundary::write ( std::ostream &  os) const
overridevirtual

writes boundary properties to ostream

Writes boundary's properties to an ostream

Parameters
[in]osthe ostream

Implements BaseBoundary.

317 {
319  os << " yMin " << yMin_
320  << " yMax " << yMax_
321  << " chuteAngle " << chuteAngle_
322  << " fixedParticleRadius " << fixedParticleRadius_
323  << " isHopperCentred_ " << isHopperCentred__
324  << " hopperDim " << hopperDim_
325  << " hopperAngle " << hopperAngle_
326  << " hopperLength " << hopperLength_
327  << " hopperExitLength " << hopperExitLength_
328  << " hopperHeight " << hopperHeight_
329  << " lift " << lift_
330  << " fillPercent " << fillPercent_;
331 }
void write(std::ostream &os) const override
Writes the boundary's id_ and maxFailed_.
Definition: InsertionBoundary.cc:559

References chuteAngle_, fillPercent_, fixedParticleRadius_, hopperAngle_, hopperDim_, hopperExitLength_, hopperHeight_, hopperLength_, isHopperCentred__, lift_, InsertionBoundary::write(), yMax_, and yMin_.

Member Data Documentation

◆ chuteAngle_

double HopperInsertionBoundary::chuteAngle_

Angle of the chute as compared to the horizontal plane.

Referenced by HopperInsertionBoundary(), placeParticle(), read(), set(), and write().

◆ fillPercent_

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

◆ fixedParticleRadius_

double HopperInsertionBoundary::fixedParticleRadius_

◆ hopperAngle_

double HopperInsertionBoundary::hopperAngle_

Angle of the hopper as compared to the vertical plane.

Referenced by HopperInsertionBoundary(), placeParticle(), read(), set(), and write().

◆ hopperDim_

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

◆ hopperExitLength_

double HopperInsertionBoundary::hopperExitLength_

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

Referenced by HopperInsertionBoundary(), placeParticle(), read(), set(), and write().

◆ hopperHeight_

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

◆ hopperLength_

double HopperInsertionBoundary::hopperLength_

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

Referenced by HopperInsertionBoundary(), placeParticle(), read(), set(), and write().

◆ isHopperCentred__

bool HopperInsertionBoundary::isHopperCentred__

◆ lift_

double HopperInsertionBoundary::lift_

◆ yMax_

double HopperInsertionBoundary::yMax_

◆ yMin_

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


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