example: moment-curvature analysis of section -- cyclic

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, Moderators

example: moment-curvature analysis of section -- cyclic

Postby silvia » Wed Nov 23, 2005 1:59 pm

The following is an example of a moment-curvature analysis on a section. It applies a cyclic 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 IDdof 3

# Define element
element zeroLengthSection 9001 9001 9002 $secTag

# Create recorder
recorder Node -file $dataDir/section$secTag.out -time -node 9002 -dof $IDdof 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 up displacement cycles


proc procGenPeaks {Dmax Nsteps } {; # this procedure generates displacement steps for a specified Dmax displacement peak
set outFileID [open data/tmpDsteps.tcl w]
puts $outFileID "set iDstep { "
set Disp 0.
puts $outFileID $Disp
set dx [expr $Dmax/$Nsteps]
for {set i 1} {$i <= $Nsteps} {incr i 1} {; # zero to one
set Disp [expr $Disp + $dx]
puts $outFileID $Disp
}
for {set i 1} {$i <= [expr 2*$Nsteps]} {incr i 1} {; # one to minus one
set Disp [expr $Disp - $dx]
puts $outFileID $Disp
}
for {set i 1} {$i <= $Nsteps} {incr i 1} {; # minus one to zero
set Disp [expr $Disp + $dx]
puts $outFileID $Disp
}

puts $outFileID " }"
close $outFileID
source data/tmpDsteps.tcl
return $iDstep
}


# cyclic history peaks
set IDctrlNode 9002
set iDmaxCycl "[expr 1e-6/$in] [expr 5.e-6/$in] [expr 1e-5/$in] [expr 3.e-5/$in] "

foreach Dmax $iDmaxCycl {
set iDstep [procGenPeaks $Dmax [set Nsteps 10]]
for {set i 1} {$i < 3} {incr i 1} {
set zeroD 0
set D0 0.0
foreach Dstep $iDstep {
set D1 $Dstep
set Dincr [expr $D1 - $D0]
integrator DisplacementControl $IDctrlNode $IDdof $Dincr 1 $Dincr $Dincr
set ok [analyze 1]
if {$ok != 0} {
set zeroD 1
set stopD [nodeDisp $IDctrlNode $IDdof]
set backD [expr -$stopD]
integrator DisplacementControl $IDctrlNode $IDdof $backD 1 $backD $backD
set ok [analyze 1]
break
}
set D0 $D1
}
}; # end i
}; # end of iDmaxCycl


puts "Done with moment-curvature cyclic analysis"

please, see the previous post for the additional script.
Silvia Mazzoni, PhD
Structural Consultant
Degenkolb Engineers
235 Montgomery Street, Suite 500
San Francisco, CA. 94104
silvia
 
Posts: 3912
Joined: Tue Jan 11, 2005 7:44 am
Location: Degenkolb Engineers

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

Postby papaloo » Mon Nov 10, 2014 8:15 am

Dear Vesna
Hi
I tried the command you have put for moment-curvature analysis of section -- cyclic. I have 2 questions. Would you please help me with them?
1) In unloading phase, the curve becomes linear. What can be the main reason?
2) How can I get hysteretic loops for moment-curvature? The command in the forum gives only one loop.

Mohsen
papaloo
 
Posts: 15
Joined: Fri Apr 08, 2011 8:41 am
Location: Istanbul Technical University

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

Postby fmk » Fri Dec 05, 2014 9:24 am

1. material properties and how far you are pusing it.
2. it gives 3 loops: for {set i 1} {$i < 3} {incr i 1} {

i suggest you understand the script a little bit better,
fmk
Site Admin
 
Posts: 5727
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley

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

Postby greatheart » Wed Dec 16, 2015 2:41 am

silvia wrote:
> The following is an example of a moment-curvature analysis on a section. It
> applies a cyclic load. It requires only one external file.
> Please modify this script for your needs:
> [quote]#
> --------------------------------------------------------------------------------------------------
> # 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 IDdof 3
>
> # Define element
> element zeroLengthSection 9001 9001 9002 $secTag
>
> # Create recorder
> recorder Node -file $dataDir/section$secTag.out -time -node 9002 -dof
> $IDdof 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 up displacement cycles
>
>
> proc procGenPeaks {Dmax Nsteps } {; # this procedure generates
> displacement steps for a specified Dmax displacement peak
> set outFileID [open data/tmpDsteps.tcl w]
> puts $outFileID "set iDstep { "
> set Disp 0.
> puts $outFileID $Disp
> set dx [expr $Dmax/$Nsteps]
> for {set i 1} {$i <= $Nsteps} {incr i 1} {; # zero to one
> set Disp [expr $Disp + $dx]
> puts $outFileID $Disp
> }
> for {set i 1} {$i <= [expr 2*$Nsteps]} {incr i 1} {; # one to minus one
> set Disp [expr $Disp - $dx]
> puts $outFileID $Disp
> }
> for {set i 1} {$i <= $Nsteps} {incr i 1} {; # minus one to zero
> set Disp [expr $Disp + $dx]
> puts $outFileID $Disp
> }
>
> puts $outFileID " }"
> close $outFileID
> source data/tmpDsteps.tcl
> return $iDstep
> }
>
>
> # cyclic history peaks
> set IDctrlNode 9002
> set iDmaxCycl "[expr 1e-6/$in] [expr 5.e-6/$in] [expr 1e-5/$in] [expr
> 3.e-5/$in] "
>
> foreach Dmax $iDmaxCycl {
> set iDstep [procGenPeaks $Dmax [set Nsteps 10]]
> for {set i 1} {$i < 3} {incr i 1} {
> set zeroD 0
> set D0 0.0
> foreach Dstep $iDstep {
> set D1 $Dstep
> set Dincr [expr $D1 - $D0]
> integrator DisplacementControl $IDctrlNode $IDdof $Dincr 1 $Dincr
> $Dincr
> set ok [analyze 1]
> if {$ok != 0} {
> set zeroD 1
> set stopD [nodeDisp $IDctrlNode $IDdof]
> set backD [expr -$stopD]
> integrator DisplacementControl $IDctrlNode $IDdof $backD 1 $backD
> $backD
> set ok [analyze 1]
> break
> }
> set D0 $D1
> }
> }; # end i
> }; # end of iDmaxCycl
>
>
> puts "Done with moment-curvature cyclic analysis"
> [/quote]
> please, see the previous post for the additional script.
greatheart
 
Posts: 1
Joined: Wed Dec 16, 2015 12:43 am
Location: Nanjing Tech University


Return to Useful Scripts.

Who is online

Users browsing this forum: No registered users and 2 guests