Top Banner
74

Lehrstuhl für Kontinuumsmechanik und Materialtheorie ... · Eidesstaatliche Erklärung Hiermit versichere ich, dass ich die vorliegende Arbeit selbstständig verfasst und keine anderen

Aug 27, 2019

Download

Documents

vantu
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Lehrstuhl für Kontinuumsmechanik und Materialtheorie ... · Eidesstaatliche Erklärung Hiermit versichere ich, dass ich die vorliegende Arbeit selbstständig verfasst und keine anderen

Lehrstuhl für Kontinuumsmechanik und Materialtheorie

Diplomarbeit

Finite element analysis of an oscillating microcantilever immersed

into a uid using uid structure interaction in an arbitrary

Lagrangian Eulerian framework

Paul Lonk

1. Prüfer: Prof. Dr. rer. nat. W.H. Müller

2. Prüfer: Dr. R. Wille

Betreuer: M.Sc. B.E. Abali

Page 2: Lehrstuhl für Kontinuumsmechanik und Materialtheorie ... · Eidesstaatliche Erklärung Hiermit versichere ich, dass ich die vorliegende Arbeit selbstständig verfasst und keine anderen

Eidesstaatliche Erklärung

Hiermit versichere ich, dass ich die vorliegende Arbeit selbstständig verfasst und keine anderen als die

angegebenen Quellen und Hilfsmittel benutzt habe. Alle Ausführungen, die anderen veröentlichten

oder nicht veröentlichten Schriften wörtlich oder sinngemäÿ entnommen wurden, habe ich kenntlich

gemacht.

Die Arbeit hat in gleicher oder ähnlicher Fassung noch keiner anderen Prüfungsbehörde vorgele-

gen.

Berlin, den 18.04.2012

...........................................................................

Paul Lonk

Page 3: Lehrstuhl für Kontinuumsmechanik und Materialtheorie ... · Eidesstaatliche Erklärung Hiermit versichere ich, dass ich die vorliegende Arbeit selbstständig verfasst und keine anderen

Zusammenfassung

Die Diplomarbeit handelt von der numerischen Simulation einer Schwingung eines elastischen Fes-

tkörpers in einer viskosen Flüssigkeit. Die Arbeit ist aus der Motivation entstanden Viskositäten mit

Hilfe des Rasterkraftmikroskops zu messen. Hierbei werden zunächst die globale Massenbilanz und

die globale Impulsbilanz im kontinuumsmechanischen Kontext beleuchtet und dann jeweils Finite

Element Formulierung abgeleitet. Insbesondere werden Bilanzen für sich bewegende Kontrollvolu-

mine diskutiert. Die hergeleiteten variationellen Formulierungen werden in Python unter Zuhilfe-

nahme von Open Source Paketen programmiert, welche vom FEniCS Projekt bereitgestellt werden.

Der wissenschaftliche Anspruch der Arbeit lag darin, die unterschiedlichen Darstellungsweisen der

Fluid- und Festkörperdynamik zusammenzubringen um eine Wechselwirkung zwischen Festkörper

und Flüssigkeit realisieren zu können.

Page 4: Lehrstuhl für Kontinuumsmechanik und Materialtheorie ... · Eidesstaatliche Erklärung Hiermit versichere ich, dass ich die vorliegende Arbeit selbstständig verfasst und keine anderen

CONTENTS CONTENTS

Contents

1 Introduction 1

1.1 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

1.2 Problem statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

1.3 Atomic force microscopy experiment . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

2 Mechanical preliminaries 6

2.1 Balance equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

2.2 Eulerian framework . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

2.3 Lagrangian framework . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

2.4 Arbitrary Lagrangian Eulerian framework . . . . . . . . . . . . . . . . . . . . . . . . 13

3 Structure problem 17

3.1 Constitutive relations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

3.1.1 Hooke's law . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

3.1.2 Saint Venant-Kirchho law . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

3.2 Variational form . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

3.3 Code verication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

4 Fluid problem 29

4.1 Newtonian uid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

4.2 Balance equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

4.3 Variational Formulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

4.4 Code verication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

5 Fluid-structure interaction 34

5.1 Weak formulation of ALE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

5.2 Trial with a xed and moving mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

5.3 Final simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

5.4 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

A Implementation 55

B Material parameters 68

I

Page 5: Lehrstuhl für Kontinuumsmechanik und Materialtheorie ... · Eidesstaatliche Erklärung Hiermit versichere ich, dass ich die vorliegende Arbeit selbstständig verfasst und keine anderen

LIST OF FIGURES LIST OF FIGURES

List of Figures

1.1 Couette viscometer [15] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

1.2 AFM viscometer [5] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

1.3 Model of experiment assembly for simulation . . . . . . . . . . . . . . . . . . . . . . 2

1.4 Chip with silicon cantilevers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

1.5 Water drop on carrier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

1.6 Cantilever with reected laser beam . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

1.7 Measurement instrument with lens system [2] . . . . . . . . . . . . . . . . . . . . . . 4

1.8 Photodiode matrix with laser spot [2] . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

1.9 Sketch for calibration process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

1.10 Sensitivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

1.11 Frequency spectrum for dierent materials [1] . . . . . . . . . . . . . . . . . . . . . . 4

2.1 Scalar product . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

2.2 Body Bt with boundary ∂Bt and outer normal vector ni . . . . . . . . . . . . . . . . 9

2.3 Comparison between frameworks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

2.4 Tank as a spatial domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

2.5 Domain Ωt with boundary and outer normal vector ni and mass ow m . . . . . . . 14

2.6 Channel with uid owing inside . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

3.1 Linear continuous Galerkin elements [19] . . . . . . . . . . . . . . . . . . . . . . . . . 20

3.2 Cantilever model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

3.3 Computational assembly . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

3.4 FEM simulation of a beam in Lagrangian framework with a excitation frequency

f = 100 kHz (scale is 1µm) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

3.5 Comparison of 2d and 3d results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

3.6 Snapshots from 3d calculation at dierent time slices (scale is 1µm) . . . . . . . . . . 24

3.7 Computational assembly . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

3.8 Vibration at 9 MHz . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

3.9 Vibration at 48 Mhz . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

3.10 Frequency spectrum of cantilever . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

4.1 Model for a simple channel ow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

4.2 Mesh for a simple channel ow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

4.3 Velocity in a channel (1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

4.4 Velocity in a channel (2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

5.1 Model for simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

5.2 Computational domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

5.3 Initial computational domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

5.4 Current computational domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

5.5 Moved uid domain according to structure . . . . . . . . . . . . . . . . . . . . . . . . 35

5.6 Model of the channel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

II

Page 6: Lehrstuhl für Kontinuumsmechanik und Materialtheorie ... · Eidesstaatliche Erklärung Hiermit versichere ich, dass ich die vorliegende Arbeit selbstständig verfasst und keine anderen

LIST OF TABLES LIST OF TABLES

5.7 Fixed mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

5.8 A channel ow with xed mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

5.9 A channel ow with moving mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

5.10 Motion of the uid mesh according to the cantilever . . . . . . . . . . . . . . . . . . 44

5.11 Simulation outlines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

5.12 Initial structured mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

5.13 Velocity and pressure eld at 0.3MHz and t = T50 . . . . . . . . . . . . . . . . . . . . 47

5.14 Velocity and pressure eld at 0.3MHz and t = T4 . . . . . . . . . . . . . . . . . . . . 47

5.15 Mesh of experimental geometry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48

5.16 Velocity eld for a excitation frequency of 0.1 kHz at t = T10 . . . . . . . . . . . . . . 49

5.17 Pressure eld for a excitation frequency of 0.1 kHz at t = T10 . . . . . . . . . . . . . . 49

5.18 Computational results for a excitation frequency of 0.1 kHz at t = T10 . . . . . . . . . 50

5.19 Computational results for a excitation frequency of 0.1 kHz at t = T4 . . . . . . . . . 50

5.20 Computational results for a excitation frequency of 0.1 kHz at t = T2 . . . . . . . . . 51

5.21 Computed frequency spectrum of cantilever in air . . . . . . . . . . . . . . . . . . . . 51

5.22 Frequency spectrum of AFM experiment with curve t in air . . . . . . . . . . . . . 51

5.23 Frequency spectrum of AFM experiment with water . . . . . . . . . . . . . . . . . . 52

A.1 Program diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65

List of Tables

2.1 Physical quantities for balances [21, p. 73] . . . . . . . . . . . . . . . . . . . . . . . . 9

3.1 Material parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

4.1 Parameters for water . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

5.1 Parameters for simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

B.1 Transfer table for computation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68

III

Page 7: Lehrstuhl für Kontinuumsmechanik und Materialtheorie ... · Eidesstaatliche Erklärung Hiermit versichere ich, dass ich die vorliegende Arbeit selbstständig verfasst und keine anderen

1 INTRODUCTION

1 Introduction

1.1 Motivation

Viscosity is a measure for a uid's internal friction. It describes the resistance of the uid to im-

mersed objects moving relative to it. Nowadays viscosity is mostly measured with Couette rotational

viscometers. These devices feature one movable and one stationary part. The uid is lled between

them (see gure 1.1). The nearest uid particles adhere to the rotational part and move along. Be-

cause of internal friction a stationary linear viscosity prole appears inside the uid. By measuring

the torque applied on the static part it is possible to determine the viscosity of the uid. In this

Figure 1.1: Couette viscometer [15] Figure 1.2: AFM viscometer [5]

work we will present a dierent approach, because sometimes the Couette viscometer can hardly

be applied. Elastic uids like gels with high viscosity and long molecules, for example, may get

cracks with the Couette viscometer, which would alter the material and therefore distort the results.

Another possible reason is, if the uid badly wets the surface and therefore no or an unsteady ow

develops, there are also little chances to acquire reasonable data. More suitable data derives the

atomic force microscopy (AFM). Here a small cantilever is immersed into a uid. The cantilever is

excited externally with an electromagnet or a piezo and the response movement is measured. Since

the uid reacts with a certain resistance the eigenfrequency appears somehow shifted compared to a

movement without the uid (see gure 1.2). By comparing the eigenfrequencies with and without the

uid the viscosity can be derived [7, 5, 26, 30, 31]. This procedure appears to be quite new and very

promising in terms of precision, but until now not yet completely understood. Therefore calculations

relay on rough empirical models with no or at least very few physical background. Measurements

take time and mostly it is only possible to record one single spot at one time. So it is very dicult

to understand the interaction knowing only so little about the action. Computer simulations deliver

way better possibilities, since you can simulate the whole domain simultaneously.

1

Page 8: Lehrstuhl für Kontinuumsmechanik und Materialtheorie ... · Eidesstaatliche Erklärung Hiermit versichere ich, dass ich die vorliegende Arbeit selbstständig verfasst und keine anderen

1.2 Problem statement 1 INTRODUCTION

1.2 Problem statement

In order to create accurate measurement data it is necessary to understand the physical mechanism

appearing in this system. Therefore a numerical simulation seems reasonable. In this paper the

simulation will be conducted with the nite element method (FEM) using FEniCS an open source

package library written either in C++ or in Python. To gain results in a moderate amount of time,

the model will be two dimensional (Figure 1.3). Apart from this major simplication the modeling

will be as close as possible to the atomic force microscopy (AFM) experiment conducted at the TU

Berlin (see chapter 1.3). Since we are dealing with a system consisting of a uid and a solid part we

Figure 1.3: Model of experiment assembly for simulation

have to map the uid structure interaction (FSI) between the two of them. The diculty concerning

uid structure interactions is that the uid part is described in a dierent manner than the solid

part. Fluid problems are usually stated in the Eulerian description and the structural problems

in the Lagrangian description, since the constitutional equations are also stated in the Eulerian

and Lagrangian description respectively. In the Eulerian description we are monitoring specic

spatial points, no matter which particle is owing past this point. Therefore we observe one par-

ticle at one time slice and at the next time slice this particle has moved somewhere else and we

are observing another particle at the same point. Thus it might be more reasonable to speak of

quantities and not of single particles. This type of description is suitable for uid problems since

uid particles undergo big amount of displacements or may create vertices and usually have great

distortions. Therefore if we would attach nodes to uid particles this heavy movement would result

in a poor mesh, where cells occasionally overlap other cells. This leads to convergence problems in

the numerical solution. The Lagrangian description monitors every single particle. This can be

realized as if to every particle and a computational node is attached. When time evolves and the

solid deforms the nodes follow the motion. The result is a deformed mesh. This description is used

for solids. When it comes to FSI we have to bring these descriptions together. In this work this goal

is achieved with the arbitrary Lagrangian Eulerian (ALE) description.

The objective is to create a research framework for uid-structure interaction where dierent con-

stitutional laws and dierent interactions may be tested. Therefore a clear understanding for both

the uid and the structure is necessary. Another important parameter is writing the program in

such a manner so that new material models might be easily implemented. Accordingly we choose

to start with the global balance equations for mass and linear momentum. Then we utilize these

2

Page 9: Lehrstuhl für Kontinuumsmechanik und Materialtheorie ... · Eidesstaatliche Erklärung Hiermit versichere ich, dass ich die vorliegende Arbeit selbstständig verfasst und keine anderen

1.3 Atomic force microscopy experiment 1 INTRODUCTION

equations to the specic problems and introduce constitutional laws for both uid and structure.

Subsequently we develop a weak formulation and then implement the resulting forms in python with

FEniCS. There we dene modules for uid and structure, whereas each module has its own methods

and data. These modules are tested with standard structural and uid problems to check their

accuracy and feasibility. After testing phase the modules are merged together in order to create the

nal FSI code.

1.3 Atomic force microscopy experiment

In order to create a reasonable model we will rst describe the experiment conducted at the Technical

University of Berlin (Department of Chemistry) at the chair of Applied Physical Chemistry of Prof.

Dr. Regine v. Klitzing. Especially great thanks to Dr. Cagri Üzüm for showing his lab and for the

detailed explanation and demonstration of the AFM experiment.

Assembly

The system consists of a chip holding three microscopic cantilevers (see gure 1.4). The chip is

placed onto a carrier, which is part of the measurement instrument. The carrier with the cantilever

Figure 1.4: Chip with silicon cantilevers Figure 1.5: Water drop on carrier

is immersed into a uid (see gure 1.5). A laser is adjusted near the end of the cantilever, but not

at the very end since the laser spot might be lost during the movement (see gure 1.6). It is then

reected from the cantilever and lead through a system of lenses (see gure 1.7) to a matrix of four

photo diodes. The photodiodes are connected as a bridge circuit. By measuring the dierence in

voltage between the upper two diodes and the lower two the deformation of the cantilever is recorded

(see gure 1.8). Therefore two quantities are observed. The voltage over all four diodes and the

dierence in voltage. The rst value guarantees that the whole laser beam was reected. And it

also indicates that the spot is still within the boundaries of the matrix. The second value delivers

the actual measurement. In order to nd displacements from the measured voltage the instrument

needs calibration. Therefore the cantilever is moved near a wall until contact is established (see

gure 1.9). Then the carrier moves further so that the cantilever bends. Since the piezo position is

3

Page 10: Lehrstuhl für Kontinuumsmechanik und Materialtheorie ... · Eidesstaatliche Erklärung Hiermit versichere ich, dass ich die vorliegende Arbeit selbstständig verfasst und keine anderen

1.3 Atomic force microscopy experiment 1 INTRODUCTION

laser

photodiode

Figure 1.6: Cantilever with reected laserbeam

Figure 1.7: Measurement instrument withlens system [2]

Figure 1.8: Photodiode matrix with laserspot [2]

chip

piezo

deflection

position

Figure 1.9: Sketch for calibration process

Figure 1.10: Sensitivity Figure 1.11: Frequency spectrum for dierentmaterials [1]

4

Page 11: Lehrstuhl für Kontinuumsmechanik und Materialtheorie ... · Eidesstaatliche Erklärung Hiermit versichere ich, dass ich die vorliegende Arbeit selbstständig verfasst und keine anderen

1.3 Atomic force microscopy experiment 1 INTRODUCTION

well known, it is possible to deduce a characteristic sensitivity in µmV (see gure 1.10). The bridge

circuit delivers a linear relationship between the voltage and the position. Therefore the sensitivity

can be seen as a conversion factor.

After calibration has been succeeded, the carrier with the cantilever is immersed into a uid. The

piezo is driven by an alternating current and starts to oscillate. Since the piezo and the carrier are

rigidly connected they move the same way. Therefore the cantilever is excited through a prescribed

displacement at the bottom. A certain frequency spectrum is swiped and the amplitude is recorded.

After plotting the amplitude of the voltage over the exciting frequency the eigenfrequencies are

evident (see gure 1.11). With heuristic curve ts it is now possible to derive the viscosity [5, 26].

5

Page 12: Lehrstuhl für Kontinuumsmechanik und Materialtheorie ... · Eidesstaatliche Erklärung Hiermit versichere ich, dass ich die vorliegende Arbeit selbstständig verfasst und keine anderen

2 MECHANICAL PRELIMINARIES

2 Mechanical preliminaries

In this chapter we will derive basic equations for the upcoming simulation. The motion will be

dictated by the balance of mass and the balance of linear momentum. That is why we rst will

deal with the balance of mass. We will study the equations for a material domain and for an

arbitrary spatial domain. Great emphasis will be put according dierent kind of descriptions and

congurations. The same procedure will be done with the balance of linear momentum. Many books

contain topics depicted in this work for example: [3, 4, 9, 21].

We start by introducing the concept of motion and important quantities which are connected to it.

When we consider a material body B0 at time t = 0, we can identify each particle with its position

vector Xi. When time progresses the position of each particle changes. The current spatial position

of a particle at time t is xi. The mapping, which describes this particular change is the motion ϕi:

xi = ϕi (Xk, t) . (2.1)

If we take the current position of all particles from B0, we get the body Bt. This is still the same

body, but at dierent time slice. From now on we shall refer to B0 as the reference or material

conguration and to Bt as the current conguration.The rst important quantity for describing nite deformations is the deformation gradient Fij :

Fij =∂ϕi∂Xj

. (2.2)

The deformation gradient relates a innitesimal line element dXi in the reference conguration to

the according line element in the current conguration:

dxi = FijdXj and dXi =(F−1

)ijdxj . (2.3)

Knowing the transformation of a line element we may also create transformations for a innitesimal

volume element dv and surface element dai [21, p. 62] [4, p. 73]:

dv = JdV and dai = J(F−1

)jidAj . (2.4)

Here capital letters describe quantities in the reference conguration and small letters in the current

conguration accordingly. Additionally we used J the determinant of the deformation gradient:

J = det (Fij) . (2.5)

When we study the scalar product of two line elements dX(1)i and dX

(2)i deforming to dx(1)

i and

dx(2)i , we introduce the right Cauchy Green tensor Cij :

dx(1)i dx

(2)i = FijdX

(1)j FikdX

(2)k = dX

(1)j FijFik︸ ︷︷ ︸

Cjk

dX(2)k . (2.6)

6

Page 13: Lehrstuhl für Kontinuumsmechanik und Materialtheorie ... · Eidesstaatliche Erklärung Hiermit versichere ich, dass ich die vorliegende Arbeit selbstständig verfasst und keine anderen

2 MECHANICAL PRELIMINARIES

The scalar product gives us information about the lengths of the elements and the angle between

them (see gure 2.1):

dx(1)i dx

(2)i =

∣∣∣dx(1)∣∣∣ ∣∣∣dx(2)

∣∣∣ cos (α) . (2.7)

Now we are able to compare the lengths and angles in the reference conguration with those in the

Figure 2.1: Scalar product

current conguration:

1

2

(dx

(1)i dx

(2)i − dX

(1)i dX

(2)i

)=

1

2

(dX

(1)i CijdX

(2)j − dX

(1)i δijdX

(2)j

)= dX

(1)i

1

2(Cij − δij)︸ ︷︷ ︸

EGij

dX(2)j , (2.8)

with EGij being Green-Lagrange's strain tensor.

When we inspect the motion of a body we also have to deal with velocities. The velocity of a material

particle is the change of its position with time:

vi (Xk, t) =∂ϕi (Xk, t)

∂t

∣∣∣∣Xk=const.

. (2.9)

Which is nothing else, but the material time derivative of motion. It is called material, because we

stick to a distinctive particle and observe its velocity. In this case we pictured the velocity dependent

on the material coordinates Xk. We might also describe the velocity with spatial coordinates xkwith the help of ϕi [3, p. 94f]:

vi = vi

(ϕ−1j (xj , t) , t

)= vi (xk, t) . (2.10)

Such a transformation is always possible and usually associated with the names Lagrange and

Euler. We will recapitulate these two descriptions in more detail later. Having this in mind we are

able to dene the material time derivative for an arbitrary quantity ψ:

dt=∂ψ (Xi, t)

∂t. (2.11)

7

Page 14: Lehrstuhl für Kontinuumsmechanik und Materialtheorie ... · Eidesstaatliche Erklärung Hiermit versichere ich, dass ich die vorliegende Arbeit selbstständig verfasst und keine anderen

2.1 Balance equations 2 MECHANICAL PRELIMINARIES

The same time derivative in the Eulerian description looks dierent, because xi is also a function

in time:dψ

dt=dψ (xi, t)

dt=∂ψ (xi,t)

∂t+∂ψ (xi, t)

∂xivi. (2.12)

In most cases it is evident from the equation which description is used. Therefore we omit labeling

the description in the sequence.

2.1 Balance equations

So let us assume an arbitrary quantity Ψ with volumetric density ψ:

Ψ =

ˆBtψdv. (2.13)

We will need the material time derivative

d

dt

ˆBtψdv.

Here we have to be careful and face two time dependencies. First the integrand and second the

domain Bt itself may change in time. Consider a metal forming process, where a metal sheet is

bend into a dierent shape. We may confront these diculties by transforming the integral into the

reference conguration: ˆBtψdv =

ˆB0ψ J dV. (2.14)

The benet of using the reference conguration is that it is xed in time. So now the integral has

no time dependency and we apply the product rule for derivatives:

d

dt

ˆB0ψ J dV =

ˆBt

d

dt(ψ) dv +

ˆB0ψdJ

dtdV =

ˆBt

d

dt(ψ) dv +

ˆBtψ∂vi∂xi

dv

=

ˆBt

(∂ψ

∂t+∂ψ

∂xivi + ψ

∂vi∂xi

)dv =

ˆBt

∂ψ

∂t+

∂xi(ψvi) dv. (2.15)

Herein we used the time derivative of dv:

JdV =d

dt(JdV ) = (dv)• = (dx dy dz)• = (dx• dy dz) + (dx dy• dz) + (dx dy dz•)

=

(dx•

dx+dy•

dy+dz•

dz

)dv =

∂vi∂xi

dv. (2.16)

So let us assume a general balance equation for the physical quantity Ψ [21, p. 52]:

dt= F + P + S. (2.17)

The ux F describes the stream of quantity Ψ owing inside or outside the domain Bt over the

8

Page 15: Lehrstuhl für Kontinuumsmechanik und Materialtheorie ... · Eidesstaatliche Erklärung Hiermit versichere ich, dass ich die vorliegende Arbeit selbstständig verfasst und keine anderen

2.1 Balance equations 2 MECHANICAL PRELIMINARIES

Figure 2.2: Body Bt with boundary ∂Bt and outer normal vector ni

boundary ∂Bt:F = −

˛∂Bt

φinida. (2.18)

The negative sign is necessary because we want an inow to increase Ψ and the outow to decrease

Ψ, respectively (see gure 2.2). The production P emerges from internal processes (e.g. friction)

with a volumetric density pV :

P =

ˆBtpV dv. (2.19)

The supply S is similar to the production. It describes the inuence of an action at a distance from

the domain:

S =

ˆBtsV dv. (2.20)

Unlike the production the supply can be disabled by isolating the system from external inuences.

The according integral form of equation 2.17 is:

d

dt

ˆBtψdv = −

˛∂Bt

φinida+

ˆBtpV dv +

ˆBtsV dv. (2.21)

By applying equation 2.15 we write:

ˆBt

∂ψ

∂t+

∂xi(ψvi)

dv = −

˛∂Bt

φinida+

ˆBt

(pV + sV ) dv. (2.22)

By substituting quantities in this general global equation we can create the balance of mass and the

balance of linear momentum (see Table 2.1) for a material body.

Ψ ψ φ pV sV

mass ρ 0 0 0

linear momentum ρvi −σij 0 ρfi

Table 2.1: Physical quantities for balances [21, p. 73]

9

Page 16: Lehrstuhl für Kontinuumsmechanik und Materialtheorie ... · Eidesstaatliche Erklärung Hiermit versichere ich, dass ich die vorliegende Arbeit selbstständig verfasst und keine anderen

2.2 Eulerian framework 2 MECHANICAL PRELIMINARIES

Balance of mass

Let us start with the global balance of mass.

d

dtMBt = 0 or

d

dt

ˆBtρdv = 0. (2.23)

This equation is naturally true for a material domain Bt. Thinking of play-doh for example: no

matter how hard you squeeze or stretch it, there will be always the same amount of mass. Material

particles do not appear or disappear out of nothing. In equation 2.23 we chose a material domain,

which means that we always hold on to the same particles. Therefore the shape of Bt will change intime, but there are no particles passing the boundary.

Balance of linear momentum

In this chapter our aim is to study the global balance of linear momentum. For a material domain

Bt the momentum Pi may only be inuenced by forces Ki acting on the body. These forces can

be divided into volumetric forces Fi and contact forces Ti. Volumetric forces appear everywhere in

the domain, acting directly on every single particle. Whereas contact forces are only applied at the

domain boundary:dPBtidt

= KBti = T ∂Bti + FBti . (2.24)

Now we write this equation in integral form with densities:

d

dt

ˆBtρvidv =

˛∂Bt

tida+

ˆBtρfidv, (2.25)

with mass density ρ, particle velocity vi, stress vector ti and acceleration fi. The stress vector ti is

related to the outer normal vector ni and to Cauchy's stress tensor σij :

ti = σjinj . (2.26)

Thus we can rewrite the balance of linear momentum:

d

dt

ˆBtρvidv =

˛∂Bt

σjinjda+

ˆBtρfidv. (2.27)

2.2 Eulerian framework

We used the Eulerian description of quantities for the balance equations. Euler acts as an global

observer and sees all the quantities moving over an rigid grid or coordinate system. Therefore if we

think in the sense of FEM each nodal point describes a specic spatial point:

ψ = ψ (xi, t) . (2.28)

10

Page 17: Lehrstuhl für Kontinuumsmechanik und Materialtheorie ... · Eidesstaatliche Erklärung Hiermit versichere ich, dass ich die vorliegende Arbeit selbstständig verfasst und keine anderen

2.3 Lagrangian framework 2 MECHANICAL PRELIMINARIES

Balance of mass

Conditioned by that point of view, the balance equations have to be stated in the current congu-

ration. So we conclude for the global balance of mass for a material domain:

d

dt

ˆBtρdv = 0. (2.29)

For computation it is necessary to move the time derivative into the integrand. This is achieved as

explained in equation 2.15: ˆBt

∂ρ

∂t+

∂xi(ρvi)

dv = 0. (2.30)

Balance of linear momentum

In addition to the balance of mass, we also want to state the balance of linear momentum in the

current conguration. Therefore we start with the equations established in chapter 2.1 and make

use of equation 2.15. The result is:

ˆBt

∂t(ρvi) +

∂xi(ρvi)

dv =

˛∂Bt

σjinjda+

ˆBtρfidv. (2.31)

2.3 Lagrangian framework

The counterpart plays the Lagrangian description, where the observer is co-moving with the

material. In this system each nodal point stands for a material point. The observer sticks to one

special node and therefore observes how this specic particle evolves in time. This description is

often used in continuum mechanics. Mathematically spoken we can see each quantity ψ depending

on a material point Xi

ψ = ψ (Xi, t) . (2.32)

This choice of perspective leads to the formulation of the balance equations in the reference cong-

uration.

Balance of mass

In order to gain an equation for the balance of mass in the reference conguration we need to

transform the integrals. Starting with the balance of mass in the current conguration:

d

dt

ˆBtρdv = 0, (2.33)

we use relations 2.6 and get:d

dt

ˆB0ρJdV = 0. (2.34)

11

Page 18: Lehrstuhl für Kontinuumsmechanik und Materialtheorie ... · Eidesstaatliche Erklärung Hiermit versichere ich, dass ich die vorliegende Arbeit selbstständig verfasst und keine anderen

2.3 Lagrangian framework 2 MECHANICAL PRELIMINARIES

The integrand in equation 2.34 can be interpreted as the mass density in the reference conguration

ρ0. For demonstration we examine the mass balance once more:

d

dtMBt =

d

dt

ˆBtdm = 0 ⇒ dm = const. = dm0, (2.35)

here dm and dm0 donate the mass element in the current and reference conguration respectively.

This result tells us how the mass densities are connected in both congurations:

dm = ρdv = ρ J dV = ρ0dV = dm0 ⇒ ρ0 = ρJ (2.36)

and therefored

dt

ˆB0ρJdV =

d

dt

ˆB0ρ0dV = 0. (2.37)

Since the reference conguration is constant in time, the mass density ρ0 is also constant. And

the last equation is trivially fullled in the Lagrangian framework. This seems reasonable, if we

consider that each node is equivalent to a material particle and therefore the density of each node

remains constant.

Balance of linear momentum

Now we are able to produce a balance for the momentum in the reference conguration:

d

dt

ˆBtρvidv =

˛∂Bt

σjinjda+

ˆBtρfidv

⇒ˆB0

d

dt(ρvi J) dV =

˛∂B0

σji J(F−1

)kjNkdA+

ˆB0ρfi JdV. (2.38)

Taking the balance of mass into account we conclude:

ˆB0ρ0dvidtdV =

˛∂B0

σji J(F−1

)kjNkdA+

ˆB0ρ0fidV. (2.39)

Both descriptions the Eulerian and the Lagrangian have adds and odds. Often it depends on

the problem itself which description is more feasible or preferable. It is only important to be always

aware of which description is used and what the nal result is actually standing for. If we want to

observe a quantity in a specic spatial point: for example the temperature in a class room. Then it

is more attractive to use Eulerian description, because then the quantity is only time dependent

(since xi = const.|t). On the other hand, if we are interested in a material behavior or material

failure, then we are interested in particular material particles and will probably use Lagrangian

description since Xi is constant then.

12

Page 19: Lehrstuhl für Kontinuumsmechanik und Materialtheorie ... · Eidesstaatliche Erklärung Hiermit versichere ich, dass ich die vorliegende Arbeit selbstständig verfasst und keine anderen

2.4 Arbitrary Lagrangian Eulerian framework 2 MECHANICAL PRELIMINARIES

2.4 Arbitrary Lagrangian Eulerian framework

In this section we deal with the third kind of description. When we think about Euler and

Lagrange from a FEM point of view, we think of computational nodes being spatial points in

the Eulerian case and material point in the Lagrangian case. Figure 2.3 shows the dierent

Euler Lagrange ALE

node

particle

Figure 2.3: Comparison between frameworks

descriptions. The Eulerian mesh remains xed in space while the material particles move over

it. The Lagrangian nodes always stick to material particles and move along with them. The

arbitrary Lagrangian Eulerian (ALE) viewpoint suggests to move the mesh with a motion

unlike the particle movement. If vi is the particle velocity then wi is the mesh velocity or if we think

in a more abstract way: the velocity of the domain.

This chapter will study the balance equations under the scope of the ALE framework [10, 8, 18, 28,

27]. So let us consider a spatial domain Ωt which is moving with a velocity wi. Therefore we dene

a second motion φi:

φi : Ω0 → Ωt

χi = φi (Xk, t) . (2.40)

One should be careful and do not think of material particles by seeing Xi. These are still spatial

points. We chose their notation to coincide with the position vectors of material particles, because

they also are vectors in the reference conguration. Similar to equation 2.9 we specify the velocity

wi as the time derivative of φi:

wi =∂φi∂t

∣∣∣∣Xk=const.

. (2.41)

So now we can write each quantity from the arbitrary Lagrange Eulerian point of view:

ψ = ψ (χi, t) . (2.42)

13

Page 20: Lehrstuhl für Kontinuumsmechanik und Materialtheorie ... · Eidesstaatliche Erklärung Hiermit versichere ich, dass ich die vorliegende Arbeit selbstständig verfasst und keine anderen

2.4 Arbitrary Lagrangian Eulerian framework 2 MECHANICAL PRELIMINARIES

Balance of mass

As an example we examine a tank full of water with an inlet and an outlet and consider the tank

itself as a spatial domain Ωt (see gure 2.4). Unlike the balance for a material domain (equation

Figure 2.4: Tank as a spatial domainFigure 2.5: Domain Ωt with boundary andouter normal vector ni and mass ow m

2.23), we have to write a dierent equation for a spatial domain [22]:

dMΩt

dt= M∂Ωt . (2.43)

Here we nd a non zero part on the right side because mass is transported over the boundary ∂Ωt.

The right term can be rewritten with the mass ow density m:

d

dt

ˆΩt

ρdv =

˛∂Ωt

mda. (2.44)

Similar to Cauchy's tetrahedron argumentation [3, p. 137f] we may dene a vector valued mass

ow density mi. It is directed along the outer normal vector ni:

m = −mini. (2.45)

The negative sign is convention, since we want to have positive supply when mass is owing into the

volume (see gure 2.5):d

dt

ˆΩt

ρdv = −˛∂Ωt

minida. (2.46)

We apply the product rule on the left side of the equation:

ˆΩt

dtdv +

ˆΩt

ρd (dv)

dt= −

˛∂Ωt

minida (2.47)ˆ

Ωt

dtdv +

ˆΩt

ρ∂wi∂χi

dv = −˛∂Ωt

minida. (2.48)

14

Page 21: Lehrstuhl für Kontinuumsmechanik und Materialtheorie ... · Eidesstaatliche Erklärung Hiermit versichere ich, dass ich die vorliegende Arbeit selbstständig verfasst und keine anderen

2.4 Arbitrary Lagrangian Eulerian framework 2 MECHANICAL PRELIMINARIES

Here we used equation 2.16, but now the domain is moving with wi and not with vi. Further we

apply the chain rule for the time derivative and get:

dt=dρ

dt=∂ρ

∂t+

∂ρ

∂χiwi. (2.49)

In the future we will omit a special labeling of the quantities . So we may proceed with:

ˆΩt

∂ρ

∂t+

∂ρ

∂χiwi

dv +

ˆΩt

ρ∂wi∂χi

dv = −˛∂Ωt

minida

⇒ˆ

Ωt

∂ρ

∂tdv +

ˆΩt

∂χi(ρwi) dv = −

˛∂Ωt

minida. (2.50)

If we now dene the eective mass transport, we have to take the domain velocity wi into account :

mi = ρ (vi − wi) , (2.51)

so that particles with vi moving faster then the domain with wi leave the system. Consequently the

following equation holds:

ˆΩt

∂ρ

∂tdv +

ˆΩt

∂χi(ρwi) dv = −

˛∂Ωt

ρ (vi − wi)nida. (2.52)

At this state it is very important to understand that wi is not the velocity of any particle but of the

considered domain Ωt. As an example we may think of a channel where a uid is owing through

(see gure 2.6). Since the domain Ωt is not moving we have wi = 0, however the uid is moving,

i.e., vi 6= 0. If we apply the Gauÿ-Ostrogradsky theorem on the left side and combine it with

Figure 2.6: Channel with uid owing inside

the right side, we get:

ˆΩt

∂ρ

∂t+

∂χi(ρvi)

dv = 0 or

ˆΩt

∂ρ

∂tdv = −

˛∂Ωt

ρvinida. (2.53)

15

Page 22: Lehrstuhl für Kontinuumsmechanik und Materialtheorie ... · Eidesstaatliche Erklärung Hiermit versichere ich, dass ich die vorliegende Arbeit selbstständig verfasst und keine anderen

2.4 Arbitrary Lagrangian Eulerian framework 2 MECHANICAL PRELIMINARIES

Balance of linear momentum

So let us implement the ALE framework to the balance of linear momentum. We start with the

global balance of linear momentum for an arbitrary moving domain:

dPΩti

dt= T ∂Ωt

i + FΩti + P ∂Ωt

i . (2.54)

Now we formulate its integral form:

d

dt

ˆΩt

ρvidv =

˛∂Ωt

σjinjda+

ˆΩt

ρfidv +

˛∂Ωt

mvida. (2.55)

Then we modify this equation with the domain velocity wi, which was introduced previously (see

equation 2.51)

d

dt

ˆΩt

ρvidv =

˛∂Ωt

σjinjda+

ˆΩt

ρfidv −˛∂Ωt

mjvinjda

=

˛∂Ωt

σjinjda+

ˆΩt

ρfidv −˛∂Ωt

(ρvj − ρwj) vinjda. (2.56)

Similar to equation 2.50 we modify the right side of the above equation:

ˆΩt

∂ (ρvi)

∂t+

∂χj(ρviwj)

dv =

˛∂Ωt

σjinjda+

ˆΩt

ρfidv −˛∂Ωt

(ρvj − ρwj) vinjda. (2.57)

As explained in chapter 1.2 a cantilever immersed into a uid will be solved. The balance equation

2.57 characterizes the uid domain, since we want to move the uid mesh according to the cantilever.

The movement of the uid will be expressed with wi as mesh velocity and vi as the particle velocity.

Similar to the balance of mass we transform the last integral on the right side with the Gauÿ-

Ostrogradsky theorem and combine it with the left side:ˆ

Ωt

∂ (ρvi)

∂tdv +

ˆΩt

∂χj(ρvjvi) dv =

˛∂Ωt

σjinjda+

ˆΩt

ρfidv. (2.58)

This reveals an important result: the solution does not depend on the motion of the domain. Hence

the choice of domain velocity wi is arbitrary and underlies only numerical purposes, which will be

discussed in chapter 5.1.

16

Page 23: Lehrstuhl für Kontinuumsmechanik und Materialtheorie ... · Eidesstaatliche Erklärung Hiermit versichere ich, dass ich die vorliegende Arbeit selbstständig verfasst und keine anderen

3 STRUCTURE PROBLEM

3 Structure problem

In this section we will describe how to simulate a two or three dimensional structure driven by an

external traction. Using the Lagrangian framework and therefore state the balance equations in

the reference conguration, we see that the mass balance is trivially fullled:

d

dt

ˆB0ρ0dV = 0. (3.1)

This means that we do not need to compute this part of the formulation. So let us proceed with the

balance of linear momentum. Likewise we formulate it in the Lagrangian framework:ˆB0

d

dt(ρviJ)dV =

˛∂B0

Jσji(F−1

)kjNkdA+

ˆB0ρfiJdV. (3.2)

We assume that the volumetric forces are negligible regarding the traction forces:

ˆB0

d

dt(ρviJ)dV =

˛∂B0

Jσji(F−1

)kjNkdA. (3.3)

If we take the balance of mass into account we may simplify the left side:

ˆB0ρ0dvidtdV =

˛∂B0

Jσji(F−1

)kjNkdA. (3.4)

Since we use the Lagrangian framework, all quantities are functions of the material coordinates

Xi and time t:

ψ = ψ (Xk,t) . (3.5)

This eases the equation additionally to:

ˆB0ρ0∂vi∂tdV =

˛∂B0

Jσji(F−1

)kjNkdA. (3.6)

We choose displacements ui as the unknown quantity to be solved as most of structural material

laws are stated dependent on displacement. Hence we need to replace the velocity in the left integral

by the displacements:

dvidt

=d

dt

(dxidt

)=

d

dt

(d

dt(Xi + ui)

)=

d

dt

(duidt

)=d2uidt2

. (3.7)

And since displacement are naturally described as Lagrangian quantities, we may also replace

material dierentials by partial ones:

d2ui (Xk, t)

dt2=∂2ui∂t2

. (3.8)

17

Page 24: Lehrstuhl für Kontinuumsmechanik und Materialtheorie ... · Eidesstaatliche Erklärung Hiermit versichere ich, dass ich die vorliegende Arbeit selbstständig verfasst und keine anderen

3.1 Constitutive relations 3 STRUCTURE PROBLEM

Hence we conclude for the balance of linear momentum:

ˆB0ρ0∂2ui∂t2

dV =

˛∂B0

Jσji(F−1

)kjNkdA. (3.9)

3.1 Constitutive relations

Constitutive laws are the connectors between kinematical and dynamical quantities. They only

depend on the material and on the process the material is undergoing. In this chapter we will

present some constitutive laws used for solids.

3.1.1 Hooke's law

As a rst example of a constitutive relation we consider Hooke's law, which says that stresses

depend linearly on the strains [3, p. 201][21, p. 104]:

σij = Cijklεkl, (3.10)

where the linear strain tensor εij is dened as:

εij =1

2

(∂ui∂xj

+∂uj∂xi

). (3.11)

This theory is geometrically and physically linear. It means that it only works accurately with small

displacements and small strains. When we additionally assume the material to be isotropic, we can

represent the stiness tensor of forth order Cijkl with only two Lamé constants

Cijkl = λδijδkl + µ (δikδjl + δilδjk) . (3.12)

The Lamé constants λ and µ themselves are connected to the well known engineering constants E

(Young's modulus) and ν (Poisson ratio):

λ =Eν

(1 + ν) (1− 2ν), µ =

E

2 (1 + ν). (3.13)

Putting all back to the constitutive law and using εij = εji we get:

σij = λεkkδij + 2µεij = λ∂uk∂xk

δij + µ

(∂ui∂xj

+∂uj∂xi

). (3.14)

3.1.2 Saint Venant-Kirchho law

This material law can handle large deformation, but still only small strains. St. Venant-Kirchhoff

relates the 2nd Piola-Kirchhoff stress tensor Sij to Green-Lagrange's strain tensor EGij in a

linear manner [3, p. 200]:

Sij = λEGkkδij + 2µEGij (3.15)

18

Page 25: Lehrstuhl für Kontinuumsmechanik und Materialtheorie ... · Eidesstaatliche Erklärung Hiermit versichere ich, dass ich die vorliegende Arbeit selbstständig verfasst und keine anderen

3.2 Variational form 3 STRUCTURE PROBLEM

With λ and µ assumed to be Lamé constants already known from Hooke's law. The second

Piola-Kirchhoff stress tensor appears in the balance of linear momentum, if we formulate it in

the reference conguration:

ˆB0ρ0∂vi∂tdV =

˛∂B0

Jσji(F−1

)kj︸ ︷︷ ︸

FinSkn

NkdA. (3.16)

Normally we are interested in Cauchy's stresses, so we may use this equation to derive a relation

between Cauchy's stresses and 2nd Piola-Kirchhoff's stresses:

Jσji(F−1

)kj

= FinSkn

σji(F−1

)kjFmk = J−1FinSknFmk

σjiδjm = J−1FinSknFmk

σmi = J−1FinSknFmk. (3.17)

This relation helps us to transform the stresses. So if we use St. Venant-Kirchhoff constitutive

law, we state the balance of linear momentum with Sij :

ˆB0ρ0∂vi∂tdV =

˛∂B0

FinSknNkdA. (3.18)

3.2 Variational form

Now we want to create a variational form which is goint to be implemented into FEniCS using the

unied form language (UFL), therefore we have to choose a suitable test space. As a standard choice

in FEniCS we choose linear continuous Galerkin elements out of the Hilbert space H for the

domain B0[25]:

V = H1 (B0) . (3.19)

This means that we approximate the unknown displacements ui as a function, which is linear in

each element T (see gure 3.1). Using the Galerkin method, we multiply the global balance of the

linear momentum with a test function δui:

ˆB0ρ0∂2ui∂t2

δuidV =

ˆB0

∂Xk

(Jσji

(F−1

)kj

)δuidV. (3.20)

The time derivative is treated with a standard backwards Euler nite dierence scheme, which is

formulated in a discrete way with k being the current time step:

∂2uki∂t2

=d

dt

(uki − u

k−1i

∆t

)=

1

∆t2

((uki − uk−1

i

)−(uk−1i − uk−2

i

))=

1

∆t2

(uki − 2uk−1

i + uk−2i

).

(3.21)

19

Page 26: Lehrstuhl für Kontinuumsmechanik und Materialtheorie ... · Eidesstaatliche Erklärung Hiermit versichere ich, dass ich die vorliegende Arbeit selbstständig verfasst und keine anderen

3.2 Variational form 3 STRUCTURE PROBLEM

Figure 3.1: Linear continuous Galerkin elements [19]

In the sequence we will only note time steps which are dierent from the current one. The above

dierence scheme reads then for example:

d2uidt2

=1

∆t2

(ui − 2uk−1

i + uk−2i

). (3.22)

Furthermore we need to eliminate all second spatial derivatives from equation 3.20. This is necessary

as we use linear elements, which are constant after rst spatial derivative and always zero with a

second spatial derivative. This would mean a loss of information if we try to solve

ˆB0ρ0∂2ui∂t2

δuidV −ˆB0

∂Xk

(Jσji

(F−1

)kj

)δuidV = 0. (3.23)

The problem arises with the term

ˆB0

∂Xk

(Jσji

(F−1

)kj

)δuidV,

because it is zero for every linear function. Hence we would solve

ˆB0ρ0∂2ui∂t2

δuidV = 0, (3.24)

instead of equation 3.20. A remedy is accomplished using integration by parts and applying the

Gauÿ-Ostrogradsky theorem:ˆB0

∂Xk

(Jσji

(F−1

)kj

)δuidV =

ˆB0

∂Xk

(Jσji

(F−1

)kjδui

)dV −

ˆB0Jσji

(F−1

)kj

∂δui∂Xk

dV

=

˛∂B0

Jσji(F−1

)kjδuiNkdA−

ˆB0Jσji

(F−1

)kj

∂δui∂Xk

dV.(3.25)

20

Page 27: Lehrstuhl für Kontinuumsmechanik und Materialtheorie ... · Eidesstaatliche Erklärung Hiermit versichere ich, dass ich die vorliegende Arbeit selbstständig verfasst und keine anderen

3.3 Code verication 3 STRUCTURE PROBLEM

So we accomplished to move one derivative to the test function and therefore it is convenient to use

linear polynomial nite elements. Finally the variational form reads:

Formstr =

ˆB0ρ0

1

∆t2

(ui − 2uk−1

i + uk−2i

)δuidV +

ˆB0Jσji

(F−1

)kj

∂δui∂Xk

dV

−˛∂B0

Jσji(F−1

)kjδuiNkdA = 0. (3.26)

3.3 Code verication

We consider a cantilever as seen gure 3.2 and his properties given in table 3.1. We want to create

a vibration in x-direction. One possible excitation therefore is a traction force applied at the top

surface. In gure 3.3 the two dimensional model is shown, which is the basis for the calculation. It

is clamped on one side Γbottomt and driven on the other side Γtop

t by a time varying external force

texti = (A sin (ωt) , 0):

ui = 0 on Γbottomt and σjinj = texti on Γtop

t . (3.27)

Remaining boundaries Γleftt and Γrigth

t are assumed to be traction free, which seems to be quite

natural since air is surrounding:

σjinj = 0 on Γleftt ∪ Γright

t . (3.28)

In the beginning there shall be no displacement. The displacement Dirichlet boundary condition

Figure 3.2: Cantilever model Figure 3.3: Computational assembly

eect the test space:

V =δui ∈ H1 (B0)

∣∣ δui = 0 on Γbottom0

. (3.29)

In FEniCS it is implemented by the function DirichletBC. The Neumann boundary conditions are

implement in a weak form by multiplying them with the test function δui. So they are not fullled

21

Page 28: Lehrstuhl für Kontinuumsmechanik und Materialtheorie ... · Eidesstaatliche Erklärung Hiermit versichere ich, dass ich die vorliegende Arbeit selbstständig verfasst und keine anderen

3.3 Code verication 3 STRUCTURE PROBLEM

exactly. Instead they are approximated together with the unknown ui:

ˆΓtopt

(σjinj − texti

)δuida = 0 and

ˆΓleftt ∪Γright

t

(σjinj − 0) δuida = 0. (3.30)

These two integrals are added to the variational form:

Formstr =

ˆB0ρ0

1

∆t2

(ui − 2uk−1

i + uk−2i

)δuidV +

ˆB0Jσji

(F−1

)kj

∂δui∂Xk

dV −

−˛∂B0

Jσji(F−1

)kjδuiNkdA+

ˆΓtopt

(σjinj − texti

)δuida+

+

ˆΓleftt ∪Γright

t

(σjinj − 0) δuida = 0. (3.31)

This equation is simplied by transforming parts of the boundary integrals into the reference con-

guration:

Formstr =

ˆB0ρ0

1

∆t2

(ui − 2uk−1

i + uk−2i

)δuidV +

ˆB0Jσji

(F−1

)kj

∂δui∂Xk

dV −

−˛∂B0

Jσji(F−1

)kjδuiNkdA−

ˆΓtopt

texti δuida+

+

ˆΓtop0

Jσji(F−1

)kjδuiNkdA+

ˆΓleft0 ∪Γright

0

Jσji(F−1

)kjδuiNkdA = 0. (3.32)

The last integrals vanish in combination with the integral over B0:

Formstr =

ˆB0ρ0

1

∆t2

(ui − 2uk−1

i + uk−2i

)δuidV +

ˆB0Jσji

(F−1

)kj

∂δui∂Xk

dV −

−˛

Γbottom0

Jσji(F−1

)kjδuiNkdA−

ˆΓtopt

texti δuida = 0. (3.33)

If we now consider the impact of the Dirichlet boundary condition (equation 3.29), the remaining

integral over Γbottom0 disappears as well:

Formstr =

ˆB0ρ0

1

∆t2

(ui − 2uk−1

i + uk−2i

)δuidV +

ˆB0Jσji

(F−1

)kj

∂δui∂Xk

dV − (3.34)

−ˆ

Γtopt

texti δuida = 0. (3.35)

In gure 3.4 you see a sequence of snapshots from calculations conducted. The illustration is scaled

with the factor 10 and lays actually in the range of 1.4µm. For comparison an additional calculation

length l width w height h density ρ Young's module E Poisson ratio ν

100µm 35µm 1µm 2.329 gcm3 147MPa 0.23

Table 3.1: Material parameters

22

Page 29: Lehrstuhl für Kontinuumsmechanik und Materialtheorie ... · Eidesstaatliche Erklärung Hiermit versichere ich, dass ich die vorliegende Arbeit selbstständig verfasst und keine anderen

3.3 Code verication 3 STRUCTURE PROBLEM

(a) t = 0 s (b) t = 14T (c) t = 3

4T (d) t = T

Figure 3.4: FEM simulation of a beam in Lagrangian framework with a excitation frequencyf = 100 kHz (scale is 1µm)

was done with the three dimensional geometry. In gure 3.6 are the according snapshots. By plotting

0.00 0.02 0.04 0.06 0.08 0.10 0.12Time [milliseconds]

0.6

0.4

0.2

0.0

0.2

0.4

0.6

Ampl

itude

[mic

rom

eter

]

2 d3 d

Figure 3.5: Comparison of 2d and 3d results

the displacement over time we see how little the dierence between the calculations is. Thus it is

accurate to proceed with the two dimensional simulations. This will keep the computational time

23

Page 30: Lehrstuhl für Kontinuumsmechanik und Materialtheorie ... · Eidesstaatliche Erklärung Hiermit versichere ich, dass ich die vorliegende Arbeit selbstständig verfasst und keine anderen

3.3 Code verication 3 STRUCTURE PROBLEM

Figure 3.6: Snapshots from 3d calculation at dierent time slices (scale is 1µm)

moderate.

Another test is to implement boundary condition similar to the experiment:

ui = ubottomi on Γbottom0 and σjinj = 0 on Γfsi

t . (3.36)

For a better demonstration we choose a smaller cantilever. It has the same material properties from

table 3.1, but this time it is only 1µm × 15µm. The gures 3.8 and 3.9 show two simulations,

each conducted with a dierent excitation frequency. The colors illustrate the magnitude of the

Cauchy's stresses in 103 Nm2 . We can clearly identify the rst eigenform in gure 3.8 and the

second eigenform in gure 3.9. The next step is to simulate a whole frequency spectrum, where

we recorded the displacements of the highest center particle and conducted the computation over

and over again. The vibrations were recorded and the maximum magnitude written into an extra

le. After plotting the amplitudes over the excitation frequencies we get a spectral analysis of this

vibration (see gure 3.10). Here we identify the rst eigenfrequency at approx. 8 MHz. The peak

at the second eigenfrequency lies approx. at 35 Mhz. To verify the results we needed some coarse

values for the eigenfrequencies. Therefore we estimated the rst eigenfrequency using Bernoulli's

24

Page 31: Lehrstuhl für Kontinuumsmechanik und Materialtheorie ... · Eidesstaatliche Erklärung Hiermit versichere ich, dass ich die vorliegende Arbeit selbstständig verfasst und keine anderen

3.3 Code verication 3 STRUCTURE PROBLEM

Figure 3.7: Computational assembly

Figure 3.8: Vibration at 9 MHz Figure 3.9: Vibration at 48 Mhz

beam theory. Here we have the beam dierential equation of fourth order:

ρA∂2w

∂t2+ EI

∂4w

∂X4= 0. (3.37)

25

Page 32: Lehrstuhl für Kontinuumsmechanik und Materialtheorie ... · Eidesstaatliche Erklärung Hiermit versichere ich, dass ich die vorliegende Arbeit selbstständig verfasst und keine anderen

3.3 Code verication 3 STRUCTURE PROBLEM

0 10 20 30 40 50 60Frequency [MHz]

0

1

2

3

4

5

6

7

Ampl

itude

[mic

ro m

eter

]

air_15

Figure 3.10: Frequency spectrum of cantilever

For the given geometry we have following kinematical and dynamical boundary conditions:

∂w

∂X(X = 0, t) = 0 and Q (X = 0, t) = 0 (3.38)

for the bottom side of the beam. On the free boundary we have only dynamical boundary conditions:

Q (X = l, t) = 0 and M (X = l, t) = 0, (3.39)

The dynamical boundary conditions can be written in terms of displacements w with the identities:

M = −EI ∂2w

∂X2and Q = −EI ∂

3w

∂X3. (3.40)

Hence we conclude:

∂3w

∂X3(X = 0, t) = 0,

∂3w

∂X3(X = l, t) = 0 and

∂2w

∂X2(X = l, t) = 0. (3.41)

We consider Bernoulli's separation ansatz:

w (X, t) = χ (X)T (t) . (3.42)

Putting this into the dierential equation and dividing by w, we get:

ρAT

T+ EI

χIV

χ= 0 ⇒ T

T= −EI

ρA

χIV

χ= −ω2. (3.43)

26

Page 33: Lehrstuhl für Kontinuumsmechanik und Materialtheorie ... · Eidesstaatliche Erklärung Hiermit versichere ich, dass ich die vorliegende Arbeit selbstständig verfasst und keine anderen

3.3 Code verication 3 STRUCTURE PROBLEM

Since T is a function of time t and χ depends on X, equality is only possible if the terms on the

right and on the left side are constant. Here the constant was chosen as ω2. This separates the

partial dierential equation 3.37 into two ordinary dierential equations:

T + ω2T = 0 and χIV − ρAω2

EI︸ ︷︷ ︸k4

χ = 0. (3.44)

The eigenfunctions and eigenfrequencies may be found by the solution of the second dierential

equation. This equation is generally solved by the ansatz:

χ (X) = A cosh (kX) +B sinh (kX) +D cos (kX) + E sin (kX) . (3.45)

The ansatz needs to be adjusted to the boundary conditions 3.38 and 3.41. If we observe these

boundary conditions in terms of the separation, we nd that the boundary conditions can be trans-

lated to the variable χ:

∂w

∂X(X = 0, t) = χ′ (0)T (t) = 0 ⇒ χ′(0) = 0 (3.46)

∂3w

∂X3(X = 0, t) = χ′′′ (0)T (t) = 0 ⇒ χ′′′(0) = 0 (3.47)

∂2w

∂X2(X = l, t) = χ′′ (l)T (t) = 0 ⇒ χ′′(l) = 0 (3.48)

∂3w

∂X3(X = l, t) = χ′′′ (l)T (t) = 0 ⇒ χ′′′(l) = 0. (3.49)

This is true, since the boundary conditions must be fullled for each time instance. Therefore the

equation can only be fullled if the function χ itself meets them. This leads to a system of linear

equations with the unknown parameters A, B, C and D, which we may write in matrix form:0 1 0 1

0 1 0 −1

cosh (kl) sinh (kl) − cos (kl) − sin (kl)

sinh (kl) cosh (kl) sin (kl) − cos (kl)

A

B

C

D

=

0

0

0

0

. (3.50)

The upper two rows determine:

B = 0 and D = 0. (3.51)

Consequently the system reduces to:[cosh (kl) − cos (kl)

sinh (kl) sin (kl)

]︸ ︷︷ ︸

M

[A

C

]=

[0

0

](3.52)

27

Page 34: Lehrstuhl für Kontinuumsmechanik und Materialtheorie ... · Eidesstaatliche Erklärung Hiermit versichere ich, dass ich die vorliegende Arbeit selbstständig verfasst und keine anderen

3.3 Code verication 3 STRUCTURE PROBLEM

This system has only non trivial solutions, if the determinant of the coecient matrix M is zero:

detM = 0 ⇒ cosh (kl) sin (kl) + sinh (kl) cos (kl) = 0. (3.53)

This is an alternating function with innity settings to zero. Two of these are:

k1l = 2.3700, k2l = 5.4978, . . . . (3.54)

The parameter k is connected to the eigenfrequencies ω (see equation 3.44)

ωn = k2n

√EI

ρA. (3.55)

This gives us the rst two eigenfrequencies at

ω1 = 57 · 106 1

s/ f1 = 9MHz and ω2 = 31 · 106 1

s/ f1 = 48MHz. (3.56)

The results obtained from the simulation are both about lower. The reason is the numerical damping

[24] and employing a Poisson ratio, which makes the numerical problem twodimensional while the

equation 3.37 can only be derived by setting ν = 0 (see Müller and Ferber[23] p. 353 for a

similar case in axial vibration).

28

Page 35: Lehrstuhl für Kontinuumsmechanik und Materialtheorie ... · Eidesstaatliche Erklärung Hiermit versichere ich, dass ich die vorliegende Arbeit selbstständig verfasst und keine anderen

4 FLUID PROBLEM

4 Fluid problem

In this section we will derive the equations to be solved for the uid, namely the variational for-

mulations. As opposed to structural systems the uid world uses the Eulerian description to

formulate the governing equations. If we think of uid dynamics experiments we mostly have a

certain test area where a uid is passing through. Thus we track the velocity of a certain channel

section or test area. Formally this corresponds to an open system. In Lagrangian discription we

would have to update the computational domain because new particles would enter the domain and

other would leave it. In the Eulerian framework this is dierent. The domain remains the same.

Kinematical quantities like displacements and velocities develop over an rigid mesh. Consequently

we use the equations in the current conguration. Besides we need to relate the unknown velocities

vi to the stresses σij , in order to nd a material equation. This is achieved by the constitutive law.

4.1 Newtonian uid

One of the most spread and known constitutive equations in uid dynamics is the one of the New-

tonian uid [9, p. 268]. It relates Cauchy stresses to the velocities vi and the pressure p:

σij = −pδij + λ∂vk∂xk

δij + µ

(∂vi∂xj

+∂vj∂xi

), (4.1)

with λ as the bulk modulus and µ the viscosity. If we place this relation into the balance of linear

momentum, we get an equation with velocity vi, pressure p and the density ρ as unknowns. These are

four unknowns for only two equations: balance of linear momentum in x-direction and y-direction.

If we add the balance of mass, we still end up with one equation missing. We assume the process to

be incompressible so that the mass density of the uid does not alter under given conditions. This

is suciently accurate for uids like water for moderate pressure conditions.

Theoretically there are no limits set for the constitutive equation in the code. Within the code it is

possible to change the constitutive relations very quickly. This leaves space for further studies on

dierent constitutive equation or for creating and verifying new ones.

4.2 Balance equations

Starting with the balance of mass in the current conguration for a xed spatial domain Ωt = const.

and therefore wi = 0 (see chapter 2.4):

ˆΩt

∂ρ

∂tdv = −

˛∂Ωt

ρvinida. (4.2)

Similarly we take the balance of linear momentum in the current placement:

ˆΩt

∂t(ρvi) dv = −

˛∂Ωt

ρvivjnjda+

˛∂Ωt

σjinjda+

ˆΩt

ρfidv. (4.3)

29

Page 36: Lehrstuhl für Kontinuumsmechanik und Materialtheorie ... · Eidesstaatliche Erklärung Hiermit versichere ich, dass ich die vorliegende Arbeit selbstständig verfasst und keine anderen

4.3 Variational Formulation 4 FLUID PROBLEM

We neglect volumetric forces and get:

ˆΩt

∂t(ρvi) dv = −

˛∂Ωt

ρvivjnjda+

˛∂Ωt

σjinjda. (4.4)

4.3 Variational Formulation

Now we need a weak form again for the nite element method. But rst we apply the incompres-

sibility condition:

ρ = const.|t,xi (4.5)

Thus the time and local spatial derivative of ρ are zero and the balance of mass reduces to:

˛∂Ωt

ρvinida = 0. (4.6)

We convert the area integral into a volumetric integral using the Gauÿ-Ostrogradsky theorem

and multiply with the test function δp:

ˆΩt

ρ∂vi∂xi

δpdv = 0. (4.7)

We do the same with the balance of linear momentum for the case of a constant domain wi = 0, but

this time with a dierent test function δvi:

ˆΩt

ρ∂vi∂tδvidv = −

ˆΩt

∂xi(ρvivj) δvidv +

ˆΩt

∂σji∂xj

δvidv. (4.8)

Since we use continuous linear polynomial test function, we have to eliminate all second derivatives in

equation 4.8. The choice of linear test functions is not compulsive. However if for example continuous

quadratic test functions are used, then one would have to assure that the slope or rst derivative

remains continuous. We chose linear test functions as the unknows, i.e., Galerkin method. To

circumvent these, the last term in equation 4.8 is:

ˆΩt

∂σji∂xj

δvidv,

is in second order by recalling the equation 4.1, thus vanishes identically by having chosen the linear

functions. We substitute the stresses with Newton's constitutive law and apply integration by

parts:

ˆΩt

∂σji∂xj

δvidv = −ˆ

Ωt

∂p

∂xiδvidv +

ˆΩt

∂xj

(λ∂vk∂xk

δji

)δvidv +

ˆΩt

∂xj

(∂vi∂xj

+∂vj∂xi

))δvidv

= −ˆ

Ωt

∂p

∂xiδvidv −

ˆΩt

λ∂vk∂xk

∂δvi∂xi

dv +

˛∂Ωt

λ∂vk∂xk

δvinida−

−ˆ

Ωt

µ

(∂vi∂xj

+∂vj∂xi

)∂δvi∂xj

dv +

˛∂Ωt

µ

(∂vi∂xj

+∂vj∂xi

)δvinjda. (4.9)

30

Page 37: Lehrstuhl für Kontinuumsmechanik und Materialtheorie ... · Eidesstaatliche Erklärung Hiermit versichere ich, dass ich die vorliegende Arbeit selbstständig verfasst und keine anderen

4.4 Code verication 4 FLUID PROBLEM

Bringing all back together we nally create the variational formulation for the ow of a Newtonian

uid:

Formd =

ˆΩt

ρ∂vi∂xi

δpdv

+

ˆΩt

ρvi − v0

i

∆tδvidv +

ˆΩt

∂xi(ρvivj) δvidv +

+

ˆΩt

∂p

∂xiδvidv +

ˆΩt

λ∂vk∂xk

∂δvi∂xi

dv −˛∂Ωt

λ∂vk∂xk

δvinida+

+

ˆΩt

µ

(∂vi∂xj

+∂vj∂xi

)∂δvi∂xj

dv −˛∂Ωt

µ

(∂vi∂xj

+∂vj∂xi

)δvinjda = 0. (4.10)

4.4 Code verication

The above variational formulation can be implemented in FEniCS (see Appendix A) and test it with

a simple channel ow. We created a mesh with Gmsh1 (see gure 4.2) and used following boundary

Figure 4.1: Model for a simple channel ow Figure 4.2: Mesh for a simple channel ow

conditions to simulate the ow:

p = pin on Γleft, p = pout (t) on Γright and vi = 0 on Γbody. (4.11)

The material and geometrical parameters can be found in table 4.1. The dimensions are chosen in

xchannel ychannel ρF µF pin pout (t)

1µm 0.3µm 1000 kgm3 1 · 10−3 kg

m·s 1bar 3bars· t

Table 4.1: Parameters for water

that scale, because the AFM cantilever is also only 350µm long and 1µm thick. The results can be

seen in gure 4.3 and 4.4. The background color shows the pressure eld and the arrows indicate

the velocity eld. At time t = 0s the pressure gradient ∂p∂x is positive and we see ow in negative

x-direction (see gure 4.3 a). When the pressure dierence between the left and right boundary

is zero, there is no ow at all (see gure 4.3 b). At t = 0.6s we reach the same pressure gradient

magnitude from t = 0s but with a negative sign and therefore we a have ow in the negative direction

1Gmsh is an open source nite element mesh generator http://geuz.org/gmsh/, which can be imported into FEniCSas XML utilizing mesh-convert method

31

Page 38: Lehrstuhl für Kontinuumsmechanik und Materialtheorie ... · Eidesstaatliche Erklärung Hiermit versichere ich, dass ich die vorliegende Arbeit selbstständig verfasst und keine anderen

4.4 Code verication 4 FLUID PROBLEM

(see gure 4.4 a). In gure 4.4 b the velocity has the greatest magnitude due to the highest pressure

gradient. This seems to work well with our expectations.

(a) t = 0 s

(b) t = 0.3 s

Figure 4.3: Velocity in a channel (1)

32

Page 39: Lehrstuhl für Kontinuumsmechanik und Materialtheorie ... · Eidesstaatliche Erklärung Hiermit versichere ich, dass ich die vorliegende Arbeit selbstständig verfasst und keine anderen

4.4 Code verication 4 FLUID PROBLEM

(a) t = 0.6 s

(b) t = 1 s

Figure 4.4: Velocity in a channel (2)

33

Page 40: Lehrstuhl für Kontinuumsmechanik und Materialtheorie ... · Eidesstaatliche Erklärung Hiermit versichere ich, dass ich die vorliegende Arbeit selbstständig verfasst und keine anderen

5 FLUID-STRUCTURE INTERACTION

5 Fluid-structure interaction

After investigating the structure and the uid separately, we now dedicate our attention to uid-

structure interaction. A sketch from the experiment is shown in gure 5.1. There is a water drop or

Figure 5.1: Model for simulation Figure 5.2: Computational domain

a drop of the to investigate. In the middle we see a thin cantilever. The cantilever is theoretically

rigidly connected to a chip (see chapter 1.3), but we chose not to include the chip into the simulation.

Instead we modeled this boundary as free moving in the x-direction. At this point we will apply the

Dirichlet boundary condition for the displacements of the cantilever. If we would like to model

the drop with its oval shape, we would need to mesh a quite complex margin. Thus we take a smaller

computational domain (see gure 5.2) and expect the inuence of the moving cantilever to be only

in a local area around it, while the constitutive relation consists of the rst derivative in space, hence

it is not really useful to simulation the whole drop. The area also needs to be small enough, so that

it is always covered with uid particles. Which seems obvious in the current gures, but we will

move the computational domain for the uid along with the cantilever. So then it is possible that

the computational domain reaches out of the uid, if the domain is too large. Our computational

domain will be around 600µm times 600µm, which is under all circumstances always covered with

uid. In gure 5.2, the boundaries for the structure and the uid are to be seen. So why is the

motion of the uid domain necessary? At the initial time slice everything seems ne (see gure

5.3). We have two distinct meshes: the structure mesh and the uid mesh. Each element belongs

to structure or to uid and the boundary between them is along the facets (cell boundaries). Some

time later the situation besomes more complicated (see gure 5.4). If we leave the mesh untouched

at this stage, we are confronted with severe problems. The FSI boundary is somewhere in between

cells and not along facets any more. Additionally the FSI cells are partly lled with uid and partly

with structure. So the question arises how to implement these diculties. One possible approach is

to remesh the domain locally with a ner mesh, so that the FSI boundary again consists of facets

[11, 12]. Depending on the movement the renement and the necessary precision may cause a great

amount of cells and therefore large computational costs. Another approach is to remesh the whole

34

Page 41: Lehrstuhl für Kontinuumsmechanik und Materialtheorie ... · Eidesstaatliche Erklärung Hiermit versichere ich, dass ich die vorliegende Arbeit selbstständig verfasst und keine anderen

5.1 Weak formulation of ALE 5 FLUID-STRUCTURE INTERACTION

Figure 5.3: Initial computa-tional domain

Figure 5.4: Current computa-tional domain

Figure 5.5: Moved uid do-main according to structure

domain. Then you have to deal with the problem of precise projection from nodal points of the old

mesh to the new nodes. In this work we take another approach. We move the uid mesh according to

the structure motion (Figure 5.5). This approach needs special treatment concerning the balances.

Theoretically spoken we need balance equations that work on a moving spatial domain. And that is

exactly what the ALE framework is designed for. After creating an ALE module with FEniCS, we

ran some tests to verify the code (see chapter 5.2). Then we put all components together to solve

the coupled FSI problem. Practically this means that we create a computational mesh and divide it

into a uid part and a structure part. The solid part will be treated as explained in chapter 3 and

the uid part will be described with the ALE formalism. In order to test the ALE framework we

take a channel ow and conduct a calculation with a xed spatial domain. Then we solve the same

problem, but this time with a moving mesh.

5.1 Weak formulation of ALE

Resuming the equations earned in chapter 2.4, we will now derive weak formulations for them.

Starting with the balance of mass in the ALE framework, we get by multiplying with a test function

δp and applying integration by parts:

ˆΩt

∂ρ

∂t+

∂χi(ρvi)

δpdv = 0. (5.1)

We assume the uid to be incompressible, which is suciently accurate for liquids like water. By

inserting the incompressibility condition

ρ = const.|t,xi (5.2)

into the weak form of the balance of mass we get:

Formmass =

ˆΩt

ρ∂vi∂χi

δpdv = 0. (5.3)

35

Page 42: Lehrstuhl für Kontinuumsmechanik und Materialtheorie ... · Eidesstaatliche Erklärung Hiermit versichere ich, dass ich die vorliegende Arbeit selbstständig verfasst und keine anderen

5.1 Weak formulation of ALE 5 FLUID-STRUCTURE INTERACTION

We apply the same procedure to the balance of linear momentum:

ˆΩt

∂ (ρvi)

∂t+

∂χj(ρviwj)

dv =

˛∂Ωt

σijnjda+

ˆΩt

ρfidv −˛∂Ωt

(ρvj − ρwj) vinjda. (5.4)

First we implement the incompressibility condition (equation 5.2) and neglect volumetric forces:

ˆΩt

ρ∂vi∂t

+ ρ∂

∂χj(viwj)

dv =

˛∂Ωt

σijnjda−˛∂Ωt

ρ (vj − wj) vinjda. (5.5)

Now we use Gauÿ-Ostrogradsky theorem to obtain volume integrals and multiply with the test

function δvi:

ˆΩt

ρ∂vi∂t

+ ρ∂

∂χj(viwj)

δvidv =

ˆΩt

∂σji∂χj

δvidv −ˆ

Ωt

ρ∂

∂χj(vj − wj) vi δvidv. (5.6)

Similar to chapter 4.3 we eliminate all second derivatives by applying integration by parts, after

employing the constitutive relation in equation 4.1:

ˆΩt

ρ∂vi∂t

+ ρ∂

∂χj(viwj)

δvidv = −

ˆΩt

∂p

∂χiδvidv −

ˆΩt

λ∂vk∂χk

∂δvi∂χi

dv +

˛∂Ωt

λ∂vk∂χk

δvinida−

−ˆ

Ωt

µ

(∂vi∂χj

+∂vj∂χi

)∂δvi∂χj

dv +

˛∂Ωt

µ

(∂vi∂χj

+∂vj∂χi

)δvinjda−

−ˆ

Ωt

ρ∂

∂χj(vj − wj) vi δvidv. (5.7)

Additionally we transform the last part in the equation above by shifting the derivative to the test

function:ˆ

Ωt

ρ∂vi∂t

+ ρ∂

∂χj(viwj)

δvidv = −

ˆΩt

∂p

∂χiδvidv −

ˆΩt

λ∂vk∂χk

∂δvi∂χi

dv +

˛∂Ωt

λ∂vk∂χk

δvinida−

−ˆ

Ωt

µ

(∂vi∂χj

+∂vj∂χi

)∂δvi∂χj

dv +

˛∂Ωt

µ

(∂vi∂χj

+∂vj∂χi

)δvinjda+

+

ˆΩt

ρ (vj − wj) vi∂δvi∂χj

dv −˛∂Ωt

ρ (vj − wj) viδvinjdv. (5.8)

It is not clear why this step is useful at the moment. Throughout several simulations it appeared

to help the numerical solution for a better convergence compared to equation 5.7. The last step is

to bring all parts on one side and to substitute the time derivative with a backwards Euler nite

36

Page 43: Lehrstuhl für Kontinuumsmechanik und Materialtheorie ... · Eidesstaatliche Erklärung Hiermit versichere ich, dass ich die vorliegende Arbeit selbstständig verfasst und keine anderen

5.2 Trial with a xed and moving mesh 5 FLUID-STRUCTURE INTERACTION

dierence scheme:

Formlinear momentum =

ˆΩt

ρvi − vk−1

i

∆t+ ρ

∂χj(viwj)

δvidv +

+

ˆΩt

∂p

∂χiδvidv +

ˆΩt

λ∂vk∂χk

∂δvi∂χi

dv −˛∂Ωt

λ∂vk∂χk

δvinida+

+

ˆΩt

µ

(∂vi∂χj

+∂vj∂χi

)∂δvi∂χj

dv −˛∂Ωt

µ

(∂vi∂χj

+∂vj∂χi

)δvinjda−

−ˆ

Ωt

ρ (vj − wj) vi∂δvi∂χj

dv +

˛∂Ωt

ρ (vj − wj) viδvinjda = 0. (5.9)

Consequently the variational form to be solved is:

FormALE = Formmass + Formlinear momentum = 0. (5.10)

This is possible, because the test functions are independent.

5.2 Trial with a xed and moving mesh

The model for this simple problem can be seen in gure 5.6. The equations are exactly the same

Figure 5.6: Model of the channel Figure 5.7: Fixed mesh

from chapter 4. We even used the same module and just exchange the mesh and some of the

boundary parameters. The calculation was conducted with parameters from table 5.1 and the

xchannel ychannel ρF µF pin pout (t)

4µm 1µm 1000 kg

m3 1 · 10−3 kgm·s 1bar 2bar

s· t

Table 5.1: Parameters for simulation

following boundary conditions:

p = pin on Γleftt , p = pout on Γright

t and vi = 0 on Γtopt ∪ Γbottom

t . (5.11)

The results may be observed in gure 5.8. Now we move the mesh with a prescribed function. The

mesh deforms, the nodes are moving and cells change their shape (see gure 5.9). The results remain

unaltered because we use the ALE framework which does not depend on wi as shown in equation

2.58.

37

Page 44: Lehrstuhl für Kontinuumsmechanik und Materialtheorie ... · Eidesstaatliche Erklärung Hiermit versichere ich, dass ich die vorliegende Arbeit selbstständig verfasst und keine anderen

5.3 Final simulation 5 FLUID-STRUCTURE INTERACTION

(a) t = 0s

(b) t = 0.5s

(c) t = 1s

Figure 5.8: A channel ow with xed mesh

5.3 Final simulation

It this chapter we simulate a composition similar to the atomic force microscopy experiment from

chapter 1.3. We start by creating a rectangular mesh. This domain is then divided into one solid

part BSt and one uid part ΩFt . The solid part is simulated in the reference conguration using the

Lagrangian framework. For the solid solution we use a Dirichlet boundary condition at the

bottom edge:

uSi = ubottomi on Γbottom0 . (5.12)

38

Page 45: Lehrstuhl für Kontinuumsmechanik und Materialtheorie ... · Eidesstaatliche Erklärung Hiermit versichere ich, dass ich die vorliegende Arbeit selbstständig verfasst und keine anderen

5.3 Final simulation 5 FLUID-STRUCTURE INTERACTION

(a) t = 0s

(b) t = 0.5s

(c) t = 1s

Figure 5.9: A channel ow with moving mesh

When we use the nite element method and apply aDirichlet boundary condition the test function

is set to zero at the nodes where the boundary condition is given. Instead, the values are directly

written into the solution vector. This means that the boundary integral over Γbottomt is zero. On

the FSI boundary we have to assure the continuity of the stresses:

σFjinFj = −σSjinSj on Γfsi

t . (5.13)

Where as the outer normal vector of the uid nFi is almost the same as the outer normal vector of

the solid:

nFi = −nSi . (5.14)

39

Page 46: Lehrstuhl für Kontinuumsmechanik und Materialtheorie ... · Eidesstaatliche Erklärung Hiermit versichere ich, dass ich die vorliegende Arbeit selbstständig verfasst und keine anderen

5.3 Final simulation 5 FLUID-STRUCTURE INTERACTION

This is a Neumann boundary condition and as such it is directly written into the variational

formulation:

Formstr =

ˆBS0ρS0

1

∆t2

(uSi − 2uS,k−1

i + uS,k−2i

)δuSi dV +

ˆBS0JSσSji

(FS

−1)kj

∂δuSi∂Xk

dV −

−˛∂BS0

JSσSji

(FS

−1)kjδuSi N

Sk dA+

ˆΓfsit

(σSji − σFji

)nSj δu

Si da

=

ˆBS0ρS0

1

∆t2

(uSi − 2uS,k−1

i + uS,k−2i

)δuSi dV +

ˆBS0JSσSji

(FS

−1)kj

∂δuSi∂Xk

dV −

−˛∂BS0

JSσSji

(FS

−1)kjδuSi N

Sk dA+

ˆΓfsi0

JS(σSji − σFji

) (FS

−1)kjNSk δu

Si dA.(5.15)

The boundary ∂BS0 has only two parts:

∂BS0 = Γfsi0 ∪ Γbottom

0 . (5.16)

So we can divide the boundary integral 5.15 in two parts:

˛∂BS0

JσSji(F−1

)kjδuiNkdA =

ˆΓbottom0

JSσSji

(FS

−1)kjδuSi N

Sk dA+

ˆΓfsi0

JSσSji

(FS

−1)kjδuSi N

Sk dA.

(5.17)

The rst integral is zero because we apply a Dirichlet boundary condition at this boundary and

thus the test function is set to zero. The second integral remains and vanishes in combination with

the Neumann boundary condition:

Formstr =

ˆBS0ρS0

1

∆t2

(uSi − 2uS,k−1

i + uS,k−2i

)δuidV +

ˆBS0JSσSji

(FS

−1)kj

∂δuSi∂Xk

dV −

−ˆ

Γfsi0

JSσFji

(FS

−1)kjδuSi N

Sk dA = 0. (5.18)

In addition to the stresses the uid particles are also kinematically bonded, which is usually known

as the nonslip boundary condition:

vSi = vFi on Γfsit . (5.19)

40

Page 47: Lehrstuhl für Kontinuumsmechanik und Materialtheorie ... · Eidesstaatliche Erklärung Hiermit versichere ich, dass ich die vorliegende Arbeit selbstständig verfasst und keine anderen

5.3 Final simulation 5 FLUID-STRUCTURE INTERACTION

The uid part is described in the current conguration with the help of the ALE framework:

Formd =

ˆΩF

t

ρF∂vFi∂χi

δpFdv +

+

ˆΩF

t

ρFvFi − v

F,k−1i

∆t+ ρF

∂χj

(vFi wj

)δvFi dv +

+

ˆΩF

t

∂pF

∂χiδvFi dv +

ˆΩF

t

λF∂vFk∂χk

∂δvFi∂χi

dv −˛∂ΩF

t

λF∂vFk∂χk

δvFi nFi da+

+

ˆΩF

t

µF

(∂vFi∂χj

+∂vFj∂χi

)∂δvFi∂χj

dv −˛∂ΩF

t

µF

(∂vFi∂χj

+∂vFj∂χi

)δvFi n

Fj da−

−ˆ

ΩFt

ρF(vFj − wj

)vFi∂δvFi∂χj

dv +

˛∂ΩF

t

ρF(vFj − wj

)vFi δv

Fi n

Fj da = 0. (5.20)

Likewise we apply the boundary conditions 5.13 and 5.19. The velocity condition is again im-

plemented as a Dirichlet boundary condition and the stress condition directly written into the

variational form:

Formd =

ˆΩF

t

ρF∂vFi∂χi

δpFdv +

+

ˆΩF

t

ρFvFi − v

F,k−1i

∆t+ ρF

∂χj

(vFi wj

)δvFi dv +

+

ˆΩF

t

∂pF

∂χiδvFi dv +

ˆΩF

t

λF∂vFk∂χk

∂δvFi∂χi

dv +

ˆΩF

t

µF

(∂vFi∂χj

+∂vFj∂χi

)∂δvFi∂χj

dv −

−ˆ

ΩFt

ρF(vFj − wj

)vFi∂δvFi∂χj

dv +

˛∂ΩF

t

ρF(vFj − wj

)vFi δv

Fi n

Fj da−

−˛∂ΩF

t

λF∂vFk∂χk

δvFi nFi da−

˛∂ΩF

t

µF

(∂vFi∂χj

+∂vFj∂χi

)δvFi n

Fj da+

+

ˆΓfsit

(σFji − σSji

)nFj δv

Fi da = 0. (5.21)

41

Page 48: Lehrstuhl für Kontinuumsmechanik und Materialtheorie ... · Eidesstaatliche Erklärung Hiermit versichere ich, dass ich die vorliegende Arbeit selbstständig verfasst und keine anderen

5.3 Final simulation 5 FLUID-STRUCTURE INTERACTION

In order to apply the stress condition we use a trick. We add a further integral containing the

pressure pF and immediately subtract it again:

Formd =

ˆΩF

t

ρF∂vFi∂χi

δpFdv +

+

ˆΩF

t

ρFvFi − v

F,k−1i

∆t+ ρF

∂χj

(vFi wj

)δvFi dv +

+

ˆΩF

t

∂pF

∂χiδvFi dv +

ˆΩF

t

λF∂vFk∂χk

∂δvFi∂χi

dv +

ˆΩF

t

µF

(∂vFi∂χj

+∂vFj∂χi

)∂δvFi∂χj

dv −

−ˆ

ΩFt

ρF(vFj − wj

)vFi∂δvFi∂χj

dv +

˛∂ΩF

t

ρF(vFj − wj

)vFi δv

Fi n

Fj da−

−˛∂ΩF

t

λF∂vFk∂χk

δvFi nFi da−

˛∂ΩF

t

µF

(∂vFi∂χj

+∂vFj∂χi

)δvFi n

Fj da+

+

ˆΓfsit

(σFji − σSji

)nFj δv

Fi da+

ˆΓfsit

pF δjinFj δv

Fi da−

ˆΓfsit

pF δjinFj δv

Fi da = 0. (5.22)

This helps us to simplify the equation above, because then one part vanishes in combination with

stress condition:

Formd =

ˆΩF

t

ρF∂vFi∂χi

δpFdv +

+

ˆΩF

t

ρFvFi − v

F,k−1i

∆t+ ρF

∂χj

(vFi wj

)δvFi dv +

+

ˆΩF

t

∂pF

∂χiδvFi dv +

ˆΩF

t

λF∂vFk∂χk

∂δvFi∂χi

dv +

ˆΩF

t

µF

(∂vFi∂χj

+∂vFj∂χi

)∂δvFi∂χj

dv −

−ˆ

ΩFt

ρF(vFj − wj

)vFi∂δvFi∂χj

dv +

˛∂ΩF

t

ρF(vFj − wj

)vFi δv

Fi n

Fj da−

−ˆ

Γdt

λF∂vFk∂χk

δvFi nFi da−

ˆΓdt

µF

(∂vFi∂χj

+∂vFj∂χi

)δvFi n

Fj da−

−ˆ

Γfsit

σSjinFj δv

Fi da−

ˆΓfsit

pF δjinFj δv

Fi da = 0. (5.23)

The motion of the uid mesh is inuenced by the cantilever. But it is not enough to move only

the nodes at the FSI boundary. This would deform the nearest elements extremely and lead to no

convergence. As a consequence we have to solve an additional mesh problem to assure a good quality

mesh. The literature oers dierent approaches to prescribe a certain mesh motion [16, 20]. We

suggest an engineering type of technique and handle the mesh as ctitious material with an imaginary

constitutive law. Similar to the structure problem we state the mesh problem in the Lagrangian

framework. This means that we express the balance equations in the initial conguration of the

42

Page 49: Lehrstuhl für Kontinuumsmechanik und Materialtheorie ... · Eidesstaatliche Erklärung Hiermit versichere ich, dass ich die vorliegende Arbeit selbstständig verfasst und keine anderen

5.3 Final simulation 5 FLUID-STRUCTURE INTERACTION

uid mesh. Our ctitious material has a viscous character:

FikSMkj =

a

2

(∂wi∂Xj

+∂wj∂Xi

). (5.24)

The parameter a is a viscosity like quantity, where we can adjust the mesh deformation. With this

law we have the following form for the mesh problem:

Formmesh =

ˆΩF

0

wi − w0i

∆tδwidV +

ˆΩF

0

a

2

(∂wi∂Xj

+∂wj∂Xi

)∂δwi∂Xj

dV −

−˛∂ΩF

0

a

2

(∂wi∂Xj

+∂wj∂Xi

)δwiNidA = 0. (5.25)

As boundary condition we use the velocity of the cantilever on the FSI boundary:

wi = vSi on Γfsi0 . (5.26)

On the remaining boundary a homogeneous Neumann boundary condition is assumed:

FikSMkjNj = 0 on Γd

0 . (5.27)

If we apply these boundary conditions, the form for the mesh problem changes:

Formmesh =

ˆΩF

0

wi − w0i

∆tδwidV +

ˆΩF

0

a

2

(∂wi∂Xj

+∂wj∂Xi

)∂δwi∂Xj

dV = 0. (5.28)

With the solution velocity wi a displacement eld uMi is calculated:

uMi = uM,k−1i + wi ·∆t. (5.29)

This eld is now used to move the uid mesh. The inuence of the mesh problem is illustrated in

gure 5.10 . We used the cantilever from chapter 3.3 and moved the uid mesh according to the

solution of the above mesh problem. The parameter a adjusts the articial viscosity of the uid

mesh. The higher the value the stier the motion. Another aspect may also be observed in the same

gure: the uid MeshFunction. This is the FEniCS function that enables us to mark the boundaries

with certain numbers. In this particular case we marked Γdt with 1 and Γfsi

t with 2. In summary

we have the following procedure:

43

Page 50: Lehrstuhl für Kontinuumsmechanik und Materialtheorie ... · Eidesstaatliche Erklärung Hiermit versichere ich, dass ich die vorliegende Arbeit selbstständig verfasst und keine anderen

5.3 Final simulation 5 FLUID-STRUCTURE INTERACTION

Figure 5.10: Motion of the uid mesh according to the cantilever

1. solve structure problem → uSi , vSi

2. solve mesh problem → uMi , wi

3. move uid mesh according to uMi

4. solve uid problem → pF , vFi

But here arises a further concern. When we are solving structure problem we have no knowledge

about σFij , because the uid problem has not been solved yet. We solve this problem by implement-

ing an inner iteration loop.

44

Page 51: Lehrstuhl für Kontinuumsmechanik und Materialtheorie ... · Eidesstaatliche Erklärung Hiermit versichere ich, dass ich die vorliegende Arbeit selbstständig verfasst und keine anderen

5.3 Final simulation 5 FLUID-STRUCTURE INTERACTION

1. set pF , vFi = 0

(a) solve structure problem with

ui = ubottomi on Γbottom0 and σij = σFij

(pF , vFi

)on Γfsi

0

−→uSi , vSi(b) solve mesh problem with

wi = vSi on Γfsi0 and

∂wi∂χj

NFj = 0 on Γd

0

−→uMi , wi

(c) move the uid mesh with uMi

(d) solve uid problem with

vi = vSi on Γfsit ,

∂vFi∂xj

nFj = 0 on Γdt , σij = σSij

(uSi)on Γfsi

t and p = pout on Γdt

−→pF , vFi(e) check for convergence: yes → proceed with 2., no → go back to (a)

2. update quantities and proceed to next time step

The convergence criterion is enforced by measuring the change in solid displacements compared to

the previous iteration:

∆uSi = uSi − uS,previ . (5.30)

We nd the maximum nodal value of ∆uSi and restrict its magnitude to a tolerance value:

∆uSi,max < tol. (5.31)

In addition we set a maximum number of iteration, after which the program stops and prints out

an error.

45

Page 52: Lehrstuhl für Kontinuumsmechanik und Materialtheorie ... · Eidesstaatliche Erklärung Hiermit versichere ich, dass ich die vorliegende Arbeit selbstständig verfasst und keine anderen

5.4 Results 5 FLUID-STRUCTURE INTERACTION

Figure 5.11: Simulation outlines Figure 5.12: Initial structured mesh

5.4 Results

The algorithm explained in chapter 5.3 is implemented with FEniCS. First we perform a simulation

with a cantilever 15µm and 1µm in size. The according uid domain measures 30µm times 30µm

(gure 5.11).Initially we created a rectangular mesh with equal divisions (gure 5.12). Some screen-

shots from the calculations are found in gure 5.13 and 5.14. The background color represents

the pressure eld and the arrows the uid velocity eld. We applied the code to the vibrating can-

tilever immersed into a uid and performed several calculations each time with a dierent frequency.

Unfortunately the calculation was only possible for frequencies up to approx. 0.4MHz. Beyond

this frequency the calculation failed to converge. By observing successful computations around an

excitation frequency of 0.4MHz, we notice non reasonable pressure elds. The total value of the

pressures reaches magnitudes from −200 bar to 400 bar, which is no way possible. The motion of

the cantilever also develops physically non explainable tful leaps. These symptoms indicate an

oscillation of the solution and can therefore not be treated as trustful. We may only consider results

as reasonable if the pressure eld remains reasonable. This is only the case for frequencies up to

0.3MHz. There is no eigenfrequency observable until this frequency. Convergence problems with

the incompressible Navier-Stokes equation were investigated by many authors. Some of the most

common stability schemes are presented by Chorin [6], Goda [13], Guermond et al. [14],

Johnson and Hoffman [17], to mention only a few. The interested reader can nd a useful com-

parison and implementation strategies of the dierent schemes in chapter 21 of the FEniCS book

[29]. The implementation and analysis of these schemes would go beyond the scope of the present

work and therefore remain for further studies. The next step is to implement the experiment's geom-

etry. The cantilever used for the experiment measures 350µm and 1µm. The according inuenced

uid domain was estimated to be 600µm times 600µm. If we create a mesh with equal elements

for this geometry similar to gure 5.12 we would have a mesh with approx. 9 million elements. The

46

Page 53: Lehrstuhl für Kontinuumsmechanik und Materialtheorie ... · Eidesstaatliche Erklärung Hiermit versichere ich, dass ich die vorliegende Arbeit selbstständig verfasst und keine anderen

5.4 Results 5 FLUID-STRUCTURE INTERACTION

Figure 5.13: Velocity and pressure eld at 0.3MHz and t = T50

Figure 5.14: Velocity and pressure eld at 0.3MHz and t = T4

47

Page 54: Lehrstuhl für Kontinuumsmechanik und Materialtheorie ... · Eidesstaatliche Erklärung Hiermit versichere ich, dass ich die vorliegende Arbeit selbstständig verfasst und keine anderen

5.4 Results 5 FLUID-STRUCTURE INTERACTION

Figure 5.15: Mesh of experimental geometry

computation of such a domain is very time-consuming and also not necessary, because most of the

regions do not need to be simulated that accurately. In order to reduce the computational time we

create a mesh using Gmsh. Here we produced an unstructured mesh which is coarse in the outer

uid areas and gets ner near the cantilever (gure 5.15). Some screenshots of the a calculation

can be found in gure 5.16 to 5.20. Again the computation was conducted over and over for a

frequency spectrum. The spectrum in air can be seen in gure 5.21. The according results from

the experiment explained in chapter 1.3 are presented in gure 5.22. The rst eigenfrequency meets

the experiment result quite well. When we simulate the frequency spectrum with water, we ob-

serve the same convergence problem already known from simulations above. The computation only

reaches frequencies of approx. 0.1 kHz. The eigenfrequency of the dumped system should be around

2 kHz according to the experiment (gure 5.23). Unfortunately it was not possible to overcome the

convergence problem with the model presented in this work. These challenges remain for further

studies.

48

Page 55: Lehrstuhl für Kontinuumsmechanik und Materialtheorie ... · Eidesstaatliche Erklärung Hiermit versichere ich, dass ich die vorliegende Arbeit selbstständig verfasst und keine anderen

5.4 Results 5 FLUID-STRUCTURE INTERACTION

Figure 5.16: Velocity eld for a excitation frequency of 0.1 kHz at t = T10

Figure 5.17: Pressure eld for a excitation frequency of 0.1 kHz at t = T10

49

Page 56: Lehrstuhl für Kontinuumsmechanik und Materialtheorie ... · Eidesstaatliche Erklärung Hiermit versichere ich, dass ich die vorliegende Arbeit selbstständig verfasst und keine anderen

5.4 Results 5 FLUID-STRUCTURE INTERACTION

Figure 5.18: Computational results for a excitation frequency of 0.1 kHz at t = T10

Figure 5.19: Computational results for a excitation frequency of 0.1 kHz at t = T4

50

Page 57: Lehrstuhl für Kontinuumsmechanik und Materialtheorie ... · Eidesstaatliche Erklärung Hiermit versichere ich, dass ich die vorliegende Arbeit selbstständig verfasst und keine anderen

5.4 Results 5 FLUID-STRUCTURE INTERACTION

Figure 5.20: Computational results for a excitation frequency of 0.1 kHz at t = T2

100 101 102

Frequency [kHz]

100

101

Ampl

itude

[mic

ro m

eter

]

u_mag

Figure 5.21: Computed frequency spectrumof cantilever in air

Figure 5.22: Frequency spectrum of AFM experi-ment with curve t in air

51

Page 58: Lehrstuhl für Kontinuumsmechanik und Materialtheorie ... · Eidesstaatliche Erklärung Hiermit versichere ich, dass ich die vorliegende Arbeit selbstständig verfasst und keine anderen

REFERENCES REFERENCES

Figure 5.23: Frequency spectrum of AFM experiment with water

References

[1] N. Ahmed, D. F. Nino, and V. T. Moya. Measurment of solution viscosity by atomic force

microscopy. Review of Scientic Instrument, 72(6):27312734, 2001.

[2] Asylum Research. Asylum Research Atomic Force Microscopy MFP-3D Manual, 2008.

[3] A. Bertram. Elasticity and Plasticity of Large Deformations. Springer, 2008.

[4] J. Bonet and R. D. Wood. Nonlinear Continuum Mechanics for Finite Element Analysis.

Cambridge University Press, 1997.

[5] S. Boskovic, J. W. M. Chon, P. Mulvaney, and J. E. Sader. Rheological measurements using

microcantilevers. Journal of Rheology, 46(4):891899, 2002.

[6] A. J. Chorin. Numerical solution of the navier-stokes equations. Mathematics of Computations,

22:745762, 1968.

[7] R. J. Clarke, O. E. Jensen, J. Billingham, A. P. Pearson, and P. M. Williams. Stochastic

elastohydrodynamics of a microcantilever oscillating near a wall. Phys. Rev. Lett., 96:050801,

2006.

[8] J. Donea, S. Giuliani, and J. Halleux. An arbitrary lagrangian-eulerian nite element method

for transient dynamic uid-structure interactions. Computer Methods in Applied Mechanics and

Engineering, 33(1-3):689723, 1982.

[9] J. Donea and A. Huerta. Finite Element Methods for Flow Problems. John Wiley & Sons, Ltd.,

2003.

[10] J. Donea, A. Huerta, J.-Ph. Ponthot, and A. Rodriguez-Ferran. Arbitrary lagrangian-eulerian

methods. Encyclopedia of Computational Mechanics, 1:125, 2004.

52

Page 59: Lehrstuhl für Kontinuumsmechanik und Materialtheorie ... · Eidesstaatliche Erklärung Hiermit versichere ich, dass ich die vorliegende Arbeit selbstständig verfasst und keine anderen

REFERENCES REFERENCES

[11] T. Dunne. An eulerian approach to uid-structure interaction and goal-oriented mesh adapta-

tion. International Journal for Numerical Methods in Fluids, 51(9-10):10171039, 2006.

[12] T. Dunne and R. Rannacher. Adaptive nite element approximation of uid-structure interac-

tion based on an eulerian variational formulation. In H.-J. Bungartz and M. Schäfer, editors,

Fluid-Structure Interaction, volume 53 of Lecture Notes in Computational Science and Engi-

neering, pages 110145. Springer Berlin Heidelberg, 2006.

[13] K. Goda. A multistep technique with implicit dierence schemes for calculating two- or three-

dimensional cavity ows. Journal of Computational Physics, 30:7695, 1979.

[14] J. L. Guermond, P. Minev, and J. Shen. An overview of projection methods for incompressible

ows. Computer Methods in Applied Mechanics and Engineering, 41:112134, 2006.

[15] S. Göke and B. Blümel. 2d-strömungen, 11 2011. OWL-Projekt, Online Experimente in der

Strömungslehre, Technische Universität Berlin.

[16] J. Hermansson and P. Hansbo. A variable diusion method for mesh smoothing. Communica-

tions in Numerical Methods in Engineering, 19(11):897908, 2003.

[17] J. Homan and C. Johnson. Computational Turbulent Incompressible Flow. Springer, 2007.

[18] J. Hron and S. Turek. A monolithic fem solver for an ale formulation of uid-structure interac-

tion with conguration for numerical benchmarking. In European Conference on Computational

Fluid Dynamics, 2006.

[19] A. Logg, K.-A. Mardal, and G. N. Wells. Automated Solution of Dierential Equations by the

Finite Element Method - The FEniCS Book. The FEniCS Project, 2011.

[20] E. J. López, N. M. Nigro, and M. A. Storti. Simultaneous untangling and smoothing of moving

grids. International Journal for Numerical Methods in Engineering, 76(7):9941019, 2008.

[21] W. H. Müller. Streifzüge durch die Kontinuumstheorie. Springer, 2011.

[22] W. H. Müller and W. Muschik. Bilanzgleichungen oener mehrkomponentiger systeme i.

massen- und impulsbilanz. J. Non-Equilib. Thermodyn., 8:2946, 1983.

[23] W.H. Müller and F. Ferber. Technische Mechanik für Ingenieure. Carl Hanser, 3 edition, 2008.

[24] S. Piperno, B. Larrouturou, and M. Lesoinne. Analysis and compensation of numerical damp-

ing in a one-dimensional aeroelastic problem. International Journal of Computational Fluid

Dynamics, 6(2):157174, 1996.

[25] R. Plato. Numerische Mathematik kompakt: Grundlagenwissen für Studium und Praxis. Vieweg,

3., aktualisierte und verbesserte auage edition, 2006.

53

Page 60: Lehrstuhl für Kontinuumsmechanik und Materialtheorie ... · Eidesstaatliche Erklärung Hiermit versichere ich, dass ich die vorliegende Arbeit selbstständig verfasst und keine anderen

REFERENCES REFERENCES

[26] J. E. Sader. Frequency response of cantilever beams immersed in viscous uids with applications

to the atomic force microscope. Journal of Applied Physics, 84(1):6476, 1998.

[27] M. Stöckli. A unied continuum uid-structure interaction solver using ale nite element

method. Master's thesis, Royal Institute of Technology School of Computer Science and Com-

munication, 2007.

[28] W. Liu T. Hughes and T. Zimmermann. Lagrangian-eulerian nite element formulation

for incompressible viscous ows. Computer Methods in Applied Mechanics and Engineering,

29(3):329349, 1981.

[29] K. Valen-Sendstad, A. Logg, K.-A. Mardal, H. Narayanan, and M. Mortensen. A comparison of

some common nite element schemes for the incompressible navier-stokes equations. In A. Logg,

K.-A. Mardal, and G. Wells, editors, Automated Solution of Dierential Equations by the Finite

Element Method, pages 395418. Springer, 2011.

[30] W. Xu, P. M. Wood-Adams, and Ch. G. Robertson. Measuring local viscoelastic properties of

complex materials with tapping mode atomic force microscopy. Polymer, 47(13):4798 4810,

2006.

[31] X. Xu and A. Raman. Comparative dynamics of magnetically, acoustically, and brownian

motion driven microcantilevers in liquids. Journal of Applied Physics, 102(3):034303, 2007.

54

Page 61: Lehrstuhl für Kontinuumsmechanik und Materialtheorie ... · Eidesstaatliche Erklärung Hiermit versichere ich, dass ich die vorliegende Arbeit selbstständig verfasst und keine anderen

A IMPLEMENTATION

A Implementation

In this chapter we walk the reader through the program and explain step by step how the the

FEM simulation is programmed. The code is divided into several blocks. The blocks summarize

thematically similar expressions. Among others there are blocks for the structure problem and for

the uid problem. On the one hand material parameters are dened in these blocks. On the other

hand we nd formula for the solution of the respective problem. Further information will be delivered

later. The program begins with an initialization block. Here necessary packages are loaded for the

calculation. The two most important are DOLFIN and NumPy. DOLFIN is the head user interface.

It forms the interface between the user and the core components and serves also the communication

between the components. Thus, e.g., a variational statement is written into the UFL language and

then is handed over to the form compiler FFC. FFC generates unied form code (UFC) which is used

again by DOLFIN to build up the linear equation system. The system is then solved with a suitable

solver. Among others DOLFIN's functionality includes data structures, simple mesh generator and

nite element assembler. NumPy contains packages for generating and working with matrices and

vectors. Moreover, some indices are initialized in this block for the upcoming weak forms.

from dolfin import *

from numpy import array , append

import time , sys , pylab

parameters["form_compiler"]["cpp_optimize"]=True

parameters["allow_extrapolation"]=True

delta = Identity (2)

i,j,k,l,m,p,q,r,o = indices (9)

The next block deals with the dierent domains and the production of the respective grids. First a

global grid is generated. It contains the uid as well as the solid. With the help of a mesh function

the subgrids uid_mesh and structure_mesh are cut out from this grid. A mesh function marks

entities with numbers. It can mark cells, facets or nodes.

xlength = 1.0 # in micrometer

ylength = 15.0 # in micrometer

mesh = Rectangle ( -15.0* xlength , 0.0, 15.0* xlength , 30.0, 120 ,120)

D = mesh.topology ().dim()

# Structure sub domain

class Structure(SubDomain):

def inside(self , x, on_boundary):

return ( x[0] >= -xlength /2.0 - DOLFIN_EPS and

x[0] <= xlength /2.0 + DOLFIN_EPS and

x[1] + DOLFIN_EPS <= ylength )

55

Page 62: Lehrstuhl für Kontinuumsmechanik und Materialtheorie ... · Eidesstaatliche Erklärung Hiermit versichere ich, dass ich die vorliegende Arbeit selbstständig verfasst und keine anderen

A IMPLEMENTATION

# Create sub domain markers and mark everything as 0

sub_domains = MeshFunction("uint", mesh , D)

sub_domains.set_all (0)

# Mark structure domain as 1

structure = Structure ()

structure.mark(sub_domains , 1)

# Extract sub meshes

fluid_mesh = SubMesh(mesh , sub_domains , 0)

structure_mesh = SubMesh(mesh , sub_domains , 1)

Next we nd a paragraph where several classes are dened to identify the boundaries Γfsi0 , Γd

0

and Γbottom0 . These are required later for the denition of Dirichlet and Neumann boundary

conditions. It actually also denes the boundaries in the current conguration, because it attaches

a number to the facet (edge) index. When the mesh moves, so do the edges, but the index remains

the same. This is why the ALE formalism is so elegant.

# bottom - boundary where the disturbance is applied

bottom = compile_subdomains(" fabs(x[1]) < DOLFIN_EPS && on_boundary ")

# define fluid structure interaction boundaries

class fsi_rand(SubDomain):

def inside(self , x, on_boundary):

tol = DOLFIN_EPS

return (((abs(x[0]+0.5* xlength) <= tol and abs(x[1]) < ylength + tol) or

(abs(x[0] -0.5* xlength) <= tol and abs(x[1]) < ylength + tol) or

(abs(x[0] < xlength + tol and abs(x[1]- ylength) <= tol)) ) and

on_boundary )

# define the remaining boundaries

class fld_rand(SubDomain):

def inside(self , x, on_boundary):

return on_boundary

class left_right(SubDomain):

def inside(self , x, on_boundary):

tol = DOLFIN_EPS

return ( ( abs(x[0]+0.5* xlength) <= tol or

abs(x[0] -0.5* xlength) <= tol ) and

on_boundary )

class top(SubDomain):

def inside(self , x, on_boundary):

tol = DOLFIN_EPS

return abs(x[1]) >= ylength - tol

56

Page 63: Lehrstuhl für Kontinuumsmechanik und Materialtheorie ... · Eidesstaatliche Erklärung Hiermit versichere ich, dass ich die vorliegende Arbeit selbstständig verfasst und keine anderen

A IMPLEMENTATION

The next block deals with all temporal parameters which are used for the simulation. Among others,

we nd here the current time step t, but also the end time tend, the number of the time steps to be

calculated and the frequency of the external excitation.

# time definition

t=0.0

freq = float(sys.argv [1])

periode =2.0

t_end=periode/freq

time_steps =50.0* periode

dt=t_end/time_steps # in s

omega = 2.0*pi*freq

Now we come to the blocks specic to the material problems: structure problem, uid problem and

mesh problem. Three blocks are built up very alike. The rst of them is the structure problem. Here

we have a subblock at the beginning where the material parameters are dened: e.g. the density

ρS , the Poisson number νS and Young's module ES . Out of these the Lamé constants λS and

µS are derived.

# material parameters

rho_str = 2.329e-12 # in gram / (micrometer ^3)

nu_str = 0.23

E_str= 147.0e+6 # in gram / (micrometer * s^2)

mu_str=E_str /(2.0*(1.0+ nu_str))

l_str= 2.0* mu_str*nu_str /(1.0 -2.0* nu_str)

Next the domains BS0 and BSt are initialized. BSt changes when the simulation progresses. As BS0 is

the reference conguration in remains unaltered. At this moment we just dene two independent

copies of structure_mesh, thus there seems to be no dierence. But wait until the mesh moving

function is dened.

structure_mesh_AP = Mesh(structure_mesh)

structure_mesh_BP = Mesh(structure_mesh)

Afterwards a paragraph follows where a mesh function marks the edges of the grid with numbers.

The marks are performed with the help of the classes we dened before. The boundaries Γfsi0 and

Γd0 are identied with the numbers 2 and 1, respectively.

rand_str = MeshFunction("uint", structure_mesh_BP ,D-1)

rand_str.set_all (0)

fsi_rand ().mark(rand_str ,2)

bottom.mark(rand_str ,1)

top().mark(rand_str ,3)

Now we choose suitable nite elements and dene function spaces according to them. The standard

choice in the entire program are the continuous Galerkin elements of 1st order. This corresponds

to a Hilbert space of 1st order or piecewise linear functions [25]:

V = H1(BS0). (A.1)

57

Page 64: Lehrstuhl für Kontinuumsmechanik und Materialtheorie ... · Eidesstaatliche Erklärung Hiermit versichere ich, dass ich die vorliegende Arbeit selbstständig verfasst und keine anderen

A IMPLEMENTATION

It exists an distinction whether it is a scalar valued, vector valued or tensor valued function space.

In another step we dene functions from these function spaces. These functions are used to express

variational formulations. Upon other terms we declare uSi , vSi and the test function δuSi . u

Si is not

stated as trial function. Since the problem is not linear, it is solved with the iterative Newton-

Raphson method [4]. Part of which is a symbolic derivative of the variational formulation and

exactly for this purpose an extra trial function is necessary.

V_str = VectorFunctionSpace(structure_mesh_BP ,'CG' ,1)

T_str = TensorFunctionSpace(structure_mesh_BP ,'CG' ,1)

u_str=Function(V_str)

u0_str=Function(V_str)

u00_str=Function(V_str)

v_str = Function(V_str)

test_str=TestFunction(V_str)

trial_str=TrialFunction(V_str)

sigma_fld = Function(T_str)

In the next subsegment Dirichlet boundary conditions are dened for the solution of the structure

problem. Here we nd the excitationally displacement eld ubottomi . This is applied at the edge

Γbottom0 (here marked by the number 1). As an alternative a homogeneous Dirichlet boundary

condition is oered. The choice is conrmed by the variable bcs_str.

null = Expression (('0.0',)*D)

disp_str_bottom=Expression( ('A*sin(omega*t)','0.0'), A=1.0, omega=omega ,t=t)

bc_d = DirichletBC(V_str ,disp_str_bottom ,rand_str ,1)

bc_h = DirichletBC(V_str ,Constant ((0.0 ,)*D),rand_str ,1)

bcs_str= [bc_d]

Now follows the material or constitutive block. In this block we rst dene kinematical quantities:

the deformation gradient FSij and the determinant of the deformation gradient JS . Every denition

is initiated with the statement def. The dependent variables are written in the functions preamble

enclosed in brackets. Thus we nd several denitions as functions of the displacements: FSij (ui),

JS (ui) and σSij (ui). With the denition of the stress tensor σSij the user can choose between two

relations: the law of Hooke or St.-Venant-Kirchhoff. By dening which tensor is returned, one

changes the used constitutive law. Attention has to be paid in which conguration the constitutive

law is stated. If it is represented in the reference conguration, no further changes are needed.

Otherwise one needs to alter the function calculate_sigma_str and the Form_str additionally. At

this point the user can also implement his own material models and e.g. test it in a FSI simulation.

def F_str(u):

return as_tensor( delta[j,l] +u[j].dx(l), (j,l))

def J_str(u):

return det(F_str(u))

58

Page 65: Lehrstuhl für Kontinuumsmechanik und Materialtheorie ... · Eidesstaatliche Erklärung Hiermit versichere ich, dass ich die vorliegende Arbeit selbstständig verfasst und keine anderen

A IMPLEMENTATION

def sigma_str(u):

# the material model

# Hooke (small deformation , small strains)

sigma_cauchy = as_tensor(l_str*u[m].dx(m)*delta[k,j]

+ mu_str*u[k].dx(j)+mu_str*u[j].dx(k), (k,j))

# linear St.Venant -Kirchhoff (finite deformation , small strains)

E_str = as_tensor (0.5 * (F_str(u)[k,l]* F_str(u)[k,j] - delta[l,j]) , (l,j) )

T_2pk_str = as_tensor(l_str*E_str[r,r]*delta[m,q] +

2.0* mu_str*E_str[m,q],(m,q) )

# !!!!!! do not forget to change Form_str and calculate_sigma_str !!!!!!

return T_2pk_str

The next subblock denes the variational formula Form_str. It is also signed as a user function by

means of def. In case of the Form_str it depends on the solutions of the two preceding time steps

uS,k−1i and uS,k−2

i . In addition to these the uid stresses σFij are supplied. The variational formulation

corresponds to the theoretically derived equation 5.18, only the indices are slightly modied.

def Form_str(u0_str ,u00_str ,traction_fld ,sigma_fld):

N_str= FacetNormal(structure_mesh_BP)

Form= 1.0/dt/dt*rho_str*u_str[i]* test_str[i]*dx

Form+=- 2.0/dt/dt*rho_str*u0_str[i]* test_str[i]*dx

Form+= 1.0/dt/dt*rho_str*u00_str[i]* test_str[i]*dx

Form+= F_str(u_str)[i,q]* sigma_str(u_str)[j,q]* test_str[i].dx(j)*dx

Form+= (-J_str(u_str)*sigma_fld[i,j]*

inv(F_str(u_str))[k,j]* test_str[i]*N_str[k]*ds(2) )

return Form

Since the calculation of the solid domain takes place in the reference conguration and the one of

the liquid in the current conguration, the quantities that are exchanged between the modules needs

suitable transformation. The function calculate_sigma_str takes care of this adjustment. As an

input parameter the function gets the solution displacements uSi and uS,k−1i . Within the denition

the grid BSt is renewed rst by shifting the nodes of BS0 with the displacement eld uSi . Consequently

new function spaces are dened in the current conguration and the values are handed over to new

functions:

uSi (Xk, t) = uSi (ϕj (Xk, t) , t) . (A.2)

Because the stresses are given as 2nd Piola-Kirchhoff tensor, they have to be converted into

Cauchy's stresses:

σSil =1

JSFikSkjFlj . (A.3)

The function calculate_sigma_str passes σSij as return value.

def calculate_sigma_str(u_str_BP ,u0_str_BP):

u_x ,u_y = u_str_BP.split(deepcopy=True)

59

Page 66: Lehrstuhl für Kontinuumsmechanik und Materialtheorie ... · Eidesstaatliche Erklärung Hiermit versichere ich, dass ich die vorliegende Arbeit selbstständig verfasst und keine anderen

A IMPLEMENTATION

i=0

for x in structure_mesh_AP.coordinates ():

x[0] = structure_mesh_BP.coordinates ()[i,0]+ u_x.vector ().array()[i]

x[1] = structure_mesh_BP.coordinates ()[i,1]+ u_y.vector ().array()[i]

i+=1

# new FunctionSpace for the upcoming quantities

V_str_AP = VectorFunctionSpace(structure_mesh_AP , 'CG', 1)

T_str_AP = TensorFunctionSpace(structure_mesh_AP , 'CG', 1)

u_str_AP = Function(V_str_AP)

u_str_AP.vector ()[:] = u_str_BP.vector ().array()

# Cauchy stresses

sigma = as_tensor (1.0 / J_str(u_str_BP) * F_str(u_str_BP)[i,k] *

sigma_str(u_str_BP)[k,j] * F_str(u_str_BP)[l,j] , (i,l) )

sigma_cauchy_BP = project(sigma ,T_str)

sigma_cauchy_AP = Function(T_str_AP)

sigma_cauchy_AP.vector ()[:] = sigma_cauchy_BP.vector ().array ()

return sigma_cauchy_AP

With it ends the structure module and we devote our attention to the uid part. This module is built

up very similar to the structure problem, so that we can shorten many things. First we nd paragraph

with material parameters. Afterwards the reference conguration ΩF0 and the current conguration

Ω0t are initialized as copies from uid_mesh. With these grids suitable function spaces are dened

for the velocity eld vFi , pressure eld pF and the stresses σFij . Dierent to the structure, where

we search for(uSx , u

Sy

), in the uid module we determine three unknowns simultaneously (p, vx, vy).

This aspect is taken into account by dening a mixed function space Mix_d. Subsequently suitable

quantities are derived from these function spaces.

rho_fld = 1.0e-12 # in gram / micrometer ^3

mu_fld = 1.0e-3 # for water

K_fld = 3.0* mu_fld

lam_fld = K_fld - 2.0/3.0* mu_fld # in gram/(s*micrometer)

fluid_mesh_BP = Mesh(fluid_mesh)

fluid_mesh_AP = Mesh(fluid_mesh)

V_fld = VectorFunctionSpace(fluid_mesh_AP , 'CG', 1)

P_fld = FunctionSpace(fluid_mesh_AP ,'CG' ,1)

T_fld = TensorFunctionSpace(fluid_mesh_AP ,'CG' ,1)

Mix_fld = MixedFunctionSpace ([P_fld ,V_fld])

fld = Function(Mix_fld)

fld0 = Function(Mix_fld)

trial_fld = TrialFunction(Mix_fld)

test_fld = TestFunction(Mix_fld)

p_fld , v_fld = split(fld)

60

Page 67: Lehrstuhl für Kontinuumsmechanik und Materialtheorie ... · Eidesstaatliche Erklärung Hiermit versichere ich, dass ich die vorliegende Arbeit selbstständig verfasst und keine anderen

A IMPLEMENTATION

p0_fld , v0_fld = split(fld0)

test_p_fld , test_v_fld = split(test_fld)

v_rel = Function(V_fld)

In the next segment the mesh function rand_d is dened and the boundaries Γfsit and Γd

t are

identied with the gures 2 and 1. We use this mesh functions to declare Dirichlet boundary

conditions for pressure eld pF . The Dirichlet boundary condition for the velocity eld is dened

together with the variational formulation, because it changes in every step of iteration.

rand_fld = MeshFunction("uint", fluid_mesh_AP , D-1)

rand_fld.set_all (0)

fld_rand ().mark(rand_fld ,1)

fsi_rand ().mark(rand_fld ,2)

null = Expression (('0.0',)*D)

druck = Constant (1.0e2) # in gramm / (micro meter and seconds ^2)

bc_fld_p = DirichletBC(Mix_fld.sub (0),druck ,rand_fld ,1)

Next subblock deals with the constitutive relation for a Newtonian uid. A function is set up,

which gets a pressure eld p and a velocity eld v. It calculates Cauchy's stresses for the behavior

of a simple liquid. Because the single parts of the stresses are handled dierently in the variational

formulation, they are declared separately and then merged together. At this point it is possible to

change the constitutive equation for the uid.

def S_p(p):

return as_tensor(-p*delta[k,l] , (k,l) )

def S_l(v):

return as_tensor( lam_fld * v[m].dx(m) * delta[k,l], (k,l))

def S_d(v):

return as_tensor( mu_fld*v[k].dx(l)+mu_fld*v[l].dx(k) , (k,l))

def sigma_fld(p,v):

S_fld = as_tensor( S_p(p)[k,l]+S_l(v)[k,l]+S_d(v)[k,l] , (k,l) )

return S_fld

Now follows the denition of the variational formulation of the uid problem. Because this form

is stated in terms of velocity eld, we only need the solution vector from the last time step k − 1.

In the denition we nd a part for the balance of mass Form_d_mass and another part stands

for the balance of linear momentum Form_d_p. These forms correspond to equations 5.3 and

5.9. Moreover, the Dirichlet boundary condition for the velocity is declared inside this denition

block. The form and the boundary conditions are passed as return values.

def Form_fld(fld0 , w):

N_fld = FacetNormal(fluid_mesh_AP)

61

Page 68: Lehrstuhl für Kontinuumsmechanik und Materialtheorie ... · Eidesstaatliche Erklärung Hiermit versichere ich, dass ich die vorliegende Arbeit selbstständig verfasst und keine anderen

A IMPLEMENTATION

p0_fld , v0_fld = split(fld0)

Form_fld_mass = rho_fld*v_fld[i].dx(i)*test_p_fld*dx

Form_fld_p = 1.0/dt*rho_fld*v_fld[i]* test_v_fld[i]*dx

Form_fld_p += - 1.0/dt*rho_fld*v0_fld[i]* test_v_fld[i]*dx

Form_fld_p += rho_fld*v_fld[i].dx(j)*w[j]* test_v_fld[i] * dx

Form_fld_p += rho_fld*v_fld[i]*w[k].dx(k)*test_v_fld[i] *dx

Form_fld_p += -rho_fld*v_fld[i]*( v_fld[j]-w[j]) * test_v_fld[i].dx(j)*dx

Form_fld_p += p_fld.dx(i)*test_v_fld[i]*dx

Form_fld_p += S_l(v_fld)[i,j]* test_v_fld[i].dx(j)*dx

Form_fld_p += S_d(v_fld)[i,j]* test_v_fld[i].dx(j)*dx

Form_fld_p += rho_fld*v_fld[i]*( v_fld[j] - w[j])*N_fld[j] * test_v_fld[i]*ds

Form_fld_p += -S_l(v_fld)[i,j]* N_fld[j]* test_v_fld[i]*ds(1)

Form_fld_p += -S_d(v_fld)[i,j]* N_fld[j]* test_v_fld[i]*ds(1)

Form_fld_p += -S_l(w)[i,j]* N_fld[j]* test_v_fld[i]*ds(2)

Form_fld_p += -S_d(w)[i,j]* N_fld[j]* test_v_fld[i]*ds(2)

Form = Form_fld_mass + Form_fld_p

bc_fld_v = DirichletBC(Mix_fld.sub (1), w,rand_fld ,2)

bcs_fld = [bc_fld_p ,bc_fld_v]

return Form , bcs_fld

In the sequence some uid specic functions are following. The rst function handles the mesh

movement. It takes the initial conguration ΩF0 and moves each node with the displacement eld

uMi . All nodes together represent then the current domain ΩFt . Likely to calculate_sigma_str a

function calculate_sigma_d is implemented, which transform the uid stresses from Eulerian

representation to Lagrangian:

σFij (χk, t) = σFij(φ−1l (χk, t) , t

). (A.4)

def calculate_sigma_fld(p_fld ,v_fld):

T_fld_AP = TensorFunctionSpace(fluid_mesh_AP , 'CG' ,1)

sigma_fld_AP = project(sigma_fld(p_fld ,v_fld),T_fld_AP)

T_fld_BP = TensorFunctionSpace(fluid_mesh_BP , 'CG', 1)

S_fld_BP = Function(T_fld_BP)

S_fld_BP.vector ()[:] = sigma_fld_AP.vector ().array()

return S_fld_BP

62

Page 69: Lehrstuhl für Kontinuumsmechanik und Materialtheorie ... · Eidesstaatliche Erklärung Hiermit versichere ich, dass ich die vorliegende Arbeit selbstständig verfasst und keine anderen

A IMPLEMENTATION

A small Function ale_to_d closes the uid module. It does the same transformation with the

velocity eld:

vFi (χk, t) = vFi

(φ−1j (χk, t) , t

). (A.5)

def ale_to_fld(v):

v_mesh = Function(V_fld)

v_mesh.vector ()[:]=v.vector ().array()

return v_mesh

Finally a module follows for the solution of the grid oscillation. The rst paragraphs correlate

much to those of structure and uid. Here a ctitious density ρale and a ctitious viscosity a are

dened. Followed by the denitions of function spaces and suitable functions. Compared to the

structure and the uid problems, the grid problem is a linear problem and hence needs no iterative

solution. It is solved directly by dividing the form into a bilinear form a_ale and a linear form

L_ale. Since the forms do not change during the simulation, they are dened globally. The only

function in this module is solve_ale. Herein the velocity eld vSi originating from the structure are

announced as Dirichlet boundary condition. Then the linear equation system is built up with

DOLFIN's function assemble. The Dirichlet values are written into the linear equation system by

the DirichletBC owned function apply. Then the linear equation system

AaleUM = bale

is solved by calling solve and the result is handed over as a return value. This ends the mesh

problem.

# artificial density

rho_ale = 1.0e-12 # kg / m^3

# artificial viscosity

a = 1.0e-3 # Pa / s

ale_mesh=Mesh(fluid_mesh)

V_ale = VectorFunctionSpace(ale_mesh ,'CG' ,1)

P_ale = FunctionSpace(ale_mesh , 'CG' ,1)

v_ale = TrialFunction(V_ale)

w_ale = TestFunction(V_ale)

v_ale_0 = Function(V_ale)

u_ale_0 = Function(V_ale)

Form_ale = rho_ale * v_ale[i]*w_ale[i]*dx

Form_ale += -rho_ale * v_ale_0[i]*w_ale[i]*dx

Form_ale += a / 2 * dt * v_ale[i].dx(j) * w_ale[i].dx(j)*dx

Form_ale += a / 2 * dt * v_ale[j].dx(i) * w_ale[i].dx(j)*dx

a_ale = lhs(Form_ale)

63

Page 70: Lehrstuhl für Kontinuumsmechanik und Materialtheorie ... · Eidesstaatliche Erklärung Hiermit versichere ich, dass ich die vorliegende Arbeit selbstständig verfasst und keine anderen

A IMPLEMENTATION

L_ale = rhs(Form_ale)

def solve_ale(v_ale_0 ,bnd):

bc2=DirichletBC(V_ale , bnd , fsi_rand ())

bc1=DirichletBC(V_ale , null , fld_rand ())

bc_ale = [bc1 ,bc2]

#bc_ale = [bc2]

if bc_ale == None:

raise RuntimeError('Error while passing data from structure to mesh')

A_ale=None

b_ale=None

A_ale = assemble(a_ale , tensor=A_ale)

b_ale = assemble(L_ale , tensor=b_ale)

for condition in bc_ale:

condition.apply(A_ale ,b_ale)

v_ale = Function(V_ale)

u_ale= Function(V_ale)

solve(A_ale ,v_ale.vector (),b_ale)

# therefore the displacement of mesh is

u_ale.vector ()[:]= u_ale_0.vector ().array ()+dt*v_ale.vector ().array ()

return u_ale , v_ale

For the solution of the nonlinear problems the class NonlinearProblem is available as part of DOLFIN.

Mathematically this class calculates a Newton-Raphson approximation with a given variational

formulation. For our purposes we derived the class iterate from NonlinearProblem to enable the facet

mesh function as an additional parameter. Moreover, the class was extended by a solve function.

Within this function one can modify the tolerance values of the linear algebra solver.

class iterate(NonlinearProblem):

def __init__(self , a, L, bc,rand):

NonlinearProblem.__init__(self)

self.L=L

self.a=a

self.bc=bc

self.exter_B = rand

def F(self , b, x):

assemble(self.L, tensor = b, exterior_facet_domains =self.exter_B )

for condition in self.bc: condition.apply(b,x)

def J(self , A, x):

assemble(self.a, tensor = A, exterior_facet_domains = self.exter_B)

for condition in self.bc: condition.apply(A)

def solve(self ,u):

itsolver=NewtonSolver('lu')

itsolver.parameters['absolute_tolerance ']=1E-5

64

Page 71: Lehrstuhl für Kontinuumsmechanik und Materialtheorie ... · Eidesstaatliche Erklärung Hiermit versichere ich, dass ich die vorliegende Arbeit selbstständig verfasst und keine anderen

A IMPLEMENTATION

Fluid Response

Structural Response

Boundary Condition

Mesh Problem

Update ConvergenceYES NO

Figure A.1: Program diagram

itsolver.parameters['relative_tolerance ']=1E-1

itsolver.parameters['maximum_iterations ']=100

itsolver.solve(self ,u.vector ())

return u

With this in mind we come to the programs algorithm. As already shown in section 5.3 we nd an

external time loop and an internal iteration loop. At the beginning of the time loop residuals and

tolerance are dened. Then we iterate in every time step between the structure and the uid until

the unknowns(uSi , v

Fi , p

F)are consistent with the balances of mass and linear momentum. Both

loops can be described with the following diagram. The data is saved in pvd -les, who can then be

observed with e.g. ParaView2.

while t<t_end:

info_blue (80*'-')

info_blue("Time: %f",t)

iter_num = 0

residual = 2.0* tol

# inner iteration loop

for iteration in range(maxiter):

info('Solving Structure Problem ')

L_str = Form_str(u0_str ,u00_str ,traction_fld ,calculate_sigma_fld(p,v))

a_str = derivative(L_str ,u_str ,trial_str)

problem_str = iterate(a_str ,L_str ,bcs_str ,rand_str)

u_str = problem_str.solve(u_str)

2ParaView is an open source software for examination and post processing of FEM results http://paraview.org

65

Page 72: Lehrstuhl für Kontinuumsmechanik und Materialtheorie ... · Eidesstaatliche Erklärung Hiermit versichere ich, dass ich die vorliegende Arbeit selbstständig verfasst und keine anderen

A IMPLEMENTATION

v_str.vector ()[:]= u_str.vector ().array ()/dt-u0_str.vector ().array ()/dt

info('Solving Mesh Problem ')

u_ale , v_ale = solve_ale(v_ale_0 , v_str)

info('Solving Fluid Problem ')

move_mesh(u_ale)

L_fld , bcs_fld = Form_fld(fld0 ,v_ale)

a_fld = derivative(L_fld , fld , trial_fld)

problem_fld = iterate(a_fld , L_fld , bcs_fld , rand_fld)

fld = problem_fld.solve(fld)

p, v = fld.split(deepcopy=True)

v_rel.vector ()[:]=v.vector ().array ()-v_ale.vector ().array ()

info('Checking for Convergence ')

dS.vector ()[:] = u_str.vector ().array() - u_str_prev.vector ().array ()

residual = dS.vector ().array().max()

info_blue('dS_max = %f', residual)

u_str_prev.vector ()[:] =u_str.vector ().array()

iter_num +=1

if residual < tol:

break

if iter_num >=10:

raise RuntimeError , 'Convergence FAILED '

info_green('Convergence achieved ')

info('Saving data for analysis ')

file_u_str << u_str

file_v_str << v_str

file_p_fld << fld.split()[0]

file_v_fld << fld.split()[1]

file_v_rel << v_rel

# proceed to next time step

info('Updating ... ')

#structure update

u00_str.assign(u0_str)

u0_str.assign(u_str)

disp_str_bottom.t = t

# ALE problem update

v_ale_0.assign(v_ale)

u_ale_0.assign(u_ale)

66

Page 73: Lehrstuhl für Kontinuumsmechanik und Materialtheorie ... · Eidesstaatliche Erklärung Hiermit versichere ich, dass ich die vorliegende Arbeit selbstständig verfasst und keine anderen

A IMPLEMENTATION

# Fluid problem update

fld0.assign(fld)

zahler +=1

t+=dt

The problems themselves are solved according to an easy pattern: form denition, symbolic deriva-

tion, Newton-Raphson iteration.

info('Solving Structure Problem ')

L_str = Form_str(u0_str ,u00_str ,traction_fld ,calculate_sigma_fld(p,v))

a_str = derivative(L_str ,u_str ,trial_str)

problem_str = iterate(a_str ,L_str ,bcs_str ,rand_str)

u_str = problem_str.solve(u_str)

67

Page 74: Lehrstuhl für Kontinuumsmechanik und Materialtheorie ... · Eidesstaatliche Erklärung Hiermit versichere ich, dass ich die vorliegende Arbeit selbstständig verfasst und keine anderen

B MATERIAL PARAMETERS

B Material parameters

The cantilever is made from Silicon with the following properties taken from data sheet:

• Density ρS = 2.329 gcm3

• Poisson ratio νS = 0.23

• Shear Modulus µS = 64.1GPa

• Youngs Modulus ES = 147GPa

The material properties for the surrounding uid are3:

• Density ρF = 1000 kgm3

• Viscosity µF = 1mPa · s

• Bulk modulus kF = 2, 08·109Pa

Normalpressure: 1bar = 105Pa

m,s,kg µm,s,g

ρS 2329 kgm3 2.329e− 12 g

µm3

νS 0.23

µS 64.1e9 kgm·s2 64.1e6 g

µm·s2

ES 147e9 kgm·s2 147e6 g

µm·s2

λS 67.2e6 kgm·s2 67.2e3 g

µm·s2

ρF 1000 kgm3 1e− 12 g

µm3

µF 1e− 3 kgm·s 1e− 6 g

µm·skF 2.08e9 kg

m·s2 2.08e6 gµm·s2

A 1e− 6 m 1 µmω 2π · 10e3 1

s 2π · 10e3 1s

Table B.1: Transfer table for computation

3http://physics.info

68