MercuryDPM  Alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Flow through a 2D hourglass/silo

Problem description

A 3D hour glass/silo is simulated, i.e. a square domain with a neck in the middle (see snapshot on the right). Particles are inserted into the upper half of the domain and flow into the lower half due to gravity.

What can you learn from this code?

This code illustrates the effect of friction in DPM simulations. If the friction is high enough, arching is observed at the neck, where particles interlock to obstruct the flow. It also illustrates how to use IntersectionOfWalls to set up a convex polygonal wall, i.e. the neck.

Defining an intersection of walls

The neck is defined by two IntersectionOfWalls object:

w1.setSpecies(speciesHandler.getObject(0));
std::vector<Vec3D> Points(3);
//define the left neck wall by defining its corner points in clockwise direction
Points[0] = Vec3D(getXMin(), 0.0, zContraction + contractionHeight);
Points[1] = Vec3D(getXMin() + contractionWidth, 0.0, zContraction);
Points[2] = Vec3D(getXMin(), 0.0, zContraction - contractionHeight);
w1.createOpenPrism(Points);
wallHandler.copyAndAddObject(w1);
//right neck wall
//define the right neck wall by defining its corner points in clockwise direction
Points[0] = Vec3D(getXMax(), 0.0, zContraction + contractionHeight);
Points[1] = Vec3D(getXMax() - contractionWidth, 0.0, zContraction);
Points[2] = Vec3D(getXMax(), 0.0, zContraction - contractionHeight);
w1.createOpenPrism(Points);
wallHandler.copyAndAddObject(w1);

Video

Here a short paraview animation of the code's output.

(Return to Overview of advanced tutorials)