From ebf01b151d5c9b14144c1036a84bc1f09b0e11bf Mon Sep 17 00:00:00 2001 From: yisangriB Date: Mon, 30 Sep 2024 21:51:52 -0700 Subject: [PATCH] sy - sneaking in multi-fidelity example files --- .../highfidelity_database.json | 62 +++ .../Ex5.Frame2D.build.ElasticSection.tcl | 210 ++++++++ .../multi_fidelity_files/model1/LibUnits.tcl | 42 ++ .../model2/MRF_2Story_Concentrated.tcl | 494 ++++++++++++++++++ .../model2/RotLeaningCol.tcl | 28 + .../model2/RotSpring2DModIKModel.tcl | 56 ++ 6 files changed, 892 insertions(+) create mode 100644 E2MDOFBuildingResponse/multi_fidelity_files/highfidelity_database.json create mode 100644 E2MDOFBuildingResponse/multi_fidelity_files/model1/Ex5.Frame2D.build.ElasticSection.tcl create mode 100644 E2MDOFBuildingResponse/multi_fidelity_files/model1/LibUnits.tcl create mode 100644 E2MDOFBuildingResponse/multi_fidelity_files/model2/MRF_2Story_Concentrated.tcl create mode 100644 E2MDOFBuildingResponse/multi_fidelity_files/model2/RotLeaningCol.tcl create mode 100644 E2MDOFBuildingResponse/multi_fidelity_files/model2/RotSpring2DModIKModel.tcl diff --git a/E2MDOFBuildingResponse/multi_fidelity_files/highfidelity_database.json b/E2MDOFBuildingResponse/multi_fidelity_files/highfidelity_database.json new file mode 100644 index 0000000..f880918 --- /dev/null +++ b/E2MDOFBuildingResponse/multi_fidelity_files/highfidelity_database.json @@ -0,0 +1,62 @@ +[ + + { + "id": 34, + "mainScript": "./model1/Ex5.Frame2D.build.ElasticSection.tcl", + "type": "OpenSeesInput", + "NodeMapping": + [ + { + "node": 11, + "cline": "response", + "floor": "0" + }, + { + "node": 21, + "cline": "response", + "floor": "1" + }, + { + "node": 31, + "cline": "response", + "floor": "2" + }, + { + "node": 41, + "cline": "response", + "floor": "3" + } + ], + "numStory": 3, + "ndm": 2, + "ndf": 3, + "dampingRatio": 0.02 + }, + { + "id": [1,3,5], + "mainScript": "./model2/MRF_2Story_Concentrated.tcl", + "type": "OpenSeesInput", + "NodeMapping": + [ + { + "node": 11, + "cline": "response", + "floor": "0" + }, + { + "node": 12, + "cline": "response", + "floor": "1" + }, + { + "node": 13, + "cline": "response", + "floor": "2" + } + ], + "numStory": 2, + "ndm": 2, + "ndf": 3, + "dampingRatio": 0.02 + } +] \ No newline at end of file diff --git a/E2MDOFBuildingResponse/multi_fidelity_files/model1/Ex5.Frame2D.build.ElasticSection.tcl b/E2MDOFBuildingResponse/multi_fidelity_files/model1/Ex5.Frame2D.build.ElasticSection.tcl new file mode 100644 index 0000000..fead3e4 --- /dev/null +++ b/E2MDOFBuildingResponse/multi_fidelity_files/model1/Ex5.Frame2D.build.ElasticSection.tcl @@ -0,0 +1,210 @@ +# -------------------------------------------------------------------------------------------------- +# Example 5. 2D Frame -- Build Model +# nonlinearBeamColumn element, uniaxial elastic section +# Silvia Mazzoni & Frank McKenna, 2006 +# + +# SET UP ---------------------------------------------------------------------------- +wipe; # clear memory of all past model definitions +model BasicBuilder -ndm 2 -ndf 3; # Define the model builder, ndm=#dimension, ndf=#dofs +set dataDir Data; # set up name of data directory (you can remove this) +file mkdir $dataDir; # create data directory +#set GMdir "../GMfiles/"; # ground-motion file directory +source LibUnits.tcl; # define units + +# define GEOMETRY ------------------------------------------------------------- +# define structure-geometry paramters +set LCol [expr 14*$ft]; # column height +set LBeam [expr 24*$ft]; # beam length + +# calculate locations of beam/column intersections: +set X1 0.; +set X2 [expr $X1 + $LBeam]; +set X3 [expr $X2 + $LBeam]; +set X4 [expr $X3 + $LBeam]; +set Y1 0.; +set Y2 [expr $Y1 + $LCol]; +set Y3 [expr $Y2 + $LCol]; +set Y4 [expr $Y3 + $LCol]; + +# define nodal coordinates +node 11 $X1 $Y1 +node 12 $X2 $Y1 +node 13 $X3 $Y1 +node 14 $X4 $Y1 +node 21 $X1 $Y2 +node 22 $X2 $Y2 +node 23 $X3 $Y2 +node 24 $X4 $Y2 +node 31 $X1 $Y3 +node 32 $X2 $Y3 +node 33 $X3 $Y3 +node 34 $X4 $Y3 +node 41 $X1 $Y4 +node 42 $X2 $Y4 +node 43 $X3 $Y4 +node 44 $X4 $Y4 + +# Set up parameters that are particular to the model for displacement control +set IDctrlNode 41; # node where displacement is read for displacement control +set IDctrlDOF 1; # degree of freedom of displacement read for displacement control +set NStory 3; # number of stories above ground level +set NBay 3; # number of bays +set LBuilding $Y4; # total building height + +# BOUNDARY CONDITIONS +fix 11 1 1 0 +fix 12 1 1 0 +fix 13 1 1 0 +fix 14 1 1 0 + +# Structural-Steel W-section properties +# material properties: +set Es [expr 29000*$ksi]; # Steel Young's Modulus +set nu 0.3; +set Gs [expr $Es/2./[expr 1+$nu]]; # Torsional stiffness Modulus + +# column sections: W27x114 +set AgCol [expr 33.5*pow($in,2)]; # cross-sectional area +set IzCol [expr 4090.*pow($in,4)]; # moment of Inertia +# beam sections: W24x94 +set AgBeam [expr 27.7*pow($in,2)]; # cross-sectional area +set IzBeam [expr 2700.*pow($in,4)]; # moment of Inertia + +set ColSecTag 1 +set BeamSecTag 2 +section Elastic $ColSecTag $Es $AgCol $IzCol +section Elastic $BeamSecTag $Es $AgBeam $IzBeam + +# define ELEMENTS +# set up geometric transformations of element +# separate columns and beams, in case of P-Delta analysis for columns +set IDColTransf 1; # all columns +set IDBeamTransf 2; # all beams +set ColTransfType Linear ; # options, Linear PDelta Corotational +geomTransf $ColTransfType $IDColTransf ; # only columns can have PDelta effects (gravity effects) +geomTransf Linear $IDBeamTransf + + +# Define Beam-Column Elements +set np 5; # number of Gauss integration points for nonlinear curvature distribution-- np=2 for linear distribution ok +# columns +element nonlinearBeamColumn 111 11 21 $np $ColSecTag $IDColTransf; # level 1-2 +element nonlinearBeamColumn 112 12 22 $np $ColSecTag $IDColTransf +element nonlinearBeamColumn 113 13 23 $np $ColSecTag $IDColTransf +element nonlinearBeamColumn 114 14 24 $np $ColSecTag $IDColTransf +element nonlinearBeamColumn 121 21 31 $np $ColSecTag $IDColTransf; # level 2-3 +element nonlinearBeamColumn 122 22 32 $np $ColSecTag $IDColTransf +element nonlinearBeamColumn 123 23 33 $np $ColSecTag $IDColTransf +element nonlinearBeamColumn 124 24 34 $np $ColSecTag $IDColTransf +element nonlinearBeamColumn 131 31 41 $np $ColSecTag $IDColTransf; # level 3-4 +element nonlinearBeamColumn 132 32 42 $np $ColSecTag $IDColTransf +element nonlinearBeamColumn 133 33 43 $np $ColSecTag $IDColTransf +element nonlinearBeamColumn 134 34 44 $np $ColSecTag $IDColTransf +# beams +element nonlinearBeamColumn 221 21 22 $np $BeamSecTag $IDBeamTransf; # level 2 +element nonlinearBeamColumn 222 22 23 $np $BeamSecTag $IDBeamTransf; +element nonlinearBeamColumn 223 23 24 $np $BeamSecTag $IDBeamTransf; +element nonlinearBeamColumn 231 31 32 $np $BeamSecTag $IDBeamTransf; # level 3 +element nonlinearBeamColumn 232 32 33 $np $BeamSecTag $IDBeamTransf; +element nonlinearBeamColumn 233 33 34 $np $BeamSecTag $IDBeamTransf; +element nonlinearBeamColumn 241 41 42 $np $BeamSecTag $IDBeamTransf; # level 4 +element nonlinearBeamColumn 242 42 43 $np $BeamSecTag $IDBeamTransf; +element nonlinearBeamColumn 243 43 44 $np $BeamSecTag $IDBeamTransf; + + +# Define GRAVITY LOADS, weight and masses +# calculate dead load of frame, assume this to be an internal frame (do LL in a similar manner) +# calculate distributed weight along the beam length +set GammaConcrete [expr 150*$pcf]; # Reinforced-Concrete floor slabs +set Tslab [expr 6*$in]; # 6-inch slab +set Lslab [expr 2*$LBeam/2]; # assume slab extends a distance of $LBeam1/2 in/out of plane +set Qslab [expr $GammaConcrete*$Tslab*$Lslab]; +set QBeam [expr 94*$lbf/$ft]; # W-section weight per length +set QdlBeam [expr $Qslab + $QBeam]; # dead load distributed along beam. +set QdlCol [expr 114*$lbf/$ft]; # W-section weight per length +set WeightCol [expr $QdlCol*$LCol]; # total Column weight +set WeightBeam [expr $QdlBeam*$LBeam]; # total Beam weight + +# assign masses to the nodes that the columns are connected to +# each connection takes the mass of 1/2 of each element framing into it (mass=weight/$g) +mass 21 [expr ($WeightCol/2 + $WeightCol/2 +$WeightBeam/2)/$g] 0. 0.; # level 2 +mass 22 [expr ($WeightCol/2 + $WeightCol/2 +$WeightBeam/2 +$WeightBeam/2)/$g] 0. 0.; +mass 23 [expr ($WeightCol/2 + $WeightCol/2 +$WeightBeam/2 +$WeightBeam/2)/$g] 0. 0.; +mass 24 [expr ($WeightCol/2 + $WeightCol/2 +$WeightBeam/2)/$g] 0. 0.; +mass 31 [expr ($WeightCol/2 + $WeightCol/2 +$WeightBeam/2)/$g] 0. 0.; # level 3 +mass 32 [expr ($WeightCol/2 + $WeightCol/2 +$WeightBeam/2 +$WeightBeam/2)/$g] 0. 0.; +mass 33 [expr ($WeightCol/2 + $WeightCol/2 +$WeightBeam/2 +$WeightBeam/2)/$g] 0. 0.; +mass 34 [expr ($WeightCol/2 + $WeightCol/2 +$WeightBeam/2)/$g] 0. 0.; +mass 41 [expr ($WeightCol/2 +$WeightBeam/2)/$g] 0. 0.; # level 4 +mass 42 [expr ($WeightCol/2 +$WeightBeam/2 +$WeightBeam/2)/$g] 0. 0.; +mass 43 [expr ($WeightCol/2 +$WeightBeam/2 +$WeightBeam/2)/$g] 0. 0.; +mass 44 [expr ($WeightCol/2 +$WeightBeam/2)/$g] 0. 0.; +# # calculate total Floor Mass +# set WeightFloor2 [expr $WeightCol*4/2+$WeightCol*4/2+3*$WeightBeam]; # level 2 weight +# set WeightFloor3 [expr $WeightCol*4/2+$WeightCol*4/2+3*$WeightBeam]; +# set WeightFloor4 [expr $WeightCol*4/2+3*$WeightBeam]; +# set WeightTotal [expr $WeightFloor2 + $WeightFloor3 + $WeightFloor4]; # total frame weight +# set MassFloor2 [expr $WeightFloor2/$g]; +# set MassFloor3 [expr $WeightFloor3/$g]; +# set MassFloor4 [expr $WeightFloor4/$g]; +# set MassTotal [expr $MassFloor2+$MassFloor3+$MassFloor4]; # total frame mass + +# # LATERAL-LOAD distribution for static pushover analysis +# # calculate distribution of lateral load based on mass/weight distributions along building height +# # Fj = WjHj/sum(WiHi) * Weight at each floor j +# set sumWiHi [expr $WeightFloor2*$Y2 + $WeightFloor3*$Y3 + $WeightFloor4*$Y4]; # denominator +# set Fj2 [expr $WeightFloor2*$Y2/$sumWiHi*$WeightTotal]; # total for floor 2 +# set Fj3 [expr $WeightFloor3*$Y3/$sumWiHi*$WeightTotal]; # total for floor 3 +# set Fj4 [expr $WeightFloor4*$Y4/$sumWiHi*$WeightTotal]; # total for floor 4 +# set Fi2 [expr $Fj2/4]; # per node on floor 2 +# set Fi3 [expr $Fj3/4]; # per node on floor 3 +# set Fi4 [expr $Fj4/4]; # per node on floor 4 +# set iFi "$Fi2 $Fi3 $Fi4"; # vectorize + +# # Define RECORDERS ------------------------------------------------------------- +# recorder Node -file $dataDir/DFree.out -time -node 41 -dof 1 2 3 disp; # displacements of free node +# recorder Node -file $dataDir/DBase.out -time -node 11 12 13 14 -dof 1 2 3 disp; # displacements of support nodes +# recorder Node -file $dataDir/RBase.out -time -node 11 12 13 14 -dof 1 2 3 reaction; # support reaction +# recorder Drift -file $dataDir/DrNode.out -time -iNode 41 -jNode 11 -dof 1 -perpDirn 2; # lateral drift +# recorder Element -file $dataDir/Fel1.out -time -ele 111 localForce; # element forces in local coordinates +# recorder Element -file $dataDir/ForceEle1sec1.out -time -ele 111 section 1 force; # section forces, axial and moment, node i +# recorder Element -file $dataDir/DefoEle1sec1.out -time -ele 111 section 1 deformation; # section deformations, axial and curvature, node i +# recorder Element -file $dataDir/ForceEle1sec$np.out -time -ele 111 section $np force; # section forces, axial and moment, node j +# recorder Element -file $dataDir/DefoEle1sec$np.out -time -ele 111 section $np deformation; # section deformations, axial and curvature, node j + +# # define GRAVITY ------------------------------------------------------------- +# # GRAVITY LOADS # define gravity load applied to beams and columns -- eleLoad applies loads in local coordinate axis +# pattern Plain 101 Linear { +# eleLoad -ele 221 222 223 -type -beamUniform -$QdlBeam; ; # beams level 2 (in -ydirection) +# eleLoad -ele 231 232 233 -type -beamUniform -$QdlBeam; +# eleLoad -ele 241 242 243 -type -beamUniform -$QdlBeam +# eleLoad -ele 111 112 113 114 -type -beamUniform 0 -$QdlCol; # columns level 1-2 (in -xdirection) +# eleLoad -ele 121 122 123 124 -type -beamUniform 0 -$QdlCol; +# eleLoad -ele 131 132 133 134 -type -beamUniform 0 -$QdlCol; +# } +# # Gravity-analysis parameters -- load-controlled static analysis +# set Tol 1.0e-8; # convergence tolerance for test +# variable constraintsTypeGravity Plain; # default; +# if { [info exists RigidDiaphragm] == 1} { +# if {$RigidDiaphragm=="ON"} { +# variable constraintsTypeGravity Lagrange; # large model: try Transformation +# }; # if rigid diaphragm is on +# }; # if rigid diaphragm exists +# constraints $constraintsTypeGravity ; # how it handles boundary conditions +# numberer RCM; # renumber dof's to minimize band-width (optimization), if you want to +# 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./$NstepGravity]; # first 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" + + diff --git a/E2MDOFBuildingResponse/multi_fidelity_files/model1/LibUnits.tcl b/E2MDOFBuildingResponse/multi_fidelity_files/model1/LibUnits.tcl new file mode 100644 index 0000000..3479d48 --- /dev/null +++ b/E2MDOFBuildingResponse/multi_fidelity_files/model1/LibUnits.tcl @@ -0,0 +1,42 @@ +# -------------------------------------------------------------------------------------------------- +# LibUnits.tcl -- define system of units +# Silvia Mazzoni & Frank McKenna, 2006 +# + +# define UNITS ---------------------------------------------------------------------------- +# set in 1.; # define basic units -- output units +# set kip 1.; # define basic units -- output units +# set sec 1.; # define basic units -- output units +# set LunitTXT "inch"; # define basic-unit text for output +# set FunitTXT "kip"; # define basic-unit text for output +# set TunitTXT "sec"; # define basic-unit text for output +# set ft [expr 12.*$in]; # define engineering units +# set ksi [expr $kip/pow($in,2)]; +# set psi [expr $ksi/1000.]; +# set lbf [expr $psi*$in*$in]; # pounds force +# set pcf [expr $lbf/pow($ft,3)]; # pounds per cubic foot +# set psf [expr $lbf/pow($ft,3)]; # pounds per square foot +# set in2 [expr $in*$in]; # inch^2 +# set in4 [expr $in*$in*$in*$in]; # inch^4 +# set cm [expr $in/2.54]; # centimeter, needed for displacement input in MultipleSupport excitation +# set PI [expr 2*asin(1.0)]; # define constants +# set g [expr 32.2*$ft/pow($sec,2)]; # gravitational acceleration +# set Ubig 1.e10; # a really large number +# set Usmall [expr 1/$Ubig]; # a really small number + +set ft 1.; # define engineering units +set in [expr $ft*12.] ; # define basic units -- output units +set kip 1.; # define basic units -- output units +set sec 1.; # define basic units -- output units +set ksi [expr $kip/pow($in,2)]; +set psi [expr $ksi/1000.]; +set lbf [expr $psi*$in*$in]; # pounds force +set pcf [expr $lbf/pow($ft,3)]; # pounds per cubic foot +set psf [expr $lbf/pow($ft,3)]; # pounds per square foot +set in2 [expr $in*$in]; # inch^2 +set in4 [expr $in*$in*$in*$in]; # inch^4 +set cm [expr $in/2.54]; # centimeter, needed for displacement input in MultipleSupport excitation +set PI [expr 2*asin(1.0)]; # define constants +set g [expr 32.2*$ft/pow($sec,2)]; # gravitational acceleration +set Ubig 1.e10; # a really large number +set Usmall [expr 1/$Ubig]; # a really small number diff --git a/E2MDOFBuildingResponse/multi_fidelity_files/model2/MRF_2Story_Concentrated.tcl b/E2MDOFBuildingResponse/multi_fidelity_files/model2/MRF_2Story_Concentrated.tcl new file mode 100644 index 0000000..d50ce44 --- /dev/null +++ b/E2MDOFBuildingResponse/multi_fidelity_files/model2/MRF_2Story_Concentrated.tcl @@ -0,0 +1,494 @@ +# -------------------------------------------------------------------------------------------------- +# Example: 2-Story Steel Moment Frame with Concentrated Plasticity +# Centerline Model with Concentrated Plastic Hinges at Beam-Column Joint +# Created by: Laura Eads, Stanford University, 2010 +# Units: kips, inches, seconds + +# Updated 9 May 2012: fixed errors defining rayleigh damping (see line 440) +# Updated 3 Sept 2013: changed solution algorithm and convergence criteria to help with convergence (by Filipe Ribeiro and Andre Barbosa) + +# Element and Node ID conventions: +# 1xy = frame columns with springs at both ends +# 2xy = frame beams with springs at both ends +# 6xy = trusses linking frame and P-delta column +# 7xy = P-delta columns +# 3,xya = frame column rotational springs +# 4,xya = frame beam rotational springs +# 5,xya = P-delta column rotational springs +# where: +# x = Pier or Bay # +# y = Floor or Story # +# a = an integer describing the location relative to beam-column joint (see description where elements and nodes are defined) + +################################################################################################### +# Set Up & Source Definition +################################################################################################### + wipe all; # clear memory of past model definitions + model BasicBuilder -ndm 2 -ndf 3; # Define the model builder, ndm = #dimension, ndf = #dofs + #source DisplayModel2D.tcl; # procedure for displaying a 2D perspective of model + #source DisplayPlane.tcl; # procedure for displaying a plane in a model + source rotSpring2DModIKModel.tcl; # procedure for defining a rotational spring (zero-length element) + source rotLeaningCol.tcl; # procedure for defining a rotational spring (zero-length element) with very small stiffness + +################################################################################################### +# Define Analysis Type +################################################################################################### +# Define type of analysis: "pushover" = pushover; "dynamic" = dynamic + #set analysisType "dynamic"; + + #if {$analysisType == "pushover"} { + # set dataDir Concentrated-Pushover-Output; # name of output folder + # file mkdir $dataDir; # create output folder + #} + #if {$analysisType == "dynamic"} { + # set dataDir Concentrated-Dynamic-Output; # name of output folder + # file mkdir $dataDir; # create output folder + #} + +################################################################################################### +# Define Building Geometry, Nodes, and Constraints +################################################################################################### +# define structure-geometry parameters + set NStories 2; # number of stories + set NBays 1; # number of frame bays (excludes bay for P-delta column) + set WBay [expr 30.0*12.0]; # bay width in inches + set HStory1 [expr 15.0*12.0]; # 1st story height in inches + set HStoryTyp [expr 12.0*12.0]; # story height of other stories in inches + set HBuilding [expr $HStory1 + ($NStories-1)*$HStoryTyp]; # height of building + +# calculate locations of beam/column joints: + set Pier1 0.0; # leftmost column line + set Pier2 [expr $Pier1 + $WBay]; + set Pier3 [expr $Pier2 + $WBay]; # P-delta column line + set Floor1 0.0; # ground floor + set Floor2 [expr $Floor1 + $HStory1]; + set Floor3 [expr $Floor2 + $HStoryTyp]; + +# calculate joint offset distance for beam plastic hinges + set phlat23 [expr 0.0]; # lateral dist from beam-col joint to loc of hinge on Floor 2 + +# calculate nodal masses -- lump floor masses at frame nodes + set g 386.2; # acceleration due to gravity + set Floor2Weight 535.0; # weight of Floor 2 in kips + set Floor3Weight 525.0; # weight of Floor 3 in kips + set WBuilding [expr $Floor2Weight + $Floor3Weight];# total building weight + set NodalMass2 [expr ($Floor2Weight/$g) / (2.0)]; # mass at each node on Floor 2 + set NodalMass3 [expr ($Floor3Weight/$g) / (2.0)]; # mass at each node on Floor 3 + set Negligible 1e-9; # a very smnumber to avoid problems with zero + +# define nodes and assign masses to beam-column intersections of frame + # command: node nodeID xcoord ycoord -mass mass_dof1 mass_dof2 mass_dof3 + # nodeID convention: "xy" where x = Pier # and y = Floor # + node 11 $Pier1 $Floor1; + node 21 $Pier2 $Floor1; + node 31 $Pier3 $Floor1; + node 12 $Pier1 $Floor2 -mass $NodalMass2 $Negligible $Negligible; + node 22 $Pier2 $Floor2 -mass $NodalMass2 $Negligible $Negligible; + node 32 $Pier3 $Floor2; + node 13 $Pier1 $Floor3 -mass $NodalMass3 $Negligible $Negligible; + node 23 $Pier2 $Floor3 -mass $NodalMass3 $Negligible $Negligible; + node 33 $Pier3 $Floor3; + +# define extra nodes for plastic hinge rotational springs + # nodeID convention: "xya" where x = Pier #, y = Floor #, a = location relative to beam-column joint + # "a" convention: 2 = left; 3 = right; + # "a" convention: 6 = below; 7 = above; + # column hinges at bottom of Story 1 (base) + node 117 $Pier1 $Floor1; + node 217 $Pier2 $Floor1; + # column hinges at top of Story 1 + node 126 $Pier1 $Floor2; + node 226 $Pier2 $Floor2; + node 326 $Pier3 $Floor2; # zero-stiffness spring will be used on p-delta column + # column hinges at bottom of Story 2 + node 127 $Pier1 $Floor2; + node 227 $Pier2 $Floor2; + node 327 $Pier3 $Floor2; # zero-stiffness spring will be used on p-delta column + # column hinges at top of Story 2 + node 136 $Pier1 $Floor3; + node 236 $Pier2 $Floor3; + node 336 $Pier3 $Floor3; # zero-stiffness spring will be used on p-delta column + + # beam hinges at Floor 2 + node 122 [expr $Pier1 + $phlat23] $Floor2; + node 223 [expr $Pier2 - $phlat23] $Floor2; + # beam hinges at Floor 3 + node 132 [expr $Pier1 + $phlat23] $Floor3; + node 233 [expr $Pier2 - $phlat23] $Floor3; + +# constrain beam-column joints in a floor to have the same lateral displacement using the "equalDOF" command + # command: equalDOF $MasterNodeID $SlaveNodeID $dof1 $dof2... + set dof1 1; # constrain movement in dof 1 (x-direction) + equalDOF 12 22 $dof1; # Floor 2: Pier 1 to Pier 2 + equalDOF 12 32 $dof1; # Floor 2: Pier 1 to Pier 3 + equalDOF 13 23 $dof1; # Floor 3: Pier 1 to Pier 2 + equalDOF 13 33 $dof1; # Floor 3: Pier 1 to Pier 3 + +# assign boundary condidtions + # command: fix nodeID dxFixity dyFixity rzFixity + # fixity values: 1 = constrained; 0 = unconstrained + # fix the base of the building; pin P-delta column at base + fix 11 1 1 1; + fix 21 1 1 1; + fix 31 1 1 0; # P-delta column is pinned + +################################################################################################### +# Define Section Properties and Elements +################################################################################################### +# define material properties + set Es 29000.0; # steel Young's modulus + +# define column section W24x131 for Story 1 & 2 + set Acol_12 38.5; # cross-sectional area + set Icol_12 4020.0; # moment of inertia + set Mycol_12 20350.0; # yield moment + +# define beam section W27x102 for Floor 2 & 3 + set Abeam_23 30.0; # cross-sectional area (full section properties) + set Ibeam_23 3620.0; # moment of inertia (full section properties) + set Mybeam_23 10938.0; # yield moment at plastic hinge location (i.e., My of RBS section, if used) + # note: In this example the hinges form right at the beam-column joint, so using an RBS doesn't make sense; + # however, it is done here simply for illustrative purposes. + +# determine stiffness modifications to equate the stiffness of the spring-elastic element-spring subassembly to the stiffness of the actual frame member + # References: (1) Ibarra, L. F., and Krawinkler, H. (2005). "Global collapse of frame structures under seismic excitations," Technical Report 152, + # The John A. Blume Earthquake Engineering Research Center, Department of Civil Engineering, Stanford University, Stanford, CA. + # (2) Zareian, F. and Medina, R. A. (2010). “A practical method for proper modeling of structural damping in inelastic plane + # structural systems,” Computers & Structures, Vol. 88, 1-2, pp. 45-53. + # calculate modified section properties to account for spring stiffness being in series with the elastic element stiffness + set n 10.0; # stiffness multiplier for rotational spring + + # calculate modified moment of inertia for elastic elements + set Icol_12mod [expr $Icol_12*($n+1.0)/$n]; # modified moment of inertia for columns in Story 1 & 2 + set Ibeam_23mod [expr $Ibeam_23*($n+1.0)/$n]; # modified moment of inertia for beams in Floor 2 & 3 + + # calculate modified rotational stiffness for plastic hinge springs + set Ks_col_1 [expr $n*6.0*$Es*$Icol_12mod/$HStory1]; # rotational stiffness of Story 1 column springs + set Ks_col_2 [expr $n*6.0*$Es*$Icol_12mod/$HStoryTyp]; # rotational stiffness of Story 2 column springs + set Ks_beam_23 [expr $n*6.0*$Es*$Ibeam_23mod/$WBay]; # rotational stiffness of Floor 2 & 3 beam springs + +# set up geometric transformations of element + set PDeltaTransf 1; + geomTransf PDelta $PDeltaTransf; # PDelta transformation + +# define elastic column elements using "element" command + # command: element elasticBeamColumn $eleID $iNode $jNode $A $E $I $transfID + # eleID convention: "1xy" where 1 = col, x = Pier #, y = Story # + # Columns Story 1 + element elasticBeamColumn 111 117 126 $Acol_12 $Es $Icol_12mod $PDeltaTransf; # Pier 1 + element elasticBeamColumn 121 217 226 $Acol_12 $Es $Icol_12mod $PDeltaTransf; # Pier 2 + # Columns Story 2 + element elasticBeamColumn 112 127 136 $Acol_12 $Es $Icol_12mod $PDeltaTransf; # Pier 1 + element elasticBeamColumn 122 227 236 $Acol_12 $Es $Icol_12mod $PDeltaTransf; # Pier 2 + +# define elastic beam elements + # eleID convention: "2xy" where 2 = beam, x = Bay #, y = Floor # + # Beams Story 1 + element elasticBeamColumn 212 122 223 $Abeam_23 $Es $Ibeam_23mod $PDeltaTransf; + # Beams Story 2 + element elasticBeamColumn 222 132 233 $Abeam_23 $Es $Ibeam_23mod $PDeltaTransf; + +# define p-delta columns and rigid links + set TrussMatID 600; # define a material ID + set Arigid 1000.0; # define area of truss section (make much larger than A of frame elements) + set Irigid 100000.0; # moment of inertia for p-delta columns (make much larger than I of frame elements) + uniaxialMaterial Elastic $TrussMatID $Es; # define truss material + # rigid links + # command: element truss $eleID $iNode $jNode $A $materialID + # eleID convention: 6xy, 6 = truss link, x = Bay #, y = Floor # + element truss 622 22 32 $Arigid $TrussMatID; # Floor 2 + element truss 623 23 33 $Arigid $TrussMatID; # Floor 3 + + # p-delta columns + # eleID convention: 7xy, 7 = p-delta columns, x = Pier #, y = Story # + element elasticBeamColumn 731 31 326 $Arigid $Es $Irigid $PDeltaTransf; # Story 1 + element elasticBeamColumn 732 327 336 $Arigid $Es $Irigid $PDeltaTransf; # Story 2 + +# display the model with the node numbers + # DisplayModel2D NodeNumbers + +################################################################################################### +# Define Rotational Springs for Plastic Hinges +################################################################################################### +# define rotational spring properties and create spring elements using "rotSpring2DModIKModel" procedure + # rotSpring2DModIKModel creates a uniaxial material spring with a bilinear response based on Modified Ibarra Krawinkler Deterioration Model + # references provided in rotSpring2DModIKModel.tcl + # input values for Story 1 column springs + set McMy 1.05; # ratio of capping moment to yield moment, Mc / My + set LS 1000.0; # basic strength deterioration (a very large # = no cyclic deterioration) + set LK 1000.0; # unloading stiffness deterioration (a very large # = no cyclic deterioration) + set LA 1000.0; # accelerated reloading stiffness deterioration (a very large # = no cyclic deterioration) + set LD 1000.0; # post-capping strength deterioration (a very large # = no deterioration) + set cS 1.0; # exponent for basic strength deterioration (c = 1.0 for no deterioration) + set cK 1.0; # exponent for unloading stiffness deterioration (c = 1.0 for no deterioration) + set cA 1.0; # exponent for accelerated reloading stiffness deterioration (c = 1.0 for no deterioration) + set cD 1.0; # exponent for post-capping strength deterioration (c = 1.0 for no deterioration) + set th_pP 0.025; # plastic rot capacity for pos loading + set th_pN 0.025; # plastic rot capacity for neg loading + set th_pcP 0.3; # post-capping rot capacity for pos loading + set th_pcN 0.3; # post-capping rot capacity for neg loading + set ResP 0.4; # residual strength ratio for pos loading + set ResN 0.4; # residual strength ratio for neg loading + set th_uP 0.4; # ultimate rot capacity for pos loading + set th_uN 0.4; # ultimate rot capacity for neg loading + set DP 1.0; # rate of cyclic deterioration for pos loading + set DN 1.0; # rate of cyclic deterioration for neg loading + set a_mem [expr ($n+1.0)*($Mycol_12*($McMy-1.0)) / ($Ks_col_1*$th_pP)]; # strain hardening ratio of spring + set b [expr ($a_mem)/(1.0+$n*(1.0-$a_mem))]; # modified strain hardening ratio of spring (Ibarra & Krawinkler 2005, note: Eqn B.5 is incorrect) + +# define column springs + # Spring ID: "3xya", where 3 = col spring, x = Pier #, y = Story #, a = location in story + # "a" convention: 1 = bottom of story, 2 = top of story + # command: rotSpring2DModIKModel id ndR ndC K asPos asNeg MyPos MyNeg LS LK LA LD cS cK cA cD th_p+ th_p- th_pc+ th_pc- Res+ Res- th_u+ th_u- D+ D- + # col springs @ bottom of Story 1 (at base) + rotSpring2DModIKModel 3111 11 117 $Ks_col_1 $b $b $Mycol_12 [expr -$Mycol_12] $LS $LK $LA $LD $cS $cK $cA $cD $th_pP $th_pN $th_pcP $th_pcN $ResP $ResN $th_uP $th_uN $DP $DN; + rotSpring2DModIKModel 3211 21 217 $Ks_col_1 $b $b $Mycol_12 [expr -$Mycol_12] $LS $LK $LA $LD $cS $cK $cA $cD $th_pP $th_pN $th_pcP $th_pcN $ResP $ResN $th_uP $th_uN $DP $DN; + #col springs @ top of Story 1 (below Floor 2) + rotSpring2DModIKModel 3112 12 126 $Ks_col_1 $b $b $Mycol_12 [expr -$Mycol_12] $LS $LK $LA $LD $cS $cK $cA $cD $th_pP $th_pN $th_pcP $th_pcN $ResP $ResN $th_uP $th_uN $DP $DN; + rotSpring2DModIKModel 3212 22 226 $Ks_col_1 $b $b $Mycol_12 [expr -$Mycol_12] $LS $LK $LA $LD $cS $cK $cA $cD $th_pP $th_pN $th_pcP $th_pcN $ResP $ResN $th_uP $th_uN $DP $DN; + + # recompute strain hardening since Story 2 is not the same height as Story 1 + set a_mem [expr ($n+1.0)*($Mycol_12*($McMy-1.0)) / ($Ks_col_2*$th_pP)]; # strain hardening ratio of spring + set b [expr ($a_mem)/(1.0+$n*(1.0-$a_mem))]; # modified strain hardening ratio of spring (Ibarra & Krawinkler 2005, note: there is mistake in Eqn B.5) + # col springs @ bottom of Story 2 (above Floor 2) + rotSpring2DModIKModel 3121 12 127 $Ks_col_2 $b $b $Mycol_12 [expr -$Mycol_12] $LS $LK $LA $LD $cS $cK $cA $cD $th_pP $th_pN $th_pcP $th_pcN $ResP $ResN $th_uP $th_uN $DP $DN; + rotSpring2DModIKModel 3221 22 227 $Ks_col_2 $b $b $Mycol_12 [expr -$Mycol_12] $LS $LK $LA $LD $cS $cK $cA $cD $th_pP $th_pN $th_pcP $th_pcN $ResP $ResN $th_uP $th_uN $DP $DN; + #col springs @ top of Story 2 (below Floor 3) + rotSpring2DModIKModel 3122 13 136 $Ks_col_2 $b $b $Mycol_12 [expr -$Mycol_12] $LS $LK $LA $LD $cS $cK $cA $cD $th_pP $th_pN $th_pcP $th_pcN $ResP $ResN $th_uP $th_uN $DP $DN; + rotSpring2DModIKModel 3222 23 236 $Ks_col_2 $b $b $Mycol_12 [expr -$Mycol_12] $LS $LK $LA $LD $cS $cK $cA $cD $th_pP $th_pN $th_pcP $th_pcN $ResP $ResN $th_uP $th_uN $DP $DN; + + # create region for frame column springs + # command: region $regionID -ele $ele_1_ID $ele_2_ID... + region 1 -ele 3111 3211 3112 3212 3121 3221 3122 3222; + +# define beam springs + # Spring ID: "4xya", where 4 = beam spring, x = Bay #, y = Floor #, a = location in bay + # "a" convention: 1 = left end, 2 = right end + # redefine the rotations since they are not the same + set th_pP 0.02; + set th_pN 0.02; + set th_pcP 0.16; + set th_pcN 0.16; + set a_mem [expr ($n+1.0)*($Mybeam_23*($McMy-1.0)) / ($Ks_beam_23*$th_pP)]; # strain hardening ratio of spring + set b [expr ($a_mem)/(1.0+$n*(1.0-$a_mem))]; # modified strain hardening ratio of spring (Ibarra & Krawinkler 2005, note: there is mistake in Eqn B.5) + #beam springs at Floor 2 + rotSpring2DModIKModel 4121 12 122 $Ks_beam_23 $b $b $Mybeam_23 [expr -$Mybeam_23] $LS $LK $LA $LD $cS $cK $cA $cD $th_pP $th_pN $th_pcP $th_pcN $ResP $ResN $th_uP $th_uN $DP $DN; + rotSpring2DModIKModel 4122 22 223 $Ks_beam_23 $b $b $Mybeam_23 [expr -$Mybeam_23] $LS $LK $LA $LD $cS $cK $cA $cD $th_pP $th_pN $th_pcP $th_pcN $ResP $ResN $th_uP $th_uN $DP $DN; + #beam springs at Floor 3 + rotSpring2DModIKModel 4131 13 132 $Ks_beam_23 $b $b $Mybeam_23 [expr -$Mybeam_23] $LS $LK $LA $LD $cS $cK $cA $cD $th_pP $th_pN $th_pcP $th_pcN $ResP $ResN $th_uP $th_uN $DP $DN; + rotSpring2DModIKModel 4132 23 233 $Ks_beam_23 $b $b $Mybeam_23 [expr -$Mybeam_23] $LS $LK $LA $LD $cS $cK $cA $cD $th_pP $th_pN $th_pcP $th_pcN $ResP $ResN $th_uP $th_uN $DP $DN; + + # create region for beam springs + region 2 -ele 4121 4122 4131 4132; + +# define p-delta column spring: zero-stiffness elastic spring + #Spring ID: "5xya" where 5 = leaning column spring, x = Pier #, y = Story #, a = location in story + # "a" convention: 1 = bottom of story, 2 = top of story + # rotLeaningCol ElemID ndR ndC + rotLeaningCol 5312 32 326; # top of Story 1 + rotLeaningCol 5321 32 327; # bottom of Story 2 + rotLeaningCol 5322 33 336; # top of Story 2 + + # create region for P-Delta column springs + region 3 -ele 5312 5321 5322; + +############################################################################ +# Eigenvalue Analysis +############################################################################ + set pi [expr 2.0*asin(1.0)]; # Definition of pi + set nEigenI 1; # mode i = 1 + set nEigenJ 2; # 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-1]]; # 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 + +# ############################################################################ +# # Gravity Loads & Gravity Analysis +# ############################################################################ +# # apply gravity loads +# #command: pattern PatternType $PatternID TimeSeriesType +# pattern Plain 501 Constant { + +# # point loads on leaning column nodes +# # command: load node Fx Fy Mz +# set P_PD2 [expr -398.02]; # Floor 2 +# set P_PD3 [expr -391.31]; # Floor 3 +# load 32 0.0 $P_PD2 0.0; # Floor 2 +# load 33 0.0 $P_PD3 0.0; # Floor 3 + +# # point loads on frame column nodes +# set P_F2 [expr 0.5*(-1.0*$Floor2Weight-$P_PD2)]; # load on each frame node in Floor 2 +# set P_F3 [expr 0.5*(-1.0*$Floor3Weight-$P_PD3)]; # load on each frame node in Floor 3 +# # Floor 2 loads +# load 12 0.0 $P_F2 0.0; +# load 22 0.0 $P_F2 0.0; +# # Floor 3 loads +# load 13 0.0 $P_F3 0.0; +# load 23 0.0 $P_F3 0.0; +# } + +# # Gravity-analysis: load-controlled static analysis +# set Tol 1.0e-6; # 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" + +# wipeAnalysis +# ############################################################################ +# # Recorders +# ############################################################################ +# # record drift histories +# # drift recorder command: recorder Drift -file $filename -time -iNode $NodeI_ID -jNode $NodeJ_ID -dof $dof -perpDirn $Record.drift.perpendicular.to.this.direction +# recorder Drift -file $dataDir/Drift-Story1.out -time -iNode 11 -jNode 12 -dof 1 -perpDirn 2; +# recorder Drift -file $dataDir/Drift-Story2.out -time -iNode 12 -jNode 13 -dof 1 -perpDirn 2; +# recorder Drift -file $dataDir/Drift-Roof.out -time -iNode 11 -jNode 13 -dof 1 -perpDirn 2; + +# # record floor displacements +# recorder Node -file $dataDir/Disp.out -time -node 12 13 -dof 1 disp; + +# # record base shear reactions +# recorder Node -file $dataDir/Vbase.out -node 117 217 31 -dof 1 reaction; + +# # record story 1 column forces in global coordinates +# recorder Element -file $dataDir/Fcol111.out -time -ele 111 force; +# recorder Element -file $dataDir/Fcol121.out -time -ele 121 force; +# recorder Element -file $dataDir/Fcol731.out -time -ele 731 force; + +# # record response history of all frame column springs (one file for moment, one for rotation) +# recorder Element -file $dataDir/MRFcol-Mom-Hist.out -time -region 1 force; +# recorder Element -file $dataDir/MRFcol-Rot-Hist.out -time -region 1 deformation; + +# # record response history of all frame beam springs (one file for moment, one for rotation) +# recorder Element -file $dataDir/MRFbeam-Mom-Hist.out -time -region 2 force; +# recorder Element -file $dataDir/MRFbeam-Rot-Hist.out -time -region 2 deformation; + +# ####################################################################################### +# # # +# # Analysis Section # +# # # +# ####################################################################################### + +# ############################################################################ +# # Pushover Analysis # +# ############################################################################ +# if {$analysisType == "pushover"} { +# puts "Running Pushover..." +# # assign lateral loads and create load pattern: use ASCE 7-10 distribution +# set lat2 16.255; # force on each frame node in Floor 2 +# set lat3 31.636; # force on each frame node in Floor 3 +# pattern Plain 200 Linear { +# load 12 $lat2 0.0 0.0; +# load 22 $lat2 0.0 0.0; +# load 13 $lat3 0.0 0.0; +# load 23 $lat3 0.0 0.0; +# } + +# # display deformed shape: +# set ViewScale 5; +# DisplayModel2D DeformedShape $ViewScale ; # display deformed shape, the scaling factor needs to be adjusted for each model + +# # displacement parameters +# set IDctrlNode 13; # 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.1*$HBuilding]; # maximum displacement of pushover: 10% roof drift +# set Dincr [expr 0.01]; # 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-6 400; # type of convergence criteria with 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 +# } + +# ############################################################################ +# # Time History/Dynamic Analysis # +# ############################################################################ +# if {$analysisType == "dynamic"} { +# puts "Running dynamic analysis..." +# # display deformed shape: +# set ViewScale 5; # amplify display of deformed shape +# DisplayModel2D DeformedShape $ViewScale; # display deformed shape, the scaling factor needs to be adjusted for each model + +# # Rayleigh Damping +# # calculate damping parameters +# set zeta 0.02; # percentage of critical damping +# set a0 [expr $zeta*2.0*$w1*$w2/($w1 + $w2)]; # mass damping coefficient based on first and second modes +# set a1 [expr $zeta*2.0/($w1 + $w2)]; # stiffness damping coefficient based on first and second modes +# set a1_mod [expr $a1*(1.0+$n)/$n]; # modified stiffness damping coefficient used for n modified elements. See Zareian & Medina 2010. + +# # assign damping to frame beams and columns +# # command: region $regionID -eleRange $elementIDfirst $elementIDlast -rayleigh $alpha_mass $alpha_currentStiff $alpha_initialStiff $alpha_committedStiff +# ## old commands: region 4 -eleRange 111 222 rayleigh 0.0 0.0 $a1_mod 0.0; # assign stiffness proportional damping to frame beams & columns w/ n modifications +# ## rayleigh $a0 0.0 0.0 0.0; # assign mass proportional damping to structure (only assigns to nodes with mass) +# ## updated 9 May 2012: use "-rayleigh" instead of "rayleigh" when defining damping with the "region" command +# ## use "region" command when defining mass proportional damping so that the stiffness proportional damping isn't canceled +# region 4 -eleRange 111 222 -rayleigh 0.0 0.0 $a1_mod 0.0; # assign stiffness proportional damping to frame beams & columns w/ n modifications +# region 5 -node 12 13 22 23 -rayleigh $a0 0.0 0.0 0.0; # assign mass proportional damping to structure (assign to nodes with mass) + +# # define ground motion parameters +# set patternID 1; # load pattern ID +# set GMdirection 1; # ground motion direction (1 = x) +# set GMfile "NR94cnp.tcl"; # ground motion filename +# set dt 0.01; # timestep of input GM file +# set Scalefact 1.0; # ground motion scaling factor +# set TotalNumberOfSteps 2495; # number of steps in ground motion +# set GMtime [expr $dt*$TotalNumberOfSteps + 10.0]; # total time of ground motion + 10 sec of free vibration + +# # define the acceleration series for the ground motion +# # syntax: "Series -dt $timestep_of_record -filePath $filename_with_acc_history -factor $scale_record_by_this_amount +# set accelSeries "Series -dt $dt -filePath $GMfile -factor [expr $Scalefact*$g]"; + +# # create load pattern: apply acceleration to all fixed nodes with UniformExcitation +# # command: pattern UniformExcitation $patternID $GMdir -accel $timeSeriesID +# pattern UniformExcitation $patternID $GMdirection -accel $accelSeries; + +# # define dynamic analysis parameters +# set dt_analysis 0.001; # timestep of analysis +# wipeAnalysis; # destroy all components of the Analysis object, i.e. any objects created with system, numberer, constraints, integrator, algorithm, and analysis commands +# constraints Plain; # how it handles boundary conditions +# numberer RCM; # renumber dof's to minimize band-width (optimization) +# system UmfPack; # how to store and solve the system of equations in the analysis +# test NormDispIncr 1.0e-8 50; # type of convergence criteria with tolerance, max iterations +# algorithm NewtonLineSearch; # use NewtonLineSearch solution algorithm: updates tangent stiffness at every iteration and introduces line search to the Newton-Raphson algorithm to solve the nonlinear residual equation. Line search increases the effectiveness of the Newton method +# integrator Newmark 0.5 0.25; # uses Newmark's average acceleration method to compute the time history +# analysis Transient; # type of analysis: transient or static +# set NumSteps [expr round(($GMtime + 0.0)/$dt_analysis)]; # number of steps in analysis + +# # perform the dynamic analysis and display whether analysis was successful +# set ok [analyze $NumSteps $dt_analysis]; # ok = 0 if analysis was completed +# if {$ok == 0} { +# puts "Dynamic analysis complete"; +# } else { +# puts "Dynamic analysis did not converge"; +# } + +# # output time at end of analysis +# set currentTime [getTime]; # get current analysis time (after dynamic analysis) +# puts "The current time is: $currentTime"; +# wipe all; +# } + +# wipe all; \ No newline at end of file diff --git a/E2MDOFBuildingResponse/multi_fidelity_files/model2/RotLeaningCol.tcl b/E2MDOFBuildingResponse/multi_fidelity_files/model2/RotLeaningCol.tcl new file mode 100644 index 0000000..b214ff3 --- /dev/null +++ b/E2MDOFBuildingResponse/multi_fidelity_files/model2/RotLeaningCol.tcl @@ -0,0 +1,28 @@ +########################################################################################################### +# rotLeaningCol.tcl +# Procedure that creates a zero-stiffness elastic rotational spring for the leaning column +# and constrains the translations DOFs of the spring. +# +# Written by: Laura Eads +# Date: 07/16/2010 +# +# Formal arguments +# eleID - unique element ID for this zero length rotational spring +# nodeR - node ID which will be retained by the multi-point constraint +# nodeC - node ID which will be constrained by the multi-point constraint +# +########################################################################################################## + +proc rotLeaningCol {eleID nodeR nodeC} { + + #Spring Stiffness + set K 1e-9; # k/in + + # Create the material and zero length element (spring) + uniaxialMaterial Elastic $eleID $K + element zeroLength $eleID $nodeR $nodeC -mat $eleID -dir 6 + + # Constrain the translational DOF with a multi-point constraint + # retained constrained DOF_1 DOF_2 + equalDOF $nodeR $nodeC 1 2 +} \ No newline at end of file diff --git a/E2MDOFBuildingResponse/multi_fidelity_files/model2/RotSpring2DModIKModel.tcl b/E2MDOFBuildingResponse/multi_fidelity_files/model2/RotSpring2DModIKModel.tcl new file mode 100644 index 0000000..811999b --- /dev/null +++ b/E2MDOFBuildingResponse/multi_fidelity_files/model2/RotSpring2DModIKModel.tcl @@ -0,0 +1,56 @@ +############################################################################################ +# rotSpring2DModIKModel.tcl + # +# This routine creates a uniaxial material spring with deterioration +# +# Spring follows: Bilinear Response based on Modified Ibarra Krawinkler Deterioration Model +# +# Written by: Dimitrios G. Lignos, Ph.D. +# +# Variables +# $eleID = Element Identification (integer) +# $nodeR = Retained/master node +# $nodeC = Constrained/slave node +# $K = Initial stiffness after the modification for n (see Ibarra and Krawinkler, 2005) +# $asPos = Strain hardening ratio after n modification (see Ibarra and Krawinkler, 2005) +# $asNeg = Strain hardening ratio after n modification (see Ibarra and Krawinkler, 2005) +# $MyPos = Positive yield moment (with sign) +# $MyNeg = Negative yield moment (with sign) +# $LS = Basic strength deterioration parameter (see Lignos and Krawinkler, 2009) +# $LK = Unloading stiffness deterioration parameter (see Lignos and Krawinkler, 2009) +# $LA = Accelerated reloading stiffness deterioration parameter (see Lignos and Krawinkler, 2009) +# $LD = Post-capping strength deterioration parameter (see Lignos and Krawinkler, 2009) +# $cS = Exponent for basic strength deterioration +# $cK = Exponent for unloading stiffness deterioration +# $cA = Exponent for accelerated reloading stiffness deterioration +# $cD = Exponent for post-capping strength deterioration +# $th_pP = Plastic rotation capacity for positive loading direction +# $th_pN = Plastic rotation capacity for negative loading direction +# $th_pcP = Post-capping rotation capacity for positive loading direction +# $th_pcN = Post-capping rotation capacity for negative loading direction +# $ResP = Residual strength ratio for positive loading direction +# $ResN = Residual strength ratio for negative loading direction +# $th_uP = Ultimate rotation capacity for positive loading direction +# $th_uN = Ultimate rotation capacity for negative loading direction +# $DP = Rate of cyclic deterioration for positive loading direction +# $DN = Rate of cyclic deterioration for negative loading direction +# +# References: +# Ibarra, L. F., and Krawinkler, H. (2005). “Global collapse of frame structures under seismic excitations,” Technical Report 152, The John A. Blume Earthquake Engineering Research Center, Department of Civil Engineering, Stanford University, Stanford, CA. +# Ibarra, L. F., Medina, R. A., and Krawinkler, H. (2005). “Hysteretic models that incorporate strength and stiffness deterioration,” International Journal for Earthquake Engineering and Structural Dynamics, Vol. 34, No.12, pp. 1489-1511. +# Lignos, D. G., and Krawinkler, H. (2010). “Deterioration Modeling of Steel Beams and Columns in Support to Collapse Prediction of Steel Moment Frames”, ASCE, Journal of Structural Engineering (under review). +# Lignos, D. G., and Krawinkler, H. (2009). “Sidesway Collapse of Deteriorating Structural Systems under Seismic Excitations,” Technical Report 172, The John A. Blume Earthquake Engineering Research Center, Department of Civil Engineering, Stanford University, Stanford, CA. +# +############################################################################################ +# +proc rotSpring2DModIKModel {eleID nodeR nodeC K asPos asNeg MyPos MyNeg LS LK LA LD cS cK cA cD th_pP th_pN th_pcP th_pcN ResP ResN th_uP th_uN DP DN} { +# +# Create the zero length element + uniaxialMaterial Bilin $eleID $K $asPos $asNeg $MyPos $MyNeg $LS $LK $LA $LD $cS $cK $cA $cD $th_pP $th_pN $th_pcP $th_pcN $ResP $ResN $th_uP $th_uN $DP $DN; + + element zeroLength $eleID $nodeR $nodeC -mat $eleID -dir 6 + +# Constrain the translational DOF with a multi-point constraint +# retained constrained DOF_1 DOF_2 ... DOF_n + equalDOF $nodeR $nodeC 1 2 +} \ No newline at end of file