Time History Analysis of a 2D Elastic Cantilever Column: Difference between revisions

From OpenSeesWiki
Jump to navigation Jump to search
(Created page with 'This page is under construction... Example Provided by: <span style="color:blue"> Vesna Terzic, UC Berkeley</span> ---- This example demonstrates how to perform time hystory a...')
 
No edit summary
 
(94 intermediate revisions by the same user not shown)
Line 1: Line 1:
This page is under construction...
Example Provided by: <span style="color:blue"> Vesna Terzic, UC Berkeley</span>
Example Provided by: <span style="color:blue"> Vesna Terzic, UC Berkeley</span>


----
----


This example demonstrates how to perform time hystory analysis of a 2D elastic cantilever column. Idealized two-storey shear frame (Example 10.4 from "Dynamic of Structures" book by Professor Anil K. Chopra) is used for this purpose. In this idealization beams are rigid in flexure, axial deformation of beams and columns are neglected, and the effect of axial force on the stiffness of the columns is neglected. Geometry and material characteristics of the frame structure are shown in Figure 1. Node and element numbering is given in Figure 2.
This example demonstrates how to perform time history analysis of a 2D elastic reinforced concrete cantilever column with a gravity load included in the analysis. The column will be exposed only to horizontal component of ground motion. This example is a tutorial for the slightly modified example Ex1a.Canti2D.EQ.tcl (given in the [[Examples Manual|examples manual]]) and is intended to help OpenSees beginners get started. Geometry of the cantilever column, node and element numbering are shown in the figure below.


----
----
|-
|-
| style="color:#000;" | <div>
[[File:Example1a_EQ.GIF|link=OpenSees Example 1a. 2D Elastic Cantilever Column]]
[[File:Example1a_EQ.GIF|link=OpenSees Example 1a. 2D Elastic Cantilever Column]]
----   
----   


[[Image:ShearFrame5.PNG|link=Eigen analysis of a two-storey shear frame]]


== Instructions on how to run this example ==
== Instructions on how to run this example (for Windows users) ==


To execute this ananlysis in OpenSees download this file: [[Media:EigenAnal_twoStoreyShearFrame7.tcl|EigenAnal_twoStoreyShearFrame.tcl]]
To execute this ananlysis in OpenSees the user has to download these files:
*[[Media:Ex1a.Canti2D.EQ.modif.tcl|Ex1a.Canti2D.EQ.modif.tcl]]
*[[Media:A10000.tcl|A10000.tcl]] (ground-motion file)


To run this example, place the OpenSees.exe to the same directory with the downloaded file. By double cliking on OpenSees.exe the OpenSees interpreter will pop out. To run the analysis the user sholud type "source EigenAnal_twoStoreyShearFrame7.tcl" in OpenSees interpreter and hit enter. To create output files of eigenvectors (stored in directory "modes") the user has to exit OpenSees interpreter by typing "exit".
 
Place Ex1a.Canti2D.EQ.tcl and A10000.tcl file in the same folder with the OpenSees.exe. By double clicking on OpenSees.exe the OpenSees interpreter will pop out. To run the analysis the user should type:
<pre style="width:650px">
      source Ex1a.Canti2D.EQ.modif.tcl
</pre>
and hit enter.  


== Create the model ==
== Create the model ==


Spatial dimension of the model and number of degrees-of-freedom (DOF) at nodes are defined using [[model command|model]] command. In this example we have 2D model with 3 DOFs at each node. This is defined in the following way:
Before creating the model it is advised to call [[Wipe Command|wipe]] command to destroy all previously constructed objects, i.e. all previously defined components of the model, all previously defined components of the analysis and all previously defined recorders.
 
The model of a structural system is created in the following way:
 
1. Spatial dimension of the model (NDM) and number of degrees-of-freedom (DOF) at nodes are defined using [[model command|model]] command.
 
2. Coordinates of the nodes are defined using [[node command|node]] command. At this point the user has to choose basic units (e.g., kip, in., sec) and remain consistent while creating the model.
 
3. If dynamic (transient) analysis is performed nodal mass is assigned using either [[node command|node]] or [[Mass Command|mass]] command. A mass has to be assigned to each degree of freedom.
 
4. The boundary conditions are defined using using single-point constraint command [[fix command|fix]]. For nodes that have some fixity, constraints have to be defined at all degrees of freedom (0 if unconstrained (or free), 1 if constrained (or fixed)). Completely free nodes do not have to be defined.
 
5. Before element is defined, the geometric transformation of the element has to be defined using [[Geometric Transformation Command|geometric transformation]] command. This command transforms beam element stiffness and resisting force from the basic system to the global-coordinate system. Three types of geometric transformation are available in OpenSees: [[Linear Transformation|Linear Transformation]], [[PDelta Transformation|PDelta Transformation]], and [[Corotational Transformation|Corotational Transformation]]. In a 2D problem, element orientation does not need to be considered, and can be same for all elements.
   
6. The elements are to be defined using one of the elements available in OpenSees. For the purpose of this example [[Elastic Beam Column Element|Elastic Beam Column Element]] will be used. Different types of elements require different additional commands for their definition.
 
 
For the given example, steps from 1 to 6 are explained below. The link to command description is provided for each command so that a user can see the definition of all the arguments that the command invokes. 
 
1. First we have to define the [[model command|model]] builder. The cantilever column is a 2D model with 3 DOFs at each node. Thus, spatial dimension of the model (NDM) is 2 and number of degrees-of-freedom (ndf) is 3. This is defined in the following way:


<pre style="background:yellow;color:black;width:650px">
<pre style="background:yellow;color:black;width:650px">
Line 29: Line 53:
</pre>  
</pre>  


Note: geometry, mass, and material characteristics are assigned to variables  that correspond to the ones shown in Figure 1 (e.g., the height of the column is set to be 144 in. and assigned to variable h; the value of the height can be accessed by $h).   
2. The column has two nodes, labeled 1 and 2 (as shown in the Figure above). Node 1 has coordinates (0,0) and node 2 has coordinates (0,432) in the global coordinate system (x,y). The basic units chosen to build the model are: kip, in, sec. Note: y coordinate for node 2 is 36*12=432 in.  


Nodes of the structure (Figure 2) are defined using the [[node command|node]] command:
Nodes are defined using the [[node command|node]] command:
<pre style="background:yellow;color:black;width:650px">
<pre style="background:yellow;color:black;width:650px">
node 1  0.  0. ;
node 1  0.  0.  
node 2   $L  0. ;
node 2  0.  432.  
node 3   0.  $h ;
node 4  $L  $h ;
node 5  0. [expr 2*$h];
node 6  $L  [expr 2*$h];
</pre>
</pre>


The boundary conditions are defined next using single-point constraint command [[fix command|fix]]. In this example nodes 1 and 2 are fully fixed at all three DOFs:
3. The cantilever column is constrained (fixed) at the node 1 in all three DOFs (two translational and one rotation). This boundary condition is defined with [[fix command|fix]] command.  


<pre style="background:yellow;color:black;width:650px">
<pre style="background:yellow;color:black;width:650px">
fix 1 1 1 1;
fix 1 1 1 1
fix 2 1 1 1;
</pre>  
</pre>  


Masses are assigned  at nodes 3, 4, 5, and 6 using [[Mass Command|mass]] command. Since the considered shear frame system has only two degrees of freedom (displacements in x at the 1st and the 2nd storey), the masses have to be assigned in x direction only.  
4. Mass is assigned  at node 2 using [[Mass Command|mass]] command. Since transient analysis is going to be performed for one component of ground motion (horizontal component - x direction) the mass is to be assigned in x direction. The mass is defined as Weight/g=2000/386=5.18. The vertical and rotational mass are set to zero. 


<pre style="background:yellow;color:black;width:650px">
<pre style="background:yellow;color:black;width:650px">
mass 3 $m 0. 0. ;
mass 2 5.18 0. 0.
mass 4 $m 0. 0. ;
mass 5 [expr $m/2.] 0. 0. ;
mass 6 [expr $m/2.] 0. 0. ;
</pre>
</pre>


The [[Geometric Transformation Command|geometric transformation]] with id tag 1 is defined to be linear.
5. The [[Geometric Transformation Command|geometric transformation]] with id tag 1 is defined to be linear.


<pre style="background:yellow;color:black;width:650px">
<pre style="background:yellow;color:black;width:650px">
set TransfTag 1;
geomTransf Linear 1
geomTransf Linear $TransfTag ;
</pre>  
</pre>  


The beams and columns of the frame are defined to be elastic using [[Elastic Beam Column Element|elasticBeamColumn]] element. In order to make beams infinitely rigid moment of inertia for beams (Ib) is set to very high value (10e+12).  
6. The column is defined to be elastic using [[Elastic Beam Column Element|elasticBeamColumn]] element. The element with the id tag 1 will connect nodes 1 and 2. Cross-sectional area of the element is (5*12)*(5*12)=3600in^2, Young's modulus of elasticity is 51000*sqrt(4000)/1000=3225 ksi (assuming fc'=4000 psi), and the moment of inertia is (1/12)*(5*12)^4=1080000 in^4.  


<pre style="background:yellow;color:black;width:650px">
<pre style="background:yellow;color:black;width:650px">
element elasticBeamColumn 1 1 3 $Ac $Ec [expr 2.*$Ic] $TransfTag;
element elasticBeamColumn 1 1 2 3600 3225 1080000 1
element elasticBeamColumn 2 3 5 $Ac $Ec $Ic          $TransfTag;
element elasticBeamColumn 3 2 4 $Ac $Ec [expr 2.*$Ic] $TransfTag;
element elasticBeamColumn 4 4 6 $Ac $Ec $Ic          $TransfTag;
element elasticBeamColumn 5 3 4 $Ab $E  $Ib          $TransfTag;
element elasticBeamColumn 6 5 6 $Ab $E  $Ib          $TransfTag;
</pre>
</pre>


To comply with the assumptions of the shear frame (no vertical displacemnts and rotations at nodes) end nodes of the beams are constrained to each other in the 2nd DOF (vertical displacement) and the 3rd DOF (rotation). [[EqualDOF command|EqualDOF]] command is used to imply these constraints.
== Define recorders ==
 
As a user you have an option of specifying the type of output that will be created following the analysis. The OpenSees [[Recorder Command|recorder command]] is used to define the analysis output. This command is used to generate a recorder object for a specific type of response that is to be monitored during the analysis and its output.
 
For the considered cantilever column, the displacements of free node, support reactions, lateral drift, end element forces are recorded and stored as text files in "Data" folder.
 
The [[Node Recorder|node recorder]] is used to output displacements of the free node (node 2) and support reaction of the constrained node (node 1) into files DFree.out and RBase.out, respectively. Both files will have a time stored in the first column. The columns 2-4 of file DFree.out will contain displacements at DOFs 1, 2, and 3. The columns 2-4 of file RBase.out will contain reactions that correspond to DOFs 1, 2, and 3.  


<pre style="background:yellow;color:black;width:650px">
<pre style="background:yellow;color:black;width:650px">
equalDOF 3 4 2 3
recorder Node -file Data/DFree.out -time -node 2 -dof 1 2 3 disp
equalDOF 5 6 2 3  
recorder Node -file Data/RBase.out -time -node 1 -dof 1 2 3 reaction
</pre>
</pre>


== Define recorders ==
The [[Drift Recorder|drift recorder]] is used to output lateral drifts into file Drift.out. The first column of the file is the time, and the second column is the lateral drift (relative displacements between nodes 1 and 2).
 
<pre style="background:yellow;color:black;width:650px">
recorder Drift -file Data/Drift.out -time -iNode 1 -jNode 2 -dof 1  -perpDirn 2
</pre>


For the specified number of eigenvalues (numModes) (for this example it is 2) the eigenvectors are recorded at all nodes in all DOFs using [[Node Recorder| node recorder]] command.
The [[Element Recorder|element recorder]] is used to output global forces of the column into file FCol.out. The first column of the file is the time. The columns 2-7 of the file will contain end node forces (shear, axial, and bending moment); 3 forces at node 1 and 3 forces at node 2. These forces correspond to the global coordinate axes orientation.


<pre style="background:yellow;color:black;width:650px">
<pre style="background:yellow;color:black;width:650px">
for { set k 1 } { $k <= $numModes } { incr k } {
recorder Element -file Data/FCol.out -time -ele 1 force
    recorder Node -file [format "modes/mode%i.out" $k] -nodeRange 1 6 -dof 1 2 3  "eigen $k"
}
</pre>
</pre>


== Perform eigenvalue analysis ==
== How to apply the load in OpenSees? ==


The eigenvalues are calculated using [[Eigen Command|eigen commnad]] and stored in lambda variable.
Applying load in OpenSees is a three-step process:
 
1. Loads are defined using [[Pattern Command|pattern ]] command;
 
2. Analysis objects (constraint handler, DOF numberer, numerical solver, type of test for convergence, solution algorithm, integrator, and type of analysis to be performed) are defined next;
 
3. The loads are applied and the analysis is executed using [[Analyze Command|analyze]] command.
 
== Gravity load analysis == 
 
In this example the gravity load is a substructure weight of 2000 kips. It will be applied at node 2 in 10 equal steps in increments of 200kips (0.1*2000). To apply the nodal load incrementally the [[Linear TimeSeries|linear time series]] with id tag 1 will be used.


<pre style="background:yellow;color:black;width:650px">
<pre style="background:yellow;color:black;width:650px">
set lambda [eigen  $numModes];
timeSeries Linear 1
</pre>
</pre>


The periods and frequencies of the structure are calculated next.
The time series will be assigned to the [[Plain Pattern|load pattern]] with id tag 1. [[NodalLoad Command| Nodal load command]] will be used to create nodal load. It is a load at node 2 in  negative Y direction of 2000 kips. The load value is a reference load value, it is the time series that provides the load factor. The load factor times the reference value is the load that is actually applied to the node in one time step of analysis.  


<pre style="background:yellow;color:black;width:650px">
<pre style="background:yellow;color:black;width:650px">
set omega {}
pattern Plain 1 1 {
set f {}
  load 2 0. -2000. 0.
set T {}
set pi 3.141593
 
foreach lam $lambda {
lappend omega [expr sqrt($lam)]
lappend f [expr sqrt($lam)/(2*$pi)]
lappend T [expr (2*$pi)/sqrt($lam)]
}
}
</pre>  
</pre>


The periods are stored in a Periods.txt file inside of directory "modes".
The analysis objects are defined next. To construct Constraint Handler object the [[Constraints Command|constraints]] command is used. The Constraint Handler object determines how the constraint equations (boundary conditions) are enforced in the analysis. In the case of cantilever column with a total fixity (all DOFs are constrained) at the node 1 [[Plain Constraints|plain constraints]] can be used.


<pre style="background:yellow;color:black;width:650px">
<pre style="background:yellow;color:black;width:650px">
set period "modes/Periods.txt"
constraints Plain
set Periods [open $period "w"]
foreach t $T {
puts $Periods " $t"
}
close $Periods
</pre>
</pre>


DOF Numberer object, that determines the numbering of degrees of freedom (mapping between equation numbers and degrees-of-freedom) is defined next. Since the model is very simple and small [[Plain Numberer|plain numberer]] will be used:


== Display mode shapes ==
<pre style="background:yellow;color:black;width:650px">
numberer Plain
</pre> 


As there are two mode shapes of the system we will create two display windows using record display command. Here we specify window title (e.g., "Mode Shape 1"), then x and y location of the top-left corner of the window (relative to the upper-left corner of the screen), and finally width and height of the graphical window in pixels. Projector reference point (prp) is defined next. This point defines the center of projection (viewer's eye)(for more information: [http://www.cs.uic.edu/~jbell/CourseNotes/ComputerGraphics/Projections_Viewpoints.html Viewpoint Projections and Specifications]). Usually it is placed at the center of the object that is to be graphically presented. For this example, the center of the structure is at (h,h), h being the height of the column (Figure 1). Next, we have to define view-up  (vup) vector and view-plane normal (vpn) vector. They are (0,1,0) and (0,0,1), respectively. Window view is defined next using command viewWindow and the four coordinates (-x, x, -y, y) that define the size of the viewing window relative to the prp. In this example h is 144, so the viewing window with its vector (-200, 200, -200, 200)  is set to have 56 units of blank space all around the structure. Finally, we use display command to display the mode shapes. The first argument following the command specifies the type of response to be plotted (e.g., -1 is tag for displaying the 1st mode shape, -2 is the tag for displaying the 2nd mode shape, and so on). The second argument following display command is magnification factor for nodes and the third argument is magnification factor for the response quantity to be displayed.       
To store and solve the system of equations during the analysis [[BandGeneral SOE|BandGeneral]] solver is used:


<pre style="background:yellow;color:black;width:650px">
<pre style="background:yellow;color:black;width:650px">
recorder display "Mode Shape 1" 10 10 500 500 -wipe
system BandGeneral
prp $h $h 1;
</pre>
vup  0  1 0;
vpn  0  0 1;
viewWindow -200 200 -200 200
display -1 5 20


recorder display "Mode Shape 2" 10 510 500 500 -wipe
Since the column is elastic the system of equation can be solved in one iteration. Thus, the [[Linear Algorithm|linear algorithm]] will be used to solve the system of equations.
prp $h $h 1;
 
vup  0  1 0;
<pre style="background:yellow;color:black;width:650px">
vpn  0  0 1;
algorithm Linear
viewWindow -200 200 -200 200
display -2 5 20
</pre>
</pre>


== One step of analysis with no loading ==
Since the analysis is static and specific load (2000 kips) is to be applied, [[Load Control|load control]] integrator will be used in this example. The load factor increment (<math>\lambda</math>) is set to 0.1 since the full load of 2000 kips is to be applied in 10 analysis steps. For the nth step of analysis the load factor is <math>\lambda</math>n = <math>\lambda</math>n-1 + <math>\lambda</math>.
 
<pre style="background:yellow;color:black;width:650px">
integrator LoadControl 0.1
</pre>


In order to record any response quantity in OpenSess (in this example we want to record eigenvectors) at least one step of analysis has to be performed. Analysis objects are defined and one step of analysis is performed.
The type of analysis is next defined using [[Analysis Command|analysis]] command. The gravity load is a static type of the load and thus we have:


<pre style="background:yellow;color:black;width:650px">
<pre style="background:yellow;color:black;width:650px">
integrator LoadControl 0 1 0 0
test EnergyIncr       1.0e-10    100        0
algorithm Newton
numberer RCM
constraints Transformation
system ProfileSPD
analysis Static
analysis Static
</pre>
With this all analysis objects are defined, so the analysis can be performed. It is performed by invoking the command [[Analyze Command|analyze]] and by defining the number of analysis steps to be performed (10 for this example).
<pre style="background:yellow;color:black;width:650px">
analyze 10
</pre>
Since the transient analysis is going to be performed next, the gravity load has to be maintained constant for the remainder of the analysis and the time has to be restarted (set to 0.0) so that a time for a new time history can start from 0.0. The [[LoadConst Command|loadConst]] command is used for this.
<pre style="background:yellow;color:black;width:650px">
loadConst -time 0.0
</pre>
== The dynamic ground motion analysis ==
The load pattern for a time history analysis has to be defined first. The load pattern consists of defining an acceleration record of a ground motion that will be applied at the support (node 1). The ground motion used for the analysis is acceleration record from Loma Prieta earthquake (LOMAP) at station CDMG 58373 APEEL 10 - Skyline[http://peer.berkeley.edu/nga/data?doi=NGA0731] component A10000. This acceleration record is provided at the beginning of this tutorial.  The time interval between the points found in the record (dt) is 0.005 and number of data points found in the record (nPts) is 7990. The [[Path TimeSeries|Path TimeSeries]] with id tag 2 is used to define the ground motion time series. The acceleration time history of the recorded ground motion is in units of G and it is thus factored with G = 386 in^2/sec.
<pre style="background:yellow;color:black;width:650px">
timeSeries Path 2 -dt 0.005 -filePath A10000.acc -factor $G
</pre>
The [[Uniform Exciatation Pattern|uniform exciatation pattern]] with id tag 2 will be used to apply this time series (with id tag 2) to a model in x direction (direction 1).
<pre style="background:yellow;color:black;width:650px">
pattern UniformExcitation 2 1 -accel 2
</pre>
Damping will be assigned to the model using [[Rayleigh Damping Command|rayleigh]] command. Rayleigh damping is mass and stiffness proportional. In OpenSees there are three different stiffness matrices available for use: the current stiffness matrix (at each iteration of a time step), the initial stiffness matrix, and the committed stiffness matrix (at the last committed step of analysis). For the linear elastic type of analysis the three matrices are identical. In this example damping is specified to be only stiffness proportional and equal to 2*(damping ratio)/(fundamental frequency). The fundamental frequency is calculated from the first [[Eigen Command|eigenvalue]]. The damping ratio is set to 0.02.
<pre style="background:yellow;color:black;width:650px">
set freq [expr [eigen -fullGenLapack 1]**0.5]
set dampRatio 0.02
rayleigh 0. 0. 0. [expr 2*$dampRatio/$freq]
</pre>
The dynamic ground motion analysis is transient type of analysis and therefore some of the analysis components have to be redefined. In order to define new analysis objects the previously defined analysis objects have to be destroyed. For this we will use wipeAnalysis command:
<pre style="background:yellow;color:black;width:650px">
wipeAnalysis
</pre>
The analysis objects that correspond to transient analysis are defined next. Constraint handler, DOF numberer, numerical solver, and algorithm will be the same as for the static (gravity) analysis.


analyze 1
<pre style="background:yellow;color:black;width:650px">
constraints Plain
numberer Plain
system BandGeneral
algorithm Linear
</pre>
 
The integrator and the analysis type are different. Numerical evaluation of the dynamic response will be performed using [[Newmark Method|Newmark method]] of integration. The parameters <math>\gamma</math> and <math>\beta</math> will be set to 0.5 and 0.25, respectively. This choice of <math>\gamma</math> and <math>\beta</math> leads to constant average acceleration over a time step. The type of analysis is transient.
 
<pre style="background:yellow;color:black;width:650px">
integrator Newmark 0.5 0.25
analysis Transient
</pre>
 
With this all analysis objects are defined, so the analysis can be performed. It is performed by invoking the command [[Analyze Command|analyze]] and by defining the number of analysis steps to be performed and by defining the analysis increments. The number of analysis steps is set to 3995 (nPts/2) and the analysis increment is set to 0.01 (2*dt). Thus every second point in the record will be skipped during the analysis. 
 
<pre style="background:yellow;color:black;width:650px">
analyze 3995 0.01
</pre>
</pre>

Latest revision as of 17:11, 16 July 2012

Example Provided by: Vesna Terzic, UC Berkeley


This example demonstrates how to perform time history analysis of a 2D elastic reinforced concrete cantilever column with a gravity load included in the analysis. The column will be exposed only to horizontal component of ground motion. This example is a tutorial for the slightly modified example Ex1a.Canti2D.EQ.tcl (given in the examples manual) and is intended to help OpenSees beginners get started. Geometry of the cantilever column, node and element numbering are shown in the figure below.


|-



Instructions on how to run this example (for Windows users)

To execute this ananlysis in OpenSees the user has to download these files:


Place Ex1a.Canti2D.EQ.tcl and A10000.tcl file in the same folder with the OpenSees.exe. By double clicking on OpenSees.exe the OpenSees interpreter will pop out. To run the analysis the user should type:

      source Ex1a.Canti2D.EQ.modif.tcl

and hit enter.

Create the model

Before creating the model it is advised to call wipe command to destroy all previously constructed objects, i.e. all previously defined components of the model, all previously defined components of the analysis and all previously defined recorders.

The model of a structural system is created in the following way:

1. Spatial dimension of the model (NDM) and number of degrees-of-freedom (DOF) at nodes are defined using model command.

2. Coordinates of the nodes are defined using node command. At this point the user has to choose basic units (e.g., kip, in., sec) and remain consistent while creating the model.

3. If dynamic (transient) analysis is performed nodal mass is assigned using either node or mass command. A mass has to be assigned to each degree of freedom.

4. The boundary conditions are defined using using single-point constraint command fix. For nodes that have some fixity, constraints have to be defined at all degrees of freedom (0 if unconstrained (or free), 1 if constrained (or fixed)). Completely free nodes do not have to be defined.

5. Before element is defined, the geometric transformation of the element has to be defined using geometric transformation command. This command transforms beam element stiffness and resisting force from the basic system to the global-coordinate system. Three types of geometric transformation are available in OpenSees: Linear Transformation, PDelta Transformation, and Corotational Transformation. In a 2D problem, element orientation does not need to be considered, and can be same for all elements.

6. The elements are to be defined using one of the elements available in OpenSees. For the purpose of this example Elastic Beam Column Element will be used. Different types of elements require different additional commands for their definition.


For the given example, steps from 1 to 6 are explained below. The link to command description is provided for each command so that a user can see the definition of all the arguments that the command invokes.


1. First we have to define the model builder. The cantilever column is a 2D model with 3 DOFs at each node. Thus, spatial dimension of the model (NDM) is 2 and number of degrees-of-freedom (ndf) is 3. This is defined in the following way:

model BasicBuilder -ndm 2 -ndf 3

2. The column has two nodes, labeled 1 and 2 (as shown in the Figure above). Node 1 has coordinates (0,0) and node 2 has coordinates (0,432) in the global coordinate system (x,y). The basic units chosen to build the model are: kip, in, sec. Note: y coordinate for node 2 is 36*12=432 in.

Nodes are defined using the node command:

node 1   0.  0. 
node 2   0.  432. 

3. The cantilever column is constrained (fixed) at the node 1 in all three DOFs (two translational and one rotation). This boundary condition is defined with fix command.

fix 1 1 1 1

4. Mass is assigned at node 2 using mass command. Since transient analysis is going to be performed for one component of ground motion (horizontal component - x direction) the mass is to be assigned in x direction. The mass is defined as Weight/g=2000/386=5.18. The vertical and rotational mass are set to zero.

mass 2 5.18 0. 0.

5. The geometric transformation with id tag 1 is defined to be linear.

geomTransf Linear 1 

6. The column is defined to be elastic using elasticBeamColumn element. The element with the id tag 1 will connect nodes 1 and 2. Cross-sectional area of the element is (5*12)*(5*12)=3600in^2, Young's modulus of elasticity is 51000*sqrt(4000)/1000=3225 ksi (assuming fc'=4000 psi), and the moment of inertia is (1/12)*(5*12)^4=1080000 in^4.

element elasticBeamColumn 1 1 2 3600 3225 1080000 1

Define recorders

As a user you have an option of specifying the type of output that will be created following the analysis. The OpenSees recorder command is used to define the analysis output. This command is used to generate a recorder object for a specific type of response that is to be monitored during the analysis and its output.

For the considered cantilever column, the displacements of free node, support reactions, lateral drift, end element forces are recorded and stored as text files in "Data" folder.

The node recorder is used to output displacements of the free node (node 2) and support reaction of the constrained node (node 1) into files DFree.out and RBase.out, respectively. Both files will have a time stored in the first column. The columns 2-4 of file DFree.out will contain displacements at DOFs 1, 2, and 3. The columns 2-4 of file RBase.out will contain reactions that correspond to DOFs 1, 2, and 3.

recorder Node -file Data/DFree.out -time -node 2 -dof 1 2 3 disp
recorder Node -file Data/RBase.out -time -node 1 -dof 1 2 3 reaction

The drift recorder is used to output lateral drifts into file Drift.out. The first column of the file is the time, and the second column is the lateral drift (relative displacements between nodes 1 and 2).

recorder Drift -file Data/Drift.out -time -iNode 1 -jNode 2 -dof 1  -perpDirn 2

The element recorder is used to output global forces of the column into file FCol.out. The first column of the file is the time. The columns 2-7 of the file will contain end node forces (shear, axial, and bending moment); 3 forces at node 1 and 3 forces at node 2. These forces correspond to the global coordinate axes orientation.

recorder Element -file Data/FCol.out -time -ele 1 force

How to apply the load in OpenSees?

Applying load in OpenSees is a three-step process:

1. Loads are defined using pattern command;

2. Analysis objects (constraint handler, DOF numberer, numerical solver, type of test for convergence, solution algorithm, integrator, and type of analysis to be performed) are defined next;

3. The loads are applied and the analysis is executed using analyze command.

Gravity load analysis

In this example the gravity load is a substructure weight of 2000 kips. It will be applied at node 2 in 10 equal steps in increments of 200kips (0.1*2000). To apply the nodal load incrementally the linear time series with id tag 1 will be used.

timeSeries Linear 1

The time series will be assigned to the load pattern with id tag 1. Nodal load command will be used to create nodal load. It is a load at node 2 in negative Y direction of 2000 kips. The load value is a reference load value, it is the time series that provides the load factor. The load factor times the reference value is the load that is actually applied to the node in one time step of analysis.

pattern Plain 1 1 {
   load 2 0. -2000. 0.
}

The analysis objects are defined next. To construct Constraint Handler object the constraints command is used. The Constraint Handler object determines how the constraint equations (boundary conditions) are enforced in the analysis. In the case of cantilever column with a total fixity (all DOFs are constrained) at the node 1 plain constraints can be used.

constraints Plain

DOF Numberer object, that determines the numbering of degrees of freedom (mapping between equation numbers and degrees-of-freedom) is defined next. Since the model is very simple and small plain numberer will be used:

numberer Plain

To store and solve the system of equations during the analysis BandGeneral solver is used:

system BandGeneral

Since the column is elastic the system of equation can be solved in one iteration. Thus, the linear algorithm will be used to solve the system of equations.

algorithm Linear

Since the analysis is static and specific load (2000 kips) is to be applied, load control integrator will be used in this example. The load factor increment (<math>\lambda</math>) is set to 0.1 since the full load of 2000 kips is to be applied in 10 analysis steps. For the nth step of analysis the load factor is <math>\lambda</math>n = <math>\lambda</math>n-1 + <math>\lambda</math>.

integrator LoadControl 0.1

The type of analysis is next defined using analysis command. The gravity load is a static type of the load and thus we have:

analysis Static

With this all analysis objects are defined, so the analysis can be performed. It is performed by invoking the command analyze and by defining the number of analysis steps to be performed (10 for this example).

analyze 10

Since the transient analysis is going to be performed next, the gravity load has to be maintained constant for the remainder of the analysis and the time has to be restarted (set to 0.0) so that a time for a new time history can start from 0.0. The loadConst command is used for this.

loadConst -time 0.0

The dynamic ground motion analysis

The load pattern for a time history analysis has to be defined first. The load pattern consists of defining an acceleration record of a ground motion that will be applied at the support (node 1). The ground motion used for the analysis is acceleration record from Loma Prieta earthquake (LOMAP) at station CDMG 58373 APEEL 10 - Skyline[1] component A10000. This acceleration record is provided at the beginning of this tutorial. The time interval between the points found in the record (dt) is 0.005 and number of data points found in the record (nPts) is 7990. The Path TimeSeries with id tag 2 is used to define the ground motion time series. The acceleration time history of the recorded ground motion is in units of G and it is thus factored with G = 386 in^2/sec.

timeSeries Path 2 -dt 0.005 -filePath A10000.acc -factor $G

The uniform exciatation pattern with id tag 2 will be used to apply this time series (with id tag 2) to a model in x direction (direction 1).

pattern UniformExcitation 2 1 -accel 2

Damping will be assigned to the model using rayleigh command. Rayleigh damping is mass and stiffness proportional. In OpenSees there are three different stiffness matrices available for use: the current stiffness matrix (at each iteration of a time step), the initial stiffness matrix, and the committed stiffness matrix (at the last committed step of analysis). For the linear elastic type of analysis the three matrices are identical. In this example damping is specified to be only stiffness proportional and equal to 2*(damping ratio)/(fundamental frequency). The fundamental frequency is calculated from the first eigenvalue. The damping ratio is set to 0.02.

set freq [expr [eigen -fullGenLapack 1]**0.5]
set dampRatio 0.02
rayleigh 0. 0. 0. [expr 2*$dampRatio/$freq]

The dynamic ground motion analysis is transient type of analysis and therefore some of the analysis components have to be redefined. In order to define new analysis objects the previously defined analysis objects have to be destroyed. For this we will use wipeAnalysis command:

wipeAnalysis

The analysis objects that correspond to transient analysis are defined next. Constraint handler, DOF numberer, numerical solver, and algorithm will be the same as for the static (gravity) analysis.

constraints Plain
numberer Plain
system BandGeneral
algorithm Linear

The integrator and the analysis type are different. Numerical evaluation of the dynamic response will be performed using Newmark method of integration. The parameters <math>\gamma</math> and <math>\beta</math> will be set to 0.5 and 0.25, respectively. This choice of <math>\gamma</math> and <math>\beta</math> leads to constant average acceleration over a time step. The type of analysis is transient.

integrator Newmark 0.5 0.25
analysis Transient

With this all analysis objects are defined, so the analysis can be performed. It is performed by invoking the command analyze and by defining the number of analysis steps to be performed and by defining the analysis increments. The number of analysis steps is set to 3995 (nPts/2) and the analysis increment is set to 0.01 (2*dt). Thus every second point in the record will be skipped during the analysis.

analyze 3995 0.01