Saving facets to individual .vtu files

Asked by Colin Power

Hi, I am running a simulation that imports two separate .mesh files as facets. One of the resulting facets stays static while the other one moves during the simulation to collide with a sphere packing. I want to be able to do separate post processing on each facet in Paraview but I am unable to since the VTKRecorder saves all facets as one .vtu file.

I have done a workaround by using a dummy simulation that excludes the spheres and static facet so that I can obtain the moving facet but this does not allow me to get the stress data for the facets.

Is there a way to obtain separate .vtu files for the facets?

Thank You,
Colin Power

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Klaus Thoeni
Solved:
Last query:
Last reply:
Revision history for this message
Hongyang Cheng (alex-cheng) said :
#1

Hi, Colin

You might want to take a look at the VTKExporter instead [1]. I haven't used facet before, but I did manage to export into Paraview some spheres with specified Ids. You can specify your target bodies in 'ids' in and the data you wanna extract in 'what'.
'ids' and 'what' are params of [1].

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

Regards,

Alex

Revision history for this message
Best Klaus Thoeni (klaus.thoeni) said :
#2

Hi Colin,

you can use various VTKRecorder [1] at once in your engines, e.g.:

O.engines=[
...
VTKRecorder(iterPeriod=100,initRun=True,nDo=1,mask=,fileName='facets1-',recorders=['materialId','facets']), # static facets only exported ones (nDo=1)
VTKRecorder(iterPeriod=100,initRun=True,maks=,fileName='facets2-',recorders=['materialId','facets']), # dynamic facets
VTKRecorder(iterPeriod=100,initRun=True,fileName='spheres-',recorders=['materialId','spheres','velocity']), # spheres
]

Set different groupMask four your meshes when you import them. Attention, the groupMask is used as Bitmask for determining interactions so you need to set the right number. I think default is 1, i.e. 0001. In order to have contact between you spheres and you facets you have to define somethink like groupMaks=3 (0011) for static facets and groupMaks=5 (0101) for dynamic facets. I didn't try but it should work.

An other option is to define different materials (they can have the same properties) and filter the elements in paraview according to their materialId (Edit->Find Data). Make shure you export materialId with the VTKRecorder.

HTH Klaus

[1] https://yade-dem.org/doc/yade.wrapper.html?highlight=vtkrecorder#yade.wrapper.VTKRecorder

Revision history for this message
Hongyang Cheng (alex-cheng) said :
#3

Using groupMask is easier [1], I vote for Klaus's method.

https://yade-dem.org/doc/yade.wrapper.html?highlight=vtkrecorder#yade.wrapper.VTKRecorder.mask

Alex

Revision history for this message
Colin Power (cp1372) said :
#4

Thanks Klaus Thoeni, that solved my question.