Treatment of particle radius

Asked by 孙灿

Hello, I need to change the radius of particles in the circular range when the radius of particles is determined, but I don't know how to do it.
For example, in the two-dimensional case, the radius of particles in the rectangular range is 5mm. I need to change the radius of particles to 3mm in the range of a circle in the rectangle
Thank you

Question information

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

Hello,

changing sphere radius of a given body is as easy as
body.shape.radius = whateverValue # [1], consider adjusting mass and inertia
or
growParticle(body.id,factor) # [2], by default also automatically adjust mass

I am a bit confused (or even lost) in the description which particles should be affected. Please try to describe better the terms like "range of a circle in the rectangle" etc.

Cheers
Jan

[1] https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.Sphere.radius
[2] https://yade-dem.org/doc/yade.utils.html#yade._utils.growParticle

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

Thank you for your reply. For example, there is a circle in a rectangle, and the radius of the rectangle (including the circle) is set to 5mm. Next, I need to set the radius of particles in the circle to 3mm, while the radius of other parts of the rectangle is still 5mm.

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

Hello,

> For example

please be specific, i.e. give a specific example, some picture or more detailed description.

> there is a circle in a rectangle

what is "a circle" and "a rectangle"? It can have hundreds of meanings...
circle = packing being roughly circle? or a spherical particle in 2D? or some circular artificial region? or ... ?

> and the radius of the rectangle (including the circle)

radius of rectangle???(!!!)

> ... is set to 5mm. Next, I need to set the radius of particles in the circle to 3mm, while the radius of other parts of the rectangle is still 5mm.

Something like below?
###
# created packing, where all particles has radius=5
particlesWithinTheCircle = getParticlesWithinTheCircle()
for b in particlesWithinTheCircle:
    b.shape.radius = 3
###

Cheers
Jan

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

Both rectangle and circle are composed of 2D spherical particles. Thank you for your reply, which solved my problem.
In addition, I wonder if the method of changing the friction angle and adhesion between particles is the same as that of changing the radius? How to write the specific code?

Cheers
sun

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

> In addition,

Please open a new question for a a new question ([3], point 5)

> I wonder if the method of changing the friction angle and adhesion between particles is the same as that of changing the radius? How to write the specific code?

It depends on what specifically you want to achieve (when you ask a new question, please be much more specific), when it should happen etc.

Cheers
Jan

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

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

This simulation is a rectangle composed of 2D spherical particles. The bond strength between particles is 1e8. Now I need to change the bond strength between particles to 2e8 How do I write code?
cheer
Sun

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

Please open a new question for a a new problem ([3], point 5)
Cheers
Jan

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

Thanks Jan Stránský, that solved my question.