SquareDrumTest.cpp File Reference
#include <Mercury3D.h>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cmath>
#include "Species/LinearViscoelasticFrictionSpecies.h"
#include "Walls/AxisymmetricIntersectionOfWalls.h"
#include "Walls/IntersectionOfWalls.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[] 
)
436 {
438  /* Make sure to add an (unique) name here */
439  problem.setName("SquareDrumTest");
440 
441  //setting locally-available variables to define key
442  //parameters such that they can be automatically included in
443  //the name of the file
444  //*******************Excitation Properties*****************************************
445  //Drum rotation rate (rpm)
446  double rotRateBasal = 10.0;
447 
448  //vibration amplitude and frequency
449  double fVib = 0.0;
450  double aVib = 0.0;
451 
452  //*******************Frictional Properties*****************************************
453  //sliding friction for species 1, 2 and wall
454  double muSWall = 0.6;
455  double muS1 = 0.16;
456  double muS2 = 0.16;
457 
458  //rolling friction for species 1, 2 and wall
459  double muRWall = 0.06;
460  double muR1 = 0.016;
461  double muR2 = 0.016;
462 
463  //torsion friction for species 1, 2 and wall
464  double muTWall = 0.0;
465  double muT1 = 0.000;
466  double muT2 = 0.000;
467 
468  //the density ratio of particles
469  double rhoRatio = 5000.0/2500.0;
470  //the size ratio of particles
471  double dRatio = 1;
472 
473  // computes rpm based on froude number and drumRad
474  //the fraction of species 1 particles
475  double specFrac = 0.5;
476 
477  double drumRad = 0.150/2; //diameter is 0.0150 m so drumRad is halve of the width
478  double drumLength = 0.024; // depth of the drum is 0.024 m
479 
480  problem.setTimeMax(5.0);
481  problem.setTimeStep(1.0/(2000.0 * 50.0));
482  double froudeNumber = 0.22; //was 0.22
483  double rotRate = 20; //pow(froudeNumber*9.81/drumRad,0.5);
484  logger(INFO, "rotRate = %", rotRate);
485 
486  //*******************Setting Up Filename******************************************
487 
488  problem.setDrumRadius(drumRad);// in meters
489 
490  problem.setXMin(-(pow(2*pow(drumRad,2.0),0.5)));
491  problem.setYMin(-drumLength/2);
492  problem.setZMin(-(pow(2*pow(drumRad,2.0),0.5)));
493 
494  problem.setXMax((pow(2*pow(drumRad,2.0),0.5)));
495  problem.setYMax(drumLength/2);// in meters
496  problem.setZMax((pow(2*pow(drumRad,2.0),0.5)));
497 
498  problem.setGravity(Vec3D(0.,0.,-9.81));
499  problem.setCOR(0.97,0.97,0.97);//drumWall, species1, species2 was all 0.97
500  problem.setSizeAndDensityRatio(dRatio,rhoRatio);//size ratio and density ratio
501  problem.setFractionalPolydispersity(0.00);
502  problem.setDrumFillFraction(0.4);// At 0.5 the drum is 3/4 filled.
503  problem.setSpeciesVolumeFraction(specFrac);//Species1 volume fraction
504 
505  problem.setSlidingFriction(muSWall,muS1,muS2); //wall, species1, species2
506  problem.setRollingFriction(muRWall,muR1,muR2); //wall, species1, species2
507  problem.setTorsionFriction(muTWall,muT1,muT2); //wall, species1, species2
508 
509  problem.setRevolutionSpeed(rotRate);//rpm
510 
511  problem.setSaveCount(2000);
512  problem.readArguments(argc,argv);
513 
514  problem.dataFile.setFileType(FileType::ONE_FILE);
515  problem.restartFile.setFileType(FileType::ONE_FILE);
516  problem.fStatFile.setFileType(FileType::ONE_FILE);
517  problem.eneFile.setFileType(FileType::ONE_FILE);
518  problem.wallHandler.setWriteVTK(true);
519  problem.setParticlesWriteVTK(true);
520  problem.solve();
521  return 0;
522 }
@ ONE_FILE
all data will be written into/ read from a single file called name_
Logger< MERCURYDPM_LOGLEVEL > logger("MercuryKernel")
Definition of different loggers with certain modules. A user can define its own custom logger here.
EIGEN_DEVICE_FUNC const GlobalUnaryPowReturnType< Derived, ScalarExponent > pow(const Eigen::ArrayBase< Derived > &x, const ScalarExponent &exponent)
Definition: GlobalFunctions.h:137
Definition: testDrum.cpp:17
Definition: Kernel/Math/Vector.h:30
#define INFO(i)
Definition: mumps_solver.h:54
Constructor for SteadyAxisymAdvectionDiffusion problem
Definition: steady_axisym_advection_diffusion.cc:213

References INFO, logger, ONE_FILE, Eigen::ArrayBase< Derived >::pow(), and problem.