BP#1 ------------------------------------------------------------------------- NTHMP (National Tsunami Hazard Mitigation Program) ------------------------------------------------------------------------- 2010 NTHMP VALIDATION WORKSHOP Venue: Galveston, TAMU TX March 30- Apr. 1 ---- o ---- MATLAB SCRIPT: Analytical: Solitary or Single Wave on a Simple Beach TYPE: Analytical Benchmarking problem (Analy) NUMBER: 01 TSUNAMI SOURCE: Incident Solitary Wave (SW) SCRIPT NAME : BP1_Analy_SW01.m AUTHOR(S) :J. Horrillo, Gyeong-Bo Kim. Copyright 2011 NTHMP/NOAA Revision: 0 Date: Sep/2011 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: analytical_SW.mat (Analytical data file for time evolution of H= 0.019 initial wave over a sloping beach with cot(beta)=19.85. Constant depth-segment starts at Xo=19.85. Markers show Analytical results of Synolakis (1986, 1987). Analytical data is provided from t=35 to t=65 with 5 increments.) analytical_RU.mat data file for time evolution of the shore line over the sloping beach with cot(beta)=19.85 Constant-depth segment starts at Xo=19.85. Markers show analytical results of Synolakis (1987). Experimental data is provided from t=0-120 for cases x/h=9.95 and x/h=0.25 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/ ------------------------------------------------------------------------- > BP1_Analy_SW01(filename1,filename2) BP1_Analy_SW01 reads input files 'filename1' and 'filename2' containing model results and compares them with analytical solution data described in the Benchmark "Solitary Wave on a Canonical 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 cases x/h=9.95 and x/h=0.25, respectively. Input files 'filename1' and 'filename2' need to be named as follows: XXXXXX_BP1_0019.dat and XXXXXX_BP1_995_025.dat, where XXXXXX is the name of the numerical model that is tested, eg. NEOWAVE_BP1_0019.dat and NEOWAVE_BP1_995_025.dat. The input files, 'filename1' and 'filename2' must have the following configuration: 1- Files 'filename1' is a matrix ASCII files of size 441x8(row x column) as shown below (no heading). The number of rows could be different of 441, but it is desirable to sample at least every 0.05. x ranges= [-2 20] with icrements of 0.05. Snapshot of the free surface are recorded at time t=[ 35, 40, 45, 50, 55, 60, 65] filename1 +------+-------+--------+--------+--------+-------+--------+----------+ | x() Amp(t=35)Amp(t=40)Amp(t=45)Amp(t=50)Amp(t=55)Amp(t=60)Amp(t=65) +------+-------+--------+--------+--------+-------+--------+----------+ -2.00 0.000 0.297 0.000 -0.069 -0.260 -0.297 10.780 -1.95 0.000 0.396 0.000 -0.970 -0.564 0.287 -70.000 -1.90 0.000 0.495 0.000 0.772 -0.743 0.297 9.900 -1.85 0.000 0.594 0.000 0.178 -0.056 -0.437 7.000 . . . . . . . . . . . . . . . . . . . . . . . . 19.85 0.546 0.495 0.783 -0.762 -0.760 0.297 -0.000 19.90 0.456 0.786 0.438 -0.678 -0.768 0.297 0.000 19.95 -0.679 -0.569 0.907 0.322 -0.529 0.297 0.000 20.00 0.456 -0.045 0.000 0.772 -0.067 0.297 -0.000 +-----+--------+--------+--------+--------+-------+--------+----------+ 2- Files 'filename2' is a matrix ASCII files of size 241x3(row x column) as shown below (no heading). x ranges= [0 120] with icrements of 0.5. the time series of the runup are recorded for cases =[x/h=9.95 and x/h=0.25] Note: The number of rows could be different of 241, but it is desirable to sample at least every 0.5. filename2 +-------+---------+---------+ | t() x/h=9.95 x/h=0.25 +-------+---------+---------+ 0.00 0.000 0.297 0.50 0.000 0.396 1.00 0.000 0.495 1.50 0.000 0.594 . . . . . . . . . 118.50 0.546 0.495 119.00 0.456 0.786 119.50 -0.679 -0.569 120.00 0.456 -0.045 +-------+---------+---------+ NOTE: This script is self-containing. It loads the Analy. data automatically to facilitate user's comparison, peer review and determine model performance. The Analytical data have been saved on files analytical_SW.mat and analytical_RU.mat for case H=0.019 and cases(x/h=9.95 and x/h=0.25) respectively. Be sure that the lab data files analytical_SW.mat and analytical_RU.mat reside in the same directory or subdirectory as the Matlab script (BP1_Analy_SW01). 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 analytical solution. Examples: > BP1_Analy_SW01 In this example the Matlab script just plots analytical results. > BP1_Analy_SW01('NEOWAVE_BP1_00185.dat','NEOWAVE_BP1_995_025.dat') In this example the Matlab script plots both cases analytical results and user's model results. > BP1_Analy_SW01('NEOWAVE_BP1_00185.dat',[]) In this example the Matlab script just plots analytical results and and user's model result for case H=0.0185. > BP1_Analy_SW01([],'NEOWAVE_BP1_995_025.dat') In this example the Matlab script plots just, analytical results and user's model result for cases x/h=9.95 and x/h=0.25. -------------------------------------------------------------------------