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 » Thu May 09, 2013 2:52 am

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: 5866
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Re: IDA

Post by fmk » Thu May 09, 2013 3:41 pm

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 » Fri May 10, 2013 12:46 am

I want to stop an analysis if the roof hits 30cm.

fmk
Site Admin
Posts: 5866
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Re: IDA

Post by fmk » Fri May 10, 2013 9:48 am

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 » Tue May 28, 2013 11:18 am

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: 5866
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Re: IDA

Post by fmk » Tue May 28, 2013 11:33 am

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 » Tue May 28, 2013 11:41 am

i use if instead of while. It is not correct?

fmk
Site Admin
Posts: 5866
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Re: IDA

Post by fmk » Tue May 28, 2013 11:43 am

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 » Tue May 28, 2013 12:05 pm

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: 5866
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Re: IDA

Post by fmk » Tue May 28, 2013 12:27 pm

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: 141
Joined: Sun Oct 03, 2010 11:36 pm
Location: Hong Kong

Re: IDA

Post by linguan118 » Sun Jun 02, 2013 12:58 am

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 » Mon Jun 03, 2013 11:56 am

in for loop, after first Factor, time does not reset and continue over the tFinal. how can i solve it?

fmk
Site Admin
Posts: 5866
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Re: IDA

Post by fmk » Tue Jun 04, 2013 11:29 am


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

Re: IDA

Post by Eli » Thu Jun 06, 2013 12:07 pm

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: 5866
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Re: IDA

Post by fmk » Thu Jun 06, 2013 1:18 pm

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

Post Reply