SCBF 2D Analysis - Solver Problem

Forum for OpenSees users to post questions, comments, etc. on the use of the OpenSees interpreter, OpenSees.exe

Moderators: silvia, selimgunay, Moderators

Post Reply
ankitprakashntpc
Posts: 14
Joined: Mon Sep 23, 2013 9:47 pm
Location: Indian Institute of Technology, Delhi

SCBF 2D Analysis - Solver Problem

Post by ankitprakashntpc »

I am trying to model a multi-bay 3 storey steel frame using the script by Vesna. I have used almost all the solvers including BandGeneral and UmfPack but they are failing from start showing the following as error:

WARNING BandGenLinLapackSolver::solve() -LAPACK routine returned 1
WARNING NewtonRaphson::solveCurrentStep() -the LinearSysOfEqn failed in solve()
StaticAnalysis::analyze() - the Algorithm failed at iteration: 0 with domain at load factor 0.1
OpenSees > analyze failed, returned: -3 error flag
Model Built
WARNING BandGenLinLapackSolver::solve() -LAPACK routine returned 1

I am checking the boundary conditions and rest of the script to search for source(s) of error. If somebody could help me in this, I'll be really grateful. My script is as follows:

foreach GP_Model { "RH" "GP" } {
# GP stands for gusset plate connection model based on Uriz report: PEER 2008/08
# RH stands for gusset plate connection model that uses rotational spring based on: Po-Chien Hsiao, Dawn E. Lehman, Charles W. Roeder, (2012), "Improved analytical model for special concentrically braced frames", Journal of Constructional Steel Research 73 (21012) 80-94
###################################################################################################
# Set Up & Source Definition
###################################################################################################
wipe; # clear memory of past model definitions
model BasicBuilder -ndm 2 -ndf 3; # Define the model builder, ndm = #dimension, ndf = #dofs
source WSection.tcl; # procedure for creating standard steel W section
source HSSsection.tcl; # procedure for creating standard steel HSS section
source GPsection.tcl; # procedure for creating gusset plate section

###################################################################################################
# Define Analysis Type and create output folder
###################################################################################################
# Define type of analysis: "pushover" = pushover; "dynamic" = dynamic
set analysisType "dynamic";

if {$analysisType == "pushover"} {
if { $GP_Model == "GP" } {
set dataDir Pushover-Output-GP; # name of output folder
} else {
set dataDir Pushover-Output-RH;
}
file mkdir $dataDir; # create output folder
}
if {$analysisType == "dynamic"} {
if { $GP_Model == "GP" } {
set dataDir Dynamic-Output-GP; # name of output folder
} else {
set dataDir Dynamic-Output-RH;
}
set subDir1 DriftAcceleration
set subDir2 ForceDeformation
file mkdir $dataDir/$subDir1; # create output folder
file mkdir $dataDir/$subDir2;
}

###################################################################################################
# Define Building Geometry, Nodes, and Constraints
###################################################################################################
# define structure-geometry parameters
set WBay 360.; # bay width in inches
set HStory 156.; # 1st story height in inches

# calculate locations frame nodes:
set Pier1 0.0; # leftmost column line
set Pier2 [expr $Pier1 + $WBay];
set Pier3 [expr $Pier2 + $WBay];
set Pier4 [expr $Pier3 + $WBay];
set Pier5 [expr $Pier4 + $WBay];
set Floor1 0.0; # ground floor
set Floor2 [expr $Floor1 + $HStory];
set Floor3 [expr $Floor2 + $HStory];
set Floor4 [expr $Floor3 + $HStory];

# joint offset distance for beams, columns, and braces (from gusset plate geometry)
set jOff_col_b 44.81; # joint offset at the bottom of the column (gusset-plate conection)
set jOff_beam_m 50.56; # joint offset from the middle node of beam (gusset-plate conection)
set jOff_brace_bx 26.2; # joint offset at the bottom of a braces in X direction (from work point to yield line)
set jOff_brace_by 22.7; # joint offset at the bottom of a braces in Y direction (from work point to yield line)
set jOff_brace_tx 31.95; # joint offset at the top of a brace in X direction (from work point to yield line)
set jOff_brace_ty 27.69; # joint offset at the top of a brace in Y direction (from work point to yield line)
set jOff_beam_e 7.61; # joint offset for the beam at its ends (from column centerline to the shear tab hinge line)
set jOff_col_t 13.355; # joint offset for a column at the beam-column conection (Dbeam/2)

# end node ofsets of the braces (from a work point to the beginning of the brace)
set nOff_brace_bx 28.68; # bottom of a brace in X direction
set nOff_brace_by 24.85; # bottom of a brace in X and Y direction
set nOff_brace_tx 34.43; # top of a brace in X direction
set nOff_brace_ty 29.83; # top of a brace in Y direction

# brace effective length, number of elements per brace, and initial imperfection
set PI [expr 2.*asin(1.0)]
set alpha [expr atan(2.*$HStory/$WBay)]
set Leff [expr ($WBay/2.)/cos($alpha)-$nOff_brace_bx/cos($alpha)-$nOff_brace_tx/cos($alpha)]; #effective brace length
set noEle 10; # number of elements per brace
set p_ratio 1000.; #coresponds to 0.05% of the effective length
set p [expr 1./$p_ratio*$Leff]; #imperfection of the brace

# floor masses
set g 386.4; # acceleration due to gravity
set NodalMass2H 458.51; # horizontal mass Floor 2 & 3
set NodalMass2V 4.58; # veritcal mass Floor 2 & 3
set NodalMass4H 400.56; # horizontal mass Floor 4
set NodalMass4V 4.00; # veritcal mass Floor 4

# define nodes and assign masses to beam-column intersections of frame
# command: node nodeID xcoord ycoord -mass mass_dof1 mass_dof2 mass_dof3
# Floor #1
# node No. X co-ord Y co-ord
node 1 0.00 0.00
node 2 360.00 0.00
node 3 720.00 0.00
node 4 1080.00 0.00
node 5 1440.00 0.00

# Floor #2
node 6 0 156 -mass [expr $NodalMass2H/3.] [expr $NodalMass2V*0.375] 0.0
node 7 180 156 -mass [expr $NodalMass2H/3.] [expr $NodalMass2V*0.25] 0.0
node 8 360 156 -mass [expr $NodalMass2H/3.] [expr $NodalMass2V*0.375] 0.0
node 9 720 156
node 10 1080 156 -mass [expr $NodalMass2H/3.] [expr $NodalMass2V*0.375] 0.0
node 11 1260 156 -mass [expr $NodalMass2H/3.] [expr $NodalMass2V*0.25] 0.0
node 12 1440 156 -mass [expr $NodalMass2H/3.] [expr $NodalMass2V*0.375] 0.0

# Floor #3
node 13 0 312 -mass [expr $NodalMass2H/3.] [expr $NodalMass2V*0.375] 0.0
node 14 180 312 -mass [expr $NodalMass2H/3.] [expr $NodalMass2V*0.25] 0.0
node 15 360 312 -mass [expr $NodalMass2H/3.] [expr $NodalMass2V*0.375] 0.0
node 16 720 312
node 17 1080 312 -mass [expr $NodalMass2H/3.] [expr $NodalMass2V*0.375] 0.0
node 18 1260 312 -mass [expr $NodalMass2H/3.] [expr $NodalMass2V*0.25] 0.0
node 19 1440 312 -mass [expr $NodalMass2H/3.] [expr $NodalMass2V*0.375] 0.0

# Floor #4
node 20 0 468 -mass [expr $NodalMass4H/3.] [expr $NodalMass4V*0.375] 0.0
node 21 180 468 -mass [expr $NodalMass4H/3.] [expr $NodalMass4V*0.25] 0.0
node 22 360 468 -mass [expr $NodalMass4H/3.] [expr $NodalMass4V*0.375] 0.0
node 23 720 468
node 24 1080 468 -mass [expr $NodalMass4H/3.] [expr $NodalMass4V*0.375] 0.0
node 25 1260 468 -mass [expr $NodalMass4H/3.] [expr $NodalMass4V*0.25] 0.0
node 26 1440 468 -mass [expr $NodalMass4H/3.] [expr $NodalMass4V*0.375] 0.0
# define extra nodes in the beam
# at shear tabs (pin connection)
node 27 7.61 156.00
node 28 7.61 156.00
node 29 352.39 156.00
node 30 352.39 156.00
node 31 367.61 156.00
node 32 367.61 156.00
node 33 712.39 156.00
node 34 712.39 156.00
node 35 727.61 156.00
node 36 727.61 156.00
node 37 1072.39 156.00
node 38 1072.39 156.00
node 39 1087.61 156.00
node 40 1087.61 156.00
node 41 1432.39 156.00
node 42 1432.39 156.00
node 43 7.61 312.00
node 44 7.61 312.00
node 45 352.39 312.00
node 46 352.39 312.00
node 47 367.61 312.00
node 48 367.61 312.00
node 49 712.39 312.00
node 50 712.39 312.00
node 51 727.61 312.00
node 52 727.61 312.00
node 53 1072.39 312.00
node 54 1072.39 312.00
node 55 1087.61 312.00
node 56 1087.61 312.00
node 57 1432.39 312.00
node 58 1432.39 312.00
node 59 7.61 468.00
node 60 7.61 468.00
node 61 352.39 468.00
node 62 352.39 468.00
node 63 367.61 468.00
node 64 367.61 468.00
node 65 712.39 468.00
node 66 712.39 468.00
node 67 727.61 468.00
node 68 727.61 468.00
node 69 1072.39 468.00
node 70 1072.39 468.00
node 71 1087.61 468.00
node 72 1087.61 468.00
node 73 1432.39 468.00
node 74 1432.39 468.00

# at gusset plate conection
node 75 129.44 156.00
node 76 230.56 156.00
node 77 1209.44 156.00
node 78 1310.56 156.00
node 79 129.44 312.00
node 80 230.56 312.00
node 81 1209.44 312.00
node 82 1310.56 312.00
node 83 129.44 468.00
node 84 230.56 468.00
node 85 1209.44 468.00
node 86 1310.56 468.00

# define extra nodes in the columns
node 87 0.00 44.81
node 88 360.00 44.81
node 89 720.00 44.81
node 90 1080.00 44.81
node 91 1440.00 44.81
node 92 0.00 142.65
node 93 360.00 142.65
node 94 720.00 142.65
node 95 1080.00 142.65
node 96 1440.00 142.65
node 97 0.00 169.36
node 98 360.00 169.36
node 99 720.00 169.36
node 100 1080.00 169.36
node 101 1440.00 169.36
node 102 0.00 298.65
node 103 360.00 298.65
node 104 720.00 298.65
node 105 1080.00 298.65
node 106 1440.00 298.65
node 107 0.00 325.36
node 108 360.00 325.36
node 109 720.00 325.36
node 110 1080.00 325.36
node 111 1440.00 325.36
node 112 0.00 454.65
node 113 360.00 454.65
node 114 720.00 454.65
node 115 1080.00 454.65
node 116 1440.00 454.65

# define extra nodes for rigid links in the braces:
if { $GP_Model == "GP" } {
node 117 26.20 22.70
node 118 333.80 22.70
node 119 1106.20 22.70
node 120 1413.80 22.70
node 121 148.05 128.31
node 122 211.95 128.31
node 123 1228.05 128.31
node 124 1291.95 128.31
node 125 26.20 178.70
node 126 333.80 178.70
node 127 1106.20 178.70
node 128 1413.80 178.70
node 129 148.05 284.31
node 130 211.95 284.31
node 131 1228.05 284.31
node 132 1291.95 284.31
node 133 26.20 334.70
node 134 333.80 334.70
node 135 1106.20 334.70
node 136 1413.80 334.70
node 137 148.05 440.31
node 138 211.95 440.31
node 139 1228.05 440.31
node 140 1291.95 440.31
} else {
node 117 28.68 24.85
node 118 331.32 24.85
node 119 1108.68 24.85
node 120 1411.32 24.85
node 121 145.57 126.17
node 122 214.43 126.17
node 123 1225.57 126.17
node 124 1294.43 126.17
node 125 28.68 180.85
node 126 331.32 180.85
node 127 1108.68 180.85
node 128 1411.32 180.85
node 129 145.57 282.17
node 130 214.43 282.17
node 131 1225.57 282.17
node 132 1294.43 282.17
node 133 28.68 336.85
node 134 331.32 336.85
node 135 1108.68 336.85
node 136 1411.32 336.85
node 137 145.57 438.17
node 138 214.43 438.17
node 139 1225.57 438.17
node 140 1294.43 438.17
}

# define extra nodes along the braces:
#----------------------------------------------
# nodeID convention: "abcd" where and ab = brace number
# "ab" convention: odd = left; even = right;
# cd = node numbering for the brace (can be between 1 and 99)

# nodes of the left brace of storey 1, 2 & 3
# puts "brace 11"
set orient "pos"
set shift1 1100
set shift2 1300
set shift3 1500
set shift4 1700
set shift5 1900
set shift6 2100
set Xi1 [expr $Pier1+$nOff_brace_bx]; # x coordinate of node 1101, 1501, 1901
set Yi1 [expr $Floor1+$nOff_brace_by]; # y coordinate of node 1101, 1301
set Xi2 [expr $Pier4+$nOff_brace_bx]; # x coordinate of node 1301, 1701, 2101
set Yi2 [expr $Floor2+$nOff_brace_by]; # y coordinate of node 1501, 1701
set Yi3 [expr $Floor3+$nOff_brace_by]; # y coordinate of node 1901, 2101
set eleL [expr $Leff/$noEle]
for { set i 1 } { $i <= [expr $noEle+1] } { incr i} {
#local coordinates
set xm [expr $eleL*($i-1)]
set ym [expr 4.*$p/$Leff*$xm*(1.-$xm/$Leff)];
#global coordinates
if {$orient == "pos"} {
set Xm1 [expr $Xi1+cos($alpha)*$xm-sin($alpha)*$ym];
set Ym1 [expr $Yi1+sin($alpha)*$xm+cos($alpha)*$ym];
set Xm2 [expr $Xi2+cos($alpha)*$xm-sin($alpha)*$ym];
set Ym2 [expr $Yi2+sin($alpha)*$xm+cos($alpha)*$ym];
set Ym3 [expr $Yi3+sin($alpha)*$xm+cos($alpha)*$ym];
} else {
set Xm1 [expr $Xi1-cos($alpha)*$xm-sin($alpha)*$ym];
set Ym1 [expr $Yi1+sin($alpha)*$xm-cos($alpha)*$ym];
set Xm2 [expr $Xi2-cos($alpha)*$xm-sin($alpha)*$ym];
set Ym2 [expr $Yi2+sin($alpha)*$xm-cos($alpha)*$ym];
set Ym3 [expr $Yi3+sin($alpha)*$xm-cos($alpha)*$ym];
}
if { $i == [expr $noEle+1] } {
set Xm1 [expr $Pier1+$WBay/2.0-$nOff_brace_tx]; # x coordinate of the last node
set Ym1 [expr $Floor2-$nOff_brace_ty]; # y coordinate of the last node
set Xm2 [expr $Pier4+$WBay/2.0-$nOff_brace_tx]; # x coordinate of the last node
set Ym2 [expr $Floor3-$nOff_brace_ty]; # y coordinate of the last node
set Ym3 [expr $Floor4-$nOff_brace_ty]; # y coordinate of the last node
}
#define nodes
node [expr $shift1+$i] $Xm1 $Ym1
#puts "node: [expr $shift1+$i] $Xm1 $Ym1 $Zm"
node [expr $shift2+$i] $Xm2 $Ym1
#puts "node: [expr $shift2+$i] $Xm2 $Ym1 $Zm"
node [expr $shift3+$i] $Xm1 $Ym2
#puts "node: [expr $shift3+$i] $Xm1 $Ym2 $Zm"
node [expr $shift4+$i] $Xm2 $Ym2
#puts "node: [expr $shift4+$i] $Xm2 $Ym2 $Zm"
node [expr $shift5+$i] $Xm1 $Ym3
#puts "node: [expr $shift5+$i] $Xm1 $Ym3 $Zm"
node [expr $shift6+$i] $Xm2 $Ym3
#puts "node: [expr $shift6+$i] $Xm2 $Ym3 $Zm"
}

# nodes of the right brace of storey 1, 2 & 3
# puts "brace 12"
set orient "neg"
set shift1 1200
set shift2 1400
set shift3 1600
set shift4 1800
set shift5 2000
set shift6 2200
set Xi1 [expr $Pier2-$nOff_brace_bx]; # x coordinate of node 1201, 1601, 2001
set Yi1 [expr $Floor1+$nOff_brace_by]; # y coordinate of node 1201, 1401
set Xi2 [expr $Pier5-$nOff_brace_bx]; # x coordinate of node 1401, 1801, 2201
set Yi2 [expr $Floor2+$nOff_brace_by]; # y coordinate of node 1601, 1801
set Yi3 [expr $Floor3+$nOff_brace_by]; # y coordinate of node 2001, 2201
set eleL [expr $Leff/$noEle]
for { set i 1 } { $i <= [expr $noEle+1] } { incr i} {
#local coordinates
set xm [expr $eleL*($i-1)]
set ym [expr 4.*$p/$Leff*$xm*(1.-$xm/$Leff)];
#global coordinates
if {$orient == "pos"} {
set Xm1 [expr $Xi1+cos($alpha)*$xm-sin($alpha)*$ym];
set Ym1 [expr $Yi1+sin($alpha)*$xm+cos($alpha)*$ym];
set Xm2 [expr $Xi2+cos($alpha)*$xm-sin($alpha)*$ym];
set Ym2 [expr $Yi2+sin($alpha)*$xm+cos($alpha)*$ym];
set Ym3 [expr $Yi3+sin($alpha)*$xm+cos($alpha)*$ym];
} else {
set Xm1 [expr $Xi1-cos($alpha)*$xm-sin($alpha)*$ym];
set Ym1 [expr $Yi1+sin($alpha)*$xm-cos($alpha)*$ym];
set Xm2 [expr $Xi2-cos($alpha)*$xm-sin($alpha)*$ym];
set Ym2 [expr $Yi2+sin($alpha)*$xm-cos($alpha)*$ym];
set Ym3 [expr $Yi3+sin($alpha)*$xm-cos($alpha)*$ym];
}
if { $i == [expr $noEle+1] } {
set Xm1 [expr $Pier2-$WBay/2.0+$nOff_brace_tx]; # x coordinate of the last node
set Ym1 [expr $Floor2-$nOff_brace_ty]; # y coordinate of the last node
set Xm2 [expr $Pier5-$WBay/2.0+$nOff_brace_tx]; # x coordinate of the last node
set Ym2 [expr $Floor3-$nOff_brace_ty]; # y coordinate of the last node
set Ym3 [expr $Floor4-$nOff_brace_ty]; # y coordinate of the last node
}
#define nodes
node [expr $shift1+$i] $Xm1 $Ym1
#puts "node: [expr $shift1+$i] $Xm1 $Ym1 $Zm"
node [expr $shift2+$i] $Xm2 $Ym1
#puts "node: [expr $shift2+$i] $Xm2 $Ym1 $Zm"
node [expr $shift3+$i] $Xm1 $Ym2
#puts "node: [expr $shift3+$i] $Xm1 $Ym2 $Zm"
node [expr $shift4+$i] $Xm2 $Ym2
#puts "node: [expr $shift4+$i] $Xm2 $Ym2 $Zm"
node [expr $shift5+$i] $Xm1 $Ym3
#puts "node: [expr $shift5+$i] $Xm1 $Ym3 $Zm"
node [expr $shift6+$i] $Xm2 $Ym3
#puts "node: [expr $shift6+$i] $Xm2 $Ym3 $Zm"
}

# assign boundary conditions
#-------------------------------------------------------
# command: fix nodeID dxFixity dyFixity rzFixity
# fixity values: 1 = constrained; 0 = unconstrained

# fix the base of the frame;
fix 1 1 1 1
fix 2 1 1 1
fix 3 1 1 0
fix 4 1 1 1
fix 5 1 1 1

# define constraints for pined beam-to-column connection
equalDOF 28 27 1 2
equalDOF 30 29 1 2
equalDOF 32 31 1 2
equalDOF 34 33 1 2
equalDOF 36 35 1 2
equalDOF 38 37 1 2
equalDOF 40 39 1 2
equalDOF 42 41 1 2
equalDOF 44 43 1 2
equalDOF 46 45 1 2
equalDOF 48 47 1 2
equalDOF 50 49 1 2
equalDOF 52 51 1 2
equalDOF 54 53 1 2
equalDOF 56 55 1 2
equalDOF 58 57 1 2
equalDOF 60 59 1 2
equalDOF 62 61 1 2
equalDOF 64 63 1 2
equalDOF 66 65 1 2
equalDOF 68 67 1 2
equalDOF 70 69 1 2
equalDOF 72 71 1 2
equalDOF 74 73 1 2

# define constraints for zeroLength elements used to model rotational hinge
if { $GP_Model == "RH" } {
equalDOF 117 1101 1 2
equalDOF 118 1201 1 2
equalDOF 119 1301 1 2
equalDOF 120 1401 1 2
equalDOF 121 [expr 1101+$noEle] 1 2
equalDOF 122 [expr 1201+$noEle] 1 2
equalDOF 123 [expr 1301+$noEle] 1 2
equalDOF 124 [expr 1401+$noEle] 1 2
equalDOF 125 1501 1 2
equalDOF 126 1601 1 2
equalDOF 127 1701 1 2
equalDOF 128 1801 1 2
equalDOF 129 [expr 1501+$noEle] 1 2
equalDOF 130 [expr 1601+$noEle] 1 2
equalDOF 131 [expr 1701+$noEle] 1 2
equalDOF 132 [expr 1801+$noEle] 1 2
equalDOF 133 1901 1 2
equalDOF 134 2001 1 2
equalDOF 135 2101 1 2
equalDOF 136 2201 1 2
equalDOF 137 [expr 1901+$noEle] 1 2
equalDOF 138 [expr 2001+$noEle] 1 2
equalDOF 139 [expr 2101+$noEle] 1 2
equalDOF 140 [expr 2201+$noEle] 1 2
}

###################################################################################################
# Define Materials and Sections
###################################################################################################

# define material for nonlinear beams and columns
set matID_BC 1
set matID_fatBC 2
set Es 29000.0; # modulus of elasticity for steel
set Fy 50.0; # yield stress of steel
set b 0.003; # strain hardening ratio
uniaxialMaterial Steel02 $matID_BC $Fy $Es $b 20 0.925 0.15 0.0005 0.01 0.0005 0.01
uniaxialMaterial Fatigue $matID_fatBC $matID_BC


# define material for braces
set matID_Brace 3
set matID_fatBrace 4
set Fy_b 46.0; # yield stress of steel
set E0 0.095
set m -0.5
uniaxialMaterial Steel02 $matID_Brace $Fy_b $Es $b 20 0.925 0.15 0.0005 0.01 0.0005 0.01
uniaxialMaterial Fatigue $matID_fatBrace $matID_Brace -E0 $E0 -m $m -min -1.0 -max 0.04
#uniaxialMaterial Fatigue $matID_fatBrace $matID_Brace -E0 $E0 -m $m

# define material for gusset plates
# GP_Model == GP
set matID_GP 5
set Fy_gp 50.0
uniaxialMaterial Steel02 $matID_GP $Fy_gp $Es $b 20 0.925 0.15 0.0005 0.01 0.0005 0.01
# GP_Model == RH
# rotational hinge (dir 6)
set matID_RHb 11
set matID_RHt 12
set My_b 772.
set My_t 772.
set Krot_b 18045.12
set Krot_t 15571.02
set b 0.01
uniaxialMaterial Steel02 $matID_RHb $My_b $Krot_b $b 20 0.925 0.15 0.0005 0.01 0.0005 0.01
uniaxialMaterial Steel02 $matID_RHt $My_t $Krot_t $b 20 0.925 0.15 0.0005 0.01 0.0005 0.01

# define material for ghost truss
set matID_GT 6
uniaxialMaterial Elastic $matID_GT 100.0

# define material for rigid truss elements
set matID_RT 7
uniaxialMaterial Elastic $matID_RT $Es

# define sections
#-----------------
set secTagC 10
set secTagB1 21
set secTagB2 22
set secTagB3 23
set secTagBr1 31
set secTagBr2 32
set secTagBr3 33
set secTagGPb 40
set secTagGPt 50

# command: WSection secID matID d bf tf tw nfdw nftw nfbf nftf
# column: W12x96
WSection $secTagC $matID_fatBC 12.7 12.2 0.9 0.55 8 1 1 4
# Floor 2 beam: W33x263
WSection $secTagB1 $matID_fatBC 34.5 15.8 1.57 0.87 8 1 1 4
# Floor 3 beam: W33x221
WSection $secTagB2 $matID_fatBC 33.9 15.8 1.28 0.775 8 1 1 4
# Floor 4 beam: W33x201
WSection $secTagB3 $matID_fatBC 33.7 15.7 1.15 0.715 8 1 1 4

# define sections for braces
# command: HSSsection secID matID d t nfdy nfty nfdz nftz
# Storey 1 Brace: HSS14x14x5/16
HSSsection $secTagBr1 $matID_fatBrace 14. 0.3125 5 4 5 2
# Storey 2 Brace: HSS12x12x5/8
HSSsection $secTagBr2 $matID_fatBrace 12. 0.625 5 4 5 2
# Storey 3 Brace: HSS8x18x3/8
HSSsection $secTagBr3 $matID_fatBrace 8. 0.375 5 4 5 2

# define sections for gusset plates
# command: GPsection secID matID d t nfd nft
# bottom of the brace
GPsection $secTagGPb $matID_GP 1.375 49. 8 1
# top of the brace
GPsection $secTagGPt $matID_GP 1.375 49. 8 1

###################################################################################################
# Define Geometric Transformation
###################################################################################################
set transfTag_C 1
set transfTag_Brace 2
set transfTag_B 3

# rigid links of columns; columns
geomTransf PDelta $transfTag_C

# braces, gusset plates
geomTransf Corotational $transfTag_Brace

# beams
geomTransf PDelta $transfTag_B

###################################################################################################
# Define Elements
###################################################################################################

set tol 1.e-8
set maxIter 10

# define columns of a braced frame:
#----------------------------------
# command arguments: $eleID $iNode $jNode $numIntgrPts $secTag $transfTag
element forceBeamColumn 101 87 92 4 $secTagC $transfTag_C -iter $maxIter $tol
element forceBeamColumn 102 88 93 4 $secTagC $transfTag_C -iter $maxIter $tol
element forceBeamColumn 103 89 94 4 $secTagC $transfTag_C -iter $maxIter $tol
element forceBeamColumn 104 90 95 4 $secTagC $transfTag_C -iter $maxIter $tol
element forceBeamColumn 105 91 96 4 $secTagC $transfTag_C -iter $maxIter $tol
element forceBeamColumn 106 97 102 4 $secTagC $transfTag_C -iter $maxIter $tol
element forceBeamColumn 107 98 103 4 $secTagC $transfTag_C -iter $maxIter $tol
element forceBeamColumn 108 99 104 4 $secTagC $transfTag_C -iter $maxIter $tol
element forceBeamColumn 109 100 105 4 $secTagC $transfTag_C -iter $maxIter $tol
element forceBeamColumn 110 101 106 4 $secTagC $transfTag_C -iter $maxIter $tol
element forceBeamColumn 111 107 112 4 $secTagC $transfTag_C -iter $maxIter $tol
element forceBeamColumn 112 108 113 4 $secTagC $transfTag_C -iter $maxIter $tol
element forceBeamColumn 113 109 114 4 $secTagC $transfTag_C -iter $maxIter $tol
element forceBeamColumn 114 110 115 4 $secTagC $transfTag_C -iter $maxIter $tol
element forceBeamColumn 115 111 116 4 $secTagC $transfTag_C -iter $maxIter $tol



# define beams of a braced frame:
#--------------------------------
# command arguments: $eleID $iNode $jNode $numIntgrPts $secTag $transfTag
element forceBeamColumn 201 28 75 3 $secTagB1 $transfTag_B -iter $maxIter $tol
element forceBeamColumn 202 76 30 3 $secTagB1 $transfTag_B -iter $maxIter $tol
element forceBeamColumn 203 32 34 3 $secTagB1 $transfTag_B -iter $maxIter $tol
element forceBeamColumn 204 36 38 3 $secTagB1 $transfTag_B -iter $maxIter $tol
element forceBeamColumn 205 40 77 3 $secTagB1 $transfTag_B -iter $maxIter $tol
element forceBeamColumn 206 78 42 3 $secTagB1 $transfTag_B -iter $maxIter $tol
element forceBeamColumn 207 44 79 3 $secTagB2 $transfTag_B -iter $maxIter $tol
element forceBeamColumn 208 80 46 3 $secTagB2 $transfTag_B -iter $maxIter $tol
element forceBeamColumn 209 48 50 3 $secTagB2 $transfTag_B -iter $maxIter $tol
element forceBeamColumn 210 52 54 3 $secTagB2 $transfTag_B -iter $maxIter $tol
element forceBeamColumn 211 56 81 3 $secTagB2 $transfTag_B -iter $maxIter $tol
element forceBeamColumn 212 82 58 3 $secTagB2 $transfTag_B -iter $maxIter $tol
element forceBeamColumn 213 60 83 3 $secTagB3 $transfTag_B -iter $maxIter $tol
element forceBeamColumn 214 84 62 3 $secTagB3 $transfTag_B -iter $maxIter $tol
element forceBeamColumn 215 64 66 3 $secTagB3 $transfTag_B -iter $maxIter $tol
element forceBeamColumn 216 68 70 3 $secTagB3 $transfTag_B -iter $maxIter $tol
element forceBeamColumn 217 72 85 3 $secTagB3 $transfTag_B -iter $maxIter $tol
element forceBeamColumn 218 86 74 3 $secTagB3 $transfTag_B -iter $maxIter $tol

# define braces:
#----------------
# eleID convention: "abcd", ab = brace #
# "ab" convention: odd = left brace; even = right brace;
# cd = element numbering for the brace (can be between 1 and 99)
# command arguments: $eleID $iNode $jNode $numIntgrPts $secTag $transfTag
set NIP 3

# Storey 1 braces: 1100 to 1400
for { set shift 1100 } { $shift <= 1400 } { incr shift 100} {
for { set i 1 } { $i <= [expr $noEle] } { incr i} {
element forceBeamColumn [expr $shift+$i] [expr $shift+$i] [expr $shift+$i+1] $NIP $secTagBr1 $transfTag_Brace -iter $maxIter $tol
}
}
# Storey 2 braces: 1500 to 1800
for { set shift 1500 } { $shift <= 1800 } { incr shift 100} {
for { set i 1 } { $i <= [expr $noEle] } { incr i} {
element forceBeamColumn [expr $shift+$i] [expr $shift+$i] [expr $shift+$i+1] $NIP $secTagBr2 $transfTag_Brace -iter $maxIter $tol
}
}
# Storey 3 braces: 1900 to 2200
for { set shift 1900 } { $shift <= 2200 } { incr shift 100} {
for { set i 1 } { $i <= [expr $noEle] } { incr i} {
element forceBeamColumn [expr $shift+$i] [expr $shift+$i] [expr $shift+$i+1] $NIP $secTagBr3 $transfTag_Brace -iter $maxIter $tol
}
}

# define gusset plates:
#----------------------
if { $GP_Model == "GP" } {
# command arguments: $eleID $iNode $jNode $numIntgrPts $secTag $transfTag
set NIP 2
# Storey 1, brace 11-14
for { set shift 1100 } { $shift <= 1400 } { incr shift 100} {
set i [expr $shift/100];
element forceBeamColumn [expr $i-10+400] [expr $i-11+117] [expr $shift+1] $NIP $secTagGPb $transfTag_Brace
element forceBeamColumn [expr $i-10+412] [expr $shift+$noEle+1] [expr $i-11+121] $NIP $secTagGPt $transfTag_Brace
}

# Storey 2, brace 15-18
for { set shift 1500 } { $shift <= 1800 } { incr shift 100} {
set i [expr $shift/100];
element forceBeamColumn [expr $i-10+400] [expr $i-15+125] [expr $shift+1] $NIP $secTagGPb $transfTag_Brace
element forceBeamColumn [expr $i-10+412] [expr $shift+$noEle+1] [expr $i-15+129] $NIP $secTagGPt $transfTag_Brace
}

# Storey 3, brace 19-22
for { set shift 1900 } { $shift <= 2200 } { incr shift 100} {
set i [expr $shift/100];
element forceBeamColumn [expr $i-10+400] [expr $i-19+133] [expr $shift+1] $NIP $secTagGPb $transfTag_Brace
element forceBeamColumn [expr $i-10+412] [expr $shift+$noEle+1] [expr $i-19+137] $NIP $secTagGPt $transfTag_Brace
}
} else {
# command arguemnts: $eleTag $iNode $jNode -mat $matTag1 $matTag2 ... -dir $dir1 $dir2
# Storey 1, brace 11-14
for { set shift 1100 } { $shift <= 1400 } { incr shift 100} {
set i [expr $shift/100];
element zeroLength [expr $i-10+400] [expr $i-11+117] [expr $shift+1] -mat $matID_RHb -dir 6
element zeroLength [expr $i-10+412] [expr $shift+$noEle+1] [expr $i-11+121] -mat $matID_RHb -dir 6
}

# Storey 2, brace 15-18
for { set shift 1500 } { $shift <= 1800 } { incr shift 100} {
set i [expr $shift/100];
element zeroLength [expr $i-10+400] [expr $i-15+125] [expr $shift+1] -mat $matID_RHb -dir 6
element zeroLength [expr $i-10+412] [expr $shift+$noEle+1] [expr $i-15+129] -mat $matID_RHb -dir 6
}

# Storey 3, brace 19-22
for { set shift 1900 } { $shift <= 2200 } { incr shift 100} {
set i [expr $shift/100];
element zeroLength [expr $i-10+400] [expr $i-19+133] [expr $shift+1] -mat $matID_RHb -dir 6
element zeroLength [expr $i-10+412] [expr $shift+$noEle+1] [expr $i-19+137] -mat $matID_RHb -dir 6
}

}

# define rigid links:
#-----------------------
set Jrigid 1.0e4
set G [expr $Es/2.0/(1+0.3)]

#braces
#-----------
set Arigid [expr 25.7*10.]; # area of the brace multiplied by 10
set Irigid [expr 548.*10]; # I of the brace multiplied by 10
# eleID convention: "5xa", 5 = rigid link for braces, x = brace#, a = location of the rigid link
# "a" convention: 1 = bottom; 2 = top;
# comand arguemnts: $eleTag $iNode $jNode $A $E $Iy $transfTag
element elasticBeamColumn 501 1 1101 $Arigid $Es $Irigid $transfTag_Brace
element elasticBeamColumn 502 2 1201 $Arigid $Es $Irigid $transfTag_Brace
element elasticBeamColumn 503 4 1301 $Arigid $Es $Irigid $transfTag_Brace
element elasticBeamColumn 504 5 1401 $Arigid $Es $Irigid $transfTag_Brace
element elasticBeamColumn 505 121 7 $Arigid $Es $Irigid $transfTag_Brace
element elasticBeamColumn 506 122 7 $Arigid $Es $Irigid $transfTag_Brace
element elasticBeamColumn 507 123 11 $Arigid $Es $Irigid $transfTag_Brace
element elasticBeamColumn 508 124 11 $Arigid $Es $Irigid $transfTag_Brace
element elasticBeamColumn 509 6 1501 $Arigid $Es $Irigid $transfTag_Brace
element elasticBeamColumn 510 8 1601 $Arigid $Es $Irigid $transfTag_Brace
element elasticBeamColumn 511 10 1701 $Arigid $Es $Irigid $transfTag_Brace
element elasticBeamColumn 512 12 1801 $Arigid $Es $Irigid $transfTag_Brace
element elasticBeamColumn 513 129 14 $Arigid $Es $Irigid $transfTag_Brace
element elasticBeamColumn 514 130 14 $Arigid $Es $Irigid $transfTag_Brace
element elasticBeamColumn 515 131 18 $Arigid $Es $Irigid $transfTag_Brace
element elasticBeamColumn 516 132 18 $Arigid $Es $Irigid $transfTag_Brace
element elasticBeamColumn 517 13 1901 $Arigid $Es $Irigid $transfTag_Brace
element elasticBeamColumn 518 15 2001 $Arigid $Es $Irigid $transfTag_Brace
element elasticBeamColumn 519 17 2101 $Arigid $Es $Irigid $transfTag_Brace
element elasticBeamColumn 520 19 2201 $Arigid $Es $Irigid $transfTag_Brace
element elasticBeamColumn 521 137 21 $Arigid $Es $Irigid $transfTag_Brace
element elasticBeamColumn 522 138 21 $Arigid $Es $Irigid $transfTag_Brace
element elasticBeamColumn 523 139 25 $Arigid $Es $Irigid $transfTag_Brace
element elasticBeamColumn 524 140 25 $Arigid $Es $Irigid $transfTag_Brace

#beams
#-----------
set Arigid [expr 24.7*10.]; # area of the beam multiplied by 10
set IrigidZ [expr 2850.*10]; # Iz of the beam multiplied by 10
set IrigidY [expr 106.*10]; # Iy of the beam multiplied by 10

# comand arguemnts: $eleTag $iNode $jNode $A $E $Iz $transfTag
element elasticBeamColumn 601 6 27 $Arigid $Es $IrigidZ $transfTag_B
element elasticBeamColumn 602 75 7 $Arigid $Es $IrigidZ $transfTag_B
element elasticBeamColumn 603 7 76 $Arigid $Es $IrigidZ $transfTag_B
element elasticBeamColumn 604 30 8 $Arigid $Es $IrigidZ $transfTag_B
element elasticBeamColumn 605 8 31 $Arigid $Es $IrigidZ $transfTag_B
element elasticBeamColumn 606 34 9 $Arigid $Es $IrigidZ $transfTag_B
element elasticBeamColumn 607 9 35 $Arigid $Es $IrigidZ $transfTag_B
element elasticBeamColumn 608 38 10 $Arigid $Es $IrigidZ $transfTag_B
element elasticBeamColumn 609 10 39 $Arigid $Es $IrigidZ $transfTag_B
element elasticBeamColumn 610 77 11 $Arigid $Es $IrigidZ $transfTag_B
element elasticBeamColumn 611 11 78 $Arigid $Es $IrigidZ $transfTag_B
element elasticBeamColumn 612 42 12 $Arigid $Es $IrigidZ $transfTag_B
element elasticBeamColumn 613 13 43 $Arigid $Es $IrigidZ $transfTag_B
element elasticBeamColumn 614 79 14 $Arigid $Es $IrigidZ $transfTag_B
element elasticBeamColumn 615 14 80 $Arigid $Es $IrigidZ $transfTag_B
element elasticBeamColumn 616 46 15 $Arigid $Es $IrigidZ $transfTag_B
element elasticBeamColumn 617 15 47 $Arigid $Es $IrigidZ $transfTag_B
element elasticBeamColumn 618 50 16 $Arigid $Es $IrigidZ $transfTag_B
element elasticBeamColumn 619 16 51 $Arigid $Es $IrigidZ $transfTag_B
element elasticBeamColumn 620 54 17 $Arigid $Es $IrigidZ $transfTag_B
element elasticBeamColumn 621 17 55 $Arigid $Es $IrigidZ $transfTag_B
element elasticBeamColumn 622 81 18 $Arigid $Es $IrigidZ $transfTag_B
element elasticBeamColumn 623 18 82 $Arigid $Es $IrigidZ $transfTag_B
element elasticBeamColumn 624 58 19 $Arigid $Es $IrigidZ $transfTag_B
element elasticBeamColumn 625 20 59 $Arigid $Es $IrigidZ $transfTag_B
element elasticBeamColumn 626 83 21 $Arigid $Es $IrigidZ $transfTag_B
element elasticBeamColumn 627 21 84 $Arigid $Es $IrigidZ $transfTag_B
element elasticBeamColumn 628 62 22 $Arigid $Es $IrigidZ $transfTag_B
element elasticBeamColumn 629 22 63 $Arigid $Es $IrigidZ $transfTag_B
element elasticBeamColumn 630 66 23 $Arigid $Es $IrigidZ $transfTag_B
element elasticBeamColumn 631 23 67 $Arigid $Es $IrigidZ $transfTag_B
element elasticBeamColumn 632 70 24 $Arigid $Es $IrigidZ $transfTag_B
element elasticBeamColumn 633 24 71 $Arigid $Es $IrigidZ $transfTag_B
element elasticBeamColumn 634 85 25 $Arigid $Es $IrigidZ $transfTag_B
element elasticBeamColumn 635 25 86 $Arigid $Es $IrigidZ $transfTag_B
element elasticBeamColumn 636 74 26 $Arigid $Es $IrigidZ $transfTag_B

#columns
#-----------
set Arigid [expr 51.8*10.]; # area of the column multiplied by 10
set IrigidZ [expr 2140.*10]; # Iz of the column multiplied by 10
set IrigidY [expr 838.*10]; # Iy of the column multiplied by 10

# eleID convention: "7xa", 7 = rigid link of columns, x = pier #, a = location of the rigid link
# "a" convention: 1 = bottom; 2 = top;
# comand arguemnts: $eleTag $iNode $jNode $A $E $Iz $transfTag
element elasticBeamColumn 701 1 87 $Arigid $Es $IrigidZ $transfTag_C
element elasticBeamColumn 702 2 88 $Arigid $Es $IrigidZ $transfTag_C
element elasticBeamColumn 703 3 89 $Arigid $Es $IrigidZ $transfTag_C
element elasticBeamColumn 704 4 90 $Arigid $Es $IrigidZ $transfTag_C
element elasticBeamColumn 705 5 91 $Arigid $Es $IrigidZ $transfTag_C
element elasticBeamColumn 706 92 6 $Arigid $Es $IrigidZ $transfTag_C
element elasticBeamColumn 707 93 8 $Arigid $Es $IrigidZ $transfTag_C
element elasticBeamColumn 708 94 9 $Arigid $Es $IrigidZ $transfTag_C
element elasticBeamColumn 709 95 10 $Arigid $Es $IrigidZ $transfTag_C
element elasticBeamColumn 710 96 12 $Arigid $Es $IrigidZ $transfTag_C
element elasticBeamColumn 711 6 97 $Arigid $Es $IrigidZ $transfTag_C
element elasticBeamColumn 712 8 98 $Arigid $Es $IrigidZ $transfTag_C
element elasticBeamColumn 713 9 99 $Arigid $Es $IrigidZ $transfTag_C
element elasticBeamColumn 714 10 100 $Arigid $Es $IrigidZ $transfTag_C
element elasticBeamColumn 715 12 101 $Arigid $Es $IrigidZ $transfTag_C
element elasticBeamColumn 716 102 13 $Arigid $Es $IrigidZ $transfTag_C
element elasticBeamColumn 717 103 15 $Arigid $Es $IrigidZ $transfTag_C
element elasticBeamColumn 718 104 16 $Arigid $Es $IrigidZ $transfTag_C
element elasticBeamColumn 719 105 17 $Arigid $Es $IrigidZ $transfTag_C
element elasticBeamColumn 720 106 19 $Arigid $Es $IrigidZ $transfTag_C
element elasticBeamColumn 721 13 107 $Arigid $Es $IrigidZ $transfTag_C
element elasticBeamColumn 722 15 108 $Arigid $Es $IrigidZ $transfTag_C
element elasticBeamColumn 723 16 109 $Arigid $Es $IrigidZ $transfTag_C
element elasticBeamColumn 724 17 110 $Arigid $Es $IrigidZ $transfTag_C
element elasticBeamColumn 725 19 111 $Arigid $Es $IrigidZ $transfTag_C
element elasticBeamColumn 726 112 20 $Arigid $Es $IrigidZ $transfTag_C
element elasticBeamColumn 727 113 22 $Arigid $Es $IrigidZ $transfTag_C
element elasticBeamColumn 728 114 23 $Arigid $Es $IrigidZ $transfTag_C
element elasticBeamColumn 729 115 24 $Arigid $Es $IrigidZ $transfTag_C
element elasticBeamColumn 730 116 26 $Arigid $Es $IrigidZ $transfTag_C


# ghost trusses to the braces (with very small stiffness) to diminish convergence problems
#------------------------------
set Agt 0.05; #truss area
# braces
for { set i 1 } { $i <= 12 } { incr i} {
element corotTruss [expr 800+$i] [expr 1001+$i*100] [expr 1001+$i*100+$noEle] $Agt $matID_GT
}

# add rigid truss elements to assure that the beam nodes move horizontally together
#--------------------------------------------------------------------------------
set ArigidT 1000.0; # define area of truss section (make much larger than A of frame elements)
# command: element truss $eleID $iNode $jNode $A $materialID
element truss 901 6 7 $ArigidT $matID_RT;
element truss 902 7 8 $ArigidT $matID_RT;
element truss 903 8 9 $ArigidT $matID_RT;
element truss 904 9 10 $ArigidT $matID_RT;
element truss 905 10 11 $ArigidT $matID_RT;
element truss 906 11 12 $ArigidT $matID_RT;
element truss 907 13 14 $ArigidT $matID_RT;
element truss 908 14 15 $ArigidT $matID_RT;
element truss 909 15 16 $ArigidT $matID_RT;
element truss 910 16 17 $ArigidT $matID_RT;
element truss 911 17 18 $ArigidT $matID_RT;
element truss 912 18 19 $ArigidT $matID_RT;
element truss 913 20 21 $ArigidT $matID_RT;
element truss 914 21 22 $ArigidT $matID_RT;
element truss 915 22 23 $ArigidT $matID_RT;
element truss 916 23 24 $ArigidT $matID_RT;
element truss 917 24 25 $ArigidT $matID_RT;
element truss 918 25 26 $ArigidT $matID_RT;

############################################
# Display the model
############################################
recorder display "Model" 10 10 500 500 -wipe
prp 0 0 50
vup 0 1 0
vpn 0 0 1
display 1 2 10

############################################################################
# Gravity Loads & Gravity Analysis
############################################################################

pattern Plain 101 Linear {

# distributed loads
#eleLoad -ele $eleTag1 <$eleTag2 ....> -type -beamUniform $Wz <$Wx>
set MgF [expr $WBay/($WBay-2.*$jOff_beam_m-2.*$jOff_beam_e)]; # magnifying factor to account for the load that cannot be applied on the rigid portions of elements
set dl_F2 [expr -0.09417*$MgF]; # distributed load at Floor 2 & 3
set dl_F4 [expr -0.07917*$MgF]; # distributed load at Floor 4

# Floor 2 loads
eleLoad -ele 201 202 203 204 205 206 -type -beamUniform $dl_F2
# Floor 3 loads
eleLoad -ele 207 208 209 210 211 212 -type -beamUniform $dl_F2
# Floor 4 loads
eleLoad -ele 213 214 215 216 217 218 -type -beamUniform $dl_F4

}
set ViewScale 5;
#DisplayModel3D DeformedShape $ViewScale ; # display deformed shape, the scaling factor needs to be adjusted for each model

# Gravity-analysis: load-controlled static analysis
set Tol 1.0e-6; # convergence tolerance for test
constraints Plain; # how it handles boundary conditions
#constraints Penalty 1.0e15 1.0e15;
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 10; # 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"

############################################################################
# Eigenvalue Analysis
############################################################################
set pi [expr 2.0*asin(1.0)]; # Definition of pi
set nEigenI 1; # mode i = 1
set nEigenJ 3; # mode j = 2
set lambdaN [eigen [expr $nEigenJ]]; # eigenvalue analysis for nEigenJ modes
set lambdaI [lindex $lambdaN [expr 0]]; # eigenvalue mode i = 1
set lambdaJ [lindex $lambdaN [expr $nEigenJ-2]]; # eigenvalue mode j = 2
set w1 [expr pow($lambdaI,0.5)]; # w1 (1st mode circular frequency)
set w2 [expr pow($lambdaJ,0.5)]; # w2 (2nd mode circular frequency)
set T1 [expr 2.0*$pi/$w1]; # 1st mode period of the structure
set T2 [expr 2.0*$pi/$w2]; # 2nd mode period of the structure
puts "T1 = $T1 s"; # display the first mode period in the command window
puts "T2 = $T2 s"; # display the second mode period in the command window

# # Display the first two mode shapes
# #--------------------------------------------
# recorder display "Mode 1" 10 10 500 500 -wipe
# prp 0 0 50
# vup 0 1 0
# vpn 0 0 1
# display -1 2 50

# recorder display "Mode 2" 10 520 500 500 -wipe
# prp 0 0 50
# vup 0 1 0
# vpn 0 0 1
# display -2 2 20

############################################################################
# Pushover Analysis #
############################################################################
if {$analysisType == "pushover"} {
puts "Running Pushover..."
# assign lateral loads and create load pattern: use ASCE 7-10 distribution

pattern Plain 200 Linear {
load 3 0.5 0.0 0.0 ;
load 5 0.5 0.0 0.0 ;
}

# recorde disp at node 3 and reactions at the bottom nodels
recorder Node -file "$dataDir/node3D.out" -time -node 3 -dof 1 disp
recorder Node -file "$dataDir/reactions.out" -time -node 1 2 -dof 1 reaction

# displacement parameters
set IDctrlNode 3; # 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.01*$HStory]; # maximum displacement of pushover
set Dincr [expr $Dmax/1000.]; # displacement increment

# pushover analysis commands
constraints Plain;
numberer RCM;
system BandGeneral;
test NormUnbalance 1.0e-6 10;
algorithm Newton;
integrator DisplacementControl $IDctrlNode $IDctrlDOF $Dincr;
analysis Static;
set ok 0
set currentDisp 0.0
while {$ok == 0 && $currentDisp < $Dmax} {
set ok [analyze 1]
if {$ok != 0} {
test NormDispIncr 1.0e-6 1000 1
algorithm Newton –initial
set ok [analyze 1]
test NormDispIncr 1.0e-6 10
algorithm Newton
}
set currentDisp [nodeDisp $IDctrlNode 1]
}

puts "node3disp: [nodeDisp 3 1], node4disp: [nodeDisp 4 1], node5disp: [nodeDisp 5 1]"
puts "TargetDisp: $Dmax"
}

############################################################################
# Transient Analysis #
############################################################################
if {$analysisType == "dynamic"} {
puts "Running Transient analysis..."
# record drift histories
# drift recorder command: recorder Drift -file $filename -iNode $NodeI_ID -jNode $NodeJ_ID -dof $dof -perpDirn $Record.drift.perpendicular.to.this.direction
recorder Drift -file "$dataDir/$subDir1/Drift1.out" -iNode 1 -jNode 6 -dof 1 -perpDirn 2;
recorder Drift -file "$dataDir/$subDir1/Drift2.out" -iNode 6 -jNode 13 -dof 1 -perpDirn 2;
recorder Drift -file "$dataDir/$subDir1/Drift3.out" -iNode 13 -jNode 20 -dof 1 -perpDirn 2;
# record forces and deformations of columns
recorder Element -xml "$dataDir/$subDir2/Column_Force.out" -time -ele 101 106 111 force
recorder Element -xml "$dataDir/$subDir2/Column_basDef.out" -time -ele 101 106 111 basicDeformation
# record forces and deformations of beams
#recorder Element -xml "$dataDir/$subDir2/Beam_Force.out" -time -ele 21 22 force
#recorder Element -xml "$dataDir/$subDir2/Beam_basDef.out" -time -ele 21 22 basicDeformation
# record reactions
#recorder Node -xml "$dataDir/$subDir2/Reaction.out" -time -node 1 2 -dof 1 2 3 reaction
# record nodal displacements
#recorder Node -xml "$dataDir/$subDir2/dispT.out" -time -node 3 4 5 -dof 1 2 3 disp
# record displacements at the middle nodes of braces
set lst [list [expr 1100+$noEle/2+1] [expr 1500+$noEle/2+1] [expr 1900+$noEle/2+1]]
eval recorder Node -xml "$dataDir/$subDir2/Braces_MN_Disp.out" -time -node $lst -dof 1 2 3 disp
# record section forces and deformation at the middle of the braces
eval recorder Element -xml "$dataDir/$subDir2/Brace_MN_ForceDeformation.out" -time -ele $lst section 1 forceAndDeformation
# record stress-strain of the outer most fiber at the section at the middle of the element
eval recorder Element -xml "$dataDir/$subDir2/Brace_MN_StressStrain37.out" -time -ele $lst section 1 fiber 37 stressStrain
eval recorder Element -xml "$dataDir/$subDir2/Brace_MN_StressStrain55.out" -time -ele $lst section 1 fiber 55 stressStrain
# record basic deformations of the middle brace element
eval recorder Element -xml "$dataDir/$subDir2/Brace_MN_BasicDef.out" -time -ele $lst basicDeformation

source Dynamic.EQ.tcl
}
}

wipe

Thank you for your time and efforts in advance.
fmk
Site Admin
Posts: 5884
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Re: SCBF 2D Analysis - Solver Problem

Post by fmk »

it is a boundary condition or material definition problem and the size of model is going to require that you sort it out yourself.

i would start by changing all materials to Elastic and see if that sorts out the problem.
If not the material, replace the sections with elastic sections.
if not that then fix everything but one node on that top floor and then slowly remove constraints on the top floor one at a time till it fails.
ankitprakashntpc
Posts: 14
Joined: Mon Sep 23, 2013 9:47 pm
Location: Indian Institute of Technology, Delhi

Re: SCBF 2D Analysis - Solver Problem

Post by ankitprakashntpc »

Dear fmk,

Thank you very much for your prompt reply. I've tried all three options suggested but I'm getting the same error message. May be the problem is somewhere else in the script which I'll try to find out.

Meanwhile, I've created another script for 3-storey single bay SCBF frame using Vesna's script. This is running fine but the analysis fails to converge as the fatigue material of braces fails either at pseudo-peak or excessive strain. I've used scaled down ground motion, various sizes of braces and other members, changed tolerance levels but the result is same. Kindly suggest any solution if possible. The script is as posted below:

foreach GP_Model { "RH" "GP" } {
# GP stands for gusset plate connection model based on Uriz report: PEER 2008/08
# RH stands for gusset plate connection model that uses rotational spring based on: Po-Chien Hsiao, Dawn E. Lehman, Charles W. Roeder, (2012), "Improved analytical model for special concentrically braced frames", Journal of Constructional Steel Research 73 (21012) 80-94
###################################################################################################
# Set Up & Source Definition
###################################################################################################
wipe; # clear memory of past model definitions
model BasicBuilder -ndm 2 -ndf 3; # Define the model builder, ndm = #dimension, ndf = #dofs
source WSection.tcl; # procedure for creating standard steel W section
source HSSsection.tcl; # procedure for creating standard steel HSS section
source GPsection.tcl; # procedure for creating gusset plate section

###################################################################################################
# Define Analysis Type and create output folder
###################################################################################################
# Define type of analysis: "pushover" = pushover; "dynamic" = dynamic
set analysisType "dynamic";

if {$analysisType == "pushover"} {
if { $GP_Model == "GP" } {
set dataDir Pushover-Output-GP; # name of output folder
} else {
set dataDir Pushover-Output-RH;
}
file mkdir $dataDir; # create output folder
}
if {$analysisType == "dynamic"} {
if { $GP_Model == "GP" } {
set dataDir Dynamic-Output-GP; # name of output folder
} else {
set dataDir Dynamic-Output-RH;
}
set subDir1 DriftAcceleration
set subDir2 ForceDeformation
file mkdir $dataDir/$subDir1; # create output folder
file mkdir $dataDir/$subDir2;
}

###################################################################################################
# Define Building Geometry, Nodes, and Constraints
###################################################################################################
# define structure-geometry parameters
set WBay 360.; # bay width in inches
set HStory 156.; # 1st story height in inches

# calculate locations frame nodes:
set Pier1 0.0; # leftmost column line
set Pier2 [expr $Pier1 + $WBay];
set Floor1 0.0; # ground floor
set Floor2 [expr $Floor1 + $HStory];
set Floor3 [expr $Floor2 + $HStory];
set Floor4 [expr $Floor3 + $HStory];

# joint offset distance for beams, columns, and braces (from gusset plate geometry)
set jOff_col_b 44.81; # joint offset at the bottom of the column (gusset-plate conection)
set jOff_beam_m 50.56; # joint offset from the middle node of beam (gusset-plate conection)
set jOff_brace_bx 26.2; # joint offset at the bottom of a braces in X direction (from work point to yield line)
set jOff_brace_by 22.7; # joint offset at the bottom of a braces in Y direction (from work point to yield line)
set jOff_brace_tx 31.95; # joint offset at the top of a brace in X direction (from work point to yield line)
set jOff_brace_ty 27.69; # joint offset at the top of a brace in Y direction (from work point to yield line)
set jOff_beam_e 7.61; # joint offset for the beam at its ends (from column centerline to the shear tab hinge line)
set jOff_col_t 13.355; # joint offset for a column at the beam-column conection (Dbeam/2)

# end node ofsets of the braces (from a work point to the beginning of the brace)
set nOff_brace_bx 28.68; # bottom of a brace in X direction
set nOff_brace_by 24.85; # bottom of a brace in X and Y direction
set nOff_brace_tx 34.43; # top of a brace in X direction
set nOff_brace_ty 29.83; # top of a brace in Y direction

# brace effective length, number of elements per brace, and initial imperfection
set PI [expr 2.*asin(1.0)]
set alpha [expr atan(2.*$HStory/$WBay)]
set Leff [expr ($WBay/2.)/cos($alpha)-$nOff_brace_bx/cos($alpha)-$nOff_brace_tx/cos($alpha)]; #effective brace length
set noEle 10; # number of elements per brace
set p_ratio 1000.; #coresponds to 0.05% of the effective length
set p [expr 1./$p_ratio*$Leff]; #imperfection of the brace

# floor masses
set g 386.4; # acceleration due to gravity
set NodalMass2H 33.9; # horizontal mass Floor 2 & 3
set NodalMass2V 3.39; # veritcal mass Floor 2 & 3
set NodalMass4H 28.5; # horizontal mass Floor 4
set NodalMass4V 2.85; # veritcal mass Floor 4

# define nodes and assign masses to beam-column intersections of frame
# command: node nodeID xcoord ycoord -mass mass_dof1 mass_dof2 mass_dof3
node 1 $Pier1 $Floor1;
node 2 $Pier2 $Floor1;
node 3 $Pier1 $Floor2 -mass [expr $NodalMass2H/3.] [expr $NodalMass2V*0.375] 0.0;
node 4 [expr $WBay/2.0] $Floor2 0.0 -mass [expr $NodalMass2H/3.] [expr $NodalMass2V*0.25] 0.0;
node 5 $Pier2 $Floor2 0.0 -mass [expr $NodalMass2H/3.] [expr $NodalMass2V*0.375] 0.0;
node 6 $Pier1 $Floor3 -mass [expr $NodalMass2H/3.] [expr $NodalMass2V*0.375] 0.0;
node 7 [expr $WBay/2.0] $Floor3 0.0 -mass [expr $NodalMass2H/3.] [expr $NodalMass2V*0.25] 0.0;
node 8 $Pier2 $Floor3 0.0 -mass [expr $NodalMass2H/3.] [expr $NodalMass2V*0.375] 0.0;
node 9 $Pier1 $Floor4 -mass [expr $NodalMass4H/3.] [expr $NodalMass4V*0.375] 0.0;
node 10 [expr $WBay/2.0] $Floor4 0.0 -mass [expr $NodalMass4H/3.] [expr $NodalMass4V*0.25] 0.0;
node 100 $Pier2 $Floor4 0.0 -mass [expr $NodalMass4H/3.] [expr $NodalMass4V*0.375] 0.0;


# define extra nodes in the beam
# at shear tabs (pin connection)
node 321 [expr $Pier1+$jOff_beam_e] $Floor2
node 322 [expr $Pier1+$jOff_beam_e] $Floor2
node 521 [expr $Pier2-$jOff_beam_e] $Floor2
node 522 [expr $Pier2-$jOff_beam_e] $Floor2
node 621 [expr $Pier1+$jOff_beam_e] $Floor3
node 622 [expr $Pier1+$jOff_beam_e] $Floor3
node 821 [expr $Pier2-$jOff_beam_e] $Floor3
node 822 [expr $Pier2-$jOff_beam_e] $Floor3
node 921 [expr $Pier1+$jOff_beam_e] $Floor4
node 922 [expr $Pier1+$jOff_beam_e] $Floor4
node 1121 [expr $Pier2-$jOff_beam_e] $Floor4
node 1122 [expr $Pier2-$jOff_beam_e] $Floor4

# at gusset plate conection
node 421 [expr $WBay/2.0-$jOff_beam_m] $Floor2
node 422 [expr $WBay/2.0+$jOff_beam_m] $Floor2
node 721 [expr $WBay/2.0-$jOff_beam_m] $Floor3
node 722 [expr $WBay/2.0+$jOff_beam_m] $Floor3
node 1021 [expr $WBay/2.0-$jOff_beam_m] $Floor4
node 1022 [expr $WBay/2.0+$jOff_beam_m] $Floor4


# define extra nodes in the columns
# nodes above the floor
node 11 $Pier1 [expr $Floor1+$jOff_col_b]
node 21 $Pier2 [expr $Floor1+$jOff_col_b]
node 31 $Pier1 [expr $Floor2+$jOff_col_t]
node 51 $Pier2 [expr $Floor2+$jOff_col_t]
node 61 $Pier1 [expr $Floor3+$jOff_col_t]
node 81 $Pier2 [expr $Floor3+$jOff_col_t]
# nodes below the floor
node 32 $Pier1 [expr $Floor2-$jOff_col_t]
node 52 $Pier2 [expr $Floor2-$jOff_col_t]
node 62 $Pier1 [expr $Floor3-$jOff_col_t]
node 82 $Pier2 [expr $Floor3-$jOff_col_t]
node 92 $Pier1 [expr $Floor4-$jOff_col_t]
node 112 $Pier2 [expr $Floor4-$jOff_col_t]


# define extra nodes for rigid links in the braces:
if { $GP_Model == "GP" } {
node 13 [expr $Pier1+$jOff_brace_bx] [expr $Floor1+$jOff_brace_by]
node 431 [expr $Pier1+$WBay/2.0-$jOff_brace_tx] [expr $Floor2-$jOff_brace_ty]
node 23 [expr $Pier2-$jOff_brace_bx] [expr $Floor1+$jOff_brace_by]
node 432 [expr $Pier2-$WBay/2.0+$jOff_brace_tx] [expr $Floor2-$jOff_brace_ty]
node 33 [expr $Pier1+$jOff_brace_bx] [expr $Floor2+$jOff_brace_by]
node 731 [expr $Pier1+$WBay/2.0-$jOff_brace_tx] [expr $Floor3-$jOff_brace_ty]
node 53 [expr $Pier2-$jOff_brace_bx] [expr $Floor2+$jOff_brace_by]
node 732 [expr $Pier2-$WBay/2.0+$jOff_brace_tx] [expr $Floor3-$jOff_brace_ty]
node 63 [expr $Pier1+$jOff_brace_bx] [expr $Floor3+$jOff_brace_by]
node 1031 [expr $Pier1+$WBay/2.0-$jOff_brace_tx] [expr $Floor4-$jOff_brace_ty]
node 83 [expr $Pier2-$jOff_brace_bx] [expr $Floor3+$jOff_brace_by]
node 1032 [expr $Pier2-$WBay/2.0+$jOff_brace_tx] [expr $Floor4-$jOff_brace_ty]
} else {
node 13 [expr $Pier1+$nOff_brace_bx] [expr $Floor1+$nOff_brace_by]
node 431 [expr $Pier1+$WBay/2.0-$nOff_brace_tx] [expr $Floor2-$nOff_brace_ty]
node 23 [expr $Pier2-$nOff_brace_bx] [expr $Floor1+$nOff_brace_by]
node 432 [expr $Pier2-$WBay/2.0+$nOff_brace_tx] [expr $Floor2-$nOff_brace_ty]
node 33 [expr $Pier1+$nOff_brace_bx] [expr $Floor2+$nOff_brace_by]
node 731 [expr $Pier1+$WBay/2.0-$nOff_brace_tx] [expr $Floor3-$nOff_brace_ty]
node 53 [expr $Pier2-$nOff_brace_bx] [expr $Floor2+$nOff_brace_by]
node 732 [expr $Pier2-$WBay/2.0+$nOff_brace_tx] [expr $Floor3-$nOff_brace_ty]
node 63 [expr $Pier1+$nOff_brace_bx] [expr $Floor3+$nOff_brace_by]
node 1031 [expr $Pier1+$WBay/2.0-$nOff_brace_tx] [expr $Floor4-$nOff_brace_ty]
node 83 [expr $Pier2-$nOff_brace_bx] [expr $Floor3+$nOff_brace_by]
node 1032 [expr $Pier2-$WBay/2.0+$nOff_brace_tx] [expr $Floor4-$nOff_brace_ty]
}

# define extra nodes along the braces:
#----------------------------------------------
# nodeID convention: "3acd" where and a = brace number
# "a" convention: odd = left; even = right;
# cd = node numbering for the brace (can be between 1 and 99)

# nodes of the left brace of storey 1
# puts "brace 11"
set orient "pos"
set shift 3100
set Xi [expr $Pier1+$nOff_brace_bx]; # x coordinate of node 3101
set Yi [expr $Floor1+$nOff_brace_by]; # y coordinate of node 3101
set eleL [expr $Leff/$noEle]
for { set i 1 } { $i <= [expr $noEle+1] } { incr i} {
#local coordinates
set xm [expr $eleL*($i-1)]
set ym [expr 4.*$p/$Leff*$xm*(1.-$xm/$Leff)];
#global coordinates
if {$orient == "pos"} {
set Xm [expr $Xi+cos($alpha)*$xm-sin($alpha)*$ym];
set Ym [expr $Yi+sin($alpha)*$xm+cos($alpha)*$ym];
} else {
set Xm [expr $Xi-cos($alpha)*$xm-sin($alpha)*$ym];
set Ym [expr $Yi+sin($alpha)*$xm-cos($alpha)*$ym];
}
if { $i == [expr $noEle+1] } {
set Xm [expr $Pier1+$WBay/2.0-$nOff_brace_tx]; # x coordinate of the last node
set Ym [expr $Floor2-$nOff_brace_ty]; # y coordinate of the last node
}
#define nodes
node [expr $shift+$i] $Xm $Ym
#puts "node: [expr $shift+$i] $Xm $Ym $Zm"
}

# nodes of the right brace of storey 1
# puts "brace 12"
set orient "neg"
set shift 3200
set Xi [expr $Pier2-$nOff_brace_bx]; # x coordinate of node 3201
set Yi [expr $Floor1+$nOff_brace_by]; # y coordinate of node 3201
for { set i 1 } { $i <= [expr $noEle+1] } { incr i} {
#local coordinates
set xm [expr $eleL*($i-1)]
set ym [expr 4.*$p/$Leff*$xm*(1.-$xm/$Leff)];
#global coordinates
if {$orient == "pos"} {
set Xm [expr $Xi+cos($alpha)*$xm-sin($alpha)*$ym];
set Ym [expr $Yi+sin($alpha)*$xm+cos($alpha)*$ym];
} else {
set Xm [expr $Xi-cos($alpha)*$xm-sin($alpha)*$ym];
set Ym [expr $Yi+sin($alpha)*$xm-cos($alpha)*$ym];
}
if { $i == [expr $noEle+1] } {
set Xm [expr $Pier2-$WBay/2.0+$nOff_brace_tx]; # x coordinate of the last node
set Ym [expr $Floor2-$nOff_brace_ty]; # y coordinate of of the last node
}
#define nodes
node [expr $shift+$i] $Xm $Ym
#puts "node: [expr $shift+$i] $Xm $Ym $Zm"
}

# nodes of the left brace of storey 2
# puts "brace 21"
set orient "pos"
set shift 3300
set Xi [expr $Pier1+$nOff_brace_bx]; # x coordinate of node 3301
set Yi [expr $Floor2+$nOff_brace_by]; # y coordinate of node 3301
set eleL [expr $Leff/$noEle]
for { set i 1 } { $i <= [expr $noEle+1] } { incr i} {
#local coordinates
set xm [expr $eleL*($i-1)]
set ym [expr 4.*$p/$Leff*$xm*(1.-$xm/$Leff)];
#global coordinates
if {$orient == "pos"} {
set Xm [expr $Xi+cos($alpha)*$xm-sin($alpha)*$ym];
set Ym [expr $Yi+sin($alpha)*$xm+cos($alpha)*$ym];
} else {
set Xm [expr $Xi-cos($alpha)*$xm-sin($alpha)*$ym];
set Ym [expr $Yi+sin($alpha)*$xm-cos($alpha)*$ym];
}
if { $i == [expr $noEle+1] } {
set Xm [expr $Pier1+$WBay/2.0-$nOff_brace_tx]; # x coordinate of the last node
set Ym [expr $Floor3-$nOff_brace_ty]; # y coordinate of the last node
}
#define nodes
node [expr $shift+$i] $Xm $Ym
#puts "node: [expr $shift+$i] $Xm $Ym $Zm"
}

# nodes of the right brace of storey 2
# puts "brace 22"
set orient "neg"
set shift 3400
set Xi [expr $Pier2-$nOff_brace_bx]; # x coordinate of node 3401
set Yi [expr $Floor2+$nOff_brace_by]; # y coordinate of node 3401
for { set i 1 } { $i <= [expr $noEle+1] } { incr i} {
#local coordinates
set xm [expr $eleL*($i-1)]
set ym [expr 4.*$p/$Leff*$xm*(1.-$xm/$Leff)];
#global coordinates
if {$orient == "pos"} {
set Xm [expr $Xi+cos($alpha)*$xm-sin($alpha)*$ym];
set Ym [expr $Yi+sin($alpha)*$xm+cos($alpha)*$ym];
} else {
set Xm [expr $Xi-cos($alpha)*$xm-sin($alpha)*$ym];
set Ym [expr $Yi+sin($alpha)*$xm-cos($alpha)*$ym];
}
if { $i == [expr $noEle+1] } {
set Xm [expr $Pier2-$WBay/2.0+$nOff_brace_tx]; # x coordinate of the last node
set Ym [expr $Floor3-$nOff_brace_ty]; # y coordinate of of the last node
}
#define nodes
node [expr $shift+$i] $Xm $Ym
#puts "node: [expr $shift+$i] $Xm $Ym $Zm"
}

# nodes of the left brace of storey 3
# puts "brace 31"
set orient "pos"
set shift 3500
set Xi [expr $Pier1+$nOff_brace_bx]; # x coordinate of node 3501
set Yi [expr $Floor3+$nOff_brace_by]; # y coordinate of node 3501
set eleL [expr $Leff/$noEle]
for { set i 1 } { $i <= [expr $noEle+1] } { incr i} {
#local coordinates
set xm [expr $eleL*($i-1)]
set ym [expr 4.*$p/$Leff*$xm*(1.-$xm/$Leff)];
#global coordinates
if {$orient == "pos"} {
set Xm [expr $Xi+cos($alpha)*$xm-sin($alpha)*$ym];
set Ym [expr $Yi+sin($alpha)*$xm+cos($alpha)*$ym];
} else {
set Xm [expr $Xi-cos($alpha)*$xm-sin($alpha)*$ym];
set Ym [expr $Yi+sin($alpha)*$xm-cos($alpha)*$ym];
}
if { $i == [expr $noEle+1] } {
set Xm [expr $Pier1+$WBay/2.0-$nOff_brace_tx]; # x coordinate of the last node
set Ym [expr $Floor4-$nOff_brace_ty]; # y coordinate of the last node
}
#define nodes
node [expr $shift+$i] $Xm $Ym
#puts "node: [expr $shift+$i] $Xm $Ym $Zm"
}

# nodes of the right brace of storey 3
# puts "brace 32"
set orient "neg"
set shift 3600
set Xi [expr $Pier2-$nOff_brace_bx]; # x coordinate of node 3601
set Yi [expr $Floor3+$nOff_brace_by]; # y coordinate of node 3601
for { set i 1 } { $i <= [expr $noEle+1] } { incr i} {
#local coordinates
set xm [expr $eleL*($i-1)]
set ym [expr 4.*$p/$Leff*$xm*(1.-$xm/$Leff)];
#global coordinates
if {$orient == "pos"} {
set Xm [expr $Xi+cos($alpha)*$xm-sin($alpha)*$ym];
set Ym [expr $Yi+sin($alpha)*$xm+cos($alpha)*$ym];
} else {
set Xm [expr $Xi-cos($alpha)*$xm-sin($alpha)*$ym];
set Ym [expr $Yi+sin($alpha)*$xm-cos($alpha)*$ym];
}
if { $i == [expr $noEle+1] } {
set Xm [expr $Pier2-$WBay/2.0+$nOff_brace_tx]; # x coordinate of the last node
set Ym [expr $Floor4-$nOff_brace_ty]; # y coordinate of of the last node
}
#define nodes
node [expr $shift+$i] $Xm $Ym
#puts "node: [expr $shift+$i] $Xm $Ym $Zm"
}

# assign boundary conditions
#-------------------------------------------------------
# command: fix nodeID dxFixity dyFixity rzFixity
# fixity values: 1 = constrained; 0 = unconstrained

# fix the base of the frame;
fix 1 1 1 1
fix 2 1 1 1

# define constraints for pined beam-to-column connection
equalDOF 322 321 1 2
equalDOF 522 521 1 2
equalDOF 622 621 1 2
equalDOF 822 821 1 2
equalDOF 922 921 1 2
equalDOF 1122 1121 1 2


# define constraints for zeroLength elements used to model rotational hinge
if { $GP_Model == "RH" } {
equalDOF 13 3101 1 2
equalDOF 23 3201 1 2
equalDOF 431 [expr 3101+$noEle] 1 2
equalDOF 432 [expr 3201+$noEle] 1 2
equalDOF 33 3301 1 2
equalDOF 53 3401 1 2
equalDOF 731 [expr 3301+$noEle] 1 2
equalDOF 732 [expr 3401+$noEle] 1 2
equalDOF 63 3501 1 2
equalDOF 83 3601 1 2
equalDOF 1031 [expr 3501+$noEle] 1 2
equalDOF 1032 [expr 3601+$noEle] 1 2
}

###################################################################################################
# Define Materials and Sections
###################################################################################################

# define material for nonlinear beams and columns
set matID_BC 1
set matID_fatBC 2
set Es 29000.0; # modulus of elasticity for steel
set Fy 50.0; # yield stress of steel
set b 0.003; # strain hardening ratio
uniaxialMaterial Steel02 $matID_BC $Fy $Es $b 20 0.925 0.15 0.0005 0.01 0.0005 0.01
uniaxialMaterial Fatigue $matID_fatBC $matID_BC


# define material for braces
set matID_Brace 3
set matID_fatBrace 4
set Fy_b 46.0; # yield stress of steel
set E0 0.095
set m -0.5
uniaxialMaterial Steel02 $matID_Brace $Fy_b $Es $b 20 0.925 0.15 0.0005 0.01 0.0005 0.01
uniaxialMaterial Fatigue $matID_fatBrace $matID_Brace -E0 $E0 -m $m -min -1.0 -max 0.04
#uniaxialMaterial Fatigue $matID_fatBrace $matID_Brace -E0 $E0 -m $m

# define material for gusset plates
# GP_Model == GP
set matID_GP 5
set Fy_gp 50.0
uniaxialMaterial Steel02 $matID_GP $Fy_gp $Es $b 20 0.925 0.15 0.0005 0.01 0.0005 0.01
# GP_Model == RH
# rotational hinge (dir 6)
set matID_RHb 11
set matID_RHt 12
set My_b 772.
set My_t 772.
set Krot_b 18045.12
set Krot_t 15571.02
set b 0.01
uniaxialMaterial Steel02 $matID_RHb $My_b $Krot_b $b 20 0.925 0.15 0.0005 0.01 0.0005 0.01
uniaxialMaterial Steel02 $matID_RHt $My_t $Krot_t $b 20 0.925 0.15 0.0005 0.01 0.0005 0.01

# define material for ghost truss
set matID_GT 6
uniaxialMaterial Elastic $matID_GT 100.0

# define material for rigid truss elements
set matID_RT 7
uniaxialMaterial Elastic $matID_RT $Es

# define sections
#-----------------
set secTagC 10
set secTagB1 21
set secTagB2 22
set secTagB3 23
set secTagBr1 31
set secTagBr2 32
set secTagBr3 33
set secTagGPb 40
set secTagGPt 50

# command: WSection secID matID d bf tf tw nfdw nftw nfbf nftf
# column: W12x96
WSection $secTagC $matID_fatBC 12.7 12.2 0.9 0.55 8 1 1 4
# Floor 2 beam: W33x263
WSection $secTagB1 $matID_fatBC 34.5 15.8 1.57 0.87 8 1 1 4
# Floor 3 beam: W33x221
WSection $secTagB2 $matID_fatBC 33.9 15.8 1.28 0.775 8 1 1 4
# Floor 4 beam: W33x201
WSection $secTagB3 $matID_fatBC 33.7 15.7 1.15 0.715 8 1 1 4

# define sections for braces
# command: HSSsection secID matID d t nfdy nfty nfdz nftz
# Storey 1 Brace: HSS14x14x5/16
HSSsection $secTagBr1 $matID_fatBrace 4. 0.3125 5 4 5 2
# Storey 2 Brace: HSS12x12x5/8
HSSsection $secTagBr2 $matID_fatBrace 2. 0.625 5 4 5 2
# Storey 3 Brace: HSS8x8x3/8
HSSsection $secTagBr3 $matID_fatBrace 8. 0.375 5 4 5 2

# define sections for gusset plates
# command: GPsection secID matID d t nfd nft
# bottom of the brace
GPsection $secTagGPb $matID_GP 49. 1.375 8 1
# top of the brace
GPsection $secTagGPt $matID_GP 49. 1.375 8 1

###################################################################################################
# Define Geometric Transformation
###################################################################################################
set transfTag_C 1
set transfTag_Brace 2
set transfTag_B 3

# rigid links of columns; columns
geomTransf PDelta $transfTag_C

# braces, gusset plates
geomTransf Corotational $transfTag_Brace

# beams
geomTransf PDelta $transfTag_B

###################################################################################################
# Define Elements
###################################################################################################

set tol 1.e-8
set maxIter 10

# define columns of a braced frame:
#----------------------------------
# eleID convention: "1x", 1 = column, x=Pier #
# command arguments: $eleID $iNode $jNode $numIntgrPts $secTag $transfTag
element forceBeamColumn 11 11 32 4 $secTagC $transfTag_C -iter $maxIter $tol
element forceBeamColumn 12 21 52 4 $secTagC $transfTag_C -iter $maxIter $tol
element forceBeamColumn 13 31 62 4 $secTagC $transfTag_C -iter $maxIter $tol
element forceBeamColumn 14 51 82 4 $secTagC $transfTag_C -iter $maxIter $tol
element forceBeamColumn 15 61 92 4 $secTagC $transfTag_C -iter $maxIter $tol
element forceBeamColumn 16 81 112 4 $secTagC $transfTag_C -iter $maxIter $tol



# define beams of a braced frame:
#--------------------------------
# eleID convention: "2a", 2 = beam, a = beam #
# "a" convention: odd = left; even = right;
# command arguments: $eleID $iNode $jNode $numIntgrPts $secTag $transfTag
element forceBeamColumn 21 322 421 3 $secTagB1 $transfTag_B -iter $maxIter $tol
element forceBeamColumn 22 422 522 3 $secTagB1 $transfTag_B -iter $maxIter $tol
element forceBeamColumn 23 622 721 3 $secTagB2 $transfTag_B -iter $maxIter $tol
element forceBeamColumn 24 722 822 3 $secTagB2 $transfTag_B -iter $maxIter $tol
element forceBeamColumn 25 922 1021 3 $secTagB3 $transfTag_B -iter $maxIter $tol
element forceBeamColumn 26 1022 1122 3 $secTagB3 $transfTag_B -iter $maxIter $tol

# define braces:
#----------------
# eleID convention: "3acd", 3 = brace, a = brace #
# "a" convention: odd = left brace; even = right brace;
# cd = element numbering for the brace (can be between 1 and 99)
# command arguments: $eleID $iNode $jNode $numIntgrPts $secTag $transfTag
set NIP 3

# storey 1 - left brace
set shift 3100
for { set i 1 } { $i <= [expr $noEle] } { incr i} {
element forceBeamColumn [expr $shift+$i] [expr $shift+$i] [expr $shift+$i+1] $NIP $secTagBr1 $transfTag_Brace -iter $maxIter $tol
}

# storey 1 - right brace
set shift 3200
for { set i 1 } { $i <= [expr $noEle] } { incr i} {
element forceBeamColumn [expr $shift+$i] [expr $shift+$i] [expr $shift+$i+1] $NIP $secTagBr1 $transfTag_Brace -iter $maxIter $tol
}

# storey 2 - left brace
set shift 3300
for { set i 1 } { $i <= [expr $noEle] } { incr i} {
element forceBeamColumn [expr $shift+$i] [expr $shift+$i] [expr $shift+$i+1] $NIP $secTagBr2 $transfTag_Brace -iter $maxIter $tol
}

# storey 2 - right brace
set shift 3400
for { set i 1 } { $i <= [expr $noEle] } { incr i} {
element forceBeamColumn [expr $shift+$i] [expr $shift+$i] [expr $shift+$i+1] $NIP $secTagBr2 $transfTag_Brace -iter $maxIter $tol
}

# storey 3 - left brace
set shift 3500
for { set i 1 } { $i <= [expr $noEle] } { incr i} {
element forceBeamColumn [expr $shift+$i] [expr $shift+$i] [expr $shift+$i+1] $NIP $secTagBr3 $transfTag_Brace -iter $maxIter $tol
}

# storey 3 - right brace
set shift 3600
for { set i 1 } { $i <= [expr $noEle] } { incr i} {
element forceBeamColumn [expr $shift+$i] [expr $shift+$i] [expr $shift+$i+1] $NIP $secTagBr3 $transfTag_Brace -iter $maxIter $tol
}

# define gusset plates:
#----------------------
if { $GP_Model == "GP" } {
# eleID convention: "4ab", 4 = gusset plate, a = brace #, b = location of the gusset plate
# "a" convention: odd = left brace; even = right brace;
# "b" convention: 1 = bottom; 2 = top
# command arguments: $eleID $iNode $jNode $numIntgrPts $secTag $transfTag
set NIP 2
# Storey 1, left brace
set shift 3100
element forceBeamColumn 411 13 [expr $shift+1] $NIP $secTagGPb $transfTag_Brace
element forceBeamColumn 412 [expr $shift+$noEle+1] 431 $NIP $secTagGPt $transfTag_Brace
# Storey 1, right brace
set shift 3200
element forceBeamColumn 421 23 [expr $shift+1] $NIP $secTagGPb $transfTag_Brace
element forceBeamColumn 422 [expr $shift+$noEle+1] 432 $NIP $secTagGPt $transfTag_Brace
# Storey 2, left brace
set shift 3300
element forceBeamColumn 431 33 [expr $shift+1] $NIP $secTagGPb $transfTag_Brace
element forceBeamColumn 432 [expr $shift+$noEle+1] 731 $NIP $secTagGPt $transfTag_Brace
# Storey 2, right brace
set shift 3400
element forceBeamColumn 441 53 [expr $shift+1] $NIP $secTagGPb $transfTag_Brace
element forceBeamColumn 442 [expr $shift+$noEle+1] 732 $NIP $secTagGPt $transfTag_Brace
# Storey 3, left brace
set shift 3500
element forceBeamColumn 451 63 [expr $shift+1] $NIP $secTagGPb $transfTag_Brace
element forceBeamColumn 452 [expr $shift+$noEle+1] 1031 $NIP $secTagGPt $transfTag_Brace
# Storey 3, right brace
set shift 3600
element forceBeamColumn 461 83 [expr $shift+1] $NIP $secTagGPb $transfTag_Brace
element forceBeamColumn 462 [expr $shift+$noEle+1] 1032 $NIP $secTagGPt $transfTag_Brace
} else {
# command arguemnts: $eleTag $iNode $jNode -mat $matTag1 $matTag2 ... -dir $dir1 $dir2
# Storey 1, left brace
set shift 3100
element zeroLength 411 13 [expr $shift+1] -mat $matID_RHb -dir 6
element zeroLength 412 [expr $shift+$noEle+1] 431 -mat $matID_RHt -dir 6
#Storey 1, right brace
set shift 3200
element zeroLength 421 23 [expr $shift+1] -mat $matID_RHb -dir 6
element zeroLength 422 [expr $shift+$noEle+1] 432 -mat $matID_RHt -dir 6
# Storey 2, left brace
set shift 3300
element zeroLength 431 33 [expr $shift+1] -mat $matID_RHb -dir 6
element zeroLength 432 [expr $shift+$noEle+1] 731 -mat $matID_RHt -dir 6
#Storey 2, right brace
set shift 3400
element zeroLength 441 53 [expr $shift+1] -mat $matID_RHb -dir 6
element zeroLength 442 [expr $shift+$noEle+1] 732 -mat $matID_RHt -dir 6
# Storey 3, left brace
set shift 3500
element zeroLength 451 63 [expr $shift+1] -mat $matID_RHb -dir 6
element zeroLength 452 [expr $shift+$noEle+1] 1031 -mat $matID_RHt -dir 6
#Storey 3, right brace
set shift 3600
element zeroLength 461 83 [expr $shift+1] -mat $matID_RHb -dir 6
element zeroLength 462 [expr $shift+$noEle+1] 1032 -mat $matID_RHt -dir 6

}

# define rigid links:
#-----------------------
set Jrigid 1.0e4
set G [expr $Es/2.0/(1+0.3)]

#braces
#-----------
set Arigid [expr 25.7*10.]; # area of the brace multiplied by 10
set Irigid [expr 548.*10]; # I of the brace multiplied by 10
# eleID convention: "5xa", 5 = rigid link for braces, x = brace #, a = location of the rigid link
# "a" convention: 1 = bottom; 2 = top;
# comand arguemnts: $eleTag $iNode $jNode $A $E $Iy $transfTag
element elasticBeamColumn 511 1 13 $Arigid $Es $Irigid $transfTag_Brace
element elasticBeamColumn 512 431 4 $Arigid $Es $Irigid $transfTag_Brace
element elasticBeamColumn 521 2 23 $Arigid $Es $Irigid $transfTag_Brace
element elasticBeamColumn 522 432 4 $Arigid $Es $Irigid $transfTag_Brace
element elasticBeamColumn 531 3 33 $Arigid $Es $Irigid $transfTag_Brace
element elasticBeamColumn 532 731 7 $Arigid $Es $Irigid $transfTag_Brace
element elasticBeamColumn 541 5 53 $Arigid $Es $Irigid $transfTag_Brace
element elasticBeamColumn 542 732 7 $Arigid $Es $Irigid $transfTag_Brace
element elasticBeamColumn 551 6 63 $Arigid $Es $Irigid $transfTag_Brace
element elasticBeamColumn 552 1031 10 $Arigid $Es $Irigid $transfTag_Brace
element elasticBeamColumn 561 8 83 $Arigid $Es $Irigid $transfTag_Brace
element elasticBeamColumn 562 1032 10 $Arigid $Es $Irigid $transfTag_Brace

#beams
#-----------
set Arigid [expr 24.7*10.]; # area of the beam multiplied by 10
set IrigidZ [expr 2850.*10]; # Iz of the beam multiplied by 10
set IrigidY [expr 106.*10]; # Iy of the beam multiplied by 10

# eleID convention: "6xa", 6 = rigid link of beams, x = beam #, a = location of the rigid link
# "a" convention: 1 = left; 2 = right;
# comand arguemnts: $eleTag $iNode $jNode $A $E $Iz $transfTag
element elasticBeamColumn 611 3 321 $Arigid $Es $IrigidZ $transfTag_B
element elasticBeamColumn 622 521 5 $Arigid $Es $IrigidZ $transfTag_B
element elasticBeamColumn 612 421 4 $Arigid $Es $IrigidZ $transfTag_B
element elasticBeamColumn 621 4 422 $Arigid $Es $IrigidZ $transfTag_B
element elasticBeamColumn 631 6 621 $Arigid $Es $IrigidZ $transfTag_B
element elasticBeamColumn 642 821 8 $Arigid $Es $IrigidZ $transfTag_B
element elasticBeamColumn 632 721 7 $Arigid $Es $IrigidZ $transfTag_B
element elasticBeamColumn 641 7 722 $Arigid $Es $IrigidZ $transfTag_B
element elasticBeamColumn 651 9 921 $Arigid $Es $IrigidZ $transfTag_B
element elasticBeamColumn 662 1121 100 $Arigid $Es $IrigidZ $transfTag_B
element elasticBeamColumn 652 1021 10 $Arigid $Es $IrigidZ $transfTag_B
element elasticBeamColumn 661 10 1022 $Arigid $Es $IrigidZ $transfTag_B

#columns
#-----------
set Arigid [expr 51.8*10.]; # area of the column multiplied by 10
set IrigidZ [expr 2140.*10]; # Iz of the column multiplied by 10
set IrigidY [expr 838.*10]; # Iy of the column multiplied by 10

# eleID convention: "7xa", 7 = rigid link of columns, x = pier #, a = location of the rigid link
# "a" convention: 1 = bottom; 2 = top;
# comand arguemnts: $eleTag $iNode $jNode $A $E $Iz $transfTag
element elasticBeamColumn 711 1 11 $Arigid $Es $IrigidZ $transfTag_C
element elasticBeamColumn 712 32 3 $Arigid $Es $IrigidZ $transfTag_C
element elasticBeamColumn 721 2 21 $Arigid $Es $IrigidZ $transfTag_C
element elasticBeamColumn 722 52 5 $Arigid $Es $IrigidZ $transfTag_C
element elasticBeamColumn 731 3 31 $Arigid $Es $IrigidZ $transfTag_C
element elasticBeamColumn 732 62 6 $Arigid $Es $IrigidZ $transfTag_C
element elasticBeamColumn 741 5 51 $Arigid $Es $IrigidZ $transfTag_C
element elasticBeamColumn 742 82 8 $Arigid $Es $IrigidZ $transfTag_C
element elasticBeamColumn 751 6 61 $Arigid $Es $IrigidZ $transfTag_C
element elasticBeamColumn 752 92 9 $Arigid $Es $IrigidZ $transfTag_C
element elasticBeamColumn 761 8 81 $Arigid $Es $IrigidZ $transfTag_C
element elasticBeamColumn 762 112 100 $Arigid $Es $IrigidZ $transfTag_C


# ghost trusses to the braces (with very small stiffness) to diminish convergence problems
#------------------------------
set Agt 0.05; #truss area
# braces
element corotTruss 81 3101 [expr 3101+$noEle] $Agt $matID_GT
element corotTruss 82 3201 [expr 3201+$noEle] $Agt $matID_GT
element corotTruss 83 3301 [expr 3301+$noEle] $Agt $matID_GT
element corotTruss 84 3401 [expr 3401+$noEle] $Agt $matID_GT
element corotTruss 85 3501 [expr 3501+$noEle] $Agt $matID_GT
element corotTruss 86 3601 [expr 3601+$noEle] $Agt $matID_GT

# add rigid truss elemnts to assure that the beam nodes move horizontaly together
#--------------------------------------------------------------------------------
set ArigidT 1000.0; # define area of truss section (make much larger than A of frame elements)
# command: element truss $eleID $iNode $jNode $A $materialID
element truss 91 3 4 $ArigidT $matID_RT;
element truss 92 4 5 $ArigidT $matID_RT;
element truss 93 6 7 $ArigidT $matID_RT;
element truss 94 7 8 $ArigidT $matID_RT;
element truss 95 9 10 $ArigidT $matID_RT;
element truss 96 10 100 $ArigidT $matID_RT;

############################################
# Display the model
############################################
recorder display "Model" 10 10 1000 1000 -wipe
prp 0 0 50
vup 0 1 0
vpn 0 0 1
display 1 2 10

############################################################################
# Gravity Loads & Gravity Analysis
############################################################################

pattern Plain 101 Linear {

# distributed loads
#eleLoad -ele $eleTag1 <$eleTag2 ....> -type -beamUniform $Wz <$Wx>
set MgF [expr $WBay/($WBay-2.*$jOff_beam_m-2.*$jOff_beam_e)]; # magnifying factor to accont for the load that can not be applied on the rigid portions of elements
set dl_F2 [expr -0.09417*$MgF]; # distributed load at Floor 2 & 3
set dl_F4 [expr -0.07917*$MgF]; # distributed load at Floor 4

# Floor 2 loads
eleLoad -ele 21 22 23 24 -type -beamUniform $dl_F2
# Floor 2 loads
eleLoad -ele 25 26 -type -beamUniform $dl_F4

}
set ViewScale 5;
#DisplayModel3D DeformedShape $ViewScale ; # display deformed shape, the scaling factor needs to be adjusted for each model

# Gravity-analysis: load-controlled static analysis
set Tol 1.0e-6; # convergence tolerance for test
constraints Plain; # how it handles boundary conditions
#constraints Penalty 1.0e15 1.0e15;
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 10; # 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"

############################################################################
# Eigenvalue Analysis
############################################################################
set pi [expr 2.0*asin(1.0)]; # Definition of pi
set nEigenI 1; # mode i = 1
set nEigenJ 3; # mode j = 2
set lambdaN [eigen [expr $nEigenJ]]; # eigenvalue analysis for nEigenJ modes
set lambdaI [lindex $lambdaN [expr 0]]; # eigenvalue mode i = 1
set lambdaJ [lindex $lambdaN [expr $nEigenJ-2]]; # eigenvalue mode j = 2
set w1 [expr pow($lambdaI,0.5)]; # w1 (1st mode circular frequency)
set w2 [expr pow($lambdaJ,0.5)]; # w2 (2nd mode circular frequency)
set T1 [expr 2.0*$pi/$w1]; # 1st mode period of the structure
set T2 [expr 2.0*$pi/$w2]; # 2nd mode period of the structure
puts "T1 = $T1 s"; # display the first mode period in the command window
puts "T2 = $T2 s"; # display the second mode period in the command window

# # Display the first two mode shapes
# #--------------------------------------------
# recorder display "Mode 1" 10 10 500 500 -wipe
# prp 0 0 50
# vup 0 1 0
# vpn 0 0 1
# display -1 2 50

# recorder display "Mode 2" 10 520 500 500 -wipe
# prp 0 0 50
# vup 0 1 0
# vpn 0 0 1
# display -2 2 20

############################################################################
# Pushover Analysis #
############################################################################
if {$analysisType == "pushover"} {
puts "Running Pushover..."
# assign lateral loads and create load pattern: use ASCE 7-10 distribution

pattern Plain 200 Linear {
load 3 0.5 0.0 0.0 ;
load 5 0.5 0.0 0.0 ;
}

# recorde disp at node 3 and reactions at the bottom nodels
recorder Node -file "$dataDir/node3D.out" -time -node 3 -dof 1 disp
recorder Node -file "$dataDir/reactions.out" -time -node 1 2 -dof 1 reaction

# displacement parameters
set IDctrlNode 3; # 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.01*$HStory]; # maximum displacement of pushover
set Dincr [expr $Dmax/1000.]; # displacement increment

# pushover analysis commands
constraints Plain;
numberer RCM;
system BandGeneral;
test NormUnbalance 1.0e-6 10;
algorithm Newton;
integrator DisplacementControl $IDctrlNode $IDctrlDOF $Dincr;
analysis Static;
set ok 0
set currentDisp 0.0
while {$ok == 0 && $currentDisp < $Dmax} {
set ok [analyze 1]
if {$ok != 0} {
test NormDispIncr 1.0e-6 1000 1
algorithm Newton –initial
set ok [analyze 1]
test NormDispIncr 1.0e-6 10
algorithm Newton
}
set currentDisp [nodeDisp $IDctrlNode 1]
}

puts "node3disp: [nodeDisp 3 1], node4disp: [nodeDisp 4 1], node5disp: [nodeDisp 5 1]"
puts "TargetDisp: $Dmax"
}

############################################################################
# Transient Analysis #
############################################################################
if {$analysisType == "dynamic"} {
puts "Running Transient analysis..."
# record drift histories
# drift recorder command: recorder Drift -file $filename -iNode $NodeI_ID -jNode $NodeJ_ID -dof $dof -perpDirn $Record.drift.perpendicular.to.this.direction
recorder Drift -file "$dataDir/$subDir1/Drift1.out" -iNode 1 -jNode 3 -dof 1 -perpDirn 2;
recorder Drift -file "$dataDir/$subDir1/Drift2.out" -iNode 3 -jNode 6 -dof 1 -perpDirn 2;
recorder Drift -file "$dataDir/$subDir1/Drift3.out" -iNode 6 -jNode 9 -dof 1 -perpDirn 2;
# record forces and deformations of columns
recorder Element -xml "$dataDir/$subDir2/Column_Force.out" -time -ele 11 13 15 force
#recorder Element -xml "$dataDir/$subDir2/Column_basDef.out" -time -ele 11 12 basicDeformation
# record forces and deformations of beams
#recorder Element -xml "$dataDir/$subDir2/Beam_Force.out" -time -ele 21 22 force
#recorder Element -xml "$dataDir/$subDir2/Beam_basDef.out" -time -ele 21 22 basicDeformation
# record reactions
#recorder Node -xml "$dataDir/$subDir2/Reaction.out" -time -node 1 2 -dof 1 2 3 reaction
# record nodal displacements
recorder Node -xml "$dataDir/$subDir2/dispT.out" -time -node 3 6 9 -dof 1 2 3 disp
# record displacements at the middle nodes of braces
#set lst [list [expr 3100+$noEle/2+1] [expr 3200+$noEle/2+1]]
# eval recorder Node -xml "$dataDir/$subDir2/Braces_MN_Disp.out" -time -node $lst -dof 1 2 3 disp
# record section forces and deformation at the middle of the braces
# eval recorder Element -xml "$dataDir/$subDir2/Brace_MN_ForceDeformation.out" -time -ele $lst section 1 forceAndDeformation
# record stress-strain of the outer most fiber at the section at the middle of the element
# eval recorder Element -xml "$dataDir/$subDir2/Brace_MN_StressStrain37.out" -time -ele $lst section 1 fiber 37 stressStrain
# eval recorder Element -xml "$dataDir/$subDir2/Brace_MN_StressStrain55.out" -time -ele $lst section 1 fiber 55 stressStrain
# record basic deformations of the middle brace element
# eval recorder Element -xml "$dataDir/$subDir2/Brace_MN_BasicDef.out" -time -ele $lst basicDeformation

source Dynamic.EQ.tcl
}


}

wipe
fmk
Site Admin
Posts: 5884
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Re: SCBF 2D Analysis - Solver Problem

Post by fmk »

either boundary conditions or material properties are wrong .. start with a small model and build up .. or fix everything and then start releasing dof until you find the error.
kavir
Posts: 65
Joined: Thu Dec 19, 2013 6:47 am
Location: ghayen - Iran

Re: SCBF 2D Analysis - Solver Problem

Post by kavir »

Hi sir fmk
in script of Vesna about SCBF frame and in part define gusset plate section you can see command is :
command: GPsection secID matID d t nfd nft
as you can see after secID and matID first input d ( depth along local y ) and after input thickness. but in script first input thickness and after input d ????????

GPsection $secTagGPb $matID_GP 1.375 49. 8 1

help me about this?
ablarence
Posts: 3
Joined: Tue Jan 21, 2014 4:56 pm
Location: Carleton University

Re: SCBF 2D Analysis - Solver Problem

Post by ablarence »

Hi Kavir,
Were you able to fix any of the issues you faced with this code?
If you did kindly let me on the solution since I am facing similar issues
Thanks
kavir
Posts: 65
Joined: Thu Dec 19, 2013 6:47 am
Location: ghayen - Iran

Re: SCBF 2D Analysis - Solver Problem

Post by kavir »

Hi ablarence
If your issue is about my latest post; I find that due to modeling out of plane buckling in 2D model We first need to import the $t and so input $d.
I hope this will be useful for you.
etapiah
Posts: 3
Joined: Mon Sep 01, 2008 7:33 pm
Location: Universidad Autónoma Metropolitana

Re: SCBF 2D Analysis - Solver Problem

Post by etapiah »

Kavir,
Thank you for your comment about $t and $d, I had noticed the same thing in Script of Vesna about SCBF.
Edgar TAPIA
nilz
Posts: 34
Joined: Sat Nov 12, 2016 7:03 am
Location: Ferdowsi university of mashhad

Re: SCBF 2D Analysis - Solver Problem

Post by nilz »

Hi, Kavir,
in the post below you mean that first, we must import "t" then " d" values?

> If your issue is about my latest post; I find that due to modeling out of
> plane buckling in 2D model We first need to import the $t and so input $d.
> I hope this will be useful for you.
nilz
Posts: 34
Joined: Sat Nov 12, 2016 7:03 am
Location: Ferdowsi university of mashhad

Re: SCBF 2D Analysis - Solver Problem

Post by nilz »

Dears Kavir and ankitprakashntpc
I really appreciate if it is possible for you to send your full code to my email address.
desertemerland@yahoo.com
Post Reply