FeResPost Web Site                     FeResPost Online User Manual

III.1.1.11 Attaching “HDF” files to a Nastran DataBase

Since version 4.5.0 of FeResPost, it is possible to read results from Nastran HDF5 files. The operation is done in several steps:

The different methods called to perform these operations are described in the following sub-sections.

III.1.1.11.1 Reading Results fron an HDF file

The “readHdf” method is used to read Results into the DataBase from an “hdf” file generated by Nastran. (Only Results can be read from a Nastran “hdf” file.) The method has up to four arguments:

1.

A String argument that corresponds to the name of the file from which Results are read.

2.

A String or an Array of Strings corresponding to the names of load cases for which Results are imported into the DataBase. If the Array is void or the parameter is omitted, all load cases in hdf result files are considered when results are read.

3.

A String or an Array of Strings corresponding to the names of subcases for which Results are imported into the DataBase. If the Array is void or the parameter is omitted, all sub-cases in hdf result files are considered when results are read.

4.

A String or an Array of Strings corresponding to the identifiers of Results for which Results are imported into the DataBase. If the Array is void or the parameter is omitted, all Results of hdf result files are considered when results are read.

All parameters, except the first one, can be omitted. Then the method assumes that a void Array has been passed as argument.

This method is a kind of wrapper to several methods described above. If necessary, FeResPost attaches the HDF file, imports the results into the database, and closes the attachment. If the HDF is alread attached, no attachment/detachment is done.

The “readHdf2H” method is used to read Results from an “hdf” file generated by Nastran and return them into an Hash object. Arguments are the same as those of “readHdf” method.

III.1.1.11.2 Managing HDF file attachments

The method “attachHdf” is used to attach an HDF file to the Nastran DataBase. This method has up one argument: a String containing the name of the HDF file. (Full path name must be provided.)

Several other methods are used to manage the Hdf attachments to a DataBase:

III.1.1.11.3 Extracting information from HDF file attachments

The following methods extract information related to the Results stored in an HDF file attached to the DataBase:

All these methods have a single String argument containing the name of the HDF file that must have been previously attached to the DataBase. On the other hand, the following methods have one or two arguments:

The first argument is the name of the HDF file that must have been previously attached to the DataBase. The second argument is optional and corresponds to the name of a load case found in the attached HDF file. If the argument is not provided, all the load cases are investigated to build the list of sub-cases or Result names or IDs. If the argument is provided, only the sub-cases or Results of the corresponding load case are considered. If the provided load case does not exist in HDF attachment an error message is issued.

III.1.1.11.4 Extracting Results From HDF file attachments

Two methods are used to extract results from Nastran HDF files:

The two methods have up to four arguments:

1.

A String corresponding to the name of HDF file attachment from which Results are read. (This file must have been previously attached to the DataBase.)

2.

A String or an Array of Strings corresponding to the names of load cases for which Results are read.

3.

A String or an Array of Strings corresponding to the names of sub-cases for which Results are read.

4.

A String or an Array of Strings corresponding to the names of Results for which Results are read.

One lists below valid calls to “getHdfAttachmentResults”:

    h=db.getHdfAttachmentResults(hdfName,lcNames,scNames,resNames)
    h=db.getHdfAttachmentResults(hdfName,lcNames,scNames)
    h=db.getHdfAttachmentResults(hdfName,lcNames)
    h=db.getHdfAttachmentResults(hdfName)

Similar calls work for “readHdfAttachmentResults” method:

    db.readHdfAttachmentResults(hdfName,lcNames,scNames,resNames)
    db.readHdfAttachmentResults(hdfName,lcNames,scNames)
    db.readHdfAttachmentResults(hdfName,lcNames)
    db.readHdfAttachmentResults(hdfName)

When one of the “lcNames”, “scNames” or “resNames” is missing, nil or an empty Array, all the load cases, sub-cases or result types are read. “getHdfAttachmentResults” method is very similar to the “getAttachmentResults” method used to extract Results from Nastran XDB result files.

III.1.1.11.5 Raw access to HDF Datasets

Several methods can be used to obtain a “raw” access to Nastran HDF Datasets:

Remarks: