Mesh Conversion¶

zCFD uses unstructured meshes written in an HDF5 file format. HDF5 provides a flexible, self describing specification supporting parallel I/O that can be tuned per filesystem type (e.g NFS, GPFS, Lustre etc).

Meshes from a wide variety of sources can be easily converted into this format as follows:

OpenFOAM-x.x.x¶

We provide a range of converters for popular mesh types via a special version of the open-source CFD code OpenFOAM, available freely for download here

Once downloaded and installed, the version of OpenFOAM will convert a range of file formats to the zCFD format. Prior to running any of these, you will need to activate your OpenFOAM environment using

source \$FOAM_INST_DIR/OpenFOAM-x.x.x/etc/bashrc


OpenFOAM Mesh Converter¶

To convert from an OpenFOAM format mesh to zCFD, run the following command in the MESH directory.

foamTozCFD


This will create a new folder called zInterface/ containing the HDF5 file.

Fluent Mesh Converter¶

The converter for ANSYS Fluent files is a utility called fluent_convert. This is included in the path set by activating the zCFD command line environment.

To run the utility, use

(zCFD): fluent_convert <filename>.msh <new_filename>.h5


or

(zCFD): fluent_convert <filename>.cas <new_filename>.h5


The will produce 2 files: the zCFD HDF5 file and the name_zone.py python file which holds the fluid and boundary zone names.

Star CCM+ Mesh Converter¶

There are a number of different file formats for CD-Adapco Star CCM+ meshes. The <filename>.sim file is in a propietary format and at this stage cannot be converted. The <filename>.ccm can be converted using

(zCFD): ccmconvert <filename>.ccm <new_filenam>.h5


This produces the zCFD HDF5 file.

CGNS Mesh Converter¶

This utility will convert an unstructured, non-chimera, hexahedral mesh in CGNS (ref) format. The converter will handle meshes with element types (HEXA_8):

(zCFD): cgnsconvert <filename>.cgns <new_filenam>.h5


UGRID Mesh Converter¶

UGRID is a NASA format for meshes (ref). You must follow the naming convention (ref) for UGRID files, which describes the format and endian-ness of the file data (“ascii8”, “b8”, “lb8”, or “r8”) depending upon which language (C or FORTRAN) was used to create the file. The mapbc file is optional and if not provided the boundary conditions of the zones default to wall.

(zCFD): ugridconvert <filename>.[ascii8, b8, lb8, r8].ugrid <new_filename>.h5  <filename>.mapbc


This produces the zCFD HDF5 file.

DLR Tau Mesh Converter¶

Tau is a CFD solver produced by the DLR (http://tau.dlr.de/startseite/). Note that Tau is a node-based solver so flow field variables are calculated for and stored at the mesh nodes (or vertices) rather than at cell centres (the approach used by Star CCM+, OpenFOAM, CFX and zCFD). Thus simply converting the file format will not guarantee a good result. In many cases, the conversion will not result in a valid cell-centred zCFD mesh.

(zCFD): tauconvert <filename>.XXX <new_filename>.h5


This produces the zCFD HDF5 file.