← Back to team overview

yade-users team mailing list archive

Re: [Question #703839]: appendClumped

 

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

    Status: Open => Answered

Jan Stránský proposed the following answer:
Hello,

please provide a MWE [1], i.e.:
- content of Clumped.txt (following M=minimal, on e or a few clumps)
- maybe also a MWE how you created the Clumped.txt file

> What ...

source code is always a good reference [2]

> What is the correct format to use appendClumped and ymport.textClumps?

for the start, use brackets correctly:
spheres=O.bodies.appendClumped(ymport.textClumps(inputfile,material=material,discretization=0))

It not a bad idea to use multiple lines instead of oneliners:
spheres = ymport.textClumps(inputfile,material=material,discretization=0)
sphereIDs = O.bodies.appendClumped(spheres)

here you can see a misconception you load clumps, and then appendClumped them..
Normally you use appendClumped for standalone (not yet clumped) particles...

> What discretization means??

[3] :-)
here it is argument passed to O.bodies.appendClumped [4]

> In yade document it tells ymport.textsClumps have default x_y_z_r
format..how to change that??

this is error in documentation, format keyword is not present.
You can check in Yade console:
help(ymport.textClumps)
or in online documentation, "format" is not present as a parameter.

> In yade document it tells

more importantly for your case, it tells that it "Load clumps-members ... insert them to the simulation"
So they are loaded and inserted in the simulation, you do not O.bodies.append the ymport.textClumps result (!)

Cheers
Jan

[1] https://www.yade-dem.org/wiki/Howtoask
[2] https://gitlab.com/yade-dev/trunk/-/blob/master/py/ymport.py#L116
[3] https://www.dictionary.com/browse/discretization
[4] https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.BodyContainer.appendClumped
[5] https://yade-dem.org/doc/yade.ymport.html#yade.ymport.textClumps

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