no_seg.cpp File Reference
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cmath>
#include <Species/LinearViscoelasticFrictionSpecies.h>
#include "Chute.h"

Functions

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

Function Documentation

◆ main()

int main ( int argc  ,
char argv[] 
)

A quasi-2D inclined plane with inflow conditions on the left boundary, and deletion of particles when they exit the domain.

17 {
18  //Print description
19  logger(INFO, "\nDescription: A quasi-2D inclined plane with inflow conditions on the left boundary, and deletion of"
20  " particles when they exit the domain.");
21 
22  // Problem parameters
23  Chute problem;
24  problem.setName("chute_demo");
25  problem.setTimeMax(0.5);
26 
27  // Particle properties
28  problem.setFixedParticleRadius(0.001);
29  problem.setInflowParticleRadius(0.001);
30 
31  auto species = problem.speciesHandler.copyAndAddObject(LinearViscoelasticFrictionSpecies());
32  double mass = 0.5*species->getMassFromRadius(0.5*(problem.getMinInflowParticleRadius() + problem.getMaxInflowParticleRadius()));
33  species->setCollisionTimeAndRestitutionCoefficient(2.5e-3,0.8,mass);
34  species->setSlidingDissipation(0.0);
35  problem.setTimeStep(0.02 * 2.5e-3);
36 
37 
38  // Chute properties
39  problem.setChuteAngle(30.0);
40  problem.setXMax(0.1);
41  problem.setYMax(2.0*problem.getInflowParticleRadius());
42 
43  // Inflow properties
44  problem.setInflowHeight(0.1);
45  problem.setInflowVelocity(0.1);
46  problem.setInflowVelocityVariance(0.02);
47 
48  // Output properties
49  problem.setSaveCount(helpers::getSaveCountFromNumberOfSavesAndTimeMaxAndTimeStep(1, problem.getTimeMax(), problem.getTimeStep()));
50  problem.dataFile.setSaveCount(100*problem.restartFile.getSaveCount());
51  problem.eneFile.setSaveCount(100*problem.restartFile.getSaveCount());
52 // problem.setSaveCount(helpers::getSaveCountFromNumberOfSavesAndTimeMaxAndTimeStep(1,problem.getTimeMax(),problem.getTimeStep())); //minimize output to the last time step
53 // problem.set_number_of_saves_data(100); //allow enough data output so the evolution can be viewed in xballs
54 // problem.set_number_of_saves_ene(100);
55 
56  //solve
57  problem.solve(argc, argv);
58 }
Species< LinearViscoelasticNormalSpecies, FrictionSpecies > LinearViscoelasticFrictionSpecies
Definition: LinearViscoelasticFrictionSpecies.h:12
Logger< MERCURYDPM_LOGLEVEL > logger("MercuryKernel")
Definition of different loggers with certain modules. A user can define its own custom logger here.
Creates chutes with different bottoms. Inherits from Mercury3D (-> MercuryBase -> DPMBase).
Definition: Chute.h:44
#define INFO(i)
Definition: mumps_solver.h:54
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:75
Constructor for SteadyAxisymAdvectionDiffusion problem
Definition: steady_axisym_advection_diffusion.cc:213

References helpers::getSaveCountFromNumberOfSavesAndTimeMaxAndTimeStep(), INFO, logger, and problem.