CGNS Extensions
Reno, 2002
Introduction
- New extensions:
- Links
- User Defined data
- Chemistry & species
- Implemented by Intelligent Light (under contract with NASA Langley)
Links
- Capability has always been there, but only possible to create them
with ADF calls
- New API routines have been written:
- cg_link_write (nodename, filename, name_in_file)
- cg_link_read (filename, link_path)
- cg_is_link (path_length)
Example of creating a link
While you are in file 1:
filename='file 2'
name_in_file='GridBase/Zone 1/GridCoordinates'
call cg_goto_f(index,ibase,ier,'Zone_t',1,'end')
call cg_link_write_f('GridCoordinates',filename,name_in_file,ier)
User-defined data
- Currently difficult to add arbitrary data (not covered by SIDS) to
CGNS file when using API
- Needed, e.g., to hold required code-specific information that is
not intended to be used by others
- Identified by the tag: UserDefinedData_t
- Is supported under most existing nodes
- Arbitrary dimensions and dimension values are supported
- Arbitrary number of UserDefinedData_t nodes allowed under each node
- Arbitrary number of DataArrays allowed under each UserDefinedData_t
node
- New API routines have been written:
- cg_user_data_write (user_data_name, index)
- cg_user_data_read (index, user_data_name)
- cg_nuser_data (nuserdata)
Example of writing user-defined data
real*8 data1(3)
real*4 data2(3,3)
call cg_goto_f(index,ibase,ier,...,'end')
call cg_user_data_write_f('Extra',index,ier)
call cg_goto_f(index,ibase,ier,...,'UserDefinedData_t',index,'end')
call cg_array_write_f('MyData1',RealDouble,1,3,data1,ier)
indx(1)=3
indx(2)=3
call cg_array_write_f('MyData2',RealSingle,2,indx,data2,ier)
Chemistry & species
- Still in process, but nearing completion
- Summary of changes:
- Under FlowSolution, define new field quantity data-name
identifiers (e.g.: MassFractionH2O)
- Under FlowEquationSet, modify GasModel to allow several
additional types (e.g., CaloricallyPerfect, RedlichKwong)
- Under FlowEquationSet, allow new node ThermalRelaxationModel_t
(e.g., type = Frozen, ThermalEquilib)
- Under FlowEquationSet, allow new node ChemicalKineticsModel_t:
- e.g., type = Frozen, ChemicalEquilibCurveFit
- define several data-name identifiers for DataArray_t
nodes (e.g., MolecularWeightH2O)
- If needed, other FlowEquationSet information to be stored in
Descriptor nodes