example: moment-curvature analysis of section -- pushover

If you have a script you think might be useful to others post it
here. Hopefully we will be able to get the most useful of these incorporated in the manuals.

Moderators: silvia, selimgunay, Moderators

Post Reply
silvia
Posts: 3912
Joined: Tue Jan 11, 2005 7:44 am
Location: Degenkolb Engineers
Contact:

example: moment-curvature analysis of section -- pushover

Post by silvia » Wed Nov 23, 2005 1:57 pm

The following is an example of a moment-curvature analysis on a section. It applies a monotonic load. It requires only one external file.
Please modify this script for your needs:
# --------------------------------------------------------------------------------------------------
# ExampleMomCurv.tcl:
# by Silvia Mazzoni, 2005
# Moment-Curvature Analysis of various columns sections
#
#
#
wipe; # clear memory of all past model definitions

# create data directory
set dataDir data/momcurv
file mkdir $dataDir; # create data directory

# ------------------------------------------------------------------------------------------------------------------------------------------------------------- unit definition
# UNITS.tcl -- define system of units used in the tcl script
# OpenSees output will be in the basic units
set in 1.; # define basic units
set sec 1.; # define basic units
set kip 1.; # define basic units
set ft [expr 12.*$in]; # define engineering units
set ksi [expr $kip/pow($in,2)];
set psi [expr $ksi/1000.];
set in2 [expr $in*$in]; # inch^2
set in4 [expr $in*$in*$in*$in]; # inch^4
set PI [expr 2*asin(1.0)]; # define constants
set g [expr 32.2*$ft/pow($sec,2)]; # gravitational acceleration
set Ubig 1.e10; # a really large number
set Usmall [expr 1/$Ubig]; # a really small number
set cm [expr $in/2.54]; # SI centimeter unit
# -------------------------------------------------------------------------------------------------------------------------end of unit definition

set secTag 1; # assign tag to column section

# set up parameters for the model builder
set ndm 2; # 2-D problem
set ndf 3;
model BasicBuilder -ndm $ndm -ndf $ndf

# define element geometry
set Lcol [expr 36*$ft]; # column length
set Weight [expr 1000.*$kip]; # superstructure weight
# calculated parameters
set Pdl $Weight; # nodal dead-load weight

# Reinforced-Concrete MATERIAL Properties
# nominal concrete compressive strength
set fc [expr -5.5*$ksi]; # CONCRETE Compressive Strength, ksi (+Tension, -Compression)
# confined concrete
set Ec [expr 57*$ksi*sqrt(-$fc/$psi)]; # Concrete Elastic Modulus
set fc1C [expr 1.26394*$fc]; # CONFINED concrete (mander model), maximum stress
set eps1C [expr 2.*$fc1C/$Ec]; # strain at maximum stress
set fc2C $fc; # ultimate stress
set eps2C [expr 5*$eps1C]; # strain at ultimate stress
# unconfined concrete
set fc1U $fc; # UNCONFINED concrete (todeschini parabolic model), maximum stress
set eps1U -0.003; # strain at maximum stress
set fc2U [expr 0.1*$fc]; # ultimate stress
set eps2U -0.006; # strain at ultimate stress
# concrete02 material properties:
set lambda 0.1 ; # ratio between unloading slope at $epscu and initial slope
set ftC [expr -$fc1C/10.]; # tensile strength +tension
set ftU [expr -$fc1U/10.]; # tensile strength +tension
set Ets [expr $Ec/10.]; # tension softening stiffness

# reinforcing steel
set Fy [expr 70.*$ksi]; # STEEL yield stress
set Es [expr 29000.*$ksi]; # modulus of steel
set epsY [expr $Fy/$Es]; # steel yield strain
set Fy1 [expr 95.*$ksi]; # steel stress post-yield
set epsY1 0.03; # steel strain post-yield
set Fu [expr 112.*$ksi]; # ultimate stress of steel
set epsU 0.08; # ultimate strain of steel
set Bs [expr ($Fu-$Fy)/($epsU-$epsY)/$Es]; # post-yield stiffness ratio of steel
set Bs [expr ($Fy1-$Fy)/($epsY1-$epsY)/$Es]; # post-yield stiffness ratio of steel
set pinchX 1.0; # pinching parameter for hysteretic model
set pinchY 1.0; # pinching parameter for hysteretic model
set damage1 0.0; # damage parameter for hysteretic model
set damage2 0.0; # damage parameter for hysteretic model
set betaMUsteel 0.0; # degraded unloading stiffness for hysteretic material based on MU^(-beta)

# associate tags to library of materials
set IDreinf 1
set IDconcCore 2
set IDconcCover 3

# set up library of materials
uniaxialMaterial Concrete02 $IDconcCore $fc1C $eps1C $fc2C $eps2C $lambda $ftC $Ets; # Core concrete (confined)
uniaxialMaterial Concrete02 $IDconcCover $fc1U $eps1U $fc2U $eps2U $lambda $ftU $Ets; # Cover concrete (unconfined)
uniaxialMaterial Hysteretic $IDreinf $Fy $epsY $Fy1 $epsY1 $Fu $epsU -$Fy -$epsY -$Fy1 -$epsY1 -$Fu -$epsU $pinchX $pinchY $damage1 $damage2 $betaMUsteel ; # hysteritic reinforcemnet model

# CONCRETE SECTIONS properties
set Dconc [expr 3.*$ft]; # circular-concumn Diameter
set coverR [expr 2*$in]; # circular-RC-column cover
set numBars 12; # number of longitudinal-reinforcement bars -- same numBars top and bottom
set barArea [expr 1.0*$in*$in]; # longitudinal-reinforcement bar area
# calculated geometry parameters
set AsConc [expr $numBars*$barArea]; # longitudinal-steel area
set Rconc [expr $Dconc/2]; # circular-column Radius -- worth calculating
set IzConc [expr $PI*pow($Rconc,4)/4]; # Circular-column gross moment of inertia, uncracked
set AgConc [expr $PI*pow($Rconc,2)]; # circular-column cross-sectional area
set barRatio [expr $AsConc/$AgConc];

set nfCoreR 16; # number of fibers in the core patch in the radial direction
set nfCoreT 16; # number of fibers in the core patch in the tangential direction
set nfCoverR 2; # number of fibers in the cover patches with long sides in the radial direction
set nfCoverT 16; # number of fibers in the cover patches with long sides in the tangential direction
set ro 0.0; # hollow-center diameter of column section

source LibRCcircSection.tcl; # source tcl file with script definig procedure
RCcircSection $secTag $ro $Rconc $coverR $IDconcCore $IDconcCover $IDreinf $numBars $barArea $nfCoreR $nfCoreT $nfCoverR $nfCoverT


# perform moment-curvature

# Define two nodes at (0,0)
node 9001 0.0 0.0 0.0
node 9002 0.0 0.0 0.0
# Fix all degrees of freedom except axial and bending
fix 9001 1 1 1
fix 9002 0 1 0
set dofTag 3

# Define element
element zeroLengthSection 9001 9001 9002 $secTag

# Create recorder
recorder Node -file $dataDir/section$secTag.out -time -node 9002 -dof $dofTag disp

# Define constant axial load
pattern Plain 9001 Linear {
load 9002 $Pdl 0.0 0.0 0.0 0.0 0.0
}


# Define analysis parameters
constraints Plain
numberer Plain
system SparseGeneral -piv; # Overkill, but may need the pivoting!
test NormUnbalance 1.0e-9 10
algorithm Newton
integrator LoadControl 0.0
analysis Static

# Do one analysis for constant axial load
analyze 1
loadConst -time 0.0



# Define reference moment
pattern Plain 9002 Linear {
load 9002 0.0 0.0 1.0
}

set maxK [expr 3e-5/$in]
set numIncr 100
# Compute curvature increment
set dK [expr $maxK/$numIncr]

# Use displacement control at node 9002 for section analysis
integrator DisplacementControl 9002 $dofTag $dK 1 $dK $dK

# Do the section analysis
analyze $numIncr


puts "Done with moment-curvature push-over analysis"
LibRCcircSection.tcl:
#---------------------------------------------------------------------
# RCcircSection.tcl:
# Define a procedure which generates a circular reinforced concrete section
# with one layer of steel evenly distributed around the perimeter and a confined core.
# confined core.
# by: Michael H. Scott, 2003
#
# Formal arguments
# id - tag for the section that is generated by this procedure
# ri - inner radius of the section
# ro - overall (outer) radius of the section
# cover - cover thickness
# coreID - material tag for the core patch
# coverID - material tag for the cover patches
# steelID - material tag for the reinforcing steel
# numBars - number of reinforcing bars around the section perimeter
# barArea - cross-sectional area of each reinforcing bar
# nfCoreR - number of radial divisions in the core (number of "rings")
# nfCoreT - number of theta divisions in the core (number of "wedges")
# nfCoverR - number of radial divisions in the cover
# nfCoverT - number of theta divisions in the cover
#
# Notes
# The center of the reinforcing bars are placed at the inner radius
# The core concrete ends at the inner radius (same as reinforcing bars)
# The reinforcing bars are all the same size
# The center of the section is at (0,0) in the local axis system
# Zero degrees is along section y-axis
#
proc RCcircSection {id ri ro cover coreID coverID steelID numBars barArea nfCoreR nfCoreT nfCoverR nfCoverT} {

# Define the fiber section
section fiberSec $id {

# Core radius
set rc [expr $ro-$cover]
# Define the core patch
patch circ $coreID $nfCoreT $nfCoreR 0 0 $ri $rc 0 360
# Define the cover patch
patch circ $coverID $nfCoverT $nfCoverR 0 0 $rc $ro 0 360
if {$numBars <= 0} {
return
}

# Determine angle increment between bars
set theta [expr 360.0/$numBars]

# Define the reinforcing layer
layer circ $steelID $numBars $barArea 0 0 $rc $theta 360
}

}
Silvia Mazzoni, PhD
Structural Consultant
Degenkolb Engineers
235 Montgomery Street, Suite 500
San Francisco, CA. 94104

Rahathussain
Posts: 1
Joined: Mon Dec 02, 2019 9:22 pm

Re: example: moment-curvature analysis of section -- pushover

Post by Rahathussain » Wed Apr 01, 2020 4:11 am

OpenSees > source new.tcl
too many nested evaluations (infinite loop?)

Post Reply