The aim of this procedure is the estimation of the median spectral acceleration value that brings the structure to the attainment of a set of damage states, and the corresponding dispersion. This aim is achieved through the methodology described in Ruiz-García and Miranda (2007), where the inelastic displacement demand of bilinear SDOF systems is related to the elastic displacement by means of the inelastic displacement ratio $C_R$ (the ratio of inelastic displacement to elastic spectral displacement). Estimates of the parameter $C_R$ are provided by Ruiz-García and Miranda in terms of median and dispersion, based on a nonlinear regression analysis of 240 ground motions. The figure below illustrates the relationship of the parameter $C_R$ with the period $T$ of the structure and $R$.
Note: To run the code in a cell:
SHIFT+ENTER
on your keyboard or press the play button () in the toolbar above.
In [ ]:
from rmtk.vulnerability.derivation_fragility.R_mu_T_dispersion.ruiz_garcia_miranda import RGM2007
from rmtk.vulnerability.common import utils
import scipy.stats as stat
%matplotlib inline
In order to use this methodology, it is necessary to provide one (or a group) of capacity curves, defined according to the format described in the RMTK manual. In case multiple capacity curves are input, a spectral shape also needs to be defined.
capacity_curves_file
.input_spectrum
if multiple capacity curves are used.
In [ ]:
capacity_curves_file = "../../../../../../rmtk_data/capacity_curves_Vb-droof.csv"
input_spectrum = "../../../../../../rmtk_data/FEMAP965spectrum.txt"
In [ ]:
capacity_curves = utils.read_capacity_curves(capacity_curves_file)
utils.plot_capacity_curves(capacity_curves)
Sa_ratios = utils.get_spectral_ratios(capacity_curves, input_spectrum)
In order to use this methodology the pushover curves need to be idealised. Please choose an idealised shape using the parameter idealised_type
. The only valid option for this methodology "bilinear"
. Idealised curves can also be directly provided as input by setting the field Idealised
to TRUE
in the input file defining the capacity curves.
In [ ]:
idealised_type = "bilinear"
In [ ]:
idealised_capacity = utils.idealisation(idealised_type, capacity_curves)
utils.plot_idealised_capacity(idealised_capacity, capacity_curves, idealised_type)
In [ ]:
damage_model_file = "../../../../../../rmtk_data/damage_model_ISD.csv"
In [ ]:
damage_model = utils.read_damage_model(damage_model_file)
In [ ]:
montecarlo_samples = 50
In [ ]:
fragility_model = RGM2007.calculate_fragility(capacity_curves, idealised_capacity, damage_model, montecarlo_samples, Sa_ratios)
In [ ]:
minIML, maxIML = 0.01, 2.00
In [ ]:
utils.plot_fragility_model(fragility_model, minIML, maxIML)
The derived parametric fragility functions can be saved to a file in either CSV format or in the NRML format that is used by all OpenQuake input models. The following parameters need to be defined in the cell below in order to save the lognormal CDF fragility curves obtained above:
taxonomy
: This parameter specifies a taxonomy string for the the fragility functions.minIML
and maxIML
: These parameters define the bounds of applicability of the functions.output_type
: This parameter specifies the file format to be used for saving the functions. Currently, the formats supported are "csv" and "nrml".
In [ ]:
taxonomy = "RC"
minIML, maxIML = 0.01, 2.00
output_type = "csv"
output_path = "../../../../../../rmtk_data/output/"
In [ ]:
utils.save_mean_fragility(taxonomy, fragility_model, minIML, maxIML, output_type, output_path)
A vulnerability model can be derived by combining the set of fragility functions obtained above with a consequence model. In this process, the fractions of buildings in each damage state are multiplied by the associated damage ratio from the consequence model, in order to obtain a distribution of loss ratio for each intensity measure level.
The following parameters need to be defined in the cell below in order to calculate vulnerability functions using the above derived fragility functions:
cons_model_file
: This parameter specifies the path of the consequence model file.imls
: This parameter specifies a list of intensity measure levels in increasing order at which the distribution of loss ratios are required to be calculated.distribution_type
: This parameter specifies the type of distribution to be used for calculating the vulnerability function. The distribution types currently supported are "lognormal", "beta", and "PMF".
In [ ]:
cons_model_file = "../../../../../../rmtk_data/cons_model.csv"
imls = [0.05, 0.10, 0.15, 0.20, 0.25, 0.30, 0.35, 0.40, 0.45, 0.50,
0.60, 0.70, 0.80, 0.90, 1.00, 1.20, 1.40, 1.60, 1.80, 2.00]
distribution_type = "lognormal"
In [ ]:
cons_model = utils.read_consequence_model(cons_model_file)
vulnerability_model = utils.convert_fragility_vulnerability(fragility_model, cons_model,
imls, distribution_type)
In [ ]:
utils.plot_vulnerability_model(vulnerability_model)
The derived parametric or nonparametric vulnerability function can be saved to a file in either CSV format or in the NRML format that is used by all OpenQuake input models. The following parameters need to be defined in the cell below in order to save the lognormal CDF fragility curves obtained above:
taxonomy
: This parameter specifies a taxonomy string for the the fragility functions.output_type
: This parameter specifies the file format to be used for saving the functions. Currently, the formats supported are "csv" and "nrml".
In [ ]:
taxonomy = "RC"
output_type = "csv"
output_path = "../../../../../../rmtk_data/output/"
In [ ]:
utils.save_vulnerability(taxonomy, vulnerability_model, output_type, output_path)
In [ ]: