particle position
Hi,
I want to export each particle's position in txt.In def addPlotData():,I used x,y,z = b.state.pos and plot.saveDataTxt to save positon,but I found that it only saved just one x/y/z.I think maybe saveDataTxt can only save int type.How can I save all particle's positons in txt?
Thanks
James
#################
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from yade import pack,plot,qt
sphere=
wall=O.
r=2.2275e-3
sp=pack.
ylength=r*2*45
zlength=r*2*200
sp.makeCloud(
sp.toSimulation
for b in O.bodies:
if isinstance(
wallbutton=
wallleft=
wallright=
O.engines=[
ForceResetter(),
InsertionSor
InteractionLoop(
[
[
[
),
NewtonIntegr
VTKRecorder(
PyRunner(
]
O.dt=1*
O.trackEnergy=True
cut=0.4
x=y=z=0
def addPlotData():
for b in O.bodies:
if isinstance(
x,y,z = b.state.pos
print(x,y,z)
plot.
plot.
plot.plots=
plot.plot()
qt.Controller()
O.saveTmp()
O.run()
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Yade Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Jan Stránský
- Solved:
- Last query:
- Last reply: