0% found this document useful (0 votes)
156 views26 pages

SID-2015-Tutorial 3-Ruaumoko and Dynaplot in Batch Mode

Running analyses in Ruaumoko and Dynaplot using batch mode allows running hundreds of analyses with minimal user input. Key information like the output file name, input model and loading are specified for each analysis in the batch file. Dynaplot batch mode uses a log file to record keystrokes for post-processing. Periods and other results can be automatically obtained from the .wri output file using code like MATLAB, avoiding manual data extraction. This expedites running and processing multiple analyses.

Uploaded by

Diego Rojas
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
156 views26 pages

SID-2015-Tutorial 3-Ruaumoko and Dynaplot in Batch Mode

Running analyses in Ruaumoko and Dynaplot using batch mode allows running hundreds of analyses with minimal user input. Key information like the output file name, input model and loading are specified for each analysis in the batch file. Dynaplot batch mode uses a log file to record keystrokes for post-processing. Periods and other results can be automatically obtained from the .wri output file using code like MATLAB, avoiding manual data extraction. This expedites running and processing multiple analyses.

Uploaded by

Diego Rojas
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 26

Running Ruaumoko and Dynaplot in

Batch Mode and Linking with


Computer Programming
Seismic Isolation and Damping

ROSE Programme, UME School

David Welch
PhD. Candidate

June 18, 2015


Overview
• What is Batch Mode and Why Use It?
• Running Ruaumoko in Batch Mode
• Dynaplot in Batch Mode: The Log File
• Using computer programming (MATLAB) to
expedite the entire process
• The .WRI Output File
What is Batch Mode?
Batch Mode allows for simple
executables (.exe) applications to be
run from a MS-DOS command window

A BATCH FILE (.bat) provides the


appropriate files or keystrokes required
by the .EXE

Lots of analysis and


post-processing
carried out from a
single double click!
What is Batch Mode?
A paraphrase from Prof. Athol Carr (Ruaumoko Creator):

“… As many such command lines may be arranged in a


.bat (Batch) file, the best example was a visitor to the
department [Univ. of Canterbury] who set up 475 runs in
a batch file and went away for days skiing.”
-Athol Carr
(excerpt from RUAUMOKO2D Manual)

*RUAUMOKO and DYNAPLOT were made for batch mode


USE IT!!!
Ruaumoko in Batch Mode
Running analysis in Ruaumoko from a batch file requires
only the name (or directory) of three different files for
each run within a set of analyses:

RUAUMOKO RUAUMOKO TIME HISTORY


OUTPUT FILE INPUT FILE LOADING
e.g. Building_2014.wri e.g. Building_2014.txt e.g. EL40NSC.eqb

Where is it storing the What does RUAUMOKO What is the loading


output file? have to do? (accelerogram) ?

*NOTE: In batch mode, the results (.RES) file will be the


same as the .WRI file but with a different extension
Ruaumoko in Batch Mode (Cont’d)
So what does the batch file look like?
(Lets assume 3 input motions, REC1.txt, REC2.txt, REC3.txt)
Each line is a new analysis case and must include the
Ruaumoko2D.exe (without the extension) in the beginning
of each line beginning with “start/w “
start/w RUAUMOKO2D Building_2014_1.wri Building_2014_1.txt REC1.txt
start/w RUAUMOKO2D Building_2014_2.wri Building_2014_2.txt REC2.txt
start/w RUAUMOKO2D Building_2014_3.wri Building_2014_3.txt REC3.txt

Input
EXECUTABLE Output File Input File
Loading

*NOTE: The batch file is a simple text file (Notepad) but saved
with a “.bat” extension. Be careful to “edit” in order to modify
once saved as a batch file!
Dynaplot in Batch Mode
Running Dynaplot in Batch Mode is extremely useful, and in
some cases (such as this course) even more so than using it
to run analyses.
The actual batch format is very similar to Ruaumoko...
start/w DYNAPLOT Building_2014_1_d.wri BUILDING_2014_1 LOG1.txt
start/w DYNAPLOT Building_2014_2_d.wri BUILDING_2014_2 LOG2.txt
start/w DYNAPLOT Building_2014_3_d.wri BUILDING_2014_3 LOG3.txt

EXECUTABLE Dynaplot .RES File Log File


Output File (without extension)

…EXCEPT: - A new output file (.WRI or .OUT) is required


- The “input” file is now the results (.RES) file
- A LOG FILE is now required to manage key strokes
Dynaplot in Batch Mode: The Log File
A log file is a recording of keystrokes input into Dynaplot for
a given set of desired output parameters.
Before doing ANYTHING in Dynaplot simply type:
$LOG LogFileName.txt

…Then
Continue
Normally

Now all further keystrokes will be recorded into the .txt


filename that has been provided.
Dynaplot in Batch Mode: The Log File
Log_ELCentro_Vel.txt: 1st floor and Roof level velocities
ELCENTRO_VEL_d.wri Dynaplot Output ………(cont’d)……….
BUILDING_2014_ELCENTRO TIME
.RES (no extension) 1
No
TIME Tag plots? Node
1 4
Node Want node response 1
4 4 = X Velocity Relative
41 0.0
41, 1 = Nodes of -1 1
Relative
0.0 interest 1.0
-1 1 0 21
1.0 Changes with duration "X Velocity"
"Node 1"
0 21 of record (TIME)
"X Velocity" KEEP
YES
"Node 41" Important!!!
KEEP ElCentro_Vel_Roof.txt
ElCentro_Vel_1.txt
First File – “no YES” Blank
Blank All Other Files – “yes YES” STOP
………(cont’d)………….
Preparing for Batch Mode: the QuickWin Error
Since RUAUMOKO was originally written decades ago, newer versions
of Windows tend to produce the infamous (at least at ROSE school)
QuickWin Error which pauses Ruaumoko and Dynaplot in batch mode.

Although compatibility settings can be manipulated, this does not


always remove the error. Luckily, a previous ROSE student, Domenico
Pennucci wrote the application “Kill QuickWin Error”

*Don’t forget to call upon Kill QuickWin Error to have


your back during batch mode!
Using Computer Programming to Assist
with Running and Processing Analysis
Linking the processes required for multiple analyses with
RUAUMOKO with computer programming is very powerful.

What do we need to do?


• Change Input Building Files All involve changing
simple information
• Create Ruaumoko Batch Files
within text files!
• Create Dynaplot Log Files and
Update them for each analysis Programming
(e.g. MATLAB) is very
•Create Dynaplot Batch Files useful for this!

• Manage response output files


Using Computer Programming to Assist
with Running and Processing Analysis
fileb='ExampleBatch.bat'; %Name of Batch File

modh='Building_2014_'; %Building model handle


rech='REC'; %Accelerogram handle

delete(fileb); %Delete existing file (if exists)


fid=fopen(fileb,'w'); %Delete existing file, open file for writing

numrec=3; %Number of records

for r=1:numrec %Loop for each record

fprintf(fid,'%s %s%s%s%s %s%s%s%s %s%s%s \r\n','start/w RUAUMOKO2D',modh,...


rech,num2str(r),'.wri',modh,rech,num2str(r),'.txt',rech,num2str(r),'.txt');
end

fclose ('all');
Example Batch File and Key Matlab Commands
So what comes out?

ExampleBatch.bat (viewed with edit not just opened)


The .WRI Output File
The output summary file (.wri) provides lots of useful information
when considering the peak (envelope) responses

...
1 INTER-STOREY DRIFTS
-------------------
POSITIVE ENVELOPE NEGATIVE ENVELOPE
----------------- -----------------
LEVEL -NODES- DRIFTS TIME DRIFTS TIME
2 41 49 1.631E-02 8.976 -1.135E-02 9.670
3 33 41 1.349E-02 9.004 -1.042E-02 9.640
4 25 33 9.570E-03 9.018 -8.203E-03 9.608
5 17 25 6.706E-03 5.446 -6.191E-03 9.538
6 9 17 7.088E-03 5.426 -6.765E-03 9.472
7 1 9 4.874E-03 5.416 -5.169E-03 9.472
...
The .WRI Output File
The following example illustrates how the periods of the building
may be obtained from the .wri file using MATLAB:

1 NATURAL FREQUENCIES
-------------------

MODE Frequency Period % Damping Damped Freq


1 7.670E-01 1.304E+00 5.000E+00 7.661E-01
2 2.204E+00 4.537E-01 5.000E+00 2.201E+00
3 4.040E+00 2.475E-01 7.503E+00 4.028E+00
4 6.411E+00 1.560E-01 1.123E+01 6.371E+00
The .WRI Output File
The following example illustrates how the first three periods of the
building may be obtained from the .wri file using MATLAB:
fileread=‘Building_2015_Modal.wri’; %Filename to be read
fid = fopen(fileread,'r'); %Open file for READING

output_File = textscan(fid,'%s','delimiter','\n'); %Store file in an array of strings


fclose(fid); %Close original file
output_File = output_File{1}; %Bring array to a single level

period0 = strmatch('1 NATURAL FREQUENCIES',output_File)+4; %Start point


period_read = output_File(period0:period0+2,:); %Range

%Obtain desired data within text lines


for i=1:length(period_read)
T(i)= cell2mat(textscan(period_read{i},'%*f %*f %f %*f %*f'));
end
.WRI Output File: Single Record IDA Example
1
Rec 120111, SF=1
0.5 PGA=0.42g
Acc [g]

0
-0.5
-1
0 5 10 15 20 25 30
Time [s]

Rec 120111: SF=1.0, ξ=5% •Record 120111 is used as an


1.6 0.4

1.4 0.35
example
1.2 0.3 •The record is scaled to seven
1 0.25 different intensity levels
S (T) [m]
S (T) [g]

0.8 0.2 • All information presented is


a

0.6 0.15 obtained from the .WRI files of


0.4
Spectral Acc.
Spectral Disp 0.1
the analyses
T1=1.3 s
T2=0.45 s
(except ground motion data)
0.2 0.05
T3=0.25 s

0 0
0 0.5 1 1.5 2
Period, T [s]
.WRI Output File: Single Record IDA Example
1 Sa (T1) Scale Peak IDR
Rec 120111, SF=1 Intensity [g] Factor [%]
0.5 PGA=0.42g 1 0.170 0.25 0.47%
Acc [g]

0 2 0.339 0.50 1.10%


3 0.509 0.75 1.21%
-0.5
4 0.678 1.00 1.63%
-1 5 1.017 1.50 3.13%
0 5 10 15 20 25 30
Time [s] 6 1.065 1.57 3.39%
7 1.153 1.70 99.98%
Rec 120111: SF=1.0, ξ=5%
1.6 0.4 1.4
Record 120111
1.4 0.35
1.2

1.2 0.3
1

1 0.25

S (T =1.3s) [g]
S (T) [m]
S (T) [g]

0.8
0.8 0.2
a

1
d

0.6

a
0.6 0.15
Intensity 7 not shown
0.4
0.4
Spectral Acc.
Spectral Disp 0.1 (Collapse)
T1=1.3 s

0.2 T2=0.45 s 0.05 0.2


T3=0.25 s

0 0 0
0 0.5 1 1.5 2 0 1.0% 2.0% 3.0% 4.0% 5.0%
Period, T [s] Peak Inter-storey Drift, θ [%]
.WRI Output File: Single Record IDA Example

Record 120111: Scale Factor = 0.25 *Displaced shape scaled by


5.0 for visualization

Maximum Curvature Ductility


6 6
Peak PFA
Residual

5 5

4 4
Level

Level

3 3

2 2
0 < µφ < 3 3 ≤ µφ < 7 7 ≤ µφ < 11 µφ ≥ 11

1
1 1 Rec 120111, SF=0.25
0.5
Acc [g]
PGA=0.1g
0
-0.5
0 0
0 1.0% 2.0% 3.0% 4.0% 0 0.25 0.5 0.75 1.0 -1
Inter-Storey Drift, θ [%] Peak Floor Accel., PFA [g] 0 5 10 15 20 25 30
Time [s]
.WRI Output File: Single Record IDA Example

Record 120111: Scale Factor = 0.5 *Displaced shape scaled by


5.0 for visualization

Maximum Curvature Ductility


6 6
Peak PFA
Residual

5 5

4 4
Level

Level

3 3

2 2
0 < µφ < 3 3 ≤ µφ < 7 7 ≤ µφ < 11 µφ ≥ 11

1
1 1 Rec 120111, SF=0.5
0.5
Acc [g]
PGA=0.21g
0
-0.5
0 0
0 1.0% 2.0% 3.0% 4.0% 0 0.25 0.5 0.75 1.0 -1
Inter-Storey Drift, θ [%] Peak Floor Accel., PFA [g] 0 5 10 15 20 25 30
Time [s]
.WRI Output File: Single Record IDA Example

Record 120111: Scale Factor = 0.75 *Displaced shape scaled by


5.0 for visualization

Maximum Curvature Ductility


6 6
Peak PFA
Residual

5 5

4 4
Level

Level

3 3

2 2
0 < µφ < 3 3 ≤ µφ < 7 7 ≤ µφ < 11 µφ ≥ 11

1
1 1 Rec 120111, SF=0.75
0.5
Acc [g]
PGA=0.31g
0
-0.5
0 0
0 1.0% 2.0% 3.0% 4.0% 0 0.25 0.5 0.75 1.0 -1
Inter-Storey Drift, θ [%] Peak Floor Accel., PFA [g] 0 5 10 15 20 25 30
Time [s]
.WRI Output File: Single Record IDA Example

Record 120111: Scale Factor = 1.0 *Displaced shape scaled by


5.0 for visualization

Maximum Curvature Ductility


6 6
Peak PFA
Residual

5 5

4 4
Level

Level

3 3

2 2
0 < µφ < 3 3 ≤ µφ < 7 7 ≤ µφ < 11 µφ ≥ 11

1
1 1 Rec 120111, SF=1
0.5 PGA=0.42g
Acc [g]

0
-0.5
0 0
0 1.0% 2.0% 3.0% 4.0% 0 0.25 0.5 0.75 1.0 -1
Inter-Storey Drift, θ [%] Peak Floor Accel., PFA [g] 0 5 10 15 20 25 30
Time [s]
.WRI Output File: Single Record IDA Example

Record 120111: Scale Factor = 1.5 *Displaced shape scaled by


5.0 for visualization

Maximum Curvature Ductility


6 6
Peak PFA
Residual

5 5

4 4
Level

Level

3 3

2 2
0 < µφ < 3 3 ≤ µφ < 7 7 ≤ µφ < 11 µφ ≥ 11

1
1 1 PGA=0.62g Rec 120111, SF=1.5
0.5
Acc [g]

0
-0.5
0 0
0 1.0% 2.0% 3.0% 4.0% 0 0.25 0.5 0.75 1.0 -1
Inter-Storey Drift, θ [%] Peak Floor Accel., PFA [g] 0 5 10 15 20 25 30
Time [s]
.WRI Output File: Single Record IDA Example

Record 120111: Scale Factor = 1.57 *Displaced shape scaled by


5.0 for visualization

Maximum Curvature Ductility


6 6
Peak PFA
Residual

5 5

4 4
Level

Level

3 3

2 2
0 < µφ < 3 3 ≤ µφ < 7 7 ≤ µφ < 11 µφ ≥ 11

1
1 1 PGA=0.65g Rec 120111, SF=1.57
0.5
Acc [g]

0
-0.5
0 0
0 1.0% 2.0% 3.0% 4.0% 0 0.25 0.5 0.75 1.0 -1
Inter-Storey Drift, θ [%] Peak Floor Accel., PFA [g] 0 5 10 15 20 25 30
Time [s]
.WRI Output File: Single Record IDA Example

Record 120111: Scale Factor = 1.7 *Displaced shape scaled by


5.0 for visualization

Maximum Curvature Ductility


6 6
Peak PFA
Residual

5 5

4 4
Level

Level

3 3

2 2
0 < µφ < 3 3 ≤ µφ < 7 7 ≤ µφ < 11 µφ ≥ 11

1
1 1 PGA=0.71g Rec 120111, SF=1.7
0.5
Acc [g]

0
-0.5
0 0
0 1.0% 2.0% 3.0% 4.0% 0 0.25 0.5 0.75 1.0 -1
Inter-Storey Drift, θ [%] Peak Floor Accel., PFA [g] 0 5 10 15 20 25 30
Time [s]
Recommendations
• Regardless of using MATLAB or not, making and CHECKING
template files to enable batch mode is HIGHLY
recommended
• Don’t forget to use the Kill QuickWin Error
• Use a consistent naming scheme for all files
• HINT 1: Utilize the trade offs between Dynaplot and the
.WRI file (Conceptual, Intermediate, Final Analyses)
• HINT 2: Take advantage of the initial phases having a finite
number of analyses to prepare and DEFINE the analysis/
visualization processes that you will want to include.

You might also like