yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #28822
Re: [Question #704551]: How to make VTK file of relative particle rotation angle from state1 to state2
Question #704551 on Yade changed:
https://answers.launchpad.net/yade/+question/704551
Status: Open => Answered
Karol Brzezinski proposed the following answer:
Hi Leonard,
I think that you can use 'rot()' method of body state or Jan's proposal
in VTKExporter.
######## MVE
from yade import export
exporter = export.VTKExporter('tmp-')
s = O.bodies.append(sphere((0,0,0),1))
#set current state as reference
setRefSe3()
# set angular velocity
O.bodies[s].state.angVel = (0,0,1)
# rotate
O.run(1000,wait = True)
# export
exporter.exportSpheres(ids='all',what=dict(rotation_method_1 = 'b.state.rot()',rotation_method_2 = '(b.state.refOri.conjugate()*b.state.ori).toRotationVector() '))
######
Cheers,
Karol
--
You received this question notification because your team yade-users is
an answer contact for Yade.