Exporting an Exodus II File

After defining the element blocks, nodesets and sidesets for a model, the model can be written to the Exodus II file using the command:

Export [Genesis|Mesh] '<filename>' [dimension {2|3}] [Block <id_list>] [cubitids] [XML '<filename>']

The Genesis or Mesh arguments are optional and both indicate that an Exodus II format will be written. The filename can be any valid filename. Where a full path is not specified, the file will be written in the current working directory.

The dimension argument is also optional. Most element types have an inherent dimensionality associated with them. For example, a truss or beam element is inherently 2D while a hex or tetra element is 3D. Without this argument, only the x-y location of the nodal coordinates of 2D elements are written to the Exodus II file. Using the argument dimension 3, in this example, permits the full 3D coordinates to be written.

The optional Block argument may also be added to the Export command. Without this argument, all blocks defined in the current model will be exported to the Exodus II file. This argument permits the user to specify only a portion of the blocks in the model. The <id_list> may be any valid set of integers corresponding to the Blocks in the current model.

The XML optional argument may also be added to the Export command. When this argument is included and assembly data exists in the model, an XML file is written which describes the relationship between block IDs in the Exodus II file and parts in the assembly. See the Parts, Assemblies and Metadata section for details.

Element and Node ID Maps

Element ID map and node ID map are always written to the Exodus II file. The IDs written to the node ID map are the node IDs used to refer to nodes at the Cubit command line. The IDs written to the element ID map are the Global Element IDs which are assigned to the hex, tet, quad, etc. when they are added to an element block. The node and element ID maps can be used when a particular element or node is refered to in a downstream application and the corresponding node or element in Cubit must be found. Some analysis and post-processing applications consider these maps to be optional, while others ignore the maps even if they are present. See the Exodus manual for more information on element and node ID maps.

Exporting a Parallel Mesh for pCAMAL

Export Parallel "<filename>" [Block <id_list>] [Overwrite] [Processor <number>]

The Export Parallel command is used to output an ExodusII file with the boundary mesh or shell for sweepable volumes that were meshed with set parallel meshing enabled. The options are the same as those for the "export genesis" command except for the addition of the processor option.

The processor option allows the user to specify the number of processors that will be used to mesh the volume with the pCAMAL option. This same option exists in the pCAMAL application and is more often used there since the number of available processors is known then rather than when the output file is created in Cubit.

If the processor option is given, Cubit attempts to balance the number of sweepable volumes to run on n processors by converting many-to-one sweeps to one-to-one sweeps, subdividing the sweep volume along its sweep direction, or partitioning the source surface of a one-to-one sweep if the number of source quads is much larger than the number of layers.

Converting an Exodus II file to ASCII

The Exodus II file format is binary. It is frequently necessary to view the contents of the Exodus II file as plain text. A publicly available tool known as ncdump can be used to view the contents of an Exodus II file. ncdump is part of the netCDF library and is currently available from Unidata at the following URL:


On a UNIX platform, typical use of the ncdump utility is:

ncdump filename.e > filename.txt

In this format, the ncdump utility will take the Exodus II file, filename.e, and dump the contents to an ASCII file filename.txt

Another option for converting between binary and ASCII formats of Exodus II files is a utility known as exotxt. Exotxt is part of the SEACAS tool suite. Contact the Sandia CUBIT development team for a copy of this utility.

Note that the 'stock' ncdump utility should work for most meshes; however, Sandia increases some of the dimensions in order to handle larger meshes (more element blocks, boundary conditions, variables). The dimensions we increase in netcdf.h are:

NC_MAX_DIMS (max dimensions per file) from 100 to 65536
NC_MAX_VARS (max variables per file) from 2000 to 524288

Controlling Exodus II Output Precision

By default, exodus files are written with double precision numbers. It may be useful to change this for large meshes to decrease output file size. This can be done using the following command:

Set Exodus Single Precision [On|Off]

This command toggles the Exodus output file between single precision (floats) and double precision.

Large Exodus Format

The Set Large Exodus command enables the large exodus file setting to create a model that can store individual datasets larger than 2 gigabytes. This modifies the internal storage used by ExodusII and also puts the underlying netcdf file into the "64-bit offset" mode.

Set Large Exodus [ON|Off]

Exodus NetCDF4/HDF5 Format

The Set Exodus NetCDF command enables the exodus NetCDF4/HDF5 file setting to create a model that can store even larger files with unlimited dimensions. This modifies the internal storage used by ExodusII to an HDF5 based file. This setting overrides the Set Large Exodus setting.

Set Exodus NetCDF4 [On|OFF]

Exporting Geometry Association with the Exodus Mesh

Optionally, you can also export the associated ACIS geometry and the correspondence between the mesh and the geometry by using the export m2g command.