_BeamData

class _BeamData(dll: SofDll)

Bases: object

This class provides methods and a data structure to:

  • access keys 100/00 of the CDB file;

  • store the retrieved data in a convenient format;

  • provide access to the data after the CDB is closed.

The underlying data structure is a pandas.DataFrame with the following columns:

  • GROUP: group number

  • ELEM_ID: beam number

  • N1: start node

  • N2: end node

  • LENGTH: length [m]

  • T_00: transformation matrix

  • T_01: transformation matrix

  • T_02: transformation matrix

  • T_10: transformation matrix

  • T_11: transformation matrix

  • T_12: transformation matrix

  • T_20: transformation matrix

  • T_21: transformation matrix

  • T_22: transformation matrix

  • PROP_END_1: property number at start

  • PROP_END_2: property number at end

  • RELEASES_END_1: end releases at start

  • RELEASES_END_2: end releases at end

The DataFrame uses a MultiIndex with level ELEM_ID to enable fast lookups via the get method. The index column is not dropped from the DataFrame.

Note

Not all available quantities are retrieved and stored. In particular:

  • reference axis

  • distances along the reference axis

  • buckling length factors (YY and ZZ)

  • deformation length factors (YY and ZZ)

  • all remaining beam section information, other than end releases and cross section numbers

are currently not included.

This is a deliberate design choice and may be changed in the future without breaking the existing API.

clear() None

Clear all the loaded data.

get(element_id: int, quantity: str, default: float | int | None = None) float | int | str

Retrieve the requested beam quantity.

Parameters:
  • element_id (int) – Beam element number

  • quantity (str) –

    Quantity to retrieve. Must be one of:

    • "N1"

    • "N2"

    • "LENGTH"

    • "T00"

    • "T01"

    • "T02"

    • "T10"

    • "T11"

    • "T12"

    • "T20"

    • "T21"

    • "T22"

    • "PROP_END_1"

    • "PROP_END_2"

    • "RELEASES_END_1"

    • "RELEASES_END_2"

  • default (float or int or None, default None) – Value to return if the requested quantity is not found

Returns:

value – The requested quantity if found. Otherwise, returns default when it is not None.

Return type:

float or int

Raises:

LookupError – If the requested quantity is not found and default is None.

get_data(deep: bool = True) DataFrame

Return the pandas.DataFrame containing the loaded key 100/00.

Parameters:

deep (bool, default True) – When deep=True, a new object will be created with a copy of the calling object’s data and indices. Modifications to the data or indices of the copy will not be reflected in the original object (refer to pandas.DataFrame.copy() documentation for details).

load() None

Retrieve all beam data. If the key does not exist or it is empty, a warning is raised only if echo_level > 0.