Binary.cpp File Reference
#include <iostream>
#include <Species/LinearViscoelasticSlidingFrictionSpecies.h>
#include "Mercury3D.h"
#include "Walls/InfiniteWall.h"

Classes

class  Binary
 

Functions

int main ()
 

Function Documentation

◆ main()

int main ( )
276  {
277 
278  // Set up a problem of type binary
279  Binary dpm;
280  // Set name of output files
281  dpm.setName("Binary");
282  // Set simulation time
283  dpm.setTimeMax(21);
284  // Set container size
285  dpm.setMax({0.1,0.025,0.4});
286  // Set particle and wall properties (5mm glass particles)
287  // number of particles
288  dpm.setNumberOfParticles(250);
289  // radius of particles species 1/2
290  dpm.setParticleRadius(2.50002e-3, 2.5e-3);
291  // density of particles species 1/2
292  dpm.setParticleDensity(2500, 2500); //2500 & 7850 --> glass & steel.
293  // set stiffness and dissipation such that you get a constant collision time and coefficient of restitution
294  double tc = 1e-4;
295  dpm.setCollisionTime(tc);
296  // coefficient of restitution or particle - particle collisions (for species 1-1, 1-2, and 2-2)
297  dpm.setParticleRestitution(0.91, 0.91, 0.91); //(11, 22, 12) OR just leave as a single value for equal Restitution.
298  // coefficient of restitution or particle - base collisions (for all species)
299  dpm.setBaseRestitution(0.6);
300  // coefficient of restitution or particle - side wall collisions (for all species)
301  dpm.setWallRestitution(0.7);
302  // friction coefficient of walls
303  dpm.setWallFriction(0.0); //
304  // frequency of base
305  dpm.setFrequency(70);
306  // amplitude of base
307  dpm.setInitialAmplitude(0.862e-3); //normally 0.862
308  // at a certain time, switch amplitude
309  //dpm.setSwitchPlateAmplitude(3.0, 0.862e-3); //(time, new amplitude)
310  // uncomment to number your output files (prevents old simulations from being overwritten by new simulations)
311  //dpm.autoNumber();
312  // set time step
313  dpm.setTimeStep(tc / 50);
314  // set frequency of writing output
315  dpm.setSaveCount(21000);
316  // randomise seed //TURN THIS OFF IF I WANT REPRODUCIBLE DATA!!
317  //random.randomise();
318  // start the solver
319  dpm.solve();
320 }
Definition: Binary.cpp:34
void setNumberOfParticles(int np)
Definition: Binary.cpp:214
void setInitialAmplitude(double a)
Definition: Binary.cpp:224
void setFrequency(double f)
Definition: Binary.cpp:219
void setBaseRestitution(double Restitution)
Definition: Binary.cpp:229
void setParticleRadius(double pr1, double pr2)
Definition: Binary.cpp:173
void setWallRestitution(double Restitution)
Definition: Binary.cpp:179
void setWallFriction(double mu)
Definition: Binary.cpp:184
void setParticleRestitution(double c11, double c22, double c12)
Definition: Binary.cpp:189
void setParticleDensity(double density1, double density2)
Definition: Binary.cpp:203
void setCollisionTime(double tc_in)
Definition: Binary.cpp:209
void setSaveCount(unsigned int saveCount)
Sets File::saveCount_ for all files (ene, data, fstat, restart, stat)
Definition: DPMBase.cc:408
void setName(const std::string &name)
Allows to set the name of all the files (ene, data, fstat, restart, stat)
Definition: DPMBase.cc:422
void setTimeStep(Mdouble newDt)
Sets a new value for the simulation time step.
Definition: DPMBase.cc:1234
void setTimeMax(Mdouble newTMax)
Sets a new value for the maximum simulation duration.
Definition: DPMBase.cc:873
void solve()
The work horse of the code.
Definition: DPMBase.cc:4270
void setMax(const Vec3D &max)
Sets the maximum coordinates of the problem domain.
Definition: DPMBase.cc:1082

References Binary::setBaseRestitution(), Binary::setCollisionTime(), Binary::setFrequency(), Binary::setInitialAmplitude(), DPMBase::setMax(), DPMBase::setName(), Binary::setNumberOfParticles(), Binary::setParticleDensity(), Binary::setParticleRadius(), Binary::setParticleRestitution(), DPMBase::setSaveCount(), DPMBase::setTimeMax(), DPMBase::setTimeStep(), Binary::setWallFriction(), Binary::setWallRestitution(), and DPMBase::solve().