granular.html 26.9 KB
 mozul committed Jan 08, 2015 1 2 3 4 5 6 7 8 `````` `````` mozul committed May 26, 2015 9 `````` Granular material — pylmgc90.pre 2015.2 documentation `````` mozul committed Jan 08, 2015 10 11 12 13 14 15 16 `````` `````` mozul committed May 26, 2015 26 `````` `````` mozul committed Jan 08, 2015 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 ``````

Granular material

This part is dedicated to the generation of granular material samples. On the whole the definition of a granular sample is separeted in three steps:

1. generation of a list of boundary radii according to a known granulometry
2. positioning of grains with the generated boundary radii according to a deposit method
3. creation of the real sample of particles

In the following sections are presented what functions are available within the current version of LMGC90’s preprocessor for each of these step. Many examples using these functions are available in the examples of LMGC90.

A list of radii following a given granulometry is generated. The available functions are:

Example:

Let’s say we want to generate a sample made of particles with a random repartition between two radii, then the command is only:

Deposit

Once the list of boundary radii is obtained, the next step is to determine where to put grains in space. This is the role of the deposit functions which takes the list of radii as input and give a list of coordinates as output. There are two kinds of deposit function available: loose deposit on a lattice or dense deposit:

Dense deposit of particles are performed minimizing a potential. In our case it is the gravity potential which is minimized.

Warning: if the number of particles laid is inferior to the number of input radii, the granulometry may be changed on the output.

Warning: to avoid interpenetration between particles, a shrink based on the size of particles is used.

Example:

Using the radii variable generated in previous example, let us deposit it in 2-dimensionnal box:

lx = 150. ly = 100. [nb_laid_particles, coors] = depositInBox2D(radii,lx,ly)

Particle generation

last step is to generate the avatar corresponding to each particle.
Several simple particle types can be automatically generated:

Example:

Finally the container of avatar must be filled:

mat = material(name='TDURx', type='RIGID', density=100.) mod = model(name='rigid', type='MECAx', element='Rxx2D', dimension=2) bodies = avatars() nb_vertices = 3 for i in range(nb_laid_particles):   body = rigidPolygon(radius=radii[i], center=coors[2*i:2*i+2], nb_vertices=nb_vertices, model=mod, material=mat, color='BLUEx')   bodies.addAvatar(body)

Wall generation

Even if in most case straight plans are used to define the wall of a box, it is sometimes desired to have a rough wall like a cluster of disks/spheres. Here are the functions to create such a wall in a single line:

Example:

To complete our example let’s create three walls for the box using the three first functions just to illustrate the differences between them. First the left wall:

Then the right wall:

And finally the bottom of the box:

See this file for the complete generation script.