iccsa-19-vtestbed

git clone https://git.igankevich.com/iccsa-19-vtestbed.git
Log | Files | Refs

commit 2f567e38c8ecc5406c7089d63cef5177b585b517
parent 457096e32269f911dd8f8d30f1aad8d487633f52
Author: Ivan Gankevich <igankevich@ya.ru>
Date:   Sat, 29 Jun 2019 13:44:01 +0300

More formulae.

Diffstat:
Makefile | 4++++
graphics/roll.svg | 145+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
shell/profile | 10++++++++++
slides.tex | 107++++++++++++++++++++++++++++++++++++++++++++-----------------------------------
4 files changed, 218 insertions(+), 48 deletions(-)

diff --git a/Makefile b/Makefile @@ -24,6 +24,7 @@ build/$(NAME).pdf: main.tex build/$(SLIDES).pdf: build/openmp-slides.eps build/$(SLIDES).pdf: build/histogram-slides.eps +build/$(SLIDES).pdf: build/roll.eps build/$(SLIDES).pdf: slides.tex @echo " LATEX $<" @-$(LATEXMK) $(FLAGS) -xelatex -f $< @@ -46,6 +47,9 @@ build/histogram-slides.svg: build/*.histogram.dat gnuplot/histogram-slides.gnupl build/%.eps: build/%.svg inkscape -z --export-eps=$@ $< +build/roll.eps: graphics/roll.svg + inkscape -z --export-eps=$@ $< + build: @mkdir -p build diff --git a/graphics/roll.svg b/graphics/roll.svg @@ -0,0 +1,145 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + version="1.1" + width="3.9097521cm" + height="3.440449cm" + id="svg2" + sodipodi:docname="roll.svg" + inkscape:version="0.92.3 (2405546, 2018-03-11)"> + <metadata + id="metadata981"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title>Metacentric Height</dc:title> + </cc:Work> + </rdf:RDF> + </metadata> + <defs + id="defs979" /> + <sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1920" + inkscape:window-height="1052" + id="namedview977" + showgrid="false" + fit-margin-top="0" + fit-margin-left="0" + fit-margin-right="0" + fit-margin-bottom="0" + units="cm" + inkscape:zoom="4.0785919" + inkscape:cx="43.964647" + inkscape:cy="57.069134" + inkscape:window-x="0" + inkscape:window-y="28" + inkscape:window-maximized="0" + inkscape:current-layer="svg2" /> + <title + id="title918">Metacentric Height</title> + <style + type="text/css" + id="style920"> + circle {fill:yellow;stroke:green;stroke-width:1} + </style> + <rect + id="rect924" + style="fill:#0080ff;stroke:#0000ff;stroke-width:0.2240504;fill-opacity:0.6036036" + y="51.747646" + x="0.1120252" + rx="0" + height="78.173042" + width="147.54611" /> + <path + inkscape:connector-curvature="0" + id="path928" + style="fill:#ffffff;stroke:#000000;stroke-width:0.35928196px;stroke-linecap:square;stroke-linejoin:miter;stroke-opacity:1" + d="M 31.38784,0.23024814 146.1768,42.010012 116.6852,123.03751 C 111.76994,136.54209 -3.0190202,94.762325 1.8962439,81.257747 Z" /> + <path + inkscape:connector-curvature="0" + id="path944" + style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:1, 2;stroke-dashoffset:10" + d="M 80.180603,19.603415 V 116.60953" /> + <path + inkscape:connector-curvature="0" + id="path946" + style="display:inline;fill:none;stroke:#000000;stroke-width:1;stroke-linecap:square;stroke-linejoin:round;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:1, 2;stroke-dashoffset:10" + d="M 88.167909,22.808202 56.218683,110.58799" /> + <g + id="g1153" + transform="matrix(0.625,0,0,0.625,120.76586,56.594712)"> + <circle + r="9.1943493" + cy="53.16795" + cx="-64.360443" + id="path1127" + style="fill:#d9dad9;fill-opacity:1;stroke:#000000;stroke-width:1.88999999;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + <text + id="text1089" + y="58.16502" + x="-69.196869" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:14px;line-height:25px;font-family:'Open Sans';-inkscape-font-specification:'Open Sans';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + xml:space="preserve"><tspan + y="58.16502" + x="-69.196869" + id="tspan1087" + sodipodi:role="line">B</tspan></text> + </g> + <g + id="g1158" + transform="matrix(0.625,0,0,0.625,113.79348,-2.1418544)"> + <circle + r="9.1943493" + cy="74.376259" + cx="-53.204639" + id="path1127-3" + style="fill:#d9dad9;fill-opacity:1;stroke:#000000;stroke-width:1.88999999;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + <text + id="text1089-3" + y="79.373329" + x="-59.527882" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:14px;line-height:25px;font-family:'Open Sans';-inkscape-font-specification:'Open Sans';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + xml:space="preserve"><tspan + y="79.373329" + x="-59.527882" + id="tspan1087-6" + sodipodi:role="line">M</tspan></text> + </g> + <g + id="g1163" + transform="matrix(0.625,0,0,0.625,116.36791,10.760879)"> + <circle + r="9.1943493" + cy="91.784218" + cx="-71.838516" + id="path1127-5" + style="fill:#d9dad9;fill-opacity:1;stroke:#000000;stroke-width:1.88999999;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + <text + id="text1089-3-7" + y="96.784706" + x="-76.849258" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:14px;line-height:25px;font-family:'Open Sans';-inkscape-font-specification:'Open Sans';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + xml:space="preserve"><tspan + y="96.784706" + x="-76.849258" + id="tspan1087-6-5" + sodipodi:role="line">G</tspan></text> + </g> +</svg> diff --git a/shell/profile b/shell/profile @@ -122,3 +122,13 @@ WHERE node='$node' AND ship='$ship' AND total = ( " > build/$ship.$node.histogram.dat done done + +query " +.mode csv +.separator ' ' +SELECT nthreads,AVG(pressure) +FROM profile +WHERE node = 'capybara1' AND profile = 'openmp' +GROUP BY nthreads +ORDER BY nthreads ASC +" diff --git a/slides.tex b/slides.tex @@ -3,6 +3,7 @@ \setdefaultlanguage{english} \usetheme{SaintPetersburg} +\usepackage{textcomp} \usepackage{booktabs} \usepackage{multicol} \usepackage{pgfgantt} @@ -66,9 +67,6 @@ A.\:Grigorev% GPUs are easy to get and powerfull. \end{column} \end{columns} - \pause - \vfill - {\Large How much performance can we gain using GPUs?} \end{frame} \begin{frame}{Wavy surface} @@ -84,28 +82,21 @@ A.\:Grigorev% \end{columns} \end{frame} -\begin{frame}{Velocity potential} +\begin{frame}{Fluid motions} \begin{columns}[T] \begin{column}{0.49\textwidth} \includegraphics[width=\textwidth]{graphics/waves-velocity.png} \end{column} \begin{column}{0.49\textwidth} - \begin{beamercolorbox}[colsep*=.75ex,vmode]{block body}% - \vspace{-\baselineskip}% - \begin{align*}% - & \nabla^2\phi = 0 - & \text{continuity equation}\\ - & \phi_t+\frac{1}{2} |\vec{\upsilon}|^2 + g\zeta=-\frac{p}{\rho} - & \text{dynamic BC}\\ - & D\zeta = \nabla \phi \cdot \vec{n} - & \text{kinematic BC}\\ - \end{align*}% - \vspace{-2.5\baselineskip}% - \end{beamercolorbox} - \spbuArrow{}% - \vspace{-0.2cm}% - \begin{beamercolorbox}[colsep*=.75ex,vmode]{block body}% - Solution:\vspace{-0.5\baselineskip}% + Equations of motion: + \begin{equation*}% + \begin{cases} + \nabla^2\phi = 0 \\ + \phi_t+\frac{1}{2} |\vec{\upsilon}|^2 + g\zeta=-\frac{p}{\rho} \\ + D\zeta = \nabla \phi \cdot \vec{n} + \end{cases} + \end{equation*}% + Solution in convolution form: \begin{equation*}% \phi(x,y,z,t) = @@ -113,8 +104,11 @@ A.\:Grigorev% \mathrel{*} \frac{\zeta_t(x,y,t)}{F\left(f_1, f_2, f_3\right)} \end{equation*}% - \vspace{-0.5\baselineskip}% - \end{beamercolorbox}% + \footnotesize + \begin{itemize} + \item Describe conservation of mass and momentum for fluid. + \item Convolution theorem is used for fast computation. + \end{itemize} \end{column} \end{columns} \end{frame} @@ -125,16 +119,20 @@ A.\:Grigorev% \includegraphics[width=\textwidth]{graphics/ship-velocity-waves.png} \end{column} \begin{column}{0.49\textwidth} - Pressure: - \begin{equation*} - p(x,y,z,t) = -\rho\phi_t - - \rho\frac{1}{2}\left( \phi_x^2 + \phi_y^2 + \phi_z^2 \right) - - \rho g z - \end{equation*} - Pressure force: + For each ship hull panel: \begin{equation*} - F(x,y,z,t) = -p(x,y,z,t) S \vec{n} + \begin{aligned} + F &= \overbrace{ + \rho\left( + \phi_t + + \frac{1}{2}\left( \phi_x^2 + \phi_y^2 + \phi_z^2 \right) + \right) + S \vec{n}}^{\text{Froude---Krylov force}} \\ + & + \underbrace{\rho g z S \vec{n}}_{\text{Archimedes' force}} + \end{aligned} \end{equation*} + \centering + \includegraphics{build/roll.eps} \end{column} \end{columns} \end{frame} @@ -145,37 +143,37 @@ A.\:Grigorev% \includegraphics[width=\textwidth]{graphics/ship.png} \end{column} \begin{column}{0.49\textwidth} + Equations of motion (Newton's second law): \begin{equation*} \frac{d}{dt}\left[ \begin{array}{c} - x(t)\\ + \vec{x}(t)\\ q(t)\\ - P(t)\\ - L(t) + \vec{P}(t)\\ + \vec{L}(t) \end{array} \right] = \left[ \begin{array}{c} - v(t)\\ - \frac{1}{2}\omega(t)q(t)\\ - F(t)\\ - \tau(t) + \vec{v}(t)\\ + \frac{1}{2}\vec\omega(t)q(t)\\ + \vec{F}(t)\\ + \vec\tau(t) \end{array} - \right] - \end{equation*} - \begin{equation*} - P(t) = mv(t) \qquad - L(t) = I(t)\omega(t) + \right] \quad \end{equation*} \begin{equation*} - I(t) = R(q(t)) \, I_{\text{body}} \, R(q(t))^{T} + \begin{aligned} + & \vec{P}(t) = m\vec{v}(t) \qquad \vec{L}(t) = I(t)\vec\omega(t) \\ + & I(t) = R(q(t)) \, I_{\text{body}} \, R(q(t))^{T} + \end{aligned} \end{equation*} - \vfill \footnotesize - Classic reference: \begin{itemize} - \item - David Baraff \textit{An Introduction to Physically Based Modeling: - Rigid Body Simulation}, 1997. + \item Describe conservation of linear and angular momentum + for a ship. + \item Approachable reference: David Baraff \textit{An + Introduction to Physically Based Modeling: Rigid Body + Simulation}, 1997. \end{itemize} \end{column} \end{columns} @@ -354,4 +352,17 @@ A.\:Grigorev% Thank you for attention! \end{frame} +\begin{frame} + \tiny\vfill + Copyright \textcopyright{} 2019 Ivan Gankevich + \texttt{\href{mailto:i.gankevich@spbu.ru}{i.gankevich@spbu.ru}}. \\ + \vskip\baselineskip + Aurora Cruiser under CC BY-SA 4.0 by Vitaly V. Kuzmin, \url{http://vitalykuzmin.net/}. \\ + Metacentric height under CC BY-SA 2.5 by Life of Riley, \url{https://commons.wikimedia.org/wiki/File:MetacentricHeight.svg}.\\ + \vskip\baselineskip + This work is licensed under a \alert{Creative Commons Attribution-ShareAlike 4.0 + International License}. The copy of the license is available at + \url{https://creativecommons.org/licenses/by-sa/4.0/}. +\end{frame} + \end{document}