IDA

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

Moderators: silvia, selimgunay, Moderators

Eli
Posts: 44
Joined: Sat Dec 22, 2012 5:16 am

IDA

Post by Eli »

In time history analysis I want to analyse my model till roof displacement reach 30 cm. should I use IDA analysis?
How is it? Is there any example?
Thank in advance
fmk
Site Admin
Posts: 5884
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Re: IDA

Post by fmk »

your question is unclear. is this the max displacement or do you want to stop an analysis if the roof hits 30cm??
Eli
Posts: 44
Joined: Sat Dec 22, 2012 5:16 am

Re: IDA

Post by Eli »

I want to stop an analysis if the roof hits 30cm.
fmk
Site Admin
Posts: 5884
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Re: IDA

Post by fmk »

set roofNode xx
set tCurrent 0.
set tFinal [expr $numPts * $dt]
set roofDisp 0.
while {$tCurrent < $tFinal && $roofDisp < 30} {
set ok [analyze 1 $dt]
set tCurrent [getTime]
set roofDisp [nodeDisp $roofNode 1]
set roofDisp [expr abs($roofDisp)]
}
Eli
Posts: 44
Joined: Sat Dec 22, 2012 5:16 am

Re: IDA

Post by Eli »

so if i want to calculate scale factor of ground motion (which in that factor, roof displacement hits 30cm); does the following works correctly?
wipeAnalysis
loadConst -time 0.0
set kk 1
for { set i 1} { $i <= 50 } { incr i 1 } {;
set Factor [expr $i/10.0]
set outFile tabas.txt
set Nsteps 1642
set dt 0.02;
set GMfatt [expr 9.81*$Factor];
set gamma 0.5
set beta 0.25;
set alphaM 0.446;
set betaK 0.00426;
set betaKcomm 0
set betaKinit 0
system UmfPack
constraints Plain
test EnergyIncr 1.0e-4 1000;
algorithm NewtonLineSearch; # BETTER
numberer RCM
integrator Newmark $gamma $beta
analysis Transient

set roofNode 43
set tCurrent 0.
set tFinal [expr $Nsteps * $dt]
set roofDisp 0.
incr kk
set Gaccel "Series -dt $dt -filePath $outFile -factor $GMfatt"; # time series information
pattern UniformExcitation $kk 1 -accel $Gaccel; # create uniform excitation
set ok [analyze 1 $dt]
set tCurrent [getTime]
set roofDisp [nodeDisp $roofNode 1]
set roofDisp [expr abs($roofDisp)]
puts "d=$roofDisp"
if { $roofDisp >30 } {
puts " factor=$Factor; Disp=$roofDisp"
break
}
}
Last edited by Eli on Tue May 28, 2013 1:11 pm, edited 1 time in total.
fmk
Site Admin
Posts: 5884
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Re: IDA

Post by fmk »

you are missing the while .. i modified the original post.
Eli
Posts: 44
Joined: Sat Dec 22, 2012 5:16 am

Re: IDA

Post by Eli »

i use if instead of while. It is not correct?
fmk
Site Admin
Posts: 5884
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Re: IDA

Post by fmk »

you only have one if! .. i don't see where you do more than a single analysis step with what you have.
Eli
Posts: 44
Joined: Sat Dec 22, 2012 5:16 am

Re: IDA

Post by Eli »

in the following i use while too. but when roof displacement hits 0.5 m; the analysis do not break and continue, and after it gets error: the ConvergenceTest object failed in test.
Do I use while and for in correct place?

wipeAnalysis
loadConst -time 0.0
set kk 1
for { set i 1} { $i <=100 } { incr i 1 } {;
set Factor [expr $i/20.0]
set outFile "kobe.txt"
set Nsteps 4000
set dt 0.01;
set GMfatt [expr 9.81*$Factor];
set roofNode 43
set tCurrent 0.0
set tFinal [expr $Nsteps*$dt]
set roofDisp 0.0
incr kk
set Gaccel "Series -dt $dt -filePath $outFile -factor $GMfatt";
pattern UniformExcitation $kk 1 -accel $Gaccel;
set gamma 0.5
set beta 0.25;
system UmfPack
constraints Plain
test EnergyIncr 1.0e-4 1000;
algorithm NewtonLineSearch;
numberer RCM
integrator Newmark $gamma $beta
analysis Transient
while {$tCurrent<=$tFinal && $roofDisp<0.5} {;
set ok [analyze 1 $dt]
set tCurrent [getTime]
set roofDisp [nodeDisp $roofNode 1]
set roofDisp [expr abs($roofDisp)]
puts " factor=$Factor; Disp=$roofDisp time=$tCurrent"
if { $roofDisp >0.5 } {;
puts " ok, factor=$Factor; Disp=$roofDisp time=$tCurrent"
};
};
};
Last edited by Eli on Mon Jun 03, 2013 10:31 pm, edited 2 times in total.
fmk
Site Admin
Posts: 5884
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Re: IDA

Post by fmk »

it should work .. the break is not needed if the test is in the conditional of the while loop. show me the resul of the puts "d=$roofDisp" before and after it goes beyond 30.
linguan118
Posts: 140
Joined: Sun Oct 03, 2010 11:36 pm
Location: Hong Kong

Re: IDA

Post by linguan118 »

Nice topic
Research Assistant Professor, The Hong Kong Polytechnic University
guanlin@polyu.edu.hk
Eli
Posts: 44
Joined: Sat Dec 22, 2012 5:16 am

Re: IDA

Post by Eli »

in for loop, after first Factor, time does not reset and continue over the tFinal. how can i solve it?
fmk
Site Admin
Posts: 5884
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Re: IDA

Post by fmk »

Eli
Posts: 44
Joined: Sat Dec 22, 2012 5:16 am

Re: IDA

Post by Eli »

Thanks dear fmk
Is there any command to reset node recorder too for each i in for loop?
although i use set roofDisp 0.0, roofDisp for each factor at time 0 start with roofDisp value of pervious factor at tFinal.
fmk
Site Admin
Posts: 5884
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Re: IDA

Post by fmk »

and why would you want to reset it .. if reset why bother record any data?
Post Reply