AirySavageHutter.cpp File Reference
#include <iostream>
#include "ChuteWithHopper.h"
#include "Walls/InfiniteWall.h"
#include "Species/LinearViscoelasticFrictionSpecies.h"

Classes

class  AirySavageHutter
 This code does the MD of a normal shock into a wall. More...
 

Functions

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

Function Documentation

◆ main()

int main ( int argc  UNUSED,
char *argv[]  UNUSED 
)
54 {
55  AirySavageHutter problem;
56 
57  // Problem parameters
58  problem.setName("AirySavageHutter");
59  problem.setTimeStep(1e-4);
60  problem.setTimeMax(500.0);
61  problem.setHGridMaxLevels(2);
62 
63  // Particle properties
64  problem.setInflowParticleRadius(0.5);
65  problem.setFixedParticleRadius(0.25);
68  species.setDensity(6 / constants::pi);
69  species.setStiffness(2e5);
70  species.setSlidingStiffness(2.0 / 7.0 * species.getStiffness());
71  species.setDissipation(25.0);
72  species.setSlidingDissipation(0);
73  species.setSlidingFrictionCoefficient(0.5);
74  problem.speciesHandler.copyAndAddObject(species);
75 
76  // Chute properties
77  problem.setChuteAngleAndMagnitudeOfGravity(27.0, 1.0);
78  problem.setChuteLength(250);
79  problem.setChuteWidth(10);
80  problem.setMaxFailed(6);
81  problem.makeChutePeriodic();
82 
83  //Hopper properties
84  Mdouble exitHeight = 10.0;
85  Mdouble exitLength = 10.0;
86  Mdouble hopperAngle = 45.0;
87  Mdouble hopperLength = 2.0 * exitLength;
88  Mdouble hopperHeight = hopperLength;
89  problem.setHopper(exitLength, exitHeight, hopperAngle, hopperLength, hopperHeight);
90  problem.setHopperFillingPercentage(50.0);
91 
92  // Xballs tunning
93  problem.setXBallsScale(0.012);
94  problem.setXBallsAdditionalArguments("-sort -v0 -oh 500 -cmode 4");
95 
96  // You really do not need data more often that once a second do not change this number away from this without
97  // really good reason.
99  problem.getTimeStep()));
100  logger(INFO, "time step = %", problem.getTimeStep());
101 
102  problem.solve();
103 }
@ MULTILAYER
Definition: Chute.h:53
double Mdouble
Definition: GeneralDefine.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.
This code does the MD of a normal shock into a wall.
Definition: AirySavageHutter.cpp:33
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 setHopper(Mdouble exitLength, Mdouble exitHeight, Mdouble angle, Mdouble length, Mdouble height)
Sets the hopper's geometrical properties.
Definition: ChuteWithHopper.cc:389
void setHopperFillingPercentage(Mdouble hopperFillingPercentage)
Sets the hopper filling percentage.
Definition: ChuteWithHopper.cc:118
void setChuteLength(Mdouble chuteLength) override
sets xMax to chuteLength+hopperlength_, and thus specifies the length off the runoff chute
Definition: ChuteWithHopper.cc:541
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 setChuteAngleAndMagnitudeOfGravity(Mdouble chuteAngle, Mdouble gravity)
Sets gravity vector according to chute angle (in degrees)
Definition: Chute.cc:789
void makeChutePeriodic()
This makes the chute periodic in Y.
Definition: Chute.cc:632
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
void setXBallsAdditionalArguments(std::string newXBArgs)
Set the additional arguments for xballs.
Definition: DPMBase.cc:1347
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 setXBallsScale(Mdouble newScale)
Sets the scale of the view (either normal, zoom in or zoom out) to display in xballs....
Definition: DPMBase.cc:1363
void solve()
The work horse of the code.
Definition: DPMBase.cc:4270
Mdouble getTimeMax() const
Returns the maximum simulation duration.
Definition: DPMBase.cc:888
void setHGridMaxLevels(unsigned int HGridMaxLevels)
Sets the maximum number of levels of the HGrid in this MercuryBase.
Definition: MercuryBase.cc:476
void setDensity(Mdouble density)
Definition: ParticleSpecies.cc:108
Contains material and contact force properties.
Definition: Species.h:35
const Mdouble pi
Definition: ExtendedMath.h:45
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:96

References BaseHandler< T >::copyAndAddObject(), helpers::getSaveCountFromNumberOfSavesAndTimeMaxAndTimeStep(), DPMBase::getTimeMax(), DPMBase::getTimeStep(), INFO, logger, Chute::makeChutePeriodic(), MULTILAYER, constants::pi, Chute::setChuteAngleAndMagnitudeOfGravity(), ChuteWithHopper::setChuteLength(), Chute::setChuteWidth(), ParticleSpecies::setDensity(), Chute::setFixedParticleRadius(), MercuryBase::setHGridMaxLevels(), ChuteWithHopper::setHopper(), ChuteWithHopper::setHopperFillingPercentage(), Chute::setInflowParticleRadius(), Chute::setMaxFailed(), DPMBase::setName(), Chute::setRoughBottomType(), DPMBase::setSaveCount(), DPMBase::setTimeMax(), DPMBase::setTimeStep(), DPMBase::setXBallsAdditionalArguments(), DPMBase::setXBallsScale(), DPMBase::solve(), and DPMBase::speciesHandler.