yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #01544
Re: Simulation model
Thank you very much, Vaclav for that suggestions and realization! Sure it
will be very helpful!
Later I will add some more shapes.
I have attached the patch, which adds euclid module to the Yade. Please,
commit it.
______________________________
[ENG] Best Regards
[GER] Mit freundlichen Grüßen
[RUS] С наилучшими пожеланиями
[UKR] З найкращими побажаннями
Anton Gladkyy
2009/6/13 Václav Šmilauer <eudoxos@xxxxxxxx>
>
> > There is a new function for utils. Would like you to ask to check and
> > commit it. I know, that you dont like this style, but I was trying to
> > do it by your way with no success: difficult to get indexes of Z-axis
> > array.
>
> Hi, I found a better approach for this type of problems: separately
> define function that generates the grid within given part of space and
> separately have function that clips the resulting grid to the exact
> solid shape ("predicate", because it tells whether a point is inside or
> outside). For example:
>
> from yade import pack
> pack.regularHexa(pack.inSphere((0,0,4),2),radius=.1,gap=0)
>
> will return list of spheres of radius .1 hexagonaly arranged (without
> gaps) within spherical domain centered at 0,0,4 and with radius 2.
>
> I am sorry that it will probably break your older code, but it seems
> just so much more elegant and extensible.
>
> If you want to define new shape that you want to fill with spheres (e.g.
> an ellipsoid), you only have to define a new ellipsoid predicate and
> pass it to the pack.regularOrtho / pack.regularHexa functions. They ask
> the predicate for its bounding box, generate orthogonal/hexagonal grid
> and return sphere at points of the grid where the predicate was true
> (i.e. points inside the solid).
>
> If you want to define new packing type (e.g. orthogonal in plane but
> planes moved at every layer to make it denser; or even irregular
> packing, e.g. from a periodic packing that you have ready somewhere),
> you can use already existing predicates with the new one.
>
> For packing, we have ortho/hexa now, for predicates, there is sphere,
> axis-aligned box and non-aligned cylinder. It is demonstrated in
> scripts/test/regular-sphere-pack.py.
>
> Best, Vaclav
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~yade-users<https://launchpad.net/%7Eyade-users>
> Post to : yade-users@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~yade-users<https://launchpad.net/%7Eyade-users>
> More help : https://help.launchpad.net/ListHelp
>
Attachment:
patch.tgz
Description: GNU Zip compressed data
Follow ups
References
-
Simulation model
From: Anton Gladky, 2009-05-22
-
Re: Simulation model
From: Václav Šmilauer, 2009-05-23
-
Re: Simulation model
From: Anton Gladky, 2009-05-25
-
Re: Simulation model
From: Anton Gladky, 2009-05-25
-
Re: Simulation model
From: Václav Šmilauer, 2009-05-25
-
Re: Simulation model
From: Anton Gladky, 2009-05-26
-
Re: Simulation model
From: Václav Šmilauer, 2009-05-26
-
Re: Simulation model
From: Anton Gladky, 2009-05-26
-
Re: Simulation model
From: Anton Gladky, 2009-06-12
-
Re: Simulation model
From: Václav Šmilauer, 2009-06-13