CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Native Meshers: snappyHexMesh and Others (
-   -   Number of cells/points in mesh and field don't match (

kd55 January 5, 2012 10:07

Number of cells/points in mesh and field don't match
Hi there,

after using sHM to create a block mesh, and running pisoFoam, when I am trying to review my data in paraview, I am getting an error message saying:

ERROR: In ..\..\..\..\source\VTK\IO\vtkOpenFOAMReader.cxx, line 6589
vtkOpenFOAMReaderPrivate (0BFF1B08): Number of cells/points in mesh and field don't match: mesh = 23290, field = 8000

I have read the post by colinB but the same solution doesn't seem to apply. Does anybody know how to solve this?

Kind regards,


mturcios777 January 5, 2012 15:20

Have you run simulation data or are you trying to check your snappyHexMesh? I imagine your blockMesh has 8000 cells, your snappyHexMesh has the 23k. Check to see if you have any datafiles in your directories that don't have uniform values (I'm assuming you haven't actually run a simulation yet).

kd55 January 5, 2012 16:05

Hi there,
I have run snappyHexMesh and it appears to be fine in paraview. I then run pisoFoam, which again, appears to be fine, then the problem occurs when I try to put the data into paraview, it comes up with this error message.
I have checked my data files (I assume that means all the files located in the 0 directory; U,p ect) and they all appear to be uniform, apart from R which has a kqRWallFunction entry but no value.

kd55 January 5, 2012 16:05

ps, your correct, my blockMesh is 20x20x20=8000

kalyangoparaju January 25, 2012 17:32

I am guessing you might have solved the problem by now but I also had the same problem.

The reason I had the problem was that the blockMesh was not consistent with the final mesh which snappyHex wrote. I have solved this by using making sure that the polyMesh in the 0 directory which was used for the simulation was the same as that for the folder in which you are opening paraview.

That should solve the problem

kd55 January 26, 2012 04:43

Hi there,

Unfortunatly, I haven't got shm to work and i started to build my mesh point by point, block by block. So i'm very interested in your solution, would you be able to explain again what you mean by opening/having the poly mesh folder in the 0 directory?

Kind regards,


roma-aeterna May 19, 2015 09:30

If someone has the same problem, I just found a solution for this... it's a bit "from behind" because you kind of diss Paraview. Before running your simulation, but after running snappyHexMesh just export the mesh using foamMeshToFluent. Then clear your case ( and import the mesh again via fluent3DMeshToFoam. Now run your solver! Maybe you'll need to change the patch types in the constant/polyMesh/boundary file, if it doesn't work (in my case I wanted to run a 2D case that I made up with snappyHexMesh and extrudeMesh; the empty front and back patches have been discarded while exporting and importing the mesh and changed into type "patch").

ghazal_1989 March 2, 2017 05:41

Hi Anna,

How do you export snappyHexMesh into fluent mesh. I am runnig foamMeshToFlent. Unfortunately it gave me just a box!

Thanks in advanced,

BoatsNJos March 23, 2017 12:16

This is a solution for people who may be unfamiliar with OpenFOAM.

I encountered this problem when I ran blockMesh then executed a solver only for the simulation to crash/partially run. I edited the mesh and timestep data and re-ran the simulation and got this error when trying to view results in Paraview.

It happened because I still had old timestep data for the old mesh in the case directory, so when paraview read in all timestep data in the case, there were conflicting mesh and fields from the two different sims.

If you're new to OpenFOAM and encounter this error, I suspect this may be why.

I hope this is helpful.

All times are GMT -4. The time now is 16:18.