← Back to team overview

yade-users team mailing list archive

Re: [Question #686318]: random dense pack with clumps

 

Question #686318 on Yade changed:
https://answers.launchpad.net/yade/+question/686318

    Status: Open => Answered

Jan Stránský proposed the following answer:
There are several solutions, e.g.:

1) you or somebody else will fix the bug in Yade source code (unlikely according to your reaction and the time the issue is there unfixed)
2) use another method than using replaceByClumps directly, e.g. rewriting it to python
3) reorder the script not to use JCFpmMat before you need it

I think 3) is the way to go. In the script, you actually do not need the JCFpmMat (which is the source of the error in replaceByClumps) at all, so you can define / set it to bodies just before O.step() / O.run() / clicking play button.
something like:
###
... # no JCFpmMat yet!
Esferas=pack.randomDensePack(Vol4,radius=r,rRelFuzz=0)
O.bodies.append(Esferas)
...
O.bodies.replaceByClumps(templates,[.5,.3,.1,.1])
mat1 = JCFpmMat()
...
O.materials.append(mat1)
...
... # the end of your script
for b in O.bodies:
   b.mat = mat1
###

cheers
Jan

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.