Failed to converge

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

Moderators: silvia, selimgunay, Moderators

Post Reply
jboshra
Posts: 16
Joined: Mon Dec 29, 2008 12:46 am

Failed to converge

Post by jboshra »

Hello
I got a convergence error during moment curvature capacity analysis.
I‘d like to know why I got that error and what are the possible solutions.
Thanks for help

[b]Error:[/b]
WARNING: CTestNormUnbalance::test() - failed to converge
after: 10 iterations
ModifiedNewton::solveCurrentStep() -the ConvergenceTest object failed in test()
StaticAnalysis::analyze() - the Algorithm failed at iteration: 150 with domain at load factor 3740.51
OpenSees > analyze failed, returned: -3 error flag


[b]Code:[/b]
# Define model builder
# --------------------
model basic -ndm 2 -ndf 3
# units t,m
# Define materials for nonlinear columns
# ------------------------------------------
# CONCRETE tag f'c ec0 f'cu ecu
# Core concrete (confined)
uniaxialMaterial Concrete01 1 -3500 -0.0035 -3500 -0.014

uniaxialMaterial Concrete01 2 -2800 -0.0035 0.0 -0.0035

# STEEL
# Reinforcing steel
set fy 35000; # Yield stress
set E 20000000; # Young's modulus
# tag fy E0 b
uniaxialMaterial Steel01 3 $fy $E 0.01
# ------------------------------------------
uniaxialMaterial MinMax 4 1 -min -0.014 -max 10
uniaxialMaterial MinMax 5 2 -min -0.0035 -max 10
uniaxialMaterial MinMax 6 3 -min -0.085 -max 0.085


# set some paramaters
set colWidthshort 3.5
set colDepthshort 1.85

set cover .05
set As 0.000804;

# some variables derived from the parameters
set y1 [expr $colDepthshort/2.0]
set z1 [expr $colWidthshort/2.0]

section Fiber 1 {

# Create the concrete core fibers

patch rect 4 100 1 [expr $cover-$y1] [expr $cover-$z1] [expr $y1-$cover] [expr $z1-$cover]

# Create the concrete cover fibers (top, bottom, left, right)

patch rect 5 2 1 [expr -$y1] [expr $z1-$cover] $y1 $z1

patch rect 5 2 1 [expr -$y1] [expr -$z1] $y1 [expr $cover-$z1]

patch rect 5 100 1 [ expr -$y1] [expr $cover-$z1] [expr $cover-$y1] [expr $z1-$cover]

patch rect 5 100 1 [ expr $y1-$cover] [expr $cover-$z1] $y1 [expr $z1-$cover]

# Create the reinforcing fibers (left, middle, right)

layer straight 6 41 $As [expr $y1-$cover] [expr $z1-$cover] [expr $y1-$cover] [expr $cover-$z1]
layer straight 6 2 $As [expr $y1-$cover-0.116] [expr $z1-$cover] [expr $y1-$cover-0.116] [expr $cover-$z1]
layer straight 6 2 $As [expr $y1-$cover-0.233] [expr $z1-$cover] [expr $y1-$cover-0.233] [expr $cover-$z1]
layer straight 6 2 $As [expr $y1-$cover-0.35] [expr $z1-$cover] [expr $y1-$cover-0.35] [expr $cover-$z1]
layer straight 6 2 $As [expr $y1-$cover-0.466] [expr $z1-$cover] [expr $y1-$cover-0.466] [expr $cover-$z1]
layer straight 6 2 $As [expr $y1-$cover-0.58] [expr $z1-$cover] [expr $y1-$cover-0.58] [expr $cover-$z1]
layer straight 6 2 $As [expr $y1-$cover-0.7] [expr $z1-$cover] [expr $y1-$cover-0.7] [expr $cover-$z1]
layer straight 6 2 $As [expr $y1-$cover-0.816] [expr $z1-$cover] [expr $y1-$cover-0.816] [expr $cover-$z1]
layer straight 6 41 $As [expr $cover-$y1] [expr $z1-$cover] [expr $cover-$y1] [expr $cover-$z1]
layer straight 6 2 $As [expr $cover-$y1+0.116] [expr $z1-$cover] [expr $cover-$y1+0.116] [expr $cover-$z1]
layer straight 6 2 $As [expr $cover-$y1+0.233] [expr $z1-$cover] [expr $cover-$y1+0.233] [expr $cover-$z1]
layer straight 6 2 $As [expr $cover-$y1+0.35] [expr $z1-$cover] [expr $cover-$y1+0.35] [expr $cover-$z1]
layer straight 6 2 $As [expr $cover-$y1+0.466] [expr $z1-$cover] [expr $cover-$y1+0.466] [expr $cover-$z1]
layer straight 6 2 $As [expr $cover-$y1+0.58] [expr $z1-$cover] [expr $cover-$y1+0.58] [expr $cover-$z1]
layer straight 6 2 $As [expr $cover-$y1+0.7] [expr $z1-$cover] [expr $cover-$y1+0.7] [expr $cover-$z1]
layer straight 6 2 $As [expr $cover-$y1+0.816] [expr $z1-$cover] [expr $cover-$y1+0.816] [expr $cover-$z1]
}


# Estimate yield curvature
# (Assuming no axial load and only top and bottom steel)
set d [expr $colDepthshort-$cover] ;# d -- from cover to rebar
puts "d:$d"
#set epsy [expr $fy/$E] ;# steel yield strain
puts "fy:$fy"
puts "E:$E"
set eps 0.00173
puts "eps:$eps"
set Ky [expr $eps/(0.7*$d)]

# Print estimate to standard output
puts "Estimated yield curvature: $Ky"

# Set axial load
set P -980

set mu 70; # Target ductility for analysis
set numIncr 1000; # Number of analysis increments
puts joe1
# Call the section analysis procedure
proc MomentCurvature {secTag p maxK {numIncr} } {
# Define two nodes at (0,0)
node 1 0.0 0.0
node 2 0.0 0.0
puts ok2
# Fix all degrees of freedom except axial and bending
fix 1 1 1 1
fix 2 0 1 0
puts ok3
# Define element
# tag ndI ndJ secTag
element zeroLengthSection 1 1 2 $secTag
puts ok4
# Create recorder
recorder Node -file section$secTag.out -time -node 2 -dof 3 disp



recorder Element -file Element4.out -time -ele 1 section fiber .875 0 6 stressStrain
recorder Element -file Element6.out -time -ele 1 section fiber -.875 0 6 stressStrain
recorder Element -file Element8.out -time -ele 1 section fiber .875 0 4 stressStrain


puts ok5
# Define constant axial load
pattern Plain 1 "Constant" {
load 2 $p 0.0 0.0
}
puts ok6
# Define analysis parameters
integrator LoadControl 0.0
puts ok7
system SparseGeneral -piv; # Overkill, but may need the pivoting!
puts ok8
test NormUnbalance 1.0e-9 10
puts ok9
numberer Plain
puts ok10
constraints Plain
puts ok11
algorithm ModifiedNewton
puts ok12
analysis Static
puts ok13
# Do one analysis for constant axial load
analyze 10
puts ok14
# Define reference moment
pattern Plain 2 "Linear" {
load 2 0.0 0.0 1
}
puts ok15
# Compute curvature increment
set dK [expr $maxK/$numIncr]
puts ok16
# Use displacement control at node 2 for section analysis
integrator DisplacementControl 2 3 $dK 1 $dK $dK
puts ok17
# Do the section analysis
analyze $numIncr
puts ok18
}
silvia
Posts: 3909
Joined: Tue Jan 11, 2005 7:44 am
Location: Degenkolb Engineers
Contact:

Post by silvia »

how does it compare to the examples manual one?
Silvia Mazzoni, PhD
Structural Consultant
Degenkolb Engineers
235 Montgomery Street, Suite 500
San Francisco, CA. 94104
jboshra
Posts: 16
Joined: Mon Dec 29, 2008 12:46 am

Post by jboshra »

Thanks for your prompt response.
This code is the same as the examples manual, but I realized that I got that convergence error while I am trying to target a higher ductility (mu=70).could you help me to solve that error?
hrodrigues
Posts: 44
Joined: Wed Nov 14, 2007 7:50 am
Location: Aveiro
Contact:

Post by hrodrigues »

Strange. I run your code with OS Version 2.0.0 and got no convergence error!
OS results:


d: 1.8
fy:35000
E:20000000
eps:0.00173
Estimated yield curvature: 0.00137301587302
Joel1
_____________
end if script
PhD Student
Hugo Rodrigues
University of Aveiro, Portugal
sweet.ua.pt/~a19709
hrodrigues@ua.pt
fmk
Site Admin
Posts: 5884
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Post by fmk »

i get the same answer with 2.1.0 .. your moment curvature proc is not called in the script you posted .. it ends after joel1 .. is there another few lines to your script that you have failed to post!
jboshra
Posts: 16
Joined: Mon Dec 29, 2008 12:46 am

Post by jboshra »

Thanks for your prompt response and Sorry for not being clear.
The code is the same as the manual including calling the moment curvature procedure. but i got a convergence error when i am trying to target higher ductility mu=70 .
lower i attached the whole code .how can i solve that error?

code:
# Define model builder
# --------------------
model basic -ndm 2 -ndf 3

# Define materials for nonlinear columns
# ------------------------------------------
# CONCRETE tag f'c ec0 f'cu ecu
# Core concrete (confined)
uniaxialMaterial Concrete01 1 -3500 -0.0035 -3500 -0.014

#uniaxialMaterial Concrete02 1 -2800 -.002 -2800 -.01 .1 220 195000
# Cover concrete (unconfined)
uniaxialMaterial Concrete01 2 -2800 -0.0035 0.0 -0.0035
#uniaxialMaterial Concrete02 2 -2800 -.002 0 -.005 .1 220 195000

# STEEL
# Reinforcing steel
set fy 35000; # Yield stress
set E 20000000; # Young's modulus
# tag fy E0 b
uniaxialMaterial Steel01 3 $fy $E 0.01
#uniaxialMaterial Steel02 3 $fy $E .01 18.5 0.925 0.15 0.04 1 0.04 1
# Define cross-section for nonlinear columns
# ------------------------------------------
uniaxialMaterial MinMax 4 1 -min -0.014 -max 10
uniaxialMaterial MinMax 5 2 -min -0.0035 -max 10
uniaxialMaterial MinMax 6 3 -min -0.085 -max 0.085


# set some paramaters
set colWidthshort 3.5
set colDepthshort 1.85

set cover .05
set As 0.000804; # area of no. 7 bars

# some variables derived from the parameters
set y1 [expr $colDepthshort/2.0]
set z1 [expr $colWidthshort/2.0]

section Fiber 1 {

# Create the concrete core fibers

patch rect 4 40 1 [expr $cover-$y1] [expr $cover-$z1] [expr $y1-$cover] [expr $z1-$cover]

# Create the concrete cover fibers (top, bottom, left, right)

patch rect 5 2 1 [expr -$y1] [expr $z1-$cover] $y1 $z1

patch rect 5 2 1 [expr -$y1] [expr -$z1] $y1 [expr $cover-$z1]

patch rect 5 40 1 [ expr -$y1] [expr $cover-$z1] [expr $cover-$y1] [expr $z1-$cover]

patch rect 5 40 1 [ expr $y1-$cover] [expr $cover-$z1] $y1 [expr $z1-$cover]

# Create the reinforcing fibers (left, middle, right)

layer straight 6 41 $As [expr $y1-$cover] [expr $z1-$cover] [expr $y1-$cover] [expr $cover-$z1]
layer straight 6 2 $As [expr $y1-$cover-0.116] [expr $z1-$cover] [expr $y1-$cover-0.116] [expr $cover-$z1]
layer straight 6 2 $As [expr $y1-$cover-0.233] [expr $z1-$cover] [expr $y1-$cover-0.233] [expr $cover-$z1]
layer straight 6 2 $As [expr $y1-$cover-0.35] [expr $z1-$cover] [expr $y1-$cover-0.35] [expr $cover-$z1]
layer straight 6 2 $As [expr $y1-$cover-0.466] [expr $z1-$cover] [expr $y1-$cover-0.466] [expr $cover-$z1]
layer straight 6 2 $As [expr $y1-$cover-0.58] [expr $z1-$cover] [expr $y1-$cover-0.58] [expr $cover-$z1]
layer straight 6 2 $As [expr $y1-$cover-0.7] [expr $z1-$cover] [expr $y1-$cover-0.7] [expr $cover-$z1]
layer straight 6 2 $As [expr $y1-$cover-0.816] [expr $z1-$cover] [expr $y1-$cover-0.816] [expr $cover-$z1]
layer straight 6 41 $As [expr $cover-$y1] [expr $z1-$cover] [expr $cover-$y1] [expr $cover-$z1]
layer straight 6 2 $As [expr $cover-$y1+0.116] [expr $z1-$cover] [expr $cover-$y1+0.116] [expr $cover-$z1]
layer straight 6 2 $As [expr $cover-$y1+0.233] [expr $z1-$cover] [expr $cover-$y1+0.233] [expr $cover-$z1]
layer straight 6 2 $As [expr $cover-$y1+0.35] [expr $z1-$cover] [expr $cover-$y1+0.35] [expr $cover-$z1]
layer straight 6 2 $As [expr $cover-$y1+0.466] [expr $z1-$cover] [expr $cover-$y1+0.466] [expr $cover-$z1]
layer straight 6 2 $As [expr $cover-$y1+0.58] [expr $z1-$cover] [expr $cover-$y1+0.58] [expr $cover-$z1]
layer straight 6 2 $As [expr $cover-$y1+0.7] [expr $z1-$cover] [expr $cover-$y1+0.7] [expr $cover-$z1]
layer straight 6 2 $As [expr $cover-$y1+0.816] [expr $z1-$cover] [expr $cover-$y1+0.816] [expr $cover-$z1]
}


# Estimate yield curvature
# (Assuming no axial load and only top and bottom steel)
set d [expr $colDepthshort-$cover] ;# d -- from cover to rebar
puts "d:$d"
#set epsy [expr $fy/$E] ;# steel yield strain
puts "fy:$fy"
puts "E:$E"
set eps 0.00173
puts "eps:$eps"
set Ky [expr $eps/(0.7*$d)]

# Print estimate to standard output
puts "Estimated yield curvature: $Ky"

# Set axial load
set P -980


set mu 70; # Target ductility for analysis
set numIncr 1000; # Number of analysis increments
puts joe1
# Call the section analysis procedure
source MomentCurvature.tcl
MomentCurvature 1 $P [expr $Ky*$mu] $numIncr

proc MomentCurvature {secTag p maxK {numIncr} } {
# Define two nodes at (0,0)
node 1 0.0 0.0
node 2 0.0 0.0
puts ok2
# Fix all degrees of freedom except axial and bending
fix 1 1 1 1
fix 2 0 1 0
puts ok3
# Define element
# tag ndI ndJ secTag
element zeroLengthSection 1 1 2 $secTag
puts ok4
# Create recorder
recorder Node -file section$secTag.out -time -node 2 -dof 3 disp



recorder Element -file Element4.out -time -ele 1 section fiber .875 0 6 stressStrain
recorder Element -file Element6.out -time -ele 1 section fiber -.875 0 6 stressStrain
recorder Element -file Element8.out -time -ele 1 section fiber .875 0 4 stressStrain


puts ok5
# Define constant axial load
pattern Plain 1 "Constant" {
load 2 $p 0.0 0.0
}
puts ok6
# Define analysis parameters
integrator LoadControl 0.0
puts ok7
system SparseGeneral -piv; # Overkill, but may need the pivoting!
puts ok8
test NormUnbalance 1.0e-9 10
puts ok9
numberer Plain
puts ok10
constraints Plain
puts ok11
algorithm ModifiedNewton
puts ok12
analysis Static
puts ok13
# Do one analysis for constant axial load
analyze 10
puts ok14
# Define reference moment
pattern Plain 2 "Linear" {
load 2 0.0 0.0 1
}
puts ok15
# Compute curvature increment
set dK [expr $maxK/$numIncr]
puts ok16
# Use displacement control at node 2 for section analysis
integrator DisplacementControl 2 3 $dK 1 $dK $dK
puts ok17
# Do the section analysis
analyze $numIncr
puts ok18
}
silvia
Posts: 3909
Joined: Tue Jan 11, 2005 7:44 am
Location: Degenkolb Engineers
Contact:

Post by silvia »

please refer to the examples manual for the second part of the script for convergence issues.
Silvia Mazzoni, PhD
Structural Consultant
Degenkolb Engineers
235 Montgomery Street, Suite 500
San Francisco, CA. 94104
Post Reply