Box (cuboid) particle geometry.

Asked by Jessica Soares da Rocha

Hello everybody,

I'm trying to use this function in Yade:

geom.Box((0,0,0.442672+0.03/2),(1.01*1*0.003,0.06,0.03/2),color=(1,0,0))

But i'm having this error:

Zero (not 2) non-keyword constructor arguments required [in Serializable_ctor_kwAttrs; Serializable::pyHandleCustomCtorArgs might had changed it after your call].

I Known this function is deprecated but i need to represent an cuboid like a big particle. Does anybody help me with this???

Thank!!

Best regards.

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Jessica Soares da Rocha
Solved:
Last query:
Last reply:
Revision history for this message
Jérôme Duriez (jduriez) said :
#1

Hi,

The error says you need to specify what are the (keywords of the) first two attributes you passed to your function, in the same way you did for the last attribute, with "color = (1,0,0)", indicating the "color" keyword.

That is, YADE waits for something like
geom.Box(center=(0,0,0.442672+0.03/2),extents=(1.01*1*0.003,0.06,0.03/2),color=(1,0,0))

In the above, I'm actually just guessing random keywords for these 2 first attributes, because I could not find a meaningful doc for this function (it's embarrassing..)

If your goal is to have cuboid-shaped particle, note that there also is utils.box(), with a doc I can point towards, at https://yade-dem.org/doc/yade.utils.html?highlight=box#yade.utils.box

Revision history for this message
Jessica Soares da Rocha (jessicarocha) said :
#2

Thank Jérôme!!

I found an script with this function that solved my doubts. The function box was described:

O.bodies.append(box((0,0,0.445377+AlturaBloco/2),(1.01*1*maxElementRadus,0.06,AlturaBloco/2), material=MatBloco,color=(1,0,0)))

Best Regards!!!

Revision history for this message
Xuesongwang (mrnightmare) said :
#3

hello .I'm simulating a pile ,and I have some problems about creating a boundary condition ,can I get your cantact for questing?If it's convenient for you, please send me a email ,this is my email address,<email address hidden>.

Revision history for this message
Jan Stránský (honzik) said :
#4

if meant seriously (it looks like a spam), please open a new question.
cheers
Jan