How do I keep the particles still?

Asked by 孙灿

I needed to keep all the particles in the simulation still, so I used the following code:
def checkUnbalanced():
 if unbalancedForce() < .02:
  O.pause()
                for b in O.bodies:

                    if isinstance(b.shape,Sphere):
                        b.state.blockedDOFs='zxy'
checkUnbalanced() is a function I define.
But I found that the particles are not fixed, why is that? Is there any other code that keeps particles immobile?

Question information

Language:
English Edit question
Status:
Expired
For:
Yade Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Jan Stránský (honzik) said :
#1

Hello,

> state.blockedDOFs='zxy'

this blocks degrees of freedom from being influenced by interactions.
But, it still allows to set velocity and has no influence on current velocity.
So the result is that the current velocity is preserved (it is not influenced by interactions any more).

To immobilize a particle, set zero velocity and angular velocity
b.state.vel = (0,0,0)
b.state.angVel = (0,0,0)

You can use predefined function
calm() # [1]
to immobilize all particles

Cheers
Jan

[1] https://yade-dem.org/doc/yade.utils.html#yade._utils.calm

Revision history for this message
孙灿 (suncan) said :
#2

I tried adding b.state.vel = (0,0,0), b.state.angVel = (0,0,0) and the particles did stay still, but new problems arose. I wanted to use O.boides.append() to add some particles while the original particles remained stationary, but I don't know why, some particles may fall down and partially overlap with the particles added by O.boides.append().

Revision history for this message
Jan Stránský (honzik) said :
#3

> new problems arose

please open a new question for a new problem ([2], point 5)

Cheers
Jan

[2] https://www.yade-dem.org/wiki/Howtoask

Revision history for this message
Launchpad Janitor (janitor) said :
#4

This question was expired because it remained in the 'Open' state without activity for the last 15 days.