dec13_A254_Hi0075_RC06_MU05.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 
)
34 {
35  Funnel problem;
36 
37  // Problem parameters
38  problem.setName("dec13_A254_Hi0075_RC06_MU05");
39 
41  species->setSlidingFrictionCoefficient(0.5);
42  species->setDensity(1442.0);
43 
44  //problem.set_HGRID_max_levels(2);
45  //problem.set_HGRID_num_buckets(1e6);
46  // Particle properties
47 
48  problem.setFixedParticleRadius(300e-6);
49  problem.setInflowParticleRadius(300e-6);
50 
51  species->setCollisionTimeAndRestitutionCoefficient(4e-4, 0.6, species->getMassFromRadius(problem.getFixedParticleRadius()));
52 
53 
54  //problem.setStiffness(1e5*4/3*pi*problem.getInflowParticleRadius()*9.81*problem.getDensity());
55  //problem.set_disp(50*sqrt(9.81/(2*problem.getInflowParticleRadius());
56  logger(INFO, "Setting k to % and disp to %", species->getStiffness(), species->getDissipation());
57 
58  species->setSlidingStiffness(species->getStiffness()*2.0/7.0);
59  species->setSlidingDissipation(species->getDissipation()*2.0/7.0);
60 
61  double mass = species->getMassFromRadius(0.5 * (problem.getMinInflowParticleRadius() + problem.getMaxInflowParticleRadius()));
62  problem.setTimeStep(0.02 * species->getCollisionTime(mass));
63  problem.setTimeMax(3);
64  problem.setSaveCount(100);
65 
66  problem.setChuteLength(0.6);
67  problem.setChuteWidth(0.25);
68  problem.setChuteAngle(25.4);
70 
71 
72  double funx = problem.getXMin() + 0.5 * (problem.getXMax() - problem.getXMin());
73 
74 
75  problem.set_funa(60.0);
76  problem.set_funD(0.015);
77  problem.set_funHf(0.075 + (problem.getXMax() - funx) * sin(problem.getChuteAngle()));
78  problem.set_funnz(50.0);
79  problem.set_funO(-funx, 0.5 * (problem.getYMax() - problem.getYMin()));
80  problem.set_funfr(0.3);
81 
82  problem.setInflowVelocity(0);
83  problem.setInflowVelocityVariance(0.01);
84  problem.setMaxFailed(1);
85 
86 
87 
88  //solve
89  //cout << "Maximum allowed speed of particles: " << problem.getMaximumVelocity() << endl; // speed allowed before particles move through each other!
90 
91 
92  logger(INFO, "dt=%", problem.getTimeStep());
93  problem.solve();
94  problem.writeRestartFile();
95 }
@ 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 getFixedParticleRadius() const
Returns the particle radius of the fixed particles which constitute the (rough) chute bottom.
Definition: Chute.cc:671
Mdouble getMaxInflowParticleRadius() const
Returns the maximum radius of inflow particles.
Definition: Chute.cc:947
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
void setChuteAngle(Mdouble chuteAngle)
Sets gravity vector according to chute angle (in degrees)
Definition: Chute.cc:768
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
Mdouble getXMin() const
If the length of the problem domain in x-direction is XMax - XMin, then getXMin() returns XMin.
Definition: DPMBase.h:619
Mdouble getXMax() const
If the length of the problem domain in x-direction is XMax - XMin, then getXMax() returns XMax.
Definition: DPMBase.h:626
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
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
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
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
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 set_funD(double funD_)
Set minimum funnel diameter:
Definition: Funnel.h:116
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(), Chute::getChuteAngle(), Chute::getFixedParticleRadius(), Chute::getMaxInflowParticleRadius(), Chute::getMinInflowParticleRadius(), DPMBase::getTimeStep(), DPMBase::getXMax(), DPMBase::getXMin(), DPMBase::getYMax(), DPMBase::getYMin(), INFO, logger, MONOLAYER_DISORDERED, 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(), DPMBase::setName(), Chute::setRoughBottomType(), DPMBase::setSaveCount(), DPMBase::setTimeMax(), DPMBase::setTimeStep(), mathsFunc::sin(), DPMBase::solve(), DPMBase::speciesHandler, and DPMBase::writeRestartFile().