def dam_rat_gar_door(exp_cat, gust_speed, mean_cap, cov=0.2): """Caulculate the wall panels area from CC roof sheathing Args: exp_cat(string): expossure category, ASCE 7 B, C, D B- city, subburban C- open, e,g grass D- off shore gust_speed(float, numpy): 3 sec gust wind speed (m/s) mean_cap(float): initial capacity cov: covatiance of the mean cap Returns: dam_rat_en, dam_rat_pc: damage ratio functions for the windows """ wall_load_4, wall_load_5 = load.walls_cc(exp_cat, gust_speed) enc = load.internal_load_mwfrs(exp_cat, gust_speed, enclosure_cat='enc') par_enc = load.internal_load_mwfrs(exp_cat, gust_speed, enclosure_cat='par_enc') load_en = (wall_load_4 + enc) load_pc = (wall_load_5 + par_enc) sigma = cov * mean_cap dam_rat_en = ss.norm.cdf(load_en, mean_cap, sigma) # the normal cdf dam_rat_pc = ss.norm.cdf(load_pc, mean_cap, sigma) # the normal cdf return dam_rat_en, dam_rat_pc
def internal_press_speed(exp_cat, gust_speed, mean_cap, cov=0.2): """Calculate the probability that the windows will be destroyed so we take the combination of of thatfor closed and partially enclsoed Args: exp_cat(string): expossure category, ASCE 7 B, C, D B- city, subburban C- open, e,g grass D- off shore gust_speed(float, numpy): 3 sec gust wind speed (m/s) mean_cap(float): initial capacity cov: covatiance of the mean cap Returns: prob_of_enc: wind speed when windows are damaged """ wall_load_4, wall_load_5 = load.walls_cc(exp_cat, gust_speed) enc = load.internal_load_mwfrs(exp_cat, gust_speed, enclosure_cat='enc') load_i = (wall_load_4 + enc) sigma = cov * mean_cap prob_of_enc = ss.norm.cdf(load_i, mean_cap, sigma) # the normal cdf return prob_of_enc
def dam_rat_wall(exp_cat, gust_speed, mean_cap, lenght, width, cov=0.2, wall_height=3, roof_height=4): """Caulculate the damage ratios for the walls Args: exp_cat(string): expossure category, ASCE 7 B, C, D B- city, subburban C- open, e,g grass D- off shore gust_speed(float, numpy): 3 sec gust wind speed (m/s) mean_cap(float): initial capacity lenght(float): lenght of the house (m) width(float): width o f the house (m) wall_height(float): height of the walls (m) roof_height(float): height of the roof (m) cov: covatiance of the mean cap Returns: dam_rat_en, dam_rat_pc: damage ratio functions for the walls """ wall_load_4, wall_load_5 = load.walls_cc(exp_cat, gust_speed) enc = load.internal_load_mwfrs(exp_cat, gust_speed, enclosure_cat='enc') par_enc = load.internal_load_mwfrs(exp_cat, gust_speed, enclosure_cat='par_enc') sigma = mean_cap * cov load_en_4 = (wall_load_4 + enc) load_en_5 = (wall_load_5 + enc) load_pc_4 = (wall_load_4 + par_enc) load_pc_5 = (wall_load_5 + par_enc) dam_rat_en_4 = ss.norm.cdf(load_en_4, mean_cap, sigma) # the normal cdf dam_rat_en_5 = ss.norm.cdf(load_en_5, mean_cap, sigma) # the normal cdf dam_rat_pc_4 = ss.norm.cdf(load_pc_4, mean_cap, sigma) # the normal cdf dam_rat_pc_5 = ss.norm.cdf(load_pc_5, mean_cap, sigma) # the normal cdf area, area_4, area_5 = areas.walls_cc(lenght, width, wall_height, roof_height) dam_rat_en = (dam_rat_en_4 * area_4 + dam_rat_en_5 * area_5) / area dam_rat_pc = (dam_rat_pc_4 * area_4 + dam_rat_pc_5 * area_5) / area return dam_rat_en, dam_rat_pc