6.1. Initialisation
- modeller.__init__(number_storeys, storey_heights, floor_masses, storey_drifts, storey_forces, degradation)[source]
Initializes the modeller object and validates the input parameters.
- Parameters:
number_storeys (int) – The number of storeys in the building model.
storey_heights (list) – List of storey heights in meters (e.g., [2.5, 3.0]).
floor_masses (list) – List of floor masses in tonnes (e.g., [1000, 1200]).
storey_drifts (np.array) – Array of inter-storey displacements (size = number of storeys, CapPoints).
storey_forces (np.array) – Array of storey forces (size = number of storeys, CapPoints).
degradation (bool) – Boolean to enable or disable hysteresis degradation.
- Raises:
TypeError – If any input has an incorrect type.
ValueError – If any input has an invalid value or inconsistent dimensions.
Example
import numpy as np
from openquake.vmtk.modeller import modeller
m = modeller(
number_storeys=2,
storey_heights=[3.0, 3.0],
floor_masses=[120.0, 100.0],
storey_drifts=np.array([[0., 0.005, 0.02, 0.06],
[0., 0.005, 0.02, 0.06]]),
storey_forces=np.array([[0., 250., 320., 200.],
[0., 220., 280., 180.]]),
)