constraints Command

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

Moderators: silvia, selimgunay, Moderators

Post Reply
sama
Posts: 21
Joined: Sat Mar 05, 2011 11:46 pm
Location: Iran

constraints Command

Post by sama »

Dear Vesna,
I want to model a 2-D bracing frame. I have defined lumed mass for each storey and put it on one of each floor nodes. I used EqualDof to consider the diafragm.(all of the nodes in each floor have the same displacement because, in the main model which is a 3-D model we have diaphragm). so I constrained all of the each floor nodes to the node which I assigned the lumped mass to it.
then, again I used EqualDof to model the pinned conections of bracings. so that I have intruduced extra nodes in the beam column connection intersections and then constrained these extra nodes in transitional Dof to move axactly as the nodes which beam and columns elements are attached to; these nodes were constrained to the nodes where I have assigned the lumped mass before(series).
I want to perform transient and static analysis and also eigen(modal analysis).
Now I have the following questions:
1- what kind of constraints command should I use in analysis?
2- I used all of the possible constrained command(plain-transformation-penalty and lagrange) and used the display recorder. in the mode shape figures, it shows that bracing dooesnt work properly. I it can be seen that bracings dont constrained to the main nodes.
here is the code.
3- buckling of bracings are very important, should I divide eache bracing in to more elements in roder to consider buckling,
4- also I want to consider shears, do I have to use section agregator. because somewhere in the manual, i read something about it. if yes how?
5- how can I save the images or save some movie.

here is the code


# SET UP ----------------------------------------------------------------------------
# clear memory of all past model definitions
wipe
# set up name of data directory
set dataDir Data
# create data directory
file mkdir $dataDir

#Dual 10storey model
#units metric kg sec
#start model generation
#creat modelbuilder ( 2dimensional and 3 degree of freedom for each node0

model basic -ndm 2 -ndf 3

#create nodes
#node nodetag x y
node 10 0.0 0.0
node 11 0.0 3.50
node 12 0.0 7.00
node 13 0.0 10.50
node 14 0.0 14.00
node 15 0.0 17.50
node 16 0.0 21.00
node 17 0.0 24.50
node 18 0.0 28.00
node 19 0.0 31.50
node 110 0.0 35.00

node 20 6.0 0.0
node 21 6.0 3.50
node 22 6.0 7.00
node 23 6.0 10.50
node 24 6.0 14.00
node 25 6.0 17.50
node 26 6.0 21.00
node 27 6.0 24.50
node 28 6.0 28.00
node 29 6.0 31.50
node 210 6.0 35.00

node 30 12.0 0.0
node 31 12.0 3.50
node 32 12.0 7.00
node 33 12.0 10.50
node 34 12.0 14.00
node 35 12.0 17.50
node 36 12.0 21.00
node 37 12.0 24.50
node 38 12.0 28.00
node 39 12.0 31.50
node 310 12.0 35.00

node 40 18.0 0.0
node 41 18.0 3.50
node 42 18.0 7.00
node 43 18.0 10.50
node 44 18.0 14.00
node 45 18.0 17.50
node 46 18.0 21.00
node 47 18.0 24.50
node 48 18.0 28.00
node 49 18.0 31.50
node 410 18.0 35.00

node 50 24.0 0.0
node 51 24.0 3.50
node 52 24.0 7.00
node 53 24.0 10.50
node 54 24.0 14.00
node 55 24.0 17.50
node 56 24.0 21.00
node 57 24.0 24.50
node 58 24.0 28.00
node 59 24.0 31.50
node 510 24.0 35.00

node 60 30.0 0.0
node 61 30.0 3.50
node 62 30.0 7.00
node 63 30.0 10.50
node 64 30.0 14.00
node 65 30.0 17.50
node 66 30.0 21.00
node 67 30.0 24.50
node 68 30.0 28.00
node 69 30.0 31.50
node 610 30.0 35.00


#################################################################
#NODES FOR BRACING
#################################################################
node 2000 6.0 0.0
node 2100 6.0 3.50
node 2200 6.0 7.00
node 2300 6.0 10.50
node 2400 6.0 14.00
node 2500 6.0 17.50
node 2600 6.0 21.00
node 2700 6.0 24.50
node 2800 6.0 28.00
node 2900 6.0 31.50
node 21000 6.0 35.00

node 3000 12.0 0.0
node 3100 12.0 3.50
node 3200 12.0 7.00
node 3300 12.0 10.50
node 3400 12.0 14.00
node 3500 12.0 17.50
node 3600 12.0 21.00
node 3700 12.0 24.50
node 3800 12.0 28.00
node 3900 12.0 31.50
node 31000 12.0 35.00

node 4000 18.0 0.0
node 4100 18.0 3.50
node 4200 18.0 7.00
node 4300 18.0 10.50
node 4400 18.0 14.00
node 4500 18.0 17.50
node 4600 18.0 21.00
node 4700 18.0 24.50
node 4800 18.0 28.00
node 4900 18.0 31.50
node 41000 18.0 35.00

node 5000 24.0 0.0
node 5100 24.0 3.50
node 5200 24.0 7.00
node 5300 24.0 10.50
node 5400 24.0 14.00
node 5500 24.0 17.50
node 5600 24.0 21.00
node 5700 24.0 24.50
node 5800 24.0 28.00
node 5900 24.0 31.50
node 51000 24.0 35.00
#################################################################
## BRACING CONNECTION
#################################################################

equalDOF 20 2000 1 2
equalDOF 21 2100 1 2
equalDOF 22 2200 1 2
equalDOF 23 2300 1 2
equalDOF 24 2400 1 2
equalDOF 25 2500 1 2
equalDOF 26 2600 1 2
equalDOF 27 2700 1 2
equalDOF 28 2800 1 2
equalDOF 29 2900 1 2
equalDOF 210 21000 1 2


equalDOF 30 3000 1 2
equalDOF 31 3100 1 2
equalDOF 32 3200 1 2
equalDOF 33 3300 1 2
equalDOF 34 3400 1 2
equalDOF 35 3500 1 2
equalDOF 36 3600 1 2
equalDOF 37 3700 1 2
equalDOF 38 3800 1 2
equalDOF 39 3900 1 2
equalDOF 310 31000 1 2



equalDOF 40 4000 1 2
equalDOF 41 4100 1 2
equalDOF 42 4200 1 2
equalDOF 43 4300 1 2
equalDOF 44 4400 1 2
equalDOF 45 4500 1 2
equalDOF 46 4600 1 2
equalDOF 47 4700 1 2
equalDOF 48 4800 1 2
equalDOF 49 4900 1 2
equalDOF 410 41000 1 2



equalDOF 50 5000 1 2
equalDOF 51 5100 1 2
equalDOF 52 5200 1 2
equalDOF 53 5300 1 2
equalDOF 54 5400 1 2
equalDOF 55 5500 1 2
equalDOF 56 5600 1 2
equalDOF 57 5700 1 2
equalDOF 58 5800 1 2
equalDOF 59 5900 1 2
equalDOF 510 51000 1 2

#################################################################
#supports constrained
#fix nodetag dx dy rz

fix 10 1 1 1
fix 20 1 1 1
fix 30 1 1 1
fix 40 1 1 1
fix 50 1 1 1
fix 60 1 1 1


# equalDOF $rNodeTag $cNodeTag $dof1 $dof2 ...

equalDOF 41 11 1
equalDOF 41 21 1
equalDOF 41 31 1
equalDOF 41 51 1
equalDOF 41 61 1
#

equalDOF 42 12 1
equalDOF 42 22 1
equalDOF 42 32 1
equalDOF 42 52 1
equalDOF 42 62 1
#


equalDOF 43 13 1
equalDOF 43 23 1
equalDOF 43 33 1
equalDOF 43 53 1
equalDOF 43 63 1
#
equalDOF 44 14 1
equalDOF 44 24 1
equalDOF 44 34 1
equalDOF 44 54 1
equalDOF 44 64 1
#
equalDOF 45 15 1
equalDOF 45 25 1
equalDOF 45 35 1
equalDOF 45 55 1
equalDOF 45 65 1
#
equalDOF 46 16 1
equalDOF 46 26 1
equalDOF 46 36 1
equalDOF 46 56 1
equalDOF 46 66 1
#
equalDOF 47 17 1
equalDOF 47 27 1
equalDOF 47 37 1
equalDOF 47 57 1
equalDOF 47 67 1
#
equalDOF 48 18 1
equalDOF 48 28 1
equalDOF 48 38 1
equalDOF 48 58 1
equalDOF 48 68 1
#
equalDOF 49 19 1
equalDOF 49 29 1
equalDOF 49 39 1
equalDOF 49 59 1
equalDOF 49 69 1
#
equalDOF 410 110 1
equalDOF 410 210 1
equalDOF 410 310 1
equalDOF 410 510 1
equalDOF 410 610 1
#



# MATERIAL DEFINITION

#elastic perfectly plastic material
#uniaxialMaterial ElasticPP $matTag $E $epsyP <$epsyN $eps0>
#--------------------------------------------------------



#uniaxialMaterial ElasticPP 1 20390000000 0.001724 -0.001724 0
#uniaxialMaterial ElasticPP 2 20390000000 0.001241 -0.001241 0



#----------------------------------------------------------
#hardening material
#uniaxialMaterial Hardening $matTag $E $sigmaY $H_ISO $H_kin <$eta>
#--------------------------------------------------------




uniaxialMaterial Hardening 1 20390000000 24000000 0 703103448





# uniaxialMaterial Hardening 2 20390000000 25310930 0 703103448
#----------------------------------------------------------

#HYSTERETIC MATERIAL
# uniaxialMaterial Hysteretic $matTag $s1p $e1p $s2p $e2p <$s3p $e3p> $s1n
# $e1n $s2n $e2n <$s3n $e3n> $pinchX $pinchY $damage1 $damage2
# <$beta>


# uniaxialMaterial Hysteretic 1 35153481 0.001724 35153481 0.015 44300660 0.17 -35153481 -0.001274 -35153481 -0.015 -44300660 -0.17 1 1 0.0 0.0 0
# uniaxialMaterial Hysteretic 2 25310930 0.001241 25310930 0.02 39382805 0.2 -25310930 -0.001241 -25310930 -0.02 -39382805 -0.2 1 1 0.0 0.0 0






# mass definition Dual 10

# concentrated mass on first floor (m1= 51372.28)
# concentrated mass on 2 - 9 floor (m2= 50494.25)
# concentrated mass on roof (m3= 54393.31 )
set m1 51372.28
set m2 50494.25
set m3 54393.31
mass 41 $m1 1 0.0
mass 42 $m2 1 0.0
mass 43 $m2 1 0.0
mass 44 $m2 1 0.0
mass 45 $m2 1 0.0
mass 46 $m2 1 0.0
mass 47 $m2 1 0.0
mass 48 $m2 1 0.0
mass 49 $m2 1 0.0
mass 410 $m3 1 0.0
# end of mass definition for sac 9

# end of mass definition




# create a standard HSS section given the nominal section properties
# ###################################################################

#HSS 5 X 5 X 3/8

# ###################################################################

section fiberSec 401 {
# nfIJ nfJK yI zI yJ zJ yK zK yL zL

patch quadr 1 12 12 -0.0635 0.0635 -0.0635 0.054635 0.0635 0.054635 0.0635 0.0635
patch quadr 1 12 12 -0.0635 0.054635 -0.0635 -0.054635 -0.054635 -0.054635 -0.054635 0.054635
patch quadr 1 12 12 0.054635 0.054635 0.054635 -0.054635 0.0635 -0.054635 0.0635 0.054635
patch quadr 1 12 12 -0.0635 -0.0635 0.0635 -0.0635 0.0635 -0.054635 -0.0635 -0.054635
}

# ###################################################################
# ###################################################################

#HSS 6 X 6 X 3/8

# ###################################################################

section fiberSec 402 {
# nfIJ nfJK yI zI yJ zJ yK zK yL zL

patch quadr 1 12 12 -0.0762 0.0762 -0.0762 0.067335 0.0762 0.067335 0.0762 0.0762
patch quadr 1 12 12 -0.0762 0.067335 -0.0762 -0.067335 -0.067335 -0.067335 -0.067335 0.067335
patch quadr 1 12 12 0.067335 0.067335 0.067335 -0.067335 0.0762 -0.067335 0.0762 0.067335
patch quadr 1 12 12 -0.0762 -0.0762 0.0762 -0.0762 0.0762 -0.067335 -0.0762 -0.067335
}

# ###################################################################








# create a standard box section given the nominal section properties
# ###################################################################

#BOX30-1.5

# ###################################################################

section fiberSec 301 {
# nfIJ nfJK yI zI yJ zJ yK zK yL zL

patch quadr 1 12 12 -0.15 0.15 -0.15 0.135 0.15 0.135 0.15 0.15
patch quadr 1 12 12 -0.15 0.135 -0.15 -0.135 -0.135 -0.135 -0.135 0.135
patch quadr 1 12 12 0.135 0.135 0.135 -0.135 0.15 -0.135 0.15 0.135
patch quadr 1 12 12 -0.15 -0.15 0.15 -0.15 0.15 -0.135 -0.15 -0.135
}

# ###################################################################


#BOX30-2

# ###################################################################

section fiberSec 302 {
# nfIJ nfJK yI zI yJ zJ yK zK yL zL

patch quadr 1 12 12 -0.15 0.15 -0.15 0.13 0.15 0.13 0.15 0.15
patch quadr 1 12 12 -0.15 0.13 -0.15 -0.13 -0.13 -0.13 -0.13 0.13
patch quadr 1 12 12 0.13 0.13 0.13 -0.13 0.15 -0.13 0.15 0.13
patch quadr 1 12 12 -0.15 -0.15 0.15 -0.15 0.15 -0.13 -0.15 -0.13
}

# ###################################################################

#BOX30-2.5

# ###################################################################

section fiberSec 303 {
# nfIJ nfJK yI zI yJ zJ yK zK yL zL

patch quadr 1 12 12 -0.15 0.15 -0.15 0.125 0.15 0.125 0.15 0.15
patch quadr 1 12 12 -0.15 0.125 -0.15 -0.125 -0.125 -0.125 -0.125 0.125
patch quadr 1 12 12 0.125 0.125 0.125 -0.125 0.15 -0.125 0.15 0.125
patch quadr 1 12 12 -0.15 -0.15 0.15 -0.15 0.15 -0.125 -0.15 -0.125
}

# ###################################################################

#BOX30-3

# ###################################################################

section fiberSec 304 {
# nfIJ nfJK yI zI yJ zJ yK zK yL zL

patch quadr 1 12 12 -0.15 0.15 -0.15 0.12 0.15 0.12 0.15 0.15
patch quadr 1 12 12 -0.15 0.12 -0.15 -0.12 -0.12 -0.12 -0.12 0.12
patch quadr 1 12 12 0.12 0.12 0.12 -0.12 0.15 -0.12 0.15 0.12
patch quadr 1 12 12 -0.15 -0.15 0.15 -0.15 0.15 -0.12 -0.15 -0.12
}

# ###################################################################

#BOX30-3.5

# ###################################################################

section fiberSec 305 {
# nfIJ nfJK yI zI yJ zJ yK zK yL zL

patch quadr 1 12 12 -0.15 0.15 -0.15 0.115 0.15 0.115 0.15 0.15
patch quadr 1 12 12 -0.15 0.115 -0.15 -0.115 -0.115 -0.115 -0.115 0.115
patch quadr 1 12 12 0.115 0.115 0.115 -0.115 0.15 -0.115 0.15 0.115
patch quadr 1 12 12 -0.15 -0.15 0.15 -0.15 0.15 -0.115 -0.15 -0.115
}

# ###################################################################

#BOX30-4

# ###################################################################

section fiberSec 306 {
# nfIJ nfJK yI zI yJ zJ yK zK yL zL

patch quadr 1 12 12 -0.15 0.15 -0.15 0.11 0.15 0.11 0.15 0.15
patch quadr 1 12 12 -0.15 0.11 -0.15 -0.11 -0.11 -0.11 -0.11 0.11
patch quadr 1 12 12 0.11 0.11 0.11 -0.11 0.15 -0.11 0.15 0.11
patch quadr 1 12 12 -0.15 -0.15 0.15 -0.15 0.15 -0.11 -0.15 -0.11
}

# ###################################################################
#BOX30-4.5

# ###################################################################

section fiberSec 307 {
# nfIJ nfJK yI zI yJ zJ yK zK yL zL

patch quadr 1 12 12 -0.15 0.15 -0.15 0.105 0.15 0.105 0.15 0.15
patch quadr 1 12 12 -0.15 0.105 -0.15 -0.105 -0.105 -0.105 -0.105 0.105
patch quadr 1 12 12 0.105 0.105 0.105 -0.105 0.15 -0.105 0.15 0.105
patch quadr 1 12 12 -0.15 -0.15 0.15 -0.15 0.15 -0.105 -0.15 -0.105
}

# ###################################################################







proc weaksection { secID matID dl bff tff tww nfdww nftww nfbff nftff} {
# ###################################################################
# Wsection $secID $matID $d $bf $tf $tw $nfdw $nftw $nfbf $nftf
# ###################################################################
# create a standard W section given the nominal section properties
# written: basir farhadi
# date: 2009
# modified: 2009 (according to the new general modelbuilder)
# input parameters
# secID - section ID number
# matID - material ID number
# dl = nominal depth
# tww = web thickness
# bff = flange width
# tff = flange thickness
# nfdww = number of fibers along web depth
# nftww = number of fibers along web thickness
# nfbff = number of fibers along flange width
# nftff = number of fibers along flange thickness

set dlw [expr $dl - 2 * $tff]
set yy1 [expr -$dl/2]
set yy2 [expr -$dlw/2]
set yy3 [expr $dlw/2]
set yy4 [expr $dl/2]

set zz1 [expr -$bff/2]
set zz2 [expr -$tww/2]
set zz3 [expr $tww/2]
set zz4 [expr $bff/2]

section fiberSec $secID {
# nfIJ nfJK yI zI yJ zJ yK zK yL zL
patch quadr $matID $nfbff $nftff $zz1 $yy1 $zz4 $yy1 $zz4 $yy2 $zz1 $yy2
patch quadr $matID $nftww $nfdww $zz2 $yy2 $zz3 $yy2 $zz3 $yy3 $zz2 $yy3
patch quadr $matID $nfbff $nftff $zz1 $yy3 $zz4 $yy3 $zz4 $yy4 $zz1 $yy4
}
}


proc Wsection { secID matID d bf tf tw nfdw nftw nfbf nftf} {
# ###################################################################
# Wsection $secID $matID $d $bf $tf $tw $nfdw $nftw $nfbf $nftf
# ###################################################################
# create a standard W section given the nominal section properties
# written: Remo M. de Souza
# date: 06/99
# modified: 08/99 (according to the new general modelbuilder)
# input parameters
# secID - section ID number
# matID - material ID number
# d = nominal depth
# tw = web thickness
# bf = flange width
# tf = flange thickness
# nfdw = number of fibers along web depth
# nftw = number of fibers along web thickness
# nfbf = number of fibers along flange width
# nftf = number of fibers along flange thickness

set dw [expr $d - 2 * $tf]
set y1 [expr -$d/2]
set y2 [expr -$dw/2]
set y3 [expr $dw/2]
set y4 [expr $d/2]

set z1 [expr -$bf/2]
set z2 [expr -$tw/2]
set z3 [expr $tw/2]
set z4 [expr $bf/2]

section fiberSec $secID {
# nfIJ nfJK yI zI yJ zJ yK zK yL zL
patch quadr $matID $nfbf $nftf $y1 $z4 $y1 $z1 $y2 $z1 $y2 $z4
patch quadr $matID $nftw $nfdw $y2 $z3 $y2 $z2 $y3 $z2 $y3 $z3
patch quadr $matID $nfbf $nftf $y3 $z4 $y3 $z1 $y4 $z1 $y4 $z4
}
}







# create a standard W section given the nominal section properties
# ###################################################################
# Wsection $secID $matID $d $bf $tf $tw $nfdw $nftw $nfbf $nftf



# ###################################################################
#--------------------------------------------------------------------
# W12X22
Wsection 201 1 0.3124 0.1024 0.0108 0.006604 12 4 12 4

# ###################################################################
#--------------------------------------------------------------------
# ###################################################################
#--------------------------------------------------------------------
# W12X26
Wsection 202 1 0.3099 0.1648 0.009652 0.005842 12 4 12 4

# ###################################################################
#--------------------------------------------------------------------
# ###################################################################
#--------------------------------------------------------------------
# W12X30
Wsection 203 1 0.3124 0.1656 0.0112 0.006604 12 4 12 4

# ###################################################################
#--------------------------------------------------------------------
# ###################################################################
#--------------------------------------------------------------------
# W12X35
Wsection 204 1 0.3175 0.1666 0.0132 0.007620 12 4 12 4

# ###################################################################
#--------------------------------------------------------------------
# ###################################################################
#--------------------------------------------------------------------
# W12X40
Wsection 205 1 0.3023 0.2035 0.0131 0.007493 12 4 12 4

# ###################################################################
#--------------------------------------------------------------------
# ###################################################################
#--------------------------------------------------------------------
# W24X335
Wsection 1 1 0.6985 0.3429 0.063 0.0351 12 4 12 4

# ###################################################################
#--------------------------------------------------------------------
# W24X229
Wsection 2 1 0.6604 0.3327 0.0439 0.0244 12 4 12 4
# ###################################################################
#--------------------------------------------------------------------
# W24X192
Wsection 3 1 0.6477 0.3302 0.0371 0.0206 12 4 12 4
# ###################################################################
#--------------------------------------------------------------------
# W24X131
Wsection 4 1 0.6223 0.3277 0.0244 0.0154 12 4 12 4
# ###################################################################
#--------------------------------------------------------------------
# W24X117
Wsection 5 1 0.6172 0.3251 0.0216 0.014 12 4 12 4
# ###################################################################
#--------------------------------------------------------------------
# W24X84
Wsection 6 1 0.6121 0.2291 0.0196 0.0119 12 4 12 4
# ###################################################################
#--------------------------------------------------------------------
# W14X22
Wsection 7 1 0.348 0.127 0.008509 0.005842 12 4 12 4
# ###################################################################
#--------------------------------------------------------------------
# W30X99
Wsection 8 1 0.7544 0.2667 0.017 0.0132 12 4 12 4
# ###################################################################
#--------------------------------------------------------------------
# W30X108
Wsection 9 1 0.7569 0.2667 0.0193 0.0138 12 4 12 4
# ###################################################################
#--------------------------------------------------------------------
# W27X84
Wsection 10 1 0.6782 0.254 0.0163 0.0117 12 4 12 4
# ###################################################################
#--------------------------------------------------------------------
# W24X62
Wsection 11 1 0.602 0.1788 0.0150 0.0109 12 4 12 4
# ###################################################################
#--------------------------------------------------------------------
# W21X50
Wsection 12 1 0.5283 0.1659 0.0136 0.009652 12 4 12 4
# ###################################################################
#--------------------------------------------------------------------
# W14X257
Wsection 13 1 0.4166 0.4064 0.048 0.03 12 4 12 4
# ###################################################################
#--------------------------------------------------------------------
# W14X311
Wsection 14 1 0.4343 0.4115 0.0574 0.0358 12 4 12 4
# ###################################################################
#--------------------------------------------------------------------
# W33X118
Wsection 15 1 0.8357 0.2921 0.0188 0.014 12 4 12 4
# ###################################################################
#--------------------------------------------------------------------
# W30X116
Wsection 16 1 0.762 0.2667 0.0216 0.0144 12 4 12 4
# ###################################################################
#--------------------------------------------------------------------
# W24X68
Wsection 17 1 0.602 0.2278 0.0149 0.0105 12 4 12 4
# ###################################################################
#--------------------------------------------------------------------
# W14X370
Wsection 18 1 0.4547 0.4191 0.0676 0.0422 12 4 12 4
# ###################################################################
#--------------------------------------------------------------------
# W14X283
Wsection 19 1 0.4242 0.4089 0.0526 0.0328 12 4 12 4
# ###################################################################
#--------------------------------------------------------------------
# W14X233
Wsection 20 1 0.4064 0.4039 0.0437 0.0272 12 4 12 4
# ###################################################################
#--------------------------------------------------------------------
# W14X500
Wsection 21 1 0.4978 0.4318 0.0889 0.0556 12 4 12 4
# ###################################################################
#--------------------------------------------------------------------
# W14X455
Wsection 22 1 0.4826 0.4267 0.0815 0.0513 12 4 12 4
# ###################################################################
#--------------------------------------------------------------------
# W36X160
Wsection 23 1 0.9144 0.3048 0.0259 0.0165 12 4 12 4
# ###################################################################
#--------------------------------------------------------------------
# W36X135
Wsection 24 1 0.9042 0.3048 0.0201 0.0152 12 4 12 4
# ###################################################################
#--------------------------------------------------------------------
# W30X99
Wsection 25 1 0.7544 0.2667 0.017 0.0132 12 4 12 4
# ###################################################################
#--------------------------------------------------------------------
# W14X370
weaksection 41 1 0.4547 0.4191 0.0676 0.0422 12 12 12 12
# ###################################################################
#--------------------------------------------------------------------
# W14X283
weaksection 42 1 0.4242 0.4089 0.0526 0.0328 12 12 12 12
# ###################################################################
#--------------------------------------------------------------------
# ###################################################################
#--------------------------------------------------------------------
# W14X257
weaksection 43 1 0.4166 0.4064 0.048 0.03 12 12 12 12
# ###################################################################
#--------------------------------------------------------------------
# W14X233
weaksection 44 1 0.4064 0.4039 0.0437 0.0272 12 12 12 12
# ###################################################################
#--------------------------------------------------------------------






# sac 9 element model
# element difintion and linear geometry transformation
# Linear Transformation
# This command is used to construct a linear coordinate transformation (LinearCrdTransf)
# object which performs a linear geometric transformation of beam stiffness and resisting
# force from thebasic system to the global-coordinate system.
# For a two-dimensional problem:
# geomTransf Linear $transfTag <-jntOffset $dXi $dYi $dXj $dYj>
# ######################################################################
# ----------------------------------------------------------------------
# Nonlinear Beam Column Element
# This command is used to construct a nonlinearBeamColumn element object, which is based on
# the non-iterative (or iterative) force formulation, and considers the spread of plasticity
# along the element.
# element nonlinearBeamColumn $eleTag $iNode $jNode $numIntgrPts $secTag
# $transfTag <-mass $massDens> <-iter $maxIters $tol>
# ######################################################################
#-----------------------------------------------------------------------
# $eleTag unique element object tag
# $iNode $jNode end nodes
# $numIntgrPts number of integration points along the element.
# $secTag identifier for previously-defined section (page 191) object
# $transfTag identifier for previously-defined coordinate-transformation (page
# 280) (CrdTransf) object
# $massDens element mass density (per unit length), from which a
# lumped-mass matrix is formed (optional, default=0.0)
# $maxIters maximum number of iterations to undertake to satisfy element
# compatibility (optional, default=1)
# $tol tolerance for satisfaction of element compatibility (optional,default=10-16)
# geomTransf Linear 1 for columns & geomTransf Linear 2 use for beams
geomTransf PDelta 1
geomTransf Linear 2
# #########################################################
# #########################################################
# #########################################################
# #########################################################
# column
# #########################################################
# #########################################################
# #########################################################
# #########################################################
# define nolinear column first row
# #########################################################

# element nonlinearBeamColumn $eleTag $iNode $jNode $numIntgrPts $secTag $transfTag <-mass $massDens> <-iter $maxIters $tol>

element nonlinearBeamColumn 11 10 11 5 301 1
element nonlinearBeamColumn 12 11 12 5 301 1
element nonlinearBeamColumn 13 12 13 5 301 1
element nonlinearBeamColumn 14 13 14 5 301 1
element nonlinearBeamColumn 15 14 15 5 301 1
element nonlinearBeamColumn 16 15 16 5 301 1
element nonlinearBeamColumn 17 16 17 5 301 1
element nonlinearBeamColumn 18 17 18 5 301 1
element nonlinearBeamColumn 19 18 19 5 301 1
element nonlinearBeamColumn 110 19 110 5 301 1

# #########################################################
# define nolinear column second row
# #########################################################
element nonlinearBeamColumn 21 20 21 5 307 1
element nonlinearBeamColumn 22 21 22 5 306 1
element nonlinearBeamColumn 23 22 23 5 304 1
element nonlinearBeamColumn 24 23 24 5 303 1
element nonlinearBeamColumn 25 24 25 5 302 1
element nonlinearBeamColumn 26 25 26 5 301 1
element nonlinearBeamColumn 27 26 27 5 301 1
element nonlinearBeamColumn 28 27 28 5 301 1
element nonlinearBeamColumn 29 28 29 5 301 1
element nonlinearBeamColumn 210 29 210 5 301 1
# #########################################################
# define nolinear column 3rd row
# #########################################################
element nonlinearBeamColumn 31 30 31 5 307 1
element nonlinearBeamColumn 32 31 32 5 306 1
element nonlinearBeamColumn 33 32 33 5 304 1
element nonlinearBeamColumn 34 33 34 5 303 1
element nonlinearBeamColumn 35 34 35 5 301 1
element nonlinearBeamColumn 36 35 36 5 301 1
element nonlinearBeamColumn 37 36 37 5 301 1
element nonlinearBeamColumn 38 37 38 5 301 1
element nonlinearBeamColumn 39 38 39 5 301 1
element nonlinearBeamColumn 310 39 310 5 301 1
# #########################################################
# define nolinear column 4th row
# #########################################################
element nonlinearBeamColumn 41 40 41 5 307 1
element nonlinearBeamColumn 42 41 42 5 306 1
element nonlinearBeamColumn 43 42 43 5 304 1
element nonlinearBeamColumn 44 43 44 5 303 1
element nonlinearBeamColumn 45 44 45 5 301 1
element nonlinearBeamColumn 46 45 46 5 301 1
element nonlinearBeamColumn 47 46 47 5 301 1
element nonlinearBeamColumn 48 47 48 5 301 1
element nonlinearBeamColumn 49 48 49 5 301 1
element nonlinearBeamColumn 410 49 410 5 301 1
# #########################################################
# define nolinear column 5th row
# #########################################################
element nonlinearBeamColumn 51 50 51 5 307 1
element nonlinearBeamColumn 52 51 52 5 306 1
element nonlinearBeamColumn 53 52 53 5 304 1
element nonlinearBeamColumn 54 53 54 5 303 1
element nonlinearBeamColumn 55 54 55 5 302 1
element nonlinearBeamColumn 56 55 56 5 301 1
element nonlinearBeamColumn 57 56 57 5 301 1
element nonlinearBeamColumn 58 57 58 5 301 1
element nonlinearBeamColumn 59 58 59 5 301 1
element nonlinearBeamColumn 510 59 510 5 301 1
# #########################################################
# define nolinear column last row
# #########################################################
element nonlinearBeamColumn 61 60 61 5 301 1
element nonlinearBeamColumn 62 61 62 5 301 1
element nonlinearBeamColumn 63 62 63 5 301 1
element nonlinearBeamColumn 64 63 64 5 301 1
element nonlinearBeamColumn 65 64 65 5 301 1
element nonlinearBeamColumn 66 65 66 5 301 1
element nonlinearBeamColumn 67 66 67 5 301 1
element nonlinearBeamColumn 68 67 68 5 301 1
element nonlinearBeamColumn 69 68 69 5 301 1
element nonlinearBeamColumn 610 69 610 5 301 1
# #########################################################
# #########################################################
# #########################################################
# #########################################################
# beam
# #########################################################
# #########################################################
# #########################################################
# #########################################################
# define nolinear beams 1st floor
# #########################################################

element nonlinearBeamColumn 1121 11 21 5 202 2
element nonlinearBeamColumn 2131 21 31 5 202 2
element nonlinearBeamColumn 3141 31 41 5 202 2
element nonlinearBeamColumn 4151 41 51 5 202 2
element nonlinearBeamColumn 5161 51 61 5 202 2



# #########################################################
# define nolinear beams 2nd floor
# #########################################################

element nonlinearBeamColumn 1222 12 22 5 202 2
element nonlinearBeamColumn 2232 22 32 5 202 2
element nonlinearBeamColumn 3242 32 42 5 202 2
element nonlinearBeamColumn 4252 42 52 5 202 2
element nonlinearBeamColumn 5262 52 62 5 202 2

# #########################################################
# define nolinear beams 3rd floor
# #########################################################

element nonlinearBeamColumn 1323 13 23 5 202 2
element nonlinearBeamColumn 2333 23 33 5 202 2
element nonlinearBeamColumn 3343 33 43 5 202 2
element nonlinearBeamColumn 4353 43 53 5 202 2
element nonlinearBeamColumn 5363 53 63 5 202 2

# #########################################################
# define nolinear beams 4th floor
# #########################################################

element nonlinearBeamColumn 1424 14 24 5 202 2
element nonlinearBeamColumn 2434 24 34 5 202 2
element nonlinearBeamColumn 3444 34 44 5 203 2
element nonlinearBeamColumn 4454 44 54 5 202 2
element nonlinearBeamColumn 5464 54 64 5 202 2

# #########################################################
# define nolinear beams 5th floor
# #########################################################

element nonlinearBeamColumn 1525 15 25 5 202 2
element nonlinearBeamColumn 2535 25 35 5 202 2
element nonlinearBeamColumn 3545 35 45 5 204 2
element nonlinearBeamColumn 4555 45 55 5 202 2
element nonlinearBeamColumn 5565 55 65 5 202 2

# #########################################################
# define nolinear beams 6th floor
# #########################################################

element nonlinearBeamColumn 1626 16 26 5 202 2
element nonlinearBeamColumn 2636 26 36 5 202 2
element nonlinearBeamColumn 3646 36 46 5 205 2
element nonlinearBeamColumn 4656 46 56 5 202 2
element nonlinearBeamColumn 5666 56 66 5 202 2

# #########################################################
# define nolinear beams 7th floor
# #########################################################

element nonlinearBeamColumn 1727 17 27 5 204 2
element nonlinearBeamColumn 2737 27 37 5 201 2
element nonlinearBeamColumn 3747 37 47 5 205 2
element nonlinearBeamColumn 4757 47 57 5 201 2
element nonlinearBeamColumn 5767 57 67 5 204 2

# #########################################################
# define nolinear beams 8th floor
# #########################################################

element nonlinearBeamColumn 1828 18 28 5 204 2
element nonlinearBeamColumn 2838 28 38 5 201 2
element nonlinearBeamColumn 3848 38 48 5 205 2
element nonlinearBeamColumn 4858 48 58 5 201 2
element nonlinearBeamColumn 5868 58 68 5 204 2

# #########################################################
# define nolinear beams 9th floor
# #########################################################

element nonlinearBeamColumn 1929 19 29 5 204 2
element nonlinearBeamColumn 2939 29 39 5 201 2
element nonlinearBeamColumn 3949 39 49 5 204 2
element nonlinearBeamColumn 4959 49 59 5 201 2
element nonlinearBeamColumn 5969 59 69 5 204 2

# #########################################################
# define nolinear beams 10th floor
# #########################################################

element nonlinearBeamColumn 110210 110 210 5 203 2
element nonlinearBeamColumn 210310 210 310 5 201 2
element nonlinearBeamColumn 310410 310 410 5 203 2
element nonlinearBeamColumn 410510 410 510 5 201 2
element nonlinearBeamColumn 510610 510 610 5 203 2

# #########################################################

# #########################################################
# define nolinear 1ST BRACING
# #########################################################

element nonlinearBeamColumn 2031 2000 3100 5 402 2
element nonlinearBeamColumn 4051 4000 5100 5 402 2
element nonlinearBeamColumn 3021 3000 2100 5 402 2
element nonlinearBeamColumn 5041 5000 4100 5 402 2


# #########################################################
# #########################################################
# define nolinear 2ND BRACING
# #########################################################

element nonlinearBeamColumn 2132 2100 3200 5 402 2
element nonlinearBeamColumn 4152 4100 5200 5 402 2
element nonlinearBeamColumn 3122 3100 2200 5 402 2
element nonlinearBeamColumn 5142 5100 4200 5 402 2


# #########################################################
# #########################################################
# define nolinear 3RD BRACING
# #########################################################

element nonlinearBeamColumn 2233 2200 3300 5 402 2
element nonlinearBeamColumn 4253 4200 5300 5 402 2
element nonlinearBeamColumn 3223 3200 2300 5 402 2
element nonlinearBeamColumn 5243 5200 4300 5 402 2


# #########################################################
# #########################################################
# define nolinear 4th BRACING
# #########################################################

element nonlinearBeamColumn 2334 2300 3400 5 402 2
element nonlinearBeamColumn 4354 4300 5400 5 402 2
element nonlinearBeamColumn 3324 3300 2400 5 402 2
element nonlinearBeamColumn 5344 5300 4400 5 402 2


# #########################################################
# #########################################################
# define nolinear 5th BRACING
# #########################################################

element nonlinearBeamColumn 2435 2400 3500 5 401 2
element nonlinearBeamColumn 4455 4400 5500 5 401 2
element nonlinearBeamColumn 3425 3400 2500 5 401 2
element nonlinearBeamColumn 5445 5400 4500 5 401 2


# #########################################################
# #########################################################
# define nolinear 6th BRACING
# #########################################################

element nonlinearBeamColumn 2536 2500 3600 5 401 2
element nonlinearBeamColumn 4556 4500 5600 5 401 2
element nonlinearBeamColumn 3526 3500 2600 5 401 2
element nonlinearBeamColumn 5546 5500 4600 5 401 2


# #########################################################
# #########################################################
# define nolinear 7th BRACING
# #########################################################

element nonlinearBeamColumn 2637 2600 3700 5 401 2
element nonlinearBeamColumn 4657 4600 5700 5 401 2
element nonlinearBeamColumn 3627 3600 2700 5 401 2
element nonlinearBeamColumn 5647 5600 4700 5 401 2


# #########################################################
# #########################################################
# define nolinear 8th BRACING
# #########################################################

element nonlinearBeamColumn 2738 2700 3800 5 401 2
element nonlinearBeamColumn 4758 4700 5800 5 401 2
element nonlinearBeamColumn 3728 3700 2800 5 401 2
element nonlinearBeamColumn 5748 5700 4800 5 401 2


# #########################################################
# #########################################################
# define nolinear 9th BRACING
# #########################################################

element nonlinearBeamColumn 2839 2800 3900 5 401 2
element nonlinearBeamColumn 4859 4800 5900 5 401 2
element nonlinearBeamColumn 3829 3800 2900 5 401 2
element nonlinearBeamColumn 5849 5800 4900 5 401 2


# #########################################################
# #########################################################
# define nolinear 10th BRACING
# #########################################################

element nonlinearBeamColumn 29310 2900 31000 5 401 2
element nonlinearBeamColumn 49510 4900 51000 5 401 2
element nonlinearBeamColumn 39210 3900 21000 5 401 2
element nonlinearBeamColumn 59410 5900 41000 5 401 2


# #########################################################
# #########################################################
# #########################################################
#set h 365.76
# #########################################################
eigen 3
#source DisplayModel2D.tcl
#source DisplayPlane.tcl
#DisplayModel2D DeformedShape ; # options: DeformedShape NodeNumbers ModeShape

#DisplayModel2D NodeNumbers ;

#DisplayModel2D ModeShape

# ===============================?Perform eigenvalue analysis ?====================================

set lambda [eigen 3];
#the eigenvalues are calculated using eigen command and stored in lambda variable

# calculate frequencies and periods of the structure
#---------------------------------------------------
#the periods and frequencies of the structure are calculated next.

set omega {}
set f {}
set T {}
set pi 3.141593

foreach lam $lambda {
lappend omega [expr sqrt($lam)]
lappend f [expr sqrt($lam)/(2*$pi)]
lappend T [expr (2*$pi)/sqrt($lam)]
}

puts "periods are $T"

# write the output file cosisting of periods
#--------------------------------------------
set period "Periods.txt"
set Periods [open $period "w"]
foreach t $T {
puts $Periods " $t"
}
close $Periods
# #########################################################
# #########################################################
# #########################################################
recorder display "Mode Shape 1" 0 0 350 350 -wipe
vrp 0.0 0.0 0; # point on the view plane in global coord, center of local viewing system
vup 0 1 0; # dirn defining up direction of view plane
vpn 0 0 1; # direction of outward normal to view plane next three commands define view, all values in local coord system
prp 0 0 150; # eye location in local coord sys defined by viewing system
viewWindow -5 35 -4 44; # view bounds uMin, uMax, vMin, vMax in local coords
#plane 0 10; # distance to front and back clipping planes from eye
projection 0; # projection mode
#port -5 35 -5 45; # area of window that will be drawn into
fill 1; # fill mode
display -1 0 1000


# #########################################################
recorder display "Mode Shape 2" 350 0 350 350 -wipe
vrp 0.0 0.0 0; # point on the view plane in global coord, center of local viewing system
vup 0 1 0; # dirn defining up direction of view plane
vpn 0 0 1; # direction of outward normal to view plane next three commands define view, all values in local coord system
prp 0 0 150; # eye location in local coord sys defined by viewing system
viewWindow -5 35 -4 44; # view bounds uMin, uMax, vMin, vMax in local coords
#plane 0 10; # distance to front and back clipping planes from eye
projection 0; # projection mode
#port -5 35 -5 45; # area of window that will be drawn into
fill 1; # fill mode
display -2 0 1000
# #########################################################
recorder display "Mode Shape 3" 700 0 350 350 -wipe
vrp 0.0 0.0 0; # point on the view plane in global coord, center of local viewing system
vup 0 1 0; # dirn defining up direction of view plane
vpn 0 0 1; # direction of outward normal to view plane next three commands define view, all values in local coord system
prp 0 0 150; # eye location in local coord sys defined by viewing system
viewWindow -5 35 -4 44; # view bounds uMin, uMax, vMin, vMax in local coords
#plane 0 10; # distance to front and back clipping planes from eye
projection 0; # projection mode
#port -5 35 -5 45; # area of window that will be drawn into
fill 1; # fill mode
display -3 0 1000
# #########################################################
# #########################################################
recorder display "NODE Numbers" 0 350 350 350 -wipe
vrp 0.0 0.0 0; # point on the view plane in global coord, center of local viewing system
vup 0 1 0; # dirn defining up direction of view plane
vpn 0 0 1; # direction of outward normal to view plane next three commands define view, all values in local coord system
prp 0 0 150; # eye location in local coord sys defined by viewing system
viewWindow -5 35 -5 45; # view bounds uMin, uMax, vMin, vMax in local coords
#plane 0 10; # distance to front and back clipping planes from eye
projection 0; # projection mode
#port -5 35 -5 45; # area of window that will be drawn into
fill 1; # fill mode
display 1 -1 0
# #########################################################
# #########################################################
recorder display "Deformed shape" 350 350 350 350 -wipe
vrp 0.0 0.0 0; # point on the view plane in global coord, center of local viewing system
vup 0 1 0; # dirn defining up direction of view plane
vpn 0 0 1; # direction of outward normal to view plane next three commands define view, all values in local coord system
prp 0 0 150; # eye location in local coord sys defined by viewing system
viewWindow -3 44 -3 44; # view bounds uMin, uMax, vMin, vMax in local coords
#plane 0 10; # distance to front and back clipping planes from eye
projection 0; # projection mode
#port -3 44 -3 44; # area of window that will be drawn into
fill 1; # fill mode
display 1 3 150
# #########################################################

# #########################################################

# end of element definition
#DisplayModel2D NodeNumbers



# sac 9 recorder
# Node Recorder
# The Node type records the displacement, velocity, acceleration and incremental displacement at
# the nodes (translational & rotational)
#
# recorder Node <-file $fileName> <-xml $fileName> <-time> <-node ($node1$node2 ...)> <-nodeRange $startNode $endNode>
# <-region $RegionTag> <-node all> -dof ($dof1 $dof2 ...) $respType
#
# -file output recorder data to a file
# -xml output recorder data + xml metadata labelling each column of data (-file and -xml cannot be specified symultaneously)
# $fileName file where results are stored. Each line of the file contains the result for a committed state of the domain
# -time this argument will place the pseudo time of the as the first entry in the line. (optional, default: omitted)
# $node1 $node2 ... tags nodes where response is being recorded -- select nodes in domain (optional, default: all)
# $startNode & $endNode tag for start and end nodes where response is being recorded -- range of nodes in domain
# $RegionTag tag for previously-defined selection of nodesdefined using the Region command. (optional)
# all record all nodes in model. (Note: This option isrecommended only for xml option as OpenSees renumbers nodes)
# $dof1 $dof2 ... degrees of freedom of response being recorded.Valid range is from 1 through the number of nodal degrees-of-freedom.
# $respType defines response type to be recorded. The following response types are available:
#
# disp displacement*
# vel velocity*
# accel acceleration*
# incrDisp incremental displacement
# "eigen i" eigenvector for mode i
# reaction nodal reaction
#
# NOTE: $respType must be the last argument in this command.
# Do not forget the double quote in the eigen response type.
# ######################################################################################################################################
# ######################################################################################################################################
set pfile11 "Data/displacement 10th 9th 8th 7th 6th 5th 4th 3rd 2nd 1st floor.txt"

set pfile12 "Data/nodesdisplacementroof .txt"

set pfile2 "Data/nodeseigenvectormode1 10th 9th 8th 7th 6th 5th 4th 3rd 2nd 1st floor.txt"

set pfile3 "Data/nodeseigenvectormode2 10th 9th 8th 7th 6th 5th 4th 3rd 2nd 1st floor.txt"

set pfile4 "Data/nodeseigenvectormode3 10th 9th 8th 7th 6th 5th 4th 3rd 2nd 1st floor.txt"


set pfile5 "Data/nodeseigenvectormode4 10th 9th 8th 7th 6th 5th 4th 3rd 2nd 1st floor.txt"

set pfile6 "Data/nodeseigenvectormode5 10th 9th 8th 7th 6th 5th 4th 3rd 2nd 1st floor.txt"

set pfile7 "Data/base reaction nodes b10 b20 b30 b40 b50 b60.txt"

set pfile9 "Data/envelope dispacement.txt"

recorder Node -file $pfile11 -time -node 410 49 48 47 46 45 44 43 42 41 -dof 1 disp

set pfile611 "Data/roofdisppp.txt"
set pfile6611 "Data/5disp.txt"
set pfile66611 "Data/2nodedisp.txt"

recorder Node -file $pfile611 -time -node 110 210 310 410 510 610 -dof 1 disp
recorder Node -file $pfile6611 -time -node 15 25 35 45 55 65 -dof 1 disp
recorder Node -file $pfile66611 -time -node 25 2500 -dof 1 2 disp

recorder Node -file $pfile12 -time -node 410 -dof 1 disp

recorder Node -file $pfile7 -time -node 10 20 30 40 50 60 -dof 1 reaction

recorder EnvelopeNode -file $pfile9 -node 410 49 48 47 46 45 44 43 42 41 -dof 1 disp

recorder Node -file $pfile2 -time -node 410 49 48 47 46 45 44 43 42 41 -dof 1 "eigen 1"

recorder Node -file $pfile3 -time -node 410 49 48 47 46 45 44 43 42 41 -dof 1 "eigen 2"

recorder Node -file $pfile4 -time -node 410 49 48 47 46 45 44 43 42 41 -dof 1 "eigen 3"

recorder Node -file $pfile5 -time -node 410 49 48 47 46 45 44 43 42 41 -dof 1 "eigen 4"

recorder Node -file $pfile6 -time -node 410 49 48 47 46 45 44 43 42 41 -dof 1 "eigen 5"



set pfile555 "Data/element 4041 force.txt"
set pfile556 "Data/element 4041 deformation.txt"

recorder Element -file $pfile555 -time -ele 4041 section 1 force;
recorder Element -file $pfile556 -time -ele 4041 section 1 deformation;


set pfile557 "Data/element 3545 force.txt"
set pfile558 "Data/element 3545 deformation.txt"

recorder Element -file $pfile557 -time -ele 3545 section 1 force;
recorder Element -file $pfile558 -time -ele 3545 section 1 deformation;
# ######################################################################################################################################
# ######################################################################################################################################
# ######################################################################################################################################
# ######################################################################################################################################
# Drift Recorder

set pfile1001 "Data/drift 10th 9th 8th 7th 6th 5th 4th 3rd 2nd 1st floor.txt"

recorder Drift -file $pfile1001 -time -iNode 49 48 47 46 45 44 43 42 41 40 -jNode 410 49 48 47 46 45 44 43 42 41 -dof 1 -perpDirn 2

# ######################################################################################################################################


# ######################################################################################################################################

set pfile101000 "Data/10thfloor column forces globalforce elements.txt"
set pfile100900 "Data/9thfloor column forces globalforce elements.txt"
set pfile100800 "Data/8thfloor column forces globalforce elements.txt"
set pfile100700 "Data/7thfloor column forces globalforce elements.txt"
set pfile100600 "Data/6thfloor column forces globalforce elements.txt"
set pfile100500 "Data/5thfloor column forces globalforce elements.txt"
set pfile100400 "Data/4thfloor column forces globalforce elements.txt"
set pfile100300 "Data/3thfloor column forces globalforce elements.txt"
set pfile100200 "Data/2thfloor column forces globalforce elements.txt"
set pfile100100 "Data/1thfloor column forces globalforce elements.txt"



recorder Element -file $pfile101000 -time -ele 110 210 310 410 510 610 globalForce;
recorder Element -file $pfile100900 -time -ele 19 29 39 49 59 69 globalForce;
recorder Element -file $pfile100800 -time -ele 18 28 38 48 58 68 globalForce;
recorder Element -file $pfile100700 -time -ele 17 27 37 47 57 67 globalForce;
recorder Element -file $pfile100600 -time -ele 16 26 36 46 56 66 globalForce;
recorder Element -file $pfile100500 -time -ele 15 25 35 45 55 65 globalForce;
recorder Element -file $pfile100400 -time -ele 14 24 34 44 54 64 globalForce;
recorder Element -file $pfile100300 -time -ele 13 23 33 43 53 63 globalForce;
recorder Element -file $pfile100200 -time -ele 12 22 32 42 52 62 globalForce;
recorder Element -file $pfile100100 -time -ele 11 21 31 41 51 61 globalForce;

#####################################################################################################
set pfile1010000 "Data/10thfloor column forces globalforce elements.xml"
set pfile1009000 "Data/9thfloor column forces globalforce elements.xml"
set pfile1008000 "Data/8thfloor column forces globalforce elements.xml"
set pfile1007000 "Data/7thfloor column forces globalforce elements.xml"
set pfile1006000 "Data/6thfloor column forces globalforce elements.xml"
set pfile1005000 "Data/5thfloor column forces globalforce elements.xml"
set pfile1004000 "Data/4thfloor column forces globalforce elements.xml"
set pfile1003000 "Data/3thfloor column forces globalforce elements.xml"
set pfile1002000 "Data/2thfloor column forces globalforce elements.xml"
set pfile1001000 "Data/1thfloor column forces globalforce elements.xml"



#recorder Element -xml $pfile1010000 -time -ele 110 210 310 410 510 610 globalForce;
#recorder Element -xml $pfile1009000 -time -ele 19 29 39 49 59 69 globalForce;
#recorder Element -xml $pfile1008000 -time -ele 18 28 38 48 58 68 globalForce;
#recorder Element -xml $pfile1007000 -time -ele 17 27 37 47 57 67 globalForce;
#recorder Element -xml $pfile1006000 -time -ele 16 26 36 46 56 66 globalForce;
#recorder Element -xml $pfile1005000 -time -ele 15 25 35 45 55 65 globalForce;
#recorder Element -xml $pfile1004000 -time -ele 14 24 34 44 54 64 globalForce;
#recorder Element -xml $pfile1003000 -time -ele 13 23 33 43 53 63 globalForce;
#recorder Element -xml $pfile1002000 -time -ele 12 22 32 42 52 62 globalForce;
#recorder Element -xml $pfile1001000 -time -ele 11 21 31 41 51 61 globalForce;


# end of recorder definition





# end of recorder definition



set h10 1.938000271002127e-001
set h9 1.670044963963875e-001
set h8 1.493224264388765e-001
set h7 1.311527723813825e-001
set h6 1.120545033796996e-001
set h5 9.267201450063962e-002
set h4 7.122607297734630e-002
set h3 5.148536904593692e-002
set h2 3.128231777951845e-002
set h1 3.128231777951845e-002




# #####################################################










pattern Plain 2 Linear {

load 410 $h10 0.0 0.0
load 49 $h9 0.0 0.0
load 48 $h8 0.0 0.0
load 47 $h7 0.0 0.0
load 46 $h6 0.0 0.0
load 45 $h5 0.0 0.0
load 44 $h4 0.0 0.0
load 43 $h3 0.0 0.0
load 42 $h2 0.0 0.0
load 41 $h1 0.0 0.0
}







# static analyse Dual 10






eigen 5

#constraints Transformation

constraints Lagrange

# ########################################################################################


numberer RCM


# ########################################################################################


#system SparseGeneral
system UmfPack

# ########################################################################################

#test NormUnbalance 1.0e-6 50 1
test EnergyIncr 1.0e-8 100 1
#test NormDispIncr 1.0e-10 20 1

# ########################################################################################

algorithm Newton
#algorithm Broyden 20
#algorithm KrylovNewton
# ########################################################################################


#integrator DisplacementControl 12 1 0.0005
integrator LoadControl 1000

# ########################################################################################

analysis Static



analyze 0
sama
Posts: 21
Joined: Sat Mar 05, 2011 11:46 pm
Location: Iran

Re: constraints Command

Post by sama »

hi,
is there anybody help me
vesna
Posts: 3033
Joined: Tue May 23, 2006 11:23 am
Location: UC Berkeley

Re: constraints Command

Post by vesna »

When using nonlinear elements I would not recommend you using a equalDOF to simulate a rigid floor (you can find discussions on this topic on the message board). Instead I recommend defining masses at all beam-column connections and defining very stiff truss elements at floor level (in addition to forceBeamColumn elements) to constrain horizontal displacement.

1. Plain constraints should work.
2. There is probably an error in setting up the constraints for braces. The braces are usually modeled in the following way: at the location of gusset plates with laterally stiff elastic beam-column elements and in between the gusset plates with nonlinear beam-column elements. This way you do not need to define the pins.
3. To account for buckling you have to divide element in even number of elements. If only global response of the frame is of interest 2 elements per brace are enough, but if you want to capture local response you need more elements. To all brace elements you have to assign corotational geometric transformation. If your brace is pinned at its ends, in addition to above mentioned, when defining geometry you have to define a camber for your brace at the order of L/1000.
4. yes, to add shear you have to use section aggregator. Here is the link for section aggregator command: http://opensees.berkeley.edu/wiki/index ... Aggregator
5. There are no opensees commands for saving an image or a movie. However, you can print screen the displayed image. Also there are softwares for recording the terminal. You can use them to record a movie.
sama
Posts: 21
Joined: Sat Mar 05, 2011 11:46 pm
Location: Iran

Re: constraints Command

Post by sama »

Thank you very much, you have helped me alot so far, but still I have many questions regarding to your answers.


>When using nonlinear elements I would not recommend you using a equalDOF to simulate a rigid floor (you can find discussions on this topic on the message board). >Instead I recommend defining masses at all beam-column connections and defining very stiff truss elements at floor level (in addition to forceBeamColumn elements) to >constrain horizontal displacement.

1- My question:
When we use truss elements, how does a truss element connect to other elements. (Pinned or rigid as default).
(I just wanna make sure that we dont need to define pins at the ends)


>2. There is probably an error in setting up the constraints for braces. The braces are usually modeled in the following way: at the location of gusset plates with laterally >stiff elastic beam-column elements and in between the gusset plates with nonlinear beam-column elements. This way you do not need to define the pins.

2- My question:
Could you please send me an example. I cant know what do you exactly mean by "latterally stiff elastic beam-column element".
Also I wanna learn how to connect braces both as a pin and rigid.


>3. To account for buckling you have to divide element in even number of elements. If only global response of the frame is of interest 2 elements per brace are enough, >but if you want to capture local response you need more elements. To all brace elements you have to assign corotational geometric transformation. If your brace is >pinned at its ends, in addition to above mentioned, when defining geometry you have to define a camber for your brace at the order of L/1000.


My question:
Could you please explain more about this sentence. I dont know how to model it.
"If your brace is pinned at its ends, in addition to above mentioned, when defining geometry you have to define a camber for your brace at the order of L/1000."
And what is camber?
vesna
Posts: 3033
Joined: Tue May 23, 2006 11:23 am
Location: UC Berkeley

Re: constraints Command

Post by vesna »

1. By default truss element is pinned to the other elements.

2. At the position of the gusset plate you define very big moment of inertia for elastic beam-column element.

Here is an example with braces pined at its ends to help you understand pined connection:

wipe
model basic -ndm 2 -ndf 3

# Set parameters for overall model geometry
set width 360
set height 144

# nodes
node 1 0.0 0.0
node 2 $width 0.0
node 3 0.0 $height
node 4 $width $height

node 11 0.0 0.0
node 22 $width 0.0
node 33 0.0 $height
node 44 $width $height

# constraints
fix 1 1 1 1
fix 2 1 1 1
fix 11 1 1 0
fix 22 1 1 0

equalDOF 3 33 1 2
equalDOF 4 44 1 2

#geometric transformation
geomTransf Linear 2

# elements

###columns
element elasticBeamColumn 1 1 3 360 4030 8640 2
element elasticBeamColumn 2 2 4 360 4030 8640 2

### beam
element elasticBeamColumn 3 3 4 360 4030 8640 2

### braces
element elasticBeamColumn 4 11 44 360 4030 8640 2
element elasticBeamColumn 5 22 33 360 4030 8640 2

# loads
pattern Plain 1 "Linear" {
load 3 100.0 0.0 0.0
load 4 100.0 0.0 0.0
}

#analysis
system BandGeneral
constraints Transformation
numberer RCM
test NormDispIncr 1.0e-12 10 3
algorithm Newton
integrator LoadControl 0.1
analysis Static

#analyze
analyze 10

#output
print node 3 33
print ele 1 2 3 4 5

3. If your brace is pinned at the ends and perfectly straight you will not be able to see the buckling. However if you distort the geometry at the middle of the brace (where buckling usually happens) you will be able to see buckling of your brace. So, instead of defining the exact geometry induce very small error at the middle node.
sama
Posts: 21
Joined: Sat Mar 05, 2011 11:46 pm
Location: Iran

Re: constraints Command

Post by sama »

thank you vesna,
how about geomtrans command. I want to affect the effects of P-(small or big)delta and bucling in my model( I need to focus on both local and global responses of the structure). which one of the geom trans coomands do you reccomand for diffrent elements. I used corrotational for braces, and p-delta for columns and linear for beams.

adn do you have the information of A36 and also Grade 50 steels. I dont know the exact arguments of this steels to create Pinching04 or hystertic material.
thanks in advance
vesna
Posts: 3033
Joined: Tue May 23, 2006 11:23 am
Location: UC Berkeley

Re: constraints Command

Post by vesna »

geomTransf you used for your elements are fine. However neither of geomTransfs accounts for P-small delta effects. To account for these you have to divide your elements into multiple pieces. Also, to capture local responses you have to divide the braces into multiple elements. Look at this report: http://peer.berkeley.edu/publications/p ... ZMahin.pdf

I usually model steel with steel02:

set matID 1
set Es 29000.0; # modulus of elasticity for steel
set Fy 50.0; # yield stress of steel for grade 50 steel
set b 0.003; # strain hardening ratio
uniaxialMaterial Steel02 $matID $Fy $Es $b 20 0.925 0.15
2100colinbalke
Posts: 1
Joined: Mon May 16, 2011 6:08 pm

Re: constraints Command

Post by 2100colinbalke »

These codes gives me headache.
pouyatirip2000
Posts: 7
Joined: Sun May 08, 2011 4:07 am
Location: azad university

script of SAC building

Post by pouyatirip2000 »

hi
if you have script of sac 3 -sac 9 and sac 20 please help me . :roll:
i need this code.
my email is : hosseinzadeh.pouya@gmail.com
Post Reply