Implementation of Test Scenarios for Incompressible Flow Using A

Implementation of Test Scenarios for Incompressible Flow Using A

Bachelor’s Thesis Implementation of test scenarios for incompressible flow using a divergence–free finite–element approach Author: Benjamin Rüth Maistraße 54 80337 München Field of Studies: Informatics, Scientific Computing Reviewer: 1st Univ.–Prof. Dr. Hans–Joachim Bungartz (TUM) 2nd Dr. rer. nat. Tobias Neckel (TUM) Supervisor: Dr. rer. nat. Tobias Neckel (TUM) Date: 17.10.2014 Technische Universität München Fakultät für Informatik Lehrstuhl für Wissenschaftliches Rechnen Boltzmannstraße 3 85748 Garching bei München Eidesstattliche Erklärung Hiermit erkläre ich an Eides statt, dass ich diese Bachelorarbeit selbständig und nur mit den angegebenen Hilfsmitteln angefertigt habe. Benjamin Rüth, München, den 17.10.2014 Contents 1. Introduction 1 1.1. Numerical simulation of flow problems . 1 1.2. Structure of the thesis . 2 1.3. Acknowledgement . 2 2. Governing equations 5 2.1. Conservation laws . 5 2.1.1. The Reynolds transport theorem . 5 2.1.2. The continuity equation . 5 2.1.3. The momentum equation . 6 2.1.4. The energy equation . 7 2.2. Incompressible Navier–Stokes equations and weak form . 8 2.2.1. Incompressible Navier–Stokes equations . 8 2.2.2. Weak form of the Navier–Stokes equations . 8 3. Finite element method 11 3.1. Discretisation . 11 3.1.1. Definition of basis functions and discrete Navier–Stokes equations 11 3.1.2. Ritz–Galerkin approach . 12 3.1.3. Derivation of the matrices . 13 3.1.4. The pressure Poisson equation . 15 3.2. Boundary conditions . 16 3.2.1. Free nodes . 16 3.2.2. Dirichlet boundary condition, inlet and wall nodes . 16 3.2.3. Outlet boundary condition and outlet nodes . 17 3.2.4. Slip boundary condition and slip nodes . 18 3.3. Different types of basis functions . 19 3.3.1. Pagoda basis functions . 19 3.3.2. Divergence–free basis functions . 20 3.3.3. Comparison . 23 4. Implementation 27 4.1. Structure of the program . 27 4.2. Implementation of element matrices . 28 4.3. Different concepts of numbering . 28 4.3.1. Z–numbering . 28 i Contents 4.3.2. Counter–clockwise–numbering . 31 4.3.3. Lexicographical numbering . 32 4.3.4. Matrix–free approach . 32 4.3.5. Assembly routine . 33 4.4. Implementation of new boundary conditions . 34 4.4.1. Mass lumping . 34 4.4.2. PPE matrix Q ............................. 35 4.4.3. Force vector F ............................. 37 4.4.4. PPE load vector b ........................... 37 4.5. Implementation of initial conditions . 38 4.5.1. The interpolation of initial conditions . 38 4.5.2. Theoretical background of the L2–projection . 39 4.5.3. L2–projection of scalar–valued functions in 1D and 2D . 41 4.5.3.1. Derivation of the projection . 41 4.5.3.2. Numerical Examples . 42 4.5.4. L2–projection of vector–valued functions in 2D . 44 4.5.4.1. Derivation of the projection . 44 4.5.4.2. Numerical examples . 46 4.5.5. L2–projection of vector–valued constrained functions in 2D . 48 4.5.5.1. Introducing the constraint of incompressibility . 48 4.5.5.2. Adding applied boundary conditions . 50 4.5.5.3. Numerical Examples . 51 4.6. Postprocessing tools . 54 4.6.1. Visualisation of boundary conditions . 54 4.6.2. Visualisation of discrete divergence . 55 5. Numerical Test Scenarios 57 5.1. General remarks . 57 5.1.1. Choice of the test scenarios . 57 5.1.2. Used timestep–size . 57 5.1.3. Calculation of the error . 58 5.2. Curve . 58 5.2.1. Implementation of the scenario . 58 5.2.2. Interpretation of the results . 59 5.3. Kovasznay flow . 59 5.3.1. Implementation of the scenario . 61 5.3.2. Interpretation of the results . 62 5.4. Confined jet impingment . 67 5.4.1. Implementation of the scenario . 67 5.4.2. Interpretation of the results . 69 5.5. Taylor–Green vortex flow . 71 5.5.1. Implementation of the scenario . 71 5.5.2. Interpretation of the results . 72 ii Contents 6. Discussion of results 83 6.1. Comparison of standard FEM and divergence–free FEM . 83 6.2. Conclusion . 83 A. Appendix 85 A.1. Element matrices . 85 A.1.1. Matrices for standard FEM . 85 A.1.2. Matrices for divergence–free FEM . 87 A.2. M–files defining the basis functions . 89 A.2.1. pagoda basis functions . 89 A.2.2. divergence–free basis functions . 90 iii List of Figures 3.1.1.one cell with velocities at nodes . 15 3.2.1.a free node with its velocity u ......................... 17 3.2.2.a Dirichlet node with its given velocity uD, both cases, corner and side, are shown. 17 3.2.3.an outlet node with its given velocity uN .................. 18 3.2.4.a slip node with its given velocity uS ..................... 18 3.3.1.pagoda basis function . 20 3.3.2.The four different cases for the first quadrant. The red node has the coordinates xi.................................. 22 3.3.3.divergence–free basis functions . 22 3.3.4.one very simple, divergence–free velocity field . 23 3.3.5.interpolating field using pagoda basis functions . 24 3.3.6.interpolating field using pagoda basis functionson a refined 2 × 2 grid . 25 3.3.7.interpolating field using divergence–free basis functions; the divergence of the field is on the scale of numerical errors . 26 4.1.1.structure of the program Quickfluid, red circles denoting already given data (element matrices M, C, D and continuous initial condition u0), blue circles denoting data generated within Quickfluid ............. 29 4.3.1.Z–numbering pattern of the nodes around one cell . 30 4.3.2.CCW–numbering pattern of the cells around one node . 31 4.3.3.lexicographical numbering of the nodes on the whole domain . 32 4.3.4.lexicographical numbering of the cells on the whole domain . 33 4.5.1.some L2–projection (red arrows) of velocity fields (blue dots) from one function space (circles) to another; Figure A.3.3-1 from [3] . 39 4.5.2.plot of a discontinuous function and its L2–projection ; problem inspired by Figure A.3.2-23 in [3] . 43 4.5.3.a colorplot of a 2D function and its L2–projection with crosses showing the grid of the projection; problem inspired by Figure A.3.2-24 in [3] . 44 4.5.4.a quiver plot of both the original and the projected field . 47 4.5.5.the discrete divergence of the projected field . 47 4.5.6.the discrete divergence of the projected field with incompressibility con- straint . 52 4.5.7.the discrete divergence of the projected field with incompressibility con- straint and no BC applied . 53 v List of Figures 4.5.8.the discrete divergence of the projected field with incompressibility con- straint and slip boundary condition applied . 54 4.5.9.the discrete divergence of the projected field with incompressibility con- straint and Dirichlet boundary condition applied . 55 5.2.1.applied BC for the test scenario curve . 59 5.2.2.resulting velocity field (with divergence) for the test scenario curve . 60 5.2.3.resulting pressure field for the test scenario curve . 60 5.3.1.applied BC for the test scenario Kovasznay flow . 63 5.3.2.resulting velocity field (with divergence) for the test scenario Kovasznay flow at the beginning of the simulation (T = 0)............... 64 5.3.3.resulting pressure field for the test scenario Kovasznay flow at the begin- ning of the simulation (T = 0)......................... 64 5.3.4.resulting velocity field (with divergence) for the test scenario Kovasznay flow at the end of the simulation (T = 2).................. 65 5.3.5.resulting pressure field for the test scenario Kovasznay flow at the end of the simulation (T = 2)............................. 65 5.3.6.convergence of the velocity field from the numerical simulation of the test scenario Kovasznay flow for two different basis functions . 66 5.4.1.boundary conditions of jet impingment . 68 5.4.2.resulting pressure field for the test scenario jet impingment without using slip boundary condition . 69 5.4.3.resulting pressure field for the test scenario jet impingment with slip boundary condition . 69 5.4.4.resulting velocity field (with divergence) for the test scenario jet impingment 70 5.4.5.resulting pressure field for the test scenario jet impingment . 70 5.4.6.resulting streamlines for the test scenario jet impingment . 70 5.5.1.analytical initial condition Taylor–Green vortex flow . 74 5.5.2.boundary conditions of Taylor–Green vortex flow . 75 5.5.3.error plot of Taylor–Green vortex flow on an 8 × 8 grid for T = 5 and Re = 100, calculating the error with and without L2–projection of the reference solution . 76 5.5.4.error plot of Taylor–Green vortex flow on an 8 × 8 grid for T = 500 and Re = 100, calculating the error with and without L2–projection of the reference solution . 77 5.5.5.error of simulations of Taylor–Green vortex flow on an 8×8 grid with and without L2–projected initial conditions for T = 5 and Re = 100 ...... 78 5.5.6.error of simulations of Taylor–Green vortex flow on an 8×8 grid with and without L2–projected initial conditions for T = 500 and Re = 100 ..... 79 5.5.7.error of simulations of Taylor–Green vortex flow on an 8 × 8 grid for different Reynolds numbers . 80 5.5.8.error of simulations of Taylor–Green vortex flow for different grid resolu- tions at Re = 100 ...............................

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    106 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us