0
$\begingroup$

I have the velocity (vector) and pressure (scalar). This solution is constant in each CELL (square) of the mesh. I don't know why does not appear the pressure information when I open the file in paraview. I write an example of a mesh of the unit square [0,1]x[0,1] consisting on 4 squares (CELLS) of equal dimensions, and then this mesh has 9 POINTS. On each square I have a constant solution. Thanks in advance for your help.

# vtk DataFile Version 3.0
Little example
ASCII

DATASET UNSTRUCTURED_GRID
POINTS 9 DOUBLE
  0.0  0.0  0.0
  0.5  0.0  0.0
  1.0  0.0  0.0
  0.0  0.5  0.0
  0.5  0.5  0.0
  1.0  0.5  0.0
  0.0  1.0  0.0
  0.5  1.0  0.0
  1.0  1.0  0.0

CELLS 4 20
  4  0  1  4  3
  4  1  2  5  4
  4  3  4  7  6
  4  4  5  8  7

CELL_TYPES 4
  9
  9
  9
  9

CELL_DATA 4
VECTORS Velocity DOUBLE
    0.00000   0.0000   0.0000
    1.00000  10.0000   0.0000
    2.00000  20.0000   0.0000
    3.00000  30.0000   0.0000
         
CELL_DATA 4
SCALARS Pressure DOUBLE
LOOKUP_TABLE default
    0.00000
    1.00000
    2.00000
    3.00000
```
$\endgroup$
1
$\begingroup$

You should have only one CELL_DATA tag in your file. Remove the second one to fix your problem.

Some (partial) doc can be found here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.