_BeamData¶
- class _BeamData(dll: SofDll)¶
Bases:
objectThis class provides methods and a data structure to:
access keys
100/00of 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.DataFramewith the following columns:GROUP: group numberELEM_ID: beam numberN1: start nodeN2: end nodeLENGTH: length [m]T_00: transformation matrixT_01: transformation matrixT_02: transformation matrixT_10: transformation matrixT_11: transformation matrixT_12: transformation matrixT_20: transformation matrixT_21: transformation matrixT_22: transformation matrixPROP_END_1: property number at startPROP_END_2: property number at endRELEASES_END_1: end releases at startRELEASES_END_2: end releases at end
The
DataFrameuses a MultiIndex with levelELEM_IDto enable fast lookups via thegetmethod. The index column is not dropped from theDataFrame.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.
- 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
defaultwhen it is not None.- Return type:
- Raises:
LookupError – If the requested quantity is not found and
defaultis None.
- get_data(deep: bool = True) DataFrame¶
Return the
pandas.DataFramecontaining the loaded key100/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 topandas.DataFrame.copy()documentation for details).