Segregation/segregation.cpp File Reference
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cmath>
#include "Chute.h"
#include "Boundaries/PeriodicBoundary.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 we need a replacement for BaseParticle::calculateMaximumVelocity
218 {
220 
221  // Problem parameters, name tmax and two types of particles
222  problem.setName("segregation");
223  //This should be set to 100 for full problems.
224  problem.setTimeMax(.1);
225  problem.setTimeStep(1e-4);
226  problem.setupInitialConditions();
227 
228  //solve
230  //std::cout << "Maximum allowed speed of particles: " << problem.particleHandler.getSmallestParticle()->calculateMaximumVelocity() << std::endl; // speed allowed before particles move through each other!
231  //problem.setTimeStepByParticle();
232  //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)
233  problem.setSaveCount(helpers::getSaveCountFromNumberOfSavesAndTimeMaxAndTimeStep(20 * 60, problem.getTimeMax(), problem.getTimeStep()));
234  //problem.setSaveCount(helpers::getSaveCountFromNumberOfSavesAndTimeMaxAndTimeStep(20*60,getTimeMax(),getTimeStep()));
235  //problem.setSaveCount(1);
236 
237  problem.autoNumber();
238 
239 
240  //This set to colouring based of size and small vectors
241  problem.setXBallsColourMode(7);
242  problem.setXBallsVectorScale(1);
243  problem.setXBallsAdditionalArguments("-v0 -solidf");
244 
245 
246  //solves the problems
247  problem.solve();
248 
249  //Make sure the restart data is upto date at the end
250  //problem.writeRestartFile();
251 }
Array< double, 1, 3 > e(1./3., 0.5, 2.)
This class does segregation problems in a periodic chute.
Definition: Chute/segregation.cpp:18
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 e(), helpers::getSaveCountFromNumberOfSavesAndTimeMaxAndTimeStep(), and problem.