This is crazy, problem with nonlinear beam

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

Moderators: silvia, selimgunay, Moderators

toggi007
Posts: 38
Joined: Mon Jan 09, 2012 3:39 am
Location: Háskóli Íslands

This is crazy, problem with nonlinear beam

Post by toggi007 »

I am doing a simple nonlinear analysis with opensees on a simply supported beams witch I have already broken in the laboratory. In the lab it was observed that the failure mechanism was pure bending. The beam is 1150 mm long with cross section 150x150 mm and has 2K6 bars (2 x 6 mm) bars at d= 135 mm. The P-u (load displacement) from the lab shows that one beam reaches 17 kN force at 8 mm displacement.
When running my nonlinear analysis in opensees the same beam experiences 1.8 mm deflection at 19.8 kN load. Which is just crazy, even with linear handcalculations u_max = (1/48)*Q*L^3/EI = 2 mm.
Now I have modeled some columns from the peer database before and have had no major problems regarding the results, now however I´m troubled.
This experiment and the uses of opensees is a part of a masters thesis in structural engineering and I would appreciate some comments from all you good people out there :)
I will include the tcl file for the model wich is very simple and should take anyone with some opensees experience only a few moments to run through.

Much appreciated
and best regards

#the file:
# --------------------------------------------------------------------------------------------------
# fiber section, nonlinearBeamColumn element
#
#
# ^Y
# | set-up
# |
#
# 1------2------3 -->x
# XX 00
# LCol
#
#

# SET UP ----------------------------------------------------------------------------
wipe; # clear memory of all past model definitions
file mkdir Data/1A; # create data directory
model BasicBuilder -ndm 2 -ndf 3; # Define the model builder, ndm=#dimension, ndf=#dofs

# set basic units
set mm 1.0;
set N 1.0;
set pi 3.141593;
set MPa [expr $N/$mm/$mm];
set kN [expr 1000*$N];


#source DisplayModel2D.tcl

# define GEOMETRY -------------------------------------------------------------
set LCol [expr 1150*$mm];
set MCol [expr $LCol/2];
# define section geometry
set HCol [expr 150*$mm]; # Column Depth
set BCol [expr 150*$mm]; # Column Width

# nodal coordinates:
node 1 0 0; # node#, X, Y
node 2 $MCol 0;
node 3 $LCol 0;

# Single point constraints -- Boundary Conditions
fix 1 1 1 0; # node DX DY RZ
fix 3 0 1 0;

# Define ELEMENTS & SECTIONS -------------------------------------------------------------
set ColSecTag 1; # assign a tag number to the column section
# define section geometry
set diaK6 [expr 6*$mm];
set barArea [expr $pi/4*pow($diaK6,2)]; # area of longitudinal-reinforcement bars M30

# MATERIAL parameters -------------------------------------------------------------------
set IDconcU 1; # material ID tag -- unconfined cover concrete
set IDreinf 2; # material ID tag -- reinforcement

# nominal concrete compressive strength
set fc [expr 25*$MPa]; # CONCRETE Compressive Strength (+Tension, -Compression)

# unconfined concrete
set fc1U [expr -$fc]; # UNCONFINED concrete (todeschini parabolic model), maximum stress
set eps1U -0.002; # strain at maximum strength of unconfined concrete
set Ec [expr 5000*pow($fc,0.5)]; # Concrete Elastic Modulus
set fc2U [expr 0.7*$fc1U]; # ultimate stress
set eps2U -0.0035; # strain at ultimate stress
set lambda 0.2; # ratio between unloading slope at $eps2 and initial slope $Ec (not used here)

# tensile-strength properties
set fct [expr 2.6*$MPa]; # EC2
set Ets [expr $fct/0.002]; # tension softening stiffness
set epsT 0.01; # ATH

# Steel properties-----------
set Fy [expr 500*$MPa]; # STEEL yield stress
set Es [expr 200000*$MPa]; # modulus of steel
set Bs 0.001; # strain-hardening ratio

uniaxialMaterial Steel02 $IDreinf $Fy $Es $Bs; # build reinforcement material
uniaxialMaterial Concrete04 $IDconcU $fc1U $eps1U $eps2U $Ec $fct $epsT; # build concrete material

# FIBER SECTION properties -------------------------------------------------------------
# symmetric section
# y
# ^
# |
# ---------------------
# | | |
# | | |
# | | |
# z <--- | + | H
# | | |
# | o o | | -- cover
# --------------------- -- --
# |-------- B --------|
#
# RC section:
set coverY [expr $HCol/2.0]; # The distance from the section z-axis to the edge of the cover concrete -- outer edge of cover concrete
set coverZ [expr $BCol/2.0]; # The distance from the section y-axis to the edge of the cover concrete -- outer edge of cover concrete
set Y1 [expr $HCol/2 -15*$mm]
set Z1 [expr $BCol/2 -15*$mm]
set nfY 20; # number of fibers for concrete in y-direction
set nfZ 20; # number of fibers for concrete in z-direction
section fiberSec $ColSecTag { # Define the fiber section
#patch quad $matTag $numSubdivIJ $numSubdivJK $yI $zI $yJ $zJ $yK $zK $yL $zL
#layer straight $matTag $numBars $areaBar $yStart $zStart $yEnd $zEnd
patch quadr $IDconcU $nfZ $nfY -$coverY $coverZ -$coverY -$coverZ $coverY -$coverZ $coverY $coverZ; # Define the concrete patch
layer straight $IDreinf 2 $barArea -$Y1 $Z1 -$Y1 $Z1; # Define the reinforcement
}; # end of fibersection definition

# define geometric transformation: performs a linear geometric transformation of beam stiffness and resisting force from the basic system to the global-coordinate system
set ColTransfTag 1; # associate a tag to column transformation
geomTransf Linear $ColTransfTag;

# element connectivity:
set numIntgrPts 5; # number of integration points for force-based element
element nonlinearBeamColumn 1 1 2 $numIntgrPts $ColSecTag $ColTransfTag; # self-explanatory when using variables
element nonlinearBeamColumn 2 2 3 $numIntgrPts $ColSecTag $ColTransfTag;

puts "Model Built"

# Define RECORDERS -------------------------------------------------------------
#recorder Element -file ele1sec1StressStrain.out –time -ele 1 section 1 fiber $y $z <$matID> stressStrain
recorder Node -file Data/1A/Dnode2_1A.out -time -node 2 -dof 2 disp; # displacements of free node
recorder Node -file Data/1A/Forcenode2_1A.out -time -node 2 -dof 2 reaction;
recorder Element -file Data/1A/StressStrain_1A_ConcB.out -time -ele 1 section 5 fiber -$coverY 0.0 $IDconcU stressANDstrain; # stress strain in outermost part (bottom) of concrete near node2
recorder Element -file Data/1A/StressStrain_1A_ConcT.out -time -ele 1 section 5 fiber $coverY 0.0 $IDconcU stressANDstrain; # stress strain in outermost part (top) of concrete near node2
recorder Element -file Data/1A/StressStrain_1A_K6.out -time -ele 1 section 5 fiber -$Y1 $Z1 $IDreinf stressANDstrain; # stress strain in M30

# pushover analysis: load controlled static analysis
constraints Plain; # how it handles boundary conditions
numberer Plain; # renumber dof's to minimize band-width (optimization), if you want to
system BandGeneral; # how to store and solve the system of equations in the analysis
test NormDispIncr 1.0e-6 100 0; # determine if convergence has been achieved at the end of an iteration step
algorithm Newton; # use Newton's solution algorithm: updates tangent stiffness at every iteration
integrator LoadControl 0.01;
#integrator DisplacementControl 2 2 0.25; # determine the next time step for an analysis
analysis Static # define type of analysis static or transient

# define LATERAL load -------------------------------------------------------------
set Pu [expr -30*$kN];

# Lateral load pattern
pattern Plain 1 Linear {
load 2 0 $Pu 0; # node#, FX FY MZ -- representative lateral load at middle node
}

analyze 100; # apply 100 steps of pushover analysis to reach 1.0 X applied load

puts "Done!"
print node 2
wipe
toggi007
Posts: 38
Joined: Mon Jan 09, 2012 3:39 am
Location: Háskóli Íslands

Re: This is crazy, problem with nonlinear beam

Post by toggi007 »

No comments? anyone?
toggi007
Posts: 38
Joined: Mon Jan 09, 2012 3:39 am
Location: Háskóli Íslands

Re: This is crazy, problem with nonlinear beam

Post by toggi007 »

I see that one of the bars is not at the right place, checked and it still has little affect on the "must be wrong" deflections given by opensees.
vesna
Posts: 3033
Joined: Tue May 23, 2006 11:23 am
Location: UC Berkeley

Re: This is crazy, problem with nonlinear beam

Post by vesna »

Why don't you try to assign elastic material to all fibers. If the results you get do not make sense you should check your fiber section definition. If you get reasonable results then your materials for steel and concrete have to be checked.
toggi007
Posts: 38
Joined: Mon Jan 09, 2012 3:39 am
Location: Háskóli Íslands

Re: This is crazy, problem with nonlinear beam

Post by toggi007 »

Thank you for your previous reply, it´s good to know that someone is showing interest.
I have done this before for a different beam, ie. assigned a uniaxialmaterial elastic for the concrete and steel and then run it through the fibersection and finally solved with nonlinearbeamcolumn and pushover. The results from opensees where that at 441 kN load at midspan the deflection are 2.68 mm. However when I do my elastic hand-calculations assuming the presence of steel the maximum deflection at 441kN load is 7.408 mm!.
Still I cannot see an error in Opensees. When I pull out the stress and strains in concrete and steel it looks ok, for my model with with steel02 and concrete04. The bars are yielding at the right stress and strain and so is the concrete. What I would like to see from this particular model that I´m discussing now (which has a beam that is similar to the one above only bigger) are deflections reaching +11 mm for the applied load, as it is now the deflectios reach 8.5 mm for the applied load and thus the system looks much to stiff.
best regard
vesna
Posts: 3033
Joined: Tue May 23, 2006 11:23 am
Location: UC Berkeley

Re: This is crazy, problem with nonlinear beam

Post by vesna »

Since you have results from the lab I would do the following:

1) I would model the beam with several (10-20) displacement-based beam column elements
2) I would use correlational transformation
3) I would model it with elastic materials (subtracting concrete fibers from reinforcing bar locations), using elastic modulus for steel and concrete as determined from the lab tests on coupons and cilinders
4) I would do pushover using elastic elements up to moment at the crack (Mcr) that can be hand calculated
5) compare this results with the experimental results
6) If you see the difference in results I would think that your section is not defined well

After you confirm elastic response you can introduce nonlinear materials.
toggi007
Posts: 38
Joined: Mon Jan 09, 2012 3:39 am
Location: Háskóli Íslands

Re: This is crazy, problem with nonlinear beam

Post by toggi007 »

I want to thank you for your previous replies Vesna, much appreciated.
I´m thinking that the measured modulus of elasticity for concrete must be wrong.
On another note. It seems that when applying gravity before loadcontroled pushover some problems arise when the the gravity is in the direction of pushover. What happens is that the element recorder for the pushover picks up on some initial deflection due to the previously applied gravity and shifts the corresponding load deflection plots by the same amount.
Only way to correct the problem is to apply gravity inside the pushover load pattern. This is then again another problem when using the loadcontroled pushover because when you apply load past the beams critical load only a part of the gravity is applied. This is though not a problem when doing displacement controled pushover. Do you have any thoughts on this matter?
vesna
Posts: 3033
Joined: Tue May 23, 2006 11:23 am
Location: UC Berkeley

Re: This is crazy, problem with nonlinear beam

Post by vesna »

To me it looks reasonable that pushover deflection starts from the ones achieved during gravity load.

If you want to capture nonlinear behavior of the beam you need to use DisplacementControl integrator.
toggi007
Posts: 38
Joined: Mon Jan 09, 2012 3:39 am
Location: Háskóli Íslands

Re: This is crazy, problem with nonlinear beam

Post by toggi007 »

Thank you for all your previous post Vesna :)
Although I´m just doing pushover analysis I´m using steel02 with factor R0 = 18 to have control over the transition from the elastic to the plastic branch as oposed to steel01. Recommended values is R0 between 10 and 20, however the only way to reasonably model my beams is with R0 = 2 or 3? Then when I pull out stress and strains for both R0= 18 and R0 = 3 they are the same? Do you have any thoughts on both the small value of R0 and the element recorder results?

best regards
toggi007
Posts: 38
Joined: Mon Jan 09, 2012 3:39 am
Location: Háskóli Íslands

Re: This is crazy, problem with nonlinear beam

Post by toggi007 »

The recorders are working, I just saved the file in a different folder.
Still I would like to know your thoughts on the small value of R0, see above post?

best regards
vesna
Posts: 3033
Joined: Tue May 23, 2006 11:23 am
Location: UC Berkeley

Re: This is crazy, problem with nonlinear beam

Post by vesna »

R0 of 2 and 3 look too small to me. These small coefficients will initiate transition from elastic to plastic region too early. How did you calibrate your steel material?
toggi007
Posts: 38
Joined: Mon Jan 09, 2012 3:39 am
Location: Háskóli Íslands

Re: This is crazy, problem with nonlinear beam

Post by toggi007 »

My thoughts exactly, however this seems (to me) to be the only way to model these beams. My beams have high ratio of tension steel reinforcement so failure in most of my beams is concrete crushing and because the strains in the steel do not reach high values during yielding the R0 can have considerable effect on the model prior to failure. For R0=18 Mostly the force-deflection diagrams from my model and experiment compare ok-ish through the initial elastic range of the response and from there up to a certain load, there after the experimental deflections increase slightly more while force-deflection "curve" (line) in the Opensees model remains constant. By calibrating the R0 constant to 2.5-ish the force-deflection line takes the shape of my experiment in the higher loads-stages of the model, from where the transition from elastic to plastic branches of the steel takes place. Also with R0 = 18 it is apparent that all the Opensees results reach considerably higher values of ultimate load compared to my hand-calculated values. However with R0 = 2 to 3 the Opensees model fails at more or less the same value as hand-calculated.
These are the relevant parts of the model:

The beam is 552mm high and 305mm wide.
Bar locations are at depths 50mm, 424mm and 488mm
first bar row at depth 50mm has 3xM10 bars (compression), second bar row at 424mm has 2xM25 bars(tension), third bar row at 488mm has 2xM30 bars, and there is a single M30 bar between the the two tension bar rows.

# Steel properties---------------------------------------------------------------------------------------
set Fy [expr 436*$MPa]; # STEEL yield stress
set Es [expr 200000*$MPa-$Ec]; # modulus of steel
set Fy2 [expr 440*$MPa];
set Es2 [expr 210000*$MPa-$Ec];
set Fy3 [expr 315*$MPa];
set Es3 [expr 200000*$MPa-$Ec];
set Bs 0.01; # strain-hardening ratio
set R0 3; # control the transition from elastic to plastic branches
set cR1 0.925; # control the transition from elastic to plastic branches
set cR2 0.15; # control the transition from elastic to plastic branches

uniaxialMaterial Steel02 $IDreinf3 $Fy3 $Es3 $Bs $R0 $cR1 $cR2;
uniaxialMaterial Steel02 $IDreinf2 $Fy2 $Es2 $Bs $R0 $cR1 $cR2;
uniaxialMaterial Steel02 $IDreinf1 $Fy $Es $Bs $R0 $cR1 $cR2;

uniaxialMaterial Concrete04 $IDconcU $fc1U $eps1U $eps2U $Ec $fctU $epsT;
uniaxialMaterial Concrete04 $IDconcC $fc1C $eps1C $eps2C $Ec $fctC $epsT;


# FIBER SECTION properties -------------------------------------------------------------
# symmetric section
# y
# ^
# |
# --------------------- -- --
# | o o o (3)| | -- cover
# | | |
# | | |
# z <--- | + | H
# | | |
# | o o (2)| |
# | o(1) | |
# | o o (1)| | -- cover
# --------------------- -- --
# |-------- B --------|
#
# y
# ^
# |
# ---------------------
# | cover4 |
# |--------Top--------|
# |c| |c|
# |o| |o|
# z <-----|v| core |v| Hsec
# |e| |e|
# |r| |r|
# |2| |3|
# |--------Bot--------|
# | cover1 |
# ---------------------
# Bsec
# RC section:
set coverY [expr $HCol/2.0]; # The distance from the section z-axis to the edge of the cover concrete -- outer edge of cover concrete
set coverZ [expr $BCol/2.0]; # The distance from the section y-axis to the edge of the cover concrete -- outer edge of cover concrete
set Y1 [expr $HCol/2 -64*$mm]; # Bar location
set Y2 [expr $HCol/2 -2*64*$mm]; # Bar location
set Y3 [expr $HCol/2 -50*$mm]; # Bar location
set Z1 [expr 89*$mm]; # Bar location
set Z2 [expr 91.5*$mm]; # Bar location
set Z3 [expr 98.3*$mm]; # Bar location
set diaM30 [expr 29.9*$mm];
set diaD5 [expr 6.4*$mm];
set diaM10 [expr 11.3*$mm];
set coreYbot [expr $coverY-64*$mm+$diaM30/2+$diaD5/2];
set coreYtop [expr $coverY-50*$mm+$diaM10/2+$diaD5/2];
set dc [expr 178+$diaM30+$diaD5];
set coreZ [expr $dc/2];
section fiberSec $ColSecTag {; # Define the fiber section
patch quadr $IDconcU 4 10 -$coverY $coverZ -$coverY -$coverZ -$coreYbot -$coverZ -$coreYbot $coverZ; # unconfined concrete cover 1
patch quadr $IDconcU 4 10 $coreYtop $coverZ $coreYtop -$coverZ $coverY -$coverZ $coverY $coverZ; # unconfined concrete cover 4
patch quadr $IDconcU 4 20 -$coreYbot $coverZ -$coreYbot $coreZ $coreYtop $coreZ $coreYtop $coverZ; # unconfined concrete cover 2
patch quadr $IDconcU 4 20 -$coreYbot -$coreZ -$coreYbot -$coverZ $coreYtop -$coverZ $coreYtop -$coreZ; # unconfined concrete cover 3

patch quadr $IDconcC 4 20 -$coreYbot $coreZ -$coreYbot -$coreZ $coreYtop -$coreZ $coreYtop $coreZ; # Define the concrete core patch

layer straight $IDreinf2 2 $barAreaCol2 -$Y2 $Z2 -$Y2 -$Z2; # layer (2) reinfocement
layer straight $IDreinf1 2 $barAreaCol1 -$Y1 $Z1 -$Y1 -$Z1; # layer (1) reinforcement
layer straight $IDreinf3 3 $barAreaCol3 $Y3 $Z3 $Y3 -$Z3 # layer (3) reinforcement
layer straight $IDreinf1 1 $barAreaCol1 -180 0 -180 0; # layer (1) reinforcement(middle)
}; # end of fibersection definition
vesna
Posts: 3033
Joined: Tue May 23, 2006 11:23 am
Location: UC Berkeley

Re: This is crazy, problem with nonlinear beam

Post by vesna »

If you are calibrating it against your experimental results, for your case it may make sense to use RO of 2.5.
toggi007
Posts: 38
Joined: Mon Jan 09, 2012 3:39 am
Location: Háskóli Íslands

Re: This is crazy, problem with nonlinear beam

Post by toggi007 »

I have a very simple FEM program that can only model simple supported RC beams and it does it perfectly for my beams, seriously wondering if opensees is up to the task? Still can´t see and error in my code... as low values of RO (<10) do not represent behavior of any steel I know, this cannot be right.
toggi007
Posts: 38
Joined: Mon Jan 09, 2012 3:39 am
Location: Háskóli Íslands

Re: This is crazy, problem with nonlinear beam

Post by toggi007 »

Still there must be some error in my code. When modeling smaller beams to pushover data I have recorded the load deflection plot looks very strange.
(almost vertical in the beginning? with something that looks like tension stiffening in experimental results (several of those) that makes up for most of the deflection?, this is more prominent when using dispBeamColumn element)
Would appreciate if you could have a look:
here is simple model for one beam, simple supported, 150mm x 150mm, 1150 mm long, with 2 K6 bars at 135mm depth:

# --------------------------------------------------------------------------------------------------
# fiber section, nonlinearBeamColumn element
#
#
# ^Y
# | set-up
# |
#
# 1------2------3 -->x
# XX 00
# LCol
#
#

# SET UP ----------------------------------------------------------------------------
wipe; # clear memory of all past model definitions
file mkdir Data/1A; # create data directory
model BasicBuilder -ndm 2 -ndf 3; # Define the model builder, ndm=#dimension, ndf=#dofs
source units_si.tcl
puts "units built"

source DisplayModel2D.tcl
source DisplayPlane.tcl
source gravitybeam.tcl

# define GEOMETRY -------------------------------------------------------------
set LCol [expr 1150*$mm];
set MCol [expr $LCol/2];
# define section geometry
set HCol [expr 150*$mm]; # Column Depth
set BCol [expr 150*$mm]; # Column Width
set A [expr $HCol*$BCol];

# nodal coordinates:
set Nrnode 3; # How many elements do you want to model the beam with (here 2 elements)
set elelength [expr $LCol/($Nrnode-1)]
node 1 0 0;
for {set i 2} {$i <= $Nrnode} {incr i 1} {
node $i [expr $elelength*($i-1)] 0;
}

#print node
DisplayModel2D NodeNumbers

# Single point constraints -- Boundary Conditions
fix 1 1 1 0; # node DX DY RZ
fix $Nrnode 0 1 0;

# Define ELEMENTS & SECTIONS -------------------------------------------------------------
set ColSecTag 1; # assign a tag number to the column section

# define section geometry
set diaK6 [expr 6*$mm];
set barArea [expr $pi/4*pow($diaK6,2)]; # area of longitudinal-reinforcement bars M30

# MATERIAL parameters -------------------------------------------------------------------
set IDconcU 1; # material ID tag -- unconfined cover concrete
set IDreinf1 2; # material ID tag -- reinforcement

# nominal concrete compressive strength
set fc [expr -25*$MPa]; # CONCRETE Compressive Strength (+Tension, -Compression)
set Ec [expr 9500*pow(-$fc,0.333)]; # Concrete Elastic Modulus (use 26800 EN-2) vs. 36500

puts "$Ec"

# unconfined concrete
set fc1U [expr $fc]; # UNCONFINED concrete (todeschini parabolic model), maximum stress
set eps1U -0.002; # strain at maximum strength of unconfined concrete
set fc2U [expr 0.2*$fc1U]; # ultimate stress (ATH)
set eps2U -0.0035; # strain at ultimate stress

# tensile-strength properties
set fct [expr 2.6*$MPa]; # tensile strength EN-1992
set epsT 0.001; # ATH

# Steel properties-----------
set Fy [expr 550*$MPa]; # STEEL yield stress
set Es [expr 200000*$MPa-$Ec]; # modulus of steel
set Bs 0.01; # strain-hardening ratio
set R0 10; # control the transition from elastic to plastic branches
set cR1 0.925; # control the transition from elastic to plastic branches
set cR2 0.15; # control the transition from elastic to plastic branches

uniaxialMaterial Steel02 $IDreinf1 $Fy $Es $Bs $R0 $cR1 $cR2;
uniaxialMaterial Concrete04 $IDconcU $fc1U $eps1U $eps2U $Ec $fct $epsT;

# FIBER SECTION properties -------------------------------------------------------------
# symmetric section
# y
# ^
# |
# --------------------- --
# | | |
# | | |
# | | |
# z <--- | + | H
# | | |
# | | |
# | | |
# | o o (1)| |
# --------------------- --
# |-------- B --------|
#
# RC section:
set coverY [expr $HCol/2.0]; # The distance from the section z-axis to the edge of the cover concrete -- outer edge of cover concrete
set coverZ [expr $BCol/2.0]; # The distance from the section y-axis to the edge of the cover concrete -- outer edge of cover concrete
set Y1 [expr $HCol/2 -15*$mm]
set Z1 [expr $BCol/2 -15*$mm]
section fiberSec $ColSecTag {; # Define the fiber section
#patch quad $matTag $numSubdivIJ $numSubdivJK $yI $zI $yJ $zJ $yK $zK $yL $zL
#layer straight $matTag $numBars $areaBar $yStart $zStart $yEnd $zEnd
patch quadr $IDconcU 4 20 -$coverY $coverZ -$coverY -$coverZ $coverY -$coverZ $coverY $coverZ; # Define the concrete patch
layer straight $IDreinf1 3 $barArea -$Y1 $Z1 -$Y1 -$Z1; # layer (1) reinforcement
}; # end of fibersection definition

puts "fiber built"

# define geometric transformation---------------------------------------------------------------
set ColTransfTag 1; # associate a tag to column transformation
geomTransf Corotational $ColTransfTag;

# element connectivity--------------------------------------------------------------------------
set numIntgrPts 10; # number of integration points
set Nrele [expr $Nrnode-1]

set node [expr $Nrele/2 + 1]; # The Middle node is the one to watch
puts "node = $node"

for {set k 1} {$k <= $Nrele} {incr k 1} {
element nonlinearBeamColumn $k $k [expr $k+1] $numIntgrPts $ColSecTag $ColTransfTag;
}

recorder Node -file Data/1A/X1A_Nonlinear.out -time -node $node -dof 2 disp;

puts "Model Built"

# define LATERAL load -------------------------------------------------------------
set Pu [expr -20*$kN];

# define Gravity # incorporate gravity inside the pushover load pattern for displacement controled only!
set weight [expr 25*$kN/$m3];
set distmass [expr $weight*$BCol*$HCol];

# Lateral load pattern
pattern Plain 1 Linear {
load $node 0 $Pu 0; # node#, FX FY MZ -- representative lateral load at middle node
for {set i 1} {$i <= $Nrele} {incr i 1} {
eleLoad -ele $i -type -beamUniform -$distmass; # uniformly distributed weight of beam
}
}

# pushover analysis: load controlled static analysis
constraints Plain; # how it handles boundary conditions
numberer Plain; # renumber dof's to minimize band-width (optimization), if you want to
system BandGeneral; # how to store and solve the system of equations in the analysis
test NormDispIncr 1.0e-8 6; # determine if convergence has been achieved at the end of an iteration step
algorithm Newton; # use Newton's solution algorithm: updates tangent stiffness at every iteration
#integrator LoadControl 0.01;
integrator DisplacementControl $node 2 -0.025; # determine the next time step for an analysis
analysis Static # define type of analysis static or transient

analyze 1000; # apply 100 steps of pushover analysis

puts "Done!"

print node $node; # middle node

wipe
Post Reply