waves-16-arma

git clone https://git.igankevich.com/waves-16-arma.git
Log | Files | Refs

commit 52d0dfbe6a2ef0c0348cb76c6612b433ba3b9c7d
parent 46ee797152c7747d270d56b32e0b9c35601988f5
Author: Ivan Gankevich <igankevich@ya.ru>
Date:   Mon, 29 May 2017 14:36:03 +0300

Remove irrelevant sections.

Diffstat:
arma.org | 165++++++++-----------------------------------------------------------------------
refs.bib | 110++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-----
2 files changed, 119 insertions(+), 156 deletions(-)

diff --git a/arma.org b/arma.org @@ -100,7 +100,7 @@ of the boundary conditions is (a) applied on the surface of the undisturbed fluid \((z=0)\) and (b) all nonlinear terms in the boundary conditions are ignored. The Laplace equation is linear and its solution can be found using Fourier transforms. Thus, for plane waves a well-known solution is given in the -form of a definite integral cite:kochin1964theoretical: +form of a definite integral cite:kochin1966theoretical: \begin{equation*} \phi(x,z,t) = \int\limits_{0}^{\infty} @@ -1229,141 +1229,6 @@ arma.plot_velocity( :PROPERTIES: :CUSTOM_ID: sec:arma-algorithms :END: -** Wave elevation distribution approximation -One of the parameters of ocean wavy surface generator is probability density -function (PDF) of the surface elevation. This distribution is given by either -polynomial approximation of /in situ/ data or analytic formula. - -**** Gram---Charlier series expansion. -In\nbsp{}cite:huang1980experimental the authors experimentally show, that PDF of sea -surface elevation is distinguished from normal distribution by non-nought -kurtosis and skewness. In\nbsp{}cite:рожков1996теория the authors show, that this type -of PDF expands in Gram---Charlier series: -\begin{align} - \label{eq-skew-normal-1} - F(z; \gamma_1, \gamma_2) & = \phi(z) - - \gamma_1 \frac{\phi'''(z)}{3!} - + \gamma_2 \frac{\phi''''(z)}{4!} \nonumber \\ - & = - \frac{1}{2} \text{erf}\left[\frac{z}{\sqrt{2}}\right] - - - \frac{e^{-\frac{z^2}{2}}}{\sqrt{2\pi}} - \left[ - \frac{1}{6} \gamma_1 \left(z^2-1\right) - + \frac{1}{24} \gamma_2 z \left(z^2-3\right) - \right] - ,\nonumber \\ - f(z; \gamma_1, \gamma_2) & = - \frac{e^{-\frac{z^2}{2}}}{\sqrt{2 \pi }} - \left[ - \frac{1}{6} \gamma_1 z \left(z^2-3\right) - + \frac{1}{24} \gamma_2 \left(z^4-6z^2+3\right) - +1 - \right], -\end{align} -where \(\phi(z)=\frac{1}{2}\mathrm{erf}(z/\sqrt{2})\), \(\gamma_1\)\nbsp{}--- skewness, -\(\gamma_2\)\nbsp{}--- kurtosis, \(f\)\nbsp{}--- PDF, \(F\)\nbsp{}--- cumulative distribution function -(CDF). According to\nbsp{}cite:рожков1990вероятностные for ocean waves skewness is -selected from interval \(0.1\leq\gamma_1\leq{0.52}]\) and kurtosis from interval -\(0.1\leq\gamma_2\leq{0.7}\). Family of probability density functions for -different parameters is shown in fig.\nbsp{}[[fig-skew-normal-1]]. - -#+NAME: fig-skew-normal-1 -#+begin_src R :file build/skew-normal-1.pdf -source(file.path("R", "common.R")) -x <- seq(-3, 3, length.out=100) -params <- data.frame( - skewness = c(0.00, 0.52, 0.00, 0.52), - kurtosis = c(0.00, 0.00, 0.70, 0.70), - linetypes = c("solid", "dashed", "dotdash", "dotted") -) -arma.skew_normal_1_plot(x, params) -legend( - "topleft", - mapply( - function (s, k) { - as.expression(bquote(list( - gamma[1] == .(arma.fmt(s, 2)), - gamma[2] == .(arma.fmt(k, 2)) - ))) - }, - params$skewness, - params$kurtosis - ), - lty = paste(params$linetypes) -) -#+end_src - -#+caption: Probability density function eqref:eq-skew-normal-1 of ocean wavy surface elevation for different values of skewness \(\gamma_1\) and kurtosis \(\gamma_2\). -#+label: fig-skew-normal-1 -#+RESULTS: fig-skew-normal-1 -[[file:build/skew-normal-1.pdf]] - -**** Skew-normal distribution. -Alternative approach is to approximate distribution of ocean wavy surface -elevation by skew-normal distribution: -\begin{align} - \label{eq-skew-normal-2} - F(z; \alpha) & = \frac{1}{2} - \mathrm{erfc}\left[-\frac{z}{\sqrt{2}}\right]-2 T(z,\alpha ), \nonumber \\ - f(z; \alpha) & = \frac{e^{-\frac{z^2}{2}}}{\sqrt{2 \pi }} - \mathrm{erfc}\left[-\frac{\alpha z}{\sqrt{2}}\right], -\end{align} -where \(T\)\nbsp{}--- Owen \(T\)-function\nbsp{}cite:owen1956tables. Using this formula it is -impossible to specify skewness and kurtosis separately\nbsp{}--- both values are -adjusted via \(\alpha\) parameter. The only advantage of the formula is its -relative computational simplicity: this function is available in some programmes -and mathematical libraries. Its graph for different values of \(\alpha\) is shown -in fig.\nbsp{}[[fig-skew-normal-2]]. - -#+name: fig-skew-normal-2 -#+begin_src R :file build/skew-normal-2.pdf -source(file.path("R", "common.R")) -x <- seq(-3, 3, length.out=100) -alpha <- c(0.00, 0.87, 2.25, 4.90) -params <- data.frame( - alpha = alpha, - skewness = arma.bits.skewness_2(alpha), - kurtosis = arma.bits.kurtosis_2(alpha), - linetypes = c("solid", "dashed", "dotdash", "dotted") -) -arma.skew_normal_2_plot(x, params) -legend( - "topleft", - mapply( - function (a, s, k) { - as.expression(bquote(list( - alpha == .(arma.fmt(a, 2)), - gamma[1] == .(arma.fmt(s, 2)), - gamma[2] == .(arma.fmt(k, 2)) - ))) - }, - params$alpha, - params$skewness, - params$kurtosis - ), - lty = paste(params$linetypes) -) -#+end_src - -#+caption: Probability density function eqref:eq-skew-normal-2 of ocean wavy surface for different values of skewness coefficient \(\alpha\). -#+label: fig-skew-normal-2 -#+RESULTS: fig-skew-normal-2 -[[file:build/skew-normal-2.pdf]] - -**** Evaluation. -Equation eqref:eq-distribution-transformation with selected wave elevation -distribution may be solved either in every point of generated wavy surface, -which gives the most accurate results, or in every fixed grid point -interpolating result via least-squares (LS) polynomial. In the second case -precision is lower. For example, interpolating 12^th order polynomial on a fixed -grid of 500 points on interval \(-5\sigma_z\leq{z}\leq{5}\sigma_z\) gives error of -\(\approx{0.43}\cdot10^{-3}\). Increasing polynomial order leads to either numeric -overflows during LS interpolation, or more coefficient close to nought; -increasing the size of the grid has insignificant effect on the result. In the -majority of cases three Gram---Charlier series coefficients is enough to -transform ACF; relative error without interpolation is \(10^{-5}\). - ** White noise generation In order to eliminate periodicity from generated wavy surface, it is imperative to use PRNG with sufficiently large period to generate white noise. Parallel @@ -1497,6 +1362,12 @@ For the purpose of evaluation we use simplified version of\nbsp{}eqref:eq-phi-hi }{x,y}\nonumber \\ &= \InverseFourierY{ g_1(u,v) \FourierY{ g_2(x,y) }{u,v} }{x,y}. \end{align} +This formula is particularly suitable for computation on GPUs: +- it contains transcendental mathematical functions (hyperbolic cosines and + complex exponents); +- it is computed over large four-dimensional ($t$, $x$, $y$, $z$) region; +- it is analytic with no information dependencies between individual data points + in $t$ and $z$ dimensions. Since standing sea wave generator does not allow efficient GPU implementation due to autoregressive dependencies between wavy surface points, only velocity potential solver was rewritten in OpenCL and its performance was compared to @@ -1531,9 +1402,9 @@ how one implementation corresponds to the other in terms of performance. ** Results The experiments showed that GPU implementation outperforms CPU implementation by -a factor of 10--15 (fig.~\ref{fig:bench-cpu-gpu}), however, distribution of time +a factor of 10--15 (fig.\nbsp{}[[fig-bench-cpu-gpu]]), however, distribution of time between computation stages is different for each implementation -(fig.~\ref{fig:breakdown-cpu-gpu}). The major time consumer in CPU +(fig.\nbsp{}[[fig-breakdown-cpu-gpu]]). The major time consumer in CPU implementation is computation of $g_1$, whereas in GPU implementation its running time is comparable to computation of $g_2$. GPU computes $g_1$ much faster than CPU due to a large amount of modules for transcendental mathematical @@ -1544,17 +1415,13 @@ kernel, and, subsequently copied to GPU memory which severely hinders overall stage performance. Copying the resulting velocity potential field between CPU and GPU consumes $\approx{}20\%$ of velocity potential solver execution time. -\begin{figure} - \centering - \includegraphics{bench-cpu-gpu} - \caption{Performance comparison of CPU (OpenMP) and GPU (OpenCL) versions of velocity potential solver.\label{fig:bench-cpu-gpu}} -\end{figure} - -\begin{figure} - \centering - \includegraphics{breakdown-cpu-gpu} - \caption{Performance breakdown for GPU (OpenCL) and CPU (OpenMP) versions of velocity potential solver.\label{fig:breakdown-cpu-gpu}} -\end{figure} +#+name: fig-bench-cpu-gpu +#+caption: Performance comparison of CPU (OpenMP) and GPU (OpenCL) versions of velocity potential solver. +[[file:figures/bench-cpu-gpu.pdf]] + +#+name: fig-breakdown-cpu-gpu +#+caption: Performance breakdown for GPU (OpenCL) and CPU (OpenMP) versions of velocity potential solver. +[[file:figures/breakdown-cpu-gpu.pdf]] * Conclusion Research results allow to conclude that a problem of determining pressures under diff --git a/refs.bib b/refs.bib @@ -32,13 +32,6 @@ publisher={The Royal Society} } -@book{kochin1964theoretical, - title={Theoretical hydromechanics}, - author={Kochin, Nikolai and Iliia, A Kibel and Roze, Nikolai}, - year={1964}, - publisher={Interscience} -} - @article{beck2001modern, title={Modern computational methods for ships in a seaway}, author={Beck, Robert F and Reed, Arthur M and Sclavounos, Paul D and Hutchison, Bruce L}, @@ -288,4 +281,107 @@ pages = {3--30}, year = {1998}, publisher = {ACM} +} + +@Book{ oppenheim1989discrete, + title = {Discrete-time signal processing}, + author = {Oppenheim, Alan V and Schafer, Ronald W and Buck, John R + and others}, + volume = {2}, + year = {1989}, + publisher = {Prentice hall Englewood Cliffs, NJ} +} + +@Article{ owen1956tables, + title = {Tables for computing bivariate normal probabilities}, + author = {Owen, Donald B}, + journal = {The Annals of Mathematical Statistics}, + volume = {27}, + number = {4}, + pages = {1075--1090}, + year = {1956}, + publisher = {JSTOR} +} + +@Book{ pavel2013algorithms, + title = {Algorithms for efficient computation of convolution}, + author = {Pavel, Karas and David, Svoboda}, + year = {2013}, + publisher = {INTECH Open Access Publisher} +} + +@book{ rozhkov1996prob, + title = {Theory of probabilities of random events, quantities and functions + with hydrometeorological examples (in Russian)}, + author = {Rozhkov, V. A.}, + address = {Saint-Petersburg}, + publisher = {Progress--Pogoda}, + year = {1996} +} + +@InCollection{ svoboda2011efficient, + title = {Efficient computation of convolution of huge images}, + author = {Svoboda, David}, + booktitle = {Image Analysis and Processing--ICIAP 2011}, + pages = {453--462}, + year = {2011}, + publisher = {Springer} +} + +@PhDThesis{ boukhanovsky1997thesis, + author = {Boukhanovsky, A. V.}, + title = {Probabilistic modeling of wind wave fields taking into account their + heterogeneity and nonstationarity}, + year = {1997}, + school = {Saint Petersburg State University} +} + +@Article{ degtyarev2011modelling, + title = {Modelling of incident waves near the ship’s hull + (application of autoregressive approach in problems of + simulation of rough seas)}, + author = {Degtyarev, AB and Reed, AM}, + journal = {Proceedings of the 12th International Ship Stability + Work-shop}, + year = {2011} +} + +@Article{ degtyarev2013synoptic, + title = {Synoptic and short-term modeling of ocean waves}, + author = {Degtyarev, Alexander B and Reed, Arthur M}, + journal = {International Shipbuilding Progress}, + volume = {60}, + number = {1-4}, + pages = {523--553}, + year = {2013}, + publisher = {IOS Press} +} + +@Article{ huang1980experimental, + title = {An experimental study of the surface elevation probability + distribution and statistics of wind-generated waves}, + author = {Huang, Norden E and Long, Steven R}, + journal = {Journal of Fluid Mechanics}, + volume = {101}, + number = {01}, + pages = {179--200}, + year = {1980}, + publisher = {Cambridge Univ Press} +} + +@Book{ kochin1966theoretical, + title = {Theoretical hydrodynamics [in Russian]}, + author = {Kochin, N. and Kibel, I. and Roze, N.}, + pages = {237}, + year = {1966}, + publisher = {FizMatLit} +} + +@Manual{ mathematica10, + author = {{Wolfram Research, Inc.}}, + title = {Mathematica}, + annote = {Version 10.4}, + publisher = {Wolfram Research, Inc.}, + address = {Champaign, Illinois}, + year = {2016} } \ No newline at end of file