### ===================================================================================================================
### FUNCTION: Find center of rigidity according NLPO requirements VIIA
### ===================================================================================================================
# Copyright ©VIIA 2024
### ===================================================================================================================
### 1. Import modules
### ===================================================================================================================
# General imports
from __future__ import annotations
from typing import List, Dict, Union
### ===================================================================================================================
### 2. Function viia_center_of_mass_nlpo
### ===================================================================================================================
[docs]def viia_center_of_rigidity(piers: List[Dict[str, Union[Dict[str, float], float]]]) -> Dict[str, Dict[str, float]]:
"""
This function computes the coordinates of the center of rigidity of a collection of piers for all four pushover
directions. It assumes all piers to act as cantilever elements where the effective heights is allowed to be reduced
based on the thicknesses of supporting floors.
Input:
- piers (list): List of dictionaries containing at least the effective shear stiffnesses ('k_shear') in four
directions ('X_pos', 'X_neg', 'Y_pos' and 'Y_neg') and normal force center of each pier ('y_nc').
Output:
- Returns dictionary with center of rigidity, containing x- and y- coordinates of both corresponding pushover
directions.
"""
center_of_rigidity = {'x': {}, 'y': {}}
for direction in ['X_pos', 'X_neg', 'Y_pos', 'Y_neg']:
if direction[0] == 'X':
sum_k_x_y_nc = 0
sum_k_x = 0
for pier in piers:
sum_k_x += pier['k_shear'][direction]
sum_k_x_y_nc += pier['k_shear'][direction] * pier['y_nc']
y_rc = sum_k_x_y_nc / sum_k_x
center_of_rigidity['y'].update({direction: y_rc})
elif direction[0] == 'Y':
sum_k_y_x_nc = 0
sum_k_y = 0
for pier in piers:
sum_k_y += pier['k_shear'][direction]
sum_k_y_x_nc += pier['k_shear'][direction] * pier['x_nc']
x_rc = sum_k_y_x_nc / sum_k_y
center_of_rigidity['x'].update({direction: x_rc})
return center_of_rigidity
### ===================================================================================================================
### 3. End of script
### ===================================================================================================================