diff --git a/_static/nonlinear_mdof_abs_accel.jpg b/_static/nonlinear_mdof_abs_accel.jpg new file mode 100644 index 0000000..5976ff4 Binary files /dev/null and b/_static/nonlinear_mdof_abs_accel.jpg differ diff --git a/_static/nonlinear_mdof_hysteresis.jpg b/_static/nonlinear_mdof_hysteresis.jpg new file mode 100644 index 0000000..107a97b Binary files /dev/null and b/_static/nonlinear_mdof_hysteresis.jpg differ diff --git a/_static/nonlinear_mdof_rel_accel.jpg b/_static/nonlinear_mdof_rel_accel.jpg new file mode 100644 index 0000000..2b7fe6e Binary files /dev/null and b/_static/nonlinear_mdof_rel_accel.jpg differ diff --git a/_static/nonlinear_mdof_rel_disp.jpg b/_static/nonlinear_mdof_rel_disp.jpg new file mode 100644 index 0000000..4df7c4b Binary files /dev/null and b/_static/nonlinear_mdof_rel_disp.jpg differ diff --git a/pyExamples/el_centro.th b/pyExamples/el_centro.th new file mode 100644 index 0000000..fad30ed --- /dev/null +++ b/pyExamples/el_centro.th @@ -0,0 +1,1560 @@ +6.3000000e-03 +3.6400000e-03 +9.9000000e-04 +4.2800000e-03 +7.5800000e-03 +1.0870000e-02 +6.8200000e-03 +2.7700000e-03 +-1.2800000e-03 +3.6800000e-03 +8.6400000e-03 +1.3600000e-02 +7.2700000e-03 +9.4000000e-04 +4.2000000e-03 +2.2100000e-03 +2.1000000e-04 +4.4400000e-03 +8.6700000e-03 +1.2900000e-02 +1.7130000e-02 +-3.4300000e-03 +-2.4000000e-02 +-9.9200000e-03 +4.1600000e-03 +5.2800000e-03 +1.6530000e-02 +2.7790000e-02 +3.9040000e-02 +2.4490000e-02 +9.9500000e-03 +9.6100000e-03 +9.2600000e-03 +8.9200000e-03 +-4.8600000e-03 +-1.8640000e-02 +-3.2420000e-02 +-3.3650000e-02 +-5.7230000e-02 +-4.5340000e-02 +-3.3460000e-02 +-3.2010000e-02 +-3.0560000e-02 +-2.9110000e-02 +-2.7660000e-02 +-4.1160000e-02 +-5.4660000e-02 +-6.8160000e-02 +-8.1660000e-02 +-6.8460000e-02 +-5.5270000e-02 +-4.2080000e-02 +-4.2590000e-02 +-4.3110000e-02 +-2.4280000e-02 +-5.4500000e-03 +1.3380000e-02 +3.2210000e-02 +5.1040000e-02 +6.9870000e-02 +8.8700000e-02 +4.5240000e-02 +1.7900000e-03 +-4.1670000e-02 +-8.5130000e-02 +-1.2858000e-01 +-1.7204000e-01 +-1.2908000e-01 +-8.6130000e-02 +-8.9020000e-02 +-9.1920000e-02 +-9.4820000e-02 +-9.3240000e-02 +-9.1660000e-02 +-9.4780000e-02 +-9.7890000e-02 +-1.2902000e-01 +-7.6520000e-02 +-2.4010000e-02 +2.8490000e-02 +8.0990000e-02 +1.3350000e-01 +1.8600000e-01 +2.3850000e-01 +2.1993000e-01 +2.0135000e-01 +1.8277000e-01 +1.6420000e-01 +1.4562000e-01 +1.6143000e-01 +1.7725000e-01 +1.3215000e-01 +8.7050000e-02 +4.1960000e-02 +-3.1400000e-03 +-4.8240000e-02 +-9.3340000e-02 +-1.3843000e-01 +-1.8353000e-01 +-2.2863000e-01 +-2.7372000e-01 +-3.1882000e-01 +-2.5024000e-01 +-1.8166000e-01 +-1.1309000e-01 +-4.4510000e-02 +2.4070000e-02 +9.2650000e-02 +1.6123000e-01 +2.2981000e-01 +2.9839000e-01 +2.3197000e-01 +1.6554000e-01 +9.9120000e-02 +3.2700000e-02 +-3.3720000e-02 +-1.0014000e-01 +-1.6656000e-01 +-2.3299000e-01 +-2.9941000e-01 +-4.2100000e-03 +2.9099000e-01 +2.2380000e-01 +1.5662000e-01 +8.9430000e-02 +2.2240000e-02 +-4.4950000e-02 +1.8340000e-02 +8.1630000e-02 +1.4491000e-01 +2.0820000e-01 +1.8973000e-01 +1.7125000e-01 +1.3759000e-01 +1.0393000e-01 +7.0270000e-02 +3.6610000e-02 +2.9500000e-03 +-3.0710000e-02 +-5.6100000e-03 +1.9480000e-02 +4.4580000e-02 +6.4680000e-02 +8.4780000e-02 +1.0487000e-01 +5.8950000e-02 +1.3030000e-02 +-3.2890000e-02 +-7.8820000e-02 +-3.5560000e-02 +7.7100000e-03 +5.0970000e-02 +1.0130000e-02 +-3.0710000e-02 +-7.1560000e-02 +-1.1240000e-01 +-1.5324000e-01 +-1.1314000e-01 +-7.3040000e-02 +-3.2940000e-02 +7.1500000e-03 +-6.3500000e-02 +-1.3415000e-01 +-2.0480000e-01 +-1.2482000e-01 +-4.4850000e-02 +3.5130000e-02 +1.1510000e-01 +1.9508000e-01 +1.2301000e-01 +5.0940000e-02 +-2.1130000e-02 +-9.3200000e-02 +-2.6630000e-02 +3.9950000e-02 +1.0653000e-01 +1.7311000e-01 +1.1283000e-01 +5.2550000e-02 +-7.7200000e-03 +1.0640000e-02 +2.9000000e-02 +4.7370000e-02 +6.5730000e-02 +2.0210000e-02 +-2.5300000e-02 +-7.0810000e-02 +-4.1070000e-02 +-1.1330000e-02 +2.8800000e-03 +1.7090000e-02 +3.1310000e-02 +-2.2780000e-02 +-7.6860000e-02 +-1.3095000e-01 +-1.8504000e-01 +-1.4347000e-01 +-1.0190000e-01 +-6.0340000e-02 +-1.8770000e-02 +2.2800000e-02 +-9.9600000e-03 +-4.2720000e-02 +-2.1470000e-02 +-2.1000000e-04 +2.1040000e-02 +-1.4590000e-02 +-5.0220000e-02 +-8.5850000e-02 +-1.2148000e-01 +-1.5711000e-01 +-1.9274000e-01 +-2.2837000e-01 +-1.8145000e-01 +-1.3453000e-01 +-8.7610000e-02 +-4.0690000e-02 +6.2300000e-03 +5.3160000e-02 +1.0008000e-01 +1.4700000e-01 +9.7540000e-02 +4.8080000e-02 +-1.3800000e-03 +5.1410000e-02 +1.0420000e-01 +1.5699000e-01 +2.0979000e-01 +2.6258000e-01 +1.6996000e-01 +7.7340000e-02 +-1.5270000e-02 +-1.0789000e-01 +-2.0051000e-01 +-6.7860000e-02 +6.4790000e-02 +1.6710000e-02 +-3.1370000e-02 +-7.9450000e-02 +-1.2753000e-01 +-1.7561000e-01 +-2.2369000e-01 +-2.7177000e-01 +-1.5851000e-01 +-4.5250000e-02 +6.8020000e-02 +1.8128000e-01 +1.4464000e-01 +1.0800000e-01 +7.1370000e-02 +3.4730000e-02 +9.6660000e-02 +1.5860000e-01 +2.2053000e-01 +1.8296000e-01 +1.4538000e-01 +1.0780000e-01 +7.0230000e-02 +3.2650000e-02 +6.6490000e-02 +1.0033000e-01 +1.3417000e-01 +1.0337000e-01 +7.2570000e-02 +4.1770000e-02 +1.0970000e-02 +-1.9830000e-02 +4.4380000e-02 +1.0860000e-01 +1.7281000e-01 +1.0416000e-01 +3.5510000e-02 +-3.3150000e-02 +-1.0180000e-01 +-7.2620000e-02 +-4.3440000e-02 +-1.4260000e-02 +1.4920000e-02 +-2.0250000e-02 +-5.5430000e-02 +-9.0600000e-02 +-1.2578000e-01 +-1.6095000e-01 +-1.9613000e-01 +-1.4784000e-01 +-9.9550000e-02 +-5.1270000e-02 +-2.9800000e-03 +-1.9520000e-02 +-3.6050000e-02 +-5.2590000e-02 +-4.1820000e-02 +-3.1060000e-02 +-2.9030000e-02 +-2.6990000e-02 +2.5150000e-02 +1.7700000e-02 +2.2130000e-02 +2.6560000e-02 +4.1900000e-03 +-1.8190000e-02 +-4.0570000e-02 +-6.2940000e-02 +-2.4170000e-02 +1.4600000e-02 +5.3370000e-02 +2.4280000e-02 +-4.8000000e-03 +-3.3890000e-02 +-5.5700000e-03 +2.2740000e-02 +6.7900000e-03 +-9.1500000e-03 +-2.5090000e-02 +-4.1030000e-02 +-5.6980000e-02 +-1.8260000e-02 +2.0460000e-02 +4.5400000e-03 +-1.1380000e-02 +-2.1500000e-03 +7.0800000e-03 +4.9600000e-03 +2.8500000e-03 +7.4000000e-04 +-5.3400000e-03 +-1.1410000e-02 +3.6100000e-03 +1.8630000e-02 +3.3650000e-02 +4.8670000e-02 +3.0400000e-02 +1.2130000e-02 +-6.1400000e-03 +-2.4410000e-02 +1.3750000e-02 +1.0990000e-02 +8.2300000e-03 +5.4700000e-03 +8.1200000e-03 +1.0770000e-02 +-6.9200000e-03 +-2.4610000e-02 +-4.2300000e-02 +-5.9990000e-02 +-7.7680000e-02 +-9.5380000e-02 +-6.2090000e-02 +-2.8800000e-02 +4.4800000e-03 +3.7770000e-02 +1.7730000e-02 +-2.3100000e-03 +-2.2350000e-02 +1.7910000e-02 +5.8160000e-02 +3.7380000e-02 +1.6600000e-02 +-4.1800000e-03 +-2.4960000e-02 +-4.5740000e-02 +-2.0710000e-02 +4.3200000e-03 +2.9350000e-02 +1.5260000e-02 +1.8060000e-02 +2.0860000e-02 +7.9300000e-03 +-5.0100000e-03 +-1.7950000e-02 +-3.0890000e-02 +-1.8410000e-02 +-5.9300000e-03 +6.5500000e-03 +-2.5190000e-02 +-5.6930000e-02 +-4.0450000e-02 +-2.3980000e-02 +-7.5000000e-03 +8.9700000e-03 +3.8400000e-03 +-1.2900000e-03 +-6.4200000e-03 +-1.1560000e-02 +-2.6190000e-02 +-4.0820000e-02 +-5.5450000e-02 +-4.3660000e-02 +-3.1880000e-02 +-6.9640000e-02 +-5.6340000e-02 +-4.3030000e-02 +-2.9720000e-02 +-1.6420000e-02 +-3.1100000e-03 +1.0200000e-02 +2.3500000e-02 +3.6810000e-02 +5.0110000e-02 +2.4360000e-02 +-1.3900000e-03 +-2.7140000e-02 +-3.0900000e-03 +2.0960000e-02 +4.5010000e-02 +6.9060000e-02 +5.7730000e-02 +4.6400000e-02 +3.5070000e-02 +3.3570000e-02 +3.2070000e-02 +3.0570000e-02 +3.2500000e-02 +3.4440000e-02 +3.6370000e-02 +1.3480000e-02 +-9.4200000e-03 +-3.2310000e-02 +-2.9970000e-02 +-3.0950000e-02 +-3.1920000e-02 +-2.5880000e-02 +-1.9840000e-02 +-1.3790000e-02 +-7.7500000e-03 +-1.4490000e-02 +-2.1230000e-02 +1.5230000e-02 +5.1700000e-02 +8.8160000e-02 +1.2463000e-01 +1.6109000e-01 +1.2987000e-01 +9.8640000e-02 +6.7410000e-02 +3.6180000e-02 +4.9500000e-03 +4.2000000e-03 +3.4500000e-03 +2.6900000e-03 +-5.9220000e-02 +-1.2112000e-01 +-1.8303000e-01 +-1.2043000e-01 +-5.7820000e-02 +4.7900000e-03 +6.7400000e-02 +1.3001000e-01 +8.3730000e-02 +3.7450000e-02 +6.9790000e-02 +1.0213000e-01 +-3.5170000e-02 +-1.7247000e-01 +-1.3763000e-01 +-1.0278000e-01 +-6.7940000e-02 +-3.3100000e-02 +-3.6470000e-02 +-3.9840000e-02 +-5.1700000e-03 +2.9500000e-02 +6.4170000e-02 +9.8830000e-02 +1.3350000e-01 +5.9240000e-02 +-1.5030000e-02 +-8.9290000e-02 +-1.6355000e-01 +-6.0960000e-02 +4.1640000e-02 +1.5510000e-02 +-1.0610000e-02 +-3.6740000e-02 +-6.2870000e-02 +-8.8990000e-02 +-5.4300000e-02 +-1.9610000e-02 +1.5080000e-02 +4.9770000e-02 +8.4460000e-02 +5.0230000e-02 +1.6000000e-02 +-1.8230000e-02 +-5.2460000e-02 +-8.6690000e-02 +-6.7690000e-02 +-4.8700000e-02 +-2.9700000e-02 +-1.0710000e-02 +8.2900000e-03 +-3.1400000e-03 +2.9660000e-02 +6.2460000e-02 +-2.3400000e-03 +-6.7140000e-02 +-4.0510000e-02 +-1.3880000e-02 +1.2740000e-02 +8.0500000e-03 +3.0240000e-02 +5.2430000e-02 +2.3510000e-02 +-5.4100000e-03 +-3.4320000e-02 +-6.3240000e-02 +-9.2150000e-02 +-1.2107000e-01 +-8.4500000e-02 +-4.7940000e-02 +-1.1370000e-02 +2.5200000e-02 +6.1770000e-02 +4.0280000e-02 +1.8800000e-02 +4.4560000e-02 +7.0320000e-02 +9.6080000e-02 +1.2184000e-01 +6.3500000e-02 +5.1700000e-03 +-5.3170000e-02 +-3.1240000e-02 +-9.3000000e-03 +1.2630000e-02 +3.4570000e-02 +3.2830000e-02 +3.1090000e-02 +2.9350000e-02 +4.5110000e-02 +6.0870000e-02 +7.6630000e-02 +9.2390000e-02 +5.7420000e-02 +2.2450000e-02 +-1.2520000e-02 +6.8000000e-03 +2.6110000e-02 +4.5430000e-02 +1.5710000e-02 +-1.4020000e-02 +-4.3740000e-02 +-7.3470000e-02 +-3.9900000e-02 +-6.3300000e-03 +2.7240000e-02 +6.0800000e-02 +3.6690000e-02 +1.2580000e-02 +-1.1530000e-02 +-3.5640000e-02 +-6.7700000e-03 +2.2100000e-02 +5.0980000e-02 +7.9850000e-02 +6.9150000e-02 +5.8450000e-02 +4.7750000e-02 +3.7060000e-02 +2.6360000e-02 +5.8220000e-02 +9.0090000e-02 +1.2196000e-01 +1.0069000e-01 +7.9430000e-02 +5.8160000e-02 +3.6890000e-02 +1.5630000e-02 +-5.6400000e-03 +-2.6900000e-02 +-4.8170000e-02 +-6.9440000e-02 +-9.0700000e-02 +-1.1197000e-01 +-1.1521000e-01 +-1.1846000e-01 +-1.2170000e-01 +-1.2494000e-01 +-1.6500000e-01 +-2.0505000e-01 +-1.5713000e-01 +-1.0921000e-01 +-6.1290000e-02 +-1.3370000e-02 +3.4550000e-02 +8.2470000e-02 +7.5760000e-02 +6.9060000e-02 +6.2360000e-02 +8.7350000e-02 +1.1235000e-01 +1.3734000e-01 +1.2175000e-01 +1.0616000e-01 +9.0570000e-02 +7.4980000e-02 +8.0110000e-02 +8.5240000e-02 +9.0370000e-02 +6.2080000e-02 +3.3780000e-02 +5.4900000e-03 +-2.2810000e-02 +-5.4440000e-02 +-4.0300000e-02 +-2.6150000e-02 +-1.2010000e-02 +-2.0280000e-02 +-2.8550000e-02 +-6.2430000e-02 +-3.5240000e-02 +-8.0500000e-03 +-4.9480000e-02 +-3.6430000e-02 +-2.3370000e-02 +-3.3680000e-02 +-1.8790000e-02 +-3.8900000e-03 +1.1000000e-02 +2.5890000e-02 +1.4460000e-02 +3.0300000e-03 +-8.4000000e-03 +4.6300000e-03 +1.7660000e-02 +3.0690000e-02 +4.3720000e-02 +2.1650000e-02 +-4.2000000e-04 +-2.2490000e-02 +-4.4560000e-02 +-3.6380000e-02 +-2.8190000e-02 +-2.0010000e-02 +-1.1820000e-02 +-2.4450000e-02 +-3.7070000e-02 +-4.9690000e-02 +-5.8820000e-02 +-6.7950000e-02 +-7.7070000e-02 +-8.6200000e-02 +-9.5330000e-02 +-6.2760000e-02 +-3.0180000e-02 +2.3900000e-03 +3.4960000e-02 +4.3990000e-02 +5.3010000e-02 +3.1760000e-02 +1.0510000e-02 +-1.0730000e-02 +-3.1980000e-02 +-5.3230000e-02 +1.8600000e-03 +5.6960000e-02 +1.9850000e-02 +-1.7260000e-02 +-5.4380000e-02 +-1.2040000e-02 +3.0310000e-02 +7.2650000e-02 +1.1499000e-01 +7.2370000e-02 +2.9750000e-02 +-1.2880000e-02 +1.2120000e-02 +3.7110000e-02 +3.5170000e-02 +3.3230000e-02 +1.8530000e-02 +3.8300000e-03 +3.4200000e-03 +-2.1810000e-02 +-4.7040000e-02 +-7.2270000e-02 +-9.7500000e-02 +-1.2273000e-01 +-8.3170000e-02 +-4.3620000e-02 +-4.0700000e-03 +3.5490000e-02 +7.5040000e-02 +1.1460000e-01 +7.7690000e-02 +4.0780000e-02 +3.8700000e-03 +2.8400000e-03 +1.8200000e-03 +-5.5130000e-02 +4.7320000e-02 +5.2230000e-02 +5.7150000e-02 +6.2060000e-02 +6.6980000e-02 +7.1890000e-02 +2.7050000e-02 +-1.7790000e-02 +-6.2630000e-02 +-1.0747000e-01 +-1.5232000e-01 +-1.2591000e-01 +-9.9500000e-02 +-7.3090000e-02 +-4.6680000e-02 +-2.0270000e-02 +6.1400000e-03 +3.2550000e-02 +8.5900000e-03 +-1.5370000e-02 +-3.9320000e-02 +-6.3280000e-02 +-3.3220000e-02 +-3.1500000e-03 +2.6910000e-02 +1.1960000e-02 +-3.0000000e-03 +3.3500000e-03 +9.7000000e-03 +1.6050000e-02 +2.2390000e-02 +4.2150000e-02 +6.1910000e-02 +8.1670000e-02 +3.4770000e-02 +-1.2120000e-02 +-1.3090000e-02 +-1.4070000e-02 +-5.2740000e-02 +-2.5440000e-02 +1.8600000e-03 +2.9160000e-02 +5.6460000e-02 +8.3760000e-02 +1.7540000e-02 +-4.8690000e-02 +-2.0740000e-02 +7.2200000e-03 +3.5170000e-02 +-5.2800000e-03 +-4.5720000e-02 +-8.6170000e-02 +-6.9600000e-02 +-5.3030000e-02 +-3.6460000e-02 +-1.9890000e-02 +-3.3200000e-03 +1.3250000e-02 +2.9820000e-02 +1.1010000e-02 +-7.8100000e-03 +-2.6620000e-02 +-5.6300000e-03 +1.5360000e-02 +3.6350000e-02 +5.7340000e-02 +3.1590000e-02 +5.8400000e-03 +-1.9920000e-02 +-2.0100000e-03 +1.5890000e-02 +-1.0240000e-02 +-3.6360000e-02 +-6.2490000e-02 +-4.7800000e-02 +-3.3110000e-02 +-4.9410000e-02 +-6.5700000e-02 +-8.2000000e-02 +-4.9800000e-02 +-1.7600000e-02 +1.4600000e-02 +4.6800000e-02 +7.9000000e-02 +4.7500000e-02 +1.6000000e-02 +-1.5500000e-02 +-1.0200000e-03 +1.3470000e-02 +2.7950000e-02 +4.2440000e-02 +5.6920000e-02 +3.7810000e-02 +1.8700000e-02 +-4.1000000e-04 +-1.9520000e-02 +-4.2700000e-03 +1.0980000e-02 +2.6230000e-02 +4.1480000e-02 +1.8210000e-02 +-5.0600000e-03 +-8.7400000e-03 +-3.7260000e-02 +-6.5790000e-02 +-2.6000000e-02 +1.3800000e-02 +5.3590000e-02 +9.3380000e-02 +5.8830000e-02 +2.4290000e-02 +-1.0260000e-02 +-4.4800000e-02 +-1.0830000e-02 +-1.8690000e-02 +-2.6550000e-02 +-3.4410000e-02 +-2.5030000e-02 +-1.5640000e-02 +-6.2600000e-03 +-1.0090000e-02 +-1.3920000e-02 +1.4900000e-02 +4.3720000e-02 +3.4630000e-02 +2.0980000e-02 +7.3300000e-03 +-6.3200000e-03 +-1.9970000e-02 +7.6700000e-03 +3.5320000e-02 +3.4090000e-02 +3.2870000e-02 +3.1640000e-02 +2.4030000e-02 +1.6420000e-02 +9.8200000e-03 +3.2200000e-03 +-3.3900000e-03 +2.2020000e-02 +-1.9410000e-02 +-6.0850000e-02 +-1.0228000e-01 +-7.8470000e-02 +-5.4660000e-02 +-3.0840000e-02 +-7.0300000e-03 +1.6780000e-02 +1.9460000e-02 +2.2140000e-02 +2.4830000e-02 +1.8090000e-02 +-2.0200000e-03 +-2.2130000e-02 +-2.7800000e-03 +1.6560000e-02 +3.5900000e-02 +5.5250000e-02 +7.4590000e-02 +6.2030000e-02 +4.9480000e-02 +3.6920000e-02 +-1.4500000e-03 +4.5990000e-02 +4.0790000e-02 +3.5580000e-02 +3.0370000e-02 +3.6260000e-02 +4.2150000e-02 +4.8030000e-02 +5.3920000e-02 +4.9470000e-02 +4.5020000e-02 +4.0560000e-02 +3.6110000e-02 +3.1660000e-02 +6.1400000e-03 +-1.9370000e-02 +-4.4890000e-02 +-7.0400000e-02 +-9.5920000e-02 +-7.7450000e-02 +-5.8990000e-02 +-4.0520000e-02 +-2.2060000e-02 +-3.5900000e-03 +1.4870000e-02 +1.0050000e-02 +5.2300000e-03 +4.1000000e-04 +-4.4100000e-03 +-9.2300000e-03 +-1.1890000e-02 +-1.5230000e-02 +-1.8560000e-02 +-2.1900000e-02 +-9.8300000e-03 +2.2400000e-03 +1.4310000e-02 +3.3500000e-03 +-7.6000000e-03 +-1.8560000e-02 +-7.3700000e-03 +3.8300000e-03 +1.5020000e-02 +2.6220000e-02 +1.0160000e-02 +-5.9000000e-03 +-2.1960000e-02 +-1.2100000e-03 +1.9530000e-02 +4.0270000e-02 +2.8260000e-02 +1.6250000e-02 +4.2400000e-03 +1.9600000e-03 +-3.1000000e-04 +-2.5800000e-03 +-4.8600000e-03 +-7.1300000e-03 +-9.4100000e-03 +-1.1680000e-02 +-1.3960000e-02 +-1.7500000e-02 +-2.1040000e-02 +-2.4580000e-02 +-2.8130000e-02 +-3.1670000e-02 +-3.5210000e-02 +-4.2050000e-02 +-4.8890000e-02 +-3.5590000e-02 +-2.2290000e-02 +-8.9900000e-03 +4.3100000e-03 +1.7620000e-02 +7.1400000e-03 +-3.3400000e-03 +-1.3830000e-02 +1.3140000e-02 +4.0110000e-02 +6.7080000e-02 +4.8200000e-02 +2.9320000e-02 +1.0430000e-02 +-8.4500000e-03 +-2.7330000e-02 +-4.6210000e-02 +-3.1550000e-02 +-1.6880000e-02 +-2.2200000e-03 +1.2440000e-02 +2.6830000e-02 +4.1210000e-02 +5.5590000e-02 +3.2530000e-02 +9.4600000e-03 +-1.3600000e-02 +-1.4320000e-02 +-1.5040000e-02 +-1.5760000e-02 +-4.2090000e-02 +-2.6850000e-02 +-1.1610000e-02 +3.6300000e-03 +1.8870000e-02 +3.4110000e-02 +3.1150000e-02 +2.8190000e-02 +2.9170000e-02 +3.0150000e-02 +3.1130000e-02 +3.8800000e-03 +-2.3370000e-02 +-5.0620000e-02 +-3.8200000e-02 +-2.5790000e-02 +-1.3370000e-02 +-9.5000000e-04 +1.1460000e-02 +2.3880000e-02 +3.6290000e-02 +1.0470000e-02 +-1.5350000e-02 +-4.1170000e-02 +-6.6990000e-02 +-5.2070000e-02 +-3.7150000e-02 +-2.2220000e-02 +-7.3000000e-03 +7.6200000e-03 +2.2540000e-02 +3.7470000e-02 +4.0010000e-02 +4.2560000e-02 +4.5070000e-02 +4.7590000e-02 +5.0100000e-02 +4.5450000e-02 +4.0800000e-02 +2.8760000e-02 +1.6710000e-02 +4.6700000e-03 +-7.3800000e-03 +-1.1600000e-03 +5.0600000e-03 +1.1280000e-02 +1.7500000e-02 +-2.1100000e-03 +-2.1730000e-02 +-4.1350000e-02 +-6.0960000e-02 +-8.0580000e-02 +-6.9950000e-02 +-5.9310000e-02 +-4.8680000e-02 +-3.8050000e-02 +-2.5570000e-02 +-1.3100000e-02 +-6.3000000e-04 +1.1850000e-02 +2.4320000e-02 +3.6800000e-02 +4.9270000e-02 +2.9740000e-02 +1.0210000e-02 +-9.3200000e-03 +-2.8840000e-02 +-4.8370000e-02 +-6.7900000e-02 +-4.8620000e-02 +-2.9340000e-02 +-1.0060000e-02 +9.2200000e-03 +2.8510000e-02 +4.7790000e-02 +2.4560000e-02 +1.3300000e-03 +-2.1900000e-02 +-4.5130000e-02 +-6.8360000e-02 +-4.9780000e-02 +-3.1200000e-02 +-1.2620000e-02 +5.9600000e-03 +2.4530000e-02 +4.3110000e-02 +6.1690000e-02 +8.0270000e-02 +9.8850000e-02 +6.4520000e-02 +3.0190000e-02 +-4.1400000e-03 +-3.8480000e-02 +-7.2810000e-02 +-5.9990000e-02 +-4.7170000e-02 +-3.4350000e-02 +-3.2310000e-02 +-3.0280000e-02 +-2.8240000e-02 +-3.9600000e-03 +2.0320000e-02 +3.1300000e-03 +-1.4060000e-02 +-3.1240000e-02 +-4.8430000e-02 +-6.5620000e-02 +-5.1320000e-02 +-3.7020000e-02 +-2.2720000e-02 +-8.4300000e-03 +5.8700000e-03 +2.0170000e-02 +2.6980000e-02 +3.3790000e-02 +4.0610000e-02 +4.7420000e-02 +5.4230000e-02 +3.5350000e-02 +1.6470000e-02 +1.6220000e-02 +1.5980000e-02 +1.5740000e-02 +7.4700000e-03 +-8.0000000e-04 +-9.0700000e-03 +7.2000000e-04 +1.0510000e-02 +2.0300000e-02 +3.0090000e-02 +3.9890000e-02 +3.4780000e-02 +2.9670000e-02 +2.4570000e-02 +3.0750000e-02 +3.6940000e-02 +4.3130000e-02 +4.9310000e-02 +5.5500000e-02 +6.1680000e-02 +-5.2600000e-03 +-7.2200000e-02 +-6.3360000e-02 +-5.4510000e-02 +-4.5660000e-02 +-3.6810000e-02 +-3.6780000e-02 +-3.6750000e-02 +-3.6720000e-02 +-1.7650000e-02 +1.4300000e-03 +2.0510000e-02 +3.9580000e-02 +5.8660000e-02 +3.5560000e-02 +1.2450000e-02 +-1.0660000e-02 +-3.3760000e-02 +-5.6870000e-02 +-4.5020000e-02 +-3.3170000e-02 +-2.1310000e-02 +-9.4600000e-03 +2.3900000e-03 +-2.0800000e-03 +-6.5400000e-03 +-1.1010000e-02 +-1.5480000e-02 +-1.2000000e-02 +-8.5100000e-03 +-5.0300000e-03 +-1.5400000e-03 +1.9500000e-03 +5.1000000e-04 +-9.2000000e-04 +1.1350000e-02 +2.3630000e-02 +3.5900000e-02 +4.8180000e-02 +6.0450000e-02 +7.2730000e-02 +2.8470000e-02 +-1.5790000e-02 +-6.0040000e-02 +-5.0690000e-02 +-4.1340000e-02 +-3.1990000e-02 +-3.1350000e-02 +-3.0710000e-02 +-3.0070000e-02 +-1.8630000e-02 +-7.1900000e-03 +4.2500000e-03 +1.5700000e-02 +2.7140000e-02 +3.8580000e-02 +2.9750000e-02 +2.0920000e-02 +2.3340000e-02 +2.5760000e-02 +2.8190000e-02 +3.0610000e-02 +3.3040000e-02 +1.3710000e-02 +-5.6100000e-03 +-2.4940000e-02 +-2.2080000e-02 +-1.9230000e-02 +-1.6380000e-02 +-1.3530000e-02 +-1.2610000e-02 +-1.1700000e-02 +-1.6900000e-03 +8.3300000e-03 +1.8340000e-02 +2.8350000e-02 +3.8360000e-02 +4.8380000e-02 +3.7490000e-02 +2.6600000e-02 +1.5710000e-02 +4.8200000e-03 +-6.0700000e-03 +-1.6960000e-02 +-7.8000000e-03 +1.3600000e-03 +1.0520000e-02 +1.9680000e-02 +2.8840000e-02 +-5.0400000e-03 +-3.8930000e-02 +-2.3420000e-02 +-7.9100000e-03 +7.5900000e-03 +2.3100000e-02 +7.0700000e-03 +-8.9500000e-03 +-2.4980000e-02 +-4.1000000e-02 +-5.7030000e-02 +-2.9200000e-02 +-1.3700000e-03 +2.6450000e-02 +5.4280000e-02 +3.5870000e-02 +1.7460000e-02 +-9.6000000e-04 +-1.9370000e-02 +-3.7780000e-02 +-2.2810000e-02 +-7.8400000e-03 +7.1300000e-03 +2.2100000e-02 +3.7070000e-02 +5.2040000e-02 +6.7010000e-02 +8.1980000e-02 +3.0850000e-02 +-2.0270000e-02 +-7.1400000e-02 +-1.2253000e-01 +-8.6440000e-02 +-5.0350000e-02 +-1.4260000e-02 +2.1830000e-02 +5.7920000e-02 +9.4000000e-02 +1.3009000e-01 +3.6110000e-02 +-5.7870000e-02 +-4.8020000e-02 +-3.8170000e-02 +-2.8320000e-02 +-1.8460000e-02 +-8.6100000e-03 +-3.6520000e-02 +-6.4440000e-02 +-6.1690000e-02 +-5.8940000e-02 +-5.6180000e-02 +-6.0730000e-02 +-6.5280000e-02 +-4.6280000e-02 +-2.7280000e-02 +-8.2900000e-03 +1.0710000e-02 +2.9700000e-02 +3.1380000e-02 +3.3060000e-02 +3.4740000e-02 +3.6420000e-02 +4.5740000e-02 +5.5060000e-02 +6.4390000e-02 +7.3710000e-02 +8.3030000e-02 +3.6050000e-02 +-1.0920000e-02 +-5.7900000e-02 +-4.6960000e-02 +-3.6020000e-02 +-2.5080000e-02 +-1.4140000e-02 +-3.5610000e-02 +-5.7080000e-02 +-7.8550000e-02 +-6.3040000e-02 +-4.7530000e-02 +-3.2030000e-02 +-1.6520000e-02 +-1.0200000e-03 +9.2200000e-03 +1.9460000e-02 +2.9700000e-02 +3.9930000e-02 +5.0170000e-02 +6.0410000e-02 +7.0650000e-02 +8.0890000e-02 +-1.9200000e-03 +-8.4730000e-02 +-7.0320000e-02 +-5.5900000e-02 +-4.1480000e-02 +-5.2960000e-02 +-6.4430000e-02 +-7.5900000e-02 +-8.7380000e-02 +-9.8850000e-02 +-6.7980000e-02 +-3.7100000e-02 +-6.2300000e-03 +2.4650000e-02 +5.5530000e-02 +8.6400000e-02 +1.1728000e-01 +1.4815000e-01 +8.7150000e-02 +2.6150000e-02 +-3.4850000e-02 +-9.5840000e-02 +-7.1000000e-02 +-4.6160000e-02 +-2.1320000e-02 +3.5300000e-03 +2.8370000e-02 +5.3210000e-02 +-4.6900000e-03 +-6.2580000e-02 +-1.2048000e-01 +-9.9600000e-02 +-7.8720000e-02 +-5.7840000e-02 +-3.6960000e-02 +-1.6080000e-02 +4.8000000e-03 +2.5680000e-02 +4.6560000e-02 +6.7440000e-02 +8.8320000e-02 +1.0920000e-01 +1.3008000e-01 +1.0995000e-01 +8.9820000e-02 +6.9690000e-02 +4.9550000e-02 +4.0060000e-02 +3.0560000e-02 +2.1070000e-02 +1.1580000e-02 +7.8000000e-03 +4.0200000e-03 +2.4000000e-04 +-3.5400000e-03 +-7.3200000e-03 +-1.1100000e-02 +-7.8000000e-03 +-4.5000000e-03 +-1.2000000e-03 +2.1000000e-03 +5.4000000e-03 +-8.3100000e-03 +-2.2030000e-02 +-3.5750000e-02 +-4.9470000e-02 +-6.3190000e-02 +-5.0460000e-02 +-3.7730000e-02 +-2.5000000e-02 +-1.2270000e-02 +4.6000000e-04 +4.8200000e-03 +9.1900000e-03 +1.3550000e-02 +1.7910000e-02 +2.2280000e-02 +8.8300000e-03 +-4.6200000e-03 +-1.8070000e-02 +-3.1520000e-02 +-2.2760000e-02 +-1.4010000e-02 +-5.2600000e-03 +3.5000000e-03 +1.2250000e-02 +2.1010000e-02 +1.4370000e-02 +7.7300000e-03 +1.1000000e-03 +8.2300000e-03 +1.5370000e-02 +2.2510000e-02 +1.7130000e-02 +1.1750000e-02 +6.3700000e-03 +1.3760000e-02 +2.1140000e-02 +2.8520000e-02 +3.5910000e-02 +4.3290000e-02 +3.4580000e-02 +2.5870000e-02 +1.7150000e-02 +8.4400000e-03 +-2.7000000e-04 +-8.9800000e-03 +-1.2600000e-03 +6.4500000e-03 +1.4170000e-02 +2.0390000e-02 +2.6610000e-02 +3.2830000e-02 +3.9050000e-02 +4.5270000e-02 +3.6390000e-02 +2.7500000e-02 +1.8620000e-02 +9.7400000e-03 +8.6000000e-04 +-1.3330000e-02 +-2.7520000e-02 +-4.1710000e-02 +-2.8120000e-02 +-1.4530000e-02 +-9.4000000e-04 +1.2640000e-02 +2.6230000e-02 +1.6900000e-02 +7.5600000e-03 +-1.7700000e-03 +-1.1110000e-02 +-2.0440000e-02 +-2.9770000e-02 +-3.9110000e-02 +-2.4420000e-02 +-9.7300000e-03 +4.9600000e-03 +1.9650000e-02 +3.4340000e-02 +2.0540000e-02 +6.7400000e-03 +-7.0600000e-03 +-2.0860000e-02 +-3.4660000e-02 +-2.6630000e-02 +-1.8600000e-02 +-1.0570000e-02 +-2.5400000e-03 +-6.3000000e-04 +1.2800000e-03 +3.1900000e-03 +5.1000000e-03 +9.9900000e-03 +1.4880000e-02 +7.9100000e-03 +9.3000000e-04 +-6.0500000e-03 +3.4200000e-03 +1.2880000e-02 +2.2350000e-02 +3.1810000e-02 +4.1280000e-02 +2.7070000e-02 +1.2870000e-02 +-1.3400000e-03 +-1.5540000e-02 +-2.9750000e-02 +-4.3950000e-02 +-3.6120000e-02 +-2.8280000e-02 +-2.0440000e-02 +-1.2600000e-02 +-4.7600000e-03 +3.0700000e-03 +1.0910000e-02 +9.8400000e-03 +8.7600000e-03 +7.6800000e-03 +6.6100000e-03 +1.2340000e-02 +1.8070000e-02 +2.3800000e-02 +2.9530000e-02 +3.5260000e-02 +2.7840000e-02 +2.0420000e-02 +1.3000000e-02 +-3.4150000e-02 +-6.2800000e-03 +-6.2100000e-03 +-6.1500000e-03 +-6.0900000e-03 +-6.0200000e-03 +-5.9600000e-03 +-5.9000000e-03 +-5.8300000e-03 +-5.7700000e-03 +-5.7100000e-03 +-5.6400000e-03 +-5.5800000e-03 +-5.5200000e-03 +-5.4500000e-03 +-5.3900000e-03 +-5.3200000e-03 +-5.2600000e-03 +-5.2000000e-03 +-5.1300000e-03 +-5.0700000e-03 +-5.0100000e-03 +-4.9400000e-03 +-4.8800000e-03 +-4.8200000e-03 +-4.7500000e-03 +-4.6900000e-03 +-4.6300000e-03 +-4.5600000e-03 +-4.5000000e-03 +-4.4400000e-03 +-4.3700000e-03 +-4.3100000e-03 +-4.2500000e-03 +-4.1800000e-03 +-4.1200000e-03 +-4.0600000e-03 +-3.9900000e-03 +-3.9300000e-03 +-3.8700000e-03 +-3.8000000e-03 +-3.7400000e-03 +-3.6800000e-03 +-3.6100000e-03 +-3.5500000e-03 +-3.4900000e-03 +-3.4200000e-03 +-3.3600000e-03 +-3.3000000e-03 +-3.2300000e-03 +-3.1700000e-03 +-3.1100000e-03 +-3.0400000e-03 +-2.9800000e-03 +-2.9200000e-03 +-2.8500000e-03 +-2.7900000e-03 +-2.7300000e-03 +-2.6600000e-03 +-2.6000000e-03 +-2.5400000e-03 +-2.4700000e-03 +-2.4100000e-03 +-2.3500000e-03 +-2.2800000e-03 +-2.2200000e-03 +-2.1600000e-03 +-2.0900000e-03 +-2.0300000e-03 +-1.9700000e-03 +-1.9000000e-03 +-1.8400000e-03 +-1.7800000e-03 +-1.7100000e-03 +-1.6500000e-03 +-1.5800000e-03 +-1.5200000e-03 +-1.4600000e-03 +-1.3900000e-03 +-1.3300000e-03 +-1.2700000e-03 +-1.2000000e-03 +-1.1400000e-03 +-1.0800000e-03 +-1.0100000e-03 +-9.5000000e-04 +-8.9000000e-04 +-8.2000000e-04 +-7.6000000e-04 +-7.0000000e-04 +-6.3000000e-04 +-5.7000000e-04 +-5.1000000e-04 +-4.4000000e-04 +-3.8000000e-04 +-3.2000000e-04 +-2.5000000e-04 +-1.9000000e-04 +-1.3000000e-04 +-6.0000000e-05 +0.0000000e+00 +0.0000000e+00 diff --git a/pyExamples/nonlinear_mdof.py b/pyExamples/nonlinear_mdof.py new file mode 100644 index 0000000..5e248d1 --- /dev/null +++ b/pyExamples/nonlinear_mdof.py @@ -0,0 +1,130 @@ +''' +========================================================================================================================= +================================================== NonLinear MDOF ======================================================= +========================================================================================================================= + +By M. Eng. Joseph Jaramillo, National University of Engineering +e-mail: jjaramillod@uni.edu.pe +Date - 22/10/2024 + +This example models a multi-degree-of-freedom (MDOF) damped system commonly used in earthquake engineering of a three-story +building. It conducts a nonlinear dynamic (time history) analysis using the El Centro 1940 earthquake as the input ground +motion. +''' + +import openseespy.opensees as ops +import numpy as np +import plot_nonlinear_mdof_graphs +# Base units +m = 1 # Meters +s = 1 # Seconds +kN = 1 # Kilo Newtons + +# Derivated units +g = 9.81*m/s**2 # Gravity +cm = 1e-2*m # Centimeter +mm = 1e-3*m # Milimeter +Ton = kN*s**2/m # Ton + +# Parameters - data +N = 3 # N° DOF +h = 0.05 # Damping ratio +dt = 0.02 # Time step +dt_out = 0.001 # Output time step +tFinal = 35 # Analysis stop time +m1 = 0.1*Ton # Mass / floor +m2 = 0.1*Ton +m3 = 0.1*Ton +Py1 = 0.55*kN # Yielding strength / floor +Py2 = 0.45*kN +Py3 = 0.30*kN +K1 = 60*kN/m # Stiffness / floor +K2 = 50*kN/m +K3 = 30*kN/m +b = 0.01 # Strain-hardening ratio + +######## Model ############### +ops.wipe() # clear memory of all past model definitions +ops.model('basic', '-ndm', 1, '-ndf', 1) # Define the model builder, ndm=#dimension, ndf=#dofs + +# Create nodes +ops.node(0, 0) +ops.node(1, 0, '-mass', m1) +ops.node(2, 0, '-mass', m2) +ops.node(3, 0, '-mass', m3) + +# Define boundary condition +ops.fix(0, 1) + +# Material definition +ops.uniaxialMaterial('Steel01', 1, Py1, K1, b) +ops.uniaxialMaterial('Steel01', 2, Py2, K2, b) +ops.uniaxialMaterial('Steel01', 3, Py3, K3, b) + +# Element definition +ops.element('zeroLength', 1, 0, 1, '-mat', 1 , '-dir', 1, '-doRayleigh', 1) +ops.element('zeroLength', 2, 1, 2, '-mat', 2 , '-dir', 1, '-doRayleigh', 1) +ops.element('zeroLength', 3, 2, 3, '-mat', 3 , '-dir', 1, '-doRayleigh', 1) + +# Set Rayleigh damping +w1, w2, w3 = np.array(ops.eigen('-fullGenLapack', 3))**0.5 +a0 = 2*h*w1*w2/(w1+w2) +a1 = 2*h/(w1+w2) +ops.rayleigh(a0, .0, .0, a1) # RAYLEIGH damping + +# Natural periods +print('\nNatural periods: Natural frequencies:') +print(f'T1 = {2*np.pi/w1:.3f} [s] | f1 = {w1/(2*np.pi):.3f} [Hz]') +print(f'T2 = {2*np.pi/w2:.3f} [s] | f2 = {w2/(2*np.pi):.3f} [Hz]') +print(f'T3 = {2*np.pi/w3:.3f} [s] | f3 = {w3/(2*np.pi):.3f} [Hz]') + +# Define the dynamic analysis +load_tag = 1 +patter_tag = 1 +direc = 1 +ops.timeSeries('Path', load_tag, '-dt', dt, '-filePath', r'./el_centro.th', '-factor', g) # Reading ground motion +ops.pattern('UniformExcitation', patter_tag, direc, '-accel', load_tag) + +# Define output data files +rD_path = r'./Relative_disp.out' +ops.recorder('Node', '-file', r'./Relative_disp.out', '-time', '-dT', dt_out, '-node', 1, 2, 3, '-dof', 1, 'disp') # Relative displacements with respect to the ground + +rA_path = r'./Relative_accel.out' +ops.recorder('Node', '-file', rA_path, '-time', '-dT', dt_out, '-node', 1, 2, 3, '-dof', 1, 'accel') # Relative accelerations with respect to the ground + +aA_path = r'./Absolute_accel.out' +ops.recorder('Node', '-file', aA_path, '-timeSeries', load_tag, '-time', '-dT', dt_out, '-node', 0, 1, 2, 3, '-dof', 1, 'accel') # Absolute accelerations + +eF_path = r'./Element_force.out' +ops.recorder('Element', '-file', eF_path, '-time', '-dT', dt_out, '-ele', 1, 2, 3, 'localForce') # Local spring force + +# Run the dynamic analysis +Gamma = 0.5 +Beta = 0.25 +tol = 1.0e-12 +itrs = 100 +ops.wipeAnalysis() +ops.algorithm('Newton') +ops.system('BandGen') +ops.numberer('Plain') +ops.constraints('Plain') +ops.integrator('Newmark', Gamma, Beta) +ops.analysis('Transient') +ops.test('NormUnbalance', tol, itrs) +num_steps = int(tFinal/dt_out+1) +ops.analyze(num_steps, dt_out) +ops.wipe() + +rD = np.genfromtxt(rD_path, usecols=[1, 2, 3]).T + +rA = np.genfromtxt(rA_path, usecols=[1, 2, 3]).T +aA = np.genfromtxt(aA_path, usecols=[1, 2, 3, 4]).T + +eF = np.genfromtxt(eF_path, usecols=[1, 2, 3]).T + + +# Matplotlib plots +rD /= mm +K = [K1, K2, K3] +Py = [Py1, Py2, Py3] +plot_nonlinear_mdof_graphs.plot(N, rD, rA, aA, eF, dt_out, num_steps, tFinal, K, Py) diff --git a/pyExamples/plot_nonlinear_mdof_graphs.py b/pyExamples/plot_nonlinear_mdof_graphs.py new file mode 100644 index 0000000..21126b7 --- /dev/null +++ b/pyExamples/plot_nonlinear_mdof_graphs.py @@ -0,0 +1,124 @@ +import numpy as np +import matplotlib.pyplot as plt +from matplotlib.ticker import MultipleLocator +from matplotlib import rcParams + +rcParams['font.family'] = 'Times New Roman' +rcParams['font.size'] = 10 +rcParams['lines.linewidth'] = 0.8 +rcParams['lines.color'] = 'C0' +rcParams['legend.frameon'] = False +rcParams['axes.linewidth'] = 0.5 +rcParams['xtick.major.width'] = 0.9 +rcParams['xtick.minor.width'] = 0.9 +rcParams['ytick.major.width'] = 0.9 +rcParams['ytick.minor.width'] = 0.9 +rcParams["savefig.format"] = 'jpg' +rcParams["savefig.transparent"] = False +rcParams["grid.alpha"] = 0.35 +rcParams["grid.color"] = 'k' +rcParams["grid.linewidth"] = 0.5 +rcParams['figure.titleweight'] = 'bold' +rcParams['savefig.dpi'] = 600 + + +def plot(N, rD, rA, aA, eF, dt_out, num_steps, tFinal, K, Py): + + z = lambda x: np.min(x) if abs(np.min(x)) > abs(np.max(x)) else np.max(x) + t = np.arange(0, num_steps) * dt_out + + # Plotting absolute accelerations + fig, axs = plt.subplots(N+1, figsize=(8, 5), sharex=True, sharey=True) + fig.suptitle('Absolute Accelerations') + + gm = aA[0] + peak = z(gm) + axs[0].plot(t, gm, f'k', label=f'Ground peak: {peak:.2f} [m/s2]') + + for i, ax in enumerate(axs[1:]): + x = aA[i+1] + peak = z(x) + ax.plot(t, x, f'C{i+1}', label=f'Floor {i+1} peak: {peak:.2f} [m/s2]') + + for ax in axs: + ax.set_xlim(.0, tFinal) + ax.set_ylim(-8, 8) + ax.grid() + ax.legend(loc=(0.72, 1.0)) + ax.label_outer() + ax.xaxis.set_major_locator(MultipleLocator(5)) + ax.yaxis.set_major_locator(MultipleLocator(4)) + + axs[1].set_ylabel('Acceleration [m/s2]', loc='top') + axs[1].yaxis.set_label_coords(-0.05, .5) + axs[3].set_xlabel('Time [s]') + + plt.subplots_adjust(0.08, 0.1, 0.97, 0.9, 0.1, 0.4) + plt.savefig(r'./nonlinear_mdof_abs_accel.jpg') + + + # Plotting relative accelerations + fig, axs = plt.subplots(N, figsize=(8, 3.8)) + fig.suptitle('Relative Accelerations') + + for i, ax in enumerate(axs): + peak = z(rA[i]) + ax.plot(t, rA[i], f'C{i+1}', label=f'Floor {i+1} peak: {peak:.2f} [m/s2]') + ax.set_xlim(.0, tFinal) + ax.set_ylim(-8, 8) + ax.xaxis.set_major_locator(MultipleLocator(5)) + ax.yaxis.set_major_locator(MultipleLocator(4)) + ax.grid() + ax.legend(loc=(0.72, 1.0)) + ax.label_outer() + axs[1].set_ylabel('Acceleration [m/s2]') + axs[2].set_xlabel('Time [s]') + plt.subplots_adjust(0.08, 0.12, 0.97, 0.9, 0.1, 0.4) + plt.savefig(r'./nonlinear_mdof_rel_accel.jpg') + + # Plotting relative displacements + fig, axs = plt.subplots(N, figsize=(8, 3.8)) + fig.suptitle('Relative Displacements') + + for i, ax in enumerate(axs): + peak = z(rD[i]) + ax.plot(t, rD[i], f'C{i+1}', label=f'Floor {i+1} peak: {peak:.2f} [mm]') + ax.set_xlim(.0, tFinal) + ax.set_ylim(-80, 80) + ax.xaxis.set_major_locator(MultipleLocator(5)) + ax.yaxis.set_major_locator(MultipleLocator(40)) + ax.grid() + ax.legend(loc=(0.72, 1.0)) + ax.label_outer() + axs[1].set_ylabel('Displacement [mm]') + axs[2].set_xlabel('Time [s]') + plt.subplots_adjust(0.08, 0.12, 0.97, 0.9, 0.1, 0.4) + plt.savefig(r'./nonlinear_mdof_rel_disp.jpg') + + + # Plotting Hysteresis by floor + fig, axs = plt.subplots(1, N, figsize=(10, 3.5)) + fig.suptitle('Floor Hysteresis') + + axs[0].plot(rD[0,:], eF[0,:], 'C1', label=f'Floor 1 (K={K[0]} [kN/m]; Py={Py[0]:.2f} [kN])') + axs[1].plot(rD[1,:] - rD[0,:], eF[1,:], 'C2', label=f'Floor 2 (K={K[1]} [kN/m]; Py={Py[1]:.2f} [kN])') + axs[2].plot(rD[2,:] - rD[1,:], eF[2,:], 'C3', label=f'Floor 3 (K={K[2]} [kN/m]; Py={Py[2]:.2f} [kN])') + + for ax in axs: + # ax.set_xlim(.0, tFinal) + ax.set_ylim(-0.6, 0.6) + ax.set_xlim(-30, 30) + ax.grid() + ax.legend(loc=(0.06, 1.0)) + ax.label_outer() + ax.set_xlabel('Displacement [mm]') + ax.xaxis.set_major_locator(MultipleLocator(10)) + ax.yaxis.set_major_locator(MultipleLocator(0.2)) + + axs[0].set_ylabel('Force [kN]') + plt.subplots_adjust(0.06, 0.13, 0.97, 0.86, 0.1) + plt.savefig(r'./nonlinear_mdof_hysteresis.jpg') + + plt.show() + + diff --git a/src/NonlinearMDOF.rst b/src/NonlinearMDOF.rst new file mode 100644 index 0000000..0f27874 --- /dev/null +++ b/src/NonlinearMDOF.rst @@ -0,0 +1,31 @@ +.. include:: sub.txt + +============== +Nonlinear MDOF +============== + +#. The source code is developed by `Joseph Jaramillo `_ from National University of Engineering. +#. The source code is shown below, which can be downloaded :download:`here `. +#. The ground motion file :download:`here `. +#. And also the python plotting script :download:`here `. +#. Make sure the `numpy`_ and `matplotlib`_ packages are installed in your Python distribution. +#. Run the source code in your favorite Python program and should see: + +:: + + Natural periods: Natural frequencies: + T1 = 0.628 [s] | f1 = 1.592 [Hz] + T2 = 0.257 [s] | f2 = 3.898 [Hz] + T3 = 0.162 [s] | f3 = 6.164 [Hz] + +.. image:: /_static/nonlinear_mdof_abs_accel.jpg + +.. image:: /_static/nonlinear_mdof_rel_accel.jpg + +.. image:: /_static/nonlinear_mdof_rel_disp.jpg + +.. image:: /_static/nonlinear_mdof_hysteresis.jpg + +.. literalinclude:: /pyExamples/nonlinear_mdof.py + :linenos: + diff --git a/src/earthquake.rst b/src/earthquake.rst index a5d8166..1b60dd6 100644 --- a/src/earthquake.rst +++ b/src/earthquake.rst @@ -1,21 +1,23 @@ -===================== - Earthquake Examples -===================== - - -#. :doc:`Canti2DEQ` -#. :doc:`RCFrameEarthquake` -#. :doc:`exampleNamedSpacedNonlinearSDOF` -#. :doc:`exampleRotDSpectra` - - - -.. toctree:: - :maxdepth: 1 - :hidden: - - Canti2DEQ - RCFrameEarthquake - exampleNamedSpacedNonlinearSDOF - exampleRotDSpectra - +===================== + Earthquake Examples +===================== + + +#. :doc:`Canti2DEQ` +#. :doc:`RCFrameEarthquake` +#. :doc:`exampleNamedSpacedNonlinearSDOF` +#. :doc:`exampleRotDSpectra` +#. :doc:`NonlinearMDOF` + + + +.. toctree:: + :maxdepth: 1 + :hidden: + + Canti2DEQ + RCFrameEarthquake + exampleNamedSpacedNonlinearSDOF + exampleRotDSpectra + NonlinearMDOF +