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.
- Parameters:
floor (float)
roof (float)
staircase (float)
- floor
Live load on the floor (kN/m^2).
- Type:
float
- roof
Live load on the roof (kN/m^2).
- Type:
float
- staircase
Live load on the staircase (kN/m^2).
- Type:
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.
- Parameters:
floor (float)
roof (float)
staircase (float)
gamma_rc (float)
- floor
Superimposed dead load on the floor (kN/m^2).
- Type:
float
- roof
Superimposed dead load on the roof (kN/m^2).
- Type:
float
- staircase
Superimposed dead load on the staircase (kN/m^2).
- Type:
float
- gamma_rc
Unit weight of reinforced concrete (kN/m^3).
- Type:
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).
- 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
Tag identifying the load combination.
- Type:
str
- loads
Dictionary containing load tags and factors corresponding to each load type in the load combination.
- Type:
Dict[Literal[“G”, “Q”, “E+X”, “E-X”, “E+Y”, “E-Y”], float]
- masses
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.- Type:
Dict[Literal[“G”, “Q”], float], optional
- 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.
- Parameters:
variable (VariableBase)
permanent (PermanentBase)
combinations (List[CombinationBase])
eccentricity (float)
- variable
Object representing variable (live) loads.
- Type:
- permanent
Object representing permanent (dead) loads.
- Type:
- combinations
List of load combination objects.
- Type:
List[CombinationBase]
- eccentricity
Accidental eccentricity to be considered in the earthquake loading direction, expressed as a percentage (e.g.
5.0for 5%). Defaults to0.0.- Type:
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.- variable
Object representing variable (live) loads.
- Type:
- permanent
Object representing permanent (dead) loads.
- Type:
- combinations
List of load combinations.
- Type:
List[CombinationBase]
- eccentricity
Accidental eccentricity to be considered in the earthquake loading direction, expressed as a percentage (e.g.
5.0for 5%).- Type:
float
- _data_path
Class variable — must be defined by subclass. Path to the JSON file containing loads data.
- Type:
Path or str
- _data_model
Class variable — must be defined by subclass. Pydantic model used to validate and parse the loads data file.
- Type:
Type[LoadsDataBase]
- 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.
- 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]