MonodispersedDrum.cpp File Reference
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cmath>
#include "Mercury3D.h"
#include "Species/LinearViscoelasticFrictionSpecies.h"
#include "Walls/AxisymmetricIntersectionOfWalls.h"
#include "Walls/InfiniteWall.h"
#include "Boundaries/PeriodicBoundary.h"
#include <chrono>

Classes

class  DrumRot
 

Functions

int main (int argc, char *argv[])
 

Function Documentation

◆ main()

int main ( int argc  ,
char argv[] 
)
327 {
328 
329  // Start measuring elapsed time
330  //std::chrono::time_point<std::chrono::system_clock> startClock, endClock;
331  //startClock = std::chrono::system_clock::now();
332 
333 
334  DrumRot problem;
335  problem.setName("MonodisperesedDrum");
336 
337  //setting locally-available variables to define key
338  //parameters such that they can be automatically included in
339  //the name of the file
340  //*******************Excitation Properties*****************************************
341  //Drum rotation rate (rpm)
342  double rotRateBasal = 1.0;
343 
344  //*******************Frictional Properties*****************************************
345  //sliding friction for species 1, 2 and wall
346  double muSWall = 0.61;
347  double muS1 = 0.19;
348 
349  //rolling friction for species 1, 2 and wall
350  double muRWall = 0.06;
351  double muR1 = 0.01;
352 
353  //torsion friction for species 1, 2 and wall
354  double muTWall = 0.0;
355  double muT1 = 0.000;
356 
357  double dimDrumRad = 15.0;
358  double drumRad = dimDrumRad*0.0005; // 45 * smallest particle radius -> dimDrumRad particles fit in drum diameter
359  //the dimensionless drum length (L/d_l)
360  double dimDrumLength = 4.0;
361  double drumLength = dimDrumLength*0.001; // dimDrumLength * smallest particle diameter
362 
363  // computes rpm based on froude number and drumRad
364  problem.setTimeMax(3.0);
365  problem.setTimeStep(1.0/(4000.0 * 50.0));
366  double froudeNumber = 0.22;
367  double rotRate = pow(froudeNumber*9.81/drumRad,0.5);//*(60.0/(2.0*3.1415926535));
368  logger(INFO, "rotRate = %", rotRate);
369  //Set the number of domains for parallel decomposition
370  //problem.setNumberOfDomains({2,1,1});
371 
372  //*******************Setting Up Filename******************************************
373  double dRatio;
374  double rhoRatio;
375 
376 
377 
378  problem.setDrumRadius(drumRad);// in meters
379 
380  problem.setXMin(-problem.getDrumRadius());
381  problem.setYMin(-0.5*drumLength);
382  problem.setZMin(-problem.getDrumRadius());
383 
384  problem.setXMax(problem.getDrumRadius());
385  problem.setYMax(0.5*drumLength);// in meters
386  problem.setZMax(problem.getDrumRadius());
387 
388  problem.setGravity(Vec3D(0.,0.,-9.81));
389  problem.setCOR(0.831,0.831);//drumWall, species1, species2
390  problem.setFractionalPolydispersity(0.0);//10% dispersity
391  problem.setDrumFillFraction(0.2);// At 0.5 the drum is 3/4 filled.
392  //redundant
393  //problem.setFrictionCoeff(.6,.19);//(particle-wall-friction,part-part-friction)
394  problem.setSlidingFriction(muSWall,muS1); //wall, species1, species2
395  problem.setRollingFriction(muRWall,muR1); //wall, species1, species2
396  problem.setTorsionFriction(muTWall,muT1); //wall, species1, species2
397 
398  problem.setRevolutionSpeed(rotRate);//rpm
399 
400  problem.setSaveCount(2000);
401  problem.readArguments(argc,argv);
402 
407 
408  problem.solve();
409 
410  return 0;
411 }
@ ONE_FILE
all data will be written into/ read from a single file called name_
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.
void setSaveCount(unsigned int saveCount)
Sets File::saveCount_ for all files (ene, data, fstat, restart, stat)
Definition: DPMBase.cc:408
File eneFile
An instance of class File to handle in- and output into a .ene file.
Definition: DPMBase.h:1488
File fStatFile
An instance of class File to handle in- and output into a .fstat file.
Definition: DPMBase.h:1483
void setYMin(Mdouble newYMin)
Sets the value of YMin, the lower bound of the problem domain in the y-direction.
Definition: DPMBase.cc:1034
void setName(const std::string &name)
Allows to set the name of all the files (ene, data, fstat, restart, stat)
Definition: DPMBase.cc:422
bool readArguments(int argc, char *argv[])
Can interpret main function input arguments that are passed by the driver codes.
Definition: DPMBase.cc:4391
File dataFile
An instance of class File to handle in- and output into a .data file.
Definition: DPMBase.h:1478
void setYMax(Mdouble newYMax)
Sets the value of YMax, the upper bound of the problem domain in the y-direction.
Definition: DPMBase.cc:1191
void setZMin(Mdouble newZMin)
Sets the value of ZMin, the lower bound of the problem domain in the z-direction.
Definition: DPMBase.cc:1058
File restartFile
An instance of class File to handle in- and output into a .restart file.
Definition: DPMBase.h:1493
void setXMax(Mdouble newXMax)
Sets the value of XMax, the upper bound of the problem domain in the x-direction.
Definition: DPMBase.cc:1165
void setZMax(Mdouble newZMax)
Sets the value of ZMax, the upper bound of the problem domain in the z-direction.
Definition: DPMBase.cc:1217
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 setXMin(Mdouble newXMin)
Sets the value of XMin, the lower bound of the problem domain in the x-direction.
Definition: DPMBase.cc:1010
void setGravity(Vec3D newGravity)
Sets a new value for the gravitational acceleration.
Definition: DPMBase.cc:1383
Definition: MonodispersedDrum.cpp:38
void setDrumRadius(double radius)
Definition: MonodispersedDrum.cpp:231
void setSlidingFriction(double drum, double f1)
Definition: MonodispersedDrum.cpp:264
void setTorsionFriction(double drum, double f1)
Definition: MonodispersedDrum.cpp:276
void setRollingFriction(double drum, double f1)
Definition: MonodispersedDrum.cpp:270
void setCOR(double drumCOR, double COR1)
Definition: MonodispersedDrum.cpp:257
void setRevolutionSpeed(double rpm)
Definition: MonodispersedDrum.cpp:236
void setFractionalPolydispersity(double fpd)
Definition: MonodispersedDrum.cpp:241
void setDrumFillFraction(double dff)
Definition: MonodispersedDrum.cpp:246
double getDrumRadius()
Definition: MonodispersedDrum.cpp:282
void setFileType(FileType fileType)
Sets the type of file needed to write into or read from. File::fileType_.
Definition: File.cc:215
Definition: Vector.h:51

References DPMBase::dataFile, DPMBase::eneFile, DPMBase::fStatFile, DrumRot::getDrumRadius(), INFO, logger, ONE_FILE, DPMBase::readArguments(), DPMBase::restartFile, DrumRot::setCOR(), DrumRot::setDrumFillFraction(), DrumRot::setDrumRadius(), File::setFileType(), DrumRot::setFractionalPolydispersity(), DPMBase::setGravity(), DPMBase::setName(), DrumRot::setRevolutionSpeed(), DrumRot::setRollingFriction(), DPMBase::setSaveCount(), DrumRot::setSlidingFriction(), DPMBase::setTimeMax(), DPMBase::setTimeStep(), DrumRot::setTorsionFriction(), DPMBase::setXMax(), DPMBase::setXMin(), DPMBase::setYMax(), DPMBase::setYMin(), DPMBase::setZMax(), DPMBase::setZMin(), and DPMBase::solve().