About saving data
Dear all,
I practice to save the data of the example "bouncing sphere", some problems confuse me.
First, I want to get the displacement plot of 'sphere1' in the whole bouncing process. And then, saving the data about the test. The code of mine is as follows:
#
from yade import plot
O.bodies.append([
# fixed: particle's position in space will not change (support)
sphere(
# this particles is free, subject to dynamics
sphere((0,0,2),.5)
])
sphere1=
z=sphere1.
O.engines=[
ForceResetter(),
InsertionSortC
InteractionLoop(
[Ig2_
[Ip2_
[Law2_
),
# Apply gravity force to particles. damping: numerical dissipation of energy.
NewtonIntegrat
PyRunner(
]
O.dt=.5e-
O.trackEnergy=True
def addPlotData():
O.run(1000000,True)
plot.saveDataTx
plot.plots=
plot.plot()
O.saveTmp()
#
After running the code,there is no displacement data saved and it comes the error warning:
#
Exception ignored in thread started by: <function liveUpdate at 0x7f9be8a40790>
Traceback (most recent call last):
File "/usr/lib/
ax.relim() # recompute axes limits
File "/usr/lib/
self.
File "/usr/lib/
path = line.get_path()
File "/usr/lib/
self.recache()
File "/usr/lib/
self._xy = np.column_
File "<__array_
File "/usr/lib/
shape = _broadcast_
File "/usr/lib/
b = np.broadcast(
ValueError: shape mismatch: objects cannot be broadcast to a single shape
#
Many thanks in advance
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Yade Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Lei Hang
- Solved:
- Last query:
- Last reply: