yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #05961
Re: computation of MomentBending
-
To:
yade-dev@xxxxxxxxxxxxxxxxxxx
-
From:
Janek Kozicki <janek_listy@xxxxx>
-
Date:
Mon, 25 Oct 2010 21:25:34 +0200
-
Face:
iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAALVBMVEUBAQEtLS1KSkpRUVFXV1dYWFhjY2Nzc3N3d3eHh4eKioqdnZ24uLjLy8vc3NxVIagyAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH2AIVEzgS1fgQtQAAAjRJREFUOMtt1DFv00AUAOAzFQNbjigSyoQaRaBMhKgLUyKXpVNNeUpk9vyDqFJhQ1kiBuaqAwJCqvPtSLY7RlTn5+5IdnYkkt/AOyfxXVLe5vf53Z1875kd34tOEax8djmj6GyjhB5bxz50GdsVZr9fqRjZwAtKOJw5Wqs2MMZ16ALHsaDncF7xAHix1oEFHAB8f+pRjcO4gfZDykcYzbiucRolOLUJ6kjA0xtVt+A6TySlM0RajIpK6DzwKZ/nOYbF/gclHMo1ZOHYY/+Ha+AWuM+3oMS4eeqYzZ8FiCltgUqI8cd2wwAVpJk+8LWYjBtnJdQpHQqJMd4Oxt4bU9ESiFGc5hkqaH74asAX4iabP5I5gZ+qjgGlJCqZa3h3lxhoeVcSE1qLQC4sqKOK9MGW9E3izFqqHokoztLFEgXg31sbZEKnWi2T74A4NxfVQqlkjKtcAWD+zcArFEES01dR0E/nnV0IgugmDd/2L84sOAouRBBHEc7gtc8teDkRlE0iNQPo2w3Xhh/D4TCIQ4LRLoTvgwjj6RRgavdurxYGMaIuGOyAW/PpNlCcU9/93AHenAWYjPoAwa+G3e3to/MgFNTAEKvKDjzuCzHTnY3qqdXtx24VijzQfZ0yewZ5cwRFQaa+mIYr1uI0I76+3W4xhlvoVRwOA0Fdl64HlJnxP6T8YpX/Lga4Wv4A3ErrU5oTfN7Mu/llXMl8RXEPji/lQkN3H7qXqgC2By47EXeU/7PJ/wPxRKMnuZwIeAAAAABJRU5ErkJggg==
-
In-reply-to:
<4CC5C3AE.4020902@univ-nantes.fr>
Luc Sibille said: (by the date of Mon, 25 Oct 2010 19:51:42 +0200)
> Hi all,
>
> I am still investigating the different moment-rotation contact laws in
> Yade (version 0.50 and last update version).
>
> I have two interrogations:
>
> 1/ First in every case relative particle rotations is totaly recomputed
> at each time step from the initial orientation with a code like that:
>
> Quaternionr delta((rbp1.ori * (initialOrientation1.conjugate())) *
> (initialOrientation2 * (rbp2.ori.conjugate())));
>
> is it safe to make such a computation, where after a long time
> simulation, relative rotation can become very large more than 2*pi
> whereas there is after a correction for the computed relative rotation
> if it is greater than 2*pi.
Remember that this is a relative rotation. Not rotation of both
spheres. I was doing tests, like rotating whole beam (a line of
spheres) around various axes, and the beam still behaved properly,
even though it was doing hundreds of 2*pi rotations. I mean - it was
working, because whole sample was rotating, so relative rotations
between spheres remained very small.
If you have a sample, where in a single contact, one of the spheres "rotates
away", then indeed troubles are possible. That needs checking.
> In addition:
> > Just to note that this formula will "fail" if the relative rotation of a
> > particle will be more than 180 degrees (the quaternion will take it the
> > other way around, as it goes always the shortest way).
>
>
> I imagined a priori to compute this relative rotation incrementally (as
> the shear force), to avoid to deal with great relative rotation. What is
> your opinion?
> why did you choose this formula and not an incremental
> formula?
It is simpler. Just calculate the rotation difference.
If you want to track 2 pi rotations, you can store previously
calculated angle, and compare it with a new one. When you spot a 2*pi
jump in values, then increment some integer counter of 'total
rotations'. In fact I am doing that in lattice model, so it works if I
spin a rod around another rod several times, and then I can see it
unspinning back the exact same amount of full 2*pi rotations.
I recall that Vaclav has also implemented a 'total distance, no
increments' approach on shear force.
> 2/ Then I rediscovered that aa.angle() can return nan, as commented in
> source file, it happens when the quaternion is close to identity. Please
> apologise for my lack of culture, but what does represent physicaly a
> quaternion close to identity?
hmm. All quaternions that we use are identity quaternions:
a^2+b^2+c^2+d^2=1. If that condition is not kept, then it is not a
rotation, but just some random quaternions.
To explain by analogy: think about complex numbers: a^2+b^2=1 means
that we are using only complex numbers from a circle of radius=1. If
that condition is not kept, then it is just some random complex
number.
So perhaps you mean, that if a quaternion is not a unit quaternion
then angle()==nan.
This is correct,
- you cannot have an angle if quaternion does not represent rotation.
- you cannot have an angle if a^2+b^2+c^2+d^2 is different from one.
--
Janek Kozicki http://janek.kozicki.pl/ |
Follow ups
References