Sorting the spheres identification

Asked by German Varas on 2021-05-16

Hi, I would like to track the position of particles in a deposition simulation. I understand that the VTKRecorder module allows this with the "ID" option, e.g.: VTKRecorder(fileName='3d-vtk-',recorders=['spheres','id'],iterPeriod=1000)

However, when processing the data in Paraview I see that there is no apparent order, for example, based on height or radius on the particle identification. Is there any way I can set an order in the particle identification?. For example, impose that the identification is an increasing/decreasing function of the height, i.e., particle in the highest part (id=1), particle in the lowest part (id=end), and between these two limits that each particle has an ID assigned to it as a function of the height.

Having this type of identification makes it easier to see the evolution of the set of particles over time. For example, in the particular case of deposition, it allows observing if the particles at the top are deposited farther (or not) than the particles in the center of the grain pile.

-------------------------
CODE SECTION
------------------------
O.engines=[
 ForceResetter(),
 InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb()]),
 InteractionLoop(
  # handle sphere+sphere and facet+sphere collisions
  [Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom()],
  [Ip2_FrictMat_FrictMat_FrictPhys()],
  [Law2_ScGeom_FrictPhys_CundallStrack()]
 ),
 NewtonIntegrator(gravity=(0,0,-9.81),damping=0.15),
 VTKRecorder(fileName='3d-vtk-',recorders=['spheres','id'],iterPeriod=1000)
]

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
German Varas
Solved:
Last query:
Last reply:
Revision history for this message
Karol Brzezinski (kbrzezinski) said :
#1

Hi,

try to use vtkExporter[1] instead of VKTRecorder. With this, you can export objects with additional quantities, like position (or just height), velocity, color, etc.

Best wishes,
Karol

[1] https://yade-dem.org/doc/yade.export.html?highlight=vtkexporter#yade.export.VTKExporter

Revision history for this message
German Varas (gvaras) said :
#2

thank you very much Karol for your reply. I will look at the reference of the vtkExporter