← Back to team overview

yade-users team mailing list archive

Re: [Question #703892]: how to change the properties of the material on the boundary conditions

 

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

    Status: Open => Answered

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

> I would like to ask how to change the material proprietaries only on
the boundary layers (i.e on posIds and negIds)?

basically something like that:
###
for id in ids:
    b = O.bodies[id]
    # do whatever with the body
###

"ids" might be separately "posIds", "negIds" or any other integer list. E.g 
ids = posIds + negIds # both boundaries together

"do whatever with the body" means e.g.
b.material = someOtherMaterial

With material, note:
- one material instance may be (and usually is) shared among many or all particles. So b.material.poisson=0 would change the value for all particles sharing the same material instance. Create and assign new material with desired properties in this case
- change of material has no effect on existing interactions. I.e. you should apply this change before O.step()

> I want to make the Poisson ratio there equal to zero to avoid any
deformation.

What does "avoid any deformation" mean?
Do you get "any deformation" currently?

In one meaning, using
UniaxialStrainer(..., blockDisplacements=True,blockRotations=True,...)
should do exactly this [2].
If I print
for id in posIds: print(O.bodies[id].state.displ())
only z values are non-zero.

Cheers
Jan

[2] https://yade-
dem.org/doc/yade.wrapper.html#yade.wrapper.UniaxialStrainer.blockDisplacements

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