DataEntry User Manual#

Overview#

The DataEntry class is designed to manage and organize information for a single dataset entry, specifically for exporting results to HDF5 files. It provides attributes and methods to handle dataset components like results type, load cases, increments, sections, and data arrays.

Example Usage#

1. Importing the module#

import NaxToPy as n2p
from NaxToPy.Modules.common.data_input_hdf5 import DataEntry
import numpy as np

2. Create an instance of DataEntry#

entry = DataEntry()

3. Set attributes#

entry.ResultsName = "STRESS"
entry.LoadCase = 101
entry.Increment = 2
entry.Section = "None"
entry.Data = np.array([(1, -0.243, 11.658), (2, 0.0, 613.2)], 
                      dtype=[("ID", "i4"), ("VALUE 1", "f4"), 
                      ("VALUE 2", "f8")])
entry.PartName = '0' 

Setup#

Prerequisites#

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

    • numpy

    • NaxToPy modules

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

Class Breakdown#

The class uses property methods to get and set attribute values, ensuring proper validation and logging. Below is a summary of key attributes:

Mandatory Inputs#

Property

Type

Description

Data

np.ndarray

Get or set the numpy array containing dataset results

LoadCase

int

Get or set the Load Case ID

Increment

int

Get or set the Increment ID

Section

str

Get or set the section name

PartName

str

Get or set the part name

Optional Inputs#

Property

Type

Description

ResultsName

str

Get or set the results type (e.g., “RESULTS”)

ResultsNameType

str

Must be one of “ELEMENT”, “CORNER”, or “NODE”

ResultsNameDescription

str

Get or set a description for the results

LoadCaseDescription

str

Get or set the Load Case description

IncrementValue

float

Get or set the Increment value

IncrementDescription

str

Get or set a description for the increment

SectionDescription

str

Get or set the section description

DataDescription

str

Get or set a description for the data

Advance Features#

  • This class is primarily used to prepare data for exporting to HDF5 files.

  • Proper validation and error handling ensure the integrity of the dataset.

  • Attributes like ResultsNameType enforce specific allowed values to maintain consistency in the dataset.

Common Errors#

  • E535: Error raised when an input is of a wrong instance.

Common Warnings#

  • W701: Warning raised when, while writing an HDF5, the element type is not element, corner or node


This guide serves as a comprehensive reference for using the DataEntry 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.