Time history analysis
Moderators: silvia, selimgunay, Moderators
Time history analysis
Hi all;
I wanted to impose a dynamic force on one of the nodes of my structure and do dynamic time history analysis. But the velocity and acceleration that I get seems wrong. To figure it out, I defined a simple example. force.txt is the text file of function : F=10*sin(2*pi*t) with dt=1/20. I assumed that mass is negligible, so that I can compare the results with static analysis as well.
Could you help me plz?
model BasicBuilder ndm 2 ndf 3
set A1 1
set E 29000000
set mass1 .0001
set I1 1
node 1 0.0 0.0 mass $mass1 $mass1 0.0
node 2 0.0 9.0 mass $mass1 $mass1 0.0
fix 1 1 1 1
geomTransf Linear 10
element elasticBeamColumn 1 1 2 $A1 $E $I1 10
pattern Plain 1 "Series dt 0.05 filePath force.txt " {
load 2 1 0 0
}
recorder Node file point_2_disp.out node 2 dof 1 disp
recorder Node file point_2_vel.out node 2 dof 1 vel
recorder Node file point_2_acce.out node 2 dof 1 accel
integrator Newmark 0.5 0.25
test EnergyIncr 1.0e6 20 1
algorithm Linear
numberer Plain
constraints Transformation 1.0
system SparseGeneral
analysis Transient
for {set i 1} {$i <= 20} {incr i 1} {
analyze 1 0.05
}
wipe all
I wanted to impose a dynamic force on one of the nodes of my structure and do dynamic time history analysis. But the velocity and acceleration that I get seems wrong. To figure it out, I defined a simple example. force.txt is the text file of function : F=10*sin(2*pi*t) with dt=1/20. I assumed that mass is negligible, so that I can compare the results with static analysis as well.
Could you help me plz?
model BasicBuilder ndm 2 ndf 3
set A1 1
set E 29000000
set mass1 .0001
set I1 1
node 1 0.0 0.0 mass $mass1 $mass1 0.0
node 2 0.0 9.0 mass $mass1 $mass1 0.0
fix 1 1 1 1
geomTransf Linear 10
element elasticBeamColumn 1 1 2 $A1 $E $I1 10
pattern Plain 1 "Series dt 0.05 filePath force.txt " {
load 2 1 0 0
}
recorder Node file point_2_disp.out node 2 dof 1 disp
recorder Node file point_2_vel.out node 2 dof 1 vel
recorder Node file point_2_acce.out node 2 dof 1 accel
integrator Newmark 0.5 0.25
test EnergyIncr 1.0e6 20 1
algorithm Linear
numberer Plain
constraints Transformation 1.0
system SparseGeneral
analysis Transient
for {set i 1} {$i <= 20} {incr i 1} {
analyze 1 0.05
}
wipe all
Shahidi
Re: Time history analysis
Your code looks good to me and does exactly what you want. Did you try computing accelerations and velocities manually to compare with the OpenSees results?
Re: Time history analysis
Yes, It looks fine but the results I get with this code is wrong.
I assumed the mass is negligible, so I found the displacement , velocity and acceleration by running a number of static analysis.
And also, since the force function is harmonic , I expect to get cosine function for velocity and sine function for acceleration.
Nodal displacements from time history analysis are the same from the static analysis(done iteratively).
but velocity and acceleration from time history analysis do not match the static case and the harmonic expectations as well!
What may be wrong in the integration or in my definition of time history analysis?
I assumed the mass is negligible, so I found the displacement , velocity and acceleration by running a number of static analysis.
And also, since the force function is harmonic , I expect to get cosine function for velocity and sine function for acceleration.
Nodal displacements from time history analysis are the same from the static analysis(done iteratively).
but velocity and acceleration from time history analysis do not match the static case and the harmonic expectations as well!
What may be wrong in the integration or in my definition of time history analysis?
Shahidi
Re: Time history analysis
Ok, here is an example from Prof. Chopra's book (Example 5.4) where at the top of the cantilever column I apply halfsine force. This way you can compare OpenSees results with the ones from the book.
wipe
model BasicBuilder ndm 2 ndf 3
set A1 1.0
set E [expr 10./3.]
set mass1 0.2533
set I1 1.0
set pi 3.14
node 1 0.0 0.0
node 2 0.0 1.0 mass $mass1 0.0 0.0
fix 1 1 1 1
geomTransf Linear 10
element elasticBeamColumn 1 1 2 $A1 $E $I1 10
timeSeries Trig 1 0.0 0.6 1.2 factor 10.0
pattern Plain 1 1 {
load 2 1.0 0. 0.
}
recorder Node file point_2_disp.out time node 2 dof 1 disp
recorder Node file point_2_vel.out time node 2 dof 1 vel
recorder Node file point_2_acce.out time node 2 dof 1 accel
set lambda [eigen fullGenLapack 1]
set T [expr (2*$pi)/sqrt($lambda)]
puts "T = $T"
set freq [expr sqrt($lambda)]
set dampRatio 0.05
rayleigh 0. 0. 0. [expr 2*$dampRatio/$freq]
integrator Newmark 0.5 [expr 1./6.]
test EnergyIncr 1.0e6 20 1
algorithm Linear
numberer Plain
constraints Plain
system BandGeneral
analysis Transient
analyze 10 0.1
print node 2
wipe
model BasicBuilder ndm 2 ndf 3
set A1 1.0
set E [expr 10./3.]
set mass1 0.2533
set I1 1.0
set pi 3.14
node 1 0.0 0.0
node 2 0.0 1.0 mass $mass1 0.0 0.0
fix 1 1 1 1
geomTransf Linear 10
element elasticBeamColumn 1 1 2 $A1 $E $I1 10
timeSeries Trig 1 0.0 0.6 1.2 factor 10.0
pattern Plain 1 1 {
load 2 1.0 0. 0.
}
recorder Node file point_2_disp.out time node 2 dof 1 disp
recorder Node file point_2_vel.out time node 2 dof 1 vel
recorder Node file point_2_acce.out time node 2 dof 1 accel
set lambda [eigen fullGenLapack 1]
set T [expr (2*$pi)/sqrt($lambda)]
puts "T = $T"
set freq [expr sqrt($lambda)]
set dampRatio 0.05
rayleigh 0. 0. 0. [expr 2*$dampRatio/$freq]
integrator Newmark 0.5 [expr 1./6.]
test EnergyIncr 1.0e6 20 1
algorithm Linear
numberer Plain
constraints Plain
system BandGeneral
analysis Transient
analyze 10 0.1
print node 2
Re: Time history analysis
Dear vesna,
Thanks for your help.
just another question, I decreased the mass in your example to model a massless system, this time if you check the acceleration data you see there is a stability problem, even with average acceleration method. Do you have any idea? Because I wanted to use this method in my project with assumption of very small mass, and I could not get the acceleration right!
Thanks for your help.
just another question, I decreased the mass in your example to model a massless system, this time if you check the acceleration data you see there is a stability problem, even with average acceleration method. Do you have any idea? Because I wanted to use this method in my project with assumption of very small mass, and I could not get the acceleration right!
Shahidi
Re: Time history analysis
All this numerical methods are sentive to (time increment)/(fundamental period). If it is a big number as in you case it won't work. If you are decreasing a period you have to decrease a time increment as well for analysis to work.
Re: Time history analysis
As I said, I am using average acceleration method and based on chapter 5 of Chopra's book with this method we dont expect to have instability in the response regardless of time step length! So, I dont understand what is happening here.
Shahidi
Re: Time history analysis
The problem you have is not stability issue. It is numerical error issue. It is advisable to start with a time increment of 0.1*(Tn) and to reduce it if necessary until you reach the solution.

 Posts: 93
 Joined: Mon Apr 14, 2008 10:53 pm
Re: Time history analysis
Dear vesna
You modeled example 5.4 from Prof. Chopra's book. When I run your script, opensees doesn’t give any error message. But output files are empty. I use opensees 2.2.2. would you please tell me what the problem is?
Thank you.
You modeled example 5.4 from Prof. Chopra's book. When I run your script, opensees doesn’t give any error message. But output files are empty. I use opensees 2.2.2. would you please tell me what the problem is?
Thank you.
Re: Time history analysis
i also have this problem. but if you consider the $numIncr=1000, then the output files are not empty. i do not know why this happens.
meanwhile the results of opensees is not coincident with those obtained by Chopra's book, exactly. in your opinion, what is caused the difference? Both opensees and example are using the linear acceleration method.
meanwhile the results of opensees is not coincident with those obtained by Chopra's book, exactly. in your opinion, what is caused the difference? Both opensees and example are using the linear acceleration method.
Re: Time history analysis
type "wipe" at the end of the file and you will see the results
Re: Time history analysis
When I run this program I am getting the exact same results as given in the book in Table E5.4.