← Back to team overview

yade-users team mailing list archive

Re: [Question #701750]: Cylinder particles segmented question

 

Question #701750 on Yade changed:
https://answers.launchpad.net/yade/+question/701750

    Status: Open => Answered

Jan Stránský proposed the following answer:
>> The parameter translationAxis=[0,0,1] means that all index wallIds will move in the z direction
> What if we would like to apply specific direction for each wall?
> i.e. y direction for top and bottom wall, x direction for left and right wall, z direction for front and back
> It seems that the above code, can only control one direction for 6 walls at one time

Yes, TranslationEngine moves all its bodies "at once".
If you want to move each body separately, you can:

- create more TranslationEngine instances, each with its own ids and its
own axis and velocity

- assign velocity directly to the body:
###
b = O.bodies[0] # some wall
b.state.vel = (1,2,3) # some velocity vector
###

> Example MWE script is shown as below:

W = working
NameError: name 'cylinder' is not defined
NameError: name 'qt' is not defined

M = minimal
Still there are unused commented codes, e.g. #O.bodies.appendClumped()

> the 6 aabbWalls() were disappeared

They move away with the prescribed velocity, nothing surprising, or?

> Do these disappeared walls succeed in adding velocity? Should
aabbWalls disappear in the running gprocess?

If "diseappear" mean moving with prescribed velocity, then yes and yes

Cheers
Jan

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