roughBottomSelfTest.cpp File Reference
#include <sstream>
#include <Species/LinearViscoelasticSpecies.h>
#include "Chute.h"

Functions

int main ()
 [RB:headers] More...
 

Function Documentation

◆ main()

int main ( )

[RB:headers]

[RB:headers]

This is a demo on how to implement a chute flow with a rough bottom. Note that this is the same code as roughBottomSelfTest, but with a bigger chute, a larger gravity and a longer simulation time. [RB:main]

40 {
41  //Print description
42  logger(INFO, "\nDemo of the chute flow with a rough bottom");
43 
44  //Construct the problem and assign a name
45  Chute roughBottomSelfTest;
46  roughBottomSelfTest.setName("roughBottomMultiLayer");
47 
48 
49  //Set time stepping parameters
50  roughBottomSelfTest.setTimeStep(1e-4);
51  roughBottomSelfTest.setTimeMax(0.1);
52 
53  //Set output parameter: write to the output files every 50 time steps
54  roughBottomSelfTest.setSaveCount(50);
55 
56  //Set the particle radii and the type of the rough bottom
57  roughBottomSelfTest.setInflowParticleRadius(0.5);
58  roughBottomSelfTest.setFixedParticleRadius(0.5);
59  roughBottomSelfTest.setRoughBottomType(MULTILAYER);
60 
61  //Set the particle properties
63  species->setDensity(6.0/constants::pi);
64  species->setStiffness(2e5);
65  species->setDissipation(25.0);
66 
67  //Set the chute properties
68  roughBottomSelfTest.setChuteAngleAndMagnitudeOfGravity(24.0, 1.0);
69  roughBottomSelfTest.setChuteLength(3.0);
70  roughBottomSelfTest.setChuteWidth(3.0);
71 
72  //Solve the system
73  roughBottomSelfTest.solve();
74 }
@ MULTILAYER
Definition: Chute.h:53
Species< LinearViscoelasticNormalSpecies > LinearViscoelasticSpecies
Definition: LinearViscoelasticSpecies.h:33
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
Creates chutes with different bottoms. Inherits from Mercury3D (-> MercuryBase -> DPMBase).
Definition: Chute.h:65
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 setChuteAngleAndMagnitudeOfGravity(Mdouble chuteAngle, Mdouble gravity)
Sets gravity vector according to chute angle (in degrees)
Definition: Chute.cc:789
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
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
void setDissipation(Mdouble dissipation)
Allows the normal dissipation to be changed.
Definition: LinearViscoelasticNormalSpecies.cc:117
void setStiffness(Mdouble new_k)
Allows the spring constant to be changed.
Definition: LinearViscoelasticNormalSpecies.cc:93
void setDensity(Mdouble density)
Definition: ParticleSpecies.cc:108
const Mdouble pi
Definition: ExtendedMath.h:45

References BaseHandler< T >::copyAndAddObject(), INFO, logger, MULTILAYER, constants::pi, Chute::setChuteAngleAndMagnitudeOfGravity(), Chute::setChuteLength(), Chute::setChuteWidth(), ParticleSpecies::setDensity(), LinearViscoelasticNormalSpecies::setDissipation(), Chute::setFixedParticleRadius(), Chute::setInflowParticleRadius(), DPMBase::setName(), Chute::setRoughBottomType(), DPMBase::setSaveCount(), LinearViscoelasticNormalSpecies::setStiffness(), DPMBase::setTimeMax(), DPMBase::setTimeStep(), DPMBase::solve(), and DPMBase::speciesHandler.