Hi, I am trying to make a Box shaped container in MercuryDPM, or say BoxWall.
I used IntersectionOfWalls to do this, as learnt from Tutorial8.
Main part of the code is:
IntersectionOfWalls w1;
Vec3D minPos = Vec3D(0, 0, 0), maxPos = Vec3D(getXMax(), getYMax(), getZMax());
w1.setSpecies(speciesHandler.getObject(0));
w1.addObject(Vec3D(-1.0, 0.0, 0.0), minPos); // back
w1.addObject(Vec3D( 0.0, -1.0, 0.0), minPos); // left
w1.addObject(Vec3D( 0.0, 0.0, -1.0), minPos); // bottom
w1.addObject(Vec3D( 1.0, 0.0, 0.0), maxPos); // front
w1.addObject(Vec3D( 0.0, 1.0, 0.0), maxPos); // right
w1.addObject(Vec3D( 0.0, 0.0, 1.0), maxPos); // top
wallHandler.copyAndAddObject(w1);
Then I place a particle there, and give it a velocity - or just release it under gravity.
However, just by doing so and Visualizing vtu files in ParaView, Walls are not visualized - and they didn’t get formed. As a result, particle escapes to infinity - as also evident in XBALLS animation.
One confusing part was whether the surface normals were set in intended direction. I have set them facing in the direction of particle’s path - when it comes to collide with wall in normal direction (see code above). I understand this is the right way, isn’t it?
However, When I set walls with surface normals in the opposite directions, the behaviors is different based on whether I have gravity set or not.
- If I have gravity set, ParaView actually generates the Walls! – but for particles, it looks like a weird situation and they escape to somewhere.
- But at the same time, if there is no gravity set - then walls are also not shown in ParaView and particle still jumps somewhere without any force set. I guess this kind behavior is not surprising if wall normals are not set in the right way. But I am not able to figure out other behaviors.
- So, first question is am I not supposed to use IntersectionOfWalls this way?
- Otherwise, is there any mistakes in my code? - could you review it?, I have made a fresh branch on Bitbucket, as a simple test implementation.
- I guess it could be also some bad selection of combination of particle radius, collision time, etc. ( I use similar material properties as in Tutorial9, i.e., they are set to get a collisonTime=0.005s and NormalCOR=0.88 - and I use a particle of radius 1cm, instead of 5mm used there. )

Thanks in advance,
Fahad.
p.s: I need Box as single WallObject, since I want to assign it a prescribed motion of my like. And I guess it will be totally messy if I have to move each wall element. And I am also not familiar with making things in CAD, which might be alternative solution.