impact.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 UNUSED, char *argv[] UNUSED)
 

Function Documentation

◆ main()

int main ( int argc  UNUSED,
char *argv[]  UNUSED 
)
62 {
63  GranularJet problem;
64 
65  // Problem parameters
66  problem.setName("impact");
67  //Should be 10 for full length problem, but here I keep it low for a test case
68  problem.setTimeMax(25);
69 
70 
71  // Particle properties
72  problem.setDensity(2400.0);
73 
74  problem.setInflowParticleRadius(0.5,0.5);
75  problem.speciesHandler.getObject(0)->setCollisionTimeAndRestitutionCoefficient(4e-3, 0.6);
76  problem.speciesHandler.getObject(0)->setSlidingDissipation(problem.get_dissipation());
77  problem.speciesHandler.getObject(0)->setSlidingFrictionCoefficient(0.8);
78  problem.setFixedParticleRadius(0.0);
80  problem.setAlignBase(false);
81 
82  // Chute properties
83  problem.setChuteAngle(0.0);
84  problem.setChuteLength(100.0);
85  problem.setChuteWidth(100.0);
86  problem.setMaxFailed(6);
87  //problem.makeChutePeriodic();
88  problem.setHopperDimension(2);
89  problem.setHopperLift(20);
90  double ExitHeight = 8.0, ExitLength = 1.0 * ExitHeight, hopperAngle_ = 30.0, hopperLength_ = 6.0 * ExitLength;
91  problem.setIsHopperCentred(true);
92  problem.setHopperLowerFillingHeight(.75);
93  problem.setAlignBase(false);
94  problem.set_Hopper(ExitLength,ExitHeight,hopperAngle_,hopperLength_);
95  problem.MassFlowFactor=20;
96  //solve
97  cout << "Maximum allowed speed of particles: " << problem.getMaximumVelocity() << endl; // speed allowed before particles move through each other!
98  problem.setTimeStep();
99  //problem.setSaveCount(helpers::getSaveCountFromNumberOfSavesAndTimeMaxAndTimeStep(100,problem.getTimeMax(),problem.getTimeStep()));
100  problem.setSaveCount(500);
101  cout << "dt=" << problem.getTimeStep() << endl;
102 
103  problem.setXBallsAdditionalArguments("-sort -v0 -solidf -v0 -oh -200 -p 20");
104 
105  problem.auto_number();
106  problem.readArguments(argc, argv);
107  problem.solve();
108  problem.write(cout);
109  //problem.HGRID_base::write(cout);
110 
111 
112  //cout << problem << endl;
113  problem.writeRestartFile();
114 }
@ MONOLAYER_ORDERED
Definition: Chute.h:53
T * getObject(const unsigned int id)
Gets a pointer to the Object at the specified index in the BaseHandler.
Definition: BaseHandler.h:613
void setChuteLength(Mdouble chuteLength) override
sets xMax to chuteLength+hopperlength_, and thus specifies the length off the runoff chute
Definition: ChuteWithHopper.cc:541
void write(std::ostream &os, bool writeAllParticles=true) const override
Writes setup properties to an ostream.
Definition: ChuteWithHopper.cc:615
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 setIsHopperCentred(bool isHopperCentred)
Sets an extra shift in X-direction of the whole system.
Definition: ChuteWithHopper.cc:561
void setHopperLowerFillingHeight(Mdouble hopperLowerFillingHeight)
Sets the height above which the hopper is filled with new particles.
Definition: ChuteWithHopper.cc:569
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 setInflowParticleRadius(Mdouble inflowParticleRadius)
Sets the radius of the inflow particles to a single one (i.e. ensures a monodisperse inflow).
Definition: Chute.cc:848
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 setFixedParticleRadius(Mdouble fixedParticleRadius)
Sets the particle radius of the fixed particles which constitute the (rough) chute bottom.
Definition: Chute.cc:653
void setSaveCount(unsigned int saveCount)
Sets File::saveCount_ for all files (ene, data, fstat, restart, stat)
Definition: DPMBase.cc:408
SpeciesHandler speciesHandler
A handler to that stores the species type i.e. LinearViscoelasticSpecies, etc.
Definition: DPMBase.h:1427
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
void setXBallsAdditionalArguments(std::string newXBArgs)
Set the additional arguments for xballs.
Definition: DPMBase.cc:1347
virtual void writeRestartFile()
Stores all the particle data for current save time step to a "restart" file, which is a file simply i...
Definition: DPMBase.cc:2942
void setTimeStep(Mdouble newDt)
Sets a new value for the simulation time step.
Definition: DPMBase.cc:1234
void setTimeMax(Mdouble newTMax)
Sets a new value for the maximum simulation duration.
Definition: DPMBase.cc:873
void solve()
The work horse of the code.
Definition: DPMBase.cc:4270
Definition: granular_jet_thomas.cpp:38
double MassFlowFactor
Definition: impact.cpp:57

References BaseHandler< T >::getObject(), DPMBase::getTimeStep(), GranularJet::MassFlowFactor, MONOLAYER_ORDERED, DPMBase::readArguments(), Chute::setChuteAngle(), ChuteWithHopper::setChuteLength(), Chute::setChuteWidth(), Chute::setFixedParticleRadius(), ChuteWithHopper::setHopperDimension(), ChuteWithHopper::setHopperLift(), ChuteWithHopper::setHopperLowerFillingHeight(), Chute::setInflowParticleRadius(), ChuteWithHopper::setIsHopperCentred(), Chute::setMaxFailed(), DPMBase::setName(), Chute::setRoughBottomType(), DPMBase::setSaveCount(), DPMBase::setTimeMax(), DPMBase::setTimeStep(), DPMBase::setXBallsAdditionalArguments(), DPMBase::solve(), DPMBase::speciesHandler, ChuteWithHopper::write(), and DPMBase::writeRestartFile().