Trouble in running the example of Yade ball mill script
Hello, I am new Yade user also learner to python coding. I am trying run a ball mill script (mill.py) that is provided in Yade examples. but, I am getting error as below:
Running script mill.py
Traceback (most recent call last):
File "/usr/bin/yade", line 343, in runScript
execfile(
File "/usr/lib/
exec_(code, myglobals, mylocals)
File "mill.py", line 26, in <module>
for th0 in linspace(
File "<__array_
File "/usr/lib/
num = operator.index(num)
TypeError: 'float' object cannot be interpreted as an integer
Here is the script of mill.py
# encoding: utf-8
from yade import pack
from numpy import linspace
# geometry parameters
bumpNum=2
bumpHt,
millRad,millDp=1,1 # radius and depth (cylinder length) of the mill
sphRad,
dTheta=pi/24 # circle division angle
###
### mill geometry (parameteric)
###
bumpPeri=
bumpAngle=
interBumpAngle=
bumpRad=
pts=[]; thMin=0
for i in range(0,bumpNum):
thMin+
thMax=
thTip=
# the circular parts spanning from thMin to thMax
for th0 in linspace(
pts.append(
# tip of the bump
pts.append(
# close the curve
pts+=[pts[0]]
# make the second contour, just shifted by millDp; ppts contains both
ppts=[pts,
mill=pack.
millIds=
# make the caps less comfortably, but looking better as two triangle couples over the mill
mrs2=millRad*
cap1,cap2=
for xx in -.5*millDp,
# define domains for initial cloud of red and blue spheres
packHt=.8*millRad # size of the area
bboxes=
colors=
for i in (0,1): # red and blue spheres
sp=pack.
sp.makeCloud(
O.bodies.
print ("Numer of grains"
O.dt=utils.
O.engines=[
BexResetter(),
BoundingVolume
InsertionSortC
InteractionDis
[ef2_
[SimpleElasti
[Law2_
),
GravityEngine(
RotationEngine
SnapshotEngine
NewtonsDampedL
]
O.saveTmp()
from yade import qt
v=qt.View()
v.eyePosition=
O.run(10000); O.wait()
utils.encodeVid
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Yade Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- 010M
- Solved:
- Last query:
- Last reply: