Visualization of water phase with particles at the same time in Paraview

Asked by Soheil Safari

Hello everyone;

Hope you are doing well.

I am using the PFV model for modeling the saturated porous media during compaction.

I could extract the particle positions and radii with :
#
O.engines += [PyRunner(command="exportSpheres()", iterPeriod=5000, initRun=True)]
def exportSpheres():
    i = O.iter
    fName = f"yade-spheres-{i:06d}.txt"
    export.text(fName)
#

Also I could extract the flow properties by:

O.engines=O.engines+[PyRunner(iterPeriod=5000,command='flow.saveVtk()')]

But it is shown like a volume colored by pressure, velocity and ... . I need the fluid phase to be shown like water.

Is there any opportunity to extract the water phase in yade to visualize it in paraview at the same time with particles? How?

I am grateful for any hints or insights into this issue.

Many thanks in advance.

Best regards,
Soheil

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Robert Caulk
Solved:
Last query:
Last reply:
Revision history for this message
Robert Caulk (rcaulk) said :
#1

Hello,

>But it is shown like a volume colored by pressure, velocity and ... . I need the fluid phase to be shown like water.

That is all the information PFV computes, it is a fluid pressure field discretized one point per tetrahedron. You probably should spend some time with [1].

> Is there any opportunity to extract the water phase in yade to visualize it in paraview at the same time with particles? How?

Yes you can, just import both vtk series in the same paraview window.

Cheers,

Robert

[1]https://link.springer.com/article/10.1007/s11242-011-9915-6

Revision history for this message
Robert Caulk (rcaulk) said :
#2

Btw exporting spheres is much better with vtkrecorder [1]

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

Revision history for this message
Soheil Safari (soheilsafari) said (last edit ):
#3

Dear Robert,

Thank you very much for your kind reply and useful links.

I read this interesting article before.

I could import both files in a paraview but I can not see the particles. Because the pressure volume is opaque. When I decreased the opaque ratio it faded.

I want to post-process the results and obtain something like the videos in supplementary material of this article. (Although it is coupled with LBM)

https://www.sciencedirect.com/science/article/pii/S030917082030097X

or the images in another article:

https://link.springer.com/article/10.1007/s11440-017-0601-x

Best regards,
Soheil

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

> Dear Bruno

now it is Robert :-)

Revision history for this message
Soheil Safari (soheilsafari) said :
#5

Dear Jan,

Thank you so much for your comment :)

I edited my mistake.

Revision history for this message
Robert Caulk (rcaulk) said :
#6

Play with some of the slicing and cutting features in paraview (upper left).

Also, you can give one vtk series opacity while keeping the other without any opacity.

Paraview certainly lets you do it- but you need to play with it to discover functionality (click the buttons in the upper left).

Don't be afraid to break stuff, you can alwayas reload the file.

Revision history for this message
Soheil Safari (soheilsafari) said :
#7

Dear Robert;

Thank you very much for your valuable time and detailed explanation.

So in FlowEngine (saturated media), I just can have the fluid pressure field not fluid phase, is it correct?

Because when I used “flow.savePhaseVtk()” :

O.engines=O.engines+[PyRunner(iterPeriod=5000,command='flow.savePhaseVtk()')]

I faced this error:

'FlowEngine' object has no attribute 'savePhaseVtk'

Many thanks in advance.

Best regards,
Soheil

Revision history for this message
Best Robert Caulk (rcaulk) said :
#8

It is not clear what you are looking for. The saveVTK() is how you save the pressure field in FlowEngine. If you want to overlay the solid phase on top of the domain, then add the spheres with vtkExporter as I mention above. There are no other phases to save.

savePhaseVTK sounds like something from TwoPhaseFlowEngine, where it computes both gas and liquid phases in the pressure field. That is not FlowEngine, so it shouldn't work in FlowEngine.

Revision history for this message
Soheil Safari (soheilsafari) said :
#9

Dear Robert,

Thank you very much for your kind reply and valuable favor.

Many thanks for your description. I will try it.

Cheers,
Soheil

Revision history for this message
Soheil Safari (soheilsafari) said :
#10

Thanks Robert Caulk, that solved my question.