FeResPost Web Site                     FeResPost Online User Manual

IV.2.9 Reading Results From Nastran HDF file

Example “RUBY/EX23/testHDF.rb” illustrates the reading of Nastran HDF file results. First, the library must be loaded:

    Post.loadHdf5Library("C:/NewProgs/HDF5/HDF5-1.14.6-win64/bin/hdf5.dll")

(More information on loading the library is given in section I.6.11.)

Then, the different methods described in section III.1.1.12 are used to access results stored in the HDF file. In the example below, HDF file is attached to the database, the available load case names, subcase name and result names are retrieved, and some of the Results are read into the database.

    db.attachHdf(hdfName)
    lcNames=db.getHdfAttachmentLcNames(hdfName)
    lcName=lcNames[0]
    scNames=db.getHdfAttachmentScNames(hdfName,lcName)
    scName=scNames[0]
    resNames=db.getHdfAttachmentResNames(hdfName,lcName)
    hdfResNames=resNames.clone

    db.getHdfAttachmentLcInfos(hdfName).each do |info|
        os.printf("%s%30s%8d%8d%14f%14f\n",
            info[0],info[1],info[3],info[4],info[5],info[6])
    end

    db.readHdfAttachmentResults(hdfName,lcName,scName,resNames)