> Hello all, > > I ran the example of funnel.py > (revision2389:http://bazaar.launchpad.net/~yade-dev/yade/trunk/annotate/head%3A/examples/funnel.py). > The properties of spheres can be changed through > "O.bodies.append([utils.sphere(c,r,material=ElastMat(young=1e9,density=3e3,...)) > for c,r in sp])". But I don't know how to change the properties of facets in > this example. I mean the funnel's properties (young, density, Poisson, etc). > Would you help me. > thanks
Hi Yaoweiyu, read https://yade-dem.org/sphinx/user.html#defining-materials. In short, you can do O.materials.append(YourMat(...)) before creating spheres and also before creating facets (with a different YourMat(...) object). Since in each case the _last_ material is used by default, you will have spheres and facet with different material properties. Note also that pack.gtsSurface2Facets(surf), like all other body generators, takes optional **kw (keyword) arguments which are internally passed to utils.facet (see https://yade-dem.org/sphinx/yade.pack.html#yade.pack.gtsSurface2Facets), so you can say pack.gtsSurface2Facets(surf,material=...) as well, which will internally call utils.facet (https://yade-dem.org/sphinx/yade.utils.html#yade.utils.facet) passing all the **kw argument to it (including the material=...), so that they will be used for each facet constructed. The first way via O.materials.append(...) will make the material shared and accessible thgout O.materials, so it is perhaps the most straightforward. You can also assign a label to the material for user-friendliness. HTH, Václav _______________________________________________ Mailing list: https://launchpad.net/~yade-users Post to : [email protected] Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp

