CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Pointwise & Gridgen (https://www.cfd-online.com/Forums/pointwise/)
-   -   HDF5 or ADF? (https://www.cfd-online.com/Forums/pointwise/156960-hdf5-adf.html)

nba1942 July 16, 2015 07:32

HDF5 or ADF?
 
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

RcktMan77 July 16, 2015 11:35

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
More information about the included CGNS tools can be found at CGNS Tools Documentation page. Also note that the latest release of Pointwise exports CGNS grid files natively using HDF5 rather than ADF as is the case with the older release version that you are using.

nba1942 July 16, 2015 12:19

@rcktman77
 
Thanks for your reply!!

I am pretty sure that you gave me the solution:D

I will try it right away!:)


All times are GMT -4. The time now is 13:43.