Code: Select all
#Define Gravity Load and Analysis
#================================
#Define Loads
set g 386.4; #gravity (in/s2)
set WtCol [expr -37.*$kip]; #Total weight per column (kip)
set WtBeam [expr -210.*$kip]; #Total weight of cap beam (kip)
set WtSAP [expr -1794.*$kip]; #Total weight of panels + girders from SAP2000 (kip)
set WtDeck [expr $WtSAP]; #Total deck weight to be distributed to nodes (kip)
set NumNodes 40; #number of bridge nodes for lumping mass *39 nodes and end nodes use 1/2 load
set DNodeLoad [expr $WtDeck/$NumNodes]; #Load at deck nodes
set BNodeLoad [expr $WtBeam/10.]; #beam weight distributed over nodes *9 nodes and end nodes use 1/2 load
set CNodeLoad [expr $WtCol/2.]; #Load at bottom column nodes *2 nodes per column
#Define Masses
set CNodeMass [expr abs($CNodeLoad/$g)]; #Lumped mass at column nodes
set BNodeMass [expr abs($BNodeLoad/$g)]; #Lumped mass at beam nodes
set DNodeMass [expr abs($DNodeLoad/$g)]; #Lumped mass at deck nodes
#mass nodetag Mx My Mz MRx MRy MRz
#Column Nodes
mass 63373 $CNodeMass $CNodeMass $CNodeMass 0 0 0;
mass 63374 $CNodeMass $CNodeMass $CNodeMass 0 0 0;
#Beam Nodes
mass 63375 [expr $BNodeMass/2.] [expr $BNodeMass/2.] [expr $BNodeMass/2.] 0 0 0; #1/2 beam
mass 63376 $BNodeMass $BNodeMass $BNodeMass 0 0 0;
mass 63377 [expr $CNodeMass+$BNodeMass] [expr $CNodeMass+$BNodeMass] [expr $CNodeMass+$BNodeMass] 0 0 0; # Beam + column
mass 63378 $BNodeMass $BNodeMass $BNodeMass 0 0 0;
mass 63379 $BNodeMass $BNodeMass $BNodeMass 0 0 0;
mass 63380 [expr $DNodeMass+$BNodeMass] [expr $DNodeMass+$BNodeMass] [expr $DNodeMass+$BNodeMass] 0 0 0; #deck + beam
mass 63381 $BNodeMass $BNodeMass $BNodeMass 0 0 0;
mass 63382 $BNodeMass $BNodeMass $BNodeMass 0 0 0;
mass 63383 [expr $CNodeMass+$BNodeMass] [expr $CNodeMass+$BNodeMass] [expr $CNodeMass+$BNodeMass] 0 0 0; # Beam + column
mass 63384 $BNodeMass $BNodeMass $BNodeMass 0 0 0;
mass 63385 [expr $BNodeMass/2.] [expr $BNodeMass/2.] [expr $BNodeMass/2.] 0 0 0; #1/2 beam
#Deck Nodes
#SPAN 1
mass 63386 [expr $DNodeMass/2.] [expr $DNodeMass/2.] [expr $DNodeMass/2.] 0 0 0; #1/2 deck
mass 63387 $DNodeMass $DNodeMass $DNodeMass 0 0 0;
mass 63388 $DNodeMass $DNodeMass $DNodeMass 0 0 0;
mass 63389 $DNodeMass $DNodeMass $DNodeMass 0 0 0;
mass 63390 $DNodeMass $DNodeMass $DNodeMass 0 0 0;
mass 63391 $DNodeMass $DNodeMass $DNodeMass 0 0 0;
mass 63392 $DNodeMass $DNodeMass $DNodeMass 0 0 0;
mass 63393 $DNodeMass $DNodeMass $DNodeMass 0 0 0;
mass 63394 $DNodeMass $DNodeMass $DNodeMass 0 0 0;
mass 63395 $DNodeMass $DNodeMass $DNodeMass 0 0 0;
mass 63396 $DNodeMass $DNodeMass $DNodeMass 0 0 0;
mass 63397 $DNodeMass $DNodeMass $DNodeMass 0 0 0;
mass 63398 $DNodeMass $DNodeMass $DNodeMass 0 0 0;
mass 63399 $DNodeMass $DNodeMass $DNodeMass 0 0 0;
mass 63400 $DNodeMass $DNodeMass $DNodeMass 0 0 0;
mass 63401 $DNodeMass $DNodeMass $DNodeMass 0 0 0;
mass 63402 $DNodeMass $DNodeMass $DNodeMass 0 0 0;
mass 63403 $DNodeMass $DNodeMass $DNodeMass 0 0 0;
mass 63404 $DNodeMass $DNodeMass $DNodeMass 0 0 0;
mass 63405 $DNodeMass $DNodeMass $DNodeMass 0 0 0;
#SPAN 2
mass 63406 $DNodeMass $DNodeMass $DNodeMass 0 0 0;
mass 63407 $DNodeMass $DNodeMass $DNodeMass 0 0 0;
mass 63408 $DNodeMass $DNodeMass $DNodeMass 0 0 0;
mass 63409 $DNodeMass $DNodeMass $DNodeMass 0 0 0;
mass 63410 $DNodeMass $DNodeMass $DNodeMass 0 0 0;
mass 63411 $DNodeMass $DNodeMass $DNodeMass 0 0 0;
mass 63412 $DNodeMass $DNodeMass $DNodeMass 0 0 0;
mass 63413 $DNodeMass $DNodeMass $DNodeMass 0 0 0;
mass 63414 $DNodeMass $DNodeMass $DNodeMass 0 0 0;
mass 63415 $DNodeMass $DNodeMass $DNodeMass 0 0 0;
mass 63416 $DNodeMass $DNodeMass $DNodeMass 0 0 0;
mass 63417 $DNodeMass $DNodeMass $DNodeMass 0 0 0;
mass 63418 $DNodeMass $DNodeMass $DNodeMass 0 0 0;
mass 63419 $DNodeMass $DNodeMass $DNodeMass 0 0 0;
mass 63420 $DNodeMass $DNodeMass $DNodeMass 0 0 0;
mass 63421 $DNodeMass $DNodeMass $DNodeMass 0 0 0;
mass 63422 $DNodeMass $DNodeMass $DNodeMass 0 0 0;
mass 63423 $DNodeMass $DNodeMass $DNodeMass 0 0 0;
mass 63424 $DNodeMass $DNodeMass $DNodeMass 0 0 0;
mass 63425 [expr $DNodeMass/2.] [expr $DNodeMass/2.] [expr $DNodeMass/2.] 0 0 0; #1/2 deck
puts "Masses Defined"
#create load pattern for gravity load
pattern Plain 1 Linear {
#Column Nodes, concentrated in the y-direction
load 63373 0 $CNodeLoad 0 0 0 0;
load 63374 0 $CNodeLoad 0 0 0 0;
#Beam Nodes
load 63375 0 [expr $BNodeLoad/2] 0 0 0 0; #1/2 beam load
load 63376 0 $BNodeLoad 0 0 0 0;
load 63377 0 [expr $CNodeLoad +$BNodeLoad] 0 0 0 0; # Beam + column
load 63378 0 $BNodeLoad 0 0 0 0;
load 63379 0 $BNodeLoad 0 0 0 0;
load 63380 0 [expr $BNodeLoad+$DNodeLoad] 0 0 0 0; # Midspan node
load 63381 0 $BNodeLoad 0 0 0 0;
load 63382 0 $BNodeLoad 0 0 0 0;
load 63383 0 [expr $CNodeLoad +$BNodeLoad] 0 0 0 0; # Beam + column
load 63384 0 $BNodeLoad 0 0 0 0;
load 63385 0 [expr $BNodeLoad/2] 0 0 0 0; #1/2 beam load
#Deck Nodes, concentrated in the y-direction
#SPAN 1
load 63386 0 [expr $DNodeLoad/2.] 0 0 0 0; #1/2 deck load
load 63387 0 $DNodeLoad 0 0 0 0;
load 63388 0 $DNodeLoad 0 0 0 0;
load 63389 0 $DNodeLoad 0 0 0 0;
load 63390 0 $DNodeLoad 0 0 0 0;
load 63391 0 $DNodeLoad 0 0 0 0;
load 63392 0 $DNodeLoad 0 0 0 0;
load 63393 0 $DNodeLoad 0 0 0 0;
load 63394 0 $DNodeLoad 0 0 0 0;
load 63395 0 $DNodeLoad 0 0 0 0;
load 63396 0 $DNodeLoad 0 0 0 0;
load 63397 0 $DNodeLoad 0 0 0 0;
load 63398 0 $DNodeLoad 0 0 0 0;
load 63399 0 $DNodeLoad 0 0 0 0;
load 63400 0 $DNodeLoad 0 0 0 0;
load 63401 0 $DNodeLoad 0 0 0 0;
load 63402 0 $DNodeLoad 0 0 0 0;
load 63403 0 $DNodeLoad 0 0 0 0;
load 63404 0 $DNodeLoad 0 0 0 0;
load 63405 0 $DNodeLoad 0 0 0 0;
#SPAN 2
load 63406 0 $DNodeLoad 0 0 0 0;
load 63407 0 $DNodeLoad 0 0 0 0;
load 63408 0 $DNodeLoad 0 0 0 0;
load 63409 0 $DNodeLoad 0 0 0 0;
load 63410 0 $DNodeLoad 0 0 0 0;
load 63411 0 $DNodeLoad 0 0 0 0;
load 63412 0 $DNodeLoad 0 0 0 0;
load 63413 0 $DNodeLoad 0 0 0 0;
load 63414 0 $DNodeLoad 0 0 0 0;
load 63415 0 $DNodeLoad 0 0 0 0;
load 63416 0 $DNodeLoad 0 0 0 0;
load 63417 0 $DNodeLoad 0 0 0 0;
load 63418 0 $DNodeLoad 0 0 0 0;
load 63419 0 $DNodeLoad 0 0 0 0;
load 63420 0 $DNodeLoad 0 0 0 0;
load 63421 0 $DNodeLoad 0 0 0 0;
load 63422 0 $DNodeLoad 0 0 0 0;
load 63423 0 $DNodeLoad 0 0 0 0;
load 63424 0 $DNodeLoad 0 0 0 0;
load 63425 0 [expr $DNodeLoad/2.] 0 0 0 0; #1/2 deck load
}
puts "Loads Defined"
constraints Plain; # how it handles boundary conditions (single and multi-point constraints)
numberer RCM; # renumber dof's to minimize band-width (optimization)
system BandGeneral; # how to store and solve the system of equations in the analysis
#Convergence Test
set TestTypeGravity NormDispIncr; # Convergence Test: type
set TolGravity 1.0e-10; # Convergence Test: tolerance
set maxNumIterGravity 10; # Convergence Test: max number of iterations
set printFlagGravity 0; # Convergence Test: flag used to print information on convergence (optional) # 1: print information on each step;
test $TestTypeGravity $TolGravity $maxNumIterGravity $printFlagGravity;
#Integrator
set NstepGravity 10; # apply gravity in 20 steps
set DGravity [expr 1./$NstepGravity]; # Gravity load increment;
integrator LoadControl 0.1; # Determine the next time step for an analysis
#Algorithm
set algorithmTypeGravity Linear; # use Newton's solution algorithm: updates tangent stiffness at every iteration
algorithm $algorithmTypeGravity;
#Analysis
set InTG [clock microseconds]
analysis Static; # define type of analysis static or transient
analyze $NstepGravity; # Apply Gravity load
set FiTG [clock microseconds]
set ComT [expr ($FiTG-$InTG)/1.e6]
puts "Computational time for Gravity Analysis: $ComT"