testDrumRound1Serial.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  RotatingDrum
 

Functions

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

Function Documentation

◆ main()

int main ( int argc  ,
char argv[] 
)
486 {
487 
488  // Start measuring elapsed time
489  std::chrono::time_point<std::chrono::system_clock> startClock, endClock;
490  startClock = std::chrono::system_clock::now();
491 
493 
494  //setting locally-available variables to define key
495  //parameters such that they can be automatically included in
496  //the name of the file
497  //*******************Excitation Properties*****************************************
498  //Drum rotation rate (rpm)
499  double rotRateBasal = 10.0;
500 
501  //vibration amplitude and frequency
502  double fVib = 0.0;
503  double aVib = 0.0;
504 
505  //*******************Frictional Properties*****************************************
506  //sliding friction for species 1, 2 and wall
507  double muSWall = 0.6;
508  double muS1 = 0.1;
509  double muS2 = 0.1;
510 
511  //rolling friction for species 1, 2 and wall
512  double muRWall = 0.06;
513  double muR1 = 0.01;
514  double muR2 = 0.01;
515 
516  //torsion friction for species 1, 2 and wall
517  double muTWall = 0.0;
518  double muT1 = 0.000;
519  double muT2 = 0.000;
520 
521  //the density ratio of particles
522  double rhoRatio = 2500.0/2500.0;
523  //the size ratio of particles
524  double dRatio = 1.5;
525 
526  //the fraction of species 1 particles
527  double specFrac = 0.5;
528 
529  double drumRad = 20*1.5*0.0015;
530 
531  double rotRate = 10.0;
532 
533  double froudeNumber = (rotRate * 2.0 * 3.1415926535 / 60.0) * (rotRate * 2.0 * 3.1415926535 / 60.0) * drumRad / 9.81;
534 
535  //the dimensionless drum length (L/d_l)
536  double dimDrumLength = 240.0;
537 
538 
539  double drumLength = dimDrumLength*0.003*1.5;
540 
541  //Set the number of domains for parallel decomposition
542  problem.setNumberOfDomains({2,1,1});
543 
544 
545  //*******************Setting Up Filename******************************************
546  //setting up a stringstream to use in order to create an instructive filename
547  std::stringstream nameStream;
548  //the generic 'root' of the name for the file that will be applied to all files
549  //irrespective of parameters
550  //std::string nameBase = "binary";
551  std::string nameBase = "binary";
552 
553  //Name stream for tests looking at size segregation and concentration
554  nameStream << nameBase << "-length" << dimDrumLength;
555 
556 
557  //Name stream for tests looking at effect of vibration
558  /*nameStream << nameBase << "-rotationRate" << rotRate
559  << "-frequency" << fVib << "-amplitude" << aVib;
560  */
561 
562  /*Name stream for tests looking for particle 'sinkage'
563  * nameStream << nameBase << "-mu_s" << muS1 << "," << muS2 << "," << muSWall << ","
564  << "-mu_r" << muR1 << "," << muR2 << "," << muRWall << ","
565  << "-mu_t" << muT1 << "," << muT2 << "," << muTWall
566  << "-velocity" << rotRate << "-densityRatio" << rhoRatio;
567  */
568  std::string fullName = nameStream.str();
569  problem.setName(fullName);
570  //problem.autoNumber();
571  problem.setDrumRadius(drumRad);// in meters
572 
573  problem.setXMin(0.0);
574  problem.setYMin(0.0);
575  problem.setZMin(0.0);
576 
577  problem.setXMax(2. * problem.getDrumRadius());
578  problem.setZMax(2. * problem.getDrumRadius());
579  problem.setYMax(drumLength);// in meters
580 
581  problem.setTimeMax(750.);
582  problem.setTimeStep(1.0/(800.0 * 50.0));
583 
584  problem.setGravity(Vec3D(0.,0.,-9.81));
585  problem.setCOR(0.97,0.97,0.97);//drumWall, species1, species2
586  problem.setSizeAndDensityRatio(dRatio,rhoRatio);//size ratio and density ratio
587  problem.setFractionalPolydispersity(0.05);//10% dispersity
588  problem.setDrumFillFraction(0.3);// At 0.5 the drum is 3/4 filled.
589  problem.setSpeciesVolumeFraction(specFrac);//Species1 volume fraction
590  //redundant
591  //problem.setFrictionCoeff(.6,.19);//(particle-wall-friction,part-part-friction)
592  problem.setSlidingFriction(muSWall,muS1,muS2); //wall, species1, species2
593  problem.setRollingFriction(muRWall,muR1,muR2); //wall, species1, species2
594  problem.setTorsionFriction(muTWall,muT1,muT2); //wall, species1, species2
595 
596  problem.setRevolutionSpeed(rotRate);//rpm
597 
598  //setting vibration parameters
599  problem.setVibrationAmplitude(aVib);
600  problem.setVibrationFrequency(fVib);
601 
602  problem.setSaveCount(20000);
603  problem.setXBallsAdditionalArguments("-cmode 8 -solidf -v0");
604  problem.readArguments(argc,argv);
605 
606  problem.solve();
607 
608  // Measure elapsed time
609  endClock = std::chrono::system_clock::now();
610  std::chrono::duration<double> elapsed_seconds = endClock - startClock;
611  logger(INFO, "Elapsed time for solving the PDE: % s", elapsed_seconds.count());
612 
613  return 0;
614 }
Logger< MERCURYDPM_LOGLEVEL > logger("MercuryKernel")
Definition of different loggers with certain modules. A user can define its own custom logger here.
Definition: testDrum.cpp:17
Definition: Kernel/Math/Vector.h:30
#define INFO(i)
Definition: mumps_solver.h:54
std::string string(const unsigned &i)
Definition: oomph_definitions.cc:286
Constructor for SteadyAxisymAdvectionDiffusion problem
Definition: steady_axisym_advection_diffusion.cc:213

References INFO, logger, problem, and oomph::Global_string_for_annotation::string().