Skip to content

Loading and Failure Check#

The loading and failure check module provides functionality for calculating loads on structures and determining failure conditions.

Class Diagram#

classDiagram
    class BaseLoad {
        +Building
        +WindOrientation
        +WindSpeed
        +MWFRSCp
        +CCRoofGCp
        +CCWallGCp
        +update_outputs()
        +load_MWFRSCp()
        +load_CCRoofGCp()
        +load_CCWallGCp()
    }
    class BaseLoadDefaults {
        +G
        +GCpi
    }
    class BaseFailureCheck {
        +rRSt
        +rRCt
        +rRWCt
        +rOt
        +rWt
    }
    class PreProcessLoad {
        +PressureZoneCoordinate
        +NumZone
        +PressureZoneArea
        +PanelArea
        +fn_preprocess_rs()
        +fn_pressure_zone_coordinate()
    }
    class InitialLoad {
        +qh
        +pW
        +pRS
        +pRC
        +pRWC
        +pO
    }
    class InitialFailureCheck {
        +fn_initial_failure_check()
    }
    class FinalLoad {
        +pInternal
        +pfRS
        +pfRWC
        +pfO
        +pfRC
        +pfW
    }
    class FinalFailureCheck {
        +RWCFails
        +fn_final_failure_check_w()
        +fn_final_failure_check_rwc()
    }
    class LoadingAndFailureCheck {
        +update_inputs_and_outputs()
        +get_final_resistance()
        +get_final_loads()
    }

    BaseLoadDefaults <|-- PreProcessLoad
    BaseLoad <|-- PreProcessLoad
    PreProcessLoad <|-- InitialLoad
    InitialLoad <|-- InitialFailureCheck
    InitialFailureCheck <|-- FinalLoad
    FinalLoad <|-- FinalFailureCheck
    FinalFailureCheck <|-- LoadingAndFailureCheck
    BaseFailureCheck <|-- InitialFailureCheck

Initial Loading#

initial_loading #

Classes:

Name Description
InitialLoad

Represents the InitialLoad, which is used to calculate initial wind loads on various structural components

InitialLoad dataclass #

InitialLoad(
    Building: Building,
    WindOrientation: int,
    WindSpeed: float,
    datasets_loaded: bool = False,
    G: float = 0.85,
    GCpi: float = 0.18,
)

Bases: PreProcessLoad

Represents the InitialLoad, which is used to calculate initial wind loads on various structural components based on the Main Wind Force Resisting System (MWFRS) and Components & Cladding (C&C) for different zones as defined by ASCE standards.

Attributes:

Name Type Description
qh float

Velocity pressure.

pW ndarray

Initial load for wall.

pRS ndarray

Initial load for roof sheathing.

pRC ndarray

Initial load for roof covering.

pRWC ndarray

Initial load for roof-to-wall connection.

pO ndarray

Initial wind pressure on each opening.

Methods:

Name Description
fn_initial_load_w

Calculates initial wind pressure on each wall (W).

fn_initial_load_o

Calculates initial wind pressure on each opening (O).

fn_initial_load_rwc

Calculates initial wind pressure on each roof-to-wall connection (RWC).

fn_initial_load_rc

Calculates initial wind pressure on each panel of roof covering (RC).

fn_initial_load_rs

Calculates initial wind pressure on each panel of roof sheathing (RS).

Inherited attributes used in this class
  • WindSpeed (float): The wind speed in mph for the wind-pressure equations.
  • WindOrientation (int): The wind orientation index.
  • Building (Building): An object of Building class.
  • PressureZoneArea (np.ndarray): The area of each pressure zone.
  • GCpi (float): The ASCE-defined internal pressure coefficient.
  • G (float): Gust factor, to be applied to obtain GCp.
  • MWFRSCp (np.ndarray): Coefficient values for Main Wind Force Resisting System for zones 1 - 8.
  • CCRoofGCp (np.ndarray): Wind pressure coefficient values for Roof C&C (ASCE-defined).
  • CCWallGCp (np.ndarray): Wind pressure coefficient values for Wall C&C (ASCE-defined).
Notes

The attributes defined in the class are initialized in the constructor, and then updated in the __post_init__ method.

fn_initial_load_o #

fn_initial_load_o() -> ndarray

Calculates the initial wind pressure on each opening (O).

This method uses the external wind pressure coefficient and building characteristics to determine the initial wind pressure on various types of openings, including doors and windows, based on their location and count in the building structure.

Notes

Instance attributes used:

  • qh (float): The external wind pressure coefficient.
  • CCWallGCp (list): The coordinates of the wall's centerline.
  • Building (Building): An object of the Building class, which contains the following used attributes:
    • DoorFront: The number of front doors.
    • DoorBack: The number of back doors.
    • DoorGarage: The number of garage doors.
    • OpeningFront: The number of front openings.
    • OpeningBack: The number of back openings.
    • OpeningSideH: The number of side openings on the edge.
    • OpeningSideR: The number of side openings not on the edge.
Outputs

None beyond the returned value.

Returns:

Type Description
ndarray

np.ndarray: The initial opening load array.

fn_initial_load_rc #

fn_initial_load_rc() -> ndarray

Calculates the initial wind pressure on each panel of roof covering (RC).

This method derives the initial wind pressure on roof covering panels directly from the calculated initial wind pressure on roof sheathing panels, as the two are closely related in terms of their exposure to wind pressures.

Notes

Instance attributes used:

  • pRS (np.ndarray): The initial wind pressure on each panel of roof sheathing.
Outputs

None beyond the returned value.

Returns:

Type Description
ndarray

np.ndarray: The initial roof covering load array.

fn_initial_load_rs #

fn_initial_load_rs() -> ndarray

Calculates the initial wind pressure on each panel of roof sheathing (RS).

This method takes into account the wind orientation, internal and external pressure coefficients, the coordinates of the roof's centerline, and the area of each pressure zone to determine the initial wind pressure on roof sheathing panels. These factors are essential in accurately assessing the wind loads that affect the structural integrity of the roof sheathing.

Notes

Instance attributes used:

  • WindOrientationIndex (int): The orientation of the wind direction.
  • GCpi (float): The ASCE-defined internal pressure coefficient.
  • qh (float): The external wind pressure coefficient.
  • CCRoofGCp (list): The coordinates of the roof's centerline.
  • PressureZoneArea (numpy.ndarray): The area of each pressure zone.
Outputs

None beyond the returned value.

Returns:

Type Description
ndarray

np.ndarray: The initial roof sheathing load array.

fn_initial_load_rwc #

fn_initial_load_rwc() -> ndarray

Calculates the initial wind pressure on each roof-to-wall connection (RWC).

This method utilizes the area of each pressure zone, internal and external pressure coefficients, and building characteristics including the number of connections, panel counts, roof shape, dimensions, and the coordinates of connections and panels to determine the initial loads on roof-to-wall connections.

Notes

Instance attributes used:

  • PressureZoneArea (numpy.array): The area of each pressure zone.
  • GCpi (float): The ASCE-defined internal pressure coefficient.
  • qh (float): The external wind pressure coefficient.
  • CCRoofGCp (list): The coordinates of the roof's centerline.
  • Building (Building): An object of the Building class, which contains the following used attributes:
    • NumConnection: The number of connections in the building.
    • NumPanel: An array containing the number of panels on each side of the building.
    • RoofShape: The shape of the roof.
    • HipRidgeAngle: The angle of the hip ridge of the building.
    • RoofWidth: The width of the roof.
    • BldgLength: The length of the building.
    • BldgWidth: The width of the building.
    • ConnectionCoordinate: The coordinates of the connections in the building.
    • PanelCoordinate: The coordinates of the panels in the building.
Outputs

None beyond the returned value.

Returns:

Type Description
ndarray

np.ndarray: The initial roof-to-wall connection load array.

fn_initial_load_w #

fn_initial_load_w() -> ndarray

Calculates the initial wind pressure on each wall (W).

This method considers various factors such as the orientation of the wind, gust factor, internal and external pressure coefficients, material weight factors, and building attributes to determine the initial wind loads on each wall.

Notes

Instance attributes used:

  • WindOrientationIndex (int): The orientation of the wind direction.
  • G (float): The gust factor, applied to obtain GCp.
  • GCpi (float): The ASCE-defined internal pressure coefficient.
  • qh (float): The external wind pressure coefficient.
  • MWFRSCp (list): The material weight factor for roof, shear wall, and column.
  • pRWC (list): The roof-to-wall connection loads.
  • Building (Building): An instance of the Building class. It uses the following attributes:
    • NumPanel: An array containing the number of panels on each side of the building.
    • RoofWidth: The width of the roof.
    • MeanRoofHeight: The mean height of the roof.
    • WallHeight: The height of the wall.
    • BldgLength: The length of the building.
    • RoofWidth: The width of the roof.
    • Material: The material of the building.
    • RoofShape: The shape of the roof.
    • NumConnection: The number of connections in the building.
    • WallFloorCon_FrontBack: The wall floor connection at the front and back of the building.
    • WallFloorCon_Side: The wall floor connection at the sides of the building.
    • DoorFront: The number of front doors.
    • DoorBack: The number of back doors.
    • DoorGarage: The number of garage doors.
    • OpeningFront: The number of front openings.
    • OpeningBack: The number of back openings.
    • OpeningSideH: The number of side openings on the edge.
    • OpeningSideR: The number of side openings not on the edge.
Outputs

None beyond the returned value.

Returns:

Type Description
ndarray

np.ndarray: The initial wall load matrix.

Initial Failure Check#

initial_failure_check #

Classes:

Name Description
InitialFailureCheck

A class used to represent the InitialFailureCheck.

InitialFailureCheck dataclass #

InitialFailureCheck(
    rRSt: ndarray,
    rRCt: ndarray,
    rRWCt: ndarray,
    rOt: ndarray,
    rWt: ndarray,
    Building: Building,
    WindOrientation: int,
    WindSpeed: float,
    datasets_loaded: bool = False,
    G: float = 0.85,
    GCpi: float = 0.18,
)

Bases: InitialLoad, BaseFailureCheck

A class used to represent the InitialFailureCheck.

Methods:

Name Description
fn_initial_failure_check

Initial failure check.

Inherited attributes used in this class
  • rRSt (np.ndarray): Initial roof sheathings resistance values.
  • rRCt (np.ndarray): Initial roof coverings resistance values.
  • rRWCt (np.ndarray): Initial roof-wall connections resistance values.
  • rOt (np.ndarray): Initial openings resistance values.
  • rWt (np.ndarray): Initial walls resistance values.
  • pRS (np.ndarray): Initial load for roof sheathing.
  • pO (np.ndarray): Initial wind pressure on each opening.
  • pW (np.ndarray): Initial load for wall.
Notes

The resistance values (starting with r) could not be defined in the class attributes due to compatibility issues of dataclass decorator with Python 3.9 and 3.10. Therefore, they are defined in the base class.

fn_initial_failure_check #

fn_initial_failure_check() -> dict[str, object]

Performs the initial failure check by comparing the initial loads with the resistance values.

Notes

Instance attributes used:

  • rRSt (np.ndarray): Initial roof sheathings resistance values.
  • rRCt (np.ndarray): Initial roof coverings resistance values.
  • rRWCt (np.ndarray): Initial roof-wall connections resistance values.
  • rOt (np.ndarray): Initial openings resistance values.
  • rWt (np.ndarray): Initial walls resistance values.
  • pRS (np.ndarray): Initial load for roof sheathing.
  • pO (np.ndarray): Initial wind pressure on each opening.
  • pW (np.ndarray): Initial load for wall.
Outputs

None beyond the returned value.

Returns:

Type Description
dict[str, object]

dict[str, object]: The updated resistance arrays keyed by component name.

Final Loading#

final_loading #

Classes:

Name Description
FinalLoad

A class used to represent the FinalLoad.

FinalLoad dataclass #

FinalLoad(
    rRSt: ndarray,
    rRCt: ndarray,
    rRWCt: ndarray,
    rOt: ndarray,
    rWt: ndarray,
    Building: Building,
    WindOrientation: int,
    WindSpeed: float,
    datasets_loaded: bool = False,
    G: float = 0.85,
    GCpi: float = 0.18,
)

Bases: InitialFailureCheck

A class used to represent the FinalLoad.

Attributes:

Name Type Description
pInternal float

The internal pressure after initial failure check.

pfRS ndarray

The final wind pressures on each panel of roof sheathing.

pfRWC ndarray

The final wind pressure on each roof-to-wall connection.

pfO ndarray

The final wind pressure on each opening.

pfRC ndarray

The final load on a roof column.

pfW ndarray

The final loads on walls due to wind.

Methods:

Name Description
fn_pressure_internal

Calculate internal pressure after initial failure check.

fn_final_load_w

Calculates the final loads on walls due to wind.

fn_final_load_rc

This function calculates the final load on a roof column.

fn_final_load_o

Calculate final wind pressure on each opening.

fn_final_load_rwc

Calculate final wind pressure on each roof-to-wall connection.

fn_final_load_rs

Calculate final wind pressure on each panel of roof sheathing.

Inherited attributes used in this class
  • rRSt (np.ndarray): Initial roof sheathings resistance values.
  • rRCt (np.ndarray): Initial roof coverings resistance values.
  • rRWCt (np.ndarray): Initial roof-wall connections resistance values.
  • rOt (np.ndarray): Initial openings resistance values.
  • rWt (np.ndarray): Initial walls resistance values.
  • pRS (np.ndarray): Initial load for roof sheathing.
  • pO (np.ndarray): Initial wind pressure on each opening.
  • pW (np.ndarray): Initial load for wall.
  • pRWC (np.ndarray): The initial wind pressure on each roof-to-wall connection.
  • Building (Building): An object of Building class, which contains the following used attributes:
  • qh (float): Velocity pressure.
  • G (float): Gust effect factor.
  • GCpi (float): Internal pressure coefficient.
  • CCRoofGCp (np.ndarray): Wind pressure coefficient values for Roof C&C (ASCE-defined).
  • MWFRSCp (np.ndarray): Main Wind Force Resisting System coefficient values for zones 1 - 8.
  • WindOrientation (int): The wind orientation index.
Notes

The attributes defined in the class are initialized in the constructor, and then updated in the __post_init__ method.

fn_final_load_o #

fn_final_load_o() -> list[float]

Calculate final wind pressure on each opening.

Notes

Instance attributes used:

  • Building (Building): An object of Building class, which contains the following used attributes:
    • DoorFront: The number of front doors.
    • DoorBack: The number of back doors.
    • DoorGarage: The number of garage doors.
    • OpeningFront: The number of front windows.
    • OpeningBack: The number of back windows.
    • OpeningSideR: The number of side windows on the right.
    • OpeningSideH: The number of side windows on the left.
  • qh (float): Velocity pressure.
  • G (float): Gust effect factor.
  • GCpi (float): Internal pressure coefficient.
  • CCWallGCp (np.ndarray): Wind pressure coefficient values for Wall C&C (ASCE-defined).
  • pInternal (float): The internal pressure after initial failure check.
  • WindOrientation (int): The wind orientation index.
Outputs

None beyond the returned value.

Returns:

Type Description
list[float]

list[float]: The final opening load values.

fn_final_load_rc #

fn_final_load_rc() -> ndarray

This function calculates the final load on a roof column.

Attributes:

Name Type Description
* `qh` (float

Velocity pressure.

* `CCRoofGCp` (np.ndarray

Wind pressure coefficient values for Roof C&C (ASCE-defined).

* `PressureZoneArea` (np.ndarray

The area of each pressure zone.

Outputs

None beyond the returned value.

Returns:

Type Description
ndarray

np.ndarray: The final roof covering load array.

fn_final_load_rs #

fn_final_load_rs() -> ndarray

Calculate final wind pressure on each panel of roof sheathing.

Attributes:

* `qh` (float): Velocity pressure.
* `G` (float): Gust effect factor.
* `GCpi` (float): Internal pressure coefficient.
* `CCRoofGCp` (np.ndarray): Wind pressure coefficient values for Roof C&C (ASCE-defined).
* `pInternal` (float): The internal pressure after initial failure check.
* `PressureZoneArea` (np.ndarray): The area of each pressure zone.
Outputs

None beyond the returned value.

Returns:

Type Description
ndarray

np.ndarray: The final roof sheathing load array.

fn_final_load_rwc #

fn_final_load_rwc() -> ndarray

Calculate final wind pressure on each roof-to-wall connection.

Notes

Instance attributes used:

  • Building (Building): An object of Building class, which contains the following used attributes:
    • RoofShape: shape of the roof.
    • HipRidgeAngle: The angle between eave and roof hip joint ridge in degrees.
    • NumConnection: The number of connections on each side of the building.
    • ConnectionCoordinate: The coordinates of each connection.
    • NumPanel: The number of panels on each side of the building.
    • PanelCoordinate: The coordinates of each panel.
    • BldgLength: The length of the building.
    • RoofWidth: The width of the roof.
    • WallHeight: The height of the wall.
  • qh (float): Velocity pressure.
  • G (float): Gust effect factor.
  • GCpi (float): Internal pressure coefficient.
  • CCRoofGCp (np.ndarray): Wind pressure coefficient values for Roof C&C (ASCE-defined).
  • pInternal (float): The internal pressure after initial failure check.
  • PressureZoneArea (np.ndarray): The area of each pressure zone.
  • pfRS (np.ndarray): The final wind pressures on each panel of roof sheathing.
Outputs

None beyond the returned value.

Returns:

Type Description
ndarray

np.ndarray: The final roof-to-wall connection load array.

fn_final_load_w #

fn_final_load_w() -> ndarray

Calculates the final loads on walls due to wind.

Notes

Instance attributes used:

  • Building (Building): An object of Building class, which contains the following used attributes:
    • RoofWidth: The width of the roof.
    • MeanRoofHeight: The mean height of the roof.
    • WallHeight: The height of the wall.
    • BldgLength: The length of the building.
    • BldgWidth: The width of the building.
    • RoofShape: The shape of the roof.
    • NumConnection: The number of connections.
    • WallFloorCon_FrontBack: The wall floor connection at the front and back.
    • WallFloorCon_Side: The wall floor connection at the sides of the building.
    • Material: The material of the building.
  • qh (float): Velocity pressure.
  • G (float): Gust effect factor.
  • MWFRSCp (np.ndarray): Main Wind Force Resisting System coefficient values for zones 1 - 8.
  • pInternal (float): The internal pressure after initial failure check.
  • pRWC (np.ndarray): The initial wind pressure on each roof-to-wall connection.
  • WindOrientation (int): The wind orientation index.
Outputs

None beyond the returned value.

Returns:

Type Description
ndarray

np.ndarray: The final wall load matrix.

fn_pressure_internal #

fn_pressure_internal() -> float

Calculate internal pressure after initial failure check.

Notes

Instance attributes used:

  • pO (np.ndarray): The initial wind pressure on each opening.
  • Building (Building): An object of Building class, which contains the following used attributes:
    • NumPanel: An array containing the number of panels on each side of the building.
    • RoofWidth: The width of the roof.
    • MeanRoofHeight: The mean height of the roof.
    • WallHeight: The height of the wall.
    • BldgLength: The length of the building.
    • Material: The material of the building.
    • RoofShape: The shape of the roof.
    • NumConnection: The number of connections in the building.
    • WallFloorCon_FrontBack: The wall floor connection at the front and back of the building.
    • WallFloorCon_Side: The wall floor connection at the sides of the building.
    • DoorFront: The number of front doors.
    • DoorBack: The number of back doors.
    • DoorGarage: The number of garage doors.
    • OpeningFront: The number of front openings.
    • OpeningBack: The number of back openings.
    • OpeningSideH: The number of side openings on the edge.
    • OpeningSideR: The number of side openings not on the edge.
  • qh (float): Velocity pressure.
  • G (float): Gust effect factor.
  • GCpi (float): Internal pressure coefficient.
  • CCRoofGCp (np.ndarray): Wind pressure coefficient values for Roof C&C (ASCE-defined).
  • MWFRSCp (np.ndarray): Main Wind Force Resisting System coefficient values for zones 1 - 8.
  • WindOrientation (int): The wind orientation index.
Outputs

None beyond the returned value.

Returns:

Name Type Description
float float

The internal pressure.

Final Failure Check#

final_failure_check #

Classes:

Name Description
FinalFailureCheck

A class used to represent the FinalFailureCheck.

FinalFailureCheck dataclass #

FinalFailureCheck(
    rRSt: ndarray,
    rRCt: ndarray,
    rRWCt: ndarray,
    rOt: ndarray,
    rWt: ndarray,
    Building: Building,
    WindOrientation: int,
    WindSpeed: float,
    datasets_loaded: bool = False,
    G: float = 0.85,
    GCpi: float = 0.18,
)

Bases: FinalLoad

A class used to represent the FinalFailureCheck.

Attributes:

Name Type Description
RWCFails ndarray

A boolean array indicating whether each side of the building has failed.

Methods:

Name Description
fn_final_failure_check_w

Rechecks the walls after failure checks for other components.

fn_final_failure_check_rwc

Calculates the resistance of each roof-to-wall connection on each side of the building.

Inherited attributes used in this class:
  • rRSt (np.ndarray): Initial roof sheathings resistance values.
  • rRCt (np.ndarray): Initial roof coverings resistance values.
  • rRWCt (np.ndarray): Initial roof-wall connections resistance values.
  • rOt (np.ndarray): Initial openings resistance values.
  • rWt (np.ndarray): Initial walls resistance values.
  • pfRS (np.ndarray): Initial load for roof sheathing.
  • pfRC (np.ndarray): Initial load for roof covering.
  • pfRWC (np.ndarray): Initial load for roof-wall connection.
  • pfO (np.ndarray): Initial wind pressure on each opening.
  • pfW (np.ndarray): Initial load for wall.
  • Building (Building): An object of Building class.
  • WindOrientation (int): Wind orientation index.
  • qh (float): Wind pressure.
  • pInternal (float): Internal pressure.
  • MWFRSCp (np.ndarray): Material weight per floor area.
Notes

The attributes defined in the class are initialized in the constructor, and then updated in the __post_init__ method.

fn_final_failure_check_rwc #

fn_final_failure_check_rwc() -> tuple[ndarray, ndarray]

Calculates the resistance of each roof-to-wall connection on each side of the building.

Notes

Instance attributes used:

  • rRWCt (np.ndarray): The resistance of each roof-to-wall connection.
  • pfRWC (np.ndarray): The pressure on each roof-to-wall connection.
  • Building (object): An object of Building class, which contains the following used attributes:
    • NumConnection: The number of roof-to-wall connections on each side of the building.
    • RoofShape: The shape of the roof.
    • BldgWidth: The width of the building.
    • BldgLength: The length of the building.
    • WallHeight: The height of the wall.
    • WallFloorCon_FrontBack: The wall-floor connection at the front and back of the building.
    • WallFloorCon_Side: The wall-floor connection at the sides of the building.
Outputs

None beyond the returned value.

Returns:

Type Description
tuple[ndarray, ndarray]

tuple[np.ndarray, np.ndarray]: The updated roof-to-wall connection resistance array and side-failure flags.

fn_final_failure_check_w #

fn_final_failure_check_w() -> ndarray

Rechecks the walls after failure checks for other components.

Notes

Instance attributes used:

  • WindOrientationIndex (int): Wind orientation index.
  • qh (float): Wind pressure.
  • pfW (np.ndarray): Probability of failure of walls.
  • pInternal (float): Internal pressure.
  • RWC_fails (np.ndarray): Roof-to-wall connection failure flag.
  • MWFRSCp (np.ndarray): Material weight per floor area.
  • Building (Building): An object of Building class, which contains the following used attributes:
    • BldgWidth: The width of the building.
    • MeanRoofHeight: The mean height of the roof.
    • Material: The material of the building.
    • RoofShape: The shape of the roof.
    • BldgLength: The length of the building.
    • WallHeight: The height of the wall.
    • WallFloorCon_FrontBack: The wall-floor connection at the front and back of the building.
    • WallFloorCon_Side: The wall-floor connection at the sides of the building.
    • NumConnection: The number of roof-to-wall connections on each side of the building.
Outputs

None beyond the returned value.

Returns:

Type Description
ndarray

np.ndarray: The updated final wall load matrix.

Preprocessing#

preprocessing #

Classes:

Name Description
PreProcessLoad

A class used to represent the PreProcessLoad.

PreProcessLoad dataclass #

PreProcessLoad(
    Building: Building,
    WindOrientation: int,
    WindSpeed: float,
    datasets_loaded: bool = False,
    G: float = 0.85,
    GCpi: float = 0.18,
)

Bases: BaseLoadDefaults, BaseLoad

A class used to represent the PreProcessLoad.

Attributes:

Name Type Description
PressureZoneCoordinate ndarray

The coordinates of pressure zones.

NumZone ndarray

The number of zones for each side of the building.

PressureZoneArea ndarray

The area of each pressure zone.

PanelArea ndarray

The area of each panel.

Methods:

Name Description
fn_preprocess_rs

Preprocesses the Roof Sheathing (RS) by calculating panel areas and dividing them into pressure zones.

fn_pressure_zone_coordinate

Calculate coordinates of pressure zones, given wind orientation.

Notes

The attributes defined in the class are initialized in the constructor, and then updated in the __post_init__ method.

fn_preprocess_rs #

fn_preprocess_rs() -> Optional[Tuple[ndarray, ndarray]]

Preprocesses the Roof Sheathing (RS) by calculating panel areas and dividing them into pressure zones.

Notes

Instance attributes used:

  • Building (Building): An instance of the Building class. It uses the following attributes:
    • HipRidgeAngle (float): The angle between eave and roof hip joint ridge in degrees.
    • RoofShape (str): The shape of the roof.
    • NumPanel (list): An array containing the number of panels on each side of the building.
    • PanelCoordinate (list): An array containing the coordinates of panels.
  • WindOrientationIndex (int): Index representing the wind orientation.
  • PanelCoordinate (list): Array containing the coordinates of panels.
  • NumPanel (list): Array containing the number of panels on each side.
Outputs

None beyond the returned value.

Returns:

Name Type Description
Optional[Tuple[ndarray, ndarray]]

tuple[np.ndarray, np.ndarray]: The pressure-zone area matrix and panel-area array.

None Optional[Tuple[ndarray, ndarray]]

Returned only for invalid geometry paths that currently abort preprocessing.

fn_pressure_zone_coordinate #

fn_pressure_zone_coordinate() -> Optional[
    Tuple[ndarray, list[int]]
]

Calculate coordinates of pressure zones, given wind orientation.

Notes

Instance attributes used:

  • Building: An instance of the Building class, which contains the following used attributes:
    • BldgWidth: The width of the building.
    • MeanRoofHeight: The mean height of the roof.
    • HipRidgeAngle: The angle between eave and roof hip joint ridge in degrees.
    • RoofShape: The shape of the roof.
    • BldgLength: The length of the building.
  • WindOrientationIndex: The wind orientation index.
  • PressureZoneCoordinate: Array containing coordinates of pressure zones.
  • NumZone: Array containing the number of zones for each side of the building.
Outputs

None beyond the returned value.

Returns:

Name Type Description
Optional[Tuple[ndarray, list[int]]]

tuple[np.ndarray, list[int]]: The pressure-zone coordinates and zone counts.

None Optional[Tuple[ndarray, list[int]]]

Returned only for unsupported wind-orientation paths that currently abort preprocessing.

Main Entry Point#

main #

Classes:

Name Description
LoadingAndFailureCheck

A class used to represent the LoadingAndFailureCheck, which inherits from FinalFailureCheck.

LoadingAndFailureCheck dataclass #

LoadingAndFailureCheck(
    rRSt: ndarray,
    rRCt: ndarray,
    rRWCt: ndarray,
    rOt: ndarray,
    rWt: ndarray,
    Building: Building,
    WindOrientation: int,
    WindSpeed: float,
    datasets_loaded: bool = False,
    G: float = 0.85,
    GCpi: float = 0.18,
)

Bases: FinalFailureCheck

A class used to represent the LoadingAndFailureCheck, which inherits from FinalFailureCheck.

Methods:

Name Description
update_inputs_and_outputs

Updates the inputs and outputs of the class object.

get_final_resistance

Returns the final resistance of various components.

get_final_loads

Returns the final loads on various components.

Inherited attributes used in this class:
  • rOt (np.ndarray): Resistance of the openings.
  • rWt (np.ndarray): Resistance of the walls.
  • rRSt (np.ndarray): Resistance of the roof sheathings.
  • rRCt (np.ndarray): Resistance of the roof coverings.
  • rRWCt (np.ndarray): Resistance of the roof-wall connections.
  • pfO (np.ndarray): Load on the openings.
  • pfW (np.ndarray): Load on the walls.
  • pfRS (np.ndarray): Load on the roof sheathings.
  • pfRC (np.ndarray): Load on the roof coverings.
  • pfRWC (np.ndarray): Load on the roof-wall connections.

get_final_loads #

get_final_loads() -> dict[str, ndarray]

Returns the final loads on various components.

Notes

Instance attributes used:

  • pfO (np.ndarray): Load on the openings.
  • pfW (np.ndarray): Load on the walls.
  • pfRS (np.ndarray): Load on the roof sheathings.
  • pfRC (np.ndarray): Load on the roof coverings.
  • pfRWC (np.ndarray): Load on the roof-wall connections.

Returns:

Type Description
dict[str, ndarray]

A dictionary containing the final loads on various components.

Outputs

None beyond the returned value.

get_final_resistance #

get_final_resistance() -> dict[str, ndarray]

Returns the final resistance of various components.

Notes

Instance attributes used:

  • rOt (np.ndarray): Resistance of the openings.
  • rWt (np.ndarray): Resistance of the walls.
  • rRSt (np.ndarray): Resistance of the roof sheathings.
  • rRCt (np.ndarray): Resistance of the roof coverings.
  • rRWCt (np.ndarray): Resistance of the roof-wall connections.

Returns:

Type Description
dict[str, ndarray]

A dictionary containing the final resistance of various components.

Outputs

None beyond the returned value.

update_inputs_and_outputs #

update_inputs_and_outputs(
    rRSt: ndarray,
    rRCt: ndarray,
    rRWCt: ndarray,
    rOt: ndarray,
    rWt: ndarray,
    Building: Building,
    WindOrientation: int,
    WindSpeed: float,
) -> None

Given the new inputs, it will update the outputs of the class object.

Parameters:

Name Type Description Default
rRSt ndarray

Resistance of the roof sheathings.

required
rRCt ndarray

Resistance of the roof coverings.

required
rRWCt ndarray

Resistance of the roof-wall connections.

required
rOt ndarray

Resistance of the openings.

required
rWt ndarray

Resistance of the walls.

required
Building Building

An object of Building class.

required
WindOrientation int

The wind orientation index.

required
WindSpeed float

The wind speed in mph for the wind-pressure equations.

required
Outputs

This method updates the inputs and outputs of the class object by calling the __post_init__ method.

Returns:

Type Description
None

None

Base Classes#

base #

Classes:

Name Description
BaseFailureCheck

A class used to represent the Base Failure Check.

BaseLoad

A class used to represent the Base Load.

BaseLoadDefaults

A class used to represent the Base Load Defaults.

BaseFailureCheck dataclass #

BaseFailureCheck(
    rRSt: ndarray,
    rRCt: ndarray,
    rRWCt: ndarray,
    rOt: ndarray,
    rWt: ndarray,
)

A class used to represent the Base Failure Check.

Attributes:

Name Type Description
rRSt ndarray

Initial roof sheathings resistance values.

rRCt ndarray

Initial roof coverings resistance values.

rRWCt ndarray

Initial roof-wall connections resistance values.

rOt ndarray

Initial openings resistance values.

rWt ndarray

Initial walls resistance values.

BaseLoad dataclass #

BaseLoad(
    Building: Building,
    WindOrientation: int,
    WindSpeed: float,
    datasets_loaded: bool = False,
)

A class used to represent the Base Load.

Attributes:

Name Type Description
Building Building

An object of Building class.

WindOrientation int

The wind orientation index.

WindSpeed float

The wind speed in mph for the wind-pressure equations.

MWFRSCp ndarray

Coefficient values for Main Wind Force Resisting System for zones 1 - 8.

CCRoofGCp ndarray

Wind pressure coefficient values for Roof C&C (ASCE-defined).

CCWallGCp ndarray

Wind pressure coefficient values for Wall C&C (ASCE-defined).

Methods:

Name Description
update_outputs

Updates the outputs of the class object by calling the post_init method.

load_CCRoofGCp #

load_CCRoofGCp(file_name: str = 'CCRoofGCp.json')

Load the CCRoofGCp values.

Parameters:

Name Type Description Default
file_name str

The filename of the CCRoofGCp values file.

'CCRoofGCp.json'
This method does not return any value and updates the following class attribute:
  • CCRoofGCp

load_CCWallGCp #

load_CCWallGCp(file_name: str = 'CCWallGCp.json')

Load the CCWallGCp values.

Parameters:

Name Type Description Default
file_name str

The filename of the CCWallGCp values file.

'CCWallGCp.json'
This method does not return any value and updates the following class attribute:
  • CCWallGCp

load_MWFRSCp #

load_MWFRSCp(file_name: str = 'MWFRSCp.json')

Load the MWFRSCp values.

Parameters:

Name Type Description Default
file_name str

The filename of the MWFRSCp values file.

'MWFRSCp.json'
This method does not return any value and updates the following class attribute:
  • MWFRSCp

update_outputs #

update_outputs() -> None

Updates the outputs of the class object by calling the __post_init__ method. This method can be called when a change is made to some of the inputs of the class.

Outputs

Performs initialization or configuration side effects described above.

Returns:

Type Description
None

None

BaseLoadDefaults dataclass #

BaseLoadDefaults(G: float = 0.85, GCpi: float = 0.18)

A class used to represent the Base Load Defaults.

Attributes:

Name Type Description
G float

Gust factor, to be applied to obtain GCp. Default is 0.85.

GCpi float

ASCE-defined internal pressure coefficient. Default is 0.18.