Simple spring-mass model - Eigenvalue analysis

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

Moderators: silvia, selimgunay, Moderators

Post Reply
openc
Posts: 20
Joined: Mon Apr 12, 2010 11:11 pm
Location: Xenox university

Simple spring-mass model - Eigenvalue analysis

Post by openc »

Hello:

I am quite new to Opensees and I am having some trouble recording Eigen Vectors. I am able to get the Eigen Values, but not the Eigen Vectors. Could you please look at my below code and correct me? Thanks.
:)

******************************
wipe;

model basic -ndm 2 -ndf 3

#Node details:
node 1 1 0
node 2 1 0
node 3 5 0
node 4 5 0
node 5 10 0
node 6 10 0
node 7 15 0
node 8 15 0
node 9 20 0
node 10 20 0
node 11 25 0
node 12 25 0
node 13 30 0
node 14 30 0

puts "Node defined"

#Boundary Conditions:
fix 1 1 1 1
fix 2 0 1 1
fix 3 0 1 1
fix 4 0 1 1
fix 5 0 1 1
fix 6 0 1 1
fix 7 0 1 1
fix 8 0 1 1
fix 9 0 1 1
fix 10 0 1 1
fix 11 0 1 1
fix 12 0 1 1
fix 13 0 1 1
fix 14 0 1 1

#Slaving node:
equalDOF 2 3 1
equalDOF 4 5 1
equalDOF 6 7 1
equalDOF 8 9 1
equalDOF 10 11 1
equalDOF 12 13 1

puts "Boundary Conditions assigned"

#Nodal mass:
mass 2 3.1056 0. 0.
mass 4 3.1056 0. 0.
mass 6 3.1056 0. 0.
mass 8 3.1056 0. 0.
mass 10 3.1056 0. 0.
mass 12 3.1056 0. 0.
mass 14 3.1056 0. 0.

puts "Nodal Masses defined"

#Specifying material:
uniaxialMaterial Elastic 1 6000
uniaxialMaterial Elastic 2 6000
uniaxialMaterial Elastic 3 6000
uniaxialMaterial Elastic 4 6000
uniaxialMaterial Elastic 5 6000
uniaxialMaterial Elastic 6 6000
uniaxialMaterial Elastic 7 6000

puts "Material type defined"
puts "Spring stiffnesses defined"

#Section details:
section Uniaxial 1 1 P
section Uniaxial 2 2 P
section Uniaxial 3 3 P
section Uniaxial 4 4 P
section Uniaxial 5 5 P
section Uniaxial 6 6 P
section Uniaxial 7 7 P

puts "Section type defined"

#Element details:
element zeroLengthSection 1 1 2 1
element zeroLengthSection 2 3 4 2
element zeroLengthSection 3 5 6 3
element zeroLengthSection 4 7 8 4
element zeroLengthSection 5 9 10 5
element zeroLengthSection 6 11 12 6
element zeroLengthSection 7 13 14 7

puts "Element details provided"

#Eigen Values: #Displays the 7 fundamental periods
set Lambda [eigen -fullGenLapack 7]
puts "Lambda Omega Period"
foreach Lambda $Lambda {
if {$Lambda > 0.0} {
set Omega [expr pow($Lambda,0.5)]
set Period [expr (2*3.14)/$Omega]
puts "$Lambda $Omega $Period"}}

recorder Node -file chk.out -time -node 2 4 6 8 10 12 14 -dof 1 "eigen1"
openc
Posts: 20
Joined: Mon Apr 12, 2010 11:11 pm
Location: Xenox university

Post by openc »

fmk
Site Admin
Posts: 5884
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Post by fmk »

the recorder only records something after the analyze command has been issued. in your case no analysis is performed after the recorder is created.

for next version i have added a command like nodeDisp to get the eigenvectors directly from a node.
openc
Posts: 20
Joined: Mon Apr 12, 2010 11:11 pm
Location: Xenox university

Post by openc »

Thanks fmk for your replies.

It is working now and I can get the eigen vectors. I had another question: If I need results for say 5 modes, should i record them seperately? for e.g:

recorder Node -file evec1.txt -time -node 3 5 7 9 11 13 -dof 1 "eigen 1"
recorder Node -file evec2.txt -time -node 3 5 7 9 11 13 -dof 1 "eigen 2"
recorder Node -file evec3.txt -time -node 3 5 7 9 11 13 -dof 1 "eigen 3"
and so on...

Is there a way to actually record all the eigen results in just 1 file (say all_evecs.txt) ?

I was trying this below, but the file is not getting appended:

foreach modeno {1 2 3 4 5 6 7} {
puts "mode = $modeno"
recorder Node -file chk.out -time -node 3 5 7 9 11 13 -dof 1 "eigen $modeno"
}

Any suggestions please? Thanks.
fmk
Site Admin
Posts: 5884
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Post by fmk »

not at the moment .. can you add that to the last forum on user requests so i don't forget it.
openc
Posts: 20
Joined: Mon Apr 12, 2010 11:11 pm
Location: Xenox university

Post by openc »

Thanks fmk. I have posted the same query in the other forum (feedback/suggestions) to remind you..
Post Reply