Question #698314 on Yade changed: https://answers.launchpad.net/yade/+question/698314
Description changed to: Dear all, At first: I am beginner in YADE. I have simulated clumps spherical particles. I have modeled 3000 particles, I mean I have 3000 clumps. I want to get as output (text or excel): If particles in specified range of my volume are moved, printing their positions continuous. Because of having too many particles and then positions, I want to have just position of moved particles. How I can get this aim? I wrote this code: but I do not know how write code for : if particles moved ..... def positions(): for b in O.bodies: if b.state.pos[0]>(2.9) and b.state.pos[0]<7 and b.state.pos[1]>4 and b.state.pos[1]<19: # flow zone iter0=O.iter Positions=open("Positions id iter x y.txt","a") Positions.write(repr(id)+' '+repr(iter0)+' '+repr(b.state.pos[0])+' '+repr(b.state.pos[1])+' '"\n") Positions.close() O.engines=O.engines+[PyRunner(command='positions()',iterPeriod=300000,label="flow")] And can I use for this purpose with this code: if yes how to use and write? class yade.wrapper.StepDisplacer((object)arg1) Many thanks for your help. Best regards, ubuntu : 18.04 yade 2018.02b -- You received this question notification because your team yade-users is an answer contact for Yade. _______________________________________________ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp