HorizontalMixerWalls.cpp File Reference
#include "HorizontalMixer.h"

Classes

class  HorizontalMixerWalls
 

Functions

int main ()
 

Function Documentation

◆ main()

int main ( )
59 {
60  Mdouble revolutionsPerSecond = 0.25;
61  Mdouble rotationSpeed = 0.25*constants::pi*revolutionsPerSecond;
62  Mdouble particleRadius = 0.2;
63  Mdouble timeMin = 0.0;
64  Mdouble fillHeight = 0;
65  HorizontalMixerWalls mixer(particleRadius, rotationSpeed, timeMin, fillHeight);
66 
67  //set name
68  mixer.setName("HorizontalMixerWalls");
69 
70  //remove old files (note this is a bit dangerous)
71  //mixer.removeOldFiles();
72 
73  //set species
74  auto s = mixer.speciesHandler.copyAndAddObject(LinearViscoelasticSlidingFrictionSpecies());
75  s->setDensity(2000);
76  Mdouble mass = s->getMassFromRadius(particleRadius);
77  s->setCollisionTimeAndRestitutionCoefficient(0.01, 0.5, mass);
78  s->setSlidingFrictionCoefficient(0.5);
79  s->setSlidingStiffness(2.0 / 7.0 * s->getStiffness());
80  s->setSlidingDissipation(2.0 / 7.0 * s->getDissipation());
81 
82  //set timestep
83  mixer.setTimeStep(0.2 * s->getCollisionTime(mass));
84  //save every 2 collision times for smooth viewable output
85  mixer.setSaveCount((unsigned) (20.0 * s->getCollisionTime(mass) / mixer.getTimeStep()));
86  logger(INFO, "Savecount: %", mixer.dataFile.getSaveCount());
87 
88  mixer.setTimeMax(100);
89 
90  mixer.solve();
91  return 0;
92 }
double Mdouble
Definition: GeneralDefine.h:34
Species< LinearViscoelasticNormalSpecies, SlidingFrictionSpecies > LinearViscoelasticSlidingFrictionSpecies
Definition: LinearViscoelasticSlidingFrictionSpecies.h:34
LL< Log::INFO > INFO
Info log level.
Definition: Logger.cc:55
Logger< MERCURYDPM_LOGLEVEL > logger("MercuryKernel")
Definition of different loggers with certain modules. A user can define its own custom logger here.
Definition: HorizontalMixerWalls.cpp:6
const Mdouble pi
Definition: ExtendedMath.h:45

References BaseHandler< T >::copyAndAddObject(), DPMBase::dataFile, File::getSaveCount(), DPMBase::getTimeStep(), INFO, logger, constants::pi, DPMBase::setName(), DPMBase::setSaveCount(), DPMBase::setTimeMax(), DPMBase::setTimeStep(), DPMBase::solve(), and DPMBase::speciesHandler.