Wave Model and Watercraft Model for Simulation of Sea State
Total Page:16
File Type:pdf, Size:1020Kb
Department of Physics, Chemistry and Biology Master thesis work Wave Model and Watercraft Model for Simulation of Sea State Kristofer Krus Master thesis work carried out at Saab AB January 8, 2014 LITH-IFM-A-EX—14/2834—SE Department of Physics, Chemistry and Biology Linköpings universitet SE-581 83 Linköping, Sweden Department of Physics, Chemistry and Biology Wave Model and Watercraft Model for Simulation of Sea State Kristofer Krus Master thesis work carried out at Saab AB January 8, 2014 Supervisors: Anders Rönnbrant (Saab AB) Kenneth Järrendahl (Linköping University) Examiner: Magnus Johansson (Linköping University) Avdelning, institution Datum Division, Department Date Department of Physics, Chemistry and Biology 2014-01-08 Linköping University Språk Rapporttyp ISBN: Language Report category Svenska/Swedish Licentiatavhandling ISRN: LITH-IFM-A-EX—14/2834—SE Engelska/English Examensarbete _________________________________________________________________ C-uppsats Serietitel och serienummer ISSN D-uppsats Title of series, numbering ______________________________ _________________ Övrig rapport _________________ URL för elektronisk version URL for electronic version Titel Title Wave Model and Watercraft Model for Simulation of Sea State Författare Author Kristofer Krus Sammanfattning Abstract The problem of real-time simulation of ocean surface waves, ship movement and the coupling in between is tackled, and a number of different methods are covered and discussed. Among these methods, the finite volume method has been implemented in an attempt to solve the problem, along with the compressible Euler equations, an octree based staggered grid which allows for easy adaptive mesh refinement, the volume of fluid method and a variant of the Hyper-C advection scheme for compressible flows for advection of the phase fraction field. The process of implementing the methods that were chosen proved to be tricky in many ways, as they involve a large number of advanced topics, and the implementation that was implemented in this thesis work suffered from numerous issues. There were for example problems with keeping the interface intact, as well as a harsh restriction on the time step size due to the CFL condition. Improvements required to make the method sustainable for real-time applications are discussed, and a few suggestions on alternative approaches that are already in use for similar purposes are also given and discussed. Furthermore, a method for compensating for gain/loss of mass when solving the incompressible flow equations with an inaccurately solved pressure Poisson equation is presented and discussed. A momentum conservative method for transporting the velocity field on staggered grids without introducing unnecessary smearing is also presented and implemented. A simple, physically based illumination model for sea surfaces is derived, discussed and compared to the Blinn–Phong shading model, although it is never implemented. Finally, a two-dimensional partial differential equation in the spatial domain for simulating water surface waves for mildly varying bottom topography is derived and discussed, although it is deemed to be too slow for real-time purposes and is therefore never implemented. Nyckelord Keywords Computational fluid dynamics, ocean waves, finite volume method, octree, volume of fluid method, illumination model Copyright The publishers will keep this document online on the Internet — or its possible replacement — for a period of 25 years starting from the date of publication barring exceptional circumstances. The online availability of the document implies permanent permission for anyone to read, to download, or to print out single copies for his/hers own use and to use it unchanged for non-commercial research and educational purpose. Subsequent transfers of copyright cannot revoke this permission. All other uses of the document are conditional upon the consent of the copyright owner. The publisher has taken technical and administrative measures to assure authentic- ity, security and accessibility. According to intellectual property law the author has the right to be men- tioned when his/her work is accessed as described above and to be protected against infringement. For additional information about the Linköping University Electronic Press and its procedures for publication and for assurance of document integrity, please refer to its WWW home page: http://www.ep.liu.se/. Abstract The problem of real-time simulation of ocean surface waves, ship move- ment and the coupling in between is tackled, and a number of different methods are covered and discussed. Among these methods, the finite vol- ume method has been implemented in an attempt to solve the problem, along with the compressible Euler equations, an octree based staggered grid which allows for easy adaptive mesh refinement, the volume of fluid method and a variant of the Hyper-C advection scheme for compressible flows for advection of the phase fraction field. The process of implementing the methods that were chosen proved to be tricky in many ways, as they involve a large number of advanced topics, and the implementation that was implemented in this thesis work suffered from numerous issues. There were for example problems with keeping the interface intact, as well as a harsh restriction on the time step size due to the CFL condition. Improvements required to make the method sustainable for real-time applications are discussed, and a few suggestions on alternative approaches that are already in use for similar purposes are also given and discussed. Furthermore, a method for compensating for gain/loss of mass when solving the incompressible flow equations with an inaccurately solved pres- sure Poisson equation is presented and discussed. A momentum conserva- tive method for transporting the velocity field on staggered grids without introducing unnecessary smearing is also presented and implemented. A simple, physically based illumination model for sea surfaces is derived, discussed and compared to the Blinn–Phong shading model, although it is never implemented. Finally, a two-dimensional partial differential equa- tion in the spatial domain for simulating water surface waves for mildly varying bottom topography is derived and discussed, although it is deemed to be too slow for real-time purposes and is therefore never implemented. Table of Contents Notation iv Technical acronyms............................. iv Outline of thesis vi I Introduction1 1 Motivation2 1.1 Landing on ships with helicopters..................2 1.2 Visual cueing.............................2 1.2.1 Height estimation......................3 1.2.2 Landing on ships with aircraft...............4 2 Requirements and difficulties6 2.1 Wave dispersion and non-linearity.................6 2.2 Fluid–Structure Interaction.....................7 3 Related work8 3.1 Two-dimensional methods......................8 3.1.1 Two-dimensional Fluid–Structure Interaction.......8 3.1.2 Two-dimensional PDEs for shallow water.........9 3.1.3 Fourier Synthesis....................... 10 3.1.4 Laplacian Pyramid Decomposition............. 10 3.2 Three-dimensional methods..................... 14 3.2.1 Smoothed-Particle Hydrodynamics............. 14 3.2.2 Finite Volume Method.................... 15 3.2.3 Finite Volume Method on a restricted tall cell grid.... 16 3.2.4 Finite Volume Method on an octree grid.......... 16 3.3 Hybrid two- and three-dimensional methods............ 17 3.4 Miscellaneous other methods.................... 17 i II Theoretical background 19 4 The Finite volume method 20 4.1 Fluid simulation........................... 20 4.2 Divergence calculation........................ 21 4.3 Gradient calculation......................... 22 4.4 Navier–Stokes equations....................... 23 4.5 Continuity equation......................... 24 4.6 Pressure equation........................... 25 4.6.1 Compressible flow...................... 25 4.6.2 Incompressible Navier–Stokes equations.......... 26 4.7 Solution of the pressure Poisson equation............. 28 4.7.1 The Preconditioned Conjugate Gradient Method..... 29 4.7.2 The Jacobi Method..................... 29 4.7.3 The Gauss–Seidel Method.................. 32 4.7.4 The Multigrid Method.................... 33 4.7.5 Other acceleration methods................. 34 5 Octrees 35 5.1 Varying level of detail........................ 36 6 Free-Surface Modeling 38 6.1 Mesh based surface tracking methods................ 38 6.2 Level Set method........................... 39 6.3 Volume of Fluid method....................... 40 6.4 Coupled Level Set/Volume of Fluid method............ 41 7 Advection of properties 42 7.1 Advection of smooth fields...................... 42 7.1.1 Stability and energy preservation.............. 42 7.1.2 Error reduction for linear advection schemes........ 43 7.2 Advection of the phase fraction field................ 45 7.2.1 Geometric advection schemes................ 45 7.2.2 Algebraic advection schemes................ 46 8 Method summary 47 III Analysis 48 9 Results 49 9.1 The program............................. 49 9.2 A two-dimensional PDE for water waves at varying water depths 54 9.3 Study of other methods....................... 54 ii 10 Discussion 56 10.1 Other methods to use........................ 56 10.2 Speed................................. 57 10.3 Already existing software...................... 57 10.4 Improvements............................. 57 10.4.1 Adaptive Mesh Refinement................. 58 10.4.2 Unconditionally stable