(CGNS Documentation Home Page)
(Steering Committee Charter)
(Overview and Entry-Level Document)
(A User's Guide to CGNS)
(Mid-Level Library)
(Standard Interface Data Structures)
(SIDS File Mapping Manual)
(CGIO User's Guide)
(Parallel CGNS User's Guide)
(ADF Implementation)
(HDF5 Implementation)
(Python Implementation)
(CGNS Tools and Utilities)
(Introduction)
(Getting Started)
(Additional Information)
(Troubleshooting)
(Frequently Asked Questions)
(Example Computer Codes)
(Overview of the SIDS)
(Guideline for PLOT3D Variables)
Frequently Asked Questions
Q: Does CGNS support solution array names that are not listed in the SIDS?
A: You can use any data-name that you want for solution arrays. However,
if you create a new name not listed in the SIDS, it may not be understood
by other applications reading your file.
Q: What is a Family in CGNS?
A: The families are used to link the mesh to the geometry. The data
structure Family_t is optional and can be used to define the geometry
of boundary patches by referencing CAD entities. In turn, mesh
patches can reference family, so we get: mesh -> family -> geometry.
Q: What are DiscreteData_t and IntegralData_t used for?
A: DiscreteData_t can be used to store field data that is not
typically considered part of the flow solution FlowSolution_t.
IntegralData_t can be used to store generic global or integral
data (a single integer or floating point number is allowed in each
DataArray_t node under IntegralData_t).
Q: What are some good programming practices that will help me avoid
problems when implementing CGNS in my code?
A: The usual good programming standards apply:
use plenty of comments, use logical indentation to make the code more
readable, etc. In addition, the API returns an error code from
each of its calls; it is a good idea to check this regularly and
gracefully exit the program with an error message when it is not
zero. In FORTRAN, you can use:
if (ier .ne. 0) call cg_error_exit_f
If programming in C, you may also assign an error callback function
using cg_error_handler, which will be called in the case
of an error.
Q: How can I look at what is in a CGNS file?
A: The utility CGNSview
is the best way to look at a CGNS file.
This utility allows you to access any node in the file using a
Windows-like collapsible node tree. Nodes and data may be added,
deleted, and modified.
It also has translator capabilities and a crude built-in compliance checker.
Q: How can I tell if I have created a truly SIDS-compliant CGNS file?
A: It is currently very difficult to guarantee that a user has
created a SIDS-compliant CGNS file, that others can read and understand.
But because the API (mid-level-library) has many checks for
non-compliance, it is much more difficult for you to make a mistake when
using it than if you utilize CGIO (core-level) calls. Included with
the CGNS distribution is a crude compliance checker, cgnscheck
located in the tools subdirectory. This may be run from the command line,
or from within the CGNSview utility.
Q: How do I write data sets associated with boundary conditions?
A: Writing data sets under boundary conditions is following the
"fully SIDS-compliant BC implementation" rather than the "lowest
level BC implementation".
(See the figure showing the hierarchical
structure of ZoneBC_t in the Overview
of the SIDS section.)
In order to do this using the Mid-Level
Library, take the following steps:
- Use cg_boco_write to create each BC_t node and
its associated BCType and boundary condition region.
(This also creates the top level ZoneBC_t node if it
does not already exist. Note that only one ZoneBC_t
node may exist under any given Zone_t node.)
This is the only step necessary to achieve the "lowest level
BC implementation."
- Use cg_dataset_write to create each
BCDataSet_t node and its associated
BCTypeSimple under the desired BC_t node.
- Use cg_bcdata_write to create each
BCData_t node (of either type Dirichlet
or Neumann) under the desired BCDataSet_t
node.
- Use cg_goto to "go to" the appropriate
BCData_t node.
- Use cg_array_write to write the desired data.