MercuryDPM  0.10
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Chute.cc
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 #include "Chute.h"
27 #include "ChuteBottom.h"
28 
31  is_periodic=false;
34  set_ChuteAngle(0.0);
35 
36  set_max_failed(1);
37  num_created = 0;
39  set_InflowVelocity(0.1);
41  set_InflowHeight(0.02);
43 }
44 
46 void Chute::read(std::istream& is) {
47  HGRID_base::read(is);
48  //read out the full line first, so if there is an error it does not affect the read of the next line
49  std::string line_string;
50  getline(is,line_string);
51  std::cout<<"Chuteline="<<line_string<<std::endl;
52  std::stringstream line (std::stringstream::in | std::stringstream::out);
53  line << line_string;
54 
55  if (get_restart_version()==1) {
59  } else {
60  std::string dummy;
61  line >> dummy >> FixedParticleRadius >> dummy >> MinInflowParticleRadius >> dummy >> MaxInflowParticleRadius
62  >> dummy >> RandomizedBottom >> dummy >> ChuteAngle >> dummy >> max_failed >> dummy >> num_created
63  >> dummy >> InflowVelocity >> dummy >> InflowVelocityVariance >> dummy >> InflowHeight;
64  }
65  //if the Chute Angle is given in degrees, move to radians;
66  if (ChuteAngle>1.0) ChuteAngle *= constants::pi/180.;
67 }
68 
70 void Chute::write(std::ostream& os) {
71  HGRID_base::write(os);
72  os<< "FixedParticleRadius " << FixedParticleRadius
73  << " MinInflowParticleRadius " << MinInflowParticleRadius
74  << " MaxInflowParticleRadius " << MaxInflowParticleRadius
75  << std::endl
76  << "RandomizedBottom " << RandomizedBottom
77  << " ChuteAngle " << ChuteAngle/constants::pi*180.
78  << " max_failed " << max_failed
79  << " num_created " << num_created
80  << std::endl
81  << "InflowVelocity " << InflowVelocity
82  << " InflowVelocityVariance " << InflowVelocityVariance
83  << " InflowHeight " << InflowHeight
84  << std::endl;
85 }
86 
88 void Chute::print(std::ostream& os, bool print_all) {
89  HGRID_base::print(os, print_all);
90  os << " FixedParticleRadius:" << FixedParticleRadius << ", InflowParticleRadius: [" << MinInflowParticleRadius << "," << MaxInflowParticleRadius << "]," << std::endl
91  << " RandomizedBottom:" << RandomizedBottom << ", ChuteAngle:" << ChuteAngle/constants::pi*180. << ", max_failed:" << max_failed << ", num_created:" << num_created << "," << std::endl
92  << " InflowVelocity:" << InflowVelocity << ", InflowVelocityVariance:" << InflowVelocityVariance << ", InflowHeight:" << InflowHeight << std::endl;
93 }
94 
97  //Puts the particle in the Particle list
99  //This places the particle in this grid
100  grid->InsertParticleToHgrid(getParticleHandler().getLastObject());
101  //This computes where the particle currectly is in the grid
102 #ifndef ContactListHgrid
104 #endif
105 }
106 
108  add_particles();
109  clean_chute();
110 }
111 
114 {
115  //Position, maybe also radius and velocity, is reset in create_inflow_particle()
118  P0.set_Angle(Vec3D(0.0,0.0,0.0));
119  P0.set_AngularVelocity(Vec3D(0.0,0.0,0.0));
120  //P0.get_TangentialSprings().reset();
121  P0.set_Position(Vec3D(1e20,1e20,1e20));
122  P0.set_Velocity(Vec3D(0.0,0.0,0.0));
123 }
124 
127 {
130 
131  Vec3D position,velocity;
132 
133  position.X= get_xmin() + P0.get_Radius();
135  position.Y = get_ymin() + P0.get_Radius();
136  else
137  position.Y = random.get_RN(get_ymin() + P0.get_Radius(), get_ymax() - P0.get_Radius());
139  P0.set_Position(position);
140 
141  //The velocity components are first stored in a Vec3D, because if you pass them directly into set_Velocity the compiler is allowed to change the order in which the numbers are generated
145  P0.set_Velocity(velocity);
146 }
147 
149  std::cout << "\rt=" << std::setprecision(3) << std::left << std::setw(6) << get_t()
150  << ", tmax=" << std::setprecision(3) << std::left << std::setw(6) << get_tmax()
151  << ", N=" << std::setprecision(3) << std::left << std::setw(6) << getParticleHandler().getNumberOfObjects()
152  << "\r";
153  std::cout.flush();
154 }
155 
160  set_dissipation(- P0.get_Mass() / tc * log(eps));
162  std::cout << "collision time and restitution coefficient is set for a particle of radius " << P0.get_Radius() << " and density " << get_rho() << std::endl;
163 }
169 }
175 }
176 
181  BaseParticle* pP = &P0;
182  for (unsigned int i=0; i<getParticleHandler().getNumberOfObjects(); i++) {
184  }
185  return pP;
186 }
187 
192  BaseParticle* pP = &P0;
193  for (unsigned int i=0; i<getParticleHandler().getNumberOfObjects(); i++) {
195  }
196  return pP;
197 }
198 
202  if (FixedParticleRadius)
203  min_rad = std::min(min_rad,FixedParticleRadius);
204  for (std::vector<BaseParticle*>::iterator it = getParticleHandler().begin(); it!=getParticleHandler().end(); ++it)
205  min_rad=std::min(min_rad,(*it)->get_InteractionRadius());
206  return min_rad;
207 }
208 
211  for (std::vector<BaseParticle*>::iterator it = getParticleHandler().begin(); it!=getParticleHandler().end(); ++it)
212  max_rad=std::max(max_rad,(*it)->get_InteractionRadius());
213  return max_rad;
214 
215 }
216 
222  Mdouble MassP0 = P0.get_Mass();
223  return std::min(Mass,MassP0);
224 }
225 
230 {
231  //set side walls - solid if not a periodic
232  if (is_periodic)
233  {
234  PeriodicBoundary b0;
235  b0.set(Vec3D( 0.0, 1.0, 0.0), get_ymin(), get_ymax());
237  }
238  else
239  {
240  InfiniteWall w0;
241  w0.set(Vec3D( 0.0,-1.0, 0.0), -get_ymin());
243  w0.set(Vec3D( 0.0, 1.0, 0.0), get_ymax());
245  }
246 
247  //creates the bottom of the chute
248  create_bottom();
249 }
250 
255  if (fabs(get_FixedParticleRadius())<1e-12) // smooth bottom
256  {
257  //bottom wall
258  InfiniteWall w0;
259  w0.set(Vec3D(0.0, 0.0, -1.0), -get_zmin());
261  }
262  else //rough bottom
263  {
264  // Define standard fixed particle
268  F0.set_Position(Vec3D(0.0,0.0,0.0));
269 
270  //define grid parameters
271  Mdouble dx = 2.0 * F0.get_Radius();
272  Mdouble dy = 2.0 * F0.get_Radius();
273  int nx = std::max(1,(int)floor((get_xmax()-get_xmin())/dx));
274  int ny = std::max(1,(int)floor((get_ymax()-get_ymin())/dy));
275  dx = (get_xmax()-get_xmin())/nx; dy = (get_ymax()-get_ymin())/ny;
276 
277  if (!RandomizedBottom) { // grid-like fixed-particle bottom
278  for (int i=0; i<nx; i++)
279  for (int j=0; j<ny; j++)
280  {
281  F0.set_Position(Vec3D(F0.get_Radius() + dx * i,F0.get_Radius() + dy * j,0.0));
283  }
284 
285  } else if (RandomizedBottom==1) { // random fixed-particle bottom
286  std::cout << "create rough chute bottom, fixed z" << std::endl;
287 
288  Mdouble dx = 2.0 * F0.get_Radius();
289  Mdouble dy = 2.0 * F0.get_Radius();
290  int nx = std::max(1,(int)floor((get_xmax()-get_xmin())/dx));
291  int ny = std::max(1,(int)floor((get_ymax()-get_ymin())/dy));
292  dx = (get_xmax()-get_xmin())/nx; dy = (get_ymax()-get_ymin())/ny;
293 
294  //bottom wall
295  InfiniteWall w0;
296  w0.set(Vec3D(0.0, 0.0, -1.0), -(get_zmin()-.5*F0.get_Radius()));
298 
299  //add first particle to initialize HGRID
300 
301  //The position components are first stored in a Vec3D, because if you pass them directly into set_Position the compiler is allowed to change the order in which the numbers are generated
302  Vec3D position;
303  position.X=random.get_RN(F0.get_Radius(), get_xmax() - F0.get_Radius());
304  position.Y=random.get_RN(get_ymin()+F0.get_Radius(), get_ymax()-F0.get_Radius());
305  F0.set_Position(position);
307 
310 
311  //now add more particles
312  int failed = 0;
313  while (failed<500)
314  {
315  //The position components are first stored in a Vec3D, because if you pass them directly into set_Position the compiler is allowed to change the order in which the numbers are generated
316  position.X=random.get_RN(F0.get_Radius(), get_xmax() - F0.get_Radius());
317  position.Y=random.get_RN(get_ymin()+F0.get_Radius(), get_ymax()-F0.get_Radius());
318  F0.set_Position(position);
319  if (IsInsertable(F0))
320  failed = 0;
321  else
322  failed++;
323  }
324  } else {
325  //this pointer is the current MD class, so the bottom is create with the particles properties from the MD class
326  ChuteBottom bottom(*this);
329  std::cout<<"Starting to destruct ChuteBottom"<<std::endl;
330  }
331  std::cout<<"Destructed ChuteBottom"<<std::endl;
332  //finally, fix particles to the floor
333  for (std::vector<BaseParticle*>::iterator it= getParticleHandler().begin(); it!=getParticleHandler().end(); ++it)
334  (*it)->fixParticle();
335 
336 
337 
338  }
339 }
340 
341 
342 
347 {
348  int failed = 0;
349 
350  //try max_failed times to find new insertable particle
351  while (failed<=max_failed){
353  if (IsInsertable(P0)) {
354  failed = 0;
355  num_created++;
356  } else failed++;
357  };
358 }
359 
360 
365 {
366  //clean outflow every 100 timesteps
367  static int count = 0, maxcount = 100;
368  if (count>maxcount)
369  {
370  count = 0;
371  // delete all outflowing particles
372  for (unsigned int i=0;i<getParticleHandler().getNumberOfObjects();)
373  {
374 
375  if (getParticleHandler().getObject(i)->get_Position().X>get_xmax()||getParticleHandler().getObject(i)->get_Position().X<get_xmin())//||getParticleHandler().getObject(i)->Position.Z+getParticleHandler().getObject(i)->Radius<zmin)
376 
377  {
378  #ifdef DEBUG_OUTPUT_FULL
379  std::cout << "erased:" << getParticleHandler().getObject(i) << std::endl;
380  #endif
381  removeParticle(i);
382  }
383  else i++;
384  }
385  } else count++;
386 }
387 
389 
390  add_particle(P);
391  //std::cout<<"Adding particle "<<P<<std::endl;
392  if(TestObjAgainstGrid(grid,getParticleHandler().getLastObject()))
393  {
394 #ifdef ContactListHgrid
396 #endif
397  //std::cout<<"Past"<<std::endl;
398  return true;
399  }
400  else
401  {
402  //std::cout<<"Past niet"<<std::endl;
404 #ifndef ContactListHgrid
405  int bucket = grid->ComputeHashBucketIndex(getParticleHandler().getLastObject()->get_HGRID_x(),getParticleHandler().getLastObject()->get_HGRID_y(), getParticleHandler().getLastObject()->get_HGRID_z(), getParticleHandler().getLastObject()->get_HGRID_Level());
407 #endif
409  return false;
410  }
411 }
412 
413 
414 int Chute::readNextArgument(unsigned int& i, unsigned int argc, char *argv[]) {
415  if (!strcmp(argv[i],"-inflowHeight")) {
416  set_InflowHeight(atof(argv[i+1]));
417  set_zmax(atof(argv[i+1]));
418  } else if (!strcmp(argv[i],"-inflowVelocity")) {
419  set_InflowVelocity(atof(argv[i+1]));
420  } else if (!strcmp(argv[i],"-chuteAngle")) {
421  set_ChuteAngle(atof(argv[i+1]));
422  } else if (!strcmp(argv[i],"-chuteLength")) {
423  set_ChuteLength(atof(argv[i+1]));
424  } else if (!strcmp(argv[i],"-chuteWidth")) {
425  set_ChuteWidth(atof(argv[i+1]));
426  } else if (!strcmp(argv[i],"-fixedParticleRadius")) {
427  set_FixedParticleRadius(atof(argv[i+1]));
428  } else if (!strcmp(argv[i],"-max_failed")) {
429  set_max_failed(atoi(argv[i+1]));
430  } else if (!strcmp(argv[i],"-inflowParticleRadiusRange")) {
431  set_InflowParticleRadius(atof(argv[i+1]),atof(argv[i+2]));
432  i++;
433  } else if (!strcmp(argv[i],"-inflowParticleRadius")) {
434  set_InflowParticleRadius(atof(argv[i+1]));
435  } else if (!strcmp(argv[i],"-randomizedBottom")) {
436  set_RandomizedBottom(atof(argv[i+1]));
437  } else if (!strcmp(argv[i],"-k_eps")) {
439  //~ Mdouble Mass = getParticleHandler().get_LightestParticle()->get_Mass();
440  Species[0].set_k_and_restitution_coefficient(atof(argv[i+1]), atof(argv[i+2]), Mass);
441  std::cout << "reset contact properties of lightest Particle (mass=" << Mass << ") to k=" << get_k() << " and disp=" << get_disp() << std::endl;
442  i+=1;
443  } else if (!strcmp(argv[i],"-tc_eps")) {
445  Species[0].set_collision_time_and_restitution_coefficient(atof(argv[i+1]), atof(argv[i+2]), Mass);
446  std::cout << "reset contact properties of lightest Particle (mass=" << Mass << ") to k=" << get_k() << " and disp=" << get_disp() << std::endl;
447  i+=1;
448  } else if (!strcmp(argv[i],"-tc_eps_beta")) {
450  Species[0].set_collision_time_and_normal_and_tangential_restitution_coefficient(atof(argv[i+1]), atof(argv[i+2]), atof(argv[i+3]), Mass);
451  std::cout << "reset contact properties of lightest Particle (mass=" << Mass << ") to k=" << get_k() << ", disp=" << get_disp() << ", kt=" << get_kt() << " and dispt=" << get_dispt() << std::endl;
452  i+=2;
453  } else return HGRID_3D::readNextArgument(i, argc, argv); //if argv[i] is not found, check the commands in HGRID_3D
454  return true; //returns true if argv[i] is found
455 }
Mdouble InflowVelocity
Definition: Chute.h:256
Mdouble get_zmin()
Gets zmin.
Definition: MD.h:313
Mdouble MinInflowParticleRadius
Definition: Chute.h:254
Mdouble get_LargestParticleInteractionRadius()
Definition: Chute.cc:209
void set_zmax(Mdouble new_zmax)
Sets ymax and walls, assuming the standard definition of walls as in the default constructor.
Definition: MD.h:334
void InsertParticleToHgrid(BaseParticle *obj)
This insert a particle given by CParticle in to the HGrid (i.e. it sets up the particle grid properts...
Definition: HGRID.cc:69
Mdouble X
Definition: Vector.h:44
void clean_chute()
Here we define the outflow.
Definition: Chute.cc:364
void HGRID_UpdateParticleInHgrid(BaseParticle *obj)
This adds a partcile to the Grid, called in the grid setup routies.
Definition: HGRID_3D.cc:220
Mdouble get_dispt(unsigned int indSpecies=0)
Allows the tangential viscosity to be accessed.
Definition: MD.h:226
Mdouble get_LightestParticleMass()
Returns the radius of the smallest particle.
Definition: Chute.cc:218
void compute_particle_mass(std::vector< CSpecies > &Species)
Compute Particle mass function, which required a reference to the Species vector. It copmuters the Pa...
virtual void create_inflow_particle()
Sets variable values for particles that are created at the inflow.
Definition: Chute.cc:126
int get_IndSpecies() const
int readNextArgument(unsigned int &i, unsigned int argc, char *argv[])
Definition: Chute.cc:414
void copyAndAddObject(const T &O)
Creates a copy of a Object and adds it to the BaseHandler.
Definition: BaseHandler.h:93
T * getObject(const unsigned int id) const
Gets a pointer to the Object at the specified index in the BaseHandler.
Definition: BaseHandler.h:176
void set_InflowVelocity(Mdouble new_)
Changes inflow velocity.
Definition: Chute.h:146
void set_InflowVelocityVariance(Mdouble new_)
Changes inflow velocity variance.
Definition: Chute.h:153
T * getLastObject() const
Gets a pointer to the last Object in this BaseHandler.
Definition: BaseHandler.h:192
Used by Chute::create_bottom to create an unordered particle layer.
Definition: ChuteBottom.h:36
Mdouble get_RN(Mdouble min, Mdouble max)
This is a random generating routine can be used for initial positions.
Definition: RNG.cc:32
int RandomizedBottom
Definition: Chute.h:251
#define sqr(a)
Definition: ExtendedMath.h:36
int max_failed
Definition: Chute.h:259
void make_rough_bottom(ParticleHandler &ChuteParticleHandler)
Definition: ChuteBottom.h:58
void print(std::ostream &os, bool print_all)
This function outputs all HGRID data.
Definition: HGRID_base.cc:121
void actions_before_time_step()
This is action before the time step is started.
Definition: Chute.cc:107
Mdouble InflowVelocityVariance
Definition: Chute.h:257
BaseParticle * getLargestParticle()
Returns the smallest particle (by mass) in the system.
Definition: Chute.cc:189
void set_ChuteAngle(Mdouble new_)
Sets gravity vector according to chute angle (in degrees)
Definition: Chute.h:102
BaseParticle * getLightestParticle() const
Gets a pointer to the lightest BaseParticle (by mass) in this ParticleHandler.
Mdouble get_restitution_coefficient()
Calculates restitution coefficient of two inflow particles.
Definition: Chute.cc:171
std::vector< CSpecies > Species
These are the particle parameters like dissipation etc.
Definition: MD.h:655
BaseParticle * get_HGRID_NextObject() const
void set_max_failed(unsigned int new_)
Allows radius of fixed particles to be changed.
Definition: Chute.h:112
Mdouble get_restitution_coefficient(Mdouble mass, unsigned int indSpecies=0)
Calculates restitution coefficient for two copies of given disp, k, mass.
Definition: MD.h:302
Mdouble get_dissipation(unsigned int indSpecies=0)
Allows the normal dissipation to be accessed.
Definition: MD.h:243
void removeLastObject()
Removes the last Object from the BaseHandler.
Definition: BaseHandler.h:147
void set_InflowHeight(Mdouble new_)
Changes inflow height.
Definition: Chute.h:139
RNG random
Definition: MD.h:515
virtual void add_particles()
Here we define the inflow.
Definition: Chute.cc:346
BaseParticle * getSmallestParticle()
Returns the smallest particle (by mass) in the system.
Definition: Chute.cc:178
Mdouble get_ymax()
Gets ymax.
Definition: MD.h:311
bool is_periodic
Definition: Chute.h:266
Defines a pair of periodic walls. The particles are in {x: position_left<=normal*x
Mdouble get_Radius() const
Mdouble get_Mass() const
int num_created
Definition: Chute.h:260
virtual void create_bottom()
Create the bottom of chute out of particles.
Definition: Chute.cc:254
Mdouble get_t()
Access function for the time.
Definition: MD.h:108
WallHandler & getWallHandler()
Definition: MD.h:148
Mdouble get_ymin()
Gets ymin.
Definition: MD.h:309
bool TestObjAgainstGrid(HGrid *grid, BaseParticle *obj)
Tests obj against all neighbouring particles similar to CheckObjAgainstGrid, but links to TestCell in...
Definition: HGRID_3D.cc:310
void set_RandomizedBottom(int new_)
Changes RandomizedBottom.
Definition: Chute.h:97
const Mdouble pi
Definition: ExtendedMath.h:54
void write(std::ostream &os)
This function writes all HGRID data.
Definition: HGRID_base.cc:113
Mdouble get_xmin()
Get xmin.
Definition: MD.h:305
void copyAndAddWall(const BaseWall &B)
Creates a copy of a BaseWall and adds it to the WallHandler.
Definition: WallHandler.cc:84
double Mdouble
Definition: ExtendedMath.h:33
void setup_particles_initial_conditions()
initialize particle position, velocity, radius
Definition: Chute.cc:229
Mdouble get_collision_time(Mdouble mass, unsigned int indSpecies=0)
Calculates collision time for two copies of a particle of given disp, k, mass.
Definition: MD.h:300
void set_ChuteWidth(Mdouble new_)
Access function that set the width of the chute.
Definition: Chute.h:185
Mdouble get_k(int indSpecies=0)
Allows the spring constant to be accessed.
Definition: MD.h:206
virtual bool IsInsertable(BaseParticle &P)
here, CheckObjects is called; returns true is the particle should be added
Definition: Chute.cc:388
void initialize_inflow_particle()
Sets initial values for particles that are created at the inflow.
Definition: Chute.cc:113
const std::vector< T * >::const_iterator end() const
Gets the end of the const_iterator over all BaseBoundary in this BaseHandler.
Definition: BaseHandler.h:233
Mdouble get_rho(int indSpecies=0)
Allows the density to be accessed.
Definition: MD.h:222
int ComputeHashBucketIndex(int x, int y, int z, int l)
Computes hash bucket index in range [0, NUM_BUCKETS-1].
Definition: HGRID.cc:93
Mdouble get_kt(int indSpecies=0)
Allows the spring constant to be accessed.
Definition: MD.h:210
TangentialSpringParticle P0
Definition: Chute.h:262
Mdouble get_tmax()
Allows the upper time limit to be accessed.
Definition: MD.h:144
virtual void set_ChuteLength(Mdouble new_)
Definition: Chute.h:187
void add_particle(BaseParticle &P)
adds particle to hgrid
Definition: Chute.cc:96
unsigned int getNumberOfObjects() const
Gets the number of Object in this BaseHandler.
Definition: BaseHandler.h:199
HGrid * grid
Definition: HGRID_base.h:131
const Vec3D & get_Position() const
void print(std::ostream &os, bool print_all=false)
This function std::couts all chute data.
Definition: Chute.cc:88
void set(Vec3D normal_, Mdouble position_)
Defines a standard wall, given an outward normal vector s. t. normal*x=position.
Definition: InfiniteWall.h:75
void constructor()
This is the actual constructor; it is called do both constructors above.
Definition: Chute.cc:30
Mdouble get_disp(unsigned int indSpecies=0)
Allows the normal dissipation to be accessed.
Definition: MD.h:239
Mdouble Y
Definition: Vector.h:44
int readNextArgument(unsigned int &i, unsigned int argc, char *argv[])
Definition: HGRID_base.cc:277
void set_Radius(const Mdouble _new)
void set_Velocity(const Vec3D &_new)
void cout_time()
std::couts time
Definition: Chute.cc:148
Mdouble FixedParticleRadius
Definition: Chute.h:250
void set_AngularVelocity(const Vec3D &_new)
Mdouble ChuteAngle
Definition: Chute.h:252
virtual void removeParticle(int iP)
Definition: MD.h:420
Mdouble get_collision_time()
Calculates collision time of two inflow particles.
Definition: Chute.cc:165
void set_Angle(const Vec3D &_new)
BoundaryHandler & getBoundaryHandler()
Definition: MD.h:149
This is a class defining walls.
Definition: InfiniteWall.h:42
Mdouble MaxInflowParticleRadius
Definition: Chute.h:255
Mdouble InflowHeight
Definition: Chute.h:258
void read(std::istream &is)
This function reads all chute data.
Definition: Chute.cc:46
ParticleHandler & getParticleHandler()
Definition: MD.h:147
void set_dissipation(Mdouble new_, unsigned int indSpecies=0)
Allows the normal dissipation to be changed.
Definition: MD.h:241
void set(Vec3D normal_, Mdouble position_left_, Mdouble position_right_)
Defines a periodic wall, given a normal vector s.t.
Mdouble get_SmallestParticleInteractionRadius()
Returns the radius of the smallest particle.
Definition: Chute.cc:200
int get_restart_version()
Gets restart_version.
Definition: MD.h:372
Mdouble get_xmax()
Get xmax.
Definition: MD.h:307
void read(std::istream &is)
This function reads all HGRID data.
Definition: HGRID_base.cc:99
Implementation of a 3D vector (by Vitaliy).
Definition: Vector.h:40
void HGRID_actions_before_time_step()
This resets all the bucket information.
Definition: HGRID_base.cc:221
void set_Position(const Vec3D &_new)
void HGRID_actions_before_time_loop()
This sets up the broad phase information, has to be done at this stage becuase it requires the partcl...
Definition: HGRID_base.cc:66
Mdouble Z
Definition: Vector.h:44
virtual void write(std::ostream &os)
This function writes all chute data.
Definition: Chute.cc:70
Mdouble get_zmax()
Gets zmax.
Definition: MD.h:315
void set_k(Mdouble new_, unsigned int indSpecies=0)
Allows the spring constant to be changed.
Definition: MD.h:204
void set_FixedParticleRadius(Mdouble new_)
Allows radius of fixed particles to be changed.
Definition: Chute.h:92
void set_collision_time_and_restitution_coefficient(Mdouble tc, Mdouble eps)
Sets k, disp such that it matches a given tc and eps for a collision of two inflow particles...
Definition: Chute.cc:157
void set_InflowParticleRadius(Mdouble new_)
Allows radius of inflow particles to be changed.
Definition: Chute.h:117
BaseParticle ** objectBucket
objectBucket[b] stores pointer to first element in hash bucket b; initially all NULL ...
Definition: HGRID.h:58
Mdouble get_FixedParticleRadius()
Allows radius of fixed particles to be accessed.
Definition: Chute.h:94