Error to get the final value of minimum and maximum radius

Asked by ehsan benabbas

Hello,

I am using Ubuntu 18.04, and Yade 2019-08-08.git-775ae74

I have my code done based on [1] and somewhere at the middle of code I want to get the values of maximum and minimum radius of the packing. I used the following commands based on the YADE documentation:

RRmax=max([b.shape.rMax for b in O.bodies])
RRmin=min([b.shape.rMin for b in O.bodies])
print('Maximum Radius',RRmax)
print('Minimum Radius',RRmin)

And got the following error:

################## Target porosity is reached and compacted state saved successfully ##################
Number of elements: 1006
Box Volume engine: 1.0
Box Volume calculated: 1.0
*** Volume calculation is Correct. ***
Total volume of particles (Vs): 0.6002612317262881
Total volume of voids Calculated (Vv): 0.3997387682737119
porosity: 0.3997387682737119
porosity Calculated (n): 0.3997387682737119
Porosity calculation is Correct.
Void ratio Calculated (e): 0.6659413387802929
step that starts the deviatoric loading 70.0
Traceback (most recent call last):
  File "/home/ehsan/yade/install/bin/yade-2019-08-08.git-775ae74", line 336, in runScript
    execfile(script,globals())
  File "/usr/lib/python3/dist-packages/past/builtins/misc.py", line 82, in execfile
    exec_(code, myglobals, mylocals)
  File "Q.py", line 224, in <module>
    +(['"\e[24~": "\C-Uyade.qt.Controller();\C-M"','"\e[23~": "\C-Uyade.qt.View();\C-M"','"\e[21~": "\C-Uyade.qt.Controller(), yade.qt.View();\C-M"','"\e[20~": "\C-Uyade.qt.Generator();\C-M"'] if (gui!='none') else []) #F12,F11,F10,F9
  File "Q.py", line 224, in <listcomp>
    +(['"\e[24~": "\C-Uyade.qt.Controller();\C-M"','"\e[23~": "\C-Uyade.qt.View();\C-M"','"\e[21~": "\C-Uyade.qt.Controller(), yade.qt.View();\C-M"','"\e[20~": "\C-Uyade.qt.Generator();\C-M"'] if (gui!='none') else []) #F12,F11,F10,F9
AttributeError: 'Box' object has no attribute 'rMax'
[[ ^L clears screen, ^U kills line. F12 controller, F11 3D view (press "h" in 3D view for help), F10 both, F9 generator, F8 plot. ]]

In [1]:

P.S: I developed my code based on [1]
[1] https://gitlab.com/yade-dev/trunk/blob/master/examples/triax-tutorial/script-session1.py

How can I get the value of maximum and minimum radius of the packing?

Regards,
Ehsan

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
ehsan benabbas
Solved:
Last query:
Last reply:
Revision history for this message
ehsan benabbas (ehsanben) said :
#1

I solved my problem.