2. Elastic Column Dynamic Analysis
This is a very simple example of an elastic column subjected to the elCentro fround motion. The acceleration points for that file are included in a separate file Its purpose is to provide a basic introduction to OpenSees.
To run the example download the script, start OpenSees, cd to the directory containing the example and type
cd C:\Users\fmckenna\examples\
source example.tcl
The files can be downlaoded script
and zipped acceleration points
.
The contents of the downloaded tcl script file is as shown below:
1# -------------------------------------------------------------------------------------------------- 2# Example 1. cantilever 2D 3# EQ ground motion with gravity 4# all units are in kip, inch, second 5# elasticBeamColumn ELEMENT 6# Silvia Mazzoni & Frank McKenna, 2006 7# 8# ^Y 9# | 10# 2 __ 11# | | 12# | | 13# | | 14# (1) 36' 15# | | 16# | | 17# | | 18# =1= ---- -------->X 19# 20 21# SET UP ---------------------------------------------------------------------------- 22wipe; # clear opensees model 23model basic -ndm 2 -ndf 3; # 2 dimensions, 3 dof per node 24file mkdir Data; # create data directory 25 26# define GEOMETRY ------------------------------------------------------------- 27# nodal coordinates: 28node 1 0 0; # node#, X Y 29node 2 0 432 30 31# Single point constraints -- Boundary Conditions 32fix 1 1 1 1; # node DX DY RZ 33 34# nodal masses: 35mass 2 5.18 1.e-9 0.; # node#, Mx My Mz, Mass=Weight/g. 36 37# Define ELEMENTS ------------------------------------------------------------- 38# define geometric transformation: performs a linear geometric transformation of beam stiffness and resisting force from the basic system to the global-coordinate system 39geomTransf Linear 1; # associate a tag to transformation 40 41# connectivity: (make A very large, 10e6 times its actual value) 42element elasticBeamColumn 1 1 2 3600000000 4227 1080000 1; # element elasticBeamColumn $eleTag $iNode $jNode $A $E $Iz $transfTag 43 44# Define RECORDERS ------------------------------------------------------------- 45recorder Node -file Data/DFree.out -time -node 2 -dof 1 2 3 disp; # displacements of free nodes 46recorder Node -file Data/DBase.out -time -node 1 -dof 1 2 3 disp; # displacements of support nodes 47recorder Node -file Data/RBase.out -time -node 1 -dof 1 2 3 reaction; # support reaction 48recorder Drift -file Data/Drift.out -time -iNode 1 -jNode 2 -dof 1 -perpDirn 2 ; # lateral drift 49recorder Element -file Data/FCol.out -time -ele 1 globalForce; # element forces -- column 50recorder Element -file Data/DCol.out -time -ele 1 deformations; # element deformations -- column 51 52# define GRAVITY ------------------------------------------------------------- 53pattern Plain 1 Linear { 54 load 2 0. -2000. 0.; # node#, FX FY MZ -- superstructure-weight 55} 56constraints Plain; # how it handles boundary conditions 57numberer Plain; # renumber dof's to minimize band-width (optimization), if you want to 58system BandGeneral; # how to store and solve the system of equations in the analysis 59test NormDispIncr 1.0e-8 6 ; # determine if convergence has been achieved at the end of an iteration step 60algorithm Newton; # use Newton's solution algorithm: updates tangent stiffness at every iteration 61integrator LoadControl 0.1; # determine the next time step for an analysis, # apply gravity in 10 steps 62analysis Static # define type of analysis static or transient 63analyze 10; # perform gravity analysis 64loadConst -time 0.0; # hold gravity constant and restart time 65 66# DYNAMIC ground-motion analysis ------------------------------------------------------------- 67# create load pattern 68set accelSeries "Series -dt 0.01 -filePath BM68elc.acc -factor 1"; # define acceleration vector from file (dt=0.01 is associated with the input file gm) 69pattern UniformExcitation 2 1 -accel $accelSeries; # define where and how (pattern tag, dof) acceleration is applied 70rayleigh 0. 0. 0. [expr 2*0.02/pow([eigen 1],0.5)]; # set damping based on first eigen mode 71 72# create the analysis 73wipeAnalysis; # clear previously-define analysis parameters 74constraints Plain; # how it handles boundary conditions 75numberer Plain; # renumber dof's to minimize band-width (optimization), if you want to 76system BandGeneral; # how to store and solve the system of equations in the analysis 77test NormDispIncr 1.0e-8 10; # determine if convergence has been achieved at the end of an iteration step 78algorithm Newton; # use Newton's solution algorithm: updates tangent stiffness at every iteration 79integrator Newmark 0.5 0.25 ; # determine the next time step for an analysis 80analysis Transient; # define type of analysis: time-dependent 81analyze 1000 0.02; # apply 1000 0.02-sec time steps in analysis 82 83 84puts "Done!" 85 86