Previous Topic

Next Topic

...Define Variables and Parameters

In the Tcl scripting language variables may be used to represent numbers. Once defined, these variables can be use instead of numbers in Tcl and OpenSees commands. When they are being recalled, the variables are precedented by the symbol $. If this symbol is not used, the variable name is interpreted as a string command and an error may result.

A few examples are given:

MATERIAL PARAMETERS:

# -----MaterialParameters.tcl-------------------------------------------------------

set fc [expr -4.0*$ksi]; # nominal compressive strength of concrete

set Ec [expr 57*$ksi*sqrt(-$fc/$psi)]; # Concrete Elastic Modulus

set fc1C [expr 1.26394*$fc]; # CONFINED concrete (mander model), max stress

set eps1C [expr 2.*$fc1C/$Ec]; # strain at maximum stress

set fc2C $fc; # ultimate stress

set eps2C [expr 2.*$fc2C/$Ec]; # strain at ultimate stress

set fc1U $fc; # UNCONFINED concrete (parabolic model), max 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

set Fy [expr 70.*$ksi]; # STEEL yield stress

set Es [expr 29000.*$ksi]; # elastic 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 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)

set betaMUjoint 0.0; # degraded unloading stiffness for hysteretic material based on MU^(-beta) -- timoshenko value of 0.5

set betaMUph 0.0; # degraded unloading stiffness for hysteretic material based on MU^(-beta) -- timoshenko value of 0.5

set G $U; # Torsional stiffness Modulus

set J 1.; # Torsional stiffness of section, place here just to keep with G

set GJ [expr $G*$J]; # Torsional stiffness

ELEMENT PARAMETERS:

# -----ElementParameters.tcl----------------------------------------------------

set Hcol [expr 5.*$ft]; # column diameter

set Lcol [expr 36*$ft]; # column length

set Hbeam [expr 8.*$ft]; # beam depth

set Lbeam [expr 36.*$ft]; # beam length

set GrhoCol 0.0125; # column longitudinal-steel ratio

set Weight [expr 2000.*$kip]; # superstructure weight

set Bbeam $Hcol; # beam width

set Rcol [expr $Hcol/2]; # COLUMN radius

set Acol [expr $PI*pow($Rcol,2)]; # column cross-sectional area

set cover [expr $Hcol/15]; # column cover width

set IgCol [expr $PI*pow($Rcol,4)/4]; # column gross moment of inertia, uncracked

set IyCol $IgCol; # elastic-column properties

set IzCol $IgCol; # elastic-column properties

set IzBeam [expr $Bbeam*pow($Hbeam,3)/12]; # beam gross moment of inertia, about horizontal Z-axis

set IyBeam [expr $Hbeam*pow($Bbeam,3)/12]; # beam gross moment of inertia, about the vertical Y-axis

set Abeam [expr $Hbeam*$Bbeam*10000]; # beam cross-sectional area, make it very very stiff

# define COLUMN section parameters

set NbCol 20; # number of column longitudinal-reinforcement bars

set AsCol [expr $GrhoCol*$Acol]; # total steel area in column section

set AbCol [expr $AsCol/$NbCol]; # bar area of column longitudinal reinforcement

set riCol 0.0; # inner radius of column section

set roCol $Rcol; # outer radius of column section

set IDcore 1; # ID tag for core concrete

set IDcover 2; # ID tag for cover concrete

set IDsteel 3; # ID tag for steel

set nfCoreR 8; # number of radial fibers in core

set nfCoreT 16; # number of tangential fibers in core

set nfCoverR 2; # number of radial fibers in cover

set nfCoverT 16; # number of tangential fibers in cover

set IDcolFlex 2; # ID tag for column section in flexure, before aggragating torsion

set IDcolTors 10; # ID tag for column section in torsion

set IDcolSec 1; # ID tag for column section

set IDcolTrans 1; # ID tag for column transformation, defining element normal

set IDbeamTrans 2; # ID tag for beam transformation, defining element normal

set np 5; # Number of integration points

GRAVITY PARAMETERS:

# -----GravityParameters.tcl----------------------------------------------------

# define GRAVITY paramters

set Pdl [expr $Weight/2]; # gravity axial load per column

set Wbeam [expr $Weight/$Lbeam]; # gravity dead load distributed along beam length

set Mdl [expr $Wbeam*pow($Lbeam,2)/12]; # nodal moment due to distributed dl

set Mass [expr $Weight/$g]; # mass of superstructure

set Mnode [expr $Mass/2]; # nodal mass for each column joint

ANALYSIS PARAMETERS:

# -----AnalysisParameters.tcl----------------------------------------------------

set DxPush [expr 0.1*$in]; # Displacement increment for pushover analysis

set DmaxPush [expr 0.05*$Lcol]; # maximum displamcement for pushover analysis

set DtAnalysis [expr 0.005*$sec];# time-step Dt for lateral analysis

set DtGround [expr 0.02*$sec]; # time-step Dt for input grond motion

set TmaxGround [expr 35 *$sec]; # maximum duration of ground-motion analysis

set gamma 0.5; # gamma value for newmark integration

set beta 0.25 # beta value for newmark integration