|
[Sponsors] |
July 16, 2015, 08:32 |
HDF5 or ADF?
|
#1 |
Member
Join Date: Jul 2014
Posts: 31
Rep Power: 12 |
Hi, I am trying to export 3d unstructured grid in CGNS format in Pointwise V17.0.
What I need to do is to get my code read up boundary conditions from the grid file. I am not familiar with CGNS, so I am learning how to use it. I am following steps in "A User's Guide To CGNS". I made a simple code which does nothing meaningful yet. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% program cgns_test include 'cgnslib_f.h' call cg_open_f('cone.cgns',CG_MODE_READ,index_file,ier) call cg_goto_f(index_file,index_base,ier,'Zone_t',1, + 'ZoneBC_t',1,'BC_t',ib,'end') if (ier .ne. CG_OK) call cg_error_exit_f print *, index_file,index_base,ier index_base=1 index_zone=1 call cg_nbocos_f(index_file,index_base, + index_zone,nbocos,ier) print *, index_file,index_base,index_zone,nbocos,ier stop end %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% "nbocos" is the number of boundary conditions of the grid, which is updated by the subroutine "cg_nbocos_f". Here is the problem. I checked that "ier" should be 2(which means "no problem" I guess) and "nbocos" should be the number of the B.C.s from the example code. But in my code with the grid I made, "ier" is 1 and "nbocos" has trash value. I compiled CGNS library with HDF5 library, not with ADF library. "A User's Guide To CGNS" says that CGNS would automatically read and write files in HDF5 format if the user compiled the library with HDF5. But I think Pointwise writes the grid file in ADF form, not in HDF5 form.(Actually I am not sure about this. I just found the line saying "....ADF Database Version A02011>AdF0Thu Jul 16 16:04:21 2015 AdF1Thu Jul 16 16:04:21 2015 AdF2LLAdF......" in the binary CGNS grid file) What I want to ask is; Is there any way to convert the grid file in ADF form to HDF5 form? or Can Pointwise V17.0 export the grid in HDF5 format? Waiting for any reply. Thank you. PS here is my code and the grid https://www.dropbox.com/s/fcfzql0mch..._test.zip?dl=0 |
|
July 16, 2015, 12:35 |
|
#2 |
Senior Member
Zach Davis
Join Date: Jan 2010
Location: Los Angeles, CA
Posts: 101
Rep Power: 16 |
Hi,
The CGNS distribution includes a number of tools. One such utility, named adf2hdf will convert your ADF formatted cone.cgns file to an HDF5 formatted file via the command Code:
adf2hdf cone.cgns |
|
July 16, 2015, 13:19 |
@rcktman77
|
#3 |
Member
Join Date: Jul 2014
Posts: 31
Rep Power: 12 |
Thanks for your reply!!
I am pretty sure that you gave me the solution I will try it right away! |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
HDF5 IO library for OpenFOAM | haakon | OpenFOAM Programming & Development | 41 | April 21, 2023 09:30 |
Sample hdf5 writer | iyer.arvind | OpenFOAM Post-Processing | 7 | February 3, 2016 13:19 |
[General] Time steps, XDMF, and HDF5 | Atholis | ParaView | 1 | April 29, 2015 06:30 |
How could I use CGNS with HDF5 | codezy | SU2 | 1 | April 8, 2014 03:26 |
Write data file into a hdf5 format using c++ | rahulsng | Main CFD Forum | 0 | January 23, 2012 06:32 |