Getting Started with BuildingTcl: Difference between revisions

From OpenSeesWiki
Jump to navigation Jump to search
No edit summary
 
(48 intermediate revisions by the same user not shown)
Line 1: Line 1:
__NOTOC__
[[Image:BuildingTclLogo.gif|link=BuildingTcl|right]]
== BuildingTcl Commands ==
== BuildingTcl Commands ==


Most BuildingTcl Library commands consists of a series of parameter-defining add-Data commands, concluded by an add-Object command, which takes the previously defined parameters and assembles them into an individual library object.
Most BuildingTcl Library commands consists of a series of parameter-defining add-Data commands, concluded by an add-Object command, which takes the previously defined parameters and assembles them into an individual library object.
* SET UP
<blockquote>
<source lang="Tcl">source myBuildingTcl.tcl
<setDataDir $DataDir>
<setUnits -Length $BasicLengthUnit -Force $BasicForceUnit -Time $BasicTimeUnit></source>
</blockquote>


* SET UP
* DEFINE INPUT DATA
source myBuildingTcl.tcl
<blockquote>
<source lang="Tcl"># define Materials Library
addMaterialData
addMaterial 


<setDataDir Data>
# define Section Library
addSectionData
addSection


<setUnits -Length $BasicLengthUnit -Force $BasicForceUnit -Time BasicTimeUnit>
# define ElementModel Library
addElementModelData
addElementModel''


* DEFINE INPUT DATA
# define AnalysisModel Library
addMaterialData ..
addAnalysisModelData
addAnalysisModel


addMaterial ''; # define Materials Library''
# define Model (Elevation, Plan, 3DModel) Library
addModelData
addModel


# define Loads Library
addLoadData
addLoad


addSectionData ..
# define LoadCombination Library
addLoadCombinationData
addLoadCombination
</source>
</blockquote>


addSection''; # define Section Library''
''The following commands are BuildingTcl-specific. They are used to run the OpenSees simulation.''
* BUILD AND ANALYZE
<blockquote>
<source lang="Tcl">SelectModel …
SelectLoadCombination …..
BuildAndAnalyze
</source>
</blockquote>
 
== Run BuildingTcl ==
 
* myBuildingTcl.tcl – no graphics
:Incorporates BuildingTcl commands into the Tcl Interpreter
:The BuildingTcl commands are used within OpenSees.exe or OpenSeesTk.exe.


;1. Run from OpenSees Prompt:
:a. Run OpenSees.exe or OpenSeesTk.exe
:b. Source myBuildingTcl.tcl at OpenSees prompt
:c. Source input and analysis files at OpenSees prompt


addElementModelData …..


addElementModel''; # define ElementModel Library''


== Run BuildingTclViewer ==


addAnalysisModelData …..
*myBuildingTclviewer.tcl – BuildingTcl with graphical interface
:Incorporates BuildingTcl & BuildingTclviewer commands into the Tcl/Tk Interpreter
:This file needs to be sourced from the OpenSeesTk.exe prompt, or by double-clicking on the BuildingTclViewer.bat file
;1. Run from OpenSeesTk Prompt:
:a. Run OpenSeesTk.exe – a Tk window opens up (do not close it).
:b. Source myBuildingTclviewer.tcl at the OpenSees prompt
::the Tk window becomes the BuildingTclviewer


addAnalysisModel''; # define AnalysisModel Library''
Or
;2. Double-click on myBuildingTclviewer.bat


== Getting-Started Input File ==


addModelData …..
This file contains all the input data for the building model and simulation. It can be used by both BuildingTcl and the BuildingTclViewer.


addModel''; # define Model (Elevation, Plan, 3DModel) Library''
:[[GettingStartedInputFile.tcl -– Setup & Materials]]


addLoadData …..
:[[GettingStartedInputFile.tcl -– Element Section]]
addLoad''; # define Loads Library''


:[[GettingStartedInputFile.tcl -– Gravity Loads]]


addLoadCombinationData …..
:[[GettingStartedInputFile.tcl -– Model: Elevations]]


addLoadCombination''; # define LoadCombination Library''
:[[GettingStartedInputFile.tcl -– Model: Plans]]


''The following commands are Building-Tcl specific. They are used to run the OpenSees simulation.''
:[[GettingStartedInputFile.tcl -– Model: 3DFrames]]
* BUILD AND ANALYZE
SelectModel …..


SelectLoadCombination …..
:[[GettingStartedInputFile.tcl -– Lateral Loads]]


BuildAndAnalyze
:[[GettingStartedInputFile.tcl -– Load Combinations]]


:[[GettingStartedInputFile.tcl -– Additional Models]]


== Run BuildingTcl ==
:[[GettingStartedInputFile.tcl -– BuildAndAnalyze]]


* myBuildingTcl.tcl – no graphics
:[[GettingStartedInputFile.tcl -– Run]]
- Incorporates BuildingTcl commands into the Tcl Interpreter
- The BuildingTcl commands are used within OpenSees.exe or OpenSeesTk.exe.
- Run:
- #Run OpenSees.exe or OpenSeesTk.exe
- #Source myBuildingTcl.tcl at OpenSees prompt
- #Source input and analysis files at OpenSees prompt






== Run BuildingTclViewer ==


*myBuildingTclviewer.tcl – BuildingTcl with graphical interface
- Incorporates BuildingTcl & BuildingTclviewer commands into the Tcl/Tk Interpreter
- This file needs to be sourced from the OpenSeesTk.exe prompt, or by double-clicking on the BuildingTclViewer.bat file
# Run from OpenSees Prompt:
-# Run OpenSeesTk.exe – a Tk window opens up (do not close it).
-# Source myBuildingTclviewer.tcl at the OpenSees prompt
- -- the Tk window becomes the BuildingTclviewer


Or
----
# Double-click on myBuildingTclviewer.bat

Latest revision as of 18:19, 28 December 2009

BuildingTcl Commands

Most BuildingTcl Library commands consists of a series of parameter-defining add-Data commands, concluded by an add-Object command, which takes the previously defined parameters and assembles them into an individual library object.

  • SET UP
source myBuildingTcl.tcl
<setDataDir $DataDir>
<setUnits -Length $BasicLengthUnit -Force $BasicForceUnit -Time $BasicTimeUnit>
  • DEFINE INPUT DATA
# define Materials Library
addMaterialData 
…
addMaterial  

# define Section Library
addSectionData 
…
addSection

# define ElementModel Library
addElementModelData 
…
addElementModel''

# define AnalysisModel Library
addAnalysisModelData 
…
addAnalysisModel

# define Model (Elevation, Plan, 3DModel) Library
addModelData 
…
addModel

# define Loads Library
addLoadData 
…
addLoad

# define LoadCombination Library
addLoadCombinationData 
…
addLoadCombination

The following commands are BuildingTcl-specific. They are used to run the OpenSees simulation.

  • BUILD AND ANALYZE
SelectModel …
SelectLoadCombination …..
BuildAndAnalyze

Run BuildingTcl

  • myBuildingTcl.tcl – no graphics
Incorporates BuildingTcl commands into the Tcl Interpreter
The BuildingTcl commands are used within OpenSees.exe or OpenSeesTk.exe.
1. Run from OpenSees Prompt
a. Run OpenSees.exe or OpenSeesTk.exe
b. Source myBuildingTcl.tcl at OpenSees prompt
c. Source input and analysis files at OpenSees prompt


Run BuildingTclViewer

  • myBuildingTclviewer.tcl – BuildingTcl with graphical interface
Incorporates BuildingTcl & BuildingTclviewer commands into the Tcl/Tk Interpreter
This file needs to be sourced from the OpenSeesTk.exe prompt, or by double-clicking on the BuildingTclViewer.bat file
1. Run from OpenSeesTk Prompt
a. Run OpenSeesTk.exe – a Tk window opens up (do not close it).
b. Source myBuildingTclviewer.tcl at the OpenSees prompt
the Tk window becomes the BuildingTclviewer

Or

2. Double-click on myBuildingTclviewer.bat

Getting-Started Input File

This file contains all the input data for the building model and simulation. It can be used by both BuildingTcl and the BuildingTclViewer.

GettingStartedInputFile.tcl -– Setup & Materials
GettingStartedInputFile.tcl -– Element Section
GettingStartedInputFile.tcl -– Gravity Loads
GettingStartedInputFile.tcl -– Model: Elevations
GettingStartedInputFile.tcl -– Model: Plans
GettingStartedInputFile.tcl -– Model: 3DFrames
GettingStartedInputFile.tcl -– Lateral Loads
GettingStartedInputFile.tcl -– Load Combinations
GettingStartedInputFile.tcl -– Additional Models
GettingStartedInputFile.tcl -– BuildAndAnalyze
GettingStartedInputFile.tcl -– Run