eigenvalues
Moderators: silvia, selimgunay, Moderators
eigenvalues
Dear fmk
I modeled RC frame (2D) and need for eigenvalue of frame. Opensees 2.2.1 can calculated all eigenvalues.But I do not know how I can obtain these and write these in output file.
How can I obtain these by recorder or other command and save in output file?
Thanks.
I modeled RC frame (2D) and need for eigenvalue of frame. Opensees 2.2.1 can calculated all eigenvalues.But I do not know how I can obtain these and write these in output file.
How can I obtain these by recorder or other command and save in output file?
Thanks.
-
- Posts: 82
- Joined: Fri Aug 14, 2009 12:11 am
- Location: iiees
suppose f11 and other values are obtained so :
set d5 "Data/modalforce1.txt"
set modalforce1 [open $d5 a]
puts $modalforce1 "f11 : $f11 f21 : $f21 f31 : $f31"
close $modalforce1
or :
set d5 "Data/modalforce1.txt"
set modalforce1 [open $d5 a]
puts $modalforce1 "f21 : $f21"
puts $modalforce1 "f31 : $f31"
close $modalforce1
set d5 "Data/modalforce1.txt"
set modalforce1 [open $d5 a]
puts $modalforce1 "f11 : $f11 f21 : $f21 f31 : $f31"
close $modalforce1
or :
set d5 "Data/modalforce1.txt"
set modalforce1 [open $d5 a]
puts $modalforce1 "f21 : $f21"
puts $modalforce1 "f31 : $f31"
close $modalforce1
kt
-
- Posts: 35
- Joined: Fri Mar 20, 2009 6:46 am
- Location: iem
Here is the way to get eigenvalues, save periods in the file Periods.txt, and record eigenvectors. You have to set number of modes (numModes) and the range of nodes whose eigenvectors you want to record.
set numModes 3
# perform eigen analysis
#-----------------------------
set lambda [eigen $numModes];
# calculate frequencies and periods of the structure
#-------------------------------------------------------------
set omega {}
set f {}
set T {}
set pi 3.141593
foreach lam $lambda {
lappend omega [expr sqrt($lam)]
lappend f [expr sqrt($lam)/(2*$pi)]
lappend T [expr (2*$pi)/sqrt($lam)]
}
# write the output file cosisting of periods
#---------------------------------------------------
set period "Periods.txt"
set Periods [open $period "w"]
foreach t $T {
puts $Periods " $t"
}
close $Periods
# record eigenvectors
#-------------------------
for { set k 1 } { $k <= $numModes } { incr k } {
recorder Node -file [format "mode%i.out" $k] -nodeRange 1 6 -dof 1 2 3 "eigen $k"
}
set numModes 3
# perform eigen analysis
#-----------------------------
set lambda [eigen $numModes];
# calculate frequencies and periods of the structure
#-------------------------------------------------------------
set omega {}
set f {}
set T {}
set pi 3.141593
foreach lam $lambda {
lappend omega [expr sqrt($lam)]
lappend f [expr sqrt($lam)/(2*$pi)]
lappend T [expr (2*$pi)/sqrt($lam)]
}
# write the output file cosisting of periods
#---------------------------------------------------
set period "Periods.txt"
set Periods [open $period "w"]
foreach t $T {
puts $Periods " $t"
}
close $Periods
# record eigenvectors
#-------------------------
for { set k 1 } { $k <= $numModes } { incr k } {
recorder Node -file [format "mode%i.out" $k] -nodeRange 1 6 -dof 1 2 3 "eigen $k"
}
-
- Posts: 35
- Joined: Fri Mar 20, 2009 6:46 am
- Location: iem
Dear everyone,
I have another new question again.I run my input files with the method,but I just got the Periods.
When I run
# record eigenvectors
#-------------------------
for {set k 1 } {$k<=$numModes } { incr k } {
recorder Node -file data/[format "mode%i.out" $k] -nodeRange 11 30 -dof 1 2 3 "eigen $k"
}
I got nothing(the files are empty).
Whether this error have anthing with my model?
So any suggestions?
Thank you!
I have another new question again.I run my input files with the method,but I just got the Periods.
When I run
# record eigenvectors
#-------------------------
for {set k 1 } {$k<=$numModes } { incr k } {
recorder Node -file data/[format "mode%i.out" $k] -nodeRange 11 30 -dof 1 2 3 "eigen $k"
}
I got nothing(the files are empty).
Whether this error have anthing with my model?
So any suggestions?
Thank you!
-
- Posts: 35
- Joined: Fri Mar 20, 2009 6:46 am
- Location: iem
This is my model:
wipe;
model basic -ndm 3 -ndf 6;
logFile errorFile
node 1 0 0 0
node 2 0 0 100
mass 2 2.0e4 2.0e4 2.0e4 2.0e4 2.0e4 2.0e4;
fix 1 1 1 1 1 1 1
set GJ 1.0e20;
uniaxialMaterial Elastic 100 $GJ;
uniaxialMaterial Concrete04 1 -2.68e+7 -0.002 -0.004 3.25e10 2.39e+6 0.0001 0.1
uniaxialMaterial Concrete04 10 -3.08e+7 -0.0035 -0.01 3.25e10 2.39e+6 0.0001 0.1
uniaxialMaterial Concrete04 11 -2.81e+7 -0.0025 -0.01 3.25e10 2.39e+6 0.0001 0.1
uniaxialMaterial Steel01 17 2.35e+8 2.1e+11 0.01
geomTransf Linear 5 1 0 0;
section Fiber 101 {;
#the cover
patch quad 1 7 1 -3.35 -6 3.35 -6 3.29 -5.94 -3.29 -5.94
patch quad 1 17 1 3.35 -6 3.35 6 3.29 5.94 3.29 -5.94
patch quad 1 7 1 3.35 6 -3.35 6 -3.29 5.94 3.29 5.94
patch quad 1 17 1 -3.35 6 -3.35 -6 -3.29 -5.94 -3.29 5.94
#the core
patch quad 11 2 2 -0.92 3.94 0.92 3.94 0.92 5.94 -0.92 5.94
patch quad 11 2 2 -0.92 -5.94 0.92 -5.94 0.92 -3.94 -0.92 -3.94
patch quad 10 3 17 -3.29 -5.94 -0.92 -5.94 -0.92 5.94 -3.29 5.94
patch quad 10 3 17 0.92 -5.94 3.29 -5.94 3.29 5.94 0.92 5.94
#the steel
layer straight 17 93 0.000201 3.29 5.74 3.29 -5.74
layer straight 17 93 0.000201 -3.29 5.74 -3.29 -5.74
layer straight 17 51 0.001232 3.29 5.94 -3.29 5.94
layer straight 17 51 0.001232 3.29 -5.94 -3.29 -5.94
layer straight 17 81 0.000201 -2.6 5.25 -2.6 -5.25
layer straight 17 81 0.000201 2.6 5.25 2.6 -5.25
layer straight 17 37 0.000201 -2.6 5.25 2.6 5.25
layer straight 17 37 0.000201 -2.6 -5.25 2.6 -5.25
layer straight 17 79 0.000201 -0.92 5.12 -0.92 -5.12
layer straight 17 79 0.000201 0.92 5.12 0.92 -5.12
layer straight 17 35 0.000402 -2.49 -3.94 2.49 -3.94
layer straight 17 35 0.000402 -2.49 3.94 2.49 3.94
};
section Aggregator 1101 100 T -section 101;
element nonlinearBeamColumn 1 1 2 5 1101 5 -mass 83029.23;
set lambda [eigen 1]
set omega [expr pow($lambda,0.5)]
set Tperiod [expr 2*3.14/$omega]
puts $Tperiod
for {set k 1 } {$k<=12 } { incr k } {
recorder Node -file data/[format "mode%i.out" $k] -node 2 -dof 1 2 3 4 5 6 "eigen $k"
}
Thank you!
wipe;
model basic -ndm 3 -ndf 6;
logFile errorFile
node 1 0 0 0
node 2 0 0 100
mass 2 2.0e4 2.0e4 2.0e4 2.0e4 2.0e4 2.0e4;
fix 1 1 1 1 1 1 1
set GJ 1.0e20;
uniaxialMaterial Elastic 100 $GJ;
uniaxialMaterial Concrete04 1 -2.68e+7 -0.002 -0.004 3.25e10 2.39e+6 0.0001 0.1
uniaxialMaterial Concrete04 10 -3.08e+7 -0.0035 -0.01 3.25e10 2.39e+6 0.0001 0.1
uniaxialMaterial Concrete04 11 -2.81e+7 -0.0025 -0.01 3.25e10 2.39e+6 0.0001 0.1
uniaxialMaterial Steel01 17 2.35e+8 2.1e+11 0.01
geomTransf Linear 5 1 0 0;
section Fiber 101 {;
#the cover
patch quad 1 7 1 -3.35 -6 3.35 -6 3.29 -5.94 -3.29 -5.94
patch quad 1 17 1 3.35 -6 3.35 6 3.29 5.94 3.29 -5.94
patch quad 1 7 1 3.35 6 -3.35 6 -3.29 5.94 3.29 5.94
patch quad 1 17 1 -3.35 6 -3.35 -6 -3.29 -5.94 -3.29 5.94
#the core
patch quad 11 2 2 -0.92 3.94 0.92 3.94 0.92 5.94 -0.92 5.94
patch quad 11 2 2 -0.92 -5.94 0.92 -5.94 0.92 -3.94 -0.92 -3.94
patch quad 10 3 17 -3.29 -5.94 -0.92 -5.94 -0.92 5.94 -3.29 5.94
patch quad 10 3 17 0.92 -5.94 3.29 -5.94 3.29 5.94 0.92 5.94
#the steel
layer straight 17 93 0.000201 3.29 5.74 3.29 -5.74
layer straight 17 93 0.000201 -3.29 5.74 -3.29 -5.74
layer straight 17 51 0.001232 3.29 5.94 -3.29 5.94
layer straight 17 51 0.001232 3.29 -5.94 -3.29 -5.94
layer straight 17 81 0.000201 -2.6 5.25 -2.6 -5.25
layer straight 17 81 0.000201 2.6 5.25 2.6 -5.25
layer straight 17 37 0.000201 -2.6 5.25 2.6 5.25
layer straight 17 37 0.000201 -2.6 -5.25 2.6 -5.25
layer straight 17 79 0.000201 -0.92 5.12 -0.92 -5.12
layer straight 17 79 0.000201 0.92 5.12 0.92 -5.12
layer straight 17 35 0.000402 -2.49 -3.94 2.49 -3.94
layer straight 17 35 0.000402 -2.49 3.94 2.49 3.94
};
section Aggregator 1101 100 T -section 101;
element nonlinearBeamColumn 1 1 2 5 1101 5 -mass 83029.23;
set lambda [eigen 1]
set omega [expr pow($lambda,0.5)]
set Tperiod [expr 2*3.14/$omega]
puts $Tperiod
for {set k 1 } {$k<=12 } { incr k } {
recorder Node -file data/[format "mode%i.out" $k] -node 2 -dof 1 2 3 4 5 6 "eigen $k"
}
Thank you!
In order to record any response quantity in OpenSess at least one step of analysis has to be performed.
Add this to the end of your file and it will work:
integrator LoadControl 0 1 0 0
test EnergyIncr 1.0e-10 100 0
algorithm Newton
numberer RCM
constraints Transformation
system ProfileSPD
analysis Static
analyze 1
Add this to the end of your file and it will work:
integrator LoadControl 0 1 0 0
test EnergyIncr 1.0e-10 100 0
algorithm Newton
numberer RCM
constraints Transformation
system ProfileSPD
analysis Static
analyze 1