Previous Topic

Next Topic

...Define Analysis-Output Generation

Different output may be generated depending on whether the analysis is static or dynamic. Here is an example:

# -------Output.tcl-------------------------------------------------------------------------

set fDir "Data/";

file mkdir $fDir; # create directory

set ANALYSIS "Static"; # this variable would be passed in

set IDctrlNode 3; # this variable would be passed in

if {$ANALYSIS == "Static"} {

# Record nodal displacements -NODAL DISPLACEMENTS

set fDstatFrame DStatFrame[expr $Xframe]

set iNode "$IDctrlNode"; # can add node numbers to this list

foreach xNode $iNode {

set fNode Node$xNode

set Filename $fDir$fDstatFrame$fNode

recorder Node $Filename.out disp -time -node $xNode -dof 1 6;

}; # end of xNode

# Record element forces and deformations - COLUMNS

set iEL "1 2"

set fFstatFrame FStatFrame[expr $Xframe]

set fDstatFrame DStatFrame[expr $Xframe]

foreach xEL $iEL {

set fEl El[expr $xEL]

set iSEC "1 3 5"

set Ffilename $fDir$fFstatFrame$fEl

recorder Element $xEL -time -file $Ffilename.out localForce

foreach xSEC $iSEC {

set fSec Sec[expr $xSEC]

set Dfilename $fDir$fDstatFrame$fEl$fSec

recorder Element $xEL -file $Dfilename.out -time section $xSEC deformations

}; # end of xSEC

}; # end of xEL

}; # end of static analysis

set ANALYSIS "Dynamic"; # this variable would be passed in

set GroundFile "ElCentro"; # this variable would be passed in

if {$ANALYSIS == "Dynamic"} {

set fDDynaFrame DDynaFrame[expr $Xframe]

set fGroundFile $GroundFile

set Filename $fDir$fDDynaFrame$fGroundFile

# Record nodal displacements

recorder Node $Filename.out disp -time -node $IDctrlNode -dof 1

}; # end of dynamic analysis