CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Paraview & paraFoam (
-   -   Zero values using sampleSurface (

steja June 12, 2006 11:48

When I execute sampleSurface (
When I execute sampleSurface (constantPlane, interpolatedPlane) on my parallel case and everything runs fine. After I try to look at the results in paraview 2.4.2 I already get an error message in my console:

Error or warning: There was a VTK Warning in file: ../../../../../paraview-2.4.2/VTK/IO/vtkDataReader.cxx (844) Error reading ascii data!

The field to plot is zero. The "Data Range" in paraview also say that everything is zero. But when I apply foamToVTK to the same case I can do a cut with a plane at the same position and everything looks fine. Also paraFoam gives the correct picture.

I use OpenFOAM-1.3 on FC5_X86_64 and here is my sampleSurfaceDict:
surfaceFormat vtk;
interpolationScheme cellPointFace;
name constantPlane;

basePoint (0 0 0);
normalVector (0 0 1);

// Optional: whether to leave as faces or triangulate (=default)
triangulate false;

name interpolatedPlane;

basePoint (0 0 0);
normalVector (0 0 1);

triangulate false;

I experienced a similar problem using the probes utility, i.e. zero values eventhough they are not zero. They probably use the same interpolation method. I also checked running in serial and different interpolation methods.

Any suggestions are welcome.

mattijs June 13, 2006 05:53

Change your plane so it doesn'
Change your plane so it doesn't coincide with any faces/edges/points. Just perturb by small amount.

If problem persists please create small testcase and send to me.

steja June 15, 2006 04:23

Thanks! Using a slightly diff
Using a slightly different basepoint for each of 2 coordinates solved the problem, but nevertheless it seems to be very sensitive especially if you have a structured mesh. I had to play around several times to get sampleSurface the right output.

All times are GMT -4. The time now is 21:42.