SilbertPeriodic.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 #include <iomanip>
6 #include <string.h>
7 
8 #include "Chute.h"
10 #include "Walls/InfiniteWall.h"
12 
13 class SilbertPeriodic : public Chute
14 {
15 public:
16 
18  // Problem parameters
19  setName("silbert");
20 
21  //time stepping
22  setTimeStep(1e-4);
23  setTimeMax(2000);
24 
25  //output parameters
26  setSaveCount(50e4);
27 
28  //particle radii
30  setFixedParticleRadius(.5);//getInflowParticleRadius());
32 
33 
34  //particle properties
35  baseSpecies = nullptr;
38  species->setStiffness(2e5);
39  species->setSlidingStiffness(2.0/7.0* species->getStiffness());
40  species->setDissipation(25.0);
41  //setSlidingDissipation(2.0/7.0*getDissipation());
42  species->setSlidingDissipation(species->getDissipation());
43  species->setSlidingFrictionCoefficient(0.5);
45 
46  //chute properties
48  setChuteLength(20);
49  setChuteWidth(10);
51  set_H(20);
52 
53  randomiseSpecies=false;
54  nCreated_=0;
55 
60  }
61 
62  //void fix_hgrid() {
63  //assume 1-2 levels are optimal (which is the case for mono and bidispersed) and set the cell size to min and max
64  // !this is not optimal for polydispersed
65  // Mdouble minCell = 2.*min(getFixedParticleRadius(),getMinInflowParticleRadius());
66  // Mdouble maxCell = 2.*max(getFixedParticleRadius(),getMaxInflowParticleRadius());
67  // if ((minCell==maxCell)|(minCell==0.)) set_HGRID_max_levels(1);
68  // else set_HGRID_max_levels(2);
69  // set_HGRID_cell_to_cell_ratio (1.0000001*maxCell/minCell);
70  //}
71 
73  if (baseSpecies!= nullptr)
74  return baseSpecies->getSlidingFrictionCoefficient();
75  else return species->getSlidingFrictionCoefficient();
76  }
79  baseSpecies->setSlidingFrictionCoefficient(new_);
80  }
81  virtual void createBaseSpecies() {
82  //only create once
83  static bool created=false;
84  if (!created) {
85  auto species1 = speciesHandler.copyAndAddObject(species);
87  for (unsigned int i=0; i<particleHandler.getNumberOfObjects(); i++) {
90  }
91  }
92  }
93 
94  void set_study() {
95  std::stringstream name;
96  name << "H" << getInflowHeight()
97  << "A" << getChuteAngleDegrees()
98  << "L" << round(100.*getFixedParticleRadius()*2.)/100.
99  << "M" << species->getSlidingFrictionCoefficient()
101  setName(name.str().c_str());
102  //set_data_filename();
103  }
104 
105  void set_study(int study_num) {
106  //S=0-5: lambda = 0, 3./6., 4./6., 5./6., 1, 2
107  //S=6-8: mu = 0, 1, inf
108  //S=9-13: mub = 0,1,inf,1/4,1/8
109  //S=14-15: mu = 1/4, 1/8
110  //S=16-19: lambda = 1./6., 2./6., 1.5, 4
111  //S=21-25: mub=1/16,1/32,1/64,1/128,1/1024
112  //S=26-28: lambda=1/2, mub=1/16,1/128,1/1024
113  //S=29-32: lambda=0, mub=1/16,1/128,1/1024,0
114  //Case 37 set getSlidingDissipation()=0
115  //Case 38 set eps=0.97
116  //Case 39 set hertzian = true
117  //Case 40, 41, 42: set Foerster glass, Lorenz steel, Lorenz glassv
118  //Case 43, 44, 45, 46: set Silbert, Foerster glass, Lorenz steel, Lorenz glass with rolling friction
119  logger(INFO, "Study %", study_num);
120 
121  if (study_num < 6) {
122  // set mu_all = 0.5, vary lambda
123  Mdouble Lambdas[] = {0, 3./6., 4./6., 5./6., 1, 2};
124  setFixedParticleRadius(Lambdas[study_num]/2.);
125  species->setSlidingFrictionCoefficient(0.5);
126  } else if (study_num < 9) { //Case 6,7,8
127  // set lambda = 1, vary mu_all
128  Mdouble MuAll[] = {0, 1., 1e20};
129  species->setSlidingFrictionCoefficient(MuAll[study_num-6]);
131  } else if (study_num < 12) { //Case 9,10,11
132  // set lambda = 1, mu_all = 0.5, vary mu_bottom
133  Mdouble MuBottom[] = {0, 1., 1e20};
134  species->setSlidingFrictionCoefficient(0.5);
135  setSlidingFrictionCoefficientBottom(MuBottom[study_num-9]);
137  } else if (study_num < 14) { //Case 12,13
138  // set lambda = 1, mu_all = 0.5, vary mu_bottom
139  Mdouble MuBottom[] = {0.25, 0.125};
140  species->setSlidingFrictionCoefficient(0.5);
141  setSlidingFrictionCoefficientBottom(MuBottom[study_num-12]);
143  } else if (study_num < 16) { //Case 14,15
144  // set lambda = 1, vary mu_all
145  Mdouble MuAll[] = {0.25, 0.125};
146  species->setSlidingFrictionCoefficient(MuAll[study_num-14]);
148  } else if (study_num < 21) { //Case 16,17,18,19,20
149  // set mu_all = 0.5, vary lambda
150  Mdouble Lambdas[] = {1./6., 2./6., 1.5, 4, 1./12};
151  setFixedParticleRadius(Lambdas[study_num-16]/2.);
152  species->setSlidingFrictionCoefficient(0.5);
153  } else if (study_num < 26) { //Case 21 22 23 24 25
154  // set lambda = 1, mu_all = 0.5, vary mu_bottom
155  Mdouble MuBottom[] = {1./16.,1./32.,1./64.,1./128.,1./1024.};
156  species->setSlidingFrictionCoefficient(0.5);
157  setSlidingFrictionCoefficientBottom(MuBottom[study_num-21]);
159  } else if (study_num < 29) { //Case 26 27 28
160  // set lambda = 1/2, mu_all = 0.5, vary mu_bottom
161  Mdouble MuBottom[] = {1./16.,1./128.,1./1024.};
162  species->setSlidingFrictionCoefficient(0.5);
163  setSlidingFrictionCoefficientBottom(MuBottom[study_num-26]);
165  } else if (study_num < 33) { //Case 29 30 31 32
166  // set lambda = 0, mu_all = 0.5, vary mu_bottom
167  Mdouble MuBottom[] = {1./16.,1./128.,1./1024.,0};
168  species->setSlidingFrictionCoefficient(0.5);
169  setSlidingFrictionCoefficientBottom(MuBottom[study_num-29]);
171  } else if (study_num < 37) { //Case 33-36
172  logger(INFO, "S %", study_num);
173  // set lambda = 1, mu_b = 0.5, vary mu
174  Mdouble Mu[] = {1e20,1,1./64,0};
175  species->setSlidingFrictionCoefficient(Mu[study_num-33]);
178  } else if (study_num < 38) { //Case 37
179  // set getSlidingDissipation()=0
180  species->setSlidingDissipation(0);
181  } else if (study_num < 39) { //Case 38
182  // set eps=0.97
183  Mdouble eps = 0.97;
185  species->setSlidingDissipation(species->getDissipation());
186  } else if (study_num < 40)
187  { //Case 39
188  // set hertzian = true
189  logger(INFO, "Hertzian implementation has been changed");
190  exit(-1);
191  //set_Hertzian(true);
193  } else if (study_num < 43) { //Case 40, 41, 42
194  // set Foerster glass, Lorenz steel, Lorenz glass
195  Mdouble eps[] = {0.97 , 0.95 , 0.972};
196  Mdouble beta[]= {0.44 , 0.32 , 0.25 };
197  Mdouble mu[] = {0.092, 0.099, 0.177};
198  species->setSlidingFrictionCoefficient(mu[study_num-40]);
199  species->setCollisionTimeAndNormalAndTangentialRestitutionCoefficient
200  (50.*getTimeStep(), eps[study_num-40], beta[study_num-40], 1);
201  } else if (study_num < 47) { //Case 43, 44, 45, 46
202  // set Silbert, Foerster glass, Lorenz steel, Lorenz glass with rolling friction
203  Mdouble eps[] = {0.97 , 0.95 , 0.972};
204  Mdouble beta[]= {0.44 , 0.32 , 0.25 };
205  Mdouble mu[] = {0.092, 0.099, 0.177};
206  if (study_num!=43) {
207  species->setSlidingFrictionCoefficient(mu[study_num-44]);
208  species->setCollisionTimeAndNormalAndTangentialRestitutionCoefficient
209  (50.*getTimeStep(), eps[study_num-44], beta[study_num-44], 1);
210  }
212  species->setRollingStiffness(0.4*species->getStiffness());
213  species->setRollingFrictionCoefficient(0.05);
214  } else if (study_num < 48) { //Case 47
215  // set lambda = 1, mu_all = 0.5, vary mu_half
216  Mdouble MuHalf[] = {0};
217  species->setSlidingFrictionCoefficient(MuHalf[study_num-47]);
220  randomiseSpecies = true;
221  } else if (study_num < 52) { //Case 48, 49, 50, 51
222  // set vary eps
223  Mdouble eps[] = {0.001, 0.01, 0.1, 1};
224  species->setCollisionTimeAndNormalAndTangentialRestitutionCoefficient
225  (50.*getTimeStep(), eps[study_num-48], eps[study_num-48], 1);
226  species->setSlidingFrictionCoefficient(0.0);
227  } else if (study_num < 53) { //Case 52
229  } else if (study_num < 54) { //Case 53
230  logger(INFO, "using mu=0.3, r=0.1");
231  species->setSlidingFrictionCoefficient(0.3);
232  species->setCollisionTimeAndNormalAndTangentialRestitutionCoefficient
233  (50.*getTimeStep(),0.1,0.1,1);
234  } else if (study_num < 55) { //Case 54
235  logger(INFO, "using mu=0.3, r=0.88");
236  species->setSlidingFrictionCoefficient(0.3);
237  species->setCollisionTimeAndNormalAndTangentialRestitutionCoefficient
238  (50.*getTimeStep(),0.88,0.88,1);
239  } else
240  {
241  //If study_num is complete quit
242  logger(VERBOSE, "Study is complete ");
243  exit(0);
244  }
245  //Note make sure h and a is defined
246  if (study_num < 37 || (study_num>=53&&study_num<=55))
247  {
248  set_study();
249  }
250  else
251  {
252  std::stringstream name;
253  name << "S" << study_num;
254  dataFile.setName(name.str().c_str());
255  //set_data_filename();
256  }
257 
258  }
259 
260  //Do not add or remove particles
261  virtual void actionsBeforeTimeStep() override { };
262 
263  //Set up periodic walls, rough bottom, add flow particles
264  void setupInitialConditions() override
265  {
266  //fix_hgrid();
268 
269  createBottom();
270  //~ write(std::cout,false);
271  //cout << "correct fixed" << endl;
273  for (unsigned int i=0; i<particleHandler.getNumberOfObjects(); i++)
276  }
277 
279  wallHandler.clear();
280  InfiniteWall w0;
282  if (getFixedParticleRadius()) {
283  w0.set(Vec3D(0,0,-1), Vec3D(0,0,-3.4* getMaxInflowParticleRadius()));
284  } else {
285  w0.set(Vec3D(0,0,-1), Vec3D(0,0,0));
286  }
288 
289  PeriodicBoundary b0;
290  b0.set(Vec3D(1.0, 0.0, 0.0), getXMin(), getXMax());
292  b0.set(Vec3D(0.0, 1.0, 0.0), getYMin(), getYMax());
294 
296 
297  logger(INFO, "\nStatus before solve:");
298 // std::cout
299 // << "tc=" << getCollisionTime()
300 // << ", eps=" << getRestitutionCoefficient()
301 // << ", vmax=" << getInflowParticle()->calculateMaximumVelocity(getSpecies())
302 // << ", inflowHeight/zMax=" << getInflowHeight()/getZMax()
303 // << std::endl << std::endl;
304  //~ timer.set(t,tmax);
305 
306  //optimize number of buckets
308  //setHGridNumberOfBucketsToPower(particleHandler.getNumberOfObjects()*1.5);
309  }
310 
311  //add flow particles
313  {
314  //setHGridNumberOfBucketsToPower(particleHandler.getStorageCapacity());
318  unsigned int N=getChuteLength()*getChuteWidth()* getInflowHeight();
321  setZMax(1.0*getInflowHeight());
322  //uncomment the following line to achieve a high packing fraction
324 
326  //try to find new insertable particles
327  while (getNCreated()<N){
331  //duplicate particle
332  for (BaseBoundary* it : boundaryHandler)
333  it->createPeriodicParticle(p, particleHandler);
335  //duplicate duplicate particles (this is a hack which is needed as there are two boundaries, so the doubly periodic images are needed)
336  for (BaseBoundary* it : boundaryHandler)
337  it->createPeriodicParticle(p, particleHandler);
338  //hGridActionsBeforeTimeStep();
341  }
342  for (unsigned int i = particleHandler.getNumberOfObjects(); i >= 1; i--)
343  if (particleHandler.getObject(i - 1)->getPeriodicFromParticle() != nullptr)
344  {
345  while (particleHandler.getObject(i - 1)->getInteractions().size() > 0)
346  {
348  }
350  }
352  //setHGridNumberOfBucketsToPower();
353  write(std::cout,false);
354  }
355 
356  //defines type of flow particles
358  {
360  //inflowParticle_.computeMass();
361 
362  //The position components are first stored in a Vec3D, because if you pass them directly into setPosition the compiler is allowed to change the order in which the numbers are generated
363  Vec3D position;
364  position.X = random.getRandomNumber(getXMin(), getXMax());
365  position.Y = random.getRandomNumber(getYMin(), getYMax());
367  inflowParticle_.setPosition(position);
369  if (randomiseSpecies)
370  {
371  int indSpecies = floor(random.getRandomNumber(0, speciesHandler.getNumberOfObjects() - 1e-200));
373  }
374  }
375 
376  //set approximate height of flow
377  void set_H(Mdouble new_)
378  {
379  setInflowHeight(new_);
381  }
382 
384  { return getInflowHeight(); }
385 
386  void printTime() const override
387  {
388  logger(INFO, "t=%3.6"
389  ", tmax=%3.6"
390  ", N=%3.6"
391  ", theta=%3.6",
393  //<< ", time left=" << setprecision(3) << left << setw(6) << timer.getTime2Finish(t)
394  //~ << ", finish by " << setprecision(3) << left << setw(6) << timer.getFinishTime(t)
395  }
396 
397  bool readNextArgument(int& i, int argc, char* argv[]) override
398  {
399  if (!strcmp(argv[i], "-muBottom"))
400  {
401  setSlidingFrictionCoefficientBottom(atof(argv[i + 1]));
403  }
404  else if (!strcmp(argv[i], "-oldValues"))
405  {
406  species->setSlidingDissipation(species->getDissipation());
407  logger(INFO, "getSlidingDissipation()=%", species->getSlidingDissipation());
408  }
409  else return Chute::readNextArgument(i, argc, argv); //if argv[i] is not found, check the commands in Chute
410  return true; //returns true if argv[i] is found
411  }
412 
413  int getNCreated() const
414  {
415  return nCreated_;
416  }
417 
419  {
420  nCreated_++;
421  }
422 
423  int nCreated_;
424  bool randomiseSpecies;
426 
429 };
int i
Definition: BiCGSTAB_step_by_step.cpp:9
@ MULTILAYER
Definition: Chute.h:32
Array< double, 1, 3 > e(1./3., 0.5, 2.)
@ MULTIPLE_FILES_PADDED
each time-step will be written into/read from separate files numbered consecutively,...
@ NO_FILE
file will not be created/read
@ ONE_FILE
all data will be written into/ read from a single file called name_
MatrixXf H
Definition: HessenbergDecomposition_matrixH.cpp:4
Species< LinearViscoelasticNormalSpecies, FrictionSpecies > LinearViscoelasticFrictionSpecies
Definition: LinearViscoelasticFrictionSpecies.h:12
Logger< MERCURYDPM_LOGLEVEL > logger("MercuryKernel")
Definition of different loggers with certain modules. A user can define its own custom logger here.
@ INFO
@ VERBOSE
float * p
Definition: Tutorial_Map_using.cpp:9
Definition: BaseBoundary.h:28
virtual unsigned int getNumberOfObjects() const
Gets the number of real Object in this BaseHandler. (i.e. no mpi or periodic particles)
Definition: BaseHandler.h:656
virtual void clear()
Empties the whole BaseHandler by removing all Objects and setting all other variables to 0.
Definition: BaseHandler.h:536
void setStorageCapacity(const unsigned int N)
Sets the storage capacity of this BaseHandler.
Definition: BaseHandler.h:677
std::enable_if<!std::is_pointer< U >::value, U * >::type copyAndAddObject(const U &object)
Creates a copy of a Object and adds it to the BaseHandler.
Definition: BaseHandler.h:360
unsigned int getStorageCapacity() const
Gets the storage capacity of this BaseHandler.
Definition: BaseHandler.h:670
T * getObject(const unsigned int id)
Gets a pointer to the Object at the specified index in the BaseHandler.
Definition: BaseHandler.h:621
T * getLastObject()
Gets a pointer to the last Object in this BaseHandler.
Definition: BaseHandler.h:642
void setVelocity(const Vec3D &velocity)
set the velocity of the BaseInteractable.
Definition: BaseInteractable.cc:328
virtual void setPosition(const Vec3D &position)
Sets the position of this BaseInteractable.
Definition: BaseInteractable.h:218
const std::vector< BaseInteraction * > & getInteractions() const
Returns a list of interactions which belong to this interactable.
Definition: BaseInteractable.h:256
Definition: BaseParticle.h:33
bool isFixed() const override
Is fixed Particle function. It returns whether a Particle is fixed or not, by checking its inverse Ma...
Definition: BaseParticle.h:72
Mdouble getRadius() const
Returns the particle's radius.
Definition: BaseParticle.h:331
virtual void setRadius(Mdouble radius)
Sets the particle's radius_ (and adjusts the mass_ accordingly, based on the particle's species)
Definition: BaseParticle.cc:548
BaseParticle * getPeriodicFromParticle() const
Returns the 'original' particle this one's a periodic copy of.
Definition: BaseParticle.h:324
virtual void setSpecies(const ParticleSpecies *species)
Definition: BaseParticle.cc:798
void setSpecies(const ParticleSpecies *species)
Defines the species of the current wall.
Definition: BaseWall.cc:148
Creates chutes with different bottoms. Inherits from Mercury3D (-> MercuryBase -> DPMBase).
Definition: Chute.h:44
void setChuteWidth(Mdouble chuteWidth)
Sets the chute width (Y-direction)
Definition: Chute.cc:1018
void setInflowParticleRadius(Mdouble inflowParticleRadius)
Sets the radius of the inflow particles to a single one (i.e. ensures a monodisperse inflow).
Definition: Chute.cc:827
void setRoughBottomType(RoughBottomType roughBottomType)
Sets the type of rough bottom of the chute.
Definition: Chute.cc:693
virtual void setChuteLength(Mdouble chuteLength)
Sets the chute length (X-direction)
Definition: Chute.cc:1038
Mdouble getFixedParticleRadius() const
Returns the particle radius of the fixed particles which constitute the (rough) chute bottom.
Definition: Chute.cc:650
Mdouble getMaxInflowParticleRadius() const
Returns the maximum radius of inflow particles.
Definition: Chute.cc:926
Mdouble getInflowHeight() const
Returns the maximum inflow height (Z-direction)
Definition: Chute.cc:953
virtual void createBottom()
Creates the chute bottom, which can be either flat or one of three flavours of rough.
Definition: Chute.cc:302
bool readNextArgument(int &i, int argc, char *argv[]) override
This method can be used for reading object properties from a string.
Definition: Chute.cc:534
void setChuteAngleAndMagnitudeOfGravity(Mdouble chuteAngle, Mdouble gravity)
Sets gravity vector according to chute angle (in degrees)
Definition: Chute.cc:768
Mdouble getChuteLength() const
Returns the chute length (X-direction)
Definition: Chute.cc:1048
void setInflowVelocity(Mdouble inflowVelocity)
Sets the average inflow velocity.
Definition: Chute.cc:962
void write(std::ostream &os, bool writeAllParticles=true) const override
This function writes the Chute properties to an ostream, and adds the properties of ALL chute particl...
Definition: Chute.cc:185
Mdouble getMinInflowParticleRadius() const
returns the minimum radius of inflow particles
Definition: Chute.cc:917
Mdouble getChuteWidth() const
Returns the chute width (Y-direction)
Definition: Chute.cc:1028
Mdouble getInflowVelocity() const
Returns the average inflow velocity.
Definition: Chute.cc:979
void setInflowHeight(Mdouble inflowHeight)
Sets maximum inflow height (Z-direction)
Definition: Chute.cc:936
void setFixedParticleRadius(Mdouble fixedParticleRadius)
Sets the particle radius of the fixed particles which constitute the (rough) chute bottom.
Definition: Chute.cc:632
Mdouble getChuteAngleDegrees() const
Returns the chute angle (in degrees)
Definition: Chute.cc:795
Mdouble getXMin() const
If the length of the problem domain in x-direction is XMax - XMin, then getXMin() returns XMin.
Definition: DPMBase.h:603
Mdouble getXMax() const
If the length of the problem domain in x-direction is XMax - XMin, then getXMax() returns XMax.
Definition: DPMBase.h:610
void setSaveCount(unsigned int saveCount)
Sets File::saveCount_ for all files (ene, data, fstat, restart, stat)
Definition: DPMBase.cc:386
File eneFile
An instance of class File to handle in- and output into a .ene file.
Definition: DPMBase.h:1494
SpeciesHandler speciesHandler
A handler to that stores the species type i.e. LinearViscoelasticSpecies, etc.
Definition: DPMBase.h:1433
File fStatFile
An instance of class File to handle in- and output into a .fstat file.
Definition: DPMBase.h:1489
Mdouble getYMin() const
If the length of the problem domain in y-direction is YMax - YMin, then getYMin() returns YMin.
Definition: DPMBase.h:616
void setName(const std::string &name)
Allows to set the name of all the files (ene, data, fstat, restart, stat)
Definition: DPMBase.cc:400
Mdouble getTimeStep() const
Returns the simulation time step.
Definition: DPMBase.cc:1241
Mdouble getTime() const
Returns the current simulation time.
Definition: DPMBase.cc:799
File dataFile
An instance of class File to handle in- and output into a .data file.
Definition: DPMBase.h:1484
WallHandler wallHandler
An object of the class WallHandler. Contains pointers to all the walls created.
Definition: DPMBase.h:1453
File restartFile
An instance of class File to handle in- and output into a .restart file.
Definition: DPMBase.h:1499
BoundaryHandler boundaryHandler
An object of the class BoundaryHandler which concerns insertion and deletion of particles into or fro...
Definition: DPMBase.h:1458
virtual void writeRestartFile()
Stores all the particle data for current save time step to a "restart" file, which is a file simply i...
Definition: DPMBase.cc:2979
InteractionHandler interactionHandler
An object of the class InteractionHandler.
Definition: DPMBase.h:1473
ParticleHandler particleHandler
An object of the class ParticleHandler, contains the pointers to all the particles created.
Definition: DPMBase.h:1443
void setZMax(Mdouble newZMax)
Sets the value of ZMax, the upper bound of the problem domain in the z-direction.
Definition: DPMBase.cc:1208
RNG random
This is a random generator, often used for setting up the initial conditions etc.....
Definition: DPMBase.h:1438
void checkAndDuplicatePeriodicParticles()
For simulations using periodic boundaries, checks and adds particles when necessary into the particle...
Definition: DPMBase.cc:5108
Mdouble getYMax() const
If the length of the problem domain in y-direction is YMax - YMin, then getYMax() returns XMax.
Definition: DPMBase.h:622
void setTimeStep(Mdouble newDt)
Sets a new value for the simulation time step.
Definition: DPMBase.cc:1225
void setTimeMax(Mdouble newTMax)
Sets a new value for the maximum simulation duration.
Definition: DPMBase.cc:864
Mdouble getTimeMax() const
Returns the maximum simulation duration.
Definition: DPMBase.cc:879
Mdouble getZMax() const
If the length of the problem domain in z-direction is ZMax - ZMin, then getZMax() returns ZMax.
Definition: DPMBase.h:634
Mdouble getZMin() const
If the length of the problem domain in z-direction is ZMax - ZMin, then getZMin() returns ZMin.
Definition: DPMBase.h:628
void setName(const std::string &name)
Sets the file name, e.g. "Name.data".
Definition: File.cc:176
void setFileType(FileType fileType)
Sets the type of file needed to write into or read from. File::fileType_.
Definition: File.cc:193
A infinite wall fills the half-space {point: (position_-point)*normal_<=0}.
Definition: InfiniteWall.h:27
void set(Vec3D normal, Vec3D point)
Defines a standard wall, given an outward normal vector s.t. normal*x=normal*point for all x of the w...
Definition: InfiniteWall.cc:97
void removeObjectKeepingPeriodics(unsigned int id)
Removes interactions of periodic particles when the periodic particles get deleted (see DPMBase::remo...
Definition: InteractionHandler.cc:296
void setStiffnessAndRestitutionCoefficient(Mdouble k_, Mdouble eps, Mdouble mass)
Sets k, disp such that it matches a given tc and eps for a collision of two copies of P.
Definition: LinearViscoelasticNormalSpecies.cc:165
Mdouble getStiffness() const
Allows the spring constant to be accessed.
Definition: LinearViscoelasticNormalSpecies.cc:83
void setDissipation(Mdouble dissipation)
Allows the normal dissipation to be changed.
Definition: LinearViscoelasticNormalSpecies.cc:96
Mdouble getDissipation() const
Allows the normal dissipation to be accessed.
Definition: LinearViscoelasticNormalSpecies.cc:109
void setStiffness(Mdouble new_k)
Allows the spring constant to be changed.
Definition: LinearViscoelasticNormalSpecies.cc:72
void hGridActionsBeforeTimeLoop() override
This sets up the broad phase information, has to be done at this stage because it requires the partic...
Definition: MercuryBase.cc:73
bool checkParticleForInteraction(const BaseParticle &P) final
Checks if given BaseParticle has an interaction with a BaseWall or other BaseParticle.
Definition: MercuryBase.cc:573
void hGridActionsBeforeTimeStep() override
Performs all necessary actions before a time-step, like updating the particles and resetting all the ...
Definition: MercuryBase.cc:302
Contains contact force properties for contacts between particles with two different species.
Definition: MixedSpecies.h:22
void removeObject(unsigned int index) override
Removes a BaseParticle from the ParticleHandler.
Definition: ParticleHandler.cc:388
unsigned int getNumberOfObjects() const override
Returns the number of objects in the container. In parallel code this practice is forbidden to avoid ...
Definition: ParticleHandler.cc:1323
void setDensity(Mdouble density)
Definition: ParticleSpecies.cc:88
Defines a pair of periodic walls. Inherits from BaseBoundary.
Definition: PeriodicBoundary.h:20
void set(Vec3D normal, Mdouble distanceLeft, Mdouble distanceRight)
Defines a PeriodicBoundary by its normal and positions.
Definition: PeriodicBoundary.cc:63
Mdouble getRandomNumber()
This is a random generating routine can be used for initial positions.
Definition: RNG.cc:123
Definition: flowRuleDiego_HeightAngle.cpp:14
virtual void createBaseSpecies()
Definition: flowRuleDiego_HeightAngle.cpp:68
LinearViscoelasticMixedSpecies * baseSpecies
Definition: flowRuleDiego_HeightAngle.cpp:245
void setSlidingFrictionCoefficientBottom(Mdouble new_)
Definition: SilbertPeriodic.h:77
void add_flow_particles()
Definition: flowRuleDiego_HeightAngle.cpp:144
void create_inflow_particle()
Definition: flowRuleDiego_HeightAngle.cpp:189
LinearViscoelasticSpecies * species
Definition: flowRuleDiego_HeightAngle.cpp:244
void increaseNCreated()
Definition: flowRuleDiego_HeightAngle.cpp:235
virtual void actionsBeforeTimeStep() override
A virtual function which allows to define operations to be executed before the new time step.
Definition: SilbertPeriodic.h:261
void set_study()
Definition: SilbertPeriodic.h:94
void set_H(Mdouble new_)
Definition: flowRuleDiego_HeightAngle.cpp:210
SphericalParticle inflowParticle_
Definition: flowRuleDiego_HeightAngle.cpp:242
SilbertPeriodic()
Definition: SilbertPeriodic.h:17
bool readNextArgument(int &i, int argc, char *argv[]) override
Interprets the i^th command-line argument.
Definition: SilbertPeriodic.h:397
Mdouble get_H()
Definition: SilbertPeriodic.h:383
int nCreated_
Definition: flowRuleDiego_HeightAngle.cpp:240
Mdouble getSlidingFrictionCoefficientBottom()
Definition: SilbertPeriodic.h:72
bool randomiseSpecies
Definition: flowRuleDiego_HeightAngle.cpp:241
void set_study(int study_num)
Definition: SilbertPeriodic.h:105
void printTime() const override
Displays the current simulation time and the maximum simulation duration.
Definition: SilbertPeriodic.h:386
int getNCreated() const
Definition: flowRuleDiego_HeightAngle.cpp:230
void setupInitialConditions() override
This function allows to set the initial conditions for our problem to be solved, by default particle ...
Definition: SilbertPeriodic.h:264
std::enable_if<!std::is_pointer< typename U::MixedSpeciesType >::value, typename U::MixedSpeciesType * >::type getMixedObject(const U *S, const U *T)
Definition: SpeciesHandler.h:52
A spherical particle is the most simple particle used in MercuryDPM.
Definition: SphericalParticle.h:16
Definition: Kernel/Math/Vector.h:30
Mdouble Y
Definition: Kernel/Math/Vector.h:45
Mdouble Z
Definition: Kernel/Math/Vector.h:45
Mdouble X
the vector components
Definition: Kernel/Math/Vector.h:45
@ N
Definition: constructor.cpp:22
Scalar beta
Definition: level2_cplx_impl.h:36
double eps
Definition: crbond_bessel.cc:24
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bfloat16 floor(const bfloat16 &a)
Definition: BFloat16.h:643
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bfloat16 round(const bfloat16 &a)
Definition: BFloat16.h:646
double Mu
Definition: axisym_linear_elasticity/cylinder/cylinder.cc:53
std::complex< double > mu
Definition: time_harmonic_fourier_decomposed_linear_elasticity/cylinder/cylinder.cc:52
const Mdouble pi
Definition: ExtendedMath.h:23
string name
Definition: plotDoE.py:33