granular.html 26.9 KB
Newer Older
1
2
3
4
5
6
7
8
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
mozul's avatar
mozul committed
9
    <title>Granular material &mdash; pylmgc90.pre 2015.2 documentation</title>
10
11
12
13
14
15
16
    
    <link rel="stylesheet" href="_static/default.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    './',
mozul's avatar
mozul committed
17
        VERSION:     '2015.2',
18
19
20
21
22
23
24
25
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="_static/jquery.js"></script>
    <script type="text/javascript" src="_static/underscore.js"></script>
    <script type="text/javascript" src="_static/doctools.js"></script>
mozul's avatar
mozul committed
26
    <link rel="top" title="pylmgc90.pre 2015.2 documentation" href="index.html" />
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
    <link rel="next" title="Masonry" href="masonry.html" />
    <link rel="prev" title="Managing POSTPRO" href="post.html" /> 
  </head>
  <body>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="masonry.html" title="Masonry"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="post.html" title="Managing POSTPRO"
             accesskey="P">previous</a> |</li>
mozul's avatar
mozul committed
46
        <li><a href="index.html">pylmgc90.pre 2015.2 documentation</a> &raquo;</li> 
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="granular-material">
<h1>Granular material<a class="headerlink" href="#granular-material" title="Permalink to this headline"></a></h1>
<p>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:</p>
<ol class="arabic simple">
<li>generation of a list of boundary radii according to a known granulometry</li>
<li>positioning of grains with the generated boundary radii according to a deposit method</li>
<li>creation of the real sample of particles</li>
</ol>
<p>In the following sections are presented what functions are available within the current version of LMGC90&#8217;s preprocessor
for each of these step. Many examples using these functions are
available in the examples of <em>LMGC90</em>.</p>
<div class="section" id="list-of-radii">
<h2>List of radii<a class="headerlink" href="#list-of-radii" title="Permalink to this headline"></a></h2>
<p>A list of radii following a given granulometry is generated.
The available functions are:</p>
<ul class="simple">
<li><a class="reference internal" href="classes.html#pylmgc90.pre_lmgc.granulo_Monodisperse" title="pylmgc90.pre_lmgc.granulo_Monodisperse"><tt class="xref py py-func docutils literal"><span class="pre">granulo_Monodisperse()</span></tt></a></li>
<li><a class="reference internal" href="classes.html#pylmgc90.pre_lmgc.granulo_Random" title="pylmgc90.pre_lmgc.granulo_Random"><tt class="xref py py-func docutils literal"><span class="pre">granulo_Random()</span></tt></a></li>
<li><a class="reference internal" href="classes.html#pylmgc90.pre_lmgc.granulo_Uniform" title="pylmgc90.pre_lmgc.granulo_Uniform"><tt class="xref py py-func docutils literal"><span class="pre">granulo_Uniform()</span></tt></a></li>
<li><a class="reference internal" href="classes.html#pylmgc90.pre_lmgc.granulo_TwoSizesNumber" title="pylmgc90.pre_lmgc.granulo_TwoSizesNumber"><tt class="xref py py-func docutils literal"><span class="pre">granulo_TwoSizesNumber()</span></tt></a></li>
<li><a class="reference internal" href="classes.html#pylmgc90.pre_lmgc.granulo_TwoSizesVolume" title="pylmgc90.pre_lmgc.granulo_TwoSizesVolume"><tt class="xref py py-func docutils literal"><span class="pre">granulo_TwoSizesVolume()</span></tt></a></li>
<li><a class="reference internal" href="classes.html#pylmgc90.pre_lmgc.granulo_ReadFromFile" title="pylmgc90.pre_lmgc.granulo_ReadFromFile"><tt class="xref py py-func docutils literal"><span class="pre">granulo_ReadFromFile()</span></tt></a></li>
</ul>
<p><strong>Example:</strong></p>
<p>Let&#8217;s say we want to generate a sample made of particles with a random repartition
between two radii, then the command is only:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">nb_particles</span> <span class="o">=</span> <span class="mi">10000</span>
<span class="n">radius_min</span>   <span class="o">=</span> <span class="mf">1.0</span>
<span class="n">radius_max</span>   <span class="o">=</span> <span class="mf">2.5</span>
<span class="n">radii</span> <span class="o">=</span> <span class="n">granulo_Random</span><span class="p">(</span><span class="n">nb_particles</span><span class="p">,</span> <span class="n">radius_min</span><span class="p">,</span> <span class="n">radius_max</span><span class="p">)</span>
</pre></div>
</div>
</div>
<div class="section" id="deposit">
<h2>Deposit<a class="headerlink" href="#deposit" title="Permalink to this headline"></a></h2>
<p>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:</p>
<ul>
<li><p class="first">2D</p>
<blockquote>
<div><ul class="simple">
<li><a class="reference internal" href="classes.html#pylmgc90.pre_lmgc.squareLattice2D" title="pylmgc90.pre_lmgc.squareLattice2D"><tt class="xref py py-func docutils literal"><span class="pre">squareLattice2D()</span></tt></a></li>
<li><a class="reference internal" href="classes.html#pylmgc90.pre_lmgc.triangularLattice2D" title="pylmgc90.pre_lmgc.triangularLattice2D"><tt class="xref py py-func docutils literal"><span class="pre">triangularLattice2D()</span></tt></a></li>
<li><a class="reference internal" href="classes.html#pylmgc90.pre_lmgc.depositInBox2D" title="pylmgc90.pre_lmgc.depositInBox2D"><tt class="xref py py-func docutils literal"><span class="pre">depositInBox2D()</span></tt></a></li>
<li><a class="reference internal" href="classes.html#pylmgc90.pre_lmgc.depositInDisk2D" title="pylmgc90.pre_lmgc.depositInDisk2D"><tt class="xref py py-func docutils literal"><span class="pre">depositInDisk2D()</span></tt></a></li>
<li><a class="reference internal" href="classes.html#pylmgc90.pre_lmgc.depositInCouette2D" title="pylmgc90.pre_lmgc.depositInCouette2D"><tt class="xref py py-func docutils literal"><span class="pre">depositInCouette2D()</span></tt></a></li>
<li><a class="reference internal" href="classes.html#pylmgc90.pre_lmgc.depositInDrum2D" title="pylmgc90.pre_lmgc.depositInDrum2D"><tt class="xref py py-func docutils literal"><span class="pre">depositInDrum2D()</span></tt></a></li>
</ul>
</div></blockquote>
</li>
</ul>
<blockquote>
<div><ul class="simple">
<li>3D<ul>
<li><a class="reference internal" href="classes.html#pylmgc90.pre_lmgc.cubicLattice3D" title="pylmgc90.pre_lmgc.cubicLattice3D"><tt class="xref py py-func docutils literal"><span class="pre">cubicLattice3D()</span></tt></a></li>
<li><a class="reference internal" href="classes.html#pylmgc90.pre_lmgc.depositInBox3D" title="pylmgc90.pre_lmgc.depositInBox3D"><tt class="xref py py-func docutils literal"><span class="pre">depositInBox3D()</span></tt></a></li>
<li><a class="reference internal" href="classes.html#pylmgc90.pre_lmgc.depositInCylinder3D" title="pylmgc90.pre_lmgc.depositInCylinder3D"><tt class="xref py py-func docutils literal"><span class="pre">depositInCylinder3D()</span></tt></a></li>
<li><a class="reference internal" href="classes.html#pylmgc90.pre_lmgc.depositInSphere3D" title="pylmgc90.pre_lmgc.depositInSphere3D"><tt class="xref py py-func docutils literal"><span class="pre">depositInSphere3D()</span></tt></a></li>
</ul>
</li>
</ul>
</div></blockquote>
<p>Dense deposit of particles are performed minimizing a potential. In
our case it is the gravity potential which is minimized.</p>
<p><strong>Warning:</strong> if the number of particles laid is inferior to the number of input radii, the
granulometry may be changed on the output.</p>
<p><strong>Warning:</strong> to avoid interpenetration between particles, a shrink based on the size of particles is used.</p>
<p><strong>Example:</strong></p>
<p>Using the <tt class="docutils literal"><span class="pre">radii</span></tt> variable generated in previous example, let us deposit it in 2-dimensionnal box:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">lx</span> <span class="o">=</span> <span class="mf">150.</span>
<span class="n">ly</span> <span class="o">=</span> <span class="mf">100.</span>
<span class="p">[</span><span class="n">nb_laid_particles</span><span class="p">,</span> <span class="n">coors</span><span class="p">]</span> <span class="o">=</span> <span class="n">depositInBox2D</span><span class="p">(</span><span class="n">radii</span><span class="p">,</span><span class="n">lx</span><span class="p">,</span><span class="n">ly</span><span class="p">)</span>
</pre></div>
</div>
</div>
<div class="section" id="particle-generation">
<h2>Particle generation<a class="headerlink" href="#particle-generation" title="Permalink to this headline"></a></h2>
<div class="line-block">
<div class="line">last step is to generate the <a class="reference internal" href="classes.html#pylmgc90.pre_lmgc.avatar" title="pylmgc90.pre_lmgc.avatar"><tt class="xref py py-class docutils literal"><span class="pre">avatar</span></tt></a> corresponding to each particle.</div>
<div class="line">Several simple particle types can be automatically generated:</div>
</div>
<ul class="simple">
<li>2D:<ul>
<li><a class="reference internal" href="classes.html#pylmgc90.pre_lmgc.rigidDisk" title="pylmgc90.pre_lmgc.rigidDisk"><tt class="xref py py-func docutils literal"><span class="pre">rigidDisk()</span></tt></a></li>
<li><a class="reference internal" href="classes.html#pylmgc90.pre_lmgc.rigidCluster" title="pylmgc90.pre_lmgc.rigidCluster"><tt class="xref py py-func docutils literal"><span class="pre">rigidCluster()</span></tt></a></li>
<li><a class="reference internal" href="classes.html#pylmgc90.pre_lmgc.rigidDiscreteDisk" title="pylmgc90.pre_lmgc.rigidDiscreteDisk"><tt class="xref py py-func docutils literal"><span class="pre">rigidDiscreteDisk()</span></tt></a></li>
<li><a class="reference internal" href="classes.html#pylmgc90.pre_lmgc.rigidJonc" title="pylmgc90.pre_lmgc.rigidJonc"><tt class="xref py py-func docutils literal"><span class="pre">rigidJonc()</span></tt></a></li>
<li><a class="reference internal" href="classes.html#pylmgc90.pre_lmgc.rigidPolygon" title="pylmgc90.pre_lmgc.rigidPolygon"><tt class="xref py py-func docutils literal"><span class="pre">rigidPolygon()</span></tt></a></li>
<li><a class="reference internal" href="classes.html#pylmgc90.pre_lmgc.rigidOvoidPolygon" title="pylmgc90.pre_lmgc.rigidOvoidPolygon"><tt class="xref py py-func docutils literal"><span class="pre">rigidOvoidPolygon()</span></tt></a></li>
<li><a class="reference internal" href="classes.html#pylmgc90.pre_lmgc.deformableParticle2D" title="pylmgc90.pre_lmgc.deformableParticle2D"><tt class="xref py py-func docutils literal"><span class="pre">deformableParticle2D()</span></tt></a></li>
</ul>
</li>
<li>3D<ul>
<li><a class="reference internal" href="classes.html#pylmgc90.pre_lmgc.rigidSphere" title="pylmgc90.pre_lmgc.rigidSphere"><tt class="xref py py-func docutils literal"><span class="pre">rigidSphere()</span></tt></a></li>
<li><a class="reference internal" href="classes.html#pylmgc90.pre_lmgc.rigidPlan" title="pylmgc90.pre_lmgc.rigidPlan"><tt class="xref py py-func docutils literal"><span class="pre">rigidPlan()</span></tt></a></li>
<li><a class="reference internal" href="classes.html#pylmgc90.pre_lmgc.rigidCylinder" title="pylmgc90.pre_lmgc.rigidCylinder"><tt class="xref py py-func docutils literal"><span class="pre">rigidCylinder()</span></tt></a></li>
<li><a class="reference internal" href="classes.html#pylmgc90.pre_lmgc.rigidPolyhedron" title="pylmgc90.pre_lmgc.rigidPolyhedron"><tt class="xref py py-func docutils literal"><span class="pre">rigidPolyhedron()</span></tt></a></li>
</ul>
</li>
</ul>
<p><strong>Example:</strong></p>
<a class="reference internal image-reference" href="_images/deposit.png"><img alt="deposit of triangles" class="align-right" src="_images/deposit.png" style="height: 150px;" /></a>
<p>Finally the container of avatar must be filled:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">mat</span> <span class="o">=</span> <span class="n">material</span><span class="p">(</span><span class="n">name</span><span class="o">=</span><span class="s">&#39;TDURx&#39;</span><span class="p">,</span> <span class="nb">type</span><span class="o">=</span><span class="s">&#39;RIGID&#39;</span><span class="p">,</span> <span class="n">density</span><span class="o">=</span><span class="mf">100.</span><span class="p">)</span>
<span class="n">mod</span> <span class="o">=</span> <span class="n">model</span><span class="p">(</span><span class="n">name</span><span class="o">=</span><span class="s">&#39;rigid&#39;</span><span class="p">,</span> <span class="nb">type</span><span class="o">=</span><span class="s">&#39;MECAx&#39;</span><span class="p">,</span> <span class="n">element</span><span class="o">=</span><span class="s">&#39;Rxx2D&#39;</span><span class="p">,</span> <span class="n">dimension</span><span class="o">=</span><span class="mi">2</span><span class="p">)</span>
<span class="n">bodies</span> <span class="o">=</span> <span class="n">avatars</span><span class="p">()</span>
<span class="n">nb_vertices</span> <span class="o">=</span> <span class="mi">3</span>
<span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="n">nb_laid_particles</span><span class="p">):</span>
  <span class="n">body</span> <span class="o">=</span> <span class="n">rigidPolygon</span><span class="p">(</span><span class="n">radius</span><span class="o">=</span><span class="n">radii</span><span class="p">[</span><span class="n">i</span><span class="p">],</span> <span class="n">center</span><span class="o">=</span><span class="n">coors</span><span class="p">[</span><span class="mi">2</span><span class="o">*</span><span class="n">i</span><span class="p">:</span><span class="mi">2</span><span class="o">*</span><span class="n">i</span><span class="o">+</span><span class="mi">2</span><span class="p">],</span> <span class="n">nb_vertices</span><span class="o">=</span><span class="n">nb_vertices</span><span class="p">,</span> <span class="n">model</span><span class="o">=</span><span class="n">mod</span><span class="p">,</span> <span class="n">material</span><span class="o">=</span><span class="n">mat</span><span class="p">,</span> <span class="n">color</span><span class="o">=</span><span class="s">&#39;BLUEx&#39;</span><span class="p">)</span>
  <span class="n">bodies</span><span class="o">.</span><span class="n">addAvatar</span><span class="p">(</span><span class="n">body</span><span class="p">)</span>
</pre></div>
</div>
</div>
<div class="section" id="wall-generation">
<h2>Wall generation<a class="headerlink" href="#wall-generation" title="Permalink to this headline"></a></h2>
<p>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:</p>
<ul class="simple">
<li>2D<ul>
<li><a class="reference internal" href="classes.html#pylmgc90.pre_lmgc.roughWall" title="pylmgc90.pre_lmgc.roughWall"><tt class="xref py py-func docutils literal"><span class="pre">roughWall()</span></tt></a></li>
<li><a class="reference internal" href="classes.html#pylmgc90.pre_lmgc.fineWall" title="pylmgc90.pre_lmgc.fineWall"><tt class="xref py py-func docutils literal"><span class="pre">fineWall()</span></tt></a></li>
<li><a class="reference internal" href="classes.html#pylmgc90.pre_lmgc.smoothWall" title="pylmgc90.pre_lmgc.smoothWall"><tt class="xref py py-func docutils literal"><span class="pre">smoothWall()</span></tt></a></li>
<li><a class="reference internal" href="classes.html#pylmgc90.pre_lmgc.granuloRoughWall" title="pylmgc90.pre_lmgc.granuloRoughWall"><tt class="xref py py-func docutils literal"><span class="pre">granuloRoughWall()</span></tt></a></li>
</ul>
</li>
<li>3D<ul>
<li><a class="reference internal" href="classes.html#pylmgc90.pre_lmgc.roughWall3D" title="pylmgc90.pre_lmgc.roughWall3D"><tt class="xref py py-func docutils literal"><span class="pre">roughWall3D()</span></tt></a></li>
<li><a class="reference internal" href="classes.html#pylmgc90.pre_lmgc.granuloRoughWall3D" title="pylmgc90.pre_lmgc.granuloRoughWall3D"><tt class="xref py py-func docutils literal"><span class="pre">granuloRoughWall3D()</span></tt></a></li>
</ul>
</li>
</ul>
<p><strong>Example:</strong></p>
<a class="reference internal image-reference" href="_images/deposit_with_l.png"><img alt="deposit of triangles with left wall" class="align-right" src="_images/deposit_with_l.png" style="height: 150px;" /></a>
<p>To complete our example let&#8217;s create three walls for the box using the three first functions
just to illustrate the differences between them. First the left wall:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">max_radius</span> <span class="o">=</span> <span class="nb">max</span><span class="p">(</span><span class="n">radii</span><span class="p">)</span>
<span class="n">mut</span>    <span class="o">=</span> <span class="n">material</span><span class="p">(</span><span class="n">name</span><span class="o">=</span><span class="s">&#39;TDURx&#39;</span><span class="p">,</span> <span class="nb">type</span><span class="o">=</span><span class="s">&#39;RIGID&#39;</span><span class="p">,</span> <span class="n">density</span><span class="o">=</span><span class="mf">1000.</span><span class="p">)</span>
<span class="n">left</span>   <span class="o">=</span> <span class="n">roughWall</span><span class="p">(</span>  <span class="n">center</span><span class="o">=</span><span class="p">[</span><span class="o">-</span><span class="n">radius_max</span><span class="p">,</span> <span class="mf">0.5</span><span class="o">*</span><span class="n">ly</span><span class="p">],</span> <span class="n">theta</span><span class="o">=-</span><span class="mf">0.5</span><span class="o">*</span><span class="n">math</span><span class="o">.</span><span class="n">pi</span><span class="p">,</span> <span class="n">l</span><span class="o">=</span><span class="n">ly</span> <span class="o">+</span> <span class="mf">2.</span><span class="o">*</span><span class="n">radius_max</span><span class="p">,</span>
                     <span class="n">r</span><span class="o">=</span><span class="n">radius_max</span><span class="p">,</span> <span class="n">model</span><span class="o">=</span><span class="n">mod</span><span class="p">,</span> <span class="n">material</span><span class="o">=</span><span class="n">mut</span><span class="p">,</span> <span class="n">color</span><span class="o">=</span><span class="s">&#39;WALLx&#39;</span><span class="p">)</span>
<span class="n">left</span><span class="o">.</span><span class="n">imposeDrivenDof</span><span class="p">(</span><span class="n">component</span><span class="o">=</span><span class="p">[</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">],</span> <span class="n">dofty</span><span class="o">=</span><span class="s">&#39;vlocy&#39;</span><span class="p">)</span>
<span class="n">bodies</span><span class="o">.</span><span class="n">addAvatar</span><span class="p">(</span><span class="n">left</span><span class="p">)</span>
</pre></div>
</div>
<a class="reference internal image-reference" href="_images/deposit_with_lr.png"><img alt="deposit of triangles with left and right walls" class="align-right" src="_images/deposit_with_lr.png" style="height: 150px;" /></a>
<p>Then the right wall:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">right</span>  <span class="o">=</span> <span class="n">fineWall</span><span class="p">(</span>   <span class="n">center</span><span class="o">=</span><span class="p">[</span><span class="n">lx</span><span class="o">+</span><span class="n">radius_max</span><span class="p">,</span> <span class="mf">0.5</span><span class="o">*</span><span class="n">ly</span><span class="p">],</span> <span class="n">theta</span><span class="o">=</span> <span class="mf">0.5</span><span class="o">*</span><span class="n">math</span><span class="o">.</span><span class="n">pi</span><span class="p">,</span> <span class="n">l</span><span class="o">=</span><span class="n">ly</span> <span class="o">+</span> <span class="mf">2.</span><span class="o">*</span><span class="n">radius_max</span><span class="p">,</span>
                     <span class="n">r</span><span class="o">=</span><span class="n">radius_max</span><span class="p">,</span> <span class="n">model</span><span class="o">=</span><span class="n">mod</span><span class="p">,</span> <span class="n">material</span><span class="o">=</span><span class="n">mut</span><span class="p">,</span> <span class="n">color</span><span class="o">=</span><span class="s">&#39;WALLx&#39;</span><span class="p">)</span>
<span class="n">right</span><span class="o">.</span><span class="n">imposeDrivenDof</span><span class="p">(</span><span class="n">component</span><span class="o">=</span><span class="p">[</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">],</span> <span class="n">dofty</span><span class="o">=</span><span class="s">&#39;vlocy&#39;</span><span class="p">)</span>
<span class="n">bodies</span><span class="o">.</span><span class="n">addAvatar</span><span class="p">(</span><span class="n">right</span><span class="p">)</span>
</pre></div>
</div>
<a class="reference internal image-reference" href="_images/deposit_with_lrb.png"><img alt="deposit of triangles with left, right and bottom walls" class="align-right" src="_images/deposit_with_lrb.png" style="height: 150px;" /></a>
<p>And finally the bottom of the box:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">bottom</span> <span class="o">=</span> <span class="n">smoothWall</span><span class="p">(</span> <span class="n">center</span><span class="o">=</span><span class="p">[</span><span class="mf">0.5</span><span class="o">*</span><span class="n">lx</span><span class="p">,</span> <span class="o">-</span><span class="n">radius_max</span><span class="p">],</span> <span class="n">theta</span><span class="o">=</span><span class="mf">0.</span><span class="p">,</span> <span class="n">l</span><span class="o">=</span><span class="n">lx</span> <span class="o">+</span> <span class="mf">2.</span><span class="o">*</span><span class="n">radius_max</span><span class="p">,</span>
                     <span class="n">h</span><span class="o">=</span><span class="n">radius_max</span><span class="p">,</span> <span class="n">nb_polyg</span><span class="o">=</span><span class="mi">12</span><span class="p">,</span> <span class="n">model</span><span class="o">=</span><span class="n">mod</span><span class="p">,</span> <span class="n">material</span><span class="o">=</span><span class="n">mut</span><span class="p">,</span> <span class="n">color</span><span class="o">=</span><span class="s">&#39;WALLx&#39;</span><span class="p">)</span>
<span class="n">bottom</span><span class="o">.</span><span class="n">imposeDrivenDof</span><span class="p">(</span><span class="n">component</span><span class="o">=</span><span class="p">[</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">],</span> <span class="n">dofty</span><span class="o">=</span><span class="s">&#39;vlocy&#39;</span><span class="p">)</span>
<span class="n">bodies</span><span class="o">.</span><span class="n">addAvatar</span><span class="p">(</span><span class="n">bottom</span><span class="p">)</span>
</pre></div>
</div>
<p>See <a class="reference download internal" href="_downloads/granular.py"><tt class="xref download docutils literal"><span class="pre">this</span> <span class="pre">file</span></tt></a> for the complete generation script.</p>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
  <h3><a href="index.html">Table Of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">Granular material</a><ul>
<li><a class="reference internal" href="#list-of-radii">List of radii</a></li>
<li><a class="reference internal" href="#deposit">Deposit</a></li>
<li><a class="reference internal" href="#particle-generation">Particle generation</a></li>
<li><a class="reference internal" href="#wall-generation">Wall generation</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="post.html"
                        title="previous chapter">Managing POSTPRO</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="masonry.html"
                        title="next chapter">Masonry</a></p>
  <h3>This Page</h3>
  <ul class="this-page-menu">
    <li><a href="_sources/granular.txt"
           rel="nofollow">Show Source</a></li>
  </ul>
<div id="searchbox" style="display: none">
  <h3>Quick search</h3>
    <form class="search" action="search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    <p class="searchtip" style="font-size: 90%">
    Enter search terms or a module, class or function name.
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="masonry.html" title="Masonry"
             >next</a> |</li>
        <li class="right" >
          <a href="post.html" title="Managing POSTPRO"
             >previous</a> |</li>
mozul's avatar
mozul committed
284
        <li><a href="index.html">pylmgc90.pre 2015.2 documentation</a> &raquo;</li> 
285
286
287
      </ul>
    </div>
    <div class="footer">
mozul's avatar
mozul committed
288
        &copy; Copyright 2015, CNRS.
289
290
291
292
      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
    </div>
  </body>
</html>