time step changes

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

Moderators: silvia, selimgunay, Moderators

Post Reply
jefferyr
Posts: 39
Joined: Tue Feb 12, 2008 12:40 pm
Location: Portland State University

time step changes

Post by jefferyr »

During a transient (EQ) analysis, have you used scripts where the time step is changed on the fly? So that a coarser time step is used, and when convergence issues arise, then the time step is made smaller and smaller until convergence or a limit is reached? Then the time step is returned to the larger value to continue the analysis?

If you have scripts that illustrate this technique, could you post them?

thanks,

Jeff
silvia
Posts: 3909
Joined: Tue Jan 11, 2005 7:44 am
Location: Degenkolb Engineers
Contact:

Post by silvia »

here is my latest:

[code] # ----------------------------------------------first analyze command------------------------
set ok [analyze $Nsteps $DtAnalysis]
# ----------------------------------------------if convergence failure-------------------------
if {$ok != 0} {; # performance is slower inside this loop
puts "Trying Reducing This Time Step by 2 .."
set ok [analyze 1 [expr $DtAnalysis/2]]
if {$ok != 0} {
puts "Trying Reducing This Time Step by 10 .."
set ok [analyze 1 [expr $DtAnalysis/10]]
}
if {$ok != 0} {
puts "Trying Reducing This Time Step by 100 .."
set ok [analyze 1 [expr $DtAnalysis/100]]
}
if {$ok != 0} {
puts "Trying Newton with Initial Tangent .."
test $testType $Tolerance $maxNumIterConverge $printFlagConverge
algorithm Newton -initial
set ok [analyze 1 $DtAnalysis]
test $testType $Tolerance $maxNumIter $printFlag
algorithm $algorithmType
}
if {$ok != 0} {
puts "Trying Broyden .."
algorithm Broyden 8
set ok [analyze 1 $DtAnalysis]
algorithm $algorithmType
}
if {$ok != 0} {
puts "Trying NewtonWithLineSearch .."
algorithm NewtonLineSearch $NewtonLineSearchRatio
set ok [analyze 1 $DtAnalysis]
algorithm $algorithmType
}
if {$ok == 0} {puts "Converged at this step, continuing...."}
}
# -----------------------------------------------------------------------------------------------------[/code]
Silvia Mazzoni, PhD
Structural Consultant
Degenkolb Engineers
235 Montgomery Street, Suite 500
San Francisco, CA. 94104
bkosbab
Posts: 30
Joined: Tue Nov 14, 2006 12:15 pm
Location: Georgia Institute of Technology

Post by bkosbab »

I tried this code, but for some reason, the analysis stops after "Converged at this step, continuing...." What forces the analysis to continue where it left off, that I'm missing?
silvia
Posts: 3909
Joined: Tue Jan 11, 2005 7:44 am
Location: Degenkolb Engineers
Contact:

Post by silvia »

does it really stop, or does it continue?
Silvia Mazzoni, PhD
Structural Consultant
Degenkolb Engineers
235 Montgomery Street, Suite 500
San Francisco, CA. 94104
bkosbab
Posts: 30
Joined: Tue Nov 14, 2006 12:15 pm
Location: Georgia Institute of Technology

Post by bkosbab »

it thinks it's done, and stops. I went back to the convergence helper code from the examples manual, and added the decreasing time step, and it continues running. The only difference I see is the extra while loop in the examples manual.
Post Reply