HDF5 User Manual#

Overview#

The HDF5 module is designed to export results from any NaxToPy module to a .h5 file(NaxTo format) so that every module exports their results in the same format. Only results that can be graphically displayed in NaxToView should be exported using this tool, as these results must be floats (or integers) associated to an element and a load case.

Example Usage#

1. Importing the module#

import NaxToPy as n2p
from NaxToPy.Modules.common.hdf5 import HDF5_NaxTo

2. Create and configure the HDF5_NaxTo instance#

h5 = HDF5_NaxTo()

3. Create the HDF5 file#

3.1. Create the file in disk#

h5.FilePath = r"C:\user\Testing\myFile.h5"
h5.create_hdf5() 

3.2. Create the file in memory#

h5.create_hdf5()

4. Assign the list of the DataEntry instances#

myDataEntry = DataEntry() 
myDataEntry.LoadCase = 333 
myDataEntry.Increment = 1 
myDataEntry.ResultsName = "Bypass loads"
myDataEntry.ResultsType = "ELEMENT" 
myDataEntry.Section = "None" 
myDataEntry.PartName = "0" 
myDataEntry.Data = np.array([(1, 261.23, -45.9, 68.2)], np.dtype([("ID_ENTITY", "i4"), ("NX_BYPASS", "f4"), ("NY_BYPASS", "f4"), ("NXY_BYPASS", "f4")]))

See [Ref-1]

5. Write the dataset#

h5.write_dataset([myDataEntry])

Setup#

Prerequisites#

  • Python Enviroment: Ensure you have a compatible Python environment with the following libraries:

    • Numpy

    • NaxToy modules

  • NaxToPy Framework: The module integrates with the NaxToPy library, which must be installed and configured in your environment.

Class Breakdown#

The HDF5_NaxTo class has the following properties:

Optional Inputs#

Property

Type

Description

FilePath

str

Path where the file has been created

FileDescription

str

Optional description

MemoryFile

bool

Shows whether the file has been created in disk (False) or in memory (True). By default is false.

Common Errors#

  • E535: An input is of the wrong instance, and the default value canot be used.

  • E700: A DataEntry is trying to write in a previously created dataset and their datatypes do not match.

Common Warnings#

  • W527: An input is of the wrong instance, so the default value will be used.

  • W700: A DataEntry instance does not have all of its necessary information, so its data will not be written.

References#

  • [Ref-1]: Data Entry User Manual.


This guide serves as a comprehensive reference for using the HDF5 Module in structural analysis tasks. For further information, refer to the source code comments and examples provided.


Idaero Icon

© 2025 Idaero Solutions S.L. All rights reserved.This document is licensed under the terms of the LICENSE of the NaxToPy package.