Angular velocity from orientation

Asked by Daniela

Hi,

I have already learned here, that if I want to change the position of a body, I must define the velocity in delta_t in order to obtain the desired position.
Now, if I want to rotate the body, I suppose I should proceed the same way, I mean, define the angular velocity that will take my body in the desired orientation. Is this right or can I impose the rotation in this case? If I need to calculate the angular velocity, how can I do this in yade?

Thanks in advance. Daniela

Question information

Language:
English Edit question
Status:
Answered
For:
Yade Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Anton Gladky (gladky-anton) said :
#1

>Now, if I want to rotate the body, I suppose I should proceed the same way, I mean, define the angular velocity that will take my body in the desired orientation.
Yes.

> If I need to calculate the angular velocity, how can I do this in yade?
I do not clear understand the question. What input data do you have?

Revision history for this message
Daniela (dmaionchi) said :
#2

Hi Anton,

if I had the angles as input data I could just calculate the angular velocity using w = delta theta/ delta t.
But in my case I just have the quaternions defining the orientation. I mean if I know the orientation of the body in the time t1 and in the time t2, could I maybe calculate the angular velocity necessary to change the orientation of the body in yade using a special function? If not, how should I proceed?

I always heard that it is better to work with quaternions instead of euler angles. Because this I though that there should be an easy way to do such calculations.

Thanks in advance, Daniela.

Revision history for this message
Anton Gladky (gladky-anton) said :
#3

Hi Daniela,

Yade has some functions to work with quaternions from python interface:
https://yade-dem.org/doc/external.html?highlight=quaternion#miniEigen.Quaternion

You can create quaternions, get angles, axis from it etc.

Anton

Revision history for this message
Bruno Chareyre (bruno-chareyre) said :
#4

Quaternion are better yes, but maybe not simpler...
It should not be very difficult but I don't have the exact solution
coming to mind a.t.m.
Maybe something like $$rot=(q(t+dt)*q^{-1}(t))/dt$$, then get axis and
angle from rot?
You will have to read about quaternions arithmetic and run some tests to
be confident in a solution.

It is a bit ackward to have a list of orientations as input data. Isn't
there a chance to define the problem differently?

Bruno

Revision history for this message
Daniela (dmaionchi) said :
#5

Actually I could work directly with the angles. At the moment my data contains the quaternions for the orientation, but I can define it differently in order to have data containing the angels and axis.
Thanks again for the help. Daniela

Revision history for this message
Bruno Chareyre (bruno-chareyre) said :
#6

Even better: can't you define velocity as the input data instead of
position. :-)
> Daniela posted a new comment:
> Actually I could work directly with the angles. At the moment my data contains the quaternions for the orientation, but I can define it differently in order to have data containing the angels and axis.
> Thanks again for the help. Daniela
>

Revision history for this message
Yade Guide (yade-guide) said :
#7

Hey there! As an automated bot, I've scanned through some relevant threads and compiled a summary for you. Feel free to explore further by clicking on the links provided.

Title: "Rotational Resistance"
Ataollah is trying to apply a simplified rotational resistance approach in their Python model. They are using RotationEngine but need help assigning the particle's rotational velocity from the last iteration. Jerome suggests defining 'blockedDOFs' for each corresponding particle, including a PyRunner engine in the engine list, and using a trickRotation() function to update the velocity.
https://answers.launchpad.net/yade/+question/648215

Title: "how to set the orientation quaternion parameter so as to fully rotate a 3-d object "
The user is seeking guidance on how to set the orientation quaternion parameter for a 3-D object in YADE to fully rotate it, specifically for research purposes involving investigating the rebound response of an irregular particle against different contact points. The user has been provided with an example using a box and a rotation by pi/3 around the z axis.
https://answers.launchpad.net/yade/+question/679422

Can you help with this problem?

Provide an answer of your own, or ask Daniela for more information if necessary.

To post a message you must log in.