Post-processing: How to match the timestamps for OpenFOAM and LIGGGHTS results in Paraview?

Submitted by yesaswi92 on Sat, 01/27/2018 - 03:49

Hello,

I am printing results from OpenFOAM and LIGGGHTS at the same frequency, so that when I view them in paraview, I can import the CFD files (results.foam) and DEM files (dump*.liggghts_run), and animate both the flow and particles together.

For example, I have 500 time-states printed from OpenFOAM and 500 dump files from LIGGGHTS. I use
lpp dump*.liggghts_run
cd ../../CFD
paraFoam
and import, liggghts_run*.vtk bundle, in addition to CFD.OpenFOAM into paraview.

The issue I am facing is, instead of 500 timestamps, I'm getting 1000 timestamps in paraview, 500 each for flow and particles. When I saw information tab, I observed that the DEM files don't have a time at all but the OpenFOAM files have time in seconds. I think this is the issue. I put two images for reference.

So, I there anyway, I can get both the files to have same timesteps.

Thank You.

Regards,
Yesaswi.

AttachmentSize
Image icon 01 - CFD Data193.4 KB
Image icon 02 - DEM Data173.31 KB
alice's picture

alice | Mon, 01/29/2018 - 10:41

Hi Yesaswi,

for syncinc the CFD (or CFD-DEM) output and the DEM output you can apply the filter TemporalShiftScale to the DEM data. Just use an according scaling factor (i.e. 0.1 if you wrote 10 files personcond, 0.01 for 100 etc.).

By the way: CFDEMcoupling also saves the lagrangian data (only position, velocity and radius) of the particles as part of the CFD-data. Use the extractBlock filter for etracting either lagrangian or eulerian data (of course the filter can be applied twice for extracting both flow-data and particle information from the same data-block).

Best,

Alice

yesaswi92 | Mon, 01/29/2018 - 21:16

Hi Alice,

Thank you for the reply. I tried TemporalShiftScale filted in paraview and now the results are better. But due to machine or rounding-off errors, the cfd timesteps and the DEM stimesteps are not exactly aligning with each other. For example, if there is a time state of t=0.003sec, the scaled DEM time state is coming to be, t=0.00299999998sec. Apart from this, there is nothing wrong with this method. Thank you for suggesting it.

I also tried extractBlock filter in paraview and it is much more convinient. But sometimes, paraview is unable to identify the particle cloud at t=0, and therefore, the extracted block becomes empty. I think this is just a normal issue and I can manage it somehow.

Anyways, thanks again for the suggestion.

alice's picture

alice | Tue, 01/30/2018 - 13:59

Hi yesaswi92,

glad this works for you! Since the particles do not really exist one the CFD side for time step 0 they cannot  be displayed and Paraview unfortunately has an issue with it. Unfortunately there is no real work around here, but generally displaying the coupled results works quite fine with that option.

Cheers,

Alice