[MOAB-dev] How can I prepare a .h5m file base on my own calculation

Jie Wu jie.voo at gmail.com
Wed Jun 1 17:07:04 CDT 2016


Hi Iulian,

I will try to convert from .vtu to .vtk by the tools you mentioned.

But as I know, .vtk file is usually used for structured mesh, while .vtu for unstructured mesh. I was just wondering if the conversion from .vtu to .vtk make sense?

Here is a small vtu file I used to store mesh and solution information. 

On the nodes, we have displacements and a scaler damage parameter. We also have some other solution variables on the Integration nodes.

Thank you so much for your help.

Best,
Jie



> On Jun 1, 2016, at 5:31 PM, Grindeanu, Iulian R. <iulian at mcs.anl.gov> wrote:
> 
> Hi,
> You can try paraview to convert from vtu format to vtk;
> Moab vtk reader is not very robust, in the sense that there are vtk files it cannot read.
> You can also try VisIt to convert from vtu to vtk
> 
> Do you have a small vtu file that you can share? I can try to look at it, to see how it goes.
> What kind of data do you have at nodes?
> 
> Iulian
> 
> From: Jie Wu [jie.voo at gmail.com <mailto:jie.voo at gmail.com>]
> Sent: Wednesday, June 01, 2016 2:42 PM
> To: Grindeanu, Iulian R.
> Cc: moab-dev at mcs.anl.gov <mailto:moab-dev at mcs.anl.gov>
> Subject: Re: [MOAB-dev] How can I prepare a .h5m file base on my own calculation
> 
> Hi Iulian,
> 
> Thank you very much for your help. The format we use to store mesh and solution information is .vtu file. 
> 
> I tried to run function ./mbconvert. It can successfully transfer from .h5m to .vtk, and vice versa. 
> 
> But I cannot convert either these 2 format to/from .vtu file. 
> 
> An example error message is like following. 
> 
> Is there any solution for this problem? Any suggestion is greatly appreciated!
> 
> Best,
> Jie
> 
> dyn-160-39-11-225:tools jiewu$ ./mbconvert in.vtu out.h5m
> [0]MOAB ERROR: --------------------- Error Message ------------------------------------
> [0]MOAB ERROR: in.vtu: File is not HDF5!
> [0]MOAB ERROR: set_up_read() line 472 in src/io/ReadHDF5.cpp
> [0]MOAB ERROR: --------------------- Error Message ------------------------------------
> [0]MOAB ERROR: NULL file handle.!
> [0]MOAB ERROR: is_error() line 133 in src/io/ReadHDF5.hpp
> [0]MOAB ERROR: --------------------- Error Message ------------------------------------
> [0]MOAB ERROR: ReadNCDF:: problem opening Netcdf/Exodus II file in.vtu!
> [0]MOAB ERROR: load_file() line 303 in src/io/ReadNCDF.cpp
> [0]MOAB ERROR: --------------------- Error Message ------------------------------------
> [0]MOAB ERROR: Trouble opening file in.vtu!
> [0]MOAB ERROR: load_file() line 68 in src/io/ReadNC.cpp
> [0]MOAB ERROR: --------------------- Error Message ------------------------------------
> [0]MOAB ERROR: Expected Keyword!
> [0]MOAB ERROR: load_file() line 178 in src/io/ReadABAQUS.cpp
> 0x0 hahhahahah
> [0]MOAB ERROR: --------------------- Error Message ------------------------------------
> [0]MOAB ERROR: This doesn't appear to be a .cub file!
> [0]MOAB ERROR: load_file() line 310 in src/io/Tqdcfr.cpp
> [0]MOAB ERROR: --------------------- Error Message ------------------------------------
> [0]MOAB ERROR: Parsing error at line 1: expected one of { $NOD $MeshFormat } got "<?xml"!
> [0]MOAB ERROR: match_token() line 378 in src/io/FileTokenizer.cpp
> [0]MOAB ERROR: --------------------- Error Message ------------------------------------
> [0]MOAB ERROR: in.vtu: No such file or directory!
> [0]MOAB ERROR: ascii_read_triangles() line 201 in src/io/ReadSTL.cpp
> [0]MOAB ERROR: --------------------- Error Message ------------------------------------
> [0]MOAB ERROR: in.vtu: not a binary STL file!
> [0]MOAB ERROR: binary_read_triangles() line 312 in src/io/ReadSTL.cpp
> [0]MOAB ERROR: --------------------- Error Message ------------------------------------
> [0]MOAB ERROR: in.vtu.node: cannot read file!
> [0]MOAB ERROR: open_file() line 59 in src/io/ReadTetGen.cpp
> [0]MOAB ERROR: --------------------- Error Message ------------------------------------
> [0]MOAB ERROR: in.vtu: Trouble reading vertices!
> [0]MOAB ERROR: read_vertices() line 129 in src/io/ReadTemplate.cpp
> [0]MOAB ERROR: --------------------- Error Message ------------------------------------
> [0]MOAB ERROR: Failed to load file after trying all possible readers!
> [0]MOAB ERROR: serial_load_file() line 635 in src/Core.cpp
> [0]MOAB ERROR: load_file() line 526 in src/Core.cpp
> Failed to load "in.vtu".
> Error code: MB_INDEX_OUT_OF_RANGE (1)
> Error message: Failed to load file after trying all possible readers
> 
> 
> 
>> On Jun 1, 2016, at 12:26 PM, Grindeanu, Iulian R. <iulian at mcs.anl.gov <mailto:iulian at mcs.anl.gov>> wrote:
>> 
>> Hello,
>> Coupler.cpp depends on a moab instance, so even if you do not use h5m format, if you want to use the coupler, your model has to reside inside a moab instance. 
>> Do you care about parallelism or not? Then h5m format is required, otherwise it will be hard to employ parallelism
>> 
>> there are several converters available, to h5m format, you can do tools/mbconvert -l to see what is available based on your configuration
>> 
>> What format do you use?
>> 
>> Iulian
>> From: moab-dev-bounces at mcs.anl.gov <mailto:moab-dev-bounces at mcs.anl.gov> [moab-dev-bounces at mcs.anl.gov <mailto:moab-dev-bounces at mcs.anl.gov>] on behalf of Jie Wu [jie.voo at gmail.com <mailto:jie.voo at gmail.com>]
>> Sent: Wednesday, June 01, 2016 9:17 AM
>> To: moab-dev at mcs.anl.gov <mailto:moab-dev at mcs.anl.gov>
>> Subject: [MOAB-dev] How can I prepare a .h5m file base on my own calculation
>> 
>> Hi All,
>> 
>> In order to transfer variables from a Source mesh to a Target mesh, I am studying the use of function mbcoupler_test.cpp these days. 
>> 
>> The stuff confusing me is the .h5m file. From the MOAB user guide, I know that .h5m is theMOAB’s native file format. 
>> 
>> But I don’t know how to prepare a .h5m file based on my own calculation results (which usually contains node coordinates, node connectivities, and nodal variables). As a result, I cannot employ a function like ./mbcoupler_test to help me to transfer the mesh variables.
>> 
>> Any instruction is deeply appreciated!
>> 
>> Best,
>> Jie
>> 
>> 
>> Jie Wu, Ph.D. candidate
>> Department of Geotechnical Engineering, Tongji University
>> Visiting student at Civil Engineering & Engineering Mechanics, Columbia University 
>> Add: 500 West 120th Street 641 S.W. Mudd New York, NY  10027
>> Ph: +1(917)822-0942

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/moab-dev/attachments/20160601/d9d0f7b2/attachment-0002.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PJob4.vtu
Type: application/octet-stream
Size: 75051 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/moab-dev/attachments/20160601/d9d0f7b2/attachment-0001.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/moab-dev/attachments/20160601/d9d0f7b2/attachment-0003.html>


More information about the moab-dev mailing list