CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Native Meshers: blockMesh (
-   -   Preview mesh in Paraview (

gareth__it_power February 12, 2009 11:23

Hi I'm getting to grips with
I'm getting to grips with the meshing in blockMeshDict, but find it frustrating that the only way to view the mesh is once I have applied all the initial conditions and run the model, then exporting to VTK and selecting wireframe. For some reason paraFoam does not work on my setup, so I can only use foamToVTK.

Is there a way to quickly export the mesh to paraView to have a look at it, after running blockMesh?

Many thanks


derjames March 25, 2009 17:29

you can use Salome (3.2.x) to draw the geometry and then create and visualise the mesh. When you finish, save the created mesh as IDEAS and then use the ideasToFoam tool to conver to OpenFOAM format. There is a tutorial about this at the caelinux website

hope this helps...


johannes March 26, 2009 08:26

Hi Gareth,

another option would be to use the native OpenFOAM-Reader by Takuya Oshima.

It's the only ParaView post-processing method I'm using at the moment and I'm very satisfied with it. And - important for you - it's possible to visualize the mesh whether or not there are result files available for that case.

Best regards,


sho March 16, 2011 18:43


I am new at OF and starting to learn it with OpenFOAM 1.7.1 on Ubuntu 10.10 on VMWare Player. To develop a mesh using blockMesh, I follow the steps from the tutorial:

1. Edit blockMeshDict
2. Run blockMesh
3. Run paraFoam
4. View mesh on paraFoam
5. Quit paraFoam
6. Repeat step 1

My question is that how can I eliminate step 5 (and therefore step 3 in the following cycles) and get paraFoam to update and view the new mesh?


MartinB March 17, 2011 02:49

1 Attachment(s)
Hi Son,

disable the "Cache Mesh" option (red arrow), click "Update GUI" option (green arrow) to enable the "Apply" button (just switch between On/Off all the time), click the "Apply" button (blue arrow). The updated mesh will be loaded and displayed.

Another feature, if you don't already use it, is to name the blocks in the blockMeshDict this way (be aware of "block_1" as a name for this block):


hex (15 9 52 58 23 16 59 66) block_1 (8 4 8) simpleGrading (1 1 1)
With the option "Include Sets" (yellow arrow) you can select the blocks to be shown in paraFoam. Disable the "internalMesh" option and select the blocks to be investigated instead.


sho March 17, 2011 11:59

Thank you very much for the tips, Martin. I tried them out and it works perfectly.

I only have do the "disable Cache Mesh - enable Update GUI - click Apply" once. After that, I just have to click on the button "Refresh Times" in order to show the updated mesh (I use paraView 3.8.1 which came with openFoam 1.7.1 package).


mikemech June 3, 2011 11:03


Im trying to postprocess a mesh that I created with blockMesh, and I want to inspect separetely some blocks that I have saved in a "Sets" folder. I followed what MartinB said, but the problem is that Im using Paraview 3.10.1 on Windows XP. I cannot find the properties listed in Martin's screenshot in the object inspector!

Does anybody have an idea?

MartinB June 3, 2011 11:30

Hi Mike,

you can use foamToVTK this way:

foamToVTK -cellSet block_1
You will get additional .vtk files in the VTK folder and you can import the blocks independently.


mikemech June 4, 2011 12:13

Thanks Martin! It works perfectly :)

All times are GMT -4. The time now is 07:47.