GranularJet.cpp File Reference
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cmath>
#include <Species/LinearViscoelasticSlidingFrictionSpecies.h>
#include "Funnel.h"

Functions

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

Function Documentation

◆ main()

int main ( int argc  UNUSED,
char *argv[]  UNUSED 
)
35 {
36  Funnel problem;
37 
38  // Particle properties
39  problem.setFixedParticleRadius(.3e-3);
40  problem.setInflowParticleRadius(.3e-3);
41 
42  //Contact properties
44  species->setSlidingFrictionCoefficient(0.5);
45  species->setDensity(1442.0); //sand
46  species->setCollisionTimeAndRestitutionCoefficient(4e-4, 1.0 - (0.12 * (50.0 / 15.0)), species->getMassFromRadius(
47  problem.getInflowParticleRadius()));//eps=0.6
48  species->setSlidingStiffness(species->getStiffness() * 2.0 / 7.0);
49  species->setSlidingDissipation(species->getDissipation() * 2.0 / 7.0);
50 
51  logger(INFO, "Setting k to % and disp to % with radius: %",
52  species->getStiffness(), species->getDissipation(), problem.getInflowParticleRadius());
53 
54  // Default problem parameters
55  problem.setChuteLength(0.25);
56  problem.setChuteWidth(0.15);
57  problem.setChuteAngle(26.7);
59 
60  //funr; // Funnel radius.
61  //funO[2]; // (x,y) location of the center of the top of the funnel.
62  //funa; // Angle of the funnel
63  //funH; // Heigth of the funnel
64  //funHf; // Falling heigth
65  //funD; // Funnel diameter at the downside of the funnel.
66  //funnz; //Number of particles along the heigth of the funnel
67  //funfr; // Filling ratio of the funnel
68  //fundiag; //The diagonal of the filling region
69  //funrmax; //The maximum range for r
70  problem.set_funa(60.0); // Angle of the funnel
71  problem.set_funD(0.015); // Funnel diameter at the downside of the funnel.
72  problem.set_funHf(0.05); // Falling heigth
73  problem.set_funnz(25.0); //Number of particles along the heigth of the funnel
74  //problem.set_funO(0, 0.5*(problem.getYMax()+problem.getYMin())); // (x,y) location of the center of the top of the funnel.
75  problem.set_funfr(0.3); // Filling ratio of the funnel
76 
77  problem.setInflowVelocity(0);
78  problem.setInflowVelocityVariance(0.01);
79  problem.setMaxFailed(1);
80 
81  logger(INFO, "Chute inflow height: % Chute inflow velocity: % Chute inflow velocity variance: %",
82  problem.getInflowHeight(), problem.getInflowVelocity(), problem.getInflowVelocityVariance());
83 
84  //Discretization parameters
85  //problem.setHGridMaxLevels(1);
86  //problem.setHGridNumberOfBucketsToPower(1e6); //automated
87  double mass = species->getMassFromRadius(
88  0.5 * (problem.getMinInflowParticleRadius() + problem.getMaxInflowParticleRadius()));
89  problem.setTimeStep(0.02 * species->getCollisionTime(mass));
90  problem.setTimeMax(.5e-2);
91  problem.setSaveCount(10);
92 
93  logger(INFO, " dt = % tmax = %", problem.getTimeStep(), problem.getTimeMax());
94  // logger(INFO, "Maximum allowed speed of particles: %", problem.getMaximumVelocity()); // speed
95  // allowed before particles move through each other!
96 
97 
98  problem.readArguments(argc, argv);
99  problem.set_funO(-0.9 * problem.get_funHf() * sin(problem.getChuteAngle()), 0.5 * (problem.getYMax() +
100  problem.getYMin())); // (x,y) location of the center of the top of the funnel.
101  problem.setName_();
102  problem.solve();
103 }
@ MONOLAYER_DISORDERED
Definition: Chute.h:53
Species< LinearViscoelasticNormalSpecies, SlidingFrictionSpecies > LinearViscoelasticSlidingFrictionSpecies
Definition: LinearViscoelasticSlidingFrictionSpecies.h:34
LL< Log::INFO > INFO
Info log level.
Definition: Logger.cc:55
Logger< MERCURYDPM_LOGLEVEL > logger("MercuryKernel")
Definition of different loggers with certain modules. A user can define its own custom logger here.
std::enable_if<!std::is_pointer< U >::value, U * >::type copyAndAddObject(const U &object)
Creates a copy of a Object and adds it to the BaseHandler.
Definition: BaseHandler.h:379
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
virtual void setChuteLength(Mdouble chuteLength)
Sets the chute length (X-direction)
Definition: Chute.cc:1059
void setInflowVelocityVariance(Mdouble inflowVelocityVariance)
Sets the inflow velocity variance.
Definition: Chute.cc:1010
Mdouble getMaxInflowParticleRadius() const
Returns the maximum radius of inflow particles.
Definition: Chute.cc:947
Mdouble getInflowHeight() const
Returns the maximum inflow height (Z-direction)
Definition: Chute.cc:974
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 setInflowVelocity(Mdouble inflowVelocity)
Sets the average inflow velocity.
Definition: Chute.cc:983
Mdouble getMinInflowParticleRadius() const
returns the minimum radius of inflow particles
Definition: Chute.cc:938
Mdouble getInflowParticleRadius() const
Returns the average radius of inflow particles.
Definition: Chute.cc:929
Mdouble getInflowVelocity() const
Returns the average inflow velocity.
Definition: Chute.cc:1000
void setChuteAngle(Mdouble chuteAngle)
Sets gravity vector according to chute angle (in degrees)
Definition: Chute.cc:768
Mdouble getInflowVelocityVariance() const
Returns the inflow velocity variance.
Definition: Chute.cc:1029
Mdouble getChuteAngle() const
Returns the chute angle (in radians)
Definition: Chute.cc:807
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
Mdouble getYMin() const
If the length of the problem domain in y-direction is YMax - YMin, then getYMin() returns YMin.
Definition: DPMBase.h:632
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
Mdouble getYMax() const
If the length of the problem domain in y-direction is YMax - YMin, then getYMax() returns XMax.
Definition: DPMBase.h:638
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
Mdouble getTimeMax() const
Returns the maximum simulation duration.
Definition: DPMBase.cc:888
Definition: Funnel.h:38
void set_funa(double funa_)
Set funnel angle:
Definition: Funnel.h:101
void set_funO(double x, double y)
Set funnel origin of the funnel:
Definition: Funnel.h:86
void setName_()
Definition: Funnel.cc:424
void set_funD(double funD_)
Set minimum funnel diameter:
Definition: Funnel.h:116
double get_funHf() const
Get falling heigth:
Definition: Funnel.h:113
void set_funfr(double funfr_)
Set the filling ratio.
Definition: Funnel.h:68
void set_funHf(double funHf_)
Set falling heigth:
Definition: Funnel.h:110
void set_funnz(double funnz_)
Set funnel number of particles along the funnel heigth:
Definition: Funnel.h:62
Mdouble sin(Mdouble x)
Definition: ExtendedMath.cc:44

References BaseHandler< T >::copyAndAddObject(), Funnel::get_funHf(), Chute::getChuteAngle(), Chute::getInflowHeight(), Chute::getInflowParticleRadius(), Chute::getInflowVelocity(), Chute::getInflowVelocityVariance(), Chute::getMaxInflowParticleRadius(), Chute::getMinInflowParticleRadius(), DPMBase::getTimeMax(), DPMBase::getTimeStep(), DPMBase::getYMax(), DPMBase::getYMin(), INFO, logger, MONOLAYER_DISORDERED, DPMBase::readArguments(), Funnel::set_funa(), Funnel::set_funD(), Funnel::set_funfr(), Funnel::set_funHf(), Funnel::set_funnz(), Funnel::set_funO(), Chute::setChuteAngle(), Chute::setChuteLength(), Chute::setChuteWidth(), Chute::setFixedParticleRadius(), Chute::setInflowParticleRadius(), Chute::setInflowVelocity(), Chute::setInflowVelocityVariance(), Chute::setMaxFailed(), Funnel::setName_(), Chute::setRoughBottomType(), DPMBase::setSaveCount(), DPMBase::setTimeMax(), DPMBase::setTimeStep(), mathsFunc::sin(), DPMBase::solve(), and DPMBase::speciesHandler.