MercuryDPM  Beta
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
HopperInsertionBoundary.h
Go to the documentation of this file.
1 //Copyright (c) 2013-2014, The MercuryDPM Developers Team. All rights reserved.
2 //For the list of developers, see <http://www.MercuryDPM.org/Team>.
3 //
4 //Redistribution and use in source and binary forms, with or without
5 //modification, are permitted provided that the following conditions are met:
6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above copyright
9 // notice, this list of conditions and the following disclaimer in the
10 // documentation and/or other materials provided with the distribution.
11 // * Neither the name MercuryDPM nor the
12 // names of its contributors may be used to endorse or promote products
13 // derived from this software without specific prior written permission.
14 //
15 //THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
16 //ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17 //WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18 //DISCLAIMED. IN NO EVENT SHALL THE MERCURYDPM DEVELOPERS TEAM BE LIABLE FOR ANY
19 //DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20 //(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21 //LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
22 //ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 //(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24 //SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 
26 #ifndef BOUNDARIES_HOPPERINSERTIONBOUNDARY_H
27 #define BOUNDARIES_HOPPERINSERTIONBOUNDARY_H
28 
29 #include "InsertionBoundary.h"
30 
31 class BaseParticle;
32 class RNG;
33 
48 {
49 public:
50 
55 
60 
64  virtual HopperInsertionBoundary* copy() const;
65 
69  void set(BaseParticle* particleToCopy, int maxFailed, double yMin, double yMax, double radMin, double radMax,
70  double chuteAngle, double fixedParticleRadius, bool isHopperCentred_, int hopperDim, double hopperAngle, double hopperLength, double hopperExitLength,
71  double hopperHeight, double lift, double fillPercent);
72 
76  virtual BaseParticle* generateParticle(RNG &random);
77 
81  void read(std::istream& is);
82 
87  void oldRead(std::istream& is);
88 
92  void write(std::ostream& os) const;
93 
97  virtual std::string getName() const;
98 
99 
106  double yMin_, yMax_;
107 
111  double radMin_, radMax_;
115  double chuteAngle_;
116 
120  double hopperAngle_;
121 
126 
131 
136 
142 
147 
153  double fillPercent_;
154 
158  double lift_;
159 
167 
168 };
169 
170 #endif
double hopperExitLength_
The horizontal (AB-direction) width at the square exit of the hopper.
double radMin_
Minimum and maximum radii of the inserted particles.
virtual std::string getName() const
Returns the name of the object.
MERCURY_DEPRECATED void oldRead(std::istream &is)
deprecated version of CubeInsertionBoundary::read().
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...
Boundary structure for boundaries used for insertion of particles.
#define MERCURY_DEPRECATED
Definition: GeneralDefine.h:35
This is a class that generates random numbers i.e. named the Random Number Generator (RNG)...
Definition: RNG.h:52
HopperInsertionBoundary()
Default constructor. Sets all properties to 0.
void write(std::ostream &os) const
writes boundary properties to ostream
virtual HopperInsertionBoundary * copy() const
copy method, returns a pointer to a copy.
double hopperAngle_
Angle of the hopper as compared to the vertical plane.
double chuteAngle_
Angle of the chute as compared to the horizontal plane.
Inherits from InsertionBoundary Some images are useful to better understand the structure of both the...
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.
double yMin_
The minimum and maximum y-positions of the particle for a hopper with vertical walls in the y-directi...
void read(std::istream &is)
reads boundary properties from istream
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')}.
virtual BaseParticle * generateParticle(RNG &random)
This creates an inflow particle in the top 50% of the hopper i.e. between gamma=0.5 and gamma=1.0.