simdesign.rcmrf.bdim.baselib.loads
This module provides base classes for representing loads within the BDIM layer.
- class simdesign.rcmrf.bdim.baselib.loads.VariableBase(*, floor, roof, staircase)[source]
Bases:
BaseModel,ABCAbstract base class representing live loads (Q).
Subclasses must provide the field values appropriate to the design class.
- Variables:
floor (float) – Live load on the floor (kN/m^2).
roof (float) – Live load on the roof (kN/m^2).
staircase (float) – Live load on the staircase (kN/m^2).
- Parameters:
floor (float)
roof (float)
staircase (float)
- floor: float
- roof: float
- staircase: float
- class simdesign.rcmrf.bdim.baselib.loads.PermanentBase(*, floor, roof, staircase, gamma_rc)[source]
Bases:
BaseModel,ABCAbstract base class representing superimposed dead loads (G).
Subclasses must provide the field values appropriate to the design class.
- Variables:
floor (float) – Superimposed dead load on the floor (kN/m^2).
roof (float) – Superimposed dead load on the roof (kN/m^2).
staircase (float) – Superimposed dead load on the staircase (kN/m^2).
gamma_rc (float) – Unit weight of reinforced concrete (kN/m^3).
- Parameters:
floor (float)
roof (float)
staircase (float)
gamma_rc (float)
- floor: float
- roof: float
- staircase: float
- gamma_rc: float
- class simdesign.rcmrf.bdim.baselib.loads.CombinationBase(*, tag, loads, masses=None)[source]
Bases:
BaseModel,ABCAbstract base class representing a load combination.
Subclasses must provide the field values appropriate to the design class. The load combination can include dead loads (G), live loads (Q), and seismic loads (E+X, E-X, E+Y, E-Y).
- Variables:
tag (str) – Tag identifying the load combination.
loads (Dict[Literal["G", "Q", "E+X", "E-X", "E+Y", "E-Y"], float]) – Dictionary containing load tags and factors corresponding to each load type in the load combination.
masses (Dict[Literal["G", "Q"], float], optional) – Dictionary containing mass sources and factors used to compute seismic loads considered in the load combination. If not provided, defaults are assigned automatically by
LoadsBase._set_mass_sourcesbased on the gravity load factors present inloads.
- Parameters:
tag (str)
loads (Dict[Literal['G', 'Q', 'E+X', 'E-X', 'E+Y', 'E-Y'], float])
masses (Dict[Literal['G', 'Q'], float] | None)
- tag: str
- loads: Dict[Literal['G', 'Q', 'E+X', 'E-X', 'E+Y', 'E-Y'], float]
- masses: Dict[Literal['G', 'Q'], float] | None
- class simdesign.rcmrf.bdim.baselib.loads.LoadsDataBase(*, variable, permanent, combinations, eccentricity=0.0)[source]
Bases:
BaseModel,ABCAbstract base class representing the aggregated loads data.
Subclasses must provide the field values appropriate to the design class.
- Variables:
variable (VariableBase) – Object representing variable (live) loads.
permanent (PermanentBase) – Object representing permanent (dead) loads.
combinations (List[CombinationBase]) – List of load combination objects.
eccentricity (float) – Accidental eccentricity to be considered in the earthquake loading direction, expressed as a percentage (e.g.
5.0for 5%). Defaults to0.0.
- Parameters:
variable (VariableBase)
permanent (PermanentBase)
combinations (List[CombinationBase])
eccentricity (float)
- variable: VariableBase
- permanent: PermanentBase
- combinations: List[CombinationBase]
- eccentricity: float
- class simdesign.rcmrf.bdim.baselib.loads.LoadsBase[source]
Bases:
ABCAbstract base class for reading loads data from a JSON file.
Subclasses must define the class variables
_data_pathand_data_modelbefore instantiation, as__init__depends on both. Failing to do so will raise anAttributeErrorat runtime.- Variables:
variable (VariableBase) – Object representing variable (live) loads.
permanent (PermanentBase) – Object representing permanent (dead) loads.
combinations (List[CombinationBase]) – List of load combinations.
eccentricity (float) – Accidental eccentricity to be considered in the earthquake loading direction, expressed as a percentage (e.g.
5.0for 5%)._data_path (Path or str) – Class variable — must be defined by subclass. Path to the JSON file containing loads data.
_data_model (Type[LoadsDataBase]) – Class variable — must be defined by subclass. Pydantic model used to validate and parse the loads data file.
- classmethod get_data_path()[source]
Return the path to the
loads.jsondata file associated with the class.The path is resolved relative to the module where the class is defined, allowing subclasses to automatically reference their own
datadirectory.- Returns:
Absolute path to the
loads.jsonfile located in the design class-specificdatafolder.- Return type:
Path
TODO
Utilise this method in the future instead of _data_path attribute.
- permanent: PermanentBase
- variable: VariableBase
- combinations: List[CombinationBase]
- eccentricity: float
- get_seismic_load_combos()[source]
Return load combinations containing seismic loading.
- Returns:
List of seismic load combinations.
- Return type:
List[CombinationBase]
- get_gravity_load_combos()[source]
Return load combinations containing only gravity loads.
Other gravity loads such as snow (S) can be added. In that case, this method should be overridden in the subclass to extend
grav_strswith the additional load keys (e.g.["G", "Q", "S"]).- Returns:
List of gravity load combinations.
- Return type:
List[CombinationBase]
- get_seismic_loads(beta, weights, heights)[source]
Calculate and return seismic loads (E).
- Parameters:
beta (float) – Design lateral load factor expressed as a fraction of building weight.
weights (np.ndarray) – Array of storey weights. Units must be consistent with those used for
heights(e.g. kN if heights are in m).heights (np.ndarray) – Array of storey heights measured from the base, one entry per storey. Must be the same length as
weightsand use consistent units.
- Returns:
base_shear (np.float64) – Total base shear force, in the same units as
weights.forces (np.ndarray) – Seismic forces acting at each storey, distributed proportionally to the product of weight and height. Same shape as
weights.
- Return type:
Tuple[float64, ndarray]