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

Functions

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

Function Documentation

◆ main()

int main ( )

[CH:headers]

[CH:headers] [CH:main]

19 {
20 
21  //Problem parameters
23  problem.setName("HopperSelfTest");
24  Mdouble tc = 4.0e-4; // particle collision time
25  problem.setTimeStep(0.02 * tc);
26  problem.setTimeMax(0.01);
27 
28 
29  //Particle properties
30  problem.setInflowParticleRadius(0.32e-3, 0.40e-3);
31  problem.setFixedParticleRadius(0.36e-3);
32 
34  species.setHandler(&problem.speciesHandler);
35  species.setDensity(2400.0);
36  Mdouble meanRadius = 0.5 * (problem.getMinInflowParticleRadius() + problem.getMaxInflowParticleRadius());
37  Mdouble mass = species.getMassFromRadius(meanRadius);
38  species.setCollisionTimeAndRestitutionCoefficient(tc, 0.95, mass);
39  species.setSlidingFrictionCoefficient(0.5);
40  problem.speciesHandler.copyAndAddObject(species);
41 
42  //Chute properties
43  problem.setRoughBottomType(MONOLAYER_ORDERED); // try also MONOLAYER_DISORDERED, MULTILAYER or FLAT
44  problem.setChuteAngleAndMagnitudeOfGravity(10.0,9.8); // in degrees (relative to horizontal)
45  problem.setChuteLength(40.0e-3);
46  problem.setChuteWidth(3.2e-3 / 2.0);
47 
48  //Hopper properties
49  Mdouble ExitHeight = 10.0e-3;
50  Mdouble ExitLength = ExitHeight;
51  Mdouble hopperAngle_ = 60.0;
52  Mdouble hopperLength_ = 4.0 * ExitLength;
53 
54 // Mdouble hopperLowestPoint_ = ExitHeight - ExitLength * std::tan(problem.getChuteAngle());
55 // Mdouble hopperHeight_ = hopperLowestPoint_ + 1.1 * 0.5 * (hopperLength_ + ExitLength) / std::tan(hopperAngle_ * constants::pi / 180.0); // NB: this is not DEDUCED, but SET!!! (BvdH)
56 
57  Mdouble hopperHeight_ = 24.1139e-3;
58  problem.setHopper(ExitLength, ExitHeight, hopperAngle_, hopperLength_, hopperHeight_);
59 
60  // Output properties
61  problem.setSaveCount(51);
62 
63  //'time step ratio': size of minimum particle over maximum distance travelled
64  // by any particle per time step (i.e., should be >> 1 )
65  logger(INFO, "time step ratio: %", problem.getTimeStepRatio());
66 
67  //solve
68  problem.solve();
69 }
@ MONOLAYER_ORDERED
Definition: Chute.h:32
Logger< MERCURYDPM_LOGLEVEL > logger("MercuryKernel")
Definition of different loggers with certain modules. A user can define its own custom logger here.
void setHandler(SpeciesHandler *handler)
Sets the pointer to the handler to which this species belongs.
Definition: BaseSpecies.cc:70
ChuteWithHopper has a hopper as inflow.
Definition: ChuteWithHopper.h:18
void setDensity(Mdouble density)
Definition: ParticleSpecies.cc:88
Mdouble getMassFromRadius(Mdouble radius) const
Definition: ParticleSpecies.cc:103
Contains material and contact force properties.
Definition: Species.h:14
#define INFO(i)
Definition: mumps_solver.h:54
Constructor for SteadyAxisymAdvectionDiffusion problem
Definition: steady_axisym_advection_diffusion.cc:213

References ParticleSpecies::getMassFromRadius(), INFO, logger, MONOLAYER_ORDERED, problem, ParticleSpecies::setDensity(), and BaseSpecies::setHandler().