Cantilever 2D Column with Units-Static PushoverΒΆ

Converted to openseespy by: Pavan Chigullapally
                      University of Auckland
                      Email: pchi893@aucklanduni.ac.nz
  1. To run Uniaxial Inelastic Material, Fiber Section, Nonlinear Mode, Static Pushover Analysis

  2. First import the InelasticFiberSection.py (upto gravity loading is already in this script) and run the current script

  3. To run EQ ground-motion analysis BM68elc.acc needs to be downloaded into the same directory)

  4. Same acceleration input at all nodes restrained in specified direction (uniform acceleration input at all support nodes)

  5. The problem description can be found here (example:3)

  6. The source code is shown below, which can be downloaded here.

 1# -*- coding: utf-8 -*-
 2"""
 3Created on Mon Apr 22 15:12:06 2019
 4
 5@author: pchi893
 6"""
 7# Converted to openseespy by: Pavan Chigullapally       
 8#                         University of Auckland  
 9#                         Email: pchi893@aucklanduni.ac.nz 
10# Example 3. 2D Cantilever -- Static Pushover
11#To run Uniaxial Inelastic Material, Fiber Section, Nonlinear Mode, Static Pushover Analysis: First import the InelasticFiberSection.py(upto gravity loading is already in this script)
12#and run the current script
13#the detailed problem description can be found here: http://opensees.berkeley.edu/wiki/index.php/Examples_Manual  (example: 3)
14# --------------------------------------------------------------------------------------------------
15#	OpenSees (Tcl) code by:	Silvia Mazzoni & Frank McKenna, 2006
16# characteristics of pushover analysis
17##########################################################################################################################################################################
18import openseespy.opensees as op
19#import the os module
20#import os
21import math
22op.wipe()
23
24from InelasticFiberSection import *
25Dmax = 0.05*LCol
26Dincr = 0.001*LCol
27Hload = Weight
28maxNumIter = 6
29tol = 1e-8
30
31op.timeSeries('Linear', 2)
32op.pattern('Plain', 200, 2)
33op.load(2, Hload, 0.0,0.0)
34
35op.wipeAnalysis()
36op.constraints('Plain')
37op.numberer('Plain')
38op.system('BandGeneral')
39op.test('EnergyIncr', Tol, maxNumIter)
40op.algorithm('Newton')
41
42op.integrator('DisplacementControl', IDctrlNode, IDctrlDOF, Dincr)
43op.analysis('Static')
44
45
46Nsteps =  int(Dmax/ Dincr)
47
48ok = op.analyze(Nsteps)
49print(ok)
50
51# for gravity analysis, load control is fine, 0.1 is the load factor increment (http://opensees.berkeley.edu/wiki/index.php/Load_Control)
52
53test = {1:'NormDispIncr', 2: 'RelativeEnergyIncr', 4: 'RelativeNormUnbalance',5: 'RelativeNormDispIncr', 6: 'NormUnbalance'}
54algorithm = {1:'KrylovNewton', 2: 'SecantNewton' , 4: 'RaphsonNewton',5: 'PeriodicNewton', 6: 'BFGS', 7: 'Broyden', 8: 'NewtonLineSearch'}
55
56for i in test:
57    for j in algorithm:
58
59        if ok != 0:
60            if j < 4:
61                op.algorithm(algorithm[j], '-initial')
62                
63            else:
64                op.algorithm(algorithm[j])
65                
66            op.test(test[i], Tol, 1000)
67            ok = op.analyze(Nsteps)                            
68            print(test[i], algorithm[j], ok)             
69            if ok == 0:
70                break
71        else:
72            continue
73
74u2 = op.nodeDisp(2, 1)
75print("u2 = ", u2)
76
77op.wipe()