CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Post-Processing

separate .vtk files + OpenFOAM fields: synchronous time

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 18, 2011, 09:45
Default separate .vtk files + OpenFOAM fields: synchronous time
  #1
Senior Member
 
Tomislav Maric
Join Date: Mar 2009
Location: Darmstadt, Germany
Posts: 284
Blog Entries: 5
Rep Power: 21
tomislav_maric is on a distinguished road
Hi everyone,

I have a bunch of POLYDATA .vtk files that correspond to the time-steps (results) of a simulation. Is there a way to visualise the .vtk file set and the OpenFOAM solution at the same time? Right now, the time steps of the CFD solution are iterated and displayed, after which, the iterations start to loop over the .vtk files... and I need to see them all at the same time.

Thanks!
tomislav_maric is offline   Reply With Quote

Old   November 18, 2011, 12:48
Default
  #2
Senior Member
 
Sandeep Menon
Join Date: Mar 2009
Location: Amherst, MA
Posts: 403
Rep Power: 25
deepsterblue will become famous soon enough
Unfortunately, legacy VTK files do not inherently support time evolution. One possible (although slightly tedious) approach is to modify the reader (either PVFoamReader or the in-built one in paraview) to additionally read in VTK files by index, so that they are read in-sync at each time-step - i.e., read file_001.vtk for time-step 1, etc. If you can get that to work, it would be quite handy indeed.
__________________
Sandeep Menon
University of Massachusetts Amherst
https://github.com/smenon
deepsterblue is offline   Reply With Quote

Old   November 21, 2011, 03:33
Default
  #3
Senior Member
 
Tomislav Maric
Join Date: Mar 2009
Location: Darmstadt, Germany
Posts: 284
Blog Entries: 5
Rep Power: 21
tomislav_maric is on a distinguished road
Thanks a lot for the advice!

I'll have to check this out soon, right now I'm viewing the data separately, because I'm concentrated on debugging the alg., but at some point I guess I will be needing this. I'll ask on the pview mailing list for advice on how to code this painlessly before I jump into it.
tomislav_maric is offline   Reply With Quote

Old   November 21, 2011, 06:16
Default
  #4
Super Moderator
 
Takuya OSHIMA
Join Date: Mar 2009
Location: Niigata City, Japan
Posts: 518
Blog Entries: 1
Rep Power: 20
7islands is on a distinguished road
Or other ways would be
* Read the .vtk files as time series and apply the temporal shift scale filter (if your timestep is constant)
* To write a VTK-Python script that converts .vtk files to .vtp (XML polydata format) files and writes a .pvd file (metadata file that refers to the collection of .vtp files with time information).

T
7islands is offline   Reply With Quote

Old   November 21, 2011, 09:34
Default
  #5
Senior Member
 
Tomislav Maric
Join Date: Mar 2009
Location: Darmstadt, Germany
Posts: 284
Blog Entries: 5
Rep Power: 21
tomislav_maric is on a distinguished road
Quote:
Originally Posted by 7islands View Post
Or other ways would be
* Read the .vtk files as time series and apply the temporal shift scale filter (if your timestep is constant)
* To write a VTK-Python script that converts .vtk files to .vtp (XML polydata format) files and writes a .pvd file (metadata file that refers to the collection of .vtp files with time information).

T
I just got it: it doesn't care about the .vtk naming, as long as it is consistent: the files are named so that they may be read as time-changing data. The number of files corresponds to the number of iterations, so all that is needed is to scale the interval. In my case, I had 500 steps, and I needed them to correspond to the interval [0, 0.5], so I scaled the interval by 0.001.

Thanks for the advice!
tomislav_maric is offline   Reply With Quote

Reply

Tags
paraview, postprocessing, simultaneous, vtk files


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple floating objects CKH OpenFOAM Running, Solving & CFD 14 February 20, 2019 09:08
New OpenFOAM Forum Structure jola OpenFOAM 2 October 19, 2011 06:55
OF 1.6 | Ubuntu 9.10 (64bit) | GLIBCXX_3.4.11 not found piprus OpenFOAM Installation 22 February 25, 2010 13:43
OpenFOAM15 paraFoam bug koen OpenFOAM Bugs 19 June 30, 2009 10:46
OpenFOAM Debian packaging current status problems and TODOs oseen OpenFOAM Installation 9 August 26, 2007 13:50


All times are GMT -4. The time now is 03:25.