testDrum.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[] 
)
513 {
514 
515  // Start measuring elapsed time
516  std::chrono::time_point<std::chrono::system_clock> startClock, endClock;
517  startClock = std::chrono::system_clock::now();
518 
520 
521  //setting locally-available variables to define key
522  //parameters such that they can be automatically included in
523  //the name of the file
524  //*******************Excitation Properties*****************************************
525  //Drum rotation rate (rpm)
526  double rotRateBasal = 15.0;
527 
528  //vibration amplitude and frequency
529  double fVib = 0.0;
530  double aVib = 0.0;
531 
532  //*******************Frictional Properties*****************************************
533  //sliding friction for species 1, 2 and wall
534  double muSWall = 0.6;
535  double muS1 = 0.1;
536  double muS2 = 0.1;
537 
538  //rolling friction for species 1, 2 and wall
539  double muRWall = 0.06;
540  double muR1 = 0.01;
541  double muR2 = 0.01;
542 
543  //torsion friction for species 1, 2 and wall
544  double muTWall = 0.0;
545  double muT1 = 0.000;
546  double muT2 = 0.000;
547 
548  //the density ratio of particles
549  double rhoRatio = 2500.0/2500.0;
550  //the size ratio of particles
551  double dRatio = 1.5;
552 
553  //the fraction of species 1 particles
554  double specFrac = 0.5;
555 
556  double drumRad = 30*1.5*0.0015;
557 
558  double rotRate = 15.0;
559 
560  double froudeNumber = (rotRate * 2.0 * 3.1415926535 / 60.0) * (rotRate * 2.0 * 3.1415926535 / 60.0) * drumRad / 9.81;
561 
562  //the dimensionless drum length per core (L/(d_l*core))
563  double dimDrumLengthPerCore = 10.0;
564 
565  unsigned nDoms = 8; // The number of domains into which the system is divided
566 
567  double drumLength = dimDrumLengthPerCore*0.003*1.5*nDoms;
568 
569  //Set the number of domains for parallel decomposition
570  problem.setNumberOfDomains({1,nDoms,1});
571 
572 
573  //*******************Setting Up Filename******************************************
574  //setting up a stringstream to use in order to create an instructive filename
575  std::stringstream nameStream;
576  //the generic 'root' of the name for the file that will be applied to all files
577  //irrespective of parameters
578  //std::string nameBase = "binary";
579  std::string nameBase = "constLPerCore";
580 
581  //Name stream for tests looking at size segregation and concentration
582  nameStream << nameBase << "-length" << dimDrumLengthPerCore << "-nDomains" << nDoms << "-rpm" << rotRate;
583 
584 
585  //Name stream for tests looking at effect of vibration
586  /*nameStream << nameBase << "-rotationRate" << rotRate
587  << "-frequency" << fVib << "-amplitude" << aVib;
588  */
589 
590  /*Name stream for tests looking for particle 'sinkage'
591  * nameStream << nameBase << "-mu_s" << muS1 << "," << muS2 << "," << muSWall << ","
592  << "-mu_r" << muR1 << "," << muR2 << "," << muRWall << ","
593  << "-mu_t" << muT1 << "," << muT2 << "," << muTWall
594  << "-velocity" << rotRate << "-densityRatio" << rhoRatio;
595  */
596  std::string fullName = nameStream.str();
597  problem.setName(fullName);
598  //problem.autoNumber();
599  problem.setDrumRadius(drumRad);// in meters
600 
601  problem.setXMin(0.0);
602  problem.setYMin(0.0);
603  problem.setZMin(0.0);
604 
605  problem.setXMax(2. * problem.getDrumRadius());
606  problem.setZMax(2. * problem.getDrumRadius());
607  problem.setYMax(drumLength);// in meters
608 
609  problem.setTimeMax(30.); //600s - equal to 150 rotations @ 15 rpm
610  problem.setTimeStep(1.0/(800.0 * 50.0));
611 
612  problem.setGravity(Vec3D(0.,0.,-9.81));
613  problem.setCOR(0.97,0.97,0.97);//drumWall, species1, species2
614  problem.setSizeAndDensityRatio(dRatio,rhoRatio);//size ratio and density ratio
615  problem.setFractionalPolydispersity(0.05);//10% dispersity
616  problem.setDrumFillFraction(0.3);// At 0.5 the drum is 3/4 filled.
617  problem.setSpeciesVolumeFraction(specFrac);//Species1 volume fraction
618  //redundant
619  //problem.setFrictionCoeff(.6,.19);//(particle-wall-friction,part-part-friction)
620  problem.setSlidingFriction(muSWall,muS1,muS2); //wall, species1, species2
621  problem.setRollingFriction(muRWall,muR1,muR2); //wall, species1, species2
622  problem.setTorsionFriction(muTWall,muT1,muT2); //wall, species1, species2
623 
624  problem.setRevolutionSpeed(rotRate);//rpm
625 
626  //setting vibration parameters
627  problem.setVibrationAmplitude(aVib);
628  problem.setVibrationFrequency(fVib);
629 
630  //problem.setSaveCount(1);
631  problem.setSaveCount(20000);
632  problem.setXBallsAdditionalArguments("-cmode 8 -solidf -v0");
633  problem.readArguments(argc,argv);
634 
635  problem.speciesHandler.copyAndAddObject(LinearViscoelasticFrictionSpecies());
636 
637  problem.solve();
638 
639  // Measure elapsed time
640  endClock = std::chrono::system_clock::now();
641  std::chrono::duration<double> elapsed_seconds = endClock - startClock;
642  logger(INFO, "Elapsed time for solving the PDE: % s", elapsed_seconds.count());
643 
644  return 0;
645 }
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.
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().