basic questions on law-test.py

Asked by Giulia Macaro

Hey,

I am new to yade and I am starting from law-test.py (bzr2598). I have included the CohFrictMat and the Coesion moment law implemented by Chiara. But that is not the point.
I am a bit confused regarding how LawTester actually works:

- path() let me apply the displacement starting from the contact point, but I don't understand in which coordinates system

- rotWeight let me decide if the applied shear produces a rotation as well. But when I apply a shear displacement and change rotWeight from 0 to 1, I don't notice any differences.. why?

- plotting un=tester.ptOurs[0], which should be the applied normal displacement, I got a max displ of -0.2, while path=(-0.1, 0, 0).. why? shouldn't they be the same?

I guess all these questions are due to the fact that I don't understand very well path(..).

Thanks in advance
Giulia

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Giulia Macaro
Solved:
Last query:
Last reply:
Revision history for this message
Václav Šmilauer (eudoxos) said :
#1

Hi Giulia, let me try to answer. I should say at start that it is possible that we will find some bugs in LawTester, as it was written only recently.

1. Local coordinate system; the 0th component is normal (between sphere's centers), 1st and 2nd components are 2 shear directions, perpendicular to the normal. Local system definition depends on IGeom class that is in use. If you use ScGeom (which only knows normal, i.e. local x axis), the other two axes will be chosen arbitrarily at first, then tracked following motion of both particles.

2. That is correct; if there is no rolling, then shear can be created in geometrically different ways, although the resulting shear will be the same -- imagine (i) one sphere fixed, the other one rotating around an axis going through its center and perpendicular to the interaction [that is rotWeight==1] (ii) one sphere fixed, the other one translated around the other one on circular arc centered at the first sphere's center (distance does not change), without underoging any rotation [that is rotWeight==0].

You can assign other values to rotWeight as well (including those ouside the 0...1 range) and the result should still be the same.

Note that rotWeight is ignored when mutual rotations (bending/twisting) are considered by the IGeom, since then, shear must be applied in such a way that it does not create bending and vice versa (that takes away that degree of freedom expressed by rotWeight).

3. Oh yes, they should be the same... I will have a look tomorrow, hope that is fine for you.

If you use ScGeom6D: I will have to add support for it to LawTester (I have not done it yet, and I did not expect someone will use it that soon); OTOH it is not complicated and I will have a look tomorrow morning probably.

Also I did some changes in LawTester today to make it more intuitive (hopefully); your old code will work, and some warnings will tell you how to change it then.

Revision history for this message
Václav Šmilauer (eudoxos) said :
#2

re 3.: Don't you have displIsRel==True? (https://www.yade-dem.org/sphinx/yade.wrapper.html#yade.wrapper.LawTester.displIsRel) That might explain it.

Revision history for this message
Václav Šmilauer (eudoxos) said :
#3

Hi Giulia, I added proper docs for LawTester, I hope they answer your questions now. I am planning to add some images as well, but that has to be postponed now. Cheers!

https://www.yade-dem.org/sphinx/yade.wrapper.html#yade.wrapper.LawTester

Revision history for this message
Giulia Macaro (giulia-macaro) said :
#4

Thank you, that is very helpful!

But now I think there are some issues with qt.view, since when I run the script I get the displacements plotted, but I don't see the balls moving in the 3d view (I could see it using the 2598 release).

Revision history for this message
Václav Šmilauer (eudoxos) said :
#5

Sorry, Giu, I fixed that in the last commit (2612), it was a bit of previous changes that broke it.

Revision history for this message
Giulia Macaro (giulia-macaro) said :
#6

Now (2612) it perfectly works.

Thank you
Giulia

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

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

Title: " How to take the displacement of O.bodies.append(geom.facetCylinder())"
Thread summary: YADE has methods for determining the displacement of a cylinder, such as state.displ[1] or TranslationEngine.
https://answers.launchpad.net/yade/+question/706191

Title: "Positive and negative alternating loading"
Thread summary: A Japanese user needs help with applying positive and negative shear stress in a simple shear test. Jan suggests using different velGrad values for isotropic compression and shear to create a stress-strain curve plotting stress σ on the vertical axis and strain γ on the horizontal axis. The user wants to loop from the second to the sixth step.
https://answers.launchpad.net/yade/+question/703791

Title: "Problems with law-test.py"
Thread summary: The user encounters issues calculating kn and ks from E and v using Law2_ScGeom_FrictPhys_CundallStrack(). They question why Fs doesn't follow the expected relationship with Fn, mentioning that ks is only valid when normal displacement is zero. The user suggests trying small Un for better understanding.
https://answers.launchpad.net/yade/+question/201766