'Name error' while calling function
Hi All,
I am simulating a particle impact on a flat surface and would like to track the position and kinetic energy of the particle.
I am using yade 1.07 version on Ubuntu 14.04 LTS.
I encountered a problem with the "PyRunner" in my script while executing a function meant for saving data after every N iteration.
The script is given below:
from yade import qt
from yade import plot,pack,geom
#define material properties:
rho = 2500 #density
fric = 0.5 #friction coefficient
fric_angle = atan(fric) #friction angle in radian
stiff_n = 1e8
stiff_s = 1e8
c_n = 0.1 #normal viscous damping
c_s = 0.1 #shear viscous damping
l_d = 0.2 #local damping
#define a material:
Mat = O.materials.
cn=c_n, cs=c_s, density=rho, frictionAngle=
#create a sphere:
b1 = utils.sphere(
O.bodies.append(b1)
#O.bodies.
#create a plane facet:
O.bodies.
#define engines:
O.engines=[
ForceResetter(),
InsertionSortC
InteractionLoop(
[Ig2_
[Ip2_
[Law2_
),
GravityEngine(
NewtonIntegrat
qt.SnapshotEng
PyRunner(
]
O.run(50000)
#show geometry:
v=qt.View(); v.axes=True
v.viewDir=
v.eyePosition=
O.dt = 1e-4
#O.dt=.
def plotAddData():
pos = b1.state.pos
Intrs = len( b1.intrs())
plot.addData(
plot.saveDataT
The error appeared on the terminal as "NameError: name 'plotAddDatan' is not defined". I came across similar problem in this forum but none seems to work. Any help would be appreciated.
Regards,
Subha
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Yade Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Klaus Thoeni
- Solved:
- Last query:
- Last reply: