Random torque results in r2535

Bug #672473 reported by Jérôme Duriez
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Yade
Fix Released
Undecided
Unassigned

Bug Description

Launching scripts/normalInelasticity-test.py., with r2535, I get random results (two different ones) if I launch this script few times successivly (quitting Yade after the end of each launch)
It is about two spheres in contact, which move relatively to each other, and (at the end of the script), especially rotate relatively to each other.

The last figure displayed by the script, which represents the evolving torque contact, is random : I can get two different figures, which are attached.

Revision history for this message
Jérôme Duriez (jduriez) wrote :
Revision history for this message
Jérôme Duriez (jduriez) wrote :
Revision history for this message
Anton Gladky (gladky-anton) wrote : Re: [Bug 672473] Re: Random torque results in r2535

Try to start yade with -j 1 option and compare results.
If it is ok, it is known issue.

Anton

On Mon, Nov 8, 2010 at 11:18 AM, jduriez <email address hidden>wrote:

>
> ** Attachment added: "TorqueV1.png"
>
> https://bugs.launchpad.net/yade/+bug/672473/+attachment/1726709/+files/TorqueV1.png
>
> --
> Random torque results in r2535
> https://bugs.launchpad.net/bugs/672473
> You received this bug notification because you are subscribed to Yade.
>
> Status in Yet Another Dynamic Engine: New
>
> Bug description:
> Launching scripts/normalInelasticity-test.py., with r2535, I get random
> results (two different ones) if I launch this script few times successivly
> (quitting Yade after the end of each launch)
> It is about two spheres in contact, which move relatively to each other,
> and (at the end of the script), especially rotate relatively to each other.
>
> The last figure displayed by the script, which represents the evolving
> torque contact, is random : I can get two different figures, which are
> attached.
>
>
>

Revision history for this message
Jérôme Duriez (jduriez) wrote :

I launched ./yade-trunk -j1 ~/yadeTrunk/scripts/normalInelasticity-test.py, is it ok ? (sorry, with https://www.yade-dem.org/sphinx/introduction.html#starting-yade, I did not find exactly what to type in this case of options with numerical values)

If yes it does not solve the problem. I still have random results. More precisely it happens (at least) during the first phase of the script, when spheres move relatively in normal direction.
Change l.73 of normalInelasticity-test.py, to have plot.plots={'step':('unTrue','torque',),'unPerso':('normFn',),'unTrue':('normFnBis',)}, to check it.

With many launchs I got in fact (at least) three different changes in torque during compression (attached).

Revision history for this message
Jérôme Duriez (jduriez) wrote :
Revision history for this message
Jérôme Duriez (jduriez) wrote :
Revision history for this message
Jérôme Duriez (jduriez) wrote :
Revision history for this message
Anton Gladky (gladky-anton) wrote :

Not sure, but I think it should be:

./yade-trunk ~/yadeTrunk/scripts/normalInelasticity-test.py -j 1

Anton

On Mon, Nov 8, 2010 at 11:59 AM, jduriez <email address hidden>wrote:

>
> ** Attachment added: "TorqDuringComp_V3.png"
>
> https://bugs.launchpad.net/yade/+bug/672473/+attachment/1726735/+files/TorqDuringComp_V3.png
>
> --
> Random torque results in r2535
> https://bugs.launchpad.net/bugs/672473
> You received this bug notification because you are subscribed to Yade.
>
> Status in Yet Another Dynamic Engine: New
>
> Bug description:
> Launching scripts/normalInelasticity-test.py., with r2535, I get random
> results (two different ones) if I launch this script few times successivly
> (quitting Yade after the end of each launch)
> It is about two spheres in contact, which move relatively to each other,
> and (at the end of the script), especially rotate relatively to each other.
>
> The last figure displayed by the script, which represents the evolving
> torque contact, is random : I can get two different figures, which are
> attached.
>
>
>

Revision history for this message
Václav Šmilauer (eudoxos) wrote :

This is not related to multi-threading, there is one single interaction. Either NormalInelasticity etc is broken, or ScGeon6D is. Jerome, you will have to go deeper to find out about the differences.

You might also have a look at scripts/test/compare-identical.py (_you will need to adjust it perhaps_) which runs the same simulation twice and checks that it is identical.

Revision history for this message
Bruno Chareyre (bruno-chareyre) wrote : Re: [Yade-dev] [Bug 672473] Re: Random torque results in r2535

Hi Jerome,
I think you need to replace Ig2_Sphere_Sphere_ScGeom by
Ig2_Sphere_Sphere_ScGeom6D in the script, else rotation is undefined.
Can you try that please?
Bruno

Revision history for this message
Jérôme Duriez (jduriez) wrote :

It is linked with the values of the vectors "moment_twist" and "moment_bending".

In "my" files, they were not part of the physics (just declared and used in the Law2), contrary to CohFrictPhys, and thus never initialized : I think that was the reason for their random nature ?

I modified it (now it should be as in CohesiveFrictionalContactLaw from this point of view) and it seems to be a little better now, but, from the tests I made, "moment_bending" is still sometimes random (with obviously wrong values).

Revision history for this message
Jérôme Duriez (jduriez) wrote :

Ok, Bruno won, that was the reason. Sorry for this mistake (this allowed me at least to continue some cleaning in the corresponding code about rotations).

r2536 contains the right changes. Thanks everybody (closing the bug)

Changed in yade:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.