Why do particles intersect?

Asked by 孙灿

I want to add some other particles using O.bodies.append() on the basis of having some particles (which we call it with the first part of the particles), we call it with the second part of the particles, and I use b.state.vel = (0,0,0)
b.state.angVel = (0,0,0) fixes the first part of the particles, but I found that some of the particles of the first part fall down and intersect with the particles of the second part, why is this?

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,

Please provide a MWE [1].
Please provide reference(s) to related problem(s) [2]

Did you just set zero velocity, or also blockedDOFs?

Cheers
Jan

[1] https://www.yade-dem.org/wiki/Howtoask
[2] https://answers.launchpad.net/yade/+question/701934

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

I used not only b.state.blockedDOFs='zxy', but b.state.vel = (0,0,0),b.state.angVel = (0,0,0)
I've set up both the degree of freedom and the speed, so why is this happening?

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

We can only guess, please provide a MWE [1]
Cheers
Jan

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

I'm sorry I didn't express it very well. Some of my related codes are as follows:

def checkUnbalanced():
 if unbalancedForce() < .02:
  #O.pause()
                for b in O.bodies:
                    if isinstance(b.shape,Sphere):
                        b.state.blockedDOFs='zxy'
                        b.state.vel=(0,0,0)
                        b.state.angVel=(0,0,0)

                    d = (b.state.pos - circleCenter).norm() # distance of circleCenter and center of "b"
                    if d < circleRadius :
                       #for i in range(1,2):
                           #b.shape.radius=b.shape.radius-0.02
                       O.bodies.erase(b.id)

                       qiyong()
def qiyong():

        O.bodies.append(sphere(center=(0.05,1.5,2.451), radius=.049, fixed=True,color=(1.,1.,1.)))
        O.bodies.append(sphere(center=(0.05,1.5,1.549), radius=.049, fixed=True,color=(1.,1.,1.)))
        O.bodies.append(sphere(center=(0.05,1.049,2), radius=.049, fixed=True,color=(1.,1.,1.)))
        O.bodies.append(sphere(center=(0.05,1.951,2), radius=.049, fixed=True,color=(1.,1.,1.)))

        O.bodies.append(sphere(center=(0.05,1.9423,2.0880), radius=.049, fixed=True,color=(1.,1.,1.)))
        O.bodies.append(sphere(center=(0.05,1.9167,2.1726), radius=.049, fixed=True,color=(1.,1.,1.)))
        O.bodies.append(sphere(center=(0.05,1.8750,2.2506), radius=.049, fixed=True,color=(1.,1.,1.)))
        O.bodies.append(sphere(center=(0.05,1.8189,2.3189), radius=.049, fixed=True,color=(1.,1.,1.)))
        O.bodies.append(sphere(center=(0.05,1.7506,2.3750), radius=.049, fixed=True,color=(1.,1.,1.)))
        O.bodies.append(sphere(center=(0.05,1.6726,2.4167), radius=.049, fixed=True,color=(1.,1.,1.)))
        O.bodies.append(sphere(center=(0.05,1.5880,2.4423), radius=.049, fixed=True,color=(1.,1.,1.)))
I use checkUnbalanced() to check the balance of the particles, before this string of code, I have set up some particles (you can call it the first part of the code), qiyong() is the function I use to generate the second part of the particles, in the checkUnbalanced() function, after some conditions are met, qiyong() will be called, which will generate the second part of the particles. But when generating the second part of the particles, some particles will intersect with the first part of the particles and cause the subsequent simulations to not run as I expected, how do I solve it?

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

Please read [1] carefully and follow the instructions.

> Some of my related codes are as follows:

Provide a MWE [1], W = working, complete script.
Without it, we can merely guess..

> how do I solve it?

option 1: solve it yourself
option 2: we can help, but please follow the instructions and provide requested additional information (MWE)

> But when generating the second part of the particles, some particles will intersect with the first part of the particles

Is this the problem?
Then generate the second part of particles such that they do not intersect..

> and cause the subsequent simulations to not run as I expected

What exactly does "as I expected" and "not as I expected" mean?
In the OP there is some description, but it is too vague. E.g. "fall down", but without context and with your statement that you blocked DOFs and set zero velocity it does not make sense..
Although, with a MWE, it would be different and probably a good description..

Cheers
Jan

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

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