Circular setting

Asked by 孙灿

How do I set up a circle that consists only of a circle of particles? In other words, the circle is hollow.
Can I set the adhesion of the particles so that the circle will not collapse under gravity.

Question information

Language:
English Edit question
Status:
Answered
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 read [1] and provide more information.
Try to read your question as a person with absolutely no experience with what you are solving ([1],point 6).

> How do I set up a circle that consists only of a circle of particles? In other words, the circle is hollow.

What does "set up" mean?
What does "a circle" mean?
What does "a circle of particles" mean?
....

> Can I set the adhesion of the particles so that the circle will not collapse under gravity.

Yes

Cheers
Jan

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

Thank you for your reply!
Set up-Using particle simulation
a circle、a circle of particles-A hollow circle consisting of a circle of particles

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

Instant replay:

please read [1] and provide (much) more information.
Try to read your question as a person with absolutely no experience with what you are solving ([1],point 6).

> Set up-Using particle simulation
> a circle、a circle of particles-A hollow circle consisting of a circle of particles

What does "set up", "using", "particle", "simulation" mean?
What does "a circle of particles" mean?
So hollow circle, or circle consisting of something?
....

Cheers
Jan

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

My consciousness is that I need to use 2D spherical particles to form a circle. Like a tire, it is a 2D hollow circle.

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

> circle that consists only of a circle of particles? In other words, the circle is hollow.
> A hollow circle consisting of a circle of particles
> I need to use 2D spherical particles to form a circle. Like a tire, it is a 2D hollow circle.

please try to use the proper unambiguous terms (possibly supported with links).
Do you mean annulus [2]?

> Can I set the adhesion ...

please open a new question for separate problems ([1], point 5)

Cheers
Jan

[1] https://www.yade-dem.org/wiki/Howtoask
[2] https://en.wikipedia.org/wiki/Annulus_(mathematics)

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

Sorry, I may not know the terminology very well. I think what I'm talking about is annulus.I'm a beginner and don't know much about terms.
cheer
sun

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

> Sorry, I may not know the terminology very well.
> I'm a beginner and don't know much about terms.

I also did not know (or remember) the term annulus, but it is not difficult to search the mathematical term, especially if you see that the others do not understand the meaning of vague and ambiguous descriptions.

> I think what I'm talking about is annulus.

Think? I hoped for more solid result :-) like yes or no

Ok, assuming annulus, do you mean something like this?
###
r = 1
ro,ri = 30,15
d = 1.5*ro
outer = pack.inSphere((0,0,0),ro)
inner = pack.inSphere((0,0,0),ri)
plane = pack.inAlignedBox((-d,-d,-1.5*r),(d,d,1.5*r))
predicate = (outer - inner) & plane
spheres = pack.regularOrtho(predicate,r,gap=0)
O.bodies.append(spheres)
###

If yes, there are maaany ways how to achieve this, depending on your needs.
So to get a better / more suitable answer, please provide more information.

Cheers
Jan

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

I tried this string of code. The simulated figure is very close to what I want, but the outermost figure I need is smooth, like a circle. The outermost up, down, left and right directions of the graphics simulated by this string of code are not smooth.

Cheer
sun

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

I tried this string of code. The simulated figure is very close to what I want, but the outermost figure I need is smooth, like a circle. The outermost up, down, left and right directions of the graphics simulated by this string of code are not smooth.

Cheer
sun

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

Hello,
please define "smooth" and how should it be achieved with spheres/disk.
Cheers
Jan

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

Hello! I'm sorry I didn't explain myself clearly. I want to simulate a hollow circle. A hollow circle means that there are many particles whose center lies on the circumference of another circle. The particles form a new circle.

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

Something like this?
###
# input
R = 10
n = 48
# conputed values
c = 2*pi*R
r = c / 2 / float(n)
da = 2*pi / float(n)
# disks
disks = []
for i in range(n):
    a = i*da
    x = R*cos(a)
    y = R*sin(a)
    disk = sphere((x,y,0),r)
    disks.append(disk)
O.bodies.append(disks)
###
Cheers
Jan

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

Hello! I tried your code, but I found it couldn't run. The reason for the error is: non ASCII character '\ XC2' in file yuan py on line 11, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details. In this sentence, yuan Py is the name of the run file I defined.

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

'\XC2' is "Latin Capital Letter A With Circumflex" [3].
It is not present in the code I provided, so most likely you somehow added it it to the script.
Cheers
Jan

[3] https://www.codetable.net/hex/c2

Can you help with this problem?

Provide an answer of your own, or ask 孙灿 for more information if necessary.

To post a message you must log in.