Pushover Analysis of 2D RC Frame Problem

For posts concerning the documentation, errors, ommissions, general comments, etc.

Moderators: silvia, selimgunay, Moderators

Post Reply
rkmazumder
Posts: 1
Joined: Wed May 30, 2012 4:11 am
Location: University of Rome La Sapienza

Pushover Analysis of 2D RC Frame Problem

Post by rkmazumder » Fri Jul 19, 2013 9:29 pm

I am learning OpenSees. I wrote this script for Pushover analysis of a RC frame with 4 storied (3.05m each) and 3 Bay (5m each). I used fiber section. During OpenSees analysis process I encountered the problem.... analyze failed, -2 error flag...is showing. also displacement is 0.5m at control node at roof. What is the problem in my script?

# 4 Storied RC Frame with 3 Bays : Fiber Model
# PushOver Analysis

#Units
set in 0.0254
set kip 4.45
set sec 1.
set LunitTXT "meter"
set FunitTXT "KN"
set TunitTXT "sec"
set ft [expr 12.*$in]
set ksi [expr $kip/pow($in,2)]
set psi [expr $ksi/1000.]
set lbf [expr $psi*$in*$in]
set pcf [expr $lbf/pow($ft,3)]
set in2 [expr $in*$in]
set in4 [expr $in*$in*$in*$in]
set cm [expr $in/2.54]
set PI [expr 2*asin(1.0)]
set g [expr 32.2*$ft/pow($sec,2)]
set Ubig 1.e10
set Usmall [expr 1/$Ubig]

wipe
model BasicBuilder -ndm 2 -ndf 3
set dataDir L
file mkdir $dataDir

# nodes
node 11 0 0
node 12 5 0
node 13 10 0
node 14 15 0
node 21 0 3.05
node 22 5 3.05
node 23 10 3.05
node 24 15 3.05
node 31 0 6.1
node 32 5 6.1
node 33 10 6.1
node 34 15 6.1
node 41 0 9.15
node 42 5 9.15
node 43 10 9.15
node 44 15 9.15
node 51 0 12.2
node 52 5 12.2
node 53 10 12.2
node 54 15 12.2

set IDctrlNode 51
set IDctrlDOF 1
set NStory 4
set NBay 3
set LBuilding 12.2

# Supports X Y Z
fix 11 1 1 1
fix 12 1 1 1
fix 13 1 1 1
fix 14 1 1 1

# Define Material
uniaxialMaterial Concrete01 1 -20000 -0.002 -4000 -0.004
uniaxialMaterial Concrete01 2 -20000 -0.002 -4000 -0.004
uniaxialMaterial Steel01 3 410000. 200000000. 0.01

# Define Fiber Section
section Fiber 1 {
patch quad 1 8 8 0.05 0.05 0.25 0.05 0.25 0.25 0.05 0.25
patch quad 2 8 1 0.00 0.00 0.30 0.00 0.25 0.05 0.05 0.05
patch quad 2 8 1 0.05 0.25 0.25 0.25 0.30 0.30 0.00 0.30
patch quad 2 1 8 0.25 0.05 0.30 0.00 0.30 0.30 0.25 0.25
patch quad 2 1 8 0.00 0.00 0.05 0.05 0.05 0.25 0.00 0.30
layer straight 3 3 0.000314 0.05 0.05 0.25 0.05
layer straight 3 2 0.000314 0.05 0.15 0.25 0.15
layer straight 3 3 0.000314 0.05 0.25 0.25 0.25
}
section Fiber 2 {
patch quad 1 8 8 0.05 0.05 0.30 0.05 0.30 0.30 0.05 0.30
patch quad 2 8 1 0.00 0.00 0.35 0.00 0.30 0.05 0.05 0.05
patch quad 2 8 1 0.05 0.30 0.30 0.30 0.35 0.35 0.00 0.35
patch quad 2 1 8 0.30 0.05 0.35 0.00 0.35 0.35 0.30 0.30
patch quad 2 1 8 0.00 0.00 0.05 0.05 0.05 0.30 0.00 0.35
layer straight 3 3 0.000314 0.05 0.05 0.30 0.05
layer straight 3 2 0.000314 0.05 0.175 0.30 0.175
layer straight 3 3 0.000314 0.05 0.30 0.30 0.30
}
section Fiber 3 {
patch quad 1 8 8 0.05 0.05 0.25 0.05 0.25 0.40 0.05 0.40
patch quad 2 8 1 0.00 0.00 0.30 0.00 0.25 0.05 0.05 0.05
patch quad 2 8 1 0.05 0.40 0.25 0.40 0.30 0.45 0.00 0.45
patch quad 2 1 8 0.25 0.05 0.30 0.00 0.30 0.45 0.25 0.40
patch quad 2 1 8 0.00 0.00 0.05 0.05 0.05 0.40 0.00 0.45
layer straight 3 3 0.000314 0.05 0.05 0.25 0.05
layer straight 3 2 0.000314 0.05 0.225 0.25 0.225
layer straight 3 3 0.000314 0.05 0.40 0.25 0.40
}

set IDColTransf 1
set IDBeamTransf 2
set ColTransfType Linear
geomTransf $ColTransfType $IDColTransf
geomTransf Linear $IDBeamTransf
set np 5

# Columns $eleTag $iNode $jNode $numIntPts $secTag $TransfTag
#Left
element nonlinearBeamColumn 111 11 21 $np 2 1
element nonlinearBeamColumn 121 21 31 $np 2 1
element nonlinearBeamColumn 131 31 41 $np 2 1
element nonlinearBeamColumn 141 41 51 $np 2 1
#Center
element nonlinearBeamColumn 112 12 22 $np 1 1
element nonlinearBeamColumn 122 22 32 $np 1 1
element nonlinearBeamColumn 132 32 42 $np 1 1
element nonlinearBeamColumn 142 42 52 $np 1 1
element nonlinearBeamColumn 113 13 23 $np 1 1
element nonlinearBeamColumn 123 23 33 $np 1 1
element nonlinearBeamColumn 133 33 43 $np 1 1
element nonlinearBeamColumn 143 43 53 $np 1 1
#Right
element nonlinearBeamColumn 114 14 24 $np 2 1
element nonlinearBeamColumn 124 24 34 $np 2 1
element nonlinearBeamColumn 134 34 44 $np 2 1
element nonlinearBeamColumn 144 44 54 $np 2 1

# Beams $eleTag $iNode $jNode $numIntgrPts $secTag $TransfTag
element nonlinearBeamColumn 221 21 22 $np 3 2
element nonlinearBeamColumn 222 22 23 $np 3 2
element nonlinearBeamColumn 223 23 24 $np 3 2
element nonlinearBeamColumn 231 31 32 $np 3 2
element nonlinearBeamColumn 232 32 33 $np 3 2
element nonlinearBeamColumn 233 33 34 $np 3 2
element nonlinearBeamColumn 241 41 42 $np 3 2
element nonlinearBeamColumn 242 42 43 $np 3 2
element nonlinearBeamColumn 243 43 44 $np 3 2
element nonlinearBeamColumn 251 51 52 $np 3 2
element nonlinearBeamColumn 252 52 53 $np 3 2
element nonlinearBeamColumn 253 53 54 $np 3 2


set LBeam 5
set LCol 3.05
# Gravity, Weight and Masses
set GammaConcrete [expr 150*$pcf]
set Tslab [expr 6*$in]
set Lslab [expr 2*$LBeam/2]
set Qslab [expr $GammaConcrete*$Tslab*$Lslab]
set QBeam [expr 212*$lbf/$ft]
set QdlBeam [expr $Qslab+$QBeam]
set QdlCol1 [expr 144*$lbf/$ft]
set WeightCol1 [expr $QdlCol1*$LCol]
set QdlCol2 [expr 204*$lbf/$ft]
set WeightCol2 [expr $QdlCol2*$LCol]
set WeightBeam [expr $QdlBeam*$LBeam]

# each connection takes the mass of 1/2 of each element framing into it (mass=weight/$g)
mass 21 [expr ($WeightCol2/2 + $WeightCol2/2 +$WeightBeam/2)/$g] 0. 0.; # level 2
mass 22 [expr ($WeightCol1/2 + $WeightCol1/2 +$WeightBeam/2 +$WeightBeam/2)/$g] 0. 0.;
mass 23 [expr ($WeightCol1/2 + $WeightCol1/2 +$WeightBeam/2 +$WeightBeam/2)/$g] 0. 0.;
mass 24 [expr ($WeightCol2/2 + $WeightCol2/2 +$WeightBeam/2)/$g] 0. 0.;
mass 31 [expr ($WeightCol2/2 + $WeightCol2/2 +$WeightBeam/2)/$g] 0. 0.; # level 3
mass 32 [expr ($WeightCol1/2 + $WeightCol1/2 +$WeightBeam/2 +$WeightBeam/2)/$g] 0. 0.;
mass 33 [expr ($WeightCol1/2 + $WeightCol1/2 +$WeightBeam/2 +$WeightBeam/2)/$g] 0. 0.;
mass 34 [expr ($WeightCol2/2 + $WeightCol2/2 +$WeightBeam/2)/$g] 0. 0.;
mass 41 [expr ($WeightCol2/2 + $WeightCol2/2 +$WeightBeam/2)/$g] 0. 0.; # level 3
mass 42 [expr ($WeightCol1/2 + $WeightCol1/2 +$WeightBeam/2 +$WeightBeam/2)/$g] 0. 0.;
mass 43 [expr ($WeightCol1/2 + $WeightCol1/2 +$WeightBeam/2 +$WeightBeam/2)/$g] 0. 0.;
mass 44 [expr ($WeightCol2/2 + $WeightCol2/2 +$WeightBeam/2)/$g] 0. 0.;
mass 51 [expr ($WeightCol2/2 +$WeightBeam/2)/$g] 0. 0.; # level 4
mass 52 [expr ($WeightCol1/2 +$WeightBeam/2 +$WeightBeam/2)/$g] 0. 0.;
mass 53 [expr ($WeightCol1/2 +$WeightBeam/2 +$WeightBeam/2)/$g] 0. 0.;
mass 54 [expr ($WeightCol2/2 +$WeightBeam/2)/$g] 0. 0.;

# Calculate Total Floor Mass
set WeightFloor2 [expr $WeightCol1*4/2+$WeightCol2*4/2+3*$WeightBeam]
set WeightFloor3 [expr $WeightCol1*4/2+$WeightCol2*4/2+3*$WeightBeam]
set WeightFloor4 [expr $WeightCol1*4/2+$WeightCol2*4/2+3*$WeightBeam]
set WeightFloor5 [expr $WeightCol1*2/2+$WeightCol2*2/2+3*$WeightBeam]
set WeightTotal [expr $WeightFloor2+$WeightFloor3+$WeightFloor4+$WeightFloor5]
set MassFloor2 [expr $WeightFloor2/$g]
set MassFloor3 [expr $WeightFloor3/$g]
set MassFloor4 [expr $WeightFloor4/$g]
set MassFloor5 [expr $WeightFloor5/$g]
set MassTotal [expr $MassFloor2+$MassFloor3+$MassFloor4+$MassFloor5]

# PushOver
set sumWiHi [expr $WeightFloor2*3.05+$WeightFloor3*6.10+$WeightFloor4*9.15+$WeightFloor5*12.2]
set Fj2 [expr $WeightFloor2*3.05/$sumWiHi*$WeightTotal]
set Fj3 [expr $WeightFloor3*6.10/$sumWiHi*$WeightTotal]
set Fj4 [expr $WeightFloor4*9.15/$sumWiHi*$WeightTotal]
set Fj5 [expr $WeightFloor5*12.2/$sumWiHi*$WeightTotal]
set Fi2 [expr $Fj2/4]; # per node on floor
set Fi3 [expr $Fj3/4]
set Fi4 [expr $Fj4/4]
set Fi5 [expr $Fj5/4]
set iFi "$Fi2 $Fi3 $Fi4 $Fi5";

recorder Node -file $dataDir/DFree.out -time -node 51 -dof 1 disp
recorder Node -file $dataDir/DBase.out -time -node 11 12 13 14 -dof 1 2 3 disp
recorder Node -file $dataDir/RBase.out -time -node 11 12 13 14 -dof 1 reaction
recorder Drift -file $dataDir/DrNode.out -time -iNode 51 -jNode 11 -dof 1 -perpDirn 2
recorder Element -file $dataDir/Fel1.out -time -ele111 localForce
recorder Element -file $dataDir/ForceEle1sec1.out -time -ele 111 section 1 force
recorder Element -file $dataDir/DefoEle1sec1.out -time -ele 111 section 1 deforamtion
recorder Element -file $dataDir/ForceEle1sec$np.out -time -ele 111 section $np force
recorder Element -file $dataDir/DefoElesec$np.out -time -ele 111 section $np deformation

# Define Gravity
pattern Plain 101 Linear {
eleLoad -ele 221 222 223 -type -beamUniform -$QdlBeam; # beams level 2 (in Y-dir)
eleLoad -ele 231 232 233 -type -beamUniform -$QdlBeam
eleLoad -ele 241 242 243 -type -beamUniform -$QdlBeam
eleLoad -ele 251 252 253 -type -beamUniform -$QdlBeam
eleLoad -ele 111 -type -beamUniform 0 -$QdlCol2; # columns level 1-2 (in X-Dir)
eleLoad -ele 112 113 -type -beamUniform 0 -$QdlCol1
eleLoad -ele 114 -type -beamUniform 0 -$QdlCol2
eleLoad -ele 121 -type -beamUniform 0 -$QdlCol2
eleLoad -ele 122 123 -type -beamUniform 0 -$QdlCol1
eleLoad -ele 124 -type -beamUniform 0 -$QdlCol2
eleLoad -ele 131 -type -beamUniform 0 -$QdlCol2
eleLoad -ele 132 133 -type -beamUniform 0 -$QdlCol1
eleLoad -ele 134 -type -beamUniform 0 -$QdlCol2
eleLoad -ele 141 -type -beamUniform 0 -$QdlCol2
eleLoad -ele 142 143 -type -beamUniform 0 -$QdlCol1
eleLoad -ele 144 -type -beamUniform 0 -$QdlCol2
}

set Tol 1.0e-8
variable constraintsTypeGravity Plain
if { [info exists RigidDiaphragm] == 1} {
if {$RigidDiaphragm=="ON"} {
variable constraintsTypeGravity Lagrange
}
}

constraints $constraintsTypeGravity
numberer RCM
system BandGeneral
test NormDispIncr $Tol 6
algorithm Newton
set NstepGravity 10
set DGravity [expr 1./$NstepGravity]
integrator LoadControl $DGravity
analysis Static
analyze $NstepGravity

loadConst -time 0.0

puts "Model Built"

# characteristics of pushover analysis
set Dmax [expr 0.1*$LBuilding ]; # maximum displacement of pushover. push to 10% drift.
set Dincr [expr 0.0001*$LBuilding ]; # displacement increment. you want this to be small, but not too small to slow analysis

# -- STATIC PUSHOVER/CYCLIC ANALYSIS
# create load pattern for lateral pushover load coefficient when using linear load pattern
pattern Plain 200 Linear {; # define load pattern
for {set level 2} {$level <=[expr $NStory+1]} {incr level 1} {
set Fi [lindex $iFi [expr $level-1-1]]; # lateral load coefficient
for {set pier 1} {$pier <= [expr $NBay+1]} {incr pier 1} {
set nodeID [expr $level*10+$pier]
load $nodeID $Fi 0.0 0.0 0.0 0.0 0.0
}
}
}; # end load pattern

# ----------- set up analysis parameters
variable constraintsTypeStatic Plain
if { [info exists RigidDiaphragm] == 1} {
if {$RigidDiaphragm=="ON"} {
variable constraintsTypeStatic Lagrange
}
}
constraints $constraintsTypeStatic
set numbererTypeStatic RCM
numberer $numbererTypeStatic
set systemTypeStatic BandGeneral
system $systemTypeStatic
variable TolStatic 1.e-8
variable maxNumIterStatic 6
variable printFlagStatic 0
variable testTypeStatic EnergyIncr
test $testTypeStatic $TolStatic $maxNumIterStatic $printFlagStatic;
variable maxNumIterConvergeStatic 2000;
variable printFlagConvergeStatic 0;
variable algorithmTypeStatic Newton
algorithm $algorithmTypeStatic;
integrator DisplacementControl $IDctrlNode $IDctrlDOF $Dincr
set analysisTypeStatic Static
analysis $analysisTypeStatic

# --------------------------------- perform Static Pushover Analysis
set Nsteps [expr int($Dmax/$Dincr)]; # number of pushover analysis steps
set ok [analyze $Nsteps]; # this will return zero if no convergence problems were encountered
set fmt1 "%s Pushover analysis: CtrlNode %.3i, dof %.1i, Disp=%.4f %s"; # format for screen/file output of DONE/PROBLEM analysis
if {$ok != 0} {
# if analysis fails, we try some other stuff, performance is slower inside this loop
set Dstep 0.0;
set ok 0
while {$Dstep <= 1.0 && $ok == 0} {
set controlDisp [nodeDisp $IDctrlNode $IDctrlDOF ]
set Dstep [expr $controlDisp/$Dmax]
set ok [analyze 1 ]
# if analysis fails, we try some other stuff
# performance is slower inside this loop global maxNumIterStatic; # max no. of iterations performed before "failure to converge" is ret'd
if {$ok != 0} {
puts "Trying Newton with Initial Tangent .."
test NormDispIncr $Tol 2000 0
algorithm Newton -initial
set ok [analyze 1]
test $testTypeStatic $TolStatic $maxNumIterStatic 0
algorithm $algorithmTypeStatic
}
if {$ok != 0} {
puts "Trying Broyden .."
algorithm Broyden 8
set ok [analyze 1 ]
algorithm $algorithmTypeStatic
}
if {$ok != 0} {
puts "Trying NewtonWithLineSearch .."
algorithm NewtonLineSearch 0.8
set ok [analyze 1]
algorithm $algorithmTypeStatic
}

}; # end while loop
}; # end if ok !0

# -----------------------------------------------------------------------------------------------------
if {$ok != 0 } {
puts [format $fmt1 "PROBLEM" $IDctrlNode $IDctrlDOF [nodeDisp $IDctrlNode $IDctrlDOF] $LunitTXT]
} else {
puts [format $fmt1 "DONE" $IDctrlNode $IDctrlDOF [nodeDisp $IDctrlNode $IDctrlDOF] $LunitTXT]
}

Post Reply