Acceptable test $tol convergence

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

Moderators: silvia, selimgunay, Moderators

Post Reply
schoolstru
Posts: 32
Joined: Mon Apr 25, 2016 2:18 am
Location: IIEES

Acceptable test $tol convergence

Post by schoolstru » Sun Apr 30, 2017 3:38 am

what is the acceptable number for TolDynamic in Nonlinear Dynamic Analysis?
here are some part of code
"
variable TolDynamic 1.e-5; # Convergence Test: tolerance
variable maxNumIterDynamic 1000; # 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 NormDispIncr; # Convergence-test type
test $testTypeDynamic $TolDynamic $maxNumIterDynamic $printFlagDynamic;
"

selimgunay
Posts: 913
Joined: Mon Sep 09, 2013 8:50 pm
Location: University of California, Berkeley

Re: Acceptable test $tol convergence

Post by selimgunay » Sun May 21, 2017 10:26 pm

Please see the below reference for investigation of the effect of convergence tolerance on several response parameters of bridges. In that paper 1e-5 is observed to be adequate for energy norm. However, the best strategy is to start with a small tolerance like 1e-8 and try iterations with increasing tolerances in case of nonconvergence. Please let me know if you need a detailed adaptive strategy in tcl.

Mosalam, K.M., X. Liang, S. Günay and A. Schellenberg, “Alternative Integrators and Parallel Computing for Efficient Nonlinear Response History Analyses,” COMPDYN 2013, 4th ECCOMAS Thematic Conference on Computational Methods in Structural Dynamics and Earthquake Engineering, M. Papadrakakis, V. Papadopoulos, V. Plevris (eds.), June 12-14, 2013, Kos Island, Greece.

schoolstru
Posts: 32
Joined: Mon Apr 25, 2016 2:18 am
Location: IIEES

Re: Acceptable test $tol convergence

Post by schoolstru » Sun May 21, 2017 10:31 pm

thank you, i would be grateful if you send me a detailed adaptive strategy in tcl.

selimgunay
Posts: 913
Joined: Mon Sep 09, 2013 8:50 pm
Location: University of California, Berkeley

Re: Acceptable test $tol convergence

Post by selimgunay » Sun May 21, 2017 10:44 pm

You can find an example adaptive script below. You may need to make some modifications to fit it into the rest of your script.

set Tol 1.0e-8;
set maxNumIter 100;
set printFlag 0;
set NewmarkGamma 0.5;
set NewmarkBeta 0.25;
set TestType EnergyIncr;

set algorithmType NewtonLineSearch;
for {set ik 1} {$ik <= $Nsteps} {incr ik 1} {
puts "$ik"
# puts "$ik"
set ok [analyze 1 $dtForAnalysis]
# Convergence
if {$ok != 0} {
puts "Trying Bisection ...";
algorithm NewtonLineSearch <-type Bisection>;
set ok [analyze 1 $dtForAnalysis]
algorithm $algorithmType;
};
if {$ok != 0} {
puts "Trying Secant ...";
algorithm NewtonLineSearch <-type Secant>;
set ok [analyze 1 $dtForAnalysis]
algorithm $algorithmType;
};
if {$ok != 0} {
puts "Trying RegulaFalsi ...";
algorithm NewtonLineSearch <-type RegulaFalsi>;
set ok [analyze 1 $dtForAnalysis]
algorithm $algorithmType;
};
if {$ok != 0} {
puts "Trying KrylovNewton ...";
algorithm KrylovNewton;
set ok [analyze 1 $dtForAnalysis]
algorithm $algorithmType;
};
if {$ok != 0} {
puts "Trying Newton ...";
algorithm Newton;
set ok [analyze 1 $dtForAnalysis]
algorithm $algorithmType;
};
if {$ok != 0} {
puts "Trying BFGS ...";
algorithm BFGS;
set ok [analyze 1 $dtForAnalysis]
algorithm $algorithmType;
};
if {$ok != 0} {
puts "Trying Broyden ...";
algorithm Broyden;
set ok [analyze 1 $dtForAnalysis]
algorithm $algorithmType;
};
if {$ok != 0} {
puts "Trying BackwardEuler ...";
integrator BackwardEuler;
set ok [analyze 1 $dtForAnalysis]
# integrator TRBDF2;
integrator Newmark $NewmarkGamma $NewmarkBeta;
};
if {$ok != 0} {
puts "Trying HHT 0.9 ...";
integrator HHT 0.9;
set ok [analyze 1 $dtForAnalysis]
# integrator TRBDF2;
integrator Newmark $NewmarkGamma $NewmarkBeta;
};
if {$ok != 0} {
puts "Trying OS ...";
integrator AlphaOS 1.00;
algorithm Linear;
set ok [analyze 1 $dtForAnalysis]
# integrator TRBDF2;
integrator Newmark $NewmarkGamma $NewmarkBeta;
algorithm $algorithmType;
};
if {$ok != 0} {
puts "Trying OSG ...";
integrator AlphaOSGeneralized 1.00;
algorithm Linear;
set ok [analyze 1 $dtForAnalysis]
# integrator TRBDF2;
integrator Newmark $NewmarkGamma $NewmarkBeta;
algorithm $algorithmType;
};
if {$ok != 0} {
puts "Trying more iterations...";
test $TestType $Tol 1000 $printFlag;
set ok [analyze 1 $dtForAnalysis]
test $TestType $Tol $maxNumIter $printFlag;
};
if {$ok != 0} {
puts "Trying tolerance 1.0e-7 ...";
test $TestType 1.0e-7 $maxNumIter 0;
set ok [analyze 1 $dtForAnalysis]
test $TestType $Tol $maxNumIter $printFlag;
};
if {$ok != 0} {
puts "Trying tolerance 1.0e-6 ...";
test $TestType 1.0e-6 $maxNumIter 0;
set ok [analyze 1 $dtForAnalysis]
test $TestType $Tol $maxNumIter $printFlag;
};
if {$ok != 0} {
puts "Trying tolerance 1.0e-5 ...";
test $TestType 1.0e-5 $maxNumIter 0;
set ok [analyze 1 $dtForAnalysis]
test $TestType $Tol $maxNumIter $printFlag;
};
if {$ok != 0} {
puts "Trying tolerance 1.0e-3 ...";
test $TestType 1.0e-3 $maxNumIter 0;
set ok [analyze 1 $dtForAnalysis]
test $TestType $Tol $maxNumIter $printFlag;
};
if {$ok != 0} {
puts "Trying tolerance 1.0e-3 ...";
test $TestType 1.0e-3 $maxNumIter 0;
set ok [analyze 1 $dtForAnalysis/2.0]
test $TestType $Tol $maxNumIter $printFlag;
};
if {$ok != 0} {
puts "Trying tolerance 1.0e-3 ...";
test $TestType 1.0e-3 $maxNumIter 0;
set ok [analyze 1 $dtForAnalysis/4.0]
test $TestType $Tol $maxNumIter $printFlag;
};
if {$ok != 0} {
puts "Trying tolerance 1.0e-3 ...";
test $TestType 1.0e-3 $maxNumIter 0;
set ok [analyze 1 $dtForAnalysis/8.0]
test $TestType $Tol $maxNumIter $printFlag;
};
if {$ok != 0} {
puts "Trying tolerance 1.0e-3 ...";
test $TestType 1.0e-3 $maxNumIter 0;
set ok [analyze 1 $dtForAnalysis/16.0]
test $TestType $Tol $maxNumIter $printFlag;
};
if {$ok != 0} {
puts "Trying tolerance 1.0e-3 ...";
test $TestType 1.0e-3 $maxNumIter 0;
set ok [analyze 1 $dtForAnalysis/32.0]
test $TestType $Tol $maxNumIter $printFlag;
};
if {$ok != 0} {
puts "Trying tolerance 1.0e-3 ...";
test $TestType 1.0e-3 $maxNumIter 0;
set ok [analyze 1 $dtForAnalysis/64.0]
test $TestType $Tol $maxNumIter $printFlag;
};





if {$ok != 0} {
set Nstepsmax [expr $ik-1]
break;
}

}

if {[expr $ik-1] == $Nsteps} {

set AnalysisA [expr 1] } else {

set AnalysisA [expr 0] };

puts "Analysis completion=$AnalysisA"

set fileid10 [open "ConvergenceIndicator.txt" a];
puts $fileid10 "$AnalysisA"
close $fileid10

schoolstru
Posts: 32
Joined: Mon Apr 25, 2016 2:18 am
Location: IIEES

Re: Acceptable test $tol convergence

Post by schoolstru » Sun May 21, 2017 10:52 pm

thank you very much indeed

Post Reply