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
 
(5 intermediate revisions by one other user not shown)
Line 1: Line 1:
__NOTOC__
==Introduction==
==Introduction==
The objective of this example is to demonstrate the use of variables in defining the OpenSees input.
The objective of this example is to demonstrate the use of variables in defining the OpenSees input.
Line 15: Line 14:
|-
|-
| style="color:#000;" | <div>
| style="color:#000;" | <div>
[[File:Example2a_Push.GIF|link=OpenSees Example 2a. 2D Elastic Cantilever Column]]
[[File:Example2a_Push.GIF|link=OpenSees Example 2a. Elastic Cantilever Column with variables]]
----
----
<strong>Files</strong>
<strong>Files</strong>
Line 28: Line 27:
|-
|-
| style="color:#000;" | <div>
| style="color:#000;" | <div>
[[File:Example2a_EQ.GIF|link=OpenSees Example 2a. 2D Elastic Cantilever Column]]
[[File:Example2a_EQ.GIF|link=OpenSees Example 2a. Elastic Cantilever Column with variables]]
----
----
<strong>Files</strong>
<strong>Files</strong>
*[[Media:Ex2a.Canti2D.ElasticElement.EQ.tcl|Ex2a.Canti2D.ElasticElement.EQ.tcl]]
*[[Media:Ex2a.Canti2D.ElasticElement.EQ.tcl|Ex2a.Canti2D.ElasticElement.EQ.tcl]]
*[[Media:BM68elc.acc|BM68elc.acc]] (ground-motion file)
*[[Media:BM68elc.zip|BM68elc.acc]] (ground-motion file)
</div>
</div>
|}
|}
Line 40: Line 39:
==Run==
==Run==
*To run Static Pushover analysis:
*To run Static Pushover analysis:
:<strong>source Ex2a.Canti2D.ElasticElement.Push.tcl</strong>
<blockquote><source lang="Tcl">
source Ex2a.Canti2D.ElasticElement.Push.tcl
</source> </blockquote>


*To run EQ ground-motion analysis (BM68elc.acc needs to be downloaded into the same directory):
*To run EQ ground-motion analysis (BM68elc.acc needs to be downloaded into the same directory):
 
<blockquote><source lang="Tcl">
:<strong>source Ex2a.Canti2D.ElasticElement.EQ.tcl</strong>
source Ex2a.Canti2D.ElasticElement.EQ.tcl
</source> </blockquote>


==Notes==
==Notes==
Line 51: Line 53:
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 59:
# 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 71:
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:


Line 80: Line 82:


----
----
Return to [[OpenSees Examples Manual]]
Return to [[OpenSees Examples Manual -- Structural Models & Analyses]]


Return to [[OpenSees User]]
Return to [[OpenSees User]]

Latest revision as of 23:29, 1 September 2010

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 -- Structural Models & Analyses

Return to OpenSees User