NodeLoad

class NodeLoad(dll: SofDll)

Bases: object

The NodeLoad class provides abstractions to load and access information about the nodal loads, contained in keys 23/LC of the CDB file.

Data are stored in a pandas.DataFrame having the following columns:

  • LOAD_CASE: load combination number

  • ID: node number

  • PX: X component of the nodal load (force, [kN])

  • PY: Y component of the nodal load (force, [kN])

  • PZ: Z component of the nodal load (force, [kN])

  • MX: X component of the nodal load (moment, [kN/m])

  • MY: Y component of the nodal load (moment, [kN/m])

  • MZ: Z component of the nodal load (moment, [kN/m])

  • MB: warping of the nodal load (moment, [kN/m])

clear(load_case: int) None

Clear the loaded data for the given load_case number.

clear_all() None

Clear the loaded data for all the load cases.

get(node_id: int, load_case: int, quantity: str, default: float | None = None) float

Retrieve the requested nodal load.

Parameters:
  • node_id (int) – Node number

  • load_case (int) – Load case number

  • quantity (str) –

    Quantity to retrieve. Must be one of:

    • PX

    • PY

    • PZ

    • MX

    • MY

    • MZ

    • MB

  • 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 default when it is not None.

Return type:

float

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_data method.

Raises:

LookupError – If the requested load is not found and default is None.

get_data(deep: bool = True) DataFrame

Return the pandas.DataFrame containing the loaded keys 23/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 to pandas.DataFrame.copy() documentation for details).

is_loaded(load_case: int) bool

Return True if the loads have been loaded for the given load_case.

load(load_cases: int | list[int]) None

Retrieve nodal loads for the given load_cases. If a load case is not found, a warning is raised only if echo_level > 0.

Parameters:

load_cases (int | list[int]) – load case numbers