Damage value from cpm model
Dear all,
I would like to obtain the scalar damage value (omega=0-1) from cpm model without using VTK recorder.
Afterthat, I wanted to colour the spheres based on damage value using scalarOnColorScale function. which requres,
yade._utils.
Parameters:
x (float) – scalar value which the function applies to.
xmin (float) – minimum value for the color scale, with a return value of (0,0,1) for x ≤xmin, i.e. blue color in RGB.
xmax (float) – maximum value, with a return value of (1,0,0) for x ≥xmax, i.e. red color in RGB.
Returns:
a Vector3 depending on the relative position of x on a [xmin;*xmax*] scale.
How can I get this x(float) parameter for this case?
Previously I have added the colour to fully debonded/damaged bonds using following code running inside pyRunner,
def colorspheres():
for i in O.interactions:
if hasattr(i.phys, 'isCohesive'):
if i.phys.isCohesive == 0:
a=i.id1
b=i.id2
O.bodies[
O.bodies[
But now I want to color the spheres based on their damage value not only the fully damaged value
Could you please help me on this?
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: