Numerical modeling of complex free surface flows

0 downloads 0 Views 4MB Size Report
Last but not least, I want to express my gratitude to my family, my girlfriend and all ...... application of 2D CFD models is the investigation of floodplain inundation ...
Numerical modeling of complex free surface flows

BSc thesis

by

Gábor Fleit Supervisor

Dr. Nils Rüther Co-supervisors

Dr. Sándor Baranya Dr. Hans Bihs

Department of Hydraulic and Environmental Engineering, NTNU Department of Hydraulic and Water Resources Engineering, BME Trondheim, 2015

Gábor Fleit

BSc Thesis

Abstract Computation Fluid Dynamics (CFD) is getting more and more frequently employed for the solution of hydraulic engineering related problems. These numerical models usually mean a less time and cost demanding alternative against the classically used physical models. Numerical models most frequently used by the industry are simple one-dimensional solvers, which are well applicable for the simulation of flood waves. Due to their simplicity they are very fast, therefore able to provide significant time advantage for flood protection. Two- and three-dimensional models are rather applied for tasks with more complex flow conditions (e.g. flow around structures). Because of the numerical and mathematical complexity of these solvers, the use of such models is often limited by the available computational capacity. The rapid development of computer sciences also lead to the advancement of CFD, not only the previous tasks become easier to solve, but new interesting topics arise as well. An example for this is the numerical simulation of breaking waves in marine, riverine or even lacustrine conditions. It is a very important issue, since braking waves are responsible for bank/beach erosion and also have harmful effects on the ecosystem of the littoral zone. The main goal of this BSc thesis is the testing of an up-to-date three-dimensional CFD model being developed at the Norwegian University of Science and Technology, named REEF3D. The numerical and mathematical background of the model will be introduced along with the free-surface calculation method. Numerical modelling of physical model experiments will be presented to prove the capabilities of the Level Set Method in the calculation of the free surface at complex fluid mechanical conditions. Sensitivity analysis of different numerical methods and parameters (grid resolution, roughness, schemes, etc.) was conducted as well, to reveal the performance of the model in general, and on the particular cases as well. Based on recent field measurement results, the numerical investigation of ship induced waves was carried out, to test if the model is applicable for such complex fluid mechanical conditions. The numerical results were compared with data gathered by up-to-date field measuring/post processing methods (ADV, LSPIV). In the end of the thesis, the summary of the numerical results will be together with comments and recommendations on REEF3D and its applicability in general. Future research topics will be drawn up related to the numerical simulation of breaking wave characteristics.

i

Gábor Fleit

BSc Thesis

Kivonat A vízmérnöki gyakorlatban egyre inkább előtérbe kerül a számítógépes modellezés különböző feladatok elvégzésére. Ezek a modellek általában egyszerűbb, gyorsabb és olcsóbb alternatívát jelentenek a klasszikusan alkalmazott kisminta modellekkel szemben. A gyakorlatban leggyakrabban használt ilyen modellek egyszerű, egydimenziós megoldók, melyek remekül alkalmazhatók árhullámok levonulásának szimulációjára, egyszerűségükből adódóan gyorsak, így nagy időelőnyt tudnak biztosítani árvízi védekezéskor. A magasabb dimenziószámú (2D, 3D) modelleket kisebb léptékű, áramlástani szempontból komplexebb feladatok megoldására alkalmazzuk, például műtárgyak körül áramlások szimulációjára. A korszerű megoldásokat és funkciókat tartalmazó 3D modellek matematikai és numerikus komplexitása gyakran komoly korlátozó tényező lehet a megfelelő számítási kapacitás hiányában. A számítástechnika rohamos fejlődése mindazonáltal igyekszik kielégíteni ezeket a növekvő igényeket. A gyorsabb és gyorsabb számítógépek megjelenése azonban elsősorban nem a korábban nehezen megoldható problémák felgyorsítását eredményezi, hanem igényt olyan új problémák numerikus vizsgálatára mely ismét az aktuális csúcstechnológia határait igyekszik feszegetni. Egy ilyen probléma például a folyó- vagy tengerpartokon megtörő hullámok numerikus szimulációja. A jelenségnek bőven van gyakorlati relevanciája, számos aktuális hazai és nemzetközi kutatás foglalkozik a megtörő hullámok parteróziós hatásával, továbbá a litorális zóna élővilágára gyakorolt káros hatások is felismerésre kerültek. Jelen diplomamunka keretein belül egy a norvég NTNU egyetemen fejlesztés alatt lévő korszerű három dimenziós numerikus modell (REEF3D) célirányos tesztelését végzem el, komplex szabadfelszínű áramlások szimulációján keresztül. Ismertetem a REEF3D numerikus és matematikai alapjait, valamint a szabadfelszín számítására alkalmazott Level Set Method módszert. Három tesztfeladaton keresztül bemutatom, hogy a modell alkalmas korábbi kisminta modell eredmények korrekt reprodukálására komplex szabadfelszínű áramlások esetén is (különböző geometriájú bukókon való átfolyás). Ezzel egyrészt igazolom a modell megfelelő működését és pontosságát, másrészt bemutatom, hogy a korszerű numerikus modellek alkalmas eszközök lehetnek a költséges és időigényes fizikai modellek kiváltására. A vizsgálatok során különböző numerikus paraméterek és beállítások (rácsháló felbontás, meder érdesség, turbulencia modellezés, stb.) érzékenységvizsgálatát is bemutatom. Korábbi TDK munkám során gyűjtött célirányos terepi mérések adatait felhasználva kísérletet teszek a hajók keltette hullámzás numerikus leírására is. A modelleredményeket összevetem a

ii

Gábor Fleit

BSc Thesis

korszerű mérési és adatfeldolgozási eljárásokkal (ADV, LSPIV) nyert eredményeinkkel, megvizsgálom, hogy a modell alkalmas-e ilyen komplex jelenségek helyes leírására is. A befejezésben a modelleredmények értékelését végzem el, valamint a REEF3D modell alkalmazhatóságát véleményezem. Összefoglalom az elvégzett munkát és a modell használata során szerzett tapasztalatokat, majd továbbfejlesztési irányokat, illetve további elvégzendő numerikus vizsgálatokat fogalmazok meg.

iii

Gábor Fleit

BSc Thesis

Acknowledgments This thesis work is the closing chapter of my four years of BSc studies in hydraulic engineering, at the Department of Hydraulic and Water Resources Engineering of the Budapest University of Technology and Economics (BME). I am very glad and proud that I got the opportunity to participate in the EEA Norway Grant Mobility project between BME and the Norwegian University of Science and Technology (NTNU), which made financially possible to me to spend five months at the Department of Hydraulic and Environmental Engineering of the NTNU in the wonderful city of Trondheim, where I could work on this study. I would like to express my sincere gratitude to Nils Rüther, who undertook my supervision, welcomed me with hospitality and granted me a pleasant environment at the department for the sake of my carefree work. I am also thankful for him for providing me with the opportunity to work on this topic. Special thanks is given to Hans Bihs for his conductive advices regarding the code of his model and CFD in general, and I am also thankful beyond measure for him implementing new functions into REEF3D and DIVEMesh to help my work with my test cases. I would like thank Arun Kamath PhD candidate for his practical suggestions in connection with REEF3D from the very beginning, starting with helping me compile the code for the first time. I owe special gratitude to my supervisor from my home university and friend Sándor Baranya, for his never ending help and supervision over my abroad studies, as well as for the past two years. The experiences I acquired while working with him made me able to successfully complete the objectives of this thesis as a bachelor student. I also owe him for every accomplishment I achieved in the past years. Last but not least, I want to express my gratitude to my family, my girlfriend and all my friends. I appreciate their continuous support, encouragement and understanding, and for making my absence from home as easy as possible.

iv

Gábor Fleit

BSc Thesis

Contents Abstract .................................................................................................................................................................... i Kivonat .................................................................................................................................................................... ii Acknowledgments .................................................................................................................................................. iv Contents ................................................................................................................................................................... v List of symbols ...................................................................................................................................................... vii 1 Introduction........................................................................................................................................................ 1 1.1 Computational Fluid Dynamics in hydraulic engineering ......................................................................... 1 1.2 CFD modeling software ............................................................................................................................ 3 1.3 Objectives of this study ............................................................................................................................. 6 2 Numerical model ............................................................................................................................................... 8 2.1 Governing equations.................................................................................................................................. 8 2.2 Numerical discretization ............................................................................................................................ 8 2.2.1 Convection discretization ............................................................................................................... 9 2.2.2 Time discretization ....................................................................................................................... 12 2.2.3 Adaptive time stepping ................................................................................................................ 13 2.3 Solution of the Navier-Stokes equations ................................................................................................. 14 2.3.1 Projection method ........................................................................................................................ 14 2.3.2 Poisson solver .............................................................................................................................. 15 2.4 Turbulence modeling ............................................................................................................................... 16 2.4.1 k-ω model ..................................................................................................................................... 17 2.4.2 k-ϵ model ...................................................................................................................................... 17 2.5 Free surface ............................................................................................................................................. 18 2.5.1 Level Set Method ......................................................................................................................... 18 2.5.2 Reinitialization ............................................................................................................................. 19 2.6 Boundary conditions................................................................................................................................ 20 2.6.1 Solid boundaries ........................................................................................................................... 20 2.6.2 Inflow boundary ........................................................................................................................... 21 2.6.3 Outflow boundary ........................................................................................................................ 21 2.7 Numerical wave tank ............................................................................................................................... 22 2.7.1 Relaxation method ....................................................................................................................... 22 2.8 Parallelization via MPI ............................................................................................................................ 23 2.9 Meshing ................................................................................................................................................... 23 3 Flow over rectangular broad-crested Weir (Case 1) ........................................................................................ 25 3.1 Physical model experiments .................................................................................................................... 25 3.2 CFD modeling ......................................................................................................................................... 26 3.2.1 Computational mesh .................................................................................................................... 26 3.2.2 Numerical setup ........................................................................................................................... 26 3.3 Results ..................................................................................................................................................... 26 3.4 Summary ................................................................................................................................................. 28 4 Flow over ogee-crested weir (Case 2).............................................................................................................. 29 4.1 Physical model experiments .................................................................................................................... 29 v

Gábor Fleit

BSc Thesis

4.2 CFD modeling ......................................................................................................................................... 30 4.2.1 Computational mesh .................................................................................................................... 30 4.2.2 Numerical setup ........................................................................................................................... 31 4.3 Results ..................................................................................................................................................... 31 4.4 Summary ................................................................................................................................................. 33 5 Flow over trapezoidal broad-crested weir (Case 3) ......................................................................................... 34 5.1 Physical model experiments .................................................................................................................... 34 5.2 CFD modeling ......................................................................................................................................... 35 5.2.1 Computational mesh .................................................................................................................... 35 5.2.2 Numerical setup ........................................................................................................................... 35 5.3 Results ..................................................................................................................................................... 36 5.4 Sensitivity analysis .................................................................................................................................. 37 5.4.1 Effect of grid size ......................................................................................................................... 37 5.4.2 Effect of time step size ................................................................................................................. 38 5.4.3 Effect of roughness ...................................................................................................................... 39 5.4.4 Performance of convection discretization schemes ...................................................................... 40 5.4.5 Performance of turbulence models ............................................................................................... 41 5.5 Summary ................................................................................................................................................. 42 6 Ship-induced waves (Case 4) ........................................................................................................................... 43 6.1 Field measurements and data processing ................................................................................................. 44 6.2 CFD modeling ......................................................................................................................................... 46 6.2.1 Computational mesh .................................................................................................................... 46 6.2.2 Numerical setup ........................................................................................................................... 47 6.3 Results ..................................................................................................................................................... 48 6.3.1 Near-bed velocities (comparison with ADV) ............................................................................... 48 6.3.2 Surface velocities (comparison with LSPIV) ............................................................................... 50 6.3.3 Bottom shear stress ...................................................................................................................... 53 6.3.4 Breaking waves ............................................................................................................................ 54 6.4 Summary ................................................................................................................................................. 56 7 Conclusions and outlook .................................................................................................................................. 58 Bibliography .......................................................................................................................................................... 61

vi

Gábor Fleit

BSc Thesis

List of symbols 𝜌

Density

𝑡

Time

𝑈

Velocity

𝑖, 𝑗, 𝑘

Vectors along the x, y and z-axes

𝜇

Fluid viscosity (dynamic)

𝑃

Pressure

𝑔

Acceleration due to gravity

𝜙

Level set function

𝑖 (𝑖𝑛 𝑛𝑢𝑚𝑒𝑟𝑖𝑐𝑎𝑙 𝑠𝑐ℎ𝑒𝑚𝑒𝑠)

Time step of iteration

𝜔1 , 𝜔2 , 𝜔3

WENO stencil weights

𝛼1 , 𝛼2 , 𝛼3

WENO stencil weight determiner

𝐼𝑆1 , 𝐼𝑆2 , 𝐼𝑆3

WENO stencil smoothness indicators

𝐿()

Spatial discretization of the function

𝐶

Courant Number

𝜈

Fluid viscosity (kinematic)

𝜈𝑡

Eddy viscosity

𝑉

Maximum viscosity

𝑈∗

Intermediate velocity

𝑘

Turbulent kinetic energy

𝜔

Specific turbulent dissipation

𝑐𝜇 , 𝑐𝜔1 , 𝑐𝜔2 , 𝜎𝑘 , 𝜎𝜔

Closure coefficients

𝑆𝑖,𝑗

Strain tensor

𝜅

Von Kármán constant (~0.4)

𝑈+

Dimensionless wall velocity

𝑑

Water Depth

2𝜖

Transition zone thickness

𝑆(𝜙)

Smooth signed distance function

𝑧

Height to the free surface from bed

𝑑𝑥

Grid cell width

Ψ(𝑥)

Relaxation function

𝑘𝑠

Nikuradse roughness height

vii

Gábor Fleit

BSc Thesis

𝑄

Discharge

𝐶𝑓

Free-flow weir discharge coefficient

𝑞𝑠𝑝𝑒𝑐

Specific discharge

𝐻∗

Total energy head (relative to the top of the weir)

ℎ∗

Water level (relative to the top of the weir)

𝑝

Weir height

𝐿

Weir width

𝜏𝑏𝑤

Bed shear stress due to waves

𝑓𝑤

Wave friction factor

𝑇

Wave period

𝐴

Wave amplitude

𝐻

Wave height

𝐿0

Wave length at deep water

tan 𝛼

Slope of the shoreline

viii

Gábor Fleit

BSc Thesis

1 Introduction 1.1 Computational Fluid Dynamics in hydraulic engineering Computational Fluid Dynamics (CFD) is the science about calculation of fluid flow and related variables using a computer. Usually the modeled fluid volume is divided into finite number of cells forming a grid. The equations for the unknown variables, which describe the fluid flow are solved for each cell, hence CFD modelling might require serious computational resources. Problems related to sedimentation engineering were tend to be solved by the use of physical models. Building and maintaining of these models are costly and time consuming compared to CFD models. Additionally, in some complex cases, when high quality, securely reliable results are required, hybrids of physical and numerical models can be used as well. CFD models are becoming widely employed in cases dealing with hydraulic engineering related problems. The main reason of their increased usage is that the accessible computational capacities are growing rapidly and the numerical solutions for the appearing mathematical problems are getting more precise and efficient at the same time. However, it is noted that developments and innovations in this field of science are probably not going to see an end in the near future, since the faster computers and the more efficient numerical solutions are available, the more complex, more detailed fluid flow problems are to be investigated in bigger and bigger scales. For now it seems that the computational capabilities will not reach the demands of this field of science any soon. Numerical models with different dimension numbers are employed in various kinds of hydraulic engineering tasks. Zero dimensional (0D) models can be used for simple hydrologic situations, for example to presage the water levels in a reservoir. One dimensional (1D) models are mainly employed in riverine settings, especially in flood protection, due to their fairly good accuracy concerning the water levels, simplicity thus the serious time advantage they can provide. 1D models can also be applied for simulations dealing with large scale sedimentation engineering problems, for example to estimate the sediment yield of a whole river system. Moreover, these models are able to deal with water quality issues as well, for example to determine the changes of contamination concentrations along a river, downstream from the emission point. However, it is noted that 1D models are not able to describe the concentration changes in the lateral and vertical direction in the fluid volume. In cases, where one constant velocity component and water level pr. cross-section is not satisfactory, higher dimensional models need to be applied.

1

Gábor Fleit

BSc Thesis

Two dimensional (2D) models provide more detailed solutions for fluid flow simulations. In classic cases the second dimension stands for the second horizontal axis, therefore 2D models are able to provide the distribution of depth-averaged values of fluid dynamic related variables in the horizontal plane. These models are tend to be employed in both fluvial and lacustrine fields of hydraulic engineering. In lacustrine conditions, simulations dealing with wind-induced flows and waves are the most typical applications. A very common riverine application of 2D CFD models is the investigation of floodplain inundation due to floods, but the horizontal distribution of flow variables carry the potential for more detailed sediment or contamination transportation simulations, impact analysis of structures built in the channel or even ecohydraulic investigations. With the assumption of a logarithmical velocity profile it is also possible to approximate the velocity distributions along the vertical axis, thus near-bed velocity magnitudes and bottom shear stress estimations can also be made. Due to the necessarily increased computational demands of 2D models, simulations have to be restricted to smaller scales compared to 1D cases. In order to obtain the most detailed and realistic flow fields, three dimensional (3D) models are need to be employed. Additionally to the horizontal distribution of flow related variables, 3D models are also able to describe the changes along the water column. Similarly to 2D, 3D models are also widely applied in both river and lake related cases. Three dimensional simulations can give the most accurate approximations of the real life flow fields, which is crucial when dealing with detailed sediment transport and scour formation both in riverine and lacustrine conditions. These models yield the potential for detailed impact analysis of structures built in the flow (e.g. groins, weirs, piers) and to investigate complex fluid flow problems e.g. secondary flow structures or phenomena related to multiphase flows. Consequently 3D models provide with the most accurate sediment transport and water quality related simulations as well. The rapid development in computer sciences in the past few years and decades have aided 3D numerical models to be widely spread and employed in the academic and even industrial practice as well. At first, these 3D solver codes had been developed for mainly academic purposes, but later commercial software started to come to light, with graphical user interface (GUI) and wide range of support provided as well, in order to facilitate their employment for average industrial users too.

2

Gábor Fleit

BSc Thesis

1.2 CFD modeling software In contrast with the time of the first 3D models in the 1960s, when only a few computer programs were present, mostly developed by universities and research institutes, nowadays there is a fine range of commercial and freely available software accessible. In general, commercial models offer wide range of support for the consumers, starting with the fact that they tend to have graphical user interface, which can mean a great help for average users who are not familiar with the structure of the actual code. Companies trading with CFD models usually also provide lectures and seminars on the features of their products and also help the users to get to know their models and teach them how to use them properly. On the other hand, free software are usually open-sourced at the same time, which means that the source code of the model is also accessible for the users. This provides with the great possibility to code new types of schemes, methods or equations into the model, so the users can customize these models to fit their needs the best. However, there are a few drawbacks of these models as well. These software generally come with no support at all, sometimes even without proper documentation, which can make the use of the model hard and very time demanding at first. Freely accessible models are also harder to use due to the fact that in most of the cases they are lack of GUI. Since the governing equations cannot be solved analytically in most of the cases, discretization methods need to be employed. The most frequently used methods are Finite Volume Method (FVM), Finite Difference Method (FDM) and Finite Element Method (FEM), however, in civil engineering FEM is generally used for structural analysis, not only fluid dynamics. Hydraulic engineering related fluid dynamics problems often have to deal with multiphase flows. In a lot of cases when dealing with open-channel situations, it is required to take account of two phases: water and air. There are various methods in CFD for the calculation of the free surface between the different phases: Marker of Cell (MAC), Volume of Fluids (VOF) or the Level Set Method (LSM), to name a few. In order to get the most realistic three dimensional flow fields, the effect of turbulence is need to be taken in account. It is not possible to treat eddies in detail in all scales, hence simplifications has to be made, by the use of turbulence models. The most frequently used turbulence models are the Reynolds Averaged Simulation (RAS), Large Eddy Simulation (LES), Detached Eddy Simulation (DES) and the Direct Numerical Simulations (DNS). All of these models have further subclasses with their own advantages and disadvantages. The ones

3

Gábor Fleit

BSc Thesis

used in REEF3D (which is to be employed in present study) will be presented in detail in the later sections. Nowadays, when the most basic desktop computers come with multicore processors, the parallelization of the calculations cannot be avoided, all cores need to be utilized in order the increase the speed of these high performance computations. The most common way to achieve parallel processing nowadays is the employment of Message Passing Interface (MPI). In the rest of this section, a brief comparison will be carried out among four widely used CFD software: Star-CCM+ (Pedersen, 2012), Flow-3D (Haun et al., 2011), OpenFOAM (OpenFOAM Foundation, 2014), SSIIM (Olsen, 2014) and the one to be employed in this study: REEF3D (Bihs, 2015). The features and methods used by REEF3D will be presented in detail later, in Chapter 2. Flow-3D is a three dimensional commercial CFD model distributed by Flow Science, Inc. It comes with fairly developed GUI, which makes its use easier for both average and advanced users as well. The source code is not public, so the users cannot improve or develop the program any further, however, the model comes with a large number of features, so it is not necessarily needed anyways. Flow-3D can work with both FDM and FVM, and uses the VOF for capturing the interface between the different phases in case of multiphase flow simulations. The software contains several subversions of RAS and LES turbulence models, in order to provide the most realistic flow fields. Flow-3D enables engineers to take advantage of the performance that multicore processors can provide, with the hybrid use of two high performance computing methods, MPI and OpenMP. For post-processing, the distributers offer their own software FlowSight, but they also grant the ability to print result files readable by other widely used post-processors such as CEI, FieldView or Tecplot. Star-CCM+ is another widely used commercial 3D model developed by CD-adapco with a well-applicable GUI and numerous features included. The model uses FVM for numerical discretization and VOF or Multiphase Segregated Flow method for treating multiphase flows. Star-CCM+ includes a range of turbulent models from the following general types: RAS, LES and DES. For faster solutions and increased efficiency parallel processing is granted via MPI. Star-CCM+ includes its own post-processing tool for the visualization of the results. OpenFOAM is one of the most widely used freely available CFD software, preferred in mechanical engineering as well. It is an open-source program, so its source code is available for the users. It comes without GUI, simulations has to be started/treated in 4

Gábor Fleit

BSc Thesis

the terminal. OpenFOAM comes with a large range of libraries which contain the different schemes, methods, models and different specific functions. FVM is used for numerical discretization. The free surface between multiphase flows are determined by the VOF method. OpenFOAM provides a huge selection of different turbulent models including different types of RAS, LES, DES and even DNS. Parallel processing is maintained via MPI. Since the software contains of only the numerical solver, postprocessing options has to be given to the users. OpenFOAM grants the possibility to print results in file formats compatible with various widely used post-processing visualization software such as ParaView, Fluent, FieldView and EnSight. SSIIM is a free three dimensional CFD software, widely used and accepted by the hydroscience society. It has been developed at the Department of Hydraulic and Environmental Engineering of the Norwegian University of Science and Technology (NTNU) by Prof. Nils Reidar Bøe Olsen. It is a freely available software, coming with a graphical user interface, however, the source code is only accessible for the sediment transportation module of the software. The model discretizes the Navier-Stokes equations with finite volume method. In contrast with the previous models presented, SSIIM only works with single-phase flows, since the code has been mainly developed for the investigation of larger scale three dimensional fluvial and lacustrine cases, and for sedimentation engineering related problems. The effect of turbulence can be taken into account by subvariants of RAS. Parallel processing is treated by OpenMP for Windows and via MPI for Linux. SSIIM is able to print results files for the commercial Tecplot and the open-sourced ParaView visualization software as well. REEF3D is a fairly new open-source CFD model, developed at the Department of Civil and Transport Engineering of the NTNU by Hans Bihs. The software comes without GUI, the different functions and parameters has to be given in file called the ‘control file’. For each function of the solver, there is a codename consists of a letter and a number, followed by another number which sets the value of the function e.g. the ‘D 10’ function is to select the convection discretization scheme for the momentum equations and with ‘D 10 1’ the First Order Upwind scheme will be employed. (The same kind of ‘card input’ is used in SSIIM as well.) The functions provided by REEF3D are listed and detailed in the user manual of the code (Bihs, 2015a). In contrast with the previous models, REEF3D uses finite difference method for the numerical discretization of the governing equations. The free surface is determined with the LSM, which grants high accuracy, however, the VOF method is 5

Gábor Fleit

BSc Thesis

built in the code as well. There are several turbulence models included in the code, starting from the widely used variations of RAS and LES as well. MPI grants the possibility to utilize the potential of multi-core processors. The software prints the result files in binary format, compatible with ParaView, a freely available open-source post-processing visualization software. Following is a table with the most important features and properties of the CFD models mentioned above: Table 1.1 – Basic features and qualities of different CFD software FLOW-3D

Star-CCM+

OpenFOAM

REEF3D

SSIIM

commercial

commercial

free

free

free

Source code

-

-

open-source

open-source

-

GUI





-

-



Discretization method

finite difference, finite volume

finite volume

finite volume

finite difference

finite volume

Free surface in multiphase flows

volume of fluids

volume of fluids, multiphase segregated flow

volume of fluids

volume of fluids, level set method

-

Turbulence modeling

RAS, LES

RAS, LES, DES

RAS, LES, DES, DNS

RAS, LES

RAS

Parallel processing

hybrid of MPI & OpenMP

MPI

MPI

MPI

OpenMP (Windows), MPI (Linux)

FlowSight, CEI, FieldView, Tecplot

built-in

ParaView, Fluent, FieldView, EnSight

ParaView

Tecplot, ParaView

License

Post-processing

1.3 Objectives of this study The aim of this thesis is to introduce a new, open-source CFD software, REEF3D. At first, the basic principles of CFD will be presented in general, along with the numerical methods used in REEF3D. Since this study is focusing on complex free surface flows, the Level Set Method will also be presented in detail, which is responsible for capturing the free surface. The main part of the thesis will be built up by four sample applications, to demonstrate the features and prove the capabilities of the code. Three of the test cases will be drawn from basic hydraulic engineering situations, the numerical investigation of complex free surface flows over different weirs will be carried out. In the fourth case a very actual and relevant problem will be numerically investigated: the effects of ship-induced waves, based on up-todate field measurements and data processing. Along with the presentation of the numerical results for the cases, sensitivity analysis of different CFD parameters and methods will be carried out as well. The effect of grid size,

6

Gábor Fleit

BSc Thesis

time step size, roughness, different convection discretization schemes and turbulence models have been tested on the accuracy of the results. In the ending, the quality of the numerical solutions will be evaluated and an overview will be given on the work done along with the review of the acquired experiences.

7

Gábor Fleit

BSc Thesis

2 Numerical model This chapter covers the basic principles of computational fluid dynamics (CFD) in general, along with numerical methods used by REEF3D, the CFD model employed in present study.

2.1 Governing equations The base of CFD are conservation laws. In case of fluids, there are two properties to which the laws are applicable: mass and momentum. The conservation of momentum leads to the governing equations of CFD, the Navier-Stokes equations. To be able to solve these equations, some reasonable simplifications are applied: the incompressible fluid retains its density at all times. This assumption is considered reasonable, as the velocities in the cases that are to be investigated in this study are small enough to consider the fluids to be incompressible. The equation for conservation of mass (equation of continuity), with the assumption of incompressibility is given by 𝜕𝑈𝑖 =0 𝜕𝑥𝑖

(2.1)

The conservation of momentum, which follows from Newton’s second law, is given by 𝜕𝑈𝑖 𝜕𝑈𝑖 𝑈𝑗 𝜕 𝜕𝑢𝑖 1 𝜕𝑃 + = (𝜈 )− 𝜕𝑡 𝜕𝑥𝑗 𝜕𝑥𝑗 𝜕𝑥𝑗 𝜌 𝜕𝑥𝑖

(2.2)

Using the equation of continuity with the above equation, the Navier-Stokes equation can be written as 𝜕𝑈𝑖 𝜕𝑈𝑖 1 𝜕𝑃 𝜕 𝜕𝑈𝑖 𝜕𝑈𝑗 + 𝑈𝑗 =− + [𝜈 ( + )] + 𝑔𝑖 𝜕𝑡 𝜕𝑥𝑗 𝜌 𝜕𝑥𝑖 𝜕𝑥𝑗 𝜕𝑥𝑗 𝜕𝑥𝑖

(2.3)

2.2 Numerical discretization It is often very complicated to find the analytic or exact solution to the governing equations, in fact it is only achievable in simple, very special cases. The root of these problems are the non-linearity and time dependency of the coefficients in the governing equations. For these reasons, numerical methods are used, with which it is possible to find approximate solutions to the differential equations. There are three major, frequently used methods in practice: Finite Difference Method (FDM) Finite Element Method (FEM) Finite Volume Method (FVM)

8

Gábor Fleit

BSc Thesis

The finite difference method is believed to be the oldest method used for numerical solution of partial differential equations, introduced by Euler in the 18th century. The computational domain is discretized in grid points, which create a mesh. On one hand, it is very easy to implement, but on the other hand, the method is generally restricted to simple grids. Taylor expansion is used to determine the truncation error and the order of approximation. In the current study, the REEF3D CFD software is employed, which uses a conservative finite difference method. This method has the same conservative properties as the FVM. Since the software works with structured grids, the method is simple, effective and stable. There are three properties of FDMs, which quantifies its applicability for a particular scheme to a particular case of calculation: Consistency: The finite difference method is consistent, if the difference equations converge to the original differential equations as the time step and the grid spacing tend to zero. Stability: Stability basically means, that the numerical errors from any source will not grow unlimited with time. Convergence: Convergence follows from the fulfilment of the two conditions above. The finer the grid and the smaller the time step, the closer we get to the exact solution of the governing equations. 2.2.1 Convection discretization The governing equations of fluid flow consist of convective, diffusive and source terms. The numerical solver employed in present study uses finite difference method for discretization of these terms in the Navier-Stokes equations. Finite difference schemes are based on interpolations of discrete data using polynomials or other simple functions. The points used for the approximation in a scheme can be represented in geometric sketch called the stencil. These stencils can be very useful when trying to understand the differences between discretization schemes. The stencils give information about the number of points used in the scheme and the nature of the scheme (explicit or implicit). Following are few discretization schemes using finite difference method, implemented in REEF3D: First Order Upwind (FOU) Scheme The FOU scheme (Courant et al., 1952) is a first order scheme which uses the values of the cells upstream from the cell which variables are to be evaluated. Following is an example of FOU discretization:

9

Gábor Fleit

BSc Thesis

𝜕𝑈 𝑈𝑖 − 𝑈𝑖−1 = 𝜕𝑥 ∆𝑥 Central Difference Scheme (CDS) The CDS is a second order scheme which uses the values of the cells on both side of the cell which variables are to be evaluated. Following is an example of CDS discretization: 𝜕𝑈 𝑈𝑖+1 − 𝑈𝑖−1 = 𝜕𝑥 2∆𝑥 Quadratic Upwind Interpolation of Convective Kinetics (QUICK) Scheme The QUICK scheme (Leonard, 1979) is a second order accurate scheme, which is similar to simple first or second order upwind schemes, but instead of using a straight line between the previous cells, a second-order polynomial curve is used to fit through two upstream nodes and the one to be evaluated. This is very accurate scheme, however, in extreme flow situations overshoots and undershoots can occur, which can lead to stability problems. Sharp and Monotonic Algorithm for Realistic Transport (SMART) Scheme The SMART scheme (Gaskell and Lau, 1988) is up to second order accurate. It is a polynomial based discretization scheme, using a technique called ‘curvature compensation’. The main advantage of the scheme and that makes it frequently applied in solving three-dimensional fluid flow problems is its stability. Weighted Essentially Non-Oscillatory (WENO) Scheme The WENO scheme (Liu et al., 1994) is based upon the ENO (Harten and Osher, 1987) idea, but instead of using one ENO stencil, it uses all three of them. The approximation is a convex combination of the 3 possible ENO stencil. Each stencil is assigned a weight, based on the smoothness of the solution. In areas of smooth solution, the scheme can reach up to be 5th order. In the presence of discontinuities and shocks, the order decreases gradually to a minimum of 3rd order. For the simulation of complex flow situations – such as free surface flows – high order discretization methods need to be employed, however, the maintenance of numerical stability is essential as well. The main advantage of the WENO scheme is that it is able to manage large gradients right up to the shock very accurately. Following is the example of WENO for the discretization of the level set function in the x-direction:

10

Gábor Fleit

BSc Thesis

𝜙𝑥− , 𝜙𝑥 = {𝜙𝑥+ , 0,

𝑖𝑓 𝑈1 > 0 𝑖𝑓 𝑈1 < 0 𝑖𝑓 𝑈1 = 0

(2.4)

WENO approximation for 𝜙𝑥± is a convex combination of the possible ENO approximations: 𝜙𝑥± = 𝜔1± 𝜙𝑥1± + 𝜔2± 𝜙𝑥2± + 𝜔3± 𝜙𝑥3±

(2.5)

The three ENO stencils are defined as: 𝜙𝑥1±

𝑞1± 7𝑞2± 11𝑞3± = − + , 3 6 6

𝜙𝑥2± = − 𝜙𝑥3± =

𝑞2± 5𝑞3± 𝑞4± + + , 6 6 3

(2.6)

𝑞3± 5𝑞4± 𝑞5± + − 3 6 6

with 𝑞1− =

𝜙𝑖−2 − 𝜙𝑖−3 − 𝜙𝑖−1 − 𝜙𝑖−2 − 𝜙𝑖 − 𝜙𝑖−1 , 𝑞2 = , 𝑞3 = , Δ𝑥 Δ𝑥 Δ𝑥

(2.7)

𝜙𝑖+1 − 𝜙𝑖 − 𝜙𝑖+2 − 𝜙𝑖+1 𝑞4− = , 𝑞5 = Δ𝑥 Δ𝑥 and 𝑞1+ =

𝜙𝑖+3 − 𝜙𝑖+2 , Δ𝑥

𝑞2+ =

𝜙𝑖+2 − 𝜙𝑖+1 , Δ𝑥

𝜙𝑖 − 𝜙𝑖−1 𝑞4+ = , Δ𝑥

𝑞3+ =

𝜙𝑖+1 − 𝜙𝑖 , Δ𝑥

(2.8)

𝜙𝑖−1 − 𝜙𝑖−2 𝑞5+ = Δ𝑥

the weights are written as: 𝜔1± =

𝛼1±

±,

𝛼1± + 𝛼2± + 𝛼3

𝜔2± =

𝛼2±

±,

𝛼1± + 𝛼2± + 𝛼3

𝜔3± =

𝛼3± 𝛼1± + 𝛼2± + 𝛼3±

(2.9)

and ∝1± =

1 1 , 10 (𝜖̃ + 𝐼𝑆1± )2

∝± 2=

6 1 , 10 (𝜖̃ + 𝐼𝑆2± )2

∝± 3=

3 1 10 (𝜖̃ + 𝐼𝑆3± )2

(2.10)

where 𝜖̃ = 10−6 is the regularization parameter in order to avoid division by zero, and the following smoothness indicators: 11

Gábor Fleit

BSc Thesis

𝐼𝑆1± =

13 1 (𝑞1 − 2𝑞2 + 𝑞3 )2 + (𝑞1 − 4𝑞2 + 3𝑞3 )2 , 12 4

𝐼𝑆2± = 𝐼𝑆3± =

13 1 (𝑞2 − 2𝑞3 + 𝑞4 )2 + (𝑞2 − 𝑞4 )2 , 12 4

(2.11)

13 1 (𝑞3 − 2𝑞4 + 𝑞5 )2 + (3𝑞3 − 4𝑞4 + 𝑞5 )2 12 4

2.2.2 Time discretization Since the characteristics of fluids change rapidly over time in cases of fluid dynamics, highly accurate discretization schemes are needed for the time dependent terms of the governing equations. The numerical model used in the current study (REEF3D) includes three different explicit methods for time discretization. On one hand, these explicit schemes are easy to construct, apply and parallelize, but on the other hand, small time steps required for stability, especially when velocity and/or mesh size vary strongly. Following three time discretization schemes included in the code: Adam-Basforth Scheme The Adam-Basforth scheme (Hairer, 1993) is a second order accurate scheme, which uses the values of the previous two time steps for the calculation of the next one. Following is an example of the scheme: 𝜙 𝑛+1 = 𝜙 𝑛 +

∆𝑡𝑛 ∆𝑡𝑛 + 2∆𝑡𝑛−1 ∆𝑡𝑛 ( 𝐿(𝜙 𝑛 ) − 𝐿(𝜙 𝑛 )) 2 ∆𝑡𝑛−1 ∆𝑡𝑛−1

(2.12)

Total Variance Diminishing (TVD) 3rd order Runge-Kutta Scheme The TVD 3rd order Runge-Kutta Scheme (Shu and Gottlieb, 1977) is – as its name shows – a third order discretization scheme. Total variance diminishing is a feature of certain discretization schemes used to solve differential equations in CFD. A TVD scheme preserves monotonicity. The scheme consists of three intermediate steps, so the spatial derivatives have to be calculated three times, for each time step. This makes the scheme computationally more demanding than the Adam-Basforth scheme, but also provides higher accuracy and numerical stability. Following is an example of the scheme: 𝜙 (1) = 𝜙 𝑛 + ∆𝑡𝐿(𝜙 𝑛 ) 𝜙

(2)

3 1 1 = 𝜙 𝑛 + 𝜙 (1) + Δ𝑡𝐿(𝜙 (1) ) 4 4 4

(2.13)

12

Gábor Fleit

BSc Thesis

𝜙 𝑛+1 =

1 𝑛 2 (2) 2 𝜙 + 𝜙 + Δ𝑡𝐿(𝜙 (2) ) 3 3 3

TVD 4th order Runge-Kutta Scheme In the case if even higher accuracy and numerical stability is required, the TVD 4 th order Runge-Kutta Scheme can be employed. This scheme has one more intermediate calculation step compared to the previous one, so it even demands more computational capacity. Following is an example of the scheme: 𝜙 (1) = 𝜙 𝑛 + 𝜙 (2) = 𝜙 𝑛 +

∆𝑡 𝐿(𝜙 𝑛 ) 2

∆𝑡 𝐿(𝜙 (1) ) 2

(2.14)

𝜙 (3) = 𝜙 𝑛 + ∆𝑡𝐿(𝜙 (2) ) 1 1 2 1 Δ𝑡 𝜙 𝑛+1 = − 𝜙 𝑛 + 𝜙 (1) + 𝜙 (2) + 𝜙 (3) + 𝐿(𝜙 (3) ) 3 3 3 3 6 2.2.3 Adaptive time stepping In order to get a good numerical solution and maintain stability during CFD simulations, the fluid cannot move a distance larger than the computational grid size in one time step. This statement is the base of the Courant condition (Courant et al., 1967), which can be summarized mathematically by the following equation: 𝑢∆𝑡 ≤𝐶 ∆𝑥

(2.15)

This condition is implemented in implicit time stepping algorithms. In case of explicit time stepping methods, the most efficient way of choosing the size of the time step is the employment of adaptive time stepping. To implement this, the CourantFriedrichs-Lewy (CFL) criterion is to be used, where the time step for the following step is based on the maximal values of velocities, viscosity and the volume and the surface forces in the current step. Following is the CFL condition: −1 2

|𝑢|𝑚𝑎𝑥 |𝑢|𝑚𝑎𝑥 |𝑆𝑚𝑎𝑥 | 𝛿𝑡 ≤ 2 (( + 𝑉) + √( + 𝑉) + ) 𝛿𝑥 𝛿𝑥 𝛿𝑥

(2.16)

where

13

Gábor Fleit

BSc Thesis

2 2 2 𝑉 = max(𝜈 + 𝜈𝑡 ) ( + + ) 2 2 (𝛿𝑥) (𝛿𝑦) (𝛿𝑧)2

(2.17)

2.3 Solution of the Navier-Stokes equations The incompressible Reynolds-averaged Navier-Stokes (RANS) equations are used to solve the fluid flow problem. The idea behind the equations is to decompose the instantaneous velocity vectors into its time-averaged and fluctuating components (Reynolds, 1895). The averaged component is directly used in the equations and the effect of the fluctuating component is approximated by the introduction of eddy viscosity to the equations: 𝜕𝑈𝑖 𝜕𝑈𝑖 1 𝜕𝑃 𝜕 𝜕𝑈𝑖 𝜕𝑈𝑗 + 𝑈𝑗 =− + [(𝜈 + 𝜈𝑡 ) ( + )] + 𝑔𝑖 𝜕𝑡 𝜕𝑥𝑗 𝜌 𝜕𝑥𝑖 𝜕𝑥𝑗 𝜕𝑥𝑗 𝜕𝑥𝑖

(2.18)

In this study, the eddy viscosity was calculated by two-equation turbulence models which will be presented in detail later in this chapter. For the complete solution of the Navier-Stokes equations (Eq. 2.3), the pressure term needs to be solved. Since there is no definition for the advection of pressure in the equation, the direct determination of the pressure term in the next grid point is not possible. The non-linear terms in the equation also mean a challenge when trying to find an exact solution, as it would involve the employment of computationally demanding implicit methods. REEF3D includes several algorithms for the solution of the pressure terms. These methods all use the equation of continuity to find the correct pressure field. The projection method is the most widely used out of these algorithms. 2.3.1 Projection method Projection method (Chorin, 1968) uses explicit time treatment of the Navier-Stokes equation in order to solve the pressure problem. The velocity fields are always calculated from the previous steps. In this straight forward method, an intermediate velocity field 𝑈𝑖∗ is determined with the total ignorance of the pressure gradient. The 𝑈𝑖∗ velocity field is calculated from the transient RANS equations: 𝑛 𝜕(𝑈 ∗ − 𝑈𝑖𝑛 ) 𝜕 𝜕𝑈𝑖𝑛 𝜕𝑈𝑗𝑛 𝑛 𝜕𝑈𝑖 𝑛 + 𝑈𝑗 = [𝜈(𝜙 ) ( + )] + 𝑔𝑖 𝜕𝑡 𝜕𝑥𝑗 𝜕𝑥𝑗 𝜕𝑥𝑗 𝜕𝑥𝑖

(2.19)

However, the step given by the equation above does not fulfill the equation of continuity. This is where the second step comes, the projection step, which uses the pressure to calculate the velocity field in the next time step, with the following equation:

14

Gábor Fleit

BSc Thesis

𝜕(𝑈𝑖𝑛+1 − 𝑈𝑖∗ ) 1 𝜕𝑃𝑛+1 + =0 𝜕𝑡 𝜌(𝜙 𝑛 ) 𝜕𝑥𝑖

(2.20)

For the solution of the equation above, the term 𝑃𝑛+1 needs to be known. This is obtained by using the divergence operator one equation 2.20. Also a condition of 𝑈𝑖𝑛+1 = 0 is applied, which arises from the equation of continuity. The equation formed is called the Poisson pressure equation, formulated as: 𝜕 1 𝜕𝑃 1 𝜕𝑈𝑖∗ ( )=− 𝜕𝑥𝑖 𝜌(𝜙𝑛 ) 𝜕𝑥𝑖 ∆𝑡 𝜕𝑥𝑖

(2.21)

The value of pressure acquired from the equation can be used in equation 2.20 so the velocity field for next time step is produced, which also satisfies the equation of continuity. Herewith the Navier-Stokes equations are solved. The method for the solution of the Poisson pressure equation follows in the next section. 2.3.2 Poisson solver To solve the Poisson pressure equation, two kind of methods could be employed. Direct methods, such as Gaussian elimination and iterative methods. However, direct methods tend to have very high computational needs, therefore iterative methods are to be used. These iterative solvers can also be divided into two basic groups: global and Newton-like methods. Newton-like methods solve the equation by linearizing it about an initial estimated value of the solution, using the first two terms of the Taylor series. Assuming that the initial estimation is good, the method will converge very quickly to the solution. However, in case of wrong initial estimation, the convergence will be impeded. Global solvers convert the equation into a minimization problem. The solver tries to find the lowest point of the surface which lies in the opposite direction of the gradient of the function to find the solution. On one hand, this method does not rely on the quality of the initial estimation, but on the other hand it converges to the solution much slower than the previous method. In case of functions which have minor undulations, the solver tends to oscillate between two successive minimums. This problem was caused by the fact that the solver was only searching for the minima in only one direction. This issue has been solved with the development of the Conjugate Gradient (CG) method (Hestenes and Stiefel, 1952). The method is able to find the minima of a function in several directions while searching in one direction. The name ‘conjugate’ is derived from the fact that the principle is valid when the two directions are conjugate, so the vectors are orthogonal.

15

Gábor Fleit

BSc Thesis

To avoid the requirement of the symmetry, the Bi-Conjugate Gradient (BiCG) method (Fletcher, 1976) has been developed. The method first converts the non-symmetric system into symmetric by the use of transpose matrix. This makes the BiCG method computationally twice as demanding as the CG method, with the same rate of convergence. The method used in current study, is a further developed version of the BiCG, the BiConjugate Gradient Stabilized (BiCGSTAB) (van der Vorst, 1992) method, which converges faster than the BiCG but still provides the same accuracy.

2.4 Turbulence modeling In order to get a numerical solution close to the real flow conditions, turbulence models must be applied. In case of the flow interacts with structures (e.g. groins, weirs, piers) vortices can appear in the flow field downstream of the structures. For mapping the effects of turbulence in all of its scales, Direct Numerical Simulations (DNS) can be employed. This method is lack of all averaging and approximations besides the numerical discretization needed for the treatment of the Navier-Stokes equations. However, these simulations are extremely costly computationally, so its applicability is restricted to cases with geometrically very simple domains, and flows with relatively low Reynolds numbers. Due to these restrictions, DNS is not applicable for the treatment of real life hydraulic engineering problems as for now. Another, computationally still expensive method, which treats only the larger, more energetic eddies in higher details is the Large Eddy Simulation (LES). The LES has lower computational demands than the DNS, consequently, it is employed in cases with higher Reynolds numbers, and more complex topology, where the DNS would not be applicable. However, the LES is still too expensive for the treatment of practical hydraulic engineering problems. For real life situations, the actual details of separate fluctuations are generally not needed, thus simplifications can be made. A good approach for this, is the simplification of the Navier-Stokes equations, so the computational demands can be reduced significantly and the mean flow field can still be predicted properly at the same time. In order to get the equations which describe the mean flow, the actual velocity vector and the pressure is decomposed into an average and a fluctuating component. The method is called Reynolds decomposition, therefore the equations are called the Reynolds-Averaged Navier-Stokes (RANS) equations. In case of turbulence modeling with the RANS equations, the most widely used methods are the k-ω (Wilcox, 1994) and the k-ϵ (Launder and Sharma, 1974) turbulence model. These models are implemented in REEF3D among many others. 16

Gábor Fleit

BSc Thesis

2.4.1 k-ω model The k-ω model uses two additional transport equations on the computational domain in order to reproduce the effects of turbulence on the fluid flow. These two equations account for the diffusion and convection of the turbulent energy. One of the variables transported is the turbulent kinetic energy k, which determines the energy in the turbulence. The second variable, ω, is the specific turbulent dissipation, which is the rate at which turbulence kinetic energy is converted into thermal internal energy per unit volume and time. The turbulent eddy viscosity 𝜈 t is determined using these two variables as shown below. Including the Reynolds stress terms in the Navier Stokes equation, the RANS equation can be written as: 𝜕𝑈𝑖 𝜕𝑈𝑖 1 𝜕𝑃 𝜕 𝜕𝑈𝑖 𝜕𝑈𝑗 + 𝑈𝑗 =− + [𝜈 ( + ) − 𝑢𝑖 𝑢𝑗 ] + 𝑔𝑖 𝜕𝑡 𝜕𝑥𝑗 𝜌 𝜕𝑥𝑖 𝜕𝑥𝑗 𝜕𝑥𝑗 𝜕𝑥𝑖

(2.22)

To solve the equation above, the stress terms 𝑢𝑖 𝑢𝑗 are replaced with the Boussinesq approximation: 𝜕𝑈𝑗 𝜕𝑈𝑖 2 −𝑢𝑖 𝑢𝑗 = 𝜈𝑡 ( + ) − 𝑘𝛿𝑖𝑗 𝜕𝑥𝑖 𝜕𝑥𝑗 3

(2.23)

where 𝜈𝑡 = 𝑐𝜇

𝑘 𝜔

(2.24)

The transform equations for k and ω are defined as: 𝜕𝑘 𝜕𝑘 𝜕 𝜈𝑡 𝜕𝑘 + 𝑈𝑗 = [(𝜈 + ) ] + 2𝜈𝑡 |𝑆|2 − 𝑘𝜔 𝜕𝑡 𝜕𝑥𝑗 𝜕𝑥𝑗 𝜎𝑘 𝜕𝑥𝑗

(2.25)

𝜕𝜔 𝜕𝜔 𝜕 𝜈𝑡 𝜕𝜔 + 𝑈𝑗 = [(𝜈 + ) ] + 2𝑐𝜇 𝑐𝜔1 |𝑆|2 − 𝑐𝜔2 𝜔2 𝜕𝑡 𝜕𝑥𝑗 𝜕𝑥𝑗 𝜎𝜔 𝜕𝑥𝑗

(2.26)

where coefficient 𝑐𝜇 = 0.09, 𝑐𝜔1 = 5/9, 𝑐𝜔2 = 5/6 and 𝜎𝑘 = 𝜎𝜔 = 2. The term |𝑆|2 can be given as: 1 𝜕𝑈𝑖 𝜕𝑈𝑗 𝑆𝑖𝑗 = ( + ) 2 𝜕𝑥𝑗 𝜕𝑥𝑖

(2.27)

2.4.2 k-ϵ model The k-ϵ model is structurally very similar to the k-ω model. The relation between the specific turbulent dissipation ω and the turbulent dissipation ϵ is the following: 17

Gábor Fleit

BSc Thesis

𝜖 = 𝑘𝜔

(2.28)

Transport equations for k and ϵ are defined as: 𝜕𝑘 𝜕𝑘 𝜕 𝜈𝑡 𝜕𝑘 + 𝑈𝑗 = [(𝜈 + ) ] + 𝑃𝑘 − 𝜖 𝜕𝑡 𝜕𝑥𝑗 𝜕𝑥𝑗 𝜎𝑘 𝜕𝑥𝑗

(2.29)

𝜕𝜖 𝜕𝜖 𝜕 𝜈𝑡 𝜕𝜖 𝜖 𝜖2 + 𝑈𝑗 = [(𝜈 + ) ] + 𝑐𝜖1 𝑃𝑘 − 𝑐𝜖2 𝜕𝑡 𝜕𝑥𝑗 𝜕𝑥𝑗 𝜎𝜖 𝜕𝑥𝑗 𝑘 𝑘

(2.30)

2.5 Free surface Hydraulic engineering related fluid dynamics problems often have to deal with multiphase flows. In most cases when dealing with open-channel flows, it is required to take account of two phases: water and air. This is the case for investigation of breaking waves, where the free surface between the two phases is need to be defined. There are various methods treating these problem in CFD. The Marker of Cell (MAC) method (Harlow and Welch, 1965) is an interface capturing method. In addition to the treatment of fluid flow problem, the MAC method identifies several marker cells on the interface of the fluid whose convection is also to be solved. In three dimensional flows, with relatively big domains, the computational demands of the method can increase significantly. Another method is the Volume of Fluids (VOF) method (Hirt and Nichols, 1981). The method uses volume fraction of one fluid for each discretization cell instead of markers for calculating the free surface. The VOF method reported to be more efficient than the MAC method, therefore it is widely used in CFD software. However, the numerical model employed in this study uses a third different method, the Level Set Method (Osher and Sethian, 1988). 2.5.1 Level Set Method The Level Set Method (LSM) has been implemented in the code of REEF3D. The method uses a signed function, called to level set function to capture the free surface. The property of this function 𝜙(𝑥⃗, 𝑡) is that its value gives zero on the free surface. In every point of the computational domain, the level set function gives the closest distance to the interface and the phases are distinguished by the sign, as following: > 0, 𝜙(𝑥⃗, 𝑡) = {= 0, < 0,

𝑖𝑓 𝑥⃗ 𝜖 𝑝ℎ𝑎𝑠𝑒 1 𝑖𝑓 𝑥⃗ 𝜖 Γ 𝑖𝑓 𝑥⃗ 𝜖 𝑝ℎ𝑎𝑠𝑒 2

(2.31)

18

Gábor Fleit

BSc Thesis

Figure 2.1 – The Level Set Function

The interface Г moves with the fluid particles and its movement can be described with the convection of the level set function: 𝜕𝜙 𝜕𝜙 + 𝑈𝑗 =0 𝜕𝑡 𝜕𝑥𝑗

(2.32)

Using the LSM, the properties of the two phases can be defined on the whole domain. 𝜕𝜌

Formerly, an assumption of incompressibility and immiscibility of the fluids was made ( 𝜕𝑡 = 0 and

𝜕𝜐 𝜕𝑡

= 0). These conditions cause a jump in the values of these parameters at the

interface, which may lead to numerical stability problems. The solution is to define the interface with the constant value of 2ϵ. In that region, smoothing is carried out with a regularized Heaviside function H(ϕ). The density and the viscosity can be written as: 𝜌(𝜙) = 𝜌1 𝐻(𝜙) + 𝜌2 (1 − 𝐻(𝜙)) 𝜈(𝜙) = 𝜈1 𝐻(𝜙) + 𝜈2 (1 − 𝐻(𝜙))

(2.33)

and

𝐻(𝜙) = {½(1 +

𝜙 𝜖

+

0,

𝑖𝑓 𝜙 < −𝜖

1 𝜋𝜙 sin( )) , 𝜖 𝜋

𝑖𝑓 |𝜙| ≤ 𝜖

1,

(2.34)

𝑖𝑓 𝜙 > 𝜖

2.5.2 Reinitialization A challenge with the LSM however stands. The problem is that the signed distance property of the level set function is not maintained when the interface moves. In other words, the value of ϕ at a point of the domain does not remain the shortest distance from the interface. For this reason, the function has to be reinitialized after a certain amount of time, after each time step for example.

19

Gábor Fleit

BSc Thesis

There are several ways to do this, but there are two widely used, long standing methods, the Fast Marching Method (FMM) and the Partial Differential Equation (PDE) approach (Sussman et al., 1994). This study employs the latter one for the reinitialization process. 𝜕𝜙 𝜕𝜙 + 𝑆(𝜙) (| | − 1) = 0 𝜕𝜏 𝜕𝑥𝑗

(2.35)

where S(ϕ) is the smoothed sign function (Peng et al., 1999): 𝜙

𝑆(𝜙) =

2

𝜕𝜙 √𝜙 2 + |𝜕𝑥 | (Δ𝑥)2

(2.36)

𝑗

By solving equation 2.35 until steady state using the artificial time step 𝜕𝜏, the signed distance property is restored. The sign function S(ϕ) then returns the value of 0 to the interface using equation 2.36, while the values for the rest of the domain are assigned using equation 2.31.

2.6 Boundary conditions In this section, the options will be briefly presented for setting boundary conditions in the model for open channel flow calculations. Further options (e.g. for wave generation) and the details can be found in the REEF3D User’s Manual (Bihs, 2015). 2.6.1 Solid boundaries For the solid boundaries it can be decided whether to use wall functions for the velocities and/or for turbulence modeling or not. The model allows the user to choose between slip or no-slip boundaries at the walls for the calculation of these variables as well. At solid boundaries the surface roughness is accounted for by using Schlichting’s rough wall law (Schlichting, 1979): 𝑈+ =

1 30𝑑 𝑙𝑛 ( ) 𝜅 𝑘𝑠

(2.37)

The roughness parameter (𝑘𝑠 ) can be either given globally or separately for each wall of the domain as well. For sedimentation engineering related problems, the factor to calculate 𝑘𝑠 from the average size of sediments 𝑑50 can also be given. Side boundaries can also be used as symmetry planes, i.e. a zero gradient boundary condition is imposed on the pressure equation on the side boundaries.

20

Gábor Fleit

BSc Thesis

2.6.2 Inflow boundary There are basically two major types of inflow boundary conditions to be applied: inflow with constant discharge and wave generation. The velocity profile at the inflow boundary can be determined in many different ways: Constant velocity Logarithmic profile (based on bed roughness) Logarithmic profile (based on bed and sidewalls roughness) Constant velocity only for phase 1 (water phase) Logarithmic profile only for phase 1 (based on bed roughness) Logarithmic profile only for phase 1 (based on bed and sidewalls roughness) The initialization of the RANS turbulence variables can set as: Constant, based on inflow velocity Logarithmic profile (based on bed roughness) Logarithmic profile (based on bed and sidewalls roughness) Constant with wall function values Constant values for numerical wave tank The inflow profile for the RANS turbulence variables can be determined as: Zero values Logarithmic profile Constant The damping of eddy viscosity can also be carried out near the inflow. 2.6.3 Outflow boundary Zero gradient boundary condition is used by default in for the outflow boundary in REEF3D. This means that the derivate of the variable at the boundary is zero. In other words, the value at the boundary is the same as the value in the cell closest to the boundary. For open channel flow simulations two types of pressure outflow boundary conditions can be used: controlled outflow and free stream outflow. Controlled outflow is very often used in hydraulic engineering related CFD simulations, e.g. numerical investigation of river reaches. In these cases the outflow transect of the computational domain has to be controlled numerically, since it is also controlled in reality by the downstream water volume. Free stream outflow boundary can be applied for the numerical reproduction of physical model experiments, where the tailwater is not necessarily controlled.

21

Gábor Fleit

BSc Thesis

2.7 Numerical wave tank Simulation of waves using CFD is possible by the implementation of a numerical wave tank. These simulations mimic the physical experiments carried out in a laboratory wave flume. Numerical wave tanks can be based on different approaches, and the two major ones involve RANS and potential theory. Furthermore, the various options for the numerical treatment of these approaches provide many combinations for the implementation of numerical wave tank in the field of CFD. Some of the combinations are Potential theory with finite element discretization (Grilli and Horrillo, 1997) RANS equations with free surface description by VOF method (Jacobsen et al., 2011) RANS equations with free surface description by LSM (Kamath, 2012) Combination of potential theory and RANS equations (Clauss et al., 2005) This study uses the Reynolds-Averaged Navier-Stokes equations along with the Level Set Method for obtaining the free surface. 2.7.1 Relaxation method The current study uses a method where the simulated waves are moderated after every time step with an analytical solution. This method, using a combination of analytical and computational values, is referred to as the relaxation method. Three relaxation zones are introduced in the wave tank. Relaxation functions are used to generate waves at the beginning, absorb the waves at the end and prevent reflected waves from affecting the wave generation as shown in Figure 2.2.

Figure 2.2 – Sections of the Numerical Wave Tank

Zone 1 is responsible for the wave generation, Zone 2 prevents reflected waves from affecting the wave generation and Zone 3 is the numerical beach, which absorbs the waves at the end of the wave tank. The relaxation in zone 1 and 2 is achieved using the following rules on pressure and velocity in the zones: 𝑈𝑟𝑒𝑙𝑎𝑥𝑒𝑑 = Ψ(𝑥)𝑈𝑎𝑛𝑎𝑙𝑦𝑡𝑖𝑐𝑎𝑙 + (1 − Ψ(𝑥))𝑈𝑐𝑜𝑚𝑝𝑢𝑡𝑎𝑡𝑖𝑜𝑛𝑎𝑙

(2.38)

𝑃𝑟𝑒𝑙𝑎𝑥𝑒𝑑 = Ψ(𝑥)𝑃𝑎𝑛𝑎𝑙𝑦𝑡𝑖𝑐𝑎𝑙 + (1 − Ψ(𝑥))𝑃𝑐𝑜𝑚𝑝𝑢𝑡𝑎𝑡𝑖𝑜𝑛𝑎𝑙 22

Gábor Fleit

BSc Thesis

Similarly, the relaxation in Zone 3 is achieved by the following sets of rules for pressure and velocity: 𝑈𝑟𝑒𝑙𝑎𝑥𝑒𝑑 = Ψ(𝑥)𝑈𝑐𝑜𝑚𝑝𝑢𝑡𝑎𝑡𝑖𝑜𝑛𝑎𝑙 + (1 − Ψ(𝑥))𝑈𝑎𝑛𝑎𝑙𝑦𝑡𝑖𝑐𝑎𝑙

(2.39)

𝑃𝑟𝑒𝑙𝑎𝑥𝑒𝑑 = Ψ(𝑥)𝑃𝑐𝑜𝑚𝑝𝑢𝑡𝑎𝑡𝑖𝑜𝑛𝑎𝑙 + (1 − Ψ(𝑥))𝑃𝑎𝑛𝑎𝑙𝑦𝑡𝑖𝑐𝑎𝑙 The function Ψ(𝑥) changes its value based on the zone to which the relaxation is applied.

2.8 Parallelization via MPI Modern computers with multi-core processors offer high computational capacity to the users. In order to increase computational efficiency, this potential has to be exploited, parallel processing has to be employed. Parallelization between processors means dividing an initially large problem into smaller parts, that solving these parts simultaneously. The method used for this in REEF3D is called Message Passing Interface (MPI). This method splits the computational domain into smaller pieces then each piece is assigned to different processors. In order to provide continuity for the calculations, the boundaries of neighboring processes has to be shared. This is done by using of ghost cells (GC). To enable this sharing, the values of the cells at each edge of an individual process are copied and transmitted to the respective boundaries of the previous and next processes and stored on a set of ghost cells at the process boundary. An illustration of MPI is presented in Figure 2.3.

Figure 2.3 – Functioning of MPI between neighboring processes

2.9 Meshing As it was stated at the beginning of this chapter, the numerical methods used in REEF3D are all finite difference methods. The methods presented above were all constructed under the assumption that a Cartesian grid is used. On one hand, this makes the implementation of the numerical algorithms straightforward, but on the other hand, this kind of grid is not very flexible due to its well defined structure. Cartesian grids cannot be wrapped around complex 23

Gábor Fleit

BSc Thesis

geometry, which can easily become a problem, when an irregular structure is placed in the fluid domain or when working with natural channels. The ghost cell immersed boundary method (GCIBM) (Berthelsen and Faltinsen, 2008) is employed to overcome this problem. Values from the fluid region are extrapolated into the solid region and these cells are called ‘ghost cells’. The value of these cells are computed along an orthogonal line across the boundary (Figure 2.4).

Figure 2.4 – Ghost Cell Immersed Boundary

A software called DIVEMesh is responsible for mesh generation for REEF3D. DIVEMesh has been developed by Hans Bihs as well, specifically to create computational grids for REEF3D.

24

Gábor Fleit

BSc Thesis

3 Flow over rectangular broad-crested Weir (Case 1) The rectangular broad-crested weir is a hydraulic structure of simple geometry, used for depth control and other secondary purposes. There is a unique connection between the flow rate per unit width and the upstream water level measured relative to the weir crest, which can be exploited for flow measurements. In the modular flow regime, it induces critical conditions on the crest by raising the channel bed and reducing the specific energy to a minimum. Laboratory-scale measurements were carried out to capture the free surface profile over the weir and the profile was successfully reproduced by the commercial CFD software, Fluent (Sarker and Rhodes, 2004). The simplicity of the geometry and the complexity of fluid mechanics makes it an excellent case-study for testing REEF3D.

3.1 Physical model experiments In this section the laboratory setup and the experiments will be briefly overviewed, based on the paper from Sarker and Rhodes. A 105 mm wide × 3612 mm long horizontal (no slope) channel was used with a full-width rectangular broad-crested weir 400 mm long × 100 mm high with sharp edges. The uniformity of the flow was provided by its transmission through a coarse aggregate at the inlet. The channel bed was set horizontal and the flow rate was adjusted to 4.684 ± 0.015 l s-1. The flow downstream the weir was supercritical since there was no exit control at the end of the channel. A pointer-gauge scale was used to measure the height of the free surface above the bed level. The free surface was measured in the longitudinal centerline at intervals varying from 50 mm to 5 mm, with the highest resolution on regions of rapidly-varied flow.

Figure 3.1 – General arrangement of laboratory flume with broad-crested weir /Sarker and Rhodes, 2014/ 25

Gábor Fleit

BSc Thesis

3.2 CFD modeling 3.2.1 Computational mesh The computational mesh was generated with a software named DIVEMesh which has been being developed by the creators of REEF3D, to support it with meshing. Since the case was uniform along the width, it has been simplified to two dimensions by making the computational mesh to be one cell wide, which consequently resulted in faster convergence. The computational domain was 3000 mm long × 300 mm high. Uniform cell size of 𝑑𝑥 = 10 𝑚𝑚 was used, which resulted in a mesh consist of 8600 cells. The weir was located in the longitudinal middle of the channel.

Figure 3.2 – Computational mesh

3.2.2 Numerical setup Regarding the different numerical settings used, just a brief listing will be presented here, the detailed information on the methods and schemes are to be found in Chapter 2. REEF3D was employed for the numerical simulations which uses finite difference method for solving the flow equations. Level Set Method was used to capture the free surface of the flow, which was basically the main point of the whole case-study. In order to take account of the effect of turbulence, the k-ω turbulence model was applied. Adaptive time stepping was used with the relaxation factor of 0.1 (this factor determines the time step size based on the CFL criterion). A constant volume of flow rate was used as inflow boundary, free stream outflow for the outflow boundary and no-slip boundary for the walls. Roughness has been calibrated for the measured free surface of the physical model. Three different convection discretization schemes were applied in this case-study: QUICK, SMART and WENO.

3.3 Results The three different convection discretization schemes had been used with the same numerical setup, and gave corresponding results for the free surface. Figure 3.3 presents the calculated free surface profiles along with the measured points for comparison. The water levels were underpredicted upstream the weir (where the flow is in a subcritical state) and overpredicted right above it (where the flow is in a supercritical state), compared to the physical model results.

26

Gábor Fleit

BSc Thesis

Figure 3.3 – Calculated free surface over rectangular-crested weir

REEF3D provides satisfying, realistic solutions. The SMART method provided the best match with the experimental data, hence those results will be used for further demonstrations. Figure 3.4 presents the distribution of velocity magnitudes for the whole computational domain. These basic velocity fields are presented in order to help the understanding of the fluid mechanic phenomena appearing in the case. The velocity values are about one magnitude higher downstream the weir compared to the upstream part, which shows that in the absence of tailwater control (this is the case for the numerical model), the flow would be in supercritical state.

Figure 3.4 – Velocity distribution in the numerical channel (SMART)

Figure 3.5 presents an interesting phenomenon, located right downstream from the weir. The figure is colored based on velocity magnitudes just like the previous one, but velocity vectors are also presented to point out the hydrodynamic processes going on. A flow separation can be noticed, located under the main stream of the water tumbling over the weir. In this area there is no effective water transport in downstream direction, the particles are traveling along a circulating pathline, very similarly to the downstream regions of groins. This low velocity area also fairly contours an applicable profile of an ogee-crested weir, for this specific weir height and flow rate.

27

Gábor Fleit

BSc Thesis

Figure 3.5 – Velocity distribution with vectors downstream the weir (SMART)

These results point out the capability of REEF3D in producing high resolution velocity fields in addition to the correct reproduction of the free surface in such complex flow situations as well.

3.4 Summary A test case with a simple geometry but rather complex flow situation was investigated. Detailed measurements had been carried out to capture the longitudinal free surface profile over a rectangular crested weir by Sarker and Rhondes. The same experiment was carried out with REEF3D in order to observe the performance of the Level Set Method through a comparison. Three advanced convection discretization schemes were tested for the solution of the momentum equations, however, only slight deviations were observed among their results. All methods were able to accurately reproduce the main characteristics of the free surface profile above the weir, where the flow features showed high complexity. The detailed velocity distributions provided by the model were also presented and further analyzed.

28

Gábor Fleit

BSc Thesis

4 Flow over ogee-crested weir (Case 2) In practice, weirs are typically employed as head-discharge control structures, flow measurement structures, flow diversion structures or grade-control structures. The ogee crest weir is a very common weir type with a cross-sectional profile corresponds to the shape of the underside of a sharp-crested weir nappe. The shape of this trajectory changes with flow rate, so does the ogee crest profile. Consequently, a specific ogee crest profile is based on a design flow rate or a corresponding design head. The U.S. Bureau of Reclamation (USBR) and the U.S. Army Corps of Engineering (USACE) have developed different methods for designing ogee crest profiles based on design head and free-flow head-discharge relationships. Both ogee crest design procedures use the same weir head-discharge equation, where the discharge is a function of the total free-flow upstream head relative to the weir crest, the weir width and the free-flow discharge coefficient: 𝑄 = 𝐶𝑓 𝐿𝐻 3/2

(4.1)

However, when a weir operates in submerged condition (the tailwater exceeds the weir crest elevation), these head-discharge relationships can deviate. At high submergence levels, the upstream water level becomes a function of the tailwater level and starts rising, although the discharge remains unchanged. This effect leads to the potential for flooding upstream of a weir during large discharge events. The phenomenon is well known, there are several methods in practice to calculate these relationships under submerged conditions (Cox, 1928; Skogerboe et al. 1967; Varshney and Mohanty, 1973; USBR, 1987). The idea behind these methods is to complete or modify equation 4.1 to make it take account of the submergence (e.g. introducing 𝐶𝑠 the submerged weir discharge coefficient). Physical model experiments were carried out at the Utah Water Research Laboratory (Tullis and Neilson, 2008; Tullis, 2011) to test these methods, and relatively poor correlations were found between the predicted and experimental data. Consequently, further investigation is certainly required in the topic. The main objective of this chapter is to validate a numerical flume (with an ogee crest weir installed in it) to the physical model data, to show the relevance of CFD modeling in these kind of investigations, which could mean a much faster and cheaper alternative in such studies.

4.1 Physical model experiments Physical model experiments were carried out at the Utah Water Research Laboratory (Tullis and Neilson, 2008; Tullis, 2011) with the exact same ogee crest weir geometry (511 mm high,

29

Gábor Fleit

BSc Thesis

233.5 mm design head), however, the dimensions of the flumes (length, height, width) were slightly different. Following an overview of the experimental setup from the later paper.

Figure 4.1 – Overview of experimental setup /Tullis, 2011/

The upstream and downstream water levels were measured by a traveling point gauge with the accuracy of approximately 0.3 mm. The bed levels were changed for different experiments on both the upstream and downstream part of the flume as shown in Figure 4.2 where 𝐻0 is the design head and 𝑃 is the weir height relative to the bed.

Figure 4.2 – Summary of ogee crest weir geometries tested /Tullis and Neilson, 2008/

Both submerged and emerged cases were investigated for the sake of completion. Unfortunately, actual measured data has only been published for the emerged cases, there were only comparison ratios (𝐻𝑝𝑟𝑒𝑑𝑖𝑐𝑡𝑒𝑑 ⁄𝐻𝑒𝑥𝑝𝑒𝑟𝑖𝑚𝑒𝑛𝑡𝑎𝑙 ) presented for the submerged cases, which made it impossible to validate the model for submerged situations.

4.2 CFD modeling 4.2.1 Computational mesh The simplest geometry was chosen for the numerical modeling, the one with the highest weir crest elevation, and even bed levels on both sides (marked with red ellipse on Figure 4.2). A 2D slice model was applied for the case and in order to speed up the numerical simulations even more, a shorter numerical flume was employed, with the total length of 5 meters. The weir started at 2.00 meters from the inflow. The computational domain was 5000 mm long × 1000 mm high × 1 cell wide. Uniform grid size of 𝑑𝑥 = 20𝑚𝑚 was applied. The crest profile of the 511 mm high weir was determined using the compound curve method (USBR, 1987) with the design head of 𝐻0 = 233.5 𝑚𝑚. The computational mesh and its dimensions are presented in Figure 4.3. 30

Gábor Fleit

BSc Thesis

Figure 4.3 – Computational mesh

4.2.2 Numerical setup The numerical setup was the following: Free surface: Level Set Method Turbulence: k-ω turbulence model Time stepping: adaptive (𝐶𝐹𝐿 = 0.1) Roughness: 𝑘𝑠 = 0.001 𝑚 (in absence of data about the physical model) Convection discretization: QUICK, SMART, WENO Boundary conditions o Inflow: constant volume flow rates 𝑞𝑠𝑝𝑒𝑐 = 0.100 𝑚2 𝑠 −1 𝑞𝑠𝑝𝑒𝑐 = 0.145 𝑚2 𝑠 −1 𝑞𝑠𝑝𝑒𝑐 = 0.185 𝑚2 𝑠 −1 𝑞𝑠𝑝𝑒𝑐 = 0.223 𝑚2 𝑠 −1 𝑞𝑠𝑝𝑒𝑐 = 0.231 𝑚2 𝑠 −1 𝑞𝑠𝑝𝑒𝑐 = 0.307 𝑚2 𝑠 −1 𝑞𝑠𝑝𝑒𝑐 = 0.358 𝑚2 𝑠 −1 o Outflow: free stream outflow o Walls: slip boundary

4.3 Results Three different convection discretization schemes were employed for the momentum equations, similarly to Case 1. The measured total upstream energy heads 𝐻 ∗ (relative to the top of the weir) were used as a base for the comparisons, which was calculated as: 𝐻 ∗ = ℎ∗ + [𝑞𝑠𝑝𝑒𝑐 2⁄2𝑔 (ℎ∗ + 𝑝)2 ]

(4.2)

31

Gábor Fleit

BSc Thesis

The measured data had been digitized from a graph presented in the paper (Tullis, 2011), so there might be slight differences between the actual measured water heads and the ones used in the following comparisons. The deviation between the measurements and the results provided by the QUICK scheme were in the range of -4.02 - 1.32%, with the maximum deviation of 5 mm. For the SMART scheme the errors were between -3.20 - 2.21% (max 6 mm) and for the WENO scheme between -3.95 - 2.27% (max 7 mm). Table 4.1 and Figure 4.4 present the measured and modeled results. Table 4.1 – Comparison of the measured and modeled data

Test #

qspecific [m2s-1]

H*measured [m]

Scheme

H*REEF3D [m]

ΔH [m]

ΔH [%]

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21

0.100 0.145 0.185 0.223 0.231 0.307 0.358 0.100 0.145 0.185 0.223 0.231 0.307 0.358 0.100 0.145 0.185 0.223 0.231 0.307 0.358

0.135 0.168 0.194 0.219 0.223 0.267 0.292 0.135 0.168 0.194 0.219 0.223 0.267 0.292 0.135 0.168 0.194 0.219 0.223 0.267 0.292

QUICK QUICK QUICK QUICK QUICK QUICK QUICK SMART SMART SMART SMART SMART SMART SMART WENO WENO WENO WENO WENO WENO WENO

0.129 0.164 0.192 0.214 0.222 0.267 0.296 0.130 0.167 0.193 0.219 0.226 0.272 0.299 0.129 0.169 0.197 0.223 0.228 0.267 0.299

-0.005 -0.004 -0.003 -0.005 -0.001 0.000 0.004 -0.004 -0.002 -0.002 0.000 0.003 0.005 0.006 -0.005 0.001 0.003 0.004 0.005 0.000 0.007

-4.02% -2.32% -1.42% -2.34% -0.51% 0.07% 1.32% -3.20% -0.96% -0.91% -0.19% 1.19% 2.06% 2.21% -3.95% 0.59% 1.46% 1.73% 2.18% 0.07% 2.27%

Figure 4.4 – Comparison of the measured and modeled total energy heads 32

Gábor Fleit

BSc Thesis

4.4 Summary Flow over an ogee-crested weir was investigated by numerical modeling. Head-discharge relationships were tested for seven different discharges and were compared with physical model experiment data. The employment of the QUICK scheme for the discretization of the momentum equations provided the most accurate solutions with the maximal error of 5 mm. The numerical tests were all conducted in unsubmerged situations, where the downstream tailwater levels had no effect on the upstream head. Further physical model experiments are required for submerged cases with proper documentation, to make the numerical model validation possible. Maintaining a validated numerical model which can both treat submerged and emerged situations correctly could mean a big step forward in related research. The employment of numerical models for this case could mean a faster and cheaper alternative compared to physical models. Another advantage of CFD modeling is that beyond the calculation of the appearing water levels, it is able to produce detailed distribution of different fluid flow related variables which significantly supports the better understanding of the nature of these complex flow phenomena. It is noted that preparations for these physical model experiments are in progress at the hydraulic laboratory of the Department of Hydraulic and Environmental Engineering of the NTNU, therefore further investigations will be carried out in the near future. Based on the experimental data, the performance of three different CFD models (Star-CCM+, OpenFOAM, REEF3D) will also be tested.

33

Gábor Fleit

BSc Thesis

5 Flow over trapezoidal broad-crested weir (Case 3) Broad-crested weirs and embankment weirs are common engineering structures in irrigations systems, hydroelectric schemes, and highways. Also an application as a simple discharge measurement structure is possible. The distinctions between these is generally the end-face angle, with the embankment weir having sloped faces, and the typical broad crested weir having vertical faces, just like in Case 1. The flow of water over a trapezoidal, broad-crested, or embankment weir with upstream and downstream slopes has been investigated by Sargison and Percy with physical model experiments. The paper compares the effect of different slopes of 2H:1V, 1H:1V and vertical in various combinations on the upstream and downstream faces of the weir, on different flow rates. The surface profile has been captured, but unfortunately only the upstream and downstream water levels are presented in the paper. Longitudinal distribution of pressure has also been investigated. The numerical modeling of the exact same setup had also been carried out (Haun et al., 2011), to test the performance of two different CFD codes, Flow-3D and SSIIM 2. The deviation between the computed and measured upstream level was between 1.0% and 3.5%. They also published the calculated free surface profiles which will be compared with the results provided by REEF3D.

5.1 Physical model experiments In this section the laboratory setup and the experiments will be briefly overviewed, based on the paper from Sargison and Percy. A 5400 mm long × 400 mm high × 200 mm wide channel was used with full-width weirs. The weirs were built up from three parts: the upstream face, the downstream face and the rectangular crest. The upstream and downstream faces could be interchanged in order to produce different combinations of upstream and downstream slopes, with a constant crest length. Figure 5.1 shows the components’ dimensions and naming convection. There was no downstream level control, therefore there was always supercritical flow downstream the weir.

Figure 5.1 – Weir model component dimensions and naming convention /Sargison and Percy, 2009/ 34

Gábor Fleit

BSc Thesis

Four different weir types (ARB, BRA, VRB and BRV) were used for the physical model experiments, all four tested on three different flow rates. The ARB type of weir (just like the one on Figure 5.1) was used for the model experiments by Haun et al. Measured upstream water level h1 (relative to the top of the weir) was used for comparison with the numerical results. There was almost a perfect overlap between the free surface profiles calculated with Flow-3D and SSIIM 2. In order to get the most extensive comparison, the same setup was selected for further numerical investigation carried out by REEF3D and the free surface profiles calculated by Flow-3D and SSIIM 2 were also used as a reference.

5.2 CFD modeling 5.2.1 Computational mesh The case was again simplified to two dimensions in order to speed up the convergence of numerical simulations, so the computational grid was one cell wide. The computation domain was 5400 mm long × 500 mm high, the weir was located to start at the longitudinal coordinate of 2250 mm and ended at 3500 mm. Uniform grid size of 𝑑𝑥 = 10 𝑚𝑚 was used for the simulations, however, the effect of courser grids on the solution was investigated as well. The grid generated by DIVEMesh is presented in Figure 5.2.

Figure 5.2 – The computational mesh

5.2.2 Numerical setup The numerical setup, which provided the most accurate solutions for the cases was the following: Free surface: Level Set Method Turbulence: k-ω turbulence model Time stepping: adaptive (𝐶𝐹𝐿 = 0.1) Roughness: 𝑘𝑠 = 0.002 𝑚 (in absence of data about the physical model) Convection discretization: WENO scheme Boundary conditions o Inflow: constant volume flow rate (𝑞𝑠𝑝𝑒𝑐 = 0.0905 𝑚2 𝑠 −1 , 𝑞𝑠𝑝𝑒𝑐 = 0.0545 𝑚2 𝑠 −1 𝑎𝑛𝑑 𝑞𝑠𝑝𝑒𝑐 = 0.0275 𝑚2 𝑠 −1 ) o Outflow: free stream outflow o Walls: no-slip boundary 35

Gábor Fleit

BSc Thesis

5.3 Results Flow over a trapezoidal broad-crested weir was investigated with CFD modeling on different flow rates. The same three discharges were used for modeling with REEF3D, as was used by Haun et al. for numerical simulations employing Flow-3D and SSIIM 2. This way, not only the upstream water levels, but the whole longitudinal free surface profiles could be compared, however, it is noted that the aim of this comparison is only to see if there is significant difference between the model results. Since there is no available measured data concerning the free surface profile, all these numerical results have to be handled as theoretical results only. It also needs to be pointed out, that the numerical results for the free surface profiles provided by Flow-3D have been digitized from figures published in the paper, so their reproduction in the following figures are might not be as accurate as they actually are. Table 5.1 – Comparison of the measured and modeled upstream water levels

Test

qspecific 2 -1

h1, measured

h1, REEF3D

Δh

Δh

#

[m s ]

[m]

[m]

[m]

[%]

1 2 3

0.0905 0.0545 0.0275

0.147 0.105 0.065

0.1465 0.1067 0.0700

-0.0005 0.0017 0.0050

-0.34% 1.62% 7.69%

Table 5.1 present the results for the three different flow rates. The bigger the discharge was, the more accurate the numerical solution has become. For the biggest flow rate (𝑞𝑠𝑝𝑒𝑐 = 0.0905 𝑚2 𝑠 −1 ) the difference between the measured and the simulated upstream water levels was in the range of the measurement accuracy (±0.5 mm). On lower discharges, the deviation increased to a maximum of 5 mm. Figures 5.3 - 5.5 present the calculated longitudinal free surface profiles in comparison with the measured upstream water levels and with the reference profiles simulated by Haun et al. with Flow-3D (or SSIIM, since there was no noticeable difference in the figures where they had been digitized from).

Figure 5.3 – Calculated free surface profile at 𝑞𝑠𝑝𝑒𝑐 = 0.0275 𝑚2 𝑠 −1

36

Gábor Fleit

BSc Thesis

Figure 5.4 – Calculated free surface profile at 𝑞𝑠𝑝𝑒𝑐 = 0.0545 𝑚2 𝑠 −1

Figure 5.5 – Calculated free surface profile at 𝑞𝑠𝑝𝑒𝑐 = 0.0905 𝑚2 𝑠 −1

The longitudinal free surface profiles presented above look realistic and match fairly well the ones calculated by Flow-3D. However, it is noted again, that these are both theoretical results. In order to be able to accept these solutions as correct numerical results, detailed measured data would be needed regarding the vertical position of the free surface. The basic conclusion drawn from the figures is that the free, open-sourced REEF3D has the capability to produce accurate results, and results very similar to the ones calculated with the commercial Flow-3D or the widely used and accepted freely available SSIIM 2 as well.

5.4 Sensitivity analysis In this section, the sensitivity analysis of different numerical parameters (grid size, time step, roughness) and methods (convection discretization, turbulence modeling) will be carried out, to see how the model performs with different numerical settings. 5.4.1 Effect of grid size The effect of different grid sizes was tested with the same numerical setup, to see how coarser grids perform. Uniform grid sizes of 𝑑𝑥 = 25𝑚𝑚 and 𝑑𝑥 = 50𝑚𝑚 was used for the sensitivity analysis and results were compared to the reference setup with the grid size of 𝑑𝑥 = 10𝑚𝑚. Figure 5.6 presents the calculated longitudinal free surface profiles for the three cases and Table 5.2 shows the results for the comparison parameter h1. 37

Gábor Fleit

BSc Thesis

Figure 5.6 – Longitudinal free surface profiles with different grid sizes

On the one hand, the coarser grids provide fairly accurate results for the upstream water level (maximum deviation 1.97%), but on the other hand, as Figure 5.6 shows, the coarser meshes are not able to reproduce the water levels for the supercritical flow downstream the weir accurately, the 50 mm grid also seems to be estimating a hydraulic jump, which is incorrect according to the published paper. Table 5.2 – Results of grid sensitivity analysis

Test

qspecific

dx

h1, measured

h1, REEF3D

Δh

Δh

#

[m2s-1]

[mm]

[m]

[m]

[m]

[%]

1 2 3

0.0905 0.0905 0.0905

10 25 50

0.147 0.147 0.147

0.1465 0.1491 0.1499

-0.0005 0.0021 0.0029

-0.34% 1.43% 1.97%

5.4.2 Effect of time step size The sensitivity analysis of the time step size was carried out by using a different CFL number (𝐶𝐹𝐿 = 0.2), the double of the one used in the reference setup (𝐶𝐹𝐿 = 0.1). Since the reference setup already provided results with good accuracy (the size of the deviation was the same as the accuracy of the measurements (±0.5 mm)), the effect of even smaller time steps was not investigated. CFL numbers of 0.5, 0.4 and 0.3 was also tested, but in these cases, numerical stability issues occurred, the solutions diverged, hence there was no proper data for comparison.

Figure 5.7 – Longitudinal free surface profiles with different time step sizes 38

Gábor Fleit

BSc Thesis

The free surface profiles at Figure 5.7 show, that the solutions almost totally match each other, the solver reproduces almost the same results with the larger time step size as well. The exact, more comparable results for the upstream water level are presented in Table 5.3. Table 5.3 – Effect of time step size

Test

qspecific

CFL

h1, measured

h1, REEF3D

Δh

Δh

#

[m2s-1]

-

[m]

[m]

[m]

[%]

1

0.0905

0.10

0.147

0.1465

-0.0005

-0.34%

2

0.0905

0.20

0.147

0.1464

-0.0006

-0.41%

It is noted that the simulation with the CFL number of 0.2 also provides very accurate solution, still in the range of accuracy of the measurements. It is stated, that the model in this case is not sensitive to the time step size, however, simulations with even higher CFL numbers end up in divergence. Using a twice as big CFL number practically had no effect on the accuracy of the solution but provided twice as fast convergence, consequently it might be a more reasonable choice for present case. 5.4.3 Effect of roughness In absence of specified parameters regarding roughness of the physical model, all results were based on a wall roughness of 2 mm, which is a reasonable assumption for the laboratory flume. However, it is noted that roughness is a very important factor in CFD, and therefore a sensitivity analysis had to be conducted. Simulations were carried out with the global roughness of 1 mm and 0.1 mm, respectively.

Figure 5.8 – Longitudinal free surface profiles with different global roughness heights

As Figure 5.8 shows, the different roughness heights had no visible effect on the free surface profile, its shape and character remained the same, however, there were slight differences concerning the upstream water levels (Table 5.4).

39

Gábor Fleit

BSc Thesis

Table 5.4 – Results of roughness sensitivity analysis

Test

qspecific 2 -1

ks

h1, measured

h1, REEF3D

Δh

Δh

#

[m s ]

[mm]

[m]

[m]

[m]

[%]

1 2 3

0.0905 0.0905 0.0905

2.0 1.0 0.1

0.147 0.147 0.147

0.1465 0.1463 0.1458

-0.0005 -0.0007 -0.0012

-0.34% -0.48% -0.82%

Data presented in Table 5.4 show the expected results, the smoother the walls were the lower the water levels became. However, the deviation between the water levels are minimal, even with twenty times smoother walls. The assumption of 𝑘𝑠 = 2.0 𝑚𝑚 as global roughness seems to be a correct assumption for present case. 5.4.4 Performance of convection discretization schemes Two convection discretization schemes were tested in this test case for the solution of the momentum equations: QUICK and SMART in addition to WENO which provided the best results, thus was taken as a reference. The computational demands of the three schemes are approximately the same, so the solution time was basically the same, therefore accuracy was the primary property when choosing between the schemes.

Figure 5.9 – Longitudinal free surface profiles with different convection discretization schemes

As Figure 5.9 shows, there was almost a total overlap between the calculated free surface profiles in contrast with the results presented within Case 1, where the discretization method for the momentum equations seemed to have some effect on the results. Table 5.5 – Results with different convection discretization schemes

Test

qspecific 2 -1

Scheme

h1, measured

h1, REEF3D

Δh

Δh

#

[m s ]

-

[m]

[m]

[m]

[%]

1 2 3

0.0905 0.0905 0.0905

WENO SMART QUICK

0.147 0.147 0.147

0.1465 0.1457 0.1455

-0.0005 -0.0013 -0.0015

-0.34% -0.88% -1.02%

40

Gábor Fleit

BSc Thesis

Table 5.5 presents the results in numerical form, where a slight difference can be observed between the performances of the three schemes. The QUICK and the SMART method underestimates the water levels even more than the WENO, however, the deviation is around 1.0% which is still considered as an acceptable result. 5.4.5 Performance of turbulence models Different turbulence models might provide significantly different solutions for fluid flow problems with complex geometry, especially when sedimentation engineering related problems are also investigated. In this section, two of the many turbulence models included in REEF3D (k-ω and k-ϵ) will be tested to see if there is a deviation between the solutions for a case of simple geometry and complex fluid mechanics. The numerical and mathematical background of the models has been presented in section 2.4. Figure 5.10 presents the two free surface profiles calculated with the different turbulence models. A total overlap is observed. In the previous sections there were similar results, where there were no visible deviation between the free surface lines, but the numerical data in the tables showed some difference.

Figure 5.10 – Longitudinal free surface profiles with different turbulence models

In this case, the numerical data (Table 5.6) also shows that there were no measurable differences between the results provided by the two turbulence models. Since there were no deviation, not even in the 0.1 mm scale and the physical model data is accurate to 0.5 mm, it is stated, that there is no actual difference between the performance of these models for this case. Table 5.6 – Results with different turbulence models

Test

qspecific 2 -1

Turb.

h1, measured

h1, REEF3D

Δh

Δh

#

[m s ]

-

[m]

[m]

[m]

[%]

1 2

0.0905 0.0905

k-ω

0.147 0.147

0.1465 0.1465

-0.0005 -0.0005

-0.34% -0.34%

k-ϵ

41

Gábor Fleit

BSc Thesis

5.5 Summary Flow over a trapezoidal broad-crested weir was investigated in this case. Upstream water levels from physical model experiments were used to validate the model and results provided by different CFD models were also used for comparison. REEF3D provided accurate water levels for three different flow rates, furthermore, the calculated longitudinal free surface profiles showed fairly good matches with the ones that were provided by Flow-3D and SSIIM 2. Detailed sensitivity analysis were conducted for different CFD parameters and methods. Coarser grids also provided accurate solutions for the upstream water levels, however, the supercritical section of the flow (downstream the weir) was not reproduced correctly. The CFL number, which determines the time step size for adaptive time stepping could only been defined in a small range (below relaxation factor of 0.2), due to stability issues. In absence of data concerning the roughness of the laboratory flume, the sensitivity analysis of the global roughness height had to be conducted. Results showed, that the numerical model is not sensitive to this parameter in this particular case. Performance of three convection discretization schemes for the momentum equations and two different turbulences models was also tested, but no significant differences were observed.

42

Gábor Fleit

BSc Thesis

6 Ship-induced waves (Case 4) Fluid flow problems related to different types of waves and their effects are very common in the different fields of hydrosciences. Engineers working in the field of marine civil engineering often have to deal with wave forces, since it has to be treated as a serious effect when designing different marine structures. Proper treatment of wind-induced waves in lacustrine conditions is also very important when designing piers, docks or shore protection works. Last but not least, several problems related to ship-induced waves in fluvial situations have been realized in the past years as well, so researches related to this topic are up-to-date and essential. Hydraulic effects of ship-induced waves have been investigated by field measurements in a Hungarian section of the Danube (Fleit, 2014). The aim of the study was to quantify the nearbed effects of ship induced waves in the littoral zone of the river. Local increase of the bottom shear stress has serious impact on the juvenile fish and macroinvertebrates living in the river bed. Increased shear stress can detach individuals from their natural habitats, which is lethal in most of the cases. Foreign studies show that the ecological aspect of the problem is manageable, however, the hydraulic point of view has not yet been revealed in detail. It is noted that apart from the ecological aspect, there are several other problems present related to ship induced waves, for example bank erosion. REEF3D was recently successfully used for solving wave related problems in the field of marine civil engineering (Kamath, 2012; Afzal, 2013; Chella et al., 2015), so the applicability of the model for wave generation and calculation of the related flow parameters has already been proven. In this section an approach will be taken to reproduce field data collected with up-to-date measuring/post-processing methods, in order to test the code from this different aspect. The geometry and the fluid flow situation will be significantly simplified, the aim of the following test is to see if it is possible to treat these kind of problems with numerical modeling. However, the effect of several different ship types (barge, hydrofoil, motorboat, hotel ship) had been investigated in the field, in this section only a short section (~15 sec) of a measurement (with fairly uniform conditions) will be further analyzed with numerical modeling. The reason of this simplification is that in longer terms, the complexity of the fluid flow parameters are rapidly escalating, hence the numerical treatment of the case might not be feasible. Methods will be presented and numerical results meeting the characteristics and magnitude of the measured data will be accepted. Operating a model with such capability would mean a massive step forward and would also raise series of interesting research topics in this field. 43

Gábor Fleit

BSc Thesis

6.1 Field measurements and data processing Field measurements were carried out in the littoral zone of the Danube to investigate the effects of ship-induced waves close to the river bed. The measurement site located between the zone of two groins, hence the measured flow velocities were almost entirely induced by the waves, the background flow of the river was negligible there. Three synchronized Acoustic Doppler Velocimeters (ADV) were employed along with a pressure gauge. The ADVs were stood up in a line perpendicular to the bank with increasing water depths, whereas the sampling volumes of each device were set right above the bed. The velocity data series (16Hz) have been moving averaged with the windows size of 11, to eliminate the effect of turbulent fluctuations. In order to ensure that the averaging does not remove any important characteristics of the data series, spectral analysis has been carried out. The flow directions and velocity magnitude distributions were investigated, and presented in figures similar to a wind rose:

Figure 6.1 – Horizontal distribution of near-bed velocity vectors

Figure 6.1 presents the horizontal distribution of velocity vectors for the chosen case, however, this figure is based on the whole (~15 min) measurement, not only on the short part that will be tested here for numerical modeling. The aim of presenting this figure is to demonstrate the complexity of velocity distributions appearing due to ship induced waves in natural circumstances. For the numerical investigation of the case, a two-dimensional slice model was employed, so the results will only be compared with the measured velocity components along the West-East axis. An action camera (GoPro Hero) was also employed for the wave measurements. The camera was fixed on a stand approximately 2.5 m above the water level and was set to record the surroundings of the bank (±2 m) in order to capture the approaching and breaking waves. The 44

Gábor Fleit

BSc Thesis

videos were later analyzed with Large Scale Particle Image Velocimetry (LSPIV) which was originally developed for quick flow rate estimations. The idea behind this novel application of the LSPIV was that in cases where the waves are breaking, the appearing foam and bubbles could mean suitable formations for the PIV algorithm to follow, so the surface velocity distribution of this very dynamic phenomena could be quantified. Figure 6.2 presents the calculated wave velocity distributions for the selected short section, to demonstrate the applicability of LSPIV for the breaking wave case. The following results later will be compared with numerical data provided by REEF3D.

Figure 6.2 – Surface velocity fields calculated with LSPIV 45

Gábor Fleit

BSc Thesis

Using the near-bed velocity data series provided by the ADV measurements, estimations has been made on the bed shear stress. The bed shear stress due to waves is proportional to the second power of the maximum orbital velocity at the bed (Jonsson, 1966): 1 𝜏𝑏𝑤 = 𝜌𝑓𝑤 𝑈𝑤 2 2

(6.1)

where 𝑓𝑤 is the wave friction factor (Pleskachevsky, 2005) calculated as 𝜈 𝑓𝑤 = 2√ 𝑈𝑤 𝐴

(6.2)

and 𝐴 is the semi-orbital excursion determined as 𝐴=

𝑈𝑤 𝑇 2𝜋

(6.3)

The maximal bed shear stress values have been evaluated for the three ADVs using the chosen data series, to see how the stress changes in different distances from the shoreline (under different water levels). The calculated results are presented in Figure 6.3.

Figure 6.3 – Calculated shear stress values at different distances from the bank

The increase of bed shear stress is observed towards the river bank, the shallower the water is the higher the bed shear stress will be. This flow variable is directly responsible for detaching individual creatures from the substrate, which eventually could lead to the degradation of biodiversity in the littoral zone of rivers, therefore its correct evaluation is very important when dealing with the ecohydraulic aspects of ship-induced waves.

6.2 CFD modeling 6.2.1 Computational mesh The computational domain was 10.0 m long × 1.6 m high and one cell wide. Uniform cell size of 𝑑𝑥 = 10 𝑚𝑚 was used with quadrat cells. The topology of the bed was simplified and built up from two different slopes (1: 6.66̇ and 1: 10). The water levels at the point of the ADV 46

Gábor Fleit

BSc Thesis

devices from the field measurements were used to build up the geometry and to adjust the still water level. The ADV device in the deepest water was ~5.8 m far from the bank (here was the pressure gauge as well), so the domain was further extended by 3.2 m in the direction of the thalweg and also with 1.0 m in the direction of the bank. Figure 6.4 presents the computational domain with the geometry and the still water level, which was set as the initial condition for the simulations.

Figure 6.4 – The computational domain (with the initial condition)

6.2.2 Numerical setup Several different wave theories can be used as an input for the numerical wave tank in REEF3D. It is important to check beforehand whether the selected theory fits the given wave conditions consisting of wave height, wave length/period and still water level. Data series collected with the pressure gauge were used for parametrizing the model, with the assumption of a hydrostatical pressure state at the position of the gauge. A wave amplitude of 𝐴 = 3.0 𝑐𝑚 and a wave period of 𝑇 = 2.3 𝑠𝑒𝑐 was used as a boundary condition for generating intermediate waves. Figure 6.5 presents the measured and modeled water heights in the location of pressure gauge (5.8 m from the bank).

Figure 6.5 – Measured and modeled (defined as boundary condition in the CFD model) water height series

Apart from the boundary conditions, the numerical setup was fairly similar to the ones used in the previous cases: Free surface: Level Set Method Turbulence: k-ω turbulence model Time stepping: adaptive (𝐶𝐹𝐿 = 0.1) Roughness: 𝑘𝑠 = 0.01 𝑚 47

Gábor Fleit

BSc Thesis

Convection discretization: WENO scheme Boundary conditions o Inflow: intermediate wave generation (𝑇 = 2.3𝑠𝑒𝑐 , 𝐴 = 3.0 𝑐𝑚) o Outflow: no outflow boundary conditions, relaxation zone for the numerical beach is not employed, the water volume won’t leave the domain, it stays on the bank o Walls: no-slip boundary

6.3 Results 6.3.1 Near-bed velocities (comparison with ADV) In order to compare the near-bed velocity series measured by the ADV to the modeled data, three point probes has been placed in the model. The probes were located 1.8 m, 3.8 m and 5.8 m from the shore and were also set to sample the cells right above the bed, just like the ADVs during the field measurements. As Figure 6.5 presented, the hydraulic properties chosen for wave generation at the inflow boundary were mostly correct compared to the measured data. However, the aim of the original study was to investigate the flow situations on the river bed, so the comparison of the measured and modeled velocity series is an appropriate way of validating the model. Figures 6.6 - 6.8 present this kind of comparison, for the three sampling points.

Figure 6.6 – Measured and modeled near-bed velocity series (5.8 m from the bank)

Figure 6.7 – Measured and modeled near-bed velocity series (3.8 m from the bank) 48

Gábor Fleit

BSc Thesis

Figure 6.8 – Measured and modeled near-bed velocity series (1.8 m from the bank)

The results presented above show that the model is able to reproduce the oscillating nature of velocities under waves. The magnitudes of the velocities are also correctly represented and although relatively high deviations are observed, the results are considered acceptable. It is noted that real fluid flow problem which is represented by the measured data is more complex than the modeled situation (Figure 6.1), therefore perfectly accurate match cannot be expected. REEF3D successfully reproduced the main characteristics of the near-bed velocities caused by ship induced waves, which is considered promising, and also provides numerous questions and topics for further investigations. Further simulations were conducted with the same numerical setup, but with halved (𝑑𝑥 = 0.5 𝑐𝑚) and doubled (𝑑𝑥 = 2.0 𝑐𝑚) cell sizes, in order to examine the effect of grid size resolution. Figures 6.9 to 6.11 present the results for this sensitivity analysis.

Figure 6.9 – Result of sensitivity analysis for grid resolution (5.8 m from the bank)

Figure 6.10 – Result of sensitivity analysis for grid resolution (3.8 m from the bank) 49

Gábor Fleit

BSc Thesis

Figure 6.11 – Result of sensitivity analysis for grid resolution (1.8 m from the bank)

The deeper the water is, the more sensitive the solution becomes for the grid resolution. A total match of the three velocity time series is observed on Figure 6.9 which is for the probe 5.8 m from the bank. For the probe 3.8 m from the bank (Figure 6.10) slight deviations are noted. The amplitude of the velocity time series are very similar, however, minor phase shift can be noticed. Figure 6.11 presents the results of the sensitivity analysis for the probe which was the closest to the bank (1.8 m). Noticeable differences can be observed in the amplitudes of the velocity series, the finer the grid was, the smaller the velocities became. Moreover, with the finer grids employed, the series lose their smoothness, slight disturbance is observed. This can be explained as following: when the wave crests reach the bank (they in fact break before it) the water starts flowing back from the bank in the direction of the thalweg. This is a classic wetting-drying problem, which is increasingly better resolved due to finer grids. The more and smaller cells make the numerical treatment of the phenomenon smoother, smaller water volume stays on the bank, because the critical water level for the drying criterion becomes smaller with the cell size. This way, a larger volume of water heads back in the direction of the river, it gains more speed, therefore it has stronger effect on the next approaching wave, so on a bigger part of the whole domain as well. 6.3.2 Surface velocities (comparison with LSPIV) Despite the serious simplifications made, the numerical results presented in the previous section fairly met the nature and magnitude of the actual measured data, thus the model is now considered validated. Since there had been no opportunity to check the accuracy of the results obtained with LSPIV beforehand, a comparison was conducted with the numerical results provided by REEF3D. In contrast with the LSPIV, where the two dimensional horizontal velocity distributions are calculated, the numerical results were computed in a 2D model with the width of 1 cell size (10 mm). This means that for appropriate visualization, the numerical results presented in plan view have to be stretched in order to make the results visible and the comparison possible. It is noted, that in this way every horizontal line in the 50

Gábor Fleit

BSc Thesis

figures (REEF3D) equals one cell in the actual numerical results. Figure 6.12 presents the compared results between the LSPIV and REEF3D (the boxes containing the pictures and the LSPIV results are approximately 2.0 m high × 1.5 m wide each).

51

Gábor Fleit

BSc Thesis

52

Gábor Fleit

BSc Thesis

Figure 6.12 – Comparison of the surface velocities calculated with LSPIV and REEF3D

Fairly good match is observed between the two methods for investigating breaking shipinduced waves. Both LSPIV and REEF3D provides maximal surface velocities for the breaking waves in the range of 1.5 - 2.0 ms-1. The same approaching speed of the waves is observed in the figures. It is noted that the LSPIV method is not able to distinguish the wetted and dried areas, therefore it gives zero velocities for the dried parts as well. The comparison also proves the applicability of LSPIV for the investigation of breaking wave characteristics, however, it is clear, that further development and research is required in this special kind of field application of the method. 6.3.3 Bottom shear stress Regarding the detachment of different macroscale creatures from the river bed (which was the original topic of the referred study), the bottom shear stress is the most relevant flow variable. This parameter was estimated based on high frequency ADV velocity series (the Jonsson method is presented in section 6.1). It is noted that calculations regarding the bed shear stress always implies uncertainty, because there is no direct measurement method, therefore the calculated values cannot be validated. Bed shear stress was calculated from the model results at the same point where the ADVs were located. The value of the turbulent kinetic energy (TKE) 𝑘 in the cells right above the bed was used for the evaluation of the shear stress. In these cells, the k-ω turbulence model calculates the value of the TKE from the shear forces appearing on the bed surface. The following formula was used for calculating the bottom shear stress from the TKE: |𝜏𝑏 | = 𝐶1 𝜌𝑘

(6.4)

where the coefficient 𝐶1 = 0.19. Since the TKE is calculated from the shear forces appearing on the bed surface, it is presumable that it might be sensitive to the global roughness of the bed. In order to reveal this 53

Gábor Fleit

BSc Thesis

property of the parameter, two more simulations were run with the same numerical setup as before, but with halved (𝑘𝑠 = 0.5 𝑐𝑚) and doubled (𝑘𝑠 = 2.0 𝑐𝑚) roughness heights. Table 6.1 and Figure 6.13 present the results for the sensitivity analysis. Table 6.1 – Result for the sensitivity analysis

Distance from bank [m] 1.80 3.80 5.80

ADV 0.383 0.254 0.232

Bed shear stress [Nm-2] REEF3D ks = 0.5 cm ks = 1.0 cm 0.409 0.607 0.080 0.120 0.036 0.050

ks = 2.0 cm 0.980 0.199 0.086

Figure 6.13 – Calculated (based on ADV measurements) and modeled bottom shear stress

The maximal turbulent kinetic energies and consequently the bed shear stresses were found very sensitive to roughness, however, the magnitude of values for the latter were correct which is promising considering the complexity of the case, and the uncertainty around this parameter at all. The results call for the sampling and laboratory examination of the substrate composition found on the study sites in the future, so the numerical model can be parametrized more precisely for the actual case. 6.3.4 Breaking waves Wave height is limited by both depth and wavelength. For a given water depth and wave period, there is a maximum height limit above which the wave becomes unstable and breaks. This upper limit of wave height, called breaking wave height, is a function of the wavelength in deep water. In shallow and transitional water it is a function of both depth and wavelength. Wave breaking is a complex phenomenon and it is one of the areas in wave mechanics that has been investigated extensively both experimentally and numerically (USACE, 2002). There are four basic types of breaking water waves: spilling, plunging collapsing and surging (Figure 6.14). 54

Gábor Fleit

BSc Thesis

Figure 6.14 – Breaking wave types /FHWA, 2008/

The type of wave breaking is determined by the Iribarren number, which is a function of the slope of the shoreline and the wave steepness: 𝜉=

tan 𝛼 √𝐻 ⁄𝐿0

(6.5)

The categorization based on the Iribarren number is the following: 𝑠𝑝𝑖𝑙𝑙𝑖𝑛𝑔

𝑖𝑓

𝜉 < 0.5

𝑝𝑙𝑢𝑛𝑔𝑖𝑛𝑔

𝑖𝑓

0.5 < 𝜉 < 3.0

𝑐𝑜𝑙𝑙𝑎𝑝𝑠𝑖𝑛𝑔

𝑖𝑓

𝜉 = 3.0

𝑠𝑢𝑟𝑔𝑖𝑛𝑔

𝑖𝑓

𝜉 > 3.0

During the field measurements breaking waves were observed, in fact the appearing foam made it able to investigate the phenomenon via LSPIV. Therefore, it is expected that the numerical results also reproduce these characteristics. Based on the criteria above which is a function of wave parameters and geometry, plunging breakers are expected for present case. Figure 6.15 presents the breaking (plunging) of a wave for the test case modeled via REEF3D.

55

Gábor Fleit

BSc Thesis

Figure 6.15 – Breaking of approaching waves modeled with REEF3D

The numerical results match the characteristics of plunging breakers presented in Figure 6.11. The water phase has been colored based on the horizontal velocity component, red is for the direction towards the bank, blue is towards the thalweg. Results presented before showed that the model is capable to reproduce the complex flow velocity distributions both on the surface and on the bottom, nevertheless the complex, detailed free surface situation presented in Figure 6.15 emphasizes the relevance of the Level Set Method in the numerical modeling of multiphase flows.

6.4 Summary A brief introspection was given for a more advanced level application of the LSM. The effect of ship-induced waves was investigated in the Danube by up-to-date field measurement/postprocessing methods (ADV, LSPIV), complex flow features were observed. A significantly simplified 2D model was set up for the numerical investigation of the appearing phenomena. The numerical model was able to reproduce the nature and magnitude of the velocity series measured right above the river bed and on the surface as well. Sensitivity analysis of the gird resolution was conducted (doubled and halved cell size) and it was found, that the finer grids provide more detailed and complex velocity series for areas close to the bank, however, no deviation was observed on the results for the farthest probe. The maximal bed shear stress – which is a very important factor when considering the ecosystem of the littoral zone or bank erosion – was estimated based on the ADV measurements, and were compared with the numerical results. It was found that the parameter is very sensitive to the bed roughness, therefore in the future detailed information (grain size

56

Gábor Fleit

BSc Thesis

distribution) is required about the substrate so the bed roughness can be set properly for the numerical simulations. The breaking of waves were categorized as plunging breakers and were realistically reproduced by the model, which proves the relevance of the LSM compared to other free surface calculating methods, such as the VOF. The results presented in this case rise several interesting questions in this field of hydraulic engineering. Further investigations will be carried out via REEF3D to find out more about ship-induced waves, and breaking wave characteristics in riverine conditions, and their effect on the ecosystem and the structure of the bank. The numerical modeling of moving objects in the water is already in test phase in REEF3D, wherewith the effect of different ship related parameters (size, shape, speed etc.) on the flow and wave characteristics could be investigated as well.

57

Gábor Fleit

BSc Thesis

7 Conclusions and outlook A freely accessible, open-sourced CFD model (REEF3D) with up-to-date numerical methods was introduced and successfully tested through four sample applications. In the first three test cases, flow over different types of weirs were simulated with the model. It is noted that even with the simplest weir geometry (rectangular broad-rested), the correct numerical reproduction of the flow problem, especially the free surface profile is not trivial at all. The models for these cases were built up based on laboratory scale physical models, so that the numerical results could be compared with accurate measurements. The Level Set Method, which is employed in REEF3D for calculating the free surface between the phases (two or even three) provided accurate water levels and longitudinal free surface profiles for the test cases. Detailed sensitivity analysis was conducted for Case 3, in order to investigate the effect of different numerical methods and parameters. High order convection discretization schemes were employed for the solution of the momentum equations, therefore the models were found to be sensitive to the time-step size – which is adaptive and controlled by the CFL criterion. When the time-step size was satisfactory to ensure stability, the tested schemes (QUICK, SMART, WENO) provided accurate solutions. Case 3 was found not to be sensitive for the gird resolution, however, regarding the other cases it was a very important parameter, fine grids (10 mm) were required for acceptable accuracy. Two RAS turbulence models were also tested for the case (k-ω and k-ϵ), but there was no noticeable deviation between the final results. The last case was quite different from the first ones. The effect of ship induced waves were investigated with REEF3D, based on data gathered by up-to-date field measurements/postprocessing methods (ADV, LSPIV). Pressure gauge measurements were used for setting wave generation as boundary condition. The case was simplified to 2D, however, it was pointed out that this actual case is rather a 3D flow problem. Consequently, perfect reproduction of the field data could not be expected. Nevertheless, REEF3D was able to reproduce the nature and magnitude of the near-bed velocity time series measured with the ADVs. Sensitivity analysis was conducted for grid resolution (doubled and halved cell size), and the velocity series were found to be sensitive to that. The courser grid provided smoother solutions, which is reasonable since the use of larger cells result in larger spatial averaging, and so the smaller scale flow patterns cannot be reproduced. This effect decreases in the direction of the thalweg (in increasingly deeper waters).

58

Gábor Fleit

BSc Thesis

Surface velocity fields had been calculated via LSPIV and although the results were considered realistic, the reliability of those results was not evident. Surface velocities calculated by REEF3D were used for comparing the results and fairly good match was observed. Results provided by the two methods had the same characteristics, and not only the velocity values showed good match, but the whole nature of the approaching waves was similar. These results emphasize the feasibility of LSPIV based methods in the investigation of breaking waves, which is quite far from its original field of employment (discharge estimation). Bottom shear stress estimations has also been made based on the numerical results, since it is one of the most important flow parameter when investigating the ecological effect of waves. The increase of shear stress on the river bed can detach macro scaled animals from the substrate, which is lethal in most of the cases, consequently leads to the degradation of biodiversity in the littoral zone. Numerical results for this parameter were also compared with the measurements (calculations) and despite that the magnitude of the results were correct, it was found that the shear stress calculated with the model is very sensitive to roughness of the river bed. The model also provided realistic and stable solutions for the breaking of the approaching waves, by the Level Set Method. Based on the theoretical classification of breaking waves, the ones observed in the investigated case are considered plunging breakers, the characteristics of which matched the numerical solution as well. Despite the complexity of the numerical methods included in the model and the fact that it is still under continuous development, REEF3D was found to be robust and fairly stable, therefore its applicability for simpler cases is reasonable. However, its employment is restricted by the meshing options. REEF3D only works with Cartesian grids consisting uniform sized cells and however, the Ghost Cell Immersed Boundary Method allows the use of complex geometries, the employment of the model in natural conditions with complex bathymetry might still be problematic. Nevertheless, REEF3D performs very well when it comes to reproducing laboratory measurements with simple geometry, even under very complex fluid mechanical conditions. Considering the fact that in most of the cases the physical model experiments are more time and cost demanding than CFD, REEF3D could provide a reasonable option to ransom them for the solution of some of these tasks. It is also noted, that physical model experiments often limited by the pumping capacity of the actual hydraulic laboratory, which restriction does not occur in CFD.

59

Gábor Fleit

BSc Thesis

The model could also be used parallel with physical modelling, so it could help researchers understand the effects of scaling on the different forces a bit more. However, there are many laws and rules about the different effects of scaling (Reynolds, Froude), still there are several uncertainties about some of the influential forces. Problems related to sedimentation engineering might be the most problematic area from the aspect of physical modeling, which could be further investigated by the support of CFD modeling. (It is noted, that REEF3D contains sediment transportation module as well.) CFD can be employed to support field measurements as well. Field measuring campaigns are often restricted by time (daylight), however, if it is possible to gather enough data for setting up a proper 3D numerical model for the investigation site, flow patterns and features can later be further investigated. In total, it can be stated that CFD in general, and this particular model (REEF3D) could provide great support for both physical modeling and field measurements, even the joint use of the three methods is conceivable. In fact when very accurate and reliable data is required, this would probably be the best choice. Employing different hydraulic engineering methods in parallel for the solution of the very same flow problem is also a good research topic, it is very important to be aware of the limits of the different methods, and to investigate their performance under various conditions. Speaking on behalf of myself, I found REEF3D to be an excellent tool for the solution of hydraulic engineering related problems and there is still a lot of potential in the model, waiting to be released. The effect of ship-induced waves will be further investigated in my future studies by the employment of the numerical wave tank. Moreover, a six degrees of freedom (6DOF) algorithm is already included in the code (testing phase) which could provide with a more direct way of investigation of the phenomena and also would make it possible to examine the effect of different ship related parameters (speed, draught, shape etc.) on the wave characteristics and their effect on the littoral zone as well.

60

Gábor Fleit

BSc Thesis

Bibliography 1. Afzal M. S. (2013): 3D Numerical Modeling of Sediment Transport under Current and Waves. Master’s Thesis, Norwegian University of Science and Technology 2. Berthelsen P. A., Faltinsen O. M. (2008): A local directional ghost cell approach for incompressible viscous flow problems with irregular boundaries. Journal of Computational Physics, 227:4354-4397. 3. Bihs H. (2015a): REEF3D :: User Guide v15.04 4. Bihs H. (2015b): DIVEMesh :: User Guide v15.04 5. Chella M. A., Bihs H., Myrhaug D., Muskulus M. (2015): Breaking characteristics and geometric properties of spilling breakers over slopes. Coastal Engineering 95 (2015) 4-19 6. Chorin A. (1968): Numerical solution of the Navier Stokes equations. Math. Comp., 22:745762. 7. Clauss G. F., Schmittner G. E., Stück R. (2005): Numerical wave tank simulation of extreme waves for the investigation of structural responses. In Proc., 24th International Conference on Offshore Mechanics and Arctic Engineering, Greece, 2005. 8. Courant R., Isaacson E., Rees M. (1952): One the solution of nonlinear hyperbolic differential equations by finite differences. Comm. Pure Appl. Math, (5):243-255. 9. Cox G. N. (1928): The submerged weir as a measuring device. Bulletion of the University of Wisconsin, Engineering Experiment Station Series No. 67, Univ. of Wisconsin, Madison, Wis. 10. Federal Highway Administration (2008): Highways in the Coastal Environment, Hydraulic Engineering Circular No. 25 (2nd ed.) 11. Fleit G. (2014): Field investigation of ship induced waves in the littoral zone. Budapest 12. Fletcher R. (1976): Conjugate gradient methods for indefinite systems. In G. Watrson, editor, Numerical Analysis, volume 506 of Lecture Notes in Mathematics, pages 73-89. Springer Berlin Heidelberg. 13. Gaskell P. H. and Lau A. K. C. (1988): Curvature-compensated convective transport: SMART, a new boundedness-preserving transport algorithm. International Journal for Numerical Methods in Fluids, 8:617-641. 14. Grilli S. T., Horrillo J. (1997): Numerical generation and absorption of fully non-linear periodic waves. Journal of Engineering Mechanics, 123(10):1060-1069. 15. Hairer E. (1993): Solving ordinary differential equations. Springer-Verlag, Berlin New York. 16. Harlow F., Welch J. (1965): Numerical calculation of time dependent viscous incompressible flow of fluid with a free surface. Physics of Fluids, 8:2182-2189. 17. Haun S., Olsen N. R. B., Feurich R. (2011): Numerical Modeling of Flow Oever Trapezoidal Broad-Crested Weir. Engineering Applications of Computational Fluid Mechanics Vol. 5, No. 3, pp. 397-405

61

Gábor Fleit

BSc Thesis

18. Hestenes M., Stiefel E. (1952): Methods of conjugate gradients for solving linear systems. The Journal of Research of the National Institute of Standards and Technology, 49:409. 19. Hirt C. and Nichols B. (1981): Volume of fluid (VOF) method for the dynamics of free boundaries. Journal of Computational Physics, 39:201-225. 20. Jacobsen N. G., Fuhrman D. R., Fredsøe J. (2011): A wave generation toolbox for opensource CFD library: OpenFOAM. International Journal for Numerical Methods in Fluids. 21. Jonsson IG (1966): Wave boundary layers and frictions factors. Proceedings of the 10th International Conference on Coastal Engineering, Tokyo, Japan, ASCE, pp 127-148 22. Kamath A. M. (2012): Calculation of Wave Forces on Structures using REEF3D. Master’s Thesis, Norwegian University of Science and Technology 23. Launder B., Sharma B. (1974): Application of the energy-dissipation model of turbulence to the calculation of flow near a spinning disc. Letters in Heat and Mass Transfer, 1(2):131-137. 24. Leonard B. (1979): A stable and accurate convective modelling procedure based on quadratic upstream interpolation. Computer Methods in Applied Mechanics and Engineering, 19(1):5998. 25. Liu X. D., Osher S., Chan T. (1994): Weighted essentially non-oscillatory schemes. Journal of Computational Physics, 115:200-212. 26. Olsen N. R. B. (2014): A three-dimensional numerical model for simulation of sediment movements in water intakes with multiblock option. – User’s Manual 27. OpenFOAM Foundation (2014): OpenFOAM – The Open Source CFD Toolbox – User Guide (Version 2.3.1.) 28. Osher S. and Sethian J. A. (1988): Fronts propagating with curvature-dependent speed: Algorithms based on Hamilton-Jacobi formulations. Journal of Computational Physics, 79:1249. 29. Pedersen Ø. (2012): 3D Numerical Modelling of Hydropeaking Scenarios in Norwegian Regulated Rivers. Master’s Thesis, Norwegian University of Science and Technology 30. Peng D., Merriman B., Osher S., Zhao H., Kang M.: A PDE-based fast loval level set method. Journal of Computational Physicsi, 155:410-438. 31. Pleskachevsky A., Gayer G., Horstmann J., Rosenthal W. (2005): Synergy of satellite remote sensing and numerical modeling for monitoring of suspended particulate matter. Ocean Dynamics 55(1):2-9 32. Reynolds O. (1895): On the Dynamical Theory of Incompressible Viscous Fluids and the Determination of the Criterion. Philosophical Transactions of the Royal Society of London. A, v. 186, pp. 123-164 33. Sargison J. E., Percy A. (2009): Hydraulics of Broad-Crested Weirs with Varying Side Slopes. Journal of Irrigation and Drainage Engineering January/February 2009, DOI: 10.1061/(ASCE)0733-9437(2009)135:1(115) 62

Gábor Fleit

BSc Thesis

34. Sarker M.A., Rhodes D.G. (2004): Calculation of free-surface profile over a rectangular broad-crested weir. Flow Measurement and Instrumentation 15 (2004) 215-219. 35. Schlichting H. (1979): Boundary layer theory. McGraw-Hill Book Company. 36. Shu C. W. and Gottlieb S. (1998): Total variation diminishing Runge-Kutta schemes. Mathematics of Computation, 67:73-85. 37. Skogerboe G. V, Hyatt M. L. and Austin L. H. (1967): Design and calibration of submerged open channel flow measurement structures Part 4: Weirs. Utah Water Research Laboratory Rep. No. WG31-5, Utah State Univ., Salt Lake City, Utah. 38. Sussman M., Smereka P., Osher S. (1994): A level set approach for computing solutions to incompressible two-phase flow. Journal of Computational Physics, 114:146-159. 39. Tullis B. P., M.ASCE (2011): Behavior of Submerged Ogee Crest Weir Discharge Coefficients. Journal of Irrigation and Drainage Engineering 2011.137:677-681, DOI: 10.1061/(ASCE)IR.1943-4774.0000330. 40. Tullis B. P., M.ASCE, Neilson J. (2008): Performance of Submerged Ogee-Crest Weir HeadDischarge Relationships. Journal of Hydraulic Engineering 2008.134:486-491., DOI: 10.1061/(ASCE)0733-9429(2008)134:4(486) 41. U.S. Army Corps of Engineers (2002): Coastal Engineering Manual – Part II, Chapter 1 – Water Waves Mechanics. EM 1110-2-1100 (Part II) 42. U.S. Bureau of Reclamation (USBR) (1987): Design of small dams. U.S. Government Printing Office, Washington, D.C. 43. van der Vorst H. (1992): BI-GStab: A fast and smoothly converging variant of BI-CF for solution of nonsymmetric linear systems. SIAM J. Sci. Stat. Comput., 13:631-644. 44. Varshney R. S. and Mohanty S. K. (1973): Discharge relations for submerged weirs. Indian J. of Power & River Valley Development, 23(7), 225-228 45. Wilcox D.C. (1994): Turbulence Modeling for CFD. DCW Industries Inc., La Canada, California.

63

Suggest Documents