CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   ParaView (https://www.cfd-online.com/Forums/paraview/)
-   -   [General] Time steps, XDMF, and HDF5 (https://www.cfd-online.com/Forums/paraview/139348-time-steps-xdmf-hdf5.html)

Atholis July 22, 2014 15:54

Time steps, XDMF, and HDF5
 
Heyo!! I've been having troubles with Paraview's ability on reading timesteps. I'm using HDF5 and XDMF to view data in VisIt and Paraview. VisIt doesn't need a 'temporal collection' to view time steps, but Paraview does. Two of my xdmf files are below to give an idea on what I'm looking at. Grid is (30, 20, 10) written is staggered format with the original first and last values lopped off, which is why my dimensions look odd in the file.
(Please assume any typos in my xmf files are copy errors, the individual files are working fine)

Paraview_1000.xdmf
Code:

<?xml version="1.0" ?>
<!DOCTYPE Xdmf SYSTEM "Xdmf.dtd" []>
<Xdmf Version="2.0">
 <Domain>
  <Grid Name="mesh1" GridType="Uniform">
    <Topology TopologyType="3DSMesh" NumberOfElements="9 19 29"/>
    <Geometry GeometryType="X_Y_Z">
      <DataItem Dimensions="9 19 29" NumberType="Float" Precision="7" Format="HDF">
        1000_test.h5:/X
      </DataItem>
      <DataItem Dimensions="9 19 29" NumberType="Float" Precision="7" Format="HDF">
        1000_test.h5:/Y
      </DataItem>
      <DataItem Dimensions="9 19 29" NumberType="Float" Precision="7" Format="HDF">
        1000_test.h5:/Z
      </DataItem>
    </Geometry>
    <Attribute Name="Density" AttributeType="Scalar" Center="Cell">
      <DataItem Dimensions="8 18 28" NumberType="Float" Precision="7" Format="HDF">
        1000_test.h5:/Density
      </DataItem>
 <---------Lot's more data----------->
    </Grid>
 </Domain>
</Xdmf>

Paraview_1001.xdmf
Code:

<?xml version="1.0" ?>
<!DOCTYPE Xdmf SYSTEM "Xdmf.dtd" []>
<Xdmf Version="2.0">
 <Domain>
  <Grid Name="mesh1" GridType="Uniform">
    <Topology TopologyType="3DSMesh" NumberOfElements="9 19 29"/>
    <Geometry GeometryType="X_Y_Z">
      <DataItem Dimensions="9 19 29" NumberType="Float" Precision="7" Format="HDF">
        1001_test.h5:/X
      </DataItem>
      <DataItem Dimensions="9 19 29" NumberType="Float" Precision="7" Format="HDF">
        1001_test.h5:/Y
      </DataItem>
      <DataItem Dimensions="9 19 29" NumberType="Float" Precision="7" Format="HDF">
        1001_test.h5:/Z
      </DataItem>
    </Geometry>
    <Attribute Name="Density" AttributeType="Scalar" Center="Cell">
      <DataItem Dimensions="8 18 28" NumberType="Float" Precision="7" Format="HDF">
        1001_test.h5:/Density
      </DataItem>
    </Attribute>
<------even more data------>
    </Grid>
  </Domain>
</Xdmf>

I've looked online and have seen I need
Code:

GridType="Collection" CollectionType="Temporal"
for it, but I haven't seen anything that gives an example of how the syntax works. :o Any and all help is appreciated!

hadrien51 April 29, 2015 05:30

Hi Atholis
sorry I answer you very late but we deal with this also
If it can help you or some one else

look this example
it is CollectionType="Temporal
with <Time Type="Single" Value=" 0.00850" />
for each time step

Code:

<?xml version="1.0" ?>
<!DOCTYPE Xdmf SYSTEM "Xdmf.dtd" [
<!ENTITY InitialHeavyData "data.mesh.h5">
]>
 
 <Xdmf>
  <Domain>
    <Grid Name="fensap" GridType="Collection" CollectionType="Temporal" >
 
    <Grid Name="fensap" Type="Uniform" >
    <Time Type="Single" Value="  0.00850" />
    <Topology Type="Mixed" NumberOfElements="    3848219">
    <DataStructure Dimensions="    19241095" NumberType="Int" Format="HDF" >fensap-mesh.h5:/CONNE </DataStructure>
    </Topology>
    <Geometry GeometryType="XYZ">
    <DataStructure Dimensions="3      778115" NumberType="Float" Presicion="8" Format="HDF" >fensap-mesh.h5:/COORD </DataStructure>
    </Geometry>
    <Attribute Name="VELOC" Center="Node" AttributeType="Vector">
    <DataStructure Format="HDF" DataType="Float" Precision="8" Dimensions="3      778115">fensap-0000001.h5:/VELOC </DataStructure>
    </Attribute>
    <Attribute Name="PRESS" Center="Node" AttributeType="Scalar">
    <DataStructure Format="HDF" DataType="Float" Precision="8" Dimensions="      778115">fensap-0000001.h5:/PRESS </DataStructure>
    </Attribute>
    </Grid>
 
    <Grid Name="fensap" Type="Uniform" >
    <Time Type="Single" Value="  0.01700" />
    <Topology Type="Mixed" NumberOfElements="    3848219">
    <DataStructure Dimensions="    19241095" NumberType="Int" Format="HDF" >fensap-mesh.h5:/CONNE </DataStructure>
    </Topology>
    <Geometry GeometryType="XYZ">
    <DataStructure Dimensions="3      778115" NumberType="Float" Presicion="8" Format="HDF" >fensap-mesh.h5:/COORD </DataStructure>
    </Geometry>
    <Attribute Name="VELOC" Center="Node" AttributeType="Vector">
    <DataStructure Format="HDF" DataType="Float" Precision="8" Dimensions="3      778115">fensap-0000002.h5:/VELOC </DataStructure>
    </Attribute>
    <Attribute Name="PRESS" Center="Node" AttributeType="Scalar">
    <DataStructure Format="HDF" DataType="Float" Precision="8" Dimensions="      778115">fensap-0000002.h5:/PRESS </DataStructure>
    </Attribute>
    </Grid>

    </Grid>
  </Domain>
 </Xdmf>



All times are GMT -4. The time now is 10:46.