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.

_______________________________________________
Mailing list: https://launchpad.net/~yade-dev
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp

Reply via email to