convergence problem:Ex2b.Canti2D.InelasticSection.Push

For posts concerning the documentation, errors, ommissions, general comments, etc.

Moderators: silvia, selimgunay, Moderators

Post Reply
Hanchai
Posts: 4
Joined: Wed Aug 17, 2011 9:42 pm
Location: Korea

convergence problem:Ex2b.Canti2D.InelasticSection.Push

Post by Hanchai »

Hi! I'm studying Opensees through example materials you provided. Studying some examples, I have some questions about the example code.

It is about example material Ex2b.Canti2D.InelasticSection.Push(http://opensees.berkeley.edu/wiki/index ... ic_Section)

In this code, there is a routine for in case of convergence problem and I attached it for convinience.
# ---------------------------------- in case of convergence problems
if {$ok != 0} {
# change some analysis parameters to achieve convergence
# performance is slower inside this loop
set ok 0;
set controlDisp 0.0; # start from zero
set D0 0.0; # start from zero
set Dstep [expr ($controlDisp-$D0)/($Dmax-$D0)]
while {$Dstep < 1.0 && $ok == 0} {
set controlDisp [nodeDisp $IDctrlNode $IDctrlDOF ]
set Dstep [expr ($controlDisp-$D0)/($Dmax-$D0)]
set ok [analyze 1 ]
if {$ok != 0} {
puts "Trying Newton with Initial Tangent .."
test NormDispIncr $Tol 2000 0
algorithm Newton -initial
set ok [analyze 1 ]
test $TestType $Tol $maxNumIter 0
algorithm $algorithmType
}
if {$ok != 0} {
puts "Trying Broyden .."
algorithm Broyden 8
set ok [analyze 1 ]
algorithm $algorithmType
}
if {$ok != 0} {
puts "Trying NewtonWithLineSearch .."
algorithm NewtonLineSearch .8
set ok [analyze 1 ]
algorithm $algorithmType
}
}
}; # end if ok !0
# --------------------------------------------------------------------
It is the routine to modify an analysis method in case of convergence problem. I have two questions about this routine.

Q1. As I know, after making some changes in parameters of the analysis, it shoud be re-analyzed through analyze command like "set ok [analyze $Nsteps]" which contains entire analyze steps. But in the routine, there is no analyze command except for "set ok [analyze 1]". There is no other analyze command after the routine but " puts DonePushover" ".
Is it sufficient for entire analysis? If so, Dose it mean that in case of convergence problem, the entire analysis is done by just one step? Or Do I misunderstand the routine?

Q2. To apply the modified analysis method in the routine, variable "algorithmType" shoud be changed.
But in the routine, every if command closed with "algorithm $algorithmType" without changing of variable algorithmType. If so, Is it really applying the analysis method changed in if command?

It is the best way to check wheather the routine works well or not by applying it to a real model which has a convergence problem but unfortunately, the model presented in the example excuted without any problem except that I attached in P.S..

P.S. In that Code, I found an error. This model is built in 2D, but when it defines a lateral load(pushover), it misuses pattern command. It follows,
pattern Plain 200 Linear { load 2 $Hload 0.0 0.0 0.0 0.0 0.0;}. It has too many directions. It should be reduced size of 3.
fmk
Site Admin
Posts: 5884
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Re: convergence problem:Ex2b.Canti2D.InelasticSection.Push

Post by fmk »

Q1. the script prodided does the analysis 1 step at a time within the while loop. the loop will only at most do 1 analysis step at a time:
while {$Dstep < 1.0 && $ok == 0} {
.....
}

the set ok [analyze 1] are calls to do 1 analysis step. if successfull ok will be 0; if not it will not be 0. if not 0 then it keeps trying things until one is sucessfull.

so when the while loop is finally done ok will be either 0 or not. if 0 when the loop is done then the analysis worked, i.e. $Dtsep >= 1. If ok is a negative number it did not work, i.e. $Dtsep < 0

Q2. changeing $algorithmType outside the loop will mean that the first analyze attempt inside the while loop will always use the new algorithm type. if that step fails, the script will try others for that step until one is succesfull. but aftre every attempt the algorithm is always changed back for the next time inside the while loop.
Hanchai
Posts: 4
Joined: Wed Aug 17, 2011 9:42 pm
Location: Korea

Re: convergence problem:Ex2b.Canti2D.InelasticSection.Push

Post by Hanchai »

I didn't consider effect of the string "set controlDisp [nodeDisp $IDctrlNode $IDctrlDOF ]". Based on the understanding and your explanation, through this routine, we are entering [analyze 1] command repeatedly until the entire push-over analysis is done(i.e. $Dmax >= 1 and $ok = 0), right?

So, in case of convergence problems, the analysis goes back to the initial state and starts it again but when it meets the step where the convergence problem happened, tries another method in order of Newton with initial Tangent, Broyden and NewtonWithLineSearch until the convergence problem is solved. And then, because of the string "algorithm $algorithmType" contained in body of each if command, the next step goes back to original analysis method(in this case, Newton method). Using this routine, it is possible to use different analysis method in each step when it meets the convergence problem.

I really appreciate your answer. Thanks!
Post Reply