granular_jet_thomas.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  GranularJet
 

Functions

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

Function Documentation

◆ main()

int main ( int argc  ,
char argv[] 
)
81 {
82  GranularJet problem;
83 
84  // Particle properties
85  problem.set_silbert();
86  // Problem parameters
87  problem.setName("granular_jet");
88 
89  //Corrections
90  problem.setRoughBottomType(MONOLAYER_DISORDERED); //to save base particles
91  problem.setAlignBase(false);
92 
93  // Chute properties
94  problem.setChuteAngle(20);
95  problem.setChuteLength(700); //700=40cm
96  problem.setChuteWidth(400); //400=24cm
97  problem.setMaxFailed(6);
98  problem.makeChutePeriodic();
99  problem.setHopperDimension(2);
100  problem.setHopperLift(250); //250=15cm
101  double ExitHeight = 25.0, //25=15mm
102  ExitLength = 3.0 * ExitHeight,
103  hopperAngle_ = 45.0,
104  hopperLength_ = 4.0 * ExitLength;
105  problem.set_Hopper(ExitLength,ExitHeight,hopperAngle_,hopperLength_);
106  problem.setZMax(200);
107 
108  //solve
109  problem.setTimeStep();
110  problem.setSaveCount(5000);
114  problem.setXBallsAdditionalArguments("-v0 ");
115  cout << "Maximum allowed speed of particles: " << problem.getMaximumVelocity()
116  << endl; // speed allowed before particles move through each other!
117  cout << "dt=" << problem.getTimeStep() << endl;
118 
119  problem.auto_number();
120 
121  //solve
122  problem.readArguments(argc, argv);
123  problem.solve();
124 }
@ MONOLAYER_DISORDERED
Definition: Chute.h:53
@ NO_FILE
file will not be created/read
@ ONE_FILE
all data will be written into/ read from a single file called name_
void setChuteLength(Mdouble chuteLength) override
sets xMax to chuteLength+hopperlength_, and thus specifies the length off the runoff chute
Definition: ChuteWithHopper.cc:541
void setHopperDimension(unsigned int hopperDimension)
Sets whether the hopper should have vertical (1) or inclined (2) walls in Y-direction.
Definition: ChuteWithHopper.cc:724
void setHopperLift(Mdouble hopperLift)
This lifts the hopper above the plane of the chute (after rotation)
Definition: ChuteWithHopper.cc:697
void setChuteWidth(Mdouble chuteWidth)
Sets the chute width (Y-direction)
Definition: Chute.cc:1039
void setRoughBottomType(RoughBottomType roughBottomType)
Sets the type of rough bottom of the chute.
Definition: Chute.cc:714
void setMaxFailed(unsigned int maxFailed)
Sets the number of times a particle will be tried to be added to the insertion boundary.
Definition: Chute.cc:827
void setChuteAngle(Mdouble chuteAngle)
Sets gravity vector according to chute angle (in degrees)
Definition: Chute.cc:768
void makeChutePeriodic()
This makes the chute periodic in Y.
Definition: Chute.cc:632
void setSaveCount(unsigned int saveCount)
Sets File::saveCount_ for all files (ene, data, fstat, restart, stat)
Definition: DPMBase.cc:408
File fStatFile
An instance of class File to handle in- and output into a .fstat file.
Definition: DPMBase.h:1483
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
File dataFile
An instance of class File to handle in- and output into a .data file.
Definition: DPMBase.h:1478
File restartFile
An instance of class File to handle in- and output into a .restart file.
Definition: DPMBase.h:1493
void setXBallsAdditionalArguments(std::string newXBArgs)
Set the additional arguments for xballs.
Definition: DPMBase.cc:1347
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 solve()
The work horse of the code.
Definition: DPMBase.cc:4270
void setFileType(FileType fileType)
Sets the type of file needed to write into or read from. File::fileType_.
Definition: File.cc:215
Definition: granular_jet_thomas.cpp:38
void set_silbert()
Definition: granular_jet_thomas.cpp:41

References DPMBase::dataFile, DPMBase::fStatFile, DPMBase::getTimeStep(), Chute::makeChutePeriodic(), MONOLAYER_DISORDERED, NO_FILE, ONE_FILE, DPMBase::readArguments(), DPMBase::restartFile, GranularJet::set_silbert(), Chute::setChuteAngle(), ChuteWithHopper::setChuteLength(), Chute::setChuteWidth(), File::setFileType(), ChuteWithHopper::setHopperDimension(), ChuteWithHopper::setHopperLift(), Chute::setMaxFailed(), DPMBase::setName(), Chute::setRoughBottomType(), DPMBase::setSaveCount(), DPMBase::setTimeStep(), DPMBase::setXBallsAdditionalArguments(), DPMBase::setZMax(), and DPMBase::solve().