dynamic nonlinear analyze

A forum dedicated to users with questions regarding soil materials and elements.

forum currently locked

Moderator: Moderators

Locked
solmaz_moradpoor
Posts: 26
Joined: Sat Feb 13, 2010 9:59 am
Location: iran

dynamic nonlinear analyze

Post by solmaz_moradpoor »

hi silvia
i modeled a building with 9 storey(SAC 9)i want to have a recorde of eigen vectors mode 1 from a dynamic nonlinear analyze.but in all steps of analyze all amount in eigen vector is same.why?
fmk
Site Admin
Posts: 5884
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Post by fmk »

the eigenvectors do not change unless you issue an eigen command .. if you want to see ow hey change over the analysis you have to put the eigen command inside a loop with the anlayze command.
solmaz_moradpoor
Posts: 26
Joined: Sat Feb 13, 2010 9:59 am
Location: iran

Post by solmaz_moradpoor »

thanks for your help
i use a loop that you recommend to mehdi1995.
[code]
for {set i 0} {$i<$numStep} {incr i 1} {
analyze 1 0.0001
eigen $numMode
}
[/code]

and use of scripts dynamic analyze from examples 2D.
set GMdirection 1; # ground-motion direction
set GMfile "tabas.acc" ; # ground-motion filenames
set GMfact 1; # ground-motion scaling factor

# set up ground-motion-analysis parameters
set DtAnalysis [expr 0.02*$sec]; # time-step Dt for lateral analysis
set TmaxAnalysis [expr 32. *$sec]; # maximum duration of ground-motion analysis -- should be 50*$sec

# ----------- set up analysis parameters
# create the analysis
wipeAnalysis
constraints Transformation
numberer RCM
system SparseGeneral
test EnergyIncr 1.0e-8 50 0
algorithm Newton
integrator Newmark 0.5 0.25
analysis Transient

# ------------ define & apply damping
# RAYLEIGH damping parameters, Where to put M/K-prop damping, switches (http://opensees.berkeley.edu/OpenSees/m ... l/1099.htm)
# D=$alphaM*M + $betaKcurr*Kcurrent + $betaKcomm*KlastCommit + $beatKinit*$Kinitial
set xDamp 0.02; # damping ratio
set MpropSwitch 1.0;
set KcurrSwitch 0.0;
set KcommSwitch 1.0;
set KinitSwitch 0.0;
set nEigenI 1; # mode 1
set nEigenJ 3; # mode 3
set lambdaN [eigen [expr $nEigenJ]]; # eigenvalue analysis for nEigenJ modes
set lambdaI [lindex $lambdaN [expr $nEigenI-1]]; # eigenvalue mode i
set lambdaJ [lindex $lambdaN [expr $nEigenJ-1]]; # eigenvalue mode j
set omegaI [expr pow($lambdaI,0.5)];
set omegaJ [expr pow($lambdaJ,0.5)];
set alphaM [expr $MpropSwitch*$xDamp*(2*$omegaI*$omegaJ)/($omegaI+$omegaJ)]; # M-prop. damping; D = alphaM*M
set betaKcurr [expr $KcurrSwitch*2.*$xDamp/($omegaI+$omegaJ)]; # current-K; +beatKcurr*KCurrent
set betaKcomm [expr $KcommSwitch*2.*$xDamp/($omegaI+$omegaJ)]; # last-committed K; +betaKcomm*KlastCommitt
set betaKinit [expr $KinitSwitch*2.*$xDamp/($omegaI+$omegaJ)]; # initial-K; +beatKinit*Kini
rayleigh $alphaM $betaKcurr $betaKinit $betaKcomm; # RAYLEIGH damping

# --------------------------------- perform Dynamic Ground-Motion Analysis
# the following commands are unique to the Uniform Earthquake excitation
set IDloadTag 400; # for uniformSupport excitation
# Uniform EXCITATION: acceleration input
set inFile tabas.acc;
set outFile tabas.th; # set variable holding new filename (PEER files have .at2/dt2 extension)
ReadSMDFile $inFile $outFile dt; # call procedure to convert the ground-motion file
set GMfatt [expr $g*$GMfact]; # data in input file is in g Unifts -- ACCELERATION TH
set AccelSeries "Series -dt $dt -filePath $outFile -factor $GMfatt"; # time series information
pattern UniformExcitation $IDloadTag $GMdirection -accel $AccelSeries ; # create Unifform excitation

set Nsteps [expr int($TmaxAnalysis/$DtAnalysis)];
set ok [analyze $Nsteps $DtAnalysis]; # actually perform analysis; returns ok=0 if analysis was successful

if {$ok != 0} { ; # analysis was not successful.
# --------------------------------------------------------------------------------------------------
# change some analysis parameters to achieve convergence
# performance is slower inside this loop
# Time-controlled analysis
set ok 0;
set controlTime [getTime];
while {$controlTime < $TmaxAnalysis && $ok == 0} {
set controlTime [getTime]
set ok [analyze 1 $DtAnalysis]
if {$ok != 0} {
puts "Trying Newton with Initial Tangent .."
test NormDispIncr $Tol 1000 0
algorithm Newton -initial
set ok [analyze 1 $DtAnalysis]
test $testTypeDynamic $TolDynamic $maxNumIterDynamic 0
algorithm $algorithmTypeDynamic
}
if {$ok != 0} {
puts "Trying Broyden .."
algorithm Broyden 8
set ok [analyze 1 $DtAnalysis]
algorithm $algorithmTypeDynamic
}
if {$ok != 0} {
puts "Trying NewtonWithLineSearch .."
algorithm NewtonLineSearch .8
set ok [analyze 1 $DtAnalysis]
algorithm $algorithmTypeDynamic
}
}
}; # end if ok !0


puts "Ground Motion Done. End Time: [getTime]"
but the result didnt change.
where is best location for loop?
thankyou.
fmk
Site Admin
Posts: 5884
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Post by fmk »

why don't you show me the actual script you used.
solmaz_moradpoor
Posts: 26
Joined: Sat Feb 13, 2010 9:59 am
Location: iran

Post by solmaz_moradpoor »

Dear fmk
thanks for your attention
i mailed records earthquak of tabas for you.and my scripts is:

#Build model
wipe
model BasicBuilder -ndm 2 -ndf 3;
#Define units
set m 1;
set kg 1;
set sec 1;
set sec2 [expr $sec*$sec];
set m2 [expr $m*$m];
set g [expr 9.81*$m/$sec2];
set ubig 1e10;
set usmall [expr 1/$ubig];
set dataDir Data;
file mkdir $dataDir; #create data directory
set GMdir "../GMfiles/"; #ground motion file directory
set numMode 9;
#Define Geometry;
set Weight1 [expr 50375.55*$kg*$g]; # gravity axial load per column
set Weight2 [expr 49514.55*$kg*$g];
set Weight3 [expr 53337.9*$kg*$g];

puts "$$"

set Lcol1 [expr 3.65*$m];
set Lcol2 [expr 5.48*$m];
set Lcol3 [expr 3.96*$m];
set Lbeam [expr 9.15*$m];
set Nstory 9;
set Nbay 5;
set PI 3.141592654;

puts "$$$"

#sac 3 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 1 0.0 0.0
node 2 0.0 3.65
node 3 0.0 9.14
node 4 0.0 13.1
node 5 0.0 17.06
node 511 0.0 18.89
node 6 0.0 21.02
node 7 0.0 24.98
node 711 0.0 26.81
node 8 0.0 28.94
node 9 0.0 32.9
node 911 0.0 34.73
node 10 0.0 36.86
node 11 0.0 40.82
node 12 9.15 0.0
node 13 9.15 3.65
node 14 9.15 9.14
node 15 9.15 13.1
node 16 9.15 17.06
node 1611 9.15 18.89
node 17 9.15 21.02
node 18 9.15 24.98
node 1811 9.15 26.81
node 19 9.15 28.94
node 20 9.15 32.9
node 2011 9.15 34.73
node 21 9.15 36.86
node 22 9.15 40.82
node 23 18.3 0.0
node 24 18.3 3.65
node 25 18.3 9.14
node 26 18.3 13.1
node 27 18.3 17.06
node 2711 18.3 18.89
node 28 18.3 21.02
node 29 18.3 24.98
node 2911 18.3 26.81
node 30 18.3 28.94
node 31 18.3 32.9
node 3111 18.3 34.73
node 32 18.3 36.86
node 33 18.3 40.82
node 34 27.45 0.0
node 35 27.45 3.65
node 36 27.45 9.14
node 37 27.45 13.1
node 38 27.45 17.06
node 3811 27.45 18.89
node 39 27.45 21.02
node 40 27.45 24.98
node 4011 27.45 26.81
node 41 27.45 28.94
node 42 27.45 32.9
node 4211 27.45 34.73
node 43 27.45 36.86
node 44 27.45 40.82
node 45 36.60 0.0
node 46 36.60 3.65
node 47 36.60 9.14
node 48 36.60 13.1
node 49 36.60 17.06
node 4911 36.60 18.89
node 50 36.60 21.02
node 51 36.60 24.98
node 5111 36.60 26.81
node 52 36.60 28.94
node 53 36.60 32.9
node 5311 36.60 34.73
node 54 36.60 36.86
node 55 36.60 40.82
node 56 45.75 0.0
node 57 45.75 3.65
node 58 45.75 9.14
node 59 45.75 13.1
node 60 45.75 17.06
node 6011 45.75 18.89
node 61 45.75 21.02
node 62 45.75 24.98
node 6211 45.75 26.81
node 63 45.75 28.94
node 64 45.75 32.9
node 6411 45.75 34.73
node 65 45.75 36.86
node 66 45.75 40.82

#supports constrained
#fix nodetag dx dy rz
fix 1 1 1 0
fix 12 1 1 0
fix 23 1 1 0
fix 34 1 1 0
fix 45 1 1 0
fix 56 1 1 0
fix 2 1 0 0
fix 13 1 0 0
fix 24 1 0 0
fix 35 1 0 0
fix 46 1 0 0
fix 57 1 0 0
# equalDOF $rNodeTag $cNodeTag $dof1 $dof2 ...
equalDOF 44 11 1
equalDOF 44 22 1
equalDOF 44 33 1
equalDOF 44 55 1
equalDOF 44 66 1
#
equalDOF 43 10 1
equalDOF 43 21 1
equalDOF 43 32 1
equalDOF 43 54 1
equalDOF 43 65 1
#
equalDOF 42 9 1
equalDOF 42 20 1
equalDOF 42 31 1
equalDOF 42 53 1
equalDOF 42 64 1
#
equalDOF 41 8 1
equalDOF 41 19 1
equalDOF 41 30 1
equalDOF 41 52 1
equalDOF 41 63 1
#
equalDOF 40 7 1
equalDOF 40 18 1
equalDOF 40 29 1
equalDOF 40 51 1
equalDOF 40 62 1
#
equalDOF 39 6 1
equalDOF 39 17 1
equalDOF 39 28 1
equalDOF 39 50 1
equalDOF 39 61 1
#
equalDOF 38 5 1
equalDOF 38 16 1
equalDOF 38 27 1
equalDOF 38 49 1
equalDOF 38 60 1
#
equalDOF 37 4 1
equalDOF 37 15 1
equalDOF 37 26 1
equalDOF 37 48 1
equalDOF 37 59 1
#
equalDOF 36 3 1
equalDOF 36 14 1
equalDOF 36 25 1
equalDOF 36 47 1
equalDOF 36 58 1
#
# MATERIAL DEFINITION
set Fy1 [expr 35107570.2*$kg/$m2];
set Fy2 [expr 25277450.5*$kg/$m2];
set E1 [expr 20600000000*$kg/$m2];
set b 0.02;
set steel 1;
set ssteel 2;
uniaxialMaterial Steel01 $steel $Fy1 $E1 $b; #for bilinear
uniaxialMaterial Steel01 $ssteel $Fy2 $E1 $b;
puts "$$$$"
# mass deinition sac9
# concentrated mass on first floor (m1= 50375.55)
# concentrated mass on 2 - 9 floor (m2= 49514.55)
# concentrated mass on roof (m3= 53337.95)
set m1 50375.55
set m2 49514.55
set m3 53337.95
mass 35 $m1 0.1 0.0
mass 36 $m2 0.1 0.0
mass 37 $m2 0.1 0.0
mass 38 $m2 0.1 0.0
mass 39 $m2 0.1 0.0
mass 40 $m2 0.1 0.0
mass 41 $m2 0.1 0.0
mass 42 $m2 0.1 0.0
mass 43 $m2 0.1 0.0
mass 44 $m3 0.1 0.0
mass 17 0.1 0.1 0.0
# end of mass definition for sac 9

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
# ###################################################################
#--------------------------------------------------------------------
# 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
# ###################################################################
#--------------------------------------------------------------------
geomTransf PDelta 1
geomTransf Linear 2
# #########################################################
# column
# #########################################################
# define nolinear column first row
# #########################################################
element dispBeamColumn 1 1 2 5 18 1
element dispBeamColumn 2 2 3 5 18 1
element dispBeamColumn 3 3 4 5 18 1
element dispBeamColumn 4 4 5 5 18 1
element dispBeamColumn 5 5 511 5 18 1
element dispBeamColumn 6 511 6 5 19 1
element dispBeamColumn 7 6 7 5 19 1
element dispBeamColumn 8 7 711 5 19 1
element dispBeamColumn 9 711 8 5 13 1
element dispBeamColumn 10 8 9 5 13 1
element dispBeamColumn 11 9 911 5 13 1
element dispBeamColumn 12 911 10 5 20 1
element dispBeamColumn 13 10 11 5 20 1
# #########################################################
# define nolinear column second row
# #########################################################
element dispBeamColumn 14 12 13 5 18 1
element dispBeamColumn 15 13 14 5 18 1
element dispBeamColumn 16 14 15 5 18 1
element dispBeamColumn 18 15 16 5 18 1
element dispBeamColumn 19 16 1611 5 18 1
element dispBeamColumn 20 1611 17 5 19 1
element dispBeamColumn 21 17 18 5 19 1
element dispBeamColumn 22 18 1811 5 19 1
element dispBeamColumn 23 1811 19 5 13 1
element dispBeamColumn 24 19 20 5 13 1
element dispBeamColumn 25 20 2011 5 13 1
element dispBeamColumn 26 2011 21 5 20 1
element dispBeamColumn 27 21 22 5 20 1
# #########################################################
# define nolinear column 3rd row
# #########################################################
element dispBeamColumn 28 23 24 5 18 1
element dispBeamColumn 29 24 25 5 18 1
element dispBeamColumn 30 25 26 5 18 1
element dispBeamColumn 31 26 27 5 18 1
element dispBeamColumn 32 27 2711 5 18 1
element dispBeamColumn 33 2711 28 5 19 1
element dispBeamColumn 34 28 29 5 19 1
element dispBeamColumn 35 29 2911 5 19 1
element dispBeamColumn 36 2911 30 5 13 1
element dispBeamColumn 37 30 31 5 13 1
element dispBeamColumn 38 31 3111 5 13 1
element dispBeamColumn 39 3111 32 5 20 1
element dispBeamColumn 40 32 33 5 20 1
# #########################################################
# define nolinear column 4th row
# #########################################################
element dispBeamColumn 41 34 35 5 18 1
element dispBeamColumn 42 35 36 5 18 1
element dispBeamColumn 43 36 37 5 18 1
element dispBeamColumn 44 37 38 5 18 1
element dispBeamColumn 45 38 3811 5 18 1
element dispBeamColumn 46 3811 39 5 19 1
element dispBeamColumn 47 39 40 5 19 1
element dispBeamColumn 48 40 4011 5 19 1
element dispBeamColumn 49 4011 41 5 13 1
element dispBeamColumn 50 41 42 5 13 1
element dispBeamColumn 51 42 4211 5 13 1
element dispBeamColumn 52 4211 43 5 20 1
element dispBeamColumn 53 43 44 5 20 1
# #########################################################
# define nolinear column 5th row
# #########################################################
element dispBeamColumn 54 45 46 5 18 1
element dispBeamColumn 55 46 47 5 18 1
element dispBeamColumn 56 47 48 5 18 1
element dispBeamColumn 57 48 49 5 18 1
element dispBeamColumn 58 49 4911 5 18 1
element dispBeamColumn 59 4911 50 5 19 1
element dispBeamColumn 60 50 51 5 19 1
element dispBeamColumn 61 51 5111 5 19 1
element dispBeamColumn 62 5111 52 5 13 1
element dispBeamColumn 63 52 53 5 13 1
element dispBeamColumn 64 53 5311 5 13 1
element dispBeamColumn 65 5311 54 5 20 1
element dispBeamColumn 66 54 55 5 20 1
# #########################################################
# define nolinear column last row
# #########################################################
element dispBeamColumn 67 56 57 5 18 1
element dispBeamColumn 68 57 58 5 18 1
element dispBeamColumn 69 58 59 5 18 1
element dispBeamColumn 70 59 60 5 18 1
element dispBeamColumn 71 60 6011 5 18 1
element dispBeamColumn 72 6011 61 5 19 1
element dispBeamColumn 73 61 62 5 19 1
element dispBeamColumn 74 62 6211 5 19 1
element dispBeamColumn 75 6211 63 5 13 1
element dispBeamColumn 76 63 64 5 13 1
element dispBeamColumn 77 64 6411 5 13 1
element dispBeamColumn 78 6411 65 5 20 1
element dispBeamColumn 79 65 66 5 20 1

# #########################################################
# beam
# #########################################################
# define nolinear beams 1st floor
# #########################################################
element dispBeamColumn 80 2 13 5 23 2
element dispBeamColumn 81 13 24 5 23 2
element dispBeamColumn 82 24 35 5 23 2
element dispBeamColumn 83 35 46 5 23 2
element dispBeamColumn 84 46 57 5 23 2
# #########################################################
# define nolinear beams 2nd floor
# #########################################################
element dispBeamColumn 85 3 14 5 23 2
element dispBeamColumn 86 14 25 5 23 2
element dispBeamColumn 87 25 36 5 23 2
element dispBeamColumn 88 36 47 5 23 2
element dispBeamColumn 89 47 58 5 23 2
# #########################################################
# define nolinear beams 3rd floor
# #########################################################
element dispBeamColumn 90 4 15 5 23 2
element dispBeamColumn 91 15 26 5 23 2
element dispBeamColumn 92 26 37 5 23 2
element dispBeamColumn 93 37 48 5 23 2
element dispBeamColumn 94 48 59 5 23 2
# #########################################################
# define nolinear beams 4th floor
# #########################################################
element dispBeamColumn 95 5 16 5 24 2
element dispBeamColumn 96 16 27 5 24 2
element dispBeamColumn 97 27 38 5 24 2
element dispBeamColumn 98 38 49 5 24 2
element dispBeamColumn 99 49 60 5 24 2
# #########################################################
# define nolinear beams 5th floor
# #########################################################
element dispBeamColumn 100 6 17 5 24 2
element dispBeamColumn 101 17 28 5 24 2
element dispBeamColumn 102 28 39 5 24 2
element dispBeamColumn 103 39 50 5 24 2
element dispBeamColumn 104 50 61 5 24 2
# #########################################################
# define nolinear beams 6th floor
# #########################################################
element dispBeamColumn 105 7 18 5 24 2
element dispBeamColumn 106 18 29 5 24 2
element dispBeamColumn 107 29 40 5 24 2
element dispBeamColumn 108 40 51 5 24 2
element dispBeamColumn 109 51 62 5 24 2
# #########################################################
# define nolinear beams 7th floor
# #########################################################
element dispBeamColumn 110 8 19 5 24 2
element dispBeamColumn 111 19 30 5 24 2
element dispBeamColumn 112 30 41 5 24 2
element dispBeamColumn 113 41 52 5 24 2
element dispBeamColumn 114 52 63 5 24 2
# #########################################################
# define nolinear beams 8th floor
# #########################################################
element dispBeamColumn 115 9 20 5 25 2
element dispBeamColumn 116 20 31 5 25 2
element dispBeamColumn 117 31 42 5 25 2
element dispBeamColumn 118 42 53 5 25 2
element dispBeamColumn 119 53 64 5 25 2
# #########################################################
# define nolinear beams 9th floor
# #########################################################
element dispBeamColumn 120 10 21 5 10 2
element dispBeamColumn 121 21 32 5 10 2
element dispBeamColumn 122 32 43 5 10 2
element dispBeamColumn 123 43 54 5 10 2
element dispBeamColumn 124 54 65 5 10 2
# #########################################################
# define nolinear beams 10th floor
# #########################################################
element dispBeamColumn 125 11 22 5 17 2
element dispBeamColumn 126 22 33 5 17 2
element dispBeamColumn 127 33 44 5 17 2
element dispBeamColumn 128 44 55 5 17 2
element dispBeamColumn 129 55 66 5 17 2
# #########################################################
# end of element definition
puts "$$$$$"
# Define constant gravity load (and other constant loads)

pattern Plain 1 Linear {
load 35 0.0 -$Weight1 0.0
load 36 0.0 -$Weight2 0.0
load 37 0.0 -$Weight2 0.0
load 38 0.0 -$Weight2 0.0
load 39 0.0 -$Weight2 0.0
load 40 0.0 -$Weight2 0.0
load 41 0.0 -$Weight2 0.0
load 42 0.0 -$Weight2 0.0
load 43 0.0 -$Weight2 0.0
load 44 0.0 -$Weight3 0.0
}
eigen 9

puts "$$$$$$"

#Gravity analysis parameters--------LoadControl static analysis
set Tol 1.0e-8;
system SparseGeneral;
constraints Transformation;
test EnergyIncr $Tol 50 0;
algorithm Newton;
numberer RCM;
integrator LoadControl 0.1; #first load increment (pseudo-time step) in the next invocation of the analysis command.
analysis Static; #set up type of analysis,static for gravity
analyze 10;
loadConst -time 0.0;

puts "Model Build"
# sac 9 recorder

set pfile1 "Data/nodesdisplacement 44 43 42 41 40 39 38 37 36 .txt"
set pfile2 "Data/nodesdisplacementroof 44.txt"
recorder Node -file $pfile1 -time -node 44 43 42 41 40 39 38 37 36 -dof 1 disp
recorder Node -file $pfile2 -time -node 44 -dof 1 disp
set pfile3 "Data/allnodedrift.txt"
recorder Drift -file $pfile3 -time -iNode 43 42 41 40 39 38 37 36 35 -jNode 44 43 42 41 40 39 38 37 36 -dof 1 -perpDirn 2
set pfile4 "Data/nodesbase shear 2 13 24 35 46 57 .txt"
recorder Node -file $pfile4 -time -node 2 13 24 35 46 57 -dof 1 reaction

puts "$$$$$$$"
set pfile2 "Data/nodeseigenvectormode1 44 43 42 41 40 39 38 37 36 .txt"
recorder Node -file $pfile2 -time -node 44 43 42 41 40 39 38 37 36 -dof 1 "eigen 1"
set pfile3 "Data/nodeseigenvectormode2 44 43 42 41 40 39 38 37 36 .txt"
recorder Node -file $pfile3 -time -node 44 43 42 41 40 39 38 37 36 -dof 1 "eigen 2"
set pfile4 "Data/nodeseigenvectormode3 44 43 42 41 40 39 38 37 36 .txt"
recorder Node -file $pfile4 -time -node 44 43 42 41 40 39 38 37 36 -dof 1 "eigen 3"

set pfile5 "Data/EnvelopeNode 44.txt"
recorder EnvelopeNode -file $pfile5 -time -node 44 -dof 1 disp
set pfile6 "Data/EnvelopeNodeEigenvectormode1 44 43 42 41 40 39 38 37 36 .txt"
recorder EnvelopeNode -file $pfile6 -time -node 44 43 42 41 40 39 38 37 36 -dof 1 "eigen 1"
set pfile7 "Data/EnvelopeNodedrift.txt"
recorder EnvelopeDrift -file $pfile7 -time -iNode 43 42 41 40 39 38 37 36 35 -jNode 44 43 42 41 40 39 38 37 36 -dof 1 -perpDirn 2
# ######################################################################################################################################
# end of recorder definition

puts "$$$$$$$"
proc ReadSMDFile {inFilename outFilename dt} {
#########################################################
# ReadSMDFile $inFilename $outFilename $dt
#########################################################
# read gm input format and output to opensees file
#
# Written: MHS
# Date: July 2000
#
# A procedure which parses a ground motion record from the PEER
# strong motion database by finding dt in the record header, then
# echoing data values to the output file.
#
# Formal arguments
# inFilename -- file which contains PEER strong motion record
# outFilename -- file to be written in format G3 can read
# dt -- time step determined from file header
#
# Assumptions
# The header in the PEER record is, e.g., formatted as follows:
# PACIFIC ENGINEERING AND ANALYSIS STRONG-MOTION DATA
# BORREGO MOUNTAIN 04/09/68 0230, EL CENTRO ARRAY #9, 270
# ACCELERATION TIME HISTORY IN UNITS OF G
# NPTS= 4000, DT= .01000 SEC

upvar $dt DT; # Pass dt by reference

# Open the input file and catch the error if it can't be read
if [catch {open $inFilename r} inFileID] {
puts stderr "Cannot open $inFilename for reading"
} else {
# Open output file for writing
set outFileID [open $outFilename w]

# Flag indicating dt is found and that ground motion
# values should be read -- ASSUMES dt is on last line
# of header!!!
set flag 0
# Look at each line in the file
foreach line [split [read $inFileID] \n] {
if {[llength $line] == 0} {
# Blank line --> do nothing
continue
} elseif {$flag == 1} {
# Echo ground motion values to output file
puts $outFileID $line
} else {
# Search header lines for dt
foreach word [split $line] {
# Read in the time step
if {$flag == 1} {
set DT $word
break
}
# Find the desired token and set the flag
if {[string match $word "DT="] == 1} {set flag 1}
}
}
}
close $outFileID; # Close the output file
close $inFileID; # Close the input file
}
}


set GMdirection 1; # ground-motion direction
set GMfile "tabas.acc" ; # ground-motion filenames
set GMfact 1; # ground-motion scaling factor

# set up ground-motion-analysis parameters
set DtAnalysis [expr 0.02*$sec]; # time-step Dt for lateral analysis
set TmaxAnalysis [expr 32. *$sec]; # maximum duration of ground-motion analysis -- should be 50*$sec

# ----------- set up analysis parameters
# create the analysis
wipeAnalysis
constraints Transformation
numberer RCM
system SparseGeneral
test EnergyIncr 1.0e-8 50 0
algorithm Newton
integrator Newmark 0.5 0.25
analysis Transient


# ------------ define & apply damping
# RAYLEIGH damping parameters, Where to put M/K-prop damping, switches (http://opensees.berkeley.edu/OpenSees/m ... l/1099.htm)
# D=$alphaM*M + $betaKcurr*Kcurrent + $betaKcomm*KlastCommit + $beatKinit*$Kinitial
set xDamp 0.02; # damping ratio
set MpropSwitch 1.0;
set KcurrSwitch 0.0;
set KcommSwitch 1.0;
set KinitSwitch 0.0;
set nEigenI 1; # mode 1
set nEigenJ 3; # mode 3
set lambdaN [eigen [expr $nEigenJ]]; # eigenvalue analysis for nEigenJ modes
set lambdaI [lindex $lambdaN [expr $nEigenI-1]]; # eigenvalue mode i
set lambdaJ [lindex $lambdaN [expr $nEigenJ-1]]; # eigenvalue mode j
set omegaI [expr pow($lambdaI,0.5)];
set omegaJ [expr pow($lambdaJ,0.5)];
set alphaM [expr $MpropSwitch*$xDamp*(2*$omegaI*$omegaJ)/($omegaI+$omegaJ)]; # M-prop. damping; D = alphaM*M
set betaKcurr [expr $KcurrSwitch*2.*$xDamp/($omegaI+$omegaJ)]; # current-K; +beatKcurr*KCurrent
set betaKcomm [expr $KcommSwitch*2.*$xDamp/($omegaI+$omegaJ)]; # last-committed K; +betaKcomm*KlastCommitt
set betaKinit [expr $KinitSwitch*2.*$xDamp/($omegaI+$omegaJ)]; # initial-K; +beatKinit*Kini
rayleigh $alphaM $betaKcurr $betaKinit $betaKcomm; # RAYLEIGH damping

# --------------------------------- perform Dynamic Ground-Motion Analysis
# the following commands are unique to the Uniform Earthquake excitation
set IDloadTag 400; # for uniformSupport excitation
# Uniform EXCITATION: acceleration input
set inFile tabas.acc;
set outFile tabas.th; # set variable holding new filename (PEER files have .at2/dt2 extension)
ReadSMDFile $inFile $outFile dt; # call procedure to convert the ground-motion file
set GMfatt [expr $g*$GMfact]; # data in input file is in g Unifts -- ACCELERATION TH
set AccelSeries "Series -dt $dt -filePath $outFile -factor $GMfatt"; # time series information
pattern UniformExcitation $IDloadTag $GMdirection -accel $AccelSeries ; # create Unifform excitation

set Nsteps [expr int($TmaxAnalysis/$DtAnalysis)];
set ok [analyze $Nsteps $DtAnalysis]; # actually perform analysis; returns ok=0 if analysis was successful

if {$ok != 0} { ; # analysis was not successful.
# --------------------------------------------------------------------------------------------------
# change some analysis parameters to achieve convergence
# performance is slower inside this loop
# Time-controlled analysis
set ok 0;
set controlTime [getTime];
while {$controlTime < $TmaxAnalysis && $ok == 0} {
set controlTime [getTime]
set ok [analyze 1 $DtAnalysis]

if {$ok != 0} {
puts "Trying Newton with Initial Tangent .."
test NormDispIncr $Tol 1000 0
algorithm Newton -initial
set ok [analyze 1 $DtAnalysis]
test $testTypeDynamic $TolDynamic $maxNumIterDynamic 0
algorithm $algorithmTypeDynamic

}
if {$ok != 0} {
puts "Trying Broyden .."
algorithm Broyden 8
set ok [analyze 1 $DtAnalysis]
algorithm $algorithmTypeDynamic

}
if {$ok != 0} {
puts "Trying NewtonWithLineSearch .."
algorithm NewtonLineSearch .8
set ok [analyze 1 $DtAnalysis]
algorithm $algorithmTypeDynamic

}
}
}; # end if ok !0



puts "Ground Motion Done. End Time: [getTime]"

for {set i 0} {$i<$Nsteps} {incr i 1} {
analyze 1 0.02
eigen $numMode

}

set Lambda [eigen -fullGenLapack 9]
puts "\nEigenvalues at start of transient:"
puts " Lambda Omega Period"
foreach Lambda $Lambda {
if {$Lambda > 0.0} {
set Omega [expr pow($Lambda,0.5)]
set Period [expr 2*$PI/$Omega]
puts "$Lambda $Omega $Period"
}
}
thank you
fmk
Site Admin
Posts: 5884
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Post by fmk »

you did not combine the script in a way that demonstrates you understand what it is you are doing .. you need to look at the script and understand what it is you are doing .. you did not put the eigen command inside te main analysis loop .. everything after the following needs to be redone in a way that does what you want.

[code]
set ok [analyze $Nsteps $DtAnalysis]; #
[/code]

something like this:

[code]
# Time-controlled analysis
set ok 0;
set controlTime [getTime];
while {$controlTime < $TmaxAnalysis && $ok == 0} {
set controlTime [getTime]
set ok [analyze 1 $DtAnalysis]

if {$ok != 0} {
puts "Trying Newton with Initial Tangent .."
test NormDispIncr $Tol 1000 0
algorithm Newton -initial
set ok [analyze 1 $DtAnalysis]
test $testTypeDynamic $TolDynamic $maxNumIterDynamic 0
algorithm $algorithmTypeDynamic

}
if {$ok != 0} {
puts "Trying Broyden .."
algorithm Broyden 8
set ok [analyze 1 $DtAnalysis]
algorithm $algorithmTypeDynamic

}
if {$ok != 0} {
puts "Trying NewtonWithLineSearch .."
algorithm NewtonLineSearch .8
set ok [analyze 1 $DtAnalysis]
algorithm $algorithmTypeDynamic

}
if {$ok == 0} {
eigen $numMode
}
} #end while




puts "Ground Motion Done. End Time: [getTime]"

[/code]
solmaz_moradpoor
Posts: 26
Joined: Sat Feb 13, 2010 9:59 am
Location: iran

Post by solmaz_moradpoor »

i want to get to mode shapes of a building with 9 storey(sac9).in part of the analysis i changed the codes with the loop but the result didnt change.and the eigenvalues in all steps was same.please note

[code]
set Nsteps [expr int($TmaxAnalysis/$DtAnalysis)];
set ok [analyze $Nsteps $DtAnalysis]; # actually perform analysis; returns ok=0 if analysis was successful

if {$ok != 0} { ; # analysis was not successful.
# --------------------------------------------------------------------------------------------------

set ok 0;
set controlTime [getTime];
set nModes 9
set i 0
for {set i 0} {$i<$Nsteps} {incr i 1} {
while {$controlTime < $TmaxAnalysis && $ok == 0} {
set controlTime [getTime]
set ok [analyze 1 $DtAnalysis]
eigen $nModes

if {$ok != 0} {

puts "Trying Newton with Initial Tangent .."
test NormDispIncr $Tol 1000 0
algorithm Newton -initial
set ok [analyze 1 $DtAnalysis]
test $testTypeDynamic $TolDynamic $maxNumIterDynamic 0
algorithm $algorithmTypeDynamic
eigen $nModes

}
if {$ok != 0} {
puts "Trying Broyden .."
algorithm Broyden 8
set ok [analyze 1 $DtAnalysis]
algorithm $algorithmTypeDynamic
eigen $nModes
}

}
if {$ok != 0} {
puts "Trying NewtonWithLineSearch .."
algorithm NewtonLineSearch .8
set ok [analyze 1 $DtAnalysis]
algorithm $algorithmTypeDynamic
eigen $nModes
}

}


}
puts "Ground Motion Done. End Time: [getTime]"
set j 0
for {set j 0} {$j < 9} {incr j 1} {
recorder Node -file eigenVector[expr {$j}].tmp -node 1 -dof 1 "eigen [expr $j + 1]"
}

you think where is problem?
fmk
Site Admin
Posts: 5884
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Post by fmk »

[code]
set ok [analyze $Nsteps $DtAnalysis]; # actually perform analysis; returns ok=0 if analysis was successful
[/code]

if this works it never goes into the second loop with the eiegen value determination.
THAT'S WHY IT WAS NOT IN MY SCRIPT.
solmaz_moradpoor
Posts: 26
Joined: Sat Feb 13, 2010 9:59 am
Location: iran

Post by solmaz_moradpoor »

dear fmk
thanks for your help.
finally i got to eigenvalues in each step of analysis.
Locked