An Octree-Based Adaptive Semi-Lagrangian Free Surface Flow Solver
Total Page:16
File Type:pdf, Size:1020Kb
An octree-based adaptive semi-Lagrangian free surface flow solver THÈSE NO 7011 (2016) PRÉSENTÉE LE 12 MAI 2016 À LA FACULTÉ DES SCIENCES DE BASE CHAIRE D'ANALYSE ET DE SIMULATION NUMÉRIQUE PROGRAMME DOCTORAL EN MATHÉMATIQUES ÉCOLE POLYTECHNIQUE FÉDÉRALE DE LAUSANNE POUR L'OBTENTION DU GRADE DE DOCTEUR ÈS SCIENCES PAR Viljami Henrikki LAURMAA acceptée sur proposition du jury: Prof. T. Mountford, président du jury Prof. M. Picasso, directeur de thèse Dr A. Caboussat, rapporteur Dr S. Boyaval, rapporteur Prof. J. Hesthaven, rapporteur Suisse 2016 Some people never go crazy. What truly horrible lives they must lead. — Charles Bukowski To my family. Acknowledgements First of all I would like to thank Professor Marco Picasso for giving me not only the opportunity to work within his group for these years but also being always fair, available for discussions, for giving me constructive criticism whenever needed and for leading this group with a great atmosphere. It has been a fantastic experience. I would also like to thank Dr. Gilles Steiner, Dr. Alexandre Masserey from Ycoor Systems SA for allowing me to work with and contribute to the software cfsFlow++ and in particular Dr Gilles Steiner, with whom we have had frequent discussions about how to best tackle implementation issues. I also appreciate the availability of Dr Alexandre Caboussat to discuss various topics and his precious corrections to this thesis. I am grateful to Prof. Jan Hesthaven, Dr. Sébastien Boyaval, Dr. Alexandre Caboussat for being part of my jury as well as to Prof. Thomas Mountford for presiding it. I would like to thank the Swiss National Science Foundation for their financial support. Thanks to a great atmosphere in the group throughout these years, I have enjoyed not only working on this thesis but also spending personal time with my (crazy) colleagues, Laurent Michel, Samuel Dubuis, Jonathan Rochat, Thomas Foetisch, Diane Guignard, Sylvain Vallaghe, Michel Flueck and the numerous other colleagues beyond the group. Thank you to all my friends, family, flatmates, strange acquaintances and Terry for making this experience a great one and supporting me. I also acknowledge all the people working hard on all these open source projects that make a thesis much richer. To name a few projects, for example FEniCS, PETSc, Python, Matplotlib, Seaborn, Pandas, Gmsh, Paraview, Atom and many more. i Abstract A numerical method based on an adaptive octree space discretization for the simulation of 3D free-surface fluid flows is proposed. The Navier-Stokes equations are solved with a time- splitting scheme, which decouples advection from diffusion/incompressibility. The advection step is solved with a semi-Lagrangian VOF-based scheme on the octree. An interface prediction algorithm is used to refine the octree at the predicted location of the interface in order to ensure detail preservation. Subsequently, the fluid is advected and a coarsening algorithm adapts the mesh to avoid excess refinement in non-interfacial regions. SLIC and decompression algorithms are used for post-processing to limit numerical diffusion and correct numerical compression of the VOF function. The octree scheme allows anisotropy, refinement of interfacial cells to an arbitrary level and supports arbitrary complex domains. It does not require a 2:1 cell size ratio condition between adjacent cells. The octree is then coupled with a tetrahedral mesh on which we solve the second step of the splitting algorithm, the Stokes’ equations. Numerical validation is done on both advection benchmark test cases and results are compared with the uniform cell grid scheme. Paddle-generated water waves are also simulated and results are compared with experimental water wave profile measurements. First order finite element stabilization schemes for the time-dependent Stokes’ equations are studied. A unified proof of stability and convergence of velocity and pressure for consis- tent and non-consistent PSPG schemes for the time-dependent Stokes’ equations is given with explicit dependence on viscosity and stabilization parameter. The link between bub- ble enrichment and Pressure Stabilized Petrov-Galerkin (PSPG) schemes in the context of time-dependent Stokes’ equations is discussed and two bubble-based PSPG-type schemes are studied. Different possibilities for stabilization parameters are discussed. Numerical comparisons are done to determine stability, convergence and conditioning issues associated with different PSPG schemes, bubble-based schemes and local pressure projection schemes in different settings. Key words: Finite elements, octree, semi-Lagrangian, free surface flows, VOF, SLIC, advec- tion, time-splitting, Stokes, Navier-Stokes, transient, time-dependent, PSPG, local pressure projection, bubble iii Résumé Une méthode numérique basée sur une discrétisation adaptative en espace de type octree est proposée et appliquée à des simulations à surface libre en 3D. Les équations de Navier-Stokes sont résolues avec un algorithme de splitting en temps qui découple l’advection de la diffu- sion/incompressibilité. L’advection est résolue avec un schéma numérique semi-Lagrangien avec discrétisation de type VOF sur l’octree. Un algorithme de prédiction d’interface est utilisé pour raffiner l’octree à la position prédite de l’interface pour conserver les détails. Ensuite, le fluide est transporté et un algorithme de déraffinage adapte le maillage pour éviter un raffinement trop important dans les régions non-interfaciales. Des algorithmes SLIC et de décompression sont utilisés pour faire un post- processing qui a pour but de limiter la diffusion numérique et la compression numérique. Le schéma basé sur l’octree supporte l’anisotropie, le raffinage jusqu’à un niveau arbitraire et les domaines complexes. Il ne requiert pas de ratio de taille 2 : 1 entre les cellules adjacentes. L’octree est ensuite couplé à un maillage en tetraèdres pour résoudre la deuxième partie de l’algorithme de splitting, les équations de Stokes. Une partie de la validation numérique est faite sur des cas tests de transport pur et les résultats sont comparés avec le schéma avec grille uniforme structurée. Des vagues générées par un piston pneumatique sont aussi simulées et les résultats sont comparés avec des données expérimentales en cuves réelles. Des méthodes de stabilisation du premier ordre pour les équations de Stokes évolutives sont étudiées. Une preuve de stabilité et de convergence de la vitesse et de la pression pour les schémas PSPG consistents et non-consistents pour les équations de Stokes évolutives est donnée en détaillant les dépendances de la viscosité et du paramètre de stabilisation. Un lien entre l’élément bulle et les schémas PSPG est explicité dans le cadre des équations de Stokes évolutives et deux schémas de type PSPG basés sur l’élément bulle sont étudiés. Diffé- rentes possibilités pour le paramètre de stabilisation sont mentionnées. Des comparaisons numériques sont faites pour déterminer la stabilité, la convergence et les problèmes de condi- tionnement associés avec les schémas PSPG, bulle et Local Pressure Projection pour plusieurs cas tests. Mots clefs : Eléments finis, octree, semi-Lagrangien, surface libre, VOF,SLIC, advection, trans- port, time-splitting, Stokes, Navier-Stokes, évolutif, PSPG, local pressure projection, bulle v Contents Acknowledgements i Abstract (English/Français) iii List of figures ix Introduction 1 1 Octree-based numerical scheme for Navier Stokes free surface flows 7 1.1Theadvectionequation................................. 7 1.2 Advection on structured grid . 9 1.3 Octree definition . 12 1.4 Advection on octree grid . 15 1.4.1 Initialization . 17 1.4.2 Prediction . 18 1.4.3 Advection . 21 1.4.4Decompression.................................. 24 1.4.5 Coarsening . 27 1.5 Octree implementation . 30 1.6 Octree-based scheme for free surface flows governed by the Navier Stokes equa- tions............................................. 34 1.6.1 Splitting scheme for the Navier Stokes equations . 34 1.6.2 Initial conditions and boundary conditions . 35 1.6.3 Space discretization of the splitting scheme . 36 1.6.4 Interpolations between meshes . 37 1.6.5 Capturing of complex domains . 40 2 Numerical results 43 2.1 3D advection results with the octree-based scheme . 43 2.1.1 Translation of a sphere . 43 2.1.2 Zalesak’s sphere . 46 2.1.3 Time-dependent vortex . 50 2.1.4Leveque-Enright’stestcase........................... 52 2.2 3D Navier Stokes free surface results with the octree-based scheme . 55 vii Contents 2.2.1 Stoker’s test case . 55 2.2.2 Pseudo-2D paddle-generated wave simulations in a tilted cavity . 57 2.2.3 Paddle-generated 3D wave in a large cavity . 73 3 A study of first order stabilization schemes for the time-dependent Stokes problem 77 3.1 Definition of different stabilization schemes . 77 3.1.1 Bubble stabilization . 78 3.1.2 PSPG stabilizations . 79 3.1.3 Orthogonal Subscales stabilization . 81 3.1.4 Local pressure projection stabilization . 81 3.1.5 Link between bubble and PSPG stabilizations . 82 3.1.6 Possible choices of the stabilization parameter . 90 3.2 Stability of the schemes for velocity and pressure for time-dependent Stokes . 91 3.3 Convergence of the schemes for velocity and pressure for time-dependent Stokes 99 3.4 Analysis of stabilization on startup of 2D lid-driven cavity with regularized time- varying tangential velocity at the boundary . 110 3.5 Analysis of stabilization schemes on 3D Poiseuille with time-varying inflow . 122 3.6 3D comparison of wave profiles for different stabilization schemes on experi- mentalVAWdata..................................... 134 Conclusion 143 Bibliography 145 Curriculum Vitae 155 viii List of Figures 1.1 Transport along characteristics . 9 1.2 Characteristics method in 1D . 10 1.3 Octree mesh and graph . 14 1.4 Octree aspect ratio . 15 1.5 Octree refinement around the interface . 16 1.6 Octree initialization . 17 1.7 Octree initialization edge case . 18 1.8 Interface prediction refinement . 20 1.9SLICalgorithmontheoctree.............................. 22 1.10Octreeadvection..................................... 22 1.11 Advection of a large cell . 23 1.12 Numerical compression .