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.ResultsNameType = "ELEMENTS"  # Required: "ELEMENTS", "ELEMENT_NODAL", "NODES"
entry.LoadCase = 101
entry.LoadCaseName = "LC1"  # Required: Subtitle for the load case
entry.SolutionType = 101    # Required: Solution type (e.g., 101 for linear static)
entry.Increment = 2
entry.IncrementValue = 0.0  # Required: Increment value
entry.Section = "None"
entry.Part = "(0, 'Part_1_1')"  # Required: Must use this exact format
entry.Data = np.array([(1, -0.243, 11.658), (2, 0.0, 613.2)], 
                      dtype=[("ID ENTITY", "i4"), ("VALUE 1", "f4"), 
                      ("VALUE 2", "f4")])  # Note: all floats must have same precision

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

Numpy array containing dataset results

LoadCase

int

Load Case ID

LoadCaseName

str

Load Case subtitle (SUBTITLE attribute in HDF5)

Increment

int

Increment ID (default: 1)

IncrementValue

float

Increment value (default: 0.0)

Section

str

Section name (default: “None”)

Part

str

Part identifier. Format: "(<int>, '<text>')" e.g. "(0, 'Part_1_1')"

ResultsNameType

str

One of: "ELEMENTS", "ELEMENT_NODAL", "NODES" (default: "ELEMENTS")

SolutionType

int

Solution type identifier, e.g. 101 for Nastran SOL101 (default: 101)

Optional Inputs#

Property

Type

Description

ResultsName

str

Results group name (default: “RESULTS”)

ResultsNameDescription

str

Description for the results

LoadCaseDescription

str

Load Case description

IncrementDescription

str

Increment description

SectionDescription

str

Section description

DataDescription

str

Data description

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.