← Back to team overview

yade-dev team mailing list archive

Re: Bugs in Cell

 

I don't really see a problem in wrapPt. It is not used directly but inside wrapShearedPoint, which is correct. The apparent crazyness of your script result is because you force periodicity not aligned with packing periodicity.
If what you want is moving bodies with cell, you need Newton integrator.

Try this below in your script, does it help?

Bruno

a=1.; r=a/4.
O.bodies.append(
[utils.sphere(c,r) for c in [(r,r,r),(3*r,r,r),(3*r,3*r,r),(r,3*r,r),(r,r,3*r),(3*r,r,3*r),(3*r,3*r,3*r),(r,3*r,3*r)]]
)
O.dt=10e-6
O.periodic=True
O.cell.refSize=(a,a,a)
zRot=-pi/100.
O.cell.velGrad=Matrix3(cos(zRot)-1,-sin(zRot),0,sin(zRot),cos(zRot)-1,0,0,0,0)
O.engines=[NewtonIntegrator(homotheticCellResize=2)]
p7=O.bodies[7].state.pos
# run and look



The bug is in Cell.hpp in wrapPt method. If the cell in not rotated, it is ok. But if you apply rotation, periodic shifts are performed along new (local) coordinates, however, the cell is not periodic in this direction (sorry, Vaclav, I yesterday said tho opposite :-)

--
_______________
Bruno Chareyre
Associate Professor
Grenoble INP
Lab. 3SR
BP 53 - 38041, Grenoble cedex 9 - France
Tél : 33 4 56 52 86 21
Fax : 33 4 76 82 70 43
________________




Follow ups

References