Changing the material of a particle

Asked by Christopher Stanbridge

Hi guys,

If I haven't said so already, thank you immensely for your prompt and effective responses to previous questions. This is a quick one.

I wish to load particles from a previous simulation into a new one using O.load. However, in the original simulation, the particles were made of a material with the name "aluminium" (not defined in the new simulation). As soon as the particles are imported, I wish to change their material to "steel", which is defined in the new simulation.

Can I just do this (without producing any errors)?
for b in O.bodies:
    b.mat = steel

Cheers,
Christopher Stanbridge

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Jan Stránský
Solved:
Last query:
Last reply:
Revision history for this message
Best Jan Stránský (honzik) said :
#1

Hi Christopher,

yes, you can do this. But please have in mind, that the material is only
considered for new interactions and also that particle mass and inertia is
not affected by mere change of material.
cheers
Jan

2014-11-20 14:21 GMT+01:00 Christopher Stanbridge <
<email address hidden>>:

> New question #257957 on Yade:
> https://answers.launchpad.net/yade/+question/257957
>
> Hi guys,
>
> If I haven't said so already, thank you immensely for your prompt and
> effective responses to previous questions. This is a quick one.
>
> I wish to load particles from a previous simulation into a new one using
> O.load. However, in the original simulation, the particles were made of a
> material with the name "aluminium" (not defined in the new simulation). As
> soon as the particles are imported, I wish to change their material to
> "steel", which is defined in the new simulation.
>
> Can I just do this (without producing any errors)?
> for b in O.bodies:
> b.mat = steel
>
> Cheers,
> Christopher Stanbridge
>
> --
> You received this question notification because you are a member of
> yade-users, which is an answer contact for Yade.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~yade-users
> Post to : <email address hidden>
> Unsubscribe : https://launchpad.net/~yade-users
> More help : https://help.launchpad.net/ListHelp
>

Revision history for this message
Christopher Stanbridge (cws105) said :
#2

Thanks Jan Stránský, that solved my question.