SegregationNew.cpp File Reference
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cmath>
#include "Species/LinearViscoelasticFrictionSpecies.h"
#include "Chute.h"
#include "Walls/InfiniteWall.h"
#include "Boundaries/PeriodicBoundary.h"
#include "Boundaries/CubeInsertionBoundary.h"
#include <CG/CG.h>

Classes

class  Chutebelt
 if you restart this code the third argument will be used as the number of large particles to add and the forth the number of small. More...
 

Functions

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

Function Documentation

◆ main()

int main ( int argc  ,
char argv[] 
)
Todo:
change this to the mean particle size (not small particle size)
481 {
482  //Print description
483  logger(INFO, "\nDescription: A quasi-2D moving-bed channel with walls on the left and right boundary.");
484 
485  // Problem parameters
486  Chutebelt problem;
487 
488  problem.autoNumber();
489  problem.setName("Segregation");
490  problem.setTimeMax(2000.0);
491  problem.setTimeStep(1. / (200.0 * 50.0));
492 
493  problem.set_radiusLarge(2.0);
494  problem.set_particle_number_volRatio(1.0); //volume ratio of large to small
495  problem.set_particle_numbers(2500, 130); //Should be 5000 and 130
496 
497  problem.setChuteAngleAndMagnitudeOfGravity(25.0, 1.0);
498  problem.set_beltSpeed(0.0);
499 
500  // Chute properties : Simply remove the first line to add side walls.
501  problem.makeChutePeriodic();
502  problem.setXMax(150.0);
503  problem.setYMax(5.0);
504 
505  problem.setZMin(0.0);
506  problem.setZMax(250.0);
507 
509  problem.setFixedParticleRadius(0.75);
510 
511  //Swap the next two lines to swap between the different type of rought bottoms.
513  //problem.setRoughBottomType(MONOLAYER_DISORDERED);
514 
516 
517  problem.setXBallsAdditionalArguments("-cmode 7");
518 
519  problem.readArguments(argc, argv);
520 
521  if (argc > 4)
522  {
523  problem.num_restart_large=atoi(argv[3]);
524  problem.num_restart_small=atoi(argv[4]);
525  }
526  else
527  {
528  problem.num_restart_large=0;
529  problem.num_restart_small=0;
530  }
531 
532  logger(INFO, "% %", problem.num_restart_small, problem.num_restart_large);
533 
534 
535  problem.solve();
536 
537 
538 }
@ MULTILAYER
Definition: Chute.h:53
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 setRoughBottomType(RoughBottomType roughBottomType)
Sets the type of rough bottom of the chute.
Definition: Chute.cc:714
void setChuteAngleAndMagnitudeOfGravity(Mdouble chuteAngle, Mdouble gravity)
Sets gravity vector according to chute angle (in degrees)
Definition: Chute.cc:789
void makeChutePeriodic()
This makes the chute periodic in Y.
Definition: Chute.cc:632
void setFixedParticleRadius(Mdouble fixedParticleRadius)
Sets the particle radius of the fixed particles which constitute the (rough) chute bottom.
Definition: Chute.cc:653
if you restart this code the third argument will be used as the number of large particles to add and ...
Definition: SegregationNew.cpp:40
void set_radiusLarge(double new_large_radius)
Definition: SegregationNew.cpp:431
void set_particle_number_volRatio(double new_volume_ratio)
Definition: SegregationNew.cpp:444
void set_particle_numbers(int new_num_small, int new_num_large)
Definition: SegregationNew.cpp:395
void set_beltSpeed(double new_speed)
Definition: SegregationNew.cpp:391
unsigned int num_restart_small
Definition: SegregationNew.cpp:449
unsigned int num_restart_large
Definition: SegregationNew.cpp:450
void setSaveCount(unsigned int saveCount)
Sets File::saveCount_ for all files (ene, data, fstat, restart, stat)
Definition: DPMBase.cc:408
void autoNumber()
The autoNumber() function calls three functions: setRunNumber(), readRunNumberFromFile() and incremen...
Definition: DPMBase.cc:539
void setName(const std::string &name)
Allows to set the name of all the files (ene, data, fstat, restart, stat)
Definition: DPMBase.cc:422
Mdouble getTimeStep() const
Returns the simulation time step.
Definition: DPMBase.cc:1250
bool readArguments(int argc, char *argv[])
Can interpret main function input arguments that are passed by the driver codes.
Definition: DPMBase.cc:4391
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
void setXBallsAdditionalArguments(std::string newXBArgs)
Set the additional arguments for xballs.
Definition: DPMBase.cc:1347
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
Mdouble getTimeMax() const
Returns the maximum simulation duration.
Definition: DPMBase.cc:888
unsigned int getSaveCountFromNumberOfSavesAndTimeMaxAndTimeStep(unsigned int numberOfSaves, Mdouble timeMax, Mdouble timeStep)
Returns the correct saveCount if the total number of saves, the final time and the time step is known...
Definition: FormulaHelpers.cc:96

References DPMBase::autoNumber(), helpers::getSaveCountFromNumberOfSavesAndTimeMaxAndTimeStep(), DPMBase::getTimeMax(), DPMBase::getTimeStep(), INFO, logger, Chute::makeChutePeriodic(), MULTILAYER, Chutebelt::num_restart_large, Chutebelt::num_restart_small, DPMBase::readArguments(), Chutebelt::set_beltSpeed(), Chutebelt::set_particle_number_volRatio(), Chutebelt::set_particle_numbers(), Chutebelt::set_radiusLarge(), Chute::setChuteAngleAndMagnitudeOfGravity(), Chute::setFixedParticleRadius(), DPMBase::setName(), Chute::setRoughBottomType(), DPMBase::setSaveCount(), DPMBase::setTimeMax(), DPMBase::setTimeStep(), DPMBase::setXBallsAdditionalArguments(), DPMBase::setXMax(), DPMBase::setYMax(), DPMBase::setZMax(), DPMBase::setZMin(), and DPMBase::solve().