Mode Shape

Forum for OpenSees users to post questions, comments, etc. on the use of the OpenSees interpreter, OpenSees.exe

Moderators: silvia, selimgunay, Moderators

Post Reply
jwaugh
Posts: 110
Joined: Thu Jul 15, 2004 12:20 pm
Location: HNTB - Portland ME

Mode Shape

Post by jwaugh »

Is there a script someone has written so I can get the mode shapes for a structure? Thanks.

Jon
silvia
Posts: 3909
Joined: Tue Jan 11, 2005 7:44 am
Location: Degenkolb Engineers
Contact:

Post by silvia »

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.
Silvia Mazzoni, PhD
Structural Consultant
Degenkolb Engineers
235 Montgomery Street, Suite 500
San Francisco, CA. 94104
jwaugh
Posts: 110
Joined: Thu Jul 15, 2004 12:20 pm
Location: HNTB - Portland ME

Post by jwaugh »

What if I want the shape normalized to the top level displacement? I would like the displacements at the floor level output to a file.
silvia
Posts: 3909
Joined: Tue Jan 11, 2005 7:44 am
Location: Degenkolb Engineers
Contact:

Post by silvia »

i don't know how they are normalized, you'd have to do that in post-processing.
yes, you get the eigen-mode displacements put into a file by the recorder.
Silvia Mazzoni, PhD
Structural Consultant
Degenkolb Engineers
235 Montgomery Street, Suite 500
San Francisco, CA. 94104
jwaugh
Posts: 110
Joined: Thu Jul 15, 2004 12:20 pm
Location: HNTB - Portland ME

Post by jwaugh »

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?
endryus
Posts: 47
Joined: Wed Apr 13, 2005 5:59 am
Location: freelance
Contact:

Post by endryus »

I was not able to make it working too.
You can use

Code: Select all

print nodes.out node
andrea
Dr. Andrea Mordini
Civil Engineer, Ph.D. in Structural Mechanics
VCE - Vienna Consulting Engineers
Libra23
Posts: 96
Joined: Tue Nov 07, 2006 9:21 am
Location: University

Post by Libra23 »

Code: Select all

I either get fblank files or an error saying the eigen vectors don't exist. What am I doing wrong?
Are you sure dof 3 is free?
jwaugh
Posts: 110
Joined: Thu Jul 15, 2004 12:20 pm
Location: HNTB - Portland ME

Post by jwaugh »

Yes, that is the only DOF with Masses associated with it.
Libra23
Posts: 96
Joined: Tue Nov 07, 2006 9:21 am
Location: University

Post by Libra23 »

Try to make run one step of transient analysis,it works to me .
jwaugh
Posts: 110
Joined: Thu Jul 15, 2004 12:20 pm
Location: HNTB - Portland ME

Post by jwaugh »

I still get:

Node::getEigenvectors<> = eigenvectors have not been set.

What is going wrong?
silvia
Posts: 3909
Joined: Tue Jan 11, 2005 7:44 am
Location: Degenkolb Engineers
Contact:

Post by silvia »

i think you may have to do an eigen analysis first, using the eigen command.....
Silvia Mazzoni, PhD
Structural Consultant
Degenkolb Engineers
235 Montgomery Street, Suite 500
San Francisco, CA. 94104
jwaugh
Posts: 110
Joined: Thu Jul 15, 2004 12:20 pm
Location: HNTB - Portland ME

Post by jwaugh »

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
silvia
Posts: 3909
Joined: Tue Jan 11, 2005 7:44 am
Location: Degenkolb Engineers
Contact:

Post by silvia »

try getDisp, or something like that.
Silvia Mazzoni, PhD
Structural Consultant
Degenkolb Engineers
235 Montgomery Street, Suite 500
San Francisco, CA. 94104
jwaugh
Posts: 110
Joined: Thu Jul 15, 2004 12:20 pm
Location: HNTB - Portland ME

Post by jwaugh »

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
silvia
Posts: 3909
Joined: Tue Jan 11, 2005 7:44 am
Location: Degenkolb Engineers
Contact:

Post by silvia »

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.
Silvia Mazzoni, PhD
Structural Consultant
Degenkolb Engineers
235 Montgomery Street, Suite 500
San Francisco, CA. 94104
Post Reply