Skip to content
This repository has been archived by the owner on May 7, 2021. It is now read-only.

Commit

Permalink
More simplifications
Browse files Browse the repository at this point in the history
  • Loading branch information
VSilva committed Jan 16, 2019
1 parent c6e54e4 commit bd8e4cc
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 851 deletions.
6 changes: 2 additions & 4 deletions RMTK.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,12 @@
"source": [
"---\n",
"## Vulnerability Module\n",
"The *Vulnerability Module* of the Risk Modeller's Toolkit comprises a number of tools to generate a large number of numerical models (e.g. single degree of freedom oscillators (SDOF) or capacity curves establishing the relation between spectral acceleration and spectral displacement); for the conversion of results from multiple degree of freedom systems (MDOF) to equivalent single degree ocilators (SDOF) or for the transformation of the elastic displacement to inelastic response, which is fundamental to derive fragility or vulnerability models for single structures or building classes. In the following figure, a fragility model developed using one of algorithms supported by this toolkit is depicted: \n",
"The *Vulnerability Module* of the Risk Modeller's Toolkit comprises a number of tools to generate a large number of numerical models (e.g. single degree of freedom oscillators (SDOF) or capacity curves establishing the relation between spectral acceleration and spectral displacement), and to calculate the response of these numerical models against large sets of ground motion records. In the following figure, a fragility model developed using one of algorithms supported by this toolkit is depicted: \n",
"<img src=\"figures/fragility_example.png\" width=\"400\" align=\"middle\">\n",
"\n",
"### Capacity model generator\n",
"This module enables users to generate a large number of numerical models that can be used in the derivation of fragility models. This feature allows the inclusion of the building-to-building variability necessary for the derivation of fragility functions for building classes. To use this feature click [here](notebooks/vulnerability/model_generator/model_generator.ipynb).\n",
"\n",
"### Conversion from MDOF to SDOF\n",
"Several structural analysis packages allow the derivation of pushover curves (base shear versus top displacement) for multiple degree of freedom systems (MDOF). This module allows the conversion of results from MDOF analyses into equivalent single degree of freedom (SDOF) models, thus making them compatible with a wide range of non-linear static procedures. To use this feature click [here](notebooks/vulnerability/mdof_to_sdof/mdof_to_sdof.ipynb).\n",
"\n",
"### Derivation of fragility and vulnerability models\n",
"This module comprises a wide spectrum methdologies to assess the nonlinear response of one, or multiple, structures using nonlinear static procedures. One of the main outputs of this module are fragility functions. Fragility functions obtained using this module can be further transformed into vulnerability functions using appropriate damage-to-loss (i.e. consequence) models. To use this feature click [here](notebooks/vulnerability/derivation_fragility/derivation_fragility.ipynb).\n"
Expand Down Expand Up @@ -76,7 +74,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.5.4"
"version": "3.6.6"
}
},
"nbformat": 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,9 @@
"cells": [
{
"cell_type": "markdown",
"metadata": {
"deletable": true,
"editable": true
},
"metadata": {},
"source": [
"# Non-Linear Time History Analysis (NLTHA) for Single Degree of Freedom (SDOF) Oscillators\n",
"# Non-Linear Time History Analysis (NLTHA) on Single Degree of Freedom (SDOF) Oscillators\n",
"\n",
"In this method, a single degree of freedom (SDOF) model of each structure is subjected to non-linear time history analysis (NLTHA) using a suite of ground motion records. The displacements of the SDOF due to each ground motion record are used as input to determine the distribution of buildings in each damage state for each level of ground motion intensity. A regression algorithm is then applied to derive the fragility model.\n",
"\n",
Expand All @@ -23,13 +20,21 @@
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false,
"deletable": true,
"editable": true
},
"outputs": [],
"execution_count": 1,
"metadata": {},
"outputs": [
{
"ename": "SyntaxError",
"evalue": "invalid syntax (utils.py, line 434)",
"output_type": "error",
"traceback": [
"Traceback \u001b[0;36m(most recent call last)\u001b[0m:\n",
" File \u001b[1;32m\"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/IPython/core/interactiveshell.py\"\u001b[0m, line \u001b[1;32m2961\u001b[0m, in \u001b[1;35mrun_code\u001b[0m\n exec(code_obj, self.user_global_ns, self.user_ns)\n",
"\u001b[0;36m File \u001b[0;32m\"<ipython-input-1-a0f7315c782f>\"\u001b[0;36m, line \u001b[0;32m1\u001b[0;36m, in \u001b[0;35m<module>\u001b[0;36m\u001b[0m\n\u001b[0;31m from rmtk.vulnerability.common import utils\u001b[0m\n",
"\u001b[0;36m File \u001b[0;32m\"/Users/vitorsilva/Dropbox/GEM/git/gem/rmtk/rmtk/vulnerability/common/utils.py\"\u001b[0;36m, line \u001b[0;32m434\u001b[0m\n\u001b[0;31m print str((it+1)*100/len(T))+'%'\u001b[0m\n\u001b[0m ^\u001b[0m\n\u001b[0;31mSyntaxError\u001b[0m\u001b[0;31m:\u001b[0m invalid syntax\n"
]
}
],
"source": [
"from rmtk.vulnerability.common import utils\n",
"from rmtk.vulnerability.derivation_fragility.NLTHA_on_SDOF import NLTHA_on_SDOF\n",
Expand All @@ -39,11 +44,7 @@
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": false,
"deletable": true,
"editable": true
},
"metadata": {},
"source": [
"---\n",
"### Load capacity curves\n",
Expand All @@ -56,11 +57,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false,
"deletable": true,
"editable": true
},
"metadata": {},
"outputs": [],
"source": [
"capacity_curves_file = \"../../../../../rmtk_data/capacity_curves_point.csv\"\n",
Expand All @@ -72,9 +69,6 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false,
"deletable": true,
"editable": true,
"scrolled": false
},
"outputs": [],
Expand All @@ -87,10 +81,7 @@
},
{
"cell_type": "markdown",
"metadata": {
"deletable": true,
"editable": true
},
"metadata": {},
"source": [
"### Load ground motion records\n",
"\n",
Expand All @@ -105,9 +96,6 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false,
"deletable": true,
"editable": true,
"scrolled": false
},
"outputs": [],
Expand All @@ -120,10 +108,7 @@
},
{
"cell_type": "markdown",
"metadata": {
"deletable": true,
"editable": true
},
"metadata": {},
"source": [
"### Load damage state thresholds\n",
"\n",
Expand All @@ -135,11 +120,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false,
"deletable": true,
"editable": true
},
"metadata": {},
"outputs": [],
"source": [
"damage_model_file = \"../../../../../rmtk_data/damage_model.csv\"\n",
Expand All @@ -148,10 +129,7 @@
},
{
"cell_type": "markdown",
"metadata": {
"deletable": true,
"editable": true
},
"metadata": {},
"source": [
"### Obtain the damage probability matrix\n",
"\n",
Expand All @@ -164,9 +142,6 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false,
"deletable": true,
"editable": true,
"scrolled": false
},
"outputs": [],
Expand All @@ -179,10 +154,7 @@
},
{
"cell_type": "markdown",
"metadata": {
"deletable": true,
"editable": true
},
"metadata": {},
"source": [
"### Find an adequate intensity measure\n",
"\n",
Expand All @@ -193,9 +165,6 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false,
"deletable": true,
"editable": true,
"scrolled": false
},
"outputs": [],
Expand All @@ -207,10 +176,7 @@
},
{
"cell_type": "markdown",
"metadata": {
"deletable": true,
"editable": true
},
"metadata": {},
"source": [
"### Fit lognormal CDF fragility curves\n",
"\n",
Expand All @@ -224,9 +190,6 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false,
"deletable": true,
"editable": true,
"scrolled": false
},
"outputs": [],
Expand All @@ -239,10 +202,7 @@
},
{
"cell_type": "markdown",
"metadata": {
"deletable": true,
"editable": true
},
"metadata": {},
"source": [
"### Plot fragility functions\n",
"\n",
Expand All @@ -253,11 +213,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false,
"deletable": true,
"editable": true
},
"metadata": {},
"outputs": [],
"source": [
"minIML, maxIML = 0.0, 1.2\n",
Expand All @@ -267,10 +223,7 @@
},
{
"cell_type": "markdown",
"metadata": {
"deletable": true,
"editable": true
},
"metadata": {},
"source": [
"### Save fragility functions\n",
"\n",
Expand All @@ -283,11 +236,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false,
"deletable": true,
"editable": true
},
"metadata": {},
"outputs": [],
"source": [
"taxonomy = \"RC\"\n",
Expand All @@ -300,9 +249,7 @@
{
"cell_type": "markdown",
"metadata": {
"collapsed": true,
"deletable": true,
"editable": true
"collapsed": true
},
"source": [
"### Obtain vulnerability function\n",
Expand All @@ -319,9 +266,7 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true,
"deletable": true,
"editable": true
"collapsed": true
},
"outputs": [],
"source": [
Expand All @@ -337,10 +282,7 @@
},
{
"cell_type": "markdown",
"metadata": {
"deletable": true,
"editable": true
},
"metadata": {},
"source": [
"### Plot vulnerability function"
]
Expand All @@ -349,9 +291,6 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false,
"deletable": true,
"editable": true,
"scrolled": true
},
"outputs": [],
Expand All @@ -361,10 +300,7 @@
},
{
"cell_type": "markdown",
"metadata": {
"deletable": true,
"editable": true
},
"metadata": {},
"source": [
"### Save vulnerability function\n",
"\n",
Expand All @@ -377,9 +313,7 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true,
"deletable": true,
"editable": true
"collapsed": true
},
"outputs": [],
"source": [
Expand All @@ -392,23 +326,23 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 2",
"display_name": "Python 3",
"language": "python",
"name": "python2"
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.13"
"pygments_lexer": "ipython3",
"version": "3.6.6"
}
},
"nbformat": 4,
"nbformat_minor": 0
"nbformat_minor": 1
}
Loading

0 comments on commit bd8e4cc

Please sign in to comment.