← Back to team overview

yade-users team mailing list archive

Re: [Question #698314]: how to use class yade.wrapper.StepDisplacer((object)arg1)


Question #698314 on Yade changed:

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 
            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")


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.