Mode Shape
Moderators: silvia, selimgunay, Moderators
Mode Shape
Is there a script someone has written so I can get the mode shapes for a structure? Thanks.
Jon
Jon
if you just want to view them, use the usual viewing script, with the following:
set nEigen 3
display -$nEigen 0 $dAmp; # display mode shape for mode $nEigen
shows you the mode shape for mode 3. the - is important!
otherwise, you need to put a recorder at each node and use the eigen option -- see the manual.
set nEigen 3
display -$nEigen 0 $dAmp; # display mode shape for mode $nEigen
shows you the mode shape for mode 3. the - is important!
otherwise, you need to put a recorder at each node and use the eigen option -- see the manual.
Silvia Mazzoni, PhD
Structural Consultant
Degenkolb Engineers
235 Montgomery Street, Suite 500
San Francisco, CA. 94104
Structural Consultant
Degenkolb Engineers
235 Montgomery Street, Suite 500
San Francisco, CA. 94104
Silvia,
I tried to use the eigen vector recorder and so I wrote in my code like this:
# recorders for the getting the mode shapes
recorder Node -file Mode1.out -time -node 3 5 7 9 11 13 15 17 -dof 3 "eigen 1"
recorder Node -file Mode2.out -time -node 3 5 7 9 11 13 15 17 -dof 3 "eigen 2"
recorder Node -file Mode3.out -time -node 3 5 7 9 11 13 15 17 -dof 3 "eigen 3"
recorder Node -file Mode4.out -time -node 3 5 7 9 11 13 15 17 -dof 3 "eigen 4"
recorder Node -file Mode5.out -time -node 3 5 7 9 11 13 15 17 -dof 3 "eigen 5"
source getPeriod.tcl
procGetTperiod 5 on; # get Natural Periods and print to screen (on)
I either get fblank files or an error saying the eigen vectors don't exist. What am I doing wrong?
I tried to use the eigen vector recorder and so I wrote in my code like this:
# recorders for the getting the mode shapes
recorder Node -file Mode1.out -time -node 3 5 7 9 11 13 15 17 -dof 3 "eigen 1"
recorder Node -file Mode2.out -time -node 3 5 7 9 11 13 15 17 -dof 3 "eigen 2"
recorder Node -file Mode3.out -time -node 3 5 7 9 11 13 15 17 -dof 3 "eigen 3"
recorder Node -file Mode4.out -time -node 3 5 7 9 11 13 15 17 -dof 3 "eigen 4"
recorder Node -file Mode5.out -time -node 3 5 7 9 11 13 15 17 -dof 3 "eigen 5"
source getPeriod.tcl
procGetTperiod 5 on; # get Natural Periods and print to screen (on)
I either get fblank files or an error saying the eigen vectors don't exist. What am I doing wrong?
I was not able to make it working too.
You can use
andrea
You can use
Code: Select all
print nodes.out node
Dr. Andrea Mordini
Civil Engineer, Ph.D. in Structural Mechanics
VCE - Vienna Consulting Engineers
Civil Engineer, Ph.D. in Structural Mechanics
VCE - Vienna Consulting Engineers
Code: Select all
I either get fblank files or an error saying the eigen vectors don't exist. What am I doing wrong?
I have tried editing the script you gave me to find the period so it reads as following:
proc procGetTperiod {Neigen {PrintScreen "off"}} {
set fmt1 "Mode=%.1i: Tperiod=%.3f "
set PI [expr 2*asin(1.0)]; # define constants
set iTperiod ""
set lambdaN [eigen $Neigen]
for {set i 1} {$i <= $Neigen} {incr i 1} {; # zero to one
set lambda [lindex $lambdaN [expr $i-1]];
set omega [expr pow($lambda,0.5)]
set Tperiod [expr 2*$PI/$omega]; # period (sec.)
lappend iTperiod $Tperiod
if {$PrintScreen == "on" } {puts [format $fmt1 $i $Tperiod ]};
}
# recorder Node -file Mode1.out -time -node 5 7 9 11 13 15 17 -dof 3 "eigen 1"
# recorder Node -file Mode2.out -time -node 5 7 9 11 13 15 17 -dof 3 "eigen 2"
# recorder Node -file Mode3.out -time -node 5 7 9 11 13 15 17 -dof 3 "eigen 3"
# recorder Node -file Mode4.out -time -node 5 7 9 11 13 15 17 -dof 3 "eigen 4"
# recorder Node -file Mode5.out -time -node 5 7 9 11 13 15 17 -dof 3 "eigen 5"
print nodes.out -node 3 5 7 9 11 13 15 17
return $iTperiod
};
neither the recorder nor the pront command gives me the displacement at the nodes. THanks for you help
proc procGetTperiod {Neigen {PrintScreen "off"}} {
set fmt1 "Mode=%.1i: Tperiod=%.3f "
set PI [expr 2*asin(1.0)]; # define constants
set iTperiod ""
set lambdaN [eigen $Neigen]
for {set i 1} {$i <= $Neigen} {incr i 1} {; # zero to one
set lambda [lindex $lambdaN [expr $i-1]];
set omega [expr pow($lambda,0.5)]
set Tperiod [expr 2*$PI/$omega]; # period (sec.)
lappend iTperiod $Tperiod
if {$PrintScreen == "on" } {puts [format $fmt1 $i $Tperiod ]};
}
# recorder Node -file Mode1.out -time -node 5 7 9 11 13 15 17 -dof 3 "eigen 1"
# recorder Node -file Mode2.out -time -node 5 7 9 11 13 15 17 -dof 3 "eigen 2"
# recorder Node -file Mode3.out -time -node 5 7 9 11 13 15 17 -dof 3 "eigen 3"
# recorder Node -file Mode4.out -time -node 5 7 9 11 13 15 17 -dof 3 "eigen 4"
# recorder Node -file Mode5.out -time -node 5 7 9 11 13 15 17 -dof 3 "eigen 5"
print nodes.out -node 3 5 7 9 11 13 15 17
return $iTperiod
};
neither the recorder nor the pront command gives me the displacement at the nodes. THanks for you help
I updated the proc to read like this:
proc procGetTperiod {Neigen {PrintScreen "off"}} {
set fmt1 "Mode=%.1i: Tperiod=%.3f "
set PI [expr 2*asin(1.0)]; # define constants
set iTperiod ""
set lambdaN [eigen $Neigen]
for {set i 1} {$i <= $Neigen} {incr i 1} {; # zero to one
set lambda [lindex $lambdaN [expr $i-1]];
set omega [expr pow($lambda,0.5)]
set Tperiod [expr 2*$PI/$omega]; # period (sec.)
lappend iTperiod $Tperiod
if {$PrintScreen == "on" } {puts [format $fmt1 $i $Tperiod ]};
puts "Node 5: [nodeDisp 5 3]"
puts "Node 7: [nodeDisp 7 3]"
puts "Node 9: [nodeDisp 9 3]"
puts "Node 11: [nodeDisp 11 3]"
puts "Node 13: [nodeDisp 13 3]"
puts "Node 15: [nodeDisp 15 3]"
puts "Node 17: [nodeDisp 17 3]"
}
# recorder Node -file Mode1.out -time -node 5 7 9 11 13 15 17 -dof 3 "eigen 1"
# recorder Node -file Mode2.out -time -node 5 7 9 11 13 15 17 -dof 3 "eigen 2"
# recorder Node -file Mode3.out -time -node 5 7 9 11 13 15 17 -dof 3 "eigen 3"
# recorder Node -file Mode4.out -time -node 5 7 9 11 13 15 17 -dof 3 "eigen 4"
# recorder Node -file Mode5.out -time -node 5 7 9 11 13 15 17 -dof 3 "eigen 5"
# print nodes.out -node 3 5 7 9 11 13 15 17
return $iTperiod
};
However, all I get on the ouput is zero displacement for each of the nodes. nodeDisp is the only command I could find similar to the getDisp you mentioned. THanks
proc procGetTperiod {Neigen {PrintScreen "off"}} {
set fmt1 "Mode=%.1i: Tperiod=%.3f "
set PI [expr 2*asin(1.0)]; # define constants
set iTperiod ""
set lambdaN [eigen $Neigen]
for {set i 1} {$i <= $Neigen} {incr i 1} {; # zero to one
set lambda [lindex $lambdaN [expr $i-1]];
set omega [expr pow($lambda,0.5)]
set Tperiod [expr 2*$PI/$omega]; # period (sec.)
lappend iTperiod $Tperiod
if {$PrintScreen == "on" } {puts [format $fmt1 $i $Tperiod ]};
puts "Node 5: [nodeDisp 5 3]"
puts "Node 7: [nodeDisp 7 3]"
puts "Node 9: [nodeDisp 9 3]"
puts "Node 11: [nodeDisp 11 3]"
puts "Node 13: [nodeDisp 13 3]"
puts "Node 15: [nodeDisp 15 3]"
puts "Node 17: [nodeDisp 17 3]"
}
# recorder Node -file Mode1.out -time -node 5 7 9 11 13 15 17 -dof 3 "eigen 1"
# recorder Node -file Mode2.out -time -node 5 7 9 11 13 15 17 -dof 3 "eigen 2"
# recorder Node -file Mode3.out -time -node 5 7 9 11 13 15 17 -dof 3 "eigen 3"
# recorder Node -file Mode4.out -time -node 5 7 9 11 13 15 17 -dof 3 "eigen 4"
# recorder Node -file Mode5.out -time -node 5 7 9 11 13 15 17 -dof 3 "eigen 5"
# print nodes.out -node 3 5 7 9 11 13 15 17
return $iTperiod
};
However, all I get on the ouput is zero displacement for each of the nodes. nodeDisp is the only command I could find similar to the getDisp you mentioned. THanks
J-
please send me your scripts tomorrow: opensees-support @berkeley.edu
also, whenever you guys modify procs, especially mine, you should give them a new name (you can put in a comment that this is a modification of such and suc proc by so and so). This way we don't get confused.
please send me your scripts tomorrow: opensees-support @berkeley.edu
also, whenever you guys modify procs, especially mine, you should give them a new name (you can put in a comment that this is a modification of such and suc proc by so and so). This way we don't get confused.
Silvia Mazzoni, PhD
Structural Consultant
Degenkolb Engineers
235 Montgomery Street, Suite 500
San Francisco, CA. 94104
Structural Consultant
Degenkolb Engineers
235 Montgomery Street, Suite 500
San Francisco, CA. 94104