Fill an annulus or a cylinder with particles

Asked by Olivier Froment

Hi,

First experience with a DEM code....

In fact I need to know how thousands of particles (about 100000) are located within a cylinder (or an annulus) with the effect of the gravity.
More precisely, the cylinder is a reactor core. Some spheres, the pebbles, are dropped from the top of the reactor and then at the end the cylinder is full of spheres. I need to know the location of each sphere in order to study neutronic properties.

Is there an existing module that does that thing (Maybe I'm dreaming...)?
Otherwise, I thought to put all the spheres in a cube, on the top of th cylinder, and then drop all the spheres within the cylinder.

Since it's my first time with a DEM code I don't know the best way to proceed...

And, last point, is there a tutorial that aims at explaining how to create 3d shapes like cylinders or annulus with Esys?

Thanks!

Olivier
(734) 358 2349
<email address hidden>

Question information

Language:
English Edit question
Status:
Solved
For:
ESyS-Particle Edit question
Assignee:
No assignee Edit question
Solved by:
Olivier Froment
Solved:
Last query:
Last reply:
Revision history for this message
Dion Weatherley (d-weatherley) said :
#1

Hi Olivier,

There is no existing ESyS-Particle script to do this type of simulation however the scenario you describe can be simulated with ESyS-Particle. The most challenging part is to construct a cylindrical container for the particles. This would need to be done using a triangular mesh wall. Currently we have few tools for creating mesh walls so someone would need to construct the cylindrical mesh by hand. I will talk to some colleagues today to see if someone is willing to take on that challenge. I hope to add a tutorial on creating 3D shapes with mesh walls when time permits...

Once you have a cylindrical mesh wall, you can simply drop the spheres into the top of the cylinder as you describe in your question. Alternatively you could initially pack spheres into a rectangular prism within the cylinder then let them settle under gravity to fill the base of the cylinder. This approach might be significantly faster because the spheres will have less distance to travel before coming to rest.

I will get back to you regarding the cylindrical mesh.

Cheers,

Dion.

Revision history for this message
Olivier Froment (ofroment) said :
#2

This is nice from you!

Indeed such a tutorial would be a great idea, since I knew a lot of people who are interested by these kind of issues, with sometimes other shapes than cubes!

Keep me in touch about that,

Olivier

Revision history for this message
Jessica (jescarish) said :
#3

Good day!!!

I have finish running all the examples of your tutorial. And now I am planning to work on hopper flows in cylindrical shape. I am wondering if it is already possible in ESyS to make a cylindrical mesh. If it is, I am hoping if you could help me because I am studying on measuring the cement powder flow on a 3D cylindrical silo.

Another thing is, what is the smallest radius of particle allowed in ESyS? Cause cement powder has a radius of 75 micrometer.

Thank You and GoD SpeeD!!!

Jessica

Revision history for this message
Dion Weatherley (d-weatherley) said :
#4

Hi Jessica,

Sorry for the delayed response. I have just uploaded an FAQ describing how to create a cylindrical mesh for use in ESyS-Particle simulations. The FAQ is available here:
https://answers.launchpad.net/esys-particle/+faq/683

It is not really my desire to provide much support for creating meshes using gmsh so the guide provided is designed to help you learn the basics. If you encounter difficulties with using gmsh, I suggest you refer to the gmsh website for assistance:
http://www.geuz.org/gmsh/

If you have difficulties with my 'medit2TriMesh.py' script, please let me know via the ESyS-Particle Answers section on Launchpad, or reply to this message.

Regarding you question about the smallest radius allowed in ESyS-Particle: There isn't really a limit on the size of particles that may be simulated. Often it is convenient to choose to re-scale your units-of-measure so that a particle of radius 1.0 in a simulation represents a real particle of another radius (e.g. 1 micrometer). If you do this, you may also need to re-scale other physical properties such as force, stress, elastic moduli etc. to account for your choice to measure distances in micrometers instead of meters.

The most important constraints you need to consider when designing ESyS-Particle simulations are the total number of particles and the total number of timesteps you wish to simulate. These two factors govern the total execution time of a simulation (and the number of CPUs you will need to use!). As a guide, simulations in excess of 1 million particles are likely to require about 32 CPUs to complete a simulation within a few days.

Good luck and have fun!

Cheers,

Dion.

Revision history for this message
Jessica (jescarish) said :
#5

Hello Dion,

Thank you very much for your generosity on sharing some information about creating meshes. By the way, my work on cylindrical hopper is changed to conical shape funnel as advised. Regarding with this, I have successfully created the mesh file of the funnel using gmesh but I have a problem on using the medit2Trimesh. It is mention on the link you provided that if the geometry is not cylindrical, we just need to change the inPoint in the script. Since it is a conical funnel, it has 2 different radius. Now the inPoint I indicated is based on the smaller radius..would this matter?? But anyway, I change it and I have this error. The line 102 is what I thought to be the radius of the cylinder so I put the radius of my funnel.

Traceback (most recent call last):
  File "medit2TriMesh.py", line 102, in <module>
    Medit2TriMesh(meshfile=argv[1],outfile=argv[2],inPoint=[0.0,1.0,0.0])
  File "medit2TriMesh.py", line 94, in Medit2TriMesh
    reorderNodes (nodeList, triList, inPoint = inPoint)
  File "medit2TriMesh.py", line 79, in reorderNodes
    nV = normalVector(p1,p2,p3)
  File "medit2TriMesh.py", line 66, in normalVector
    nV = [cp[0]/norm,cp[1]/norm,cp[2]/norm]
ZeroDivisionError: float division

The error is probably on the inPoint. But I actually don't understand it.

Hoping for an elaboration about this matter.

Jessica

Revision history for this message
Anton Gladky (gladky-anton) said :
#6

Hi, Jessica!

How do you start medit2TriMesh.py script?
You should do it like:

python medit2TriMesh.py inputFileName.mesh outputFileName.lsm

If you need to change inPoint, you can change it in line 102.
I have just done it and it works normally.

Your inPoint must be inside your conical hoper. In this case, mesh triangles
will be oriented correctly.
______________________________
[ENG] Best Regards
[GER] Mit freundlichen Grüßen
[RUS] С наилучшими пожеланиями
[UKR] З найкращими побажаннями

Anton Gladkyy

2009/11/18 Jessica <email address hidden>

> Question #77084 on ESyS-Particle changed:
> https://answers.launchpad.net/esys-particle/+question/77084
>
> Jessica posted a new comment:
> Hello Dion,
>
> Thank you very much for your generosity on sharing some information
> about creating meshes. By the way, my work on cylindrical hopper is
> changed to conical shape funnel as advised. Regarding with this, I have
> successfully created the mesh file of the funnel using gmesh but I have
> a problem on using the medit2Trimesh. It is mention on the link you
> provided that if the geometry is not cylindrical, we just need to change
> the inPoint in the script. Since it is a conical funnel, it has 2
> different radius. Now the inPoint I indicated is based on the smaller
> radius..would this matter?? But anyway, I change it and I have this
> error. The line 102 is what I thought to be the radius of the cylinder
> so I put the radius of my funnel.
>
> Traceback (most recent call last):
> File "medit2TriMesh.py", line 102, in <module>
> Medit2TriMesh(meshfile=argv[1],outfile=argv[2],inPoint=[0.0,1.0,0.0])
> File "medit2TriMesh.py", line 94, in Medit2TriMesh
> reorderNodes (nodeList, triList, inPoint = inPoint)
> File "medit2TriMesh.py", line 79, in reorderNodes
> nV = normalVector(p1,p2,p3)
> File "medit2TriMesh.py", line 66, in normalVector
> nV = [cp[0]/norm,cp[1]/norm,cp[2]/norm]
> ZeroDivisionError: float division
>
> The error is probably on the inPoint. But I actually don't understand
> it.
>
> Hoping for an elaboration about this matter.
>
> Jessica
>
> --
> You received this question notification because you are an answer
> contact for ESyS-Particle.
>

Revision history for this message
Jessica (jescarish) said :
#7

Thank you Sir Anton for your immediate answer. But I still find the same error after many trials of different inPoints and I am pretty sure that all the inPoints I inputed were inside the hopper. I really don't know why it still wont run properly. =(

Revision history for this message
Anton Gladky (gladky-anton) said :
#8

Jessica, please, post your mesh file.
I think your problem is trivial.

______________________________
[ENG] Best Regards
[GER] Mit freundlichen Grüßen
[RUS] С наилучшими пожеланиями
[UKR] З найкращими побажаннями

Anton Gladkyy

2009/11/20 Jessica <email address hidden>

> Question #77084 on ESyS-Particle changed:
> https://answers.launchpad.net/esys-particle/+question/77084
>
> Jessica posted a new comment:
> Thank you Sir Anton for your immediate answer. But I still find the same
> error after many trials of different inPoints and I am pretty sure that
> all the inPoints I inputed were inside the hopper. I really don't know
> why it still wont run properly. =(
>
> --
> You received this question notification because you are an answer
> contact for ESyS-Particle.
>

Revision history for this message
Jessica (jescarish) said :
#9

Ok. Here's the mesh file of my geometry:

 MeshVersionFormatted 1
 Dimension
 3
 Vertices
 90
                    0 0 0 0
                    1 0 0 0
                   -1 0 0 0
                    0 1 0 0
                    0 -1 0 0
                    0 0 3 0
                    0 3 3 0
                    0 -3 3 0
                    3 0 3 0
                   -3 0 3 0
      2.8531695488882 0.92705098311627 3 0
      2.4270509831292 1.7633557568714 3 0
      1.7633557568781 2.4270509831244 3 0
     0.92705098312083 2.8531695488868 3 0
    -0.92705098311627 2.8531695488882 3 0
     -1.7633557568714 2.4270509831292 3 0
     -2.4270509831244 1.7633557568781 3 0
     -2.8531695488868 0.92705098312083 3 0
     -2.8531695488882 -0.92705098311627 3 0
     -2.4270509831292 -1.7633557568714 3 0
     -1.7633557568781 -2.4270509831244 3 0
    -0.92705098312083 -2.8531695488868 3 0
     0.92705098311627 -2.8531695488882 3 0
      1.7633557568714 -2.4270509831292 3 0
      2.4270509831244 -1.7633557568781 3 0
      2.8531695488868 -0.92705098312083 3 0
    -0.70710678118604 0.70710678118705 0 0
    -0.70710678118705 -0.70710678118604 0 0
     0.70710678118604 -0.70710678118705 0 0
     0.70710678118705 0.70710678118604 0 0
      2.5000000000033 0 2.2500000000049 0
      2.0000000000042 0 1.5000000000062 0
      1.5000000000023 0 0.75000000000344 0
                    0 2.5000000000033 2.2500000000049 0
                    0 2.0000000000042 1.5000000000062 0
                    0 1.5000000000023 0.75000000000344 0
     -2.5000000000033 0 2.2500000000049 0
     -2.0000000000042 0 1.5000000000062 0
     -1.5000000000023 0 0.75000000000344 0
                    0 -2.5000000000033 2.2500000000049 0
                    0 -2.0000000000042 1.5000000000062 0
                    0 -1.5000000000023 0.75000000000344 0
       1.614598181878 -1.5197691133563 1.8260197316582 0
      2.3674684153123 -1.1105774632052 2.4225183553913 0
      1.3129794423974 -2.249490020373 2.4069516029522 0
      1.1451498542399 -1.1089475736962 0.89113969629812 0
      1.2833494547995 -0.51884427180663 0.57639512218205 0
     0.53432211347761 -1.274810920633 0.57339016099516 0
      1.7060332834124 -0.65436822510449 1.2408359146087 0
     0.83876273545475 -2.1578153470499 1.9726506441464 0
      2.1737027659634 -0.64591817547272 1.9014609375041 0
      1.9531212808614 -1.8573741545307 2.5429164407966 0
     0.70366984069607 -1.6754377072654 1.2258111086742 0
     0.61256865533482 -2.5857760254908 2.4860162475684 0
      1.5197691133563 1.614598181878 1.8260197316582 0
      1.1105774632052 2.3674684153123 2.4225183553913 0
       2.249490020373 1.3129794423974 2.4069516029522 0
      1.1089475736962 1.1451498542399 0.89113969629812 0
     0.51884427180663 1.2833494547995 0.57639512218205 0
       1.274810920633 0.53432211347761 0.57339016099516 0
     0.65436822510449 1.7060332834124 1.2408359146087 0
      2.1578153470499 0.83876273545475 1.9726506441464 0
     0.64591817547272 2.1737027659634 1.9014609375041 0
      1.8573741545307 1.9531212808614 2.5429164407966 0
      1.6754377072654 0.70366984069607 1.2258111086742 0
      2.5857760254908 0.61256865533482 2.4860162475684 0
      -1.614598181878 1.5197691133563 1.8260197316582 0
     -2.3674684153123 1.1105774632052 2.4225183553913 0
     -1.3129794423974 2.249490020373 2.4069516029522 0
     -1.1451498542399 1.1089475736962 0.89113969629812 0
     -1.2833494547995 0.51884427180663 0.57639512218205 0
    -0.53432211347761 1.274810920633 0.57339016099516 0
     -1.7060332834124 0.65436822510449 1.2408359146087 0
    -0.83876273545475 2.1578153470499 1.9726506441464 0
     -2.1737027659634 0.64591817547272 1.9014609375041 0
     -1.9531212808614 1.8573741545307 2.5429164407966 0
    -0.70366984069607 1.6754377072654 1.2258111086742 0
    -0.61256865533482 2.5857760254908 2.4860162475684 0
     -1.5197691133563 -1.614598181878 1.8260197316582 0
     -1.1105774632052 -2.3674684153123 2.4225183553913 0
      -2.249490020373 -1.3129794423974 2.4069516029522 0
     -1.1089475736962 -1.1451498542399 0.89113969629812 0
    -0.51884427180663 -1.2833494547995 0.57639512218205 0
      -1.274810920633 -0.53432211347761 0.57339016099516 0
    -0.65436822510449 -1.7060332834124 1.2408359146087 0
     -2.1578153470499 -0.83876273545475 1.9726506441464 0
    -0.64591817547272 -2.1737027659634 1.9014609375041 0
     -1.8573741545307 -1.9531212808614 2.5429164407966 0
     -1.6754377072654 -0.70366984069607 1.2258111086742 0
     -2.5857760254908 -0.61256865533482 2.4860162475684 0
 Edges
 44
 9 11 1
 11 12 1
 12 13 1
 13 14 1
 14 7 1
 7 15 2
 15 16 2
 16 17 2
 17 18 2
 18 10 2
 10 19 3
 19 20 3
 20 21 3
 21 22 3
 22 8 3
 8 23 4
 23 24 4
 24 25 4
 25 26 4
 26 9 4
 4 27 5
 27 3 5
 3 28 6
 28 5 6
 5 29 7
 29 2 7
 2 30 8
 30 4 8
 9 31 9
 31 32 9
 32 33 9
 33 2 9
 7 34 10
 34 35 10
 35 36 10
 36 4 10
 10 37 11
 37 38 11
 38 39 11
 39 3 11
 8 40 12
 40 41 12
 41 42 12
 42 5 12
 Triangles
 148
 29 47 2 14
 47 33 2 14
 47 29 46 14
 42 48 5 14
 29 48 46 14
 48 29 5 14
 26 44 25 14
 26 31 44 14
 9 31 26 14
 23 24 45 14
 49 32 33 14
 32 51 31 14
 51 44 31 14
 32 49 51 14
 51 43 44 14
 43 51 49 14
 40 50 41 14
 43 50 45 14
 52 25 44 14
 43 52 44 14
 24 52 45 14
 52 24 25 14
 52 43 45 14
 43 53 50 14
 40 54 50 14
 45 54 23 14
 54 45 50 14
 54 8 23 14
 40 8 54 14
 42 41 53 14
 41 50 53 14
 53 48 42 14
 46 48 53 14
 47 49 33 14
 47 46 49 14
 46 43 49 14
 53 43 46 14
 30 59 4 16
 59 36 4 16
 59 30 58 16
 60 30 2 16
 33 60 2 16
 30 60 58 16
 14 56 13 16
 14 34 56 16
 7 34 14 16
 11 12 57 16
 61 35 36 16
 35 63 34 16
 63 56 34 16
 35 61 63 16
 63 55 56 16
 55 63 61 16
 31 62 32 16
 55 62 57 16
 64 13 56 16
 55 64 56 16
 12 64 57 16
 64 12 13 16
 64 55 57 16
 55 65 62 16
 31 66 62 16
 57 66 11 16
 66 57 62 16
 66 9 11 16
 31 9 66 16
 33 32 65 16
 32 62 65 16
 65 60 33 16
 58 60 65 16
 59 61 36 16
 59 58 61 16
 58 55 61 16
 65 55 58 16
 27 71 3 18
 71 39 3 18
 71 27 70 18
 72 27 4 18
 36 72 4 18
 27 72 70 18
 18 37 68 18
 10 37 18 18
 18 68 17 18
 15 16 69 18
 73 38 39 18
 38 75 37 18
 75 68 37 18
 38 73 75 18
 75 67 68 18
 67 75 73 18
 34 74 35 18
 67 74 69 18
 76 17 68 18
 67 76 68 18
 16 76 69 18
 76 16 17 18
 76 67 69 18
 67 77 74 18
 34 78 74 18
 69 78 15 18
 78 69 74 18
 78 7 15 18
 34 7 78 18
 36 35 77 18
 35 74 77 18
 71 73 39 18
 71 70 73 18
 77 72 36 18
 70 72 77 18
 70 67 73 18
 77 67 70 18
 42 83 5 20
 28 83 82 20
 83 28 5 20
 28 84 3 20
 84 39 3 20
 84 28 82 20
 80 22 21 20
 40 22 80 20
 40 8 22 20
 20 19 81 20
 41 85 42 20
 87 41 40 20
 80 87 40 20
 85 41 87 20
 79 87 80 20
 87 79 85 20
 86 37 38 20
 86 79 81 20
 21 88 80 20
 88 79 80 20
 88 20 81 20
 20 88 21 20
 79 88 81 20
 89 79 86 20
 90 37 86 20
 90 81 19 20
 81 90 86 20
 10 90 19 20
 10 37 90 20
 38 39 89 20
 86 38 89 20
 85 83 42 20
 82 83 85 20
 84 89 39 20
 84 82 89 20
 79 82 85 20
 79 89 82 20
 End

It's too long. Sorry for the inconvenience..=)

Revision history for this message
Anton Gladky (gladky-anton) said :
#10

Seems, the problem is in your .mesh file

What GMSH version do you use?

Below is the .geo code with similar figure. You can start it and try to generate the mesh from it, then create .lsm file.
It works for me.
Also you can change initial point coordinates to achieve necessary geometrical parameters.

file.geo:

Point(1) = {-20, -20, 0, 5};
Point(2) = {-20, 20, 0, 5};
Point(3) = {20, 20, 0, 5};
Point(4) = {20, -20, 0, 5};
Point(5) = {0, 0, 0, 5};
Point(6) = {-50, -50, 80, 5};
Point(7) = {-50, 50, 80, 5};
Point(8) = {50, 50, 80, 5};
Point(9) = {50, -50, 80, 5};
Point(10) = {0, 0, 80, 5};
Circle(1) = {1, 5, 4};
Circle(2) = {4, 5, 3};
Circle(3) = {3, 5, 2};
Circle(4) = {2, 5, 1};
Circle(5) = {9, 10, 8};
Circle(6) = {8, 10, 7};
Circle(7) = {7, 10, 6};
Circle(8) = {6, 10, 9};
Line(9) = {6, 1};
Line(10) = {4, 9};
Line(11) = {3, 8};
Line(12) = {2, 7};
Delete {
  Point{10, 5};
}
Line Loop(13) = {1, 10, -8, 9};
Ruled Surface(14) = {13};
Line Loop(15) = {2, 11, -5, -10};
Ruled Surface(16) = {15};
Line Loop(17) = {4, -9, -7, -12};
Ruled Surface(18) = {17};
Line Loop(19) = {6, -12, -3, 11};
Ruled Surface(20) = {19};
}

Revision history for this message
Jessica (jescarish) said :
#11

Hello sir Anton!!! Thank you very much your patience upon my problem. I did use your provided .geo code but still it gives me same error...=(. Anyways, the GMSH version I use is 2.4.2.

Revision history for this message
Anton Gladky (gladky-anton) said :
#12

Hmm, mine version is 2.3.1
Maybe GMSH-guys have done some fixes in mesh-generator?
______________________________

Anton Gladkyy

2009/11/20 Jessica <email address hidden>

> Question #77084 on ESyS-Particle changed:
> https://answers.launchpad.net/esys-particle/+question/77084
>
> Jessica posted a new comment:
> Hello sir Anton!!! Thank you very much your patience upon my problem. I
> did use your provided .geo code but still it gives me same error...=(.
> Anyways, the GMSH version I use is 2.4.2.
>
> --
> You received this question notification because you are a direct
> subscriber of the question.
>

Revision history for this message
Jessica (jescarish) said :
#13

Oh!! That answers my problem. Maybe the medit codes just not fit for the new version of GMSH. Maybe I'll just used the same version of GMSH you used. Thank you very much Sir Anton!! I deeply appreaciated every inch of your help!!! Hopefully, everyone will still welcome me for all my confusions..=)

Jessica