Chute/segregation_with_hopper.cpp File Reference
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cmath>
#include "scr/ChuteWithHopper.h"
#include <sys/types.h>
#include <sys/stat.h>

Classes

class  SegregationWithHopper
 

Functions

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

Function Documentation

◆ main()

int main ( int argc  UNUSED,
char *argv[]  UNUSED 
)
52 {
54 
55  // Problem parameters
56  problem.setName("segregation");
57  //Should be 10 for full length problem, but here I keep it low for a test case
58  problem.setTimeMax(10);
59 
60 
61  // Particle properties
62  problem.setDensity(2400.0);
63 
64  problem.setInflowParticleRadius(0.3e-3,0.60e-3);
65  problem.speciesHandler.getObject(0)->setCollisionTimeAndRestitutionCoefficient(4e-4, 0.6);
66  problem.speciesHandler.getObject(0)->setSlidingDissipation(problem.get_dissipation());
67  problem.speciesHandler.getObject(0)->setSlidingFrictionCoefficient(0.8);
68  problem.setFixedParticleRadius(0.3e-3);
69  problem.setRoughBottomType(MONOLAYER_DISORDERED);
70 
71 
72  // Chute properties
73  problem.setChuteAngle(25.0);
74  problem.setChuteLength(600.0e-3);
75  problem.setChuteWidth(3e-3);
76  problem.setMaxFailed(6);
77  problem.makeChutePeriodic();
78  double ExitHeight = 12.0e-3, ExitLength = 1.0 * ExitHeight, hopperAngle_ = 60.0, hopperLength_ = 6.0 * ExitLength;
79  problem.set_Hopper(ExitLength,ExitHeight,hopperAngle_,hopperLength_);
80 
81  //solve
82  cout << "Maximum allowed speed of particles: " << problem.getMaximumVelocity() << endl; // speed allowed before particles move through each other!
83  problem.setTimeStep();
84  problem.setSaveCount(helpers::getSaveCountFromNumberOfSavesAndTimeMaxAndTimeStep(2000,problem.getTimeMax(),problem.getTimeStep()));
85  cout << "dt=" << problem.getTimeStep() << endl;
86 
87  problem.auto_number();
88  problem.write(std::cout,false);
89  problem.save_info_to_disk();
90 
91  //This set to colouring based of size and small vectors
92  problem.setXBallsColourMode(7);
93  problem.setXBallsVectorScale(1);
94  problem.setXBallsScale(20.0);
95 
96 
97  problem.solve();
98  problem.write(cout);
99  //problem.HGRID_base::write(cout);
100 
101 
102  //cout << problem << endl;
103  problem.writeRestartFile();
104 }
@ MONOLAYER_DISORDERED
Definition: Chute.h:32
Array< double, 1, 3 > e(1./3., 0.5, 2.)
Definition: Chute/segregation_with_hopper.cpp:17
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.