The problem during dynamic history 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
ionwang
Posts: 16
Joined: Wed Mar 25, 2009 7:40 am
Location: HIT

The problem during dynamic history analysis

Post by ionwang »

Hello everybody,

I try a simple example to understand the dynamic history analysis, the odd result comes out. In the test, I decompose the whole series to several series and use "for-loop" to connect them again. The testing model is "Ex1a.Canti2D".

Does anybody know the reason of inducing the difference?

Here is the code.

wipe; # clear opensees model
model basic -ndm 2 -ndf 3; # 2 dimensions, 3 dof per node
file mkdir data; # create data directory

# define GEOMETRY -------------------------------------------------------------
# nodal coordinates:
node 1 0 0; # node#, X Y
node 2 0 432

# Single point constraints -- Boundary Conditions
fix 1 1 1 1; # node DX DY RZ

# nodal masses:
mass 2 5.18 1.e-9 0.; # node#, Mx My Mz, Mass=Weight/g.

# Define ELEMENTS -------------------------------------------------------------
# define geometric transformation: performs a linear geometric transformation of beam stiffness and resisting force from the basic system to the global-coordinate system
geomTransf Linear 1; # associate a tag to transformation

# connectivity: (make A very large, 10e6 times its actual value)
element elasticBeamColumn 1 1 2 3600000000 4227 1080000 1; # element elasticBeamColumn $eleTag $iNode $jNode $A $E $Iz $transfTag

# Define RECORDERS -------------------------------------------------------------
recorder Node -file Data/DFree2.out -time -node 2 -dof 1 2 3 disp; # displacements of free nodes
recorder Node -file Data/VFree2.out -time -node 2 -dof 1 2 3 vel;
recorder Node -file Data/DBase2.out -time -node 1 -dof 1 2 3 disp; # displacements of support nodes
recorder Node -file Data/RBase2.out -time -node 1 -dof 1 2 3 reaction; # support reaction
recorder Drift -file Data/Drift2.out -time -iNode 1 -jNode 2 -dof 1 -perpDirn 2 ; # lateral drift
recorder Element -file Data/FCol2.out -time -ele 1 globalForce; # element forces -- column
recorder Element -file Data/DCol2.out -time -ele 1 deformation; # element deformations -- column

# define GRAVITY -------------------------------------------------------------
pattern Plain 1 Linear {
load 2 0. -2000. 0.; # node#, FX FY MZ -- superstructure-weight
}
constraints Plain; # how it handles boundary conditions
numberer Plain; # renumber dof's to minimize band-width (optimization), if you want to
system BandGeneral; # how to store and solve the system of equations in the analysis
test NormDispIncr 1.0e-8 6 ; # determine if convergence has been achieved at the end of an iteration step
algorithm Newton; # use Newton's solution algorithm: updates tangent stiffness at every iteration
integrator LoadControl 0.1; # determine the next time step for an analysis, # apply gravity in 10 steps
analysis Static # define type of analysis static or transient
analyze 10; # perform gravity analysis
loadConst -time 0.0; # hold gravity constant and restart time

rayleigh 0. 0. 0. [expr 2*0.02/pow([eigen 1],0.5)]; # set damping based on first eigen mode

# DYNAMIC history analysis -------------------------------------------------------------
# create load list
set loadlist "0.1 1.0 3.0 20.0 80.0 100.0 70.0 30.0 -40.0 -70.0 -20.0 10.0 0.0 ";


# create the analysis
wipeAnalysis; # clear previously-define analysis parameters
constraints Plain; # how it handles boundary conditions
numberer Plain; # renumber dof's to minimize band-width (optimization), if you want to
system BandGeneral; # how to store and solve the system of equations in the analysis
test NormDispIncr 1.0e-8 10; # determine if convergence has been achieved at the end of an iteration step
algorithm Newton; # use Newton's solution algorithm: updates tangent stiffness at every iteration
integrator Newmark 0.5 0.25 ; # determine the next time step for an analysis
analysis Transient; # define type of analysis: time-dependent

set DtAnalysis [expr 0.02]; # time-step Dt
set Nstep [llength $loadlist];

pattern Plain 100 "Series -time $DtAnalysis -values $loadlist -factor 100" {
load 2 1.0 0. 0.;
}
analyze $Nstep $DtAnalysis;

puts "Done!"

*********************************************************
*********************************************************
wipe; # clear opensees model
model basic -ndm 2 -ndf 3; # 2 dimensions, 3 dof per node
file mkdir data; # create data directory

# define GEOMETRY -------------------------------------------------------------
# nodal coordinates:
node 1 0 0; # node#, X Y
node 2 0 432

# Single point constraints -- Boundary Conditions
fix 1 1 1 1; # node DX DY RZ

# nodal masses:
mass 2 5.18 1.e-9 0.; # node#, Mx My Mz, Mass=Weight/g.

# Define ELEMENTS -------------------------------------------------------------
# define geometric transformation: performs a linear geometric transformation of beam stiffness and resisting force from the basic system to the global-coordinate system
geomTransf Linear 1; # associate a tag to transformation

# connectivity: (make A very large, 10e6 times its actual value)
element elasticBeamColumn 1 1 2 3600000000 4227 1080000 1; # element elasticBeamColumn $eleTag $iNode $jNode $A $E $Iz $transfTag

# Define RECORDERS -------------------------------------------------------------
recorder Node -file Data/DFree1.out -time -node 2 -dof 1 2 3 disp; # displacements of free nodes
recorder Node -file Data/VFree1.out -time -node 2 -dof 1 2 3 vel;
recorder Node -file Data/DBase1.out -time -node 1 -dof 1 2 3 disp; # displacements of support nodes
recorder Node -file Data/RBase1.out -time -node 1 -dof 1 2 3 reaction; # support reaction
recorder Drift -file Data/Drift1.out -time -iNode 1 -jNode 2 -dof 1 -perpDirn 2 ; # lateral drift
recorder Element -file Data/FCol1.out -time -ele 1 globalForce; # element forces -- column
recorder Element -file Data/DCol1.out -time -ele 1 deformation; # element deformations -- column

# define GRAVITY -------------------------------------------------------------
pattern Plain 1 Linear {
load 2 0. -2000. 0.; # node#, FX FY MZ -- superstructure-weight
}
constraints Plain; # how it handles boundary conditions
numberer Plain; # renumber dof's to minimize band-width (optimization), if you want to
system BandGeneral; # how to store and solve the system of equations in the analysis
test NormDispIncr 1.0e-8 6 ; # determine if convergence has been achieved at the end of an iteration step
algorithm Newton; # use Newton's solution algorithm: updates tangent stiffness at every iteration
integrator LoadControl 0.1; # determine the next time step for an analysis, # apply gravity in 10 steps
analysis Static # define type of analysis static or transient
analyze 10; # perform gravity analysis
loadConst -time 0.0; # hold gravity constant and restart time

rayleigh 0. 0. 0. [expr 2*0.02/pow([eigen 1],0.5)]; # set damping based on first eigen mode

# DYNAMIC history analysis -------------------------------------------------------------
# create load list
set loadlist "0.1 1.0 3.0 20.0 80.0 100.0 70.0 30.0 -40.0 -70.0 -20.0 10.0 0.0 ";


# create the analysis
wipeAnalysis; # clear previously-define analysis parameters
constraints Plain; # how it handles boundary conditions
numberer Plain; # renumber dof's to minimize band-width (optimization), if you want to
system BandGeneral; # how to store and solve the system of equations in the analysis
test NormDispIncr 1.0e-8 10; # determine if convergence has been achieved at the end of an iteration step
algorithm Newton; # use Newton's solution algorithm: updates tangent stiffness at every iteration
integrator Newmark 0.5 0.25 ; # determine the next time step for an analysis
analysis Transient; # define type of analysis: time-dependent

set DtAnalysis [expr 0.02]; # time-step Dt
set Nstep [llength $loadlist];

for {set i 1} {$i <= $Nstep} {incr i 1} {
set timelist "[format {%5.2f} [getTime]] [format {%5.2f} [expr [getTime]+$DtAnalysis]]"
puts $timelist
if {$i == 1} {
set loadinput "0 [lindex $loadlist 0]";
} else {
set loadinput "[lindex $loadlist [expr $i-2]] [lindex $loadlist [expr $i-1]]";
}
puts $loadinput
pattern Plain [expr $i+1000] "Series -time $timelist -values $loadinput -factor 100" {
load 2 1.0 0. 0.;
}
analyze 1 $DtAnalysis;
}
puts "Done!"
silvia
Posts: 3909
Joined: Tue Jan 11, 2005 7:44 am
Location: Degenkolb Engineers
Contact:

Post by silvia »

i don't understand the question.
Silvia Mazzoni, PhD
Structural Consultant
Degenkolb Engineers
235 Montgomery Street, Suite 500
San Francisco, CA. 94104
ionwang
Posts: 16
Joined: Wed Mar 25, 2009 7:40 am
Location: HIT

Post by ionwang »

Sorry about that.
The question is:
*(1)We can use the Series command to execute a dynamic history analysis under a series loading. Such as:
set DtAnalysis [expr 0.02]; # time-step Dt
set Nstep [llength $loadlist];
pattern Plain 100 "Series -time $DtAnalysis -values $loadlist -factor 100" {
load 2 1.0 0. 0.;
}
analyze $Nstep $DtAnalysis;

*(2) On the other hand, i want to use "for-loop" to complete this process.
So i need decompose the whole series into a series of short segments(for example: the origin series is "0. 0.1 0.3 0.4 0.8 0.9",after decomposing, it is "0. 0.1", "0.1 0.3", "0.3 0.4", "0.4 0.8", "0.8 0.9" ). the code is as following.

for {set i 1} {$i <= $Nstep} {incr i 1} {
set timelist "[format {%5.2f} [getTime]] [format {%5.2f} [expr [getTime]+$DtAnalysis]]" ##get each time segement corresponding to the loading data segment.
puts $timelist
if {$i == 1} {
set loadinput "0 [lindex $loadlist 0]";
} else {
set loadinput "[lindex $loadlist [expr $i-2]] [lindex $loadlist [expr $i-1]]";
} #get each loading data segment
puts $loadinput
pattern Plain [expr $i+1000] "Series -time $timelist -values $loadinput -factor 100" {
load 2 1.0 0. 0.;
}
analyze 1 $DtAnalysis;
}


***I thought the results would be same, but it did not. The results were totally different.
I wonder the reason of this difference.
silvia
Posts: 3909
Joined: Tue Jan 11, 2005 7:44 am
Location: Degenkolb Engineers
Contact:

Post by silvia »

try it on a simple model.
Silvia Mazzoni, PhD
Structural Consultant
Degenkolb Engineers
235 Montgomery Street, Suite 500
San Francisco, CA. 94104
ionwang
Posts: 16
Joined: Wed Mar 25, 2009 7:40 am
Location: HIT

Post by ionwang »

Silvia,
I have tried it using "Ex1a.Canti2D". The response of free node 2 is different due to these two ways. I'm confused on this. I don't know the reason. Could you help me to figure out this problem?

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

Post by silvia »

please e-mail me the script.
Silvia Mazzoni, PhD
Structural Consultant
Degenkolb Engineers
235 Montgomery Street, Suite 500
San Francisco, CA. 94104
ionwang
Posts: 16
Joined: Wed Mar 25, 2009 7:40 am
Location: HIT

Post by ionwang »

Silvia,
I have sent the script to your "silvia at peer dot berkeley dat edu"

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

Post by silvia »

nope, old address. use opensees-support at berkeley dot edu.

however, i'm in the midst of preparing for heading out to L'aquila next week, so i won't be able to look at it until i return on the 24th.
please try to put some puts here and there to test your algorithm.
Silvia Mazzoni, PhD
Structural Consultant
Degenkolb Engineers
235 Montgomery Street, Suite 500
San Francisco, CA. 94104
ionwang
Posts: 16
Joined: Wed Mar 25, 2009 7:40 am
Location: HIT

Post by ionwang »

That is OK.

In first floor I have posted the integrated code. This example is based on "Ex1a.Canti2D". The transient analysis parameters is the same as "Ex1a.Canti2D.EQ". I just change the "pattern" and "analyze" parts.

The point is how the transient analysis invokes the Series load. The interpolation should be used to handle the series. So I keep to use the path time series command rather than to use the rectanglular time series.
I hope the same results, not the approximated results. However, it doesn't work. Under the "for-loop" load, the response is all zero.
Post Reply