← Back to team overview

yade-users team mailing list archive

Re: [Question #676176]: Generate a sample with a porosity gradient; change sphere material in periodic simulation

 

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

    Status: Open => Answered

Bruno Chareyre proposed the following answer:
Hi Nolan,

> is there any way to edit the material of spheres which have already
been added to the simulation?

"O.bodies[n].material =.."  should do the trick. :)

If you want a different material for each body you need to instantiate a
new one explicitely, else they share the same:

O.bodies[n].material = FrictMat()

or directly:

O.bodies.append([sphere(center=sph[0],radius=sph[1],
material=BubbleMat(young=f(sph[0]) ))])

The part of the question related to periodicity is less clear to me.

Bruno

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