4 - 3   CGNS Loader

The CGNS Loader supports files created with CGNSLib Version 4.1.2 or earlier with either ADF or HDF5 internal representation. You can choose to load either all or specific bases, zones, and solutions into Tecplot 360 EX zones. You can also select field variables individually, or define index ranges to load specific sub-zone blocks or planes for structured-grid zones.

The CGNS Loader dialog has the following options:

cgns_loader.png

Files - Click the buttons to add or remove files from the list of files to be loaded.

Load Preference - Choose to load either grid and solution data, or global convergence history data. If a file contains both types of information, they must be loaded separately.

Specify Options - Active when a valid file is entered or selected. This option allows you to control the data loaded from your CGNS file, including loading only particular zones, field variables, or partial zones.

note00059.pngIf "Specify Options" is not selected, every base, zone, solution, and variable is loaded into Tecplot 360 EX.

Select Zones - Launches the Load CGNS Options: Zones Dialog, which allows you to select specific zones and partial zones to load.

Select Variables - Launches the Load CGNS Options: Variables dialog, which allows you to select specific field variables to load. Grid variables are always loaded automatically.

Load Cell-centered Data Directly - Toggle-on to load cell-centered data directly [default]. When the option is toggled-off, cell-centered data will be averaged to the nodes (using the averaging method specified below).

Averaging - This option is available only if "Load Cell-centered Directly" is not selected. When the field variables are stored at cell centers, either Laplacian averaging or arithmetic averaging may be used to average the cell data to the nodes they surround. This can result in a bias at the boundary nodes. Arithmetic averaging is automatically used for ordered/structured zones. When available, Rind data is used in the averaging.

CGNS Section Mapping - CGNS files sometimes have multiple node-maps (referred to as sections) for each finite element zone. A zone may contain sections with different cell types and cell dimensions.

One Tecplot zone per non-poly CGNS zone/solution (default) - All non-polytope sections with the same zone cell dimension will be combined into one zone in Tecplot 360 EX.

Load each section/boundary as separate Tecplot zone - A separate zone will be created in Tecplot 360 EX for each section or boundary regardless of cell dimension.

Transient Options

Assign Strand IDs for zones - Toggle-on to assign Strand IDs to transient zones. Refer to Section 7 - 2 “Time Aware” for more information on working with transient data.

Uniform grid structure - Toggle-on to use the grid from the first time step for all time steps, saving time and memory. Toggle-off if more than one grid is used.

4 - 3.1   CGNS Support Notes

The CGNS loader can load IJK-indexed, finite element, and polytope (polygonal/polyhedral) data, the latter denoted with NGON/NFACE sections in the data file. Polygonal sections may not be combined with sections of other types.

CGNS Boundary Conditions can be loaded for both structured and unstructured data with the exception that unstructured boundaries will only be loaded if they have corresponding sections.

Only CGNS bases and zones with valid grids can be read by the CGNS Loader. For unstructured grids, the CGNS Loader supports BAR_2, TRI_3, QUAD_4, TETRA_4, PYRA_5, PENTA_6, HEXA_8, MIXED element types and their combinations on every section. However, the CGNS Loader does not support higher-order element types. Unstructured sections that are cell-centered and have more cells than are declared in the CGNS Zone_t node will be ignored.

Only vertex and cell-centered field variable locations are supported. Cell-centered data can be read in directly or averaged to the nodes when the file is read. For cell-centered structured grids, arithmetic averaging is used. Rind data is used in the averaging if available. For cell-centered unstructured grids, either Laplacian averaging or arithmetic averaging can be selected to average the cell data to the surrounding nodes.

The CGNS Loader assigns strand IDs for zones by grouping them into time steps based on their solution times. The first zone from each time step is assigned to strand 1, the second to strand 2, and so on until all zones have been assigned to a strand. CGNS Base Names and Zone Names are converted to zone auxiliary data under the keys "CGNS.CGNSBase_t" and "CGNS.Zone_t," respectively.

For CGNS files with an HDF5 internal representation, Tecplot 360 EX uses HDF5 library version 1.12.0.

note00060.pngThe CGNS loader, based on CGNS 4.1 is not compatible with CGNS 3.3 files backed by HDF5 1.10 due to a change to the CGNS library. Ensure your CGNS library is using a compatible version of HDF5. See CGNS bugs here:

https://cgnsorg.atlassian.net/browse/CGNS-223

https://cgnsorg.atlassian.net/browse/CGNS-166

note00061.pngThe CGNS 4.1 library has reduced performance (~10%) with ADF backed files. For best performance convert CGNS files to HDF5.

4 - 3.2   Load CGNS Options: Zones Dialog

Zones in Tecplot 360 EX are not always equivalent to CGNS zones. The Load CGNS Options: Zones dialog allows you to specify zones to load from CGNS data files.

load_cgns_options_zones.png

Each solution for a CGNS zone is considered a unique zone in Tecplot 360 EX. The CGNS base (B), zone (Z), and solution (S) hierarchy orders the zones. The integer preceding the word Zone is the internal zone number assigned to that zone. The integer following Zone represents the order the zone was found in the CGNS file.

Table 4 - 1 describes the zone description listed in the dialog box. The zone description includes the CGNS hierarchy information. "CGNS B, Z, S =" followed by three integers representing the CGNS order for the base, zone, and solution, respectively. "CGNS Z, S =" and two integers are displayed if a single base is found. The description also indicates whether the zone is ordered (structured) or finite element (unstructured). I, J, and K-dimensions are provided for ordered zones; the number of nodes and elements are provided for finite element zones.

Table 4 - 1:  Zone Description in the Load CGNS: Zones dialog

int

Zone

int

{CGNS B, Z, S = x, y, z}

[Ordered, FE]

internal zone number

"Zone"

order in CGNS file

x = Base number

y = Zone number

z = Structure number

"Ordered"

or

"FE"

By default, all zones are selected for reading and displayed in Zones to Load. Use the [Move], [Move All], [Remove], or [Remove All] buttons to edit the list.

CGNS Loader Options: Index Ranges Dialog

The Load CGNS: Index Ranges dialog allows you to specify a sub-set of the selected ordered/structured zone(s) to be loaded, or define a block, plane, or line of points for extraction on loading. To load a partial zone or sub-zone, highlight the zone of interest in Zones to Load region of the CGNS Loader: Zones dialog, and select the [Index Ranges for Zone(s)] button.

Each index requires Start, End, and Skip values. Start and End points are always loaded. If multiple zones are selected prior to calling up the CGNS Loader: Index Ranges dialog, "Mx" (the maximum value for each zone) is the default value for End. You may enter any value for End. However, if the value is greater than the maximum index for a zone, End is replaced by the maximum index.

For multi-dimensional zones, more than one point must be specified to load for the I and J-directions. If the inputs for Start, End, and Skip result in a single point in either direction, an error message appears.

4 - 3.3   Load CGNS Options: Variables dialog

The CGNS Loader: Variables dialog includes the Variables from CGNS and Variables to Load boxes.

load_cgns_options_variables.png

The "Variables from CGNS" list includes all field variables in the CGNS data file, independent of their zone(s). The "Variables to Load" list contains the field variables that have been selected to be loaded into Tecplot 360 EX. Initially, both lists are the same. A variable number is assigned to each CGNS field variable that appears in the "Variables to Load" list.

Because Tecplot 360 EX requires every zone to have the same number of variables, each zone that is loaded into Tecplot 360 EX will include every variable in the "Variables to Load" list (regardless of whether the zone included that field variable in the CGNS file). The variables that were not originally in the zone will be set to zero. The field variables that do not appear in the "Variables to Load" list will not have a variable number assigned to them.

Use the [Move], [Move All], [Remove], or [Remove All] buttons to edit the Variables to Load list.

4 - 3.4   Macro Commands for the CGNS loader

The syntax for loading CGNS data files with the Tecplot macro language is as follows:

$!READDATASET

' "STANDARDSYNTAX" "1.0"

"...any of the name value pairs in the following table..." '

DATASETREADER = 'CGNS LOADER'

Each name/value pair should be in double quotes. Refer to the Scripting Guide for details on working with the Tecplot macro language.

Keyword

Values

Default

Notes

STANDARDSYNTAX

"1.0"

n/a

Must be the first instruction.

FILENAME_CGNSFILE

"filename"

n/a

The name of the file to load.

FILELIST_CGNSFILES

"filenames"

n/a

Option to load multiple files. Syntax: "FILELIST_CGNSFILES n filenames"

where n is the number of files to be loaded and filenames is a list of CGNS files delimited by spaces.

LoaderVersion

"V3"

n/a

The loader version to use; V3 is current

CgnsLibraryVersion

"4.1.2"

n/a

The CGNS library that was used when loading the data. The CGNS loader uses this information to determine whether any version incompatibility exists that may affect how the data file is loaded, and warns the user in that case.

AverageToNodes

"Yes"

"No"

"Yes"

Used to average the cell data to the nodes they surround.

AveragingMethod

"Laplacian"

"Arithmetic"

"Arithmetic"

If AverageToNodes is set to "yes", specify the AveragingMethod to use.

SectionLoad

"Combine"

"SeparateZones"

"SeparateZones"

CGNS files may have multiple node-maps (or sections) for each finite element zone. If you specify "Combine", all sections are combined with the zone cell-dimension into one zone. If you specify "SeparateZones", a separate zone is created for each section or boundary regardless of cell dimension.

LoadBCs

"Yes"

"No"

"No"

Specify whether to load the boundary conditions. For unstructured data, boundary conditions will always be loaded.

AssignStrandIDs

"Yes"

"No"

"Yes"

Set to "Yes" to automatically assign the strand IDs to your data file.

ZoneList

like "Z1, Z2,
Z3-Z7, ..."

All zones

Specify the zone number(s) of the zone(s) you wish to load.

VarNameList

like "V1, V2,
V3-V7, ..."

All variables

Specify the variable number(s) of the variable(s) you wish to load.

IIndexRange

"Zn, Min,
Max, Skip"

All

If you are loading a subset of zones, you may specify the index ranges for each zone. Specify the zone number, minimum, maximum, and skip value for each index. Set Zn to "0" to apply the index ranges to all zones.

JIndexRange

"Zn, Min,
Max, Skip"

All

KIndexRange

"Zn, Min,
Max, Skip"

All

LoadConvergenceHistory

"Yes"

"No"

"No"

Loads global convergence history data in the CGNS file, if any, rather than grid and solution data.

UniformGridStructure

"Yes"

"No"

"Yes"

If "Yes," the same grid is assumed for all timesteps and only the first timestep's grid is loaded. If "No," the grid is loaded for each timestep.