Dear Vensa,
Recently I face with a problem that is related to time. I apply an earthquake to a 2-D frame. Due to convergence problems I use the method that is recommended in one of the tutorials which is to change the algorithm (Linear, KrylovNewton, Newton,...) during the analyze if a convergence problem occurs. In normal the earthquake is 32 seconds, however when this code confronted with a convergence problem and enters to the while loop to find the appropriate algorithm, then the time increases to 50 seconds. What should I do to keep the time constant when code enters to the while loop?
here is the part of the code I'm talking about:
for {set i 1} {$i <=$Nsteps} {incr i 1} {
set ok [analyze 1 $DtAnalysis]; # actually perform analysis; returns ok=0 if analysis was successful
# if analysis was not successful.
if {$ok != 0} { ;
# 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 ok [analyze 1 $DtAnalysis]
set controlTime [getTime]
set ok [analyze 1 $DtAnalysis]
if {$ok != 0} {
puts "Trying Modified Newton.."
algorithm ModifiedNewton
set ok [analyze 1 [expr $DtAnalysis]]
algorithm $algorithmType
}
if {$ok != 0} {
puts "Trying Newton with Initial Tangent .."
algorithm Newton -initial
set ok [analyze 1 [expr $DtAnalysis]]
algorithm $algorithmType
}
if {$ok != 0} {
puts "Trying Newton with Initial Then Current Tangent .."
algorithm Newton -initialThenCurrent
set ok [analyze 1 [expr $DtAnalysis]]
algorithm $algorithmType
}
if {$ok != 0} {
puts "Trying Broyden .."
algorithm Broyden 8
set ok [analyze 1 [expr $DtAnalysis]]
algorithm $algorithmType
}
if {$ok != 0} {
puts "Trying NewtonWithLineSearch .."
algorithm NewtonLineSearch 0.8
set ok [analyze 1 [expr $DtAnalysis]]
algorithm $algorithmType
}
if {$ok != 0} {
puts "Trying Linear .."
algorithm Linear
set ok [analyze 1 [expr $DtAnalysis]]
algorithm $algorithmType
}
}
}; # end if ok !0
eigen generalized 3
# set eigenvalues [eigen generalized 3]
set nEigenI 1;
set nEigenII 2;
set nEigenJ 3;
set lambdaN [eigen [expr $nEigenJ]];
set lambdaI [lindex $lambdaN [expr $nEigenI-1]];
set lambdaII [lindex $lambdaN [expr $nEigenII-1]];
set lambdaJ [lindex $lambdaN [expr $nEigenJ-1]];
puts $file2a $lambdaI
puts $file2b $lambdaII
puts $file2c $lambdaJ
# Update Rayleigh
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 $i
}
Domain Time change
Moderators: silvia, selimgunay, Moderators
Re: Domain Time change
I do not see anything in the code that would change the total time of the analysis. Make sure that Nsteps and DtAnalysis are defined correctly.