How can I get nonlinear results?thanks !

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

Moderators: silvia, selimgunay, Moderators

Post Reply
QI
Posts: 39
Joined: Sat Aug 05, 2006 4:25 am

How can I get nonlinear results?thanks !

Post by QI »

hi everyone !
I want to modal a portal frame with shear deformation.i use the model of nonlinearBeamColumn and add a Uniaxial-Material to fiber section with aggregrator command.but whether i add the Uniaxial-Material the diagram of shear stress-shear strain is linear all the same. :(

How can I get nonlinear results and diagrams?who can help me ? :cry:
thanks very much ahead of time !
here is my code :


# ____________ _
# | |
# | |
# | | 4.5m
# | |
# | | _
# === ===
# | 6m |
#

wipe

# comment out one of lines
# set analysis "NONLINEAR"

set type "NLBC"
# set type "mydispBC"
# set type "BWH"

# Define the model builder
model BasicBuilder -ndm 2 -ndf 3

# set division number for beam and column
set beamdiv 1
set coldiv 1
#set subbeamlen [expr 6.0/$beamdiv]
#set subcollen [expr 2.0/$coldiv]

# Define nodes
# tag X Y
node 1 0.0 0.0
node 2 6.0 0.0
node 3 0.0 4.5
node 4 6.0 4.5


# Single point constraints
# node DX DY RZ
fix 1 1 1 1
fix 2 1 1 1


# Define materials

set fcCover -26000.0
set fcuCover 0.0
set fcCore [expr 1.1*$fcCover]
set fcuCore [expr 0.2*$fcCore]
set fy 388000.0
set Es 2.0e8
set E 3.236e7
set epscCover [expr $fcCover*2.0/$E]
set epscCore [expr 1.1*$epscCover]
set ft [expr -0.1*$fcCover]
set Ets [expr 0.125*$E]

# Cover concrete
# tag -f'c -epsco -f'cu -epscu
uniaxialMaterial Concrete02 1 $fcCover $epscCover $fcuCover -0.004 0.05 $ft $Ets
# Core concrete
uniaxialMaterial Concrete02 2 $fcCore $epscCore $fcuCore -0.011 0.05 $ft $Ets

# Steel model
# tag fy E b
uniaxialMaterial Steel02 3 $fy $Es 0.01 18.5 0.925 0.15
# uniaxialMaterial Steel02 4 38 1 0.01 18.5 0.925 0.15
uniaxialMaterial Hysteretic 4 15000 0.00001 20000 0.00003 30000 0.00004 -15000 -0.00001 -20000 -0.00003 -30000 -0.00004 0.5 0.5 0.9 0.9 0.0




set beamWidth 0.3
set beamDepth 0.75
# //////////////////////////////////////////////////////////
# note: in newest code, Colcover is no less than 30 mm
# (so perhaps here should has a revision)
# //////////////////////////////////////////////////////////
set cover 0.025
set y1 [expr $beamDepth/2.0]
set z1 [expr $beamWidth/2.0]

set r1 0.009
set r2 0.01


# //////////////////////////////////////////////////////
# note: in 2D, bending is about the local Z-axis!
# //////////////////////////////////////////////////////

# Girder section
section fiberSec 1 {
patch rect 2 12 1 [expr $cover-$y1] [expr $cover-$z1] [expr $y1-$cover] [expr $z1-$cover]
patch rect 1 14 1 -$y1 [expr $z1-$cover] $y1 $z1
patch rect 1 14 1 -$y1 -$z1 $y1 [expr $cover-$z1]
patch rect 1 2 1 -$y1 [expr $cover-$z1] [expr $cover-$y1] [expr $z1-$cover]
patch rect 1 2 1 [expr $y1-$cover] [expr $cover-$z1] $y1 [expr $z1-$cover]
layer straight 3 3 274.4e-6 [expr $y1-$cover-$r2] [expr $z1-$cover-$r1] [expr $y1-$cover-$r2] [expr $cover-$z1+$r1]
layer straight 3 2 314.2e-6 [expr $cover-$y1+$r2] [expr $z1-$cover-$r2] [expr $cover-$y1+$r2] [expr $cover-$z1+$r2]
}

section fiberSec 2 {
patch rect 2 12 1 [expr $cover-$y1] [expr $cover-$z1] [expr $y1-$cover] [expr $z1-$cover]
patch rect 1 14 1 -$y1 [expr $z1-$cover] $y1 $z1
patch rect 1 14 1 -$y1 -$z1 $y1 [expr $cover-$z1]
patch rect 1 2 1 -$y1 [expr $cover-$z1] [expr $cover-$y1] [expr $z1-$cover]
patch rect 1 2 1 [expr $y1-$cover] [expr $cover-$z1] $y1 [expr $z1-$cover]
layer straight 3 2 254.5e-6 [expr $y1-$cover-$r1] [expr $z1-$cover-$r1] [expr $y1-$cover-$r1] [expr $cover-$z1+$r1]
layer straight 3 2 314.2e-6 [expr $cover-$y1+$r2] [expr $z1-$cover-$r2] [expr $cover-$y1+$r2] [expr $cover-$z1+$r2]
}


set colWidth 0.45
set colDepth 0.5
set y2 [expr $colDepth / 2.0]
set z2 [expr $colWidth / 2.0]

# Column section
section fiberSec 3 {
patch rect 2 12 1 [expr $cover-$y2] [expr $cover-$z2] [expr $y2-$cover] [expr $z2-$cover]
patch rect 1 14 1 -$y2 [expr $z2-$cover] $y2 $z2
patch rect 1 14 1 -$y2 -$z2 $y2 [expr $cover-$z2]
patch rect 1 2 1 -$y2 [expr $cover-$z2] [expr $cover-$y2] [expr $z2-$cover]
patch rect 1 2 1 [expr $y2-$cover] [expr $cover-$z2] $y2 [expr $z2-$cover]
layer straight 3 4 254.5e-6 [expr $y2-$cover-$r1] [expr $z2-$cover-$r1] [expr $y2-$cover-$r1] [expr $cover-$z2+$r1]
layer straight 3 2 254.5e-6 [expr ($y2-$cover-$r1)*1.0/3.0] [expr $z2-$cover-$r1] [expr ($y2-$cover-$r1)*1.0/3.0] [expr $cover-$z2+$r1]
layer straight 3 2 254.5e-6 [expr ($y2-$cover-$r1)*(-1.0)/3.0] [expr $z2-$cover-$r1] [expr ($y2-$cover-$r1)*(-1.0)/3.0] [expr $cover-$z2+$r1]
layer straight 3 4 254.5e-6 [expr $cover-$y2+$r1] [expr $z2-$cover-$r1] [expr $cover-$y2+$r1] [expr $cover-$z2+$r1]
}

set Iz1 [expr $beamWidth*pow($beamDepth,3)/12.0]
set Iz2 [expr $colWidth*pow($colDepth,3)/12.0]
set A1 [expr 0.3*0.75]
set A2 [expr 0.45*0.5]

#set beamrho [expr 25.0*$A1/9.81+5.083]
#set colrho [expr 25.0*$A2/9.81]
#set beamratio [expr 1.0*0.75]
#set colratio [expr 1.0*0.5]

#uniaxialMaterial Elastic 5 Iz2 # define elastic torsional stiffness
section Aggregator 4 4 Vy -section 3

# Geometric transformation
geomTransf Linear 1

# Number of integration points
set colnP 5
set beamnP 5

# Define elements



# tag ndI ndJ nPts secID transf mass iter
element nonlinearBeamColumn 1 3 4 $beamnP -sections 1 1 2 1 1 1
element nonlinearBeamColumn 2 1 3 $colnP -sections 4 4 4 4 4 1
element nonlinearBeamColumn 3 2 4 $colnP -sections 4 4 4 4 4 1






set m1 [expr (25.0*$A2*4.5+(25.0*$A1+5.083*9.81)*6.0)/2.0/9.81]
mass 3 $m1 $m1 0.0
mass 4 $m1 $m1 0.0


# ///////////////////////////////////////////////////////////////////
# Mode analysis for determine rayleigh damping matrix
# ///////////////////////////////////////////////////////////////////

# Perform an eigenvalue analysis
puts "eigen values for Mode analysis: [eigen 2]"

# ///////////////////////////////////////////////////////////////////
# End of Mode analysis for determine rayleigh damping matrix
# ///////////////////////////////////////////////////////////////////

#}



# Create a Plain vertical load pattern with a Linear TimeSeries
pattern Plain 1 Linear {
# node FX FY MZ
load 3 0.0 -96.0 0.0
load 4 0.0 -96.0 0.0
eleLoad -range 1 1 -type -beamUniform -33.0

}

# Load control
integrator LoadControl 0.1
#integrator LoadControl 1 3 .2 1

# Convergence test
# tolerance maxIter displayCode
test NormDispIncr 1.0e-4 10 0
#test EnergyIncr 1.0e-10 50 0

# Solution algorithm
algorithm Newton

# DOF numberer
numberer RCM

# Cosntraint handler
constraints Plain

# System of equations solver
#system BandGeneral
system UmfPack
#system SparseGeneral -piv

# Create the analysis object
analysis Static

# initialize the model, done to set initial tangent
initialize

# perform the gravity load analysis, requires 10 steps to reach the load level
set gravityok [analyze 10]
#set gravityok [analyze 1]

if {$gravityok == 0} {
puts "Gravity load analysis completed SUCCESSFULLY";
} else {
puts "Gravity load analysis completed FAILED";
}



# Set the gravity loads to be constant & reset the time in the domain
loadConst -time 0.0


# Define dynamic loads
# --------------------

# Set some parameters

#set GM ElCentro
set GM Taft
#set GM USA00419
#set GM USA00676
#set GM USA00683
#set GM USA00818

set outFile record/${GM}.g3

set accelD9 6.174
if {$GM == "ElCentro"} {
set accel($GM) 3417.
} elseif {$GM == "Taft"} {
set accel($GM) 1527.
} elseif {$GM == "USA00419"} {
set accel($GM) -1435.
} elseif {$GM == "USA00676"} {
set accel($GM) 1956.
} elseif {$GM == "USA00683"} {
set accel($GM) -2207.
} elseif {$GM == "USA00818"} {
set accel($GM) 359.
}

set factor [expr $accelD9/abs($accel($GM))]



# Set time series to be passed to uniform excitation
set accelSeries "Path -filePath $outFile -dt 0.02 -factor $factor"

# Create UniformExcitation load pattern
# tag dir
pattern UniformExcitation 2 1 -accel $accelSeries


# set the rayleigh damping factors for nodes & elements
set omega1squared 5.77e+004

set omega2squared 1.79e+005
set omega1 [expr sqrt($omega1squared)]
set omega2 [expr sqrt($omega2squared)]
set pi [expr acos(-1.0)]
set period1 [expr 2.0*$pi/$omega1]
set period2 [expr 2.0*$pi/$omega2]
puts "//////////////////////////"
puts "period1 is $period1"
puts "period2 is $period2"
puts "//////////////////////////"
set a0 [expr 0.1*$omega1*$omega2/($omega1+$omega2)]
set a1 [expr 0.1/($omega1+$omega2)]
rayleigh $a0 0.0 0.0 $a1


# ----------------------------------------------------
# End of additional modelling for dynamic loads
# ----------------------------------------------------


# ---------------------------------------------------------
# Start of modifications to analysis for transient analysis
# ---------------------------------------------------------

# Delete the old analysis and all it's component objects
wipeAnalysis

# Create the system of equation, a banded general storage scheme
#system BandGeneral
system UmfPack
#system SparseGeneral -piv

# Create the constraint handler
constraints Plain

# Create the convergence test, the norm of the residual with a tolerance of
# 1e-4 and a max number of iterations of 10
test NormDispIncr 1.0e-4 10
#test EnergyIncr 1.0e-10 50 0


# Create the solution algorithm, a Newton-Raphson algorithm
algorithm Newton

# Create the DOF numberer, the reverse Cuthill-McKee algorithm
numberer RCM

# Create the integration scheme, the Newmark with alpha =0.5 and beta =.25
integrator Newmark 0.5 0.25

# Create the analysis object
analysis Transient

# ---------------------------------------------------------
# End of modifications to analysis for transient analysis
# ---------------------------------------------------------


# ------------------------------
# Start of recorder generation
# ------------------------------



set dir ${GM}/$type/${coldiv}coldiv

file mkdir $dir/disp $dir/force $dir/section
for {set i 1} {$i <=3} {incr i} {
file mkdir $dir/section/ele$i
}

# Create a recorder to monitor nodal displacements of top floor
recorder Node -file $dir/disp/node[expr 2*$coldiv+1].out -time -node [expr 2*$coldiv+1] -dof 1 2 3 disp
recorder Node -file $dir/disp/node[expr 2*$coldiv+$beamdiv+1].out -time -node [expr 2*$coldiv+$beamdiv+1] -dof 1 2 3 disp

# Create a recorder to monitor shear force at the base of first floor columns
recorder Element -file $dir/force/ele[expr $beamdiv+1]globalForce.out -time -ele [expr $beamdiv+1] globalForce
recorder Element -file $dir/force/ele[expr $beamdiv+1+$coldiv]globalForce.out -time -ele [expr $beamdiv+1+$coldiv] globalForce

# Create recorders to monitor section forces and deformations
# at the two ends of beam and column

set beamEndnP $beamnP
set colEndnP $colnP


for {set i 1} {$i <= 1} {incr i} {
file mkdir $dir/section/ele$i
for {set n 1} {$n <= $beamEndnP} {incr n} {
recorder Element -file $dir/section/ele$i/sec${n}Force+Def.out -time -ele $i section $n forceAndDeformation
}
}
for {set i 2} {$i <= 3} {incr i} {
file mkdir $dir/section/ele$i
for {set n 1} {$n <= $colEndnP} {incr n} {
recorder Element -file $dir/section/ele$i/sec${n}Force+Def.out -time -ele $i section $n forceAndDeformation
}
}



#foreach i [list 1 $beamdiv] nP [list 1 $beamEndnP] {
#recorder Element -file $dir/section/ele1/sec${nP}Force+Def.out -time -ele $i section $nP forceAndDeformation
#}
#recorder plot $dir/section/ele1/sec1Force+Def.out Ele1Sec1_MK 10 310 300 300 -columns 3 5
#recorder plot $dir/section/ele1/sec${nP}Force+Def.out Ele1Sec${nP}_MK 10 0 300 300 -columns 3 5
#recorder plot $dir/section/ele1/sec${nP}Force+Def.out Time 10 620 300 100 -columns 1 1

#foreach i [list [expr $beamdiv+1] [expr $beamdiv+$coldiv]] nP [list 1 $colEndnP] {
#recorder Element -file $dir/section/ele2/sec${nP}Force+Def.out -time -ele $i section $nP forceAndDeformation
#}

#foreach i [list [expr $beamdiv+1+$coldiv] [expr $beamdiv+2*$coldiv]] nP [list 1 $colEndnP] {
#recorder Element -file $dir/section/ele3/sec${nP}Force+Def.out -time -ele $i section $nP forceAndDeformation
#}

# Create recorders to monitor fiber stressStrain relations
# of tensile steel material at the two ends of beam and column

# Beam section -- fiber streeStrain
foreach i [list 1 $beamdiv] nP [list 1 $beamEndnP] {
recorder Element -file $dir/section/ele1/sec${nP}TopSstressStrain.out -time -ele $i section $nP fiber [expr $y1-$cover-$r2] 0.0 stressStrain
recorder Element -file $dir/section/ele1/sec${nP}BotSstressStrain.out -time -ele $i section $nP fiber [expr $cover-$y1+$r2] 0.0 stressStrain
}

# Column section -- fiber streeStrain
foreach i [list [expr $beamdiv+1] [expr $beamdiv+$coldiv]] nP [list 1 $colEndnP] {
recorder Element -file $dir/section/ele2/sec${nP}LefSstressStrain.out -time -ele $i section $nP fiber [expr $y2-$cover-$r1] 0.0 stressStrain
recorder Element -file $dir/section/ele2/sec${nP}RigSstressStrain.out -time -ele $i section $nP fiber [expr $cover-$y2+$r1] 0.0 stressStrain
}

foreach i [list [expr $beamdiv+1+$coldiv] [expr $beamdiv+2*$coldiv]] nP [list 1 $colEndnP] {
recorder Element -file $dir/section/ele3/sec${nP}LefSstressStrain.out -time -ele $i section $nP fiber [expr $y2-$cover-$r1] 0.0 stressStrain
recorder Element -file $dir/section/ele3/sec${nP}RigSstressStrain.out -time -ele $i section $nP fiber [expr $cover-$y2+$r1] 0.0 stressStrain
}


# Create recorders to monitor fiber stressStrain relations
# of compressive edge concrete at the two ends of beam and column

# Beam section -- fiber streeStrain
foreach i [list 1 $beamdiv] nP [list 1 $beamEndnP] {
recorder Element -file $dir/section/ele1/sec${nP}TopECstressStrain.out -time -ele $i section $nP fiber $y1 0.0 stressStrain
recorder Element -file $dir/section/ele1/sec${nP}BotECstressStrain.out -time -ele $i section $nP fiber -$y1 0.0 stressStrain
}

# Column section -- fiber streeStrain
foreach i [list [expr $beamdiv+1] [expr $beamdiv+$coldiv]] nP [list 1 $colEndnP] {
recorder Element -file $dir/section/ele2/sec${nP}LefECstressStrain.out -time -ele $i section $nP fiber $y2 0.0 stressStrain
recorder Element -file $dir/section/ele2/sec${nP}RigECstressStrain.out -time -ele $i section $nP fiber -$y2 0.0 stressStrain
}

foreach i [list [expr $beamdiv+1+$coldiv] [expr $beamdiv+2*$coldiv]] nP [list 1 $colEndnP] {
recorder Element -file $dir/section/ele3/sec${nP}LefECstressStrain.out -time -ele $i section $nP fiber $y2 0.0 stressStrain
recorder Element -file $dir/section/ele3/sec${nP}RigECstressStrain.out -time -ele $i section $nP fiber -$y2 0.0 stressStrain
}


# --------------------------------
# End of recorder generation
# ---------------------------------


# ------------------------------
# Finally perform the analysis
# ------------------------------

# set some variables
set tFinal [expr 2000 * 0.01]
set tCurrent [getTime]
set ok 0



# Perform the transient analysis
while {$ok == 0 && $tCurrent < $tFinal} {

set ok [analyze 1 .01]

# if the analysis fails try initial tangent iteration
if {$ok != 0} {
puts "regular newton failed .. lets try an initail stiffness for this step"
test NormDispIncr 1.0e-4 100 0
#test EnergyIncr 1.0e-10 500 0
algorithm ModifiedNewton -initial
set ok [analyze 1 .01]
if {$ok == 0} {puts "that worked .. back to regular newton"}
test NormDispIncr 1.0e-4 10
#test EnergyIncr 1.0e-10 50 0
algorithm Newton

}

set tCurrent [getTime]
}

# Print a message to indicate if analysis succesfull or not
if {$ok == 0} {
puts "Transient analysis completed SUCCESSFULLY";
} else {
puts "Transient analysis completed FAILED";
}



wipe
silvia
Posts: 3909
Joined: Tue Jan 11, 2005 7:44 am
Location: Degenkolb Engineers
Contact:

Post by silvia »

it may still be elastic.
Silvia Mazzoni, PhD
Structural Consultant
Degenkolb Engineers
235 Montgomery Street, Suite 500
San Francisco, CA. 94104
QI
Posts: 39
Joined: Sat Aug 05, 2006 4:25 am

How can I get nonlinear results and diagrams?

Post by QI »

silvia wrote:it may still be elastic.
yes
How can I difine a uniaxialMaterial and get nonlinear results and diagrams? can you help me ?
thank you very much !
silvia
Posts: 3909
Joined: Tue Jan 11, 2005 7:44 am
Location: Degenkolb Engineers
Contact:

Post by silvia »

load it further.
or the demands on that components are not high enough.
Silvia Mazzoni, PhD
Structural Consultant
Degenkolb Engineers
235 Montgomery Street, Suite 500
San Francisco, CA. 94104
Post Reply