source: anuga_work/publications/linuxconf_2006/paper_ole_nielsen.tex @ 4115

Last change on this file since 4115 was 4115, checked in by ole, 18 years ago

First cut of linuxconf paper

File size: 17.4 KB
Line 
1% Use the standard \LaTeXe\ article style in 12pt Computer Modern font
2% on A4 paper by
3\documentclass[12pt,a4paper]{article}
4% Do \emph{not} change the width nor the height of the text from the
5% defaults set by this document class.
6%
7% The alternative which is closer to what we actually use is
8% \documentclass[11pt,a5paper]{article}
9% \usepackage[a5paper]{geometry}
10% Because it is a great size for on screen reading
11% and prints nicely on a4paper either 2up or booklet.
12
13% The preamble is to contain your own \LaTeX\ commands and to say
14% what packages to use.  Three useful packages are the following:
15\usepackage{graphicx} % avoid epsfig or earlier such packages
16\usepackage{url}      % for URLs and DOIs
17\newcommand{\doi}[1]{\url{http://dx.doi.org/#1}}
18\usepackage{amsmath}  % many want amsmath extensions
19\usepackage{amsfonts}
20\usepackage{underscore}
21% Avoid loading unused packages (as done by some \LaTeX\ editors).
22
23% Create title and authors using \verb|\maketitle|.  Separate authors by
24% \verb|\and| and put addresses in \verb|\thanks| command with
25% \verb|\url| command \verb|\protect|ed.
26\title{Open Source Software for Computational Modelling of Fluid Flow}
27
28\author{
29O.~M.~Nielsen\thanks{Risk Assessment Methods Project, Geospatial and
30Earth Monitoring Division, Geoscience Australia, Symonston,
31\textsc{Australia}. \protect\url{mailto:Ole.Nielsen@ga.gov.au}} 
32\and
33S.~G.~Roberts\thanks{Dept. of Maths, Australian National University,
34Canberra, \textsc{Australia}. \protect\url{mailto:stephen.roberts}}}
35
36\date{30 December 2006}
37
38\newcommand{\AnuGA}{\textsc{Anuga}}
39\newcommand{\Python}{\textsc{Python}}
40\newcommand{\VPython}{\textsc{VPython}}
41\newcommand{\pypar}{\textsc{mpi}}
42\newcommand{\Metis}{\textsc{Metis}}
43\newcommand{\mpi}{\textsc{mpi}}
44
45\newcommand{\UU}{\mathbf{U}}
46\newcommand{\VV}{\mathbf{V}}
47\newcommand{\EE}{\mathbf{E}}
48\newcommand{\GG}{\mathbf{G}}
49\newcommand{\FF}{\mathbf{F}}
50\newcommand{\HH}{\mathbf{H}}
51\newcommand{\SSS}{\mathbf{S}}
52\newcommand{\nn}{\mathbf{n}}
53
54\newcommand{\code}[1]{\texttt{#1}}
55
56
57%\graphicspath{{../Figures/}}
58
59\begin{document}
60
61% Use default \verb|\maketitle|.
62\maketitle
63
64% Use the \verb|abstract| environment.
65\begin{abstract}
66Geoscience Australia and the Australian National University are
67developing a hydrodynamic inundation modelling tool called \AnuGA{}
68to help simulate the impact of natural inundation hazards such as
69riverine flooding, storm surges and tsunami. The core of \AnuGA{} is
70a \Python{} implementation of a finite-volume method for solving the
71conservative form of the Shallow Water Wave equation.  In this paper
72we describe the parallelisation of the code using a domain
73decomposition strategy. We describe the use of the the \Metis{}
74graph partitioning library to decompose our finite volume meshes.
75The parallel efficiency of our code is tested using a number of mesh
76partitions, and we verify that the \Metis{} graph partition is
77particularly efficient.
78\end{abstract}
79
80% By default we include a table of contents in each paper.
81\tableofcontents
82
83% Use \verb|\section|, \verb|\subsection|, \verb|\subsubsection| and
84% possibly \verb|\paragraph| to structure your document.  Make sure
85% you \verb|\label| them for cross-referencing with \verb|\ref|\,.
86\section{Introduction}
87\label{sec:intro}
88
89%Floods are the single greatest cause of death due to natural hazards
90%in Australia, causing almost 40{\%} of the fatalities recorded
91%between 1788 and 2003~\cite{Blong-2005}. Analysis of buildings
92%damaged between 1900 and 2003 suggests that 93.6{\%} of damage is
93%the result of meteorological hazards, of which almost 25{\%} is
94%directly attributable to flooding~\cite{Blong-2005}.
95
96Flooding of coastal communities may result from surges of near-shore
97waters caused by severe storms. The extent of inundation is
98critically linked to tidal conditions, bathymetry and topography; as
99recently exemplified in the United States by Hurricane Katrina.
100While the scale of the impact from such events is not common, the
101preferential development of Australian coastal corridors means that
102storm-surge inundation of even a few hundred metres beyond the
103shoreline has increased potential to cause significant disruption
104and loss.
105
106Coastal communities also face the small but real risk of tsunami.
107Fortunately, catastrophic tsunami of the scale of the 26 December
1082004 event are exceedingly rare. However, smaller-scale tsunami are
109more common and regularly threaten coastal communities around the
110world. Earthquakes which occur in the Java Trench near Indonesia
111(e.g.~\cite{TsuMIS1995}) and along the Puysegur Ridge to the south
112of New Zealand (e.g.~\cite{LebKC1998}) have potential to generate
113tsunami that may threaten Australia's northwestern and southeastern
114coastlines.
115
116Hydrodynamic modelling allows flooding, storm-surge and tsunami
117hazards to be better understood, their impacts to be anticipated
118and, with appropriate planning, their effects to be mitigated.
119Geoscience Australia in collaboration with the Mathematical Sciences
120Institute, Australian National University, is developing a software
121application called \AnuGA{} to model the hydrodynamics of floods,
122storm surges and tsunami. These hazards are modelled using the
123conservative shallow water equations which are described in
124section~\ref{sec:model}. In \AnuGA{} these equations are solved
125using a finite volume method as described in section~\ref{sec:fvm}.
126A more complete discussion of the method can be found in
127\cite{modsim2005} where the model and solution technique is
128validated on a standard tsunami benchmark data set.
129
130In this paper we will provide a description of the parallelisation
131of the code using a domain decomposition strategy and provide the
132preliminary timing results which verify the scalability of the
133parallel code.
134
135
136
137\section{Model}
138\label{sec:model}
139
140The shallow water wave equations are a system of differential
141conservation equations which describe the flow of a thin layer of
142fluid over terrain. The form of the equations are:
143\[
144\frac{\partial \UU}{\partial t}+\frac{\partial \EE}{\partial
145x}+\frac{\partial \GG}{\partial y}=\SSS
146\]
147where $\UU=\left[ {{\begin{array}{*{20}c}
148 h & {uh} & {vh} \\
149\end{array} }} \right]^T$ is the vector of conserved quantities; water depth
150$h$, $x$ momentum $uh$ and $y$ momentum $vh$. Other quantities
151entering the system are bed elevation $z$ and stage (absolute water
152level) $w$, where the relation $w = z + h$ holds true at all times.
153The fluxes in the $x$ and $y$ directions, $\EE$ and $\GG$ are given
154by
155\[
156\EE=\left[ {{\begin{array}{*{20}c}
157 {uh} \hfill \\
158 {u^2h+gh^2/2} \hfill \\
159 {uvh} \hfill \\
160\end{array} }} \right]\mbox{ and }\GG=\left[ {{\begin{array}{*{20}c}
161 {vh} \hfill \\
162 {vuh} \hfill \\
163 {v^2h+gh^2/2} \hfill \\
164\end{array} }} \right]
165\]
166and the source term (which includes gravity and friction) is given
167by
168\[
169\SSS=\left[ {{\begin{array}{*{20}c}
170 0 \hfill \\
171 -{gh(z_{x} + S_{fx} )} \hfill \\
172 -{gh(z_{y} + S_{fy} )} \hfill \\
173\end{array} }} \right]
174\]
175where $S_f$ is the bed friction. The friction term is modelled using
176Manning's resistance law
177\[
178S_{fx} =\frac{u\eta ^2\sqrt {u^2+v^2} }{h^{4/3}}\mbox{ and }S_{fy}
179=\frac{v\eta ^2\sqrt {u^2+v^2} }{h^{4/3}}
180\]
181in which $\eta$ is the Manning resistance coefficient.
182
183As demonstrated in our papers, \cite{modsim2005,Rob99l} these
184equations provide an excellent model of flows associated with
185inundation such as dam breaks and tsunamis.
186
187\section{Finite Volume Method}
188\label{sec:fvm}
189
190We use a finite-volume method for solving the shallow water wave
191equations \cite{Rob99l}. The study area is represented by a mesh of
192triangular cells as in Figure~\ref{fig:mesh} in which the conserved
193quantities of  water depth $h$, and horizontal momentum $(uh, vh)$,
194in each volume are to be determined. The size of the triangles may
195be varied within the mesh to allow greater resolution in regions of
196particular interest.
197
198\begin{figure}
199\begin{center}
200\includegraphics[width=5.0cm,keepaspectratio=true]{step-five}
201\caption{Triangular mesh used in our finite volume method. Conserved
202quantities $h$, $uh$ and $vh$ are associated with the centroid of
203each triangular cell.} \label{fig:mesh}
204\end{center}
205\end{figure}
206
207The equations constituting the finite-volume method are obtained by
208integrating the differential conservation equations over each
209triangular cell of the mesh. Introducing some notation we use $i$ to
210refer to the $i$th triangular cell $T_i$, and ${\cal N}(i)$ to the
211set of indices referring to the cells neighbouring the $i$th cell.
212Then $A_i$ is the area of the $i$th triangular cell and $l_{ij}$ is
213the length of the edge between the $i$th and $j$th cells.
214
215By applying the divergence theorem we obtain for each volume an
216equation which describes the rate of change of the average of the
217conserved quantities within each cell, in terms of the fluxes across
218the edges of the cells and the effect of the source terms. In
219particular, rate equations associated with each cell have the form
220$$
221 \frac{d\UU_i }{dt}+ \frac1{A_i}\sum\limits_{j\in{\cal N}(i)} \HH_{ij} l_{ij} = \SSS_i
222$$
223where
224\begin{itemize}
225\item $\UU_i$ the vector of conserved quantities averaged over the $i$th cell,
226\item $\SSS_i$ is the source term associated with the $i$th cell,
227and
228\item $\HH_{ij}$ is the outward normal flux of
229material across the \textit{ij}th edge.
230\end{itemize}
231
232
233%\item $l_{ij}$ is the length of the edge between the $i$th and $j$th
234%cells
235%\item $m_{ij}$ is the midpoint of
236%the \textit{ij}th edge,
237%\item
238%$\mathbf{n}_{ij} = (n_{ij,1} , n_{ij,2})$is the outward pointing
239%normal along the \textit{ij}th edge, and The
240
241The flux $\HH_{ij}$ is evaluated using a numerical flux function
242$\HH(\cdot, \cdot ; \ \cdot)$ which is consistent with the shallow
243water flux in the sense that for all vectors $\UU$ and $\nn$
244$$
245H(\UU,\UU;\ \nn) = \EE(\UU) n_1 + \GG(\UU) n_2 .
246$$
247
248Then
249$$
250\HH_{ij}  = \HH(\overline{\UU}_i(m_{ij})),
251\overline{\UU}_i(m_{ij})), \mathbf{n}_{ij})
252$$
253where $m_{ij}$ is the midpoint of the \textit{ij}th edge and
254$\mathbf{n}_{ij}$ is the outward pointing normal on the
255\textit{ij}th edge. The function $\overline{\UU}_i(x)$ for $x \in
256T_i$ is obtained from the average values, $\UU_i$, of the $i$th and
257neighbouring  cells.
258
259We use a second order reconstruction to produce a piece-wise linear
260function construction of the conserved quantities for  all $x \in
261T_i$ for each cell (see Figure~\ref{fig:mesh:reconstruct}. This
262function is allowed to be discontinuous across the edges of the
263cells, but the slope of this function is limited to avoid
264artificially introduced oscillations.
265
266Godunov's method (see \cite{Toro-92}) involves calculating the
267numerical flux function $\HH(\cdot, \cdot ; \ \cdot)$ by exactly
268solving the corresponding one dimensional Riemann problem normal to
269the edge. We use the central-upwind scheme of \cite{KurNP2001} to
270calculate an approximation of the flux across each edge.
271
272\begin{figure}
273\begin{center}
274\includegraphics[width=5.0cm,keepaspectratio=true]{step-reconstruct}
275\caption{From the values of the conserved quantities at the centroid
276of the cell and its neighbouring cells, a discontinuous piecewise
277linear reconstruction of the conserved quantities is obtained.}
278\label{fig:mesh:reconstruct}
279\end{center}
280\end{figure}
281
282
283
284
285
286In the computations presented in this paper we use an explicit Euler
287time stepping method with variable timestepping adapted to the
288observed CFL condition.
289
290
291
292
293
294
295
296\section{Validation}
297\label{sec:validation} The process of validating the \AnuGA{}
298application is in its early stages, however initial indications are
299encouraging.
300
301As part of the Third International Workshop on Long-wave Runup
302Models in 2004 (\url{http://www.cee.cornell.edu/longwave}), four
303benchmark problems were specified to allow the comparison of
304numerical, analytical and physical models with laboratory and field
305data. One of these problems describes a wave tank simulation of the
3061993 Okushiri Island tsunami off Hokkaido, Japan \cite{MatH2001}. A
307significant feature of this tsunami was a maximum run-up of 32~m
308observed at the head of the Monai Valley. This run-up was not
309uniform along the coast and is thought to have resulted from a
310particular topographic effect. Among other features, simulations of
311the Hokkaido tsunami should capture this run-up phenomenon.
312
313\begin{figure}[htbp]
314\centerline{\includegraphics[width=4in]{tsunami-fig-3.eps}}
315\caption{Comparison of wave tank and \AnuGA{} water stages at gauge
3165.}\label{fig:val}
317\end{figure}
318
319
320\begin{figure}[htbp]
321\centerline{\includegraphics[width=4in]{tsunami-fig-4.eps}}
322\caption{Complex reflection patterns and run-up into Monai Valley
323simulated by \AnuGA{} and visualised using our netcdf OSG
324viewer.}\label{fig:run}
325\end{figure}
326
327
328The wave tank simulation of the Hokkaido tsunami was used as the
329first scenario for validating \AnuGA{}. The dataset provided
330bathymetry and topography along with initial water depth and the
331wave specifications. The dataset also contained water depth time
332series from three wave gauges situated offshore from the simulated
333inundation area.
334
335Figure~\ref{fig:val} compares the observed wave tank and modelled
336\AnuGA{} water depth (stage height) at one of the gauges. The plots
337show good agreement between the two time series, with \AnuGA{}
338closely modelling the initial draw down, the wave shoulder and the
339subsequent reflections. The discrepancy between modelled and
340simulated data in the first 10 seconds is due to the initial
341condition in the physical tank not being uniformly zero. Similarly
342good comparisons are evident with data from the other two gauges.
343Additionally, \AnuGA{} replicates exceptionally well the 32~m Monai
344Valley run-up, and demonstrates its occurrence to be due to the
345interaction of the tsunami wave with two juxtaposed valleys above
346the coastline. The run-up is depicted in Figure~\ref{fig:run}.
347
348This successful replication of the tsunami wave tank simulation on a
349complex 3D beach is a positive first step in validating the \AnuGA{}
350modelling capability. Subsequent validation will be conducted as
351additional datasets become available.
352
353
354
355\section{Parallel Implementation}\label{sec:parallel}
356
357To parallelize our algorithm we use a simple domain decomposition
358strategy. We suppose we have a global mesh which defines the domain
359of our problem. We must first subdivide the global mesh into a set
360of non-overlapping submeshes. This partitioning is done using the
361\Metis{} partitioning library. We will demonstrate the efficiency of
362this library in the following subsections. Once this partitioning
363has been done, and the proper communication patterns set, we can
364start to evolve our solution. Each timestep consists of
365independently and then communicate the appropriate ``ghost'' cell
366information once each timestep.
367
368%\begin{figure}[hbtp]
369%  \centerline{ \includegraphics[scale = 0.6]{domain.eps}}
370%  \caption{The first step of the parallel algorithm is to divide
371%  the mesh over the processors.}
372%  \label{fig:subpart}
373%\end{figure}
374
375
376
377\begin{figure}[h!]
378  \centerline{ \includegraphics[width=6.5cm]{mermesh.eps}}
379  \caption{The global Merimbula mesh}
380 \label{fig:mergrid}
381\end{figure}
382
383\begin{figure}[h!]
384  \centerline{ \includegraphics[width=6.5cm]{mermesh4c.eps}
385  \includegraphics[width=6.5cm]{mermesh4a.eps}}
386
387  \centerline{ \includegraphics[width=6.5cm]{mermesh4d.eps}
388  \includegraphics[width=6.5cm]{mermesh4b.eps}}
389  \caption{The global Merimbula mesh partitioned into 4 submeshes using \Metis.}
390 \label{fig:mergrid4}
391\end{figure}
392
393
394
395
396\begin{table}[h!]
397\caption{4-way and 8-way partition tests of Merimbula mesh showing
398the percentage distribution of cells between the
399submeshes.}\label{tbl:mer}
400\begin{center}
401\begin{tabular}{|c|c c c c|}
402\hline
403CPU & 0 & 1 & 2 & 3\\
404\hline
405Cells & 2757 & 2713 & 2761 & 2554\\
406\% & 25.6\% & 25.2\% & 25.6\% & 23.7\%\ \\
407\hline
408\end{tabular}
409
410\medskip
411
412\begin{tabular}{|c|c c c c c c c c|}
413\hline
414CPU & 0 & 1 & 2 & 3 & 4 & 5 & 6 & 7\\
415\hline
416Cells & 1229 & 1293 & 1352 & 1341 & 1349 & 1401 & 1413 & 1407\\
417\% & 11.4\% & 12.0\% & 12.5\% & 12.4\% & 12.5\% & 13.0\% & 13.1\% & 13.1\%\\
418\hline
419\end{tabular}
420\end{center}
421\end{table}
422
423
424\section{Conclusions}
425\label{sec:6} \AnuGA{} is a flexible and robust modelling system
426that simulates hydrodynamics by solving the shallow water wave
427equation in a triangular mesh. It can model the process of wetting
428and drying as water enters and leaves an area and is capable of
429capturing hydraulic shocks due to the ability of the finite-volume
430method to accommodate discontinuities in the solution.
431
432\AnuGA{} can take as input bathymetric and topographic datasets and
433simulate the behaviour of riverine flooding, storm surge and
434tsunami. Initial validation using wave tank data supports AnuGA's
435ability to model complex scenarios. Further validation will be
436pursued as additional datasets become available.
437
438\AnuGA{} is already being used to model the behaviour of
439hydrodynamic natural hazards. This modelling capability is part of
440Geoscience Australia's ongoing research effort to model and
441understand the potential impact from natural hazards in order to
442reduce their impact on Australian communities.
443
444
445\paragraph{Acknowledgements:}
446The authors are grateful to Belinda Barnes, National Centre for
447Epidemiology and Population Health, Australian National University,
448and Matt Hayne and Augusto Sanabria, Risk Research Group, Geoscience
449Australia, for helpful reviews of a previous version of this paper.
450Author Nielsen publish with the permission of the CEO, Geoscience
451Australia.
452
453% Preferably provide your bibliography as a separate .bbl file.
454% Include URLs, DOIs, Math Review numbers or Zentralblatt numbers in your bibliography
455% so we help connect the web of science and ensure maximum visibility
456% for your article.
457\bibliographystyle{plain}
458\bibliography{database1}
459
460
461
462
463\end{document}
Note: See TracBrowser for help on using the repository browser.