CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Visualization & Post-Processing Software > ParaView

[OpenFOAM] Openfoam to paraview

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By Woodbuddha

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 12, 2011, 04:22
Default Openfoam to paraview
  #1
New Member
 
Join Date: Nov 2011
Posts: 22
Rep Power: 14
kd55 is on a distinguished road
Hi there,

I am fairly new to openfoam but am using it to simulate the fluid dynamics of a surfboard fin for my dissertation.
I have been going through the tutorials provided and everything on the openfoam side is going ok. However, I am using the software at uni on a cluster system and for some reason paraview can not be installed. So I have installed paraview on my laptop and was going to visualise my results from there by transfering the data files accross with a usb stick.
My problm is, I think I need to save my data in a vtk format. Reading through the tutorials, it says openfoam has a foamtovtk utility, but it doesn't tell you where to find it or how to use it.
Would anyone be able to help?

Kind Regards,

Kit
kd55 is offline   Reply With Quote

Old   November 12, 2011, 05:55
Default
  #2
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by kd55 View Post
Hi there,

I am fairly new to openfoam but am using it to simulate the fluid dynamics of a surfboard fin for my dissertation.
I have been going through the tutorials provided and everything on the openfoam side is going ok. However, I am using the software at uni on a cluster system and for some reason paraview can not be installed. So I have installed paraview on my laptop and was going to visualise my results from there by transfering the data files accross with a usb stick.
My problm is, I think I need to save my data in a vtk format. Reading through the tutorials, it says openfoam has a foamtovtk utility, but it doesn't tell you where to find it or how to use it.
Would anyone be able to help?

Kind Regards,

Kit
Hi Surferdude!

You don't need that. Since 3.8 PV can read OF data natively. Just create an empty file something.foam (the extension is the only thing important) in the case-directory and open that.

Bernhard
gschaider is offline   Reply With Quote

Old   November 14, 2011, 08:02
Default
  #3
New Member
 
Join Date: Nov 2011
Posts: 22
Rep Power: 14
kd55 is on a distinguished road
Hi Bernhard,

Thanks for your reply. After following your steps of making a file in the case directory (cavity.foam) and then copying all the files into this (0 0.1, 0.2, 0.3, 0.4, 0.5, constant, system). I then saved the cavity.foam onto my usb stick and transferred the data to my laptop. When I try to open the cavity.foam in paraview, all the files seem to be empty (all the data files doesn't apprear - P U). This is why I thought I might have to use the foamtovtk utility as paraview isn't recognising the data files in their raw form, or am I doing something wrong?

Kind regards,

Kit
kd55 is offline   Reply With Quote

Old   November 14, 2011, 10:03
Default
  #4
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by kd55 View Post
Hi Bernhard,

Thanks for your reply. After following your steps of making a file in the case directory (cavity.foam) and then copying all the files into this (0 0.1, 0.2, 0.3, 0.4, 0.5, constant, system). I then saved the cavity.foam onto my usb stick and transferred the data to my laptop. When I try to open the cavity.foam in paraview, all the files seem to be empty (all the data files doesn't apprear - P U). This is why I thought I might have to use the foamtovtk utility as paraview isn't recognising the data files in their raw form, or am I doing something wrong?

Kind regards,

Kit
"seem to be empty": as seen in the filesystem (on OS-level) or in paraview?

Your notebook is Windoze? Havn't got that one, so I can't say whether the native reader works on it (maybe for instance zipped datafiles don't work on Win)
gschaider is offline   Reply With Quote

Old   November 14, 2011, 10:09
Default
  #5
New Member
 
Join Date: Nov 2011
Posts: 22
Rep Power: 14
kd55 is on a distinguished road
Thanks for your help Bernhard.

I have just had a breakthrough for anyone with similar problems. If you type in foamToVTK in the case directory, openfoam will make a new folder in the case directory and convert all the data to VTK form, you can then open this in paraview.

Kit

Last edited by kd55; November 14, 2011 at 10:15. Reason: typo
kd55 is offline   Reply With Quote

Old   November 14, 2011, 23:08
Default
  #6
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
Quote:
Originally Posted by kd55 View Post
Hi Bernhard,

Thanks for your reply. After following your steps of making a file in the case directory (cavity.foam) and then copying all the files into this (0 0.1, 0.2, 0.3, 0.4, 0.5, constant, system). I then saved the cavity.foam onto my usb stick and transferred the data to my laptop. When I try to open the cavity.foam in paraview, all the files seem to be empty (all the data files doesn't apprear - P U). This is why I thought I might have to use the foamtovtk utility as paraview isn't recognising the data files in their raw form, or am I doing something wrong?

Kind regards,

Kit
You do not need to create a new case directory but rather create and empty file named cavity.foam in your existing case directory. By opening cavity.foam from paraview, paraview should properly recognize files under constant, system, 0, 0.1.,... of the case directory.

I am not doing much testing on Windows recently but compressed files should work thanks to PV's internal zlib API.

Takuya
7islands is offline   Reply With Quote

Old   November 15, 2011, 03:05
Default Error in ParaView
  #7
New Member
 
Jindo
Join Date: Mar 2011
Location: Germany
Posts: 25
Rep Power: 15
phuchuynh is on a distinguished road
Hi all !
I have a question about paraview. After I ran solver by respective command (interFoam, icoFoam,.....) . When I ran paraFoam, Error appeared on window paraView.
"
Warning: Range [0,1] invalid for log scaling. Changing to [0.1,1].
Warning: Range [0,1.00004] invalid for log scaling. Changing to [1,1.00004].
"


thanks !

Cheers

Phuc
Attached Images
File Type: png a.png (19.6 KB, 22 views)
phuchuynh is offline   Reply With Quote

Old   June 20, 2013, 12:32
Default
  #8
New Member
 
Peter Doings
Join Date: Sep 2012
Location: Portugal
Posts: 4
Rep Power: 13
PeterDoings is on a distinguished road
Quote:
Originally Posted by phuchuynh View Post
Hi all !
I have a question about paraview. After I ran solver by respective command (interFoam, icoFoam,.....) . When I ran paraFoam, Error appeared on window paraView.
"
Warning: Range [0,1] invalid for log scaling. Changing to [0.1,1].
Warning: Range [0,1.00004] invalid for log scaling. Changing to [1,1.00004].
"


thanks !

Cheers

Phuc
phuchuynh, I had the same issue just now. I fixed it by going into the 'Color Scale Editor', clicking the little wrench symbol, and then 'Rescale to Data Range'. I can't remember if 'Use Logarithmic Scale' was off, but it stands to reason that it should.
PeterDoings is offline   Reply With Quote

Old   January 5, 2014, 17:58
Default Surfboard Fin an CFD
  #9
New Member
 
Join Date: Jan 2014
Posts: 5
Rep Power: 12
Woodbuddha is on a distinguished road
Hi Kit,

I am a surfer, part time wooden surfboard/fin builder from Brisbane Australia who is very interested from a personal research perspective in CFD modelling and surfboard fins. Your research sounds very interesting. How did you go with your dissertation? I would be very interested in understanding your testing methodology using OpenFOAM and also how the results of your testing eventuated. Looking forward to your reply.

Thanks.

TK
lourencosm likes this.
Woodbuddha is offline   Reply With Quote

Old   February 13, 2019, 19:54
Default
  #10
New Member
 
Panos Koniavitis
Join Date: Oct 2017
Posts: 6
Rep Power: 8
PanosK is on a distinguished road
Hi kd55, is there any chance to have a look at your dissertation? I am now trying to look as some fins designs and was thinking to head to openfoam as well. I would be happy to check your work out

Best
P
PanosK is offline   Reply With Quote

Reply


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
Getting Started with OpenFOAM wyldckat OpenFOAM 25 August 14, 2022 13:55
Map of the OpenFOAM Forum - Understanding where to post your questions! wyldckat OpenFOAM 10 September 2, 2021 05:29
OpenFOAM course for beginners Jibran OpenFOAM Announcements from Other Sources 2 November 4, 2019 08:51
[Other] Which versions of OpenFoam and Paraview are suitable for Ubuntu 14.04 LTS Trusty Tahr Asghari_M OpenFOAM Installation 4 February 4, 2015 15:47
Velocity vector data in OpenFOAM and ParaView mismatch tekky OpenFOAM 9 December 21, 2009 11:26


All times are GMT -4. The time now is 19:05.