TunuguntlaBokhoveThornton2014.cpp File Reference
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cmath>
#include "Chute.h"
#include "Boundaries/PeriodicBoundary.h"
#include "Walls/InfiniteWall.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <Species/LinearViscoelasticFrictionSpecies.h>

Classes

class  SegregationPeriodic
 This class does segregation problems in a periodic chute. More...
 

Functions

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

Function Documentation

◆ main()

int main ( int argc  UNUSED,
char *argv[]  UNUSED 
)
Todo:
TW:should be lightest particle, but computeMass has to be automated first
342 {
343  logger(DEBUG,"Start the code");
344 
346 
347 
348  // Problem parameters, name tmax and two types of particles
349  problem.setName("DensitySizeSegregation");
350  //This should be set to 100 for full problems.
351  //Thomas increased the TMax to 50000 not sure why. Set it back to 100.
352  problem.setTimeMax(50000);
353  //problem.setTimeMax(100);
354 
355 
356 
357 
358  // Chute properties
359  problem.setFixedParticleRadius(0.5);
360  problem.setRoughBottomType(MULTILAYER);
361  problem.setChuteAngleAndMagnitudeOfGravity(22.0, 1.0);
362  problem.setChuteLength(20);
363  problem.setChuteWidth(10);
364  problem.setZMax(70);
365  problem.setMaxFailed(6);
366  problem.makeChutePeriodic();
367 
368  //solve
370  //std::cout << "Maximum allowed speed of particles: " << problem.particleHandler.getSmallestParticle()->calculateMaximumVelocity() << std::endl; // speed allowed before particles move through each other!
371  problem.setTimeStep(5.e-3 / 50.0);//initially it was auto-set
372  //This is based on the fact in general you get too much data, so prob at worst you want to turn it into a 20 at 60fps (which is its self overkill)
373  problem.setSaveCount(helpers::getSaveCountFromNumberOfSavesAndTimeMaxAndTimeStep(20*60, problem.getTimeMax(), problem.getTimeStep()));
374  //problem.setSaveCount(helpers::getSaveCountFromNumberOfSavesAndTimeMaxAndTimeStep(20*60,getTimeMax(),getTimeStep()));
375  //problem.setSaveCount(1);
376  logger(INFO, "dt=%", problem.getTimeStep());
377 
378  problem.autoNumber();
379 
380 
381  //This set to colouring based of size and small vectors
382  problem.setXBallsColourMode(7);
383  problem.setXBallsVectorScale(1);
384  problem.setXBallsAdditionalArguments("-v0 -solidf");
385 
386 
387  //solves the problems
388  problem.solve();
389 
390  //Make sure the restart data is upto date at the end
391  problem.writeRestartFile();
392 }
@ MULTILAYER
Definition: Chute.h:32
Logger< MERCURYDPM_LOGLEVEL > logger("MercuryKernel")
Definition of different loggers with certain modules. A user can define its own custom logger here.
This class does segregation problems in a periodic chute.
Definition: Chute/segregation.cpp:18
#define DEBUG
Definition: main.h:181
#define INFO(i)
Definition: mumps_solver.h:54
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:75
Constructor for SteadyAxisymAdvectionDiffusion problem
Definition: steady_axisym_advection_diffusion.cc:213

References DEBUG, helpers::getSaveCountFromNumberOfSavesAndTimeMaxAndTimeStep(), INFO, logger, MULTILAYER, and problem.