← Back to team overview

yade-users team mailing list archive

Re: [Question #701783]: How to assign material properties?

 

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

    Status: Needs information => Answered

Jan Stránský proposed the following answer:
Thanks, now it is clear.

In the second script, you call sp.toSimulation() without material argument.
Therefore the last O.materials.appended material is used, i.e. WallMat.
WallMat has zero density. Therefore spheres has zero mass.
Therefore they disappear, because from Newton's law a=F/m zero mass leads to infinite acceleration and then to NaN position and are not displayed.

The code
for b in O.bodies:
    ....
            b.mat=O.materials[mat1]

has no effect on already computed values (like mass), you would have to
update them "manually".

Cheers
Jan

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