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

Problem description

A 3D hour glass/silo is simulated, i.e. a cylindrical 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 AxisymmetricIntersectionOfWalls to set up axisymmetrical shapes, i.e. the outer cylinder and the neck.

Defining an axisymmetric wall

The outer wall is defined by an AxisymmetricIntersectionOfWalls object:

w1.setSpecies(speciesHandler.getObject(0));
w1.setPosition(Vec3D(mid.X, mid.Y, 0));
w1.setOrientation(Vec3D(0, 0, 1));
w1.addObject(Vec3D(1, 0, 0), Vec3D((getXMax() - getXMin()) / 2.0, 0, 0));
wallHandler.copyAndAddObject(w1);

The neck is also defined by an AxisymmetricIntersectionOfWalls object:

w2.setSpecies(speciesHandler.getObject(0));
w2.setPosition(Vec3D(mid.X, mid.Y, 0));
w2.setOrientation(Vec3D(0, 0, 1));
std::vector<Vec3D> points(3);
//define the neck as a prism through corners of your prismatic wall in clockwise direction
points[0] = Vec3D(halfWidth, 0.0, mid.Z + contractionHeight);
points[1] = Vec3D(halfWidth - contractionWidth, 0.0, mid.Z);
points[2] = Vec3D(halfWidth, 0.0, mid.Z - contractionHeight);
w2.createOpenPrism(points);
wallHandler.copyAndAddObject(w2);

Video

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

(Return to Overview of advanced tutorials)