Fundamentals

HOOPS Access organizes finite-element analysis data into libraries. A library is simply a collection of named datasets that group related model and result information. Each dataset is made up of three parts—parameters, named attributes and the raw data—which together describe the contents and control how the data is stored. This structure provides a consistent, efficient way to represent everything from node coordinates and element connectivity to stresses, strains and other results.

Native vs External Libraries

There are two broad classes of libraries:

  • Native libraries: Files created and managed directly by HOOPS Access using the NatLib module. They support both reading and writing operations.
  • External libraries: Files produced by other commercial FEA programs (e.g., ANSYS, ABAQUS). These are read-only within HOOPS Access.

External libraries are read through direct binary access, a mechanism that streams data from external files as efficiently as the original solver. Data is accessed randomly in binary mode with minimal translation.

Module Categories

HOOPS Access functionality is delivered through a set of modules that fall into four categories:

  1. Library device components: Generic classes describing libraries (Library), datasets (Dataset) and attributes (Attribute).
  2. Library interfaces: Device-specific readers/writers for particular file formats (e.g., ABAQUS, ANSYS, NASTRAN). These are sometimes called library devices.
  3. Data functions (see DataFun): A uniform programming interface built from function pointers; they hide the specifics of each library device. For interprocess communication there is a variant called DataIPC.
  4. High-level library management: High-level routines (provided by LMan) that load entire models or result states into convenient VisTools objects.

Library Device Components

Component Purpose
Library Holds high-level information about a file (number of datasets, entities, etc.).
Dataset Represents a single dataset, with functions to query its parameters and attributes.
Attribute Holds metadata associated with a dataset (units, titles, descriptions).

Supported Library Devices

HOOPS Access provides library device interfaces for a wide range of FEA input and output formats. Each device module reads, and in some cases writes, a specific file type. The table below lists the modules and their capabilities:

Module Purpose
ABAFil Read/Write ABAQUS input file.
ABALib Read/Write ABAQUS .odb database.
AdamsLib Read MSC/Adams.
ANSLib Read ANSYS .rst, .rth and .rfl results files.
ANSFil Read/Write ANSYS input file.
AUTODYNLib Read AUTODYN results file.
CFXLib Read ANSYS/CFX result file.
CGNSVLib Read/Write CGNS database.
COMSOLLib Read COMSOL mph and section files.
D3DFil Read/Write LSTC LS-DYNA input file.
D3DLib Read LSTC state and time-history databases.
DPFLib Ansys DPF framework for accessing CAE files.
EnSightLib Read/Write ANSYS/EnSight case file format.
FEMAPLib Read FEMAP neutral file.
FDILib Read FIDAP neutral file.
FLUENTLib Read/Write FLUENT case and data file format.
GMVLib Read GMV file.
HMAFil Read Altair HyperMesh ASCII file.
H3DLib Read Altair H3D file.
MarcLib Read MSC/MARC .t16 and .t19 post files.
MemLib Read and write native memory objects.
NASFil Read/Write MSC/NASTRAN bulk data input file.
NASLib Read/Write MSC/NASTRAN OUTPUT2, XDB and HDF5 output file.
NatLib Read and write native libraries.
OBJFil Read/Write OBJ file.
OpenFOAMLib Read OpenFOAM databases; write mesh entities.
PAMLib Read ESI/PAM-CRASH DAISY and ERF files.
PatLib Read/Write Patran neutral files.
PERMASLib Read INTES/PERMAS result file.
PLOT3DLib Read NASA/PLOT3D grid, solution and function files.
PluginLib Read plugin-compatible files.
POLYFLOWLib Read POLYFLOW mesh and solution files.
RASFil Write PTC/Mechanica FEM neutral format.
RASLib Read PTC/Mechanica design study.
SAMCEFLib Read Siemens SAMCEF des files.
SDRCLib Read/Write SDRC/IDEAS universal file.
STARCCMLib Read STAR-CCM results file.
STLFil Read/Write 3D Systems/STL ASCII text and binary files.
TecplotLib Read/Write Tecplot file format.
VTKLib Read VTK legacy file format and write VTU format

Data Functions and Interprocess Communication

The DataFun module provides an abstract API for reading and writing datasets. Each device interface supplies a function that populates a DataFun structure with pointers to device-specific routines. Once configured, all further operations (opening files, reading datasets, etc.) go through this generic interface. For multi-process or distributed environments, the DataIPC module implements the same interface using interprocess communication.

Module Purpose
DataFun Defines device-neutral function pointers for direct binary access.
DataIPC Implements the same API using interprocess communication.

Library Management

The LMan module encapsulates higher-level tasks such as loading entire models or result states into VisTools objects. Instead of reading individual datasets manually, the recommended workflow is to call vdm_LManLoadModel() to construct a complete model representation and vdm_LManLoadState() to load all results datasets at once.

Module Purpose
LMan Implements overall library management functions.

Typical Workflow for Reading FEA Data

Accessing external FEA data involves a few steps. The sequence below illustrates the recommended pattern using the SDRC/IDEAS universal file format as an example:

  1. Create a library device object. Instantiate the appropriate device interface (e.g., vdm_SDRCLibBegin() for SDRC universal files).
  2. Create a data function object. Call vdm_DataFunBegin() to allocate a DataFun structure, then populate it with device-specific function pointers by invoking the device’s DataFun routine (e.g., vdm_SDRCLibDataFun()).
  3. Open the library. Use vdm_DataFunOpen() with a UTF-8 file path to open the data file. For some interfaces, you can append additional result files using vdm_DataFunAppend(); only results datasets are appended, and node/element model information is ignored.
  4. Query global information. Retrieve counts of nodes and elements with vdm_DataFunGetNumEntities() and obtain the underlying Library object via vdm_DataFunGetLibrary().
  5. Locate datasets. Use vdm_LibrarySearchDataset() to find datasets by name (for example, the node coordinate dataset X.N). The function returns the dataset index and the number of matches.
  6. Read model and result data. Whenever possible, call vdm_LManLoadModel() to load all model-related datasets into a VisTools model, and vdm_LManLoadState() to load results datasets. If you need to read individual datasets manually, continue with the following steps.
  7. Obtain a Dataset object with vdm_LibraryGetDataset() and query its parameters (name, length, rows, columns, type) via vdm_DatasetInq().
  8. Allocate memory based on the dataset length and type, then call vdm_DataFunReadDataset() to populate your buffer.
  9. Close the library and clean up. Free any allocated memory, close the library with vdm_DataFunClose(), and delete the device and data function objects using their respective End() functions.
  10. Find results datasets. There are two common strategies when searching for result data: (a) search for specific dataset names using vdm_LibrarySearchDataset() with wildcard characters; or (b) traverse all datasets sequentially via vdm_LibraryGetDataset() and examine each with vdm_DatasetResult().

Best Practices

  • Prefer high-level functions. Use the LMan routines (vdm_LManLoadModel(), vdm_LManLoadState()) whenever possible. They ensure that related datasets are loaded consistently and simplify memory management.
  • Use UTF-8 paths. When opening a file via vdm_DataFunOpen(), specify a UTF-8 encoded path. Some devices on Windows may have exceptions.
  • Memory allocation. Always query dataset length and type before allocating memory. For floating-point data, a type value of 2 indicates single-precision floats.
  • Append with care. Only certain library devices allow appending additional result files. Always check the error code after calling vdm_DataFunAppend().
  • Use dataset names consistently. HOOPS Access relies on dataset names (e.g., X.N for node coordinates). Create your own naming conventions when writing native libraries to facilitate querying.

With these concepts and patterns, you can efficiently access a wide range of FEA models and results through HOOPS Access.

Example Code

The following C snippet puts the workflow into practice. It instantiates an SDRC/IDEAS universal file reader, opens a file, queries metadata, locates and reads the node coordinate dataset, and then cleans up. This pattern is representative of how most HOOPS Access devices are used.

#include "vdm.h"

/* Instantiate the device and DataFun objects */
vdm_SDRCLib *sdrclib = vdm_SDRCLibBegin();
vdm_DataFun *df      = vdm_DataFunBegin();
vdm_SDRCLibDataFun(sdrclib, df); /* load device-specific functions */

/* Open a universal file (UTF-8 path) */
if (vdm_DataFunOpen(df, 0, "example.unv", VDM_SDRC_UNIVERSAL) != 0)
{
    /* handle error */
}

/* Query global counts */
Vint numnp, numel;
vdm_DataFunGetNumEntities(df, SYS_NODE, &numnp);
vdm_DataFunGetNumEntities(df, SYS_ELEM, &numel);

/* Obtain the Library object and search for the coordinate dataset */
vdm_Library *lib;
vdm_DataFunGetLibrary(df, &lib);
Vint idst, ndsts;
vdm_LibrarySearchDataset(lib, "X.N", 1, &idst, &ndsts);

/* Retrieve dataset parameters */
vdm_Dataset *dataset;
vdm_LibraryGetDataset(lib, idst, &dataset);
Vlong lrec; Vint nrow, ncol, ntyp;
vdm_DatasetInq(dataset, NULL, &lrec, &nrow, &ncol, &ntyp);

/* Allocate memory and read the data */
Vfloat *x = (Vfloat *)malloc(lrec * sizeof(Vfloat));
vdm_DataFunReadDataset(df, idst, (void *)x);

/* ... use the coordinates stored in x ... */

/* Clean up */
free(x);
vdm_DataFunClose(df);
vdm_SDRCLibEnd(sdrclib);
vdm_DataFunEnd(df);

This example illustrates the essential calls for reading a single dataset; in real applications you would typically use vdm_LManLoadModel() and vdm_LManLoadState() to load entire models and result states.