Recorder for Period of building?

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

Moderators: silvia, selimgunay, Moderators

Post Reply
dobi3
Posts: 43
Joined: Tue Feb 26, 2008 6:37 pm
Location: University of Texas at Arlington

Recorder for Period of building?

Post by dobi3 »

Dear all,

I am modeling a 20-story frame and using the following procedure (as described in the manual) to obtain the building natural period:

# ------------PeriodFreq&Damping.tcl-----------------------------------------------------------------

# determine Natural Period, Frequency & damping parameters for SDOF

set $xDamp 0.02; # damping ratio (0.02-0.05-typical)

set lambda [eigen 1]

set omega [expr pow($lambda,0.5)]

set Tperiod [expr 2*$PI/$omega]; # period (sec.)

puts $Tperiod

Is there any way to get the value of the natural period in a separate data output file? I want to monitor its change during a dynamic analysis (I have geometric and material nonlinearities), which would be much easier if the data is in a separate file. Is there a recorder that would do this?

Thank you very much!
silvia
Posts: 3909
Joined: Tue Jan 11, 2005 7:44 am
Location: Degenkolb Engineers
Contact:

Post by silvia »

puts it to a file.
Silvia Mazzoni, PhD
Structural Consultant
Degenkolb Engineers
235 Montgomery Street, Suite 500
San Francisco, CA. 94104
dobi3
Posts: 43
Joined: Tue Feb 26, 2008 6:37 pm
Location: University of Texas at Arlington

Post by dobi3 »

But where? I do not specify a file name.

Thank you, Dr. Silvia!
silvia
Posts: 3909
Joined: Tue Jan 11, 2005 7:44 am
Location: Degenkolb Engineers
Contact:

Post by silvia »

this is Tcl stuff, here is an example of something i am working on:

set outFilename ${ProcessedDataDir}/iBaseShearData.out
set outFileID [open $outFilename w]
puts $outFileID $TimeShear
close $outFileID
Silvia Mazzoni, PhD
Structural Consultant
Degenkolb Engineers
235 Montgomery Street, Suite 500
San Francisco, CA. 94104
dobi3
Posts: 43
Joined: Tue Feb 26, 2008 6:37 pm
Location: University of Texas at Arlington

Post by dobi3 »

OK. I will try it. Thank you very much, Dr. Silvia!
dobi3
Posts: 43
Joined: Tue Feb 26, 2008 6:37 pm
Location: University of Texas at Arlington

Post by dobi3 »

Dr. Silvia, it did work. Thank you!

However, when I try the following (get the period at each time increment), my output file is enourmous (34 GB)

set TmaxAnalysis [expr 1.];
set lambda [eigen 1]; # eigenvalue mode 1
set omega [expr pow($lambda,0.5)];
set PI 3.14159265; # Define Pi
set Tperiod [expr 2*$PI/$omega]; # period (sec.)
puts $Tperiod

set outFilename Data/Period.out
set outFileID [open $outFilename w]
set controlTime [getTime];
while {$controlTime < $TmaxAnalysis} {
puts $outFileID $Tperiod
}
close $outFileID

Am I doing this wrong? I only apply distributed gravity load (in 10 steps) and lateral load (in 10 steps). The output file shouldn't be this big. Also, I cannot view the output information because NotePad does not support files that are this big.

Thank you very much!
fmk
Site Admin
Posts: 5884
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Post by fmk »

it is so large because you are stuck in the while loop, i.e. you don't break out of it because controlTime never changes and is always less than TmaxAnalysis.

why is the while loop there anyway?
dobi3
Posts: 43
Joined: Tue Feb 26, 2008 6:37 pm
Location: University of Texas at Arlington

Post by dobi3 »

I want to record the period at each time increment.

Thank you, Frank!
dobi3
Posts: 43
Joined: Tue Feb 26, 2008 6:37 pm
Location: University of Texas at Arlington

Post by dobi3 »

Should I apply the load inside the loop so that controlTime can change and reach TmaxAnalysis?
silvia
Posts: 3909
Joined: Tue Jan 11, 2005 7:44 am
Location: Degenkolb Engineers
Contact:

Post by silvia »

the point of the loop is to move your analysis forward in individual steps when you want to do something at each step.

look at the example from which you took the loop.
Silvia Mazzoni, PhD
Structural Consultant
Degenkolb Engineers
235 Montgomery Street, Suite 500
San Francisco, CA. 94104
Post Reply