# TSUKUBA TEST, T2 TYPE
# units: kN,m,sec
# Setup----------------------------------------------------------------
wipe;
file mkdir Data;
model BasicBuilder -ndm 2 -ndf 3; # 2D analysis
source DisplayModel2D.tcl; # procedure for displaying a 2D perspective of model
source DisplayPlane.tcl; # procedure for displaying a plane in a model
# define type of analysis---------------------------------------------
set analysisType "pushover"
if {$analysisType == "pushover"} {
set dataDir Pushover-Output; # name of output folder
file mkdir $dataDir; # create output folder
}
# define structural geometry-------------------------------------------
set Nstories 3; #number of stories
set Wbay1 1.6; #width of the first bay
set Wbay2 3.2; #width of the second bay
set Wbay3 1.6; #width of the third bay
set HStory1 0.680; #height of the first story
set HStory2 0.680; #height of the second story
set HBuilding [expr $HStory1 + $HStory2]; # total height of the building
set Pier1 0.0; #The first line
set Pier2 [expr $Pier1 + $Wbay1]; #The second line
set Pier3 [expr $Pier2 + $Wbay2]; #The third line
set Pier4 [expr $Pier3 + $Wbay3]; #The fourth line
set Floor1 0.0; #ground floor
set Floor2 [expr $Floor1 + $HStory1]; #The second floor
set Floor3 [expr $Floor2 + $HStory2]; #The third floor
# caculated parameters-------------------------------------------------
set g 9.805;
set Nodalweight1 15; # nodalweight of second floor
set Nodalweight2 1000; #nodalweight of third floor
set Nodalmass1 [expr $Nodalweight1 * 1000 / $g]; #nodalmass of second floor
set Nodalmass2 [expr $Nodalweight2 * 1000 / $g]; #nodalmass of third floor
set Negligible 1e-9; # a very small number to avoid zero
# define nodes and their mass-------------------------------------------
node 21 $Pier2 $Floor1;
node 31 $Pier3 $Floor1;
node 12 $Pier1 $Floor2 -mass $Nodalmass1 $Negligible $Negligible;
node 22 $Pier2 $Floor2 -mass $Nodalmass1 $Negligible $Negligible;
node 32 $Pier3 $Floor2 -mass $Nodalmass1 $Negligible $Negligible;
node 42 $Pier4 $Floor2 -mass $Nodalmass1 $Negligible $Negligible;
node 23 $Pier2 $Floor3 -mass $Nodalmass2 $Nodalmass2 $Negligible;
node 33 $Pier3 $Floor3 -mass $Nodalmass2 $Nodalmass2 $Negligible;
# asign boundary condition---------------------------------------------
fix 21 1 1 0;
fix 31 1 1 0;
fix 12 0 1 0;
fix 42 0 1 0;
# define elements & sections-------------------------------------------
set ColSecTag1 1; # assign tag number to column
set ColSecTag2 2; # assign tag number to column
set ColSecTag3 3; # assign tag number to column
set ColSecTag4 4; # assign tag number to column
set BeamSecTag1 5; # assign tag number to beam
set BeamSecTag2 6; # assign tag number to beam
set BeamSecTag3 7; # assign tag number to beam
#define section geometery----------------------------------------------
set BeamWidth 0.3;
set BeamHeight 0.36;
set BeamFlange 1.1;
set FlangeThickness 0.1;
set Columnside 0.4;
set coverCol 0.04; # column cover to bars
set numBarsCol 12; # number of longitudinal-reinforcement bars in column
set barAreaCol 2.01e-4; # section area of column's bar
set coverBeamTop 0.04; # beam cover at Top
set coverBeamBtm 0.04; # beam cover at Bottom
set coverBeamSide 0.04; # beam cover at sides
set coverSlabTop 0.015; # slab cover at top
set coverSlabBtm 0.015; # slab cover at bottom
set numBarsBeamTop1 4; # first line of beam's longitudinal bars at top
set DisBarTop 0.04; # distance of top bars
set numBarsBeamTop2 2; # second line of beam's longitudinal bars at top
set numBarsBeamBtm1 4; # first line of beam's longitudinal bars at bottom
set DisBarBtm 0.04; # distance of bottom bars
set numBarsBeamBtm2 2; # second line of beam's longitudinal bars at bottom
set barAreaBeam 2.01e-4; # section area of beam's bar
set numBarSlabTop 14; # number of slab top bars
set numBarSlabBtm 14; # number of slab bottom bars
set barAreaSlab 2.83e-5; # section area of slab's bar
# Material parameters-------------------------------------------------------
set IDConColU 1; # material ID for column's unconfined concrete
set IDConCol 2; # material ID for column's confined concrete
set IDConBeamU 3; # material ID for beam's unconfined concrete
set IDConBeam 4; # material ID for beam's confined concrete
set IDreinCol 5; # material ID for column's reinforcement
set IDreinBeam 6; # material ID for beam's reinforcement
set IDreinSlab 7; # material ID for slab's reinforcement
# ------------
set fc60 -60e+4; # 60MPa concrete's compressive strength
set esp0 -0.002; # strain for maximum stress
set fc60u [expr 0.3 * $fc60]; # aim stress of decreasing, unconfined concrete
set fc60c [expr 0.5 * $fc60]; # aim stress of decreasing, confined concrete
set espu -0.01; # aim strain of decreasing
set lambda 0.1; # ratio between unloading slope and initial slope
set ft60 [expr -0.14 * $fc60]; # tensional stress of C60
set ets60 [expr $ft60 / 0.002]; # tension softening stiffness
set fc40 -40e+4; # 40MPa concrete's compressive strength
set fc40u [expr 0.3 * $fc40]; # aim stress of decreasing, unconfined concrete
set fc40c [expr 0.5 * $fc40]; # aim stress of decreasing, confined concrete
set ft40 [expr -0.14 * $fc40]; # tensional stress of C40
set ets40 [expr $ft40 / 0.002]; # tension softening stiffness
# -----------
set fy685 6.85e+5; # steel yield stress
set fy490 4.9e+5; #
set fy295 2.95e+5; #
set Es 2.05e+8; # modulus of steel
set Bs 0.01; # strain-hardening ratio
set R0 18;
set cR1 0.925;
set cR2 0.15;
# ----------
uniaxialMaterial Concrete02 $IDConColU $fc60 $esp0 $fc60u $espu $lambda $ft60 $ets60; # build C60 unconfined concrete
uniaxialMaterial Concrete02 $IDConCol $fc60 $esp0 $fc60c $espu $lambda $ft60 $ets60; # build C60 confined concrete
uniaxialMaterial Concrete02 $IDConBeamU $fc40 $esp0 $fc40u $espu $lambda $ft40 $ets40; # build C40 unconfined concrete
uniaxialMaterial Concrete02 $IDConBeam $fc40 $esp0 $fc40c $espu $lambda $ft40 $ets40; # build C40 confined concrete
uniaxialMaterial Steel02 $IDreinCol $fy685 $Es $Bs $R0 $cR1 $cR2; # build SD685 reinforcement bar
uniaxialMaterial Steel02 $IDreinBeam $fy490 $Es $Bs $R0 $cR1 $cR2; # build SD490 reinforcement bar
uniaxialMaterial Steel02 $IDreinSlab $fy295 $Es $Bs $R0 $cR1 $cR2; # build SD295 reinforcement bar
# Firber section property --------------------------------------------------------------------
# Column section
set CoverYCol [expr $Columnside / 2]; # The distance from the section z-axis to the edge of the cover concrete
set CoverZCol [expr $Columnside / 2]; # The distance from the section z-axis to the edge of the cover concrete
set CoreYCol [expr $CoverYCol - $coverCol];
set CoreZCol [expr $CoverZCol - $coverCol];
set nfColCover 4; # number of fibers for cover of column
set fareaCovY [expr $coverCol * $CoreYCol * 2 / $nfColCover];
set fareaCovZ [expr $coverCol * $CoreYCol * 2 / $nfColCover];
set DfCovY1 [expr $CoreYCol - $CoreYCol / $nfColCover];
set DfCovY2 [expr $CoreZCol + $coverCol / 2];
set DfCovZ1 [expr $CoreYCol - $CoreYCol / $nfColCover];
set DfCovZ2 [expr $CoreZCol + $coverCol / 2];
set fareaCovZ [expr $coverCol * $CoreZCol * 2 / $nfColCover];
set fareaCorner [expr $coverCol * $coverCol];
set nfCol 8; # number of fibers for core of column
set numRein1 [expr ($numBarsCol / 4 + 1)];
set numRein2 [expr ($numBarsCol / 4 - 1)];
set numRein3 [expr (1 - 8 / $numBarsCol) * $CoreZCol];
set numConCorner 2;
section fiberSec $ColSecTag1 {; # Define the fiber section of column
patch quadr $IDConCol $nfCol $nfCol -$CoreYCol -$CoreZCol $CoreYCol -$CoreZCol $CoreYCol $CoreZCol -$CoreYCol $CoreZCol; # core
layer straight $IDConColU $nfColCover $fareaCovY -$DfCovY1 -$DfCovY2 $DfCovY1 -$DfCovY2; # Bottom cover
layer straight $IDConColU $nfColCover $fareaCovY -$DfCovY1 $DfCovY2 $DfCovY1 $DfCovY2; # Top cover
layer straight $IDConColU $nfColCover $fareaCovZ -$DfCovZ2 -$DfCovZ1 -$DfCovZ2 $DfCovZ1; # Left cover
layer straight $IDConColU $nfColCover $fareaCovZ $DfCovZ2 -$DfCovZ1 $DfCovZ2 $DfCovZ1; # Right cover
fiber -$DfCovY2 -$DfCovZ2 $fareaCorner $IDConColU; #Bottom Left
fiber $DfCovY2 -$DfCovZ2 $fareaCorner $IDConColU; #Bottom right
fiber -$DfCovY2 $DfCovZ2 $fareaCorner $IDConColU; #Top Left
fiber $DfCovY2 $DfCovZ2 $fareaCorner $IDConColU; #Top right
layer straight $IDreinCol $numRein1 $barAreaCol -$CoreYCol -$CoreZCol $CoreYCol -$CoreZCol; # Bottom bars
layer straight $IDreinCol $numRein1 $barAreaCol -$CoreYCol $CoreZCol $CoreYCol $CoreZCol; # Top bars
layer straight $IDreinCol $numRein2 $barAreaCol -$CoreYCol -$numRein3 -$CoreYCol $numRein3; # Left bars
layer straight $IDreinCol $numRein2 $barAreaCol $CoreYCol -$numRein3 $CoreYCol $numRein3; # Right bars
}; # end of fibersection definition
section fiberSec $ColSecTag2 {; # Define the fiber section of column
patch quadr $IDConCol $nfCol $nfCol -$CoreYCol -$CoreZCol $CoreYCol -$CoreZCol $CoreYCol $CoreZCol -$CoreYCol $CoreZCol; # core
layer straight $IDConColU $nfColCover $fareaCovY -$DfCovY1 -$DfCovY2 $DfCovY1 -$DfCovY2; # Bottom cover
layer straight $IDConColU $nfColCover $fareaCovY -$DfCovY1 $DfCovY2 $DfCovY1 $DfCovY2; # Top cover
layer straight $IDConColU $nfColCover $fareaCovZ -$DfCovZ2 -$DfCovZ1 -$DfCovZ2 $DfCovZ1; # Left cover
layer straight $IDConColU $nfColCover $fareaCovZ $DfCovZ2 -$DfCovZ1 $DfCovZ2 $DfCovZ1; # Right cover
fiber -$DfCovY2 -$DfCovZ2 $fareaCorner $IDConColU; #Bottom Left
fiber $DfCovY2 -$DfCovZ2 $fareaCorner $IDConColU; #Bottom right
fiber -$DfCovY2 $DfCovZ2 $fareaCorner $IDConColU; #Top Left
fiber $DfCovY2 $DfCovZ2 $fareaCorner $IDConColU; #Top right
layer straight $IDreinCol $numRein1 $barAreaCol -$CoreYCol -$CoreZCol $CoreYCol -$CoreZCol; # Bottom bars
layer straight $IDreinCol $numRein1 $barAreaCol -$CoreYCol $CoreZCol $CoreYCol $CoreZCol; # Top bars
layer straight $IDreinCol $numRein2 $barAreaCol -$CoreYCol -$numRein3 -$CoreYCol $numRein3; # Left bars
layer straight $IDreinCol $numRein2 $barAreaCol $CoreYCol -$numRein3 $CoreYCol $numRein3; # Right bars
}; # end of fibersection definition
section fiberSec $ColSecTag3 {; # Define the fiber section of column
patch quadr $IDConCol $nfCol $nfCol -$CoreYCol -$CoreZCol $CoreYCol -$CoreZCol $CoreYCol $CoreZCol -$CoreYCol $CoreZCol; # core
layer straight $IDConColU $nfColCover $fareaCovY -$DfCovY1 -$DfCovY2 $DfCovY1 -$DfCovY2; # Bottom cover
layer straight $IDConColU $nfColCover $fareaCovY -$DfCovY1 $DfCovY2 $DfCovY1 $DfCovY2; # Top cover
layer straight $IDConColU $nfColCover $fareaCovZ -$DfCovZ2 -$DfCovZ1 -$DfCovZ2 $DfCovZ1; # Left cover
layer straight $IDConColU $nfColCover $fareaCovZ $DfCovZ2 -$DfCovZ1 $DfCovZ2 $DfCovZ1; # Right cover
fiber -$DfCovY2 -$DfCovZ2 $fareaCorner $IDConColU; #Bottom Left
fiber $DfCovY2 -$DfCovZ2 $fareaCorner $IDConColU; #Bottom right
fiber -$DfCovY2 $DfCovZ2 $fareaCorner $IDConColU; #Top Left
fiber $DfCovY2 $DfCovZ2 $fareaCorner $IDConColU; #Top right
layer straight $IDreinCol $numRein1 $barAreaCol -$CoreYCol -$CoreZCol $CoreYCol -$CoreZCol; # Bottom bars
layer straight $IDreinCol $numRein1 $barAreaCol -$CoreYCol $CoreZCol $CoreYCol $CoreZCol; # Top bars
layer straight $IDreinCol $numRein2 $barAreaCol -$CoreYCol -$numRein3 -$CoreYCol $numRein3; # Left bars
layer straight $IDreinCol $numRein2 $barAreaCol $CoreYCol -$numRein3 $CoreYCol $numRein3; # Right bars
}; # end of fibersection definition
section fiberSec $ColSecTag4 {; # Define the fiber section of column
patch quadr $IDConCol $nfCol $nfCol -$CoreYCol -$CoreZCol $CoreYCol -$CoreZCol $CoreYCol $CoreZCol -$CoreYCol $CoreZCol; # core
layer straight $IDConColU $nfColCover $fareaCovY -$DfCovY1 -$DfCovY2 $DfCovY1 -$DfCovY2; # Bottom cover
layer straight $IDConColU $nfColCover $fareaCovY -$DfCovY1 $DfCovY2 $DfCovY1 $DfCovY2; # Top cover
layer straight $IDConColU $nfColCover $fareaCovZ -$DfCovZ2 -$DfCovZ1 -$DfCovZ2 $DfCovZ1; # Left cover
layer straight $IDConColU $nfColCover $fareaCovZ $DfCovZ2 -$DfCovZ1 $DfCovZ2 $DfCovZ1; # Right cover
fiber -$DfCovY2 -$DfCovZ2 $fareaCorner $IDConColU; #Bottom Left
fiber $DfCovY2 -$DfCovZ2 $fareaCorner $IDConColU; #Bottom right
fiber -$DfCovY2 $DfCovZ2 $fareaCorner $IDConColU; #Top Left
fiber $DfCovY2 $DfCovZ2 $fareaCorner $IDConColU; #Top right
layer straight $IDreinCol $numRein1 $barAreaCol -$CoreYCol -$CoreZCol $CoreYCol -$CoreZCol; # Bottom bars
layer straight $IDreinCol $numRein1 $barAreaCol -$CoreYCol $CoreZCol $CoreYCol $CoreZCol; # Top bars
layer straight $IDreinCol $numRein2 $barAreaCol -$CoreYCol -$numRein3 -$CoreYCol $numRein3; # Left bars
layer straight $IDreinCol $numRein2 $barAreaCol $CoreYCol -$numRein3 $CoreYCol $numRein3; # Right bars
}; # end of fibersection definition
# Beam section
set nfYBeamCore 3; # horizontal number of fibers in Beam's core area
set nfZBeamCore 14; # vertical number of fibers in Beam's core area
set nfZSlabCore 3; # vertical number of fibers in slab's core area
set nfYSlabCore 11; # horizontal number of fibers in slab's core area
set nfYBeamcover 5; # horizontal number of fibers of Beam's cover in top and bottom
set nfYSlabcover 11; # horizontal number of fibers of slab's cover in top and bottom
set nfZBeamcover 14; # vertical number of fibers of Beam's side cover
set CoverZBeam [expr $BeamHeight / 2];
set CoreTZBeam [expr $CoverZBeam - $coverBeamTop];
set CoreBZBeam [expr $CoverZBeam - $coverBeamBtm];
set CoverYBeam [expr $BeamWidth / 2];
set CoreSYBeam [expr $CoverYBeam - $coverBeamSide];
set CoreTZSlab [expr $CoverZBeam - $coverSlabTop];
set CoreBZSlab [expr $CoverZBeam - $FlangeThickness + $coverSlabBtm];
set CoreLYSlab [expr $CoverYBeam + $BeamFlange];
set CoreRYSlab [expr $CoverYBeam];
set fareaBeamCoverBY [expr $coverBeamBtm * $BeamWidth / $nfYBeamcover];
set LocCoverBY [expr $CoverYBeam - $BeamWidth / $nfYBeamcover / 2];
set LocCoverBZ [expr $CoverZBeam - $coverBeamBtm / 2];
set fareaBeamCoverTY [expr $coverBeamTop * $BeamWidth / $nfYBeamcover];
set LocCoverTY [expr $CoverYBeam - $BeamWidth / $nfYBeamcover / 2];
set LocCoverTZ [expr $CoverZBeam - $coverBeamTop / 2];
set fareaBeamCoverSide [expr $coverBeamSide * ($BeamHeight - $coverBeamBtm - $coverBeamTop) / $nfZBeamcover];
set LocCoverSY [expr $CoverYBeam - $coverBeamSide / 2];
set LocCoverSBZ [expr $CoverZBeam - $coverBeamBtm - ($BeamHeight - $coverBeamBtm - $coverBeamTop) / $nfZBeamcover /2];
set LocCoverSTZ [expr $CoverZBeam - $coverBeamTop - ($BeamHeight - $coverBeamBtm - $coverBeamTop) / $nfZBeamcover /2];
set fareaSlabCoverTop [expr $coverSlabTop * $BeamFlange / $nfYSlabcover];
set fareaSlabCoverBtm [expr $coverSlabBtm * $BeamFlange / $nfYSlabcover];
set LocSlabcoverLY [expr $CoverYBeam + $BeamFlange - $BeamFlange / $nfYSlabcover / 2];
set LocSlabcoverRY [expr $CoverYBeam + $BeamFlange / $nfYSlabcover / 2];
set LocSlabcoverTZ [expr $CoverZBeam - $coverSlabTop / 2];
set LocSlabcoverBZ [expr $CoverZBeam - $FlangeThickness + $coverSlabBtm];
set LocBarTop2 [expr $CoreTZBeam - $DisBarTop];
set LocBarBtm2 [expr $CoreBZBeam - $DisBarBtm];
set LocBarSlabTDs [expr $BeamFlange / ($numBarSlabTop + 1)];
set LocBarSlabTL [expr $CoverYBeam + $BeamFlange - $LocBarSlabTDs];
set LocBarSlabTR [expr $CoverYBeam + $LocBarSlabTDs];
set LocBarSlabBDs [expr $BeamFlange / ($numBarSlabBtm + 1)];
set LocBarSlabBL [expr $CoverYBeam + $BeamFlange - $LocBarSlabBDs];
set LocBarSlabBR [expr $CoverYBeam + $LocBarSlabBDs];
section fiberSec $BeamSecTag1 {; # Define the fiber section of beam
patch quadr $IDConBeam $nfYBeamCore $nfZBeamCore -$CoreSYBeam -$CoreBZBeam $CoreSYBeam -$CoreBZBeam $CoreSYBeam $CoreTZBeam -$CoreSYBeam $CoreTZBeam; # beam core
patch quadr $IDConBeam $nfYSlabCore $nfZSlabCore -$CoreLYSlab $CoreBZSlab -$CoreRYSlab $CoreBZSlab -$CoreRYSlab $CoreTZSlab -$CoreLYSlab $CoreTZSlab; # slab left core
patch quadr $IDConBeam $nfYSlabCore $nfZSlabCore $CoreRYSlab $CoreBZSlab $CoreLYSlab $CoreBZSlab $CoreLYSlab $CoreTZSlab $CoreRYSlab $CoreTZSlab; # slab right core
layer straight $IDConBeamU $nfYBeamcover $fareaBeamCoverBY -$LocCoverBY -$LocCoverBZ $LocCoverBY -$LocCoverBZ; # Bottom cover
layer straight $IDConBeamU $nfYBeamcover $fareaBeamCoverTY -$LocCoverTY $LocCoverTZ $LocCoverTY $LocCoverTZ; # Top cover
layer straight $IDConBeamU $nfZBeamcover $fareaBeamCoverSide -$LocCoverSY -$LocCoverSBZ -$LocCoverSY $LocCoverSTZ; # Left side cover
layer straight $IDConBeamU $nfZBeamcover $fareaBeamCoverSide $LocCoverSY -$LocCoverSBZ $LocCoverSY $LocCoverSTZ; # Right side cover
layer straight $IDConBeamU $nfYSlabcover $fareaSlabCoverTop -$LocSlabcoverLY $LocSlabcoverTZ -$LocSlabcoverRY $LocSlabcoverTZ; # Left top slab cover
layer straight $IDConBeamU $nfYSlabcover $fareaSlabCoverBtm -$LocSlabcoverLY $LocSlabcoverBZ -$LocSlabcoverRY $LocSlabcoverBZ; # Left bottom slab cover
layer straight $IDConBeamU $nfYSlabcover $fareaSlabCoverTop $LocSlabcoverRY $LocSlabcoverTZ $LocSlabcoverLY $LocSlabcoverTZ; # right top slab cover
layer straight $IDConBeamU $nfYSlabcover $fareaSlabCoverBtm $LocSlabcoverRY $LocSlabcoverBZ $LocSlabcoverLY $LocSlabcoverBZ; # right bottom slab cover
layer straight $IDreinBeam $numBarsBeamTop1 $barAreaBeam -$CoreSYBeam $CoreTZBeam $CoreSYBeam $CoreTZBeam; # first top bars of beam
layer straight $IDreinBeam $numBarsBeamTop2 $barAreaBeam -$CoreSYBeam $LocBarTop2 $CoreSYBeam $LocBarTop2; # second top bars of beam
layer straight $IDreinBeam $numBarsBeamBtm1 $barAreaBeam -$CoreSYBeam -$CoreBZBeam $CoreSYBeam -$CoreBZBeam; # first bottom bars of beam
layer straight $IDreinBeam $numBarsBeamBtm2 $barAreaBeam -$CoreSYBeam -$LocBarBtm2 $CoreSYBeam -$LocBarBtm2; # second bottom bars of beam
layer straight $IDreinSlab $numBarSlabTop $barAreaSlab -$LocBarSlabTL $CoreTZSlab -$LocBarSlabTR $CoreTZSlab; # left top bars of slab
layer straight $IDreinSlab $numBarSlabTop $barAreaSlab $LocBarSlabTR $CoreTZSlab $LocBarSlabTL $CoreTZSlab; # right top bars of slab
layer straight $IDreinSlab $numBarSlabBtm $barAreaSlab -$LocBarSlabBL $CoreBZSlab -$LocBarSlabBR $CoreBZSlab; # left bottom bars of slab
layer straight $IDreinSlab $numBarSlabBtm $barAreaSlab $LocBarSlabBR $CoreBZSlab $LocBarSlabBL $CoreBZSlab; # right bottom bars of slab
}; # end of fibersection definition
section fiberSec $BeamSecTag2 {; # Define the fiber section of beam
patch quadr $IDConBeam $nfYBeamCore $nfZBeamCore -$CoreSYBeam -$CoreBZBeam $CoreSYBeam -$CoreBZBeam $CoreSYBeam $CoreTZBeam -$CoreSYBeam $CoreTZBeam; # beam core
patch quadr $IDConBeam $nfYSlabCore $nfZSlabCore -$CoreLYSlab $CoreBZSlab -$CoreRYSlab $CoreBZSlab -$CoreRYSlab $CoreTZSlab -$CoreLYSlab $CoreTZSlab; # slab left core
patch quadr $IDConBeam $nfYSlabCore $nfZSlabCore $CoreRYSlab $CoreBZSlab $CoreLYSlab $CoreBZSlab $CoreLYSlab $CoreTZSlab $CoreRYSlab $CoreTZSlab; # slab right core
layer straight $IDConBeamU $nfYBeamcover $fareaBeamCoverBY -$LocCoverBY -$LocCoverBZ $LocCoverBY -$LocCoverBZ; # Bottom cover
layer straight $IDConBeamU $nfYBeamcover $fareaBeamCoverTY -$LocCoverTY $LocCoverTZ $LocCoverTY $LocCoverTZ; # Top cover
layer straight $IDConBeamU $nfZBeamcover $fareaBeamCoverSide -$LocCoverSY -$LocCoverSBZ -$LocCoverSY $LocCoverSTZ; # Left side cover
layer straight $IDConBeamU $nfZBeamcover $fareaBeamCoverSide $LocCoverSY -$LocCoverSBZ $LocCoverSY $LocCoverSTZ; # Right side cover
layer straight $IDConBeamU $nfYSlabcover $fareaSlabCoverTop -$LocSlabcoverLY $LocSlabcoverTZ -$LocSlabcoverRY $LocSlabcoverTZ; # Left top slab cover
layer straight $IDConBeamU $nfYSlabcover $fareaSlabCoverBtm -$LocSlabcoverLY $LocSlabcoverBZ -$LocSlabcoverRY $LocSlabcoverBZ; # Left bottom slab cover
layer straight $IDConBeamU $nfYSlabcover $fareaSlabCoverTop $LocSlabcoverRY $LocSlabcoverTZ $LocSlabcoverLY $LocSlabcoverTZ; # right top slab cover
layer straight $IDConBeamU $nfYSlabcover $fareaSlabCoverBtm $LocSlabcoverRY $LocSlabcoverBZ $LocSlabcoverLY $LocSlabcoverBZ; # right bottom slab cover
layer straight $IDreinBeam $numBarsBeamTop1 $barAreaBeam -$CoreSYBeam $CoreTZBeam $CoreSYBeam $CoreTZBeam; # first top bars of beam
layer straight $IDreinBeam $numBarsBeamTop2 $barAreaBeam -$CoreSYBeam $LocBarTop2 $CoreSYBeam $LocBarTop2; # second top bars of beam
layer straight $IDreinBeam $numBarsBeamBtm1 $barAreaBeam -$CoreSYBeam -$CoreBZBeam $CoreSYBeam -$CoreBZBeam; # first bottom bars of beam
layer straight $IDreinBeam $numBarsBeamBtm2 $barAreaBeam -$CoreSYBeam -$LocBarBtm2 $CoreSYBeam -$LocBarBtm2; # second bottom bars of beam
layer straight $IDreinSlab $numBarSlabTop $barAreaSlab -$LocBarSlabTL $CoreTZSlab -$LocBarSlabTR $CoreTZSlab; # left top bars of slab
layer straight $IDreinSlab $numBarSlabTop $barAreaSlab $LocBarSlabTR $CoreTZSlab $LocBarSlabTL $CoreTZSlab; # right top bars of slab
layer straight $IDreinSlab $numBarSlabBtm $barAreaSlab -$LocBarSlabBL $CoreBZSlab -$LocBarSlabBR $CoreBZSlab; # left bottom bars of slab
layer straight $IDreinSlab $numBarSlabBtm $barAreaSlab $LocBarSlabBR $CoreBZSlab $LocBarSlabBL $CoreBZSlab; # right bottom bars of slab
}; # end of fibersection definition
section fiberSec $BeamSecTag3 {; # Define the fiber section of beam
patch quadr $IDConBeam $nfYBeamCore $nfZBeamCore -$CoreSYBeam -$CoreBZBeam $CoreSYBeam -$CoreBZBeam $CoreSYBeam $CoreTZBeam -$CoreSYBeam $CoreTZBeam; # beam core
patch quadr $IDConBeam $nfYSlabCore $nfZSlabCore -$CoreLYSlab $CoreBZSlab -$CoreRYSlab $CoreBZSlab -$CoreRYSlab $CoreTZSlab -$CoreLYSlab $CoreTZSlab; # slab left core
patch quadr $IDConBeam $nfYSlabCore $nfZSlabCore $CoreRYSlab $CoreBZSlab $CoreLYSlab $CoreBZSlab $CoreLYSlab $CoreTZSlab $CoreRYSlab $CoreTZSlab; # slab right core
layer straight $IDConBeamU $nfYBeamcover $fareaBeamCoverBY -$LocCoverBY -$LocCoverBZ $LocCoverBY -$LocCoverBZ; # Bottom cover
layer straight $IDConBeamU $nfYBeamcover $fareaBeamCoverTY -$LocCoverTY $LocCoverTZ $LocCoverTY $LocCoverTZ; # Top cover
layer straight $IDConBeamU $nfZBeamcover $fareaBeamCoverSide -$LocCoverSY -$LocCoverSBZ -$LocCoverSY $LocCoverSTZ; # Left side cover
layer straight $IDConBeamU $nfZBeamcover $fareaBeamCoverSide $LocCoverSY -$LocCoverSBZ $LocCoverSY $LocCoverSTZ; # Right side cover
layer straight $IDConBeamU $nfYSlabcover $fareaSlabCoverTop -$LocSlabcoverLY $LocSlabcoverTZ -$LocSlabcoverRY $LocSlabcoverTZ; # Left top slab cover
layer straight $IDConBeamU $nfYSlabcover $fareaSlabCoverBtm -$LocSlabcoverLY $LocSlabcoverBZ -$LocSlabcoverRY $LocSlabcoverBZ; # Left bottom slab cover
layer straight $IDConBeamU $nfYSlabcover $fareaSlabCoverTop $LocSlabcoverRY $LocSlabcoverTZ $LocSlabcoverLY $LocSlabcoverTZ; # right top slab cover
layer straight $IDConBeamU $nfYSlabcover $fareaSlabCoverBtm $LocSlabcoverRY $LocSlabcoverBZ $LocSlabcoverLY $LocSlabcoverBZ; # right bottom slab cover
layer straight $IDreinBeam $numBarsBeamTop1 $barAreaBeam -$CoreSYBeam $CoreTZBeam $CoreSYBeam $CoreTZBeam; # first top bars of beam
layer straight $IDreinBeam $numBarsBeamTop2 $barAreaBeam -$CoreSYBeam $LocBarTop2 $CoreSYBeam $LocBarTop2; # second top bars of beam
layer straight $IDreinBeam $numBarsBeamBtm1 $barAreaBeam -$CoreSYBeam -$CoreBZBeam $CoreSYBeam -$CoreBZBeam; # first bottom bars of beam
layer straight $IDreinBeam $numBarsBeamBtm2 $barAreaBeam -$CoreSYBeam -$LocBarBtm2 $CoreSYBeam -$LocBarBtm2; # second bottom bars of beam
layer straight $IDreinSlab $numBarSlabTop $barAreaSlab -$LocBarSlabTL $CoreTZSlab -$LocBarSlabTR $CoreTZSlab; # left top bars of slab
layer straight $IDreinSlab $numBarSlabTop $barAreaSlab $LocBarSlabTR $CoreTZSlab $LocBarSlabTL $CoreTZSlab; # right top bars of slab
layer straight $IDreinSlab $numBarSlabBtm $barAreaSlab -$LocBarSlabBL $CoreBZSlab -$LocBarSlabBR $CoreBZSlab; # left bottom bars of slab
layer straight $IDreinSlab $numBarSlabBtm $barAreaSlab $LocBarSlabBR $CoreBZSlab $LocBarSlabBL $CoreBZSlab; # right bottom bars of slab
}; # end of fibersection definition
# structural definition--------------------------------------------------------------------------------------
set numIntgrPts 4; # number of integration points for force-based element
set TransfTag 1; # associate a tag to column transformation
geomTransf Linear $TransfTag ;
element nonlinearBeamColumn 1 21 22 $numIntgrPts $ColSecTag1 $TransfTag;
element nonlinearBeamColumn 2 31 32 $numIntgrPts $ColSecTag2 $TransfTag;
element nonlinearBeamColumn 3 22 23 $numIntgrPts $ColSecTag3 $TransfTag;
element nonlinearBeamColumn 4 32 33 $numIntgrPts $ColSecTag4 $TransfTag;
element nonlinearBeamColumn 5 12 22 $numIntgrPts $BeamSecTag1 $TransfTag;
element nonlinearBeamColumn 6 22 32 $numIntgrPts $BeamSecTag2 $TransfTag;
element nonlinearBeamColumn 7 32 42 $numIntgrPts $BeamSecTag3 $TransfTag;
DisplayModel2D NodeNumbers
# gravity analysis------------------------------------------------------------------------------------------
pattern Plain 101 Constant {
# point loads on column's top nodes
# command: load node Fx Fy Mz
load 23 0.0 -$Nodalweight2 0.0;
load 33 0.0 -$Nodalweight2 0.0;
}
# Gravity-analysis: load-controlled static analysis
set Tol 1.0e-3; # convergence tolerance for test
constraints Plain; # how it handles boundary conditions
numberer RCM; # renumber dof's to minimize band-width (optimization)
system BandGeneral; # how to store and solve the system of equations in the analysis (large model: try UmfPack)
test NormDispIncr $Tol 6; # determine if convergence has been achieved at the end of an iteration step
algorithm Newton; # use Newton's solution algorithm: updates tangent stiffness at every iteration
set NstepGravity 10; # apply gravity in 10 steps
set DGravity [expr 1.0/$NstepGravity]; # load increment
integrator LoadControl $DGravity; # determine the next time step for an analysis
analysis Static; # define type of analysis static or transient
analyze $NstepGravity; # apply gravity
# maintain constant gravity loads and reset time to zero
loadConst -time 0.0
puts "Model Built"
# Recorders-----------------------------------------------------------------------------------------------
recorder Node -file Data/ND23Disp.out -time -node 23 -dof 1 disp; # displacements of free nodess
recorder Node -file Data/ND22Disp.out -time -node 22 -dof 1 disp; # displacements of free nodess
recorder Node -file Data/ND21RBase.out -time -node 21 -dof 1 reaction; # support reaction
# Pushover analysis-----------------------------------------------------------------------------------------
if {$analysisType == "pushover"} {
puts "Running Pushover..."
# assign lateral loads and create load pattern
set lat3 0.1; # force on the top of columns
pattern Plain 200 Linear {
load 23 $lat3 0.0 0.0;
load 33 $lat3 0.0 0.0;
}
# displacement parameters
set IDctrlNode 23; # node where disp is read for disp control
set IDctrlDOF 1; # degree of freedom read for disp control (1 = x displacement)
set Dmax [expr 0.05]; # maximum displacement of pushover
set Dincr [expr 0.001]; # displacement increment
# analysis commands
constraints Plain; # how it handles boundary conditions
numberer RCM; # renumber dof's to minimize band-width (optimization)
system BandGeneral; # how to store and solve the system of equations in the analysis (large model: try UmfPack)
test NormUnbalance 1.0e-3 40; # tolerance, max iterations
algorithm Newton; # use Newton's solution algorithm: updates tangent stiffness at every iteration
integrator DisplacementControl $IDctrlNode $IDctrlDOF $Dincr; # use displacement-controlled analysis
analysis Static; # define type of analysis: static for pushover
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
puts "Pushover complete"; # display this message in the command window
}
wipe all;
What is the problem in my code for a pushover
Moderators: silvia, selimgunay, Moderators
Re: What is the problem in my code for a pushover
Your code is too long to look for an error. If you tell me what are you modeling and what problems you have encountered while doing pushover I can help you with finding the error.
-
- Posts: 2
- Joined: Sat Sep 21, 2013 10:29 pm
- Location: asare
Re: What is the problem in my code for a pushover
hi .ONE eroor that i find SET HBuilding $X set Dmax [expr 0.o4*$HBuilding];