CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Mesh Generation & Pre-Processing Software > Pointwise & Gridgen

To get boundary info. from CGNS grid file.

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 4, 2016, 04:38
Default To get boundary info. from CGNS grid file.
  #1
Member
 
Join Date: Jul 2014
Posts: 31
Rep Power: 11
nba1942 is on a distinguished road
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
nba1942 is offline   Reply With Quote

Old   January 6, 2016, 13:06
Default
  #2
Senior Member
 
David Garlisch
Join Date: Jan 2013
Location: Fidelity Pointwise, Cadence Design Systems (Fort Worth, Texas Office)
Posts: 307
Rep Power: 14
dgarlisch is on a distinguished road
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
Under each BC_t node is a FamilyName:FamilyName_t node that gives the BcName. You will find the BC details under the corresponding node:
Code:
/Base:CGNSBase_t/BcName:Family_t/
I have attached a PDF doc that gives more detail.
Attached Images
File Type: png CGNSViewScreen.png (29.6 KB, 58 views)
Attached Files
File Type: zip PW-CGNS-format.zip (129.0 KB, 33 views)
dgarlisch is offline   Reply With Quote

Old   March 29, 2016, 02:09
Default
  #3
New Member
 
Mido
Join Date: Mar 2011
Posts: 25
Rep Power: 15
nw_ds is on a distinguished road
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.
nw_ds is offline   Reply With Quote

Old   March 29, 2016, 15:11
Default
  #4
Senior Member
 
David Garlisch
Join Date: Jan 2013
Location: Fidelity Pointwise, Cadence Design Systems (Fort Worth, Texas Office)
Posts: 307
Rep Power: 14
dgarlisch is on a distinguished road
Quote:
Originally Posted by nw_ds View Post
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.
CGNS is now on github.

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!
dgarlisch is offline   Reply With Quote

Old   May 28, 2016, 09:49
Default
  #5
New Member
 
Eeethon
Join Date: Oct 2013
Posts: 4
Rep Power: 12
Eeethon is on a distinguished road
Quote:
Originally Posted by dgarlisch View Post
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
Under each BC_t node is a FamilyName:FamilyName_t node that gives the BcName. You will find the BC details under the corresponding node:
Code:
/Base:CGNSBase_t/BcName:Family_t/
I have attached a PDF doc that gives more detail.
Hey, dgarlisch.
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
Eeethon is offline   Reply With Quote

Old   May 31, 2016, 10:37
Default
  #6
Senior Member
 
David Garlisch
Join Date: Jan 2013
Location: Fidelity Pointwise, Cadence Design Systems (Fort Worth, Texas Office)
Posts: 307
Rep Power: 14
dgarlisch is on a distinguished road
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.
dgarlisch is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 12:24.