bachelor-thesis immersed boundary methods: simulation of

52
Department of Mathematics of the TU Dortmund Bachelor-Thesis Immersed Boundary Methods: Simulation of Flows with Moving Elastic Boundaries and Application to Cardiac Fluid Dynamics authored by Constantin Christof and supervised by Jun.-Prof. Dr. Dominik Göddeke May 2013

Upload: others

Post on 03-Dec-2021

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Bachelor-Thesis Immersed Boundary Methods: Simulation of

Department of Mathematicsof the TU Dortmund

Bachelor-Thesis

Immersed Boundary Methods:Simulation of Flows with Moving Elastic

Boundaries and Application toCardiac Fluid Dynamics

authored byConstantin Christofand supervised by

Jun.-Prof. Dr. Dominik Göddeke

May 2013

Page 2: Bachelor-Thesis Immersed Boundary Methods: Simulation of

Contents

Introduction 1

1 Numerical Framework 21.1 Governing Equations and Notations 21.2 General Remarks on the Finite Difference Method 41.3 Discretization of the Navier Stokes Equations 71.4 Discretization of the Boundary Conditions 121.5 The SOLA Procedure 141.6 The Lid-Driven Cavity Test Case 16

2 Immersed Boundary Methods 212.1 Discrete Forcing Methods 222.2 Continuous Forcing Methods 272.3 Immersed Elastic Boundaries 28

3 Simulation of Thin Elastic Boundaries 333.1 Closed Ellipse-Shaped Boundaries 333.2 Non-Closed Boundaries 373.3 Cardiac Flows 40

Conclusion 47

List of Symbols 48

Bibliography 49

Page 3: Bachelor-Thesis Immersed Boundary Methods: Simulation of

Introduction

This bachelor thesis aims to give an overview of the Immersed Boundary methodology (hereinafter alsoreferred to as IB-method), its implementation within Finite Difference based simulation programmesand the areas of fluid dynamics it can be applied to. It summarizes all of the information that is neededto create a reliable simulation code with full IB-functionality and contains a number of examples thatdemonstrate the usefulness and accuracy of the Immersed Boundary approach. Although IB-techniquesare not restricted to viscous incompressible fluids, in this work we will only consider flows that can bedescribed by the incompressible Navier Stokes equations, namely

ρ

(∂u

∂t+ u · ∇u

)− µ∇2u +∇p = f

∇ · u = 0.

Additionally, we will confine ourselves to two-dimensional situations. By doing this, we follow the ap-proach of Charles S. Peskin who introduced the Immersed Boundary technique in 1972 and discoveredthe remarkable advantages of this method in the field of cardiac fluid dynamics (see [Pe1]). Basically,this thesis can be divided into three different parts. The first one is devoted to the general frameworkthe simulations and considerations of the subsequent chapters are based on. Consequently, the focusof this section lies on the governing equations and the used Finite Difference discretization and solvertechniques. The Finite Difference solution algorithm that is applied in this work is basically an elab-orated version of the so-called SOLA procedure that was developed in Los Alamos in 1975 (see [Hir]and [Gri]). It is premised on the superposition of three ordinary equidistant meshes and makes use of theghost-cell method and a dynamical time step calculation that was introduced by Tome in 1994 (see [To]).Details regarding this procedure can be found in the sections 1.2, 1.3, 1.4 and 1.5. At the end of the firstpart it is demonstrated that our algorithm produces accurate results when it is applied to the well-knownlid-driven cavity test case. This validation of the SOLA procedure is based on a series of numerical ex-periments that were conducted by U. Ghia in 1982 (see [Gh]). The second part of this work addresses theImmersed Boundary principle, the ideas it is based on and the different ways it can be implemented. Here,we show that IB-methods can be divided into two different groups according to the way the boundaryconditions are incorporated into the governing differential equations. The two principles that underliethis categorization, namely the Continuous Forcing approach and the Discrete Forcing approach, arediscussed on a general level such that the basic conclusions can be applied to fields other than fluid dy-namics, too. Additionally, this second section addresses the numerous boundary material laws that can beimplemented by use of the IB-approach. Finally, the third part of this work deals with the fluid dynamicsproblems Immersed Boundary methods can be applied to. In order to demonstrate the advantages and theaccuracy of the methodology, the first of the presented test cases, the simulation of the pressure-drivenevolution of an ellipse-shaped closed boundary, is used to validate our solution algorithm. After this, wereproduce a couple of experiments conducted by Zhu and Peskin in 2003 (see [Zh1]) and show that theIB-approach is especially well suited for the simulation of elastic, moving, thin-lined boundaries. Theend of the third part is dedicated to the application of IB-methods in biological fluid dynamics and thepossibilities this methodology offers in medicine. In this section we focus on the numerical experimentsPeskin conducted on the topic of cardiac flows and demonstrate why the IB-approach is particularly suit-able for the simulation of such fluid dynamics problems. Finally, in the last chapter we summarize theresults of this work and give a concluding overview of the different aspects of the topic.

1

Page 4: Bachelor-Thesis Immersed Boundary Methods: Simulation of

1 Numerical Framework

The following section focuses on the solution algorithm that is applied in this thesis. It describes theprogrammes that are used to solve the Navier Stokes equations and addresses the basic numerical tech-niques that underlie the tests and considerations of the subsequent chapters. Because of this, it can beread independently of the rest of this work and used as a manual for the implementation of a functioningand reliable Finite Difference simulation code.

1.1 Governing Equations and Notations

As stated in the introduction, in the following we restrict ourselves to viscous incompressible fluids andthus to flows that can be described by the incompressible Navier Stokes equations

ρ

(∂u

∂t+ u · ∇u

)− µ∇2u +∇p = f in Ω× [0, T ] (1.1)

∇ · u = 0 in Ω× [0, T ]. (1.2)

Here, the variables u = u(x, t) and p = p(x, t) denote the velocity and the pressure of the fluid withrespect to the Eulerian variable x ∈ Ω and the time t ∈ [0, T ]. Since we will only regard two-dimensionalflows, we can also write u = (ux, uy) = (ux(x, y, t), uy(x, y, t)) and p = p(x, y, t). The same appliesto the forcing term f = (fx(x, y, t), fy(x, y, t)) on the right-hand side that represents the density ofthe body forces acting on the fluid. The variables ρ and µ denote the density and the viscosity of thesubstance that fills the domain Ω. Unless stated otherwise, we will assume that these two parameters areconstant throughout the entire fluid domain. Technically, the two equations (1.1) and (1.2) are a directconsequence of the laws of conservation of mass and momentum. The second of the above identities istherefore also referred to as continuity equation. More details regarding the physical background and thederivation of the Navier Stokes equations can be found in [Si]. Beside the above formulation, we willalso need the dimensionless version of (1.1) and (1.2). This non-dimensionalized form can be obtainedby selecting appropriate scales L and U for the quantities x and u. The change of variables

x :=1

Lx u :=

1

Uu t :=

U

Lt p :=

1

ρU2p (1.3)

then leads to

∂u

∂t+ u · ∇u− 1

Re∇2u + ∇p =

L

ρU2f =: f in Ω× [0, T ] =

1

LΩ× [0,

U

LT ] (1.4)

∇ · u = 0 in Ω× [0, T ] =1

LΩ× [0,

U

LT ], (1.5)

where ∇ and Re denote the Nabla operator with respect to x and the so-called Reynolds number ρLU/µ.Since the appearance of the Reynolds-number clarifies which of the two formulations is used, we candrop the tildes for ease of reading and simply write

∂u

∂t+ u · ∇u− 1

Re∇2u +∇p = f in Ω× [0, T ] (1.6)

∇ · u = 0 in Ω× [0, T ]. (1.7)

2

Page 5: Bachelor-Thesis Immersed Boundary Methods: Simulation of

The basic advantage of this second formulation of the Navier Stokes equations is the reduced number ofparameters. While the equations (1.1) and (1.2) depend on both the density ρ and the viscosity µ, thesystem (1.6) and (1.7) is only influenced by the dimensionless number Re. Thus, the second version ismore suitable when related fluid dynamics problems have to be compared or when the comparability oftwo different experiments has to be assessed. However, both forms of the Navier Stokes equations canbe found in today’s literature depending on the respective situation and the focus of the author, and sinceboth the formulations show the same numerical behaviour, we will not regard them as separate problems.Independently of whether the ordinary or the dimensionless version is used, we will require initial andboundary conditions that describe the circumstances of the fluid dynamics experiment and ensure thesolvability of the resulting system of partial differential equations. In order to enable the definition ofthese constraints, we will assume that the fluid domain Ω is two dimensional, bounded, open and that itsboundary ∂Ω is – at least piecewise – describable by a differentiable curve. In this situation the velocityvector u can be decomposed into its components un(x, y, t) and ut(x, y, t) normal and tangential to ∂Ωand we can distinguish between the following types of boundary conditions:

1. Initial Condition: The initial state of the fluid domain at the beginning of the time interval isprescribed:

u(x, 0) = u0(x) ∀x ∈ Ω. (1.8)

2. Dirichlet Boundary Condition: The velocity u = (un, ut) is prescribed on a subset Σ ⊂ Ω ofthe fluid domain or a subset Σ ⊂ ∂Ω of its boundary:

u(x, t) = v(x, t) ∀(x, t) ∈ Σ× [0, T ]. (1.9)

Dirichlet boundary conditions for the pressure p can be defined analogously.

3. ‘Do Nothing’ Neumann Condition: If the fluid leaves the domain Ω by crossing a subset Γ ofthe boundary ∂Ω, it is postulated that the derivatives of the velocities un and ut in the direction ofthe normal to ∂Ω vanish on the border Γ:

∂un(x, t)

∂n= 0 and

∂ut(x, t)

∂n= 0 ∀(x, t) ∈ Γ× [0, T ]. (1.10)

The same formulation can be used if the pressure gradient is supposed to be zero on a subset ofthe boundary:

∂p(x, t)

∂n= 0 ∀(x, t) ∈ Γ× [0, T ]. (1.11)

4. ‘No Slip’ Condition: If a solid structure S = S(t) ⊂ Ω moves through the domain Ω, it ispostulated that the fluid at the interface ∂S(t) has zero velocity relative to the structure:

u(x, t) = uStruct(x, t) ∀(x, t) ∈ ∂S(t)× [0, T ]. (1.12)

From the physical point of view, this condition reflects the assumption that close to the interfaceadhesion is stronger than cohesion. Details regarding the underlying physics can be found in [Si].

It should be noted that this list is not exhaustive since there are a lot of other types of constraints that aredefinable, for example, the ‘Free Slip’ or the Navier condition (see, e.g., [Gri]). Additionally, it is easilyseen that the above classes of boundary conditions are not completely distinct. If we have, for example, anon-moving structure S, the ‘No Slip’ condition can also be interpreted as a Dirichlet boundary conditionwith v = 0 and Σ = ∂S. However, the above notation will be sufficient for our needs in the subsequentchapters and we will thus not go into further detail regarding the classification of boundary conditionsin this work. What should be kept in mind is that the Dirichlet and ‘Do Nothing’ type constraints aretypically used when inflowing and outflowing fluids are present, for example, in a flow passage. Theyare therefore also referred to as inflow and outflow conditions.

3

Page 6: Bachelor-Thesis Immersed Boundary Methods: Simulation of

1.2 General Remarks on the Finite Difference Method

Finite Difference (or simply FD) techniques rank among the oldest methods for the numerical solutionof partial differential equations. They are based on the idea to discretize the given problem by replacingall occurring derivatives with Finite Difference approximations. The resulting system of linear equationsis then solvable by use of iterative procedures like the SOR algorithm or the Conjugate Gradient method.The basic advantage of the FD approach is its simplicity and its therefore very good cost-benefit ratio.Because of these two aspects it is – in spite of the fact that Finite Element and Finite Volume methodsare mostly more flexible – often a valid option for the numerical simulation of fluid dynamics prob-lems. In order to illustrate the functionality and the characteristics of the Finite Difference technique,we will follow the approach of [Gri] and initially study its behaviour when applied to a one-dimensionalconvection-diffusion equation of the form

−kd2u

dx2+

d(vu)

dx= 0 in Ω = [a, b] (1.13)

which is subjected to the Dirichlet boundary conditions

u(a) = 1 and u(b) = 0. (1.14)

Here, u denotes the variable of interest, for example, the temperature or the concentration of a chemicalthat is subjected to convection with the average velocity v and diffusion with the diffusivity k. Unlessstated otherwise, we will assume that the latter two parameters are constant throughout the interval Ω.In order to enable the application of the Finite Difference method to the problem (1.13) and (1.14),we define an equidistant mesh of width h = (b − a)/N for some N ∈ N that consists of the nodesa = x0 < x1 < ... < xN = b and serves as a substitute for the continuous interval Ω.

Ω

a bx x x x...1 2 3 N-1

1h

Figure 1.1: One-dimensional equidistant mesh

Using the nodes of this mesh, we can approximate the derivatives in (1.13) by, for example, the formulas

u(x+ h)− u(x− h)

2h=

du

dx+O(h2) (1.15)

u(x+ h)− 2u(x) + u(x− h)

h2=

d2u

dx2+O(h2) (1.16)

and thus obtain a discrete version of the original problem. The resulting linear system has the form

u(x0) = 1 u(xN ) = 0 (1.17)

k−u(xi+1) + 2u(xi)− u(xi−1)

h2+ v

u(xi+1)− u(xi−1)

2h= 0 ∀i = 1, ..., N − 1, (1.18)

and can apparently also be written as

A

u(x0)...

u(xN )

=

1...0

(1.19)

for some A ∈ R(N+1)×(N+1) whose coefficients are defined by (1.17) and (1.18). The discrete FiniteDifference approximation (u(x0), ..., u(xN ))T of the function u that satisfies the continuous differentialequation (1.13) and (1.14) can now be obtained by applying an iterative linear system solver to (1.19).

4

Page 7: Bachelor-Thesis Immersed Boundary Methods: Simulation of

The above approach is, of course, not restricted to convection-diffusion type problems but applicable toall kind of differential equations. However, the stability of the naive ‘replacement’ strategy is generallynot guaranteed. Especially when applied to equations that model transport, the Finite Difference approx-imation tends to produce non-physical oscillations and thus unusable solutions (see figure 1.2). In caseof the equations (1.13) and (1.14) and the formulas (1.15) and (1.16) it can be shown that theses effectsoccur when the so-called Peclet number

Pe =vh

2k(1.20)

is greater than one. A detailed derivation of this statement can be found in [Pey].

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 10

0.2

0.4

0.6

0.8

1

1.2

1.4

1.6

Figure 1.2: Numerical (red) and exact (blue) solution of (1.13) and (1.14) (v = 1, k = 0.01, h = 1/15and Ω = [0, 1]). The oscillations obviously depend on the derivative of the analytic solution.

In order to remove these oscillations we have to apply some sort of stabilisation technique. One optionis, for example, the so-called Donor Cell scheme that was introduced by R. A. Gentry in 1966 (see [Ge]).This method can be used to stably discretize derivatives of the form d(vu)

dx , where the variable v is allowedto be nonconstant, too. It is based on the approach that the oscillation of the numerical solution can beprevented by adapting the discretization to the direction of the transport. In order to apply the Donor Cellscheme to the equations (1.13) and (1.14), we assume that the values of the velocity v are known in themidpoints of the intervals [xi−1, xi] for i = 1, ..., N .

Ω

x x xi-1 i i+2

4h

x i+1v v vi-1 i i+1

Figure 1.3: One-dimensional Donor Cell discretization

In this case we can define the adaptive difference quotient

d(vu)

dx≈ viu(xr)− vi−1u(xl)

h(1.21)

with

xr :=

xi if vi ≥ 0xi+1 if vi < 0

and xl :=

xi−1 if vi−1 ≥ 0xi if vi−1 < 0

. (1.22)

5

Page 8: Bachelor-Thesis Immersed Boundary Methods: Simulation of

In contrast to (1.15), the above formula guarantees that the node in the direction against the velocity vis used to approximate the derivative (the left node if v > 0 and the right if v < 0). This ‘upwind’ dis-cretization ensures the numerical stability since it takes into account the physical direction of informationexchange (see, for example, [Pey] and figure 1.4). Using the absolute value function |...|, we can combinethe equations (1.21) and (1.22) and hence get the so-called Donor Cell discretization scheme

d(vu)

dx≈vi(u(xi) + u(xi+1))− vi−1(u(xi−1) + u(xi))

2h

+|vi| (u(xi)− u(xi+1))− |vi−1| (u(xi−1)− u(xi))

2h(1.23)

that allows a stable solution of the convection-diffusion problem (1.13) and (1.14). However, the stabilitythat is provided by (1.23) does not come for free since the unilateral coupling in (1.21) reduces theorder of the resulting Finite Difference method by one. A possible way to increase the accuracy is thecombination of (1.15) and (1.23) by use of a weighting parameter γ ∈ [0, 1]. This results in the formula

d(vu)

dx≈ (1− γ)

[u(x+ h)− u(x− h)

2h

]+ γ

[vi(u(xi) + u(xi+1))− vi−1(u(xi−1) + u(xi))

2h

+|vi| (u(xi)− u(xi+1))− |vi−1| (u(xi−1)− u(xi))

2h

].

(1.24)

In practice, the value of γ that has to be chosen in this equation in order to get the best ratio between ac-curacy and stability is mostly unknown and thus has to be estimated by some sort of heuristic approach.An example of such an estimate can be found in the following section (see (1.40)).

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 10

0.2

0.4

0.6

0.8

1

1.2

1.4

1.6

Figure 1.4: Numerical (red) and exact (blue) solution of the convection-diffusion differential equationdefined by (1.13) and (1.14) in the situation of figure 1.2 (v = 1, k = 0.01, h = 1/15, on theinterval Ω = [0, 1]). The used algorithm is stabilised by an upwind discretization scheme.

6

Page 9: Bachelor-Thesis Immersed Boundary Methods: Simulation of

1.3 Discretization of the Navier Stokes Equations

When it comes to the Navier Stokes equations, discretization gets more difficult. If we look at the non-dimensionalized formulation (1.6) and (1.7) – we will stick to this version since this will allow us todirectly compare our results with [Gh] in section 1.6 – we have to deal with the following system ofcoupled differential equations:

∂ux∂t

+∂(u2

x)

∂x+∂(uxuy)

∂y− 1

Re

[∂2ux∂x2

+∂2ux∂y2

]+∂p

∂x= fx (1.25)

∂uy∂t

+∂(uxuy)

∂x+∂(u2

y)

∂y− 1

Re

[∂2uy∂x2

+∂2uy∂y2

]+∂p

∂y= fy (1.26)

∂ux∂x

+∂uy∂y

= 0. (1.27)

The expressions

ux∂ux∂x

, uy∂ux∂y

, ux∂uy∂x

and uy∂uy∂y

(1.28)

that appear in the original formulation have been rewritten here by use of the continuity equation (1.7).Obviously, in contrast to the convection-diffusion equation in the previous section, the discretization ofthe above system requires a two-dimensional Finite Difference scheme that allows to discretize all of theinvolved equations at once. However, two major problems arise when we try to apply a Finite Differencemethod to the system (1.25), (1.26) and (1.27). On the one hand, we have to deal with the same stabilityissues as in section 1.2 since the derivatives

∂(u2x)

∂x,

∂(uxuy)

∂y,

∂(uxuy)

∂xand

∂(u2y)

∂y(1.29)

provoke the same oscillating behaviour as the convective part of equation (1.13). Therefore, a stabili-sation technique has to be applied. On the other hand, it is not guaranteed that every FD discretizationscheme preserves the coupling of the continuous equations (1.25), (1.26) and (1.27). The latter problemappears, for example, when we consider the square fluid domain Ω = [0, 1]2 and use an ordinary twodimensional equidistant mesh in combination with the Finite Difference formulas (1.15) and (1.16) todiscretize the problem analogously to section 1.2 (see figure 1.5).

Ω

(0,0)

h

(1,0)

(0,1)

x0,0

x0,1 x1,1

x1,0 ...

...

xi,j

i

j

xN,N

Figure 1.5: Ordinary two-dimensional equidistant mesh on Ω = [0, 1]2

7

Page 10: Bachelor-Thesis Immersed Boundary Methods: Simulation of

In this case, if we use the pressure and the velocities at the mesh nodes as unknowns of the discreteproblem, the resulting solution shows large oscillations in the variable p. The basic reason for this can beillustrated by looking at the homogeneous Navier Stokes equations (f = 0) with u0 = 0 and the Dirichletboundary condition u = 0 on ∂Ω. The exact solution of this problem is given by u = 0 and p = const.By solving the discrete equations that we have derived by use of the ordinary mesh, however, we get

u(xi,j) = 0 ∀i, j = 0, .., N

p(xi,j) = p1 ∀i, j with i+ j even

p(xi,j) = p2 ∀i, j with i+ j odd,

where p1 and p2 can be chosen at will (see [Gri]), and thus a solution that allows arbitrarily high oscil-lations. In order to avoid this effect, we have to use a more elaborated mesh, for example, a so-calledstaggered grid. A grid of this type consists of three ordinary equidistant meshes – one for each of theunknown variables ux, uy and p – that are, as the name implies, staggered with respect to one another.In the following we will stick to the approach of [Gri] and [Hir] and use cells as shown in figure 1.6.

p i,j-1

p i,j

p i,j+1

p i+1,j-1

p i+1,j

p i+1,j+1

ux,i,j-1

ux,i,j

ux,i,j+1

ux,i-1,j ux,i+1,j

uy,i,j

uy,i,j-1 uy,i+1,j-1

uy,i+1,j

h

Ω

Cell ij

h

x

x

Figure 1.6: Cells of a staggered grid (as seen, for example, in [Gri]). The triangles and squares denote thenodes of the three underlying equidistant meshes (I = ux-node, N = uy-node, = p-node).

Here, the pressure pi,j in cell ij is calculated in the midpoint of the cell, the velocity ux,i,j in the middle ofthe right vertical edge and uy,i,j in the middle of the upper horizontal edge. The idea for this arrangementcomes from the Finite Volume method that is based on the evaluation of mass flows from one cell to theother. In case of such a grid, the approximation of the equations (1.25), (1.26) and (1.27) can be carriedout by use of the central Finite Difference formulas (1.15) and (1.16) without risking the stability of thenumerical solution (see [Gri]). However, because of the more complex structure, the discretization on astaggered grid is not as straightforward and intuitive as it is on an ordinary equidistant mesh. In this workwe will stick to the FD approach of Hirt (see [Hir]) that provides a first-order discretization and allowsthe direct incorporation of the Donor Cell scheme into the discrete equations. The latter will enable usto remove the stability issues that arise from the derivatives (1.29) with relative ease. Following Hirt,we discretize the continuity equation in the midpoint of the cell ij (see figure 1.6) by use of the centralFinite Difference formula (1.15) with h/2. This results in the approximations[

∂ux∂x

]i,j

=ux,i,j − ux,i−1,j

hand

[∂uy∂y

]i,j

=uy,i,j − uy,i,j−1

h. (1.30)

8

Page 11: Bachelor-Thesis Immersed Boundary Methods: Simulation of

Here, we have used the notation [...]i,j to denote the spatial discretization of the bracketed expressionon the cell ij. In contrast to the continuity equation, the Navier Stokes equations (1.25) and (1.26) arediscretized in the midpoints of the cell edges. By applying formula (1.15), the second derivatives in thesetwo equations can be approximated by[

∂2ux∂x2

]i,j

=ux,i+1,j − 2ux,i,j + ux,i−1,j

h2(1.31)[

∂2ux∂y2

]i,j

=ux,i,j+1 − 2ux,i,j + ux,i,j−1

h2(1.32)[

∂2uy∂x2

]i,j

=uy,i+1,j − 2uy,i,j + uy,i−1,j

h2(1.33)[

∂2uy∂y2

]i,j

=uy,i,j+1 − 2uy,i,j + uy,i,j−1

h2. (1.34)

The discretization of the convective parts (1.29) is more complicated. Regarding the derivative ∂(uxuy)∂y ,

for example, we have to deal with the problem that the variables ux and uy do not have common nodeson the staggered grid. Thus it is not possible to calculate values of the product uxuy directly. A possiblesolution is the use of mean values that are calculated in the ‘X’-points shown in figure 1.6 (see [Gri]). Incombination with the Finite Difference formula (1.15), this approach results in[

∂(uxuy)

∂y

]i,j

=1

h

(ux,i,j + ux,i,j+1

2

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

2− ux,i,j−1 + ux,i,j

2

uy,i,j−1 + uy,i+1,j−1

2

).

(1.35)

The derivatives of the type ∂(u2x)∂x are discretized analogously by using mean values in the midpoints of

the cells. The resulting approximations have the form[∂(u2

x)

∂x

]i,j

=1

h

[(ux,i,j + ux,i+1,j

2

)2

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

2

)2]

. (1.36)

The same strategy can also be applied to incorporate the Donor Cell scheme into the discretization. Bycomparing the geometrical situations shown in the figures 1.3 and 1.6, it is, for example, easily seen thatthe Finite Difference approximation (1.35) of ∂(uxuy)

∂y can be stabilised by using the mean values

vi,j :=uy,i,j + uy,i+1,j

2and vi,j−1 :=

uy,i,j−1 + uy,i+1,j−1

2(1.37)

as v-values in the Donor Cell formula (1.21). Equation (1.23) then leads to[∂(uxuy)

∂y

]i,j,DonorCell

=1

2h[vi,j(ux,i,j + ux,i,j+1)− vi,j−1(ux,i,j−1 + ux,i,j)]

+1

2h[|vi,j | (ux,i,j − ux,i,j+1)− |vi,j−1| (ux,i,j−1 − ux,i,j)]

=1

h

[(uy,i,j + uy,i+1,j

2

)(ux,i,j + ux,i,j+1

2

)−(uy,i,j−1 + uy,i+1,j−1

2

)(ux,i,j−1 + ux,i,j

2

)]+

1

h

[∣∣∣∣uy,i,j + uy,i+1,j

2

∣∣∣∣ (ux,i,j − ux,i,j+1

2

)−∣∣∣∣uy,i,j−1 + uy,i+1,j−1

2

∣∣∣∣ (ux,i,j−1 − ux,i,j2

)].

(1.38)

It should be noted, that the forward part of this formula is identical to the non-stabilised discretization.

9

Page 12: Bachelor-Thesis Immersed Boundary Methods: Simulation of

Finally, by integrating a weighting parameter γ as done in (1.24), we get the stabilised approximation[∂(uxuy)

∂y

]i,j

=1

h

[(uy,i,j + uy,i+1,j

2

)(ux,i,j + ux,i,j+1

2

)−(uy,i,j−1 + uy,i+1,j−1

2

)(ux,i,j−1 + ux,i,j

2

)]+γ

h

[∣∣∣∣uy,i,j + uy,i+1,j

2

∣∣∣∣ (ux,i,j − ux,i,j+1

2

)−∣∣∣∣uy,i,j−1 + uy,i+1,j−1

2

∣∣∣∣ (ux,i,j−1 − ux,i,j2

)].

(1.39)

The derivatives ∂(u2x)∂x , ∂(uxuy)

∂x and ∂(u2y)

∂y are treated similarly. The resulting formulas can be found in theconclusion below. As stated in section 1.2, the optimal ratio γ between the ordinary and the Donor Celldiscretization is usually unknown since it is dependent on the circumstances of the conducted experimentand the respective analytical solution. However, it is obvious that the Donor Cell part has to be dominantwhen the flow is subjected to large convective effects. This leads, for example, to the following heuristicdemand that can be found in [Hir]:

γ!≥ δt

hmaxi,j

(|ux,i,j | , |uy,i,j |) . (1.40)

Here, δt denotes the width of the temporal discretization (see below). If we finally use ordinary centralFinite Difference formulas to discretize the remaining derivatives ∂p

∂x and ∂p∂y in the midpoints of the cell

edges analogously to the continuity equation, we can summarize our spatial discretization of the NavierStokes equation as follows:

1. First Component of the Navier Stokes Equations (1.25): Discretized in the midpoint of the rightcell edge (ux node) by use of[∂(u2

x)

∂x

]i,j

=1

h

[(ux,i,j + ux,i+1,j

2

)2

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

2

)2]

h

[∣∣∣∣ux,i,j + ux,i+1,j

2

∣∣∣∣ (ux,i,j − ux,i+1,j

2

)−∣∣∣∣ux,i−1,j + ux,i,j

2

∣∣∣∣ (ux,i−1,j − ux,i,j2

)][∂(uxuy)

∂y

]i,j

=1

h

[(uy,i,j + uy,i+1,j

2

)(ux,i,j + ux,i,j+1

2

)−(uy,i,j−1 + uy,i+1,j−1

2

)(ux,i,j−1 + ux,i,j

2

)]+γ

h

[∣∣∣∣uy,i,j + uy,i+1,j

2

∣∣∣∣ (ux,i,j − ux,i,j+1

2

)−∣∣∣∣uy,i,j−1 + uy,i+1,j−1

2

∣∣∣∣ (ux,i,j−1 − ux,i,j2

)][∂2ux∂x2

]i,j

=ux,i+1,j − 2ux,i,j + ux,i−1,j

h2[∂2ux∂y2

]i,j

=ux,i,j+1 − 2ux,i,j + ux,i,j−1

h2[∂p

∂x

]i,j

=pi+1,j − pi,j

h. (1.41)

10

Page 13: Bachelor-Thesis Immersed Boundary Methods: Simulation of

2. Second Component of the Navier Stokes Equations (1.26): Discretized in the midpoint of theupper cell edge (uy node) by use of[∂(uxuy)

∂x

]i,j

=1

h

[(ux,i,j + ux,i,j+1

2

)(uy,i,j + uy,i+1,j

2

)−(ux,i−1,j + ux,i−1,j+1

2

)(uy,i−1,j + uy,i,j

2

)]+γ

h

[∣∣∣∣ux,i,j + ux,i,j+1

2

∣∣∣∣ (uy,i,j − uy,i+1,j

2

)−∣∣∣∣ux,i−1,j + ux,i−1,j+1

2

∣∣∣∣ (uy,i−1,j − uy,i,j2

)][∂(u2

y)

∂y

]i,j

=1

h

[(uy,i,j + uy,i,j+1

2

)2

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

2

)2]

h

[∣∣∣∣uy,i,j + uy,i,j+1

2

∣∣∣∣ (uy,i,j − uy,i,j+1

2

)−∣∣∣∣uy,i,j−1 + uy,i,j

2

∣∣∣∣ (uy,i,j−1 − uy,i,j2

)][∂2uy∂x2

]i,j

=uy,i+1,j − 2uy,i,j + uy,i−1,j

h2[∂2uy∂y2

]i,j

=uy,i,j+1 − 2uy,i,j + uy,i,j−1

h2[∂p

∂y

]i,j

=pi,j+1 − pi,j

h. (1.42)

3. Continuity Equation (1.27): Discretized in the midpoint of the cell (p node) by use of[∂ux∂x

]i,j

=ux,i,j − ux,i−1,j

hand

[∂uy∂y

]i,j

=uy,i,j − uy,i,j−1

h. (1.43)

In order to complete the discretization of the Navier Stokes equations, we still have to discretize our ap-proximation in time. The easiest way to do so is to choose an equidistant partition 0 = t0 < ... < tM = Tof the interval [0, T ] and to replace the temporal derivatives in (1.25) and (1.26) with the simple FiniteDifference formulas[

∂ux∂t

]i,j

=un+1x,i,j − unx,i,j

δtand

[∂uy∂t

]i,j

=un+1y,i,j − uny,i,j

δt. (1.44)

Here, we have used the variable δt = T/M to denote the width of our partition and the notation unx,i,j toindicate whether the quantities ux,i,j and uy,i,j belong to the current time step tn = nδt, 0 ≤ n < M ,or to the subsequent step tn+1 = (n + 1)δt. If we combine this temporal discretization with the spatialdiscretization scheme that we have derived above, we get the following discrete version of the NavierStokes equations (1.25) and (1.26):

un+1x,i,j − unx,i,j

δt+

[∂(u2

x)

∂x+∂(uxuy)

∂y− 1

Re

(∂2ux∂x2

+∂2ux∂y2

)+∂p

∂x

]i,j

= [fx]i,j (1.45)

un+1y,i,j − uny,i,j

δt+

[∂(uxuy)

∂x+∂(u2

y)

∂y− 1

Re

(∂2uy∂x2

+∂2uy∂y2

)+∂p

∂y

]i,j

= [fy]i,j . (1.46)

The body forces fx and fy that appear in these formulas are, of course, discretized by evaluating them atthe points the Navier Stokes equations are discretized in.

11

Page 14: Bachelor-Thesis Immersed Boundary Methods: Simulation of

We now have to face the question which time step the spatially discretized terms have to be assignedto. Following [Gri], we will stick to an approach that is explicit in u = (ux, uy) and implicit in p. Wetherefore use the velocities of the current and the pressure of the subsequent time step. This results in thetemporally and spatially discretized Navier Stokes equations

un+1x,i,j = unx,i,j + δt

[1

Re

(∂2ux∂x2

+∂2ux∂y2

)+ fx −

∂(u2x)

∂x+∂(uxuy)

∂y

]ni,j

− δt[∂p

∂x

]n+1

i,j

(1.47)

un+1y,i,j = uny,i,j + δt

[1

Re

(∂2uy∂x2

+∂2uy∂y2

)+ fy −

∂(uxuy)

∂x−∂(u2

y)

∂y

]ni,j

− δt[∂p

∂y

]n+1

i,j

(1.48)

[∂ux∂x

]ni,j

+

[∂uy∂y

]ni,j

= 0 (1.49)

that will be the basis of our solution algorithm. For ease of reading, hereinafter we will employ thenotation of [Gri] and abbreviate the forward part of (1.47) and (1.48) as Fni,j and Gni,j . This leads to

un+1x,i,j = Fni,j − δt

[∂p

∂x

]n+1

i,j

and un+1y,i,j = Gni,j − δt

[∂p

∂y

]n+1

i,j

. (1.50)

1.4 Discretization of the Boundary Conditions

Just as in the case of the continuous Navier Stokes equations, the discretization scheme (1.50) is notusable without a set of discrete boundary conditions that determine the circumstances of the conductedfluid dynamics experiment. We therefore have to discretize the constraints that we have defined in section1.1, too. This discretization, however, cannot be conducted directly since the nodes of our staggered gridare usually not consistent with the shape of the boundary ∂Ω. In the following, we will reduce theseverity of this problem by confining ourselves to the square fluid domain [0, 1]2. This will allow us toenforce the boundary conditions by use of a layer of so called ghost cells and linear interpolation. Theresulting mesh can be seen in figure 1.7.

h

Ω

Ghost Cells

(0,0)

i

j

pN-1,0

pN-1,1

pN-1,2

pN,0

pN,1

pN,2

ux,N-1,0

ux,N-1,1

ux,N-1,2

ux,N,1

uy,N-1,1

uy,N-1,0 uy,N,0

uy,N,1

h

Ω

ux,N,0

ux,N,2

(1,0)

(0,1)

x x

x

Figure 1.7: Square staggered mesh with ghost cell layer (as seen, for example, in [Hir])

12

Page 15: Bachelor-Thesis Immersed Boundary Methods: Simulation of

Here, the indices i and j of the mesh cells run from 0 to N with N = 1/h+ 1 ∈ N. The ghost cells aretherefore given by the index tuples

(i, 0) and (i,N) for i = 0, ..., N

(0, j) and (N, j) for j = 1, ..., N − 1. (1.51)

By use of this additional layer of mesh cells, we can discretize Dirichlet and Neumann boundary condi-tions on ∂Ω as follows:

1. Dirichlet Boundary Conditions: In case of a Dirichlet boundary condition of the type

ux(x, t) = vx(x, t) and uy(x, t) = vy(x, t) ∀(x, t) ∈ Σ× [0, T ] (1.52)

for some Σ ⊂ ∂[0, 1], we demand that all of the velocities ux,i,j and uy,i,j that are calculated onΣ satisfy this condition exactly. In case of a velocity ui,j that lies on a ghost cell adjacent to Σ butis not calculated in a point of this set, we enforce the Dirichlet constraint by prescribing the meanvalue of ui,j and a suitable velocity in a neighbouring point of the fluid domain. As an example, weconsider the situation where v is equal to zero and Σ is equal ∂[0, 1]2. Here, the above approachleads to

unx,0,j = unx,N−1,j = 0 ∀j = 0, ..., N ∀n = 0, ...,M

uny,i,0 = uny,i,N−1 = 0 ∀i = 0, ..., N ∀n = 0, ...,M

unx,i,0 + unx,i,12

=unx,i,N−1 + unx,i,N

2= 0 ∀i = 1, ..., N − 2 ∀n = 0, ...,M

uny,0,j + uny,1,j2

=uny,N−1,j + uny,N,j

2= 0 ∀j = 1, ..., N − 2 ∀n = 0, ...,M . (1.53)

In this particular case, the ghost cell velocities ux,N,j and uy,i,N are not needed to discretize theboundary condition. They can be chosen arbitrarily. The mean values in the latter two equationscorrespond to the velocities in the ‘X’-points shown in figure 1.7. Dirichlet conditions for thepressure p can be discretized analogously.

2. ‘Do Nothing’ Neumann Condition: Neumann boundary conditions of the form

∂un(x, t)

∂n= 0 and

∂ut(x, t)

∂n= 0 ∀(x, t) ∈ Γ× [0, T ] (1.54)

for some Γ ⊂ ∂[0, 1]2 are discretized by use of unidirectional Finite Differences. Because of thehomogeneity of the ‘Do Nothing’ constraint, this results in the demand that the velocities on aghost cell do not differ from the velocities on the next neighbouring inner cell of the fluid domain.If we have, for example, Γ = ∂[0, 1]2, the approximation of the ‘Do Nothing’ condition has thefollowing form

unx,0,j = unx,1,j and unx,N,j = unx,N−1,j ∀j = 0, ..., N ∀n = 0, ...,M

unx,i,0 = unx,i,1 and unx,i,N = unx,i,N−1 ∀i = 1, ..., N − 1 ∀n = 0, ...,M

uny,i,0 = uny,i,1 and uny,i,N = uny,i,N−1 ∀i = 0, ..., N ∀n = 0, ...,M

uny,0,j = uny,1,j and uny,N,j = uny,N−1,j ∀j = 1, ..., N − 1 ∀n = 0, ...,M . (1.55)

This method is also applicable to discretize ‘Do Nothing’ boundary conditions for the pressure p.

Initial conditions are, of course, discretized by evaluating the given continuous function u0 in the nodesof the mesh. It should be noted that Dirichlet and Neumann constraints are arbitrarily combinable, aslong as the resulting discretization provides discrete equations for all of the ghost cell variables. Theabove discretization techniques are therefore already sufficient to deal with the boundary conditions of alid-driven cavity (see section 1.6) or a flow passage (see section 2.1).

13

Page 16: Bachelor-Thesis Immersed Boundary Methods: Simulation of

1.5 The SOLA Procedure

The discretization techniques that we have derived in the previous sections enable us to approximate allfluid dynamics problems on Ω = [0, 1]2 that are subjected to Dirichlet or Neumann boundary conditionsby a linear system of the following form:

un+1x,i,j = Fni,j − δt

pn+1i+1,j − p

n+1i,j

h∀i, j = 1, ..., N − 1 ∀n = 1, ...,M (1.56)

un+1y,i,j = Gni,j − δt

pn+1i,j+1 − p

n+1i,j

h∀i, j = 1, ..., N − 1 ∀n = 1, ...,M (1.57)

unx,i,j − unx,i−1,j

h+uny,i,j − uny,i,j−1

h= 0 ∀i, j = 1, ..., N − 1 ∀n = 1, ...,M (1.58)

u0x,i,j = vx,i,j and u0

y,i,j = vy,i,j ∀i, j = 0, ..., N (1.59)

AnunGhostCell = vn and BnpnGhostCell = qn ∀n = 1, ...,M . (1.60)

Here, we have used the vectors uGhostCell = (ux,0,0, uy,0,0, ux,1,0, uy,1,0, ..)T and pGhostCell = (p0,0, ...)

T

to denote the ghost cell variables and the matrices An and Bn to express the discretized boundary condi-tions. Equation (1.59) incorporates the initial state of the fluid domain into the discretization. The abovesystem reflects all of the properties that characterize the continuous problem as described in section 1.1.It can therefore be regarded as the complete discretization of the fluid dynamics experiment. However,the form of the discrete equations (1.56) to (1.58) does not lend itself to a computational implementation.A more suitable formulation can be obtained by substituting the expressions for un+1

x,i,j and un+1y,i,j in (1.56)

and (1.57) into the discrete continuity equation (1.58). This results in

pn+1i+1,j − 2pn+1

i,j + pn+1i−1,j

h+pn+1i,j+1 − 2pn+1

i,j + pn+1i,j−1

h=Fni,j − Fni−1,j +Gni,j −Gni,j−1

δt(1.61)

and thus – in combination with the boundary conditions (1.60) – in a discrete Poisson equation for thepressure of the next time step whose right-hand side is defined by the current velocity field. It should benoted that the above formulation is only valid for i, j = 2, ..., N − 1 since the values Fni,j and Gni,j arenot available for i = 0 and j = 0. This problem can be solved by using the forward differences

Fni+1,j − Fni,j and Gni,j+1 −Gni,j (1.62)

on the right-hand side of equation (1.61) whenever i or j is equal to one. It is easily seen that thisapproach is equivalent to a modification of the Finite Difference discretization of the continuity equation(1.27) (see [Gri]). If the pressure is subjected to ‘Do Nothing’ conditions at the boundary, a moreelaborate strategy is to define

Fn0,j := ux,0,j FnN−1,j := ux,N−1,j Gni,0 := uy,i,0 Gni,N−1 := uy,i,N−1 (1.63)

at the outer cells of our grid. A detailed derivation why these velocities are suitable substitutes for therespective F and G values can be found in [Gri]. Since the latter option increases the stability of thealgorithm, it will be our preferred choice1. If we use one of the above approaches, the resulting discretePoisson equation consists of (N+1)2 linear equations which depend on the (N+1)2 values pn+1

i,j and thevelocities of the n-th time step. Since our discretization is explicit in ux and uy, we can now implement asolution algorithm as follows: Given the velocities of the n-th time step, we calculate the values Fni,j andGni,j and the right-hand side of the discrete Poisson equation (1.61). The pressures of the next time step

1 It should be noted that it is usually an agonizing decision to choose the boundary conditions for the discrete Poisson equationand the pressure in general. Details regarding this topic and a description of the numerical boundary layers that can possiblyarise due to the above explicit treatment of the pressure constraints can be found in [We]. In the following we will alwaysclarify which conditions are used to determine the behaviour of p at the boundary of the fluid domain.

14

Page 17: Bachelor-Thesis Immersed Boundary Methods: Simulation of

are now obtained by applying a solver to the resulting linear system. Subsequently, we calculate the newvelocities un+1

x,i,j and un+1y,i,j by substituting the values pn+1

i,j into (1.56) and (1.57). Since all quantities ofthe (n+ 1)-th step are known now, we can proceed as before to calculate the velocities and pressures ofthe (n+ 2)-th time step. The implementation of this approach results in the so-called SOLA2 procedurethat was introduced by [Hir] in 1975 and enhanced by [Gri] in 1996. The practical realization of theresulting algorithm is described in detail at the end of this section. Since the SOLA method proceedsstepwise through time, it does not require an equidistant partition of the time interval [0, T ] as outlined insection 1.3. This enables the application of dynamical time step algorithms that ensure the stability andaccuracy of the obtained solution by calculating the width δt based on the current velocity field. Such aflexible calculation of the time steps can, for example, be realized by use of the simple formula

δt = τ min

(Re4h2,

h

|ux,max|,

h∣∣uy,max∣∣)

with τ ∈ [0, 1[ (1.64)

that was proposed by Tome and McKee in 1994 (see [To]). This equation guarantees that the width δtsatisfies the extended Courant Friedrichs Lewi conditions

δt

Re<h2

4, |ux,max| δt < h and

∣∣uy,max∣∣ δt < h (1.65)

(see [Gri]) and thus prevents the occurrence of unphysical oscillations and other numerical instabilities.The basic idea behind the CFL inequalities (1.65) is to ensure that fluid particles do not cross more thanone Finite Difference cell per time step. A detailed explanation why this approach is sufficient to stabilisethe algorithm can be found in [Pey]. If we combine this dynamical time step calculation with the SOLAmethod that we have described above, we can summarize the whole numerical procedure as follows:

SOLA Method

Given a linear problem of the form (1.56), (1.57), (1.58), (1.59) and (1.60) and the velocities unx,i,j anduny,i,j of the n-th time step.

1. Calculate the new time increment δt by use of formula (1.64).

2. Adapt the ghost cell velocities of the previous solution such that the discrete boundary conditionsare satisfied (see equations (1.53) and (1.55)).

3. Calculate the values Fni,j and Gni,j defined in (1.50) by use of the Finite Difference discretizationformulas (1.41) and (1.42) with γ as defined in 1.40.

4. Assemble the right-hand side of the discrete Poisson equation (1.61) and the system matrix of thecorresponding linear system. The equations that belong to the ghost cell pressures are obtained byuse of the boundary conditions for p analogously to (1.53) and (1.55).

5. Obtain the pressures pn+1i,j of the (n+ 1)-th time step by applying an arbitrary linear system solver

to the discrete Poisson equation that has been assembled in step four.

6. Calculate the velocities un+1x,i,j and un+1

y,i,j of the (n+ 1)-th time step by use of (1.56) and (1.57).

7. Increase n by one and proceed to the next time step.

In practice, the above procedure is, of course, completed by visualization steps and other postprocessingroutines that collect and store the produced data. Additionally, it should be noted that the assemblyprocess in the fourth step can be significantly reduced if stencil methods or comparable techniques areused. Details regarding this topic can be found in [Gri], [Sa] and [Da].

2 The abbreviation ‘SOLA’ has initially been used by Hirt in [Hir] to name the numerical procedure that is described in thischapter and is simply short for ‘solution algorithm’. In this work we will follow [Pa] and use the term as a proper name.

15

Page 18: Bachelor-Thesis Immersed Boundary Methods: Simulation of

1.6 The Lid-Driven Cavity Test Case

In the following we will demonstrate the accuracy and functionality of the SOLA procedure by applyingit to the lid driven cavity problem. This experiment is a standard test that is commonly used to validatesolution algorithms for the Navier Stokes equations. It models the behaviour of a fluid in a squarechamber that is subjected to ‘No Slip’ conditions at three sides of the fluid domain and driven by aninhomogeneous Dirichlet condition at the fourth. This set of constraints is completed by the demandthat the pressure gradient vanishes at the boundary of the fluid domain. The resulting configuration isdepicted in figure 1.8.

Ω

u = u = 0x y

u = u = 0x y u = u = 0x y

u = v u = 0x 0

y

Figure 1.8: The lid-driven cavity problem

If we use the non-dimensionalized Navier Stokes equations and Ω = [0, 1]2, we can describe this testcase mathematically as

∂u

∂t+ u · ∇u− 1

Re∇2u +∇p = 0 in [0, 1]2 × [0, T ]

∇ · u = 0 in [0, 1]2 × [0, T ] (1.66)

subjected to

u(x, 0) =

(v0, 0) if x ∈ [0, 1]× 1(0, 0) if x ∈ [0, 1]× [0, 1[

∀x ∈ Ω (1.67)

and

u(x, t) = (0, 0) ∀x ∈ ∂[0, 1]2 \ ([0, 1]× 1) ∀t ∈ [0, T ]

u(x, t) = (v0, 0) ∀x ∈ [0, 1]× 1 ∀t ∈ [0, T ]

∂p(x, t)

∂n= 0 ∀(x, t) ∈ ∂[0, 1]2 × [0, T ]. (1.68)

It is easily seen that the Finite Difference discretization of these equations leads to a linear system asdescribed in section 1.5. In the above situation, however, the resulting discrete Poisson equation (1.61) isnot regular since the pressure is only determined up to an additive constant. This problem can be solvedby integrating the ‘Do Nothing’ conditions (1.68) into the solution process via an Iterative Filtering

16

Page 19: Bachelor-Thesis Immersed Boundary Methods: Simulation of

technique (see [Gri]) or by introducing an arbitrary Dirichlet condition for p at one of the inner cellsof the fluid domain. By doing so, the SOLA procedure can be used to compute the fluid velocities(which are only influenced by the variation of the p) in this irregular case as well. The number of freeparameters in the above configuration is obviously relatively small. On the one hand we can influence thecircumstances of the experiment by changing the Reynolds number and the velocity v0 at the upper edgeof the fluid domain. On the other hand, we can vary the parameters of our solution algorithm, namely thewidth h of the spatial discretization and the safety factor τ (see formula (1.64)). If we use, for example,Re = 100, v0 = 1, h = 1/92 and τ = 0.7, our algorithm produces the results shown in figure 1.9.

(a) Norm of the velocities at t = 0.5148

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 10

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

(b) Normalized velocity field at t = 0.5148

(c) Norm of the velocities at t = 16.642

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 10

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

(d) Normalized velocity field at t = 16.642

Figure 1.9: Simulation of the lid-driven cavity test case with Re = 100, v0 = 1, h = 1/92 and τ = 0.7.The data has been obtained by use of our Matlab code NavierStokesFD.m that is basedon the SOLA algorithm. All involved programmes can be found on the enclosed CD.

17

Page 20: Bachelor-Thesis Immersed Boundary Methods: Simulation of

In the above figures it can be seen that the excitation v0 creates a vortex near the right upper corner of thefluid domain that spins clockwise and gradually gathers strength while moving into the direction of thedomain’s centre. This so-called primary vortex finally comes to a halt at a height of roughly y = 0.74.On its way down it causes the emergence of two smaller secondary vortices in the bottom corners of thefluid domain that spin in the opposite direction to their big counterpart. The final stationary state of theflow is reached at approximately t = 16. If we vary the parameters of the experiment, it is seen that theappearance and position of the emerging vortices is strongly dependent on the Reynolds number Re. Ifwe use, for example, Re = 1000, the flow pattern is much more complex and the occurring vortices aremuch larger and stronger than in the situation above. The development of the flow and the final stationarysteady-state in this case are shown in the figures 1.10 and 1.11.

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 10

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

(a) Primary vortex at t = 1.537

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 10

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

(b) Emergence of two secondary vortices at t = 5.232

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 10

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

(c) Unification of the secondary vortices at t = 6.537

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 10

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

(d) Emergence of the tertiary vortex at t = 15.015

Figure 1.10: Normalized velocity field in the cavity (Re = 1000, v0 = 1, h = 1/92 and τ = 0.8). Thesafety factor τ of the time step formula has been chosen slightly larger than for Re = 100since the stationary state is reached much later than in the situation of figure 1.9 (at t ≈ 30).

18

Page 21: Bachelor-Thesis Immersed Boundary Methods: Simulation of

(a) Norm of the velocities at t = 29.798

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 10

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

(b) Normalized velocity field at t = 29.798

Figure 1.11: Final stationary state of the cavity (Re = 1000, v0 = 1, h = 1/92 and τ = 0.8)

In figure 1.10, it is seen, that the large primary vortex causes the development of two smaller vorticesalong the right boundary of the fluid domain at approximately t = 5.2. These two vortices merge intoeach other after 6.5 units of time and create the actual secondary vortex in the bottom right corner. Thetertiary vortex appears much later at t = 15 and slowly strengthens until the flow reaches the finalstationary state at t = 29. It should be noted that in the above situation the centre of the primary vortexmoves much further than for Re = 100 – up to a height of approximately y = 0.565. In general, it canbe observed that the rotation speed and the magnitude of the vortices increase with the Reynolds numberand that the final position of the main vortex approaches the geometric centre of the cavity as Re tendsto infinity. This qualitative behaviour of our solutions is in good agreement with the results obtainedby [Gh] in 1982 and [Gri] in 1995. In fact, our experiment in figure 1.10 shows the exact same evolutionthat Griebel described for a lid driven cavity with Re = 1000. As seen in table 1.1, the final positionof the vortices that we have calculated in this situation are in good agreement with the results of variousother authors, too.

Origin Centre of the primary vortex Centre of the secondary vortex (lower right)Our implementation (0.534, 0.565) (0.87, 0.11)

Ghia [Gh] (0.5313, 0.5625) (0.85938, 0.1094)Schreiber [Sch] (0.52857, 0.56429) (0.86429, 0.10714)Bruneau [Bru] (0.53125, 0.56543) (0.86328, 0.11230)Botella [Bot] (0.5308, 0.5652) (0.86398, 0.1118)

Table 1.1: Comparison of various results regarding the final position of the primary and the secondaryvortex in the situation of figure 1.11. The data has been obtained from [Bru].

A direct comparison between our final velocity field in the situation of figure 1.9 and the data foundin [Gh] demonstrates that our solution reproduces the correct velocities as well. Details can be found inthe tables 1.2 and 1.3.

19

Page 22: Bachelor-Thesis Immersed Boundary Methods: Simulation of

x ∈ Ω ux(x) according to [Gh] ux(x) according to SOLA Abs. Error Rel. Error(0.5, 1.0000) 1.00000 1.00000 0.00000 0.0000%

(0.5, 0.9766) 0.84123 0.84185 0.00062 0.0741%

(0.5, 0.9688) 0.78871 0.78962 0.00091 0.1153%

(0.5, 0.9609) 0.73722 0.73755 0.00033 0.0447%

(0.5, 0.9531) 0.68717 0.68784 0.00067 0.0977%

(0.5, 0.8516) 0.23151 0.23250 0.00099 0.4290%

(0.5, 0.5000) −0.20581 −0.20530 0.00050 −0.2431%

(0.5, 0.4531) −0.21090 −0.20948 0.00142 −0.6741%

(0.5, 0.2813) −0.15662 −0.15514 0.00148 −0.9460%

(0.5, 0.1719) −0.10150 −0.10102 0.00049 −0.4778%

(0.5, 0.1016) −0.06434 −0.06432 0.00002 −0.0325%

(0.5, 0.0703) −0.04775 −0.04665 0.00111 −2.3133%

(0.5, 0.0625) −0.04192 −0.04201 −0.00009 0.2027%

(0.5, 0.0547) −0.03717 −0.03726 −0.00009 0.2518%

(0.5, 0.0000) 0.00000 0.00000 0.00000 0.0000%

Table 1.2: Comparison between the ux values calculated by Ghia and the results of our simulation in thefinal steady-state (t = 16.642) along a vertical line through the centre of the fluid domain.Here, we have used Re = 100, v0 = 1, h = 1/92 and τ = 0.7. The SOLA velocities at thenodes of Ghia’s non-equidistant mesh have been obtained by linear interpolation.

x ∈ Ω uy(x) according to [Gh] uy(x) according to SOLA Abs. Error Rel. Error(1.0000, 0.5) 0.00000 0.00000 0.00000 0.0000%

(0.9688, 0.5) −0.05906 −0.06251 −0.00345 5.8407%

(0.9609, 0.5) −0.07391 −0.07834 −0.00443 5.9908%

(0.9531, 0.5) −0.08864 −0.09374 −0.00510 5.7489%

(0.9453, 0.5) −0.10313 −0.10880 −0.00567 5.4949%

(0.9063, 0.5) −0.16914 −0.17663 −0.00749 4.4275%

(0.8594, 0.5) −0.22445 −0.23110 −0.00665 2.9626%

(0.8047, 0.5) −0.24533 −0.24855 −0.00322 1.3119%

(0.5000, 0.5) 0.05454 0.05559 0.00109 2.0021%

(0.2344, 0.5) 0.17527 0.17702 0.00175 0.9965%

(0.2266, 0.5) 0.17507 0.17685 0.00178 1.0175%

(0.1563, 0.5) 0.16077 0.16310 0.00233 1.4501%

(0.0703, 0.5) 0.10091 0.10287 0.00196 1.9407%

(0.0625, 0.5) 0.09233 0.09409 0.00176 1.9016%

(0.0000, 0.5) 0.00000 0.00000 0.00000 0.0000%

Table 1.3: Comparison between the uy values calculated by Ghia and the results of our simulation in thefinal steady-state (t = 16.642) along a horizontal line through the centre of the fluid domain.We have used the same configuration as in table 1.2.

In the above tables it is seen that the relative error ranges from 0% at the boundaries of the fluid domainto 5.9908% at its right side. Its average is 1.6%. The larger deviations are obviously restricted to thenodes where the values of ux and uy are relatively small and thus sensitive to numerical perturbations.In general, we can conclude that our velocities are in good agreement with the reference data in termsof quality and quantity. We can therefore proceed on the assumption that our SOLA implementationprovides solutions that are physically and mathematically correct.

20

Page 23: Bachelor-Thesis Immersed Boundary Methods: Simulation of

2 Immersed Boundary Methods

A main disadvantage of the Finite Difference method is that it does not allow a straightforward imple-mentation of boundary conditions that are more complex than the static Neumann and Dirichlet con-straints that we have described in section 1.1. If we consider, for example, a structure S that movesthrough the fluid domain, it is entirely unclear how the ‘No Slip’ condition at ∂S has to be incorporatedinto the discretization scheme since the boundary of the body will usually cut through the cells of ourgrid. The conventional approach to solve this problem would employ manipulations of the underlyingmesh as seen in figure 2.1 a) to allow a body-conformal discretization and thus a direct enforcementof the boundary conditions analogously to (1.53) and (1.55). This strategy is, for example, pursued byArbitrary Lagrangian-Eulerian procedures that adapt the used grid in every time step such that it is con-sistent with the changed geometric situation (see [Do]). However, such discretization techniques requirea complex remeshing procedure that is expensive and difficult to implement. They are thus often notpracticable in real applications (see, for example, [Bo]). A possible alternative to the body conformalmesh generation is the Immersed Boundary methodology (IBM) that was proposed by Peskin in 1972.This technique is based on the idea to interpret all present structures and obstacles as parts of the fluiddomain and to incorporate the impact that these objects have on the flow by manipulating the governingdifferential equations in a suitable way. By use of this strategy, the whole simulation can be carriedout on a Cartesian grid which is, of course, a great advantage regarding the complexity of the resultingalgorithm (see figure 2.1 b)). Since Peskin introduced the Immersed Boundary (IB) approach, it hasbeen constantly developed and adapted and nowadays there are numerous different procedures that arebased on the IB principle. This family of techniques can roughly be separated into two different groupsaccording to the way the boundary conditions are integrated into the governing equations (see [Mi]). Thefirst group consists of the so-called Discrete Forcing methods. These techniques enforce the boundaryconditions by manipulating the linear system that is obtained by discretizing the underlying differentialequation. An example of such a procedure is the Iterative Filtering technique that can, for instance, befound in [Tu]. The Immersed Boundary methods of the second group are based on the so-called Con-tinuous Forcing approach. If a method of this type is used, the boundary conditions are integrated intothe continuous equations. The discretization is conducted afterwards. In order to give an overview of thedifferent Immersed Boundary techniques and the underlying ideas, we will address both the Discrete andthe Continuous Forcing approach in the subsequent sections. The focus, however, will lie on the lattersince we will use a Continuous Forcing method to conduct the numerical experiments in chapter 3.

Ω Ω

(a) (b)

S S

Figure 2.1: Body-conformal mesh (left) and IBM Cartesian grid (right)

21

Page 24: Bachelor-Thesis Immersed Boundary Methods: Simulation of

Since all of the presented techniques are also applicable to PDEs other than the Navier Stokes equations,we will initially follow the approach of Mittal in [Mi] and consider an abstract problem of the form

L(u) = 0 in Ω = [0, 1]2 \ S with S ⊂]0, 1[2 (2.1)

u = u∂S in ∂S. (2.2)

Here, L denotes a suitable differential operator and u the variable of interest. For ease of reading anddiscussion, we will neglect additional boundary conditions at ∂Ω and do not go into detail regarding otherrestrictions and definitions that might be necessary to complete the system (2.1) and (2.2). However, itshould be noted that the problem of a solid body that moves through a fluid whose flow is governed by theincompressible Navier Stokes equations is also of the above type. Based on the abstract equations (2.1)and (2.2), we will describe the basic functionality of the Discrete and Continuous Forcing approach in thefollowing two sections 2.1 and 2.2. After these general considerations we will focus on the Navier Stokesequations again and address a particular variant of the Continuous Forcing technique that was proposedby [Bo] in 2003. This method is especially well suited for the simulation of thin elastic boundaries andwill be the basis of our experiments in chapter 3.

2.1 Discrete Forcing Methods

As stated above, the Discrete Forcing approach pursues the idea to discretize the governing differentialequations on a Cartesian mesh without respect to the boundary conditions. The influence that theseconditions have on the solution is taken into account afterwards by manipulating the resulting discretesystem. In the situation of figure 2.1 and in case of the abstract problem (2.1) and (2.2), this means thatthe presence of the object S is fully neglected at first and that equation (2.1) is discretized on the wholeunit square [0, 1]2. If we follow the notation of chapter 1 and use brackets [...] to denote the discretizationof an operator or a function, the resulting system can be written as

[L](

[u])

= 0. (2.3)

The boundary condition (2.2) is now incorporated by adjusting the above equations on the cells thatare neighbouring ∂S. This can be done either by manipulating the discrete operator [L] or by adding asuitable right-hand side r. In doing so, we obtain a problem of the form

[L](

[u])

= r (2.4)

whose discrete solution respects the boundary conditions, too. The question that is brought up by thisapproach is, of course, which adjustments and right-hand sides in (2.4) are suitable to enforce the bound-ary condition (2.2). The easiest strategy that can be used here is to replace the ordinary discretizationstencil defined by [L] at the respective cells by an interpolation scheme that guarantees the local validityof the boundary constraint. In case of the system (1.56) to (1.60) that arises from the discretization of theNavier Stokes equations, we would, for example, substitute suitable linear relations between the veloc-ities ux and uy for the equations (1.56) and (1.57) that correspond to cells ij on the boundary ∂S. It iseasily seen that this method is similar to the technique that we have applied in section 1.4 to incorporatethe Dirichlet and Neumann conditions at the outer boundary of the fluid domain into our discretization.The only difference is that in this situation the modified equations belong to cells in the interior of Ω. Inorder to derive the interpolation schemes that are required to enforce the condition (2.2) it is common todefine so-called ghost nodes that lie on the boundary ∂S. These nodes act as reference points that enablethe discretization of the constraint u = u∂S analogously to section 1.4. In the situation of figure 2.2, forexample, the continuous boundary condition on the cell ij would be replaced by the demand

u(xG) = u(xG, yG)!

= u∂S(xG, yG). (2.5)

22

Page 25: Bachelor-Thesis Immersed Boundary Methods: Simulation of

Ω

S

A B

C D

G

∂S

Cell ij

Figure 2.2: A cell intersected by the boundary ∂S. The ghost node is denoted by G.

This discrete condition can now be approximated by interpolation between the quantities at the neigh-bouring mesh nodes. If we assume that the discrete solution [u] provides values uI at the points A, B,C and D, we could, for example, use a formula of the type

CA u(xA) + CB u(xB) + CC u(xC) + CD u(xD) = u(xG) (2.6)

whose weighting parameters CI , I = A, ...,D, depend on the position of the ghost node G to expressthe value u(xG) (see [Mi]). Since the solution at G is prescribed and the quantities u(xI), I = A, ...,D,are part of the discrete solution, the resulting identity is consistent with our discretization and can besubstituted into the system (2.3) to enforce the boundary condition on the cell ij. It should be noted thatthe above equation merges into the formulas (1.53) when the ghost node lies in the centre of the celland only one or two of the adjacent points are used for the interpolation. The resulting Discrete Forcingmethod is thus, indeed, a generalization of the techniques we have applied in section 1.4. For obviousreasons, both methods are usually referred to as Ghost Cell techniques. Since the incorporation of theboundary conditions at ∂Ω by use of (1.53) is already a part of our SOLA procedure, the implementationof the Ghost Cell method can be realised with relative ease. We only have to adjust the second step ofour algorithm such that the boundary conditions in the inside of the fluid domain are enforced as well.

In general, a distinction is made between three different strategies that can be used to integrate theinterpolation formulas into the solution procedure (see [Tu]). The first one is the semi-implicit approach.In this case, the formulas are substituted into the linear system that has been obtained by discretizing thegoverning differential equation and no further efforts are made to simplify the resulting identities. If amatrixA is used to describe the discrete problem, this method leads to manipulations at the rows ofA thatbelong to the affected quantities u(xI). The second option is the fully explicit treatment of the boundarycondition. Here, the interpolation formulas are substituted into the discretization schemes as well. Theresulting equations, however, are afterwards simplified as far as possible by eliminating quantities whosevalues are known or easily derivable. This method is especially efficient when simple interpolationschemes are used, for example, an approximation analogous to (2.6) with only one sampling point I . Inthis situation the value of u(x) at I is prescribed by the boundary condition and can thus be eliminatedwith ease. The third alternative to include the interpolation formulas is the fully implicit treatment. Thisapproach is based on the idea to manipulate the solution process while the underlying discretizationremains unchanged. If an iterative procedure is used to solve the resulting system of equations, this ismostly realized by modifying the solution vector after every iteration such that the boundary conditionsare satisfied. A procedure of this type is also referred to as Iterative Filtering (see [Tu]).

Regarding this classification, the incorporation of the interpolation schemes in step two of the SOLAalgorithm (see section 1.5) would be considered a fully implicit approach since the velocities are adjustedin the beginning of every time step such that the boundary conditions are fulfilled. However, the decisionis difficult in this case. The velocities do not appear as unknowns in our procedure and it is thus debatable

23

Page 26: Bachelor-Thesis Immersed Boundary Methods: Simulation of

whether the above division can be applied. The integration of the generalized Ghost Cell method intothe SOLA algorithm enables the simulation flows around obstacles that are located in the interior of ourdefault fluid domain Ω = [0, 1]2. This allows to conduct numerical experiments as depicted in figure 2.3.

(a) Norm of the velocities at t = 0.1554

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 10

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

(b) Velocity field at t = 0.1554

(c) Pressure at t = 0.1554

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 10

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

(d) Normalized velocity field at t = 0.1554

Figure 2.3: Fluid flow around a rectangular obstacle with Re = 3, h = 1/92 and τ = 0.9

Here, we used our code NavierStokesFD.m to simulate a flow passage (homogeneous Dirichletconditions at the top and the bottom of the unit square, inhomogeneous Dirichlet condition on the left,‘Do Nothing’ condition on the right) that is at rest at t = 0 and afterwards driven by a parabolic velocityprofile at the left side of the fluid domain. The presence of the rectangular obstacle has been incorporatedby use of the Ghost Cell method and interpolation schemes analogous to (1.53). It is seen that the objectaffects both the velocity field and the pressure of the fluid in a physically reasonable way. In front of theobject we observe an increasing ram pressure and behind it a slipstream that dominates the flow. The

24

Page 27: Bachelor-Thesis Immersed Boundary Methods: Simulation of

horizontal symmetry of the test configuration is obviously preserved to a great extent which demonstratesthat the resulting procedure is not oversensitive to numerical perturbations. Analogously to the lid-drivencavity test, the flow in the above situation is mainly dependent on the parameter Re. In case of lowReynolds numbers as seen in figure 2.3, the fluid is very viscous and the flow is immediately reunitedbehind the rectangular obstacle. Because of this behaviour, the final stationary state is reached very fastin comparison with our previously conducted experiments (approx. at t = 0.15). A more inviscid fluid,however, produces wake turbulences in the slip stream area that manifest themselves, for example, intwo vortices behind the obstacle as seen in figure 2.4. If a moderate Reynolds number is used, such aflow tends to a stationary state, too, but it takes significantly longer until the final balance is reached. Itshould be noted the horizontal symmetry is preserved in this case as well.

(a) Norm of the velocities at t = 3.4986

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 10

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

(b) Velocity field at t = 3.4986

(c) Pressure at t = 3.4986

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 10

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

(d) Normalized velocity field at t = 3.4986

Figure 2.4: Fluid flow around the obstacle with Re = 100, h = 1/92 and τ = 0.5 (as chosen in [Gri])

25

Page 28: Bachelor-Thesis Immersed Boundary Methods: Simulation of

If higher Reynolds numbers are used or if the horizontal symmetry is disturbed, the emerging waketurbulences develop an instationary pattern behind the obstacle and we can observe the so-called Karmanvortex shedding – an oscillating flow which periodically creates vortices (see figure 2.5).

0.2 0.3 0.4 0.5 0.6 0.7 0.8

0.2

0.3

0.4

0.5

0.6

0.7

0.8

(a) Normalized velocity field at t = 0.5214

0.2 0.3 0.4 0.5 0.6 0.7 0.8

0.2

0.3

0.4

0.5

0.6

0.7

0.8

(b) Normalized velocity field at t = 1.9571

0.2 0.3 0.4 0.5 0.6 0.7 0.8

0.2

0.3

0.4

0.5

0.6

0.7

0.8

(c) Normalized velocity field at t = 2.6265

0.2 0.3 0.4 0.5 0.6 0.7 0.8

0.2

0.3

0.4

0.5

0.6

0.7

0.8

(d) Normalized velocity field at t = 3.3477

Figure 2.5: Wake turbulences behind a rectangular obstacle with Re = 400, h = 1/92 and τ = 0.5

It should be noted that this qualitative behaviour of our solutions is in good accordance with the ex-periments conducted by Griebel in 1995 (see [Gri]). However, since the focus of this work lies on theContinuous Forcing methods, we will not go into further detail regarding the comparison of the aboveresults with the available reference literature. Overall, we can conclude that the Ghost Cell method al-lows a physically reasonable representation of solid objects and that it is well applicable in combinationwith the SOLA algorithm, too. Both the velocity and the pressure are affected by the immersed boundaryand no negative impact on the stability of the resulting algorithm is detectable. Regarding the efficiency,however, it should be noted that the solution is calculated within the rectangular obstacle as well if theabove method is used to incorporate the boundary conditions (see figures 2.3, 2.4 and 2.5). This is adirect consequence of the idea to interpret the object as a part of the fluid domain and, of course, a basic

26

Page 29: Bachelor-Thesis Immersed Boundary Methods: Simulation of

disadvantage since the velocities and pressures at these nodes are physically not relevant. However, theadditional efforts that arise from these unnecessary computations are mostly neglectable, especially if thearea that is occupied by the immersed object is relatively small or if alternative techniques would causeeven higher costs.

2.2 Continuous Forcing Methods

In contrast to the Discrete Forcing approach, Continuous Forcing methods are based on the idea to inte-grate the boundary conditions into the continuous differential equations. Regarding the abstract problem

L(u) = 0 in Ω = [0, 1]2 \ S with S ⊂]0, 1[2

u = u∂S in ∂S,

this means that the constraint (2.2) is incorporated into (2.1) by use of a forcing term on the right side ofthe equal sign or modifications of the operator L. The resulting continuous system has the form

L(u) = f in [0, 1]2. (2.7)

It should be noted that the above equation is valid in the whole unit square since the set S is againinterpreted as a part of the fluid domain. The discretization of (2.7) on a Cartesian grid finally leads to asystem [

L] (

[u])

=[f]

(2.8)

whose solution [u] satisfies the boundary condition at ∂S. It is seen that the resulting discrete problem issimilar in appearance to the Discrete Forcing system (2.4). However, in practice, the two approaches havevery different properties. The Continuous Forcing approach, for example, does not allow to influencethe approximative solution [u] directly or to prescribe the values at particular nodes of the mesh (see,for example, [Mi]). It is thus often not able to provide the accuracy that can be achieved by use of aDiscrete Forcing method. However, the above technique for the incorporation of boundary conditionshas two major advantages. On the one hand, Continuous Forcing methods usually have a sound physicalbasis since the representation of the body S by some sort of forcing term is mostly reasonable from thephysical viewpoint as well. If we consider, for example, an obstacle that interferes with a surroundingfluid, the description of this interaction by a forcing term corresponds to the use of a free body diagramand thus to a method that is commonly applied in physics, too (see [Gro]). On the other hand, ContinuousForcing methods are more flexible than their discrete counterpart. Because of the continuous forcingterm f they can be used to incorporate additional properties of the object S into the resulting equations,too. They thus allow, for example, to simulate the interaction between a fluid and an elastic object aswell. Furthermore, they are far more practicable when the body S moves through the fluid domain sincethey do not require the calculation of interpolation schemes that depend on the current position of theboundary ∂S. However, Continuous Forcing methods can, for example, not be used to enforce boundaryconditions at the edge of the fluid domain Ω. They thus usually appear in combination with DiscreteForcing techniques that determine the behaviour of the approximative solution at the outer cells of themesh. An example for a Continuous Forcing method and a detailed description of how such an ImmersedBoundary technique is practically implemented can be found in section 2.3.

27

Page 30: Bachelor-Thesis Immersed Boundary Methods: Simulation of

2.3 Immersed Elastic Boundaries

In the subsequent section we focus on a particular Continuous Forcing approach that was formulated byBoffi in 2003 (see [Bo]). This approach allows to simulate the interaction between an elastic body and anincompressible fluid and is well suited to illustrate the basic ideas behind Continuous Forcing ImmersedBoundary methods. Initially, we will describe how the impact of a solid object can be represented by aforcing term and demonstrate how the resulting system can be discretized on a Cartesian grid that is notconsistent with the geometric situation. After this, we will address the practical implementation of the re-sulting Immersed Boundary technique within the framework of the SOLA algorithm. Since the referenceliterature that we will use in the subsequent sections sticks to the dimensionalized incompressible NavierStokes equations (1.1) and (1.2), we will use these equations, too, to model the behaviour of the fluid.Additionally, we will confine ourselves to the situation of an elastic object S = S(t) that moves throughthe domain [0, 1]2. Following [Bo], we assume that the initial shape of this object can be described by asuitable set of Lagrangian coordinates q. This allows to denote the position of a point in S by X(q, t)where t is the current time and q the vector of coordinates that label this point in the initial state of thesolid body. By use of this notation the behaviour of the fluid and the object S can be described by

ρ

(∂u

∂t+ u · ∇u

)− µ∇2u +∇p = f in

([0, 1]2 \ S

)× [0, T ]

∇ · u = 0 in([0, 1]2 \ S

)× [0, T ]

∂X(q, t)

∂t= u(X(q, t), t) in ∂S × [0, T ]

u(x, 0) = u0(x) in [0, 1]2 \ SX(q, 0) = X0(q) in S (2.9)

and a collection of boundary conditions at the edge of the fluid domain ∂[0, 1]2. Since the body is elastic,this system has to be completed by a material law that determines the evolution of the set S(t) withrespect to the occurring strains and, if necessary, additional interface conditions at ∂S. As stated insection 2.2, the basic idea of the Continuous Forcing approach is to interpret solid objects as a part of thefluid domain and to represent their influence on the surrounding fluid by use of a forcing term. Since thebody S only interferes with the fluid in its immediate vicinity, the most intuitive ansatz for such a termis the expression

F(x, t) =

∫SF(q, t) δ(x−X(q, t))dq in [0, 1]2 × [0, T ]. (2.10)

Here, we have used the notation

δ(f) =

∫Ωδ(x) f(x) dx = f(0) (2.11)

to denote the Dirac delta function and the variable F to describe the force density that the solid bodyapplies to its surroundings due to its presence and its elasticity. This force density takes into accountthe properties and the shape of S and is crucial for the whole model. A description of how F has to bechosen for thin lined closed boundaries can be found at the end of this section. If the mass density of Sdiffers from the mass density ρ0 of the surrounding fluid, we can also manipulate the variable ρ to reflectthe presence of the solid body. This can be done by substituting the expression

ρ(x, t) = ρ0 +

∫SM(q)δ(x−X(q, t))dq in [0, 1]2 × [0, T ] (2.12)

into the Navier Stokes equations. In this formula, the different values of ρ are taken into account byadding the excess of mass density M(q) to the mass density ρ0 of the fluid.

28

Page 31: Bachelor-Thesis Immersed Boundary Methods: Simulation of

By use of the expressions (2.10) and (2.12), the original system of equations (2.9) can be rewrittenaccording to the Continuous Forcing approach as follows:

ρ

(∂u

∂t+ u · ∇u

)− µ∇2u +∇p = f + F in [0, 1]2 × [0, T ] (2.13)

∇ · u = 0 in [0, 1]2 × [0, T ] (2.14)

ρ(x, t) = ρ0 +

∫SM(q)δ(x−X(q, t))dq in [0, 1]2 × [0, T ] (2.15)

F(x, t) =

∫SF(q, t) δ(x−X(q, t))dq in [0, 1]2 × [0, T ] (2.16)

∂X(q, t)

∂t= u(X(q, t), t) in ∂S × [0, T ] (2.17)

u(x, 0) = u0(x) in [0, 1]2 (2.18)

X(q, 0) = X0(q) in S. (2.19)

In this system the incompressible Navier Stokes equations (2.13) and (2.14) are applied in S as well andthe presence of the solid object is solely reflected by the forcing term F and the altered mass density.This allows to conduct the discretization on the whole unit square [0, 1]2 by use of a Cartesian grid. Theproblem to resolve the shape of the solid body, however, is still present in the above formulation. Wehave to deal, for example, with the question of how the forcing term F that acts on the set S has to bediscretized if the boundary ∂S cuts through a cell of our mesh as seen in figure 2.2. Usually, this problemis solved by introducing a Lagrangian mesh X(qi, t) ∈ S, i = 1, ...,K, and by replacing the sharp Diracdelta function by a smoother distribution function δ (see [Mi]). This allows to distribute the force F onthe nodes of the Cartesian grid if the points X(qi, t) are not consistent with the global discretization.The resulting discretized forcing term has the form

F(x, t) =K∑i=1

w(qi)F(qi, t) δ(x−X(qi, t)) (2.20)

with weighting factorsw(qi) that reflect the width of the Lagrangian mesh. The choice of the distributionfunction δ that is applied here is, of course, a key factor in the implementation of this method. Figure 2.6shows a couple of approaches that have been used in the past for this purpose.

y

1.0

0 h -h 2h -2h

0.0

-0.2

0.2

0.4

0.6

0.8

Saiki & Biringen 1996

Lai & Peskin 2000

Beyer & Leveque 1992

Figure 2.6: Different distribution functions (see [Mi])

29

Page 32: Bachelor-Thesis Immersed Boundary Methods: Simulation of

Since the forcing term F is smooth and ‘areal’, it can be discretized like the ordinary body force f in theNavier Stokes equations by evaluating it in the nodes of the Cartesian grid. The distribution of the excessmass density M is conducted analogously. The substitution of the resulting expressions F and ρ intothe system (2.13) to (2.19) finally leads to a numerically usable approximation of the original interactionproblem that can be discretized by applying the techniques that we have described in section 1.5. Avisualization of the different steps that we have conducted above to incorporate and discretize the impactof the solid body S can be found in figure 2.7.

Ω(0,0) (1,0)

(0,1)

S

(a) Initial configuration

Ω(0,0) (1,0)

(0,1)

SS

F

(b) Representation by the forcing term

Ω(0,0) (1,0)

(0,1)

F

h

: Lagrangian node

supp(δ)~

~

(c) Discretization

Ω(0,0) (1,0)

(0,1)

h

[F]~

(d) Resulting discrete configuration

Figure 2.7: Continuous Forcing transformations in case of a two dimensional elastic object

If we summarize these steps, it is seen that the above approach reduces the problem to determine theinteraction between the fluid and the object S to the calculation of a mass density vector [ρ] and a forcingvector [F] that reproduce the influence of the solid body. In practice, the easiest way to assemble these

30

Page 33: Bachelor-Thesis Immersed Boundary Methods: Simulation of

vectors is to loop through the nodes of the Lagrangian mesh and to add up the amounts of the force andmass density ρ and F at the affected nodal points of the Cartesian grid (see figure 2.7 d)). Regarding theapplication of this Continuous Forcing method in combination with the SOLA procedure, we have to payattention to the fact that the SOLA mesh consists of three staggered Cartesian grids and that the assemblyof the vectors [ρ] and [F] has to be conducted either in the upper edges of the mesh cells or in the rightedges of the mesh cells according to the respective component of the Navier Stokes equations (see sec-tion 1.3). However, since the density and the right-hand side of the Navier Stokes equations are the onlyquantities that have to be modified, this is the only difficulty that appears during the implementation. Itshould be noted that the realization of the above Continuous Forcing procedure is relatively simple, too,if the underlying solution algorithm is based on a Finite Element or Finite Volume discretization. Detailsregarding this topic can be found in [Bo] and [Mi]. If we combine the SOLA procedure with the aboveImmersed Boundary approach, the resulting algorithm can be summarized as follows:

SOLA-IB Step

Given the velocities unx,i,j and uny,i,j of the n-th time step and the current position of the nodes X(qi, tn)of the Lagrangian mesh that represents the solid body S.

1. Calculate the new time increment δt.

2. Adapt the ghost cell velocities of the previous solution such that the discrete boundary conditionsat the edges of the unit square are satisfied (see equations (1.53) and (1.55)).

3. Assemble the forcing vector [F]n by use of the formula (2.20), the force density F and the currentpositions of the Lagrangian nodes X(qi, tn), i = 1, ...,K.

4. Assemble the mass density vector [ρ]n analogously to step 3.

5. Calculate the current velocities at the Lagrangian nodes X(qi, tn) by interpolating between thevalues unx,i,j and uny,i,j at the surrounding nodes of the Cartesian mesh.

6. Update the positions of the nodes X(qi, tn) by use of the time step calculated in step 1. and thevelocities calculated in step 5.

7. Conduct the steps 3. to 7. of the normal SOLA procedure with the discrete body force [f ]n + [F]n

and the modified density vector.

Since we have used the dimensionalized version of the Navier Stokes equations, the discretization for-mulas that we have derived in section 1.5, of course, have to be amended in this formulation of the SOLAprocedure by adding the factors ρ and µ where appropriate. Additionally, it should be noted that step 4.of the above algorithm guarantees the validity of the ‘No Slip’ condition in (2.9). The update formulain this step is also a direct consequence of the idea to interpret the body S as a part of the fluid domain.The only component that has not been specified until now is the force density F. This density reflectsthe shape, the condition and the properties of S and has to be calculated by use of the material lawsthat determine the evolution of the solid body. It is thus not describable by a universal formula and itsrelation to the current position of the Lagrangian mesh is in general dependent on the respective testcase. A wide variety of different examples in two or three dimensional situations can be found in [Bo].In the following we will concentrate on the common model of an immersed massless boundary S inthe form of a differentiable curve (see [Mi] and [Bo]). In this case, the Lagrangian variable q that de-scribes the initial shape of the boundary can be chosen as the chord length s ∈ [0, L] where L is thelength of S at t = 0. The excess of mass density M is zero since the curve carries no additional mass.

31

Page 34: Bachelor-Thesis Immersed Boundary Methods: Simulation of

In order to derive the force density F(s, t) of such a body, we follow [Bo] and initially look at the forceF(s, t)ds that is exerted by an element ds of the boundary. This force is determined by the internaltension T and thus in general governed by a Hooke’s law of the form

T = σ

(∥∥∥∥∂X∂s∥∥∥∥ ; s, t

). (2.21)

The direction that is associated with T is in this situation obviously given by the unit tangent

τ =∂X/∂s

‖∂X/∂s‖(2.22)

of the curve. The force that acts on a segment between two arbitrary points defined by the Lagrangiancoordinates 0 ≤ a ≤ b ≤ L can now be calculated as

(Tτ)(b, t)− (Tτ)(a, t) =

∫ b

a

∂s(Tτ)(s, t)ds. (2.23)

This shows, that the local force density has to be defined as

F(s, t) =∂

∂s(Tτ)(s, t) (2.24)

in order to reflect the strains within the body S. It should be noted, that the material law (2.21) allowsthe application of a wide variety of different models to describe the behaviour of the thin-lined boundary.If we use, for example, a stressed initial configuration with a tension T which is linear with respect todeformation ‖∂X/∂s‖, we can describe a body that strives to contract to a single point. The force densityis in this case given by

F(s, t) = κ∂2X(s, t)

∂s2(2.25)

where κ is the elasticity constant of the material (see [Bo]). Another easily implementable model is aboundary that is prevented from leaving its initial configuration by a restoring force. This leads to

F(s, t) = κ (X(s, 0)−X(s, t)) (2.26)

and thus to a method that is also known as the Penalty technique. The discretization of the resulting ex-pressions is in general relatively simple. In case of formula (2.25), we can, for instance, use the ordinarysymmetric Finite Difference quotient (1.16) to approximate the occurring derivative. This results in

F(s, t) ≈ κX(s+ hs, t)− 2X(s, t) + X(s− hs, t)h2s

= κX(s+ hs, t)−X(s, t)

h2s

+ κX(s− hs, t)−X(s, t)

h2s

(2.27)

where hs denotes the width that is used to discretize the chord length interval [0, L]. It should be notedthat the right-hand side of the above equation can be interpreted as the sum of two elastic forces that actbetween the node X(s, t) and its neighbours. The resulting discrete system can thus be interpreted as acollection of points connected with springs that move through the fluid domain (see figure 2.8).

X(s,t)

X(s - h ,t)S X(s + h ,t)S

Figure 2.8: Interpretation of the resulting discrete configuration in case of the force density (2.25)

32

Page 35: Bachelor-Thesis Immersed Boundary Methods: Simulation of

3 Simulation of Thin Elastic Boundaries

In the following chapter we will conduct a series of experiments that gives an overview of the differentfields the Continuous Forcing method described in section 2.3 can be applied to. Initially we will use thetest case of an elastic ellipse-shaped boundary to demonstrate that our method produces usable resultswhich are in good accordance with both the laws of physics and the observations of other authors. Afterthis validation it is demonstrated that the simulation of non-closed thin-lined elastic boundaries that movethrough the fluid domain is enabled by the Immersed Boundary technique as well. Finally we will addressthe advantages of our approach in the field of cardiac fluid dynamics and review the experiments that havebeen conducted by Peskin on this topic (see [Pe1] and [Pe2]). It should be noted that all of the followingsimulations have been carried out by use of our SOLA implementation NavierStokesFD.m.

3.1 Closed Ellipse-Shaped Boundaries

One example for an experiment that can be used to validate a simulation method for elastic boundaries isthe case of an ellipse-shaped string that is immersed into an incompressible fluid. This test configurationwas initially proposed by Boffi in 2003 (see [Bo]) and can be seen in figure 3.1.

(0,1)

(0,0) (1,0)

S

Ω

Figure 3.1: An elastic ellipse-shaped boundary

The ellipse S is in this situation typically described by the model of a massless immersed boundarywhose evolution is driven by the forcing term

F(s, t) = κ∂2X(s, t)

∂s2. (3.1)

Following [Bo] we will assume that its initial shape is given by

X(a, 0) =

(0.2 cos (2πa) + 0.50.1 sin (2πa) + 0.5

)a ∈ [0, 1] (3.2)

33

Page 36: Bachelor-Thesis Immersed Boundary Methods: Simulation of

and that the flow is governed by the dimensionalized Navier Stokes equations (1.1) and (1.2). In this casethe resulting problem can be described by the following set of continuous equations:

ρ

(∂u

∂t+ u · ∇u

)− µ∇2u +∇p = F in [0, 1]2 × [0, T ] (3.3)

∇ · u = 0 in [0, 1]2 × [0, T ] (3.4)

F(x, t) =

∫ L

0

∂2X(s, t)

∂s2δ(x−X(s, t))ds in [0, 1]2 × [0, T ] (3.5)

∂X(s, t)

∂t= u(X(s, t), t) in [0, L]× [0, T ] (3.6)

u(x, 0) = 0 in [0, 1]2 (3.7)

X(s, 0) =

(0.2 cos (2πa(s)) + 0.50.1 sin (2πa(s)) + 0.5

)in 0 ≤ s ≤ L. (3.8)

In order to complete this system, we prescribe homogeneous Dirichlet conditions for the velocities and‘Do Nothing’ Neumann constraints for the pressure at the boundary of the fluid domain. In the abovesituation, the string S will, of course, strive to contract into a single point (see section 2.3). However,since the enclosed fluid is incompressible and since diffusion through the boundary is impossible, it isobviously not able to do so. Instead, the ellipse will evolve into the only shape that allows an equilibriumof the occurring forces – a circle. Since the amount of enclosed fluid is constant, the final radius r of thiscircle can be predicted by use of the formula

rref =

√Aellipse at t=0

π=

√0.02π

π=√

0.02 ≈ 0.14142. (3.9)

The pressure jump that appears at the boundary when the equilibrium configuration is reached can becomputed as well. Based on the assumption that the geometric midpoint remains constant we can de-scribe the final shape of S by

Xe(s) =

rref cos(

srref

)+ 0.5

rref sin(

srref

)+ 0.5

with 0 ≤ s ≤ 2πrref. (3.10)

This allows us to calculate the force component normal to the curve Xe on an infinitesimal segment ofchord length ds as follows:

Fds,normal = (F(s, t)ds)T∂2Xe(s)/∂s

2

‖∂2Xe(s)/∂s2‖

=

(κ∂2Xe(s)

∂s2ds

)T∂2Xe(s)/∂s

2

‖∂2Xe(s)/∂s2‖

=

∥∥∥∥∂2Xe(s)

∂s2

∥∥∥∥κ ds=

∥∥∥∥(−cos(sr

)−sin

(sr

))∥∥∥∥ κ

rrefds

rrefds. (3.11)

The jump of p is thus given by ∆pref = κrref

and we can expect that the fluid in the inside of the boundarywill satisfy p = p0 + κ

rrefwhere p0 is the pressure of the surroundings. In the following we will demon-

strate that our algorithm reproduces all of the above predictions very well. One of the solutions that wehave obtained by use of SOLA-IB method can be seen in figure 3.2.

34

Page 37: Bachelor-Thesis Immersed Boundary Methods: Simulation of

(a) Pressure distribution at t = 0.1014

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 10

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

(b) Velocity field at t = 0.1014

(c) Pressure distribution at t = 1.0077

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 10

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

(d) Velocity field at t = 1.0077

Figure 3.2: Evolution of the ellipse S in case of h = 1/40, hs = L/20, κ = ρ = µ = 1 and τ = 1. Theblack dots on the boundary mark the position of the Lagrangian mesh nodes X(qi, tn).

Here, we have simulated the evolution of the ellipse S in a fluid with ρ = µ = 1 (analogously to [Bo]).The distribution function δ was chosen as

δ(x) =3

4πh2max

(0, 1− 1

2h‖x‖)

(3.12)

which leads to a forcing term of the form

F(x, t) =

T∑i=1

3κmax(0, 1− 1

2h ‖x−X(ihs, t)‖)

4πh2hs

(X((i+ 1)hs, t)− 2X(ihs, t) + X((i− 1)hs, t)

).

(3.13)

35

Page 38: Bachelor-Thesis Immersed Boundary Methods: Simulation of

Figure 3.2 shows that the boundary S strives to a circular shape as expected. This shape is reached afterapproximately one time unit which is in good accordance with the results obtained by Boffi in this testsituation. It should be noted that the string passes the equilibrium state because of the inertia and thata dying-out oscillation around the configuration shown in the figures 3.2 c) and d) occurs afterwards1.However, this oscillation is barely observable and can be neglected for the above choice of κ, µ and ρ.If we use the values that we have derived for the radius and the pressure jump at the boundary as a ref-erence, it can be seen that our solution satisfies the analytical predictions in terms of quantity as well.Details can be found in table 3.1.

Widths: L/hs = 10 L/hs = 20 L/hs = 40

r = 0.14390 = 1.0175 rref r = 0.14193 = 1.0036 rref r = 0.14154 = 1.0008 rref1/h = 10 ∆p = 4.684 = 0.662 ∆pref ∆p = 4.766 = 0.674 ∆pref ∆p = 4.938 = 0.698 ∆pref

Area loss = −3.54% Area loss = −0.72% Area loss = −0.17%

r = 0.14193 = 1.0036 rref r = 0.14188 = 1.0032 rref r = 0.14152 = 1.0007 rref1/h = 20 ∆p = 6.431 = 0.909 ∆pref ∆p = 6.601 = 0.934 ∆pref ∆p = 6.584 = 0.931 ∆pref

Area loss = −0.72% Area loss = −0.65% Area loss = −0.14%

r = 0.13452 = 0.9512 rref r = 0.14180 = 1.0027 rref r = 0.14166 = 1.0017 rref1/h = 40 ∆p = 6.954 = 0.983 ∆pref ∆p = 6.865 = 0.971 ∆pref ∆p = 6.954 = 0.983 ∆pref

Area loss = 9.53% Area loss = −0.53% Area loss = −0.34%

Table 3.1: Comparison between the results of various experiments and the analytically derived referencevalues. The radius r and the jump ∆p have been obtained by halving the average distancebetween opposite nodes of the Lagrangian mesh and by calculating the difference between themaximum and the minimum of the occurring pressure. All of the above results were computedwith κ = ρ = µ = 1 and τ = 1 at t = 1.

Here, it is seen that the analytically calculated pressure jump ∆pref = 7.071 cannot be reached if theunderlying global discretization is too coarse. On finer meshes, however, the accuracy is sufficient andthe predicted value can be approximated up to 98.3%. The radius of the resulting circle seems to bemainly unaffected by the choice of h and hs. In all of the configurations – with the exception of thecase with 1/h = 40 and hs = L/10 – it deviates only a little from the reference value rref = 0.14142.Regarding the influence of the Lagrangian mesh width hs or, respectively, the ratio between h and hsit can be observed that the accuracy depends primarily on the width h and that the solutions show thesame behaviour as long as the quotient (Lh)/hs remains between 0.5 and 2. If the width hs is chosentoo small, however, the boundary cannot be represented sufficiently by the Lagrangian mesh and flowsappear between the nodal points. This results in the area loss of nearly 10% that can be observed in caseof h = 1/40 and hs = L/10. If, on the other hand, the quotient (Lh)/hs is too big, instabilities arisesince the interference between the nodes of the Lagrangian mesh gets too strong. This typically leads to‘wrinkling’ or unphysical oscillations as seen in figure 3.3. In the following we will prefer meshes withhs ∈ [1

2h, 2h]. Experience has shown that this condition ensures both the stability and the accuracy ofthe solution in a wide variety of different situations (see [Bo]).

1 During one period of this oscillation the boundary evolves as follows: o→ 0→ o→ 0→ o

36

Page 39: Bachelor-Thesis Immersed Boundary Methods: Simulation of

Figure 3.3: Shape of the ellipse S and pressure distribution after 1.9975 units of time in case of h = 1/10,hs = L/40, κ = ρ = µ = 1 and τ = 1. It is seen that the numerical perturbations and mutualinterference between the Lagrangian nodes have caused ‘wrinkles’ on the boundary.

Regarding the area loss, it should be noted that our implementation is superior to the Finite Elementbased method used by Boffi in [Bo] which reached a minimum loss of approximately 2% on a 32 × 32mesh – most probably because of the fact that we satisfy the CFL conditions which seems to be highlyadvantageous when it comes to the tracing of the Lagrangian mesh. Overall, we can conclude that ourContinuous Forcing method provides accurate results as long as a reasonable ratio between the widths ofthe Lagrangian and the SOLA mesh is kept. The influence of the elastic boundary is reproduced well andthe condition that the fluid is not allowed to cross the boundary is respected, too. We can thus proceedand apply our algorithm to more complex situations.

3.2 Non-Closed Boundaries

The Continuous Forcing method described in section 2.3 is, of course, in no way restricted to closedimmersed boundaries. In fact, one of the major application areas of this method is the simulation ofnon-closed flapping filaments of finite length which are driven by the motion of a surrounding fluid (see,for example, [Zh1] and [Zh2]). In this situation, the free ends of the filaments naturally have to be treatedin a special way to reflect the unilateral coupling at these points of the boundary. In case of the modelapplied in section 3.1 this can be done by using discrete forcing terms of the form

FL(x, t) =3κmax

(0, 1− 1

2h ‖x−X(L, t)‖)

4πh2hs

(X(L− hs, t)−X(L, t)

)(3.14)

in the end nodes of the Lagrangian mesh2. This approach is based on the ‘spring’ interpretation of theresulting discrete boundary configuration (see section 2.3) and reflects the demand that the end nodesexperience elastic forces in only one direction of the boundary. In the following, we will demonstratethat our SOLA-IB algorithm is able to handle problems with such free ends as well. To do so, we considera test configuration as seen in figure 3.4.

2 In this example it is a node with s = L which is coupled to its neighbour with s = L− hs.

37

Page 40: Bachelor-Thesis Immersed Boundary Methods: Simulation of

(0,1)

(0,0) (1,0)

S

Ω

0.375

0.375

f

Figure 3.4: A flow canal with two non-closed immersed boundaries

Here, we have two flexible non-closed strings in a square stream canal which is filled with an incom-pressible fluid that is driven by the body force f . The strings are attached to a solid part of the fluiddomain’s boundary and considered to be unstressed in the above configuration. Because of the latterdemand, we have to use a slightly modified expression to model the internal tension as we have done insection 2.3, namely

T(s, t) = κ

(∥∥∥∥∂X(s, t)

∂s

∥∥∥∥− 1

)= κ

(∥∥∥∥∂X(s, t)

∂s

∥∥∥∥− ∥∥∥∥∂X(s, 0)

∂s

∥∥∥∥) (3.15)

with κ > 0 as in (2.25). It is easily seen that this formula provides the strains that occur due to elongationsand compressions of the curve if a linear-elastic behaviour is assumed and if the initial state is used asthe reference configuration. The discretization of (3.15) analogously to the approach in the sections 2.3and 3.1 finally leads to the discrete forcing expression

F(x, t) =

T∑i=1

3κmax(0, 1− 1

2h ‖x−X(ihs, t)‖)

4πh2hs

·[‖X((i+ 1)hs, t)−X(ihs, t)‖ − hs‖(X((i+ 1)hs, t)−X(ihs, t))‖

(X((i+ 1)hs, t)−X(ihs, t)

)+‖X((i− 1)hs, t)−X(ihs, t)‖ − hs‖(X((i− 1)hs, t)−X(ihs, t))‖

(X((i− 1)hs, t)−X(ihs, t)

)]. (3.16)

Unsurprisingly, each summand in this formula can be interpreted as the resulting elastic force on a nodeof the Lagrangian mesh which is exerted by springs as seen in figure 2.8. The only difference between thisformula and (2.27) is that here the springs have an unstressed length of hs instead of zero. The forcingterm at the free ends of the boundary can, of course, be obtained analogously to (3.14) by omitting therespective parts of the spring force. We thus get, for example,

FL(x, t) =3κmax

(0, 1− 1

2h ‖x−X(L, t)‖)

4πh2hs

·[‖X(L− hs, t)−X(L, t)‖ − hs‖(X(L− hs, t)−X(L, t))‖

(X(L− hs, t)−X(L, t)

)]. (3.17)

38

Page 41: Bachelor-Thesis Immersed Boundary Methods: Simulation of

If we use these formulas to discretize the problem seen in figure 3.4, we can conduct numerical experi-ments as depicted in figure 3.5.

(a) Norm of the velocities at t = 5.246 · 10−3

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 10

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

(b) Velocity field at t = 5.246 · 10−3

(c) Norm of the velocities at t = 18.246 · 10−3

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 10

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

(d) Velocity field at t = 18.246 · 10−3

Figure 3.5: Flow around the filaments in case of ρ = 0.0003, µ = 0.0012, τ = 0.2 and f = (1, 0).The mesh widths have been chosen as h = 1/64 and hs = π/160 ≈ 0.0196.

In this test case we have used the body force f = (1, 0) to drive the canal and the parameters ρ = 0.0003and µ = 0.0012 to describe the properties of the fluid3. The figures show that the two strings adapt tothe flow immediately and strive to a configuration that offers the lowest level of resistance. It can be seenthat the ends of the string move fastest during this deformation process (figure 3.5 a)) and that a boundarylayer emerges at the filaments when the final configuration is reached (figure 3.5 c)). Additionally, we

3 These values have been used in [Zh1] to model the behaviour of a soap film. They refer to the unit system cm, g and s.

39

Page 42: Bachelor-Thesis Immersed Boundary Methods: Simulation of

can observe that the evolution of the boundary is primarily driven by a ram pressure that arises in front ofthe strings analogously to the experiment conducted in section 2.1 (see figure 3.6). The impact that theelastic filaments have on the flow is thus in good accordance with the expected physical behaviour and theexperiences we have made in the previous chapters. However, it should be noted that Continuous Forcingmethods that are more elaborated than our approach – for example methods that take into account thefilament mass, too – provide better results in the above situation. Such techniques can, for example, beused to study the interference between the two strings and the turbulences that arise in case of strongerbody forces as well. Details regarding this topic can be found in [Zh1].

(a) Pressure distribution at t = 3.8116 · 10−3

0 0.1 0.2 0.3 0.4 0.5 0.6

0.2

0.3

0.4

0.5

0.6

0.7

0.8

(b) Filaments at t = 0 · 10−3, 3 · 10−3, ..., 15 · 10−3

Figure 3.6: Pressure distribution and evolution of the boundary in the situation of figure 3.5

3.3 Cardiac Flows

As seen in the previous chapters, the Continuous Forcing technique allows not only to simulate pressurejumps across moving thin-lined elastic boundaries but also to describe the behaviour of closed and non-closed filaments with and without active contractile properties. Because of these features, it is especiallywell suited for biological fluid dynamics problems which involve, for example, the interaction betweena liquid and a muscular tissue. One of the major application areas of this methodology and the firstfield it has been applied to is the simulation of blood flow in the human heart (see [Pe1] and [Pe2]). Suchcardiac fluid dynamics problems usually require the combination of contracting and thin-lined boundaries(as found in the heart walls and the heart valve leaflets, see figure 3.7) and are particularly challengingbecause of the huge occurring geometrical deformations. By use of the Immersed Boundary techniquethat we have described in section 2.3, however, this type of flows can be simulated with relative ease.Since the Lagrangian mesh is separated from the underlying equidistant Eulerian grid, the magnitudeof the deformations does not matter at all and because of the forcing density F the elasticity and thecontractile behaviour of the different boundaries can be incorporated without difficulties. Another majoradvantage of our approach is that the boundary conditions can be modified over time which turns out tobe essential when it comes to the simulation of the cardiac cycle. The importance of this aspect is bestunderstood by looking at the basic layout of the heart and the processes that take place while it is beating.A schematic depiction of the (human) cardiac system can be seen in the following figure.

40

Page 43: Bachelor-Thesis Immersed Boundary Methods: Simulation of

Figure 3.7: Layout of the human heart (source: www.picstopin.com)

If we assume that both the left and the right ventricle are filled at the beginning of the observation, thecardiac cycle can be described as follows: Initially, the ventricles contract (ventricular systole) whichcauses the semilunar valves to open and the blood to flow into the aorta and the pulmonary artery whichleads to the lungs. During this period the atrioventricular valves remain shut to avoid a regurgitation intothe two atria (see figure 3.8 a)). After the contraction, the ventricles relax and the pressure in these twochambers decreases. Because of this pressure drop, the semilunar valves shut and the atrioventricularvalves open which allows the blood to flow from the atria into the ventricles. This flow is strengthenedby a contraction of the atria, the so-called atrial systole (see figure 3.8 b)). When the ventricles are filled,they contract again which causes the atrioventricular valves to close and the semilunar valves to open.While this happens, the relaxed atria are filled by the blood arriving from the lung and the body. Thecycle has now reached the initial configuration and repeats itself.

(a) Ventricular systole (b) Atrial systole

Figure 3.8: The cardiac cycle (source: en.wikipedia.org/wiki/Cardiac_cycle)

Since the muscular heart wall periodically relaxes and contracts and since the heart-valve leaflets onthe one hand have to withstand the occurring pressure differences between the chambers when they areclosed and on the other hand are allowed to move nearly freely while they are open, time dependentmodifications at the boundary conditions are inevitable when it comes to the simulation of the aboveprocesses. Regarding this problem, our Continuous Forcing approach turns out to be highly advanta-

41

Page 44: Bachelor-Thesis Immersed Boundary Methods: Simulation of

geous. Because of the fact that the forcing density F can be varied smoothly, we are, for example, ableto slowly loosen particular sections of the boundary that we have affixed with the penalty technique bygradually reducing the penalty parameter κ (see section 2.3). Additionally, we can superpose several in-ternal and external force densities to reflect the interference of different effects. This allows, for example,the modeling of the heart valve leaflets which are elastic but also subjected to restoring forces assertedby so-called papillary muscles which prevent the inversion and the collapse of the valve. A detaileddescription of the heart valve mechanics and the related physical background can be found in [Pe2]. Inorder to demonstrate that our approach enables the simulation of such complex systems with time depen-dent, superposed and arbitrarily combined boundary conditions as well, we will consider the followingsimplified two-dimensional model of the left side of the human heart (see figure 3.7 and 3.9).

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 10

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Figure 3.9: Approximation of the left side of the human heart. Parts that are affixed during the wholesimulation are depicted black, parts which are (temporarily) moving are plotted in red.

Here, we have used sectors of appropriately chosen ellipses to approximate the geometry of the left ven-tricle (large lower chamber), the left atrium (circular upper right chamber), the heart valve leaflets andthe endings of the adjacent blood vessels. The underlying SOLA mesh has a width of h = 1/64 whilethe Lagrangian mesh is equidistant with hs ≈ 1/40. To drive the fluid, we use the techniques describedin the previous chapters to mimic the behaviour of the heart chambers during the cardiac cycle. Moreprecisely, we employ the penalty technique to prevent the fixed parts of the heart wall from moving, themethod applied in section 3.1 to model the contractile parts of the boundary and the technique used insection 3.2 to describe the properties of the heart valve leaflets. A detailed listing of the forces exertedby the immersed boundary and the changes over time can be found in table 3.2. On the edge of the fluiddomain Ω = [0, 1]2 we prescribe outflow conditions for the velocities and homogeneous Dirichlet condi-tions for the pressure. Besides, we choose the parameters ρ = 1 and µ = 0.05 to describe the propertiesof the fluid. It should be noted that this choice is not physically motivated but a consequence of the effortto reduce the runtime of our programme. The results that we have obtained in this situation by use of theSOLA-IB algorithm are depicted in the figures 3.10, 3.11 and 3.12. Here, it is seen that the deformationsof the immersed boundary as well as the distribution and evolution of the pressure during the cycle are ingood accordance with the behaviour that can be observed in reality. However, because of the simplifiedgeometry, the basic material models, the unphysical choice of material parameters and the fact that blood

42

Page 45: Bachelor-Thesis Immersed Boundary Methods: Simulation of

is non-Newtonian and thus actually not describable by the classic Navier Stokes equations, our data can,of course, not be used to draw sound conclusions about the fluid flow during a heart beat. To do so, amore elaborated set of governing equations and a more exact model of the human heart have to be used(see, e.g., [Pe1]). Nevertheless, our experiment shows that the combination and the superposition of thedifferent forcing densities via the Continuous Forcing approach are completely unproblematic and thatlarge and complex test configurations can be handled by our algorithm as well.

Time Ventricle Semilunar Valve Atrium Atrioventricular Valve

0.00 - 0.05 κC lin. increased κR lin. decreasedfrom 0 up to 40 from 100 to 0

κE = 50 κR = 100

0.05 - 0.30 κC = 40 κE = 50

0.30 - 0.33 κR quad. increased κR quad. decreasedfrom 0 to 100 from 100 to 0κE = 50 κE = 50

0.33 - 0.35 κC lin. decreasedfrom 40 up to 40/3 κC lin. increasedκR quad. increased from 0 up to 40

0.35 - 0.38 from 0 to 400/9κR = 100 κE = 50

0.38 - 0.50 κC = 40

0.50 - 0.55 κC lin. increased κR lin. decreased κR lin. increasedfrom 40/3 up to 40 from 100 to 0 κC lin. decreased from 0 to 100

κE = 50 from 40 to 0 κE = 50κR quad. increased

from 0 to 1000.55 - 0.60

κC = 40 κE = 50

0.60 - 0.80 κR = 100

Table 3.2: Evolution of the boundary forces over time. The variables κC , κR and κE denote the elas-ticity constants of the contractile model (see (2.25)), the penalty method (see (2.26)) and theelastic model (see (3.15)). Two values in the same box denote the superposition of the respec-tive force densities. The term ‘quad. increased/decreased from a to b’ denotes the quadraticgrowth/decrease with zero slope at the smaller of the two values a and b. It should be notedthat the geometric deformations and the movement of the boundary are solely driven by theseforces (with exception of the leaflet tips whose velocity is calculated by interpolating betweenthe velocities at the adjacent nodes to allow proper opening and closing). All of the parametershave been chosen heuristically.

43

Page 46: Bachelor-Thesis Immersed Boundary Methods: Simulation of

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 10

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

(a) Beginning of the ventricular systole (t = 0.0426)

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 10

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

(b) End of the ventricular systole (t = 0.2990)

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 10

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

(c) Beginning of the atrial systole (t = 0.3386)

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 10

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

(d) Middle of the atrial systole (t = 0.4382)

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 10

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

(e) Beginning of the ventricular systole (t = 0.5115)

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 10

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

(f) End of the ventricular systole (t = 0.7983)

Figure 3.10: Velocity field (h = 1/64, hs ≈ 1/40, ρ = 1, µ = 0.05 and τ = 0.1). The factor τ has beenchosen relatively small to guarantee the accuracy in spite of the complex test situation.

44

Page 47: Bachelor-Thesis Immersed Boundary Methods: Simulation of

(a) Beginning of the ventricular systole (t = 0.0426) (b) End of the ventricular systole (t = 0.2990)

(c) Beginning of the atrial systole (t = 0.3386) (d) Middle of the atrial systole (t = 0.4382)

(e) Beginning of the ventricular systole (t = 0.5115) (f) End of the ventricular systole (t = 0.7983)

Figure 3.11: Norm of the velocities (h = 1/64, hs ≈ 1/40, ρ = 1, µ = 0.05 and τ = 0.1)

45

Page 48: Bachelor-Thesis Immersed Boundary Methods: Simulation of

(a) Beginning of the ventricular systole (t = 0.0426) (b) End of the ventricular systole (t = 0.2990)

(c) Beginning of the atrial systole (t = 0.3386) (d) Middle of the atrial systole (t = 0.4382)

(e) Beginning of the ventricular systole (t = 0.5115) (f) End of the ventricular systole (t = 0.7983)

Figure 3.12: Pressure distribution (h = 1/64, hs ≈ 1/40, ρ = 1, µ = 0.05 and τ = 0.1)

46

Page 49: Bachelor-Thesis Immersed Boundary Methods: Simulation of

Conclusion

Overall, we can conclude that the SOLA algorithm that we have described in the first chapter of this workturns out to be well combinable with the Immersed Boundary technique. It can be enhanced by both theContinuous and the Discrete Forcing approach with relative ease and provides – in spite of unfavourablefactors like the staggered grid – surprisingly accurate results which are in good accordance with the find-ings of other authors and the available literature. Especially the Continuous Forcing approach proposedby Boffi (see section 2.3) seems to be a convenient alternative to conventional strategies. In case ofthin lined or elastic structures which interact with the fluid it offers a simple and reliable method witha sound physical basis which allows the simulation of even complex test configurations. The accuracythat is achieved by this approach will, of course, usually not reach the precision of a procedure which isbased on adaptive remeshing algorithms or comparable techniques since the application of the smoothedDirac delta function will always prevent a totally sharp representation of the boundary. However, thepossibility to avoid coordinate transformations as well as complex discretization operators and the op-tion to incorporate even complicated material models with relative ease clearly outweighs this drawback,especially, if a Finite Difference algorithm with a complicated underlying mesh is employed. Anotheradvantage of the Continuous Forcing approach is that it only affects the forcing terms in the governingdifferential equations. Because of this, the resulting methods for the incorporation of boundary condi-tions are independent of the employed underlying solution algorithm and can be used to expand alreadyexisting simulation programmes without major difficulties – no matter whether they are based on a FiniteDifference, a Finite Volume or a Finite Element discretization. Regarding the application of ImmersedBoundary technique in biological fluid dynamics, we can conclude that the Continuous Forcing approachis well suited to model boundaries which consist of organic material. Especially the possibility to de-scribe pressure jumps across thin boundaries and to directly integrate the active contractile behaviour ofmuscular tissues into the simulation is a huge advantage when it comes to the simulation of blood flow inthe human body or related fluid dynamics phenomena. The modeling of such complex interaction prob-lems by use of Continuous Forcing technique, though, can be quite cumbersome. As outlined in section3.3 (see table 3.2) the flexibility of the methodology goes hand in hand with a large number of materialparameters and other adjustable variables which, of course, increases the difficulty to design a model thatapproximates the real situation as good as possible. However, this problem appears to result from thenature of the physical problem rather than from the numerical method and it seems to be arguable if othertechniques for the simulation of flows with elastic boundaries are more advantageous when it comes tothis issue. All things considered, we can come to the conclusion that the Immersed Boundary approachand the Continuous Forcing methodology in particular are a good choice if more elaborated techniquesare not available. These non-conventional techniques offer a wide variety of options to incorporateboundary conditions and a robust as well as easily implementable alternative to ordinary approaches.Since this flexibility comes at the expense of accuracy, however, more elaborated techniques should bepreferred if they are on hand.

47

Page 50: Bachelor-Thesis Immersed Boundary Methods: Simulation of

List of Symbols

ρ Density of the fluidµ Viscosity of the fluidRe Reynolds numberu Fluid velocityp Pressuref Density of the body force acting on the fluid (non-dimensionalized/dimensionalized

corresponding to the employed version of the Navier Stokes equations)x Eulerian variable denoting the locationt TimeT Overall time of the simulationΩ Fluid domain∂Ω Boundary of the fluid domainS Solid/elastic structure∇ Nabla operatorh Width of spatial discretizationO(.) Big O notationγ Weighting parameter (see equation 1.24)[...]i,j Discretization of the bracketed expression on cell ijunx,i,j Component in x-direction of the discretized velocity field (cell ij, time step tn)uny,i,j Component in y-direction of the discretized velocity field (cell ij, time step tn)tn n-th time step, equal to nδtδt Width of the temporal discretizationτ Safety factor of the time step calculation formula (1.64)Fni,j See equation 1.50Gni,j See equation 1.50L Abstract differential operator (see 2.1)q Lagrangian coordinate describing the immersed boundaryX(q, t) Point of the immersed boundaryF Body force reproducing the impact of the immersed boundaryδ Dirac delta functionF Immersed Boundary force densityT Internal tensionM Excess of mass densityδ Distribution functions Chord lengthhs Width of the discretization of the chord length intervalκ Elasticity constantL Upper limit of the chord length interval (corresponds to the length of the curve)|...| Absolute value function‖...‖ Euclidean norm

48

Page 51: Bachelor-Thesis Immersed Boundary Methods: Simulation of

Bibliography

[Bo] D. Boffi, L. Gastaldi and L. Heltai, A finite element approach to the immersed boundary method,Comput. & Structures 81, 491-501, 2003

[Bot] O. Botella and R. Peyret, Benchmark spectral results on the lid-driven cavity flow, Comput. Fluids27, 421-433, 1998

[Bru] C. H. Bruneau and M. Saad, The 2D lid-driven cavity problem revisited, Comput. Fluids 35, 326-348, 2006

[Da] K. Datta et al., Stencil computation optimization and auto-tuning on state-of-the-art multicorearchitectures, Proceedings of the 2008 ACM/IEEE conference on Supercomputing, IEEE Press,Austin, Texas, 2008

[Do] J. Donea, Computational methods for transient analysis, Computational Methods in Mechanics,vol. 1, North-Holland, Elsevier, 1983

[Ge] R. A. Gentry, R. E. Martin and B. J. Daly, An Eulerian differencing method for unsteady com-pressible flow problems, Journal of Comput. Phys. 8, 55-76, 1966

[Gh] U. Ghia, K. N. Ghia and C. T. Shin, High-Re Solutions for Incompressible Flow Using the Navier-Stokes Equations and a Multigrid Method, Journal of Comput. Phys. 48, 387-411, 1982

[Gri] M. Griebel, T. Dornseifer and T. Neunhoeffer, Numerische Simulation in der Strömungsmechanik,Vieweg, Braunschweig, 1995

[Gro] D. Gross, W. Hauger and J. Schröder, Technische Mechanik 1, 8th enhanced edition, Springer,2004

[Hir] C. W. Hirt, B. D. Nichols and N. C. Romero, SOLA - A Numerical Solution Algorithm for TransientFlows, NASA STI/Recon Technical Report, 1975

[Mi] R. Mittal and G. Iaccarino, Immersed boundary methods, Annu. Rev. Fluid Mech. 37, 239-261,2005

[Pa] J. E. Park, VOLVOF: An Update of the CFD Code, SOLA-VOF, Technical report of the Oak RidgeNational Laboratory (ORNL/TM-1999/292), 1999

[Pe1] C. S. Peskin, Flow patterns around heart valves: a digital computer method for solving the equa-tions of motion, Ph.D. thesis, Yeshiva University, New York, 1972

[Pe2] C. S. Peskin, The fluid dynamics of heart valves: experimental, theoretical and computationalmethods, Annu. Rev. Fluid Mech. 14, 235-259, 1982

[Pey] R. Peyret and T. D. Taylor, Computational Methods for Fluid Flow, Springer, 1986

[Sa] Y. Saad, Iterative Methods for Sparse Linear Systems, 3rd edition, SIAM, 2000

[Sch] R. Schreiber and H.B. Keller, Driven cavity flows by efficient numerical techniques, Journal ofComput. Phys. 49, 310-333, 1983

49

Page 52: Bachelor-Thesis Immersed Boundary Methods: Simulation of

[Si] H. Sigloch, Technische Fluidmechanik, 7th revised edition, Springer, 2009

[To] M. F. Tome and S. McKee, A computational marker and cell method for free surface flows ingeneral domains, Journal of Comput. Phys. 110, 171-186, 1994

[Tu] S. Turek, D. Wan und L. Seyukova-Rivkind, The Fictitious Boundary Method for the implicittreatment of Dirichlet boundary conditions with applications to incompressible flow simulations,Lecture Notes in Computational Science and Engineering, Vol. 35, Springer, 2003

[We] E. Weinan and L. Jian-Guo, Projection Method I: Convergence and Numerical Boundary Layers,SIAM J. Numer. Analysis 32, 1017-1057, 1995

[Zh1] L. Zhu and C. S. Peskin, Interaction of two flapping filaments in a flowing soap film, Phys. Fluids15, 128-136, 2003

[Zh2] L. Zhu, Simulation of a flapping flexible filament in a flowing soap film by the immersed boundarymethod, Ph.D. thesis, Courant Institute, New York University, 2001

50