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

Commit bd8e4cc

Browse files
committed
More simplifications
1 parent c6e54e4 commit bd8e4cc

File tree

4 files changed

+61
-851
lines changed

4 files changed

+61
-851
lines changed

RMTK.ipynb

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,12 @@
2929
"source": [
3030
"---\n",
3131
"## Vulnerability Module\n",
32-
"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",
32+
"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",
3333
"<img src=\"figures/fragility_example.png\" width=\"400\" align=\"middle\">\n",
3434
"\n",
3535
"### Capacity model generator\n",
3636
"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",
3737
"\n",
38-
"### Conversion from MDOF to SDOF\n",
39-
"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",
4038
"\n",
4139
"### Derivation of fragility and vulnerability models\n",
4240
"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"
@@ -76,7 +74,7 @@
7674
"name": "python",
7775
"nbconvert_exporter": "python",
7876
"pygments_lexer": "ipython3",
79-
"version": "3.5.4"
77+
"version": "3.6.6"
8078
}
8179
},
8280
"nbformat": 4,

notebooks/vulnerability/derivation_fragility/NLTHA_on_SDOF/NLTHA_on_SDOF.ipynb

Lines changed: 40 additions & 106 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,9 @@
22
"cells": [
33
{
44
"cell_type": "markdown",
5-
"metadata": {
6-
"deletable": true,
7-
"editable": true
8-
},
5+
"metadata": {},
96
"source": [
10-
"# Non-Linear Time History Analysis (NLTHA) for Single Degree of Freedom (SDOF) Oscillators\n",
7+
"# Non-Linear Time History Analysis (NLTHA) on Single Degree of Freedom (SDOF) Oscillators\n",
118
"\n",
129
"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",
1310
"\n",
@@ -23,13 +20,21 @@
2320
},
2421
{
2522
"cell_type": "code",
26-
"execution_count": null,
27-
"metadata": {
28-
"collapsed": false,
29-
"deletable": true,
30-
"editable": true
31-
},
32-
"outputs": [],
23+
"execution_count": 1,
24+
"metadata": {},
25+
"outputs": [
26+
{
27+
"ename": "SyntaxError",
28+
"evalue": "invalid syntax (utils.py, line 434)",
29+
"output_type": "error",
30+
"traceback": [
31+
"Traceback \u001b[0;36m(most recent call last)\u001b[0m:\n",
32+
" 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",
33+
"\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",
34+
"\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"
35+
]
36+
}
37+
],
3338
"source": [
3439
"from rmtk.vulnerability.common import utils\n",
3540
"from rmtk.vulnerability.derivation_fragility.NLTHA_on_SDOF import NLTHA_on_SDOF\n",
@@ -39,11 +44,7 @@
3944
},
4045
{
4146
"cell_type": "markdown",
42-
"metadata": {
43-
"collapsed": false,
44-
"deletable": true,
45-
"editable": true
46-
},
47+
"metadata": {},
4748
"source": [
4849
"---\n",
4950
"### Load capacity curves\n",
@@ -56,11 +57,7 @@
5657
{
5758
"cell_type": "code",
5859
"execution_count": null,
59-
"metadata": {
60-
"collapsed": false,
61-
"deletable": true,
62-
"editable": true
63-
},
60+
"metadata": {},
6461
"outputs": [],
6562
"source": [
6663
"capacity_curves_file = \"../../../../../rmtk_data/capacity_curves_point.csv\"\n",
@@ -72,9 +69,6 @@
7269
"cell_type": "code",
7370
"execution_count": null,
7471
"metadata": {
75-
"collapsed": false,
76-
"deletable": true,
77-
"editable": true,
7872
"scrolled": false
7973
},
8074
"outputs": [],
@@ -87,10 +81,7 @@
8781
},
8882
{
8983
"cell_type": "markdown",
90-
"metadata": {
91-
"deletable": true,
92-
"editable": true
93-
},
84+
"metadata": {},
9485
"source": [
9586
"### Load ground motion records\n",
9687
"\n",
@@ -105,9 +96,6 @@
10596
"cell_type": "code",
10697
"execution_count": null,
10798
"metadata": {
108-
"collapsed": false,
109-
"deletable": true,
110-
"editable": true,
11199
"scrolled": false
112100
},
113101
"outputs": [],
@@ -120,10 +108,7 @@
120108
},
121109
{
122110
"cell_type": "markdown",
123-
"metadata": {
124-
"deletable": true,
125-
"editable": true
126-
},
111+
"metadata": {},
127112
"source": [
128113
"### Load damage state thresholds\n",
129114
"\n",
@@ -135,11 +120,7 @@
135120
{
136121
"cell_type": "code",
137122
"execution_count": null,
138-
"metadata": {
139-
"collapsed": false,
140-
"deletable": true,
141-
"editable": true
142-
},
123+
"metadata": {},
143124
"outputs": [],
144125
"source": [
145126
"damage_model_file = \"../../../../../rmtk_data/damage_model.csv\"\n",
@@ -148,10 +129,7 @@
148129
},
149130
{
150131
"cell_type": "markdown",
151-
"metadata": {
152-
"deletable": true,
153-
"editable": true
154-
},
132+
"metadata": {},
155133
"source": [
156134
"### Obtain the damage probability matrix\n",
157135
"\n",
@@ -164,9 +142,6 @@
164142
"cell_type": "code",
165143
"execution_count": null,
166144
"metadata": {
167-
"collapsed": false,
168-
"deletable": true,
169-
"editable": true,
170145
"scrolled": false
171146
},
172147
"outputs": [],
@@ -179,10 +154,7 @@
179154
},
180155
{
181156
"cell_type": "markdown",
182-
"metadata": {
183-
"deletable": true,
184-
"editable": true
185-
},
157+
"metadata": {},
186158
"source": [
187159
"### Find an adequate intensity measure\n",
188160
"\n",
@@ -193,9 +165,6 @@
193165
"cell_type": "code",
194166
"execution_count": null,
195167
"metadata": {
196-
"collapsed": false,
197-
"deletable": true,
198-
"editable": true,
199168
"scrolled": false
200169
},
201170
"outputs": [],
@@ -207,10 +176,7 @@
207176
},
208177
{
209178
"cell_type": "markdown",
210-
"metadata": {
211-
"deletable": true,
212-
"editable": true
213-
},
179+
"metadata": {},
214180
"source": [
215181
"### Fit lognormal CDF fragility curves\n",
216182
"\n",
@@ -224,9 +190,6 @@
224190
"cell_type": "code",
225191
"execution_count": null,
226192
"metadata": {
227-
"collapsed": false,
228-
"deletable": true,
229-
"editable": true,
230193
"scrolled": false
231194
},
232195
"outputs": [],
@@ -239,10 +202,7 @@
239202
},
240203
{
241204
"cell_type": "markdown",
242-
"metadata": {
243-
"deletable": true,
244-
"editable": true
245-
},
205+
"metadata": {},
246206
"source": [
247207
"### Plot fragility functions\n",
248208
"\n",
@@ -253,11 +213,7 @@
253213
{
254214
"cell_type": "code",
255215
"execution_count": null,
256-
"metadata": {
257-
"collapsed": false,
258-
"deletable": true,
259-
"editable": true
260-
},
216+
"metadata": {},
261217
"outputs": [],
262218
"source": [
263219
"minIML, maxIML = 0.0, 1.2\n",
@@ -267,10 +223,7 @@
267223
},
268224
{
269225
"cell_type": "markdown",
270-
"metadata": {
271-
"deletable": true,
272-
"editable": true
273-
},
226+
"metadata": {},
274227
"source": [
275228
"### Save fragility functions\n",
276229
"\n",
@@ -283,11 +236,7 @@
283236
{
284237
"cell_type": "code",
285238
"execution_count": null,
286-
"metadata": {
287-
"collapsed": false,
288-
"deletable": true,
289-
"editable": true
290-
},
239+
"metadata": {},
291240
"outputs": [],
292241
"source": [
293242
"taxonomy = \"RC\"\n",
@@ -300,9 +249,7 @@
300249
{
301250
"cell_type": "markdown",
302251
"metadata": {
303-
"collapsed": true,
304-
"deletable": true,
305-
"editable": true
252+
"collapsed": true
306253
},
307254
"source": [
308255
"### Obtain vulnerability function\n",
@@ -319,9 +266,7 @@
319266
"cell_type": "code",
320267
"execution_count": null,
321268
"metadata": {
322-
"collapsed": true,
323-
"deletable": true,
324-
"editable": true
269+
"collapsed": true
325270
},
326271
"outputs": [],
327272
"source": [
@@ -337,10 +282,7 @@
337282
},
338283
{
339284
"cell_type": "markdown",
340-
"metadata": {
341-
"deletable": true,
342-
"editable": true
343-
},
285+
"metadata": {},
344286
"source": [
345287
"### Plot vulnerability function"
346288
]
@@ -349,9 +291,6 @@
349291
"cell_type": "code",
350292
"execution_count": null,
351293
"metadata": {
352-
"collapsed": false,
353-
"deletable": true,
354-
"editable": true,
355294
"scrolled": true
356295
},
357296
"outputs": [],
@@ -361,10 +300,7 @@
361300
},
362301
{
363302
"cell_type": "markdown",
364-
"metadata": {
365-
"deletable": true,
366-
"editable": true
367-
},
303+
"metadata": {},
368304
"source": [
369305
"### Save vulnerability function\n",
370306
"\n",
@@ -377,9 +313,7 @@
377313
"cell_type": "code",
378314
"execution_count": null,
379315
"metadata": {
380-
"collapsed": true,
381-
"deletable": true,
382-
"editable": true
316+
"collapsed": true
383317
},
384318
"outputs": [],
385319
"source": [
@@ -392,23 +326,23 @@
392326
],
393327
"metadata": {
394328
"kernelspec": {
395-
"display_name": "Python 2",
329+
"display_name": "Python 3",
396330
"language": "python",
397-
"name": "python2"
331+
"name": "python3"
398332
},
399333
"language_info": {
400334
"codemirror_mode": {
401335
"name": "ipython",
402-
"version": 2
336+
"version": 3
403337
},
404338
"file_extension": ".py",
405339
"mimetype": "text/x-python",
406340
"name": "python",
407341
"nbconvert_exporter": "python",
408-
"pygments_lexer": "ipython2",
409-
"version": "2.7.13"
342+
"pygments_lexer": "ipython3",
343+
"version": "3.6.6"
410344
}
411345
},
412346
"nbformat": 4,
413-
"nbformat_minor": 0
347+
"nbformat_minor": 1
414348
}

0 commit comments

Comments
 (0)