IDA analysis in opensees

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

Moderators: silvia, selimgunay, Moderators

Post Reply
mja441
Posts: 28
Joined: Mon Feb 01, 2010 2:32 am
Location: Tehran University

IDA analysis in opensees

Post by mja441 »

Dear all,

can anybody provide me a tcl file which performs IDA( incremental dynamic analysis)?
a script which scales earthquake records to multiple intensities and plots response graphs( such as max drift vs. IM).

regards,

MJ
shahabnab
Posts: 1
Joined: Fri Oct 15, 2010 11:29 pm
Location: University of Isfahan

Re: IDA analysis in opensees

Post by shahabnab »

Hi
It 's my problem too. I need a simple code to give me an idea for coding IDA algorithem. if Somebody help us we 'll be appreciate.
TanX
mja441
Posts: 28
Joined: Mon Feb 01, 2010 2:32 am
Location: Tehran University

Re: IDA analysis in opensees

Post by mja441 »

Hi,
I wrote the following code for IDA and its simple and it works.
I've commented as far as possible, but Please let me know if you dont understand any part of it.

regards

IDA code:


wipeAnalysis

#change to reach convergance
variable TolDynamic 1.e-3; # Convergence Test:tolerance

#define your GM intensity step: 0.1g,...
set s [expr 2+4*$i]
set gmf [expr $s/10.]

puts "gmf=[expr $gmf]"
puts ******************


file mkdir x[expr $gmf]

#Paste your model here
puts "model built!"






#define gravity loads and perform gravity analysis

constraints Plain
numberer Plain
system BandGeneral
test NormDispIncr 1.e-8 60
algorithm ModifiedNewton
integrator LoadControl 0.1
analysis Static
analyze 10
loadConst -time 0.0


####################
#define recorders
recorder Node -file x[expr $gmf]/node2dispX[expr $gmf].out -time -node 2 -dof 1 disp
recorder Node -file x[expr $gmf]/node3dispX[expr $gmf].out -time -node 3 -dof 1 disp
recorder Node -file x[expr $gmf]/node4(roof)dispX[expr $gmf].out -time -node 4 -dof 1 disp

recorder Node -file x[expr $gmf]/node1reacX[expr $gmf].out -time -node 1 -dof 1 reaction
recorder Node -file x[expr $gmf]/node5reacX[expr $gmf].out -time -node 5 -dof 1 reaction

recorder Drift -file x[expr $gmf]/driftS1X[expr $gmf].out -time -iNode 1 -jNode 2 -dof 1 -perpDirn 2
recorder Drift -file x[expr $gmf]/driftS2X[expr $gmf].out -time -iNode 2 -jNode 3 -dof 1 -perpDirn 2
recorder Drift -file x[expr $gmf]/driftS3X[expr $gmf].out -time -iNode 3 -jNode 4 -dof 1 -perpDirn 2

recorder EnvelopeNode -file x[expr $gmf]/envDisp2X[expr $gmf].out -time -node 2 -dof 1 disp
recorder EnvelopeNode -file x[expr $gmf]/envDisp3X[expr $gmf].out -time -node 3 -dof 1 disp
recorder EnvelopeNode -file x[expr $gmf]/envDisp4X[expr $gmf].out -time -node 4 -dof 1 disp


for {set j 1} {$j<=15} {incr j} {

recorder Element -file x[expr $gmf]/ele[expr $j]-X[expr $gmf].out -time -ele $j localForce
}


##EarthQuake Loading

puts "groundmotion start!.Time: [getTime]"

#define damping
set xDamp 0.05; # 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

puts "damping ok!"


#-------------------------------
### change these parameters for each record:
## TmaxAnalysis , DtAnalysis , "Series -dt .. - filepath .."


set TmaxAnalysis 49.97 ; # maximum duration of ground-motion analysis -- should be 50*$sec
set DtAnalysis 0.01; # time-step Dt for lateral analysis

#increment gmf
set accel "Series -dt 0.01 -filePath LADSPx3.8.txt -factor [expr ($gmf)*9.81]"

pattern UniformExcitation [expr $i+100] 1 -accel $accel




##Dynamic Analysis Parameters

variable constraintsTypeDynamic Transformation;
constraints $constraintsTypeDynamic ;

variable numbererTypeDynamic RCM
numberer $numbererTypeDynamic

variable systemTypeDynamic BandGeneral; # try UmfPack for large problems
system $systemTypeDynamic

variable maxNumIterDynamic 400; # Convergence Test: maximum number of iterations that will be performed before "failure to converge" is returned
variable printFlagDynamic 0; # Convergence Test: flag used to print information on convergence (optional) # 1: print information on each step;
variable testTypeDynamic EnergyIncr; # Convergence-test type
test $testTypeDynamic $TolDynamic $maxNumIterDynamic $printFlagDynamic;

variable maxNumIterConvergeDynamic 2000;
variable printFlagConvergeDynamic 0;

variable algorithmTypeDynamic KrylovNewton;
algorithm $algorithmTypeDynamic;

variable NewmarkGamma 0.5; # Newmark-integrator gamma parameter (also HHT)
variable NewmarkBeta 0.26; # Newmark-integrator beta parameter
variable integratorTypeDynamic Newmark;
integrator $integratorTypeDynamic $NewmarkGamma $NewmarkBeta
variable analysisTypeDynamic VariableTransient
analysis $analysisTypeDynamic

#-------------------------------
#
set Nsteps [expr int($TmaxAnalysis/$DtAnalysis)];
#analyze $Nsteps $DtAnalysis
#loadConst -time 0.0
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 $TolDynamic 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 .6
set ok [analyze 1 $DtAnalysis]
algorithm $algorithmTypeDynamic
}
if {$ok != 0} {
puts "Trying ModifiedNewton .."
algorithm ModifiedNewton
set ok [analyze 1 $DtAnalysis]
algorithm $algorithmTypeDynamic
}
if {$ok != 0} {
puts "Trying BFGS.."
algorithm BFGS
set ok [analyze 1 $DtAnalysis]
algorithm $algorithmTypeDynamic
}
}
}; # end if ok !0



puts "Ground Motion DoneX[expr $gmf]. End Time: [getTime]"
puts ****************************************************************
puts ****************************************************************
dillonjen
Posts: 6
Joined: Thu Feb 02, 2012 5:47 pm
Location: SFSU

Re: IDA analysis in opensees

Post by dillonjen »

hey mja441,

What is the $i should be at the beginning of your code?
ftoledoj
Posts: 53
Joined: Mon Oct 01, 2012 2:30 pm

Re: IDA analysis in opensees

Post by ftoledoj »

HI. what does the first part of the script means? thanks
> #change to reach convergance
> variable TolDynamic 1.e-3; # Convergence
> Test:tolerance
>
> #define your GM intensity step: 0.1g,...
> set s [expr 2+4*$i]
> set gmf [expr $s/10.]
>
> puts "gmf=[expr $gmf]"
> puts ******************
>



mja441 wrote:
> Hi,
> I wrote the following code for IDA and its simple and it works.
> I've commented as far as possible, but Please let me know if you dont
> understand any part of it.
>
> regards
>
> IDA code:
>
>
> wipeAnalysis
>
> #change to reach convergance
> variable TolDynamic 1.e-3; # Convergence
> Test:tolerance
>
> #define your GM intensity step: 0.1g,...
> set s [expr 2+4*$i]
> set gmf [expr $s/10.]
>
> puts "gmf=[expr $gmf]"
> puts ******************
>
>
> file mkdir x[expr $gmf]
>
> #Paste your model here
> puts "model built!"
>
>
>
>
>
>
> #define gravity loads and perform gravity analysis
>
> constraints Plain
> numberer Plain
> system BandGeneral
> test NormDispIncr 1.e-8 60
> algorithm ModifiedNewton
> integrator LoadControl 0.1
> analysis Static
> analyze 10
> loadConst -time 0.0
>
>
> ####################
> #define recorders
> recorder Node -file x[expr $gmf]/node2dispX[expr $gmf].out -time -node 2
> -dof 1 disp
> recorder Node -file x[expr $gmf]/node3dispX[expr $gmf].out -time -node 3
> -dof 1 disp
> recorder Node -file x[expr $gmf]/node4(roof)dispX[expr $gmf].out -time
> -node 4 -dof 1 disp
>
> recorder Node -file x[expr $gmf]/node1reacX[expr $gmf].out -time -node 1
> -dof 1 reaction
> recorder Node -file x[expr $gmf]/node5reacX[expr $gmf].out -time -node 5
> -dof 1 reaction
>
> recorder Drift -file x[expr $gmf]/driftS1X[expr $gmf].out -time -iNode 1
> -jNode 2 -dof 1 -perpDirn 2
> recorder Drift -file x[expr $gmf]/driftS2X[expr $gmf].out -time -iNode 2
> -jNode 3 -dof 1 -perpDirn 2
> recorder Drift -file x[expr $gmf]/driftS3X[expr $gmf].out -time -iNode 3
> -jNode 4 -dof 1 -perpDirn 2
>
> recorder EnvelopeNode -file x[expr $gmf]/envDisp2X[expr $gmf].out -time
> -node 2 -dof 1 disp
> recorder EnvelopeNode -file x[expr $gmf]/envDisp3X[expr $gmf].out -time
> -node 3 -dof 1 disp
> recorder EnvelopeNode -file x[expr $gmf]/envDisp4X[expr $gmf].out -time
> -node 4 -dof 1 disp
>
>
> for {set j 1} {$j<=15} {incr j} {
>
> recorder Element -file x[expr $gmf]/ele[expr $j]-X[expr $gmf].out -time
> -ele $j localForce
> }
>
>
> ##EarthQuake Loading
>
> puts "groundmotion start!.Time: [getTime]"
>
> #define damping
> set xDamp 0.05; # 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
>
> puts "damping ok!"
>
>
> #-------------------------------
> ### change these parameters for each record:
> ## TmaxAnalysis , DtAnalysis , "Series -dt .. - filepath .."
>
>
> set TmaxAnalysis 49.97 ; # maximum duration of ground-motion
> analysis -- should be 50*$sec
> set DtAnalysis 0.01; # time-step Dt for lateral analysis
>
> #increment gmf
> set accel "Series -dt 0.01 -filePath LADSPx3.8.txt -factor [expr
> ($gmf)*9.81]"
>
> pattern UniformExcitation [expr $i+100] 1 -accel $accel
>
>
>
>
> ##Dynamic Analysis Parameters
>
> variable constraintsTypeDynamic Transformation;
> constraints $constraintsTypeDynamic ;
>
> variable numbererTypeDynamic RCM
> numberer $numbererTypeDynamic
>
> variable systemTypeDynamic BandGeneral; # try UmfPack for large problems
> system $systemTypeDynamic
>
> variable maxNumIterDynamic 400; # Convergence Test: maximum
> number of iterations that will be performed before "failure to
> converge" is returned
> variable printFlagDynamic 0; # Convergence Test: flag used
> to print information on convergence (optional) # 1: print
> information on each step;
> variable testTypeDynamic EnergyIncr; # Convergence-test type
> test $testTypeDynamic $TolDynamic $maxNumIterDynamic $printFlagDynamic;
>
> variable maxNumIterConvergeDynamic 2000;
> variable printFlagConvergeDynamic 0;
>
> variable algorithmTypeDynamic KrylovNewton;
> algorithm $algorithmTypeDynamic;
>
> variable NewmarkGamma 0.5; # Newmark-integrator gamma parameter (also HHT)
> variable NewmarkBeta 0.26; # Newmark-integrator beta parameter
> variable integratorTypeDynamic Newmark;
> integrator $integratorTypeDynamic $NewmarkGamma $NewmarkBeta
> variable analysisTypeDynamic VariableTransient
> analysis $analysisTypeDynamic
>
> #-------------------------------
> #
> set Nsteps [expr int($TmaxAnalysis/$DtAnalysis)];
> #analyze $Nsteps $DtAnalysis
> #loadConst -time 0.0
> 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 $TolDynamic 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 .6
> set ok [analyze 1 $DtAnalysis]
> algorithm $algorithmTypeDynamic
> }
> if {$ok != 0} {
> puts "Trying ModifiedNewton .."
> algorithm ModifiedNewton
> set ok [analyze 1 $DtAnalysis]
> algorithm $algorithmTypeDynamic
> }
> if {$ok != 0} {
> puts "Trying BFGS.."
> algorithm BFGS
> set ok [analyze 1 $DtAnalysis]
> algorithm $algorithmTypeDynamic
> }
> }
> }; # end if ok !0
>
>
>
> puts "Ground Motion DoneX[expr $gmf]. End Time: [getTime]"
> puts ****************************************************************
> puts ****************************************************************
Felipe Toledo Jaureguiberry
Estudiante 6to año Ingenieria Civil
Universidad de los Andes Chile
felipe.toledo.j@gmail.com
mja441
Posts: 28
Joined: Mon Feb 01, 2010 2:32 am
Location: Tehran University

Re: IDA analysis in opensees

Post by mja441 »

> Hi ftoledoj;
The Toldynamic variable is a variable which you can u can change to reach convergance in your analysis. The default is 1.e-3, but you can increase it to reach higher precision in your analysis (for example 1.e-8) or if you have convergance problems in your script, you can reduce this value to maybe fix the problem (for example 1.e-2.

In the following script:
> > #define your GM intensity step: 0.4g,...
> > set s [expr 2+4*$i]
> > set gmf [expr $s/10.]

The number that is multipied into $i ( i.e. 4 here) is the step in which you want to increase the PGA factor in IDA analysis. for example in this case,
The first ground motion factor(gmf) is (2+4*1)/10=0.6 , the next gmf is : (2+4*2)/10=1.0, ... and so on ( as you can see, the gmf is grownig by 0.4).

Best Regards,
MJ,
Phd candidate in Earthquake Eng. at University of Tehran, Iran.




ftoledoj wrote:
> HI. what does the first part of the script means? thanks
> > #change to reach convergance
> > variable TolDynamic 1.e-3; # Convergence
> > Test:tolerance
> >
> > #define your GM intensity step: 0.1g,...
> > set s [expr 2+4*$i]
> > set gmf [expr $s/10.]
> >
> > puts "gmf=[expr $gmf]"
> > puts ******************
> >
>


)
>
> mja441 wrote:
> > Hi,
> > I wrote the following code for IDA and its simple and it works.
> > I've commented as far as possible, but Please let me know if you dont
> > understand any part of it.
> >
> > regards
> >
> > IDA code:
> >
> >
> > wipeAnalysis
> >
> > #change to reach convergance
> > variable TolDynamic 1.e-3; # Convergence
> > Test:tolerance
> >
> > #define your GM intensity step: 0.1g,...
> > set s [expr 2+4*$i]
> > set gmf [expr $s/10.]
> >
> > puts "gmf=[expr $gmf]"
> > puts ******************
> >
> >
> > file mkdir x[expr $gmf]
> >
> > #Paste your model here
> > puts "model built!"
> >
> >
> >
> >
> >
> >
> > #define gravity loads and perform gravity analysis
> >
> > constraints Plain
> > numberer Plain
> > system BandGeneral
> > test NormDispIncr 1.e-8 60
> > algorithm ModifiedNewton
> > integrator LoadControl 0.1
> > analysis Static
> > analyze 10
> > loadConst -time 0.0
> >
> >
> > ####################
> > #define recorders
> > recorder Node -file x[expr $gmf]/node2dispX[expr $gmf].out -time -node 2
> > -dof 1 disp
> > recorder Node -file x[expr $gmf]/node3dispX[expr $gmf].out -time -node 3
> > -dof 1 disp
> > recorder Node -file x[expr $gmf]/node4(roof)dispX[expr $gmf].out -time
> > -node 4 -dof 1 disp
> >
> > recorder Node -file x[expr $gmf]/node1reacX[expr $gmf].out -time -node 1
> > -dof 1 reaction
> > recorder Node -file x[expr $gmf]/node5reacX[expr $gmf].out -time -node 5
> > -dof 1 reaction
> >
> > recorder Drift -file x[expr $gmf]/driftS1X[expr $gmf].out -time -iNode 1
> > -jNode 2 -dof 1 -perpDirn 2
> > recorder Drift -file x[expr $gmf]/driftS2X[expr $gmf].out -time -iNode 2
> > -jNode 3 -dof 1 -perpDirn 2
> > recorder Drift -file x[expr $gmf]/driftS3X[expr $gmf].out -time -iNode 3
> > -jNode 4 -dof 1 -perpDirn 2
> >
> > recorder EnvelopeNode -file x[expr $gmf]/envDisp2X[expr $gmf].out -time
> > -node 2 -dof 1 disp
> > recorder EnvelopeNode -file x[expr $gmf]/envDisp3X[expr $gmf].out -time
> > -node 3 -dof 1 disp
> > recorder EnvelopeNode -file x[expr $gmf]/envDisp4X[expr $gmf].out -time
> > -node 4 -dof 1 disp
> >
> >
> > for {set j 1} {$j<=15} {incr j} {
> >
> > recorder Element -file x[expr $gmf]/ele[expr $j]-X[expr $gmf].out -time
> > -ele $j localForce
> > }
> >
> >
> > ##EarthQuake Loading
> >
> > puts "groundmotion start!.Time: [getTime]"
> >
> > #define damping
> > set xDamp 0.05; # 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
> >
> > puts "damping ok!"
> >
> >
> > #-------------------------------
> > ### change these parameters for each record:
> > ## TmaxAnalysis , DtAnalysis , "Series -dt .. - filepath .."
> >
> >
> > set TmaxAnalysis 49.97 ; # maximum duration of ground-motion
> > analysis -- should be 50*$sec
> > set DtAnalysis 0.01; # time-step Dt for lateral analysis
> >
> > #increment gmf
> > set accel "Series -dt 0.01 -filePath LADSPx3.8.txt -factor [expr
> > ($gmf)*9.81]"
> >
> > pattern UniformExcitation [expr $i+100] 1 -accel $accel
> >
> >
> >
> >
> > ##Dynamic Analysis Parameters
> >
> > variable constraintsTypeDynamic Transformation;
> > constraints $constraintsTypeDynamic ;
> >
> > variable numbererTypeDynamic RCM
> > numberer $numbererTypeDynamic
> >
> > variable systemTypeDynamic BandGeneral; # try UmfPack for large problems
> > system $systemTypeDynamic
> >
> > variable maxNumIterDynamic 400; # Convergence Test: maximum
> > number of iterations that will be performed before "failure to
> > converge" is returned
> > variable printFlagDynamic 0; # Convergence Test: flag used
> > to print information on convergence (optional) # 1: print
> > information on each step;
> > variable testTypeDynamic EnergyIncr; # Convergence-test type
> > test $testTypeDynamic $TolDynamic $maxNumIterDynamic $printFlagDynamic;
> >
> > variable maxNumIterConvergeDynamic 2000;
> > variable printFlagConvergeDynamic 0;
> >
> > variable algorithmTypeDynamic KrylovNewton;
> > algorithm $algorithmTypeDynamic;
> >
> > variable NewmarkGamma 0.5; # Newmark-integrator gamma parameter (also HHT)
> > variable NewmarkBeta 0.26; # Newmark-integrator beta parameter
> > variable integratorTypeDynamic Newmark;
> > integrator $integratorTypeDynamic $NewmarkGamma $NewmarkBeta
> > variable analysisTypeDynamic VariableTransient
> > analysis $analysisTypeDynamic
> >
> > #-------------------------------
> > #
> > set Nsteps [expr int($TmaxAnalysis/$DtAnalysis)];
> > #analyze $Nsteps $DtAnalysis
> > #loadConst -time 0.0
> > 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 $TolDynamic 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 .6
> > set ok [analyze 1 $DtAnalysis]
> > algorithm $algorithmTypeDynamic
> > }
> > if {$ok != 0} {
> > puts "Trying ModifiedNewton .."
> > algorithm ModifiedNewton
> > set ok [analyze 1 $DtAnalysis]
> > algorithm $algorithmTypeDynamic
> > }
> > if {$ok != 0} {
> > puts "Trying BFGS.."
> > algorithm BFGS
> > set ok [analyze 1 $DtAnalysis]
> > algorithm $algorithmTypeDynamic
> > }
> > }
> > }; # end if ok !0
> >
> >
> >
> > puts "Ground Motion DoneX[expr $gmf]. End Time: [getTime]"
> > puts ****************************************************************
> > puts ****************************************************************
aryo
Posts: 6
Joined: Sun Mar 31, 2013 5:45 am
Location: kntu

Re: IDA analysis in opensees

Post by aryo »

mja441: what number should assign for Ground Motion Factor and the step of it?
mja441
Posts: 28
Joined: Mon Feb 01, 2010 2:32 am
Location: Tehran University

Re: IDA analysis in opensees

Post by mja441 »

Salam,
First of all, I forgot to paste the first line. write

for {set i 5} {$i<=7} {incr i} {

at the beginning of the code I provided above.

The choice of the ground motion factor and step is up to yourself. Actually you only chose the step and initial ground motion factor, i.e. 0.4g and 0.2g in my code :
#define your GM intensity step: 0.4g,...
> > set s [expr 2+4*$i]

All you have to set is: range of i ( range of ground motion factor) in line:
for {set i 5} {$i<=7} {incr i} {

and numbers 2 & 4 in line:
> > set s [expr 2+4*$i]

Plz contact if your problem persists,

Regards,
MJ
aryo
Posts: 6
Joined: Sun Mar 31, 2013 5:45 am
Location: kntu

Re: IDA analysis in opensees

Post by aryo »

salam aghaye doctor,
this code give us Sa(t1,5%)(g) or PGA(g)? do these have difference from each other? how can I contact you?
tnx.
punitbarwani
Posts: 19
Joined: Tue Aug 06, 2013 10:48 pm
Location: Indore, India

Comparision Of Opensees And IDARC

Post by punitbarwani »

can anyone help me to compare drift result of OPENSEES and IDARC of a portal frame, analysis type is dynamic with time history everything in modelling is done but some due to some parameters the results are different
My email id is " punits95@hotmail.com " & " coolpunitrocks@gmail.com " plz plz plz contact me here or at mail i will send u all result and modelling of both OPENSEES and IDARC.....
thank you!!
clairelove
Posts: 8
Joined: Wed Feb 19, 2014 5:20 pm
Location: HUST

Re: IDA analysis in opensees

Post by clairelove »

hi,MJ
i have a question here. when u use this line
set accel "Series -dt 0.02 -filePath LADSPx3.8.txt -factor [expr ($gmf)*9.81]"
have u modify ur earthquake wave record data through dividing them by the PGA in the record? I just want to know whether this file "LADSPx3.8.txt " is natural or tuned.
thxs!

mja441 wrote:
> Salam,
> First of all, I forgot to paste the first line. write
>
> for {set i 5} {$i<=7} {incr i} {
>
> at the beginning of the code I provided above.
>
> The choice of the ground motion factor and step is up to yourself. Actually you only
> chose the step and initial ground motion factor, i.e. 0.4g and 0.2g in my code :
> #define your GM intensity step: 0.4g,...
> > > set s [expr 2+4*$i]
>
> All you have to set is: range of i ( range of ground motion factor) in line:
> for {set i 5} {$i<=7} {incr i} {
>
> and numbers 2 & 4 in line:
> > > set s [expr 2+4*$i]
>
> Plz contact if your problem persists,
>
> Regards,
> MJ
Post Reply