← 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:

    Status: Open => Needs information

Jan Stránský requested more information:
I do not understand what you want to achieve.
I do not understand why outputting position of all particles is a problem. You can filter it afterwards, much easier than polluting the simulation.

>> What does "moved (particles)" mean? Moved from the beginning of simulation? From last output? ... ? Changed position? Or also orientation? ... ?
> I mean changed position or orientation.

Moved from the beginning of simulation? From last output? ... ?

>> Why is the amount a problem? 3000 does not sound as too many..
> Maybe because of my computer.

Why is the amount a problem? What are the symptoms?
What you do with the output that it is problematic?

> I want write a code that says: if particles moved from ex-position so
give their id and new position of everyone.

sorry, it is still very unclear.. I really don't know how to read and
understand the sentence :-(

> Because I want to draw shape`s moving of every particle in plot or
diagram. And at the end, achieve to shape`s moving of hole body.

I don't understand the usecase (maybe that is the problem).
What is "plot or diagram"? How should it look? Picture of deformed shape? Some polar diagram of displacements? ... ?
What is "every particle"? individual particles? only clumps?
What is "whole body"?
Do you have some examples to share?

Are you aware of tools like Paraview?
Is regular exporting of the simulation into paraview and then visualizing it in Paraview what you want? Why not?

>> According to docs [1], it "applies displacement".
> Any example for this? please..

I do not have any experience with it, but a simple example could be:
s1 = sphere((0,0,0),1)
s2 = sphere((5,0,0),1)
displacer = StepDisplacer(mov=(1,1,1)) # can also be used inside O.engines

displacer.ids = [0] # only apply 1st body
displacer() # run displacer


displacer.ids = [0,1] # both bodies
displacer() # run displacer


with output:
0 Vector3(0,0,0) Vector3(5,0,0)
1 Vector3(1,1,1) Vector3(5,0,0)
2 Vector3(1,1,1) Vector3(5,0,0)
3 Vector3(2,2,2) Vector3(6,1,1)
4 Vector3(2,2,2) Vector3(6,1,1)


You received this question notification because your team yade-users is
an answer contact for Yade.