Hi there
I'm trying to perform model updating, for which I need eigenvalues and eigenvectors. The first ones are output in ascending order, but the eigenvectors have not the same output order as the eigenvalues. Is there a way to associate the output eigenvectors to the output eigenvalues? Thanks!
Order of eigenvectors
Moderators: silvia, selimgunay, Moderators
Re: Order of eigenvectors
Here's is a test: Cantilever beam, section 0.2x0.3 m2, L=10m, E=24GPa, G=10GPa, Ro=2400kg/m3; Izz=4.5e-4, Iyy=2e-4, J=4.695e-4. The stiffness and mass matrices are:
K =
[ E*A/L, 0, 0, 0, 0, 0]
[ 0, 12*E*Iy/L^3, 0, 0, 0, -6*E*Iy/L^2]
[ 0, 0, 12*E*Iz/L^3, 0, 6*E*Iz/L^2, 0]
[ 0, 0, 0, G*J/L, 0, 0]
[ 0, 0, 6*E*Iz/L^2, 0, 4*E*Iz/L, 0]
[ 0, -6*E*Iy/L^2, 0, 0, 0, 4*E*Iy/L]
K = [[144000000.0 0.0 0.0 0.0 0.0 0.0]
[0.0 57600.0 0.0 0.0 0.0 -288000.0]
[0.0 0.0 129600.0 0.0 648000.0 0.0]
[0.0 0.0 0.0 469500.0 0.0 0.0]
[0.0 0.0 648000.0 0.0 4320000.0 0.0]
[0.0 -288000.0 0.0 0.0 0.0 1920000.0]]
M = [[720.0 0.0 0.0 0.0 0.0 0.0]
[0.0 720.0 0.0 0.0 0.0 0.0]
[0.0 0.0 720.0 0.0 0.0 0.0]
[0.0 0.0 0.0 0.0 0.0 0.0]
[0.0 0.0 0.0 0.0 0.0 0.0]
[0.0 0.0 0.0 0.0 0.0 0.0]]
The eigenvalues in ascending order and their respective eigenvectors are:
w2 = [20.0 45.0 200000.0]
phi = [[0.00 -0.00 1.00]
[-1.00 -0.00 0.00]
[0.00 1.00 0.00]
[0.00 -0.00 0.00]
[0.00 -0.15 0.00]
[-0.15 -0.00 0.00]]
The attached code below shows the following results:
w2 = [20.0 45.0 200000.0]
phi = [[ -0.00 0.00 1.00];
[ -0.00 -1.00 0.00];
[ 1.00 0.00 0.00];
[ -0.00 0.00 0.00];
[ -0.15 0.00 0.00];
[ -0.00 -0.15 0.00]];
I think this is indicating that for opensees the degrees of freedom [1 2 3 4 5 6] correspond to [ux uz uy rx rz ry]
What do you think? The code is:
##### Begin Code #####
wipe
set numdof 6;
model basic -ndm 3 -ndf $numdof
set numNode 2;
node 1 -5 0 0;
node 2 5 0 0;
fix 1 1 1 1 1 1 1;
mass 1 720 720 720 0 0 0;
mass 2 720 720 720 0 0 0;
geomTransf Linear 1 -0.000000 1.000000 0.000000
set A 0.06;
set E 2.4e+010;
set G 1e+010;
set Iyy 0.00045;
set Izz 0.0002;
set J 0.000469531;
element elasticBeamColumn 1 1 2 $A $E $G $J $Iyy $Izz 1
set nodes " ";
for {set i 1} {$i <= $numNode} {incr i 1} {
lappend nodes $i
}
set dofs "1 2 3 4 5 6";
set numEigen 3;
set w2 [eigen -fullGenLapack $numEigen];
set eig "eigenvalues.txt";
set eigenvalues [open $eig "w"]
foreach i $w2 {
puts $eigenvalues " $i"
}
close $eigenvalues
for {set i 1} {$i <= $numEigen} {incr i 1} {
set eigv "eigenvector$i.txt";
set eigenvector [open $eigv "w"];
puts $eigenvector "% Eigenvectors mode $i. (numNodes * numDOFs)"
for {set j 1} {$j <= $numNode} {incr j 1} {
set modeshape [nodeEigenvector $j $i];
puts $eigenvector " $modeshape"
}
close $eigenvector
}
##### End of Code #####
K =
[ E*A/L, 0, 0, 0, 0, 0]
[ 0, 12*E*Iy/L^3, 0, 0, 0, -6*E*Iy/L^2]
[ 0, 0, 12*E*Iz/L^3, 0, 6*E*Iz/L^2, 0]
[ 0, 0, 0, G*J/L, 0, 0]
[ 0, 0, 6*E*Iz/L^2, 0, 4*E*Iz/L, 0]
[ 0, -6*E*Iy/L^2, 0, 0, 0, 4*E*Iy/L]
K = [[144000000.0 0.0 0.0 0.0 0.0 0.0]
[0.0 57600.0 0.0 0.0 0.0 -288000.0]
[0.0 0.0 129600.0 0.0 648000.0 0.0]
[0.0 0.0 0.0 469500.0 0.0 0.0]
[0.0 0.0 648000.0 0.0 4320000.0 0.0]
[0.0 -288000.0 0.0 0.0 0.0 1920000.0]]
M = [[720.0 0.0 0.0 0.0 0.0 0.0]
[0.0 720.0 0.0 0.0 0.0 0.0]
[0.0 0.0 720.0 0.0 0.0 0.0]
[0.0 0.0 0.0 0.0 0.0 0.0]
[0.0 0.0 0.0 0.0 0.0 0.0]
[0.0 0.0 0.0 0.0 0.0 0.0]]
The eigenvalues in ascending order and their respective eigenvectors are:
w2 = [20.0 45.0 200000.0]
phi = [[0.00 -0.00 1.00]
[-1.00 -0.00 0.00]
[0.00 1.00 0.00]
[0.00 -0.00 0.00]
[0.00 -0.15 0.00]
[-0.15 -0.00 0.00]]
The attached code below shows the following results:
w2 = [20.0 45.0 200000.0]
phi = [[ -0.00 0.00 1.00];
[ -0.00 -1.00 0.00];
[ 1.00 0.00 0.00];
[ -0.00 0.00 0.00];
[ -0.15 0.00 0.00];
[ -0.00 -0.15 0.00]];
I think this is indicating that for opensees the degrees of freedom [1 2 3 4 5 6] correspond to [ux uz uy rx rz ry]
What do you think? The code is:
##### Begin Code #####
wipe
set numdof 6;
model basic -ndm 3 -ndf $numdof
set numNode 2;
node 1 -5 0 0;
node 2 5 0 0;
fix 1 1 1 1 1 1 1;
mass 1 720 720 720 0 0 0;
mass 2 720 720 720 0 0 0;
geomTransf Linear 1 -0.000000 1.000000 0.000000
set A 0.06;
set E 2.4e+010;
set G 1e+010;
set Iyy 0.00045;
set Izz 0.0002;
set J 0.000469531;
element elasticBeamColumn 1 1 2 $A $E $G $J $Iyy $Izz 1
set nodes " ";
for {set i 1} {$i <= $numNode} {incr i 1} {
lappend nodes $i
}
set dofs "1 2 3 4 5 6";
set numEigen 3;
set w2 [eigen -fullGenLapack $numEigen];
set eig "eigenvalues.txt";
set eigenvalues [open $eig "w"]
foreach i $w2 {
puts $eigenvalues " $i"
}
close $eigenvalues
for {set i 1} {$i <= $numEigen} {incr i 1} {
set eigv "eigenvector$i.txt";
set eigenvector [open $eigv "w"];
puts $eigenvector "% Eigenvectors mode $i. (numNodes * numDOFs)"
for {set j 1} {$j <= $numNode} {incr j 1} {
set modeshape [nodeEigenvector $j $i];
puts $eigenvector " $modeshape"
}
close $eigenvector
}
##### End of Code #####
Re: Order of eigenvectors
Yes you can associate eigenvector with the specific eigenvalue by using node recorder and setting a $respType to "eigen i". Please look at the command manual:
http://opensees.berkeley.edu/wiki/index ... e_Recorder
http://opensees.berkeley.edu/wiki/index ... e_Recorder