OpenSees Example 2a. Elastic Cantilever Column with variables: Difference between revisions
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: | ||
<source lang="Tcl"> | <blockquote><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 | ||
</source> | </source> </blockquote> | ||
was replace with the following series of commands in Example 2a: | was replace with the following series of commands in Example 2a: | ||
<blockquote> | |||
<source lang="Tcl"> | <source lang="Tcl"> | ||
# define GEOMETRY | # define GEOMETRY | ||
Line 69: | Line 69: | ||
node 2 0 $LCol | node 2 0 $LCol | ||
</source> | </source> | ||
</blockquote> | |||
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:18, 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 |
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