Show deformations in vtkrecorder

Asked by Roshan

Hello,

I need to show the overall deformation of the structure after applying force through the ''toggle color legend visibility'' in the preview. This possibility for velocity are provided in the vtk recorder. Is it possible to show the deformation of the structure at any iter by changing the colors for small to large deformations in the preview via vtkrecorder?

Question information

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

Hello,

please be more specific, ideally providing a MWE [1]:
- what is "overall deformation" and "the deformation"? strain? deformed shape? ... ?
- what is "the structure"? spheres? other shapes? ... ?

> I need to show ... through the ''toggle color legend visibility'' in the preview

This button, as the description suggest, just toggles visibility of the legend..
Probably you want something else..

> Is it possible to show ... in the preview ...?

If the data are saved / are computable from saved data, then it is possible to show it.

cheers
Jan

[1] https://www.yade-dem.org/wiki/Howtoask

Revision history for this message
Roshan (raha101372) said :
#2

Thank you for your response

Using the following code, velocity changes can be seen at any time By changing the color of the elements (spheres) in the paraview . A range from blue to red. (linVelVec, linVelLen and angVelVec, angVelLen)

VTKRecorder(iterPeriod=500,initRun=True,fileName=(output+'-'),recorders=['spheres','velocity'])

So I'm looking for code that shows the overall deformation of a model made of spherical elements by changing the color from small to large deform in the paraview.

Using the ''all'' code, the following information was displayed in paraview, but I am looking to display the deformation graphically by changing the color from blue to red.

id, mass, clumpId, colors, mask, materialId, coordNumber, velocity, stress, force, pericell, bstresses

Please see the figure in the link [1]
[1] https://drive.google.com/file/d/1_44kyZFLnIMM2n6MsvAHe1VbwEwnVabt/view

Revision history for this message
Jan Stránský (honzik) said :
#3

Instant replay:
- what is "overall deformation" and "the deformation"? strain? deformed shape? ... ?

Please read [1], section "Please, no external links!", e.g. here, after clicking on your link, I got Access Denied...

cheers
Jan

[1] https://www.yade-dem.org/wiki/Howtoask

Revision history for this message
Roshan (raha101372) said :
#4

Thank you for your response

Refpos-pos
By changing the color

Revision history for this message
Jan Stránský (honzik) said :
#5

I am not sure it is possible with VTKRecorder, but it is possible with export.VTKExporter [3,4], something like
vtk.exportSpheres(useRef=True,what=dict(displ="b.state.displ()")) # syntax is different for older Yade versions
useRef ... saves state.refPos as particle position (instead of default state.pos)
what= ... saves displacement with VTK name "displ"

in Paraview, you can then use WarpByVector with vector=displ and scale=1 to place particles to their actual position and/or color them by displ value (magnitude?)

cheers
Jan

[3] https://yade-dem.org/doc/yade.export.html#yade.export.VTKExporter
[4] https://yade-dem.org/doc/yade.export.html#yade.export.VTKExporter.exportSpheres

Revision history for this message
Roshan (raha101372) said :
#6

Thank you very much for your patience and guidance