Question #247006 on Yade changed: https://answers.launchpad.net/yade/+question/247006
Jan Stránský proposed the following answer: Hi Behzad, > What I mean about Boxes is that, we have the option of "fixed=False" which > allows it to move and since it has already density assigned, to be precise, the Body (its State) has mass (not density) asign :-) which is usually computed according to Material density and Shape volume, but you can set any value of mass if you want. > it can and it does move because of gravity acceleration. However, I think > it has only 3 DOF's. > Apart from mass, State also has intertia parameter, playing role in evaluation of rotational DOFs. All shapes in Yade has AFAIK 6 DOFs > I wanted to see if we can change facets to dynamic bodies. > Anyway, this is not important if as you guys said I can use Polyhedra for > the purpose of grains. > Facets as planar elements has zero volume and therefore would have zero mass and inertia if computed from density. However, you can set it manually to make it work: f = facet(...) f.dynamic = True f.state.mass = someMass f.state.inertia = someInertia f.state.ori = someOri # as inertia is Vector3 of principal values, you have to set initial orientation to make is consistent O.bodies.append(f) now the facet would behave dynamically > > Yes, what I need to to is import gts or stl into Yade and treat them the > same way as polyhedra. The problem with current implementation of > polyhedra is that we cannot have that much control on its shape. But I > have already certain irregular-shape grains as stl. > you can import both gts and stl files to create facets (see corresponding files yade/lib/import/STLReader.hpp and yade/py/ymport.py). It should not be very difficult to implement it also for polyhedrons. In the case you already know vertices of your polyhedron, you can have full control over its shape. Have a look as spheres and facets are constructed in utils module [1,2]. In your case it would be analogous to facet, but with more vertices The only limitation is that in current implementation the polyhedron has to be convex. > > as for jduriez; > > The reason I wanted to assign properties such as density to facets is > that (as I mentioned above for Jan) to import gts as facets and treat > them as polyhedra of clumps! So I wanted to make them Dynamic bodies. > Anyway I think it should be possible to construct your clump from facets and then assign proper mass and inertia to it. Then it could work for interactions with speheres, but there is no facet-facet interaction implemented yet :-) So your facet clumps could not interact with each other.. This paragraph is only my opinion as I have never tried this. Also in clump source file there are several comments that clump members should be spheres, but I did not study them in detail... > > > I think, according to all I can conclude that the best way to deal with > the issue is using polyhedra. To do so I will need; > > 1- find a way to import gts/stl and define it as polyhedra in Yade > 2- Define a polyhedra-sphere contact law > You have two options: 1) use polyhedrons, but only polyhedron-polyhedron interaction is implemented. For polyhedron-anyOtherShape you would have to implement a new features 2) use facets (well, firstly ask another question if it is implemented/possible to implement clump made of facets) and implement new facet-facet interactions. In any way, importing gts/stl file is not the difficult part of this task :-) cheers Jan [1] http://bazaar.launchpad.net/~yade-pkg/yade/git-trunk/view/head:/py/utils.py#L142 [2] http://bazaar.launchpad.net/~yade-pkg/yade/git-trunk/view/head:/py/utils.py#L120 -- You received this question notification because you are a member of yade-users, which is an answer contact for Yade. _______________________________________________ Mailing list: https://launchpad.net/~yade-users Post to : [email protected] Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp

