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

[General] vtu file: first point is always set to zero

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 30, 2016, 11:58
Default vtu file: first point is always set to zero
  #1
New Member
 
Join Date: May 2016
Posts: 2
Rep Power: 0
qwertus is on a distinguished road
Dear Paraview users,
I wrote following vtu-file with python. It should generate two triangles.
The problem is, when paraview reads the data, the coordinates of the first point (here: 25.0,25.0,0.0) are always set to zero, although the values are obviously not zero.
Here is my vtu-file:


Code:
<?xml version="1.0"?>
<VTKFile type="UnstructuredGrid" version="0.1">
<UnstructuredGrid>
<Piece NumberOfPoints="     4 " NumberOfCells="     2 ">
<Points>
<DataArray type="Float64" Name="nodes" NumberOfComponents=" 3" Format="ascii">
    2.5000000000005555E+01    2.5000000000005555E+01    0.0000000000000000E+00
   -2.5000000000000000E+01    2.5000000000000000E+01    0.0000000000000000E+00
    2.5000000000000000E+01   -2.5000000000000000E+01    0.0000000000000000E+00
   -2.5000000000000000E+01   -2.5000000000000000E+01    0.0000000000000000E+00
</DataArray>
</Points>
<Cells>
<DataArray type="Int32" Name="connectivity" NumberOfComponents=" 1" Format="ascii">
     1      2      4     4      3      1
</DataArray>
<DataArray type="Int32"   Name="offsets" NumberOfComponents=" 1" Format="ascii">
     3     6
</DataArray>
<DataArray type="UInt8" Name="types" NumberOfComponents=" 1" Format="ascii">
     5     5
</DataArray>
</Cells>
<PointData>
<DataArray type="Float64" Name="disp" NumberOfComponents=" 3" Format="ascii">
    5.0000000000000000E+00   -9.3750000000000000E-01    0.0000000000000000E+00
    7.4459136479107816E-31   -3.4074520243048574E-31    0.0000000000000000E+00
    5.0000000000000000E+00    9.3750000000000000E-01    0.0000000000000000E+00
    5.5528848500075809E-31    3.4074520243048574E-31    0.0000000000000000E+00
</DataArray>
</PointData>
<CellData>
</CellData>
</Piece>
</UnstructuredGrid> 
</VTKFile>
I am thankful for any advise and help.


Erik
qwertus is offline   Reply With Quote

Old   May 31, 2016, 10:28
Default
  #2
New Member
 
Join Date: May 2016
Posts: 2
Rep Power: 0
qwertus is on a distinguished road
Problem solved.
My error was, in connectivity-array, I started counting from 1, not 0.
qwertus is offline   Reply With Quote

Reply

Tags
paraview, vtu


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
[swak4Foam] groovyBC in openFOAM-2.0 for parabolic velocity bc ofslcm OpenFOAM Community Contributions 25 March 6, 2017 11:03
Problem compiling a custom Lagrangian library brbbhatti OpenFOAM Programming & Development 2 July 7, 2014 12:32
[snappyHexMesh] determining displacement for added points CFDnewbie147 OpenFOAM Meshing & Mesh Conversion 1 October 22, 2013 10:53
friction forces icoFoam ofslcm OpenFOAM 3 April 7, 2012 11:57
DxFoam reader update hjasak OpenFOAM Post-Processing 69 April 24, 2008 02:24


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