Running Multiple Ground Motions in 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
davidli506
Posts: 8
Joined: Mon Jan 04, 2010 2:17 pm
Location: SFSU

Running Multiple Ground Motions in Analysis

Post by davidli506 »

Hello All,

I am trying to run two different ground motions in a time history analysis of a structure. The recorded displacements will be in two different output files. I am having trouble running the second ground motion once the first ground motion is finished running. I have tried putting "wipeAnalysis" and "wipe" before running the second ground motion, but it did not fix the problem.

What should I do to have the program analyze one ground motion on the structure and then analyze a second structure without having to stop running or exiting? Thank you in advance.

Regards,
David
vesna
Posts: 3033
Joined: Tue May 23, 2006 11:23 am
Location: UC Berkeley

Re: Running Multiple Ground Motions in Analysis

Post by vesna »

Define your ground motion files and call them in foreach loop. Build your model inside of foreach loop. To save the output in two different folders do something like this:

set j 0
foreach GM { GM1 GM2 } {

puts "Ground motion: $GM"

model basic -ndm 2 -ndf 3
wipe
.....
incr j 1
set dataDir [format "GM%i" $j ]
file mkdir $dataDir; # create data directory
.....
recorder Node -file [format "$dataDir/DispGM%i.out" $j ] -time -node 3 -dof 1 disp; #records displacement

......

}
Post Reply