_BeamStress¶
- class _BeamStress(dll: SofDll)¶
Bases:
objectThis class provides methods and a data structure to:
access keys
105/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_CASE: the load case numberGROUP: the beam group numberELEM_ID: the beam numberPOS: position of the output station along the beam [m]POS_REL: relative position of the output station along the beam (0 to 1)POINT: identifier of the stress pointSIGC: minimum stress [kPa]SIGT: maximum stress [kPa]TAU: shear stress [kPa]SIGV: reference stress [kPa]SI: main tension stress [kPa]SII: main compression stress [kPa]
The
DataFrameuses a MultiIndex with levelsELEM_ID,LOAD_CASE,STATIONandPOINT(in this specific order) to enable fast lookups via thegetmethod. The index columns are not dropped from theDataFrame.Note
Not all available quantities are retrieved and stored. In particular:
admissible stresses for the cross-section’s material
maximum stresses in cross-section of beams
are currently not included. This is a deliberate design choice and may be changed in the future without breaking the existing API.
Important
The relative output station
POS_RELis rounded to two decimal places to prevent floating-point errors for lookups at the beam end (POS_REL = 1.0) or at any other intermediate station.- get(element_id: int, load_case: int, position: float, point: str, quantity: str, default: float | None = None) float¶
Retrieve the requested beam stress.
- Parameters:
element_id (int) – Beam element number
load_case (int) – Load case number
position (float) – Relative position of the output station along the beam (0 to 1)
point (str) – identifier of the stress point
quantity (str) –
Quantity to retrieve. Must be one of:
SIGCSIGTTAUSIGVSISII
default (float or None, default None) – Value to return if the requested quantity is not found
- Returns:
value – The requested value if found. If not found, returns
defaultwhen it is not None.- Return type:
- Raises:
LookupError – If the requested result is not found and
defaultis None.
- get_data(deep: bool = True) DataFrame¶
Return the
pandas.DataFramecontaining the loaded keys105/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).