CableData¶
- class CableData(dll: SofDll)¶
Bases:
objectThis class provides methods and a data structure to:
access keys
160/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:GROUPelement groupELEM_IDelement numberN1id of the first nodeN2: id of the second nodeL0: initial length [m]PROPERTY: property number (cross-section)
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:
normal direction
prestress
element slip
maximum tension force
yielding load
reference axis
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¶
Retrieve the requested cable quantity.
- Parameters:
- 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 key160/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).