|
[Sponsors] |
January 4, 2016, 04:38 |
To get boundary info. from CGNS grid file.
|
#1 |
Member
Join Date: Jul 2014
Posts: 31
Rep Power: 11 |
Hi.
I am trying to extract boundary information from structured grid written in CGNS format. I already have dealt with an unstructured grid generated using pointwise, which stores boundary info. in sections unlike other ordinary grid generators(as I know). So I could get boundary info. using "cg_element_read" subroutine from a section. But in this case, I realized that pointwise stores the information in zones not in sections. I tried "1to1"(as "the user's guide" says) subroutine or "boco" subroutine, but they returns ier=1(which means errors occur while using the subroutine). I wanna know what subroutines other people are using to get BC information from structured CGNS file. I am waiting for any reply Thanks for reading! Kim |
|
January 6, 2016, 13:06 |
|
#2 |
Senior Member
David Garlisch
Join Date: Jan 2013
Location: Fidelity Pointwise, Cadence Design Systems (Fort Worth, Texas Office)
Posts: 307
Rep Power: 14 |
First, I strongly suggest you obtain a copy of CGNSView (64-bit). It is free and I think it is part of the CGNS distribution. CGNSView will let you browse the structure of any valid CGNS file!
Pointwise exports structured boundary zones (BCs) as a ZoneBC_t / BC_t sub-node of each structured block node (Zone_t). The CGNS path to each BC patch is: Code:
/Base:CGNSBase_t/BlkName:Zone_t/ZoneBC:ZoneBC_t/ Bc1Name:BC_t Bc2Name:BC_t ... BcXName:BC_t Code:
/Base:CGNSBase_t/BcName:Family_t/ |
|
March 29, 2016, 02:09 |
|
#3 |
New Member
Mido
Join Date: Mar 2011
Posts: 25
Rep Power: 15 |
I can't find any version for CGNSVIEW . The website says that it has been discontinued. So if you have any link for it would be much appreciated.
|
|
March 29, 2016, 15:11 |
|
#4 | |
Senior Member
David Garlisch
Join Date: Jan 2013
Location: Fidelity Pointwise, Cadence Design Systems (Fort Worth, Texas Office)
Posts: 307
Rep Power: 14 |
Quote:
CGNSview is in the cgnstools folder. This is a source-only distribution. You will need to build it yourself. I am not aware of any pre-built, CGNS distributions. Good luck! |
||
May 28, 2016, 09:49 |
|
#5 | |
New Member
Eeethon
Join Date: Oct 2013
Posts: 4
Rep Power: 12 |
Quote:
I recently working on writing a code to read a CGNS file for my CFD code, but there's a problem which really makes me mad! The problem is that when I export a CGNS grid file form Pointwise, all physical boundary condition has been set to be Familyspecified. I check the CGNS file with CGNSview, and found that the excat boundary condition is store in Familyname in "/Base/Zone 1-split-1/ZoneBC/dom-1-split-1". I kown if I can read this value, I can match it with BC family, and get the physical boundary. However, I have found the CGNS function to read this value for long time but I have not found it yet. Would you please help me out! Thanks |
||
May 31, 2016, 10:37 |
|
#6 |
Senior Member
David Garlisch
Join Date: Jan 2013
Location: Fidelity Pointwise, Cadence Design Systems (Fort Worth, Texas Office)
Posts: 307
Rep Power: 14 |
in cgnslib.h there are a series of functions that deal with family_t nodes:
int cg_nfamilies(int file_number, int B, int *nfamilies); int cg_family_read(int file_number, int B, int F, char *family_name, int *nboco, int *ngeos); int cg_family_write(int file_number, int B, const char * family_name, int *F); int cg_fambc_read(int file_number, int B, int F, int BC, char *fambc_name, CGNS_ENUMT(BCType_t) *bocotype); int cg_fambc_write(int file_number, int B, int F, const char * fambc_name, CGNS_ENUMT(BCType_t) bocotype, int *BC); Pointwise uses the cg_family_write() and cg_fambc_write() functions to export the BC data. For more CGNS details see: CGNS Mid-Level Library CGNS Families SIDS The Pointwise CGNS exporter follows the docs linked above. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Error finding variable "THERMX" | sunilpatil | CFX | 8 | April 26, 2013 07:00 |
Version 15 on Mac OS X | gschaider | OpenFOAM Installation | 113 | December 2, 2009 10:23 |
OpenFOAM on MinGW crosscompiler hosted on Linux | allenzhao | OpenFOAM Installation | 127 | January 30, 2009 19:08 |
ParaView Compilation | jakaranda | OpenFOAM Installation | 3 | October 27, 2008 11:46 |
DxFoam reader update | hjasak | OpenFOAM Post-Processing | 69 | April 24, 2008 01:24 |