← Back to team overview

yade-users team mailing list archive

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: Answered => Open

Leonard is still having a problem:
Hi Jan,

Thanks for your reply.

I got the solution for each individual question. But I am not clear how
to combine the two.

If I understood correctly, for using VTKExporter, it is something like:

vtkExporter.exportSpheres(ids='all',what=[('id',"b.id"),('ori','b.state.ori'),('radius',"b.shape.radius")])

It seems that the above code can only save the variables at one state.
i.e. not some value calculated from two states, such as the relative
rotation angle between state1 and state2.

What I have in my mind is: storing the rotation angle (calculated by
axis,angle = relOri.toAxisAngle()) into a VTK file. Something like:

step1: from the sample at state1 --> output a txt file (lets name it txt1) which has b.ori for each particle.
step2: from the sample at state2 --> output a txt file (txt2) which has b.ori for each particle.
step3: calculating relOri = state1.ori.conjugate()*state2.ori and axis,angle = relOri.toAxisAngle() by using txt1 and txt2, then I have the angle for each particle.
step4: store that angle into a VTK file which can be visualised in paraview

Do you have any ideas?

Thanks!

Leonard

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.