← Back to team overview

yade-dev team mailing list archive

Re: Bugs in Cell

 

If you really want large and strict rigid body rotation in one step, my script is not exactly doing the job (you tried it yes?). Why not rotating the loading instead? It is equivalent and needs 0 lines of code.

B.

_honzik@xxxxxxxxxx a écrit :
Hi Bruno,

the goal is to rotate cell and particles before the actual simulation starts and use this configuration as the initial state of the simulation..

You are right, we force periodicity not aligned with packing periodicity :-) Rotating both cell and particles would solve it (but rotate particles as a poor geometrical action, not dynamic)

Jan
______________________________________________________________
Od: "Bruno Chareyre" <bruno.chareyre@xxxxxxxxxxx>
Komu: yade-dev@xxxxxxxxxxxxxxxxxxx
Datum: 30.06.2010 11:13
Předmět: Re: [Yade-dev] 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
________________


_______________________________________________
Mailing list: https://launchpad.net/~yade-dev
Post to     : yade-dev@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


_______________________________________________
Mailing list: https://launchpad.net/~yade-dev
Post to     : yade-dev@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


--
_______________
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