time-history analysis doesen't 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
sisa
Posts: 27
Joined: Sun Mar 13, 2011 8:03 am
Location: Bologna

time-history analysis doesen't converge

Post by sisa »

Hi! I'm analyzing an infilled frame of one bay. I've done pushover analysis and the model works well. Now I have to do time-hystory analysis with some earthquake accelerogram. I have written the parameter of analysis as in the example4 and I'm not very practical with these values so I don't know what I can change in order to reach a convergence. I hope you can help me!! this are my scripts (I puts only the model and the analysis, the sections are in others script):

#MODEL
#comportamento non lineare e modellazione a fibre
#unità N, mm
#assi x orizzontale, y verticale
wipe
file mkdir TelaioNonLineare
model BasicBuilder -ndm 2 -ndf 3

#GEOMETRIA
source sezioneCA_telaio.txt
source sezione_biella_ciclo.txt
puts "sezione caricate"

set Hcol 3000.
set Lportale 5000.

node 1 0. 0.
node 2 0. $Hcol
node 3 $Lportale 0.
node 4 $Lportale $Hcol

fix 1 1 1 1
fix 3 1 1 1

#MASSE
set Ptot 213125;#peso solaio + trave in N
set Ppil 6750
set g 9810;#in mm/s2
set M [expr $Ptot/$g/2]
mass 2 $M. 0. 0.
mass 4 $M. 0. 0.

#ELEMENTI
set IDctrlSez 5
set IDctrlNode 2
set IDctrlDOF 1

geomTransf Linear 200;#colonne
geomTransf Linear 201;#trave

element nonlinearBeamColumn 1 1 2 $IDctrlSez $SezTag 200
element nonlinearBeamColumn 2 3 4 $IDctrlSez $SezTag 200
element nonlinearBeamColumn 3 2 4 $IDctrlSez $SezTrave 201

#biella
element trussSection 4 2 3 $SezBiella
element trussSection 5 1 4 $SezBiella

puts "elementi costruiti"
puts "$IDctrlSez Sezioni Controllo"

recorder Node -file TelaioNonLineare/D.out -node 2 -dof 1 disp;#spostamento per diagramma
recorder Node -file TelaioNonLineare/D'.out -node 4 -dof 1 disp
recorder Node -file TelaioNonLineare/F.out -time -node 1 -dof 1 disp
recorder Node -file TelaioNonLineare/taglioBase1.out -node 1 -dof 1 reaction
recorder Node -file TelaioNonLineare/taglioBase2.out -node 3 -dof 1 reaction
recorder Element -file TelaioNonLineare/armatura.out -time -ele 1 section 1 fiber 120 120 stressStrain

#carico assiale
set P [expr -($Ptot+$Ppil)]
puts "il carico assiale è $P"

puts "modello costruito"

pattern Plain 3001 "Constant" {load 2 0.0 $P 0.0}
pattern Plain 3002 "Constant" {load 4 0.0 $P 0.0}
# Define analysis parameters
integrator LoadControl 0 1 0 0
system SparseGeneral -piv
test EnergyIncr 1.0e-9 10
numberer Plain
constraints Plain
algorithm Newton
analysis Static

# Do one analysis for constant axial load
analyze 1

loadConst -time 0.0

puts "analisi carichi verticali fatta"
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
#ANALISI TIME-HISTORY
# DYNAMIC ground-motion analysis -------------------------------------------------------------
# create load pattern
set dt 0.01
set step 2000
set a 1;#scala dell'accelerogramma
set accTag 01;#tag del carico
set time 02;#tag del timeSeries
set direz 1;#applico accelerogramma lungo x globale
timeSeries Path $time -dt $dt -filePath s1.txt -factor [expr $a*$g]; # define acceleration vector from file (dt=0.005 is associated with the input file gm)
pattern UniformExcitation $accTag $direz -accel $time; # define where and how (pattern tag, dof) acceleration is applied

# set damping based on first eigen mode
set freq [expr [eigen 1]**0.5]
set dampRatio 0.05
rayleigh 0. 0. 0. [expr 2*$dampRatio/$freq]
set T [expr 2*3.14/$freq]

puts rayleigh
puts "il periodo è $T secondi"
puts "la pulsazione è $freq 1/secondi"
puts "la massa è $M"

source parametri_analisi.tcl;# SEE THE SCRIPT BELOW

set TmaxAnalysis [expr $step*$dt]
set Nsteps [expr int($TmaxAnalysis/$dt)];
set ok [analyze $step $dt]]; # actually perform analysis; returns ok=0 if analysis was successful

if {$ok != 0} { ; # analysis was not successful.
# --------------------------------------------------------------------------------------------------
# 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 controlTime [getTime]
set ok [analyze 1 $dt]
if {$ok != 0} {
puts "Trying Newton with Initial Tangent .."
test NormDispIncr $TolDynamic 1000 0
algorithm Newton -initial
set ok [analyze 1 $dt]
test $testTypeDynamic $TolDynamic $maxNumIterDynamic 0
algorithm $algorithmTypeDynamic
}
if {$ok != 0} {
puts "Trying Broyden .."
algorithm Broyden 8
set ok [analyze 1 $dt]
algorithm $algorithmTypeDynamic
}
if {$ok != 0} {
puts "Trying NewtonWithLineSearch .."
algorithm NewtonLineSearch .8
set ok [analyze 1 $dt]
algorithm $algorithmTypeDynamic
}
}
}; # end if ok !0


if {$ok != 0} {
puts "errore"} else {puts "Fatto"}

----------------------------------------------------------------------------------------------------------------------------------------------
#parametri_analisi.tcl
# --------------------------------------------------------------------------------------------------
# dynamic-analysis parameters
# I am setting all these variables as global variables (using variable rather than set command)
# so that these variables can be uploaded by a procedure
# Silvia Mazzoni & Frank McKenna, 2006


# Set up Analysis Parameters ---------------------------------------------
# CONSTRAINTS handler -- Determines how the constraint equations are enforced in the analysis
# Plain Constraints -- Removes constrained degrees of freedom from the system of equations
# Lagrange Multipliers -- Uses the method of Lagrange multipliers to enforce constraints
# Penalty Method -- Uses penalty numbers to enforce constraints
# Transformation Method -- Performs a condensation of constrained degrees of freedom
variable constraintsTypeDynamic Transformation;
constraints $constraintsTypeDynamic ;

# DOF NUMBERER (number the degrees of freedom in the domain):
# determines the mapping between equation numbers and degrees-of-freedom
# Plain -- Uses the numbering provided by the user
# RCM -- Renumbers the DOF to minimize the matrix band-width using the Reverse Cuthill-McKee algorithm
variable numbererTypeDynamic RCM
numberer $numbererTypeDynamic

# SYSTEM
# Linear Equation Solvers (how to store and solve the system of equations in the analysis)
# -- provide the solution of the linear system of equations Ku = P. Each solver is tailored to a specific matrix topology.
# ProfileSPD -- Direct profile solver for symmetric positive definite matrices
# BandGeneral -- Direct solver for banded unsymmetric matrices
# BandSPD -- Direct solver for banded symmetric positive definite matrices
# SparseGeneral -- Direct solver for unsymmetric sparse matrices (-piv option)
# SparseSPD -- Direct solver for symmetric sparse matrices
# UmfPack -- Direct UmfPack solver for unsymmetric matrices
variable systemTypeDynamic BandGeneral; # try UmfPack for large problems
system $systemTypeDynamic

# TEST: # convergence test to
# Convergence TEST
# -- Accept the current state of the domain as being on the converged solution path
# -- determine if convergence has been achieved at the end of an iteration step
# NormUnbalance -- Specifies a tolerance on the norm of the unbalanced load at the current iteration
# NormDispIncr -- Specifies a tolerance on the norm of the displacement increments at the current iteration
# EnergyIncr-- Specifies a tolerance on the inner product of the unbalanced load and displacement increments at the current iteration
# RelativeNormUnbalance --
# RelativeNormDispIncr --
# RelativeEnergyIncr --
variable TolDynamic 1.e-8; # Convergence Test: tolerance
variable maxNumIterDynamic 10; # 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 EnergyIncr; # Convergence-test type
test $testTypeDynamic $TolDynamic $maxNumIterDynamic $printFlagDynamic;
# for improved-convergence procedure:
variable maxNumIterConvergeDynamic 2000;
variable printFlagConvergeDynamic 0;

# Solution ALGORITHM: -- Iterate from the last time step to the current
# Linear -- Uses the solution at the first iteration and continues
# Newton -- Uses the tangent at the current iteration to iterate to convergence
# ModifiedNewton -- Uses the tangent at the first iteration to iterate to convergence
# NewtonLineSearch --
# KrylovNewton --
# BFGS --
# Broyden --
variable algorithmTypeDynamic ModifiedNewton
algorithm $algorithmTypeDynamic;

# Static INTEGRATOR: -- determine the next time step for an analysis
# LoadControl -- Specifies the incremental load factor to be applied to the loads in the domain
# DisplacementControl -- Specifies the incremental displacement at a specified DOF in the domain
# Minimum Unbalanced Displacement Norm -- Specifies the incremental load factor such that the residual displacement norm in minimized
# Arc Length -- Specifies the incremental arc-length of the load-displacement path
# Transient INTEGRATOR: -- determine the next time step for an analysis including inertial effects
# Newmark -- The two parameter time-stepping method developed by Newmark
# HHT -- The three parameter Hilbert-Hughes-Taylor time-stepping method
# Central Difference -- Approximates velocity and acceleration by centered finite differences of displacement
variable NewmarkGamma 0.5; # Newmark-integrator gamma parameter (also HHT)
variable NewmarkBeta 0.25; # Newmark-integrator beta parameter
variable integratorTypeDynamic Newmark;
integrator $integratorTypeDynamic $NewmarkGamma $NewmarkBeta

# ANALYSIS -- defines what type of analysis is to be performed
# Static Analysis -- solves the KU=R problem, without the mass or damping matrices.
# Transient Analysis -- solves the time-dependent analysis. The time step in this type of analysis is constant. The time step in the output is also constant.
# variableTransient Analysis -- performs the same analysis type as the Transient Analysis object. The time step, however, is variable. This method is used when
# there are convergence problems with the Transient Analysis object at a peak or when the time step is too small. The time step in the output is also variable.
variable analysisTypeDynamic Transient
analysis $analysisTypeDynamic
vesna
Posts: 3033
Joined: Tue May 23, 2006 11:23 am
Location: UC Berkeley

Re: time-history analysis doesen't converge

Post by vesna »

Would you post the warning message about convergence problems you have?
sisa
Posts: 27
Joined: Sun Mar 13, 2011 8:03 am
Location: Bologna

Re: time-history analysis doesen't converge

Post by sisa »

thank you vesna for your reply! I really hope you can help me! this is the warning message:

WARNING: CTestEnergyIncr::test() - failed to converge
after: 10 iterations
ModifiedNewton::solveCurrentStep() -the ConvergenceTest object failed in test()
DirectIntegrationAnalysis::analyze() - the Algorithm failed at time 3.38
OpenSees > analyze failed, returned: -3 error flag
WARNING: CTestEnergyIncr::test() - failed to converge
after: 10 iterations
ModifiedNewton::solveCurrentStep() -the ConvergenceTest object failed in test()
DirectIntegrationAnalysis::analyze() - the Algorithm failed at time 3.38
OpenSees > analyze failed, returned: -3 error flag
Trying Newton with Initial Tangent ..
WARNING: CTestNormDispIncr::test() - failed to converge
after: 1000 iterations
NewtnRaphson::solveCurrentStep() -the ConvergenceTest object failed in test()
DirectIntegrationAnalysis::analyze() - the Algorithm failed at time 3.38
OpenSees > analyze failed, returned: -3 error flag
Trying Broyden..
WARNING: CTestEnergyIncr::test() - failed to converge
after: 10 iterations
WARNING: CTestEnergyIncr::test() - failed to converge
after: 10 iterations
WARNING: CTestEnergyIncr::test() - failed to converge
after: 10 iterations
WARNING: CTestEnergyIncr::test() - failed to converge
after: 10 iterations
WARNING: CTestEnergyIncr::test() - failed to converge
after: 10 iterations
WARNING: CTestEnergyIncr::test() - failed to converge
after: 10 iterations
WARNING: CTestEnergyIncr::test() - failed to converge
after: 10 iterations
WARNING: CTestEnergyIncr::test() - failed to converge
after: 10 iterations
WARNING: CTestEnergyIncr::test() - failed to converge
after: 10 iterations
WARNING: CTestEnergyIncr::test() - failed to converge
after: 10 iterations
WARNING: CTestEnergyIncr::test() - failed to converge
after: 10 iterations
Broyden::solveCurrentStep() -the ConvergenceTest object failed in test()
DirectIntegrationAnalysis::analyze() - the Algorithm failed at time 3.38
OpenSees > analyze failed, returned: -3 error flag
Trying NewtonWithLineSearch ..
WARNING: CTestEnergyIncr::test() - failed to converge
after: 10 iterations
NewtonLineSearch::solveCurrentStep() -the ConvergenceTest object failed in test(
)
DirectIntegrationAnalysis::analyze() - the Algorithm failed at time 3.38
OpenSees > analyze failed, returned: -3 error flag
vesna
Posts: 3033
Joined: Tue May 23, 2006 11:23 am
Location: UC Berkeley

Re: time-history analysis doesen't converge

Post by vesna »

It is all about tweaking parameters of analysis. To find what works for you and the earthquake you have you will have to play with the analysis objects. I would suggest you trying to run another earthquake (e.g., the one used in all examples on wiki). If you do not have convergence problems with the other one, your analysis objects are fine. If you still have problem with convergence try using VarableTransient analysis.
sisa
Posts: 27
Joined: Sun Mar 13, 2011 8:03 am
Location: Bologna

Re: time-history analysis doesen't converge

Post by sisa »

I've tried to change the dt using my earthquake and it works...but the results aren't correct. My earthquake has a dt of 0.01 instead i put a dt in the analysis of 0.005. can I do this? it can interpolate between points? becuase it works but it gives very small displcements. Also if a record the acceleration of nodes I would have the same accelaration I give with the earthquake? because in my case the two are very different.
I've tried also to use the earthquake of examples but I'm not very sure of their units (they are in G units but in the examples it's written a factor of 1 instead I would use a factor as g accelartion of 9,81 m/s2)
have you other suggest?
thank you
sisa
Posts: 27
Joined: Sun Mar 13, 2011 8:03 am
Location: Bologna

Re: time-history analysis doesen't converge

Post by sisa »

the strange aspect is that also if the converge dosen't have problems the result are wrong...infact the recorder of base shear
recorder Node -file TelaioNonLineare/taglioBase1.out -node 1 -dof 1 reaction
recorder Node -file TelaioNonLineare/taglioBase2.out -node 3 -dof 1 reaction
gives two opposite reaction (one positive and one negative) so the total shear is very very small and the global response of frame in term of force-displacement is wrong. this doesn't happen in the bare frame so it's a problem with the trusses that model the infill...do you have any idea of what is the problem?
i hope in yours help!
thank you
Annalisa
vesna
Posts: 3033
Joined: Tue May 23, 2006 11:23 am
Location: UC Berkeley

Re: time-history analysis doesen't converge

Post by vesna »

yes, dt in analysis can be different then the time increment for ground motion. The OpenSees will linearly interpolate between the points of record to find the input for the analysis. If you are getting relative acceleration of the top nodes of the frame to be the same as ground acceleration it may be: 1) a pure coincidence, 2) error in the model, 3) error in the recorder command.

Most acceleration records are given in units of G, so factor has to be 9.81 m/sec2. If you found it to be 1 in the example that is an error. would you please tell me what example did you look at?

Yes, the problem is most probably related to your braces. Check to see if you have any moment in your braces. Do also eigen analysis to see if the period you are getting has any sense. Compare it with a hand calculated one.
Post Reply