ChuteWithHopper.h
Go to the documentation of this file.
1 // This file is part of the MercuryDPM project (https://www.mercurydpm.org).
2 // Copyright (c), The MercuryDPM Developers Team. All rights reserved.
3 // License: BSD 3-Clause License; see the LICENSE file in the root directory.
4 
5 #ifndef CHUTEWITHHOPPER_H
6 #define CHUTEWITHHOPPER_H
7 
8 #include "Chute.h"
9 
17 class ChuteWithHopper : public Chute
18 {
19 public:
20 
21 //Constructors:
26  explicit ChuteWithHopper(const Chute& other);
27 
31  explicit ChuteWithHopper(const Mercury3D& other);
32 
36  explicit ChuteWithHopper(const MercuryBase& other);
37 
41  explicit ChuteWithHopper(const DPMBase& other);
42 
47 
48 //Setters and getters:
49 
53  void setHopperFillingPercentage(Mdouble hopperFillingPercentage);
54 
59  void setHopperLowestPoint(Mdouble hopperLowestPoint);
60 
66 
71  Mdouble getChuteLength() const;
72 
76  void setChuteLength(Mdouble chuteLength) override;
77 
81  void setIsHopperCentred(bool isHopperCentred);
82 
86  void setHopperLowerFillingHeight(Mdouble hopperLowerFillingHeight);
87 
91  void setHopperShift(Mdouble hopperShift);
92 
96  void setHopperLift(Mdouble hopperLift);
97 
101  Mdouble getHopperLift() const;
102 
106  Mdouble getHopperShift() const;
107 
112  void setHopperDimension(unsigned int hopperDimension);
113 
117  void setIsHopperAlignedWithBottom(bool isHopperAlignedWithBottom);
118 
122  Mdouble getHopperAngle() const;
123 
127  Mdouble getHopperLength() const;
128 
133 
137  Mdouble getHopperHeight() const;
138 
143 
147  bool getIsHopperCentred() const;
148 
154 
158  unsigned int getHopperDimension() const;
159 
160 //Other member functions:
161 
165  void setupInitialConditions() override;
166 
170  void setHopper(Mdouble exitLength, Mdouble exitHeight, Mdouble angle, Mdouble length, Mdouble height);
171 
176 
180  Mdouble getTimeStepRatio() const;
181 
185  void read(std::istream& is, ReadOptions opt = ReadOptions::ReadAll) override;
186 
190  void write(std::ostream& os, bool writeAllParticles = true) const override;
191 
195  bool readNextArgument(int& i, int argc, char* argv[]) override;
196 
197 protected:
201  void addHopper();
202 
203 private:
204 
208  void constructor();
209 
210 //protected:
243 
251  unsigned int hopperDimension_;
264 };
265 
266 #endif
int i
Definition: BiCGSTAB_step_by_step.cpp:9
ChuteWithHopper has a hopper as inflow.
Definition: ChuteWithHopper.h:18
Mdouble hopperLength_
Dimension of the hopper in vertical direction.
Definition: ChuteWithHopper.h:214
unsigned int getHopperDimension() const
Returns whether the hopper has vertical (1) or inclined (2) walls in Y-direction.
Definition: ChuteWithHopper.cc:667
Mdouble getMaximumVelocityInducedByGravity() const
Returns the theoretical maximum particle velocity due to gravity.
Definition: ChuteWithHopper.cc:478
Mdouble getChuteLength() const
Allows chute length to be accessed.
Definition: ChuteWithHopper.cc:510
Mdouble getTimeStepRatio() const
Returns smallest particle radius over maximum gravitational velocity.
Definition: ChuteWithHopper.cc:492
Mdouble getHopperLift() const
Returns the hopper's lift above the chute bottom plane.
Definition: ChuteWithHopper.cc:685
void setHopper(Mdouble exitLength, Mdouble exitHeight, Mdouble angle, Mdouble length, Mdouble height)
Sets the hopper's geometrical properties.
Definition: ChuteWithHopper.cc:368
Mdouble hopperExitHeight_
Dimension of the hopper exit in vertical direction.
Definition: ChuteWithHopper.h:230
Mdouble hopperAngle_
Angle between the two pieces of the hopper walls.
Definition: ChuteWithHopper.h:222
Mdouble getHopperShift() const
Returns the shift in X-direction of the whole setup after rotation.
Definition: ChuteWithHopper.cc:694
void setHopperFillingPercentage(Mdouble hopperFillingPercentage)
Sets the hopper filling percentage.
Definition: ChuteWithHopper.cc:97
Mdouble hopperFillingPercentage_
This is which percentage of the hopper is used for creating new partices;.
Definition: ChuteWithHopper.h:259
Mdouble hopperHeight_
Dimension of the hopper in horizontal direction.
Definition: ChuteWithHopper.h:218
Mdouble hopperExitLength_
Dimension of the hopper exit in vertical direction.
Definition: ChuteWithHopper.h:226
void setChuteLength(Mdouble chuteLength) override
sets xMax to chuteLength+hopperlength_, and thus specifies the length off the runoff chute
Definition: ChuteWithHopper.cc:520
Mdouble hopperLowerFillingHeight_
Relative height (in [0,1)) above which the hopper is replenished with new particles.
Definition: ChuteWithHopper.h:238
void write(std::ostream &os, bool writeAllParticles=true) const override
Writes setup properties to an ostream.
Definition: ChuteWithHopper.cc:594
unsigned int hopperDimension_
This is the dimension of the hopper, my default it is one dimensional and hence does not have side wa...
Definition: ChuteWithHopper.h:251
Mdouble getHopperExitLength() const
Returns the width of the hopper exit.
Definition: ChuteWithHopper.cc:620
void addHopper()
This creates the hopper on top of the chute, see diagram in class description for details of the poin...
Definition: ChuteWithHopper.cc:145
bool isHopperAlignedWithBottom_
This is the flag, which sets if the chute bottom is aligned with the hopper, by default it is.
Definition: ChuteWithHopper.h:255
void setupInitialConditions() override
Sets up the initial conditions for the problem.
Definition: ChuteWithHopper.cc:109
Mdouble getHopperHeight() const
Returns the height of the hopper relative to the chute start.
Definition: ChuteWithHopper.cc:628
bool readNextArgument(int &i, int argc, char *argv[]) override
Reads setup properties from a string.
Definition: ChuteWithHopper.cc:722
void read(std::istream &is, ReadOptions opt=ReadOptions::ReadAll) override
Reads setup properties from an istream.
Definition: ChuteWithHopper.cc:577
ChuteWithHopper()
This is the default constructor.
Definition: ChuteWithHopper.cc:68
Mdouble hopperLowestPoint_
The NEGATIVE z coordinate of the right C point (when the left C point is in the origin)
Definition: ChuteWithHopper.h:263
bool getIsHopperCentred() const
Returns whether the setup is shifted another 40 units in X-direction.
Definition: ChuteWithHopper.cc:647
Mdouble hopperShift_
The x position where the Chute starts (defined as the beginning of the hopper)
Definition: ChuteWithHopper.h:234
Mdouble getHopperAngle() const
Returns the angle of the hopper entrance relative to the vertical.
Definition: ChuteWithHopper.cc:604
Mdouble hopperLift_
This is the vertical distance the chute is lifted above the plane.
Definition: ChuteWithHopper.h:247
Mdouble getHopperFillingPercentage() const
Returns the vertical percentage of the hopper insertion boundary which is filled.
Definition: ChuteWithHopper.cc:658
Mdouble getHopperLowestPoint() const
Returns the vertical distance of the lowest hopper point relative to the start of the chute.
Definition: ChuteWithHopper.cc:351
void setHopperLowestPoint(Mdouble hopperLowestPoint)
Sets the vertical distance of the lowest hopper point relative to the start of the chute.
Definition: ChuteWithHopper.cc:346
bool isHopperCentred_
If this flag is set, the hopper will be constructed in the xy-center of the domain,...
Definition: ChuteWithHopper.h:242
void setHopperDimension(unsigned int hopperDimension)
Sets whether the hopper should have vertical (1) or inclined (2) walls in Y-direction.
Definition: ChuteWithHopper.cc:703
void setIsHopperAlignedWithBottom(bool isHopperAlignedWithBottom)
Sets the alignment of hopper with chute bottom.
Definition: ChuteWithHopper.cc:711
Mdouble getHopperLength() const
Returns the width of the hopper entrance.
Definition: ChuteWithHopper.cc:612
void constructor()
This is the actually constructor, get called by all constructors above.
Definition: ChuteWithHopper.cc:76
void setIsHopperCentred(bool isHopperCentred)
Sets an extra shift in X-direction of the whole system.
Definition: ChuteWithHopper.cc:540
void setHopperLowerFillingHeight(Mdouble hopperLowerFillingHeight)
Sets the height above which the hopper is filled with new particles.
Definition: ChuteWithHopper.cc:548
void setHopperShift(Mdouble hopperShift)
Sets the shift in X-direction of the whole setup after rotation.
Definition: ChuteWithHopper.cc:558
void setHopperLift(Mdouble hopperLift)
This lifts the hopper above the plane of the chute (after rotation)
Definition: ChuteWithHopper.cc:676
Mdouble getHopperExitHeight() const
Returns the height of the lowest hopper point above the chute.
Definition: ChuteWithHopper.cc:637
Creates chutes with different bottoms. Inherits from Mercury3D (-> MercuryBase -> DPMBase).
Definition: Chute.h:44
The DPMBase header includes quite a few header files, defining all the handlers, which are essential....
Definition: DPMBase.h:56
ReadOptions
Definition: DPMBase.h:233
This adds on the hierarchical grid code for 3D problems.
Definition: Mercury3D.h:16
This is the base class for both Mercury2D and Mercury3D. Note the actually abstract grid is defined i...
Definition: MercuryBase.h:105
double height(const double &x)
Height of domain.
Definition: simple_spine_channel.cc:429
double angle(const double &t)
Angular position as a function of time t.
Definition: jeffery_orbit.cc:98