main.tex (23658B)
1 \documentclass[runningheads]{llncs} 2 3 \usepackage{amsmath} 4 \usepackage{booktabs} 5 \usepackage{graphicx} 6 \usepackage{url} 7 \usepackage{multirow} 8 \usepackage{textcomp} 9 \setlength{\tabcolsep}{4pt} 10 11 \begin{document} 12 13 \title{Vessel: Efficient plain text file format for ship hull geometry} 14 \author{% 15 Alexander Degtyarev\orcidID{0000-0003-0967-2949} \and\\ 16 Ivan Gankevich\textsuperscript{*}\orcidID{0000-0001-7067-6928} \and\\ 17 Anton Gavrikov\orcidID{0000-0003-2128-8368} \and\\ 18 Artemii Grigorev \and\\ 19 Vasily Khramushin\orcidID{0000-0002-3357-169X} \and\\ 20 Ivan Petriakov 21 } 22 23 \titlerunning{Vessel} 24 \authorrunning{A.\,Degtyarev et al.} 25 26 \institute{Saint Petersburg State University, Russia\\ 27 \email{a.degtyarev@spbu.ru},\\ 28 \email{i.gankevich@spbu.ru},\\ 29 \email{st047437@student.spbu.ru},\\ 30 \email{st016177@student.spbu.ru},\\ 31 \email{v.khramushin@spbu.ru},\\ 32 \email{st049350@student.spbu.ru}\\ 33 \url{http://www.shipdesign.ru/}} 34 35 \maketitle 36 37 \begin{abstract} 38 39 Initially, digital geometric model of a ship hull is assumed to maintain 40 continuity in solving traditional ship theory problems, ship hydromechanics and 41 seakeeping in severe storm waves. In the research reported here we consider 42 using a table of plaza ordinates (transversal projection of frames) 43 supplemented with a description of sterns as a means of describing digital 44 geometric model. This description, which we call Vessel (VSL) format, allows 45 for later addition of compartments, appendages and superstructures. These more 46 complicated ship structures and their characteristics (e.g. ship compartments 47 and superstructures are characterised by template-based modelling) are added to 48 initial ship hull model in separate files from the working directory of a 49 particular experiment. We show how this model is converted into 50 three-dimensional triangular mesh suitable for ship motion simulations. VSL 51 format is generally more efficient than industry standard IGES format and 52 is distinguished by the simplicity and capability of editing by hand. 53 54 \keywords{% 55 Ship lines \and 56 ship blueprint \and 57 ship theory \and 58 ship design \and 59 ship hydromechanics \and 60 storm seakeeping \and 61 Coons surface \and 62 Hermite spline \and 63 VSL \and 64 IGES. 65 } 66 \end{abstract} 67 68 69 \section{Introduction} 70 71 72 %\subsection{Digital models of ship lines and ship hull forms} 73 74 Initial geometric model of a ship hull is close to traditional hull blueprints 75 which are naturally rendered as a table of plaza ordinates in ship theory. 76 Such a model quite reliably characterises ship hull lines and above-water ship 77 hull parts, while preserving continuity in hydrostatic and hydrodynamic 78 calculations in ship theory and hydromechanics. This is important for 79 verification of newly created numerical experiments with a multitude of 80 historical series of ship calculations, model basin experiments and sea trials. 81 Obvious advantage of this digital format is that it is relatively simple and 82 has compact data layout, with the data prepared and refined as plain text 83 strings representing stern and frame coordinate sequences. We call this format 84 Vessel (or VSL for short). 85 86 Numerous variants of ship hulls were systematically collected in VSL format in 87 Saint Petersburg State University in Vessel database~\cite{vessel2015}. The 88 database is maintained with the help of Hull software suite~\cite{hull2010} 89 which allows for editing ship hull coordinates and calculates certain 90 hydrostatic characteristics. In this paper we describe VSL format, compare and 91 contrast its efficiency and performance with industry standard IGES format, and 92 outline advatanges and disadvantages of using plain text for creating and 93 editing ship hull geometry by hand. 94 95 \section{Methods} 96 97 \subsection{Vessel format} 98 99 Formalised description of ship hull geometry is done using plain text data 100 which include ship name, hull dimensions, and successive description of aft, 101 main (table of plaza ordinates) and bow sections. When digital ship hull model 102 is first added to Vessel database the following design characteristics are 103 specified in the comments: displacement, wetted surface area, hull volume ratio 104 coefficient, date and time of file creation. The diagram of a VSL file is 105 presented in tab.~\ref{tab:format}, projections and threedimensional model of 106 Aurora cruiser are presented in fig.~\ref{fig:aurora-1} and~\ref{fig:aurora-2}. 107 108 \begin{table} 109 \centering 110 \caption{VSL file format diagram.\label{tab:format}} 111 \begin{tabular}{p{1cm}p{1cm}p{9cm}} 112 \toprule 113 \multicolumn{3}{l}{1. Technical vessel description (lines starting 114 with \texttt{//} or \texttt{;} are comments).} \\ 115 \multicolumn{3}{l}{2. Format magic number (30) and hull model name in 116 angle brackets \texttt{<...>}.} \\ 117 \multicolumn{3}{l}{3. The number of frames and middle frame number.} \\ 118 \multicolumn{3}{l}{4. Hull dimensions (length, beam, draft).} \\ 119 \cmidrule(lr){1-3} 120 \multirow{5}{*}{\rotatebox[origin=c]{90}{\parbox[t]{2.9cm}{\centering{}The 121 number of points on a curve}}} & \multicolumn{2}{l}{5. \(X(z)\)~--- 122 sternpost contour abscissas as a function of applicates.} \\ 123 & \multicolumn{2}{l}{6. \(Y(z)\)~--- transom width ordinates as a 124 function of applicates.} \\ 125 \cmidrule(lr){2-3} 126 & \rotatebox[origin=c]{90}{\parbox[t]{1.4cm}{\centering{}Frame 127 abscissas}} & 7. \(Y(z)\)~--- frame curves as functions of 128 applicates of general hull line. \\ 129 \cmidrule(lr){2-3} 130 & \multicolumn{2}{l}{8. \(Y(z)\)~--- bulbous bow width ordinates as a 131 function of applicates.} \\ 132 & \multicolumn{2}{l}{9. \(X(z)\)~--- stern contour abscissas as a 133 function of applicates.} \\ 134 \cmidrule(lr){1-3} 135 \multicolumn{3}{l}{10. Design characteristics (displacement, wetted 136 surface, volume ratio coefficient).} \\ 137 \bottomrule 138 \end{tabular} 139 \end{table} 140 141 Ship hull is divided into three sections (fig.~\ref{fig:sections}): aft, main 142 and bow sections. Main section consists of frames each of which is defined by a 143 collection of points lying in transverse plane. Smooth curve that goes though 144 all of these points is created by cubic Hermite spline interpolation. Each 145 frame may not have the same number of points (but usually do), and there are no 146 additional points between endpoints of subsequent frames in longitudinal plane. 147 Aft and bow sections consist of frames in transverse plane and a curve in 148 longitudinal plane that defines the shape of the ship hull in this plane. This 149 curve go through (usually) all frames and defines intermediate points between 150 endpoints of subsequent frames. If it does not go between some frames, then 151 there are no intermediate points between them. Curves are not closed and define 152 only left part of the ship hull, the full ship hull model is created by 153 mirroring each point of the curve with respect to longitudinal axis and connect 154 corresponding curve endpoints by straight lines. 155 156 \begin{figure} 157 \centering 158 \includegraphics{build/sections.eps} 159 \caption{Three sections of a ship hull as defined by VSL 160 format.\label{fig:sections}} 161 \end{figure} 162 163 In accordance with initial purpose of a digital ship hull model, Hull programme 164 makes basic calculations of certain characteristics of a ship hull, curved 165 elements and ship stability diagrams by fixing the centre of gravity with 166 respect to general line, centre of buoyancy, metacentre or current waterline 167 (fig.~\ref{fig:hydrostatics}). The programme also performs wave resistance 168 calculations for arbitrary travel speeds taking into account radiation 169 intensity and interference of ship waves with respect to waterline as a 170 function of Froude number. 171 172 \begin{figure} 173 \centering 174 \includegraphics[width=\textwidth]{graphics/hydrostatics.png} 175 \caption{Ship stability calculations for a ship with small moments of 176 inertia for the area of the current waterline (MICW-85). For a design 177 draught roll moments are small up to 30\textdegree{} wave slope, and 178 stability increases in response to any change in 179 draught.\label{fig:hydrostatics}} 180 \end{figure} 181 182 \subsection{Hydrostatic calculations for historic, traditional and contemporary 183 ship hulls} 184 185 As an illustrative example of simulating seakeeping ship characteristics we 186 consider ship stability diagrams for contemporary and historical ships, and for 187 a ship that is purposely optimised for improved seakeeping in storm waves. 188 189 Fig.~\ref{fig:stability} shows that Aurora cruiser ship hull has excellent 190 seakeeping characteristics in severe storm waves conditions, which guarantee 191 safe small oscillations and smoothness of roll by reducing metacentric height~--- 192 initial ship hull stability. Additional positive stability appears for 193 large roll angles and arbitrary heaving. 194 195 \begin{figure} 196 \centering 197 \includegraphics[width=\textwidth]{graphics/stability.png} 198 \caption{Transversal projection of a ship hull (top), static ship stability 199 diagrams for a fixed centre of gravity \(Z_g\) and metacentric height equal 200 to 1\% of a beam for contemporary (a), historical (b) and improved storm 201 seakeeping (c) ships.\label{fig:stability}} 202 \end{figure} 203 204 More complicated usage scenario of computational model is optimisation of ship 205 lines to achieve certain form of wave resistance curve 206 (fig.~\ref{fig:waves}). In the calculations we build radiation intensity 207 and ship waves interferences along the current waterline. By changing ship 208 lines we reduce resistivity extrema for relative speeds (on Froude) on the 209 order of 0.3 and 0.5 without sacrificing propulsion for minimum wave formation 210 for speeds 0.4 and 0.2. 211 212 \begin{figure} 213 \centering 214 \includegraphics[width=\textwidth]{graphics/waves.png} 215 \caption{Wave resistance, radiation intensity and ship waves intensity 216 along the ship hull.\label{fig:waves}} 217 \end{figure} 218 219 \subsection{Triangulation of a ship hull given by a collection of curves} 220 221 In the original programme~\cite{hull2010} that visualises ship lines and 222 calculates hydrostatic characteristics, ship hull is described by a collection 223 of curves; however, for a programme that simulates ship dynamics in rough sea 224 this description is not convenient. A better representation would be a 225 collection of triangles (a \emph{triangular mesh}) that approximates 226 analytic ship hull geometry. At the centre of each triangle pressure 227 force induced by ocean waves is applied, and then these forces are used to 228 calculate ship motion. Triangles is a better representation because they 229 \begin{itemize} 230 \item do not require recomputation every frame (like analytic curves), 231 \item have simple formula for area (which is needed for pressure force 232 calculation), and 233 \item the same representation is used internally by graphical accelerators 234 that visualise simulation frames. 235 \end{itemize} 236 In the following paragraphs we describe how analytically given ship hull is 237 transformed into a fully connected collection of triangles. 238 239 Ship hull is transformed from analytic to discrete form by using 240 \emph{intermediate representation}~ --- two-dimensional rectangular 241 array of points, which makes it easy to obtain triangular mesh. Each ship hull 242 section is transformed to such an array, and then these arrays are 243 concatenated. Each row of the resulting array represents a frame, and each 244 frame is an array of points of this frame. Since the array have to be 245 rectangular, the number of points equal the maximum number of points among all 246 original frames in VSL file. After that, endpoints are added to make curves 247 closed, and the whole array is mirrored with respect to longitudinal axis. Then 248 each rectangular patch of the resulting array is divided into two triangles to 249 obtain triangular mesh. Duplicate vertices and faces, that may have been 250 introduced by mirroring or making curves closed, are removed from the mesh. So, 251 intermediate representation is easy to transform to a triangular mesh, but we 252 have to interpolate frame curves to generate the same number of points 253 in order to transform them to such a representation. 254 255 It is straightforward to transform main section to a rectangular array of 256 points. First, we determine the maximum number of points in a frame across all 257 ship hull frames. Then for each frame we use cubic Hermite spline interpolation 258 to generate the specified number of points. If each frame has the same number 259 of point, we generate the same points that the original frame had, because the 260 spline goes through all of them. 261 262 In contrast to the main section, transformation of bow and aft sections is done 263 in multiple stages. During the first stage we generate intermediate points 264 between subsequent frames using the curve describing the ship hull shape in 265 longitudinal plane. For that purpose we create a polygon in longitudinal plane 266 that consists of all points of this curve, all points of the frame that is the 267 closest to the curve endpoints, but does not cross the curve, and all endpoints 268 of the frames that are between this frame and the curve (it happens when first 269 and last endpoint of the curve are close to different frames). Frame points 270 that lie outside this polygon are removed. Polygon points that lie between 271 subsequent frames become intermediate points. At this stage we decompose a 272 bow/aft section into a collection of ``rectangular'' patches vertical sides of 273 which are curves created from subsequent frames and horizontal sides of which 274 are curves created from intermediate points (fig.~\ref{fig:bow}). 275 276 \begin{figure} 277 \centering 278 \includegraphics{build/bow.eps} 279 \caption{Longitudinal slice of bow section of a ship hull that shows 280 horizontal curves with large curvature.\label{fig:bow}} 281 \end{figure} 282 283 A patch that is defined by four curves is called Coons 284 patch~\cite{coons1967surfaces}. Coons patch is a parametric surface \(S(u,v)\) 285 between four curves \(c_0(u)\), \(c_1(u)\), \(d_0(v)\), \(d_1(v)\): 286 \begin{align*} 287 & S(u,v) = C_1(u,v) + C_2(u,v) - C_3(u,v), \\ 288 & C_1(u,v) = v' c_0(u) + v c_1(u), \quad v' = 1-v, \\ 289 & C_2(u,v) = u' d_0(v) + u d_1(v), \quad u' = 1-u, \\ 290 & C_3(u,v) = 291 c_0(0)u'v' + 292 c_0(1)uv' + 293 c_1(0)u'v + 294 c_1(1)uv, \\ 295 & c_0(0) = d_0(0), 296 \quad c_0(1) = d_1(0), \quad c_1(0) = d_0(1), 297 \quad c_1(1) = d_1(1). 298 \end{align*} 299 Here \(C_1\) is linear interpolation between points \(c_0\) and \(c_1\), 300 \(C_2\) is linear interpolation between points \(d_0\) and \(d_1\), and 301 \(C_3\) is bilinear interpolation between corner points of the patch. \(C_1\) 302 and \(C_2\) are ruled surfaces~--- surfaces between two curves, that are 303 generated by interpolating corresponding curve points. Bicubic interpolation 304 can be used instead of bilinear to get the same derivative when joining 305 multiple Coons patches together, but for a grid of interior points linear 306 interpolation is enough. 307 308 Using these formulae we generate a grid of interior points between curves of 309 each bow/aft patch during the second stage. Our first approach was to use one 310 Coons patch for each subsequent pair of frames, but we have found that some 311 ship hulls have horizontal curves with large curvatures which cause linear 312 interpolation to produce cusps on the resulting surface (fig.~\ref{fig:cusp}). 313 We solved this problem by using multiple smaller Coons patches that were 314 arranged vertically for each subsequent pair of frames. This approach removes 315 the cusps, but the vertical size of the patch have to be small enough to reduce 316 the effect of the large curvature of the horizontal curve. After generating 317 grids of intermediate points with Coons patches for each subsequent frame, we 318 concatenate them to obtain rectangular array for bow/aft sections. 319 320 \begin{figure} 321 \centering 322 \includegraphics{build/micw-bow.eps} 323 \caption{Part of the bow section of the ship hull. The section with 324 single Coons patch spanning the whole frame (left). 325 The section with multiple smaller Coons patches arranged vertically 326 (right).\label{fig:cusp}} 327 \end{figure} 328 329 After transforming each section of the ship hull into a rectangular array and 330 concatenating them, we obtain an array of dimensions \(m\times{}n\). We then 331 use two-dimensional cubic Hermite spline interpolation to generate a grid of 332 \((2m-1)\times{}(2n-1)\) points. Additional points increase surface smoothness 333 and provide better approximation for the original ship hull. Finally, we 334 transform the resulting grid into a triangular mesh to obtain three-dimensional 335 discrete ship hull model, which is ready for the use in ship motion simulation 336 and visualisation. 337 338 \section{Results} 339 340 To prove VSL viability for using it as an alternative to another format that 341 uses analytic curves called IGES~\cite{smith1983iges}, we measured 342 triangulation performance and measured how many vertices and faces are 343 generated when analytic curves and surfaces are transformed into them. We do 344 not have the same ship hulls in both formats, so we resorted to measuring 345 performance relative to vertex and face count. To work with IGES format 346 we use OpenCASCADE library~\cite{opencascade}. Benchmark results are presented 347 in tab.~\ref{tab:performance}. 348 349 \begin{table} 350 \centering 351 \caption{VSL performance in comparison to IGES for different ship 352 hulls.\label{tab:performance}} 353 \begin{tabular}{llrrr} 354 \toprule 355 Ship & Format & Import time, s & No. of vertices & No. of faces \\ 356 \midrule 357 MICW & VSL & 0.019 & 5457 & 10912 \\ 358 Aurora & VSL & 0.054 & 14653 & 29306 \\ 359 5415 & IGES & 1.300 & 21088 & 41841 \\ 360 KVLCC2 & IGES & 24.000 & 57306 & 114110 \\ 361 KCS & IGES & 32.500 & 626188 & 1243307 \\ 362 \bottomrule 363 \end{tabular} 364 \end{table} 365 366 We chose MICW (a hull with reduced moments of inertia for the current 367 waterline) and Aurora cruiser ship hulls in VSL format and tanker (KVLCC2), 368 container ship (KCS) and combat ship (5415) in IGES format that are freely 369 available on the Internet\footnote{\url{https://simman2014.dk/ship-data/}}. 370 VSL format showed higher performance in comparison to IGES format considering 371 the number of vertices and faces. The resulting triangular meshes are shown in 372 fig.~\ref{fig:models}. 373 374 \begin{figure} 375 \centering 376 \includegraphics[width=0.5\textwidth]{build/{aurora.vsl}.eps}\hfill 377 \includegraphics[width=0.5\textwidth]{build/{micw.vsl}.eps} 378 \caption{Final Aurora and MICW threedimensional triangular 379 meshes.\label{fig:models}} 380 \end{figure} 381 382 \section{Discussion} 383 384 \subsection{Advantages} 385 386 \paragraph{Faster triangulation.} Faster triangulation is advantageous for 387 performing ship motion simulations on a regular workstation. These machines are 388 usually not very powerful and do not have a lot of memory for complicated mesh 389 pre-processing. IGES importer uses multiple threads for triangulation, whereas 390 VSL does everything in one thread. Yet, it achieves higher performance on a 391 regular workstation. 392 393 \paragraph{Ease of editing.} Most of the VSL files from Vessel database were 394 written by hand. Points for frames were generated in a drawing programme by 395 using legacy blueprints as an overlay and approximating curve projections by 396 points. Then points were exported in plain text format and subsequently 397 converted to VSL format by hand. Thus, there is no need in complicated and 398 expensive CAD programme to produce Vessel files. 399 400 \paragraph{Compatibility with legacy blueprints.} Legacy ship hull blueprints 401 were mostly done by drawing projections of ship lines on a paper, and VSL 402 incorporates longitudinal projections for bow and aft and transversal 403 projection for the main section. It is easy to convert legacy blueprint to VSL 404 file by overlaying frame points on the drawing. It is also easy for people who 405 used to legacy blueprints to reason about ship hull characteristics. 406 407 \subsection{Disadvantages} 408 409 The main disadvantage of VSL format is that a triangular mesh generated from it 410 approximates ship hull surface only with a certain accuracy, but cannot 411 represent it exactly. This is due to the fact that we choose the same number of 412 points for each frame to be able to create rectangular array of all points and 413 convert it to a mesh. Obvious solution to this problem is to use 414 non-rectangular array, but it does not come without disadvantages. 415 Non-rectangular array complicates triangle generation as we need to compute 416 intermediate points for smaller patches, and it would be more difficult to make 417 the resulting surface as smooth as the original, especially at intersections of 418 frames with different number of points. 419 420 A simpler approach is to use rectangular array as the original ship hull 421 representation, not an intermediate one. In that case each array element 422 represents a geometric vertex and in addition the type of spline surface that 423 represents ship hull surface \emph{exactly} is specified in the file. That way 424 it is easy to create triangular mesh that would be an exact representation of 425 the original analytic surface when the number of grid points tends to infinity, 426 and the resulting surface would be as smooth as the original one with all 427 derivatives and surface normals computed using analytic representation. Similar 428 approach is followed by FastShip~\cite{fastship} in which ship hull is defined 429 by a B-spline surface, that in turn is defined by control points, allowing ship 430 hull designer and ship motion simulation programmes to use exactly the same 431 ship hull representation. One direction of future work is to incorporate 432 B-splines into existing format. 433 434 \section{Conclusion} 435 436 In computational experiments we used theoretical blueprints of Aurora cruiser 437 which has excellent seakeeping characteristics and for which there can be no 438 dangerous situations in severe storm waves. We presented the more complicated 439 geometric ship hull form which is optimised for storm seakeeping. This ship 440 hull has relatively small moments of inertia for the area of the current 441 waterline (MICW). For this hull mutual compensation of external force 442 excitations was proved in seakeeping trials in severe storm waves in model 443 basin of Leningrad shipbuilding institute under the guidance of prof. Alexander 444 Nikolaevich Kholodilin~\cite{khram2018}. 445 446 Although, traditional plaza table of ordinates with a few frames 447 has relatively small hull representation accuracy, it gives satisfactory 448 representation of ship hydrostatic and hydrodynamic characteristics in 449 computational experiments using multiprocessor machines and supercomputers. 450 For research stages we used formalised simulation and trochoidal models 451 of storm sea waves, for which digital ship hull models are quite optimal. 452 453 We described efficient plain text format for three-dimensional ship hull 454 geometry called VSL. This format uses longitudinal and transversal projections 455 of ship lines given in analytic form. This format is easy to write by hand and 456 easy to use for converting legacy ship hull blueprints into digital form. We 457 demonstrated efficiency and viability of this format in comparison to IGES. 458 Although, there are more precise alternatives for storing ship hull geometry, 459 and VSL format gives only approximate representation of the original ship hull, 460 it is distinguished by the simplicity and efficiency. 461 462 \subsubsection*{Acknowledgements.} 463 Research work is supported by Saint Petersburg State University (grant 464 no.~26520170 and~39417213). 465 466 \bibliographystyle{splncs04} 467 \bibliography{references} 468 469 \begin{figure} 470 \centering 471 \includegraphics[width=\textwidth]{graphics/aurora-1.png} 472 \caption{Aurora cruiser digital model.\label{fig:aurora-1}} 473 \end{figure} 474 475 \begin{figure} 476 \centering 477 \includegraphics[width=\textwidth]{graphics/aurora-2.png} 478 \caption{Aurora cruiser hull is prepared for a numerical ship 479 hydromechanics experiment. Although, the number of frame points 480 in the main section is relatively small, it allows for smooth 481 approximation of hull surface with the desired 482 accuracy.\label{fig:aurora-2}} 483 \end{figure} 484 485 \end{document}