tsunami eth yuen
TRANSCRIPT
![Page 1: Tsunami Eth YUEN](https://reader033.vdocuments.mx/reader033/viewer/2022050712/55347b40550346457f8b4abd/html5/thumbnails/1.jpg)
D A V I D A . Y U E NM i n n e s o t a S u p e r c o m p u t i n g I n s t i t u t e , U n i v e r s i t y o f M i n n e s o t a , M i n n e s o t a
J E S S I C A S C H M I D TS a i n t S c h o l a s t i c a C o l l e g e , D u l u t h , M i n n e s o t a
E R I K O . D . S E V R EM i n n e s o t a S u p e r c o m p u t i n g I n s t i t u t e U n i v e r s i t y o f M i n n e s o t a , M i n n e s o t a
N A N Z H A N GM e d i c a l S c h o o l , U n i v e r s i t y o f M i n n e s o t a M i n n e s o t a
G R A D Y B . W R I G H TD e p t . o f M a t h e m a t i c s , B o i s e S t a t e U n i v e r s i t y , B o i s e , I d a h o
Tsunami Modeling with Accelerated Graphics Board (GPU) and Radial Basis
Functions (RDF)
JESSICA SCHMIDTSaint Scholastica College, Duluth, Minnesota
CECIL PIRETInstitute of Applied Mathematics for Geosciences, National Center of Atmospheric Research, Boulder, Colorado
SPRING LIUMinnesota Supercomputing Institute University of Minnesota, Minnesota
NATASHA FLYERInstitute of Applied Mathematics for Geosciences, National Center for Atmospheric Research, Boulder, Colorado
![Page 2: Tsunami Eth YUEN](https://reader033.vdocuments.mx/reader033/viewer/2022050712/55347b40550346457f8b4abd/html5/thumbnails/2.jpg)
Outline
Introduction to Tsunamis and Tsunami ModelingVirtues of Graphics Accelerated Board (GPU)Applications of GPU to Shallow-Water equationsRadial Basis Functions (RBF) Swirling FlowsApplications of GPU to RBF equationsConcluding Remarks
![Page 3: Tsunami Eth YUEN](https://reader033.vdocuments.mx/reader033/viewer/2022050712/55347b40550346457f8b4abd/html5/thumbnails/3.jpg)
Erik
David
Spring
Yaolin
![Page 4: Tsunami Eth YUEN](https://reader033.vdocuments.mx/reader033/viewer/2022050712/55347b40550346457f8b4abd/html5/thumbnails/4.jpg)
Outline
Background related to tsunamisData Visualization_Amira applied in tsunami simulationPotential Tsunami Hazard along Chinese Coast
![Page 5: Tsunami Eth YUEN](https://reader033.vdocuments.mx/reader033/viewer/2022050712/55347b40550346457f8b4abd/html5/thumbnails/5.jpg)
Background
![Page 6: Tsunami Eth YUEN](https://reader033.vdocuments.mx/reader033/viewer/2022050712/55347b40550346457f8b4abd/html5/thumbnails/6.jpg)
What is a Tsunami?(soo-NAH-mee)
![Page 7: Tsunami Eth YUEN](https://reader033.vdocuments.mx/reader033/viewer/2022050712/55347b40550346457f8b4abd/html5/thumbnails/7.jpg)
Tsunami or Harbour Wave
A Japanese word represented by
two characters: tsu & nami
tsu means harbour&
nami means wave
![Page 8: Tsunami Eth YUEN](https://reader033.vdocuments.mx/reader033/viewer/2022050712/55347b40550346457f8b4abd/html5/thumbnails/8.jpg)
Tsunami Definition & Causes
![Page 9: Tsunami Eth YUEN](https://reader033.vdocuments.mx/reader033/viewer/2022050712/55347b40550346457f8b4abd/html5/thumbnails/9.jpg)
Scientific term?
Tsunami
? Seismic sea waves
? Tidal waves
![Page 10: Tsunami Eth YUEN](https://reader033.vdocuments.mx/reader033/viewer/2022050712/55347b40550346457f8b4abd/html5/thumbnails/10.jpg)
Waves are the undulatory motion of a water surface.
Parts of a wave are, Wave crest, Wave trough, Wave height (H), Wave Amplitude, Wave length (L),and Wave period (T).Wave period provides a basis for the wave classifications: Capillary waves, Chop, Swell, Tsunamis, Seiches.
Wave in the OceanBasic Concept
![Page 11: Tsunami Eth YUEN](https://reader033.vdocuments.mx/reader033/viewer/2022050712/55347b40550346457f8b4abd/html5/thumbnails/11.jpg)
Most of the waves present on the ocean’s surface are wind-generated waves.
Size and type of wind-generated waves are controlled by: Wind velocity, Wind duration, Fetch, and Original state of sea surface.
Wave in the OceanWave types
![Page 12: Tsunami Eth YUEN](https://reader033.vdocuments.mx/reader033/viewer/2022050712/55347b40550346457f8b4abd/html5/thumbnails/12.jpg)
The shallower the water, the greater the interaction between the wave and the bottom alters the wave properties, eventually causing the wave to
collapse.
SPEED decreases as depth decreases.Wave length decreases as depth decreases.Wave height increases as depth decreases.Refraction is the bending of a wave into an area where it travels more slowly.
7-3 Wave in the OceanWave Properties
![Page 13: Tsunami Eth YUEN](https://reader033.vdocuments.mx/reader033/viewer/2022050712/55347b40550346457f8b4abd/html5/thumbnails/13.jpg)
Wave in the OceanWave Properties
![Page 14: Tsunami Eth YUEN](https://reader033.vdocuments.mx/reader033/viewer/2022050712/55347b40550346457f8b4abd/html5/thumbnails/14.jpg)
Tsunamis consist of a series of long-period waves characterized by very long wave length (up to 100 km) and high speed (up to 760 km/hr) in the deep ocean.Because of their large wave length, tsunamis are shallow-water to intermediate-water waves as they travel across the ocean basin.They only become DANGEROUS, when reaching coastal areas where wave height can reach 10 m.Tsunamis originate from earthquakes, volcanic explosions, or submarine landslides.
7-5
Tsunami
![Page 15: Tsunami Eth YUEN](https://reader033.vdocuments.mx/reader033/viewer/2022050712/55347b40550346457f8b4abd/html5/thumbnails/15.jpg)
Tsunami Source (1)
![Page 16: Tsunami Eth YUEN](https://reader033.vdocuments.mx/reader033/viewer/2022050712/55347b40550346457f8b4abd/html5/thumbnails/16.jpg)
Tsunami Source (2)
![Page 17: Tsunami Eth YUEN](https://reader033.vdocuments.mx/reader033/viewer/2022050712/55347b40550346457f8b4abd/html5/thumbnails/17.jpg)
Tsunami Source (3)
![Page 18: Tsunami Eth YUEN](https://reader033.vdocuments.mx/reader033/viewer/2022050712/55347b40550346457f8b4abd/html5/thumbnails/18.jpg)
Tsunami Sources in the world(2180 events from 1628BC to 2005)
Numerical Tsunami ModelingBackground
![Page 19: Tsunami Eth YUEN](https://reader033.vdocuments.mx/reader033/viewer/2022050712/55347b40550346457f8b4abd/html5/thumbnails/19.jpg)
Seismic Tsunami ModellingBackground
Killer Tsunamis in Historical Times
![Page 20: Tsunami Eth YUEN](https://reader033.vdocuments.mx/reader033/viewer/2022050712/55347b40550346457f8b4abd/html5/thumbnails/20.jpg)
Global Earthquakes Distribution
90% earthquakes happened along Pacific Ocean belt80% earthquakes induced tsunami happened along arc-channel of the Pacific Ocean plate
Numerical Tsunami ModellingBackground
![Page 21: Tsunami Eth YUEN](https://reader033.vdocuments.mx/reader033/viewer/2022050712/55347b40550346457f8b4abd/html5/thumbnails/21.jpg)
General Tsunami Modelling
Displacement Field (initial Condition)
Propagation (Linear and Nonlinear
model)Run-up
1 Physical Analysis
2 Numerical Simulation
3 Visualization
4 Results Analysis
![Page 22: Tsunami Eth YUEN](https://reader033.vdocuments.mx/reader033/viewer/2022050712/55347b40550346457f8b4abd/html5/thumbnails/22.jpg)
Seismic Tsunami Modelling
Navier-Stokes Equations SystemBoussinesq EquationsShallow Water Equations
1 Analyze the phenomenon
2 Choose Coordinates
3 Choose the equations
5 Boundary and initial conditions
4 solution of grid
7Analysis results
Etopo1, Etopo2, Strm30, or local bathymetry data
Satellite data or tidal data
(Local and Far-field)
6 Visualization
The initial wave( From earthquake)
Seismic Tsunami Modelling
![Page 23: Tsunami Eth YUEN](https://reader033.vdocuments.mx/reader033/viewer/2022050712/55347b40550346457f8b4abd/html5/thumbnails/23.jpg)
Generation, Propagation, and Run-up of Tsunamis
Run-up/downPropagationGeneration
dispersion effect nonlinear effect
![Page 24: Tsunami Eth YUEN](https://reader033.vdocuments.mx/reader033/viewer/2022050712/55347b40550346457f8b4abd/html5/thumbnails/24.jpg)
Existing Tsunami Models
![Page 25: Tsunami Eth YUEN](https://reader033.vdocuments.mx/reader033/viewer/2022050712/55347b40550346457f8b4abd/html5/thumbnails/25.jpg)
Introduction of Amira
Amira is a powerful, multifaceted software platform for visualizing, manipulating, and understanding scientific data coming from a all types of sources and modalities.
Multi purpose - One tool for interdisciplinary work Flexible - Option packages to configure amira to your needs Efficient - Exploits latest graphics cards and processors Easy to use - Intuitive user interface and great documentation Cost effective - Multiple options and flexible license models Handling large data - Very large data sets are easily accessible with specific readers Extensible - C++ coding wizard for technical extension and customization Support - Customer direct support with high level of interaction Innovative - Technology always up dated to the latest innovation
![Page 26: Tsunami Eth YUEN](https://reader033.vdocuments.mx/reader033/viewer/2022050712/55347b40550346457f8b4abd/html5/thumbnails/26.jpg)
Data Visualization __ Amira
![Page 27: Tsunami Eth YUEN](https://reader033.vdocuments.mx/reader033/viewer/2022050712/55347b40550346457f8b4abd/html5/thumbnails/27.jpg)
Load Topography Background
![Page 28: Tsunami Eth YUEN](https://reader033.vdocuments.mx/reader033/viewer/2022050712/55347b40550346457f8b4abd/html5/thumbnails/28.jpg)
Movie Maker
![Page 29: Tsunami Eth YUEN](https://reader033.vdocuments.mx/reader033/viewer/2022050712/55347b40550346457f8b4abd/html5/thumbnails/29.jpg)
Highlight of Visualization with Amira 3
This figure shows the height field with a scaled height.
![Page 30: Tsunami Eth YUEN](https://reader033.vdocuments.mx/reader033/viewer/2022050712/55347b40550346457f8b4abd/html5/thumbnails/30.jpg)
Wave Propagation Visualization of Tsunami Modeling-Eastern China Sea
![Page 31: Tsunami Eth YUEN](https://reader033.vdocuments.mx/reader033/viewer/2022050712/55347b40550346457f8b4abd/html5/thumbnails/31.jpg)
Wave Propagation Visualization of Tsunami Modeling-Solomon Islands
![Page 32: Tsunami Eth YUEN](https://reader033.vdocuments.mx/reader033/viewer/2022050712/55347b40550346457f8b4abd/html5/thumbnails/32.jpg)
Wave Propagation Comparison of Linear and Nonlinear Modeling
![Page 33: Tsunami Eth YUEN](https://reader033.vdocuments.mx/reader033/viewer/2022050712/55347b40550346457f8b4abd/html5/thumbnails/33.jpg)
Different Bathymetry Resolution Comparison of Nonlinear Modeling on Shallow Part of the Ocean Part
Grids: 1201*1201 601*601
![Page 34: Tsunami Eth YUEN](https://reader033.vdocuments.mx/reader033/viewer/2022050712/55347b40550346457f8b4abd/html5/thumbnails/34.jpg)
Conclusion(1) promotes a rapid understanding of the waves' paths from initial stages ; influences from the initial surroundings
(2) Allows us to understand better the subsequent events when the waves are interacting with the coastline and off-shore islands
(3) Helps to teach people about wave propagation for local and regional scenarios
![Page 35: Tsunami Eth YUEN](https://reader033.vdocuments.mx/reader033/viewer/2022050712/55347b40550346457f8b4abd/html5/thumbnails/35.jpg)
Linear Shallow Water Equations Applied in SCS
Linear Nonlienar
![Page 36: Tsunami Eth YUEN](https://reader033.vdocuments.mx/reader033/viewer/2022050712/55347b40550346457f8b4abd/html5/thumbnails/36.jpg)
Linear Nonlinear
![Page 37: Tsunami Eth YUEN](https://reader033.vdocuments.mx/reader033/viewer/2022050712/55347b40550346457f8b4abd/html5/thumbnails/37.jpg)
Linear and Nonlinear Model in Yellow Sea Area
![Page 38: Tsunami Eth YUEN](https://reader033.vdocuments.mx/reader033/viewer/2022050712/55347b40550346457f8b4abd/html5/thumbnails/38.jpg)
TSUNAMI SIMULATION WITH GPU PROGRAMMING
JESSICA SCHMIDT from computer science and mathematics
UNDERGRADUATE SUMMER INTERN
![Page 39: Tsunami Eth YUEN](https://reader033.vdocuments.mx/reader033/viewer/2022050712/55347b40550346457f8b4abd/html5/thumbnails/39.jpg)
Jessica SchmidtUndergraduate summer
intern
Tsunami Simulation with GPU Programming
![Page 40: Tsunami Eth YUEN](https://reader033.vdocuments.mx/reader033/viewer/2022050712/55347b40550346457f8b4abd/html5/thumbnails/40.jpg)
Overview
Why we do this project?GPU with CUDA programmingTsunami Simulation with CUDARBF ( RADIAL BASIS FUNCTIONS ) SummaryWhat does the future hold?
![Page 41: Tsunami Eth YUEN](https://reader033.vdocuments.mx/reader033/viewer/2022050712/55347b40550346457f8b4abd/html5/thumbnails/41.jpg)
Viable set-up for real-time tsunami visualization
Earthquake
Tsunami
Real Tsunami Visualization
(Interface Window)
Seismology
Bathymetric Data
Tsunami Simulation with
GPU Programming
By Erik
By Jessica
Tsunami Warning
![Page 42: Tsunami Eth YUEN](https://reader033.vdocuments.mx/reader033/viewer/2022050712/55347b40550346457f8b4abd/html5/thumbnails/42.jpg)
GPU
Graphics Processing UnitMuch faster than CPU nowGetting more expensive, can easily nowOutstrip the cost of a laptop itselfTakes the load off of the CPU
Computes many complex math problemsFaster graphics processing speedIncreased detailed and complexity without compromising performance
![Page 43: Tsunami Eth YUEN](https://reader033.vdocuments.mx/reader033/viewer/2022050712/55347b40550346457f8b4abd/html5/thumbnails/43.jpg)
CUDA
Benefits DrawbacksTakes load off CPUEasy to learn and implement
Difficult to find video card , MAC is cooler for this .
Compute Unified Device ArchitectureDeveloped by NVIDIABased on C
![Page 44: Tsunami Eth YUEN](https://reader033.vdocuments.mx/reader033/viewer/2022050712/55347b40550346457f8b4abd/html5/thumbnails/44.jpg)
GPU Specs.GPU GeForce 8600M
GTGeForce 8800 Ultra
Core clock (MHz) 540 612Shader clock (MHz) 1190 1500Memory clock (MHz) 700 1080Memory Amount (MB)
256 768
Memory Interface 128-bit 384-bitMemory bandwidth (GB/s)
22.4 103.7
Texture Fill Rate (billion/sec)
8.64 39.2There are other GPUs that work with CUDA as well. - NVIDIA GeForce 8000 and above- NVIDIA Quadro, DELUXE MODEL- NVIDIA Tesla
![Page 45: Tsunami Eth YUEN](https://reader033.vdocuments.mx/reader033/viewer/2022050712/55347b40550346457f8b4abd/html5/thumbnails/45.jpg)
Jessica’s Job This Summer
Covert linear tsunami codesSpring Liu ----second Finite Difference MethodCecile Piret ---- Radial Basis Function (RBF)
Implement CUDA for Spring’s and Cecile’s linear codes, then see if there is speedup
![Page 46: Tsunami Eth YUEN](https://reader033.vdocuments.mx/reader033/viewer/2022050712/55347b40550346457f8b4abd/html5/thumbnails/46.jpg)
2-D Shallow Water Equations
Linear Non-Linear
0
0
0
=∂∂
+∂∂
=∂∂
+∂∂
=∂∂
+∂∂
+∂∂
yzgD
tN
xzgD
tM
yN
xM
tz
0)()(
0)()(
0
2
2
=+∂∂
+∂∂
+∂∂
+∂∂
=+∂∂
+∂∂
+∂∂
+∂∂
=∂∂
+∂∂
+∂∂
ρτρτ
y
x
yzgD
DN
yDMN
xtM
xzgD
DMN
yDM
xtM
yN
xM
tz
M, N = mass fluxes in horizontal planez = wave heightt = timeh = ocean water depth
D = total water depth, D = z + hρ = densityτx, τy = shear stress along x and y axis
![Page 47: Tsunami Eth YUEN](https://reader033.vdocuments.mx/reader033/viewer/2022050712/55347b40550346457f8b4abd/html5/thumbnails/47.jpg)
athymetric Data: Etopo1
arameters of Rupture: rom HARVARD Database ,
Miyaki Ishii
isualization: Amira
![Page 48: Tsunami Eth YUEN](https://reader033.vdocuments.mx/reader033/viewer/2022050712/55347b40550346457f8b4abd/html5/thumbnails/48.jpg)
Radial Basis Functions (RBF) Method
An Introduction
![Page 49: Tsunami Eth YUEN](https://reader033.vdocuments.mx/reader033/viewer/2022050712/55347b40550346457f8b4abd/html5/thumbnails/49.jpg)
The RBF method
• 70s Rolland Hardy introduces a new method for scattered data interpolation for geological data, the MQ method, so named for its use as basis of the multi-quadric function. First published in JGR
• 70s-80s The method is generalized to more radial functions. It is renamed the “Radial Basis Functions (or RBF) method”.
• 90s Ed Kansa from UC Davis uses the RBF method to solve partial differential equations.
![Page 50: Tsunami Eth YUEN](https://reader033.vdocuments.mx/reader033/viewer/2022050712/55347b40550346457f8b4abd/html5/thumbnails/50.jpg)
• Given scattered data
• Define the RBF
interpolant
The RBF method
![Page 51: Tsunami Eth YUEN](https://reader033.vdocuments.mx/reader033/viewer/2022050712/55347b40550346457f8b4abd/html5/thumbnails/51.jpg)
• Given scattered data
• Define the RBF
interpolant
The RBF method
![Page 52: Tsunami Eth YUEN](https://reader033.vdocuments.mx/reader033/viewer/2022050712/55347b40550346457f8b4abd/html5/thumbnails/52.jpg)
• Given scattered data
• Define the RBF
interpolant
The RBF method
• Find by solving the system
![Page 53: Tsunami Eth YUEN](https://reader033.vdocuments.mx/reader033/viewer/2022050712/55347b40550346457f8b4abd/html5/thumbnails/53.jpg)
The RBF methodCoding the RBF method is fast and easy
RBF part of the code
![Page 54: Tsunami Eth YUEN](https://reader033.vdocuments.mx/reader033/viewer/2022050712/55347b40550346457f8b4abd/html5/thumbnails/54.jpg)
+• Interpolation on scattered data. No grid necessary.• Very easy implementation in N-dimensions.• The basis functions are not orthogonal with each other,
but we are guaranteed a non-singular system for most types of RBFs.
• Spectral accuracy for infinitely smooth radial functions
-High complexity. No fast algorithm.
The RBF method
![Page 55: Tsunami Eth YUEN](https://reader033.vdocuments.mx/reader033/viewer/2022050712/55347b40550346457f8b4abd/html5/thumbnails/55.jpg)
Radial Basis Functions (RBF)--- Cecile
Interpolating data takes the form:
Use RBFs to model 2-D linear wavesCecile Piret wrote simulations using MatlabConvert to GPU using Jacket – developed by Accelereyes
![Page 56: Tsunami Eth YUEN](https://reader033.vdocuments.mx/reader033/viewer/2022050712/55347b40550346457f8b4abd/html5/thumbnails/56.jpg)
The comparison of GPU and CPU ------- Linear Tsunami Codes
Grid Size
CPU (laptop) GPU (laptop) Speedup times
30x30 Approx. 315seconds
Approx. 105seconds
3 times
Cecile’s linear tsunami code (400 time steps)
Grid Size
CPU (Lilli) GPU (laptop) Speedup times
601x601 Approx. 240minutes
Approx. 30minutes
8 times
Spring’s linear tsunami code (21600 time steps)
Lilli – an opteron-based system with 4 CPUsGPU – nVIDIA 8600M GT graphics cardLaptop – standard MacBook Pro
![Page 57: Tsunami Eth YUEN](https://reader033.vdocuments.mx/reader033/viewer/2022050712/55347b40550346457f8b4abd/html5/thumbnails/57.jpg)
Results for Tsunami Simulation
beginning of simulation middle of simulation
Simulation Movie
![Page 58: Tsunami Eth YUEN](https://reader033.vdocuments.mx/reader033/viewer/2022050712/55347b40550346457f8b4abd/html5/thumbnails/58.jpg)
Summary
With the comparison of the computing times of tsunami equations that be solved by different numerical methods (Finite Difference Method and RBF) and different hardware surroundings (GPU and CPU), we would provide a ideal computing and visualization method for tsunami simulation, that allow for hazard preparation and timely warning for lands in the masses in the path of tsunami wave. GPU really speeds up computing time, that is at least 3 times that of CPU for our tsunami code.
![Page 59: Tsunami Eth YUEN](https://reader033.vdocuments.mx/reader033/viewer/2022050712/55347b40550346457f8b4abd/html5/thumbnails/59.jpg)
What does the future hold?
Complete GPU programming for Nonlinear Shallow Water Code with CUDA ---- Jessica
Development of Visualization Interface Erik Sevre
![Page 60: Tsunami Eth YUEN](https://reader033.vdocuments.mx/reader033/viewer/2022050712/55347b40550346457f8b4abd/html5/thumbnails/60.jpg)
![Page 61: Tsunami Eth YUEN](https://reader033.vdocuments.mx/reader033/viewer/2022050712/55347b40550346457f8b4abd/html5/thumbnails/61.jpg)
References
Liu, Y. Numerical tsunami modeling[PowerPoint]. Minneapolis, Minnesota: University of Minnesota.
(2008, June 7). NVIDIA CUDA compute unified device architecture. Retrieved July 29, 2008, from NVIDIA: http://developer.download.nvidia.com/compute/cuda/2.0-Beta2/docs/Programming_Guide_2.0beta2.pdf
Piret, C. (2007). Analytical and numerical advances in radial basis functions, (Doctoral dissertation, University of Colorado at Boulder, 2007). Retrieved from http://amath.colorado.edu/student/piret/thesis.pdf
Sevre, E., Yuen, D. A., & Liu, Y. (2008). Visualization of tsunami waves with Amira package.
![Page 62: Tsunami Eth YUEN](https://reader033.vdocuments.mx/reader033/viewer/2022050712/55347b40550346457f8b4abd/html5/thumbnails/62.jpg)
Examples of Commonly Used Radial Basis Functions
![Page 63: Tsunami Eth YUEN](https://reader033.vdocuments.mx/reader033/viewer/2022050712/55347b40550346457f8b4abd/html5/thumbnails/63.jpg)
Comparison of the 1-D Chebychev Pseudo-Spectral Basis and the Gaussian RBF Basis and Influence of the Shape Parameter Epsilon
![Page 64: Tsunami Eth YUEN](https://reader033.vdocuments.mx/reader033/viewer/2022050712/55347b40550346457f8b4abd/html5/thumbnails/64.jpg)
Comparison of the Swirling Flow for Different Initial Conditions
![Page 65: Tsunami Eth YUEN](https://reader033.vdocuments.mx/reader033/viewer/2022050712/55347b40550346457f8b4abd/html5/thumbnails/65.jpg)
Sample MATLAB Code for Solid-Body Rotation
ep = 6; % Value of epsilon to usedalpha = pi/2; % Angle of rotation measured from the
equatora = 6.37122e6; % Mean radius of the earth (meters)u0 = 2*pi*a/12; % Speed of rotation (m/day)-one full
revolution in 12 daysR = a/3; % Width of bell%%% Load Nodes:
http://web.maths.unsw.edu.au/~rsw/Sphere/Energy/index.html%%%
load(‘me1849.dat’); x = me1849(:,1); y = me1849(:,2); z = me1849(:,3);
%%% Compute r2 = (x_j x_k)2+ (y_j y_k)2+(z_jz_k)2 %%%
nodes = [x,y,z];rd2 = zeros(length(nodes),length(nodes));for j = 1:3xd1 = nodes(:,j); xd1 = xd1(:,ones(length(xd1), 1));xd2 = xd10;rd2 = rd2 + (xd1 xd2).2;end%%% Set-up 2D surface grids in (theta,phi) for
computing B (eqn.(11)) %%%theta = atan2(z,sqrt(x.2+y.2)); phi = atan2(y,x); %
phi = lambda in paper
tn = theta; tn = tn(:,ones(length(xd1), 1)); tc = tn’;pn = phi; pn = pn(:,ones(length(phi), 1)); pc = pn’;%%% Compute differentiation matrix D %%%%B = 2*(cos(alpha).*cos(tn).*cos(tc).*sin(pn-pc) +
sin(alpha).*(cos(tn).*cos(pn).*sin(tc) -cos(tc).*cos(pc).*sin(tn)));
B = (u0/a)*B.*(-ep2*exp(-ep2.*rd2));A = exp(-ep2.*rd2);D = B/A;%%% Initial Condition Cosine Bell %%%r = a*acos(cos(theta).*cos(phi)); % initially located at
equator, (0,0)h = 1000/2*(1+cos(pi*r/R)); % height of bell is 1000
mh(r >= R)=0;%%% Time-Stepping - 4th Order RK %%%dt = 12/288*5/6; % Time-Step for 12 days revolutionfor nt = 2:(1*288*6/5)d1 = dt*D*h;d2 = dt*D*(h + 0.5*d1);d3 = dt*D*(h + 0.5*d2);d4 = dt*D*(h + d3);end
![Page 66: Tsunami Eth YUEN](https://reader033.vdocuments.mx/reader033/viewer/2022050712/55347b40550346457f8b4abd/html5/thumbnails/66.jpg)
Sample MATLAB Code for Solid-Body Rotation with GPU Implementation ( NO BIGGIE )
ep = 6; % Value of epsilon to usedalpha = pi/2; % Angle of rotation measured from the
equatora = 6.37122e6; % Mean radius of the earth (meters)u0 = 2*pi*a/12; % Speed of rotation (m/day)-one full
revolution in 12 daysR = a/3; % Width of bell%%% Load Nodes:
http://web.maths.unsw.edu.au/~rsw/Sphere/Energy/index.html%%%
load(‘me1849.dat’); x = me1849(:,1); y = me1849(:,2); z = me1849(:,3);
%%% Compute r2 = (x_j x_k)2+ (y_j y_k)2+(z_jz_k)2 %%%
nodes = [x,y,z];rd2 = zeros(length(nodes),length(nodes));for j = 1:3xd1 = nodes(:,j); xd1 = xd1(:,ones(length(xd1), 1));xd2 = xd10;rd2 = rd2 + (xd1 xd2).2;end%%% Set-up 2D surface grids in (theta,phi) for
computing B (eqn.(11)) %%%theta = atan2(z,sqrt(x.2+y.2)); phi = atan2(y,x); %
phi = lambda in paper
tn = theta; tn = tn(:,ones(length(xd1), 1)); tc = tn’;pn = phi; pn = pn(:,ones(length(phi), 1)); pc = pn’;%%% Compute differentiation matrix D %%%%B = 2*(cos(alpha).*cos(tn).*cos(tc).*sin(pn-pc) +
sin(alpha).*(cos(tn).*cos(pn).*sin(tc) -cos(tc).*cos(pc).*sin(tn)));
B = (u0/a)*B.*(-ep2*exp(-ep2.*rd2));A = exp(-ep2.*rd2);D = B/A;%%% Initial Condition Cosine Bell %%%r = a*acos(cos(theta).*cos(phi)); % initially located at
equator, (0,0)h = 1000/2*(1+cos(pi*r/R)); % height of bell is 1000
mh(r >= R)=0;D=gsingle(D); % puts matrix D on the GPUh=gsingle(h); % puts h on the GPU%%% Time-Stepping - 4th Order RK %%%dt = 12/288*5/6; % Time-Step for 12 days revolutionfor nt = 2:(1*288*6/5)d1 = dt*D*h;d2 = dt*D*(h + 0.5*d1);d3 = dt*D*(h + 0.5*d2);d4 = dt*D*(h + d3);end
![Page 67: Tsunami Eth YUEN](https://reader033.vdocuments.mx/reader033/viewer/2022050712/55347b40550346457f8b4abd/html5/thumbnails/67.jpg)
Results for Solid Body Rotation
CPU time GPU time Speed up
119 seconds 23 seconds 5.2 times
Notes:The CPU used was an Intel Duo Core ProcessorThe GPU used was an NVIDIA GeForce 8600M GT in a MacBook ProThe times calculated were the RK4 loop, as that was the part on the GPU.GPU implementation was facilitated by the Jacket software package produced by AccelerEyes
![Page 68: Tsunami Eth YUEN](https://reader033.vdocuments.mx/reader033/viewer/2022050712/55347b40550346457f8b4abd/html5/thumbnails/68.jpg)
Several Thousand RBF Points Laid Out On Spherical Shellfor 3-D thermal convection
![Page 69: Tsunami Eth YUEN](https://reader033.vdocuments.mx/reader033/viewer/2022050712/55347b40550346457f8b4abd/html5/thumbnails/69.jpg)
Concluding Remarks and Perspectives
GPU can make a difference in speeding up for both single processor on your laptop or clusters of GPU's , they are much cheaper , $10,000 can mean 50 times your present compute power can be put in your office, whither Brutus et TU !!
RBF's is a new method which can have a future because of its algorithmic simplicity. Easy to learn and program. It is still in nascent stage, like finite-elements were in the late 1960’s,when Paul Tackley was a babe.
Combining GPU with RBF, we can now speed up the nonlinear shallow-water equation by a factor close to 100, for the same physical elapsed time so a calculation which took 30 minutes can be done in 20 seconds( on single processor armed with GPU). This makes real-time tsunami warning a definite possibility