CableLoad¶
- class CableLoad(dll: SofDll)¶
Bases:
objectThis class provides methods and a data structure to:
access keys
161/LCof 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:LOAD_CASEload case numberGROUPelement groupELEM_IDelement numberTYPEload typePA: load value at cable start pointPE: load value at cable end point
The
DataFrameuses a MultiIndex with levelsELEM_ID,LOAD_CASEandTYPE(in this specific order) to enable fast lookups via thegetmethod. The index columns are not dropped from theDataFrame.The load
TYPEcan be one of the following:PGLoad in gravity directionPXXLoad in global X-directionPYYLoad in global Y-directionPZZLoad in global Z-directionPXPLoad in global x-direction measured in projectionPYPLoad in global y-direction measured in projectionPZPLoad in global z-direction measured in projectionEXStrain in axial directionVXPrestressWXChange of lengthDTTemperature difference
Important
Wind and snow loads are not implemented and will raise a runtime error if they are present in the requested load case.
- get(element_id: int, load_case: int, load_type: str, point: str = 'PA', default: float | None = None) float¶
Retrieve the requested cable load.
- Parameters:
element_id (int) – Cable element number
load_case (int) – Load case number
load_type (str) –
Load type to retrieve. Must be one of:
"PG""PXX""PYY""PZZ""EX""WX""DT""VX""PXP""PYP""PZP"
point (str, default "PA") – Location on the cable where the load is applied; either the start (
"PA") or the end ("PE")default (float or None, default None) – Value to return if the requested load is not found
- Returns:
value – The requested load if found. Otherwise, returns
defaultwhen it is not None.- Return type:
Notes
If there are multiple entries for the same node and load case, this method returns the sum of all corresponding values. To access the individual entries without aggregation, use the
get_datamethod.- Raises:
LookupError – If the requested load is not found and
defaultis None.
- get_data(deep: bool = True) DataFrame¶
Return the
pandas.DataFramecontaining the loaded keys161/LC.- 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).