yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #12545
Re: [Question #292672]: Creating an agglomerate from pack
Question #292672 on Yade changed:
https://answers.launchpad.net/yade/+question/292672
Status: Open => Answered
Klaus Thoeni proposed the following answer:
I don't get it but the functions replaceByClumps or appendClumped will
exactly do what the picture is showing, unless you want to perform some
sub-simulation on pack 1.
In fact, the example triax-basic-with-clumps.py shows something very
similar to what your picture is showing. I guess it's just a matter on
how you import your pack1.
You can create pack 1 in one simulation and save the packing as text
file and then use it in your other simulation to create pack 2 using
appendClumped:
Simulation 1:
# make some simulation to get pack1
...
# export packing as simple text file
export.text('pack1.spheres'))
Simulation 2:
# load pack1 maybe with some loop to create pack 2
...
pack1=ymport.text('pack1.spheres',scale=1.0,shift=(0,0,0),color=[1,0,0],material=someMat) # you can use any material here
clump,clumpspheres=O.bodies.appendClumped(pack1)
...
You could also use the saved file to create a clump template which you
can then use with replaceByClumps.
HTH
K
--
You received this question notification because your team yade-users is
an answer contact for Yade.