yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #03642
Re: container speedups?
-
To:
yade-dev@xxxxxxxxxxxxxxxxxxx
-
From:
"Sergei D." <sj2001@xxxxxxxxx>
-
Date:
Tue, 23 Mar 2010 22:54:15 +0300
-
In-reply-to:
<1269372270.4554.119.camel@flux>
-
User-agent:
Mozilla/5.0 (X11; U; Linux x86_64; ru; rv:1.9.1.8) Gecko/20100228 SUSE/3.0.3-3.1 Thunderbird/3.0.3
Thanks for this, Vaclav!
But if I have different spheres radii (so, different material properties
for each sphere) what I should do?
>> It is the script examples/STLImporterTest.py, r2099.
>> Just uncomment line 21 and, may be, line 58 for saving results.
>> To 50k iterations (as in the presented simulation) needed 14h30m...
> Reading the script: are you aware that lines 28-30:
>> s=utils.sphere([x,y,z],sphereRadius,material=sphereMat)
>> p=utils.getViscoelasticFromSpheresInteraction(s.state['mass'],tc,en,es) s.mat['kn'],s.mat['cn'],s.mat['ks'],s.mat['cs']=p['kn'],p['cn'],p['ks'],p['cs']
> uselessly compute viscoelastic properties of material for each sphere
> (even if their parameters are the same) and moreover modify shared
> material s.mat over and over with the same values...
> You could do something like this instead:
>
> sphereRadius=0.05
> nbSpheres=Vector3(50,50,50)
>
> params=utils.getViscoelasticFromSpheresInteraction(sphereMat.density*(4/3.)*pi*sphereRadius**3,tc,en,es)
> sphereMat=O.materials.append(SimpleViscoelasticMat(density=Density,frictionAngle=frictionAngle,**params)) # shared material, since added to O.materials
>
> from yade import pack
> spheres=pack.regularOrtho(
> predicate=pack.inAlignedBox(Vector3(0,0,0),nbSpheres*2.2*sphereRadius),
> radius=sphereRadius,
> gap=0.2*sphereRadius,
> material=sphereMat
> )
> O.bodies.append(spheres)
>
--
Best regards,
Sergei D.
Follow ups
References