BP#4 ------------------------------------------------------------------------- NTHMP (National Tsunami Hazard Mitigation Program) ------------------------------------------------------------------------- 2010 NTHMP WORKSHOP Venue: TBA (Catalina Island, CA; Santa Monica, CA; Irvine, CA; Corvallis, OR; Boulder, CO. NOV. 16th-18th 2010 ---- o ---- MATLAB SCRIPT: Solitary Wave on a Simple Beach TYPE: Laboratory Benchmarking Problem (Lab) NUMBER: 01 TSUNAMI SOURCE: Incident Solitary Wave (SW) SCRIPT NAME : BP4_Lab_SW01.m AUTHOR(S) : D. Nicolsky, C. Synolakis, S Grilli and J. Horrillo. Copyright 2010 NTHMP/NOAA Revision: 0 Date: Sep/2010 REFERENCE: Synolakis, C.E. (1986): The Runup of Long Waves. Ph.D. Thesis, California Institute of Technology, Pasadena, California, 91125, 228 pp. NOAA/PMEL Center for Tsunami research http://nctr.pmel.noaa.gov/benchmark/index.html Synolakis, C.E. (1987): The runup of solitary waves. J. Fluid Mech., 185, 523-545. INCLUDED FILES WITH THIS SCRIPT: SW_01_00185.mat (lab. data file for Time evolution of H= 0.0185 initial wave over a sloping beach with cot(beta)=19.85. Constant depth-segment starts at Xo=19.85. Markers show experimental results of Synolakis (1986, 1987). Experimental data is provided from t=30 to t=70 with 10 increments.) SW_01_03.mat(lab. data file for Time evolution of H=0.30 initial wave over a sloping beach with cot(beta)=19.85 Constant-depth segment starts at Xo=19.85. Markers show experimental results of Synolakis (1987). Experimental data is provided from t=15 to t=30 with 5 increments. Note: Above files (both) are needed to run successfully this script. CONTACT INFO: Dr. Juan J. Horrillo, Texas A&M University at Galveston Maritime Systems Engineering (MASE) 200 Seawolf Park or P.O. Box 1675 Galveston, TX 77553-1675 Phone: (409) 740-4465 horrillj@tamug.edu Website: http://www.tamug.edu/ ------------------------------------------------------------------------- > BP4_Lab_SW01(filename1,filename2) BP4_Lab_SW01 reads input files 'filename1' and 'filename2' containing user model results and compares them with laboratory data described in the Benchmark "Solitary Wave on a simple Beach", NOAA/PMEL, (http://nctr.pmel.noaa.gov/benchmark/index.html). filename1 and filename2 are model generated files corresponding to Case H=0.0185m and H=0.30m respectively. Input files 'filename1' and 'filename2' need to be named as follows: XXXXXX_SW_01_00185.dat and XXXXXX_SW_01_03.dat, where XXXXXX is the name of the numerical model that is tested, eg. NEOWAVE_SW_01_00185.dat and NEOWAVE_SW_01_03.dat. The input files, 'filename1' and 'filename2' must have the following configuration: 1- Files 'filename1' is a matrix ASCII files of size 441x6(row x column) as shown below (no heading). x ranges= [-2 20] with icrements of 0.05. Snapshot of the free surface are recorded at time t=[ 30, 40, 50, 60, 70] filename1 +-------+---------+---------+----------+---------+---------+ | x() Amp(t=30) Amp(t=40) Amp(t=50) Amp(t=60) Amp(t=70) +-------+---------+---------+----------+---------+---------+ -2.00 0.000 0.297 0.000 -0.069 -0.260 -1.95 0.000 0.396 0.000 -0.970 -0.564 -1.90 0.000 0.495 0.000 0.772 -0.743 -1.85 0.000 0.594 0.000 0.178 -0.056 . . . . . . . . . . . . . . . . . . 19.85 0.546 0.495 0.783 -0.762 -0.760 19.90 0.456 0.786 0.438 -0.678 -0.768 19.95 -0.679 -0.569 0.907 0.322 -0.529 20.00 0.456 -0.045 0.000 0.772 -0.067 +-------+---------+---------+----------+---------+---------+ 2- Files 'filename2' is a matrix ASCII files of size 601x5(row x column) as shown below (no heading). x ranges= [-10 20] with icrements of 0.05. Snapshot of the free surface are recorded at time t=[ 15, 20, 25, 30] filename2 +-------+---------+---------+----------+---------+ | x() Amp(t=15) Amp(t=20) Amp(t=25) Amp(t=30) +-------+---------+---------+----------+---------+ -10.00 0.000 0.297 0.000 3.069 -9.95 0.000 0.396 0.000 2.970 -9.90 0.000 0.495 0.000 2.772 -9.85 0.000 0.594 0.000 2.178 . . . . . . . . . . . . . . . 19.85 0.546 0.495 0.783 -1.762 19.90 0.456 0.786 0.438 -2.678 19.95 -0.679 -0.569 0.907 0.322 20.00 0.456 -0.045 0.000 0.772 +-------+---------+---------+----------+---------+ NOTE: This script is self-containing. It loads the lab. data automatically to facilitate user's comparison, peer review and determine model performance. The Experimental data have been saved on files SW_01_00185.mat and SW_01_03.mat for case H=0.0185m and H=0.30m respectively. Be sure that the lab data files SW_01_00185.mat and SW_01_03.mat reside in the same directory or subdirectory as the Matlab script (BP4_Lab_SW01.m). The user's input files 'filename1' and 'filename2' must be present in the same directory or subdirectory as well. This script uses the normalized root mean square deviation (NRMSD) or root mean square error to measure the numerical model precision. NRMSD measures the differences between values predicted by the numerical model and the values actually observed in the experiment or in the field. Examples: > BP4_Lab_SW01 In this example the Matlab scrip just plots laboratory results. > BP4_Lab_SW01('NEOWAVE_SW_01_00185.dat','NEOWAVE_SW_01_03.dat') In this example the Matlab scrip plots both cases laboratory results and user's model results. > BP4_Lab_SW01('NEOWAVE_SW_01_00185.dat',[]) In this example the Matlab scrip only plots laboratory results and and user's model result for case H=0.0185. > BP4_Lab_SW01([],'NEOWAVE_SW_01_03.dat') In this example the Matlab scrip plots only laboratory results and user's model result for case H=0.30. -------------------------------------------------------------------------