OpenSees Example 2a. Elastic Cantilever Column with variables: Difference between revisions

From OpenSeesWiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 51: Line 51:
For example, the following series of commands from Example 1a:
For example, the following series of commands from Example 1a:


<code lang="Tcl">
<source lang="Tcl">
# define GEOMETRY  
# define GEOMETRY  
# nodal coordinates:
# nodal coordinates:
Line 57: Line 57:
# node#, X Y
# node#, X Y
node 2 0 432
node 2 0 432
</code>  
</source>  


was replace with the following series of commands in Example 2a:
was replace with the following series of commands in Example 2a:


<code lang="Tcl">
<source lang="Tcl">
# define GEOMETRY  
# define GEOMETRY  
set LCol 432; # column length
set LCol 432; # column length
Line 68: Line 68:
# node#, X, Y
# node#, X, Y
node 2 0 $LCol  
node 2 0 $LCol  
</code>  
</source>  


While the use of variables may seem more time consuming in the simple examples, it is very effective in large examples. The following is a list of some of the advantages of using variables:
While the use of variables may seem more time consuming in the simple examples, it is very effective in large examples. The following is a list of some of the advantages of using variables:

Revision as of 17:17, 11 November 2009

Introduction

The objective of this example is to demonstrate the use of variables in defining the OpenSees input.

While the structural model is the same, there are two lateral-load cases:

Input

Static Pushover


Dynamic EQ Ground Motion



Files

Run

  • To run Static Pushover analysis:
source Ex2a.Canti2D.ElasticElement.Push.tcl
  • To run EQ ground-motion analysis (BM68elc.acc needs to be downloaded into the same directory):
source Ex2a.Canti2D.ElasticElement.EQ.tcl

Notes

In this example, all input values for Example 1a are replaced by variables.

For example, the following series of commands from Example 1a:

# define GEOMETRY 
# nodal coordinates:
node 1 0 0; 
# node#, X Y
node 2 0 432

was replace with the following series of commands in Example 2a:

# define GEOMETRY 
set LCol 432; # column length
# nodal coordinates:
node 1 0 0; 
# node#, X, Y
node 2 0 $LCol

While the use of variables may seem more time consuming in the simple examples, it is very effective in large examples. The following is a list of some of the advantages of using variables:

  • Reduced error and easier error checking because values are defined one time only.
  • Easy to change values of model parameters
  • Reduced amount of documentation within a file




Return to OpenSees Examples Manual

Return to OpenSees User