← Back to team overview

yade-users team mailing list archive

Re: [Question #247806]: apply rigid body rotation of a periodic cell

 

Question #247806 on Yade changed:
https://answers.launchpad.net/yade/+question/247806

    Status: Open => Answered

Jan Stránský proposed the following answer:
Hi Ning,


>
> I want to apply a rigid body rotation on a periodic cell meantime maintain
> the configuration (relative particle position and contact force unchanged
> but only rotated). If I use O.cell.velGrad=Matrix3(0,sin(theta),0,
> -sin(theta),0,0, 0,0,0), the cell rotates but the configuration are also
> changed. Is there a way currently available to do the pure rotation?
>
>
the problem here is that the matrix you udefined does not produce pure
rotation. The change of configuration of cell (trsf) is expressed [1]:

trsfNew = trsfOld + velGrad*dt*trsfOld

so if you know how trsf should chenge during the time (rotate in your
case), you can define (after some matrix algebra) propper velGrad.

cheers
Jan

[1]
http://bazaar.launchpad.net/~yade-pkg/yade/git-trunk/view/head:/core/Cell.cpp#L9

-- 
You received this question notification because you are a member of
yade-users, which is an answer contact for Yade.