About gravity deposition example in the yade documentation

Asked by Lei Hang

Dear all,

When I study the Gravity deposition example in the yade documentation, some places of the script confuse me a lot.
The script link is as following:
https://gitlab.com/yade-dev/trunk/blob/master/doc/sphinx/tutorial/02-gravity-deposition.py

My questions:
1. From "O.bodies.append(geom.facetBox((.5,.5,.5),(.5,.5,.5),wallMask=31))", we know the length of the rectangular box is 0.5. But the maximum corner of the sphere cloud is (1,1,1)"sp.makeCloud((0,0,0),(1,1,1),rMean=.05,rRelFuzz=.5)". Whether the maximum corner of the sphere cloud should be (.5,.5,.5)?

2. The script includes "plot.saveDataTxt('bbb.txt.bz2')" and "plot.addData(i=O.iter,unbalanced=unbalancedForce(),**O.energy)". What is the difference between the function of "plot.saveDataTxt()" and "plot.addData()"?

3. In this sentence "plot.addData(i=O.iter,unbalanced=unbalancedForce(),**O.energy)", what is the meaning of the "energy"? What data does this "energy" file contain?

Many thanks in advance

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Jan Stránský
Solved:
Last query:
Last reply:
Revision history for this message
Best Jan Stránský (honzik) said :
#1

Hello,

1.
Parameters of geom.facetBox are center and extents, which are half-sizes of the final size (although the documentation says "lengths of the box sides").
So "the length of the rectangular box" is 1 and now the numbers should fit together better.

Again, feel free to
- update the documentation yourself
- open an issue on gitlab pointing that the documentation is inaccurate

2.
as the names should suggest, plot.addData just adds data to the plot storage and savaDataTxt saves the stored data to a text file.
See documentation [1,2] and user's manual [3] for more details

3.
O.energy [4,5] tracks energies in the simulations.
You can use O.energy.keys() to see what energies are currently stored.
Usually it differs from simulation to simulation, as e.g. different Law2 uses their own "keys" to store e.g. dissipation by friction, dissipation by viscosity etc.
It is not "file", it is a variable.

cheers
Jan

[1] https://yade-dem.org/doc/yade.plot.html#yade.plot.addData
[2] https://yade-dem.org/doc/yade.plot.html#yade.plot.saveDataTxt
[3] https://yade-dem.org/doc/user.html#tracking-variables
[4] https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.Omega.energy
[5] https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.EnergyTracker

Revision history for this message
Lei Hang (h-stone) said :
#2

Thank you!!!

Revision history for this message
Lei Hang (h-stone) said :
#3

Thanks Jan Stránský, that solved my question.