BeamResults¶
- class BeamResults(dll: SofDll)¶
Bases:
objectThis class provides methods and a data structure to:
access keys
102/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)N: axial force [kN]VY: shear force Y [kN]VZ: shear force Z [kN]MT: torsional moment [kNm]MY: bending moment around Y [kNm]MZ: bending moment around Z [kNm]MB: warping moment [kNm]MT2: second torsional moment [kNm]
The
DataFrameuses a MultiIndex with levelsELEM_ID,LOAD_CASEandSTATION(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:
displacements and rotations in local coordinates
twist angle
3rd torsional moment
axial and transverse beddings
local y and z components of the transverse beddings
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, quantity: str, default: float | None = None) float¶
Retrieve the requested beam result.
- 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)
quantity (str) –
Quantity to retrieve. Must be one of:
NVYVZMTMYMZMBMT2
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 keys102/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).