Hello everyone,

Attached is a copy of a source file that a colleague and I created which will update the step size of a static analysis automatically with a maximum step size and a minimum step size.

It should be straight forward to use given the definitions of which parameter represents and it has been tested out on several cases to check its validity. Hope it comes in handy to some

(if not most) of you out there.

############################################################################

# adaptiveUpdate.tcl

# Author: Brighton Laiman, 09/25/2013

# Co-Author: Matthew D. Smith, 09/25/2013

#

# This routine updates the step size for a displacement control analysis

# is the initial step size used was too large.

#

# Variables

# Dmax = maximum displacement of control node for analysis

# Nsteps = initial number of steps for analysis

# IDctrlNode = node number that controls the displacement analysis

# IDctrlDOF = DOF corresponding to IDctrlNODE that is being used

# Tol = tolerance used for testing to see if step has converged

# algorithmTypeStatic = solution algorithm to revert back to

# maxDivisor = denominator determining the minimum step size

#

############################################################################

proc adaptiveUpdate { Nsteps Dmax IDctrlNode IDctrlDOF Tol algorithmTypeStatic maxDivisor} {

set Dincr [expr $Dmax / $Nsteps];

set maxStepSize [expr $Dmax/$Nsteps];

set minStepSize [expr $maxStepSize/$maxDivisor];

set currentDisp 0.0;

set counter 0;

while {abs($currentDisp) < abs($Dmax)} {

set ok [analyze 1];

if {[expr $currentDisp + $Dincr] > $Dmax} {

set Dincr [expr $Dmax - $currentDisp];

}

while {$ok != 0} {

if {abs($Dincr) < abs($minStepSize)} {

puts "PROBLEM: node=$IDctrlNode, DOF=$IDctrlDOF, disp=[nodeDisp $IDctrlNode $IDctrlDOF]"

puts "MINIMUM STEP SIZE IS EXCEEDED! ANALYSIS FAILED!!!"

return -1

}

set counter 0;

set Dincr [expr $Dincr / 4.];

puts "The StepSize is QUARTERED: $Dincr"

integrator DisplacementControl $IDctrlNode $IDctrlDOF $Dincr;

set ok [analyze 1];

if {$ok != 0} {

puts "Trying Broyden Algorithm..."

algorithm Broyden 8;

set ok [analyze 1];

algorithm $algorithmTypeStatic;

}

if {$ok != 0} {

puts "Trying NewtonLineSearch Algorithm..."

algorithm NewtonLineSearch -tol 0.8;

set ok [analyze 1];

algorithm $algorithmTypeStatic;

}

if {$ok != 0} {

puts "Trying ModifiedNewton Algorithm..."

algorithm ModifiedNewton;

set ok [analyze 1];

algorithm $algorithmTypeStatic;

}

}; # end adaptive update while loop

set currentDisp [nodeDisp $IDctrlNode $IDctrlDOF]

set counter [expr $counter+1];

if {$counter == 4} {

set counter 0;

set tmp [expr $Dincr*2.];

if {abs($tmp) < abs($maxStepSize)} {

set Dincr $tmp;

} else {

set Dincr $maxStepSize;

}

puts "The StepSize is DOUBLED: $Dincr"

integrator DisplacementControl $IDctrlNode $IDctrlDOF $Dincr;

}; # end if

}; # end main while loop

}