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

foamToVTK

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree4Likes
  • 1 Post By qutadah.r
  • 1 Post By qutadah.r
  • 1 Post By nepomnyi
  • 1 Post By nepomnyi

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 27, 2021, 06:47
Default foamToVTK
  #1
Senior Member
 
qutadah
Join Date: Jun 2021
Location: USA
Posts: 101
Rep Power: 4
qutadah.r is on a distinguished road
I am wondering why some tutorials on youtube use FoamToVTK to view results in paraview instead of just creating a .foam file and open it using paraview.



Is it just another way to open the results or is it different?


Thanks
nepomnyi likes this.
qutadah.r is offline   Reply With Quote

Old   September 28, 2021, 19:59
Default
  #2
Member
 
Ivan Nepomnyashchikh
Join Date: Sep 2019
Location: USA
Posts: 30
Blog Entries: 1
Rep Power: 6
nepomnyi is on a distinguished road
Here's what I found.


Have a look at the end of the first page. Here's a quote from there:

Quote:
OpenFOAM includes the foamToVTK utility to convert data from its native format to VTK format, which means that any VTK-based graphics tools can be used to post-process OpenFOAM cases. This provides an alternative means for using ParaView with OpenFOAM.
So, that's an alternative way.



I plan to use it to resolve my issue which is the following. I ran a transient simulation. I got a lot of subfolders for each time step. And if I just type paraFoam, it loads all the time steps. And it takes about 20 minutes. I want to try loading only one time step and I don't know how to do that. I believe that foamToVTK will help me with that.

Last edited by nepomnyi; September 28, 2021 at 20:01. Reason: typos
nepomnyi is offline   Reply With Quote

Old   September 29, 2021, 09:56
Default
  #3
Senior Member
 
qutadah
Join Date: Jun 2021
Location: USA
Posts: 101
Rep Power: 4
qutadah.r is on a distinguished road
aha thats interesting, let me check how you could do that.

Last edited by qutadah.r; September 29, 2021 at 10:21. Reason: wrong inputs
qutadah.r is offline   Reply With Quote

Old   September 29, 2021, 10:20
Default
  #4
Senior Member
 
qutadah
Join Date: Jun 2021
Location: USA
Posts: 101
Rep Power: 4
qutadah.r is on a distinguished road
i found out you can use the following command


foamToVTK -time $100



you can replace 100 with the time directory you want to process and it will only process that to VTK.
nepomnyi likes this.
qutadah.r is offline   Reply With Quote

Old   September 29, 2021, 12:48
Default
  #5
Member
 
Ivan Nepomnyashchikh
Join Date: Sep 2019
Location: USA
Posts: 30
Blog Entries: 1
Rep Power: 6
nepomnyi is on a distinguished road
Quote:
Originally Posted by qutadah.r View Post
aha thats interesting, let me check how you could do that.

Hello @qutadah.r. You edited your comment that I'm quoting here. But I did receive the original version of it in my email. And that was a great idea indead!


I tried that a little bit different than you suggested. I copied my entire case folder, but kept only one time step. This way I had all my case files and I didn't have to worry which files exactly I needed to visualize my results in Paraview. Then I went to that copied folder, typed paraFoam and I got my results at only time step loaded very well!


Thank you so much for the idea!
qutadah.r likes this.

Last edited by nepomnyi; September 29, 2021 at 12:49. Reason: typos
nepomnyi is offline   Reply With Quote

Old   September 29, 2021, 12:50
Default
  #6
Senior Member
 
qutadah
Join Date: Jun 2021
Location: USA
Posts: 101
Rep Power: 4
qutadah.r is on a distinguished road
Quote:
Originally Posted by nepomnyi View Post
Hello @qutadah.r. You edited your comment that I'm quoting here. But I did receive the original version of it in my email. And that was a great idea indead!


I tried that a little bit different than you suggested. I copied my entire case folder, but kept only one time step. This way I had all my case files and I didn't have to worry which files exactly I needed to visualize my results in Paraview. Then I went to that copied folder, typed paraFoam and I got my results at only time step loaded very well!


Thank you so much for the idea!

i did edit my reply because i found we can just enter one command instead of copying files around and still get the same result!


happy it helped!
qutadah.r is offline   Reply With Quote

Old   September 29, 2021, 12:52
Default
  #7
Member
 
Ivan Nepomnyashchikh
Join Date: Sep 2019
Location: USA
Posts: 30
Blog Entries: 1
Rep Power: 6
nepomnyi is on a distinguished road
Quote:
Originally Posted by qutadah.r View Post
i found out you can use the following command


foamToVTK -time $100



you can replace 100 with the time directory you want to process and it will only process that to VTK.

Thank you @qutadah.r! I posted my question on Research Gate as well and I've got the same suggestion (i.e., to use foamToVTK -time). Here's the link.



I've tried it and the result was strange. I did the following. I went to my original case folder and typed foamToVTK -time $100 (100 is my last time step). Then I typed paraview & to open a Paraview window. Then I loaded my dummy .foam file. It was loaded very fast, but Paraview loaded all the time steps instead of just one. To make sure that all the time steps were loaded I did try different time steps and the results changed with each one of them. Therefore, I concluded that all the time steps were loaded. What most surprising about it is that the results were loaded extremely fast. Whereas, when I use paraFoam command, it takes forever to load all the time steps.

Ivan
qutadah.r likes this.

Last edited by nepomnyi; September 29, 2021 at 13:07. Reason: some advancements
nepomnyi is offline   Reply With Quote

Reply

Tags
openfoam6, vtk files

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
How to execute foamToVTK for all regions in OpenFOAM 5? sunagra27 OpenFOAM Post-Processing 0 September 23, 2021 12:05
[Other] What is the difference between foamToSurface and foamToVTK samiahmed OpenFOAM Meshing & Mesh Conversion 1 May 3, 2020 15:52
[OpenFOAM] OpenFOAM-3.0.x: error in foamToVTK (64-bit labels) DrFloyd ParaView 8 April 20, 2018 05:51
foamToVTK -fields syntax problem KateEisenhower OpenFOAM Post-Processing 5 September 22, 2016 06:56
Command foamToVTK gruber OpenFOAM 0 July 26, 2010 10:44


All times are GMT -4. The time now is 13:39.