Previous Topic

Next Topic

Book Contents

Variables and Units

The authors highly recommend that the user define variables and use these variables for the input commands. Variables can be defined using the Tcl "set" command:

set Radius 5; # define radius of section

set Diameter [expr $Radius/2.]; # define section diameter

Therefore, it is recommended that the user define all material and geometric properties, as variables:

set fc -5000;

set fy 60000;

Because OpenSees does not use internal units, the user must keep track of the types of units being used. For example, the user must define all length units in either inches or meters, etc., consistently throughout.

The Tcl feature of being able to handle variables enables the user to define units as variables, and hence use them in building the model. Here is an example:

First of all, the basic units need to be defined. The OpenSees output will be in these units:

set in 1.; # define basic unit -- length

set sec 1.; # define basic unit -- time

set kip 1.; # define basic unit -- weight (or define force, but not both)

The basic units must be independent of each other. Once they have been defined, additional units that are made up of these basic units can be defined:

set ksi [expr $kip/pow($in,2)]; # define engineering units

set psi [expr $ksi/1000.];

set ft [expr 12.*$in];

It is a good idea to define constants at the same time that units are defined:

set g [expr 32.2*$ft/pow($sec,2)]; # gravitational acceleration

set PI [expr 2*asin(1.0)]; # define constants

set U 1.e10; # a really large number

set u [expr 1/$U]; # a really small number

Once the units have been defined, model variables can be defined in terms of these units and, hence, they don't all have to be defined in the basic units:

set fc [expr -5500*$psi]; # CONCRETE Compressive Strength, ksi (+Tension, -Compression)

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

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

set Es [expr 29000.*$ksi]; # modulus of steel

set epsY [expr $Fy/$Es]; # steel yield strain

It is also a good idea to use variables for IDtags of materials, sections, elements, etc. This is done to ensure that the same ID tag is not used when defining the input. Also, it makes it easier in writing the input to use a variable name that makes sense. Here is an example:

# set up parameters for column section and element definition

set IDcore 1; # ID tag for core concrete

set IDcover 2; # ID tag for cover concrete

set IDsteel 3; # ID tag for steel

For the example structural model, the following variables need to be defined:

# define GEOMETRY variables

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

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

set GrhoCol 0.015; # column longitudinal-steel ratio

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

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

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

set cover [expr 6*$in]; # column cover width

set G $U; # Torsional stiffness Modulus

set J 1.; # Torsional stiffness of section

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

# define COLUMN REINFORCEMENT variables

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

# define GRAVITY variables

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

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

# define DAMPING variables from $xDamp --SDOF system, use stiffness proportional damping only

set xDamp 0.02; # modal damping ratio

# ------ set analysis variables

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

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

set gamma 0.5; # gamma value for newmark integration

set beta 0.25; # beta value for newmark integration

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 50.*$sec]; # maximum duration of ground-motion analysis

Previous Topic

Next Topic