8. Conversion from Other Formats to MemCom

baspl++ accesses data stored on disk only via the MemCom data manager, thus files for use with baspl++ must be converted to MemCom databases. This conversion process is illustrated with the TecPlot (ASCII) format. A few other formats are supported as well.

8.1. Conversion from TecPlot

The conversion is best accomplished with the graphical user interface:

  1. Select File->Convert From->TecPlot ASCII.... A dialog opens.

  2. On the first page, a set of TecPlot files is selected and ordered (in many cases, only a single TecPlot file is required; this depends on the nature of these files).

  3. On the second page, options for the conversion process can be entered. The default settings for these options are in most cases appropriate.

  4. On the third page, a target MemCom database is selected. This is the database which will be created and initialized with the mesh and solution field data from the TecPlot file(s).

  5. Also located on the third page, the "Finalize" button must be pressed to initiate the conversion process, which may take, depending on the size of the TecPlot file(s), a few moments. When the conversion has completed, a message dialog appears. If an error during conversion happens (for instance, due to invalid formatting of one of the TecPlot files), this will be indicated in a message dialog as well.

Some informations on the TecPlot-to-MemCom converter:

  • The converter does not support TecPlot binary files. TecPlot ASCII files are supported in the format for TecPlot 360. Only zone records (structured and unstructured) are converted. For each zone record, a branch is created.

  • When supplying multiple files, the converter can optionally interpret the zones in the different files as "isomorph" (same coordinates and connectivities), and thus does not create new branches for subsequent files, but fields with new cycles. In that case the computational cycle increments with each file, thus it is important to specify the files in the correct order.

  • The converter has built-in heuristics to assemble the coordinates and vector fields like the velocity field from their components, based on the variable names.

  • The converter is implemented in C (low-level) and Python.

8.2. Other File Formats

The conversion process is very similar to that for TecPlot files, as described in the previous section. The following file formats are supported by baspl++:

  • TAU-NetCDF: The TAU CFD Solver's data format is based on the NetCDF data manager. When converting to MemCom, a single branch is created containing all elements. If existing, group and panel information for each element are preserved.

    The first file specified must be the grid file. When multiple files are specified, the subsequent files must be solution files relating to this grid file. These files should be specified in the order they were created by the TAU processor. For each solution file, the fields will be imported with the computation cycle number corresponding to the file number, that is, coordinates and fields from the grid file will have cycle number 1.

    The converter is implemented in C (low-level) and Python. It is possible to import the surface mesh only.

  • PLS: This converter converts a mesh in the PLS ASCII format to a MemCom database. It is implemented in Python.

  • Nastran-BDF: Convert a Nastran® input data deck file to a MemCom database. The number of supported element types is limited; only element types supported by the B2000++ Finite Element Environment are imported (for instance, rigid beam elements are not supported). Loads and solution fields, as well as boundary conditions, are not supported. The converter is implemented in Python.

    For users of B2000++, it is recommended to use the b2convert_from_nas utility instead, which is installed as a part of the B2000++ Finite-Element system. This utility is not only much faster (being implemented in C++), but also much more complete than the simple converter in baspl++: b2_convert_from_nas supports different load cases, boundary conditions, node-local coordinate systems, RBAR, RBE2, and RBE3 rigid-body elements, etc.

8.3. Other Converters

There is a number of converters for other file formats that cannot be shipped together with baspl++. Often, these converters make use of proprietary libraries that cannot be distributed. Examples of such converters are:

  • Medina® to MemCom converter. This converter can read Medina® BIF (mesh) and BOF (solution) files stemming from Nastran® or LS-Dyna® analyses.

  • IcemCFD® domain converter. This converter is used to create MemCom databases from IcemCFD® hexa databases.

  • EDGE converter. This converter makes use of the FFA data format library to read mesh and solution data created for and by the EDGE unstructured flow solver.

8.4. Implementing Converters

Writing a tool which converts mesh and solution data from a file format to a MemCom database which then can be read by baspl++, requires programming skills in either Python, C/C++, or Fortran. Further, the conventions for either the B2000++ database format for Finite-Element structural and thermal analysis, or the unstructured hybrid format for CFD analysis should be adopted. The latter is described in Section 1. The list of tasks that such a converter has to accomplish is as follows:

  1. Using a dedicated library or code written from scratch, read all mesh data (nodal coordinates, connectivities, boundary conditions, etc.) and all solution data into data in-memory data structures.

  2. Re-organize these in-memory data structures such that they are ready to be written to the MemCom database.

  3. Create any data structures additionally needed.

  4. Create the MemCom database and write the in-memory data structures to that database.

Users of baspl++ have, as part of the installation, already access to the programming interfaces for the MemCom data manager. These interfaces are:

  • The MemCom Python interface. It is recommended for use if the converter is supposed to be implemented quickly and will not handle very large data.

  • The MemCom C-interface. This programming interface is recommended for large amounts of data.

  • The MemCom Fortran-interface. This programming interface is recommended Fortran programmers. It is (almost) as fast as the C-interface.