Chute/segregation.cpp File Reference
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cmath>
#include "scr/Chute.h"
#include <sys/types.h>
#include <sys/stat.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 
)
152 {
154 
155  // Problem parameters
156  problem.setName("segregation");
157  problem.setTimeMax(100);
158 
159 
160  // Particle properties
161  problem.setDensity(2400.0);
162 
163  problem.setInflowParticleRadius(0.3e-3,0.60e-3);
164  problem.speciesHandler.getObject(0)->setCollisionTimeAndRestitutionCoefficient(4e-4, 0.6);
165  problem.speciesHandler.getObject(0)->setSlidingDissipation(problem.get_dissipation());
166  problem.speciesHandler.getObject(0)->setSlidingFrictionCoefficient(0.8);
167  problem.setFixedParticleRadius(0.3e-3);
168  problem.setRoughBottomType(MONOLAYER_DISORDERED);
169 
170 
171  // Chute properties
172  problem.setChuteAngle(25.0);
173  problem.setChuteLength(50.0e-3);
174  problem.setChuteWidth(3e-3);
175  problem.setMaxFailed(6);
176  problem.makeChutePeriodic();
177 
178  //solve
179  cout << "Maximum allowed speed of particles: " << problem.getMaximumVelocity() << endl; // speed allowed before particles move through each other!
180  problem.setTimeStep();
181  //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)
182  problem.setSaveCount(helpers::getSaveCountFromNumberOfSavesAndTimeMaxAndTimeStep(20*60,getTimeMax(),getTimeStep()));
183  //problem.setSaveCount(1);
184  cout << "dt=" << problem.getTimeStep() << endl;
185 
186  problem.auto_number();
187 
188 
189  //This set to colouring based of size and small vectors
190  problem.setXBallsColourMode(7);
191  problem.setXBallsVectorScale(1);
192  problem.setXBallsAdditionalArguments("-sort -v0 -solidf");
193 
194  //problem.setSaveCount(1000);
195 
196  problem.solve();
197  //problem.HGRID_base::write(cout);
198 
199 
200  //cout << problem << endl;
201  problem.writeRestartFile();
202 }
@ MONOLAYER_DISORDERED
Definition: Chute.h:32
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(), MONOLAYER_DISORDERED, and problem.