[CIG-SHORT] Matlab HDF5 file, Use Coordinates and Topology to build the domain

Brad Aagaard baagaard at usgs.gov
Tue Oct 17 13:35:41 PDT 2017


The topology (how the vertices are connected into cells) and geometry 
(where the vertices are) of the mesh in the HDF5 files are defined by:

geometry/vertices (coordinates of the vertices)
topology/cells (index of vertices in each cell)

You will see that a mesh with 2-D triangular cells has 3 vertices per 
cell and each vertex has 2 coordinates (x and y). Likewise, a mesh with 
2-D quadrilateral cells has 4 vertices per cell.

So for a 2-D triangular cell with index I, the coordinates of the 
vertices are:

vertices[cells[I,0],:]
vertices[cells[I,1],:]
vertices[cells[I,2],:]

Regards,
Brad


On 10/17/2017 01:29 PM, Li, Teng wrote:
> Hi list,
> 
> I have a question about showing the model stress in the post processing 
> step. I first output stress.vtk files and visualize them in Paraview. 
> However, I am not good at using paraview python to post process the 
> stress data. So I save the vtk files as csv files. Because the time step 
> is 118, so I have 118 csv files. So I need to load each in Matlab and 
> process them one by one.
> 
> I think a smarter way is to output the stress.h5 file. And I read the 
> stress.h5 file and find the following components:
> stress: stress_x, stress_y, stress_z. (2d problem). Coordinates: one row 
> for x coordinate, and another for y coordinate. And Topology: each 
> column has four numbers, I think it shows which four nodes form a cell.
> 
> However, I find that the number of columns in Coordinates and Topology 
> are different. So that should mean the coordinates are not for the 
> cells. I plan to use pcolor to show the stress. So I need to first build 
> the mesh according to the node coordinates and topology. And then I can 
> use 3d color plot to show the stress distribution.
> 
> Although I can see the model directly in Trelis and Paraview. However, I 
> need to build the domain in Matlab to the Coordinates and Topology. And 
> then plot the stress of each cell. Can you help me to build the domain 
> according to the Coordinates and Topology?
> 
> Best,
> Teng
> 
> 
> Teng Li
> 
> Master Candidate in Structures
> 
> Department of Civil and Environmental Engineering
> 
> University of Illinois at Urbana-Champaign
> 
> 205 North Mathews Ave, Urbana, IL. 61801
> 
> Phone:(217)8196210, Email: tengli2 at illinois.edu
> 
> 
> 



More information about the CIG-SHORT mailing list