kenetic Energy of particles
hi everyone ,
i wrote code about falling spheres in cylinder and now i want to know the average kinetic energy of all spheres .
this is what i obtain :
AttributeError Traceback (most recent call last)
/usr/bin/yade in <module>()
/usr/bin/yade in plotAddData()
41 for b in O.bodies:
42 if (type(b.
---> 43 Ek = b. O.energy['kinetic']
44 plot.addData(
45
AttributeError: 'Body' object has no attribute 'O'
In [1]: exit
my code is :
from yade import pack,plot
#material of cylinder
Mat1 = O.materials.
# create the big sphere
big_sphr=
# create sphere packing
sp=pack.
sp.makeCloud(
sp.toSimulation
# create Cylinder
Cylinder=
# interactions
O.engines=[
ForceResett
InsertionSo
Interaction
),
NewtonInteg
PyRunner(
]
O.dt=utils.
O.saveTmp()
#energy kenetic
O.trackEnergy=True
def plotAddData():
for b in O.bodies:
if (type(b.
Ek = b. O.energy['kinetic']
plot.plots=
plot.plot()
yade.qt.View()
any suggestions ? thank's in advance.
cordially
Any suggestions ?
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Yade Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- hafsa
- Solved:
- Last query:
- Last reply: