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 .. code-block:: bash 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. .. code-block:: python 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 .. code-block:: python (zCFD): fluent_convert .msh .h5 or .. code-block:: python (zCFD): fluent_convert .cas .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 *.sim* file is in a propietary format and at this stage cannot be converted. The *.ccm* can be converted using .. code-block:: python (zCFD): ccmconvert .ccm .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): .. code-block:: python (zCFD): cgnsconvert .cgns .h5 This produces the zCFD HDF5 file. If you require support for additional element types please contact us: mailto:zcfd@zenotech.com. .. _ugrid_converter: UGRID Mesh Converter -------------------- UGRID is a NASA format for meshes. You must follow the naming convention 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. .. code-block:: python (zCFD): ugridconvert .[ascii8, b8, lb8, r8].ugrid .h5 .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. .. code-block:: python (zCFD): tauconvert .XXX .h5 This produces the zCFD HDF5 file. SU2 Mesh Converter -------------------- SU2 is an open source CFD solver (https://su2code.github.io/). Note that conversion of 2D meshes is not supported as they are not handled in zCFD. .. code-block:: python (zCFD): su2convert .su2 .h5 This produces the zCFD HDF5 file. CBA Mesh Converter -------------------- CBA is a strucutred multiblock mesh format used within the University of Bristol and HMB projects. Note 2D meshes will have a symmetry plane added to extend them into 3D for use in zCFD. .. code-block:: python (zCFD): cba_convert .[cba, blk] .h5 This produces the zCFD HDF5 file.