<<

Dynamics: Theory and Computation

Dan S. Henningson Martin Berggren

August 24, 2005 2 Contents

1 Derivation of the Navier-Stokes equations 7 1.1 Notation ...... 7 1.2 Kinematics ...... 8 1.3 Reynolds transport theorem ...... 14 1.4 equation ...... 15 1.5 Energy equation ...... 19 1.6 Navier-Stokes equations ...... 20 1.7 Incompressible Navier-Stokes equations ...... 22 1.8 Role of the in incompressible flow ...... 24

2 Flow physics 29 2.1 Exact solutions ...... 29 2.2 and streamfunction ...... 32 2.3 Potential flow ...... 40 2.4 Boundary layers ...... 48 2.5 Turbulent flow ...... 54

3 Finite volume methods for incompressible flow 59 3.1 Finite Volume method on arbitrary grids ...... 59 3.2 Finite-volume discretizations of 2D NS ...... 62 3.3 Summary of the equations ...... 65 3.4 Time dependent flows ...... 66 3.5 General iteration methods for steady flows ...... 69

4 Finite element methods for incompressible flow 71 4.1 FEM for an advection–diffusion problem ...... 71 4.1.1 Finite element approximation ...... 72 4.1.2 The algebraic problem. Assembly...... 73 4.1.3 An example ...... 74 4.1.4 Matrix properties and solvability ...... 76 4.1.5 Stability and accuracy ...... 76 4.1.6 Alternative Elements, 3D ...... 80 4.2 FEM for Navier–Stokes ...... 82 4.2.1 A variational form of the Navier–Stokes equations ...... 83 4.2.2 Finite-element approximations ...... 85 4.2.3 The algebraic problem in 2D ...... 85 4.2.4 Stability ...... 86 4.2.5 The LBB condition ...... 87 4.2.6 Mass conservation ...... 88 4.2.7 Choice of finite elements. Accuracy ...... 88

A Background material 95 A.1 Iterative solutions to linear systems ...... 95 A.2 Cartesian tensor notation ...... 98 A.2.1 Orthogonal transformation ...... 98 A.2.2 Cartesian Tensors ...... 99 A.2.3 Permutation tensor ...... 100 A.2.4 Inner products, crossproducts and determinants ...... 100 A.2.5 Second rank tensors ...... 101

3 4 CONTENTS

A.2.6 Tensor fields ...... 102 A.2.7 Gauss & Stokes integral theorems ...... 103 A.2.8 Archimedes principle ...... 104 A.3 Curvilinear coordinates ...... 106

B Recitations 5C1214 109 B.1 Tensors and invariants ...... 109 B.2 Euler and Lagrange coordinates ...... 113 B.3 Reynolds transport theorem and tensor ...... 117 B.4 Rankine and dimensionless form ...... 120 B.5 Exact solutions to Navier-Stokes ...... 124 B.6 More exact solutions to Navier-Stokes ...... 129 B.7 Axisymmetric flow and irrotational vortices ...... 132 B.8 Vorticity equation, Bernoulli equation and streamfunction ...... 136 B.9 Flow around a submarine and other potential flow problems ...... 140 B.10 More potential flow ...... 146 B.11 Boundary layers ...... 148 B.12 More boundary layers ...... 152 B.13 Introduction to ...... 155 B.14 Old Exams ...... 157

C Study questions 5C1212 173 CONTENTS 5

Preface

These lecture notes has evolved from a CFD course (5C1212) and a course (5C1214) at the department of Mechanics and the department of Numerical Analysis and Computer Science (NADA) at KTH. Erik St˚alberg and Ori Levin has typed most of the LATEXformulas and has created the electronic versions of most figures.

Stockholm, August 2004 Dan Henningson Martin Berggren

In the latest version of the lecture notes study questions for the CFD course 5C1212 and recitation material for the Fluid Mechanics course 5C1214 has been added.

Stockholm, August 2005 Dan Henningson 6 CONTENTS Chapter 1

Derivation of the Navier-Stokes equations

1.1 Notation

The Navier-Stokes equations in vector notation has the following form

∂u 1 + (u ) u = p + ν 2u ∂t · ∇ −ρ∇ ∇   u = 0 ∇ · where the velocity components are defined

u = (u, v, w) = (u1, u2, u3)

the nabla operator is defined as

∂ ∂ ∂ ∂ ∂ ∂ = , , = , , ∇ ∂x ∂y ∂z ∂x ∂x ∂x    1 2 3  the is written as

∂2 ∂2 ∂2 2 = + + ∇ ∂x2 ∂y2 ∂z2 and the following definitions are used

ν kinematic ρ − p − pressure − see figure 1.1 for a definition of the coordinate system and the velocity components. The Cartesian tensor form of the equations can be written

2 ∂ui ∂ui 1 ∂p ∂ ui + uj = + ν ∂t ∂xj −ρ ∂xi ∂xj ∂xj    ∂ui  = 0 ∂xi  where the summation convention is used. This implies that a repeated index is summed over, from 1 to 3, as follows

uiui = u1u1 + u2u2 + u3u3

Thus the first component of the vector equation can be written out as

7 8 CHAPTER 1. DERIVATION OF THE NAVIER-STOKES EQUATIONS

y, x2

v, u2 u, u1

PSfrag replacements

x, x1

w, u3

z, x3

PSfrag replacemenFigurets1.1: Definition of coordinate system and velocity components

x, x1x2 y, x2 P tˆ= 0 z, x3 u, u1 0  xi v, u2 w, u3

ˆ 0 , t x i  0 ˆ ri ui xi , t x  1 Figure 1.2: Particle path.

∂u ∂u ∂u ∂u 1 ∂p ∂2u ∂2u ∂2u i = 1 1 + u 1 + u 1 + u 1 = + ν 1 + 1 + 1 ∂t 1 ∂x 2 ∂x 3 ∂x −ρ ∂x ∂x 2 ∂x 2 ∂x 2 1 2 3 1  1 2 3  ∂u ∂u ∂u ∂u 1 ∂p ∂2u ∂2u ∂2u or + u + v + w = + ν + + ∂t ∂x ∂y ∂z −ρ ∂x ∂x2 ∂y2 ∂z2   2u ∇ | {z } 1.2 Kinematics Lagrangian and Euler coordinates Kinematics is the description of motion without regard to forces. We begin by considering the motion of a fluid particle in Lagrangian coordinates, the coordinates familiar from classical mechanics. Lagrange coordinates: every particle is marked and followed in flow. The independent variables are

x 0 initial position of fluid particle i − tˆ time − where the particle path of P, see figure 1.2, is

0 ri = ri xi , tˆ and the velocity of the particle is the rate of change of the particle position, i.e. 1.2. KINEMATICS 9

∂ri ui = ∂tˆ 0 Note here that when xi changes we consider new particles. Instead of marking every fluid particle it is most of the time more convenient to use Euler coordinates. Euler coordinates: consider fixed point in space, fluid flows past point. The independent variables are

x space coordinates i − t time − Thus the fluid velocity ui = ui (xi, t) is now considered as a function of the coordinate xi and time t. 0 The relation between Lagrangian and Euler coordinates, i.e. xi , tˆ and (xi, t), is easily found by noting that the particle position is expressed in fixed space coordinates x , i.e. i  0 xi = ri xi , tˆ at the time

 ˆ   t = t

Material derivative  Although it is usually most convenient to use Euler coordinates, we still need to consider the rate of change of quantities following a fluid particle. This leads to the following definition. : rate of change in time following fluid particle expressed in Euler coordinates. Consider the quantity F following fluid particle, where

0 F = FL xi , tˆ = FE (xi, t) = FE ri xi, tˆ , t The rate of change of F following a fluidparticle can then be written  

∂F ∂FE ∂ri ∂FE ∂t ∂FE ∂FE = + = + ui ∂tˆ ∂xi · ∂tˆ ∂t · ∂tˆ ∂t ∂xi D Based on this expression we define the material derivative as Dt ∂ D ∂ ∂ ∂ = + ui = + (u ) ∂tˆ ≡ Dt ∂t ∂xi ∂t · ∇ In the material or substantial derivative the first term measures the local rate of change and the second measures the change due to the motion with velocity ui. As an example we consider the acceleration of a fluid particle in a steady converging river, see figure 1.3. The acceleration is defined

Dui ∂ui ∂ui aj = = + uj Dt ∂t ∂xj which can be simplified in 1D for stationary case to Du ∂u ∂u a = = + u Dt ∂t ∂x Note that the acceleration = 0 even if velocity at fixed x does not change. This has been experienced by everyone in a raft in a conv6 erging river. The raft which is following the fluid is accelerating although the flow field is steady.

Description of Evolution of a line element

Consider the two nearby particles in figure 1.4 during time dtˆ. The position of P2 can by Taylor expansion be expressed as

P2 : ri dtˆ + dri dtˆ = ∂ri ˆ ∂ ˆ = ri (0) + ˆ (0) dt + dri (0) + ˆ ( dri) dt  ∂t  ∂t 0

0 0 ˆ ˆ = xi + dxi + ui (0) dt + dui (0) dt 10 CHAPTER 1. DERIVATION OF THE NAVIER-STOKES EQUATIONS

PSfrag replacements

x, x1 y, x2 z, x3 u, u1 v, u2 w, u3 u1 x1 x2 0 xi 0 ˆ ri xi , t u x 0, tˆ i i  P tˆ= 0 u2 > u1   x

Figure 1.3: Acceleration of fluid particles in converging river.

PSfrag replacements

x, x1 y, x2 z, x3 u, u1 v, u2 w, u3 x1 x2 0 xi 0 ˆ ri xi , t 0 ˆ ui xi , t  P2 P tˆ= 0 ˆ  x2 dt dui x u1 u > u 0 2 1 dxi ˆt d r i d

ui dtˆ P1 0 xi dˆt ri  x1

x3

Figure 1.4: Relative motion of two nearly particles. 1.2. KINEMATICS 11

where we have used

∂ ∂ ∂ri 0 ∂ ∂ri 0 ( dri) = 0 dxj = 0 dxj ∂tˆ ∂tˆ ∂xj ∂xj ∂tˆ     ∂ui 0 = 0 dxj = dui ∂xj

and where

∂ui 0 change of ui with initial pos. ∂xj − 0 dxj difference in initial pos. du − difference in velocity i − ∂ We can transform the expression ( dri) = dui in Lagrange coordinates to an equation for a material ∂tˆ line element in Euler coordinates

D ( dr ) = du Dt i i = expand in Euler coordinates { } ∂ui = drj ∂xj

where

∂u i change in velocity with spatial position ∂xj − dr difference in spatial pos. of particles j −

Relative motion associated with invariant parts

∂ui ∂ui We consider the relative motion dui = drj by dividing in its invariant parts, i.e. ∂xj ∂xj

∂ui = ξij + eij + eij ∂xj eij | {z } where eij is the deformation rate tensor and

1 ∂u ∂u ξ = i j anti-symmetric part ij 2 ∂u − ∂x  j i  1 ∂u ∂u 2 ∂u e = i + j r δ traceless part ij 2 ∂x ∂x − 3 ∂u ij  j i r  1 ∂ur eij = δij isotropic part 3 ∂ur

∂ui The symmetric part of , eij , describes the deformation and is considered in detail below, whereas the ∂xj anti-symmetric part can be written in terms of the vorticity ωk and is associated with solid body rotation, i.e. no deformation. The anti-symmetric part can be written PSfrag replacements

x, x1 y, x2 z, x3 u, u1 v, u2 w, u3 x1 x2 0 xi 0 ˆ ri xi , t u x 0, tˆ i i  P tˆ= 0  x u1 u2 > u1 x1 x2 x3 0 12 xi CHAPTER 1. DERIVATION OF THE NAVIER-STOKES EQUATIONS ui dtˆ 0 x dxi r2 2 dui dtˆ ri dtˆ R2 dr dtˆ i  P1 P 2 π 2 + dϕ12

R1 R3 x1 x 3 r1

r3 Figure 1.5: Deformation of a cube.

0 1 ∂u1 ∂u2 1 ∂u1 ∂u3 2 ∂x2 − ∂x1 2 ∂x3 − ∂x1 1 ∂u1 ∂u2 1 ∂u2 ∂u3 [ξij ] =   0     − 2 ∂x2 − ∂x1 2 ∂x3 − ∂x2  1  ∂u1 ∂u3  1 ∂u2 ∂u3  0    2 ∂x3 ∂x1 2 ∂x3 ∂x2   − − − −        ∂ = use ω = u , ωk = kji ui { ∇ × ∂xj }

1 1 0 2 ω3 2 ω2 1 − 1 = 2 ω3 0 2 ω1  1 1 −  2 ω2 2 ω1 0   Deformation of a small cube Consider the deformation of the small cube in figure 1.5, where we define

l Rk = Rδkl component k of side l

l l ∂uk l rk = Rk + Rj dt relative motion of side l ∂xj

l duk | {z∂u} = R δ + k dt deformed cube kl ∂x  l  First, we consider the deformation on side 1, which can be expressed as

dR1 = r1 R = r1r1 R − k k − q The inner product can be expanded as

∂u 2 ∂u 2 ∂u 2 r1r1 = 1 + 1 dt + 2 dt + 3 dt R2 k k ∂x ∂x ∂x " 1   1   1  # = drop quadratic terms { } ∂u = R2 1 + 2 1 dt ∂x  1  1.2. KINEMATICS 13

We have dropped the quadratic terms since we are assuming that dt is small. dR1 becomes

∂u ∂u dR1 = R 1 + 2 1 dt R = R 1 + 1 dt + ... R ∂x − ∂x − r 1  1  ∂u1 = R dt = Re11 dt ∂x1

which implies that

dR1 = Re dt 11 Thus the deformation rate of side 1 depends on e , both traceless and isotropic part of ∂ui . 11 ∂xj Second, we consider the deformation of the angle between side 1 and side 2. This can be expressed as

1 2 π r r 1/2 cos + dφ = · = r1r2 r1 r1 r2 r2 − 2 12 r1 r2 k k · m m · n n | | | |    1/2 1/2 ∂u ∂u ∂u − ∂u − = δ + k dt δ + k dt 1 + 2 1 dt 1 + 2 2 dt k1 ∂x k2 ∂x · ∂x ∂x  1   2   1   2  ∂u ∂u ∂u ∂u = 1 dt + 2 dt 1 1 dt 1 2 dt ∂x ∂x − ∂x − ∂x  2 1   1   2  ∂u ∂u = 1 + 2 dt = 2e dt ∂x ∂x 12  2 1  where we have dropped quadratic terms. We use the trigonometric identity

π π π cos + dϕ = cos cos dϕ sin sin dϕ dϕ 2 12 2 · 12 − 2 · 12 ≈ − 12   which allow us to obtain the finial expression

dϕ 12 = 2e dt − 12 Thus the deformation rate of angle between side 1 and side 2 depends only on traceless part of ∂ui . ∂xj Third, we consider the deformation of the volume of the cube. This can be expressed as

dV = r1 r2 r3 R3 − 1 + ∂ u1 dt ∂u1 dt ∂u1 dt ∂ x1 ∂x2 ∂x3 = R3 ∂u2 dt 1 + ∂u2 dt ∂u2 dt R3 ∂x1 ∂x2 ∂x3 ∂u3 ∂u3 ∂u3 − dt dt 1 + dt ∂x1 ∂x2 ∂x3 ∂u ∂u ∂u = R3 1 + 1 dt 1 + 2 dt 1 + 3 dt R3 ∂x ∂x ∂x −  1   2   3  ∂u ∂u ∂u = R3 1 + 2 + 3 dt ∂x ∂x ∂x  1 2 3  ∂u = R3 k dt ∂xk

where we have again omitted quadratic terms. Thus we have

dV = R3e dt rr and the deformation rate of volume of cube (or expansion rate) depends on isotropic part of ∂ui . ∂xj In summary, the motion of a fluid particle with velocity ui can be divided into the following invariant parts PSfrag replacements

x, x1 y, x2 z, x3 u, u1 v, u2 w, u3 x1 x2 0 xi 0 ˆ ri xi , t u x 0, tˆ i i  P tˆ= 0  x u1 u2 > u1 x1 x2 x3 0 xi ui dtˆ 0 dxi dui dtˆ ri dtˆ dr dtˆ i  P 1 P2 x1 14 x2CHAPTER 1. DERIVATION OF THE NAVIER-STOKES EQUATIONS

x3 ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡

3 ¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢ V (t + ∆t) V (t) ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡

R ¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢ − ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ 2 ¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢

R ) ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡

1 (t¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ R S ¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢

3 ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡

r ¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢ S (t + ∆t) ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ 2 ¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢

r ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢

1 ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ r ¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢

π V (t) ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡

2 + dϕ12 ¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢

¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡

¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢

¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡

¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡

¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢ u

¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡

¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢

¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡

¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢

¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡

¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢

¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢ n

V (t + ∆t)

Figure 1.6: Volume moving with the fluid.

i) ui solid body translation

∂u ∂u ii) ξ = 1 i j = 1  ω solid body rotation ij 2 ∂x − ∂x − 2 kij k  j i  ∂u ∂u 2 ∂u iii) e = 1 i + j r δ volume constant deformation ij 2 ∂x ∂x − 3 ∂u ij  j i r 

1 ∂ur iv) eij = 3 δij volume expansion rate ∂ur

1.3 Reynolds transport theorem

Volume integral following with the fluid

Consider the time derivative of a material volume integral, i.e. a volume integral where the volume is moving with the fluid. We obtain the following expressions

D 1 Tij dV = lim Tij (t + ∆t) dV Tij (t) dV Dt ∆t 0 ∆t   → − VZ(t)  V (t+∆Z t) VZ(t)         1  = lim Tij (t + ∆t) dV Tij (t + ∆t) dV ∆t 0 ∆t   → −  V (t+∆Z t) VZ(t)      1  + T (t + ∆t) dV T (t) dV ∆t  ij − ij  VZ(t) VZ(t)       1  ∂Tij = lim Tij (t + ∆t) dV + dV ∆t 0 ∆t  ∂t →  V (t+∆Zt) V (t)  VZ(t) −   The volume in the first integral on the last line is represented in figure 1.6, where a volume element describing the change in volume between V at time t and t + ∆t can be written as

u n∆t = u n ∆t dV = u n ∆t dS · k k ⇒ k k 1.4. MOMENTUM EQUATION 15

This implies that the volume integral can be converted to a surface integral. This surface integral can in turn be changed back to a volume integral by the use of Gauss (or Greens) theorem. We have

D ∂Tij Tij dV = lim Tij (t + ∆t) uknk dS + dV Dt ∆t 0 ∂t → " S(t) # VZ(t) I VZ(t)

∂Tij = Tij uknk dS + dV = Gauss/Green’s theorem S(t) ∂t { } I VZ(t)

∂Tij ∂ = + (ukTij ) dV ∂t ∂xk VZ(t)   which is the Reynolds transport theorem.

Conservation of mass

By the substitution Tij ρ and the use of the Reynolds transport theorem above we can derive the equation for the conservation→ of mass. We have

D ∂ρ ∂ ρ dV = + (ukρ) = 0 Dt ∂t ∂xk VZ(t) VZ(t)   Since the volume is arbitrary, the following must hold for the integrand

∂ρ ∂ ∂ρ ∂ρ ∂uk Dρ ∂uk 0 = + (ukρ) = + uk + ρ = + ρ ∂t ∂xk ∂t ∂xk ∂xk Dt ∂xk 1 2 3 4

where we have used the|{z}definition| {zof the} material derivative in order|{z}to simplify| {z } the expression. The terms in the expression can be given the following interpretations:

1 : accumulation of mass in fixed element 2 : net flow rate of mass out of element 3 : rate of density change of material element 4 : volume expansion rate of material element

By considering the transport of a quantity given per unit mass, i.e. Tij = ρtij , we can simplify Reynolds transport theorem. The integrand in the theorem can then be written

0 (cont. eq.) 0 ¡ ¨*¨ ∂ ∂ ∂¡ρ ∂tij ∂ ¨ ∂tij Dtij (ρtij ) + (ukρ tij ) = tij + ρ + tij ¨ (ukρ) + ρuk = ρ ∂t ∂xk ¡∂t ∂t ¨∂xk ∂xk Dt which implies that Reynolds transport theorem becomes D Dt ρ t dV = ρ ij dV Dt ij Dt VZ(t) VZ(t) where V (t) again is a material volume.

1.4 Momentum equation Conservation of momentum The momentum equation is based on the principle of conservation of momentum, i.e. that the time rate of change of momentum in a material region = sum of the forces on that region. The quantities involved are:

Fi - body forces per unit mass Ri - surface forces per unit area ρui - momentum per unit volume PSfrag replacements

x, x1 y, x2 z, x3 u, u1 v, u2 w, u3 x1 x2 0 xi 0 ˆ ri xi , t u x 0, tˆ i i  P tˆ= 0  x u1 u2 > u1 PSfrag replacemenx1 ts

x2 x, x1 x3 y, x2 x 0 i z, x3 ˆ ui dt u, u1 dx 0 i v, u2 ˆ dui dt w, u3 ri dtˆ x1 dr dtˆ i  x2 P x 0 1 i P 0 ˆ 2 ri xi , t 0 x1 u x , tˆ i i  x2 P tˆ= 0 x  3 x R3  u1 R2 u2 > u1 R1 x1 r3 x2 r2 x3 r1 0 π xi 2 + dϕ12 ui dtˆ V (t) 0 16 CHAPTERdxi 1. DERIVATION OF THE NAVIER-STOKES EQUATIONS S (t) du dtˆ V (t + ∆t) V (t) i ri dtˆ nIII(k) S (t−+ ∆t) dr dtˆ i  u dl P1 n  ) P k 2 ( V (t + ∆t) s { x1∆ I }| R(n ) x2 z x3 R3 nII nI R2 R1 r3 dS 2 R(nII) r r1 π 2 + dϕ12 Figure 1.7:V (Moment) tum balance for fluid element S (t) V (t + ∆t) V (t) S (t−+ ∆t) n u

n R V (t + ∆t)

R

Figure 1.8: Surface force and unit normal.

We can put the momentum conservation in integral form as follows D ρu dV = ρF dV + R dS Dt i i i VZ(t) VZ(t) SZ(t) Using Reynolds transport theorem this can be written Du ρ i dV = ρF dV + R dS Dt i i VZ(t) VZ(t) SZ(t) which is Newtons second law written for a volume of fluid: mass acceleration = sum of forces. To · proceed Ri must be investigated so that the surface integral can be transformed to a volume integral. In order to do that we have to define the stress tensor.

The stress tensor Remove a fluid element and replace outside fluid by surface forces as in figure 1.7. Here R(n) is the surface force per unit area on surface dS with normal n, see figure 1.8. Momentum conservation for the small fluid particle leads to Du ρ i dS dl = ρF dS dl + R nI dS + R nII dS + R nIII(k) ∆s(k) dl Dt i i j i j i j k   X  Letting dl 0 gives →

I II 0 = Ri nj dS + Ri nj dS

I II Now nj = n = n which leads to   j − j R (n ) = R ( n ) i j − i − j implying that a surface force on one side of a surface is balanced by an equal an opposite surface force at the other side of that surface. Note that it is a general principle that the terms proportional to the volume of a small fluid particle approaches zero faster than the terms proportional to the surface area of the particle. Thus the surface forces acting on a small fluid particle has to balance, irrespective of volume forces or acceleration terms. PSfrag replacements

x, x1 y, x2 z, x3 u, u1 v, u2 w, u3 x1 x2 0 xi 0 ˆ ri xi , t u x 0, tˆ i i  P tˆ= 0  x u1 u2 > u1 PSfrag replacemenx1 ts

xx,2 x1 xy3, x2 x 0 zi , x3 ˆ ui du,t u1 dx 0 vi , u2 ˆ duiwdt, u3 ri dtˆ x1 dr dtˆ i  x2 P x 0 1 i P0 ˆ ri xi 2, t 0 u xx1, tˆ i i  P tˆx=2 0 x  3 x R3  u1 2 u2R> u1 R1 x1 r3 x2 2 r x3 r1 0 π xi 2 + dϕ12 ui dtˆ V (td)x 0 S (t) i du dtˆ V (t + ∆t) V (t)i 1.4. MOMENTUM EQUArTIONi dtˆ 17 S (t−+ ∆t) dr dtˆ i  uP 1 R(e ) = ( T , T , T ) nP 1 11 21 31 V (t + ∆t) 2 x1 T21

x2 x1 x3 T11 T PSfrag replacementsR3 31 x, x1R2 y, x2R1 z, x 3 Figure 1.9: Definition of surface3 r force components on a surface with a normal in the 1-direction. u, u1 r2 v, u2 r1 x2 π 2 w+, ud3ϕ12 R(e2) = ( T12, T22, T32)

xV1(t) T22 xS2(t) 0 V (t + ∆t) xVi (t) −0 ˆ ri Sx(it +, t ∆t) u x 0, tˆ T12 i i  u P tˆ= 0 n V (t + ∆t) x T32 u1 u2 > u1 x1 x2 x3 0 xi Figure 1.10: Definition of surface force components on a surface with a normal in the 2-direction. ui dtˆ 0 dxi ˆ We now divide the surfacedui dforcest into components along the coordinate directions, as in figures 1.9 and r dtˆ 1.10, with corresponding definitionsi for the force components on a surface with a normal in the 3-direction. dri dtˆ Thus, Tij is the i-component of the surface force on a surface dS with a normal in the j-direction. P Consider a fluid particle with1 surfaces along the coordinate directions cut by a slanted surface, as in figure 1.11. The areas of the surfaceP2 elements are related by x1

x2 dSj = ej n dS = nj dS x3 · where dS is the area of the slanted surface. Momentum balance require the surface forces to balance R3 in the element, we have R2 R1 03 = R dS T n dS T n dS T n dS r 1 − 11 1 − 12 2 − 13 3 2 which implies that the totalr surface force Ri can be written in terms of the components of the stress r1 tensor Tij as π 2 + dϕ12 V (t) Ri = Ti1n1 + Ti2n2 + Ti3n3 = Tij nj S (t) V (t + ∆t) V (t) e S (t−+ ∆t) 2 R u n n V (t + ∆t)

R1 dS3 dS1 e1 dS2

e3

Figure 1.11: Surface force balance on a fluid particle with a slanted surface. PSfrag replacements

x, x1 y, x2 z, x3 u, u1 v, u2 w, u3 x1 x2 0 xi 0 ˆ 18 CHAPTER 1. DERIVATION OF THE NAVIER-STOKESri xi , t EQUATIONS u x 0, tˆ i i  P tˆ= 0 Here the diagonal components are normal stresses off-diagonal components are shearstresses. Further consideration of the moment balance around a fluid particle show that Tij is axsymmetric tensor, i.e. u1 u2 > u1 x1 Tij = Tji x2 x3 0 Momentum equation xi ˆ Using the definition of the surface force in terms of the stress tensor, the momentumuequationi dt can now be dx 0 written i dui dtˆ ri dtˆ Dui ∂Tij ρ dV = ρFi dV + Tij nj dS = ρFi + dV ˆ Dt ∂x dri dt Z Z Z Z  j   V (t) V (t) S(t) V (t) P1 P The volume is again arbitrary implying that the integrand must itself equal zero. We2 have x1 Dui ∂Tij x2 ρ = ρFi + x Dt ∂xj 3 R3 2 Pressure and R R1 For fluid at rest only normal stresses present otherwise fluid element would deform. Wr3e thus divide the stress tensor into an isotropic part, the hydrodynamic pressure p, and a part dependingr2 on the motion of r1 the fluid. We have π 2 + dϕ12 p V (t) Tij = pδij + τij − S (t) p - hydrodynamic pressure, directed inward V (t + ∆t) V (t) − τij - viscous stress tensor, depends on fluid motion S (t + ∆t) u n V (t + ∆t) p p Newtonian fluid

It is natural to assume that the viscous stresses are functions of deformation rate eij or strain. Recall that the invariant symmetric parts are

1 ∂u ∂u 2 ∂u 1 ∂u e = i + j r δ + r δ ij 2 ∂x ∂x − 3 ∂x ij 3 ∂x ij  j i r  r

eij eij | {z } where eij is the volume constant| deformation{zrate and eij }is the uniform rate of expansion. For an isotropic fluid, the viscous stress tensor is a linear function of the invariant parts of eij , i.e.

τij = λeij + 2µeij where we have defined the two as

µ (T ): dynamic viscosity (here T is the temperature) λ (T ): second viscosity, often=0

For a Newtonian fluid, we thus have the following relationship between the viscous stress and the strain (deformation rate)

∂u ∂u 2 ∂u τ = 2µe = µ i + j r δ ij ij ∂x ∂x − 3 ∂x ij  j i r  which leads to the momentum equation

Du ∂p ∂ ∂u ∂u 2 ∂u ρ i = + µ i + j r δ + ρF Dt −∂x ∂x ∂x ∂x − 3 ∂x ij i i j   j i r  1.5. ENERGY EQUATION 19

1.5 Energy equation

The energy equation is a mathematical statement which is based on the physical law that the rate of change of energy in material particle = rate that energy is received by heat and work transfers by that particle. We have the following definitions

1 ρ e + 2 uiui dV energy of particle, with e the internal energy   ρuiFi dV work rate of Fi on particle force velocity · | {z } uj Rj dS work rate of Rj on particle

niqi dS heat loss from surface, with qi the heat flux vector, directed outward

Using Reynolds transport theorem we can put the energy conservation in integral form as

D 1 ∂ ρ e + uiui dV = ρFiui dV + [niTij uj niqi] dS = ρFiui + (Tij uj qi) dV Dt 2 − ∂xi − VZ(t)   VZ(t) SZ(t) VZ(t)   Compare the expression in classical mechanics, where the momentum equation is mu˙ = F and the associated kinetic energy equation is

m d 2 dt (u u) = F u work rate· = force· velocity ( work = force · dist. ) · From the integral energy equation we obtain the total energy equation by the observation that the volume is arbitrary and thus that the integrand itself has to be zero. We have

D 1 ∂ ∂ ∂q ρ e + u u = ρF u (pu ) + (τ u ) i Dt 2 i i i i − ∂x i ∂x ij j − ∂x   i i i The mechanical energy equation is found by taking the dot product between the momentum equation and u. We obtain

D 1 ∂p ∂τ ρ u u = ρF u u + u ij Dt 2 i i i i − i ∂x i ∂x   i j Thermal energy equation is then found by subtracting the mechanical energy equation from the total energy equation, i.e.

De ∂ui ∂ui ∂qi ρ = p + τij Dt − ∂xi ∂xj − ∂xi The work of the surface forces divides into viscous and pressure work as follows

∂ ∂ui ∂p (pui) = p ui −∂xi − ∂xi − ∂xi

1 2

∂ ∂ui ∂τij (τij uj) = τij + uj ∂xi ∂xj ∂xi

where following interpretations can be given to the thermal and the mechanical terms

1 : thermal terms ( force deformation ): heat generated by compression and viscous dissipation 2 : mechanical· terms ( velocity force ): gradients accelerate fluid and increase kinetic energy · 20 CHAPTER 1. DERIVATION OF THE NAVIER-STOKES EQUATIONS

The heat flux need to be related to the temperature gradients with Fouriers law

∂T qi = κ − ∂xi where κ = κ (T ) is the thermal conductivity. This allows us to write the thermal energy equation as

De ∂u ∂ ∂T ρ = p i + Φ + κ Dt − ∂x ∂x ∂x i i  i  where the positive definite dissipation function Φ is defined as

∂u 1 ∂u 2 Φ = τ i = 2µ e e k ij ∂x ij ij − 3 ∂x j "  k  # 1 ∂u 2 = 2µ e k δ > 0 ij − 3 ∂x ij  k  Alternative form of the thermal energy equation can be derived using the definition of the enthalpy p h = e + ρ We have

Dh De 1 Dp p Dρ = + Dt Dt ρ Dt − ρ2 Dt

∂u ρ i − ∂xi |{z}  which gives the final result

Dh Dp ∂ ∂T ρ = + Φ + κ Dt Dt ∂x ∂x i  i  To close the system of equations we need a

i) thermodynamic equation e = e (T, p) simplest case: e = cvT or h = cpT

ii) equation of state p = ρRT

where cv and cp are the specific heats at constant volume and temperature, respectively. At this time we also define the ratio of the specific heats as c γ = p cv

1.6 Navier-Stokes equations

The derivation is now completed and we are left with the Navier-Stokes equations. They are the equation describing the , the equation describing the conservation of momentum and the equation describing the . We have Dρ ∂u + ρ k = 0 Dt ∂xk

Dui ∂p ∂τij ρ = + + ρFi Dt −∂xi ∂xj De ∂u ∂ ∂T ρ = p i + Φ + κ Dt − ∂x ∂x ∂x i i  i  where 1.6. NAVIER-STOKES EQUATIONS 21

∂u Φ = τ i ij ∂x  j ∂ui ∂uj 2 ∂ur  τij = µ + δij  ∂x ∂x − 3 ∂x  j i r   and the thermodynamic relation and the equation of state for a e = e (T, p) p = ρRT We have 7 equations and 7 unknowns and therefore the necessary requirements to obtain a solution of the system of equations.

unknown equations ρ 1 continuity 1 ui 3 momentum 3 p 1 energy 1 e 1 thermodyn. 1 T 1 gas law 1 7 7 P P Equations in conservative form A slightly different version of the equations can be found by using the identity

Dtij ∂ ∂ ρ = (ρtij ) + (ukρtij ) Dt ∂t ∂xk to obtain the system

∂ρ ∂  + (ukρ) = 0 ∂t ∂xk  ∂ ∂ ∂p ∂τ  (ρu ) + (ρu u ) = + ij + ρF  i k i i  ∂t ∂xk −∂xi ∂xj  ∂ 1 ∂ 1 ∂ ∂ ∂ ∂T e + u u + ρu e + u u = ρF u (pu ) + (τ u ) + κ ∂t 2 i i ∂x k 2 i i i i − ∂x i ∂x ij j ∂x ∂x    k    i i i  i     These are all of the form

∂U ∂G(i) ∂U ∂G ∂G ∂G + = J or + + + = J ∂t ∂xi ∂t ∂x ∂y ∂z where

T U = (ρ, ρu1, ρu2, ρu3, ρ (e + uiui/2)) is the vector of unknowns,

T J = (0, ρF1, ρF2, ρF3, ρuiFi) is the vector of the right hand sides and

ρui   ρu1ui + pδ1i τ1i (i) − G =  ρu2ui + pδ2i τ2i   −   ρu3ui + pδ3i τ3i   − ∂T   ρ (e + uiui/2) ui + pui + κ uj τij   ∂xi −      is the flux of mass, momentum and energy, respectively. This form of the equation is usually termed the conservative form of the Navier-Stokes equations. 22 CHAPTER 1. DERIVATION OF THE NAVIER-STOKES EQUATIONS

1.7 Incompressible Navier-Stokes equations

The conservation of mass and momentum can be written Dρ ∂u + ρ i = 0 Dt ∂xi  Du ∂p ∂τ ρ i = + ij + ρF  i  Dt −∂xi ∂xj  ∂u ∂u 2 ∂u τ = µ i + j k δ ij ∂x ∂x − 3 ∂u ij   j i k   for incompressible flow ρ = constan t, which from the conservation of mass equation implies ∂u i = 0 ∂xi implying that a fluid particle experiences no change in volume. Thus the conservation of mass and momentum reduce to

∂ui ∂ui 1 ∂p 2 + uj = + ν ui + Fi ∂t ∂xj −ρ ∂xi ∇  ∂ui  = 0  ∂xi

 since the components of the viscous stress tensor can now be written ∂ ∂u ∂u 2 ∂u ∂2u i + j k δ = i = 2u ∂x ∂x ∂x − 3 ∂x ij ∂x ∂x ∇ i j  j i k  j j We have also introduced the kinematic viscosity, ν, above, defined as

ν = µ/ρ The incompressible version of the conservation of mass and momentum equations are usually referred to as the incompressible Navier-Stokes equations, or just the Navier-Stokes equations in case it is evident that the incompressible limit is assumed. The reason that the energy equation is not included in the incompressible Navier-Stokes equations is that it decouples from the momentum and conservation of mass equations, as we will see below. In addition it can be worth noting that the conservation of mass equation is sometimes referred to as the . The incompressible Navier-Stokes equations need boundary and initial conditions in order for a solution to be possible. Boundary conditions (BC) on solid surfaces are ui = 0. They are for obvious reasons usually referred to as the no slip conditions. As initial condition (IC) one needs to specify the velocity field at the 0 initial time ui (t = 0) = ui . The pressure field does not need to be specified as it can be obtained once the velocity field is specified, as will be discussed below.

Integral form of the Navier-Stokes eq. We have derived the differential form of the Navier-Stokes equations. Sometimes, for example when a finite-volume discretization is derived, it is convenient to use an integral form of the equations. An integral from of the continuity equation is found by integrating the constraint over a fixed volume VF and using the Gauss theorem. We have ∂ (ui) dVF = uini dSF = 0 ∂xi VZ ZS An integral form of the momentum equation is found by taking the time derivative of a fixed volume integral of the velocity, substituting the differential form of the Navier-Stokes equation, using the continuity equation and Gauss theorem. We have

2 ∂ ∂ui ∂ 1 ∂p ∂ ui ui dV = dV = (ujui) + ν dV = ∂t ∂t − ∂xj ρ ∂xi − ∂xj ∂xj VZF VZF VZF  

∂ 1 ∂ui p ∂ui ujui + pδij ν dV = uiuj nj + ni ν nj dS − ∂xj ρ − ∂xj − ρ − ∂xj VZF   SZF   PSfrag replacements

x, x1 y, x2 z, x3 u, u1 v, u2 w, u3 x1 x2 0 xi 0 ˆ ri xi , t u x 0, tˆ i i  P tˆ= 0  x u1 u2 > u1 x1 x2 x3 0 xi ui dtˆ 0 dxi dui dtˆ ri dtˆ dr dtˆ i  P 1 P2 x1 x2 x3 R3 R2 R1 r3 r2 r1 π 2 + dϕ12 V (t) 1.7. INCOMPRESSIBLES (t) NAVIER-STOKES EQUATIONS 23 V (t + ∆t) V (t) S (t−+ ∆t)

u £¤£¤£¤£¤£¤£¤£¤£¤£¤£¤£

n ¥¤¥¤¥¤¥¤¥¤¥¤¥¤¥¤¥¤¥¤¥ £¤£¤£¤£¤£¤£¤£¤£¤£¤£¤£ V (t + ∆t) ¥¤¥¤¥¤¥¤¥¤¥¤¥¤¥¤¥¤¥¤¥ p Tw T

Tw 0 U0 L

¦¤¦¤¦¤¦¤¦¤¦¤¦¤¦¤¦¤¦¤¦

§¤§¤§¤§¤§¤§¤§¤§¤§¤§¤§

¦¤¦¤¦¤¦¤¦¤¦¤¦¤¦¤¦¤¦¤¦ §¤§¤§¤§¤§¤§¤§¤§¤§¤§¤§ T , U 0 0 L

Figure 1.12: Examples of length, velocity and temperature scales.

Note that the integral from of the continuity equation is a compatibility condition for BC in incom- pressible flow.

Dimensionless form

It is often convenient to work with a non-dimensional form of the Navier-Stokes equations. We use the following scales and non-dimensional variables

xi tU0 ui p ∂ 1 ∂ ∂ U0 ∂ xi∗ = t∗ = ui∗ = p∗ = = = L L U0 p0 ∂xi L ∂xi∗ ∂t L ∂t∗ ⇒

where ∗ signifies a non-dimensional variable. The length and velocity scales have to be chosen appropri- ately from the problem under investigation, so that they represent typical lengths and velocities present. See figure 1.12 for examples. If we introduce the non-dimensional variables in the Navier-Stokes equations we find

2 2 2 U0 ∂ui∗ U0 ∂ui∗ p0 ∂p∗ νU0 ∂ ui∗ + u∗ = + L · ∂t L j ∂x −ρL ∂x L2 ∂x ∂x  ∗ j∗ i∗ j∗ j∗  U0 ∂ui∗  = 0 L · ∂xi∗   2 Now drop * as a sign of non-dimensional variables and divide through with U0 /L, we find

∂ui ∂ui p0 ∂p ν 2 + uj = 2 + ui ∂t ∂xj −ρU0 ∂xi U0L∇  ∂ui  = 0 ∂xi  We have defined the Reynolds number Re as

2 U0L U0 /L “inertial forces” Re = = 2 ν νU0/L “viscous forces”

which can be interpreted as a measure of the inertial forces divided by the viscous forces. The is by far the single most important non-dimensional number in fluid mechanics. We also define the pressure scale as

2 p0 = ρU0

which leaves us with the final form of the non-dimensional incompressible Navier-Stokes equations as

∂ui ∂ui ∂p 1 2 + uj = + ui ∂t ∂xj −∂xi Re∇  ∂ui  = 0 ∂xi  24 CHAPTER 1. DERIVATION OF THE NAVIER-STOKES EQUATIONS

Non-dimensional energy equation We stated above that the energy equation decouple from the rest of the Navier-Stokes equations for in- compressible flow. This can be seen from a non-dimensionalization of the energy equation. We use the definition of the enthalpy (h = cpT ) to write the thermal energy equation as DT Dp ρc = + Φ + κ 2T p Dt Dt ∇ and use the following non-dimensional forms of the temperature and dissipation function

2 T T0 L T ∗ = − Φ∗ = Φ T T U 2µ w − 0 0 This leads to

2 DT ∗ µ κ 2 U0 Dp∗ µ = ∗ T ∗ + + φ∗ Dt ρU L · µc · ∇ c (T T ) Dt ρU L ∗ 0 p p w − 0  ∗ 0  2 1 1 2 U0 Dp∗ 1 = ∗ T ∗ + + Φ∗ Re · P r · ∇ c (T T ) Dt R p w − 0  ∗  a2 Ma2 0 cp(Tw−T0) | {z } U0 where a0 speed of sound in free-stream and Ma = is Mach number. We now drop ∗ and let Ma 0 a0 → to obtain DT 1 1 = 2T Dt Re · P r · ∇ µcp where the Prandtl number P r = κ , which takes on a value of 0.7 for air. As the Mach number approaches zero, the fluid behaves as an ≈incompressible medium, which can be seen from the definition of the speed of sound. We have

γ 1 ∂ρ a = , α = 0 ρα ρ ∂p T where α is the isothermal coefficient. If the densit y is constant, not depending on p, we have that α 0 and a , which implies that Ma 0. → 0 → ∞ → 1.8 Role of the pressure in incompressible flow

The role of the pressure in incompressible flow is special due to the absence of a time derivative in the continuity equation. We will illustrate this in two different ways.

Artificial compressibility First we discuss the artificial compressibility version of the equations, used sometimes for solution of the steady equations. We define a simplified continuity equation and equation of state as ∂ρ ∂u + i = 0 and p = βρ ∂t ∂xi This allows us to write the Navier-Stokes equations as

∂ui ∂ ∂p 1 2 + (uj ui) = + ui ∂t ∂xj −∂xi Re∇  ∂p ∂ui  + β = 0 ∂t ∂xi Let  p βu βv βw u p + u2 uv uw u = e = f = g =  v   uv   p + v2   vw   w   uw   vw   p + β2                  1.8. ROLE OF THE PRESSURE IN 25

be the vector of unknowns and their fluxes. The Navier-Stokes equations can then be written ∂u ∂e ∂f ∂g 1 + + + = 2Du ∂t ∂x ∂y ∂z Re∇ ∂u ∂u ∂u ∂u 1 or + A + B + C = 2Du ∂t ∂x ∂y ∂z R∇ where the matrices above are defined

0 β 0 0 0 0 β 0 ∂e 1 2u 0 0 ∂f 0 v u 0 A = =   , B = =   ∂u 0 v u 0 ∂u 1 0 2v 0  0 w 0 u   0 0 w v          0 0 0 β 0 0 0 0 ∂g 0 v u 0 0 1 0 0 C = =   , D =   ∂u 1 0 2v 0 0 0 1 0  0 0 w v   0 0 0 1      the eigenvalues of A, B, C are thewave speeds of plane waves in the respectiv e coordinate directions, they are

u, u, u u2 + β , v, v, v v2 + β and w, w, w w2 + β          Note that the effectivpe acoustic or pressure wavpe speed √β for incompressiblep flow. ∼ → ∞ Projection on a divergence free space Second we discuss the projection of the velocity field on a divergence free space. We begin by the following theorem.

Theorem 1. Any wi in Ω can uniquely be decomposed into ∂p wi = ui + ∂xi

∂ui where = 0, ui ni = 0 on ∂Ω. ∂xi · i.e. into a function ui that is divergence free and parallel to the boundary and the of a function, here called p. ∂p Proof. We start by showing that ui and is orthogonal in the L2 inner product. ∂xi ∂p ∂p ∂ ui, = ui dV = (uip) dV = puini dS = 0 ∂xi ∂xi ∂xi   ΩZ ΩZ ∂IΩ The uniqueness of the decomposition can be seen by assuming that we have two different decompositions and showing that they have to be equivalent. Let

(1) (2) (1) ∂p (2) ∂p wi = ui + = ui + ∂xi ∂xi The inner product between

(1) (2) ∂ (1) (2) (1) (2) ui ui + p p and ui ui − ∂xi − −   gives

2 2 (1) (2) (1) (2) ∂ (1) (2) (1) (2) 0 = ui ui + ui ui p p dV = ui ui dV − − ∂xi − − ΩZ       ΩZ   Thus we have (1) (2) (1) (2) ui = ui , p = p + C PSfrag replacements

x, x1 y, x2 z, x3 u, u1 v, u2 w, u3 x1 x2 0 xi 0 ˆ ri xi , t u x 0, tˆ i i  P tˆ= 0  x u1 u2 > u1 x1 x2 x3 0 xi ui dtˆ 0 dxi dui dtˆ ri dtˆ dr dtˆ i  P 1 P2 x1 x2 x3 R3 R2 R1 3 26 r CHAPTER 1. DERIVATION OF THE NAVIER-STOKES EQUATIONS r2 r1 π 2 + dϕ12 V (t) S (t) V (t + ∆t) V (t) Gradient fields S (t−+ ∆t) u n V (t + ∆t) wi ∂p p ∂xi T0, U0 Tw L ui T0 U0

Divergence free vectorfields // to boundary

Figure 1.13: Projection of a function on a divergence free space.

We can find an equation for a p with above properties by noting that

2 ∂wi ∂p p = in Ω with = wini on ∂Ω ∇ ∂xi ∂n has a unique solution. Now, if ∂p ui = wi − ∂xi ⇒ we have 2 ∂ui ∂wi ∂ p ∂p 0 = = ; and 0 = uini = wini ∂xi ∂xi − ∂xi∂xi − ∂n

∂p To sum up, to project wi on divergence free space let wi = ui + ∂xi ∂w ∂p 1) solve for p : i = 2p, = 0 ∂xi ∇ ∂n ∂p 2) let ui = wi − ∂xi This is schematically shown in figure 1.13. Note also that (w u ) u . i − i ⊥ i Apply to Navier-Stokes equations

Let P be orthogonal projector which maps wi on divergence free part ui, i.e. Pwi = ui. We then have the following relations

∂p wi = Pwi + ∂xi ∂p Pui = ui, P = 0 ∂xi Applying the orthogonal projector to the Navier-Stokes equations, we have

∂u ∂p ∂u 1 P i + = P u i + 2u ∂t ∂x − j ∂x Re∇ i  i   j  Now, ui is divergence free and parallel to boundary, thus 1.8. ROLE OF THE PRESSURE IN INCOMPRESSIBLE FLOW 27

∂u ∂u P i = i ∂t ∂t However,

P 2u = 2u ∇ i 6 ∇ i 2 since ui need not be parallel to the boundary. Thus we find an evolution equation without the pressure, ∇we have

∂ui ∂ui 1 2 = P  uj + ui ∂t − ∂xj Re∇      wi    The pressure term in the Naiver-Stokes equations| ensures{z that the} right hand side wi is divergence free. We can find a Poisson equation for the pressure by taking the divergence of wi, according to the result above. We find

2 ∂ ∂ui 1 2 ∂uj ∂ui p =  uj + ui = ∇ ∂xi − ∂xj Re∇ − ∂xi ∂xj      wi    thus the pressure satisfies elliptic Poisson| equation,{z which} links the velocity field in the whole domain instantaneously. This can be interpreted such that the information in incompressible flow spreads infinitely fast, i.e. we have an infinite wave speed for pressure waves, something seen in the analysis of the artificial compressibility equations.

Evolution equation for the divergence It is common in several numerical solution algorithms for the Naiver-Stokes equations to discard the diver- gence constraint and instead use the pressure Poisson equation derived above as the second equation in the incompressible Naiver-Stokes equations. If this is done we may encounter solutions that are not divergence free. Consider the equation for the evolution of the divergence, found by taking the divergence of the mo- mentum equations and substituting the Laplacian of the pressure with the right hand side of the Poisson equation. We have

∂ ∂u 1 ∂u i = 2 i ∂t ∂x Re∇ ∂x  i   i  Thus the divergence is not automatically zero, but satisfies a heat equation. For the stationary case the solution obeys the maximum principle. This states that the maximum of a harmonic function, a function satisfying the Laplace equation, has its maximum on the boundary. Thus, the divergence is zero inside the domain, if and only if it is zero everywhere on the boundary. Since it is the pressure term in the Navier-Stokes equations ensures that the velocity is divergence free, this has implications for the boundary conditions for the pressure Poisson equation. A priori we have none specified, but they have to be chosen such that the divergence of the velocity field is zero on the boundary. This may be a difficult constraint to satisfy in a numerical solution algorithm. 28 CHAPTER 1. DERIVATION OF THE NAVIER-STOKES EQUATIONS PSfrag replacements

x, x1 y, x2 z, x3 u, u1 v, u2 w, u3 x1 x2 0 xi 0 ˆ Chapterri xi , t 2 u x 0, tˆ i i  P tˆ= 0  x Flowu1physics u2 > u1 x1 x2 x3 2.1 Exact0 solutions xi ui dtˆ 0 Plane Pouseuilledxi flow - exact solution for channel flow du dtˆ The flow insidei the two-dimensional channel, see figure 2.1, is driven by a pressure difference p p between r dtˆ 0 1 the inlet andi the outlet of the channel. We will assume two-dimensional, steady flow, i.e. − dr dtˆ i  P 1 ∂ P = 0, u3 = 0 2 ∂t x1 and that the flow is fully developed, meaning that effects of inlet conditions have disappeared. We have x2 x3 3 R u1 = u1 (x2) , u2 = u2 (x2) R2 The boundary1 conditions are u = u = 0 at x = h. The continuity equation reads R 1 2 2  r3 0 0 r2 ∂u7 ∂u ∂u7 r1 1 2 3 π + + = 0 2 + dϕ12 ∂x1 ∂x2 ∂x3 V (t) where the first and the last term disappears due to the assumption of two-dimensional flow and that S (t) the flow is fully developed. This implies that u = C = 0, where the constant is seen to be zero from the V (t + ∆t) V (t) 2 boundary conditions. S (t−+ ∆t) The steady momentum equations read u n ∂u ∂u ∂p V (t + ∆t) ρu 1 + ρu 1 = + µ 2u 1 ∂x 2 ∂x ∂x 1 p 1 2 − 1 ∇  ∂u2 ∂u2 ∂p 2 T0, U0  ρu1 + ρu2 = + µ u2 ρg  ∂x1 ∂x2 −∂x2 ∇ − Tw  which, by applyingL the assumptions above, reduce to T0 U0 x2 Gradient fields L

wi ¨©¨©¨©¨©¨©¨©¨©¨©¨©¨©¨©¨©¨©¨©¨©¨©¨©¨©¨©¨©¨©¨ ∂ © © © © © © © © © © © © © © © © © © © © © p ∂xi h ui Divergence free vectorfields // to boundary p0 > p1

p1 x1

© © © © © © © © © © © © © © © © © © © © ©

© © © © © © © © © © © © © © © © © © © © ©

© © © © © © © © © © © © © © © © © © © © © © © © © © © © © © © © © © © © © © © © © ©

Figure 2.1: Plane channel geometry.

29 PSfrag replacements

x, x1 y, x2 z, x3 u, u1 v, u2 w, u3 x1 x2 0 xi 0 ˆ ri xi , t u x 0, tˆ i i  P tˆ= 0  x u1 u2 > u1 x1 x2 x3 0 xi ui dtˆ 0 dxi dui dtˆ ri dtˆ dr dtˆ i  P 1 P2 x1 x2 x3 R3 R2 R1 r3 r2 r1 π 2 + dϕ12 V (t) S (t) V (t + ∆t) V (t) S (t−+ ∆t) u n V (t + ∆t) p T0, U0 Tw L T0 U0 Gradient fields 30 wi CHAPTER 2. FLOW PHYSICS ∂p ∂xi ui Divergence free vectorfields // to boundary L h u x1 x2 p > p 0 1 n p1 dS

u n · ∆t Figure 2.2: Volume of fluid flowing through surface dS in time ∆t

2 ∂p d u1 0 = + µ 2 −∂x1 dx2 ∂p 0 = ρg −∂x2 −

The momentum equation in the x2-direction (or normal direction) implies ∂p dP p = ρgx2 + P (x1) = − ⇒ ∂x1 dx1

showing that the pressure gradient in the x1-direction (or streamwise direction) is only a function of x1. The momentum equation in the streamwise direction implies

2 dP d u1 0 = + µ 2 − dx1 dx2

Since P (x1) and u1 (x2) we have

2 d u1 1 dP 2 = = const. (independent of x1, x2) dx2 µ dx1

We can integrate u1 in the normal direction to obtain

1 dP 2 u1 = x2 + C1x2 + C2 2µ dx1

The constants can be evaluated from the boundary conditions u1 ( h) = 0, giving the parabolic velocity profile 

2 2 h dP x2 u1 = 1 2µ · dx1 − h     Evaluating the maximum velocity at the center of the channel we have

h2 dP umax = > 0 −2µ · dx1

if flow is in the positive x1-direction. The velocity becomes u x 2 1 = 1 2 umax − h   Flow rate From figure 2.2 we can evaluate the flow rate as dQ = u n dS. Integrating over the channel we find · h 2h3 dP 4 Q = uini dS = channel = u1 dx2 = = humax { } h − 3µ · dx1 3 ZS Z− PSfrag replacements

x, x1 y, x2 z, x3 u, u1 v, u2 w, u3 x1 x2 0 xi 0 ˆ ri xi , t u x 0, tˆ i i  P tˆ= 0  x u1 u2 > u1 x1 x2 x3 0 xi ui dtˆ 0 dxi dui dtˆ ri dtˆ dr dtˆ i  P 1 P2 x1 x2 x3 R3 R2 R1 r3 r2 r1 π 2 + dϕ12 V (t) S (t) V (t + ∆t) V (t) S (t−+ ∆t) u n V (t + ∆t) p T0, U0 Tw L T0 U0 Gradient fields wi ∂p ∂xi 2.1. EXACT SOLUTIONS 31 ui Divergence free vectorfields // to boundary y L h x1 x2 p0 > p1 p1 u n dS u n∆t · u0

p0               x

Figure 2.3: Stokes instantaneously plate.

Wall shear stress The wall shear stress can be evaluated from the velocity gradient at the wall. We have

du1 2µ umax x2 τ12 = τ21 = µ = · 2 · dx2 − h implying that

2µ umax τwall = τ x = h = 2 − h

Vorticity

The vorticity is zero in the streamwise and normal directions, i.e. ω1 = ω2 = 0 and has the following expression in the x3-direction (or spanwise direction)

∂u2 ∂u1 du1 2umax x2 ω3 = = = 2 · ∂x1 − ∂x2 − dx2 h

Stokes 1:st problem: instantaneously started plate Consider the instantaneously starting plate of infinite horizontal extent shown in figure 2.3. This is a time dependent problem where plate velocity is set to u = u0 at time t = 0. We assume that the velocity can be written u = u(y, t) which using continuity and the boundary conditions imply that normal velocity v = 0. The momentum equations reduce to

∂u 1 ∂p ∂2u = + ν ∂t −ρ ∂x ∂y2 1 ∂p 0 = g −ρ ∂y −

The normal momentum equation implies that p = ρgy + p0, where p0 is the atmospheric pressure at the plate surface. This gives us the following diffusion −equation, initial and boundary conditions for u

∂u ∂2u = ν ∂t ∂y2 u(y, 0) = 0 0 y ≤ ≤ ∞ u(0, t) = u0 t > 0 u( , t) = 0 t > 0 ∞

We look for a similarity solution, i.e. we introduce a new dependent variable which is a combination of y and t such that the partial differential equation reduces to an ordinary differential equation. Let 32 CHAPTER 2. FLOW PHYSICS

u f(η) = η = C y tb u0 · · where C and b are constants to be chosen appropriately. We transform the time and space derivatives according to

∂ ∂η d b 1 d = = Cbyt − ∂t ∂t dη dη ∂ ∂η d d = = Ctb ∂y ∂y dη dη ∂2 d2 = C2t2b ∂y2 dη2 If we substitute this into the equation for u and use the definition of η, we find an equation for f

2 1 df 2 2b d f bt− η = νC t dη dη2 where no explicit dependence on y and t can remain if a similarity solution is to exist. Thus, the coefficient of the two η-dependent terms have to be proportional to each other, we have

1 2 2b bt− = κνC t where κ is a proportionality constant. The exponents of these expressions, as well as the coefficients in front of the t-terms have to be equal. This gives 1 1 b = C = −2 √ 2κν − We choose κ = 2 and obtain the following − y f 00 + 2ηf 0 = 0 η = 2√νt d where 0 = dη . The boundary and initial conditions also have to be compatible with the similarity assumption. We have

u(y, 0) u(0, t) u( , t) = f( ) = 0 = f(0) = 1 ∞ = f( ) = 0 u0 ∞ u0 u0 ∞ This equation can be integrated twice to obtain

η ξ2 f = C1 e dξ + C2 Z0 Using the boundary conditions and the definition of the error-function, we have

η 2 2 f = 1 eξ dξ = 1 erf(η) − √π − Z0 This solution is shown in figure 2.4, both as a function of the similarity variable η and the unscaled normal coordinate y. Note that the time dependent solution is diffusing upward. From the velocity we can calculate the spanwise vorticity as a function of the similarity variable η and the unscaled normal coordinate y. Here the maximum of the vorticity is also changing in time, from the infinite value at t = 0 it is diffusing outward in time.

∂v ∂u u0 η2 ω3 = ωz = = e− ∂x − ∂y √πνt The vorticity is shown in figure 2.5, both as a function of the similarity variable η and the unscaled normal coordinate y. Note again that the time dependent solution is diffusing upward.

2.2 Vorticity and streamfunction

Vorticity is an important concept in fluid dynamics. It is related to the average of a fluid particle and the swirl present in the flow. However, a flow with circular streamlines may have zero vorticity and a flow with straight streamlines may have a non-zero vorticity. PSfrag replacements PSfrag replacements

x, x1 x, x1 y, x2 y, x2 z, x3 z, x3 u, u1 u, u1 v, u2 v, u2 w, u3 w, u3 x1 x1 x2 x2 PSfrag replacements 0 PSfrag replacements 0 xi xi x,0x1ˆ x,0x1ˆ ri xi , t ri xi , t y,0x2ˆ y,0x2ˆ ui xi , t ui xi , t z, x3  z, x3  P tˆ= 0 P tˆ= 0 u, u1  u, u1  v, u2x v, u2 x w, u3u1 w, u3u1 u > u u > u 2 x1 1 2 x1 1 x x x2 1 x2 1 0x 0x xi 2 xi 2 r x 0, tˆx3 r x 0, tˆ x3 i i 0 i i 0 u x 0, tˆxi u x 0, tˆxi i i  ˆ i i  ˆ P ui dt P ui dt tˆ= 0 0 tˆ= 0 0 dxi dxi x x duidtˆ duidtˆ u1 u1 ri dtˆ ri dtˆ u2 > u1 u2 > u1 dri dtˆ dri dtˆ x1  x1  P1 P1 x2  x2  P2 P2 x3 x3 0x1 0x1 xi xi x2 x2 ui dtˆ ui dtˆ 0x3 0x3 dxi dxi R3 R3 dui dtˆ dui dtˆ 2 2 ri dtˆR ri dtˆR 1 1 dr dtˆR dr dtˆR i  3 i  3 P r P r 1 2 1 2 Pr Pr 2r1 2r1 π x1 π x1 2 + dϕ12 2 + dϕ12 Vx(2t) Vx2(t) Sx(3t) Sx3(t) 3 3 V (t + ∆t) VR(t) V (t + ∆t) VR(t) 2 2 S (t−+R∆t) S (t−+R∆t) 1 1 R u R u r3 r3 2n 2 n V (t + ∆r t) V (t + r∆t) 1 1 r p r p π + dϕ π + dϕ 2 T ,12U 2 T ,12U V 0(t) 0 V 0(t) 0 T T S (t)w S (t) w V (t + ∆t) V (t)L V (t + ∆t) V (t)L T T S (t−+ ∆t) 0 S (t−+ ∆t) 0 U0 U0 Gradient fieldsu Gradient fieldsu n n wi wi V (t + ∆t∂)p V (t + ∆t∂)p ∂pxi ∂pxi ui ui T0, U0 T0, U0 Divergence free vectorfields // to boundary Divergence free vectorfields // to boundary Tw Tw LL LL T0h T0 h x1 x1 U0 U0 x x Gradient fields 2 Gradient fields 2 p0 > p1 p0 > p1 wi wi ∂pp1 ∂pp1 2.2.∂xVORTICITY AND STREAMFUNCTION ∂x 33 i u i u ui ui n n 8 Divergence free vectorfields // to boundary 2 Divergence free vectorfields // to boundary dS dS L 1.8 L 7 u n∆t 1.6 u n∆t · h · h 6 x 1.4 x

x1 x1 5 y 1.2 y x2y x2 η = √u0 1 y = η√4uν0t 4 p0 > p14νt p0 > p1 t 0.8 p0 p0 3 p1 py1 0.6 η = √4νt 2 u 0.4 u

1 y = η√4nνt 0.2 n dS 0 dS 0 t 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 u n∆t u u n∆t u · u0 · u0 Figurex 2.4: Velocity above the instantaneously started plate.x a) U as a function of the similarity variable y y η. b) U(y, t) for various times. u0 u0

8 p0 2 p0 η = y η = y √4νt 1.8 √4νt 7 u u 1.6 u0 u0 6 y = η√4νt 1.4 y = η√4νt 5 t 1.2 t 1 y4 η η 0.8 t y 3 0.6 ω˜(η) u0 ωz = · 2 √πνt 0.4 1 t 0.2 0 ωz√πνt 0 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 = ω˜(η) 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 u0 ωz√πνt ω˜(η) u0 = ω˜(η) ωz = · u0 √πνt Figure 2.5: Vorticity above the instantaneously started plate. a) ωz√πνt/u0 as a function of the similarity variable η. b) ωz(y, t) for various times.

Vorticity and The vorticity is defined mathematically as the of the velocity field as ω = u ∇ × In tensor notation this expression becomes

∂uk ωi = ijk ∂xj Another concept closely related to the vorticity is the circulation, which is defined as

Γ = ui dxi = uiti ds IC IC In figure 2.6 we show a closed curve C. Using Stokes theorem we can transform that integral to one over the area S as ∂u Γ =  n k dS = ω n dS ijk i ∂x i i ZS j ZS This allows us to find the following relationship between the circulation and vorticity dΓ = ωini dS, which can also be written dΓ = ω n dS i i Thus, one interpretation is that the vorticity is the circulation per unit area for a surface perpendicular to the vorticity vector.

Example 1. The circulation of an ideal vortex. Let the azimuthal velocity be given as uθ = C/r. We can calculate the circulation of this flow as 2π Γ = uθr dθ = C dθ = 2πC IC Z0 Thus we have the following relationship for the ideal vortex Γ u = θ 2πr PSfrag replacements

x, x1 y, x2 z, x3 u, u1 v, u2 w, u3 x1 x2 0 xi 0 ˆ ri xi , t u x 0, tˆ i i  P tˆ= 0  x u1 u2 > u1 x1 x2 x3 0 xi ui dtˆ 0 dxi dui dtˆ ri dtˆ dr dtˆ i  P 1 P2 x1 x2 x3 R3 R2 R1 r3 r2 r1 π 2 + dϕ12 V (t) S (t) V (t + ∆t) V (t) S (t−+ ∆t) u n V (t + ∆t) p T0, U0 Tw L T0 U0 Gradient fields wi ∂p ∂xi ui Divergence free vectorfields // to boundary L h x1 x2 p0 > p1 p1 u n dS u n∆t · x y u0 34 p0 CHAPTER 2. FLOW PHYSICS η = y √4νt u u0 y = η√4νt dxi = ti ds t η y ω˜(η) u ω = · 0 z √πνt t S C

Figure 2.6: Integral along a closed curve C with enclosed area S.

The ideal vortex has its name from the fact that its vorticity is zero everywhere, except for an infinite value at the center of the vortex.

Derivation of the Vorticity Equation We will now derive an equation for the vorticity. We start with the dimensionless momentum equations. We have ∂ui ∂ui ∂p 1 2 + uj = + ui ∂t ∂xj −∂xi Re∇ We slightly modify this equation by introducing the following alternative form of the non-linear term ∂u ∂ 1 u i = u u +  ω u j ∂x ∂x 2 j j ijk j k j i   this can readily be derived using tensor manipulation. We take the curl ( ∂ ) of the momentum pqi ∂xq equations and find

∂ ∂u ∂2 1 ∂ ∂2p 1 ∂u  i +  u u +  ( ω u ) =  +  2 i ∂t pqi ∂x pqi ∂x ∂x 2 j j pqi ∂x ijk j k − pqi ∂x ∂x Re pqi∇ ∂x  q  q i   q q i q

The second and the fourth terms are zero, since pqi is anti-symmetric in i, q and ∂xq∂xi is symmetric in i, q ∂2 pqi = 0 ∂xq∂xi The first term and the last term can be written as derivatives of the vorticity, and we now have the following from of the vorticity equation ∂ωp ∂ 1 2 + pqi (ijkωjuk) = ωp ∂t ∂xq Re∇ The second term in this equation can be written as ∂ ∂ ∂ ∂ ipqijk (ωj uk) = (δpj δqk δpkδqj ) (ωj uk) = (ωpuk) (ωj up) = ∂xq − ∂xq ∂xk − ∂xj

∂ωp ∂uk ∂ωj ∂up uk + ωp up ωj ∂xk ∂xk − ∂xj − ∂xj

2 Due to continuity ∂ωj =  ∂ uq = 0 and we are left with the relation ∂xj jpq ∂xj ∂xp

∂ ∂ωp ∂up ipqijk (ωj uk) = uk ωj ∂xq ∂xk − ∂xj Thus, the vorticity equation becomes

∂ωp ∂ωp ∂up 1 2 + uk = ωj + ωp ∂t ∂xk ∂xj Re∇ or written in vector-notation Dω 1 = (ω )u + 2ω Dt · ∇ Re∇ 2.2. VORTICITY AND STREAMFUNCTION 35

Components in Cartesian coordinates In cartesian coordinates the components of the vorticity vector in three-dimensions become e e e x y z ∂w ∂v ∂u ∂w ∂v ∂u ω = ∂ ∂ ∂ = e + e + e ∂x ∂y ∂z ∂y − ∂z x ∂z − ∂x y ∂x − ∂y z u v w      

For two-dimensional flow it is easy to see that this reduces to a non-zero vorticity in the spanwise direction, but zero in the other two directions. We have ∂v ∂u ω = 0, ω = 0, ω = x y z ∂x − ∂y This simplifies the interpretation and use of the concept of vorticity greatly in two-dimensional flow.

Vorticity and viscocity There exists a subtle relationship between flows with vorticity and flows on which viscous forces play a role. It is possible to show that ω = 0 viscous forces = 0 ∇ × 6 ⇐⇒ 6 This means that without viscous forces there cannot be a vorticity field in the flow which varies with the coordinate directions. This is expressed by the following relationship

∂τij 2 ∂ωk = µ ui = µijk ∂xj ∇ − ∂xj This can be derived in the following manner. We have

∂ωk ∂ ∂ µijk = µijkkmn un − ∂xj − ∂xj ∂xm 2 ∂ un = µ(δimδjn δinδjm) − − ∂xj ∂xm ∂2u = µ i ∂xj ∂xj = µ 2u ∇ i Terms in the two-dimensional vorticity equation In two dimensions the equation for the only non-zero vorticity component can be written

∂ω3 ∂ω3 ∂ω3 2 + u1 + u2 = ν ω3 ∂t ∂x1 ∂x2 ∇ We will take two examples elucidating the meaning of the terms in the vorticity equation. First the diffusion of vorticity and second the advection or transport of vorticity. Example 2. Diffusion of vorticity: the Stokes 1st problem revisited. From the solution of Stokes 1st problem above, we find that the vorticity has the following form

ω3 = ωz = ω(y, t) and that it thus is a solution of the following diffusion equation ∂ω ∂2ω = ν ∂t ∂y2 The time evolution of the vorticiy can be seen in figure 2.7, and is given by

u0 η2 y ω = e− , where η = √πνt 2√νt where the factor √νt can be identified as the diffusion length scale, where we have used the following dimensional relations L2 [ν] = , [t] = T [√νt] = L T ⇒ PSfrag replacements

x, x1 y, x2 z, x3 u, u1 v, u2 w, u3 x1 x2 0 xi 0 ˆ ri xi , t u x 0, tˆ i i  P tˆ= 0  PSfrag replacements x u1 x, x1 u2 > u1 y, x2 x1 z, x3 x2 u, u1 x3 v, u2 0 xi w, u3 ui dtˆ x1 dx 0 x i 2 du dtˆ x 0 i i r dtˆ r x 0, tˆ i i i dr dtˆ u x 0, tˆ i  i i  P P tˆ= 0 1  P2 x x1 u1 x2 u2 > u1 x3 x 1 R3 x 2 R2 x 3 R1 x 0 i r3 u dtˆ i r2 dx 0 i r1 ˆ π dui dt + dϕ12 ˆ 2 ri dt V (t) dr dtˆ i  S (t) P1 V (t + ∆t) V (t)  − P2 S (t + ∆t) x1 u x2 n x3 V (t + ∆t) R3 p 2 R T0, U0 1 R Tw r3 L 2 r T0 1 r U0 π + dϕ 2 12 Gradient fields V (t) wi S (t) ∂p ∂x V (t + ∆t) V (t) i − ui Divergence freeS (tv+ectorfields∆t) // to boundary u L n h V (t + ∆t) x1 p x2 T0, U0 p0 > p1 Tw p1 L u T 0 n U 0 dS Gradient fields u n∆t w i · x 36 ∂p CHAPTER 2. FLOW PHYSICS ∂xi y ui u0 8 Divergence free vectorfields // to boundary p0 η = y L √4νt 7 h u u0 6 x1 y = η√4νt x2 t 5 p0 > p1 η y 4 p 1 y t ω˜(η) u 3 u ω = · 0 z √πνt n 2 dS t 1 u n∆t

· 0 x 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 y ω u0 Figure 2.7: A sketch of the evolution of vorticity in Stokes 1st problem. p0 η = y √4νt v, y u u0 y = η√4νt t η y ω˜(η) u ω = · 0 z √πνt

t z }| ω = 0 6 { x, u

Figure 2.8: Stagnation point flow with a viscous layer close to the wall.

In this flow the streamlines are straight lines and therefore the non-linear term, or the transport/advection term, is zero. We now turn to an example where the transport of vorticity is important. Example 3. Transport/advection of vorticity: Stagnation point flow. The stagnation point flow is depicted in figure 2.8, and is a flow where a uniform velocity approaches a plate where it is showed down and turned to a flow parallel two the plates in both the positive and negative x-direction. At the origin we have a stagnation point. The inviscid stagnation point flow is given as follows u = cx ∂v ∂u inviscid: ω = ω = = 0 v = cy ⇒ z ∂x − ∂y  − Note that this flow has zero vorticity and that it does not satisfy the no-slip condition (u = v = 0, y = 0). In order to satisfy this condition we introduce viscosity, or equally, vorticity. Thus close to the plate we have to fulfill the equation ∂ω ∂ω ∂2ω ∂2ω u + v = ν + ∂x ∂y ∂x2 ∂y2   The two first terms represent advection or transport of vorticity. We will try a simple modification of the inviscid flow close to the boundary, which is written as

u = xf 0(y) v = f(y)  − This satisfies the continuity equation, and will be zero on the boundary and approach the inviscid flow far above the plate if we apply the following boundary conditions u = v = 0, y = 0 u cx, v cy, y  ∝ ∝ − → ∞ The vorticity can be written ω = xf 00(y). We introduce this and the above definitions of the velocity components into the vorticity equation,− and find

f 0f 00 + ff 000 + νf 0000 = 0 − PSfrag replacements

x, x1 y, x2 z, x3 u, u1 v, u2 w, u3 x1 x2 0 xi 0 ˆ ri xi , t u x 0, tˆ i i  P tˆ= 0  x u1 u2 > u1 x1 x2 x3 0 xi ui dtˆ 0 dxi dui dtˆ ri dtˆ dr dtˆ i  P 1 P2 x1 x2 x3 R3 R2 R1 r3 r2 r1 π 2 + dϕ12 V (t) S (t) V (t + ∆t) V (t) S (t−+ ∆t) u n V (t + ∆t) p T0, U0 Tw L T0 U0 Gradient fields wi ∂p ∂xi ui Divergence free vectorfields // to boundary L h x1 x2 p0 > p1 p1 u n dS u n∆t · x 2.2. VORTICITY AND STREAMFUNCTIONy 37 u0 p0 1.5 η = y √4νt F u u0 y = η√4νt F 0 t 1 η y F,ω˜F(η0), uF000 ω = · z √πνt t 0.5 η

F 00

0 0 1 η 2

Figure 2.9: Solution to the non-dimensional equation for stagnation point flow. F is proportional to the normal velocity, F 0 to the streamwise velocity and F 00 to the vorticity.

The boundary conditions become f = f 0 = 0 y = 0 f cy, f 0 c, y  ∝ ∝ → ∞ An integral to the equation exists, which can be written

2 2 f 0 ff 00 νf 000 = K = evaluate y = c − − { → ∞} This is as far as we can come analytically and to make further numerical treatment simpler we make the equation non-dimensional with ν and c. Note that they have the dimensions

L2 1 [ν] = , [c] = T T

and that we can use the length scale ν/c and the velocity scale √νc to scale the independent and the dependent variables as p y η = ν/c f(y) F (η) = p √νc

This results in the following non-dimensional equation

2 F 0 F F 00 F 000 = 1 − − with the boundary conditions F = F 0 = 0, η = 0 F η, η  ∝ → ∞ In figure 2.9 a solution of the equation is shown. It can be seen that diffusion of vorticity from the wall is balanced by transport downward by v and outward by u. The thin layer of vortical flow close to the wall has the thickness ν/c. ∼ p Stretching and tilting of vortex lines In three-dimensions the vorticity is not restricted to a single non-zero component and the three-dimensional vorticity equation governing the vorticity vector becomes

∂ωi ∂ωi ∂ui 1 2 + uj = ωj + ωi ∂t ∂xj ∂xj Re∇

advection of vorticity diffusion of vorticity | {z } | {z } PSfrag replacements

x, x1 y, x2 z, x3 u, u1 v, u2 w, u3 x1 x2 0 xi 0 ˆ ri xi , t u x 0, tˆ i i  P tˆ= 0  x u1 u2 > u1 x1 x2 x3 0 xi ui dtˆ 0 dxi dui dtˆ ri dtˆ dr dtˆ i  P 1 P2 x1 x2 x3 R3 R2 R1 r3 r2 r1 π 2 + dϕ12 V (t) S (t) V (t + ∆t) V (t) S (t−+ ∆t) u n V (t + ∆t) p T0, U0 Tw L T0 U0 Gradient fields wi ∂p ∂xi ui Divergence free vectorfields // to boundary L h x1 x2 p0 > p1 p1 u n dS u n∆t · x y 38 u0 CHAPTER 2. FLOW PHYSICS p0 η = y √4νt u u0 dr y = η√4νt t η y ω˜(η) u ω = · 0 z √πνt t C(t)

Figure 2.10: A closed material curve.

The complex motion of the vorticity vector for a full three-dimensional flow can be understood by an analogy to the equation governing the evolution of a material line, discussed in the first chapter. The equation for a material line is

D ∂ui dri = drj Dt ∂xj

Note that if we disregard the diffusion term, i.e. the last term of the vorticity equation, the two equations are identical. Thus we can draw the following conclusions about the development of the vortex vector

i) Stretching of vortex lines (line ω) produce ω like stretching of dr produces length k i i

ii) Tilting vortex lines produce ωi in one direction at expense of ωi in other direction

Helmholz and Kelvin’s theorems

The analogy with the equation for the material line directly give us a proof of Helmholz theorem. We have Theorem 1. Helmholz theorem for inviscid flow: Vortex lines are material lines in inviscid flow. A second theorem valid in inviscid flow is Kelvin’s theorem. Theorem 2. Kelvin’s theorem for inviscid flow: Circulation around a material curve is constant in inviscid flow.

Proof. We show this by considering the circulation for a closed material curve, see figure 2.10,

Γm = ui dri IC(t) We can evaluate the material time derivative of this expression with the use of Lagrangian coordinates as follows

DΓ D m = u dr Dt Dt i i IC(t) Lagrange coordinates 0 ˆ 0 ˆ = ui = ui(xi , t) = ui(xi (m), t)  0 ˆ 0 ˆ  ri = ri(xi , t) = ri(xi (m), t) d ∂ri =  ui dm dtˆ ∂m Im ∂ui ∂ri ∂ ∂ri = dm + ui dm ∂tˆ ∂m ∂tˆ ∂m Im Im   The last term of this expression will vanish since

∂ ∂ri ∂ui ∂ 1 ui dm = ui dm = uiui dm = 0 ∂tˆ ∂m ∂m ∂m 2 Im   Im Im   PSfrag replacements

x, x1 y, x2 z, x3 u, u1 v, u2 w, u3 x1 x2 0 xi 0 ˆ ri xi , t u x 0, tˆ i i  P tˆ= 0  x u1 u2 > u1 x1 x2 x3 0 xi ui dtˆ 0 dxi dui dtˆ ri dtˆ dr dtˆ i  P 1 P2 x1 x2 x3 R3 R2 R1 r3 r2 r1 π 2 + dϕ12 V (t) S (t) V (t + ∆t) V (t) S (t−+ ∆t) u n V (t + ∆t) p T0, U0 Tw L T0 U0 Gradient fields wi ∂p ∂xi ui Divergence free vectorfields // to boundary L h x1 x2 p0 > p1 p1 u n dS u n∆t · x y u0 2.2. VORTICITY ANDpSTREAMFUNCTION0 39 η = y √4νt u u0y, v y = η√4νt t u = (u, v) η y ω˜(η) u ω = · 0 z √πνt t dy

dx

x, u

Figure 2.11: A streamline which is tangent to the velocity vector.

Thus we find the following resulting expression

DΓ Du m = i dr Dt Dt i IC(t) ∂p 1 = + 2u dr −∂x Re∇ i i IC(t)  i  1 = 2u dr 0, Re Re ∇ i i → → ∞ IC(t) Which shows that the circulation for a material curve changes only if the viscous force = 0 6

Streamfunction

We end this section with the definition and some properties of the streamfunction. To define the stream- function we need the streamlines which are tangent to the velocity vector. In two dimensions, see figure 2.11, we have dx u dx dy = = u dy v dx = 0 dy v ⇐⇒ u v ⇐⇒ −

and in three dimensions we can write dx dy dz = = u v w For two-dimensional flow we can find the streamlines using a streamfunction. We can introduce a streamfunction ψ = ψ(x, y) with the property that the streamfunction is constant along streamlines. We can make the following derivation

∂ψ ∂ψ dψ = dx + dy ∂x ∂y ∂ψ ∂ψ = assume u = , v = and check for consistency ∂y − ∂x   = u dy v dx − = 0, on streamlines

We can also quickly check that the definition given above satisfies continuity. We have

∂u ∂v ∂2ψ ∂2ψ + = = 0 ∂x ∂y ∂x∂y − ∂y∂x

Another property of the streamfunction is that the volume flux between two streamlines can be found from the difference by their respective streamfunctions. We use figure 2.12 and figure 2.13 in the following derivations of the volume flux: PSfrag replacements

x, x1 y, x2 z, x3 u, u1 v, u2 w, u3 x1 x2 0 xi 0 ˆ ri xi , t u x 0, tˆ i i  P tˆ= 0  x PSfrag replacemenuts1 u2 > u1 x, x1 x1 y, x2 x2 z, x3 x3 u, u01 xi v, u2 ui dtˆ w, u03 dxi x1 dui dtˆ x2 ri dtˆ0 xi dri 0dtˆ ri xi , t  P u x 0, tˆ1 i i P P tˆ= 02 x1 x x2 u1 x3 u2 > u1 R3 x1 R2 x2 R1 x3 r0 xi r2 ui dtˆ r01 π + ddϕxi 2 12ˆ dVui(dt)t r dtˆ i S (t) dr dtˆ V (t + ∆t) i V (t) − P S (t + ∆t1) P u2 xn1 V (t + ∆xt2) xp3 3 T0,RU0 2 TRw 1 RL 3 Tr0 2 Ur0 r1 Gradienπ t fields + dϕ12 2 wi V ∂(tp) S∂(xti) V (t + ∆t) V (ut)i Divergence free vectorfields // to boundary S (t−+ ∆t) L u h xn V (t + ∆t1) x p2 p0 > p1 T0, U0 p1 Tw u L n T0 dS U0 u n∆t Gradient fields · x wi ∂py ∂x u0i pu0i Divergence free vectorfields // to bηoundary= y √4νt uL u0 y = η√4νht x 1t xη2 p > p CHAPTER 2. FLOW PHYSICS 40 0 y1 ω˜(η) up01 ωz = · √πνtu B nt Ψ = ΨB dS S u n∆t n · x y A u0 p0 Ψ = ΨA η = y √4νt u Figure 2.12: Integration paths between two streamlines. u0 y = η√4νt t η y ω˜(η) u0 ωz = · ds √πνt nx tdy

ny n = 1 | |

dx − Figure 2.13: The normal vector to a line element.

B QAB = uini ds ZA B = (nxu + nyv) ds ZA ds 1 ds 1 = = , = dy n − dx n  x y  B B = (u dy v dx) = dψ = ψ ψ − B − A ZA ZA 2.3 Potential flow

Flows which can be found from the gradient of a scalar function, a so called potential, will be dealt with in this section. Working with the velocity potential, for example, will greatly simplify calculations, but also restrict the validity of the solutions. We start with a definition of the velocity potential, then discuss simplifications of the momentum equations when such potentials exist, and finally we deal with two-dimensional potential flows, where analytic function theory can be used.

Velocity potential Assume that the velocity can be found from a potential. In three dimensions we have ∂φ ui = or u = φ ∂xi ∇ with the corresponding relations in two dimensions ∂φ u = ∂x   ∂φ  v = ∂y  There are several consequences of this definition of the velocity field. 2.3. POTENTIAL FLOW 41

i) Potential flow have no vorticity, which can be seen by taking the curl of the gradient of the velocity potential, i.e. 2 ∂uk ∂ φ ωi = ijk = ijk = 0 ∂xj ∂xj ∂xk

ii) Potential flow is not influenced by viscous forces, which is seen by the relationship between viscous forces and vorticity, derived earlier. We have

∂τij 2 ∂ωk = µ ui = µijk ∂xj ∇ − ∂xj

iii) Potential flow satisfies Laplace equation, which is a consequence of the divergence constraint applied to the gradient of the velocity potential, i.e.

∂u ∂2φ i = = 2φ = 0 ∂xi ∂xi∂xi ∇

Bernoulli’s equation For potential flow the velocity field can thus be found by solving Laplace equation for the velocity potential. The momentum equations can then be used to find the pressure from the so called Bernoulli’s equation. We start by rewriting the momentum equation

∂ui ∂ui 1 ∂p 2 + uj = + ν ui gδi3 ∂t ∂xj −ρ ∂xi ∇ − using the alternative form of the non-linear terms, i.e.

∂u ∂ 1 u i = u u  u ω j ∂x ∂x 2 k k − ijk j k j i   and obtain the following equation

∂u ∂ 1 p ∂ω i + u u + + gx =  u ω + ν k ∂t ∂x 2 k k ρ 3 ijk j k ijk ∂x i   j This equation can be integrated in for two different cases: potential flow (without vorticity) and sta- tionary inviscid flow with vorticity.

i) Potential flow. Introduce the definition of the velocity potential u = ∂φ into the momentum equation i ∂xi above, we have ∂ ∂φ 1 p + u u + + gx = 0 ∂x ∂t 2 k k ρ 3 ⇒ i   ∂φ 1 p + (u2 + u2 + u2) + + gx = f(t) ∂t 2 1 2 3 ρ 3 ii) Stationary, inviscid flow with vorticity. Integrate the momentum equations along a streamline, see figure 2.14. We have

∂ 1 p u t u u + + gx ds =  i u ω ds = 0 i ∂x 2 k k ρ 3 ijk u j k ⇒ Z i   Z 1 p (u2 + u2 + u2) + + gx = constant along streamlines 2 1 2 3 ρ 3 Thus, Bernoulli’s equation can be used to calculate the pressure when the velocity is known, for two different flow situations. Example 4. Ideal vortex: Swirling stationary flow without vorticity. The velocity potential u = φ in polar coordinates can be written ∇ ∂φ u = r ∂r   1 ∂φ  u = θ r ∂θ   PSfrag replacements

x, x1 y, x2 z, x3 u, u1 v, u2 w, u3 x1 x2 0 xi 0 ˆ ri xi , t u x 0, tˆ i i  P tˆ= 0  x u1 PSfrag replacemenu2 > uts1 x, x1 y, x2 z, x3 x 0 u, ui1 ˆ uv,i ud2t dx 0 w, ui3 ˆ dui xd1t r dtˆ i x2 0 dri dxtˆ i r x 0,Ptˆ i i 1 u x 0,Ptˆ i i 2 P tˆ= x01  x2 x x3 u1 3 u2 >Ru1 2 Rx1 1 Rx2 3 xr3 02 xri r1ˆ π ui dt 2 + dϕ120 dxi V (t) dui dtˆ S (t) ri dtˆ V (t + ∆t) V (t) dr dtˆ S (t−i+∆t) P1 u P2 n V (t + ∆xt1) x p2 x3 T0, U0 R3 Tw R2 L R1 T0 r3 U0 r2 Gradient fields r1 π wi 2 + dϕ∂12p V ∂(xti) S (ut)i Divergence free vectorfieldsV (//t +to∆bt)oundaryV (t) S (t−+ ∆tL) uh xn1 V (t + ∆xt2) p0 > pp1 p T0, U10 Tuw Ln dTS0 u n∆Ut · 0 Gradient fieldsx y wi ∂up0 ∂xi p0 η = yui √4νt Divergence free vectorfields // to boundaryu 42 CHAPTER 2. FLOW PHYSICS uL0 y = η√4νt h t u x1 η x2 y pω˜0(>η) up1 ω = · 0 z √πνpt1 ut n t = u dS u u n∆t Figure 2.14: In·tegrationx of the momentum equation along a streamline. y u0 r p0 η = y √4νt u u0 y = η√4νt t η y ω˜(η) u ω = · 0 z √πνt t

Figure 2.15: Streamlines for the ideal vortex.

The velocity potential satisfies Laplace equation, which in polar coordinates becomes 1 ∂ 1 ∂φ 1 ∂2φ 2φ = + = 0 ∇ r ∂r r ∂r r ∂θ2   ∂φ The first term vanishes since ∂r = ur = 0. Integrate the resulting equation twice and we find φ = Cθ + D The constant D is arbitrary so we can set it to zero. Using the definition of the circulation we find C Γ u = , C = θ r 2π We can easily find the streamfunction for this flow. In polar coordinates the streamfunction is defined 1 ∂ψ u = r r ∂θ   ∂ψ  u = θ − ∂r  Note that the streamfunction satisfies continuity, i.e. u = 0. We use the solution from the velocity potential to find the streamfunction, we have ∇ · ∂ψ Γ Γ = ψ = ln r ∂r −2πr ⇒ −2π The streamfunction is constant along streamlines resulting in circular streamlines, see figure 2.15 We can now use Bernoulli’s equation to calculate the pressure distribution for the ideal vortex as

2 1 2 Γ uθ + p = p p = p 2 ∞ ⇒ ∞ − 8π2r2 Note that the solution has a singularity at the origin.

Two-dimensional potential flow using analytic functions For two-dimensional flows we can use analytic function theory, i.e. complex valued functions, to calculate the velocity potential. In fact, as we will show in the following. Any analytic function represents a two- dimensional potential flow. 2.3. POTENTIAL FLOW 43

We start by showing that both the velocity potential and the streamfunciton satisfy Laplace equation. Velocity potential φ for two-dimensional flow is defined ∂φ u = ∂x   ∂φ  v = ∂y  Using the continuity equation gives  ∂u ∂v + = 2φ = 0 ∂x ∂y ∇ The streamfunction ψ is defined ∂ψ u = ∂y    ∂ψ  v = − ∂x By noting that potential flow has no vorticity we find  ∂v ∂y ω = + = 2ψ = 0 − −∂x ∂y ∇ Thus, both the velocity potential φ and the streamfunction ψ satisfy Laplace equation. We can utilize analytic function theory by introducing the complex function F (z) = φ(x, y) + iψ(x, y) where z = x + iy = reiθ = r(cos θ + i sin θ) which will be denoted the complex potential. We now recall some useful results from analytic function theory.

F 0(z) exists and is unique F (z) is an analytic function ⇐⇒ The fact that a derivative of a complex function should be unique rests on the validity of the Cauchy– Riemann equations. We can derive those equations by requiring that a derivative of a complex function should be the same independent of the direction we take the limit in the complex plane, see figure 2.16. We have 1 F 0(z) = lim [F (z + ∆z) F (z)] ∆z 0 ∆z → − 1 = lim [φ(x + ∆x, y) φ(x, y) + iψ(x + ∆x, y) iψ(x, y)] ∆x 0 ∆x − − → 1 = lim [φ(x, y + ∆y) φ(x, y) + iψ(x, y + ∆y) iψ(x, y)] i∆y 0 i∆y − − → ∂φ ∂ψ = real part ∂x ∂y  ⇒  ∂ψ 1 ∂φ ∂ψ ∂φ  i = = imaginary part ∂x i ∂y ⇒ ∂x − ∂y  Thus we have the Cauchy–Riemann equations as a necessary requirement for a complex function to be analytic, i.e. ∂φ ∂ψ ∂φ ∂ψ = and = ∂x ∂y ∂y − ∂x Using the Cauchy-Riemann equations we can show that the real φ and imaginary part ψ of the complex potential satisfy Laplace equations and thus that they are candidates for identification with the velocity potential and streamfunction of a two-dimensional potential flow. We have ∂2φ ∂ ∂ψ ∂ ∂ψ ∂2φ = = = ∂x2 ∂x ∂y ∂y ∂x − ∂y2        ∂2ψ ∂ ∂φ ∂ ∂φ ∂2ψ  = = = ∂y2 ∂y ∂x ∂x ∂y − ∂x2        PSfrag replacements

x, x1 y, x2 z, x3 u, u1 v, u2 w, u3 x1 x2 0 xi 0 ˆ ri xi , t u x 0, tˆ i i  P tˆ= 0  x u1 u2 > u1 x1 x2 x3 0 xi ui dtˆ 0 dxi dui dtˆ ri dtˆ dr dtˆ i  P 1 P2 x1 x2 x3 R3 R2 R1 r3 r2 r1 π 2 + dϕ12 V (t) S (t) V (t + ∆t) V (t) S (t−+ ∆t) u n V (t + ∆t) p T0, U0 Tw L T0 U0 Gradient fields wi ∂p ∂xi ui Divergence free vectorfields // to boundary L h x1 x2 p0 > p1 p1 u n dS u n∆t 44 · x CHAPTER 2. FLOW PHYSICS y u0 iy p0 η = y √4νt u u0 y = η√4νt t η y ω˜(η) u ω = · 0 z √πνt t x |

i∆y {z ∆x } | {z }

Figure 2.16: The complex plane and the definitions of analytic functions.

In addition to satisfying the Laplace equations, we also have to show that the Cauchy-Riemann equations are consistent with the definition of the velocity potential and the streamfunciton. The Cauchy–Riemann equations are ∂φ ∂ψ u = = ∂x ∂y   ∂φ ∂ψ  v = = ∂y − ∂x  which recovers the definitions of the velocity potential and the streamfunction. Thus any analytic complex function can be identified with a potential flow, where the real part is the velocity potential and the imaginary part is the streamfunction. We can now define the complex velocity as the complex conjugate of the velocity vector since

dF ∂φ ∂ψ W (z) = = + i = u iv dz ∂x ∂x − It will be useful to have a similar relation for polar coordinates, see figure 2.17. In this case we have

u = ur cos θ uθ sin θ v = u sin θ +−u cos θ  r θ iθ W (z) = u iv = [u (r, θ) iu (r, θ)] e− − r − θ cos θ i sin θ − We will now take several examples of how potential velocity fields|can{z} be found from analytic functions. iα Example 5. Calculate the velocity field from the complex potential F = Ue− z. The complex velocity becomes iα W (z) = F 0 = Ue− = U(cos α i sin α) − which gives us the solution for the velocity field in physical variables, see figure 2.18, as

u = U cos α v = U sin α 

Example 6. Calculate the velocity field from the complex potential F = Azn. In polar coordinates the complex potential becomes Arneinθ = Arn cos(nθ) + iArn sin(nθ) Thus the velocity potential and the streamfunction can be identified as

φ = Arn cos(nθ) ψ = Arn sin(nθ)  PSfrag replacements

x, x1 y, x2 z, x3 u, u1 v, u2 w, u3 x1 x2 0 xi 0 ˆ ri xi , t u x 0, tˆ i i  P tˆ= 0  x u1 u2 > u1 x1 x2 x3 0 xi ui dtˆ 0 dxi dui dtˆ ri dtˆ dr dtˆ i  P 1 P2 x1 x2 x3 R3 R2 R1 r3 r2 r1 π 2 + dϕ12 V (t) PSfrag replacemenS (tst) V (t + ∆t) V (t) x, x1 S (t−+ ∆t) y, x2 z, xu3 u, un1 V (t + ∆t) v, u2 p w, u3 T0, U0 x1 Tw x2 0 xiL 0 Tˆ0 ri xi , t u x 0,Utˆ0 i i  GradienP ttˆfields= 0 wi ∂px ∂uxi u1 u > u i Divergence free vectorfields // to boundary2 1 x1 L x2 h x3 x10 xi x2 ui dtˆ p0 > p01 dxi p1 dui dtˆ u ri dtˆ n 2.3. POTENTIAL FLOdWri dtˆ dS 45 P1 u n∆Pt · x2 xy1 x2 u0 x3 p0 η = yR3 √4νt Ru2 u01 y y = η√4Rνt r3 2t v rη r1 π y 2 +ω˜(dη)ϕu12 ω = · 0 z √Vπν(tt) u˜

S (t)t uθ V (t + ∆t) V (t) S (t−+ ∆t) u u r u n V (t + ∆t) r p T0, U0 θ Tw L x T0 FigureU0 2.17: The definition of polar coordinates. Gradient fields wi ∂p ∂xi ui Divergence free vectorfields // to boundary L h x1 x2 p0 > p1 p1 u n dS u n∆t · x y u0 p0 η = y √4νt u u0 y = η√4νt α t η y ω˜(η) u ω = · 0 z √πνt t

Figure 2.18: Constant velocity at an angle α. PSfrag replacements

x, x1 y, x2 z, x3 u, u1 v, u2 w, u3 PSfrag replacements x1 x, x12 0 y,xxi2 0 ˆ ri xiz, xt 3 u x u,0, utˆ1 i i  P tˆ=v, u02 w, u x3 x1 u1 x2 u2 > u01 xi 0 xˆ1 ri xi , t 0 x2 ui x , tˆ i x3 P tˆ= 00 xi ui dxtˆ 0 dxui1 u2d>ui ud1tˆ ri dxtˆ1 dri dxtˆ2 x P13 x 0 Pi2 u dtˆ i x1 dx 0 xi2 du dtˆ i x3 r dtˆ i R3 dr dtˆ2 i R P R1 P r23 xr12 xr21 π 2 + dϕx123 V R(t3) S R(t2) V (t + ∆t) V R(t1) − S (t + ∆rt3) ru2 r1 π n V2(+t +d∆ϕ12t) V (tp) T0S, (Ut0) V (t + ∆t) V T(t) − w S (t + ∆tL) Tu0 Un0 GradienV (tt+fields∆t) wpi ∂p PSfrag replacemenT0, Uts0 ∂xi x,Txw1 ui Divergence free vectorfields // to boundaryy, xL2 z, Tx L03 u,Uu h01 v, u2 Gradient fieldsx1 w, wu3i x2 ∂xp p0 >∂px1i x pu12i x 0 Divergence free vectorfields // to boundaryiu r x 0, tˆ i i Ln u x 0, tˆ i i dSh P tˆ= 0 u n∆x1t · x x2 p0 > upy1 u2 > up10 xpu01 η = y √4xνn2t 46 u CHAPTER 2. FLOW PHYSICS dxuS03 0 y =uη√n4x∆νi t · Ψ = 0 ui dxtˆ 0t dxiηy Ψ = 0 dui udy0tˆ ω˜(η) uˆ0 ω =ri d·tp0 z η =√πνyt dri √d4tˆνt ut π Pu01 √  n y = η 4Pν2t Ψ = 0 x1t η x2 Figure 2.19: Flow towards a corner. xy3 ω˜(η) u ω = · 03 z √πνRt

2  Rt  Ψ = 0 R1 r3 r2Figure 2.20: Uniform flow over a flat plate. r1 π 2 + dϕ12 and we can calculate the complexV (t) velocity as S (t) n 1 W (z) = F 0 = nAz − V (t + ∆t) V (t) n 1 inθ iθ S (t−+ ∆t) = nAr − e e− n 1 iθ u = nAr − [cos(nθ) + i sin(nθ)]e− This gives us the solution for then velocity in polar coordinates as V (t + ∆t) n 1 p ur = nAr − cos(nθ) n 1 T , U u = nAr − sin(nθ) 0 0  θ − T This is a flow which approachesw a corner, see figure 2.19. The streamfunction is zero on the walls and on the stagnation point streamline.L By solving for the zero streamlines we can calculate the angle between a T wall aligned with the x-axis and0 the stagnation point streamline. We have U0 πk Gradient fields ψ = Arn sin(nθ) = 0 θ = wi ⇒ n ∂p Figure 2.20 shows the uniform∂xi flow over a flat plate which results when n = 1. Figure 2.21 shows the stagnationui point flow when n = 2. Here the analysis can be done in Cartesian Divergence cofreeordinatesvectorfields // to boundary

L 2 h F = Az x1 W (z) = F 0 = 2Az x2 = 2A(x + iy) p > p 0 1 u = 2Ax p1 ⇒ v = 2Ay u  − n Figure 2.22 shows the flow towards a wedge when 1 n 2. The velocity along the wedge edge (x axis dS in figure 2.22) is ≤ ≤ u n∆tn 1 n 1 n 1 ur =·nAr − cos(nθ) θ = 0 u = ur = nAr − = Cx − x ⇒ { } ⇒ The wedge angle is y 2π n 1 u0 ϕ = 2π = 2π − p0 − n n η = y √4νt u u0 y = η√4νt t η y ω˜(η) u ω = · 0

z √πνt



  t 

Figure 2.21: Stagnation point flow when n = 2. PSfrag replacements

x, x1 y, x2 z, x3 u, u1 v, u2 w, u3 x1 x2 0 xi 0 ˆ ri xi , t u x 0, tˆ i i  P tˆ= 0  x u PSfrag replacemen1 ts u2 > u1 x, x1 x1 y, x2 x2 z, x3 x3 0 u, u1 xi v, u2 ui dtˆ 0 w, u3 dxi x dui dtˆ 1 x ri dtˆ 2 x 0 dr dtˆ i i  0 ˆ riPxi , t 1 0 ˆ ui xi , t P2  P tˆ= 0 x1  x2 x x3 u1 Ru23 > u1 R2 x1 R1 x2 3 x3 r 0 r2 xi ˆ r1 ui dt π dx 0 2 + dϕ12 i V (t)dui dtˆ S (rt)i dtˆ dr dtˆ V (t + ∆t) V (t)i  S (t−+ ∆t) P 1 u P2 n x1 V (t + ∆t) x2 p x3 T0, U0 R3 Tw R2 L R1 T0 r3 U0 r2 Gradient fields r1 π 2 w+i dϕ12 ∂p V (t) ∂xi S (t) ui Divergence free vectorfields // Vto(bt oundary+ ∆t) V (t) S (t−+ ∆t) L h u x1 n V (t + ∆t) x2 p0 > p1 p p1T0, U0 u Tw n L dS T0 u n∆t U0 Gradien· txfields y wi ∂p u0 ∂xi 2.3. POTENTIAL FLOW p0 ui 47 η = y Divergence free vectorfields // to √boundary4νt u u0 L y = η√4νt h t x1 η x2 py0 > p1 ϕ ω˜(η) u ω = · 0 p1 z √πνt u t n dS Figureu n2.22:∆t The flow over a wedge when 1 n 2. · x ≤ ≤ y u0 p0 η = y √4νt u u0 y = η√4νt t η y ω˜(η) u ω = · 0 z √πνt t

Figure 2.23: Line source.

We now list several other examples of potential flow fields obtained from analytic functions. Example 7. Line source. m F (z) = ln z 2π m = ln(reiθ) 2π m = [ln r + iθ] 2π The velocity potential and the streamfunction become m φ = ln r 2π   m  ψ = θ 2π  The complex velocity can be written as 

m m iθ W (z) = F 0 = = e− 2πz 2πr which gives the solution in polar coordinates, see figure 2.23, as m u = r 2πr   uθ = 0

We can now calculate the volume flux from thesource as 2π m Q = r dθ = m 2πr Z0

Example 8. Line vortex. Γ F (z) = i ln z − 2π Γ = [θ i ln r] 2π − PSfrag replacements

x, x1 y, x2 z, x3 u, u1 v, u2 w, u3 x1 x2 0 xi 0 ˆ ri xi , t u x 0, tˆ i i  P tˆ= 0  x u1 u2 > u1 x1 x2 x3 0 xi ui dtˆ 0 dxi dui dtˆ ri dtˆ dr dtˆ i  P 1 P2 x1 x2 x3 R3 R2 R1 r3 r2 r1 π 2 + dϕ12 V (t) S (t) V (t + ∆t) V (t) S (t−+ ∆t) u n V (t + ∆t) p T0, U0 Tw L T0 U0 Gradient fields wi ∂p ∂xi ui Divergence free vectorfields // to boundary L h x1 x2 p0 > p1 p1 u n dS 48 CHAPTER 2. FLOW PHYSICS u n∆t · x y u0 p0 η = y √4νt u u0 y = η√4νt t η y ω˜(η) u ω = · 0 z √πνt t

Figure 2.24: Ideal vortex.

The velocity potential and the streamfunction become Γ φ = θ 2π   Γ  ψ = ln r −2π  The complex velocity can be written as 

Γ iθ W (z) = F 0 = i e− − 2πr which gives the solution in polar coordinates, see figure 2.24, as

ur = 0

 Γ  u =  θ 2πr  Example 9. The dipole has the complex potential m F (z) = πz Example 10. The potential flow around a cylinder has the complex potential

r2 F (z) = Uz + U 0 z Example 11. The potential flow around a cylinder with circulation has the complex potential

r2 Γ z F (z) = Uz + U 0 i ln z − 2π r0 Example 12. . The inviscid flow around some airfoils can be calculated with conformal mappings of solutions from cylinder with circulation.

2.4 Boundary layers

For flows with high Reynolds number Re, where the viscous effects are small, most of the flow can be considered inviscid and a simpler set of equations, the Euler equations, can be solved. The Euler equations are obtained if Re in the Navier-Stokes equations. However, the highest derivatives are present in the viscous terms, th→us∞a smaller number of boundary conditions can be satisfied when solving the Euler equations. In particular, the no flow condition can be satisfied at a solid wall but not the no slip condition. In order to satisfy the no slip condition we need to add the viscous term. Thus, there will be a layer close to the solid walls where the viscous terms are important even for very high Reynolds number flow. This layer will be very thin and the flow in that region is called flow. PSfrag replacements

x, x1 y, x2 z, x3 u, u1 v, u2 PSfrag wreplacemen, u3 ts

x1 x, x1 x2 y, x2 x 0 i z, x3 r x 0, tˆ i i u, u1 u x 0, tˆ i i  v, u2 P tˆ= 0 w, u  3 x x 1 u1 x2 0 u2 > u1 xi 0 ˆ xr1i xi , t xu x 0, tˆ 2i i  x3P tˆ= 0 x 0  i x u dtˆ  i u1 dx 0 i u2 > u1 du dtˆ i x1 ri dtˆ x2 dr dtˆ i  x3 P x 0 1 i P2 ui dtˆ 0 x1 dxi x2 dui dtˆ x3 ri dtˆ 3 R dri dtˆ 2  R P1 1  R P2 3 r x1 2 r x2 1 r x3 π + dϕ 2 12 R3 V (t) R2 S (t) R1 V (t + ∆t) V (t) r3 S (t−+ ∆t) r2 u r1 π n2 + dϕ12 V (t + ∆t) V (t) p S (t) V (tT+0,∆Ut0) V (t) − TSw(t + ∆t) L u T0 n UV0(t + ∆t) Gradient fields p wi T , U ∂p 0 0 ∂xi Tw ui L Divergence free vectorfields // to boundary T0 L U0 Gradienh t fields x1 wi x ∂p 2 ∂xi p > p 0 1 ui Divergence free vectorfields // topb1oundary u L n h dS x1 u n∆t x · 2 x p0 > p1 y p1 u0 u p0 n η = y √4νt u dS u0 u n∆t y = η√4νt · x t y 2.4. BOUNDARY LAYERS 49 η u0 y p0 ω˜(η) u y · 0η = ωz = √ √4νt πνt u }δ t u0 ω 0√ y =≈η 4νt U t → η y L ω˜(η) u ω = · 0 z √πνt Figure 2.25: Estimatetof the viscous region for an inviscid vorticity free inflow in a plane channel. Ly, v }δ ω 0 U U≈ → δ

x, u L

Figure 2.26: Boundary layer profile close to a solid wall.

We begin this section by estimating the thickness of the viscous region in channel with inviscid inflow (zero vorticity), see figure 2.25. By analogy to the Stokes solution for the instantaneously starting plate, we can estimate the distance the vorticity has diffused from the wall toward the channel centerline as δ √νts. Where ts is time of a L ∼ fluid particle with velocity U has travelled length L, i.e. t = . Thus we can estimate δ/L as s U

δ √νt 1 νL 1/2 ν 1/2 1 = s = = = 0 as Re ⇒ L L L U UL √Re → → ∞     We will now divide the flow into a central/outer inviscid part and a boundary layer part close to walls, where the no slip condition is fulfilled. Since we expect this region to be thin for high Reynolds numbers, we expect large velocity gradients near walls. We choose different length scales inside boundary layer and in inviscid region as indicated in figure 2.26, as Inviscid : U velocity scale for u, v : L length scale for x, y

BL : U velocity scale for u : α velocity scale for v : L length scale for x : δ length scale for y

The pressure scale is assumed to be ρU 2 for both the inner and the outer region. The unknown velocity scale for the normal velocity α is determined using continuity

∂u ∂v + = 0 ∂x ∂y U α O O|{z} L  |{z} δ    which implies that

U α δ = α = U L δ ⇒ L In this manner both terms in the continuity equation have the same size. Let us use these scalings in the steady momentum equations and disregard small terms. We obtain the following estimates for the size of the terms in the normal momentum equation 50 CHAPTER 2. FLOW PHYSICS

∂v ∂v 1 ∂p ∂2v ∂2v y : u + v = + ν + ν ↑ ∂x ∂y −ρ ∂y ∂x2 ∂y2

1 δU δU 1 δU 2 ν δU U U ν δU · L L L · δ · L δ L2 · L δ2 L δ 2 δ 2 1 δ 2 1 1 L L Re L Re       where the last line was obtained by dividing all the terms on the second line by U 2/δ. When R and δ/L is small, only pressure term (1), which implies that → ∞ O ∂p = 0 p = p(x) ∂y ⇒ Thus, the pressure is constant through the boundary layer, given by the inviscid outer solution. Next we estimate the size of the terms in the streamwise momentum equation as

∂u ∂u 1 ∂p ∂2u ∂2u x : u + v = + ν + ν → ∂x ∂y −ρ ∂x ∂x2 ∂y2 U 2 δU U U 2 ν ν U U L L · δ L L2 · δ2 1 1 L 2 1 1 1 Re Re · δ   The first three terms are order one and the fourth term negligible when the Reynolds number become large. In order to keep the last term, the only choice that gives a consistent approximation, we have to assume that

δ 1 L ∼ √Re which is the same estimate as we found for the extent of the boundary layer in the channel inflow case. Thus we are left with the parabolic equation in x since the second derivative term in that direction is neglected. We have

∂u ∂u 1 ∂p ∂2u u + v = + ν ∂x ∂y −ρ ∂x ∂y2 In summary, the steady boundary layer equations for two-dimensional flow is

∂u ∂u 1 ∂p ∂2u u + v = + ν ∂x ∂y −ρ ∂x ∂y2  ∂u ∂v  + = 0  ∂x ∂y with the initial (IC) and boundary conditions (BC) IC : u (x = x0, y) = uin (y) BC : u (x, y = 0) = 0 v (x, y = 0) = 0 u (x, y ) = u (x) outer inviscid flow → ∞ e

where the initial condition is at x = x0 and the equations are marched in the downstream direction. There are several things to note about these equations. First, vin cannot be given as its own initial condition. By using continuity one can show that once the u0 is given the momentum equation can be written in the form ∂v + f (y) v = g (y) −∂y which can be integrated in the y-direction to give the initial normal velocity. Second, the system of equations is a third order system in y and thus only three boundary conditions can be enforced. We have the no flow and the no slip conditions at the wall and the u = ue in the free stream. Thus no boundary condition for v in the free stream can be given. PSfrag replacements

x, x1 y, x2 z, x3 u, u1 v, u2 w, u3 x1 x2 0 xi 0 ˆ ri xi , t u x 0, tˆ i i  P tˆ= 0  x u1 u2 > u1 x1 x2 x3 0 xi ui dtˆ 0 dxi dui dtˆ ri dtˆ dr dtˆ i  P 1 P2 x1 x2 x3 R3 R2 R1 r3 r2 r1 π 2 + dϕ12 V (t) S (t) V (t + ∆t) V (t) S (t−+ ∆t) u n V (t + ∆t) p T0, U0 Tw L T0 U0 Gradient fields wi ∂p ∂xi ui Divergence free vectorfields // to boundary L h x1 x2 p0 > p1 p1 u n dS u n∆t · x y u0 p0 η = y √4νt u u0 y = η√4νt t η y ω˜(η) u ω = · 0 z √πνt t L 2.4. BOUNDARY LAYERS}δ 51 ω 0 U≈ u0 u0 y→, v x, u

L



  U  δ

Figure 2.27: Boundary layer flow over a flat plate with zero pressure gradient.

Third, ue(x) = uinv(x, y = 0), i.e. the boundary layer solution in the free stream approaches the inviscid solution evaluated at the wall, since the thickness of the boundary layer is zero from the inviscid point of view. Fourth, the pressure gradient term in the momentum equation can be written in terms of the edge velocity ue using the Bernoulli equation. We have 1 p (x) + ρu2 (x) = const 2 e which implies that 1 dp du = u e −ρ dx e dx

Blasius flow over flat plate Consider the boundary layer equations for a flow over a flat plate with zero pressure gradient, i.e. the outer inviscid flow is ue (x) = u0. The boundary layer equations become

∂u ∂u ∂2u u + v = ν ∂x ∂y ∂y2  ∂u ∂v  + = 0  ∂x ∂y

IC : u (x = x0, y) = u0  BC : u (x, y = 0) = 0 v (x, y = 0) = 0 u (x, y ) = u → ∞ 0 We introduce the two-dimensional Ψ ∂Ψ ∂Ψ u = , v = ∂y − ∂x which implicitly satisfies continuity. The boundary layer equations become

∂Ψ ∂2Ψ ∂Ψ ∂2Ψ ∂3Ψ = ν ∂y · ∂x∂y − ∂x · ∂y2 ∂y3 with appropriate initial and boundary conditions.

Similarity solution We will now look for a similarity solution. Let ∂Ψ y u = = u f 0 (η) , η = ∂y 0 δ (x) which by integration in the y-direction implies

Ψ (x, y) = u0δ (x) f (η) We can now evaluate the various terms in the momentum equation. We give two below

∂Ψ ∂η y v = = u δ0f + δf 0 = u δ0f f 0δ0 = u (ηf 0 f) δ0 − ∂x − 0 ∂x − 0 − δ 0 −     PSfrag replacements

x, x1 y, x2 z, x3 u, u1 v, u2 w, u3 x1 x2 0 xi 0 ˆ ri xi , t u x 0, tˆ i i  P tˆ= 0  x u1 u2 > u1 x1 x2 x3 0 xi ui dtˆ 0 dxi dui dtˆ ri dtˆ dr dtˆ i  P 1 P2 x1 x2 x3 R3 R2 R1 r3 r2 r1 π 2 + dϕ12 V (t) S (t) V (t + ∆t) V (t) S (t−+ ∆t) u n V (t + ∆t) p T0, U0 Tw L T0 U0 Gradient fields wi ∂p ∂xi ui Divergence free vectorfields // to boundary L h x1 x2 p0 > p1 p1 u n dS u n∆t · x y u0 p0 η = y √4νt u u0 y = η√4νt t η y ω˜(η) u ω = · 0 z √πνt CHAPTER 2. FLOW PHYSICS 52 t L Blasius profile }δ 5 ω 0 ≈ U 4 y→, v

x, u 3 η = y L √νx/u0

U 2 δ u0 1

0 0 0.2 0.4 0.6 0.8 1 u f 0 = u0

Figure 2.28: Similarity solution giving the Blasius boundary layer profile.

∂2Ψ η = u f 00 δ0 ∂x∂y − 0 δ If these and the other corresponding terms are introduced into the momentum equation we have the following equation for f

2 η 2 f 00δ0 f 000 u f 0f 00 δ0 + u (ηf 0 f) = νu − 0 δ 0 − δ 0 δ2 which can be simplified to

u0δδ0 f 000 + ff 00 = 0 ν

For a similarity solution to be possible, the coefficient in front of the ff 00 term has to be constant. This implies

u0δδ0 1 1 ν dx 1 2 1 νx = δδ0 dx = δ = ν 2 ⇒ 2 u ⇒ 2 2 u Z Z 0 0 νx which implies that δ (x) = , where we have chosen the constant of integration such that δ = 0 u0 when x = 0. We are left with ther Blasius equation and boundary conditions 1 f 000 + ff 00 = 0 2

f (0) = f (0) = 0 BC : 0 f 0 ( ) = 1  ∞ The numerical solution to the Blasius equation gives the self-similar velocity profile seen in figure 2.28. The boundary layer thickness can be evaluated as the height where the velocity has reached 99% of the free stream value. We have

δ99 νx f 0 (η99) = 0.99 η99 = = 4.9 δ99 = 4.9 ⇒ νx ⇒ u0 u0 r q where it can be seen that the boundary layer thickness grows as √x.

Displacement thickness and skin friction coefficient

Another measure of the boundary layer thickness is the displacement δ∗ of the wall needed in order to have the same volume flux of the inviscid flow as for the flow in the boundary layer. With the help of figure 2.29 we can evaluate this as

y0 y y u dy u0 dy = u0 dy δ∗u0 ≡ ∗ − Z0 Zδ Z0 which implies that PSfrag replacements

x, x1 y, x2 z, x3 u, u1 v, u2 w, u3 x1 x2 0 PSfrag replacements xi r x 0, tˆ x, x i i 1 0 ui x , tˆ y, x2 i  P tˆ= 0 z, x3  u, u1 x v, u2 u1 w, u3 u2 > u1 x1 x1 x2 x2 0 xi x3 0 ˆ 0 ri xi , t xi 0 ˆ ui x , tˆ ui dt i  0 P tˆ= 0 dxi  du dtˆ x i  ri dtˆ u1 dri dtˆ u2 > u1  P x1 1 P x2 2 x3 x1 0 xi x2 ui dtˆ x3 0 3 dxi R 2 dui dtˆ R 1 ri dtˆ R 3 dri dtˆ r  r2 P1 P r1 π2 + dϕ x2 12 1 V (t) x 2 S (t) x3 V (t + ∆t3) V (t) RS (t−+ ∆t) R2 u R1 3 n Vr (t + ∆t) r2 p r1 π T0, U0 2 + dϕ12 V (t) Tw S (t) L V (t + ∆t) V (t) T0 S (t−+ ∆t) U0 Gradienu t fields wi n ∂p V (t + ∆t) ∂xi p ui Divergence free vectorfields // to boundary T0, U0 Tw L L h T0 x1 U0 x2 Gradient fields p0 > p1 wi p1 ∂p u ∂xi n ui Divergence free vectorfields // to boundary dS u n∆t L · x h y x1 u0 x2 p > p p0 0 1η = y √4νt p1 u u u0 y = η√4νt n dS t η u n∆t · y x ω˜(η) u ω = · 0 z y √πνt u0 t p0 L η = y √4νt }δ u u0 ω 0 y = η√4νt U≈ → t y, v η x, u 2.4. BOUNDARY LAYERS 53 y L ω˜(η) u ω = · 0 z √πνt U δ t u0 η =L y }δ √νx/u0 u f 0 = ω 0 u0 δ∗

BlasiusU≈ profile



 y→, v  x, u L Figure 2.29: The displacement thickness δ∗ U = Pressure force δ ⇐ u0 η = y √νx/u0 u f 0 = u0 Blasius profile

δ∗                                                      x

Separation point

Figure 2.30: Boundary layer separation caused by a pressure force directed upstream, a so called adverse pressure gradient.

∞ u νx ∞ δ∗ = 1 dy = [1 f 0 (η)] dη − u u − Z0  0  r 0 Z0 νx If we evaluate this expression for the Blasius boundary layer we have δ∗ = 1.72 . u0 A quantity which is of large importance in practical applications is the skin frictionq coefficient. The skin friction at the wall is

2 2 ∂u µu0 ρu0 0.332ρu0 τw = µ = f 00 (0) = f 00 (0) = u0x ∂y y=0 δ √Rex ν

where the last term is the expression evaluated for Blasiusp flow. This can be used to evaluate the skin friction coefficient as

τw 0.664 Cf = 1 2 = 2 ρu0 √Rex where the last terms again is the Blasius value.

Boundary layer separation

∂p A large adverse pressure gradient ∂x > 0 may cause a back flow region close to wall, see figure 2.30. The boundary layer equationscannotbe integrated past a point of separation, since they become singular at that point. This can be seen from the following manipulations of the boundary layer equations. If we take the momentum equation

∂u ∂u 1 dp ∂2u u + v = + ν ∂x ∂y −ρ dx ∂y2 take the normal derivative and use continuity we have

∂2u ∂2u ∂3u u + v = ν ∂x∂y ∂y2 ∂y3 If we again take the normal derivative and use continuity we can write this as

1 ∂ ∂u 2 ∂3u ∂u ∂2u ∂3u ∂4u + u + v = ν 2 ∂x ∂y ∂x∂y2 − ∂x ∂y2 ∂y3 ∂y4   This expression evaluated at the wall, with the use of the boundary conditions, become 54 CHAPTER 2. FLOW PHYSICS

2 1 ∂ ∂u ∂4u = ν 2 ∂x ∂y ∂y4 y=0! y=0

κ 2  which can be integrated to yield | {z }

2 ∂u = κ2x + C ∂y  y=0!

∂u At the point of separation x = xs, i.e. where ∂y = 0 this expression is y=0 !

∂u = κ√x x ∂y s − y=0

We can see that the boundary layer equations are not valid beyond point of separation since we have a square root singularity at that point. In addition, the point of separation is the limiting point after which there is back flow close to the wall. This means that there is information propagating upstream, invalidating the downstream parabolic nature of the equations assumed by the downstream integration of the equations. In practical situations it is very important to be able to predict the point of separation, for example when an stalls and experience a severe loss of .

2.5 Turbulent flow Reynolds average equations Turbulent flow is inherently time dependent and chaotic. However, in applications one is not usually interested in knowing full the details of this flow, but rather satisfied with the influence of the turbulence on the averaged flow. For this purpose we define an ensemble average as

N 1 (n) Ui = ui = lim ui N N →∞ n=1 X (n) where each member of the ensemble ui is regarded as an independent realization of the flow. We are now going to derive an equation governing the mean flow Ui. Divide the total flow into an average and a fluctuating component ui0 as

ui = ui + ui0 p = p + p0 and introduce into the Navier-Stokes equations. We find

∂ui0 ∂ui ∂ui ∂ui0 ∂ui ∂ui0 1 ∂p0 1 ∂p 2 2 + + uj0 + uj + uj + uj0 = + ν ui0 + ν ui ∂t ∂t ∂xj ∂xj ∂xj ∂xj −ρ ∂xi − ρ ∂xi ∇ ∇ We take the average of this equation, useing

u0 = 0 u u = u u0 = 0 i j0 i i · j which gives

∂ui ∂ui 1 ∂p 2 ∂  + uj = + ν ui ui0 uj0 ∂t ∂xj −ρ ∂xi ∇ − ∂xj     ∂ui  = 0 ∂xi   where the average of thecontinuity equation also has been added. Now, let Ui = ui, as above, and drop the 0. We find the Reynolds average equations 2.5. TURBULENT FLOW 55

∂Ui ∂Ui 1 ∂P ∂  + Uj = + (τij uiuj ) ∂t ∂xj −ρ ∂xi ∂xj −   ∂Ui  ∂xi    where uiuj is the Reynoldsstress. Thus the effect of the turbulence on the mean is through an additional stress Rij which explicitly written out is

u2 uv uw 2 [Rij ] = [uiuj ] = uv v vw  uw vw w2    The diagonal component of this stress is the kinetic energy of the turbulent fluctuations

1 k = R /2 = u u /2 = u2 + v2 + w2 ii i i 2  Turbulence modelling One may derive equations for the components of the Reynolds stress tensor. However, they would involve additional new unknowns, and the equations for those would in turn involve even more unknowns. This closure problem implies that if one cannot calculate the complete turbulent flow, but is only interested in the mean, the effect of the Reynolds stress components on in the Reynolds average equations have to be modelled. The simplest consistent model is to introduce a turbulent viscosity as a proportionality constant between the Reynolds stress components and the strain or deformation rate tensor, in analogy with the stress-strain relationship in for Newtonian fluids. We have

2 R = kδ 2νT E ij 3 ij − ij

The first term on the right hand side is introduced to give the correct value of the trace of Rij . Here the deformation rate tensor is calculated based on the mean flow, i.e.

1 ∂U ∂U 2 ∂U E = i + j r δij ij 2 ∂x ∂x − 3 ∂x  j i r  where we have assumed incompressible flow. Introducing this into the Reynolds average equations gives

∂Ui ∂Ui ∂ P 2 1 ∂P 2 + U = + k δ + 2 (ν + νT ) E = + (ν + νT ) U ∂t j ∂x ∂x − ρ 3 ij ij −ρ ∂x ∇ i j j     i

where the last equality assumes that νT is constant, an approximation only true for very simple turbulent flow. It is introduced here only to point out the analogy between the molecular viscosity and the turbulent viscosity.

The turbulent viscosity νT must be modelled and most numerical codes which solved the Navier-Stokes equations for practical applications uses some kind of model for νT . For simple shear flows, i.e. velocity fields of the form U(y), the main Reynolds stress component becomes

∂U uv = νT − ∂y

where, in analogy with kinetic gas theory, νT

νT = uT l

Here, uT is a characteristic turbulent velocity scale and l is a characteristic turbulent length scale. In kinetic gas theory l would be the mean free path of the molecules and uT the characteristic velocity of the molecules. PSfrag replacements

x, x1 y, x2 z, x3 u, u1 v, u2 w, u3 x1 x2 0 xi 0 ˆ ri xi , t u x 0, tˆ i i  P tˆ= 0  x u1 u2 > u1 x1 x2 x3 0 xi ui dtˆ 0 dxi dui dtˆ ri dtˆ dr dtˆ i  P 1 P2 x1 x2 x3 R3 R2 R1 r3 r2 r1 π 2 + dϕ12 V (t) S (t) V (t + ∆t) V (t) S (t−+ ∆t) u n V (t + ∆t) p T0, U0 Tw L T0 U0 Gradient fields wi ∂p ∂xi ui Divergence free vectorfields // to boundary L h x1 x2 p0 > p1 p1 u n dS u n∆t · x y u0 p0 η = y √4νt u u0 y = η√4νt t η y ω˜(η) u ω = · 0 z √πνt t L }δ ω 0 U≈ y→, v x, u L U δ 56 CHAPTER 2. FLOW PHYSICS u0 η = y √νx/u0 u y f 0 = u0 Blasius profile

δ∗ x uT Separation point = Pressure force

⇐ l !"!"!"!"!"!"!"!"!"!"!"!"!"! #"#"#"#"#"#"#"#"#"#"#"#"# x

Figure 2.31: Prantdl’s mixing length l is the length for which a fluid particle displaced in the normal direction can be expected to retain its horizontal momentum.

Zero-equation models

The simplest model for uT and l is to model them algebraically.

In simple free shear flows like jets, wakes and shear layers we can take νT as constant in normal direction or y-direction and to vary in a self-similar manner in x. In wall bounded shear flow we can take l as Prandtl’s mixing length (1920’s). This is a normal distance over which the particle retains its momentum and is depicted in figure 2.31.

We can thus evaluate uT and find νT

dU 2 dU uT = l νT = l dy ⇒ dy

Define τw as the shear stress at the w all and uτ = τw/ρ as the skin friction velocity. With p uT = u , l = κ y τ · as Prandtl’s estimation of mixing length we get

dU uT u U 1 = = τ = ln y + C. dy l κy ⇒ uτ κ κ is the von Karman constant, approximately equal to 0.41. Thus the mixing length is proportional to the distant from the wall and the region close to the wall in a turbulent flow has a logarithmic velocity profile, called the log-region.

One-equation models Instead of modelling the characteristic turbulent velocity algebraically, the next level of modelling uses the assumption that

1 uT = k = u u 2 i i p r and a differential equation is used to calculate the turbulent kinetic energy. We can derive such an equation by taking the previously derived equation for Ui + ui and subtracting the equation for U, the Reynolds average equation. We find

∂u ∂u ∂U ∂u ∂ p ∂u i + U i = u i u i + δ + ν i + u u ∂t j ∂x − j ∂x − j ∂x ∂x −ρ ij ∂x i j j j j j  j  We now take the average of the inner product between the turbulent fluctuations ui and the above equation, and find

∂ 1 ∂ 1 ∂U ∂ pu 1 ν ∂ ∂u ∂u u u + U u u = u u i + j u u u + u u ν i i ∂t 2 i i j ∂x 2 i i − i j ∂x ∂x − ρ − 2 i i j 2 ∂x i i − ∂x ∂x   j   j j  j  j j  where  is the mean dissipation rate of the turbulent kinetic energy. We have now introduced| {za num} ber of new unknowns which have to be modelled. 2.5. TURBULENT FLOW 57

2 ∂Ui ∂Uj First, we model the Reynolds stress as previously indicated, i.e. uiuj = kδij νT + . 3 − ∂xj ∂xi Second, the turbulent dissipation is modelled purely based on dimension using k and l. We have

3/2 k  = cD l L2 since the dimension of  is [] = T . Here cD is a modelling constant. Third, a gradient diffusion model is used for the transport terms, i.e.

1 1 νT ∂k uiuiuj puj = −2 − ρ P rk ∂xj

where P rk is the turbulent Prandtl number.

For simplicity we write the resulting equation for the turbulent kinetic energy for constant νT . We find

Dk 2 ∂Ui = (ν + νT ) k uiuj  Dt ∇ − ∂xj − rate of increase diffusion rate generation rate dissipation rate

Two-equation models The most popular model in use in engineering applications is a two equation model, the so called k--model. This is based on the above model for k but instead of modelling  a partial differential equation is derived governing the turbulent dissipation. This equation has the form as the equation for k, with a diffusion term, a generation term and a dissipation term. Many new model constants need to be introduced in order to close the  equation. Once k and  is calculated the turbulent viscosity is evaluated as a quotient of the two, such that the dimension is correct. We have

2 k νT = C ⇒ µ · 

where Cµ is a modelling constant. 58 CHAPTER 2. FLOW PHYSICS PSfrag replacements

x, x1 y, x2 z, x3 u, u1 v, u2 w, u3 x1 x2 0 xi 0 ˆ ri xi , t u x 0, tˆ i i  P tˆ= 0  x u1 u2 > u1 x1 x2 x3 0 xi ui dtˆ 0 dxi dui dtˆ ri dtˆ dr dtˆ i  P 1 P2 x1 x2 x3 R3 R2 R1 r3 r2 r1 π 2 + dϕ12 V (t) S (t) V (t + ∆t) V (t) S (t−+ ∆t) u n V (t + ∆t) p T0, U0 Tw L T0 U0 Gradient fields wi ∂p ∂xi ui Divergence Chapterfree vectorfields // to3boundary L h x1 Finite volumex2 methods for p0 > p1 p1 incompressibleu flow n dS u n∆t · x 3.1 Finite Volumey method on arbitrary grids u0 Equations with 1st orderp0 derivatives: the continuity equation η = y √4νt In finite volume methods one maku es approximations of the differential equations in integral form. We start with an equation with only firstu0 order derivatives, the continuity equation. Recall that the integral from of this equation can be writteny = η√4νt t η ∂ (uk) dV = uknk dS = 0 y ∂xk ω˜(η) u ω = · 0 VZ ZS z √πνt Evaluating the normal vectort ni to the curve l for two-dimensional flow, see figure 3.1, we have the normal with length dl as n dl =L ( dy, dx). This implies that − }δ ω 0 u n dl = (u dy v dx) = 0 ≈ k k − U Z Z y→, v S S We now apply this to anx,arbitraryu two-dimensional grid defined as in figure 3.2. We make use of the followingL definitions and approximations U δ uab = ui+ 1 ,j (ui+1,j + ui,j ) /2 ∆xab = xb xa u0 2 ≈ − η = y √νx/u0 u f 0 = 1 vabu0= vi+ ,j (vi+1,j + vi,j ) /2 ∆yab = yb ya 2 ≈ − Blasius profile δ∗ y x Separation point x = Pressure force ⇐ x y dx dl = ( dx, dy) l dy uT

dx −

dy n dl = ( dy, dx) − Figure 3.1: Normal vector to the curve l.

59 PSfrag replacements

x, x1 y, x2 z, x3 u, u1 v, u2 w, u3 x1 x2 0 xi 0 ˆ ri xi , t u x 0, tˆ i i  P tˆ= 0  x u1 u2 > u1 x1 x2 x3 0 xi ui dtˆ 0 dxi dui dtˆ ri dtˆ dr dtˆ i  P 1 P2 x1 x2 x3 R3 R2 R1 r3 r2 r1 π 2 + dϕ12 V (t) S (t) V (t + ∆t) V (t) S (t−+ ∆t) u n V (t + ∆t) p T0, U0 Tw L T0 U0 Gradient fields wi ∂p ∂xi ui Divergence free vectorfields // to boundary L h x1 x2 p0 > p1 p1 u n dS u n∆t · x y u0 p0 η = y √4νt u u0 y = η√4νt t η y ω˜(η) u ω = · 0 z √πνt t L }δ ω 0 U≈ y→, v x, u L U δ u0 η = y √νx/u0 u f 0 = u0 Blasius profile

δ∗ x Separation point = Pressure force ⇐ x y l

uT x y dx dy dx dl = ( dx,−dy) n dl = ( dy, dx) − 60 CHAPTER 3. FINITE VOLUME METHODS FOR INCOMPRESSIBLE FLOW

i 1, j + 1 i, j + 1 i + 1, j + 1

− $%$%$%$%$%$%$%$%$ c &%&%&%&%&%&%&%&b

$%$%$%$%$%$%$%$%$c b

&%&%&%&%&%&%&%&0 0

$%$%$%$%$%$%$%$%$

&%&%&%&%&%&%&%&

$%$%$%$%$%$%$%$%$

&%&%&%&%&%&%&%& $%$%$%$%$%$%$%$%$

i 1, j &%&%&%&%&%&%&%& i + 1, j $%$%$%$%$%$%$%$%$

− &%&%&%&%&%&%&%&

i,$%$%$%$%$%$%$%$%$j

&%&%&%&%&%&%&%& $%$%$%$%$%$%$%$%$

Aabcd &%&%&%&%&%&%&%&

$%$%$%$%$%$%$%$%$ &%&%&%&%&%&%&%&

a0 d d0 a

i 1, j 1 − − i, j 1 i + 1, j 1 − − Figure 3.2: Arbitrary grid. Note that the grid lines need not be parallel to the coordinate directions.

with analogous expressions for the quantities on the bc, cd and da faces. We can now evaluate the integral associated with the two-dimensional version of the continuity equation for the surface defined by the points abcd. We have

(u dy v dx) ui+ 1 ,j∆yab vi+ 1 ,j ∆xab + ui,j+ 1 ∆ybc vi,j+ 1 ∆xbc + − ≈ 2 − 2 2 − 2 ZS

ui 1 ,j∆ycd vi 1 ,j∆xcd + ui,j 1 ∆yda vi,j 1 ∆xda − 2 − − 2 − 2 − − 2 On a cartesian grid we have the relations

∆x = ∆x = ∆y = ∆y = 0 and ∆y = ∆y , ∆x = ∆x ab cd bc da cd − ab bc − da which implies that the approximation of the continuity equation can be written

(u dy v dx) ui+ 1 ,j ui 1 ,j ∆yab + vi,j+ 1 + vi,j 1 ∆xda = − ≈ 2 − − 2 2 − 2 ZS     1 1 (ui+1,j ui 1,j ) ∆yab + (vi,j+1 vi,j 1) ∆xda 2 − − 2 − −

Note that dividing with ∆yab ∆xda gives a standard central difference discretization of the continuity equation, i.e. ·

ui+1,j ui 1,j vi,j+1 vi,j 1 − − + − − = 0 2∆xda 2∆yab

Equations with 2nd derivatives: the Laplace equation We use the Gauss or Greens theorem to derive the integral from of the two-dimensional Laplace equation. We find

∂2Φ ∂φ ∂Φ ∂Φ 0 = dV = nj dS = 2D = dy dx ∂xj ∂xj ∂xj { } ∂x − ∂y VZ ZS ZS   If we approximate this integral in the same manner as for the continuity equation we have

∂Φ ∂Φ ∂Φ ∂Φ ∆yab ∆xab + ∆ybc ∆xbc + ∂x i+ 1 ,j − ∂y i+ 1 ,j ∂x i,j+ 1 − ∂y i,j+ 1   2   2   2   2 ∂Φ ∂Φ ∂Φ ∂Φ ∆ycd ∆xcd + ∆yda ∆xda ∂x i 1 ,j − ∂y i 1 ,j ∂x i,j 1 − ∂y i,j 1   − 2   − 2   − 2   − 2 3.1. FINITE VOLUME METHOD ON ARBITRARY GRIDS 61

First derivatives are evaluated as mean value over adjacent control volumes (areas in the two-dimensional case). We use Gauss theorem over the area defined by the points a0b0c0d0, see figure 3.2. For the three- dimensional case we have

1 ∂Φ 1 dV = Φnj dS V ∂xj V ⇒ VZ ZS which in the two-dimensional case is approximated by

∂Φ ∂Φ 1 , (Φ dy, Φ dx) ∂x i+ 1 ,j ∂y i+ 1 ,j! ≈ Aa0b0c0d0 −   2   2 a0bZ0c0d0 where

Φ dy Φ ∆y 0 0 + Φ ∆y 0 0 + Φ ∆y 0 0 + Φ∆y 0 0 ≈ i+1,j a b b b c i,j c d d a a0bZ0c0d0 and the area evaluated as half magnitude of cross products of diagonals, i.e.

1 A A 0 0 0 0 = ∆x 0 0 ∆y 0 0 ∆y 0 0 ∆x 0 0 ab ≡ a b c d 2 d b · a c − d b · a c

and the value Φ is taken as the average a 1 Φa = (Φi,j + Φi+1,j + Φi,j 1 + Φi+1,j 1) 4 − − ∂Φ ∂Φ Evaluating the derivatives ∂x , ∂y along the other cell faces and substituting back we obtain a 9 point formula which couples all of the nine points around the point i, j, of the form

Ai,j Φi+1,j+1 + Bi,j Φi+1,j + Ci,j Φi+1,j 1 + Di,j Φi,j+1 + Ei,j Φi,j + − Fi,j Φi,j 1 + Gi,j Φi 1,j+1 + Hi,j Φi 1,j + Ii,j Φi 1,j 1 = 0 − − − − − If we have a total of N = m n interior nodes, we obtain N equations which in matrix form can be written ×

Ax = b Here xT = (Φ , Φ , Φ , . . . , Φ ) and b contains the boundary conditions. The matrix A is a N N 11 12 13 mn × with the terms Aij , Bij , etc. as coefficients. Rather than showing the general case in more detail, we instead work out the expression for cartesian grids in two-dimensions. We find

∂2Φ ∂2Φ ∂Φ ∂Φ + dx dy = dy dx ∂x2 ∂y2 ∂x − ∂y ≈ Z   Z   ∂Φ ∂Φ ∂Φ ∂Φ ∆y + ∆x ∂x i+ 1 ,j+ − ∂x i 1 ,j ! ∂y i,j+ 1 − ∂y i,j 1 !   2   − 2   2   − 2 We can evaluate the derivatives as

∂Φ 1 = (Φi+1,j Φi,j ) ∆y ∂x i+ 1 ,j − · ∆x ∆y   2 · and so on for the rest of the terms, which implies that

∂Φ ∂Φ ∆y ∆x dy dx (Φi+1,j 2Φi,j + Φi 1,j ) + (Φi,j+1 2Φi,j + Φi,j 1) ∂x − ∂y ≈ − − ∆x − − ∆y Z   Dividing with the area ∆x ∆y we obtain the usual 5-point Laplace formula, i. e. ·

Φi+1,j 2φi,j + Φi 1,j Φi,j+1 2φi,j + Φi,j 1 − − + − − = 0 ∆x2 ∆y2 which of course also can be written in the matrix form shown for the general case above. PSfrag replacements

x, x1 y, x2 z, x3 u, u1 v, u2 w, u3 x1 x2 0 xi 0 ˆ ri xi , t u x 0, tˆ i i  P tˆ= 0  x u1 u2 > u1 x1 x2 x3 0 xi ui dtˆ 0 dxi dui dtˆ ri dtˆ dr dtˆ i  P 1 P2 x1 x2 x3 R3 R2 R1 r3 r2 r1 π 2 + dϕ12 V (t) S (t) V (t + ∆t) V (t) S (t−+ ∆t) u n V (t + ∆t) p T0, U0 Tw L T0 U0 Gradient fields wi ∂p ∂xi ui Divergence free vectorfields // to boundary L h x1 x2 p0 > p1 p1 u n dS u n∆t · x y u0 p0 η = y √4νt u u0 y = η√4νt t η y ω˜(η) u ω = · 0 z √πνt t L }δ ω 0 U≈ y→, v x, u L U δ u0 η = y √νx/u0 u f 0 = u0 Blasius profile

δ∗ x Separation point = Pressure force ⇐ x y l

uT x y dx dy dx dl = ( dx,−dy) n dl = ( dy, dx) − i 1, j + 1 − i, j + 1 i + 1, j + 1 c c0 b b0 i 1, j i +− 1, j i, j Aabcd 62 CHAPTERd 3. FINITE VOLUME METHODS FOR INCOMPRESSIBLE FLOW d0 a a0 i 1, j 1 − i, j − 1 − i + 1, j 1 u v − j i,j i,j pi,j

i i + 1

Figure 3.3: Cartesian finite-volume grid where the velocity components and the pressure are co-located.

3.2 Finite-volume discretizations of 2D NS Co-located Cartesian grid We will apply the finite volume discretizations to the Navier-Stokes equations in integral form, which in two-dimensions can be written

(u dy v dx) = 0 − Z ∂u 1 ∂u ∂u dS = u2 dy uv dx + p dy dy dx ∂t − − − Re ∂x − ∂y ZZ Z    ∂v 1 ∂v ∂v dS = uv dy v2 dx p dx dy dx ∂t − − − − Re ∂x − ∂y ZZ Z    where we have used the earlier derived result n = ( dy, dx). We start with a co-located grid which means that the finite volume used for both velocity componen−ts and the pressure is the same, see figure 3.3. In addition we choose a Cartesian grid in order to simplify the expressions. Recall that the finite volume discretization of the continuity equation becomes 1 1 (ui+1,j ui 1,j ) ∆y + (vi,j+1 vi,j 1) ∆x = 0 2 − − 2 − − which is equivalent to the finite difference discretization

ui+1,j ui 1,j vi,j+1 vi,j 1 or − − + − − = 0 2∆x 2∆y The discretization of the streamwise momentum equation needs both first and second derivatives. We have seen that the finite volume discretizations of both are equal to standard second order finite difference approximations. Thus we obtain the following result for the u-component

2 2 ∂ui,j ui+1,j ui 1,j (uv)i,j+1 (uv)i,j 1 pi+1,j pi 1,j + − − + − − + − − ∂t 2∆x 2∆y 2∆x

1 ui+1,j 2ui,j + ui 1,j ui,j+1 2ui,j + ui,j 1 − − + − − = 0 −Re ∆x2 ∆y2   In a similar manner the discretization for the v-component becomes

2 2 ∂vi,j (uv)i+1,j (uv)i 1,j vi,j+1 vi,j 1 pi,j+1 pi,j 1 + − − + − − + − − ∂t 2∆x 2∆y 2∆y

1 vi+1,j 2vi,j + vi 1,j vi,j+1 2vi,j + vi,j 1 − − + − − = 0 −Re ∆x2 ∆y2   This simple discretization cannot be used in practice without some kind of modification. The reason is that one solution to these equations are in the form of spurious checkerboard modes. Consider the following solution to the discretized equations

u = v = ( 1)i+j g (t) , p = ( 1)i+j , ∆x = ∆y i,j i,j − · − PSfrag replacements x, x PSfrag replacements 1 y, x2 x, x1 PSfrag replacements z, x3 y, x2 u, u x, x1 1 PSfrag replacemenz, xts3 v, u y, x2 2 u, u1 x, x1 w, u3 vz, ux3 y, x2 u, u1 x1 wz, ux3 v, u3 x2 2 0 u, ux1 x w, u3 i x2 0 v, u2 ri x , tˆ xx10 i w, ui3 0 ˆ 0 x2 ui xi , t ri x , tˆ  i xx10 P tˆ= 0 u x 0, tˆi  ri xi0, xtˆ2 Pi tˆi=x00 x u x 0, tˆi u ri xi0, tˆ 1 Pi ˆi x u > u t =0 ˆ0 2 1 ui xi , ut 1  x1 P ˆ x u2t >= u01 x u1 2 xx1 x u2 > u1 3 x2 0 u1 xi x1 u2 > u31 u dtˆ x20 i xi 0 x1 dxi u xd3tˆ i x20 du dtˆ xi0 i dxi x3ˆ ri dtˆ dui d0tˆ ixi0 ˆ dxi dri dt ri dtˆˆ  ui dtˆ P dui ˆd0t 1 dri ddxti ri dtˆ P2 duiPd1tˆ dri dtˆ x1 ri dPtˆ2 P x2 ˆ1 dri dxt 1 x P2 3 Px2 1 R3 x1 P32 2 x23 R Rx1 1 x32 R Rx23 3 R1 r Rx32 2 R3 r r3 1 R1 r r2 π R3 2 + dϕ12 r1 Rr1 V (t) π + dϕr2 2 r123 S (t) V (rt1) π + dϕr2 V (t + ∆t) V (t) 2 S (12t) − r1 S (t + ∆t) V (t + ∆tπ) V (t) 2 + dϕ12 S (t−+S∆(t) u V (t + ∆t) V (t) n u S (t−+S∆(t) V (t + ∆t) V (t + ∆t) V (tn) p V (t−+ ∆tu) S (t + ∆t) T0, U0 np V (t + ∆tu) Tw T0, U0 np L V (t + ∆Ttw) T , U T0 0 L0 p U0 TTw T0, U0 Gradient fields UL Tw0 w T0 i Gradient fieldsL ∂p Uw0 ∂xi T0i Gradient fields∂p ui ∂Ux0i Divergence freewi vectorfields // to boundary Gradient fields∂upi ∂xi L Divergence free vectorfields // to boundarywi ∂up h Li Divergence free vectorfields // to boundary∂xi x1 uh Li x2 Divergence free vectorfields // to boundaryx1 h p0 > p1 x2 L p1 p > xp1 0 h1 u xp2 x1 p0 > p1 n xu2 p1 dS p0 > pn1 u n∆t u · dpS1 x u n∆nt · dSu y nx u u n∆yt 0 · dSx p0 u0 η = y u n∆yt √4νt · p0 u y x η = u0 u0 √4νyt pu0 y = η√4νt y η = u0 √4νt t y = η√4pνu0t y η η = u0 √4νt y = η√4νut y η ω˜(η) u0 u0 ω = · t z √πνt y = η√4νyt ω˜(η) uη ω = · 0 t z √πνt t y L ω˜(η) uη · 0t ωz = √ }δ πνtLy ω˜(η) u0 ω 0 · t ωz = √ }δ ≈ πνtL U ω 0t y→, v ≈}δ U L x, u ω y→, v0 ≈}δ L Ux, u ω y→, v0 U ≈L Ux, u δ y→,Uv L u0 x, uδ η = y U √νx/u0 u0 u y L f 0 = η = δ u0 √νx/uU0 uu0 Blasius profile f 0 =y η = u0δ √νx/u0 δ∗ Blasius profileuu0 f 0 =y η = u0 x √νx/uδ0∗ Blasius profileu Separation point f 0 = x u0 = Pressure force Separation poinδ∗t Blasius profile ⇐ x = Pressure forcex ⇐Separation poinδ∗t y x l = Pressure forcey ⇐Separation point uT xl = Pressure forcey x ⇐ uT xl y xy uT dx yl dy dx uTy dx dy dl = ( dx,−dy) dx dxy n dl = ( dy, dx) dl = ( dx,−ddyy) − dx i 1, j + 1 n dl = ( dy, ddxx) − dl = ( dx,−−ddyy) i, j + 1 i 1, j + 1 n dl = (−dy, ddxx) i + 1, j + 1 dl = ( di,x,−j−+dy1) i 1, j + 1 c n dl =i(−+dy1,, j d+x1) i,−j + 1 c0 i 1, j + 1c i −+ 1, j + 1 b i, j +c10 c b0 i + 1, j + 1b i 1, j c0 − bc0 i + 1, j i 1, jb − c0 i, j i + 1,bj0 i 1, jb Aabcd − i, j i + 1,bj0 d i Aabcd1, j i, j d0 i +− 1,dj Aabcd a i,dj0 d a0 Aabcda i 1, j 1 d0 − − ad03.2. FINITE-VOLUMEi, jDISCRETIZA1 TIONS OF 2D NS 63 i 1, j a1 − − −d0 i + 1, j 1 a0 − i, j a1 j

i + 1, j − 1 ,(,(,(,(,(,(,(,

− − -(-(-(-(-(-(-(-

i, j −a10 i ,(,(,(,(,(,(,(, j -(-(-(-(-(-(-(-

i + 1, j − 1 i + 1 ,(,(,(,(,(,(,(, − − -(-(-(-(-(-(-(-

i, j − 1i ui,j ,(,(,(,(,(,(,(, j -(-(-(-(-(-(-(-v

− i,j+1/2 1 *(*(*(*(*(*(*(* i + 1, ji + 1 +(+(+(+(+(+(+(+

vi,j j + 2 *(*(*(*(*(*(*(* u−i,ji +(+(+(+(+(+(+(+

j pi,j *(*(*(*(*(*(*(*

i +vi,j1 +(+(+(+(+(+(+(+ *(*(*(*(*(*(*(*

ui,ji +(+(+(+(+(+(+(+

.(.(.(.(.(.(.(. '('('('('('('('(' /(/(/(/(/(/(/(/ pi,j u )()()()()()()()()

i +v 1 i 1/2,j j .(.(.(.(.(.(.(.

i,j − '('('('('('('('(' /(/(/(/(/(/(/(/ p pi,j )()()()()()()()()

ui,j

.(.(.(.(.(.(.(. '('('('('('('('(' /(/(/(/(/(/(/(/ pi,j )()()()()()()()()

vi,j+1/2

.(.(.(.(.(.(.(. '('('('('('('('(' /(/(/(/(/(/(/(/ vi,j )()()()()()()()() pi,j 1

v '('('('('('('('(' i,j p1i,j/2 )()()()()()()()() j

vi,j−+1/2 2 '('('('('('('('(' ui 1/2,j vi,j 1/2 )()()()()()()()() − pi,j −

− '('('('('('('('(' vi,j 1/12 )()()()()()()()()

i− 2 v '('('('('('('('(' i,j+1/2 )()()()()()()()() ui 1−/2,j v − 1i j 1 i,ji 1/12 i−+ 2 − ui 1−/2,j2 − 1i ii + 1 i + 32 i +− 2 2i ji++ 1 i + 32 i + 2 1j 1 1 3 i + 1 j + 32 i 2 i i + 2 i + 1 i + 2 ji + 2 −

− 2j 0¡0 1 1¡1

jj + 1 0¡0 j − 2 1¡1 control volume for divergence condition. − 2 j 1j

j − 1 2323232

control volume for divergence condition.− 2 4343434 2323232 j 1 4343434 control volume for streamwise momentum equation (u) .

control volume for divergence condition.− 5¡5

control volume for streamwise momentum equation (u) . 6¡6 5¡5 6¡6 control volume for normal momentum equation (v) .

Figure 3.4: Cartesian finite-volume grid where the velocity components and the pressure uses staggered grids.

which satisfies the divergence constraint. If it is input into the equation for u and v we find the expression

dg 8 8t + g = 0 g = e− Re·∆x2 dt Re ∆x2 ⇒ · Thus we have a spurious solution consisting of checkerboard modes which are damped slowly for velocity and constant in time for the pressure. This mode will corrupt any true numerical solution and yields this discretization unusable as is. These modes are a result of the very weak coupling between nearby finite volumes or grid points, and can be avoided if they are coupled by one sided differences or if they are damped with some type of artificial viscosity.

Staggered cartesian grid To eliminate the problem with spurious checkerboard modes, we can use a staggered grid as in figure 3.4, where the control volumes for the streamwise, spanwise and pressure are different. The control volume for the continuity equation is centered abound the pressure point and the discretiza- tion becomes

ui+ 1 ,j ui 1 ,j ∆y + vi,j+ 1 vi,j 1 ∆x = 0 2 − − 2 2 − − 2     ui+ 1 ,j ui 1 ,j vi,j+ 1 vi,j 1 or 2 − − 2 + 2 − − 2 = 0 ∆x ∆y The control volume for the streamwise velocity is centered around the streamwise velocity point and the discretization becomes

2 2 ∂ui+1/2,j ui+1,j ui,j (uv)i+1/2,j+1/2 (uv)i+1/2,j 1/2 pi+1,j pi,j + − + − − + − ∂t ∆x ∆y ∆x −

1 ui+3/2,j 2ui+1/2,j + ui 1/2,j 1 ui+1/2,j+1 2ui+1/2,j + ui+1/2,j 1 − − − − = 0 Re ∆x2 − Re ∆y2 PSfrag replacements

x, x1 y, x2 z, x3 u, u1 v, u2 w, u3 x1 x2 0 xi 0 ˆ ri xi , t u x 0, tˆ i i  P tˆ= 0  x u1 u2 > u1 x1 x2 x3 0 xi ui dtˆ 0 dxi dui dtˆ ri dtˆ dr dtˆ i  P 1 P2 x1 x2 x3 R3 R2 R1 r3 r2 r1 π 2 + dϕ12 V (t) S (t) V (t + ∆t) V (t) S (t−+ ∆t) u n V (t + ∆t) p T0, U0 Tw L T0 U0 Gradient fields wi ∂p ∂xi ui Divergence free vectorfields // to boundary L h x1 x2 p0 > p1 p1 u n dS u n∆t · x y u0 p0 η = y √4νt u u0 y = η√4νt t η y ω˜(η) u ω = · 0 z √πνt t L }δ ω 0 U≈ y→, v x, u L U δ u0 η = y √νx/u0 u f 0 = u0 Blasius profile

δ∗ x Separation point = Pressure force ⇐ x y l

uT x y dx dy dx dl = ( dx,−dy) n dl = ( dy, dx) − i 1, j + 1 − i, j + 1 i + 1, j + 1 c c0 b b0 i 1, j i +− 1, j i, j Aabcd d d0 a a0 i 1, j 1 − i, j − 1 i + 1, j − 1 − j i i + 1 ui,j vi,j pi,j pi,j vi,j+1/2 vi,j 1/2 − ui 1/2,j −i 1 − 2 i 1 i + 2 i + 1 3 i + 2 1 64 j +CHAPTER2 3. FINITE VOLUME METHODS FOR INCOMPRESSIBLE FLOW j j 1 Inflow − 2 j j 1 − A

2

v 3 1, 2

p1,1 u 3 ,1

1 2 777777777777777777777 888888888888888888888 Solid wall B C 0 0 1 2 i

Figure 3.5: Staggered grid near the boundary.

2 2 where the ui+1,j, ui,j , (uv)i+1/2,j+1/2 , (uv)i+1/2,j 1/2 terms need to be interpolated from the points where the corresponding velocities are defined. − The control volume for the normal velocity is centered around the normal velocity point and the dis- cretization becomes

2 2 ∂vi,j+1/2 (uv)i+1/2,j+1/2 (uv)i 1/2,j+1/2 vi,j+1 vi,j pi,j+1 pi,j + − − + − + − ∂t ∆x ∆y ∆y −

1 vi+1,j+1/2 2vi,j+1/2 + vi 1,j+1/2 1 vi,j+3/2 2vi,j+1/2 + vi,j 1/2 − − − − = 0 Re ∆x2 − Re ∆y2

2 2 where the (uv)i+1/2,j+1/2 , (uv)i 1/2,j+1/2 , ui,j+1, ui,j terms need to be interpolated from the points where the corresponding velocities are− defined. For this discretization no checkerboard modes possible, since there is no decoupling in the divergence constraint, the pressure or the convective terms.

Boundary conditions To close the system we need to augment the discretized equation with discrete versions of the boundary conditions. See figure 3.5 for a definition of the points near a boundary. The boundary conditions on the solid wall, BC in figure 3.5, consists of the no flow and the no slip conditions, i.e. u = v = 0. The normal points are located on the boundary so that the no flow condition simply become

v1, 1 = v2, 1 = = 0 2 2 · · · 3 The evaluation of the u-equation at the point ( , 1), for example, requires u 3 . We can find this value 2 2 ,0 as follows

1 0 = u 3 , 1 = u 3 ,1 + u 3 ,0 u 3 ,0 = u 3 ,1 2 2 2 2 2 ⇒ 2 − 2   The boundary conditions on the inflow, AB in figure 3.5, consist given values of u and v, i.e. so called Dirichlet conditions. The streamwise points are located on the boundary so that the boundary condition is simply consist of the known values

u 1 , u 1 , . . . 2 ,1 2 ,2

3 The evaluation of the v-equation at the point (1, ), for example, requires v 3 . We can find this value 2 0, 2 as follows

1 v 1 , 3 = v1, 3 + v0, 3 v0, 3 = 2v 1 , 3 v1, 3 2 2 2 2 2 ⇒ 2 2 2 − 2   3.3. SUMMARY OF THE EQUATIONS 65

∂u ∂v If AB in figure 3.5 is an outflow boundary, the boundary conditions may consist of ∂x = ∂x = 0, i.e. 1 so called Neumann conditions. These conditions should be evaluated at i = 2 . For the streamwise and normal velocity we find

u 1 ,2 = u 3 ,2, v0, 3 = v1, 3 − 2 2 2 2 Note that no reference is made to the pressure points outside the domain, so that in this formulation no boundary conditions for p is needed so far. However, depending on the particular discretization of the time derivative and other the details of the solution method one may need to augment the the above with boundary conditions for the pressure. If this is the case particular care has to be taken so that those conditions do not upset the divergence free condition.

3.3 Summary of the equations

The discretized equations derived for the staggered grid can be written in the following form

∂u 1 i+ 2 ,j pi+1,j pi,j + Ai+ 1 ,j + − = 0  ∂t 2 ∆x ∂vi,j+ 1 p p  2 i,j+1 i,j  + Bi,j+ 1 + − = 0  ∂t 2 ∆y Di,j = 0  where the expression for the A 1 can be written i+ 2 ,j

A 1 = i+ 2 ,j

2 2 ui+1,j ui,j (uv)i+ 1 ,j+ 1 (uv)i+ 1 ,j 1 = − + 2 2 − 2 − 2 ∆x ∆y 1 ui+ 3 ,j 2ui+ 1 ,j + ui 1 ,j 1 ui+ 1 ,j+1 2ui+ 1 ,j + ui+ 1 ,j 1 2 − 2 − 2 2 − 2 2 − −Re ∆x2 − Re ∆y2

= expand and interpolate using grid values { } 1 1 2 1 1 = (ui+ 3 ,j ui 1 ,j) + (vi+1,j+ 1 vi,j+ 1 vi+1,j 1 vi,j 1 ) + + ui+ 1 ,j 2∆x 2 − − 2 4∆y 2 − 2 − − 2 − − 2 Re ∆x2 ∆y2 2    1 1 1 1 + ui+ 3 ,j ui+ 3 ,j + ui 1 ,j ui 1 ,j 4∆x 2 − Re∆x2 2 4∆x − 2 − Re∆x2 − 2     1 1 1 1 + (vi+1,j+ 1 + vi,j+ 1 ) ui+ 1 ,j+1 + (vi+1,j 1 + vi,j 1 ) ui+ 1 ,j 1 4∆y 2 2 − Re∆y2 2 4∆y − 2 − 2 − Re∆y2 2 −    

= a(u, v) 1 u 1 + a(u, v)nbunb i+ 2 ,j i+ 2 ,j Xnb The last line summarizes the expressions, where the sum over nb indicates a sum over the nearby nodes. The expression for B 1 can in a similar way be written i,j+ 2

B 1 = i,j+ 2

2 2 (uv)i+ 1 ,j+ 1 (uv)i 1 ,j+ 1 vi,j+1 vi,j = 2 2 − − 2 2 + − ∆x ∆y 1 vi+1,j+ 1 2vi,j+ 1 + vi 1,j+ 1 1 vi,j+ 3 2vi,j+ 1 + vi,j 1 2 − 2 − 2 2 − 2 − 2 −R ∆x2 − R ∆y2

= expand and interpolate using grid values { }

= b(u, v) 1 v 1 + b(u, v)nbvnb i,j+ 2 i,j+ 2 Xnb 66 CHAPTER 3. FINITE VOLUME METHODS FOR INCOMPRESSIBLE FLOW

where the expressions for b(u, v) 1 and b(u, v)nb are analogous to a(u, v) 1 and a(u, v)nb, and i,j+ 2 i+ 2 ,j therefore not explicitly written out. The expression originating from the continuity equation is

ui+ 1 ,j ui 1 ,j vi,j+ 1 vi,j 1 D = 2 − − 2 + 2 − − 2 i,j ∆x ∆y These equations, including the boundary conditions, can be assembled into matrix form. We have

u A(u, v) 0 G u f d x u v + 0 B(u, v) G v = f dt    y     v  0 Dx Dy 0 p 0 Here we we have used the definitions      

u - vector of unknown streamwise velocities v - vector of unknown normal velocities p - vector of pressure unknowns A(u, v) - non-linear algebraic operator from advective and viscous terms of u-eq. B(u, v) - non-linear algebraic operator from advective and viscous terms of v-eq. Gx - linear algebraic operator from stremwise pressure gradient Gy - linear algebraic operator from normal pressure gradient Dx - linear algebraic operator from x-part of divergence constraint Dy - linear algebraic operator from y-part of divergence constraint f - vector of source terms from BC

With obvious changes in notation, we can write the system of equations in an even more compact form as

d u N (u) G u f + = dt 0 D 0 p 0         If this is compared to the finite element discretization in the next chapter, it is seen that the form of the discretized matrix equations are the same.

3.4 Time dependent flows The projection method For time-dependent flow a common way to solve the discrete equations is the projection or pressure correc- tion method. Sometimes this method and its generalizations are also called splitting methods. We illustrate the method using the system written in the compact notation defined above. We start to discretize the time derivative with a first order explicit method

un+1 un − + N (un) un + G pn+1 = f (tn) ∆t   Dun+1 = 0

Then we make a predictionof the velocity field at the next time step u∗ not satisfying continuity, and then a correction involving p such that Dun+1 = 0. We have

n u∗ u − + N (un) un = f (tn) ∆t   n+1  u u∗ n+1  − + G p = 0  ∆t n+1  Du = 0   Next, apply the divergence operator D to the correction step

n+1 1 DG p = D u∗ ∆t Here DG represents divgrad = Laplacian, i.e. discrete version of pressure Poisson equation. The velocity at the next time level thus becomes 3.4. TIME DEPENDENT FLOWS 67

n+1 n+1 u = u∗ ∆tG p − n+1 Note here that u is projection of u∗ on divergence free space. This is a discrete version of the projection of a function on a divergence free space discussed in the section about the role of the pressure in incompressible flow. In order to be able to discuss the boundary condition on the pressure Poisson equation we write the prediction and correction step more explicitly. Using the staggered grid discretization the prediction step can be written

n ui∗+ 1 ,j ui+ 1 ,j 2 − 2 n + A 1 = 0 i+ 2 ,j  ∆t n vi,j∗ + 1 vi,j+ 1  2 − 2 n  + Bi,j+ 1 = 0 ∆t 2  and the projection step as 

n+1 n+1 n+1 ui+ 1 ,j ui∗+ 1 ,j p p 2 − 2 + i+1,j − i,j = 0  ∆t ∆x n+1 n+1 n+1 v v 1  i,j+ 1 i,j∗ + p p  2 − 2 + i,j+1 − i,j = 0 ∆t ∆y  n+1 n+1 n+1 By solving for u 1 and v 1 above and using this, and the corresponding expressions for u 1 and i+ 2 ,j i,j+ 2 i 2 ,j n+1 − v 1 , in the expression for the divergence constraint Di,j we find the following explicit expression for the i,j 2 discrete− pressure Poisson equation

n+1 n+1 n+1 n+1 n+1 n+1 pi+1,j 2pi,j + pi 1,j pi,j+1 2pi,j + pi,j 1 Di,j∗ − − + − − = ∆x2 ∆y2 ∆t

where Di,j∗ is Di,j evaluated using the discrete velocities at the prediction step, u∗ and v∗. When the discrete pressure Poisson equation is solved we need values of the unknowns which are outside of the domain, i.e. we need additional boundary conditions. If we take the vector equation for the correction or projection step and project it normal to the solid boundary in figure 3.5 we have

pn+1 pn+1 1 2,1 − 2,0 n+1 = v2, 1 vΓ∗ ∆y −∆t 2 −   where vΓ∗ = v∗ 1 is an unknown value of the velocity in the prediction step at the boundary. In general 2, 2 it is important to choose this boundary condition such that discrete velocity after the correction step is divergence at the boundary, see the discussion in the end of the section on the role of the pressure. However, for this particular discretization it turns out that we can choose vΓ∗ arbitrarily since it completely decouples from the rest of the discrete problem. To see this we write the pressure Poisson equation, centered abound the point (2,1), close to the boundary. We find

n+1 n+1 n+1 n+1 n+1 n+1 p 2p + p p 2p + p 1 u∗5 ,1 u∗3 ,1 v2∗, 3 vΓ∗ 3,1 − 2,1 1,1 2,2 − 2,1 2,0 2 − 2 2 − 2 + 2 = + ∆x ∆y ∆t ∆x ∆y !

if we substitute the value of pn+1 pn+1 from the boundary condition obtained for the pressure into the 2,1 − 2,0 above equation we can se that vΓ∗ cancels in the right hand side of the pressure Poisson equation. Since the discretization of the time derivative is explicit there is no other place where the values of v∗ or u∗ on the boundaries enter. Thus we find that we can choose the value of vΓ∗ arbitrarily. In particular, we can choose n+1 vΓ∗ = v 1 , in which case we obtain a Neumann boundary condition for the pressure. Note, however, that 2, 2 this is a numerical artifact and does not imply that the real pressure gradient is zero at the boundary. A number of other splitting methods have been devised for schemes with higher order accuracy for the time discretization. In general it is preferred to make the time discretization first for the full Navier-Stokes equations and afterward split the discrete equation into one predictor and one corrector step. See Peyret and Taylor for details. 68 CHAPTER 3. FINITE VOLUME METHODS FOR INCOMPRESSIBLE FLOW

Time step restriction For stability it is necessary that prediction step is stable, numerical evidence indicates that this is sufficient. In the predictor case the momentum equations decouple if we linearize them abound the solution U0, V0. It thus suffices to consider the equation

∂u ∂u ∂u 1 + U + V = 2u ∂t 0 ∂x 0 ∂y Re∇ For simplicity we will here consider one-dimensional version

∂u ∂u 1 ∂2u + U = ∂t 0 ∂x Re ∂x2 which in discretized form can be written

n n n n n n+1 n uj+1 uj 1 1 uj+1 2uj + uj 1 u = u + ∆t U − − + − − j j − 0 2∆x Re ∆x2   where we have chosen to call the discrete points where the u-velocity is evaluate for xj . We introduce

n n i ωxj u = Q e · j · into the discrete equation, together with the definitions U ∆t 2∆t λ = 0 , α = , ξ = ω ∆x ∆x Re ∆x2 · This implies that the amplification factor Q can be written

ξ Q = 1 iλ sin (ξ) 2α sin2 − − 2   We find that the absolute value of Q satisfies

Q = 1 4 λ2 α2 s2 + 4 λ2 s2 s | | − − − = 1 4s λ2 α2 s λ2 + α 1 − −  − ≤

2 ξ    where s = sin 2 . This implies that   Φ (s) = λ2 α2 s + λ2 α 0 s : 0 s 1 − − − ≤ ∀ ≤ ≤ Φ (s) is linear function of s and thus the the limiting condition on Φ (s) is given by its values at the two end points of the s-interval. We find

Φ (0) = λ2 α 0, Φ (1) = α2 α 0 − ≤ − ≤ which implies that

λ2 α 1 ⇒ ≤ ≤ substituting back the definitions of λ and α we find the following stability conditions

1 U 2∆tRe 1 2 0 ≤  2∆t  1  Re∆x2 ≤ For the two dimensional version of thepredictor step Peyret and Taylor [8] find the following stability limits

1 U 2 + V 2 ∆t Re 1 4 0 0 · ≤  4∆t   1  Re∆x2 ≤ Note that this is a stronger condition than in the one-dimensional case. 3.5. GENERAL ITERATION METHODS FOR STEADY FLOWS 69

3.5 General iteration methods for steady flows Distributive iteration For steady flows we can still use the methods introduced for unsteady flows, and iterate the solution in time to obtain a steady state. However, in many cases it is more effective to use other iteration methods. We will here introduce a general distributive iteration method and apply it to the discretized steady Navier-Stokes equations. For the steady case the discretized equations can be written in the form

N(u) G u f = D 0 p 0       which is of the form A y = b. Now, let y = B yˆ which implies that

AB yˆ = b and use the iteration scheme on this modified equation. We divide the matrix AB in the following manner

AB = M T M yˆ = T yˆ + b − ⇒ and use this to define the iteration scheme

1 k+1 1 k 1 k k MB− y = T B− y + b = MB− y + b A y − which can be simplified to

k+1 k 1 k y = y + BM − b A y − rk  where rk is the residual error in the k:th step of the iteration| {z pro} cedure. If B = I we obtain a regular iteration method where residual rk is used to update yk by inverting M, a simplified part of A, as in the Gauss-Seidell method for example. For this method we have

A x = b A = L U (L U−) x = b L x−n+1 = U xn + b

Application to the steady Navier-Stokes equations When the distributive iteration method is applied to the steady Naiver-Stokes we have

N(u) G A = D 0   we can obtain AB in the following block triangular form

N(u) 0 AB = 1 D DN(u)− G  −  if the matrix B has the form

1 1 I N(u)− G I N˜(u)− G B = − − 0 I ≈ 0 I     1 where N˜(u)− is a simple approximation of the inverse of the discrete Navier-Stokes operator. We now split AB = M T where − Q 0 M = D R   1 and where Q is an approximation of N(u) and R is an approximation of DN − G. Note that R is a discrete Laplace like operator. − 70 CHAPTER 3. FINITE VOLUME METHODS FOR INCOMPRESSIBLE FLOW

The SIMPLE (Semi-Implicit Method for Pressure Linked Equations) by Pantankar and Spalding (1972) can be thought of as a distributive iteration method. Wesseling [10] indicates that by choosing

1 k 1 N˜(u)− = [diagN(u )]− Q = N(uk) k 1 R = D[diagN(u )]− G − we have a method which is essentially the original version of the SIMPLE method. Thus we have the following iteration steps

1. First, we calculate the residual

f N(uk) G uk rk b A yk = = 1 − 0 − D 0 pk rk        2 

1 k 2. Second, we calculate M − r which implies

k 1 k Q δu˜ = r δu˜ = Q− r 1 ⇒ 1 R δp˜ = rk D δu˜ 2 −

1 k 3. Third, we have the distribution step BM − r which becomes

δu δu˜ δu˜ N˜ 1G δp˜ = B = − δp δp˜ − δp˜       4. Fourth, there is an under relaxation step, where the velocities and the pressure is updated

k+1 k u = u + ωuδu pk+1 = pk + ω δp  p

The under relaxation is needed for the method to converge, thus ωu and ωp is usually substantially lower that one. PSfrag replacements

x, x1 y, x2 z, x3 u, u1 v, u2 w, u3 x1 x2 0 xi 0 ˆ ri xi , t u x 0, tˆ i i  P tˆ= 0  x u1 u2 > u1 x1 x2 x3 0 xi ui dtˆ 0 dxi dui dtˆ ri dtˆ dr dtˆ i  P 1 P2 x1 x2 x3 R3 R2 R1 r3 r2 r1 π 2 + dϕ12 V (t) S (t) V (t + ∆t) V (t) S (t−+ ∆t) u n V (t + ∆t) p T0, U0 Tw L T0 U0 Gradient fields wi ∂p ∂xi ui Divergence free vectorfields // to boundary L h x1 x2 p0 > p1 p1 u n dS u n∆t · x y u0 p0 η = y √4νt u u0 y = η√4νt t η y ω˜(η) u ω = · 0 z √πνt t L }δ ω 0 U≈ y→, v x, u L U δ u0 η = y √νx/u0 u f 0 = u0 Blasius profile

δ∗ x Separation point = Pressure force ⇐ x y l

uT x y dx dy dx dl = ( dx,−dy) n dl = ( dy, dx) − i 1, j + 1 − i, j + 1 Chapter 4 i + 1, j + 1 c c0 b b0 Finite elemeni t1, jmethods for i +− 1, j incompressiblei, j flow Aabcd d d0 The finite-element method (FEM) approaximates an integral form of the governing equations. However, the integral form—called the variational aform0 —is usually different from the one used for the finite-volume method. Moreover, different integrali 1,formsj 1 may be used for the same equation depending on circumstances − i, j − 1 such as boundary conditions. We intro−duce FEM first for a scalar advection–diffusion problem before discussing the Navier–Stokes equations.i + 1, j 1 − j i 4.1 FEM for an advection–diffusioni + 1 problem ui,j We consider the steady flow of an incompressiblevi,j fluid in a bounded domain Ω, and we assume that its velocity field Uj is known (from a previouspi,j numerical solution, for instance). We assume that the boundary Γ of the domain can be decomposed inptoi,j two portions Γ0 and Γ1, as in figure 4.1 for instance. We are interested to compute the temperaturevi,j+1field/2 u in the domain, modeled by the advection–diffusion problem vi,j 1/2 − ui 1/2,j∂u 2 −Uj 1 ν u = f in Ω, (4.1a) i ∂xj − ∇ − 2 i u = 0 on Γ0, (4.1b) i + 1 2 ∂u i + 1 = 0 on Γ1. (4.1c) 3 ∂n i + 2 1 j + ∂Uj The coefficient ν > 0 is the thermal diffusivit2 y. Incompressibility yields that = 0. We assume that j ∂xj Γ1 is a solid wall, so that nj Uj = 0 on Γ11. This simplifies the analysis but is not essential. The Dirichlet j 2 ∂u boundary condition u = 0 on Γ0 is called− an isothermal condition, whereas the Neumann condition = 0 j 1 ∂n on Γ1 is an adiabatic condition. − Deriving the integral form that is usedA to form the finite-element discretization requires some . The product rule of differentiationB yields C u 3 ,1 ∂ 2 ∂u ∂v ∂u 2 v1, 3 v = + v u. (4.2) ∂xi 2 ∂xi ∂xi ∂xi ∇ p1,1  0 n 1 2 Γ0 i j Ω Inflow Solid wall Γ1

Figure 4.1: A typical domain associated with the advection–diffusion problem (4.1).

71 72 CHAPTER 4. FINITE ELEMENT METHODS FOR INCOMPRESSIBLE FLOW

Recall the divergence theorem ∂wi dΩ = niwi dΓ. (4.3) ∂xi ΩZ ZΓ Integrating expression (4.2) and applying the divergence theorem on the left side yields

∂u ∂v ∂u v dΓ = dΩ + v 2u dΩ. (4.4) ∂n ∂xi ∂xi ∇ ZΓ ΩZ ΩZ

(Note that ∂u ∂u = ni .) ∂n ∂xi

Let v be any smooth function such that v = 0 on Γ0. Multiplying equation (4.1a) with v, integrating over Ω, and utilizing expression (4.4) yields

0  ∂u 2 ∂u ∂v ∂u ∂ u fv dΩ = vUj dΩ ν v u dΩ = vUj dΩ + ν dΩ ν v dΓ, ∂xj − ∇ ∂xj ∂xj ∂xj − ∂n ΩZ ΩZ ΩZ ΩZ ΩZ Z Γ where the last term vanishes on Γ0 due to the requirements on v, and on Γ1 due to boundary condition (4.1c) We have thus shown that a smooth (twice continuously differentiable) solution to problem (4.1) (also called a classical solution) satisfies the varational form

∂u ∂v ∂u vUj dΩ + ν dΩ = fv dΩ (4.5) ∂xj ∂xj ∂xj ΩZ ΩZ ΩZ for each smooth function v vanishing on Γ0 We will now “forget” about the differential equation (4.1), and directly consider the variational form (4.5). For this, we need to introduce the function space

∂v ∂v V = v : dΩ < + , v = 0 on Γ0 .  ∂xi ∂xi ∞   ΩZ  The space V is a linear space, that is, u, v V αu + βv V α, β R. The requirement that the gradient-square of each function in V is bounded∈ should⇒ be intepreted∈ ∀ as ∈a requirement that the energy is bounded. The variational problem will thus be

Find u V such that ∈ ∂u ∂v ∂u (4.6) vUj dΩ + ν dΩ = fv dΩ v V. ∂xj ∂xj ∂xj ∀ ∈ ΩZ ΩZ ΩZ

A solution to variational problem (4.6) is called a weak solution to advection–diffusion problem (4.1). The derivation leading up to expression (4.5) shows that a classical solution is a weak solution. However, a weak solution may not be a classical solution since functions in V may fail to be twice continuously differentiable. Note that the boundary conditions are incorporated into the variational problem. The Dirichlet bound- ary condition on Γ0 is explicitly included in the definition of V and is therefore referred to as an essential boundary condition. The Neumann condition on Γ1 is defined implicitly through the variational form and is therefore called a natural boundary condition.

4.1.1 Finite element approximation Let us triangulate the domain Ω by dividing it up into triangles, as in figure 4.2. Let M be the number of triangles and N the number of nodes in Ω Γ1, that is, the nodes on Γ0 are excluded in the count. Let h be the largest side of any triangle. ∪ Let Vh be the space of all functions that are - continuous on Ω, PSfrag replacements

x, x1 PSfrag replacements y, x2 z, x3 x, x1 u, u1 y, x2 v, u2 z, x3 w, u3 u, u1 x1 v, u2 x2 w, u3 0 xi x1 0 ri x , tˆ x2 i 0 u x 0, tˆ xi i i  0 ˆ P tˆ= 0 ri xi , t  u x 0, tˆ x i i   P tˆ= 0 u1  u2 > u1 x x1 u1 x2 u2 > u1 x3 x1 0 xi x2 ui dtˆ x3 0 x 0 dxi i ˆ dui dtˆ ui dt 0 ri dtˆ dxi ˆ dr dtˆ dui dt i  ˆ P ri dt 1 dri dtˆ P2  P x1 1 P x2 2 x3 x1 R3 x2 R2 x3 R1 R3 2 r3 R r2 R1 3 r1 r π 2 2 + dϕ12 r V (t) r1 π S (t) 2 + dϕ12 V (t + ∆t) V (t) V (t) S (t−+ ∆t) S (t) V (t + ∆t) V (t) u − n S (t + ∆t) V (t + ∆t) u p n T0, U0 V (t + ∆t) Tw p L T0, U0 T0 Tw U0 L Gradient fields T0 wi U0 ∂p Gradient fields ∂xi wi ui ∂p Divergence free vectorfields // to boundary ∂xi L ui h Divergence free vectorfields // to boundary x1 L x2 h p0 > p1 x1 p1 x2 u p0 > p1 n p1 dS u u n∆t n · x dS y u n∆t · u0 x p0 y η = y u √4νt 0 u p0 u0 η = y √ √4νt y = η 4νt u t u0 η y = η√4νt y t ω˜(η) u0 η ωz = · √πνt y t ω˜(η) u0 ωz = · L √πνt }δ t ω 0 L ≈ U }δ y→, v ω 0 ≈ x, u U → L y, v U x, u δ L u0 U y η = δ √νx/u0 u u0 f 0 = y u0 η = √νx/u0 Blasius profile u f 0 = u δ∗ 0 x Blasius profile Separation point δ∗ = Pressure force x ⇐ x Separation point y = Pressure force ⇐ l x y uT x l y uT dx x dy y dx dx dl = ( dx,−dy) dy n dl = ( dy, dx) dx − − i 1, j + 1 dl = ( dx, dy) − n dl = ( dy, dx) i, j + 1 − i 1, j + 1 i + 1, j + 1 − c i, j + 1 i + 1, j + 1 c0 b c b0 c0 i 1, j b − i + 1, j b0 i, j i 1, j − Aabcd i + 1, j d i, j A d0 abcd a d a0 d0 i 1, j 1 a − − i, j 1 a0 i + 1, j − 1 i 1, j 1 − − − j i, j 1 i + 1, j − 1 i − i + 1 j ui,j i vi,j i + 1 pi,j ui,j pi,j vi,j vi,j+1/2 pi,j vi,j 1/2 pi,j − ui 1/2,j vi,j+1/2 − i 1 vi,j 1/2 − 2 − ui 1/2,j i − 1 i + 1 i 2 − 2 i + 1 i 3 i + 1 i + 2 2 j + 1 i + 1 2 3 j i + 2 1 1 j j + 2 − 2 j 1 j − j 1 A − 2 j 1 B − C A u 3 4.1. FEM2 ,1 FOR AN ADVECTION–DIFFUSION PROBLEM B 73 v 3 1, 2 C u 3 ,1 p1,1 Γ0 2 v1, 3 0 2 1 p1,1 2 0 i 1 j 2 Inflow i Solid wall j Γ1 n Inflow Γ0 Solid wall Γ1 n Ω Γ0 Γ1 Ω

Figure 4.2: A triangulation. Here, the number N are Figure 4.3: The “tent or “hat basis function associ- the black nodes. ated with continuous, piece-wise linear functions.

- linear on each triangle,

- vanishing on Γ0.

Note that V V . We get a finite-element approximation of our advection-diffusion problem by simply h ⊂ replacing V by Vh in variational problem (4.6), that is:

Find u V such that h ∈ h ∂uh ∂vh ∂uh (4.7) vhUj dΩ + ν dΩ = fvh dΩ vh Vh. ∂xj ∂xj ∂xj ∀ ∈ ΩZ ΩZ ΩZ

Restricting the function space in a variational form to a subspace is called a Galerkin approximation. The finite-element method is a Galerkin approximation in which the subspace is given by piecewise polynomials.

4.1.2 The algebraic problem. Assembly.

Once the value of a function uh in Vh is known at all node points, it is easy to reconstruct it by linear interpolation. This interpolation can be written as a sum of the “tent” basis functions Φ(n) (figure 4.3), which are functions in Vh that are zero at each node point except node n, where it is unity. Thus,

N (n) (n) uh (xi) = u Φ (xi) , (4.8) n=1 X (n) where u denotes the value of uh at node n. Note that expansion (4.8) forces uh = 0 on Γ0 since it excludes the nodes on Γ0 in the sum. Substituting expansion (4.8) into FEM approximation (4.7) yields

N N ∂Φ(n) ∂v ∂Φ(n) u(n) v U dΩ + ν u(n) h dΩ = fv dΩ v V . (4.9) h j ∂x ∂x ∂x h ∀ h ∈ h n=1 j n=1 j j X ΩZ X ΩZ ΩZ

(m) Since each basis function is in Vh, we may choose vh = Φ Vh for m = 1, . . . , N in equation (4.9), which then becomes ∈

N N ∂Φ(n) ∂Φ(m) ∂Φ(n) u(n) Φ(m)U dΩ + ν u(n) dΩ = fΦ(m) dΩ, m = 1, . . . , N. (4.10) j ∂x ∂x ∂x n=1 j n=1 j j X ΩZ X ΩZ ΩZ This is a linear system system Au = b, where A = C + νK and

(m) (n) (n) ∂Φ ∂Φ (m) ∂Φ Kmn = dΩ, Cmn = Φ Uj dΩ, (4.11) ∂xj ∂xj ∂xj ΩZ ΩZ PSfrag replacements

x, x1 y, x2 z, x3 u, u1 v, u2 w, u3 x1 x2 0 xi 0 ˆ ri xi , t u x 0, tˆ i i  P tˆ= 0  x u1 u2 > u1 x1 x2 x3 0 xi ui dtˆ 0 dxi dui dtˆ ri dtˆ dr dtˆ i  P 1 P2 x1 x2 x3 R3 R2 R1 r3 r2 r1 π 2 + dϕ12 V (t) S (t) V (t + ∆t) V (t) S (t−+ ∆t) u n V (t + ∆t) p T0, U0 Tw L T0 U0 Gradient fields wi ∂p ∂xi ui Divergence free vectorfields // to boundary L h x1 x2 p0 > p1 p1 u n dS u n∆t · x y u0 p0 η = y √4νt u u0 y = η√4νt t η y ω˜(η) u ω = · 0 z √πνt t L }δ ω 0 U≈ y→, v x, u L U δ u0 η = y √νx/u0 u f 0 = u0 Blasius profile

δ∗ x Separation point = Pressure force ⇐ x y l

uT x y dx dy dx dl = ( dx,−dy) n dl = ( dy, dx) − i 1, j + 1 − i, j + 1 i + 1, j + 1 c c0 b b0 i 1, j i +− 1, j i, j Aabcd d d0 a a0 i 1, j 1 − i, j − 1 i + 1, j − 1 − j i i + 1 ui,j vi,j pi,j pi,j vi,j+1/2 vi,j 1/2 − ui 1/2,j −i 1 − 2 i 1 i + 2 i + 1 3 i + 2 1 j + 2 j j 1 − 2 j 1 − A B C u 3 2 ,1 v 3 1, 2 p1,1 0 74 CHAPTER14. FINITE ELEMENT METHODS FOR INCOMPRESSIBLE FLOW 2 i j 2 Inflow M

Solid wall

9:9:9:9:9:9:9:9 <:<:<:<:<:<:<:<

;:;:;:;:;:;:;:; =:=:=:=:=:=:=:=

9:9:9:9:9:9:9:9 <:<:<:<:<:<:<:< =:=:=:=:=:=:=:=

n ;:;:;:;:;:;:;:;

9:9:9:9:9:9:9:9 <:<:<:<:<:<:<:< =:=:=:=:=:=:=:=

Γ0 ;:;:;:;:;:;:;:;

9:9:9:9:9:9:9:9 <:<:<:<:<:<:<:<

;:;:;:;:;:;:;:; =:=:=:=:=:=:=:=

9:9:9:9:9:9:9:9 <:<:<:<:<:<:<:< =:=:=:=:=:=:=:=

Γ1 ;:;:;:;:;:;:;:;

9:9:9:9:9:9:9:9 <:<:<:<:<:<:<:< =:=:=:=:=:=:=:=

;:;:;:;:;:;:;:;m m + 2

9:9:9:9:9:9:9:9 <:<:<:<:<:<:<:< =:=:=:=:=:=:=:=

Ω ;:;:;:;:;:;:;:;

9:9:9:9:9:9:9:9 <:<:<:<:<:<:<:<

;:;:;:;:;:;:;:; =:=:=:=:=:=:=:=

1 M h

h

Figure 4.4: An example mesh that gives a particular simple stiffness matrix K

(1) (1) fΦ dΩ u Ω .  R .  u =  .  b = . u(n)  fΦ(N) dΩ         Ω   R  The union of all triangles constitutes the domain Ω and that the triangles do not overlap. Thus, any integral over Ω can be written as a sum of integrals over each triangle,

M M ∂Φ(m) ∂Φ(n) ∂Φ(m) ∂Φ(n) K = dΩ = dΩ = K(p) . mn ∂x ∂x ∂x ∂x mn Z j j p=1 Z j j p=1 Ω XTp X

(p) (p) Note that Kmn vanishes as soon as m or n is not a corner node of triangle p. Thus Kmn contributes to the sum only when m and n both are corner nodes of triangle p. Matrix K can thus be computed by looping (p) all M triangles, calculating the element contribution Kmn for m, n being the three nodes of triangle p and adding these 9 contribution to matrix K. Note that the derivatives of Φ(n) are constant on each triangle, (p) so Kmn is easy to compute exactly. Matrix C and vector b can also be computed by element assembly, but numerical quadrature is usually needed, except if Uj and f happen to be particularly “easy” functions (such as constants).

4.1.3 An example

As an example, we will compute the elements of K, the “stiffness matrix” (a term borrowed from structural mechanics), for the particular case of the structured mesh depicted in figure 4.4. Let M be the number of internal nodes in the horizontal as well as the vertical direction (the solid nodes in figure 4.4.) The width of each “panel” is then h = 1/(M + 1), and the area of each triangle is T = h2/2. The components of K are | k|

∂Φ(m) ∂Φ(n) Kmn = dΩ (4.12) ∂xj ∂xj ΩZ

(m) Note that Kmn vanishes for most m and n. For instance, Km,m+2 = 0, since basis functions Φ and (m+2) Φ do not overlap (figure 4.4). In fact, Kmn = 0 only when m and n are associated with nodes that are nearest neighbors. 6 To compute matrix element (4.12), we need expressions for the gradients of basis functions Φ(m) and Φ(m+1). Since the functions are piecewise linear, the gradient is constant on each triangles and may thus easily be computed by finite-differences in the coordinate direction (figure 4.5). By the expressions in PSfrag replacements

x, x1 y, x2 z, x3 u, u1 v, u2 w, u3 x1 x2 0 xi 0 ˆ ri xi , t u x 0, tˆ PSfrag replacemeni its  P tˆ= 0 x, x1  y, x2 x z, x3 u1 uu,2 u>1 u1 v, u2 x1 w, u3 x2 x1 x3 x 0 x2 i 0 ˆ xui i dt 0 ˆdx 0 ri xi , t i u x 0,dtˆui dtˆ i i  ˆ P tˆ=ri 0dt dr dtˆ i x  P u 1 1 P u2 > u1 2 x x1 1 x x2 2 x x3 3 0 3 xi R 2 ui dtˆR 0 1 dxi R 3 dui dtˆr 2 ri dtˆ r ˆ r1 drπi dt 2 + dϕ12 P1 PV(t) S2(t) x V (t + ∆t) V1(t) x S (t−+ ∆2 t) x3 u R3 2 n V (t +R∆t) 1 R p r3 T0, U0 r2 Tw r1 π L 2 + dϕ12 V (t)T0 S (t)U0 V (t +Gradien∆t) Vt (fieldst) − wi S (t + ∆t)∂p u∂xi n ui Divergence free vectorfields //Vto(tb+oundary∆t) p L T0, U0 h Tw x1 Lx2 p > p 0 T0 1 p U0 1 Gradient fields u wi n ∂p dS ∂xi u n∆t ·ui Divergence free vectorfields // to boundary x y Lu h 0 p0 η = x1y √4νt x2 u u p0 > p1 0 y = η√4νt p1 u t η n y ω˜d(ηS) u ω = · 0 zu n√∆πtνt · x t y L u0 }δ ωp0 0 η = y ≈ √4Uνt u → u0y, v y = η√4νx,t u t L η U y δ ω˜(η) u0 ωz = · u0 η =√πνty √νx/u0 t u f 0 = L u0 Blasius profile}δ ω 0 δ∗ U≈ x Separationyp→,oinv t = Pressurex,forceu ⇐ L x U y δ l u0uT y η = x √νx/u0 u y f 0 = u0 Blasius profiledx dy δ ∗dx dl = ( dx,−xdy) Separation point n dl = ( dy, dx) = Pressure force− ⇐ i 1, j + 1 − i, jx+ 1 y i + 1, j + 1 l c uT c x 0 y b b0 i dx1, j dy i +− 1, j dx i, j dl = ( dx,−dy) n dl = ( dy, dAxabcd) − i 1, j + 1 d − i, j + 1 d0 i + 1, j + 1 a a0 i 1, j c 1 − i, jc−0 1 i + 1, j b− 1 b−0 j i 1, j i +− 1, j i i,ij+ 1 ui,j Aabcd vi,j d pi,j d0 pi,j a vi,j+1/2 a vi,j 01/2 i 1, j −1 − ui−1/2,j i, j −i 1 1 i + 1, j − 1− 2 − i i +j 1 i 2 i + 1 i + 1 3 i + 2 ui,j 1 j + 2 vi,j j pi,j 1 j 2 pi,j− j 1 vi,j+1/2− vi,j 1/2 A − ui 1/2,j B −i 1 C u2 3 − 2 ,1 vi 3 11, 2 i + 2 p1,1 i + 1 3 0 i + 2 1 1 j + 2 j 2 j 1 i − 2 j j 1 Inflo− w A Solid wall B n C u 3 Γ0 2 ,1 v 3 Γ1 1, 2 p1,1 Ω M 2 4.1. FEM FOR AN ADVECTION–DIFFUSION PROBLEM 0 75 M 1 m 2 m + 2 1 , 0 on T , i T3 h 1 1 1 1 j , on T2,  h −h h T4 1 Inflow T2  0, h on T3, m  −  Solid wall Φ( ) =  1 , 0 on T ,  h  4 n ∇  − T1  1 , 1 on T , T5  h h 5 Γ0 − 1 0, on T6, Γ1  h   Ω T6 0  on all other triangles.  M 2  Figure 4.5: The gradient of test function Φ(m) for mMbeing the (black) middle node.

m

A(A(A(A(A(A(A(A(A B(B(B(B(B(B(B(B(B

m + 2 @?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@ A(A(A(A(A(A(A(A(A

(m) B(B(B(B(B(B(B(B(B

A(A(A(A(A(A(A(A(A @?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@ 1 1 B(B(B(B(B(B(B(B(B

1Φ>?>?>?>?>?>?>?>?>?>?>?>?>?>?>?>?> A(A(A(A(A(A(A(A(A

h , h on T1, B(B(B(B(B(B(B(B(B

A(A(A(A(A(A(A(A(A @?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@ B(B(B(B(B(B(B(B(B

− >?>?>?>?>?>?>?>?>?>?>?>?>?>?>?>?> A(A(A(A(A(A(A(A(A

(m) 1 h B(B(B(B(B(B(B(B(B

@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@ A(A(A(A(A(A(A(A(A Φ = , 0 on T , B(B(B(B(B(B(B(B(B (m+1) h 2 >?>?>?>?>?>?>?>?>?>?>?>?>?>?>?>?>T2

 A(A(A(A(A(A(A(A(A Φ

∇ −  B(B(B(B(B(B(B(B(B

@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@

A(A(A(A(A(A(A(A(A

B(B(B(B(B(B(B(B(B

>?>?>?>?>?>?>?>?>?>?>?>?>?>?>?>?>  A(A(A(A(A(A(A(A(A

0 on all other triangles B(B(B(B(B(B(B(B(B

@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@

A(A(A(A(A(A(A(A(A B(B(B(B(B(B(B(B(B

 >?>?>?>?>?>?>?>?>?>?>?>?>?>?>?>?>T1

A(A(A(A(A(A(A(A(A

B(B(B(B(B(B(B(B(B

@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@

A(A(A(A(A(A(A(A(A B(B(B(B(B(B(B(B(B

1 >?>?>?>?>?>?>?>?>?>?>?>?>?>?>?>?> A(A(A(A(A(A(A(A(A

 , 0 on T1, B(B(B(B(B(B(B(B(B

@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@ A(A(A(A(A(A(A(A(A

(m+1)  h B(B(B(B(B(B(B(B(B

>?>?>?>?>?>?>?>?>?>?>?>?>?>?>?>?> A(A(A(A(A(A(A(A(A Φ = 1 1 B(B(B(B(B(B(B(B(B ∇ , on T . >?>?>?>?>?>?>?>?>?>?>?>?>?>?>?>?> ( h −h 2  Figure 4.6: The support for basis functions Φm and Φm+1 are marked with vertical and horizontal stripes respectively.

figure 4.5, we have

6 2 2 ∂Φ(m) ∂Φ(m) ∂Φ(m) ∂Φ(m) Kmm = dΩ = + dΩ ∂xj ∂xj ∂x ∂y Z k=1 Z "    # Ω XTk 1 1 1 1 1 1 = T + 2 T + T + T + 2 T + T h2 | 1| h2 | 2| h2 | 3| h4 | 4| h2 | 5| h2 | 6| 1 h2 = 8 = 4 h2 2 The common support for basis functions Φm and Φm+1 is only the two triangles marked in figure 4.6; that is, it is only on these two triangles that both functions are nonzero at the same time. Utilizing the gradient expressions given in figure 4.6 yields

2 1 1 2 h2 K = Φ(m) Φ(m+1) dΩ = Φ(m) Φ(m+1) dΩ = T T = = 1, m,m+1 ∇ · ∇ ∇ · ∇ −h2 | 1| − h2 | 2| −h2 2 − ZΩ k=1 Z XTk and in the same manner, Km,m 1 = Km,m+M = Km,m M = 1. − − − Altogether, K becomes the block-tridiagonal M 2-by-M 2 matrix T I I −T I  − . −. .  K = ...... ,    I T I   − −   I T   −    where I is the M-byM identity matrix, and T the M-byM matrix 4 1 1 −4 1  − . −. .  T = ......    1 4 1   − −   1 4   −    Thus, a typical row in the matrix–vector product Ku becomes

4um um+1 um 1 um+M um M , (4.13) − − − − − − 76 CHAPTER 4. FINITE ELEMENT METHODS FOR INCOMPRESSIBLE FLOW that is, after dividing expression (4.13) with h2, we recognize the classical five-point stencil for the negative Laplacian 2. Thus our−∇finite-element discretization is for this particular mesh equivalent to a finite-volume or finite- difference discretization. However, for a general unstructured mesh, the finite-element discretization will not give rise to any obvious finite-difference stencil.

4.1.4 Matrix properties and solvability

Matrix A is sparse: the elements of martix A are mostly zeros. At row m, matrix element Amn = 0 only in the columns where n represents a nearest neighbor to node m. The number of nonzero elemen6 ts on each row does not grow (on average) when the mesh is refined (since the number of nearest neighbors in a mesh does not grow). Thus, the matrices become sparser and sparser as the mesh is refined. A common technique in finite-element codes is therefore to use sparse representation, that is, to store only the nonzero elements and pointers to matrix locations. T It is immediate from expression (4.11) that Kmn = Knm, that is, K is a symmetric matrix (K = K). Integration by parts also shows that matric C is skew symmetric (C T = C). − Theorem 1. K is positive definite, that is, vT Kv > 0 for each v = 0. 6 Proof. Let v V . Then v = N v(N)Φ(n). Denote v = (v(1), . . . , v(N))T . h ∈ h h n=1 N N P ∂Φ(n) ∂Φ(m) vT Kv = v(n) dΩ v(m) ∂x ∂x m=1 n=1 Ω i i X X Z N N ∂ ∂ ∂v ∂v = v(m)Φ(m) v(m)Φ(n) dΩ = h h dΩ 0, ∂x ∂x ∂x ∂x ≥ Ω m=1 i n=1 i Ω i i Z X   X   Z ∂vh with equality if and only if = 0, that is, if vh = Const. But since vh Γ = 0, vh 0.  ∂xi | 0 ≡ From Theorem 1 also follows that A is positive definite. To see this, note that the skew-symmetry of C yields that T vT Cv = vT Cv = vT CT v = vT Cv − T that is, v Cv = 0 for each v. Thus  vT Av = vT (K + C) v = vT Kv + vT Cv = vT Kv > 0 for each v = 0, that is, A is positive definite. However, A is not symmetric whenever Uj = 0. Recall 6that a linear system Au = b has a unique solution for each b if the matrix is6 nonsingular. A positive-definite matrix is a particular example of a nonsingular matrix. We thus conclude that the linear system resulting from the finite-element discretization (4.7) has a unique solution.

4.1.5 Stability and accuracy We have defined the finite-element approximation and showed that the finite-element approximation yields a linear system Au = b that has a unique solution. Now the question is whether the approximation is any good. We will study the stability and accuracy of the numerical solution. FEM usually uses integral norms for analysis of stability and accuracy. We start by reviewing some mathematical concepts that will be used in the analysis.

Basic definitions and inequalities The most basic integral norm is 1/2 2 v 2 = v dΩ k kL (Ω) ZΩ  For the current problem, a more fundamental quantity is the energy norm

1/2 ∂v ∂v 1/2 v = v 2 dΩ = dΩ k kV |∇ | ∂x ∂x ZΩ  ZΩ i i  and associated inner product ∂u ∂v (u, v) = u v dΩ = dΩ. (4.14) V ∇ · ∇ ∂x ∂x ZΩ ZΩ i i 4.1. FEM FOR AN ADVECTION–DIFFUSION PROBLEM 77

The Cauchy–Schwarz inequality for vectors a = (a1, . . . , an) is

a b a b = a a 1/2 b b 1/2, | · | ≤ | || | | · | | · | whereas for functions it reads

1/2 1/2 fg dΩ f 2 dΩ g2 dΩ , (4.15) ≤ ZΩ ZΩ  ZΩ 

which can be denoted (f, g) 2 f 2 g 2 . L (Ω) ≤ k kL (Ω)k kL (Ω) The Cauchy–Schwarz inequality (4.15) implies that, for each nonzero, square-integrable g,

1/2 2 Ω fg dΩ f dΩ 1/2 . Ω ≥ R g2 dΩ Z  Ω Choosing g = f yields equality in above expression. ThusR 

1/2 2 Ω fg dΩ Ω fg dΩ 2 f L (Ω) = f dΩ = max 1/2 = max k k g=0 2 g=0 g 2 Ω 6 R g dΩ 6 R L (Ω) Z  Ω k k The rightmost expression is a “variational characterization”R ofthe L2(Ω) norm, that is, it expresses the norm in terms of something that is optimized. By inserting derivatives in the nominator and/or denominator of the variational characterization, various exotic norms can be defined. A norm, different from the L2(Ω) norm and of importance for the Navier–Stokes equations is ∂w p i dΩ ∂x Ω  i  p exotic = max Z 1/2 . (4.16) k k wi 2 wi dΩ |∇ | ZΩ  This norm will be of crucial importance when we analyze the stability of FEM form the Navier–Stokes equations. The Poincar´e inequality relates the energy and L2(Ω) norms: Theorem 2 (Poincar´e inequality). There is a C > 0 such that ∂v ∂v v2 dΩ C dΩ, ≤ ∂x ∂x ZΩ ZΩ i i that is, 2 2 v 2 C v k kL (Ω) ≤ k kV for each v V . ∈ Remark 1. Theorem 2 says that the energy norm is stronger than then L2(Ω) norm. The smallest possible value of C grows with the size of Ω. The Poincar´e inequality holds only if Ω is bounded in at least one direction. Also, the inequality does not hold if dΓ = 0. However, the inequality Γ0 R ∂v ∂v v2 dΩ C v2 dΩ + dΩ ≤ ∂x ∂x ZΩ ZΩ ZΩ i i  holds also when dΓ = 0. Γ0 R Stability

Choosing vh = uh in equation (4.7) yields

∂uh ∂uh ∂uh uhUj dΩ + ν dΩ = fuh dΩ. (4.17) ∂xj ∂xj ∂xj ΩZ ΩZ ΩZ Note that ∂u u U h dΩ = uT Cu = 0, h j ∂x ZΩ j PSfrag replacements

x, x1 y, x2 z, x3 u, u1 v, u2 w, u3 x1 x2 0 xi 0 ˆ ri xi , t u x 0, tˆ i i  P tˆ= 0  x u1 u2 > u1 x1 x2 x3 0 xi ui dtˆ 0 dxi dui dtˆ ri dtˆ dr dtˆ i  P 1 P2 x1 x2 x3 R3 R2 R1 r3 r2 r1 π 2 + dϕ12 V (t) S (t) V (t + ∆t) V (t) S (t−+ ∆t) u n V (t + ∆t) p T0, U0 Tw L T0 U0 Gradient fields wi ∂p ∂xi ui Divergence free vectorfields // to boundary L h x1 x2 p0 > p1 p1 u n dS u n∆t · x y u0 p0 η = y √4νt u u0 y = η√4νt t η y ω˜(η) u ω = · 0 z √πνt t L }δ ω 0 U≈ y→, v x, u L U δ u0 η = y √νx/u0 u f 0 = u0 Blasius profile

δ∗ x Separation point = Pressure force ⇐ x y l

uT x y dx dy dx dl = ( dx,−dy) n dl = ( dy, dx) − i 1, j + 1 − i, j + 1 i + 1, j + 1 c c0 b b0 i 1, j i +− 1, j i, j Aabcd d d0 a a0 i 1, j 1 − i, j − 1 i + 1, j − 1 − j i i + 1 ui,j vi,j pi,j pi,j vi,j+1/2 vi,j 1/2 − ui 1/2,j −i 1 − 2 i 1 i + 2 i + 1 3 i + 2 1 j + 2 j j 1 − 2 j 1 − A B C u 3 2 ,1 v 3 1, 2 p1,1 0 1 2 i j Inflow Solid wall n Γ0 Γ1 Ω 78 CHAPTERM 2 4. FINITE ELEMENT METHODS FOR INCOMPRESSIBLE FLOW M u m m + 2 1 V h Vh

uh

Figure 4.7: An orthogonal projection on a line. Note that the vector u uh is the shortest of all vectors u v for v V , that is, u u u v v V . − − h h ∈ h k − hk ≤ k − hk ∀ h ∈ h

since C = CT (using the notation of 4.1.4). − § Expression (4.17) thus becomes

∂u ∂u ν h h dΩ = fu dΩ ∂x ∂x h ZΩ i i ZΩ 2 uh k kV | {z } 1/2 1/2 (Cauchy–Schwarz) f 2 dΩ u2 dΩ ≤ h ZΩ  ZΩ  1/2 ∂u ∂u 1/2 (Poincar´e) C f 2 dΩ h h dΩ ≤ ∂x ∂x ZΩ  ZΩ i i  C f 2 u . ≤ k kL (Ω)k hkV

Dividing with uh V shows that k k C u f 2 k hkV ≤ ν k kL (Ω)

where the constant C does not depend on h. That is, we have shown that uh cannot blow up as the discretization is refined, which is the same as saying that the numerical solution is stable.

Error bounds

Choosing v = vh Vh V in variational problem (4.6) and subtracting equation (4.7) from(4.6) yields the “Galerkin orthogonalit∈ ⊂y”,

∂v ∂ ∂ ν h (u u ) dΩ + v U (u u ) dΩ = 0 v V . ∂x ∂x − h h j ∂x − h ∀ h ∈ h ZΩ i i ZΩ j This is a “true” orthogonality condition when U 0: j ≡ ∂v ∂ ν h (u u ) dΩ = 0 v V ; (4.18) ∂x ∂x − h ∀ h ∈ h ZΩ i i

that is, the error u uh is orthogonal to each vh Vh with respect to the inner product (4.14). Cf. two orthogonal vectors: −a b = 0 . Orthogonality relation∈ (4.18) means that u is an orthogonal projection · h of u on Vh. As illustrated in figure 4.7, the orthogonal projection on a subspace yields the vector that is closest to the given element in the norm derived from the inner product in which orthogonality is defined. Orthogonality property (4.18) (cf. figure 4.7) implies that the FE approximation is optimal in the energy norm when U 0: i ≡ u u u v v V . (4.19) k − hkV ≤ k − hkV ∀ h ∈ h The matrix A is symmetric in this case (since C = 0). When Uj = 0, the FEM approximation is no longer optimal in this sense. However, there is a C > 0 such that Cea’s6 lemma holds,

C u u u v v V . (4.20) k − hkV ≤ ν k − hkV ∀ h ∈ h Matrix A is nonsymmetric in this case. Note that the approximation may be far from optimal when ν is small, as the next example illustrates. PSfrag replacements

x, x1 y, x2 z, x3 u, u1 v, u2 w, u3 x1 x2 0 xi 0 ˆ ri xi , t u x 0, tˆ PSfrag replacemeni i ts P tˆ= 0 x, x1 x y, x2 u1 z, x3 u2 > u1 u, u1 x1 v, u2 x2 w, u3 x3 x01 xi x2ˆ uixd0t dxi0 r x 0, tˆi i i ˆ du0i ˆdt ui xi , t ri dtˆ dri dtˆ x P1 u1 P2 u2 > u1 x1 x1 x2 x2 x3 x3 R0 xi2 Rˆ ui d1t dxR0 ri3 du dtˆ i r2 ri dtˆ r1 πdri dtˆ 2 + dϕ12 P V (t1) S (Pt2) V (t + ∆t) V (xt1) − S (t + ∆xt2) xu3 3 Rn V (t + ∆Rt2) Rp1 3 T0, Ur0 2 Trw r1 π L + dϕ12 2 T0 V (t) U0 Gradient fieldsS (t) V (t + ∆t) V (t) − wi S (t + ∆∂tp) ∂xi u ui Divergence free vectorfields // to boundaryn V (t + ∆t) Lp h T0, U0 x1 Tw x2 L p0 > p1 T0 p1 U u0 Gradient fields n wi d∂pS u n∂∆xit · uxi Divergence free vectorfields // to boundaryy uL0 ph0 η = yx √4ν1t u x2 u0 y =pη0√>4pν1t p 1t uη ny ω˜(η)duS0 ωz = · u √nπν∆t t · xt Ly }δ u0 ω p0 η = ≈y U√4νt y→,uv u x, u0 y = η√4νt Lt Uη yδ ω˜(η) u00 ω = y · ηz= √πνt √νx/u0 u f 0 = t uL0 Blasius profile }δ ω δ0∗ U≈ x Separation poiny→, vt = Pressure force ⇐ x, u Lx y U δl uT u0 η = y x √νx/u0 uy f 0 = dux0 Blasius profiledy dδx∗ dl = ( dx,−dyx) nSeparationdl = ( dy, poindxt) − = Pressurei 1, jforce+ 1 ⇐ − i, j + x1 i + 1, j + y1 cl uT c0 xb y b0 i 1d,xj i +− 1d,yj i,dxj dl = ( dx,−dy) Aabcd n dl = ( dy, dx) − d i 1, j + 1 − d0 i, j + a1 i + 1, j + 1 a0 i 1, j 1c − − i, j c10 i + 1, j − 1b − bj0 i 1, j − i i +i +1, 1j ui,i,jj Aabcdvi,j pi,jd pi,jd0 vi,j+1/a2 vi,j 1/a20 − i u1i, j1/2,j1 − − − i, ij 1 −− 2 i + 1, j 1i − 1j i + 2 i + 1i 3 ii++ 21 ui,j1 j + 2 vi,jj 1 j pi,j − 2 j pi,j1 v − i,j+1/A2 vi,j 1/2 − B ui 1/2,j − C1 iu 3 ,21 −2 v1, 3i i + 12 p1,21 i + 1 i + 3 21 j + 1 2 ji j 1 − 2j j 1 Inflo−w Solid wallA Bn ΓC0 u 3 ,1 2Γ1 4.1. FEM FOR AN ADVECTION–DIFFUSION PROBLEM 79 Ω p M1,12 M0 0.8 m1 0.7 m + 2 0.6 i 0.5 hj u 0.4 InfloVw 0.3 Solid wVallh nu 0.2 uΓh0 0.1 Γ1 0 0.9 0.92 0.94 0.96 0.98 1 Ω x M 2 Figure 4.8: Under-resolved standardM Galerkin finite-element approximations may yield oscillations for advection-dominated flows. m m + 2 v 3 1 1, 2

P tˆ=v10, 3 V h 2 Vh  u uh

Figure 4.9: An interpolant Πhv interpolates v at the nodal points.

Example 1. Let us consider the above FEM applied to the 1D problem

1 u00 + u0 = 1 in (0, 1). −500 (4.21) u(0) = u(1) = 0

The problem is advection dominated, that is, the viscosity coefficient in equation (4.21) is quite small: ν = 1/500. A boundary layer with sharp gradients forms close to x = 1. The solid line in figure 4.8 shows the FE solution h = 1/1000, whereas the dashed line shows the FE approximation for h = 1/200. 

The result of example 1 is typical: under-resolved standard Galerkin methods may generate oscillations for advection-dominated flows in areas of sharp gradients. An explanation of this phenomenon is that the directions of flow is not accounted for in the standard Galerkin approximation. Galerkin approximations correspond to finite-difference central schemes. Upwind- ing is used to prevent oscillations for finite-difference methods. Various methods exist to obtain similar effects in FEM, for instance streamline diffusion and discontinuous Galerkin. Both these methods modify the basic Galerkin idea to account for flow-direction effects.

Approximation and mesh quality Estimates (4.19) and (4.20) are independent of the choice of V ! We only used that V V . Next step h h ⊂ in assessing the error is an approximation problem: How well can functions in Vh approximate those in V ? This step is independent of the equation in question. Interpolants are used to study approximation properties. The interpolant is the function Πhv Vh that interpolates the function v V at the node points of the triangulation, as illustrated for a 1D∈case in figure 4.9. ∈ Approximation theory yields that, for sufficiently smooth v,

2 v Πhv L2(Ω) Ch “second order error” k − k ≤ (4.22) v Π v Ch “first order error” k − h kV ≤ The constant C contains integrals of the second derivatives of v. A mesh quality assumption is needed for (4.22) to hold. The essential point is: beware of “thin” triangles; do not let the shape deteriorate as the mesh is refined. A strategy to preserve mesh quality when refining is to subdivide each triangle into four new triangles by joining the edge midpoints (figure 4.10). Each of the conditions below is sufficient for approximation property (4.22) to hold: PSfrag replacements

x, x1 y, x2 z, x3 u, u1 v, u2 w, u3 x1 x2 0 xi 0 ˆ ri xi , t u x 0, tˆ PSfrag replacements i i  P tˆ= 0  x, x1 y, x x 2 u1 z, x3 u2 > u1 u, u1 x1 v, u2 x2 w, u3 x3 x1 0 xi x2 0 ui dtˆ xi 0 0 ˆ dxi ri xi , t du dtˆ u x 0, tˆ i i i  ri dtˆ P tˆ= 0  dr dtˆ i  x P  1 u1 P 2 u2 > u1 x1 x1 x2 x2 x3 x3 3 0 R xi 2 R ui dtˆ 1 0 R dxi 3 r dui dtˆ 2 r ri dtˆ r1 dr dtˆ π i + dϕ12  2 P1 V (t)  P2 S (t) x1 V (t + ∆t) V (t) x2 S (t−+ ∆t) x3 u R3 n R2 V (t + ∆t) R1 p r3 T , U 0 0 r2 T w r1 π L 2 + dϕ12 T0 V (t) U0 S (t) Gradient fields V (t + ∆t) V (t) − wi S (t + ∆t) ∂p ∂xi u ui n Divergence free vectorfields // to boundary V (t + ∆t) L p h T0, U0 x1 Tw x2 L p0 > p1 T0 p1 U0 u Gradient fields n wi ∂p dS ∂xi u n∆t u · i Divergence freex vectorfields // to boundary y L u 0 h p0 x η = y 1 √4νt u x2 u0 p0 > p1 √ y = η 4νt p1 t u η n y dS ω˜(η) u · 0 ωz = √ u n∆t πνt · t x L y u }δ 0 p0 ω 0 y ≈ η = U √4νt → u y, v u0 x, u y = η√4νt L t U η δ y ω˜(η) u ω = · 0 u0 z √πνt η = y √νx/u0 t u f 0 = u0 L Blasius profile }δ δ ω 0 ∗ ≈ x U Separation point y→, v = Pressure force x, u ⇐ x L y U l δ

uT u0 η = y x √νx/u0 u y f 0 = u0 dx Blasius profile dy δ∗ dx − x dl = ( dx, dy) Separation point n dl = ( dy, dx) − = Pressure force i 1, j + 1 ⇐ − x i, j + 1 y i + 1, j + 1 l

c uT c0 x b y b0 dx i 1, j − dy i + 1, j dx i, j dl = ( dx,−dy) Aabcd n dl = ( dy, dx) − d i 1, j + 1 − d0 i, j + 1 a i + 1, j + 1 a0 c i 1, j 1 c − i, j − 1 0 b i + 1, j − 1 − b0 j i 1, j i i +− 1, j i + 1 i, j ui,j A v abcd i,j d p i,j d p 0 i,j a vi,j+1/2 v a0 i,j 1/2 i 1, j 1 u − i 1/2,j − i, j − 1 −i 1 − − 2 i + 1, j 1 i − j i + 1 2 i i + 1 i + 1 i + 3 2 ui,j j + 1 2 vi,j j pi,j j 1 − 2 pi,j j 1 v − i,j+1/2 A vi,j 1/2 − B ui 1/2,j − 1 C i 2 u 3 ,1 − 2 i v1, 3 1 2 i + p 2 1,1 i + 1 3 0 i + 2 1 1 j + 2 2 j i j 1 − 2 j j 1 − Inflow A Solid wall B n C Γ0 u 3 2 ,1 Γ1 v 3 1, 2 80 CHAPTER 4. FINITEΩ ELEMENT METHODSp1,1 FOR INCOMPRESSIBLE FLOW 2 M 0 M 1 m 2 m + 2 i 1 j h Inflow V Solid wall V h n u Γ0 u h Γ1 Ω Figure 4.10: A subdivision that preserves mesh quality. M 2 M (i) (“Maximum angle condition”). The largest an- m gle of any triangle should not approach 180◦ as m + 2 h 0. 1 → h (ii) (“Chunkiness parameter condition”). The V quotient between the diameter of the largest Vh circle that can be inscribed and the diameter u of the triangle should not vanish as h 0. uh Condition (ii) implies (i), but not the reverse.→

Accuracy of the FE solution Error bounds (4.19) and (4.20) together with approximation property (4.22) implies

u u Ch k − hkV ≤ Further analysis (not provided here) yields

2 u u 2 Ch . k − hkL (Ω) ≤ This second-order convergence rate requires a mesh quality assumption and a sufficiently smooth solution u (since the constant C contains second derivatives of u). The convergence rate is of optimal order: it agrees with approximation property (4.22) and is the best order that in general can be obtained for, in this case, piecewise-linear functions. However, the solution may still be bad for a particular, too-crude mesh; recall example 1.

Improving Accuracy Accuracy is improved by refining the mesh (“h-method”). This may be done adaptively, where it is needed (say, in areas of large gradients), to prevent the matrices to become too large. Automatic methods for adaptation are common. An alternative is to keep the mesh fixed and increase the order of the polynomials at each triangle (“p-method”). For instance, continuous, piecewise quadratics yields a third-order-accurate solution (in the L2(Ω) norm). These strategies may be combined in the “h–p method”, where the mesh is refined in certain regions and the order of approximations is increased in other.

4.1.6 Alternative Elements, 3D A quadrilateral is a “skewed” rectangle: four points connected by straight lines to form a closed geometric object. Nonoverlapping quadrilaterals can be used to “triangulate” a domain, as in figure 4.11. An example of a finite-element space Vh on quadrilaterals is globally continuous functions varying linearly along the edges. As in the triangular case, the functions are defined uniquely by specifying the function values at each node. The functions are defined by interpolation into the interior of each quadrilateral. This space reduces to piecewise bilinear functions for rectangles with edges in the coordinate directions:

vh(x, y) = a + b x + c y + d xy

Quadrilaterals on a “logically rectangular domain” (a distorted rectangle, as in figure 4.11) yields a regular structure to the matrix A. This may PSfrag replacements

x, x1 y, x2 z, x3 u, u1 v, u2 w, u3 x1 x2 0 xi 0 ˆ ri xi , t PSfrag replacements u x 0, tˆ PSfrag replacements i i  x, x1 P tˆ= 0 x, x1  y, x2 x y, x2 z, x  z, x 3 u1 3 u, u u, u 1 u2 > u1 1 v, u v, u 2 x1 2 w, u w, u 3 x2 3 x1 x3 x1 0 x2 xi x2 x 0 x 0 i ui dtˆ i r x 0, tˆ 0 r x 0, tˆ i i dxi i i u x 0, tˆ ˆ u x 0, tˆ i i  dui dt i i  P tˆ= 0 r dtˆ P tˆ= 0  i  dr dtˆ x i  x u P u 1 1 1 u2 > u1 P2 u2 > u1 x1 x1 x1 x2 x2 x2 x3 x3 x3 0 0 xi R3 xi ˆ ˆ ui dt R2 ui dt 0 0 dxi R1 dxi ˆ ˆ dui dt r3 dui dt ˆ ˆ ri dt r2 ri dt dri dtˆ r1 dri dtˆ  π  P + dϕ12 P 1 2 1 P2 V (t) P2 x1 S (t) x1 V (t + ∆t) V (t) x2 − x2 x3 S (t + ∆t) x3 R3 u R3 R2 n R2 R1 V (t + ∆t) R1 r3 p r3 r2 T0, U0 r2 r1 Tw r1 π π 2 + dϕ12 L 2 + dϕ12 V (t) T0 V (t) S (t) U0 S (t) V (t + ∆t) V (t) Gradient fields V (t + ∆t) V (t) − − S (t + ∆t) wi S (t + ∆t) ∂p u ∂xi u n ui n Divergence Vfree(t +vectorfields∆t) // to boundary V (t + ∆t) p L p T0, U0 h T0, U0 Tw x1 Tw L x2 L T0 p0 > p1 T0 U0 p1 U0 Gradient fields u Gradient fields wi n wi ∂p ∂p ∂xi dS ∂xi ui u n∆t ui Divergence free vectorfields // to boundary Divergence· x free vectorfields // to boundary L y L h u0 h x1 p0 x1 η = y x2 √4νt x2 u p0 > p1 u0 p0 > p1 p1 y = η√4νt p1 u t u n η n dS y dS ω˜(η) u ω = · 0 u n∆t z √πνt u n∆t · x · x y t y L u0 u0 }δ p0 p0 η = y ω 0 η = y √4νt ≈ √4νt u U u u0 y→, v u0 y = η√4νt x, u y = η√4νt t L t η η U y y ω˜(η) u δ ω˜(η) u ω = · 0 ω = · 0 z √πνt u0 z √πνt η = y t √νx/u0 t u f 0 = L u0 L }δ Blasius profile }δ ω 0 ω 0 δ∗ U≈ U≈ → x → y, v Separation point y, v x, u x, u = Pressure force L ⇐ x L U y U δ l δ u0 u0 uT η = y η = y √νx/u0 x √νx/u0 u u f 0 = f 0 = u0 y u0 Blasius profile dx Blasius profile dy δ∗ δ∗ dx x − x Separation point dl = ( dx, dy) Separation point n dl = ( dy, dx) = Pressure force − = Pressure force ⇐ i 1, j + 1 ⇐ x − x y i, j + 1 y l i + 1, j + 1 l

uT c uT x c0 x y b y dx b0 dx dy i 1, j dy − dx i + 1, j dx dl = ( dx,−dy) i, j dl = ( dx,−dy) n dl = ( dy, dx) Aabcd n dl = ( dy, dx) − − i 1, j + 1 d i 1, j + 1 − − i, j + 1 d0 i, j + 1 i + 1, j + 1 a i + 1, j + 1 c a0 c i 1, j 1 c0 − − c0 b i, j 1 b i + 1, j − 1 b0 − b0 i 1, j j i 1, j − − i + 1, j i i + 1, j i, j i + 1 i, j Aabcd ui,j Aabcd d vi,j d pi,j d0 d0 a pi,j a vi,j+1/2 a0 a0 i 1, j 1 vi,j 1/2 i 1, j 1 − − − − − i, j 1 ui 1/2,j i, j 1 − − 1 − i + 1, j 1 i 2 i + 1, j 1 − − − j i j i + 1 i 2 i i + 1 i + 1 3 i + 1 ui,j i + 2 ui,j 1 vi,j j + 2 vi,j pi,j j pi,j 1 p j p i,j − 2 i,j v j 1 v i,j+1/2 − i,j+1/2 vi,j 1/2 A vi,j 1/2 − − ui 1/2,j B ui 1/2,j −i 1 −i 1 − 2 C − 2 u 3 ,1 i 2 i 1 1 v1, 3 i + 2 2 i + 2 i + 1 p1,1 i + 1 3 3 i + 2 0 i + 2 1 1 j + 2 1 j + 2 j 2 j 1 1 j i j − 2 − 2 j 1 j j 1 − − A Inflow A B Solid wall B C n C 4.1. FEMu 3FOR AN ADVECTION–DIFFUSION PROBLEM u 3 81 2 ,1 Γ0 2 ,1 v 3 v 3 1, 2 Γ1 1, 2 p1,1 Ω p1,1 0 M 2 0 1 M 1 2 m 2 i m + 2 i j 1 j Inflow h Inflow Solid wall V Solid wall n Vh n Γ0 u Γ0 Γ1 uh Γ1 Ω Ω M 2 Figure 4.11: A logically rectangular domain triangulatedM 2 with quadrilaterals. M M m m m + 2 m + 2 1 1 h h V V Vh Vh u u uh uh

Figure 4.12: In 3D, triangular and quadrilateral elements generalize to tetrahedral (left) and hexahedral (right) meshes.

give high accuracy (particularly if the mesh is aligned with the flow), and • allow efficient solution of the linear system (particularly for uniform, rectangular meshes). • Compared to triangular mesh, it is harder to generate quadrilateral meshes automatically for compli- cated geometries. Triangular and quadrilateral meshes generalize in 3D to tetrahedral and hexahedral meshes (figure 4.12). Advantages and limitations with tetrahedral and hexahedral meshes are similar to corresponding meshes in 2D. PSfrag replacements

x, x1 y, x2 z, x3 u, u1 v, u2 w, u3 x1 x2 0 xi 0 ˆ ri xi , t u x 0, tˆ i i  P tˆ= 0  x PSfragu1 replacements u2 > u1 x, x1 x1 y, x2 x2 z, x3 x3 0 u, u1 xi v, u2 ui dtˆ 0 w, u3 dxi x1 dui dtˆ x2 ri dtˆ 0 xi dri dtˆ 0  ri x , tˆ P i 1 u x 0, tˆ P i i  2 P tˆ= 0 x1  x x2  u1 x3 u > u R3 2 1 x R2 1 x R1 2 3 x3 r x 0 r2 i u dtˆ r1 i π dx 0 + dϕ12 i 2 ˆ V (t) dui dt ˆ S (t) ri dt ˆ V (t + ∆t) V (t) dri dt −  S (t + ∆t) P1 P u 2 n x1 V (t + ∆t) x2 p x3 3 T0, U0 R 2 Tw R L R1 3 T0 r 2 U0 r r1 Gradient fields π + dϕ12 wi 2 ∂p V (t) ∂xi S (t) ui Divergence free vectorfields // to boundaryV (t + ∆t) V (t) S (t−+ ∆t) L h u x n 1 V (t + ∆t) x 2 p p0 > p1 T0, U0 p1 T u w n L T dS 0 U u n∆t 0 · Gradienx t fields wi y ∂p u0 ∂xi p0 ui Divergence free vectorfieldsη = y// to boundary √4νt u L u0 y = η√4νt h x t 1 η x2 y p0 > p1 ω˜(η) u0 p1 ωz = · √πνt u t n L dS }δ u n∆t ω 0 · ≈ x U y y→, v u0 x, u p0 L η = y √4νt U u u0 δ y = η√4νt u0 η = y t √νx/u0 η u f 0 = u0 y ω˜(η) u Blasius profile ω = · 0 z √πνt δ∗ t x L Separation point }δ = Pressure force ⇐ ω 0 x U≈ y y→, v l x, u uT L x U y δ dx u0 dy η = y √νx/u0 dx u − f 0 = dl = ( dx, dy) u0 n dl = ( dy, dx)Blasius profile − i 1, j + 1 δ∗ − i, j + 1 x i + 1, j +Separation1 point = cPressure force ⇐ c0 x b y b0 l i 1, j uT i +− 1, j x i, j y Aabcd dx d dy dx d0 − adl = ( dx, dy) n dl = ( dy, dx) a0 − i 1, j 1 i 1, j + 1 − − i, j − 1 i, j + 1 i + 1, j − 1 i + 1, j + 1 − j c i c0 i + 1 b ui,j b0 v i 1, j i,j − pi,j i + 1, j pi,j i, j vi,j+1/2 Aabcd vi,j 1/2 d − ui 1/2,j d0 − i 1 a − 2 i a0 i + 1 i 1, j 1 2 − − i + 1 i, j 1 3 − i + 2 i + 1, j 1 1 − j + 2 j j i j 1 i + 1 − 2 j 1 ui,j − A vi,j B pi,j C pi,j u 3 vi,j+1/2 2 ,1 v1, 3 vi,j 1/2 2 − p1,1 ui 1/2,j −i 1 0 − 2 1 i i + 1 2 2 i + 1 i 3 j i + 2 j + 1 Inflow 2 Solid wall j j 1 n − 2 j 1 Γ0 − Γ1 A Ω B M 2 C u 3 ,1 M 2 v1, 3 m 2 82 CHAPTER 4. FINITE ELEMENT METHODS FOR INCOMPRESSIBLE FLOW m + 2 p1,1 1 0

Γ0 C:C:C:C:C:C:C:C:C:C:C:C:C:C:C:C:C:C:C:C:C:C:C:C:C:C:C:C:C:C:C:C:C:C:C:C:C:C:C:C:C h D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D1 V 2

VhΓ0 i E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E

F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:Fj E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E

u F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:FΩ E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F Γ

uh Inflow 1

E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E

F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E

F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:FSolid wall

E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E

F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E

F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:Fn Γ0

E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E

F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E:E F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:F:FΓ0 Γ1 FigureΩ 4.13: A simple example of a domain. M 2 M Γ0 m

m + 2

G G G

H H IJ IJ KL KL MN MN 1

h

] ] O O

^ ^ _` _` ab ab P P V Γ0 Γ0

Vh

[ [ e e c c Q Q

\ \ f f d d R R u

uh

Y Y W W U U S S

Z Z X X V V T T Γ0 Γ1 Ω Γ0

Figure 4.14: The black nodes are the degrees of freedom for the velocity components, which are fewer than the number of triangles.

4.2 FEM for Navier–Stokes

We now turn to the Navier–Stokes equations for the steady flow of an incompressible fluid, and consider a situation with flow in a bounded domain Ω. A simple example domain is depicted in figure 4.13. The mathematical problem in differential form is

∂ui ∂p 1 2 uj + ui = fi in Ω, (4.23a) ∂xj ∂xi − Re∇ ∂u i = 0 in Ω. (4.23b) ∂xi ui = gi on Γ0 (4.23c)

1 ∂ui nj + pni = 0 on Γ1. (4.23d) −Re ∂xj

The boundary condition on Γ1 = ∂Ω Γ0 is of no obvious physical significance, but is useful as an artificial outflow condition. \ The Navier–Stokes equations is a system of nonlinear advection–diffusion equations together with the incompressibility condition (4.23b). This condition introduces new complications not present in the advection–diffusion problem of section 4.1. Naive approximations of the Navier–Stokes equations are bound to produce disappoing results, as the following example indicates. Example 2 (“the counting argument”). Consider a case with only Dirichlet boundary conditions—that is, Γ = —and the mesh of figure 4.14. Assume that we use continuous, piecewise-linear approximations u , 1 ∅ h vh for the x- and y-components of the velocity field. There are I number of panels in each direction and therefore 2(I 1)2 degrees of freedom (two times the number of black dots) for the velocity vector field. The left side of− equation (4.23b), that is ∂u ∂v h + h ∂x ∂y is here constant on each triangle. Thus, demanding equation (4.23b) to be satisfied on each triangle yields 2 2I equations, which is more than the degrees of freedom for the velocity! Thus uh = vh = 0 is the only FE function satisfying the incompressibility condition (4.23b)!  4.2. FEM FOR NAVIER–STOKES 83

Following strategies can be used to tackle the problem of example 2. (i) Use more degrees of freedom for the velocity—for instance continuous, piecewise quadratics on each triangle—to balance the large number of equations associated with the incompressibility condition. (ii) Accept that the discrete velocities only is approximately divergence-free. (iii) Associate the velocity with the midpoints of edges instead of the vertices. This also gives more degrees of freedom for the velocities. (There are 3I 2 edges, but only 2I 2 vertices). ∼ ∼ Strategies (i) and (ii) are the “standard” methods, whereas (iii) leads to “non-conforming” approxima- tions related to finite-difference and finite-volume approximation with “staggered mesh”.

4.2.1 A variational form of the Navier–Stokes equations To derive the variational form, we need new integration-by-part formulas. The product rule of differentiation yields ∂ ∂u ∂z ∂u z i = i i + z 2u (4.24) ∂x i ∂x ∂x ∂x i∇ i j  j  j j and ∂ ∂p ∂zj (zj p) = zi + p . (4.25) ∂xj ∂xi ∂xj Integrating expressions (4.24) and (4.25) and applying the the divergence theorem (4.3) on the left sides yields ∂ui ∂zi ∂ui 2 nj zi dΓ = dΩ + zi ui dΩ (4.26) ∂xj ∂xj ∂xj ∇ ZΓ ΩZ ΩZ and ∂p ∂zi nj zjp dΓ = zi dΩ + p dΩ, (4.27) ∂xi ∂xi ZΓ ΩZ ΩZ which are the integration-by-parts formulas needed to derive our variational form. Now, let zi be a smooth vector-valued function on Ω that vanishes on Γ0. Multiply both sides of equation (4.23a) with zi, integrating over Ω, and utilizing (4.26) and (4.27), we find that

∂ui ∂p 1 2 zifi dΩ = ziuj dΩ + zi dΩ zi ui dΩ ∂xj ∂xi − Re ∇ ΩZ ΩZ ΩZ ΩZ ∂ui 1 ∂zi ∂ui 1 ∂ui ∂zi = ziuj dΩ + dΩ njzi dΓ p dΩ + njzj p dΓ (4.28) ∂xj Re ∂xj ∂xj − Re ∂xj − ∂xi ΩZ ΩZ ZΓ ΩZ ZΓ ∂ui 1 ∂zi ∂ui ∂zi = ziuj dΩ + dΩ p dΩ, ∂xj Re ∂xj ∂xj − ∂xi ΩZ ΩZ ΩZ where, in the last equality, the boundary integrals vanish on Γ0 since zi = 0 on Γ0 and on Γ1 due to boundary condition (4.23d). Moreover, multiplying equation (4.23b) with a smooth function q and integrating yields ∂u q i dΩ = 0 (4.29) ∂x ZΩ i Thus, we conclude that a classical solution (a twice continuously differentiable solution) to the Navier– Stokes equations satisfies the variational forms (4.28) and (4.29) for all smooth functions zi and q such that zi vanishes on Γ0. Similarly as for the advection–diffusion problem, the variational form will be used to define weak solu- tions, without explicit reference to the differential equations. A difference with advection–diffusion problem is that we here need different function spaces for the velocity components and the pressure. Also note that ui = gi on Γ0 whereas zi vanishes on Γ0. To avoid this last complication and simplify the exposition, we will only consider homogeneous boundary conditions, gi = 0. Thus, the equations will be “driven” only by the right-hand side fi, which, for instance, could be or magnetic forcing for a electrically conducting fluid. The pressure space is H = L2(Ω) = q q2 dΩ < + , | ∞  ZΩ  84 CHAPTER 4. FINITE ELEMENT METHODS FOR INCOMPRESSIBLE FLOW and the space of velocity components is

∂u ∂u V = u dΩ < + and u = 0 on Γ . | ∂x ∂x ∞ 0  ZΩ i i  For the analysis in section 4.2.4, it will be convenient to work with the space V of the velocity vector u = (u1, u2). Saying that u V is equivalent to saying that that each velocity component ui V . The energy norm for elements of V∈ is denoted ∈

1/2 ∂ui ∂ui u V = dΩ , k k ∂x ∂x ZΩ j j  whereas the L2(Ω) norm is 1/2 u 2 = u u dΩ . k kL (Ω) i i ZΩ  We assume that both boundary conditions really are active. In the case of only Dirichlet boundary condition, that is, that Γ0 constitute the whole boundary, the pressure is only possible to specify uniquely up to an additive constant. The variational problem defining weak solutions to equation (4.23) is

Find u V and p H such that i ∈ ∈ ∂ui 1 ∂zi ∂ui ∂zi ziuj dΩ + dΩ p dΩ = zifi dΩ zi V ∂xj Re ∂xj ∂xj − ∂xi ∀ ∈ ΩZ ΩZ ΩZ ΩZ ∂u q i dΩ = 0 q H ∂xi ∀ ∈ ΩZ

This is a variational problem of mixed type: two different spaces are involved. As for the advection–diffusion problem, the boundary conditions are incorporated in the variational formulation. The essential boundary conditions are here that ui = 0 on Γ0 and is explicitly assigned through the definition of V . The natural boundary conditions are the boundary conditions on Γ1, implicitly specified through the variational form. Note that the natural boundary condition is different than for the advection–diffusion problem. Remark 2. The mathematical properties of the Navier–Stokes equations are complicated, and important issues are still unresolved. In fact, there is a $ 1 000 000 prize for the person that can develop a theory that can satisfyingly explain their behavior in three space dimensions! A short summary of what is known is the following. For the unsteady problem on a given, finite time interval (0, T ), and

in two space dimensions: • – a unique weak solution exists for any square-integrable f and for any Re, – smooth data yield smooth solutions, so that weak solutions are classical solutions if data is smooth enough;

in three space dimensions: • – a weak solution exists for any square-integrable f and for any Re. – It is not known whether the weak solution always is unique (besides during some initial interval (0, T ∗), where the size of T ∗ is unknown). – It is not known whether smooth data always yields a smooth solution, or if singularities can evolve from smooth data.

The steady problem has at least one weak solution, in 2D as well as 3D. Note that the steady problem may have several solutions, even in 2D. 

Note that the natural boundary condition here not just is a Neumann condition, but the more compli- cated condition (4.23d). 4.2. FEM FOR NAVIER–STOKES 85

4.2.2 Finite-element approximations To obtain a FEM, we choose subspaces V V , H H of piecewise polynomials, and replace V with V h ⊂ h ⊂ h and H with Hh in the variational form. In 2D and in components, we obtain

Find u , v V and p H such that h h ∈ h h ∈ h ∂uh ∂uh 1 ∂zh ∂uh ∂zh zh uh + vh dΩ + dΩ ph dΩ = zhf1 dΩ zh Vh, (4.30a) ∂x ∂y Re ∂xj ∂xj − ∂x ∀ ∈ ΩZ   ΩZ ΩZ ΩZ

∂vh ∂vh 1 ∂zh ∂vh ∂zh zh uh + vh dΩ + dΩ ph dΩ = zhf2 dΩ zh Vh, (4.30b) ∂x ∂y Re ∂xj ∂xj − ∂y ∀ ∈ ΩZ   ΩZ ΩZ ΩZ ∂u ∂v q h + h dΩ = 0. (4.30c) h ∂x ∂y ΩZ  

We postpone for a while the question on how to choose the subspaces Vh and Hh.

4.2.3 The algebraic problem in 2D

Expanding ph in basis for Hh, we obtain

Np (n) (n) ph (x, y) = p ψ (x, y) . (4.31) n=1 X

Likewise, expanding uh, vh in basis for Vh yields

Nu Nu (n) (n) (n) (n) uh (x, y) = u ϕ (x, y) , vh (x, y) = v ϕ (x, y) . (4.32) n=1 n=1 X X (m) Now insert expansions (4.31) and (4.32) into equations (4.30). In (4.30a) and (4.30b), choose zh = ϕ (m) for m = 1, . . . , Nu; in (4.30c), choose qh = ψ for m = 1, . . . , Np. Then, equations (4.30) become

N N u ∂ϕ(n) ∂ϕ(n) 1 u ∂ϕ(m) ∂ϕ(n) ∂ϕ(m) ∂ϕ(n) u(n) ϕ(m) u + v dΩ + u(n) + dΩ h ∂x h ∂y Re ∂x ∂x ∂y ∂y n=1 n=1 X ΩZ   X ΩZ   N p ∂ϕ(m) p(n) ψ(n) dΩ = ϕ(m)f dΩ m = 1, . . . , N − ∂x 1 u n=1 X ΩZ ΩZ Nu (n) (n) Nu (m) (n) (m) (n) (n) (m) ∂ϕ ∂ϕ 1 (n) ∂ϕ ∂ϕ ∂ϕ ∂ϕ v ϕ uh + vh dΩ + v + dΩ (4.33) ∂x ∂y Re ∂x ∂x ∂y ∂y n=1 n=1 X ΩZ   X ΩZ   N p ∂ϕ(m) p(n) ψ(n) dΩ = ϕ(m)f dΩ m = 1, . . . , N − ∂y 2 u n=1 X ΩZ ΩZ N N u ∂ϕ(n) u ∂ϕ(n) u(n) ψ(m) dΩ + v(n) ψ(m) dΩ = 0 m = 1, . . . , N ∂x ∂y p n=1 n=1 X ΩZ X ΩZ Placing the coefficients into column matrices,

T T u = u(1), . . . , u(Nu) , v = v(1), . . . , v(Nu) ,  T   p = p(1), . . . , p(Np) ,   we can write the system (4.33) in the matrix–vector form

1 (x) (x) C(uh, vh) + Re K 0 G u b 0 C(u , v ) + 1 K G(y) v = b(y) , (4.34)  h h Re      G(x)T G(y)T 0 p 0 − −       86 CHAPTER 4. FINITE ELEMENT METHODS FOR INCOMPRESSIBLE FLOW where the matrix and vector components are ∂ϕ(m) ∂ϕ(n) ∂ϕ(m) ∂ϕ(n) ∂ϕ(n) ∂ϕ(n) K = + dΩ, C (u , v ) = ϕ(m) u + v dΩ, mn ∂x ∂x ∂y ∂y mn h h h ∂x h ∂y ΩZ   ΩZ   ∂ϕ(m) ∂ϕ(m) G(x) = ψ(n) dΩ, G(y) = ψ(n) dΩ, b(x) = ϕ(m)f dΩ, b(y) = ϕ(m)f dΩ. mn − ∂x mn − ∂y m 1 m 2 ΩZ ΩZ ΩZ ΩZ (4.35)

2 Matrix K represents an approximation of the discrete negative Laplacian ; C(uh, vh) the discrete ∂ ∂ (x) (y) −∇(x)T (y)T advection operator u ∂x + v ∂y ; G and G the discrete gradient ; and G and G the discrete divergence. That is, the structure of the Navier–Stokes equations are∇ directly reflected in the nonlinear system (4.34). We obtained the same structure of the nonlinear equation for the finite-volume discretization, except that here, it is guaranteed the the last block row of the matrix is the negative transpose of the last block column.

4.2.4 Stability

So far, the approximating spaces Vh and Hh have not been specified. The counting argument of example 2 indicates that not any choice is good. We will limit the discussion to the Stokes equations, whose finite- element formulation reads Find uh V and p H such that i ∈ h h ∈ h h h h ∂zi ∂ui ∂zi h h dΩ ph dΩ = zi fi dΩ zi Vh, (4.36a) ∂xj ∂xj − ∂xi ∀ ∈ ΩZ ΩZ ΩZ h ∂ui qh dΩ = 0 qh Hh. (4.36b) ∂xi ∀ ∈ ΩZ The Stokes equations is a limit case of the Navier–Stokes equations for very low Reynolds numbers and assume that inertia can be neglected compared to viscous forces. The Stokes equations may be used to model very viscous flow, creeping flow, lubrication, but also flow of common fluids (like air and water) at the micro scale. Due to the lack of nonlinear advection, these are linear equations. Mathematically, the Stokes equations are much easier to analyze than the full Navier–Stokes equations. Indeed, there exists a unique weak solutions for each square-integrable fi both in two and three space dimension. The reason to start the analysis on the Stokes equation is that a stable Stokes discretization is necessary to obtain a stable Navier–Stokes discretization. As for the Navier–Stokes equations, we require that Vh V and Hh H. Recall that each function in V and H is required to be bounded in the energy and the L⊂2(Ω) norm, resp⊂ ectively. Thus, in makes sense to require that the velocity and pressure approximations satisfy the same bounds, that is,

1/2 1/2 2 p 2 = p dΩ C f f dΩ = C f 2 , (4.37a) k hkL (Ω) h ≤ i i k kL (Ω) ZΩ  ZΩ  h h 1/2 ∂ui ∂ui u V = dΩ C f 2 , (4.37b) k hk ∂x ∂x ≤ k kL (Ω) ZΩ j j  where the constant C should not depend on h. This implies that the approximations will not blow up when the mesh is refined. h h Choosing zi = ui in equation (4.36a), we obtain h h h h h ∂ui ∂ui ∂ui ∂ui ∂ui h dΩ ph dΩ = dΩ = ui fi dΩ, ∂xj ∂xj − ∂xi ∂xj ∂xj ΩZ ΩZ ΩZ ΩZ where the first equality follows from equation (4.36b). Thus,

2 h u V = u f dΩ u 2 f 2 C u V f 2 (4.38) k hk i i ≤ k kL (Ω)k kL (Ω) ≤ k k k kL (Ω) ZΩ where the Cauchy–Schwarz inequality yields the first inequality, and the Poincar´e inequality the second. We thus conclude from expression (4.38) that

u V C f 2 , (4.39) k hk ≤ k kL (Ω) 4.2. FEM FOR NAVIER–STOKES 87 that is, any Galerkin approximation of the velocity in the Stokes equations is stable! For bad choices of subspaces, we will of course obtain inaccurate velocity approximations, but they will not blow up as the mesh is refined, since their energy norm is bounded by the given data fi. Regarding the pressure, the situation is more complicated. Not any combination Hh and V h yield stable pressure approximations in the sense of (4.37a). We will derive a compatibility condition between the velocity and pressure spaces, the LBB condition, necessary to yield stable pressure approximations.

4.2.5 The LBB condition Rearranging equation (4.36a) implies that for each zh V , i ∈ h ∂zh ∂zh ∂uh p i dΩ = i i dΩ zhf dΩ h ∂x ∂x ∂x − i i ZΩ i ZΩ j j ZΩ 1/2 1/2 ∂zh ∂zh ∂uh ∂uh 1/2 1/2 (Cauchy–Schwarz) i i dΩ i i dΩ + zhzh dΩ f f dΩ ≤ ∂x ∂x ∂x ∂x i i i i ZΩ j j  ZΩ j j  ZΩ  ZΩ  = z V u V + z 2 f 2 k hk k hk k hkL (Ω)k kL (Ω) (Poincar´e) z V u V + z f 2 ≤ k hk k hk k hkV k kL (Ω) (by (4.39)) C z V f 2 + z f 2 . ≤ k hk k kL (Ω) k hkV k kL (Ω) (4.40)

Dividing expression (4.40) with z yields that k hkV h 1 ∂zi p dΩ (C + 1) f 2 z h ∂x ≤ k kL (Ω) k hkV ZΩ i for each zh V , from which it follows that there is a C > 0 such that i ∈ h h 1 ∂zi max ph dΩ C f L2(Ω). (4.41) 0=zi V z ∂x ≤ k k 6 ∈ k hkV ZΩ i We have thus found a bound on the discrete pressure in the “exotic” norm (4.16). However, we were aiming for the bound (4.37a). Thus, if it happens that

h 1 ∂zi α ph L2(Ω) max ph dΩ (4.42) k k ≤ 0=zi Vh z ∂x 6 ∈ k hkV ZΩ i for some α > 0 independent of h, then it is immediate that ph L2(Ω) C f L2(Ω) for some C > 0. k k 2 ≤ k k Condition (4.42) says that our exotic norm is stronger than the L (Ω)-norm for ph. The LBB-condition is a condition on the pairing of spaces Vh and Hh that requires the exotic norm to be stronger than the 2 L (Ω)-norm for each function qh Hh. The derivation above proves thus that the LBB-condition is sufficient for the pressure to be stably∈ determined by data:

Theorem 3. Assume that the LBB-condition holds for the spaces Hh, Vh. That is, assume that there is an α > 0 independent of h, such that, for each q H , h ∈ h 1/2 h 2 1 ∂zi α qh dΩ max qh dΩ, (4.43) ≤ 0=zi Vh z ∂x ZΩ  6 ∈ k hkV ZΩ i then there is a C > 0 such that

1/2 1/2 p2 dΩ C f 2 dΩ h ≤ | | ZΩ  ZΩ  holds, independently of h.

The LBB condition (4.43) is satisfied for Vh = V and Hh = H. That is, the pressure (before discretiza- h tion) is stably determined by data. The expression q ∂zi dΩ represents the discrete gradient of q (see Ω h ∂xi h 4.2.3). The LBB condition thus means that a zero discrete pressure gradient implies a zero value of the §pressure. Conversely, if the LBB condition is not satisfied,R it means that the discrete pressure gradient may be small even when the pressure is not small: The discrete gradient cannot “feel” that the pressure is large, an effect that usually manifests itself as wild pressure oscillations. PSfrag replacements

x, x1 y, x2 z, x3 u, u1 v, u2 w, u3 x1 x2 0 xi 0 ˆ ri xi , t u x 0, tˆ i i  P tˆ= 0  x u1 u2 > u1 x1 x2 x3 0 xi ui dtˆ 0 dxi dui dtˆ ri dtˆ dr dtˆ i  P 1 P2 x1 x2 x3 R3 R2 R1 r3 r2 r1 π 2 + dϕ12 V (t) S (t) V (t + ∆t) V (t) S (t−+ ∆t) u n V (t + ∆t) p T0, U0 Tw L T0 U0 Gradient fields wi ∂p ∂xi ui Divergence free vectorfields // to boundary L h x1 x2 p0 > p1 p1 u n dS u n∆t · x y u0 p0 η = y √4νt u u0 y = η√4νt t η y ω˜(η) u ω = · 0 z √πνt t L }δ ω 0 U≈ y→, v x, u L U δ u0 η = y √νx/u0 u f 0 = u0 Blasius profile

δ∗ x Separation point = Pressure force ⇐ x y l

uT x y dx dy dx dl = ( dx,−dy) n dl = ( dy, dx) − i 1, j + 1 − i, j + 1 i + 1, j + 1 c c0 b b0 i 1, j i +− 1, j i, j Aabcd d d0 a a0 i 1, j 1 − i, j − 1 i + 1, j − 1 − j i i + 1 ui,j vi,j pi,j pi,j vi,j+1/2 vi,j 1/2 − ui 1/2,j −i 1 − 2 i 1 i + 2 i + 1 3 i + 2 1 j + 2 j j 1 − 2 j 1 − A B C u 3 2 ,1 v 3 1, 2 p1,1

1 2 i j Inflow Solid wall n 88 CHAPTERΓ04. FINITE ELEMENT METHODS FOR INCOMPRESSIBLE FLOW Γ1 Ω 2 M 1 −1 0 1 M m m + 2 0 1 −1 0 h V Vh 0 1 u −1 −1 uh Γ0 Γ1 1 −1 0 1 Ω

Figure 4.15: A checkerboard mode for equal-order interpolation on a regular triangular mesh.

4.2.6 Mass conservation

The integral Γ ρ niui dΓ yields the total flux of mass(in kg/s) through the boundary. There is no net mass-flux through the boundary for a constant-density flow, so ρ n u dΓ = 0. A velocity approximation R Γ i i uh is is globally mass conservative if i R h niui dΓ = 0, ZΓ or, equivalently, if ∂uh i dΩ = 0, ∂x ZΩ i by the divergence theorem (4.3). Recall from equation (4.30c) that ∂uh q i dΩ = 0 q H . h ∂x ∀ h ∈ h ZΩ i A Galerkin approximation is thus globally mass conservative if 1 H , that is, if constant functions can ∈ h be represented exactly in Hh. All reasonable FE approximation satisfy this. A finite-element approximation is locally mass conservative if ∂uh i dΩ = 0, ∂x ZK i for each element K in the mesh. Not all finite-element approximations are locally mass conservative. If the pressure approximations consist of piecewise constants on each element, the FE approximation will be locally mass conservative. However, it will not be locally mass conservative if the pressure approximations are continuous and piecewise linear.

4.2.7 Choice of finite elements. Accuracy Now we consider a regular triangulation of a 2D domain Ω, that is, a triangulation satisfying a mesh quality condition of the sort discussed in section 4.1.5.

“Equal-order interpolation” Let us start by trying the approximation space we used for the advection–diffusion problem (section 4.1.1). That is, we use continuous functions that are linear on each triangle both for the functions in Hh and Vh. This pair does not satisfy the LBB condition and yields an unstable discretization. In particular, the system matrix (4.34) is singular: the discrete gradient matrix G has linearly dependent columns. Thus, c c c there is at least one nonzero Np-vector p such that Gp = 0. Corresponding function ph Hh, whose nodal values are equal to the elements of pc is called a checkerboard mode. ∈ Figure 4.15 depicts the nodal values of a checkerboard mode for equal-order interpolation. To see this, c consider the element contribution, associated with a triangle Tn, to the ith row of vector Gp (notice from ∂φi the expressions in figure 4.5 that ∂x is constant on each triangle): ∂φ ∂φ pc i dΩ = i pc dΩ 0, − h ∂x − ∂x Tn h ≡ ZTn ZTn

PSfrag replacements

x, x1 y, x2 z, x3 u, u1 v, u2 w, u3 x1 x2 0 xi 0 ˆ ri xi , t u x 0, tˆ i i  P tˆ= 0  x u1 u2 > u1 x1 x2 x3 0 xi ui dtˆ 0 dxi dui dtˆ ri dtˆ dr dtˆ i  P 1 P2 x1 x2 x3 R3 R2 R1 r3 r2 r1 π 2 + dϕ12 V (t) S (t) V (t + ∆t) V (t) S (t−+ ∆t) u n V (t + ∆t) p T0, U0 Tw L T0 U0 Gradient fields wi ∂p ∂xi ui Divergence free vectorfields // to boundary L h x1 x2 p0 > p1 p1 u n dS u n∆t · x y u0 p0 η = y √4νt u u0 y = η√4νt t η y ω˜(η) u ω = · 0 z √πνt t L }δ ω 0 U≈ y→, v x, u L U δ u0 η = y √νx/u0 u f 0 = u0 Blasius profile

δ∗ x Separation point = Pressure force ⇐ x y l

uT x y dx dy dx dl = ( dx,−dy) n dl = ( dy, dx) − i 1, j + 1 − i, j + 1 i + 1, j + 1 c c0 b b0 i 1, j i +− 1, j i, j Aabcd d d0 a a0 i 1, j 1 − i, j − 1 i + 1, j − 1 − j i i + 1 ui,j vi,j pi,j pi,j vi,j+1/2 vi,j 1/2 − ui 1/2,j −i 1 − 2 i 1 i + 2 i + 1 3 i + 2 1 j + 2 j j 1 − 2 j 1 − A B C u 3 2 ,1 v 3 1, 2 p1,1 0 1 2 i j Inflow Solid wall n Γ0 Γ1 Ω M 2 M m 4.2. FEM FOR NAVIER–STOKESm + 2 89 1 h V Vh u uh Γ0 Γ1 Ω

Figure 4.16: The evaluation points at each triangle for the continuous, piecewise quadratic velocity approx- imations of the Taylor–Hood pair.

c since the mean value of the function ph vanishes on each triangle, as can be seen from figure 4.15. The right c side of the LBB condition (4.43) vanishes for qh = ph, which immediately implies that the LBB cannot c hold for a space Hh that includes ph. This (and other) checkerboard mode will pollute the solution of the Stokes as well as Navier–Stokes equations..

Constant pressure, (bi)linear velocities

Now we consider a triangulation either of triangles or rectangles. Let the functions in Hh be piecewise constant on each element. In case of triangular elements, the space Vh will be continuous functions, piecewise linear on each element, whereas for quadrilateral elements, continuous functions that are piecewise bilinear on each rectangle comprise Vh. Remark 3. The pressure approximations need not to be continuous in order for H H. However, if h ⊂ Vh V , the velocity approximations cannot be discontinuous, since v is not a function for discontinuous v. ⊂ ∇ This choice leads to a locally mass-conserving approximation. However, for triangular elements, the counting argument of example 2 applies here and indicates problems with this choice of elements. Indeed, the LBB conditions is not satisfied for this unstable discretization. Checkerboard modes similar as in fig- ure 4.15 exist. Still, the constant pressure—bilinear velocity space on rectangles is in widespread engineering use! “Fixes” have been developed to take care of pressure oscillations. For instance, the checkerboard mode can be filtered out from the discrete . Moreover, common iterative methods to solve the resulting discrete equations (such as the projection schemes) implies a stabilization of the discretization.

The Taylor–Hood pair

Here, the functions in Hh and Vh are globally continuous and, on each triangle, p H is linear, whereas • h ∈ h u , v V is quadratic. • h h ∈ h Thus, on each triangle, we have

2 2 uh = a + b x + c y + d xy + e x + fy

The six coefficients a–f are uniquely determined by uh’s values at the triangle vertices and midpoints (figure 4.16). (m) Nu A basis φ (xi) m=1 of continuous, piecewise quadratic functions interpolates the nodal values of Nu (m) figure 4.16, so that uh Vh can be expressed as uh(xi) = m=1 uiφ (xi). There are two kinds of basis functions here, illustrated∈ in figures 4.17 and 4.18. The LBB condition is satisfied for the Taylor–Hood pair,P and the following error estimates holds for a smooth solution to the Navier–Stokes equation:

3 u u 2 Ch k − hkL (Ω) ≤ 2 p p 2 Ch k − hkL (Ω) ≤ The Taylor–Hood pair is globally, but not locally mass conservative. The Taylor–Hood pair can be generalized to higher order. Then, the pressure and velocity approxima- tions will be continuous functions, consising of piecewise polynomials of degree k for pressure and k + 1 for velocity (k 1) on each triangle. ≥ PSfrag replacements PSfrag replacements

x, x1 x, x1 y, x2 y, x2 z, x3 z, x3 u, u1 u, u1 v, u2 v, u2 w, u3 w, u3 x1 x1 x2 x2 0 0 xi xi 0 ˆ 0 ˆ ri xi , t ri xi , t u x 0, tˆ u x 0, tˆ i i  i i  P tˆ= 0 P tˆ= 0   x PSfrag replacemen tsx PSfrag replacemenu1 ts u1 x, x1 u2 > u1 u2 > u1 x, x1 y, x2 x1 x1 y, x2 z, x3 x2 x2 z, x3 u, u1 xu,3 u1 v, ux3 x 0 x20 iv, u2 w, u i ˆ 3 ˆ ui dwt, u3 ui dt 0 x10 dxi dxi x1 x2 ˆ 0 ˆ dui dt x2 duxi dt 0 i ri dtˆ ri0 dtˆ xi ri x , tˆ 0 i drri i dxtˆ , tˆ dri0 dtˆ i ui x , tˆ  P0 ˆ i P ui xi1, t P tˆ= 0 1    P tˆP=2 0 P2  x x1 x1 x u1 x2 x2 u1 u2 > u1 x3 x3 u2 > u1 x1 R3 R3 x1 x2 R2 R2 x2 x3 R1 R01 x3 xi r3 x 0 r3 i ui dtˆ r2 ˆ r02 ui dt dxi rd1 x 0 r1 π i π dui dtˆ 2 + dϕ12 ˆ 2 + dϕ12 dui dt ri dtˆ V (t) ˆ V (t) ri dt dr dtˆ S (t) i S (t) dri dtˆ  P1 V (t + ∆t) V (t) P V (t + ∆t) V (t) − 1 − P2 S (t + ∆t) P S (t + ∆t) 2 x u 1u x1 x2 n x n V (t + ∆t) 2 V (t + ∆x3t) x 3 p 3 R p R3 PSfrag replacemen2 ts T0, U0 T0R, U0 PSfrag replacemenR2 ts 1 Tw Rx,Twx1 1 3 Rx, x1 ry, x2 L 3 L ry, x2 2 T0 rzT,0x3 2 1 rz, x3 ru, u1 U0 1 π U0 ru, u1 2 + dϕv12, u Gradientπfields+ dϕ Gradient fields 2 2 12v, u2 V (t) wi ww, iu3 ∂pV (t) S (t∂)p w, u3 x1 ∂xSi (t) x V (t + ∆t) V (∂tx)i 1 − x2 V (t + ∆t) uVi (t) x S (t + ∆tu) i 0 − 2 xi Divergence free vectorfields // to boundaryS (t + ∆t) 0 Divergence free vectorfields // to boundary0 xi ri x u, tˆ 0 i ri Lx u, tˆ 0 L i ui x n, tˆ h 0 i h  ui x n, tˆ V (tP+ ∆t) x i  tˆ=x 0 V (tP+1∆tˆ=t) 0 p1  x2  x2 x p T0, U0  p0 >Tp1, U x p0 > p1u1 0 0 u Tw p1 T 1 u2 >p1u1 u >w u L u2 1 ux1 Lx T0 n T 1 nx2 0 x U0 dS U 2 dSx3 0 x Gradient fields 0 u n∆t 3 u n∆xti Gradien· t fieldsx 0 · wi x i ∂upixdtˆ wi ˆ 0 y ∂upi dt ∂xdixy 0 i ∂xdix ui u0 i duui0dtˆ ui ˆ Divergence free vectorfields // to boundary ˆ p0dui dt ri pd0t Divergence free vectorfields // to boundaryy y η = ri dtˆ η = L ˆ √4νt dri√4νdtt u L u  dri dtˆ hP u0  u0 1 hP x1 P y = η√4νt 1 y = η√4νt 2 x1 P x2 t 2 tx1 x2 p0 > p1 η x1 ηx2 p0 > p1 p1 y x2 yx p1 3 ω˜(η) u0 x ω˜(η) uu0 3 ωz = · 3 ωz = · R √πνt u 3 √πνnt R R2 t n 2 dS t R R1 L dS 1 u n∆tL R · r3 u }δn∆t 3 x}δ · r r2 ω 0 x 2 ω y0 ≈ y r ≈ r1 U 1 π Uu0 r + dϕ12 π→ 2 → y, v u0 yp,0v 2 + dϕ12 yV (t) x, u p0 η = x, u yV (t) √4νt η = Su (t) L√4νt L Su (t) V (t + ∆t) uV0 (t) V (t + ∆t)U Vu0 (t) y =Sη(√t−+4ν∆tUt) y = η√−δ4νt δ S (t + ∆t) t u u0 u0 y t u y η η = η η = n √νx/u0 n V √(tν+x/uy∆0 t) u ω˜(η) u u f 0 = y f 0 = 0 V (ut0 + ∆t) ωz = · u0 ω˜(η) u0 √πνt p Blasiusωz profile= · p Blasius profile √πνt T0,tU0 T , U δ∗ 0 t 0 LδT∗ w T x L w }δxL Separation point Separation point }δ L ω 0T0 = Pressure forceω 0T0 = Pressure force≈ U ⇐ ≈ ⇐ U 0 Ux U0 Gradientyfields→, vx → Gradienytyfields, v x, uywi ∂p lx, uwi l ∂p L∂xi uT L uT ∂xi U ui x U ui Divergence free vectorfields // to boundaryδx y y Divergence free vectorfields // to boundaryδ u0 y L dx u0 L η = dx y √νx/u0 h η = dy udy √νx/u0 h f 0 = x1 dx u ud0x f 0 = x1 x dl = ( dx,−dy) u0 Blasiusdl = ( dprofilex,−dy) 2 Blasius profilex2 p0 > p1 n dl = ( dy, dx) n dl = ( dy, dδx∗ ) p0 > p1 p − δ∗ − x 1 i 1, j + 1 p1 i 1, j + 1 − i, j + 1 x Separation− i,pjoin+t1u Separation point u n i + 1, j + 1 = Pressurei + 1,forcej + 1 = Pressure force n ⇐ dS ⇐ c xc xdS u ny∆t cu0 ny∆t · c0 · l x b x b y l uT b0 y b0 uT u0 i 1, j i 1x, j u0 p0 − x − yy i + 1, j p0 ηi += 1, j yy √4νt ηi,=j di,xju √4νt dx u dy u0 Aabcd Aabcd dy u0 y = ηd√x4νt d √ d y = ηdx4νt dl = ( dx,−dy) t d− d dl = ( dx, 0dy) t n dl = ( dy, dx) 0 η a a n dl = ( dy, dx) η − y − i 1, j + 1 a0 y − ω˜(η)au0 0 i 1, j + 1 ωz i,=j + 1· i 1−, j 1ω˜(η) u0 i 1, j√πν1t − ωz i,−=j + 1· i +−1, j +−1 i, j 1 √πνt i, j 1 t i + 1−, j + 1 − i + 1, j 1 t i + 1, j c1L − c − j L c0j}δ c i 0 }δ ω bi 0 b i + 1ω 0 i +Ub≈01 b≈0 i 1, j ui,j U ui,jy→, v i 1, j → i +− 1, j v−i,j y, v vi,jx, u i + 1, j i, j pi,j x, u pi,j L i, j A pi,j L abcdpi,jU Aabcd vi,j+1/2 U vi,j+1d/2 δ d vi,j 1/2 δ vi,j 1d/02u0 − d − y ui 1/2,j 0 u0 η =ui 1/2a,j − 1 y −√νx/u1 0 ηi= a i a0 u √2 νx/u0 f 0 = 2 − a0 u i 1, j −1 u0 f 0 = i u0 Blasius− profile− i i i 1+, j1 1 i, ji +11 Blasius− 2profile− − 2 i, j 1 i + 1, j 1 δ∗ i + 1− δ i−+ 1 i +i 1+, j3 1 ∗ i +j3 x 2− x Separation poin2 t 1 j i1 Separationj + 2 point j + 2 i = Pressurei +force1 = Pressurej force ⇐ j i1+ 1 ui,j1 x ⇐ j 2 j 2 − ui,j x v− y j 1 y j i,j1 − vi,j p−i,j l A l A pi,j pi,j uT B uT B pi,j vi,j+1/2 x vi,jC+1/2 x C y 3 vi,j 1/32 u ,1 −u ,1 vi,j2 1/2 y 2 3 ui 1/2,j3dx v1, − − v1, ui 21/2,j dx i 12dy p− p 2 1i,1 1 dy − 1,1 2 idx 0− −10 idx dl = (id+x, dy) dl = ( d1x,−1dy) 21 i + 2 n dl = ( dy, dx) n dl = ( dy, dx) i +−1 i2+ 1 i i1+, j 3+2 1 −3 − 2 i i1i+, j + 1 i, j 1+i 1 − 2 j + ji, j 1+ 1 2 j j + 2 i + 1, j j+ 1 Infloi +w1, j j+ 1 Inflo1w j 2 c Solid wall 1 c Solid−wall j 2 j 1 c0 n− n j 1 c0 − b Γ0− AΓ0 A b b0 Γ1 BΓ1 B b0 i 1, j Ω −CΩ i 1, j iu+3 1, j 2 −C 2 ,12 M 3 M iu+,11, j v 3i, j 2 1, 2 Mv 3i, j M 90 1, 2 CHAPTER 4. FINITE ELEMENT METHODSpAabcd FOR INCOMPRESSIBLE FLOW m 1,1m pA1,abcd1 d m + 2 m +02 0 d d0 1 11 1 d0 a h 2h a a0 V Vi i a0 i 1, j j 1 i V1h, j 1 − i, jV−h 1 − j− Inflow ui, j 1 i + 1, j −u 1 Inflow− Solid wall i +u1h, j 1 u−h j Solid wall− n Γ0 j Γ0 n Γ0 i Γ1 i Γ1 Γ0 Γi + 1 Ω i + 1 1uΩ Γ1 Ω i,j ui,j v Ω (m) 2 i,j (m) Figure 4.17:v The basis function φ (xi) when FigureM 4.18: The basis function φ (xi) when M 2 i,j pi,j m correspponds to an edge-midpoint node m correspM onds to a corner node M i,j pi,j p m m i,j vi,j+1/2 v 2 m + 2 i,j+1/2 O(h ) vi,j 1/2 m + 2 −1 vi,j 1/2 ui 1/2,j −1 − h ui 1/2,j 1 i 2 −i h 1 V− 2 i V− Vh 1 V i i + 2 i h+ 1 u 2 i + 1 u uh 3 ui + 1 i + 2 i h+ 3 Γ0 1 Γ 2 j + 2 j +0 1 Γ1 Γ1 2 j j jΩ 1 Ω 2 j 1 − − 2 Figure 4.20:j 1Isoparametric elements use polynomials j 1 − Figure 4.19:− Approximating a curved boundary with of the sameAorder as used for the FE approximations 2 a triangle sidesA leads to an O(h ) error of the bound- to approximateB the shape of the boundary. ary condition.B C u 3 C 2 ,1 u 3 ,1 v 3 2 1, 2 v1, 3 Remark 4. 2Inaccuracies in approximations of the domain boundaryp1,1 may reduce the convergence rate of p higher-order1,1 approximations. For instance, a straight-forward triangulation0 of a domain with a curved 2 boundary will0 lead to a boundary-condition error at the mid no1des of O(h ) (figure 4.19). This is fine 2 for piecewise-linear1 approximations since the error anyway is O2(h ). However, this inaccuracy at the boundary results2 in a half-order reduction of the convergence rateiof piecewise quadratic approximations. Using curvedi elements restores convergence rate. The most commonj strategy for curved elements is known as Isoparametricj Elements: piecewise polynomials of the sameInflodegreew as used in the FE approximation are used toInfloapprow ximate the shape of the boundary (figure 4.20).Solid wall Solid wall n A stable appron ximation with piecewise-linear velocities andΓ0 pressures Γ0 Γ1 Instead of Γusing1 different approximation orders, as in the Taylor–HoΩ od pair, we here consider different meshes for Ωvelocity and pressure. Both the velocity and pressureM 2 approximations consist of continuous, 2 piecewise-linearM functions on triangles, but each pressure triangleMis subdivided into four velocity triangles as in figureM4.21. m This is amstable approximation satisfying the LBB condition,m +and2 the following error estimates holds for m + 2 1 1 h h V V Vh Vh u u uh uh Γ0 Γ0 Γ1 Γ1 Ω Ω Figure 4.22: Subdividing a pressure rectangle into Figure 4.21: Subdividing a pressure triangle into four four velocity rectangles yields a stable approximation velocity triangles yields a stable approximation with with continuous piecewise-bilinear functions for both continuous, piecewise-linear functions for both veloc- velocity and pressure. ity and pressure. PSfrag replacements PSfrag replacements x, x1 x, x1 y, x2 y, x2 z, x3 z, x3 u, u1 u, u1 v, u2 v, u2 w, u3 w, u3 x1 x1 x2 x2 0 x 0 xi i 0 0 ri x , tˆ ri x , tˆ i i 0 0 ui x , tˆ ui x , tˆ i  i  P ˆ P tˆ= 0 t = 0   x x  u1 u1 u2 > u1 u2 > u1 x1 x1 x2 x2 x3 x3 0 0 xi xi ˆ ui dtˆ ui dt 0 0 dxi dxi dui dtˆ dui dtˆ ri dtˆ ri dtˆ ˆ dr dtˆ dri dt i   P1 P1   P2 P2 x1 x1 x2 x2 x3 x3 3 3 R R 2 2 R R 1 1 R R 3 3 r r 2 2 r r 1 1 r r π π 2 + dϕ12 2 + dϕ12 V (t) V (t) S (t) S (t) V (t + ∆t) V (t) V (t + ∆t) V (t) − S (t−+ ∆t) S (t + ∆t) u u n n V (t + ∆t) V (t + ∆t) p p T0, U0 T0, U0 Tw Tw L L T0 T0 U0 U0 Gradient fields Gradient fields wi wi ∂p ∂p ∂xi ∂xi ui ui Divergence free vectorfields // to boundary Divergence free vectorfields // to boundary L L h h x1 x1 x2 x2 p0 > p1 p0 > p1 p1 p1 u u n n dS dS u n∆t u n∆t · · x x y y u0 u0 p0 p0 y y η = η = √4νt √4νt u u u0 u0 √ y = η√4νt y = η 4νt t t η η y y ω˜(η) u0 ω˜(η) u0 ω = · ω = · z √πνt z √πνt t t L L }δ }δ ω 0 ω 0 ≈ U≈ U → y→, v y, v x, u x, u L L U U δ δ u0 u0 y y η = η = √νx/u0 √νx/u0 u u f 0 = f 0 = u0 u0 Blasius profile Blasius profile δ∗ δ∗ x x Separation point Separation point = Pressure force = Pressure force ⇐ ⇐ x x y y l l uT uT x x y y dx dx dy dy dx dx − dl = ( dx,−dy) dl = ( dx, dy) n dl = ( dy, dx) n dl = ( dy, dx) − − i 1, j + 1 i 1, j + 1 − − i, j + 1 i, j + 1 i + 1, j + 1 i + 1, j + 1 c c c0 c0 b b b b0 0 i 1, j i 1, j − i +− 1, j i + 1, j i, j i, j Aabcd Aabcd d d d0 d0 a a a a0 0 i 1, j 1 i 1, j 1 − − − i, j − 1 i, j 1 − i + 1, j − 1 i + 1, j 1 − − j j i i i + 1 i + 1 ui,j ui,j vi,j vi,j pi,j pi,j pi,j pi,j vi,j+1/2 vi,j+1/2 vi,j 1/2 vi,j 1/2 − − ui 1/2,j ui 1/2,j − − 1 1 i 2 i 2 − − i i 1 1 i + 2 i + 2 i + 1 i + 1 3 3 i + 2 i + 2 1 1 j + 2 j + 2 j j 1 1 j j 2 − 2 − j 1 j 1 − − A A B B C C u 3 u 3 2 ,1 2 ,1 v 3 v 3 1, 2 1, 2 p1,1 p1,1 0 0 1 1 2 2 i i j Inflow Inflow Solid wall Solid wall n n Γ0 Γ0 Γ1 Γ1 Ω Ω 2 M 2 M M M m 4.2. FEM FmOR NAVIER–STOKES 91 m + 2 m + 2 1 1 h h V V Vh Vh u u uh uh j Γ0 Γ0 Γ1 Γ1 Ω Ω

Figure 4.23: The basis functions associated with the Figure 4.24: Approximations spanned by velocity approximation for a nonconforming but sta- the basis functions (4.23) yields piecewise- ble discretization. linear functions that are continuous only along at the edge midpoints, in general.

a smooth solution to the Navier–Stokes equation:

2 u u 2 Ch k − hkL (Ω) ≤ p p 2 Ch k − hkL (Ω) ≤ These approximations use the same number of unknowns and the same nodal locations as for the Taylor– Hood pair, but are one order less accurate. Calculating the matrix elements (4.35) is however somewhat easier than for the Taylor–Hood pair. There is also a version of this discretization for rectangular meshes: Each pressure rectangle is then subdivided into four velocity rectangles, as in figure 4.22. Both the velocity and pressure approximations consist of continuous and piecewise-bilinear functions.

A nonconforming method The discussion after example 2 suggested a strategy to address the problem with the overdetermined incom- pressibility condition, namely to use nodal points on the edge mid points for the velocity. To accomplish this, consider basis functions, associated with the edges, of the type depicted in figure 4.23. Basis function i i φj is linear on each triangle and continuous along edge j (but discontinuous along four edges!). If x , y are the coordinates of the mid point of edge i, we have

i i 1 for i = j, φj (x , y ) = 0 for i = j. ( 6

Now define the space of the velocity components Vh from all possible expansions

N N uh(x, y) = uj φj (x, y), vh(x, y) = vj φj (x, y), j=1 j=1 X X

Here, N is the total number of edges, excluding those on Γ1. Note that uh will be continuous only at edge mid points in general. Thus, Vh V since uh is not a square-integrable (in fact, constant) function. Violating a property like V V is6⊂called a variational∇ crime. However, u restricted on each element is h ⊂ ∇ h a square-integrable function. Letting Hh be piecewise constant on each triangle and Vh defined as above, we define the nonconforming FE approximation:

Find u , v V and p H such that h h ∈ h h ∈ h M M M M ∂u ∂u 1 ∂z ∂u ∂z z u h dΩ + z v h dΩ + h h dΩ p h dΩ = z f dΩ z V , h h ∂x h h ∂y Re ∂x ∂x − h ∂x h 1 ∀ h ∈ h n=1 Z n=1 Z n=1 Z j j n=1 Z Z XTn XTn XTn XTn Ω M ∂v M ∂v 1 M ∂z ∂v M ∂z z u h dΩ + z v h dΩ + h h dΩ p h dΩ = z f dΩ z V , h h ∂x h h ∂y Re ∂x ∂x − h ∂y h 2 ∀ h ∈ h n=1 Z n=1 Z n=1 Z j j n=1 Z Z XTn XTn XTn XTn Ω M ∂u ∂v q h + h dΩ = 0 q H , h ∂x ∂y ∀ h ∈ h n=1 Z   XTn where M is the number of triangles. 92 CHAPTER 4. FINITE ELEMENT METHODS FOR INCOMPRESSIBLE FLOW

The fact that Vh V complicates the analysis of this discretization. Nevertheless, the approximation is stable, although not6⊂ as accurate as the Taylor–Hood pair, for instance. Other nice properties with this method is that it is locally mass conservative, and quite easy to implement. But maybe the most interesting with this discretization is that it allows for a construction of a divergence free velocity basis. In all types of discretizations discussed so far, including the present, we have used the same basis for the uh and vh components. By a clever combination of basis functions of the type illustrated (j) (j) in figure 4.23, it is possible to construct a new vector-valued basis functions ηj = (zh , wh ) for the velocity having the property

∂z(j) ∂w(j) η = h + h = 0. ∇ · j ∂x ∂y

Expanding the velocity in this basis,

M

uh = (uh, vh) = uj ηj , (4.44) j=1 X yields that uh = 0. Inserting expansion (4.44) into equations (4.30), and choosing (zh, wh) = ηi, the continuity equation∇ · and the pressure variable vanishes, and equations (4.30) reduce to

M M dNu u η (u ) η dΩ + ν u η η dΩ + u η (u ) η dΩ = η f dΩ, j i · h · ∇ j j ∇ i · ∇ j j i · h · ∇ j i · j=1 Ω j=1 Ω j=1 Ω Ω X Z X Z X Z Z (4.45) for i = 1, . . . , M. The Navier–Stokes equations then reduces to a vector-valued, non-linear advection– diffusion problem, quite similar to equation (4.10). This leads to a substantial simplification when designing an algorithm to solve the discretized equations; in fact, one of the great challenges for any solver of the Navier–Stokes equations is how to treat the incompressibility condition (4.30c). Unfortunately, the construction of the basis functions ηj is not straightforward.

Stabilization of unstable discretizations

Stability of the choices of elements presented in sections 4.2.7–4.2.7 relied on manipulations of the local polynomial order, the meshes, or the conformity of the method. These manipulations complicate the implementation. An alternative is to use the same approximations for velocity and pressure (equal-order interpolation) combined with a stabilization method. This circumvents the LBB condition. We will present a very simple idea of this sort for the Stokes equations. First choose the same type of approximations for the pressure and the velocity components, for instance continuous, piecewise-linear functions on a triangular mesh, and replace equations (4.36) with

Find uh V and p H such that i ∈ h h ∈ h h h h ∂zi ∂ui ∂zi h h dΩ ph dΩ = zi fi dΩ zi Vh, (4.46a) ∂xj ∂xj − ∂xi ∀ ∈ ΩZ ΩZ ΩZ h ∂qh ∂ph ∂ui  dΩ + qh dΩ = 0 qh Hh., (4.46b) Ω ∂xi ∂xi ∂xi ∀ ∈ Z ΩZ for some small  > 0. Equation (4.46b) formally inconsistent by O() with corresponding variational form. More advanced stabilization methods avoids this inconsistency by using a term that vanishes as h 0. → The main advantage with stabilization methods is the simplified implementation, but the method intro- duces an extra parameter that may need judicious tuning. Note also that the increased number of pressure unknowns, as compared with the discretization in section 4.2.7, does not increase the accuracy. The added resolution introduced is filtered away by the introduction of the stability term. h h To see that approximation (4.46) is stable, choose zi = ui , qh = ph and add equations (4.46a) 4.2. FEM FOR NAVIER–STOKES 93 and (4.46b),

∂uh ∂uh ∂p ∂p i i dΩ +  h h dΩ = uhf dΩ ∂x ∂x ∂x ∂x i i ZΩ i i ZΩ i i ZΩ 1/2 1/2 (Cauchy–Schwarz) uhuh dΩ f f dΩ ≤ i i i i ZΩ  ZΩ  1/2 ∂uh ∂uh 1/2 (Poincar´e) C i i dΩ f f dΩ ≤ ∂x ∂x i i ZΩ i i  ZΩ  1/2 ∂p ∂p ∂uh ∂uh 1/2 C  h h dΩ + i i dΩ f f dΩ . ≤ ∂x ∂x ∂x ∂x i i  ZΩ i i ZΩ i i  ZΩ  Dividing and squaring yields the stability estimate

∂uh ∂uh ∂p ∂p i i dΩ +  h h dΩ C f f dΩ. ∂x ∂x ∂x ∂x ≤ i i ZΩ i i ZΩ i i ZΩ Since C > 0 does not depend on h, both the velocity and pressure approximations cannot blow up as h 0, even though the discretization is unstable for  = 0. → 94 CHAPTER 4. FINITE ELEMENT METHODS FOR INCOMPRESSIBLE FLOW PSfrag replacements

x, x1 y, x2 z, x3 u, u1 v, u2 w, u3 x1 x2 0 xi 0 ˆ ri xi , t u x 0, tˆ i i  P tˆ= 0  x u1 u2 > u1 x1 x2 x3 0 xi ui dtˆ 0 dxi dui dtˆ ri dtˆ dr dtˆ i  P 1 P2 x1 x2 x3 R3 R2 R1 r3 r2 r1 π 2 + dϕ12 V (t) S (t) V (t + ∆t) V (t) S (t−+ ∆t) u n V (t + ∆t) p T0, U0 Tw L T0 U0 Gradient fields wi ∂p ∂xi ui Divergence free vectorfields // to boundary L h x1 x2 p0 > p1 p1 u n dS u n∆t · x y u0 p0 η = y √4νt u u0 y = η√4νt t η y ω˜(η) u ω = · 0 z √πνt t L }δ ω 0 U≈ y→, v x, u L U δ u0 η = y √νx/u0 u f 0 = u0 Blasius profile

δ∗ x Separation point = Pressure force ⇐ x y l

uT x y dx dy dx dl = ( dx,−dy) n dl = ( dy, dx) − i 1, j + 1 − i, j + 1 i + 1, j + 1 c c0 b b0 i 1, j i +− 1, j i, j Aabcd d d0 a a0 i 1, j 1 − i, j − 1 i + 1, j − 1 − j i i + 1 ui,j vi,j pi,j pi,j vi,j+1/2 vi,j 1/2 − ui 1/2,j −i 1 − 2 i 1 i + 2 i + 1 3 i + 2 1 j + 2 j j 1 − 2 j 1 − A B C u 3 2 ,1 v1, 3 Appendix2 A p1,1 0 1 Background2 material i j Inflow Solid wall A.1 Iterativn e solutions to linear systems Γ0 Gauss-SeidelΓ1 method Ω The Laplace equation on a Cartesian grids can be discretized as M 2 M 2 Φi+1,j 2φi,j + Φi 1,j + β (Φi,j+1 2Φi,j + Φi,j 1) = 0 m − − − − where β =m∆+x/2∆y. We can solve for Φi,j , 1 2 h Φi+1,j + Φi 1,j + β (Φi,j+1 + Φi,j 1) Φ = − − V i,j 2 (1 + β2) Vh Gauss-Seidel uses this expression to update Φ (using the already updated values calculated in same u i,j iteration), i.e. uh Γ0 k k+1 2 k k+1 k+1 Φi+1,j + Φi 1,j + β Φi,j+1 + Φi,j 1 Γ1 − − Φi,j = 2 Ω 2 (1 + β ) 

j + 1 : to be updated direction : new values j

: old values iteration j 1 − i 1 i i + 1 − This iteration method has a slow convergence, it is possible to show

Φ Φk ρm Φ Φ0 k − k ≤ k − k where

ρ = 1 h2 h = ∆x = ∆y − O e.i. the error is reduced by h2 each iteration.  Requiring an error reduction to h2 the number of iterations must satisfy O O   ρm = h2 O which implies that 

ln(h) ln(h) m = = = h2 ln(h) O ln(ρ) O ln(1 (h2)) O −    − O   To proceed we note that we have N = n2 unknown interior nodes, see Figure A.1. Thus

95 PSfrag replacements

x, x1 y, x2 z, x3 u, u1 v, u2 w, u3 x1 x2 0 xi 0 ˆ ri xi , t u x 0, tˆ i i  P tˆ= 0  x u1 u2 > u1 x1 x2 x3 0 xi ui dtˆ 0 dxi dui dtˆ ri dtˆ dr dtˆ i  P 1 P2 x1 x2 x3 R3 R2 R1 r3 r2 r1 π 2 + dϕ12 V (t) S (t) V (t + ∆t) V (t) S (t−+ ∆t) u n V (t + ∆t) p T0, U0 Tw L T0 U0 Gradient fields wi ∂p ∂xi ui Divergence free vectorfields // to boundary L h x1 x2 p0 > p1 p1 u n dS u n∆t · x y u0 p0 η = y √4νt u u0 y = η√4νt t η y ω˜(η) u ω = · 0 z √πνt t L }δ ω 0 U≈ y→, v x, u L U δ u0 η = y √νx/u0 u f 0 = u0 Blasius profile

δ∗ x Separation point = Pressure force ⇐ x y l

uT x y dx dy dx dl = ( dx,−dy) n dl = ( dy, dx) − i 1, j + 1 − i, j + 1 i + 1, j + 1 c c0 b b0 i 1, j i +− 1, j i, j Aabcd d d0 a a0 i 1, j 1 − i, j − 1 i + 1, j − 1 − j i i + 1 ui,j vi,j pi,j pi,j vi,j+1/2 vi,j 1/2 − ui 1/2,j −i 1 − 2 i 1 i + 2 i + 1 3 i + 2 1 j + 2 j j 1 − 2 j 1 − A B C u 3 2 ,1 v 3 1, 2 p1,1 0 1 2 i j Inflow Solid wall n 96 Γ0 APPENDIX A. BACKGROUND MATERIAL Γ1 Ω 2 M 1 1 1/2 h = ∆x = ∆y = n− = N − M n + 1 ≈ which implies that m m + 2 1 m = (N ln(N)) h O and that the total work is V Vh u W = N 2 ln(N) O uh since the work per iteration is (N).  Γ0 O Γ1 y Ω : to be updated : new values1 : old values n i 1 − i i + 1 j 1 − j j + 1 iteration direction 1 x 1 n 1

Figure A.1: Domain for the solution of the Laplace equation.

Multigrid method A general way to accelerate the convergence of e.g. the Gauss-Seidel method is provided by the Multigrid method. We note that the Gauss-Seidel provides good smoothing of the local error, but converges slowly since it takes time for boundary information to propagate into the domain. The idea behind the multigrid method is that a slowly converging low-frequency on a fine grid is a fast converging high-frequency on a coarse grid. Let

Φi+1,j 2Φi,j + Φi 1,j Φi,j+1 2Φi,j + Φi,j 1 LΦ = − − + − − i,j ∆x2 ∆y2 and define the correction to the solution to the true discrete solution in the following manner

k Φi,j = Φi,j + ∆Φi,j Φk solution at iteration level k i,j − ∆Φ correction to Φk to true discrete solution i,j − i,j This implies that

L∆Φ = LΦk R i,j − i,j ≡ − i,j since LΦi,j = 0. Thus we are left with an equation implying that the Laplace operator on the correction is equal to the negative of the residual. This residual equation is solved on a coarser grid and the correction is interpolated onto finer grid. In order to define the algorithm we use the following definitions

I transfer operator between grids: 2 2 An example of a restriction operator I1 is to I1 - restriction operator from grid 1 to grid 2 1 I2 - prolongation operator from grid 2 to grid 1 1 define it as an injection, i.e. we use every other value in each direction. The prolongation operator I2 may be defined by linear interpolation for the intermediate values, i.e. an average of right and left values PSfrag replacements

x, x1 y, x2 z, x3 u, u1 v, u2 w, u3 x1 x2 0 xi 0 ˆ ri xi , t u x 0, tˆ i i  P tˆ= 0  x u1 u2 > u1 x1 x2 x3 0 xi ui dtˆ 0 dxi dui dtˆ ri dtˆ dr dtˆ i  P 1 P2 x1 x2 x3 R3 R2 R1 r3 r2 r1 π 2 + dϕ12 V (t) S (t) V (t + ∆t) V (t) S (t−+ ∆t) u n V (t + ∆t) p T0, U0 Tw L T0 U0 Gradient fields wi ∂p ∂xi ui Divergence free vectorfields // to boundary L h x1 x2 p0 > p1 p1 u n dS u n∆t · x y u0 p0 η = y √4νt u u0 y = η√4νt t η y ω˜(η) u ω = · 0 z √πνt t L }δ ω 0 U≈ y→, v x, u L U δ u0 η = y √νx/u0 u f 0 = u0 Blasius profile

δ∗ x Separation point = Pressure force ⇐ x y l

uT x y dx dy dx dl = ( dx,−dy) n dl = ( dy, dx) − i 1, j + 1 − i, j + 1 i + 1, j + 1 c c0 b b0 i 1, j i +− 1, j i, j Aabcd d d0 a a0 i 1, j 1 − i, j − 1 i + 1, j − 1 − j i i + 1 ui,j vi,j pi,j pi,j vi,j+1/2 vi,j 1/2 − ui 1/2,j −i 1 − 2 i 1 i + 2 i + 1 3 i + 2 1 j + 2 j j 1 − 2 j 1 − A B C u 3 2 ,1 v 3 1, 2 p1,1 0 1 2 i j Inflow Solid wall n Γ0 Γ1 Ω M 2 M m m + 2 1 h V Vh u uh Γ0 Γ1 Ω A.1. ITERA: to bTIVEe updatedSOLUTIONS TO LINEAR SYSTEMS 97 : new values : old values y i 1 − i i + 1 j 1 − j fine grid (1) j + 1 coarse grid (2) iteration direction x y 1 n

j x i

Figure A.2: Two level grid.

and top and bottom values. The values marked with in figure A.2 are then taken as an average of the averages of the intermediate values. × Now we can define the following two level scheme:

1. LΦ iterated k times LΦk = R i,j ⇒ i,j i,j 2. L∆Φ = I2R iterated k times, ∆Φ0 = 0 (starting value) (here ∆Φ is definied on grid 2) i,j − 1 i,j i,j i,j k 1 3. Φi,j = Φi,j + I2 ∆Φi,j and goto 1.

at the end of 1. convergence is checked. Wesseling [10] estimated the work of the multigrid method to be W = (N ln N), a substantial im- provement over the Gauss-Seidel method. O PSfrag replacements

x, x1 y, x2 z, x3 u, u1 v, u2 w, u3 x1 x2 0 xi 0 ˆ ri xi , t PSfrag replacements u x 0, tˆ i i  P tˆ= 0 x, x1  y, x 2 x z, x3 u1 u, u1 u2 > u1 v, u2 x1 w, u3 x2 x1 x3 0 x2 xi 0 xi ui dtˆ 0 ˆ 0 ri xi , t dxi u x 0, tˆ du dtˆ i i  i P tˆ= 0 ri dtˆ  dr dtˆ x i   P u1 1 P u2 > u1 2 x1 x1 x2 x2 x3 x3 0 3 xi R 2 ui dtˆ R 0 1 dxi R 3 dui dtˆ r 2 ri dtˆ r dr dtˆ r1 i  π + dϕ12 P1 2  V (t) P2 S (t) x1 V (t + ∆t) V (t) x2 S (t−+ ∆t) x3 R3 u R2 n V (t + ∆t) R1 p r3 T , U r2 0 0 T r1 w π 2 + dϕ12 L V (t) T0 S (t) U0 V (t + ∆t) VGradien(t) t fields − S (t + ∆t) wi ∂p u ∂xi n ui Divergence free vectorfieldsV (t +//∆tot) boundary p L T0, U0 h Tw x1 L x2 T0 p0 > p1 U0 p1 Gradient fields u wi n ∂p ∂xi dS u u n∆t i · Divergence free vectorfields // to boundary x y L h u0 x p0 1 η = y √4νt x2 u p0 > p1 u0 p1y = η√4νt u t n η dS y ω˜(η) u · 0 u n∆ωtz = √ · πνt x t y L u 0 }δ p0 y ω 0 η = ≈ √4νt U u → u0 y, v y = η√4νt x, u t L η U y δ ω˜(η) u ω = · 0 z √πνt u0 η = y t √νx/u0 u f 0 = L u0 Blasius}δ profile ω 0 δ ≈ ∗ U x Separationy→, v point = x,Pressureu force ⇐ L x U y δ l

u0 uT η = y √νx/u0 x u f 0 = y u0 Blasius profile dx dy δ∗ dx x − Separation poindlt= ( dx, dy) n dl = ( dy, dx) = Pressure force − ⇐ i 1, j + 1 x − y i, j + 1 i + 1, j + 1 l

uT c x c0 y b dx b0 i 1, j dy − dx i + 1, j dl = ( dx,−dy) i, j n dl = ( dy, dx) Aabcd − i 1, j + 1 d − i, j + 1 d0 i + 1, j + 1 a c a0 i 1, j 1 c 0 − i, j − 1 b i + 1, j − 1 b0 − i 1, j j i +− 1, j i i, j i + 1 ui,j Aabcd v d i,j p d i,j 0 p a i,j vi,j+1/2 a0 v i 1, j 1 i,j 1/2 u − − i, j − 1 i 1/2,j − −i 1 i + 1, j 1 − 2 − j i i + 1 i 2 i + 1 i + 1 i + 3 ui,j 2 j + 1 vi,j 2 pi,j j j 1 pi,j − 2 v j 1 i,j+1/2 − vi,j 1/2 A − ui 1/2,j B − 1 i 2 C − u 3 ,1 i 2 1 v1, 3 i + 2 2 p i + 1 1,1 3 i + 2 0 1 j + 2 1 j 2 j 1 i − 2 j 1 j − A Inflow B Solid wall C n u 3 Γ0 2 ,1 v 3 Γ1 1, 2 p1,1 Ω 2 0 M 1 M 2 m i m + 2 j 1 Inflow h Solid wall V V n h Γ0 u u Γ1 h Γ Ω 0 M 2 Γ1 M Ω : to be updated m m +:2new values 1: old values i 1 h − V i Vh i + 1 j 1 u − j uh j + 1 Γ0 iterationΓ1 direction Ω x : to be updated y : new values 1 : old values n 98 APPENDIX A. BACKGROUND MATERIAL i 1 x − y i y = x2 i + 1 i j 1 j − finej grid (1) jcoarse+ 1 grid (2) iteration direction r x y e1 e1 1 x = x1 n e3 x e2 y z = x3 i j Figure A.3: Cartesian coordinate system.

fine grid (1) x2 coarse grid (2)

x20 x10

e20 e10 e2 e0 a 3 x30

e1

x1 e1 e3

x3

Figure A.4: Two different coordinate systems.

A.2 Cartesian tensor notation

Tensor notation is a compact way to write vector and tensor formulas. Vectors and tensors are objects which are independent of the coordinate system they are represented in. In the Cartesian coordinate system in Figure A.3 we have the unit vectors e = 1 k = 1, 2, 3 | k| The scalar product of two unit vectors is the Kronecker’s delta, δkl 1 k = l e e = δ = k · l kl 0 k = l 6 and the position vector r is

3 r = x1e1 + x2e2 + x3e3 = xkek = xkek. kX=1 The last expression make use of Einstein’s summation convention: when an index occurs twice in the same expression, the expression is implicitly summed over all values for that index.

Example

δkk = δll = δ11 + δ22 + δ33 = 3

δij aj = δi1a1 + δi2a2 + δi3a3 = ai.

A.2.1 Orthogonal transformation Consider two arbitrary oriented coordinate systems as in Figure A.4. Assume identical origin, a = 0. The unit vectors are orthogonal e0 e0 = δ k · l kl PSfrag replacements

x, x1 y, x2 z, x3 u, u1 v, u2 w, u3 x1 x2 0 xi 0 ˆ ri xi , t u x 0, tˆ i i  P tˆ= 0  x u1 u2 > u1 x1 x2 x3 0 xi ui dtˆ 0 dxi dui dtˆ ri dtˆ dr dtˆ i  P 1 P2 x1 x2 x3 R3 R2 R1 r3 r2 r1 π 2 + dϕ12 V (t) S (t) V (t + ∆t) V (t) S (t−+ ∆t) u n V (t + ∆t) p T0, U0 Tw L T0 U0 Gradient fields wi ∂p ∂xi ui Divergence free vectorfields // to boundary L h x1 x2 p0 > p1 p1 u n dS u n∆t · x y u0 p0 η = y √4νt u u0 y = η√4νt t η y ω˜(η) u ω = · 0 z √πνt t L }δ ω 0 U≈ y→, v x, u L U δ u0 η = y √νx/u0 u f 0 = u0 Blasius profile

δ∗ x Separation point = Pressure force ⇐ x y l

uT x y dx dy dx dl = ( dx,−dy) n dl = ( dy, dx) − i 1, j + 1 − i, j + 1 i + 1, j + 1 c c0 b b0 i 1, j i +− 1, j i, j Aabcd d d0 a a0 i 1, j 1 − i, j − 1 i + 1, j − 1 − j i i + 1 ui,j vi,j pi,j pi,j vi,j+1/2 vi,j 1/2 − ui 1/2,j −i 1 − 2 i 1 i + 2 i + 1 3 i + 2 1 j + 2 j j 1 − 2 j 1 − A B C u 3 2 ,1 v 3 1, 2 p1,1 0 1 2 i j Inflow Solid wall n Γ0 Γ1 Ω M 2 M m m + 2 1 h V Vh u uh Γ0 Γ1 Ω : to be updated : new values : old values i 1 − i i + 1 j 1 − j j + 1 iteration direction x A.2. CARTESIAN TENSORy NOTATION 99 1 n e1x1 x y i j e fine grid (1) 1 coarse grid (2) e20

e0 e x = cos (x0 , x ) x = c x 2 · 1 1 2 1 1 21 1

Figure A.5: Projection of e1x1 on e20 .

and a position vector is independent of coordinate system,

r = xlel = xl0el0.

Component k of r can be written as

e0 r = x e0 e = x0e0 e0 = x0δ = x0 x0 = e0 e x = c 0 x k · l k · l l l · k l kl k ⇒ k k · l l k l l where we have the transformation tensor

c 0 = e0 e = cos(x0 , x ). k l k · l k l

Since cos(x0 , x ) = cos(x0 , x ) in general, we have (for k = 1, l = 2) 2 1 6 1 2

c 0 = e0 e = cos(x0, x ) = c 0 l k l · k l k 6 k l From e r = x e e = x0e e0 x = e0 e x0 = c 0 x0 = c x0 k · l k · l l k · l ⇒ k l · k l l k l lk l we conclude that first index refer to primed system!

Example

xk0 = cklxl = ck1x1 + ck2x2 + ck3x3 = cos(xk0 , x1)x1 + cos(xk0 , x2)x2 + cos(xk0 , x3)x3 = e0 e x + e0 e x + e0 e x k · 1 1 k · 2 2 k · 3 3 which for component 2 reads x0 = e0 e x + e0 e x + e0 e x 2 2 · 1 1 2 · 2 2 2 · 3 3 ∵ x20 is projection of e1x1, e2x2, e3x3 on e20 . A visualization of the projection of e1x1 on e20 can be seen in Figure A.5.

The relation between ckl and cml can be studied through

x0 = c x = c c x0 (c c δ ) x0 = 0. k kl l kl ml m ⇒ kl ml − km m 0 0 δkmxm cmlxm |{z} In the same manner w|{z}e have

x = c x0 = c c x (c c δ ) x = 0. k lk l lk lm m ⇒ lk lm − km m δkmxm clmxm |{z} |{z} A.2.2 Cartesian Tensors

Def. a Cartesian tensor of rank R is a set of quantities Tklm... which transform as a vector in each of its R indices.

Tk0lm... = ckrclscmp . . . Trsp... 100 APPENDIX A. BACKGROUND MATERIAL

Example For scalars the rank is R = 0 a b = a0 b0 = c c a b = a b , · k k kl km l m l l δlm for vectors R = 1 | {z } ak0 = cklal and for a tensor of second order we have R = 2

δk0 l = ckmclnδmn = ckmclm = δkl.

δkl is isotropic, i.e. identical in all coordinate systems. An outer product generates a tensor

Tk0lSr0 s = ckmclncrpcsqTmnSpq and an inner product generates a tensor

Tk0lSls0 = ckm clnclp csqTmnSpq = ckmcsqTmnSnq

δnp | {z } A.2.3 Permutation tensor

1 even ε = 1 if klm is odd permutation of (1, 2, 3) klm  −     0   no      As examples of permutations of 1,2,3 we have

(1,2,3), (3,1,2), (2,3,1) even permutation ε123 = 1 (2,1,3), (3,2,1), (1,3,2) odd permutation ε = 1 213 − at least 2 subscripts equal no permutation ε221 = 0

A.2.4 Inner products, crossproducts and determinants The inner product of the vectors a and b is a b = δ a b = a b = a b + a b + a b . · ij i j i i 1 1 2 2 3 3 The cross product of a and b can be written as

e1 e2 e2 a b = a1 a2 a3 = (a b a b )e + (a b a b )e + (a b a b )e = ε e a b × 2 3 − 3 2 1 3 1 − 1 3 2 1 2 − 2 1 3 ijk i j k b b b 1 2 3 and the determinan t of the tensor aij is

a11 a12 a13 a = a21 a22 a23 = ε a a a |{ ij }| ijk 1i 2j 3k a31 a32 a33

1 1 = ε (a a a + a a a + a a a a a a a a a a a a = ε ε a a a . 6 ijk i1 j2 k3 i3 j1 k2 i2 j3 k1 − i2 j1 k3 − i3 j2 k1 − i1 j3 k2 6 ijk pqr ip jq kr We have the permutation relation ε ε = δ δ δ δ . (A.1) klm ksp ls mp − lp ms If we set s = l in (A.1) we get ε ε = (3 1)δ = 2δ klm klp − mp mp and if we also use p = m we end up with εklmεklm = 6 The permutation tensor can also be used to derive the following vector relation (a b) (c d) = ε a b ε c d = (δ δ δ δ )a b c d × · × ijk j k ilm l m jl km − jm lk j k l m = a c b d a d b c = (a c)(b d) (a d)(b c) j j k k − j j k k · · − · · A.2. CARTESIAN TENSOR NOTATION 101

A.2.5 Second rank tensors

All second rank tensors can be decomposed into symmetric and antisymmetric parts, Tkl = T(kl) + T[kl], where the antisymmetric part is 1 T = T = (T T ) [kl] − [lk] 2 kl − lk and the symmetric part 1 T = T = (T + T ) . (kl) (lk) 2 kl lk

The symmetric part can be decomposed into isotropic and traceless part, T(kl) = T kl + T kl, the isotropic part being 1 T = T δ kl 3 mm kl and the traceless part is 1 T = T T δ . kl (kl) − 3 mm kl If we project the isotropic, traceless and entisymmetric parts we get 1 1 S T = S T + S T = S T S T = 0 (kl) [kl] 2 (kl) [kl] (lk) [lk] 2 (kl) [kl] − (lk) [kl]   1 1 1 1 S T = S δ T T δ = S T T δ = 0 kl kl 3 mm kl (kl) − 3 mm kl 3 mm kk − 3 kk ll     ⇒

SklT[kl] = S[kl]T[kl]

SklT(kl) = S(kl)T(kl)

SklT kl = SklT kl

SklT kl = SklT kl, and each part is invariant under transformation

T 0 = c c T = c c T = c c T = T 0 [kl] kr ls [rs] − kr ls [sr] − lr ks [rs] − [lk]

Tr0r = crpcrqTpq = δpqTpq = Tpp

1 1 T 0 = c c T = c c T T δ = T 0 T δ . kl kp lq pq kp lq (pq) − 3 rr pq (pq) − 3 rr kl   Since we only need three components to completely describe an antisymmetric tensor of rank R = 2 it can be represented by its dual vector  di = εijkTjk = εijkT(jk) + εijkT[jk]

The first term on the right hand side is zero since εijk is antisymmetric in any two indecies. Multiply both sides by εilm

1 ε d = ε ε T = (δ δ δ δ ) T = T T = 2T T = ε d ilm i ilm ijk jk lj mk − lk mj jk lm − ml [lm] ⇒ [lm] 2 ilm i

Note: There are 3 independent components in T[lm] and di. In order to sum up, an arbitrary tensor of rank 2 can be divided into the following parts 1 1 1 T = T + T = T + T + T = T δ + T T δ + ε d kl (kl) [kl] kl kl [kl] 3 rr kl (kl) − 3 rr kl 2 ikl i isotropic traceless antisymmetric Properties of the above parts are invariant under transformation.| {z } | In the{z Navier-Stok} | es{zequations} we have the velocity gradient ∂ui . The antisymmetric part of this tensor describes rotation, the isotropic part the ∂xj volume change and the traceless part describes the deformation of a fluid element. 102 APPENDIX A. BACKGROUND MATERIAL

Example We have the second rank tensor 1 2 3 Tkl = 4 5 6 { }  7 8 9  which can be divided into a symmetric part  

1 3 5 T(kl) = 3 5 7  5 7 9     and an antisymmetric part 0 1 2 − − T[kl] = 1 0 1 .  2 1 −0   The symmetric part can then be divided into a isotropic part 

5 0 0 T = 0 5 0 kl   n o 0 0 5   and a traceless part 4 3 5 − T kl = 3 0 7 .  5 7 4   The dual vector of the antisymmetric tensor is  

2 − di = 4 . { }  2  −   A.2.6 Tensor fields We have the tensor field T (x , x , x ) T (x ) with the following properties ij 1 2 3 ≡ ij k partial derivative transforms like a tensor • ∂ ∂xk ∂ ∂ = = cpk where (xk = cpkxp0 ) ∂xp0 ∂xp0 ∂xk ∂xk

gradient adds one to tensor rank • ∂ Tij ∂xk divergence decreases tensor rank by one • ∂ ∂T1l ∂T2l ∂T3l Tkl = + + ∂xk ∂x1 ∂x2 ∂x3

curl • ∂uk ( u)i = εijk ∇ × ∂xj which can be compared with the expression for the determinant.

Example Show that ( Ψ) = 0. ∇ · ∇ × 2 ∂ ∂Ψm ∂ ( Ψ) = εklm = εklm Ψm = 0 ∇ · ∇ × ∂xk ∂xl ∂xk∂xl

2 since ε is antisymmetric in kl and ∂ is symmetric in kl. klm ∂xk∂xl PSfrag replacements

x, x1 y, x2 z, x3 u, u1 v, u2 w, u3 x1 x2 0 xi 0 ˆ ri xi , t u x 0, tˆ i i  P tˆ= 0  x u1 u2 > u1 x1 x2 x3 0 xi ui dtˆ 0 dxi dui dtˆ ri dtˆ dr dtˆ i  P 1 P2 x1 x2 x3 R3 R2 R1 r3 r2 r1 π 2 + dϕ12 V (t) S (t) V (t + ∆t) V (t) S (t−+ ∆t) u n V (t + ∆t) p T0, U0 Tw L T0 U0 Gradient fields wi ∂p ∂xi ui Divergence free vectorfields // to boundary L h x1 x2 p0 > p1 p1 u n dS u n∆t · x y u0 p0 η = y √4νt u u0 y = η√4νt t η y ω˜(η) u ω = · 0 z √πνt t L }δ ω 0 U≈ y→, v x, u L U δ u0 η = y √νx/u0 u f 0 = u0 Blasius profile

δ∗ x Separation point = Pressure force ⇐ x y l

uT x y dx dy dx dl = ( dx,−dy) n dl = ( dy, dx) − i 1, j + 1 − i, j + 1 i + 1, j + 1 c c0 b b0 i 1, j i +− 1, j i, j Aabcd d d0 a a0 i 1, j 1 − i, j − 1 i + 1, j − 1 − j i i + 1 ui,j vi,j pi,j pi,j vi,j+1/2 vi,j 1/2 − ui 1/2,j −i 1 − 2 i 1 i + 2 i + 1 3 i + 2 1 j + 2 j j 1 − 2 j 1 − A B C u 3 2 ,1 v 3 1, 2 p1,1 0 1 2 i j Inflow Solid wall n Γ0 Γ1 Ω M 2 M m m + 2 1 h V Vh u uh Γ0 Γ1 Ω : to be updated : new values : old values i 1 − i i + 1 j 1 − j j + 1 A.2. CARTESIANiterationTENSORdirectionNOTATION 103 x y 1 n n x y i j fine grid (1) S V coarse grid (2)

dS = n dS

Figure A.6: Volume V bounded by the close surface S.

Example 1 Show that f(r) = f 0(r) where r = xk and r = r = √xkxk . ∇ r { }k | |

1/2 ∂ df ∂r ∂(xpxp) f(r) k = f(r) = = f 0 = {∇ } ∂xk dr ∂xk ∂xk 1 1 ∂ 1 1 1 f 0 (x x )− 2 (x x ) = f 0 (δ x + x δ ) = f 0x = f 0r 2 p p ∂x p p 2r pk p p pk r k r k  k

Example Show that ( F) = ( F) ∆F. ∇ × ∇ × ∇ ∇ · − ∂ ∂ ∂ ∂ ∂ ∂ ( F) i = εijk εklm Fm = εijkεklm Fm = εkij εklm Fm = ∇ × ∇ × ∂xj ∂xl ∂xj ∂xl ∂xj ∂xl  ∂ ∂ ∂ ∂ ∂ ∂ ∂ ∂ ∂ ∂ (δilδjm δimδjl) Fm = Fj Fi = Fj Fi = ( F) ∆F i − ∂xj ∂xl ∂xj ∂xi − ∂xj ∂xj ∂xi ∂xj − ∂xj ∂xj ∇ ∇ · −  Example u ∂ Show that if u¯ = Ω¯ r¯ then Ω = ∇ × . This means, show that εijk uk = 2Ωi. × 2 ∂xj ∂ ∂ ∂ εijk uk = uk = εklmΩlrm = εijk (εklmΩlrm) = εijkεklm Ωlrm = ∂xj { } ∂xj ∂xj ∂ ∂ εkij εklm Ωlrm = (δilδjm δimδjl) Ωlrm = ∂xj − ∂xj

∂ ∂ ∂rm ∂ri ∂rm ∂ri Ωirm Ωlri = Ω independent of x = Ωi Ωl = = 1 + 1 + 1 = 3 = δil = ∂xm − ∂xl { } ∂xm − ∂xl {∂xm ∂xl }

3Ω Ω δ = 2Ω i − l il i

A.2.7 Gauss & Stokes integral theorems Let n be the outward pointing normal to the closed surface S bounding the simply-connected volume V , see Figure A.6. Gauss integral theorem then states

a n dS = a dV · ∇ · IS VZ or ∂ak aknk dS = dV ∂xk IS VZ PSfrag replacements

x, x1 y, x2 z, x3 u, u1 v, u2 w, u3 x1 x2 0 xi 0 ˆ ri xi , t u x 0, tˆ i i  P tˆ= 0  x u1 u2 > u1 x1 x2 x3 0 xi ui dtˆ 0 dxi dui dtˆ ri dtˆ dr dtˆ i  P 1 P2 x1 x2 x3 R3 R2 R1 r3 r2 r1 π 2 + dϕ12 V (t) S (t) V (t + ∆t) V (t) S (t−+ ∆t) u n V (t + ∆t) p T0, U0 Tw L T0 U0 Gradient fields wi ∂p ∂xi ui Divergence free vectorfields // to boundary L h x1 x2 p0 > p1 p1 u n dS u n∆t · x y u0 p0 η = y √4νt u u0 y = η√4νt t η y ω˜(η) u ω = · 0 z √πνt t L }δ ω 0 U≈ y→, v x, u L U δ u0 η = y √νx/u0 u f 0 = u0 Blasius profile

δ∗ x Separation point = Pressure force ⇐ x y l

uT x y dx dy dx dl = ( dx,−dy) n dl = ( dy, dx) − i 1, j + 1 − i, j + 1 i + 1, j + 1 c c0 b b0 i 1, j i +− 1, j i, j Aabcd d d0 a a0 i 1, j 1 − i, j − 1 i + 1, j − 1 − j i i + 1 ui,j vi,j pi,j pi,j vi,j+1/2 vi,j 1/2 − ui 1/2,j −i 1 − 2 i 1 i + 2 i + 1 3 i + 2 1 j + 2 j j 1 − 2 j 1 − A B C u 3 2 ,1 v 3 1, 2 p1,1 0 1 2 i j Inflow Solid wall n Γ0 Γ1 Ω M 2 M m m + 2 1 h V Vh u uh Γ0 Γ1 Ω : to be updated : new values : old values i 1 − i i + 1 j 1 − j j + 1 iteration direction x y 1 n x y 104 APPENDIX A. BACKGROUND MATERIAL i j n fine grid (1) coarse grid (2) S

dl C

Figure A.7: The open surface S enclosed by the contour C.

for a differentiable vector field a. This can be generalized to

∂ Tklmnp dS = Tklm dV . ∂xp IS VZ

Example

fn dS = f dV . ∇ IS VZ

a n dS = a dV if T n = ε a n . × ∇ × klm m klm l m IS VZ

Stokes theorem states that for a differentiable vector field a if an open simply-connected surface S is enclosed by a closed curve C, of which dl is the line element as in Figure A.7, then

a dl = ( a) n dS · ∇ × · CI ZS or ∂am ak dxk = εklmnk dS ∂xk CI ZS this can be generalized to ∂ Tklm dxp = εijpni Tklm dS ∂xj CI ZS

Example Let T = f. In the generalized Stokes theorem we then get ε n ∂f dS in right hand side klm ijp i ∂xj S R f dl = n f dS × ∇ CI ZS

A.2.8 Archimedes principle Gauss theorem can be used to calculate the on an object immersed in a fluid (Archimedes circa 281–212 BC). Consider a water cylinder with volume dV and mass dm, Figure A.8. The force from the water cylinder is

dm g = dV ρg = x3ρg dA pressure

where g is the gravity constant and ρ the water density. |The{z }pressure at a distant x3 from the surface in a fluid is then p = ρgx3 + p0 where p0 is the atmospheric pressure. Let Π be the buoyancy force resulting from the pressure on the object, m the mass of equivalent volume of water and M the mass of the object in Figure A.8. The force on a small element dS of the body resulting from the pressure is

dΠ = gρx n dS k − 3 k PSfrag replacements

x, x1 y, x2 z, x3 u, u1 v, u2 w, u3 x1 x2 0 xi 0 ˆ ri xi , t u x 0, tˆ i i  P tˆ= 0  x u1 PSfrag replacements u2 > u1 x1 x, x1 x2 y, x2 x3 z, x3 0 xi u, u1 ui dtˆ v, u2 0 dxi w, u3 dui dtˆ x1 ri dtˆ x2 0 dri dtˆ xi  0 ri x , tˆ P1 i  0 P ui x , tˆ 2 i  P tˆ= 0 x1  x 2 x x3 u1 3 R u2 > u1 2 R x1 1 R x2 3 r x3 2 0 r xi 1 r ui dtˆ π 0 2 + dϕ12 dxi V (t) dui dtˆ S (t) ri dtˆ V (t + ∆t) V (t) dr dtˆ − i  S (t + ∆t) P 1 u P2 n x1 V (t + ∆t) x2 p x3 T0, U0 R3 Tw R2 L R1 T0 PSfrag replacements r3 U0 2 x, x1 r Gradient fields r1 yπ, x2 wi + dϕ12 ∂p z2, x3 ∂xi u, u1 V (t) S (t) ui v, u2 Divergence free vectorfields // to boundary V (t + ∆wt,)u3 V (t) S (t−+ ∆t) L x1 h x2 u 0 x1 xi n V0 (ˆt + ∆t) x2 ri xi , t p0 > p1 u x 0, tˆ p i i  p1 P tˆ= 0 T0, U0 u  Tw x n  L u1 dS T0 u2 > u1 u n∆t U0 x1 · x Gradient fields x2 y wi x3 ∂p u0 0 x ∂xi p i 0 ˆ ui η = y ui dt Divergence free√4νtvectorfields // to boundary0 u dxi u0 dui dtˆ L y = η√4νt ri dtˆ h t dr dtˆ x1 η i  P x2 y 1 Pp0 > p1 ω˜(η) u0 2 · ωz = √ p1 πνt x1 u t x2 n L x3 dS }δ R3 ω 0 u2 n∆t ≈ R · U 1 x → R y y, v r3 u0 x, u r2 1 p0 L η r= y π √4νt U 2 + dϕ12 u δ V (t) u0 √ u0 y = η 4νt y S (t) η = t √νx/u0 V (t + ∆t) V (t) u − η f 0 = S (t + ∆t) u0 y Blasius profile uω˜(η) u0 ωz = · δ n√πνt ∗ V (t + ∆t) x t Separation point p L = Pressure force T0, U0 }δ ⇐ Twω 0 x ≈ y L U → l T0 y, v U x, u uT 0 x Gradient fields L y wi U ∂p dx ∂xi δ dy ui u0 η = y Divergence free vectorfieldsdx // to boundary√νx/u0 − u dl = ( dx, dy) f 0 = L u0 n dl = ( dy, dx) − Blasius hprofile i 1, j + 1 x1 − δ∗ i, j + 1 x2 x i + 1, j + 1 Separationp0 > p1 point c = Pressurep1 force ⇐ c0 u x b n y b0 dS l i 1, j u n∆t uT − · i + 1, j x x i, j y y Aabcd u0 dx d p0 dy η = y d0 √4νt dx u − a dl = (ud0x, dy) a0 nydl==η√( d4yν,t dx) − i 1, j 1 i 1t, j + 1 − i, j − 1 − − i,η j + 1 i + 1, j 1 i + 1y, j + 1 − ω˜(η) u j ω = · 0 z √πνt c i t c0 i + 1 b ui,j L }δ b0 vi,j i 1, j ω 0− pi,j ≈i + 1, j pi,j U y→, v i, j vi,j+1/2 x, uAabcd vi,j 1/2 − d ui 1/2,j L − 1 U d0 i 2 − δ a i a i + 1 u0 0 2 η = i y 1, j 1 i + 1 √νx/u− 0 − 3 ui, j 1 i + f 0 = − 2 i +u10, j 1 1 − j + 2 Blasius profile j j δ∗ i j 1 − 2 x i + 1 j 1 Separation point u − i,j A = Pressure force v ⇐ i,j B x pi,j C y pi,j u 3 ,1 2 vi,jl +1/2 v1, 3 2 uvTi,j 1/2 − p1,1 uxi 1/2,j − 0 y i 1 − 2 1 dx i dy 1 2 i + 2 i dx i + 1 j dl = ( dx,−dy) 3 i + 2 n dl = ( dy, dx)j + 1 Inflow − 2 i 1, j + 1 Solid wall − j n i, j + 1j 1 − 2 Γ0 i + 1, j + 1j 1 − Γ1 c A Ω c0 B 2 M b C u 3 M b0 2 ,1 m i 1, j v1, 3 − 2 m + 2 i + 1, j p1,1 i, j 1 0 h Aabcd 1 V d 2 Vh d0 i u a j uh aInflo0 w i 1, j 1 Γ0 Solid wall − i, j − 1 Γ1 n i + 1, j − 1 Ω − Γ0 : to be updated j Γ1 : new values i Ω : old values i + 1 M 2 u i 1 i,j M − v i i,j m p i + 1 i,jm + 2 p j 1 i,j 1 − v j i,j+1/2 h j + 1 vi,j 1/2 − V u iteration direction i 1/2,j V −i 1 h x − 2 u y A.2. CARTESIAN TENSOR NOTATIONi uh 105 i + 1 1 2 Γ0 n i + 1 Γ p i + 3 1 0 x 2 Ω j + 1 y : to be up2dated j i : new 1values n j j : old− 2values fine grid (1) j 1 i 1 dV dm coarse grid (2) − − A i B i + 1 C j 1 u 3 ,1 − 2 j v1, 3 2 j + 1 dA p M x3 iteration direction1,1 0 x 1 y 2 1 Figure A.8: An object with mass Mi immersedn in a fluid illustrating Archimedes principle. j x mg Inflow y Solid wall i n j fine Γgrid0 (1) coarse Γgrid1 (2) Ω 2 M Mg M Figure A.9: The forces acting on an obmject immersed in a fluid. m is the mass of equivalent volume of water and M the mass of the body. m + 2 1 h where the minus sign stems from the outward pointing normal n. The buoyancy force can then be calculated V through V h ∂ Πk = ρgx3unk dS = ρg x3 dV = ρgδk3V. − − ∂xk − SI uh VZ Γ This means that the object loses some weigh0 t as the water is displaced. The buoyancy force is Γ1 Ω Π3 = ρgV = g m : to be updated − − see Figure A.9. : new values The moment of a force F at some arbitrary point with position vector r from the point of application of : old values the force is M = r F. The moment around the center of gravity G of the homogenous body produced by × i 1 the pressure force dΠ acting on an elemen− t dS of the body is dM = (r r ) dΠ as in Figure A.10. i G G This can then be used to calculate the total moment around G form pressure− forces× on the body i + 1 j 1 ∂ ∂x − 3 MGk = ρgεklm (xl xGl )jx3nm dS = ρgεklm (xlx3) xGl dV = − − − ∂xm − ∂xm IS j + 1 VZ   iteration direction ρgεklm [δlmx3 + δxm3xl δm3xG ] dV = ρgεkl3 xl dV xG V = 0 − − l −  − l  VZ y VZ 1   If a part of the fluid is frozen (without changing in density) this body is in equilibrium in the fluid: n F = M = 0. x y i j fine grid (1) G coarse grid (2) r r − G n

Figure A.10: Moment around G from pressure forces acting on the object. PSfrag replacements

x, x1 y, x2 z, x3 u, u1 v, u2 w, u3 x1 x2 0 xi 0 ˆ ri xi , t u x 0, tˆ i i  P tˆ= 0  x u1 u2 > u1 x1 x2 x3 0 xi ui dtˆ 0 dxi dui dtˆ ri dtˆ dr dtˆ i  P 1 P2 x1 x2 x3 R3 R2 R1 r3 r2 r1 π 2 + dϕ12 V (t) S (t) V (t + ∆t) V (t) S (t−+ ∆t) u n V (t + ∆t) p T0, U0 Tw L T0 U0 Gradient fields wi ∂p ∂xi ui Divergence free vectorfields // to boundary L h x1 x2 p0 > p1 p1 u n dS u n∆t · x y u0 p0 η = y √4νt u u0 y = η√4νt t η y ω˜(η) u ω = · 0 z √πνt t L }δ ω 0 U≈ y→, v x, u L U δ u0 η = y √νx/u0 u f 0 = u0 Blasius profile

δ∗ x Separation point = Pressure force ⇐ x y l

uT x y dx dy dx dl = ( dx,−dy) n dl = ( dy, dx) − i 1, j + 1 − i, j + 1 i + 1, j + 1 c c0 b b0 i 1, j i +− 1, j i, j Aabcd d d0 a a0 i 1, j 1 − i, j − 1 i + 1, j − 1 − j i i + 1 ui,j vi,j pi,j pi,j vi,j+1/2 vi,j 1/2 − ui 1/2,j −i 1 − 2 i 1 i + 2 i + 1 3 i + 2 1 j + 2 j j 1 − 2 j 1 − A B C u 3 2 ,1 v 3 1, 2 p1,1 0 1 2 i j Inflow Solid wall n Γ0 Γ1 Ω M 2 M m m + 2 1 h V Vh u uh Γ0 Γ1 Ω : to be updated : new values106 APPENDIX A. BACKGROUND MATERIAL : old values i 1 − i z i + 1 j 1 P (r, θ, z) • − j j + 1 iteration direction x y z 1 n y x y r i θ j fine grid (1) coarse grid (2) x

Figure A.11: Cylindrical polar coordinates

A.3 Curvilinear coordinates Cylindrical Polar Coordinates The cylindrical polar coordinates are (r, θ, z), where θ is the azimuthal angle, see figure A.11. The velocity can be written as u = urer + uθeθ + uzez, (A.2) where the unit vectors are related to Cartesian coordinates as

er = ex cos θ + ey sin θ, e = e sin θ + e cos θ, (A.3) θ − x y ez = ez. Non-zero derivatives of unit vectors ∂e ∂e r = e , θ = e . (A.4) ∂θ θ ∂θ − r Gradient of a scalar p ∂p 1 ∂p ∂p p = e + e + e . (A.5) ∇ ∂r r r ∂θ θ ∂z z Laplacian of a scalar p 1 ∂ ∂p 1 ∂2p ∂2p 2p = r + + . (A.6) ∇ r ∂r ∂r r2 ∂θ2 ∂z2   Divergence of a vector u 1 ∂(ru ) 1 ∂u ∂u u = r + θ + z . (A.7) ∇ · r ∂r r ∂θ ∂z Advective derivative of a scalar p ∂p u ∂p ∂p (u )p = u + θ + u . (A.8) · ∇ r ∂r r ∂θ z ∂z Curl of a vector u 1 ∂u ∂u ∂u ∂u 1 ∂(ru ) ∂u u = z θ e + r z e + θ r e . (A.9) ∇ × r ∂θ − ∂z r ∂z − ∂r θ r ∂r − ∂θ z       Incompressible Navier-Stokes equations with no body force ∂u u2 1 ∂p u 2 ∂u r + (u )u θ = + ν 2u r θ , (A.10) ∂t · ∇ r − r −ρ ∂r ∇ r − r2 − r2 ∂θ   ∂u u u 1 ∂p 2 ∂u u θ + (u )u + r θ = + ν 2u + r θ , (A.11) ∂t · ∇ θ r −ρ r ∂θ ∇ θ r2 ∂θ − r2   ∂u 1 ∂p z + (u )u = + ν 2u . (A.12) ∂t · ∇ z −ρ ∂z ∇ z PSfrag replacements

x, x1 y, x2 z, x3 u, u1 v, u2 w, u3 x1 x2 0 xi 0 ˆ ri xi , t u x 0, tˆ i i  P tˆ= 0  x u1 u2 > u1 x1 x2 x3 0 xi ui dtˆ 0 dxi dui dtˆ ri dtˆ dr dtˆ i  P 1 P2 x1 x2 x3 R3 R2 R1 r3 r2 r1 π 2 + dϕ12 V (t) S (t) V (t + ∆t) V (t) S (t−+ ∆t) u n V (t + ∆t) p T0, U0 Tw L T0 U0 Gradient fields wi ∂p ∂xi ui Divergence free vectorfields // to boundary L h x1 x2 p0 > p1 p1 u n dS u n∆t · x y u0 p0 η = y √4νt u u0 y = η√4νt t η y ω˜(η) u ω = · 0 z √πνt t L }δ ω 0 U≈ y→, v x, u L U δ u0 η = y √νx/u0 u f 0 = u0 Blasius profile

δ∗ x Separation point = Pressure force ⇐ x y l

uT x y dx dy dx dl = ( dx,−dy) n dl = ( dy, dx) − i 1, j + 1 − i, j + 1 i + 1, j + 1 c c0 b b0 i 1, j i +− 1, j i, j Aabcd d d0 a a0 i 1, j 1 − i, j − 1 i + 1, j − 1 − j i i + 1 ui,j vi,j pi,j pi,j vi,j+1/2 vi,j 1/2 − ui 1/2,j −i 1 − 2 i 1 i + 2 i + 1 3 i + 2 1 j + 2 j j 1 − 2 j 1 − A B C u 3 2 ,1 v 3 1, 2 p1,1 0 1 2 i j Inflow Solid wall n Γ0 Γ1 Ω M 2 M m m + 2 1 h V Vh u uh Γ0 Γ1 Ω : to be updated : new valuesA.3. CURVILINEAR COORDINATES 107 : old values i 1 − i z i + 1 j 1 P (r, θ, ϕ) • − j j + 1 r iteration direction x y θ 1 n y x y i ϕ j fine grid (1) coarse grid (2) x

Figure A.12: Spherical polar coordinates

Spherical Polar Coordinates The spherical polar coordinates are (r, θ, ϕ), where ϕ is the azimuthal angle, see figure A.12. The velocity can be written as u = urer + uθeθ + uϕeϕ, (A.13) where the unit vectors are related to Cartesian coordinates as

er = ex sin θ cos ϕ + ey sin θ sin ϕ + ez cos θ, e = e cos θ cos ϕ + e cos θ sin ϕ e sin θ, (A.14) θ x y − z e = e sin ϕ + e cos ϕ. ϕ − x y Non-zero derivatives of unit vectors ∂e ∂e ∂e ∂e r = e , r = e sin θ, θ = e , θ = e cos θ, (A.15) ∂θ θ ∂ϕ ϕ ∂θ − r ∂ϕ ϕ ∂e ϕ = e sin θ e cos θ. (A.16) ∂ϕ − r − θ Gradient of a scalar p ∂p 1 ∂p 1 ∂p p = e + e + e . (A.17) ∇ ∂r r r ∂θ θ r sin θ ∂ϕ ϕ Laplacian of a scalar p

1 ∂ ∂p 1 ∂ ∂p 1 ∂2p 2p = r2 + sin θ + . (A.18) ∇ r2 ∂r ∂r r2 sin θ ∂θ ∂θ r2 sin2 θ ∂ϕ2     Divergence of a vector u

1 ∂(r2u ) 1 ∂(u sin θ) 1 ∂u u = r + θ + ϕ . (A.19) ∇ · r2 ∂r r sin θ ∂θ r sin θ ∂ϕ Advective derivative of a scalar p ∂p u ∂p u ∂p (u )p = u + θ + ϕ . (A.20) · ∇ r ∂r r ∂θ r sin θ ∂ϕ Curl of a vector u 1 ∂(u sin θ) ∂u 1 1 ∂u ∂(ru ) u = ϕ θ e + r ϕ e (A.21) ∇ × r sin θ ∂θ − ∂ϕ r r sin θ ∂ϕ − ∂r θ     1 ∂(ru ) ∂u + θ r e . r ∂r − ∂θ ϕ   108 APPENDIX A. BACKGROUND MATERIAL

Incompressible Navier-Stokes equations with no body force

∂u u2 + u2 r + (u )u θ ϕ (A.22) ∂t · ∇ r − r 1 ∂p 2u 2 ∂(u sin θ) 2 ∂u = + ν 2u r θ ϕ , −ρ ∂r ∇ r − r2 − r2 sin θ ∂θ − r2 sin θ ∂ϕ   ∂u u u u2 cot θ θ + (u )u + r θ ϕ (A.23) ∂t · ∇ θ r − r 1 ∂p 2 ∂u u 2 cos θ ∂u = + ν 2u + r θ ϕ , −ρ r ∂θ ∇ θ r2 ∂θ − r2 sin2 θ − r2 sin2 θ ∂ϕ   ∂u u u u u cot θ ϕ + (u )u + r ϕ + θ ϕ (A.24) ∂t · ∇ ϕ r r 1 ∂p 2 ∂u 2 cos θ ∂u u = + ν 2u + r + θ ϕ . −ρr sin θ ∂ϕ ∇ ϕ r2 sin θ ∂ϕ r2 sin2 θ ∂ϕ − r2 sin2 θ   Appendix B

Recitations 5C1214

B.1 Tensors and invariants Tensor Notation Scalar p = p

Vector u (u¯)i = ui If u¯ = v then u2 = v w   Matrix

a11 a12 a13 (A) = A If A = a a a then A = a ij ij  21 22 23 23 23 a31 a32 a33   Kronecker delta 1 if i = j δ = (I) = ij ij 0 if i = j  6 Einstein summation convention 3 uiui = uiui i=1 X Kinetic energy per unit volume 1 ρ u¯ 2 = 1 ρ(u2 + v2 + w2) = 1 ρu u 2 | | 2 2 i i Matrix operations a¯ ¯b = a b + a b + a b = a b = δ a b = a b · 1 1 2 2 3 3 i i ij i j j j

(A¯b)i = Aij bj

(AB)ij = AikBkj

tr(A) = Aii

(A) = A (AT ) = A ij ij ⇐⇒ ij ji Permutation symbol

109 110 APPENDIX B. RECITATIONS 5C1214

1 if ijk in cyclic order. ijk = 123, 231 or 312 ε = 0 if any two indices are equal ijk  1 if ijk in anticyclic order. ijk = 321, 213 or 132 −  e¯1 e¯2 e¯3 a¯ ¯b = a a a = e¯ (a b a b ) e¯ (a b a b ) + e¯ (a b a b ) = ε e¯ a b × 1 2 3 1 2 3 − 3 2 − 2 1 3 − 3 1 3 1 2 − 2 1 ijk i j k b1 b2 b3

(a¯ ¯b) = ε a b × i ijk j k ε ε = δ δ δ δ ijk ilm jl km − jm kl ε ε = l = j = 3δ δ δ = 3δ δ = 2δ ijk ijm { } km − jm kj km − mk km ε ε = m = k = 2 3 = 6 ijk ijk { } · Rewrite without the cross product: (a¯ ¯b) (c¯ d¯) = (a¯ ¯b) (c¯ d¯) = ε a b ε c d = ε ε a b c d = × · × × i × i ijk j k ilm l m ijk ilm j k l m (δ δ δ δ ) a b c d = a c b d a d b c = (a¯ c¯)(¯b d¯) (a¯ d¯)(¯b c¯) jl km − jm kl j k l m j j k k − j j k k · · − · · Invariant parts of Tensors S A Tij = Tij + Tij Symmetric and Anti-symmetric parts.

S 1 S Tij = 2 Tij + Tji = Tji Symmetric   T A = 1 T T = T A Anti-symmetric ij 2 ij − ji − ji   The symmetric part of the tensor can be divided into two parts: S ¯ ¯ Tij = Tij + Tij T¯ = T S 1 T δ trace less ij ij − 3 kk ij ¯ 1 Tij = 3 Tkkδij isotropic

This gives: S A ¯ ¯ A Tij = Tij + Tij = Tij + Tij + Tij ∂u In the NS equations we have the tensor i . The anti-symmetric part describes rotation, the isotropic ∂xj part describes the volume change and the trace-less part describes the deformation of a fluid element.

Operators ∂ ( p)i = p ∇ ∂xi ∂2 ∆p = p ∂xi∂xi ∂ u¯ = ui ∇ · ∂xi ∂ ( u¯)i = εijk uk ∇ × ∂xj

Gauss theorem (general) Gauss theorem: B.1. TENSORS AND INVARIANTS 111

F¯ n¯ dS = F¯ dV · ∇ · IS ZV or, ∂F F n dS = i dV i i ∂x IS ZV i In general we can write, ∂ T n dS = T dV ijk l ∂x ijk IS ZV l

Example: Put Tijk nl = Tij ul nl ∂ T u n dS = (u T ) dV ij l l ∂x l ij IS ZV l or,

T(u¯ n¯) dS = ( u¯)T + (u¯ )T dV · ∇ · · ∇ IS ZV  Identities Derive the identity

(F¯ G¯) = (G¯ )F¯ + ( G¯)F¯ ( F¯)G¯ (F¯ )G¯ ∇ × × · ∇ ∇ · − ∇ · − · ∇ ¯ ¯ ∂ ∂ ∂ (F G) i = εijk εklmFl Gm = εijkεklm Fl Gm = εkij εklm Fl Gm = ∇ × × ∂xj ∂xj ∂xj  ∂ ∂ ∂ ∂Fi ∂Gj ∂Fj ∂Gi (δilδjm δimδjl) Fl Gm = Fi Gj Fj Gi = Gj + Fi Gi + Fj = − ∂xj ∂xj − ∂xj ∂xj ∂xj − ∂xj ∂xj

∂Fi ∂Gj ∂Fj ∂Gi Gj + Fi Gi Fj = [(G¯ )F¯ + ( G¯)F¯ ( F¯)G¯ (F¯ )G¯]i ∂xj ∂xj − ∂xj − ∂xj · ∇ ∇ · − ∇ · − · ∇

Show that: ( F¯) = 0 ∇ · ∇ × ∂ ∂ ∂ ∂ ( F¯) = εijk Fk = εijk Fk ∇ · ∇ × ∂xi ∂xj ∂xi ∂xj ∂ ∂ ∂ ∂ Remember that εijk = εjik and that Fk = Fk and thus all terms will cancel. − ∂xi ∂xj ∂xj ∂xi ∂ ∂ εijk Fk = 0 ∂xi ∂xj

Example u¯ ∂ Show that if u¯ = Ω¯ r¯ then Ω¯ = ∇ × . This means, show that εijk uk = 2Ωi. × 2 ∂xj ∂ ∂ ∂ εijk uk = uk = εklmΩlrm = εijk (εklmΩlrm) = εijkεklm Ωlrm = ∂xj { } ∂xj ∂xj ∂ ∂ εkij εklm Ωlrm = (δilδjm δimδjl) Ωlrm = ∂xj − ∂xj

∂ ∂ ∂rm ∂ri ∂rm ∂ri Ωirm Ωlri = Ω independent of x = Ωi Ωl = = 1 + 1 + 1 = 3 = δil = ∂xm − ∂xl { } ∂xm − ∂xl {∂xm ∂xl }

3Ω Ω δ = 2Ω i − l il i Derive the identity (F¯ G¯) = ( F¯) G¯ F¯ ( G¯) ∇ · × ∇ × · − · ∇ × 112 APPENDIX B. RECITATIONS 5C1214

∂ ∂ ∂Fj ∂Gk ∂Fj ∂Gk (F¯ G¯) = εijkFj Gk = εijk Fj Gk = εijk Gk + εijk Fj = εkij Gk + Fj εijk = ∇ · × ∂xi ∂xi ∂xi ∂xi ∂xi ∂xi

∂Fj ∂Gk εkij Gk Fj εjik = ( F¯) G¯ F¯ ( G¯) ∂xi − ∂xi ∇ × · − · ∇ ×

Show that: ( F¯) = ( F¯) ∆F¯ ∇ × ∇ × ∇ ∇ · − ¯ ∂ ∂ ∂ ∂ ∂ ∂ ( F ) i = εijk εklm Fm = εijkεklm Fm = εkij εklm Fm = ∇ × ∇ × ∂xj ∂xl ∂xj ∂xl ∂xj ∂xl  ∂ ∂ ∂ ∂ ∂ ∂ ∂ ∂ ∂ ∂ ¯ ¯ (δilδjm δimδjl) Fm = Fj Fi = Fj Fi = ( F ) ∆F i − ∂xj ∂xl ∂xj ∂xi − ∂xj ∂xj ∂xi ∂xj − ∂xj ∂xj ∇ ∇ · −  B.2. EULER AND LAGRANGE COORDINATES 113

B.2 Euler and Lagrange coordinates Particle path (Lagrange’s representation) Following a fluid particle as time proceeds the path is described by ∂r¯ = u,¯ r¯(tˆ= 0) = x¯ ∂tˆ 0

Streamline (Euler’s representation) Instantaneously a fluid particles displacement dx¯ is tangential to its velocity u¯: dx¯ u¯ = dx¯ u¯ | | | | or if we put ds = dx¯ / u¯ : | | | | dx¯ = u¯ ds Exercise 1 Show that the streamlines for the unsteady flow

u = u0, v = kt, w = 0, u0, k > 0 is straight lines, while any fluid particle follows a parabolic path as time proceeds. Streamline (fix t): dx = u = u x = u s + a ds 0 ⇒ 0 dy = u = kt y = kts + b ds ⇒ Then we see that y(x) is a linear function, kt y = x + d(t) u0

Particle path (fix x¯0): ∂x = u = u x = u tˆ+ x ∂tˆ 0 ⇒ 0 0 ∂y 1 = u = ktˆ x = ktˆ2 + y ∂tˆ ⇒ 2 0 Then we see that y(x) is a parabola,

1 k 2 2 y = 2 (x 2x0x + x0) + y0 2 u0 −

Exercise 2 a) Separate the shear flow u¯ = (βy, 0, 0) into its (i) local translation, (ii) rotation and (iii) pure straining parts.

Lets denote the different parts as u¯ = u¯T + u¯R + u¯D In tensor notation it can be written as

P2 P1 ui = ui + ξij dxj + eij dxj

P (i) Translation is simply u¯ = u 1 = (βy, 0, 0) T { i } PSfrag replacements

x, x1 y, x2 z, x3 u, u1 v, u2 w, u3 x1 x2 0 xi 0 ˆ ri xi , t u x 0, tˆ i i  P tˆ= 0  x u1 u2 > u1 x1 x2 x3 0 xi ui dtˆ 0 dxi dui dtˆ ri dtˆ dr dtˆ i  P 1 P2 x1 x2 x3 R3 R2 R1 r3 r2 r1 π 2 + dϕ12 V (t) S (t) V (t + ∆t) V (t) S (t−+ ∆t) u n V (t + ∆t) p T0, U0 Tw L T0 U0 Gradient fields wi ∂p ∂xi ui Divergence free vectorfields // to boundary L h x1 x2 p0 > p1 p1 u n dS u n∆t · x y u0 p0 η = y √4νt u u0 y = η√4νt t η y ω˜(η) u ω = · 0 z √πνt t L }δ ω 0 U≈ y→, v x, u L U δ u0 η = y √νx/u0 u f 0 = u0 Blasius profile

δ∗ x Separation point = Pressure force ⇐ x y l

uT x y dx dy dx dl = ( dx,−dy) n dl = ( dy, dx) − i 1, j + 1 − i, j + 1 i + 1, j + 1 c c0 b b0 i 1, j i +− 1, j i, j Aabcd d d0 a a0 i 1, j 1 − i, j − 1 i + 1, j − 1 − j i i + 1 ui,j vi,j pi,j pi,j vi,j+1/2 vi,j 1/2 − ui 1/2,j −i 1 − 2 i 1 i + 2 i + 1 3 i + 2 1 j + 2 114 APPENDIX B. RECITATIONS 5C1214 j j 1 − 2 (ii) j 1 0 β 0 0 β 0 − ∂u 1 ∂u ∂u 1 A i = 0 0 0 ξ = i j = β 0 0 ∂x   ij 2 ∂x − ∂x 2 −  B j 0 0 0  j i  0 0 0 C     u 3 ,1 1 2 u¯ = ξdx¯ = (βdy, βdx, 0) v 3 R 1, 2 2 − p1,1

1 (iii) 2 0 β 0 i 1 ∂ui ∂uj 1 e = + = β 0 0 j ij 2 ∂x ∂x 2    j i  0 0 0 Inflow   Solid wall 1 u¯ = edx¯ = (βdy, βdx, 0) n D 2 Γ0 Γ1 Ω M 2b) Find the principal axes of the rate of strain tensor eij and make a schematic sketch of the decomposition Mof the flow. 1 ∂u ∂u ∂u m e = i + j symmetric part of i . ij 2 ∂x ∂x ∂x m + 2  j i  j 1 0 β 0 1 h e = β 0 0 ij 2 V 0 0 0 Vh   uEigenvalues: u h λ β/2 0 Γ0 − 3 2 det(eij λδij ) = β/2 λ 0 = λ +β λ/4 = λ(λ β/2)(λ+β/2) = 0. λ1 = β/2, λ2 = β/2, λ3 = 0. Γ1 − − − − − ⇒ − 0 0 λ Ω −

: to be updatedWe get the eigen vectors from eij kj = λki:

: new values 1 1 : old values k¯1 = (1, 1, 0), k¯2 = ( 1, 1, 0), k¯3 = (0, 0, 1) i 1 √2 √2 − − iNow sketch the decomposition of the flow i + 1 j 1 1 1 − (βdy, 0, 0) = (βdy, βdx, 0) + (βdy, βdx, 0) j 2 − 2 j + 1 iteration direction x 1 1 1 y

0.5 0.5 0.5 n x 0 = 0 0 y +

i −0.5 −0.5 −0.5 j fine grid (1) −1 −1 −1 coarse grid (2) −1 0 1 −1 0 1 −1 0 1 PSfrag replacements

x, x1 y, x2 z, x3 u, u1 v, u2 w, u3 x1 x2 0 xi 0 ˆ ri xi , t u x 0, tˆ i i  P tˆ= 0  x u1 u2 > u1 x1 x2 x3 0 xi ui dtˆ 0 dxi dui dtˆ ri dtˆ dr dtˆ i  P 1 P2 x1 x2 x3 R3 R2 R1 r3 r2 r1 π 2 + dϕ12 V (t) S (t) V (t + ∆t) V (t) S (t−+ ∆t) u n V (t + ∆t) p T0, U0 Tw L T0 U0 Gradient fields wi ∂p ∂xi ui Divergence free vectorfields // to boundary L h x1 x2 p0 > p1 p1 u n dS u n∆t · x y u0 p0 η = y √4νt u u0 y = η√4νt t η y ω˜(η) u ω = · 0 z √πνt t L }δ ω 0 U≈ y→, v x, u L U δ u0 η = y √νx/u0 u f 0 = u0 Blasius profile

δ∗ x Separation point = Pressure force ⇐ x y l

uT x y dx dy dx dl = ( dx,−dy) n dl = ( dy, dx) − i 1, j + 1 − i, j + 1 i + 1, j + 1 c c0 b b0 i 1, j i +− 1, j i, j Aabcd d d0 a a0 i 1, j 1 − i, j − 1 i + 1, j − 1 − j i i + 1 ui,j vi,j pi,j pi,j vi,j+1/2 vi,j 1/2 − ui 1/2,j −i 1 − 2 i 1 i + 2 i + 1 3 i + 2 1 j + 2 j j 1 − 2 j 1 − A B C u 3 2 ,1 v 3 1, 2 p1,1B.2. EULER AND LAGRANGE COORDINATES 115

1Exercise 3 2 ia) Sketch the streamlines for the flow [u, v, w] = [αx, αy, 0], where α > 0. jStreamlines in parametric form (x(s), y(s), z(s)). We −have a 2D flow since w = 0. Inflow dx dy Solid wall = αx, = αy. n ds ds − Γ 0Integrate w.r.t. s, Γ1 αs αs x(s) = a e , y(s) = b e− . Ω M 2Then we see that, M x(s) y(s) = ab = c ( constant ). mWe have, m + 2 c c x(s) = , y(s) = 1 y(s) x(s) h Streamlines: V Vh dx dy x > 0, y > 0 > 0, < 0 u ⇒ ds ds u h dx dy Γ0 x < 0, y > 0 < 0, < 0 ⇒ ds ds Γ1 dx dy Ω x < 0, y < 0 < 0, > 0 : to be updated ⇒ ds ds : new values dx dy x > 0, y < 0 > 0, > 0 : old values ⇒ ds ds i 1 − dx(s) dy(s) iRemember that = αx and = αy. This gives the direction of the flow: ds ds − i + 1 j 1 1 − j j + 1 iteration direction 0.5 x y 0 n x y −0.5 i j fine grid (1) −1 coarse grid (2) −1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1

2 αt b) The concentration of a scalar is c(x, y, t) = βx ye− . Does this concentration change for a particular fluid particle in time?

Use the material time-derivative

Dc ∂c ∂c ∂c 2 αt αt 2 αt 2 αt = + u + v = αβx ye− + αx2βxye− αyβx e− = ( 1 + 2 1)βx ye− = 0. Dt ∂t ∂x ∂y − − − −

Thus the concentration c(x, y, t) is constant for a fluid particle.

c) Using the alternative (Lagrangian) description of the flow, show that

∂u¯ Du¯ = ∂tˆ Dt ˆ and write the concentration as c = c(x0, y0, t). 116 APPENDIX B. RECITATIONS 5C1214

Particle path: ∂x = u = αx x = x eαtˆ ∂tˆ ⇒ 0

∂y αtˆ = v = αy y = y e− ∂tˆ − ⇒ 0 ∂u ∂ ∂x = = α2x eαtˆ = α2x ∂tˆ ∂tˆ ∂tˆ 0

∂v ∂ ∂y 2 αtˆ 2 = = α y e− = α y ∂tˆ ∂tˆ ∂tˆ 0 Du ∂u ∂u ∂u = + u + v = α2x Dt ∂t ∂x ∂y Dv ∂v ∂v ∂v = + u + v = α2y Dt ∂t ∂x ∂y So we have ∂u¯ Du¯ = ∂tˆ Dt Both terms describe the acceleration of a fluid particle. Now rewrite the concentration

2 αtˆ 2 2αtˆ αtˆ αtˆ 2 ¯ ˆ c(x, y) = βx ye− = β x0e y0e− e− = βx0y0 = c(X) independent of t!

x2 y

The concentration foes not change as|w{ze follo} | w{za}fluid particle. B.3. REYNOLDS TRANSPORT THEOREM AND STRESS TENSOR 117

B.3 Reynolds transport theorem and stress tensor Exercise 1 a) Consider a fixed closed surface S in a fluid. Show that conservation of mass implies

∂ρ ∂ + (ρui) = 0. ∂t ∂xi

The change of mass in the volume is described by the contribution from the mass flux and the change in density and conservation means that this should be zero ∂ρ dV + ρu n dS = 0 ∂t i i ZV IS Using Gauss Theorem we can rewrite the surface integral ∂ ρu n dS = (ρu ) dV. i i ∂x i IS ZV i We have ∂ρ ∂ + (ρu ) dV = 0. { ∂t ∂x i } ZV i This must be true for an arbitrary volume and this implies ∂ρ ∂ + (ρui) = 0. ∂t ∂xi b) Show that this can be written Dρ ∂u + ρ i = 0, Dt ∂xi

∂ ∂ρ ∂ui ∂ρ ∂ui (ρui) = ui + ρ = ui + ρ ∂xi ∂xi ∂xi ∂xi ∂xi This gives ∂ρ ∂ρ ∂ui Dρ ∂ui + ui +ρ = + ρ ∂t ∂xi ∂xi Dt ∂xi Dρ | D{zt } c) Explain what the following means

∂u Dρ i = 0 = 0 ∂xi ⇒ Dt

If we are following a fluid particle, the density and volume are constant. But in a fix position, the density can change ∂ρ ∂ρ = ui ∂t − ∂xi Remember the decomposition of ∂ui in its invariant parts ∂xj

∂u 1 ∂u ∂u 1 ∂u 1 ∂u ∂u 1 ∂u i = i + j k δ + i j + k δ ∂x 2 ∂x ∂x − 3 ∂x ij 2 ∂x − ∂x 3 ∂x ij j  j i  k  j i  k deformation e¯ij rotation ξij volume change e¯ij . | {z } | {z } | {z } 118 APPENDIX B. RECITATIONS 5C1214

Exercise 2 a) Use Reynolds transport theorem to provide an alternative derivation of the conservation of mass equation ∂ρ ∂ + (ρui) = 0. ∂t ∂xi Reynolds Transport Theorem:

D ∂T ∂ T dV = ijk + (u T ) dV Dt ijk ∂t ∂x l ijk ZV (t) ZV (t) l 

Put Tijk = ρ, D ∂ρ ∂ ρ dV = + (ρu ) dV Dt ∂t ∂x i ZV (t) ZV (t) i  No flow through the surface. Valid for all V (t): ∂ρ ∂ + (ρui) = 0 ∂t ∂xi b) Use this result to show D DF ρF dV = ρ ijk dV Dt ijk Dt ZV (t) ZV (t) Put Tijk = ρFijk in Reynolds transport theorem

D ∂ ∂ ρF dV = (ρF ) + (u ρF ) dV = Dt ijk ∂t ijk ∂x l ijk ZV (t) ZV (t) l  ∂F ∂ρ ∂ ∂F ρ ijk + F + F (ρu ) + ρu ijk dV = ∂t ijk ∂t ijk ∂x l l ∂x ZV (t) l l  ∂ρ ∂ ∂F ∂F F + (ρu ) + ρ ijk + u ijk dV = ijk ∂t ∂x l ∂t l ∂x ZV (t)  l   l  DF =0 ijk = Dt | {z } DF | {z } ρ ijk dV Dt ZV (t) Exercise 3 Show that the stress tensor T = pδ for the flow ij − ij u¯ = ω¯ x,¯ × where ω¯ is constant.

Tensor notation: ui = εiklωkxl The stress tensor: ∂u ∂u T = pδ + µ i + j = ij − ij ∂x ∂x  j i  ∂ ∂ pδ + µ (ε ω x ) + (ε ω x ) = − ij ∂x ikl k l ∂x jkl k l  j i  ∂x ∂x pδ + µω ε l + ε l = − ij k ikl ∂x jkl ∂x  j i  pδ + µω (ε δ + ε δ ) = − ij k ikl lj jkl li pδ + µω (ε + ε ) = − ij k ikj jki pδ + µω ( ε + ε ) = pδ − ij k − ijk ijk − ij B.3. REYNOLDS TRANSPORT THEOREM AND STRESS TENSOR 119

The stress tensor Tij The equation for the stress tensor was deduced by Stokes in (1845) from three elementary hypotheses.

T = pδ + 2 µe ij − ij ij Writing this on the form, T = pδ + τ ij − ij ij the following statements should be true for the viscous stress tensor τij in a Newtonian fluid. ∂ui (i) each τij should be a linear combination of the velocity gradients . ∂xj (ii) each τij should vanish if the flow involves no deformation of fluid elements. ∂ui (iii) the relationship between τij and should be isotropic as the physical properties of the fluid ∂xj are assumed to show no preferred direction.

Exercise 4

If τij is a linear function of the components of eij then it can be written

τij = cijkl ekl

It can be shown that the most general fourth order isotropic tensor is of the form

cijkl = Aδij δkl + Bδikδjl + Cδilδjk where A, B and C are scalars. a) Use this to show that τij = λekkδij + 2µeij where λ and µ are scalars.

τij = cijkl ekl = (Aδij δkl + Bδikδjl + Cδilδjk)ekl = Aδij ekk + Beij + Ceji

Say that A = λ and that B = C = µ, then since eij = eji we have

τij = λekkδij + 2µeij

1 b) Show that if we have a Newtonian fluid where p = T then − 3 ii 2 ∂u ∂u ∂u T = p + µ k δ + µ i + j ij − 3 ∂x ij ∂x ∂x  k   j i  We have T = pδ + τ = pδ + λe δ + 2µe ij − ij ij − ij kk ij ij Then T = 3p + 3λe + 2µe = 3p + (3λ + 2µ)e ii − ii ii − ii 2 This gives λ = 3 µ, and thus − 2 T = p µe δ + 2µe ij − − 3 kk ij ij or 2 ∂u ∂u ∂u T = p + µ k δ + µ i + j ij − 3 ∂x ij ∂x ∂x  k   j i  PSfrag replacements

x, x1 y, x2 z, x3 u, u1 v, u2 w, u3 x1 x2 0 xi 0 ˆ ri xi , t u x 0, tˆ i i  P tˆ= 0  x u1 u2 > u1 x1 x2 x3 0 xi ui dtˆ 0 dxi dui dtˆ ri dtˆ dr dtˆ i  P 1 P2 x1 x2 x3 R3 R2 R1 r3 r2 r1 π 2 + dϕ12 V (t) S (t) V (t + ∆t) V (t) S (t−+ ∆t) u n V (t + ∆t) p T0, U0 Tw L T0 U0 Gradient fields wi ∂p ∂xi ui Divergence free vectorfields // to boundary L h x1 x2 p0 > p1 p1 u n dS u n∆t · x y u0 p0 η = y √4νt u u0 y = η√4νt t η y ω˜(η) u ω = · 0 z √πνt t L }δ

U y→, v x, u L U δ u0 η = y √νx/u0 u f 0 = u0 Blasius profile

δ∗ x Separation point = Pressure force ⇐ x y l

uT x y dx dy dx dl = ( dx,−dy) n dl = ( dy, dx) − i 1, j + 1 − i, j + 1 i + 1, j + 1 c c0 b b0 i 1, j i +− 1, j i, j Aabcd d d0 a a0 i 1, j 1 − i, j − 1 i + 1, j − 1 − j i i + 1 ui,j vi,j pi,j pi,j vi,j+1/2 vi,j 1/2 − ui 1/2,j −i 1 − 2 i 1 i + 2 i + 1 3 i + 2 1 j + 2 j j 1 − 2 j 1 − A B C u 3 2 ,1 v 3 1, 2 p1,1

1

i j Inflow Solid wall n Γ0 Γ1 Ω M 2 M m m + 2120 APPENDIX B. RECITATIONS 5C1214 1 h V B.4 Rankine vortex and dimensionless form Vh The Rankine vortex uhA simple model for a vortex is that it is a rigid body rotation within a core, and a decay of angular velocity Γ0outside. This can be described by Γ1 Ω ωr, r < a, : to be updated uθ = ωa2 ur = uz = 0  , r > a, : new values  r : old values i 1and is called a Rankine vortex.  − i i + 1 3 j 1 − j 2 j + 1 iteration direction 2

x 0 θ ≈

y u 1 ω n 1 x y 0 i 0 1 2 3 j r 0 fine grid (1) 0 1 2 3 coarse grid (2) r

Figure B.1: Velocity and vorticity in a Rankine vortex with ω = a = 1.

Exercise 1 a) Find the pressure inside and outside of a Rankine vortex:

We use Eulers equations for incompressible flow ( neglecting viscous effects ):

Du¯ 1 = p + g¯ Eulers equations Dt −ρ∇  u¯ = 0 ∇ · Du¯ ∂u¯ = +(u¯ )u¯ Dt ∂t · ∇ =0 We are working with cylindrical coordinates, use |{z}the appendix formulas ∂ u ∂ ∂ u¯ = u + θ + u · ∇ r ∂r r ∂θ z ∂z

u ∂ u ∂u u ∂e¯ u ∂u u2 (u¯ )u¯ = θ (u e¯ ) = θ θ e¯ + θ θ u = θ θ e¯ θ e¯ · ∇ r ∂θ θ θ r ∂θ θ r ∂θ θ r ∂θ θ − r r

= e¯r − ∂p 1 ∂p |{z}∂p p = e¯ + e¯ + e¯ ∇ ∂r r r ∂θ θ ∂z z Insert this into the Euler equations:

u ∂u u2 1 ∂p 1 ∂p ∂p θ θ e¯ θ e¯ = e¯ + e¯ + e¯ ge¯ r ∂θ θ − r r −ρ ∂r r r ∂θ θ ∂z z − z   =0 |{z} B.4. RANKINE VORTEX AND DIMENSIONLESS FORM 121

Look at the different components: u2 1 ∂p e¯ : θ = r − r −ρ ∂r 1 1 ∂p e¯ : 0 = p = p(r, z) only. θ −ρ r ∂θ ⇒ 1 ∂p e¯ : 0 = g z −ρ ∂z − Solve for the pressure when r < a:

1 ∂p r2 e¯ : ω2r = p = ρω2 + f(z) r − −ρ ∂r ⇒ 2 ∂p e¯ : = ρg f(z) = ρgz + C z ∂z − ⇒ − 1 So we have the pressure: r2 p(r, z) = ρω2 ρgz + C r < a 2 − 1 Solve for the pressure when r > a:

ω2a4 1 ∂p ρω2a4 e¯ : = p = + f(z) r − r3 −ρ ∂r ⇒ − 2 r2 ∂p e¯ : = ρg f(z) = ρgz + C z ∂z − ⇒ − 2 So we have the pressure: ρω2a4 p(r, z) = ρgz + C r > a − 2 r2 − 2 Now determine the difference between the constants by evaluation at r = a

ρω2a2 ρω2a2 ρgz + C = ρgz + C C C = ρω2a2 2 − 1 − 2 − 2 ⇒ 2 − 1 b) Determine the pressure difference ∆p between r = 0 and r → ∞ 2 2 ∆p = p p0 = ρgz + C2 ( ρgz + C1) = C2 C1 = ρω a ∞ − − − − − c) Now consider a free surface at atmospheric pressure p0. Find the difference in z between r = 0 and r → ∞ ρω2a2 2 2 r = 0 : p0 = 2 ρgz0 + C1 C2 C1 ω a ρω2−a2 z z0 = − = (r : p0 = ρgz + C2 ⇒ ∞ − ρg g → ∞ − 2 − ∞ Determine the shape of the free surface:

2 2 2 2 ρω r 2 ω r C1 p0 p0 = 2 ρgz + C1 r < a z r z = 2g + ρg− 2 −4 ∼ ⇒ 2 4 ρω a 1 ω a C2 p0 (p0 = 2 ρgz + C2 r > a z z = 2 + − − 2r − ∼ r ⇒ − 2gr ρg

Say that z = 0 at r = 0 then C1 = p0 and we get

ω2r2 z = r < a 2g and ω2a4 C C ω2a4 ω2a2 ω2a2 a2 z = + 2 − 1 = + = 1 r > a − 2gr2 ρg − 2gr2 g g − 2r2   So we have ω2r2 2g r < a z(r) = 2 2 2  ω a 1 a r > a. g − 2r2     PSfrag replacements

x, x1 y, x2 z, x3 u, u1 v, u2 w, u3 x1 x2 0 xi 0 ˆ ri xi , t u x 0, tˆ i i  P tˆ= 0  x u1 u2 > u1 x1 x2 x3 0 xi ui dtˆ 0 dxi dui dtˆ ri dtˆ dr dtˆ i  P 1 P2 x1 x2 x3 R3 R2 R1 r3 r2 r1 π 2 + dϕ12 V (t) S (t) V (t + ∆t) V (t) S (t−+ ∆t) u n V (t + ∆t) p T0, U0 Tw L T0 U0 Gradient fields wi ∂p ∂xi ui Divergence free vectorfields // to boundary L h x1 x2 p0 > p1 p1 u n dS u n∆t · x y u0 p0 η = y √4νt u u0 y = η√4νt t η y ω˜(η) u ω = · 0 z √πνt t L }δ ω 0 U≈ y→, v x, u L U δ u0 η = y √νx/u0 u f 0 = u0 Blasius profile

δ∗ x Separation point = Pressure force ⇐ x y l

uT x y dx dy dx dl = ( dx,−dy) n dl = ( dy, dx) − i 1, j + 1 − i, j + 1 i + 1, j + 1 c c0 b b0 i 1, j i +− 1, j i, j Aabcd d d0 a a0 i 1, j 1 − i, j − 1 i + 1, j − 1 − j i i + 1 ui,j vi,j pi,j pi,j vi,j+1/2 vi,j 1/2 − ui 1/2,j −i 1 − 2 i 1 i + 2 i + 1 3 i + 2 1 j + 2 j j 1 − 2 j 1 − A B C u 3 2 ,1 v 3 1, 2 p1,1

1

i j Inflow Solid wall n Γ0 Γ1 Ω M 2 M m m + 2 1 h V Vh u uh Γ0 Γ1 Ω : to be updated : new values : old values122 APPENDIX B. RECITATIONS 5C1214 i 1 − i 0.1 i + 1 j 1 0.09 − j 0.08 j + 1 0.07 iteration direction x 0.06

y z 0.05

0.04 n x 0.03 y 0.02 i j 0.01 fine grid (1) 0 0 0.5 1 1.5 2 2.5 3 coarse grid (2) r

Figure B.2: The free surface of a Rankine vortex with ω = a = 1 and g = 9.82.

ω2r2 2g r < a z(r) = 2 2 2  ω a 1 a r > a. g − 2r2     Exercise 2 Solving the 2D flow around a cylinder involves solving

∂u¯ 1 + (u¯ )u¯ = p + ν 2u,¯ u¯ = 0, ∂t · ∇ −ρ∇ ∇ ∇ ·

with the boundary conditions

u¯ = 0 on x2 + y2 = a2 u¯ (U, 0, 0) as x2 + y2 . → → ∞ Rewrite this problem in dimensionless form using the dimensionless variables

2 x¯0 = x¯/a u¯0 = u¯/U p0 = p/ρU t0 = tU/a.

∂ a ∂ Note that the scaling x¯0 = x¯/a implies 0 = a and t0 = tU/a gives = . ∇ ∇ ∂t0 U ∂t Change to dimensionless variables

2 2 2 U ∂u¯0 U ρU νU 2 + (u¯0 0)u¯0 = 0p0 + 2 0 u¯0 a ∂t0 a · ∇ − ρ a ∇ a ∇

Divide by U 2/a ν U ∂u¯0 a2 2 + (u¯0 0)u¯0 = 0p0 + 0 u¯0 ∂t · ∇ −∇ U 2 ∇ 0 a

1 Re U 2 |{z} Inertial forces U a The Reynolds number is Re = a = = ν U Viscous forces ν a2

∂u¯0 1 2 + (u¯0 0)u¯0 = 0p0 + 0 u¯0 ∂t0 · ∇ −∇ Re∇ The continuity condition

U u¯ = 0 0 u¯0 = 0 0 u¯0 = 0 ∇ · ⇒ a ∇ · ⇒ ∇ · B.4. RANKINE VORTEX AND DIMENSIONLESS FORM 123

The boundary conditions

2 2 2 2 2 2 2 2 2 2 u¯ = 0 on x + y = a Uu¯0 = 0 on a x0 + a y0 = a u¯0 = 0 on x0 + y0 = 1. ⇒ ⇒ 2 2 2 2 2 2 u¯ (U, 0, 0) as x + y Uu¯0 (U, 0, 0) as a x0 + a y0 → → ∞ ⇒ → → ∞ ⇒ 2 2 u¯0 (1, 0, 0) as x0 + y0 → → ∞

The solutions of this problem will depend on x¯0, Re and t0 only, and thus the solution of this problem is the same for a specific Re independently of the individual values of U, a and ν.

Exercise 3 Show that the net viscous force per unit volume is proportional to the spatial derivative of vorticity, i.e.

∂τij ∂ωk = µεijk ∂xj − ∂xj and discuss its implication for flows with uniform vorticity (as in solid-body rotation).

∂τ ∂ ∂u ∂u ∂2u ∂2u ∂2u ij = µ i + j = µ i + j = µ i ∂x ∂x ∂x ∂x ∂x ∂x ∂x ∂x ∂x ∂x j j  j i   j j j i  j j ∂ω ∂ ∂u ∂2u ∂2u µε k = µε ε m = µε ε m = µ(δ δ δ δ ) m = − ijk ∂x − ijk ∂x klm ∂x − kij klm ∂x x − il jm − im jl ∂x x j j  l  j l j l ∂2u ∂2u ∂2u µ j i = µ i − ∂x ∂x − ∂x ∂x ∂x ∂x  j i j j  j j Thus ∂τij ∂ωk = µεijk ∂xj − ∂xj The net viscous force vanishes when the vorticity is uniform, since no deformation exists. PSfrag replacements

x, x1 y, x2 z, x3 u, u1 v, u2 w, u3 x1 x2 0 xi 0 ˆ ri xi , t u x 0, tˆ i i  P tˆ= 0  x u1 u2 > u1 x1 x2 x3 0 xi ui dtˆ 0 dxi dui dtˆ ri dtˆ dr dtˆ i  P 1 P2 x1 x2 x3 R3 R2 R1 r3 r2 r1 π 2 + dϕ12 V (t) S (t) V (t + ∆t) V (t) S (t−+ ∆t) u n V (t + ∆t) p T0, U0 Tw L T0 U0 Gradient fields wi ∂p ∂xi ui Divergence free vectorfields // to boundary L h x1 x2 p0 > p1 p1 u n dS u n∆t · x y u0 p0 η = y √4νt u u0 y = η√4νt t η y ω˜(η) u ω = · 0 z √πνt t L }δ ω 0 U≈ y→, v x, u L U δ u0 η = y √νx/u0 u f 0 = u0 Blasius profile

δ∗ x Separation point = Pressure force ⇐ x y l

uT x y dx dy dx dl = ( dx,−dy) n dl = ( dy, dx) − i 1, j + 1 − i, j + 1 i + 1, j + 1 c c0 b b0 i 1, j i +− 1, j i, j Aabcd d d0 a a0 i 1, j 1 − i, j − 1 i + 1, j − 1 − j i i + 1 ui,j vi,j pi,j pi,j vi,j+1/2 vi,j 1/2 − ui 1/2,j −i 1 − 2 i 1 i + 2 i + 1 3 124 APPENDIX B. RECITATIONS 5C1214 i + 2 1 j + 2 jB.5 Exact solutions to Navier-Stokes j 1 − 2 j 1Exercise 1 − APlane Couette flow: BConsider the flow of a viscous fluid between two parallel plates at y = 0 and y = h. The upper plane is Cmoving with velocity U. Calculate the flow field. u 3 2 ,1 v1, 3 2 Assume the following: p1,1Steady flow: 0 ∂ = 0 1 ∂t 2Parallel flow: i ∂ui v = 0, = 0 j ∂x InflowTwo-dimensional flow: ∂ Solid wall w = 0, = 0 n ∂z Γ0No pressure gradient: Γ ∂p 1 = 0 Ω ∂xi M 2Navier–Stokes streamwise momentum equation: M ∂u 1 m + (u¯ )u = p + ν 2u m + 2 ∂t · ∇ −ρ∇ ∇ 1We have h ∂2u ∂u = 0 = A u = Ay + B V ∂y2 ⇒ ∂y ⇒ V hBoundary conditions: u u(0) = 0 B = 0, u(h) = U A = U/h uh ⇒ ⇒ Γ0So we get: Uy Γ1 u(y) = Ω h : to be updated : new valuesExercise 2 (i) : old valuesPlane Poiseuille flow: ( Channel flow ) i 1 − Consider the flow of a viscous fluid between two solid boundaries at y = h driven by a constant pressure igradient p = [ P, 0, 0]. Show that  i + 1 ∇ − j 1 P − u = (h2 y2), v = w = 0. j 2 µ − j + 1 iteration direction Y x y 1 n x y X i j Z fine grid (1) coarse grid (2)

Figure B.3: Coordinate system for plane Poiseuille flow

Navier–Stokes equations: ∂u¯ 1 + (u¯ )u¯ = p + ν 2u¯ ∂t · ∇ −ρ∇ ∇  u¯ = 0. ∇ ·  PSfrag replacements

x, x1 y, x2 z, x3 u, u1 v, u2 w, u3 x1 x2 0 xi 0 ˆ ri xi , t u x 0, tˆ i i  P tˆ= 0  x u1 u2 > u1 x1 x2 x3 0 xi ui dtˆ 0 dxi dui dtˆ ri dtˆ dr dtˆ i  P 1 P2 x1 x2 x3 R3 R2 R1 r3 r2 r1 π 2 + dϕ12 V (t) S (t) V (t + ∆t) V (t) S (t−+ ∆t) u n V (t + ∆t) p T0, U0 Tw L T0 U0 Gradient fields wi ∂p ∂xi ui Divergence free vectorfields // to boundary L h x1 x2 p0 > p1 p1 u n dS u n∆t · x y u0 p0 η = y √4νt u u0 y = η√4νt t η y ω˜(η) u ω = · 0 z √πνt t L }δ ω 0 U≈ y→, v x, u L U δ u0 η = y √νx/u0 u f 0 = u0 Blasius profile

δ∗ x Separation point = Pressure force ⇐ x y l

uT x y dx dy dx dl = ( dx,−dy) n dl = ( dy, dx) − i 1, j + 1 − i, j + 1 i + 1, j + 1 c c0 b b0 i 1, j i +− 1, j i, j Aabcd d d0 a a0 i 1, j 1 − i, j − 1 i + 1, j − 1 − j i i + 1 ui,j vi,j pi,j pi,j vi,j+1/2 vi,j 1/2 − ui 1/2,j −i 1 − 2 i 1 i + 2 i + 1B.5. EXACT SOLUTIONS TO NAVIER-STOKES 3 125 i + 2 j + 1 2 Boundary conditions: j j 1 u¯(y = h) = 0 − 2  j 1 ∂u¯ − We are considering a stationary flow and thus = 0. A• ∂t The constant pressure gradient implies u¯ = u¯(y). Changes of u¯ in x, z would require a changing pressure B• C gradient in x, z. u 3 ,1 ∂v 2 The continuity equation u¯ reduces to = 0. The boundary condition v(y = h) = 0 then implies v 3 1, 2 • ∇ · ∂y  v = 0. p1,1 Let’s study the z component of the Navier–Stokes equations: 0 1 ∂w ∂2w 2 v = ν w = c1y + c2 ∂y ∂y2 ⇒ i =0 j The boundary conditions w(y = |{z}h) = w(y = h) = 0 imply c = c = 0 and thus w = 0. Inflow − 1 2 Solid wall n We can conclude that u¯ = [u(y), 0, 0]. • Γ0 Γ1Let’s study the x component of the Navier–Stokes equations: Ω M 2 P ∂2u ∂u P P 0 = + ν = y + d µ = ρν u(y) = y2 + d y + d M ρ ∂y2 ⇒ ∂y −νρ 1 { } ⇒ −2 µ 1 2 m The boundary conditions at y = h give m + 2  1 P P h 0 = h2 + d h + d and 0 = h2 d h + d −2 µ 1 2 −2 µ − 1 2 V Vh P We can directly conclude that d = 0 and this gives d = h2 and thus u 1 2 2 µ uh Γ0 P u = (h2 y2), v = w = 0. Γ1 2 µ − Ω : to be updated Exercise 2 (ii) : new values : old valuesPoiseuille flow: ( Pipe flow ) i 1Consider the viscous flow of a fluid down a pipe with a cross-section given by r = a under the constant − i ∂p pressure gradient P = . Show that i + 1 −∂z j 1 − j P 2 2 uz = (a r ) ur = uθ = 0. j + 1 4µ − iteration direction x y R 1 n x y i Z j fine grid (1) coarse grid (2)

Figure B.4: Coordinate system for Poiseuille flow

Use the Navier–Stokes equations in cylindrical coordinates

∂u u2 1 ∂p u 2 ∂u r + (u¯ )u θ = + ν 2u r θ ∂t · ∇ r − r −ρ ∂r ∇ r − r2 − r2 ∂θ   126 APPENDIX B. RECITATIONS 5C1214

∂u u u 1 ∂p 2 ∂u u θ + (u¯ )u + r θ = + ν 2u + r θ ∂t · ∇ θ r −ρ r ∂θ ∇ θ r2 ∂θ − r2   ∂u 1 ∂p z + (u¯ )u = + ν 2u ∂t · ∇ z −ρ ∂z ∇ z 1 ∂ 1 ∂u ∂u (r u ) + θ + z = 0. r ∂r r r ∂θ ∂z ∂p ∂p We know that = 0 and = 0 and can directly see that u = u = 0 satisfy the two first equations. ∂θ ∂r r θ From the continuity equation we get ∂u z = 0 u = u (r, θ) only. ∂z ⇒ z z Considering a steady flow we get from the Navier–Stokes equations ∂u ∂u 1 (u¯ )u = u z u z = P + ν 2u · ∇ z z ∂z ⇒ z ∂z ρ ∇ z ∂u But we know that z = 0 from the continuity equation. We get ∂z 1 ∂ ∂u P ∂ ∂u P 2u = (r z ) = (r z ) = r ∇ z r ∂r ∂r − µ ⇒ ∂r ∂r − µ Integrate ∂u P ∂u P c r z = r2 + c z = r + 1 ∂r −2 µ 1 ⇒ ∂r −2 µ r Integrating again we get P u = r2 + c ln(r) + c using the boundary conditions u (r = 0) < c = 0 z −4 µ 1 2 z ∞ ⇒ 1

P a2 We also have u = 0 at r = a and this gives c = and we have z 2 4 µ P u = (a2 r2) z 4 µ −

Exercise 3 Calculate the asymptotic suction boundary layer, where the boundary layer over a flat plate is kept parallel of a steady suction V0 through the plate.

Assumptions. Two-dimensional flow: ∂ = 0, w = 0 ∂z Parallel flow: ∂ = 0, Continuity satisfied ∂x Steady flow: ∂ = 0 ∂t Momentum equations: ∂u ∂u ∂u 1 ∂p ∂2u ∂2u + u + v = + ν + ∂t ∂x ∂y −ρ ∂x ∂x2 ∂y2   ∂v ∂v ∂v 1 ∂p ∂2v ∂2v + u + v = + ν + ∂t ∂x ∂y −ρ ∂y ∂x2 ∂y2   Normal momentum equation gives ∂p = 0 ∂y B.5. EXACT SOLUTIONS TO NAVIER-STOKES 127

Boundary conditions: y = 0 : u = 0, v = V − 0 y : u U → ∞ → ∞ Continuity gives ∂u ∂v + = 0 v = V ∂x ∂y ⇒ − 0 Streamwise momentum equation at y → ∞ ∂U 1 ∂p ∂2U V ∞ = + ν ∞ − 0 ∂y −ρ ∂x ∂y2

∂p = 0 ⇒ ∂x Resulting streamwise momentum equation

∂u ∂2u ∂2u V ∂u V = ν = 0 − 0 ∂y ∂y2 ⇒ ∂y2 − ν ∂y

Characteristic equation V V λ2 = 0 λ λ = 0, λ = 0 − ν ⇒ 1 2 − ν V y/ν u(y) = A + Be− 0

Exercise 4 Two incompressible viscous fluids flow one on top of the other down an inclined plane at an angle α. They both have the same density ρ and the viscosities µ1 and µ2. The lower fluid has depth h1 and the upper h2. Assuming that viscous forces from the surrounding air is negligible and that the pressure on the free surface is constant, show that 1 2 g sin(α) u1(y) = [(h1 + h2)y y ] . − 2 ν1

Make the ansatz u¯1 = [u1(y), 0, 0] and u¯2 = [u2(y), 0, 0]. The continuity equation

∂u ∂v ∂v + = 0 gives = 0 v = c and the boundary condition at y = 0 gives v = 0. ∂x ∂y ∂y ⇒

Layer 1: • 1 ∂p N–S e¯ : 0 = 1 g cos(α) p = ρg cos(α)y + f (x) · y −ρ ∂y − ⇒ 1 − 1 2 1 0 d u 0 N–S e¯ : 0 = f (x) + ν 1 + g sin(α) f (x) = c · x −ρ 1 1 dy2 ⇒ 1 1 Layer 2: • 1 ∂p N–S e¯ : 0 = 2 g cos(α) p = ρg cos(α)y + f (x) · y −ρ ∂y − ⇒ 2 − 2 2 1 0 d u 0 N–S e¯ : 0 = f (x) + ν 2 + g sin(α) f (x) = c · x −ρ 2 2 dy2 ⇒ 2 2

The pressure at the free surface y = h1 + h2 is p0:

0 p = ρg cos(α)(h + h ) + f (x) f = p + ρg(h + h ) cos(α) f = 0 0 − 1 2 2 ⇒ 2 0 1 2 ⇒ 2

The pressure is continuous at y = h1:

0 p + ρgh cos(α) = ρgh cos(α) + f (x) f = p + ρg(h + h ) cos(α) f = 0 0 2 − 1 1 ⇒ 1 0 1 2 ⇒ 1 This gives the pressure:

p (y) = p (y) = p(y) = ρ g cos(α)y + p + ρ g cos(α)(h + h ) 1 2 − 0 1 2 128 APPENDIX B. RECITATIONS 5C1214

We now have two momentum equations in x:

d2u 0 = ν 1 + g sin(α) (1) 1 dy2

d2u 0 = ν 2 + g sin(α) (2) 2 dy2 And four boundary conditions:

BC1: No slip on the plane: u1(0) = 0 du BC2: No viscous forces on the free surface: µ 2 = 0 2 dy |y=h1+h2 du du BC3: Force balance at the fluid interface: µ 1 = µ 2 1 dy |y=h1 2 dy |y=h1 BC4: Continous velocity at the interface: u = u 1|y=h1 2|y=h1 du1 g g 2 (1) = y sin(α) + c11 u1 = y sin(α) + c11y + c12 ⇒ dy −ν1 ⇒ −2 ν1

du2 g g 2 (2) = y sin(α) + c21 u2 = y sin(α) + c21y + c22 ⇒ dy −ν2 ⇒ −2 ν2 BC1 c = 0 ⇒ 12 g g BC2 µ2( (h1 + h2) sin(α) + c21) = 0 c21 = (h1 + h2) sin(α) ⇒ −ν2 ⇒ ν2 g g µ2 g BC3 µ1( y sin(α)+c11) = µ2( y sin(α)+c21) µ = νρ c11 = c21 = (h1 +h2) sin(α) ⇒ −ν1 −ν2 { } ⇒ µ1 ν1

g 2 g g 2 g BC4 h1 sin(α) + (h1 + h2) sin(α)h1 = h1 sin(α) + (h1 + h2) sin(α)h1 + c22 ⇒ −2 ν1 ν1 −2 ν2 ν2 h2 1 1 c = g sin(α) 1 (h + h )h ⇒ 22 2 − 1 2 1 ν − ν   2 1  This gives us the velocities,

g 2 g g sin(α) 1 2 u1(y) = y sin(α) + (h1 + h2) sin(α)y = [(h1 + h2)y y ] −2 ν1 ν1 ν1 − 2 g sin(α) g sin(α) h2 1 1 u (y) = y2 + (h + h )y + g sin(α) 1 (h + h )h 2 − 2 ν ν 1 2 2 − 1 2 1 ν − ν 2 2   2 1  g sin(α) 1 h2 1 1 = ((h + h )y y2) + g sin(α) 1 (h + h )h ν 1 2 − 2 2 − 1 2 1 ν − ν 2   2 1  The velocity in layer 1 does depend on h2 but not on the viscosity in layer 2. This is due to that the depth is important for the tangential stress boundary condition at the interface but the viscosity is not. There is no acceleration of the upper layer and thus the tangential stress must be equal to the gravitational force on the upper layer which depends on h2 but not on ν2. B.6. MORE EXACT SOLUTIONS TO NAVIER-STOKES 129

B.6 More exact solutions to Navier-Stokes Exercise 1 Oscillating Rayleigh–Stokes flow (or Stokes second problem). a) Show that the velocity field u¯ = [u(y, t), 0, 0] satisfies the equation

∂u ∂2u = ν ∂t ∂y2

Consider the Navier–Stokes equation in the x direction:

∂u ∂u ∂u ∂u 1 ∂p ∂2u ∂2u ∂2u + u + v + w = + ν + + ∂t ∂x ∂y ∂z −ρ ∂x ∂x2 ∂y2 ∂z2   With the current velocity field only terms with y derivatives will remain since there can be no change in the other directions. Further more, the streamwise pressure gradient has to be zero since the streamwise velocity far from the wall is constant, namely zero.

∂u ∂2u = ν ∂t ∂y2 b) Show that the velocity field is

ky ω u(y, t) = Ue− cos(ky ωt), where k = − 2ν r

Make the ansatz: u = f(y)eiω t = f(y) cos(ω t). < Insert into the equation:  iω t iωt iωf(y)e = νf 00(y)e

iω λy f 00(y) f(y) = 0 with f(y) = e gives − ν iω iω ω 1 + i λ2 = 0 λ = = − ν ⇒  ν  ν √ r r  2  ω Introduce k = , 2ν r yk(1+i) yk(1+i) f(y) = Ae + Be− , f(y) 0 as y A = 0 → → ∞ → PSfrag replacements

x, x1 y, x2 z, x3 u, u1 v, u2 w, u3 x1 x2 0 xi 0 ˆ ri xi , t u x 0, tˆ i i  P tˆ= 0  x u1 u2 > u1 x1 x2 x3 0 xi ui dtˆ 0 dxi dui dtˆ ri dtˆ dr dtˆ i  P 1 P2 x1 x2 x3 R3 PSfrag replacemenRts2 x,Rx1 y, xr23 z, xr23 u, ur1 π 2 + dvϕ, u122 wV,(ut3) S (xt1) V (t + ∆t) V (xt2) − 0 S (t + ∆xti) 0 ˆ ri xi , tu u x 0, tˆ i i n VP(t tˆ+=∆0t) p x T0, U0 u1 T u2 > uw1 xL1 T x20 U x30 0 Gradient fieldsxi w ui dtˆi ∂p0 d∂xxii dui dutˆi Divergence free vectorfields // to boundaryri dtˆ dr dtˆL i  Ph1 x P12 x x12 p > p 0 x21 p x13 Ru3 Rn2 dRS1 u n∆3t · r rx2 ry1 π u 2 + dϕ120 V (pt0) η = y S√4(νtt) u V (t + ∆t) V (ut0) yS=(t−η+√∆4νt)t ut nη V (t + ∆ty) ω˜(η) u ω = · 0p z √πνt T , U 0 0t T Lw }Lδ T ω 0 U U≈ 0 Gradient fieldsy→, v wi x,∂pu ∂xLi uUi Divergence free vectorfields // to boundaryδ uL0 y η = h √νx/u0 xu1 f 0 = u x0 Blasius profile2 p0 > p1 δ∗ p1 x Separation poinut n = Pressure force dS ⇐ x u n∆yt · x yl uT u x0 p0 η = y y √4νt dux duy0 √ y = η 4dνxt dl = ( dx,−dy)t n dl = ( dy, dxη) − i 1, j + y1 ω˜(η) u ω −= · 0 z i,√jπ+νt1 i + 1, j + 1t Lc }cδ0 ω 0b ≈ U b0 i y1→,,vj − i +x,1,uj i,Lj AabcdU dδ ud00 y η = a √νx/u0 u f 0 = a0 i 1, j u01 Blasius profile − i, j − 1 i + 1, j −δ1∗ − xj Separation point i = Pressure force ⇐ i + 1 u x i,jy vi,j l pi,j uT pi,j v x i,j+1/y2 vi,j 1/2 − dx ui 1/2,j −i dy1 −dx2 dl = ( dx,−dy)i i + 1 n dl = ( dy, dx2) −i + 1 i 1, j + 31 − i + 2 i,jj ++ 1 i + 1, j + 21 j j 1c − 2 j c10 − b A b0 i 1,Bj i +− 1,Cj u 3 ,1 i,2 j v 3 1, 2 Aabcd p1,1 d d 10 a a0 i 1, j 1i j − i, j − 1 i + 1Inflo, j −w1 Solid w−allj n Γi i + 10 Γ1 ui,j vi,jΩ M 2 pi,j M pi,j vi,j+1/m2 m + 2130 APPENDIX B. RECITATIONS 5C1214 vi,j 1/2 − ui 1/2,j1 − h1 We have i 2 −V i yk(1+i) iwt ky i(ωt ky) ky ky i +Vh1 u = Be− e = Be− e − = Be− cos(ωt ky) = Be− cos(ky ωt) 2 < < − − i + u1     u3h i + 2 Boundary condition at y = 0 Γ10 j + 2 Γ1 At y = 0 we have u = U cos(ωt) B = U j ⇒ j Ω1 : to be updated− 2 So we have j 1 ω : new values− ky A u(y, t) = Ue− cos(ky ωt), where k = : old values − 2ν B r i 1 −C u 3 i 5 2 ,1 iv+1, 13 j 12 4.5 p−1,1 j 4 j + 1 1 3.5 iteration direction x 3 yi j y 2.5 Inflow n 2 Solid wall 1.5 n Γ0 1 i Γ1 j 0.5 fine grid (1)Ω 2 0 M −1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1 coarse grid (2) x M m c) How thick is the boundary layer thickness? m + 2 1 hIf we define the thickness δ of the oscillating layer as the position where u/U = 0.01 we get that V kδ 2ν ν Vh e− = 0.01 kδ 4.6 δ 4.6 δ 6.5 ⇒ ≈ ⇒ ≈ ω ⇒ ≈ ω u r r uhd) Consider instead the oscillating flow U = U cos(ωt) over a stationary wall. This will simply result in a Γ0change of frame of reference to one following∞ the plate instead. If we consider the solution to the previous Γ1problem and look at it in this new frame of reference we get Ω : to be updated ky ω u(y, t) = U cos(ωt) Ue− cos(ky ωt), where k = : new values − − 2ν : old values r i 1The solution now looks like this − i 5 i + 1 j 1 4.5 − j 4 j + 1 3.5 iteration direction x 3 y

y 2.5

n 2

1.5 1 i j 0.5 fine grid (1) 0 −1.5 −1 −0.5 0 0.5 1 1.5 coarse grid (2) x B.6. MORE EXACT SOLUTIONS TO NAVIER-STOKES 131

Exercise 2

Consider a long hollow cylinder with inner radius r1 and a concentric rod with radiusr0 inside it. The rod is moving axially with velocity U0. a) Find the velocity field of a viscous fluid occupying the space between the rod and the cylinder.

Assumptions Steady flow: ∂ = 0 ∂t Parallel flow and symmetry: ∂ ∂ u = u (r)e , = 0, = 0 z z ∂z ∂θ No streamwise pressure gradient: ∂p = 0 ∂z

We can directly see that ur = uθ = 0 satisfy the two first equations. The streamwise momentum equation reduces to (u )u = ν 2u · ∇ z ∇ z where ∂u u ∂u ∂u (u )u = u z + θ z + u z = 0 · ∇ z r ∂r r ∂θ z ∂z 1 ∂ ∂u 1 ∂2u ∂2u 1 ∂ ∂u 2u = r z + z + z = r z ∇ z r ∂r ∂r r2 ∂θ2 ∂z2 r ∂r ∂r     We end up with ∂ ∂u r z = 0 ∂r ∂r   Integrate twice ∂u r z = A u = A ln r + B ∂r ⇒ z Boundary conditions

uz(r0) = U0 = A ln r0 + B uz(r1) = 0 = A ln r1 + B B = A ln r1 ⇒  ⇒ −

U0 U0 = A(ln r0 ln r1) A = − ⇒ ln r0 r1 ln r U0 U0 r1 uz(r) = ln r ln r1 = U0 ln r0 − ln r0 ln r0 r1 r1 r1 b) With what force does one have to pull a rod with length L? Neglect end effects.

Shear stress ∂uz µU0 τrz = µ = ∂r r ln r0 r1 Force 2πLµU0 F = 2πr0Lτrz(r0) = ln r0 r1 132 APPENDIX B. RECITATIONS 5C1214

B.7 Axisymmetric flow and irrotational vortices Axisymmetric flow Consider incompressible and rotationally symmetric flow with no mass source at the symmetry axis. The velocity component in the direction of the axis of symmetry and the vorticity is given.

uz = γ z and ω¯ = ω(r) e¯z.

1) Compute ur(r, z) and uθ(r, z) for the two cases when

r2/a2 a) ω(r) = 0 and b) ω(r) = ω0 e− .

The vorticity is given, e¯ re¯ e¯ 1 r θ z ω¯ = u¯ = ∂ ∂ ∂ ∇ × r ∂r ∂θ ∂z u r u u r θ z

Look at the different components:

1 ∂u ∂u e¯ : z θ = ω¯ e¯ = 0 u = u (r) r r ∂θ − ∂z · r ⇒ θ θ ∂u ∂u e¯ : r z = ω¯ e¯ = 0 u = u (r) θ ∂z − ∂r · θ ⇒ r r 1 ∂(r u ) ∂u e¯ : θ r = ω¯ e¯ = ω(r) z r ∂r − ∂θ · z   ∂ The rotational symmetry implies = 0. From the e¯ component we get, ∂θ z ∂ (r u ) = r ω(r) (B.1) ∂r θ We also have the incompressibility condition: 1 ∂ 1 ∂u ∂u u¯ = (ru ) + θ + z = 0 ∇ · r ∂r r r ∂θ ∂z =0 γ

From this we get, |{z} |{z} ∂ (ru ) = rγ (B.2) ∂r r − Equation (2) is valid both for case a) and b). Case a) ω(r) = 0

∂ A (1) (r u ) = 0 u = ⇒ ∂r θ ⇒ θ r ∂ r2γ (2) (ru ) = rγ integrate the rhs ru = + B ⇒ ∂r r − ⇒ r − 2 γ r B u = + ⇒ r − 2 r There should be no mass source at r = 0. The mass flow is,

2π γ r2 Q = u r dθ = 2π B 2π . r − 2 Z0 When r 0 then Q 2π B which gives B = 0. → → γ r u = for both a) and b)! r − 2 B.7. AXISYMMETRIC FLOW AND IRROTATIONAL VORTICES 133

The circulation Γ is, 2π Γ Γ = u r dθ = 2πA A = θ ⇒ 2π Z0 r2/a2 Case b) ω(r) = ω0 e− , ∂ r2/a2 (1) (r u ) = r ω e− ⇒ ∂r θ 0 Integrate the right hand side:

2 2 ω0 a r2/a2 ω0 a r2/a2 C r u = e− + C u = e− + θ − 2 ⇒ θ − 2r r Look at the circulation, 2π 2 ω0 a r2/a2 Γ(r) = u r dθ = 2π( e− + C) θ − 2 Z0 ω a2 Γ ω a2 for r = 0 we get Γ = 2π( 0 + C) C = 0 + 0 ⇒ 0 − 2 ⇒ 2π 2 This gives 2 Γ0 ω0 a r2/a2 u = + + 1 e− θ 2πr 2r −   c) Consider circles C(t) following the flow with a radius R(t) and position Z(t). Compute R(t) and Z(t). Can any of the flow cases be inviscid?

R(0) = R0 Z(0) = Z0

dR 1 1 γ t = u (R) = γR R(t) = R e− 2 dt r −2 ⇒ 0 dZ = u (Z) = γZ Z(t) = Z eγ t dt z ⇒ 0 The circulation is then,

2π Γ a)

Γ(t) = uθ(R)R dθ = 2πRuθ(R) = 2 R2/a2 Γ + πω a 1 e− b) Z0 0 0 −    The circulation is constant for a) but not for b). This means that the flow in a) can be inviscid. 134 APPENDIX B. RECITATIONS 5C1214

Inviscid and irrotational vortices

Consider a circular flow with u¯ = uθ(r)e¯θ. Which vortices are inviscid and which vortices are irrotational?

The Navier–Stokes equation for uθ

∂u 1 1 ∂ ∂u u θ = + ν r θ θ ∂t −ρ r r ∂r ∂r − r2     For inviscid flow we require, 1 ∂ ∂u u r θ θ = 0 r ∂r ∂r − r2   n Make the ansatz uθ = r ,

1 ∂ n 1 n 2 1 2 n 1 n 2 2 (rnr − ) r − = n r − r − n 1 = 0 n = 1 r ∂r − r − → − ⇒  We get the inviscid flow, B u (r) = Ar + θ r solid body rotation irrotational |{z} The vorticity is, |{z} 1 ∂ ω¯ = u¯ = A.32 = (ru ) e¯ ∇ × { } r ∂r θ z ∂ C ω¯ = 0 (ru ) = 0 u = ⇒ ∂r θ ⇒ θ r Conclusion: Irrotational inviscid Inviscid ; irrotational⇒ B.7. AXISYMMETRIC FLOW AND IRROTATIONAL VORTICES 135

Exercise 3 Show that the inviscid vorticity equation Dω¯ = (ω¯ )u¯ Dt · ∇ reduces to the equation D ω = 0 Dt r   in the case of axisymmetric flow: u¯ = ur(r, z, t)e¯r + uz(r, z, t)e¯z The vorticity in an axisymmetric flow

∂u ∂u ω¯ = u¯ = r z e¯ = ωe¯ ∇ × ∂z − ∂r θ θ   ω Study the right hand side of the inviscid vorticit|y equation{z }

ω ∂ ω ∂ (ω¯ ) = (ω¯ )u¯ = u (r, z, t)e¯ + u (r, z, t)e¯ = · ∇ r ∂θ ⇒ · ∇ r ∂θ r r z z   ω ∂u ω ∂e¯ ω ∂u ω ∂e¯ ω r e¯ + u r + z e¯ + u z = u e¯ r ∂θ r r r ∂θ r ∂θ z r z ∂θ r r θ

=0 =e¯θ =0 =0 The left hand side of the inviscid|{z} vorticity equation|{z} |giv{z}es |{z} Dω¯ ∂ω¯ ∂ω ∂ ∂ = + (u¯ )ω¯ = ω¯ = ωe¯ = + u + u ω e¯ Dt ∂t · ∇ { θ} ∂t r ∂r z ∂z θ     This gives that the inviscid vorticity equation now is

∂ω ∂ ∂ ω + u + u ω = u ∂t r ∂r z ∂z r r   1 Multiply by r ∂ ω 1 ∂ ∂ ω + u + u ω u = 0 ∂t r r r ∂r z ∂z − r2 r     Notice that ω ∂ 1 ∂ 1 u = ωu and that ωu = 0 −r2 r r ∂r r z ∂z r This means we can write ∂ ω 1 ∂ ∂ ∂ ∂ 1 + u + u ω + ω u + u = 0 ∂t r r r ∂r z ∂z r ∂r z ∂z r       And thus we have ∂ ω 1 ∂ ∂ ω D ω + u + u = = 0 ∂t r r r ∂r z ∂z r Dt r       136 APPENDIX B. RECITATIONS 5C1214

B.8 Vorticity equation, Bernoulli equation and streamfunction Solid body rotation Consider the flow in a uniformly rotating bucket with velocity

u = (ωr, 0, 0) a) Use Bernoulli equation to determine the free surface: What is wrong? Bernoulli: p 1 + u 2 + gz = C along streamlines ρ 2| | This gives the surface of constant pressure

C p ω2r2 z = − 0 ρg − 2g The free surface is highest in the center of the bucket, something is wrong. Bernoulli theorem is valid along a streamline in a steady ideal fluid. If the flow had been irrotational, it would have been valid everywhere. But now u¯ = (0, 0, 2ω). ∇ × b) Use Euler equation to determine the free surface:

Du 1 = p + g Dt −ρ∇ this gives u2 1 ∂p ∂p 1 e : θ = = ρω2r p = ρω2r2 + f(z) r − r −ρ ∂r ⇒ ∂r ⇒ 2 1 ∂p ∂p e : 0 = = 0 θ −ρr ∂θ ⇒ ∂θ 1 ∂p ∂f e : 0 = g = ρg f = ρgz + p z −ρ ∂z − ⇒ ∂z − ⇒ 0 Thus 1 p(r, z) = ρω2r2 ρgz + p 2 − 0

This gives the free surface where p = p0 ω2r2 z = 2g

Flow over a hill (Exam 20020527 question 2) A hill with the height h has the shape of a half circular cylinder as shown in Figure 1. Far from the hill the wind U is blowing parallel to the ground in the x-direction and the atmospheric pressure at the ground ∞ is p0. a) (5) Assume potential flow and show that the stream function in cylindrical coordinates is of the form

ψ = f(r) sin θ, where f(r) is an arbitrary function. Calculate the velocity field above the hill. b) (3) Derive an equation for the curve with constant vertical wind velocity V . c) (2) Assume that the density ρ and the gravitational acceleration g is constant. Calculate the atmospheric pressure at the top of the hill. a) The stream function satisfies continuity:

1 ∂ψ ∂ψ u = , u = r r ∂θ θ − ∂r The flow is irrotational: ∂ψ ∂2ψ 1 ∂2ψ u¯ = 0 + r + = 0 (1) ∇ × ⇒ ∂r ∂r2 r ∂θ2 PSfrag replacements

x, x1 y, x2 z, x3 u, u1 v, u2 w, u3 x1 x2 0 xi 0 ˆ ri xi , t u x 0, tˆ i i  P tˆ= 0  x u1 u2 > u1 x1 x2 x3 0 xi ui dtˆ 0 dxi dui dtˆ ri dtˆ dr dtˆ i  P 1 P2 x1 x2 x3 R3 R2 R1 r3 r2 r1 π 2 + dϕ12 V (t) S (t) V (t + ∆t) V (t) S (t−+ ∆t) u n V (t + ∆t) p T0, U0 Tw L T0 U0 Gradient fields wi ∂p ∂xi ui Divergence free vectorfields // to boundary L h x1 x2 p0 > p1 p1 u n dS u n∆t · x y u0 p0 η = y √4νt u u0 y = η√4νt t η y ω˜(η) u ω = · 0 z √πνt t L }δ ω 0 U≈ y→, v x, u L U δ u0 η = y √νx/u0 u f 0 = u0 Blasius profile

δ∗ x Separation point = Pressure force ⇐ x y l

uT x y dx dy dx dl = ( dx,−dy) n dl = ( dy, dx) − i 1, j + 1 − i, j + 1 i + 1, j + 1 c c0 b b0 i 1, j i +− 1, j i, j Aabcd d d0 a a0 i 1, j 1 − i, j − 1 i + 1, j − 1 − j i i + 1 ui,j vi,j pi,j pi,j vi,j+1/2 vi,j 1/2 − ui 1/2,j −i 1 − 2 i 1 i + 2 i + 1 3 i + 2 1 j + 2 j j 1 − 2 j 1 − A B C u 3 2 ,1 v 3 1, 2 p1,1 0 1 2 i j Inflow Solid wall n Γ0 Γ1 Ω M 2 M m m + 2 1 h V Vh u uh Γ0 Γ1 Ω : to be updated : new values : old values i 1 − i i + 1 j 1 − jB.8. VORTICITY EQUATION, BERNOULLI EQUATION AND STREAMFUNCTION 137 j + 1 iteration direction y x y 1 n x y i j fine grid (1) coarse grid (2) x

Figure B.5: Streamlines above a hill with h = 100m and U = 5m/s. A paraglider pilot with a sink of 1m/s will find lift in the area within the dotted line, while soaring∞ along the hill.

Introduce the ansatz ψ = f(r) sin θ into equation (1): 1 f 0 sin θ + rf 00 sin θ f sin θ = 0 − r ⇒ 1 f 0 + rf 00 f = 0 − r Make the ansatz f = rn: n 1 n 2 1 n nr − + rn(n 1)r − r = 0 − − r ⇒ n + n2 n 1 = 0 n = 1 − − ⇒  So we have B ψ = Ar + sin θ r   We need two boundary conditions. 1. Free stream: Ar sin θ = U r sin θ A = U ∞ ⇒ ∞ 2. Streamline on the hill surface: B U h + = 0 B = U h2 ∞ h ⇒ − ∞ So we have: h2 ψ = U r sin θ ∞ − r   Now we can calculate the velocity field above the hill:

1 ∂ψ h2 ur = = U 1 cos θ r ∂θ ∞ − r2   ∂ψ h2 uθ = = U 1 + sin θ − ∂r − ∞ r2   b) Constant vertical wind velocity is described by:

h2 h2 h2 V = ur sin θ + uθ cos θ = U 1 cos θ sin θ U 1 + sin θ cos θ = 2U sin θ cos θ ∞ − r2 − ∞ r2 − ∞ r2 ⇒     U r = h 2 ∞ sin θ cos θ r− V c) Use Bernoulli equation with free stream pressure p0 at the ground:

1 2 1 2 3 2 po + ρU = p + ρ(2U ) + ρgh p = po ρU ρgh 2 ∞ 2 ∞ ⇒ − 2 ∞ − 138 APPENDIX B. RECITATIONS 5C1214

Stokes stream function:

Consider a 2D incompressible flow ∂u ∂v u¯ = 0 or + = 0. ∇ · ∂x ∂y Define the stream function Ψ such that: ∂Ψ ∂Ψ u = v = ∂y − ∂x This means ∂u ∂v ∂2Ψ ∂2Ψ + = = 0, ∂x ∂y ∂x∂y − ∂y∂x so continuity is fulfilled. Now we can write

e¯ e¯ e¯ x y z ∂Ψ ∂Ψ u¯ = Ψe¯ = ∂ ∂ ∂ = , , 0 ∇ × z ∂x ∂y ∂z ∂y − ∂x 0 0 Ψ  

And e¯ e¯ e¯ x y z ∂Ψ ∂2Ψ ω¯ = u¯ = ∂ ∂ ∂ = 0, 0, = 2Ψe¯ ∇ × ∂x ∂y ∂z −∂x2 − ∂y2 −∇ z ∂Ψ ∂Ψ 0   ∂y − ∂x

Irrotational flow

2Ψ = 0 ∇ In spherical coordinates for axisymmetrical flow, define Ψ 1 ∂Ψ 1 ∂Ψ u = u = r r2 sin θ ∂θ θ −r sin θ ∂r Incompressibility is still valid u¯ = 0 ∇ · Velocity Ψ u¯ = e¯ ∇ × r sin θ θ Vorticity 1 ∂2Ψ sin θ ∂ 1 ∂Ψ ω¯ = + −r sin θ ∂r2 r2 ∂θ sin θ ∂θ    Irrotational ∂2Ψ sin θ ∂ 1 ∂Ψ + = 0 ∂r2 r2 ∂θ sin θ ∂θ   B.8. VORTICITY EQUATION, BERNOULLI EQUATION AND STREAMFUNCTION 139

Flow around a sphere Consider a sphere with Ψ = 0 at r = a, compute the irrotational velocity distribution when the velocity of the freestream at infinity is U: 1 r Ψ Ur2 sin2 θ → ∞ → 2 u U cos θ u U sin θ ⇒ r → θ → − Make the ansatz: Ψ = f(r) sin2 θ For an irrotational flow we get 2 2 B f 00 f = 0 f = Ar + − r2 ⇒ r From infinity we get 1 A = U 2 On the sphere 1 B 1 Ua2 + = 0 B = Ua3 2 a ⇒ −2 This gives 1 a3 Ψ = U r2 sin2 θ 2 − r   The slip velocity on the sphere is 3 u = U sin θ θ −2

The radial velocity is ur = 0. PSfrag replacements

x, x1 y, x2 z, x3 u, u1 v, u2 w, u3 x1 x2 0 xi 0 ˆ ri xi , t u x 0, tˆ i i  P tˆ= 0  x u1 u2 > u1 x1 x2 x3 0 xi ui dtˆ 0 dxi dui dtˆ ri dtˆ dr dtˆ i  P 1 P2 x1 x2 x3 R3 R2 R1 r3 r2 r1 π 2 + dϕ12 V (t) S (t) V (t + ∆t) V (t) S (t−+ ∆t) u n V (t + ∆t) p T0, U0 Tw L T0 U0 Gradient fields wi ∂p ∂xi ui Divergence free vectorfields // to boundary L h x1 x2 p0 > p1 p1 u n dS u n∆t · x y u0 p0 η = y √4νt u u0 y = η√4νt t η y ω˜(η) u ω = · 0 z √πνt t L }δ ω 0 U≈ y→, v x, u

U δ u0 η = y √νx/u0 u f 0 = u0 Blasius profile

δ∗ x Separation point = Pressure force ⇐ x y l

uT x y dx dy dx dl = ( dx,−dy) n dl = ( dy, dx) − i 1, j + 1 − i, j + 1 i + 1, j + 1 c c0 b b0 i 1, j i +− 1, j i, j Aabcd d d0 a a0 i 1, j 1 − i, j − 1 i + 1, j − 1 − j i i + 1 ui,j vi,j pi,j pi,j vi,j+1/2 vi,j 1/2 − ui 1/2,j −i 1 − 2 i 1 i + 2 i + 1 3 i + 2 1 j + 2 j j 1 − 2 j 1 − A B C u 3 2 ,1 v 3 1, 2

0 1 2 i j Inflow Solid wall n Γ0 Γ1 Ω M 2 M m m + 2 1 h

Vh u uh APPENDIX B. RECITATIONS 5C1214 Γ0140 Γ1 ΩB.9 Flow around a submarine and other potential flow problems : to be updated : new valuesExercise 1 : old values i 1The flow around a submarine moving at a velocity V can be described by the flow caused by a source and − a sink with strength Q at a distance 2a from each other. i i + 1 x j 1 V − j j + 1 Submarine iteration direction x y 1 Q -Q p1,1 z n y y i j L a fine grid (1) coarse grid (2)

Figure B.6: Coordinate system for submarine problem

a) If one wants to construct a pressure sensor that will register an approaching submarine at a distance L, what sensitivity is needed for the sensor? Assume an ideal fluid and that 2a = 80 m, Q = 915 m3/s, U = 8 m/s, L = 200 m and ρ = 1000 kg/m3.

Use a potential flow description ∂φ ∂φ u¯ = φ, u = , v = ∇ ∂x ∂y The flow is always irrotational due to the definition of the velocity potential

ω = u¯ = φ = 0, curl(grad)=0 ∇ × ∇ × ∇ For incompressibility we get ∂( φ) u¯ = φ = ∇ i = ∆φ = 0 ∇ · ∇ · ∇ ∂xi The equation is linear and thus superposition can be used. We have freestream plus 3D source plus sink Q Q φ = U z + − + 4π r1 4π r2 freestream source sink |{z} The first term is in cylindrical coordinates (R, θ, z) and|the{z }two|last{z }are in two different spherical coordinate systems with origin in z a and z+a, respectively. Transform the two second terms to cylindrical coordinates − Q Q φ = Uz + − + 4π (z + a)2 + R2 4π (z a)2 + R2 − Velocity p p ∂φ 1 ∂φ ∂φ u¯ = φ = e¯ + e¯ + e¯ = ∇ ∂R R R ∂θ θ ∂z z QR QR Q(z + a) Q(z a) e¯ +e¯ U + − R 4π((z + a)2 + R2)3/2 − 4π((z a)2 + R2)3/2 z 4π((z + a)2 + R2)3/2 − 4π((z a)2 + R2)3/2  −   −  B.9. FLOW AROUND A SUBMARINE AND OTHER POTENTIAL FLOW PROBLEMS 141

We need to know the distance, b, from the point source to the stagnation point on the submarine nose. Thus we need to know the length of the submarine.

b) How long is the submarine? Compute where uz = 0 for R = 0

Q 1 1 U + = 0 4π (z + a)2 − (z a)2  −  4πU (z a)2 (z + a)2 4az = − − = − − Q (z a)2(z + a)2 (z2 a2)2 − − Solving this system gives z = 43.01 m, z = 36.99 m, where the second solution lies inside the submarine. The length is then 2 43.01 86 m and b =3.01 m. ∗ ≈

Now we continue to solve a) Use Bernoulli equation to determine the pressure fluctuations at z = L b a, R = 0 − − − 1 1 p + ρ u¯ 2 = p + ρU 2 2 | | ∞ 2

Evaluate u¯ noticing that uR = 0

Q Q u¯(z = L b a, R = 0) = e¯ U + − + − − − z 4π(L + b)2 4π((L + b + 2a)2   Inserting the given values gives u¯ = 7.99914 m/s and we get | | 1 p p = ρ(U 2 u¯ 2) 6.86 N/m2 0.07 mbar − ∞ 2 − | | ≈ ≈

c) How wide is the submarine? To get this we need to compute the shape of the submarine. The stream function is constant along streamlines and is useful for this. In spherical coordinates the stream function is defined as 1 ∂ψ u = r r2 sin θ ∂θ 1 ∂ψ u = θ −r sin θ ∂r Transformation between cylindrical and spherical coordinates

ur = uR sin θ + uz cos θ

R = r sin θ, z = r cos θ Our velocity field gives

1 ∂ψ Q 1 1 = sin θ r sin θ + r2 sin θ ∂θ 4π (r2 + a2 + 2ar cos θ)3/2 − (r2 + a2 2ar cos θ)3/2  −  Q r cos θ + a r cos θ a cos θ U + − 4π (r2 + a2 + 2ar cos θ)3/2 − (r2 + a2 2ar cos θ)3/2   −  Q r + a cos θ r a cos θ = U cos θ + − 4π (r2 + a2 + 2ar cos θ)3/2 − (r2 + a2 2ar cos θ)3/2  −  This is difficult to integrate. PSfrag replacements

x, x1 y, x2 z, x3 u, u1 v, u2 w, u3 x1 x2 0 xi 0 ˆ ri xi , t u x 0, tˆ i i  P tˆ= 0  x u1 u2 > u1 x1 x2 x3 0 xi ui dtˆ 0 dxi dui dtˆ ri dtˆ dr dtˆ i  P 1 P2 x1 x2 x3 R3 R2 R1 r3 r2 r1 π 2 + dϕ12 V (t) S (t) V (t + ∆t) V (t) S (t−+ ∆t) u n V (t + ∆t) p T0, U0 Tw L T0 U0 Gradient fields wi ∂p ∂xi ui Divergence free vectorfields // to boundary L h x1 x2 p0 > p1 p1 u n dS u n∆t · x y u0 p0 η = y √4νt u u0 y = η√4νt t η y ω˜(η) u ω = · 0 z √πνt t L }δ ω 0 U≈ y→, v x, u L U δ u0 η = y √νx/u0 u f 0 = u0 Blasius profile

δ∗ x Separation point = Pressure force ⇐ x y l

uT x y dx dy dx dl = ( dx,−dy) n dl = ( dy, dx) − i 1, j + 1 − i, j + 1 i + 1, j + 1 c c0 b b0 i 1, j i +− 1, j i, j Aabcd d d0 a a0 i 1, j 1 − i, j − 1 i + 1, j − 1 − j i i + 1 ui,j vi,j pi,j pi,j vi,j+1/2 vi,j 1/2 − ui 1/2,j −i 1 − 2 i 1 i + 2 i + 1 3 i + 2 1 j + 2 j j 1 − 2 j 1 − A B C u 3 2 ,1142 APPENDIX B. RECITATIONS 5C1214 v 3 1, 2 p1,1Simplify to a Rankine body by neglecting the sink and say that a = 0

1 Q 1 1 ∂ψ ur = U cos θ + = 2 4π r2 r2 sin θ ∂θ ⇒ i 1 Q j Ψ = Ur2 sin2 θ cos θ + C 2 − 4π Inflow Solid wallDetermine C from the stagnation point n 2 Q Γ0 u (θ = π, r ) = 0 r = r 0 ⇒ 0 4πU Γ1 ΩSince Ψ = 0 on the body we get 2 Q M C = . M −4π mThe stream function is then 1 Q m + 2 Ψ = UR2 sin2 θ (cos θ +1) 1 2 −4π h source V d V The shape is given by Ψ = 0. As r , θ 0 then r|sin θ{z }. This gives h → ∞ → → 2 u uh Γ0 Γ1 Ω : to be updated 10 : new values : old values i 1 − 5 i i + 1 j 1 − xj 0 j + 1 iteration direction x y −5 1 n x y −10 i j fine grid (1) −15 coarse grid (2) −20 −15 −10 −5 0z 5 10 15

Figure B.7: Rankine body for submarine problem

1 d2 Q 4Q Q U 2 = 0 d2 = d = 2 2 4 − 4π ⇒ Uπ ⇒ rUπ There is a simple way of determining the radius as z directly. The flow from the source must take up an particular area in the flow at infinity. Since no fluid→ ∞can cross the streamlines this area must be equal to that of the Rankine body:

d 2 Q Q = Uπ d = 2 = 12.07 m 2 ⇒ rUπ PSfrag replacements

x, x1 y, x2 z, x3 u, u1 v, u2 w, u3 x1 x2 0 xi 0 ˆ ri xi , t u x 0, tˆ i i  P tˆ= 0  x u1 u2 > u1 x1 x2 x3 0 xi ui dtˆ 0 dxi dui dtˆ ri dtˆ dr dtˆ i  P 1 P2 x1 x2 x3 R3 R2 R1 r3 r2 r1 π 2 + dϕ12 V (t) S (t) V (t + ∆t) V (t) S (t−+ ∆t) u n V (t + ∆t) p T0, U0 Tw L T0 U0 Gradient fields wi ∂p ∂xi ui Divergence free vectorfields // to boundary L h x1 x2 p0 > p1 p1 u n dS u n∆t · x y u0 p0 η = y √4νt u u0 y = η√4νt t η y ω˜(η) u ω = · 0 z √πνt t L }δ ω 0 U≈ y→, v x, u L U δ u0 η = y √νx/u0 u f 0 = u0 Blasius profile

δ∗ x Separation point = Pressure force ⇐ x y l

uT x y dx dy dx dl = ( dx,−dy) n dl = ( dy, dx) − i 1, j + 1 − i, j + 1 i + 1, j + 1 c c0 b b0 i 1, j i +− 1, j i, j Aabcd d d0 a a0 i 1, j 1 − i, j − 1 i + 1, j − 1 − j i i + 1 ui,j vi,j pi,j pi,j vi,j+1/2 vi,j 1/2 − ui 1/2,j −i 1 − 2 i 1 i + 2 i + 1 3 i + 2 1 j + 2 j j 1 − 2 j 1 − A B C u 3 2 ,1 v 3 1, 2 p1,1

1 2 i j Inflow Solid wall n Γ0 Γ1 Ω M 2 M m m + 2 1 h V VhB.9. FLOW AROUND A SUBMARINE AND OTHER POTENTIAL FLOW PROBLEMS 143 u uhWe can use the computed stream function for a point source and displace it to z = a. In cylindrical Γ0coordinates − Γ1 Q z + a Ψ = − Ω 4π (z a)2 + R2 : to be updated  −  : new valuesTransform to spherical coordinates p : old values Q r cos θ + a Q r cos θ + a i 1 Ψ = − = − − 4π 4π √ 2 2 i  (r cos θ + a)2 + r2 sin2 θ   r + a + 2ar cos θ  i + 1 q j 1The stream function for the submarine is then − j 1 Q r cos θ + a r cos θ a j + 1 Ψ = Ur2 sin2 θ + + − 2 4π −√r2 + a2 + 2ar cos θ √r2 + a2 2ar cos θ iteration direction  −  x y 1 n 10 x xy 0 i j −10 fine grid (1) coarse grid (2) −80 −60 −40 −20 0z 20 40 60 80

Figure B.8: Submarine body for submarine problem

At r = R and θ = π/2 we get

1 Q a a Ψ = UR2 + + − 2 4π −√ 2 2 √ 2 2  R + a R + a  For the body Ψ = 0 and we get aQ R2 R2 + a2 = 0 − πU Multiply by p aQ R2 R2 + a2 + πU ⇒ p a2Q2 (R2)3 + (R2)2a2 = 0 − π2U 2 Computing this d = 2R = 12.0006 m PSfrag replacements

x, x1 y, x2 z, x3 u, u1 v, u2 w, u3 x1 x2 0 xi 0 ˆ ri xi , t u x 0, tˆ i i  P tˆ= 0  x u1 u2 > u1 x1 x2 x3 0 xi ui dtˆ 0 dxi dui dtˆ ri dtˆ dr dtˆ i  P 1 P2 x1 x2 x3 R3 R2 R1 r3 r2 r1 π 2 + dϕ12 V (t) S (t) V (t + ∆t) V (t) S (t−+ ∆t) u n V (t + ∆t) p T0, U0 Tw L T0 U0 Gradient fields wi ∂p ∂xi ui Divergence free vectorfields // to boundary L h x1 x2 p0 > p1 p1 u n dS u n∆t · x y u0 p0 η = y √4νt u u0 y = η√4νt t η y ω˜(η) u ω = · 0 z √πνt t L }δ ω 0 U≈ y→, v x, u L U δ u0 η = y √νx/u0 u f 0 = u0 Blasius profile

δ∗ x Separation point = Pressure force ⇐ x y l

uT x y dx dy dx dl = ( dx,−dy) n dl = ( dy, dx) − i 1, j + 1 − i, j + 1 i + 1, j + 1 c c0 b b0 i 1, j i +− 1, j i, j Aabcd d d0 a a0 i 1, j 1 − i, j − 1 i + 1, j − 1 − j i i + 1 ui,j vi,j pi,j pi,j vi,j+1/2 vi,j 1/2 − ui 1/2,j −i 1 − 2 i 1 i + 2 i + 1 3 i + 2 1 j + 2 j j 1 − 2 j 1 − A B C u 3 2 ,1 v 3 1, 2 p1,1

1

i j Inflow Solid wall n Γ0 Γ1 Ω M 2 144 APPENDIX B. RECITATIONS 5C1214 M m m + 2 The complex potential 1 hThe lines with constant stream function Ψ are the streamlines. They are orthogonal to the lines of constant V velocity potential φ which are equipotential lines. Since both of them satisfy Laplace’s equation we can Vhdefine a complex function u F (z) = φ(x, y) + i Ψ(x, y) z = x + iy uh Γ0 Γ1 Ω : to be updated 18 : new values : old values 16 i 1 − i 14 i + 1 j 1 12 − j j + 1 10 iteration direction x 8 y 1 6 n x 4 y i 2 j fine grid (1) 0 coarse grid (2) −50 −45 −40 −35 −30 −25

Figure B.9: Complex potential for submarine problem, solid: Ψ , dotted: φ

This is an analytical function since the Cauchy–Riemann equation holds ∂φ ∂Ψ ∂φ ∂Ψ = and = ∂x ∂y ∂y − ∂x The velocity is then dF ∂φ ∂Ψ w(z) = = + i = u iv dz ∂x ∂x − This enables the use of complex analysis, in particular conformal mapping that can be used to compute the flow over airfoil shapes. PSfrag replacements

x, x1 y, x2 z, x3 u, u1 v, u2 w, u3 x1 x2 0 xi 0 ˆ ri xi , t u x 0, tˆ i i  P tˆ= 0  x u1 u2 > u1 x1 x2 x3 0 xi ui dtˆ 0 dxi dui dtˆ ri dtˆ dr dtˆ i  P 1 P2 x1 x2 x3 R3 R2 R1 r3 r2 r1 π 2 + dϕ12 V (t) S (t) V (t + ∆t) V (t) S (t−+ ∆t) u n V (t + ∆t) p T0, U0 Tw L T0 U0 Gradient fields wi ∂p ∂xi ui Divergence free vectorfields // to boundary L h x1 x2 p0 > p1 p1 u n dS u n∆t · x y u0 p0 η = y √4νt u u0 y = η√4νt t η y ω˜(η) u ω = · 0 z √πνt t L }δ ω 0 U≈ y→, v x, u L U δ u0 η = y √νx/u0 u f 0 = u0 Blasius profile

δ∗ x Separation point = Pressure force ⇐ x y l

uT x y dx dy dx dl = ( dx,−dy) n dl = ( dy, dx) − i 1, j + 1 − i, j + 1 i + 1, j + 1 c c0 b b0 i 1, j i +− 1, j i, j Aabcd d d0 a a0 i 1, j 1 − i, j − 1 i + 1, j − 1 − j i i + 1 ui,j vi,j pi,j pi,j vi,j+1/2 vi,j 1/2 − ui 1/2,j −i 1 − 2 i 1 i + 2 i + 1 3 i + 2 1 j + 2 j j 1 − 2 j 1 − A B C u 3 2 ,1 v 3 1, 2 p1,1

1

i j Inflow Solid wall n Γ0 Γ1 Ω M 2B.9. FLOW AROUND A SUBMARINE AND OTHER POTENTIAL FLOW PROBLEMS 145 M m Example: m + 2 1 h Flow past a rotating cylinder centered at z = λ at an angle of attack α V Vh 2 iα (a + λ) iα iΓ u F (z) = U (z + λ)e− + e log(z + λ) (z + λ) − 2π uh   Γ0 1 2 Γ1Mapping by z = 1 Z + 1 Z2 a2 gives an airfoil shape with the potential F(z). A correct flow is not 2 4 − Ω   : to be updatedachieved unless the Kutta–Joukovski condition is satisfied requiring : new values Γ = 4πU(a + λ) sin α : old values − i 1 − i i + 1 j 1 4 Z=f(z) − j 3 j + 1 iteration direction 2 x 1 2 y 0 0 n −1 −2 x y −2 −5 0 5 i −3 j −4 fine grid (1) −1 coarse grid (2) −4 −2 0 2 z=f (Z)

Figure B.10: Conformal mapping from circle to airfoil shape, (a = 3,λ = 0.5) 146 APPENDIX B. RECITATIONS 5C1214

B.10 More potential flow Half body over a wall A line source of strength Q is located at (0, a) above a flat plate that coincides with the x-axis. A uniform stream with velocity U flows along the x-axis. Calculate the irrotational flow field.

Method of images. Put a line source of equal strength at (0, a) in order to fulfill the condition of no flow through the plate. Superposition of a uniform flow and the t−wo line sources gives the complex potential Q Q F = Uz + ln(z ia) + ln(z + ia) 2π − 2π Complex velocity dF Q 1 1 W = = U + + dz 2π z ia z + ia ⇒  −  Q 1 1 W = U + + 2π x + i(y a) x + i(y + a) ⇒  −  Q x i(y a) x i(y + a) W = U + − − + − 2π x2 + (y a)2 x2 + (y + a)2 ⇒  −  Q x x y a y + a W = U + + i − + 2π x2 + (y a)2 x2 + (y + a)2 − x2 + (y a)2 x2 + (y + a)2  −  −  The velocity field now becomes

Q x x u = U + + 2π x2 + (y a)2 x2 + (y + a)2  −  Q y a y + a v = − + 2π x2 + (y a)2 x2 + (y + a)2  −  PSfrag replacements

x, x1 y, x2 z, x3 u, u1 v, u2 w, u3 x1 x2 0 xi 0 ˆ ri xi , t u x 0, tˆ i i  P tˆ= 0  x u1 u2 > u1 x1 x2 x3 0 xi ui dtˆ 0 dxi dui dtˆ ri dtˆ dr dtˆ i  P 1 P2 x1 x2 x3 R3 R2 R1 r3 r2 r1 π 2 + dϕ12 V (t) S (t) V (t + ∆t) V (t) S (t−+ ∆t) u n V (t + ∆t) p T0, U0 Tw L T0 U0 Gradient fields wi ∂p ∂xi ui Divergence free vectorfields // to boundary L h x1 x2 p0 > p1 p1 u n dS u n∆t · x y u0 p0 η = y √4νt u u0 y = η√4νt t η y ω˜(η) u ω = · 0 z √πνt t L }δ ω 0 U≈ y→, v x, u L U δ u0 η = y √νx/u0 u f 0 = u0 Blasius profile

δ∗ x Separation point = Pressure force ⇐ x y l

uT x y dx dy dx dl = ( dx,−dy) n dl = ( dy, dx) − i 1, j + 1 − i, j + 1 i + 1, j + 1 c c0 b b0 i 1, j i +− 1, j i, j Aabcd d d0 a a0 i 1, j 1 − i, j − 1 i + 1, j − 1 − j i i + 1 ui,j vi,j pi,j pi,j vi,j+1/2 vi,j 1/2 − ui 1/2,j −i 1 − 2 i 1 i + 2 i + 1 3 i + 2 1 j + 2 j j 1 − 2 j 1 − A B C u 3 2 ,1 v 3 1, 2 p1,1

1

i j Inflow Solid wall n Γ0 Γ1 Ω M 2 M m m + 2 1 h V Vh u B.10. MORE POTENTIAL FLOW 147 uh Γ0 Γ1Flow past a symmetric airfoil Ωa) Use conformal mapping to calculate the irrotational flow field around a symmetric airfoil. : to be updated : new values Joukowski transformation : old values c2 i 1 ζ(z) = z + − z i i + 1 j 1 − j 1 2 j + 1 iteration direction x 0.5 1 y 0 0 n x y−0.5 −1 i j −1 −2 fine grid (1) coarse grid (2) −1.5 −1 −0.5 0 0.5 1 −3 −2 −1 0 1 2

Equation for the circle z = λ + (a + λ)eiθ − Equation for the airfoil a2 ζ = λ + (a + λ)eiθ + − λ + (a + λ)eiθ − Complex potential in the z-plane

2 iα (a + λ) iα iΓ F = U(z + λ)e− + U e + ln(z + λ) (z + λ) 2π

Complex velocity in the z-plane

2 dF iα (a + λ) iα iΓ W = = Ue− U e + dz − (z + λ)2 2π(z + λ)

Complex velocity in the ζ-plane

2 2 dF/dz iα (a + λ) iα iΓ a ω = = Ue− U e + 1 dζ/dz − (z + λ)2 2π(z + λ) − z2    The velocity can then be found by introducing the reversed transformation z = ζ/2 + ζ2/2 a2 into − u = Re ω(z) , v = Im ω(z) p ∗ { } ∗ − { }

b) Calculate the Joukowski condition for the airfoil.

The flow field has a singular point at the trailing edge of the airfoil at ζ = 2a. Resolve the singularity by choosing the circulation Γ so the numerator vanishes at the trailing edge z = a

iα iα iΓ Ue− Ue + = 0 − 2π(a + λ) ⇒

iα iα e e− Γ = 4π(a + λ)U − = 4π(a + λ)U sin α k 2i 148 APPENDIX B. RECITATIONS 5C1214

B.11 Boundary layers Exercise 1 Consider the high Reynolds number flow in a conversing channel. Compute the boundary layer over the surface at y = 0.

Assume the free stream: Q U(x) = , − x where Q is the flux. The boundary layer equations read:

∂u ∂u Q ∂2u u + v = + ν (1) ∂x ∂y −x3 ∂y2

∂u ∂v + = 0 (2) ∂x ∂y Seek a similarity solution where the dimensionless velocity u/U only depend on the dimensionless wall distance y y y y Q η = = = = δ xν ν x ν U x Q r | | q q The stream function satisfies (2): ∂ψ ∂ψ u = , v = ∂y − ∂x Make the stream function dimensionless: ψ f(η) = Uδ Determine the terms in equation (1):

∂ψ ∂f ∂η 1 Q u = = Uδ = Uδf 0 = Uf 0 = f 0 ∂y ∂η ∂y δ − x

∂ψ ∂(Uδf) ∂f ∂η ∂δ ∂U v = = = Uδ U f δf = − ∂x − ∂x − ∂η ∂x − ∂x − ∂x Q ν η Q ν Q ν √Qν x f 0 + f x f = ηf 0 x Q −x x Q − x2 Q − x r   r r ∂u ∂ Q Q ∂f 0 ∂η Q Q η Q Q = f 0 = + f 0 = f 00 + f 0 = (ηf 00 + f 0) ∂x ∂x − x − x ∂η ∂x x2 − x −x x2 x2     ∂u ∂ Q Q ∂f 0 ∂η Q 1 Q Q = f 0 = = f 00 = f 00 ∂y ∂y − x − x ∂η ∂y − x δ −x2 ν   r 2 2 ∂ u Q Q ∂f 00 ∂η Q 2 = 2 = 3 f 000 ∂y −x r ν ∂η ∂y −x ν Insert into equation (1):

Q Q √Qν Q Q Q2 Q2 f 0 2 (ηf 00 + f 0) + ηf 0 2 f 00 = 3 ν 3 f 000 − x x x x r ν − x − x ν Divide by Q2/x3: 2 ηf 0f 00 f 0 + ηf 0f 00 = 1 f 000 − − − − ⇒ 2 f 000 f 0 + 1 = 0 − Boundary conditions:

u(0) = 0 f 0(0) = 0

u( ) = 1 ⇒ f 0( ) = 1 ( ∞ ( ∞ PSfrag replacements

x, x1 y, x2 z, x3 u, u1 v, u2 w, u3 x1 x2 0 xi 0 ˆ ri xi , t u x 0, tˆ i i  P tˆ= 0  x u1 u2 > u1 x1 x2 x3 0 xi ui dtˆ 0 dxi dui dtˆ ri dtˆ dr dtˆ i  P 1 P2 x1 x2 x3 R3 R2 R1 r3 r2 r1 π 2 + dϕ12 V (t) S (t) V (t + ∆t) V (t) S (t−+ ∆t) u n V (t + ∆t) p T0, U0 Tw L T0 U0 Gradient fields wi ∂p ∂xi ui Divergence free vectorfields // to boundary L h x1 x2 p0 > p1 p1 u n dS u n∆t · x y u0 p0 η = y √4νt u u0 y = η√4νt t η y ω˜(η) u ω = · 0 z √πνt t L }δ ω 0 U≈ y→, v x, u L

δ u0 η = y √νx/u0 u f 0 = u0 Blasius profile

δ∗ x Separation point = Pressure force ⇐ x y l

uT x y dx dy dx dl = ( dx,−dy) n dl = ( dy, dx) − i 1, j + 1 − i, j + 1 i + 1, j + 1 c c0 b b0 i 1, j i +− 1, j i, j Aabcd d d0 a a0 i 1, j 1 − i, j − 1 i + 1, j − 1 − j i i + 1 ui,j vi,j pi,j pi,j vi,j+1/2 vi,j 1/2 − ui 1/2,j −i 1 − 2 i 1 i + 2 i + 1 3 i + 2 1 j + 2 j j 1 − 2 j 1 − A B C u 3 2 ,1 v 3 1, 2 p1,1 0 1 2 i j Inflow Solid wall n Γ0 Γ1B.11. BOUNDARY LAYERS 149 Ω M 2 Substitute F (η) = f (η): M 0 2 F 00 F + 1 = 0 m − m + 2 F (0) = 0 1 F ( ) = 1 h ∞ V Solution:  η 2 Vh F = 3 tanh2 + 2 u √2 r3! − uh Γ0Exercise 2 Γ1 ΩConsider the flow downstream of a 2D streamlined body at high Reynolds number. Study the thin wake : to be updateddownstream of the body where variations in y are much more rapid than variations in the downstream : new valuesdirection. Also assume that the wake is so small that we can write u = U + u1 where u1 is negative and : old valuesdescribes the wake. The length scale in x is L and in y it is δ with δ << L. i 1 − i U Y i + 1 U+u1 j 1 − j j + 1 iteration direction x y

n X x y i j fine grid (1) coarse grid (2)

Figure B.11: Coordinate system for wake problem

a) Find the governing (linear) equations: We start with the boundary layer equations since δ << L,

∂u ∂u 1 ∂p ∂2u u + v = + ν ∂x ∂y −ρ ∂x ∂y2 ∂u ∂v + = 0 ∂x ∂y In the wake we have no pressure gradient, ∂p = 0. ∂x From the continuity equation we get,

∂v ∂u ∂ ∂u δ = = U + u = 1 v u << U ∂y −∂x −∂x 1 − ∂x ⇒ ∼ L 1  

Inserting u = U + u1 in the boundary layer equations gives,

∂u ∂u ∂u ∂2u U 1 + u 1 + v 1 = 0 + ν 1 ∂x 1 ∂x ∂y ∂y2 Neglect the quadratic terms,

∂u u2 ∂u δ 1 u2 u 1 1 and v 1 u u 1 1 ∂x ∼ L ∂y ∼ L 1 δ 1 ∼ L 150 APPENDIX B. RECITATIONS 5C1214

∂u ∂2u U 1 = ν 1 ⇒ ∂x ∂y2 b) Show that ∞ u1 dy = constant: −∞ Consider the relation,R ∞ Q1 = u1 dy Z−∞ which gives the linear contribution from u1 to the momentum flux.

2 d d ∞ ∞ ∂u ∞ ν ∂ u ν ∂u ∞ Q = u dy = 1 dy = From the governing equation = 1 dy = 1 = 0 dx 1 dx 1 ∂x { } U ∂y2 U ∂y Z−∞ Z−∞ Z−∞  −∞

This means that Q1 is constant. c) Find a similarity solution for u1:

Seek a solution on the form, y u (x, y) = F (x)f(η) where η = 1 g(x) This gives, ∞ ∞ Q1 = F (x)f(η) dy = F (x)g(x) f(η) dη Z−∞ Z−∞ Q1 = constant requires,

∞ F (x) = 1/g(x) and f(η) dη = Q1 = constant Z−∞ This means, 1 1 y u (x, y) = f(η) = f 1 g(x) g(x) g(x)   Insert this into the equation of motion,

g0(x) 1 U ηf 0(η) + f(η) = ν f 00(η) − g(x)2 g(x)3 ⇒  

U f 00(η) g0(x)g(x) = = C ν −ηf 0(η) + f(η) ⇒ νx 1/2 g(x) = 2C U   This gives the equation for f,

d f 00(η) + Cηf 0(η) + Cf(η) = f 0(η) + Cηf(η) + D = 0 dη   ∂ From the symmetry condition u(x, 0) = 0 we can determine that f 0(0) = D = 0. This gives, ∂y −

f 0(η) + Cηf(η) = 0

Integrating this we get, 1 Cη2 f(η) = ae− 2

We can determine the constant a from the condition that Q1 is constant,

∞ C 1 Cη2 f(η) dη = Q f(η) = Q e− 2 1 ⇒ 2π 1 Z−∞ r

This now gives u1: 2 1 y C Q1 2 C 2 u1(x, y) = e− g(x) = r2π g(x) B.11. BOUNDARY LAYERS 151

1/2 1/2 2 νx Q1 U Uy g(x) = 2C = e− 4νx U 2√π νx       d) Relate u1 to the FD:

The drag is ∞ F = ρ u (U + u ) dy D − 1 1 Z−∞ 2 Remember that u1 << U and neglect the u1 term,

∞ F = ρ Uu dy = ρUQ D − 1 − 1 Z−∞ This means that 1/2 FD FD ν Uy2 Q = u (x, y) = e− 4νx 1 − ρU ⇒ 1 −2µ√π Ux   Exercise 3 Give an order of magnitude estimate of the Reynolds number for: i. Flow past the wing of a jumbo jet at 150 m/s ( Mach 0.5) ≈ ii. A wing profile in salt water with L = 2 cm and U = 5 cm/s iii. A thick layer of golden syrup draining of a spoon.

3 1 iv. A spermatozoan with tail length of 10− cm swimming at 10− cm/s in water. Estimate the boundary layer thickness in case (i).

Fluid ν cm2/s Water 0.01 Air 0.15 Syrup 1200

i. Flow past the wing of a jumbo jet at 150 m/s ( Mach 0.5) ≈ 5 2 UL 7 U = 150 m/s, ν = 1.5 10− m /s, L = 4 m Re = 4 10 ⇒ ν ≈ × ii. A wing profile in salt water with L = 2 cm and U = 5 cm/s

6 2 UL 3 U = 0.05 m/s, ν = 10− m /s, L = 0.02 m Re = 10 ⇒ ν ≈ iii. A thick layer of golden syrup draining of a spoon. UL U = 0.04 m/s, ν = 0.12 m2/s, L = 0.01 m Re = 0.003 ⇒ ν ≈

3 2 iv. A spermatozoan with tail length of 10− cm swimming at 10− cm/s in water.

4 6 2 5 UL 3 U = 10− m/s, ν = 10− m /s, L = 10− m Re = 10− ⇒ ν ≈

The boundary layer thickness in (i) is (1 mm) O δ 1 = L O √  Re PSfrag replacements

x, x1 y, x2 z, x3 u, u1 v, u2 w, u3 x1 x2 0 xi 0 ˆ ri xi , t u x 0, tˆ i i  P tˆ= 0  x u1 u2 > u1 x1 x2 x3 0 xi ui dtˆ 0 dxi dui dtˆ ri dtˆ dr dtˆ i  P 1 P2 x1 x2 x3 R3 R2 R1 r3 r2 r1 π 2 + dϕ12 V (t) S (t) V (t + ∆t) V (t) S (t−+ ∆t) u n V (t + ∆t) p T0, U0 Tw L T0 U0 Gradient fields wi ∂p ∂xi ui Divergence free vectorfields // to boundary L h x1 x2 p0 > p1 p1 u n dS u n∆t · x y u0 p0 η = y √4νt u u0 y = η√4νt t η y ω˜(η) u ω = · 0 z √πνt t L }δ

U y→, v x, u

δ u0 η = y √νx/u0 u f 0 = u0 Blasius profile

δ∗ x Separation point = Pressure force ⇐ x y

uT x y dx dy dx dl = ( dx,−dy) n dl = ( dy, dx) − i 1, j + 1 − i, j + 1 i + 1, j + 1 c c0 b b0 i 1, j i +− 1, j i, j Aabcd

d0 a a0 i 1, j 1 − i, j − 1 i + 1, j − 1 − j i i + 1 ui,j vi,j pi,j pi,j vi,j+1/2 vi,j 1/2 − ui 1/2,j −i 1 − 2 i 1 i + 2 i + 1 3 i + 2 1 j + 2 j j 1 − 2 j 1 − A B C u 3 2 ,1 v 3 1, 2 p1,1

1 2 i j Inflow Solid wall n Γ0 Γ1 Ω M 2 M 152 APPENDIX B. RECITATIONS 5C1214 m m + 2 1B.12 More boundary layers h V Drag on a circular cylinder V hUse the integral form of the Navier–Stokes equations, Consider a fix volume in a fluid with velocity u¯. The ucontinuity equation becomes, uh d Γ0 ρ dV = ρuknk dS. dt V − S Γ1 Z I The momentum equation, Ω : to be updated d ρui dV = ρujnj ui + pni τij nj dS + ρFi dV : new values dt V − S − V : old values Z I   Z i 1Use this to compute the drag force on a cylinder: − i U0 n ωU 0 i + 1 ≈ j 1 − j j + 1 iteration direction x l n y d Wake n 1 n

x y i j fine grid (1) n coarse grid (2) L

∂u¯ The cylinder is stationary and so is the flow = 0. Incompressible flow with constant density. The ⇒ ∂t continuity equation gives:

l/2 uknk dS = 0 U0l Lv y= l/2 + Lv y=l/2 + Uw(y) dy = 0 ⇒ − − | − | IS Zl/2 Due to the symmetry we get, l/2 U l + 2Lv + U (y) dy = 0 − 0 |y=l/2 w Zl/2 The momentum equation in x: ρn u u + n p n τ dS = 0 j j x x − j xj IS  Far away from the cylinder we can assume p = p0 and τxx = τxy = 0. This gives,

l/2 2 2 ρU0 l + 2ρU0v y=l/2L + ρUw(y) dy + [nxp nj τxj ] dS − | l/2 cyl − Z− Z

FD

Multiply the continuity equation by ρU0, | {z } l/2 2 ρU0 l + 2ρU0v y=l/2L = ρU0 Uw(y) dy − | − l/2 Z− Insert into momentum equation:

l/2 l/2 2 ρU0 Uw(y) dy + ρUw(y) dy + FD = 0 − l/2 l/2 Z− Z− l/2 l/2 2 2 2 Uw(y) Uw(y) FD = ρ U0Uw(y) Uw(y) dy = ρU0 dy l/2 − l/2 U0 − U0 Z−   Z−     B.12. MORE BOUNDARY LAYERS 153

Make the variable substitution r = y/d,

l/2d 2 2 Uw(r) Uw(r) FD = ρU0 d dr l/2d U0 − U0 Z−     Now if d << l we get, 2 2 ∞ Uw(r) Uw(r) 2 FD = ρU0 d dr = ρU0 θ U0 − U0 Z−∞    θ The momentum thickness is called θ and| is a measure{zof the loss of momen} tum in the flow. Now compute FD θ the drag coefficient CD = 1 2 = 2 2 ρU0 d d

Glauert wall jet Compute an ODE for a self-similar wall jet.

The boundary layer equations read: ∂u ∂u ∂2u u + v = ν (1) ∂x ∂y ∂y2 ∂u ∂v + = 0 (2) ∂x ∂y

Seek a similarity solution where the dimensionless velocity u/Um(x), where Um(x) is the jet core velocity, only depend on the dimensionless wall distance y η = g(x) The stream function satisfies (2): ∂ψ ∂ψ u = , v = ∂y − ∂x Make the stream function dimensionless: ψ f(η) = Um(x)g(x) Determine the terms in equation (1): ∂ψ ∂f ∂η 1 u = = U g = U gf 0 = U f 0 ∂y m ∂η ∂y m g m

∂ψ ∂(Umgf) yg0 v = = = U 0 gf U g0f U gf 0 = U 0 gf U g0f + U g0f 0η − ∂x − ∂x − m − m − m − g2 − m − m m   ∂u ∂ g0 = (U f 0) = U 0 f 0 U f 00η ∂x ∂x m m − m g ∂u ∂ 1 = (U f 0) = U f 00 ∂y ∂y m m g ∂2u ∂ 1 1 = U f 00 = U f 000 ∂y2 ∂y m g m g2   Insert into equation (1):

g0 1 1 U f 0(U 0 f 0 U ηf 00) + (U g0ηf 0 U 0 gf U g0f)U f 00 = νU f 000 m m − m g m − m − m m g m g2 ⇒

2 2 g0 2 g0 2 g0 1 U U 0 f 0 U ηf 0f 00 + U ηf 0f 00 U U 0 ff 00 U ff 00 = νU f 000 m m − m g m g − m m − m g m g2 ⇒ 2 2 Um0 g Umg0g Um0 g 2 f 000 + + ff 00 f 0 = 0 ν ν − ν ⇒   α β 2 | f{z000 + αff}00 + βf|0 {z= 0} 154 APPENDIX B. RECITATIONS 5C1214

Boundary conditions: u(0) = 0 f 0(0) = 0 v(0) = 0 f(0) = 0  ⇒  u( ) = 0 f 0( ) = 1 ∞ ∞ Similarity requires that α and β areconstant. Assume the x-dependence: m n Um = ax , g = bx

Then we get 2 1 m 1 2 2n ab β = amx − b x = m, 2n + m = 1 −ν − ν 2 1 m 1 2 2n 1 m n 1 n ab α = amx − b x + ax bnx − bx = (m + n) ν ν ν We can choose the length scale g such that α = 1:

ab2 1 m = β = ν m + n ⇒ −m + n So we have: 2 f 000 + ff 00 + βf 0 = 0 (3) For what β is the boundary conditions fulfilled? Work on (3):

2 f 000 + ff 00 + βf 0 = 0 ⇒ 2 2 f 000 + (ff 00 + f 0 ) + (β 1)f 0 = 0 − Integrate: ∞ 2 f 00 + ff 0 + (β 1)g = 0, g(η) = f 0 dη > 0 − Zη Multiply with f 0: 2 f 00f 0 + ff 0 + (β 1)gf 0 = 0 − ⇒ 2 f 00f 0 + (ff 0 + gf 0) + (β 2)gf 0 = 0 − Integrate: 1 2 ∞ f 0 + fg + (β 2) gf 0dη = 0 2 − Zη Put in η = 0 and use the boundary conditions:

∞ (β 2) gf 0dη = 0 β = 2 − ⇒ ⇒ Z0 m β = = 2 3m + 2n = 0 −m + n ⇒ Solve for m and n: 1 3 m = , n = −2 4 B.13. INTRODUCTION TO TURBULENCE 155

B.13 Introduction to turbulence Exercise 1 Compute the far-field two-dimensional turbulent wake U(x, y) behind a cylinder.

Let U (x, y) = U U(x, y), U (x) = U (x, y = 0) 1 0 − s 1 Assume U U U U , u, v U , x L, y l s  0 ⇒ 1  0 ∼ s ∼ ∼ Continuity ∂U ∂V ∂V ∂ ∂U l + = 0 = (U U ) = 1 V U ∂x ∂y ⇒ ∂y −∂x 0 − 1 ∂x ⇒ ∼ s L

V Us L ∼ l ∼ The turbulent boundary layer momentum|{z}equation read: |{z}

∂U ∂U 1 ∂P ∂2U ∂ U + V = 0 + ν (uv) ∂x ∂y −ρ ∂x ∂y2 − ∂y ⇒ Disregard the pressure gradient and insert U = U U : 0 − 1 ∂U ∂U ∂2U ∂ (U U ) 1 V 1 = ν 1 (uv) 0 − 1 − ∂x − ∂y − ∂y2 − ∂y ⇒   Neglect small terms: ∂U ∂ U 1 = (uv) (1) 0 ∂x ∂y Self-similar hypothesis: U (x, y) 1 = f(η) Us(x) uv − 2 = g(η) Us where y ∂η y η ∂η 1 η = = l0 = l0, = l(x) ⇒ ∂x −l2 − l ∂y l Determine the terms in equation (1):

∂U1 ∂ ∂η l0 = (U f) = U 0f + U f 0 = U 0f U ηf 0 ∂x ∂x s s s ∂x s − s l

∂ ∂ 2 2 ∂η 2 1 (uv) = ( U g) = U g0 = U g0 ∂y ∂y − s − s ∂y − s l Insert into equation (1): l0 2 1 U (U 0f U ηf 0) = U g0 0 s − s l − s l ⇒

U0lUs0 U0l0 g0 = 2 f + ηf 0 − Us Us Boundary conditions: U ( ) = 0 f( ) = 0 1 −∞ −∞ U ( ) = 0 ⇒ f( ) = 0 ( 1 ∞ ( ∞ 156 APPENDIX B. RECITATIONS 5C1214

Similarity requires:

lUs0 l0 2 = const = const Us ⇒ Us Assume the x-dependence: m n Us = Ax , l = Bx

Then we get

n m 1 2m Bx Amx − = const x n + m 1 = 2m m = n 1 · ⇒ − ⇒ − ⇒

n 1 n Us = Ax − , l = Bx

We need one more condition. The momentum loss thickness is constant:

∞ U U ∞ U U U U ∞ U U θ = 1 dy = 0 − 1 1 0 − 1 dy = 1 1 1 dy U0 − U0 U0 − U0 − U0 U0 ≈ Z−∞   Z−∞   Z−∞  

1 ∞ 1 U1dy = CDd = const (Recitation 12) U0 ≈ 2 Z−∞

1 ∞ ∞ U1dy = Usl fdη = const U0 ⇒ Z−∞ Z−∞ const | {z } n 1 n 1 U l = Ax − Bx = const 2n 1 = 0 n = s ⇒ − ⇒ 2 ⇒

1 1 Us = Ax− 2 , l = Bx 2

For a sufficiently large Reynolds number, the wake will be turbulent.

lU AB Re = s = = const l ν ν ⇒ A turbulent wake will remain turbulent!

To determine the wake-velocity profile, we need to model the turbulent shear stress. E.g.

∂U uv = ν − T ∂y ⇒

2 ∂U1 1 U g = ν = ν U f 0 s T − ∂y − T s l ⇒  

νT νT g = f 0 g0 = f 00 −Usl ⇒ −Usl ⇒

νT U0lUs0 U0l0 f 00 = 2 f + ηf 0 −Usl − Us Us ⇒

2 U0l0l U0l Us0 f 00 + f 0 f = 0 νT − νT Us ⇒

2 U0B f 00 + (f 0 + f) = 0 (2) 2νT Equation (2) can be solved together with the boundary conditions

f( ) = 0 ∞ PSfrag replacements

x, x1 y, x2 z, x3 u, u1 v, u2 w, u3 x1 x2 0 xi 0 ˆ ri xi , t u x 0, tˆ i i  P tˆ= 0  x u1 u2 > u1 x1 x2 x3 0 xi ui dtˆ 0 dxi dui dtˆ ri dtˆ dr dtˆ i  P 1 P2 x1 x2 x3 R3 R2 R1 r3 r2 r1 π 2 + dϕ12 V (t) S (t) V (t + ∆t) V (t) S (t−+ ∆t) u n V (t + ∆t) p T0, U0 Tw L T0 U0 Gradient fields wi ∂p ∂xi ui Divergence free vectorfields // to boundary L h x1 x2 p0 > p1 p1 u n dS u n∆t · x y u0 p0 η = y √4νt u u0 y = η√4νt t η y ω˜(η) u ω = · 0 z √πνt t L }δ ω 0 U≈ y→, v x, u L U δ u0 η = y √νx/u0 u f 0 = u0 Blasius profile

δ∗ x Separation point = Pressure force ⇐ x y l

uT x y dx dy dx dl = ( dx,−dy) n dl = ( dy, dx) − i 1, j + 1 − i, j + 1 i + 1, j + 1 c c0 b b0 i 1, j i +− 1, j i, j Aabcd d d0 a a0 i 1, j 1 − i, j − 1 i + 1, j − 1 − j i i + 1 ui,j vi,j pi,j pi,j vi,j+1/2 vi,j 1/2 − ui 1/2,j −i 1 − 2 i 1 i + 2 i + 1 3 i + 2 1 j + 2 j j 1 − 2 j 1 − A B C u 3 2 ,1 v 3 1, 2 p1,1 B.14. OLD EXAMS 0 157 1 2 B.14 Old Examsi j Exam 031023 Inflow 1. Relative motion.Solid wall n Consider the relative motion of two fluid particles initially separated by the distance dx0. (Here x0 Γ0 i i and tˆ are the Lagrangian coordinates). Γ1 a) (5) Show that theΩ separation at time dtˆ is M 2 M ˆ 0 ∂ui 0 ˆ dri(dt) = dxi + 0 dxj dt. m ∂xj m + 2 b) (2) Use this relation1 to write down the expression for the deformation of the sides of a small cube aligned with the cohordinate directions. Thus, show that the components of the side aligned with the x-direction, Rδi1, isV deformed into Vh u (1) ∂ui dr = R(δ + dtˆ), u i i1 0 h ∂x1 Γ0 with analogous expressionsΓ1 for the other two sides. c) (4) Show that theΩ deformation rate of the volume of the cube is given by the divergence of the : to be updated 0 ˆ velocity field. Note that xi = xi at t = 0. : new values 2. Flow betw: eenold vaaluesrod and a cylinder. Consider a longihollo1 w cylinder with radius b, a concentric rod with radius a inside the cylinder, and − water occupying thei space between the rod and the cylinder, see figure B.14. The rod is rotating with the constanit+angular1 frequency ω. j 1 (10) Find the velo−citjy field of the water driven by the rotating rod and the gravitational acceleration g. j + 1 iteration direction z x y θ 1 n x y g i j fine grid (1) a b coarse grid (2) r

Figure B.12: Water and a concentric rotating rod inside a cylinder. PSfrag replacements

x, x1 y, x2 z, x3 u, u1 v, u2 w, u3 x1 x2 0 xi 0 ˆ ri xi , t u x 0, tˆ i i  P tˆ= 0  x u1 u2 > u1 x1 x2 x3 0 xi ui dtˆ 0 dxi dui dtˆ ri dtˆ dr dtˆ i  P 1 P2 x1 x2 x3 R3 R2 R1 r3 r2 r1 π 2 + dϕ12 V (t) S (t) V (t + ∆t) V (t) S (t−+ ∆t) u n V (t + ∆t) p T0, U0 Tw L T0 U0 Gradient fields wi ∂p ∂xi ui Divergence free vectorfields // to boundary L h x1 x2 p0 > p1 p1 u n dS u n∆t · x y u0 p0 η = y √4νt u u0 y = η√4νt t η y ω˜(η) u ω = · 0 z √πνt t L }δ ω 0 U≈ y→, v x, u L

δ u0 η = y √νx/u0 u f 0 = u0 Blasius profile

δ∗ x Separation point = Pressure force ⇐ x y l

uT x y dx dy dx dl = ( dx,−dy) n dl = ( dy, dx) − i 1, j + 1 − i, j + 1 i + 1, j + 1 c c0 b b0 i 1, j i +− 1, j i, j Aabcd d d0 a a0 i 1, j 1 − i, j − 1 i + 1, j − 1 − j i i + 1 ui,j vi,j pi,j pi,j vi,j+1/2 vi,j 1/2 − ui 1/2,j −i 1 − 2 i 1 i + 2 i + 1 3 i + 2 1 j + 2 j j 1 − 2 j 1 − A B C u 3 2 ,1 v 3 1, 2 p1,1 0 1 2158 APPENDIX B. RECITATIONS 5C1214 i j 3. Bernoulli’s equation Inflow Solid wall a) (3) Derive the following formula: n Γ0 ∂ui 1 ∂ uj = (ujuj ) + ijkωj uk. Γ1 ∂xj 2 ∂xi Ω M 2 b) (3) Use this in the momentum equation to derive Bernoulli’s equation for unsteady potential flow. M c) (3) Use the result in (a) to derive Bernoulli’s equation for steady inviscid flow. Discuss the validity m of the derived relation. m + 2 1 4. Laminar wake flow. h Consider the laminar wake flow downstream of a two-dimensional streamlined body at high Reynolds V number, see figure B.13. Assume that the wake is so weak that we can write u = U + u1 where u1 is Vh negative and much smaller than the free-stream velocity U. u a) (3) Motivate the usage of the equation uh Γ0 2 ∂u1 ∂ u1 Γ U = ν . 1 ∂x ∂y2 Ω : to be updated b) (2) Show that the mass flux Q1, in the direction of the wake is constant in x : new values ∞ : old values Q = ρu dy. ( ) i 1 1 1 ∗ − Z−∞ i i + 1 c) (7) A similarity solution can be found by scaling the wake velocity with Us(x) = u1(x, 0) so that j 1 f(η) = u1(x, y)/Us(x), where η = y/δ(x) is the similarity variable. Show, using ( ), that Us = k/δ(x), − ∗ j where k is a given constant. Find the similarity solution for u1. j + 1 U Y iteration direction U+u1 x y

n x y X i j fine grid (1) coarse grid (2)

Figure B.13: Wake downstream of a flat plate.

5. Mean heat equation. The heat equation for the instantaneous turbulent flow is

∂T˜ ∂T˜ ∂2T˜ + u˜j = κ . ∂t ∂xj ∂xj∂xj

(8) Derive the heat equation governing the mean flow. B.14. OLD EXAMS 159

Answers to exam in Fluid mechanics 5C1214, 2003-10-23

1. See Kundu & Cohen p. 57. 2. Flow between a rod and a cylinder.

ωa2 b2 r2 u = − θ b2 a2 r −   1 g ln(r/a) u = r2 a2 (b2 a2) z 4 ν − − − ln(b/a)   3. See Kundu & Cohen pp. 110-114. 4. Laminar wake flow.

2 Q1 U Uy u1 = e− 4νx 2ρ rπνx 5. See Kundu & Cohen pp. 511-512. PSfrag replacements

x, x1 y, x2 z, x3 u, u1 v, u2 w, u3 x1 x2 0 xi 0 ˆ ri xi , t u x 0, tˆ i i  P tˆ= 0  x u1 u2 > u1 x1 x2 x3 0 xi ui dtˆ 0 dxi dui dtˆ ri dtˆ dr dtˆ i  P 1 P2 x1 x2 x3 R3 R2 R1 r3 r2 r1 π 2 + dϕ12 V (t) S (t) V (t + ∆t) V (t) S (t−+ ∆t) u n V (t + ∆t) p T0, U0 Tw L T0 U0 Gradient fields wi ∂p ∂xi ui Divergence free vectorfields // to boundary L h x1 x2 p0 > p1 p1 u n dS u n∆t · x y u0 p0 η = y √4νt u u0 y = η√4νt t η y ω˜(η) u ω = · 0 z √πνt t L }δ ω 0 U≈ y→, v x, u L U δ u0 η = y √νx/u0 u f 0 = u0 Blasius profile

δ∗ x Separation point = Pressure force ⇐ x y l

uT x y dx dy dx dl = ( dx,−dy) n dl = ( dy, dx) − i 1, j + 1 − i, j + 1 i + 1, j + 1 c c0 b b0 i 1, j i +− 1, j i, j Aabcd d d0 a a0 i 1, j 1 − i, j − 1 i + 1, j − 1 − j i i + 1 ui,j vi,j pi,j pi,j vi,j+1/2 vi,j 1/2 − ui 1/2,j −i 1 − 2 i 1 i + 2 i + 1 3 i + 2 1 j + 2 j j 1 − 2 j 1 − A B C u 3 2 ,1 v 3 1, 2 p1,1 0 1 2 i j Inflow 160 Solid wall APPENDIX B. RECITATIONS 5C1214 n Γ0 Exam 040113 Γ1 1. (5) Consider the unsteΩady flow, 2 M u = u0, v = kt, w = 0, M where u0 and k are positivm e constants. Show that the streamlines are straight lines, and sketch them at two different times.m + 2Also show that any fluid particle follows a parabolic path as time proceeds. 2. (5) For surface waves1on water with finite depth h the phase speed is given by the relation c2 = g h k tanh(kh). Compare the group velocity to the phase speed in the limit of long and short waves. Make a rough 2D sketcV h of a wave packet and explain how it is moving. Vh 3. Consider a thin layeruof in contact with a solid flat vertical wall. See figure 1. The wall is subject to a constantuhtemperature gradient with increasing temperature in the downward direction. Due to a varying surfaceΓ0 tension, as a result of the temperature gradient, a constant shear stress τ at the free surfaceΓis1 acting upward. At the same time, the gravitational acceleration g is acting downward. Ω : to be updated a) (7) Assume constant layer thickness h and calculate the velocity field of the liquid layer. : new values b) (3) For what: oldlavaluesyer thickness h is the flux zero? i 1 − i z i + 1 j 1 − j j + 1 τ iteration direction x g y 1 n x y i x j h fine grid (1) coarse grid (2)

Figure B.14: Liquid film on vertical wall driven by gravity and . B.14. OLD EXAMS 161

4. a) (3) Show that

∂ui 1 ∂ uj = (uj uj ) + ijkωj uk ∂xj 2 ∂xi

b) (4) Derive the vorticity equation starting with the Navier–Stokes equation for incompressible flow. c) (3) Show that the following relation holds for incompressible flow and discuss its implication for inviscid flow

∂τij ∂ωk = µijk ∂xj − ∂xj

5. Consider the flow over an oscillating plate. a) (3) Motivate that the solution can be written as [u(y, t), 0, 0] and that it thus satisfies the equation

∂u ∂2u = ν ∂t ∂y2

b) (7) Show that

ky ω u(y, t) = Ue− cos(ky ωt), where k = . − 2ν r 6. a) (5) Derive the Reynolds average equation valid for turbulent flow. b) (5) Assume that the Reynolds stress can be modeled as a turbulent viscosity and introduce this into the Reynolds equation and simplify. PSfrag replacements

x, x1 y, x2 z, x3 u, u1 v, u2 w, u3 x1 x2 0 xi 0 ˆ ri xi , t u x 0, tˆ i i  P tˆ= 0  x u1 u2 > u1 x1 x2 x3 0 xi ui dtˆ 0 dxi dui dtˆ ri dtˆ dr dtˆ i  P 1 P2 x1 x2 x3 R3 R2 R1 r3 r2 r1 π 2 + dϕ12 V (t) S (t) V (t + ∆t) V (t) S (t−+ ∆t) u n V (t + ∆t) p T0, U0 Tw L T0 U0 Gradient fields wi ∂p ∂xi ui Divergence free vectorfields // to boundary L h x1 x2 p0 > p1 p1 u n dS u n∆t · x y u0 p0 η = y √4νt u u0 y = η√4νt t η y ω˜(η) u ω = · 0 z √πνt t L }δ ω 0 U≈ y→, v x, u L U δ u0 η = y √νx/u0 u f 0 = u0 Blasius profile

δ∗ x Separation point = Pressure force ⇐ x y l

uT x y dx dy dx dl = ( dx,−dy) n dl = ( dy, dx) − i 1, j + 1 − i, j + 1 i + 1, j + 1 c c0 b b0 i 1, j i +− 1, j i, j Aabcd d d0 a a0 i 1, j 1 − i, j − 1 i + 1, j − 1 − j i i + 1 ui,j vi,j pi,j pi,j vi,j+1/2 vi,j 1/2 − ui 1/2,j −i 1 − 2 i 1 i + 2 i + 1 3 i + 2 j + 1 2 162 APPENDIX B. RECITATIONS 5C1214 j j 1 − 2 j 1 Solutions to exam in Fluid mechanics 5C1214, 2004-01-13 − A 1. Streamline (fix t): B dx C = u = u0 x = u0s + a u 3 ds ⇒ 2 ,1 v1, 3 dy 2 = u = kt y = kts + b p1,1 ds ⇒ Then we see that y(x) is a linear function, 1 kt y = x + d(t) u i 0 j Particle path (fix x¯0): Inflow ∂x = u = u x = u tˆ+ x Solid wall ∂tˆ 0 ⇒ 0 0 n ∂y 1 2 Γ0 = u = ktˆ x = ktˆ + y ∂tˆ ⇒ 2 0 Γ1 Ω Then we see that y(x) is a parabola, M 2 1 k 2 2 M y = (x 2x0x + x0) + y0 2 u2 − m 0 m + 2 2. The wave number is defined as k = 2π/λ, where λ denotes the wave length of the wave. For long 1 waves, go to the limit k 0. For short waves, go to the limit k . h → → ∞ V Phase speed: V ω g tanh(kh) h c = = tanh(kh) = gh k k kh u r r uh Short waves: Γ0 tanh(x) 1 g lim = c = Γ1 x x x ⇒ k →∞ r Ω Long waves: : to be updated tanh(x) lim = 1 c = gh : new values x 0 → x ⇒ : old values p i 1 Group velocity: − i dω c 2kh cg = = 1 + i + 1 dk 2 sinh(2kh)   j 1 Short waves: − j x c lim = 0 cg = x j + 1 →∞ sinh(x) ⇒ 2 iteration direction Long waves: x x lim = 1 cg = c x 0 y → sinh(x) ⇒ Longer waves travel faster. n 2 x 1.5 y 1 0.5 i 0 j −0.5 fine grid (1) −1 −1.5

−2 coarse grid (2) 0 0.5 1 1.5 2 2.5 3

3. a) Assume steady, parallel flow u¯ = w(x)e¯z and solve the z-momentum equation with boundary conditions: ∂2w ∂w τ ν g = 0, w(0) = 0, (h) = ∂x2 − ∂x µ Integrate the equation once and introduce the second boundary condition: ∂w g ∂w gh τ 1 τ = x + A, (h) = + A = A = gh ∂x ν ∂x ν µ ⇒ ν ρ −   B.14. OLD EXAMS 163

Integrate the equation once more and introduce the first boundary condition: 1 g w = x2 + Ax + B, w(0) = 0 B = 0 2 ν ⇒ So we get: 1 g 1 τ w = x2 + gh x 2 ν ν ρ −   b) The flux per unit width of the wall can be written

h 1 g 1 1 τ h 1 1 τ 1 g Q = w dx = x3 + gh x2 = h2 h3 6 ν 2 ν ρ − 2 ν ρ − 3 ν Z0    0 Zero flux gives: 3 τ h = 2 ρg 4. a) Begin with the second term on the right hand side:

∂ ∂um ∂ui ∂uk ijkωjuk = ijkjlm (um)uk = (δklδim δkmδil)uk = uk uk ∂xl − ∂xl ∂xk − ∂xi ⇒

∂ui ∂uj ∂ui 1 ∂ uj = uj + ijkωj uk uj = (uj uj) + ijkωjuk ∂xj ∂xi ⇒ ∂xj 2 ∂xi b) Navier–Stokes momentum equation for incompressible flow:

2 ∂ui ∂ui 1 ∂p ∂ ui + uj = + ν ∂t ∂xj −ρ ∂xi ∂xj ∂xj Use the expression from 4. a):

2 ∂ui 1 ∂ 1 ∂p ∂ ui + (uj uj) + ijkωj uk = + ν ∂t 2 ∂xi −ρ ∂xi ∂xj ∂xj Take the curl of the equation. The curl of a gradient vanish: 2 ∂ωi ∂ ∂ ωi + imn (njkωjuk) = ν ∂t ∂xm ∂xj ∂xj ⇒ 2 ∂ωi ∂ ∂ ωi + nimnjk (ωj uk) = ν ∂t ∂xm ∂xj ∂xj ⇒ 2 ∂ωi ∂ ∂ ωi + (δij δmk δikδmj ) (ωj uk) = ν ∂t − ∂xm ∂xj ∂xj ⇒ 2 ∂ωi ∂ ∂ ∂ ωi + (ωiuk) (ωj ui) = ν ∂t ∂xk − ∂xj ∂xj ∂xj Use continuity. We end up with the vorticity equation: 2 ∂ωi ∂ωi ∂ui ∂ ωi + uj = ωj + ν ∂t ∂xj ∂xj ∂xj ∂xj

c) Right hand side: ∂ω ∂ ∂u ∂2u µ k = µ  m = µ  m = − ijk ∂x − ijk ∂x klm ∂x − kij klm ∂x ∂x j j  l  j l ∂2u ∂2u ∂2u µ(δ δ δ δ ) m = µ j i = µ 2u − il jm − im jl ∂x ∂x − ∂x ∂x − ∂x ∂x ∇ i j l  j i j j  Left hand side: ∂τ ∂ ∂u ∂u ij = µ i + j = µ 2u ∂x ∂x ∂x ∂x ∇ i j j  j i  Thus: ∂τij ∂ωk = µijk ∂xj − ∂xj Irrotational flow is not subject to viscous forces. 164 APPENDIX B. RECITATIONS 5C1214

5. a) Consider the Navier–Stokes equation in the x direction:

∂u ∂u ∂u ∂u 1 ∂p ∂2u ∂2u ∂2u + u + v + w = + ν + + ∂t ∂x ∂y ∂z −ρ ∂x ∂x2 ∂y2 ∂z2   With the current velocity field only terms with y derivatives will remain since there can be no change in the other directions, ∂u ∂2u = ν ∂t ∂y2

b) Make the ansatz: u = f(y)eiω t = f(y) cos(ω t). < Insert into the equation:   iω t iωt iωf(y)e = νf 00(y)e

iω λy f 00(y) f(y) = 0 with f(y) = e gives − ν iω iω ω 1 + i λ2 = 0 λ = = − ν ⇒  ν  ν √2 r r   ω Introduce k = , 2ν r yk(1+i) yk(1+i) f(y) = Ae + Be− , f(y) 0 as y A = 0 → → ∞ → We have

yk(1+i) iwt ky i(ωt ky) ky ky u = Be− e = Be− e − = Be− cos(ωt ky) = Be− cos(ky ωt) < < − −     Boundary condition at y = 0

At y = 0 we have u = U cos(ωt) B = U ⇒ So we have, ky ω u(y, t) = Ue− cos(ky ωt), where k = − 2ν r 6. a) Turbulent flow is inherently time dependent and chaotic. However, in applications one is not usually interested in knowing full the details of this flow, but rather satisfied with the influence of the turbulence on the averaged flow. For this purpose we define an ensemble average as

N 1 (n) Ui = ui = lim ui N N →∞ n=1 X (n) where each member of the ensemble ui is regarded as an independent realization of the flow.

We are now going to derive an equation governing the mean flow Ui. Divide the total flow into an average and a fluctuating component ui0 as

ui = ui + ui0 p = p + p0

and introduce into the Navier-Stokes equations. We find

∂ui0 ∂ui ∂ui ∂ui0 ∂ui ∂ui0 1 ∂p0 1 ∂p 2 2 + + uj0 + uj + uj + uj0 = + ν ui0 + ui ∂t ∂t ∂xj ∂xj ∂xj ∂xj −ρ ∂xi − ρ ∂xi ∇ ∇

We take the average of this equation, using

u0 = 0 u u = u u0 = 0 i j0 i i · j which gives B.14. OLD EXAMS 165

∂ui ∂ui 1 ∂p 2 ∂ + uj = + ν ui ui0 uj0 ∂t ∂xj −ρ ∂xi ∇ − ∂xj  ∂ui    = 0 ∂xi  where the average of thecontinuity equation also has been added. Now, let Ui = ui, as above, and drop the 0. We find the Reynolds average equations

∂Ui ∂Ui 1 ∂P ∂ + Uj = + (τij uiuj ) ∂t ∂xj −ρ ∂xi ∂xj −  ∂Ui  = 0 ∂xi  where uiuj is the Reynoldsstress. b) Assume the Reynolds stress:

2 u u = Kδ 2νT e i j 3 ij − ij

The first term on the right hand side is introduced to give the correct value of the trace of uiuj. Here the deformation rate tensor is calculated based on the mean flow, i.e.

1 ∂U ∂U 2 ∂U e = i + j r δ ij 2 ∂x ∂x − 3 ∂x ij  j i r  where we have assumed incompressible flow. Introducing this into the Reynolds average equations gives

∂Ui ∂Ui ∂ P 2 1 ∂P 2 + U = + k δ + 2 (ν + νT ) e = + (ν + νT ) U ⇒ ∂t j ∂x ∂x − ρ 3 ij ij −ρ ∂x ∇ i j j     i

where the last equality assumes that νT is constant, an approximation only true for very simple turbulent flow. It is introduced here only to point out the analogy between the molecular viscosity and the turbulent viscosity. PSfrag replacements

x, x1 y, x2 z, x3 u, u1 v, u2 w, u3 x1 x2 0 xi 0 ˆ ri xi , t u x 0, tˆ i i  P tˆ= 0  x u1 u2 > u1 x1 x2 x3 0 xi ui dtˆ 0 dxi dui dtˆ ri dtˆ dr dtˆ i  P 1 P2 x1 x2 x3 R3 R2 R1 r3 r2 r1 π 2 + dϕ12 V (t) S (t) V (t + ∆t) V (t) S (t−+ ∆t) u n V (t + ∆t) p T0, U0 Tw L T0 U0 Gradient fields wi ∂p ∂xi ui Divergence free vectorfields // to boundary L h x1 x2 p0 > p1 p1 u n dS u n∆t · x y u0 p0 η = y √4νt u u0 y = η√4νt t η y ω˜(η) u ω = · 0 z √πνt t L }δ ω 0 U≈ y→, v x, u L U δ u0 η = y √νx/u0 u f 0 = u0 Blasius profile

δ∗ x Separation point = Pressure force ⇐ x y l

uT x y dx dy dx dl = ( dx,−dy) n dl = ( dy, dx) − i 1, j + 1 − i, j + 1 i + 1, j + 1 c c0 b b0 i 1, j i +− 1, j i, j Aabcd d d0 a a0 i 1, j 1 − i, j − 1 i + 1, j − 1 − j i i + 1 ui,j vi,j pi,j pi,j vi,j+1/2 vi,j 1/2 − ui 1/2,j −i 1 − 2 i 1 i + 2 i + 1 3 i + 2 1 j + 2 j j 1 − 2 j 1 − A B C u 3 2 ,1 v 3 1, 2 p1,1 0 1 2 i j Inflow Solid wall n Γ0 Γ1 Ω M 2 M m m + 2 1 h V Vh u166 APPENDIX B. RECITATIONS 5C1214 uh Γ0Exam 041018 Γ1 Ω 1. The kinetic energy dT of an infinitesimal volume element, with density ρ, which is rotating with : to be updated angular velocity Ω can be expressed : new values 1 1 : old values dT = v vρ dV = (Ω x) (Ω x) ρ dV, i 1 2 · 2 × · × − i where v is the velocity of the volume element and x is the vector from the center of rotation O to i + 1 the volume element, see figure B.15. j 1 − j x30 j + 1 dV iteration direction x x0 y C x 1 x20 x3 n x10 x y z i j O fine grid (1) x2 coarse grid (2)x1 Figure B.15: Coordinate system and definitions

a) (5) Show that the total kinetic energy of the body can be expressed as

1 T = dT = J Ω Ω , 2 jl j l ZV

where Jjl is the moment of inertia tensor with respect to the origin of the unprimed system. It is defined as J = (x x δ x x )ρ dV. jl k k jl − j l ZV

b) (5) Show that you can relate Jjl to the moment of inertia tensor with respect to the center of mass C of the body Jjl in the following way

C C J = (z z δ z z )M + J , J = (x0 x0 δ x0 x0)ρ dV, jl k k jl − j l jl jl k k jl − j l ZV where M is the total mass of the body and the primed coordinates represent the coordinate system centered at the center of mass C of the body.

Hints: Integrals of the type V xk0 ρ dV vanishes as a result of the definition of the center of mass. The two coordinate systems are related by the formula x = z + x . R 0 B.14. OLD EXAMS 167

2. (10) Consider the laminar flow of a viscous fluid down a vertical cylindrical pipe with radius a. The flow is driven by the gravitational acceleration g. Calculate the velocity field. 3. Potential flow and conformal mapping a) (2) Show that the Kutta-Joukowski transformation ζ = z + a2/z maps a circle with radius a to a flat plate with length 4a. b) (2) Write down the complex potential of the flow around a circular cylinder with radius a at angle of attack α and with clockwise circulation Γ. The uniform far-field velocity has the magnitude U. c) (4) Show that a necessary condition for finite velocity at the trailing edge of the flat plate is () Γ = 4πUa sin α.

d) (2) How should one modify the circle in order to obtain a finite velocity at the leading edge? 4. Blasius boundary layer a) (2) Write down the boundary layer equations. b) (8) Make appropriate assumptions for similarity and reduce the boundary layer equations to an ordinary differential equation for the boundary layer over a flat plate (i.e there is no pressure gradient in the free stream). Also state the boundary conditions for the similarity function. c) (2) Sketch the streamwise and normal velocity profiles. 5. Turbulent flow a) (2) Define the velocity and length scales appropriate for turbulent flow near a wall, using the wall shear stress τw, the viscosity ν and the density ρ. b) (2) What is the law of the wall and what is the explicit functional dependence of the turbulent mean velocity in the intermediate region between the wall and the outer flow? c) (4) In two-equation turbulence models, partial differential equations for the turbulent kinetic energy ¯ k and the dissipation rate ε are solved. In those equations, the turbulent viscosity νT = uT l, where uT and l are the turbulent velocity and length scales, respectively. Use dimensional analysis to determine ¯ uT , l and νT in terms of k and ε. 168 APPENDIX B. RECITATIONS 5C1214

Solutions to exam in Fluid mechanics 5C1214, 2004-10-18

1. a) The kinetic energy of an infinitesimal volume element

1 1 dT = v vρ dV = (Ω x) (Ω x) ρ dV 2 · 2 × · × ⇒ 1 1 1 dT = v v ρ dV = ε Ω x ε Ω x ρ dV = (δ δ δ δ )x x Ω Ω ρ dV = 2 i i 2 ijk j k ilm l m 2 jl km − jm kl k m j l 1 (δ x x x x )Ω Ω ρ dV 2 jl k k − j l j l ⇒ 1 1 T = dT = dT (δ x x x x )ρ dV Ω Ω = J Ω Ω , 2 jl k k − j l j l 2 jl j l ZV ZV where J = (δ x x x x )ρ dV. jl jl k k − j l ZV b) The moment of inertia tensor

J = (δ x x x x )ρ dV = [δ (z + x0 )(z + x0 ) (z + x0 )(z + x0)]ρ dV = jl jl k k − j l jl k k k k − j j l l ZV ZV

[δ (z z + 2z x0 + x0 x0 ) (z z + z x0 + z x0 + x0 x0)]ρ dV = jl k k k k k k − j l j l l j j l ZV

(z z δ z z ) ρ dV + (x0 x0 δ x0 x0)ρ dV + k k jl − j l k k jl − j l ZV ZV

2zkδjl xk0 ρ dV + zj xl0ρ dV + zl xj0 ρ dV. ZV ZV ZV The three last terms vanishes due to the definition of the center of mass. So we have

J = (z z δ z z )M + J C , jl k k jl − j l jl where C M = ρ dV and J = (x0 x0 δ x0 x0)ρ dV. jl k k jl − j l ZV ZV 2. Poiseuille flow ( Pipe flow ) Use the Navier–Stokes equations (with no volume force) in cylindrical coordinates

∂u u2 1 ∂p u 2 ∂u r + (u )u θ = + ν 2u r θ ∂t · ∇ r − r −ρ ∂r ∇ r − r2 − r2 ∂θ   ∂u u u 1 ∂p 2 ∂u u θ + (u )u + r θ = + ν 2u + r θ ∂t · ∇ θ r −ρ r ∂θ ∇ θ r2 ∂θ − r2   ∂u 1 ∂p z + (u )u = + ν 2u ∂t · ∇ z −ρ ∂z ∇ z 1 ∂ 1 ∂u ∂u (r u ) + θ + z = 0. r ∂r r r ∂θ ∂z ∂p ∂p We know that = 0 and = 0 and can directly see that u = u = 0 satisfy the two first ∂θ ∂r r θ equations. From the continuity equation we get

∂u z = 0 u = u (r, θ) only. ∂z ⇒ z z Considering a steady flow we get from the Navier–Stokes equations

∂u ∂u (u )u = u z u z = ν 2u g · ∇ z z ∂z ⇒ z ∂z ∇ z − B.14. OLD EXAMS 169

∂u But we know that z = 0 from the continuity equation. We get ∂z 1 ∂ ∂u g ∂ ∂u g 2u = (r z ) = (r z ) = r ∇ z r ∂r ∂r ν ⇒ ∂r ∂r ν Integrate ∂u 1 g ∂u 1 g c r z = r2 + c z = r + 1 ∂r 2 ν 1 ⇒ ∂r 2 ν r Integrating again we get 1 g u = r2 + c ln r + c using the boundary conditions u (r = 0) < c = 0 z 4 ν 1 2 z ∞ ⇒ 1 ga2 We also have u = 0 at r = a and this gives c = and we have z 2 − 4ν g u = (a2 r2) z −4ν −

3. Potential flow and conformal mapping a) Equation for the circle z = aeiθ Equation for the plate

2 iθ iθ a iθ iθ e + e− ζ = z + = ae + ae− = 2a = 2a cos θ, z 2 which is a real function taking the values from 2a to 2a, thus a flat plate with length 4a. − b) Complex potential for a circular cylinder

2 iα a iα iΓ F = Uze− + U e + ln z z 2π

c) Complex velocity for the circular cylinder

2 dF iα a iα iΓ W = = Ue− U e + dz − z2 2πz Complex velocity in the ζ-plane

2 2 dF/dz iα a iα iΓ a ω = = Ue− U e + 1 dζ/dz − z2 2πz − z2    The flow field has singular points at the leading and trailing edges of the flat plate. Resolve the singularity at the trailing edge by choosing the circulation Γ so the numerator vanishes at z = a

iα iα iΓ Ue− Ue + = 0 − 2πa

iα iα e e− Γ = 4πUa − = 4πUa sin α. k 2i d) Move the point z = a inside of the circle by putting the center at z = λ. We still want a sharp trailing edge so the circle− crosses the real axis at z = a. The radius of such−a circle is a + λ and the circle is described by z = λ + (a + λ)eiθ − 4. Blasius boundary layer a) Boundary layer equations ∂u ∂u dU ∂2u u + v = U + ν (B.3) ∂x ∂y dx ∂y2 ∂u ∂v + = 0 (B.4) ∂x ∂y 170 APPENDIX B. RECITATIONS 5C1214

b) Seek a similarity solution where the dimensionless velocity u/U, where U is the constant free-stream velocity, only depends on the dimensionless wall distance y η = δ(x)

The stream function satisfies (2): ∂ψ ∂ψ u = , v = ∂y − ∂x Make the stream function dimensionless: ψ(x, y) f(η) = ψ = Uδf Uδ(x) ⇔

Determine the terms in equation (1): ∂ψ ∂f ∂η 1 u = = Uδ = Uδf 0 = Uf 0 ∂y ∂η ∂y δ

∂ψ ∂(Uδf) yδ0 v = = = Uδ0f Uδf 0 = Uδ0ηf 0 Uδ0f − ∂x − ∂x − − − δ2 −   ∂u ∂ δ0 = (Uf 0) = U ηf 00 ∂x ∂x − δ ∂u ∂ 1 = (Uf 0) = U f 00 ∂y ∂y δ ∂2u ∂ 1 1 = Uf 00 = U f 000 ∂y2 ∂y δ δ2   dU U = 0 dx Insert into equation (1):

δ0 1 1 Uf 0( U ηf 00) + (Uδ0ηf 0 Uδ0f)U f 00 = νU f 000 − δ − δ δ2 ⇒

2 δ0 2 δ0 2 δ0 1 U ηf 0f 00 + U ηf 0f 00 U ff 00 = νU f 000 − δ δ − δ δ2 ⇒

Uδ0δ f 000 + ff 00 = 0 ν   α Similarity requires that α is a constant. We can| {zintegrate} it with respect to x in order to find δ

Uδ δ 1 ανx 2ανx 0 = α δ2 = δ(x) = ν ⇒ 2 U ⇒ r U The value of the constant α is just a matter of scaling, we can choose it to be 1/2 so

νx δ(x) = . U r The ordinary differential equation becomes 1 f 000 + ff 00 = 0. 2 We have the boundary conditions

u(0) = 0 f 0(0) = 0 v(0) = 0 f(0) = 0  ⇒  u( ) = U f 0( ) = 1.  ∞  ∞ c) Figure B.16 shows the dimensionless streamwise andnormal velocity profiles. PSfrag replacements

x, x1 y, x2 z, x3 u, u1 v, u2 w, u3 x1 x2 0 xi 0 ˆ ri xi , t u x 0, tˆ i i  P tˆ= 0  x u1 u2 > u1 x1 x2 x3 0 xi ui dtˆ 0 dxi dui dtˆ ri dtˆ dr dtˆ i  P 1 P2 x1 x2 x3 R3 R2 R1 r3 r2 r1 π 2 + dϕ12 V (t) S (t) V (t + ∆t) V (t) S (t−+ ∆t) u n V (t + ∆t) p T0, U0 Tw L T0 U0 Gradient fields wi ∂p ∂xi ui Divergence free vectorfields // to boundary L h x1 x2 p0 > p1 p1 u n dS u n∆t · x y u0 p0 η = y √4νt u u0 y = η√4νt t η y ω˜(η) u ω = · 0 z √πνt t L }δ ω 0 U≈ y→, v x, u L U δ u0 η = y √νx/u0 u f 0 = u0 Blasius profile

δ∗ x Separation point = Pressure force ⇐ x y l

uT x y dx dy dx dl = ( dx,−dy) n dl = ( dy, dx) − i 1, j + 1 − i, j + 1 i + 1, j + 1 c c0 b b0 i 1, j i +− 1, j i, j Aabcd d d0 a a0 i 1, j 1 − i, j − 1 i + 1, j − 1 − j i i + 1 ui,j vi,j pi,j pi,j vi,j+1/2 vi,j 1/2 − B.14. OLD EXAMS 171 ui 1/2,j −i 1 − 2 i 5. Turbulent flow 1 i + 2 a) Velocity scale near the wall: i + 1 τw 3 uτ = i + 2 ρ 1 r j + 2 Length scale near the wall: j ν j 1 l = − 2 ∗ u j 1 τ − A b) Law of the wall B U y U + = = f(y+), where y+ = C uτ l u 3 ∗ 2 ,1 v 3 Functional dependence in the intermediate region 1, 2 p1,1 1 U + = ln y+ + B, κ 1 where κ is the Karmans constant. i c) Dimensions for k¯ and ε: j ¯ 1 2 2 k = 2 uiui [L T − ] Inflow ∂ui ∂uj 2 3 Solid wall ε = ν [L T − ]  ∂xj ∂xi n Γ0 Dimension analysis for uT :  m n 1 Γ u k¯ ε [LT − ] 1 T ∝ ⇒ Ω 1 2m 2m 2n 3n LT − = L T − L T − M 2 ⇒ M 2m + 2n = 1 n = 0 m 1 ( 2m 3n = 1 ⇒ (m = 2 ⇒ m + 2 − − − 1 ¯ uT k h ∝ p V Dimension analysis for l: m n V l k¯ ε [L] h ∝ ⇒ u 2m 2m 2n 3n L = L T − L T − uh ⇒ Γ0 2m + 2n = 1 n = 1 −3 Γ1 ( 2m 3n = 0 ⇒ (m = 2 ⇒ Ω − − : to be updated : new values7 : old values i 1 − i6 i + 1 j 15 − j j + 1 4 iteration directionη v x y3

n2 x u y i1 j fine grid (1)0 coarse grid (2) 0 0.2 0.4 0.6 0.8 1

Figure B.16: Velocity profiles of Blasius boundary layer. 172 APPENDIX B. RECITATIONS 5C1214

3 k¯ 2 l ∝ ε So we have 3 k¯ 2 ν = u l k¯ T T ∝ ε ⇒ p k¯2 ν T ∝ ε or k¯2 ν = C . T µ ε Appendix C

Study questions 5C1212

1. Define and use the Rankine-Hugoniot jump condition to compute the shock speed for the following problem u + uu = 0 < x < , t > 0 t x − ∞ ∞ 1 x 0 u(x, 0) = ≤ (0 otherwise

2. Define the entropy condition for a scalar conservation law. u + f(u) = 0 < x < , t > 0 t x − ∞ ∞ with a convex flux function f(u). The shock is moving with speed s and the state to the left is given by uL and the state to the right by uR. Why do we need an entropy condition ? 3. Write a difference approximation (in 1D) on conservative form and define the notation. 4. Solve u2 1 x < 0 ut + ( )x = 0, u(x, 0) = (C.1) 2 0 x 0 ( ≥ by the upwind scheme on the following form,

n+1 n ∆t n n n uj = uj uj (uj uj 1) − ∆x − − a) Will the numerical solution converge to the analytical solution? b) If not, suggest another way of solving C.1. 5. Define a total variation decreasing (TVD) method. Why is this a desirable property ? 6. Investigate the one-sided difference scheme

n+1 n ∆t n n uj = uj a (uj uj 1) − ∆x − − for the advection equation ut + aux = 0 Consider the cases a > 0 and a < 0. a) Prove that the scheme is consistent and find the order of accuracy. Assume k/h constant. b) Determine the stability requirement for a > 0 and show that it is unstable for a < 0. 7. Apply Lax-Friedrichs scheme to the linear wave equation

ut + aux = 0.

a) Write down the modified equation. b) What type of equations is this? c) What kind of behavior can we expect from the solution?

173 174 APPENDIX C. STUDY QUESTIONS 5C1212

8. A the three-point centered scheme applied to

ut + aux = 0, a > 0.

yields the approximation n+1 n a∆t uj = uj + (uj+1 uj 1) 2∆x − − Show that this approximation is not stable even though the CFL condition is fulfilled. 9. What does Lax’s equivalence theorem state? 10. What is the condition on the n n real matrix A(u) for the system ×

ut + Aux = 0

to be hyperbolic ? 11. The barotropic gas dynamic equations

ρt + ρux = 0 (C.2) 1 u + uu + p = 0 t x ρ x where p = p(ρ) = Cργ

i and C a constant, can be linearized by considering small perturbations (ρ0, u0) around a motionless gas.

a) Let ρ = ρ0 + ρ0 and u = u0 + u0 where u0 = 0. Linearize the system (C.2) and show that this yields the following linear system (the primes has been dropped)

ρt + ρ0ux = 0 a2 ut + ρx = 0 (C.3) ρ0

where a is the speed of sound. a and ρ0 are constants. b) Is the system given by (C.3) a hyperbolic system? Motivate your answer. c) Determine the characteristic variables in terms of ρ and u. d) Determine the partial differential equations the characteristic variables fulfill - characteristic for- mulation. e) Given initial conditions at t = 0 and let < x < (no boundaries) −∞ ∞ ρ(0, x) = sin(x) u(0, x) = 0

determine the analytical solution to (C.3) for t > 0. Hint: Start from the characteristic formulation. 12. The linearized form of (C.3) is given by

ρ 0 ρ ρ + 0 = 0, (C.4) u a2/ρ 0 u  t  0   x A

where a is the speed of sound. a and ρ0 are| constan{z ts.} a) Draw the domain of dependence of the solution to the system (C.4) in a point P in the x-t plane.

b) The system is solved numerically on a grid given by xj = j∆x, j = 0, 1, 2... and tn = n∆t, n = 0, 1, 2, ..... using an explicit three-point scheme, see the figure below. Draw the domain of dependence of the numerical solution at P (in the same figure as a)) of the three-point scheme in the case when i) the CFL condition is fulfilled ii) the CFL condition is NOT fulfilled. Assume that P is a grid point. PSfrag replacements

x, x1 y, x2 z, x3 u, u1 v, u2 w, u3 x1 x2 0 xi 0 ˆ ri xi , t u x 0, tˆ i i  P tˆ= 0  x u1 u2 > u1 x1 x2 x3 0 xi ui dtˆ 0 dxi dui dtˆ ri dtˆ dr dtˆ i  P 1 P2 x1 x2 x3 R3 R2 R1 r3 r2 r1 π 2 + dϕ12 V (t) S (t) V (t + ∆t) V (t) S (t−+ ∆t) u n V (t + ∆t) p T0, U0 Tw L T0 U0 Gradient fields wi ∂p ∂xi ui Divergence free vectorfields // to boundary L h x1 x2 p0 > p1 p1 u n dS u n∆t · x y u0 p0 η = y √4νt u u0 y = η√4νt t η y ω˜(η) u ω = · 0 z √πνt

L }δ ω 0 U≈ y→, v x, u L U δ u0 η = y √νx/u0 u f 0 = u0 Blasius profile

δ∗ x Separation point = Pressure force ⇐ x y l

uT x y dx dy dx dl = ( dx,−dy) n dl = ( dy, dx) − i 1, j + 1 − i, j + 1 i + 1, j + 1 c c0 b b0 i 1, j i +− 1, j i, j Aabcd d d0 a a0 i 1, j 1 − i, j − 1 i + 1, j − 1 − j i i + 1 ui,j vi,j pi,j pi,j vi,j+1/2 vi,j 1/2 − ui 1/2,j −i 1 − 2 i 1 i + 2 i + 1 3 i + 2 1 j + 2 j j 1 − 2 j 1 − A B C u 3 2 ,1 v 3 1, 2 p1,1 0 1 2 i j Inflow Solid wall n Γ0 Γ1 Ω M 2 M m m + 2 1 h V Vh u uh Γ0 Γ1 Ω : to be updated : new values : old values i 1 − i i + 1

j

iteration direction x 175

y

n

mn

o p

1t m o

n+1 p

o

p

o

p o

x p o

y p

o

p

o

p

k o

i p

j h k

o

p

ij gh

l

i g

t l fine grid (1) n coarse grid (2) j 1 j j + 1 −

13. To solve Euler equations in 1D

ρt + ρux + uρx = 0 1 u + uu + p = 0 t x ρ x 2 pt + ρc ux + upx = 0

How many boundary conditions must be added at (motivate your answer) inflow boundary when the flow is a) Supersonic b) Subsonic outflow boundary when the flow is c) Supersonic d) Subsonic

14. Describe the ideas behind a flux splitting scheme for solving a non-linear hyperbolic system of equa- tions, Ut + F (U)x = 0

15. a) Show that a vector field wi can be decomposed into

∂p wi = ui + ∂xi

where u is is divergence free and parallel to the boundary. b) Apply this to the Navier-Stokes equations, show that the pressure term disappears and recover an equation for the pressure from the gradient part.

16. From the differential form of the Navier-Stokes equations obtain a) the Navier-Stokes equations in integral form used in finite-volume discretizations, b) a variational form of the Navier-Stokes equations used in finite-element discretizations.

17. a) Write down the appropriate function spaces for the pressure and velocity used to define weak solutions to the Navier-Stokes equations. b) Explain the concept of essential and natural boundary conditions.

18. a) How is a finite-element approximation defined? b) Explain how to convert a FEM discretization to an algebraic problem, e.g. that the Navier-Stokes equations yield

νK + C(u) G u f = GT 0 p 0      

19. a) By choosing zh = uh in the finite element approximation of the Stokes problem, show that any Galerkin velocity solution is stable. b) Describe and interpret the LBB condition. 176 APPENDIX C. STUDY QUESTIONS 5C1212

20. Choice of elements. Discrete elements pairs a) constant pressure-bilinear velocities, b) the Taylor-Hood pair, c) a stable choice with piecewise linear velocities.

21. a) Derive the finite volume (FV) discretization on arbitrary grids of the continuity equation (∂ui/∂xi = 0), b) derive the FV discretization for Laplace equation on a Cartesian grid, c) show that both are equivalent to a central difference approximation for Cartesian grids. 22. Derive the finite element (FEM) discretization for Laplace equation on a Cartesian grid and show that it is equivalent to a central difference approximation. 23. Iterative techniques for linear systems. a) Define Gauss-Seidel iterations for the Laplace equations, b) Define the 2-level multigrid method for the Laplace equation, 24. State the difficulties associated with the the finite-volume discretizations of the Navier-Stokes equa- tions on a colocated grid? and show the form of the spurious solution which exist. 25. a) Define an appropriate staggered grid that can be used for the discretization of the Navier-Stokes equations, b) write down the FV discretization of the Navier-Stokes equations on a staggered cartesian grid, c) discuss how to treat noslip and inflow/outflow boundary conditions. 26. Time dependent flows. a) Define a simple projection method for the time dependent Navier-Stokes equations

d u N(u) G u f + = dt 0 D 0 p g         b) show in detail the equation for the pressure to be solved at each time step and discuss the boundary conditions for the pressure. 27. Time step restriction for Navier-Stokes solutions. a) Motivate the use of an appropriate form of the advection-diffusion equation as a model equation for stability analysis, b) derive the time step restrictions for the 1D version of that equation, c) state the 2D equivalent of that restriction. Bibliography

[1] D.J. Acheson, 1990, Elementary , Oxford University Press. [2] J.D. Anderson, Jr., 1995, Computational Fluid Dynamics, The basics with applications, Mc Graw-Hill. [3] C.A.J. Fletcher, 1991, Computational Techniques for Fluid Dynamics Volume 1, Second Edition, Springer-Verlag. [4] C.A.J. Fletcher, 1991, Computational Techniques for Fluid Dynamics, Volume 2, Second Edition, Springer-Verlag. [5] M. Griebel, T. Dornseifer and T. Neunhoeffer, 1998, Numerical Simulation in Fluid Dynamics, A practical Introduction, SIAM Monographs on Mathematical Modeling and Computation. [6] P.K. Kundu and I.M. Cohen, 2002, Fluid Mechanics, Second Edition, Academic Press. [7] R.L. Panton, 1995, Incompressible Flow, Second Edition, Wiley-Interscience. [8] R. Peyret, T.D. Taylor, 1983, Computational Methods for Fluid Flow, Springer-Verlag.

[9] J.C. Tannehill, D.A. Anderson and R.H. Pletcher, 1997, Computational Fluid Mechanics and Heat Transfer, Second Edition, Taylor and Francis. [10] P. Wesseling, 2001, Principles of Computational Fluid Dynamics, Springer-Verlag.

177