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]

19 {
20  //Print description
21  logger(INFO, "\nDemo of the chute flow with a rough bottom");
22 
23  //Construct the problem and assign a name
24  Chute roughBottomSelfTest;
25  roughBottomSelfTest.setName("roughBottomMultiLayer");
26 
27 
28  //Set time stepping parameters
29  roughBottomSelfTest.setTimeStep(1e-4);
30  roughBottomSelfTest.setTimeMax(0.1);
31 
32  //Set output parameter: write to the output files every 50 time steps
33  roughBottomSelfTest.setSaveCount(50);
34 
35  //Set the particle radii and the type of the rough bottom
36  roughBottomSelfTest.setInflowParticleRadius(0.5);
37  roughBottomSelfTest.setFixedParticleRadius(0.5);
38  roughBottomSelfTest.setRoughBottomType(MULTILAYER);
39 
40  //Set the particle properties
42  species->setDensity(6.0/constants::pi);
43  species->setStiffness(2e5);
44  species->setDissipation(25.0);
45 
46  //Set the chute properties
47  roughBottomSelfTest.setChuteAngleAndMagnitudeOfGravity(24.0, 1.0);
48  roughBottomSelfTest.setChuteLength(3.0);
49  roughBottomSelfTest.setChuteWidth(3.0);
50 
51  //Solve the system
52  roughBottomSelfTest.solve();
53 }
@ MULTILAYER
Definition: Chute.h:32
Array< double, 1, 3 > e(1./3., 0.5, 2.)
Species< LinearViscoelasticNormalSpecies > LinearViscoelasticSpecies
Definition: LinearViscoelasticSpecies.h:11
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:360
Creates chutes with different bottoms. Inherits from Mercury3D (-> MercuryBase -> DPMBase).
Definition: Chute.h:44
void setChuteWidth(Mdouble chuteWidth)
Sets the chute width (Y-direction)
Definition: Chute.cc:1018
void setInflowParticleRadius(Mdouble inflowParticleRadius)
Sets the radius of the inflow particles to a single one (i.e. ensures a monodisperse inflow).
Definition: Chute.cc:827
void setRoughBottomType(RoughBottomType roughBottomType)
Sets the type of rough bottom of the chute.
Definition: Chute.cc:693
virtual void setChuteLength(Mdouble chuteLength)
Sets the chute length (X-direction)
Definition: Chute.cc:1038
void setChuteAngleAndMagnitudeOfGravity(Mdouble chuteAngle, Mdouble gravity)
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:632
void setSaveCount(unsigned int saveCount)
Sets File::saveCount_ for all files (ene, data, fstat, restart, stat)
Definition: DPMBase.cc:386
SpeciesHandler speciesHandler
A handler to that stores the species type i.e. LinearViscoelasticSpecies, etc.
Definition: DPMBase.h:1433
void setName(const std::string &name)
Allows to set the name of all the files (ene, data, fstat, restart, stat)
Definition: DPMBase.cc:400
void setTimeStep(Mdouble newDt)
Sets a new value for the simulation time step.
Definition: DPMBase.cc:1225
void setTimeMax(Mdouble newTMax)
Sets a new value for the maximum simulation duration.
Definition: DPMBase.cc:864
void solve()
The work horse of the code.
Definition: DPMBase.cc:4334
void setDissipation(Mdouble dissipation)
Allows the normal dissipation to be changed.
Definition: LinearViscoelasticNormalSpecies.cc:96
void setStiffness(Mdouble new_k)
Allows the spring constant to be changed.
Definition: LinearViscoelasticNormalSpecies.cc:72
void setDensity(Mdouble density)
Definition: ParticleSpecies.cc:88
#define INFO(i)
Definition: mumps_solver.h:54
const Mdouble pi
Definition: ExtendedMath.h:23

References BaseHandler< T >::copyAndAddObject(), e(), 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.