moving interface problems: methods & applications tutorial ... · pdf filemoving interface...

50
Moving Interface Problems—Front Tracking Moving Interface Problems: Methods & Applications Tutorial Lecture II Grétar Tryggvason Worcester Polytechnic Institute Moving Interface Problems and Applications in Fluid Dynamics Singapore National University, 2007

Upload: phungque

Post on 07-Feb-2018

216 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Moving Interface Problems: Methods & Applications Tutorial ... · PDF fileMoving Interface Problems: Methods & Applications Tutorial Lecture II ... Numerical Method. ... equations

Moving Interface Problems—Front Tracking

Moving Interface Problems:Methods & Applications

Tutorial Lecture II

Grétar TryggvasonWorcester Polytechnic Institute

Moving Interface Problems and Applications in Fluid Dynamics

Singapore National University, 2007

Page 2: Moving Interface Problems: Methods & Applications Tutorial ... · PDF fileMoving Interface Problems: Methods & Applications Tutorial Lecture II ... Numerical Method. ... equations

Moving Interface Problems—Front Tracking

Lecture 2:

Motivation

The One Fluid Formulation

Solving the Navier-Stokes Equations

Methods for the advection of a marker functionVolume of Fluid (VOF)Level SetsOthers methods

Outline

Page 3: Moving Interface Problems: Methods & Applications Tutorial ... · PDF fileMoving Interface Problems: Methods & Applications Tutorial Lecture II ... Numerical Method. ... equations

Moving Interface Problems—Front Tracking

Front Tracking

S.O. Unverdi, G. Tryggvason. A Front TrackingMethod for Viscous Incompressible Flows. J.Comput. Phys, 100 (1992), 25-37.

S.O. Unverdi and G. Tryggvason. Computations ofMulti-Fluid Flows. Physica D, 60 (1992), 70-83.

ReviewG. Tryggvason, B. Bunner, A. Esmaeeli, D. Juric, N.Al-Rawahi, W. Tauber, J. Han, S. Nas, and Y.-J. Jan.A Front Tracking Method for the Computations ofMultiphase Flow. J. Comput. Physics 169 (2001),708–759

Numerical Method

Page 4: Moving Interface Problems: Methods & Applications Tutorial ... · PDF fileMoving Interface Problems: Methods & Applications Tutorial Lecture II ... Numerical Method. ... equations

Moving Interface Problems—Front Tracking

The conservationequations aresolved on a regularfixed grid and thefront is tracked byconnected markerpoints

Numerical Method

Page 5: Moving Interface Problems: Methods & Applications Tutorial ... · PDF fileMoving Interface Problems: Methods & Applications Tutorial Lecture II ... Numerical Method. ... equations

Moving Interface Problems—Front Tracking

The structureof the front

Page 6: Moving Interface Problems: Methods & Applications Tutorial ... · PDF fileMoving Interface Problems: Methods & Applications Tutorial Lecture II ... Numerical Method. ... equations

Moving Interface Problems—Front TrackingNumerical Method

Data structure for thesurface elements. Theelements carryessentially all informationabout the structure of thefront.

The points only“know” theirlocations

Page 7: Moving Interface Problems: Methods & Applications Tutorial ... · PDF fileMoving Interface Problems: Methods & Applications Tutorial Lecture II ... Numerical Method. ... equations

Moving Interface Problems—Front TrackingNumerical Method

The right data structure makes it easier to work with theinterface. In 2D it is a matter of convenience, in 3D it makesthe difference between an algorithm that works and one thatdoes not!

add and deletefront objects,change thetopology,handle multipleinterfaces

Page 8: Moving Interface Problems: Methods & Applications Tutorial ... · PDF fileMoving Interface Problems: Methods & Applications Tutorial Lecture II ... Numerical Method. ... equations

Moving Interface Problems—Front TrackingNumerical Method

Working in barycentriccoordinates simplifiesthe interpolationsneeded for theelements

!

p(u,v,w) =1

21" u( ) "up5 + 1" v( )p3 + 1" w( )p2( )

+1

21" v( ) 1" u( )p3 " vp6 + 1" w( )p1( )

+1

21" w( ) 1" u( )p2 + 1" v( )p1 " wp4( )

!

u + v + w =1

Quadratic interpolation

Page 9: Moving Interface Problems: Methods & Applications Tutorial ... · PDF fileMoving Interface Problems: Methods & Applications Tutorial Lecture II ... Numerical Method. ... equations

Moving Interface Problems—Front TrackingNumerical Method

In two-dimensions adding or deleting a point isa relatively simple operation. We generally splitan element to add point and collapse anelement to delete a point

Page 10: Moving Interface Problems: Methods & Applications Tutorial ... · PDF fileMoving Interface Problems: Methods & Applications Tutorial Lecture II ... Numerical Method. ... equations

Moving Interface Problems—Front Tracking

e1 e2new1new2

As the interface stretchesand deforms, some partsare depleted of points whileother parts become crowdedby points. To maintain anearly uniform resolution ofthe interface it is necessaryto use dynamic regridding.

Regridding can be achievedby1. Adding elements2. Deleting elements

In 3D it is also oftenbeneficial to3. Reshape elements

Addingelements

Deletingelements

e1 e2

e5e6

e7

e3 e4e3 e4

Reshapingelements

Dynamic Regridding

Page 11: Moving Interface Problems: Methods & Applications Tutorial ... · PDF fileMoving Interface Problems: Methods & Applications Tutorial Lecture II ... Numerical Method. ... equations

Moving Interface Problems—Front Tracking

Dynamicregridding ofa buoyantbubbleresolved on a16 by 16 by16 grid

Dynamic Regridding

Page 12: Moving Interface Problems: Methods & Applications Tutorial ... · PDF fileMoving Interface Problems: Methods & Applications Tutorial Lecture II ... Numerical Method. ... equations

Moving Interface Problems—Front Tracking

Transferringinformationbetween the

fixed grid andthe front

Page 13: Moving Interface Problems: Methods & Applications Tutorial ... · PDF fileMoving Interface Problems: Methods & Applications Tutorial Lecture II ... Numerical Method. ... equations

Moving Interface Problems—Front Tracking

Fluid 2

Fluid 1

Finite Volume Grid

Tracked Front

Tangent

Normal

Numerical Method

Page 14: Moving Interface Problems: Methods & Applications Tutorial ... · PDF fileMoving Interface Problems: Methods & Applications Tutorial Lecture II ... Numerical Method. ... equations

Moving Interface Problems—Front Tracking

!

"l = "ijk# wijk

The velocities areinterpolated fromthe grid:

The front values aredistributed onto thegrid by

!ijk = !l" wijk

#slh3

On the front: per lengthOn the grid: per volume

the weights wijk can beselected in severaldifferent ways

Interpolating from grid

Page 15: Moving Interface Problems: Methods & Applications Tutorial ... · PDF fileMoving Interface Problems: Methods & Applications Tutorial Lecture II ... Numerical Method. ... equations

Moving Interface Problems—Front Tracking

d(r) =

(r ! ih)/ h

h ! (r ! ih))/ h

0

0 < r < h

!h < r < 0

r " h

#

$ %

& %

wijk (xp ) = d(xp ! ih) d(yp ! jh) d(zp ! kh)

Areaweighting

!P = A1! i, j + A2!i+1, j + A3!i+1, j+1 + A4! i, j+1

Bilinear interpolationA3

A2

A4

A1

1 2

34

Interpolating from grid

Page 16: Moving Interface Problems: Methods & Applications Tutorial ... · PDF fileMoving Interface Problems: Methods & Applications Tutorial Lecture II ... Numerical Method. ... equations

Moving Interface Problems—Front Tracking

d(r) =(1/ 4h)(1 + cos(!r / 2h)) r < 2h

0 r " 2h

# $ %

wijk (xp ) = d(xp ! ih) d(yp ! jh) d(zp ! kh)

d(r) =

d1(r), | r |!1,

1/ 2 " d1(2" | r |), 1 <| r |< 2,

0, | r |# 2,

$

% &

' &

Peskin’s weighting

Larger support:4 points in eachdirection

d1(r) =3 ! 2 | r | + 1 + 4 | r | !4r2

8

where

Interpolating from grid

or

Page 17: Moving Interface Problems: Methods & Applications Tutorial ... · PDF fileMoving Interface Problems: Methods & Applications Tutorial Lecture II ... Numerical Method. ... equations

Moving Interface Problems—Front Tracking

Several other interpolation functions are available.

For many problems, particularly for modest surfacetension and material ratios, the exact form of thesmoothing only has minor impact on its quality. For stiffproblems, smoother is better.

Using the appropriate data structure greatly simplifies theprogramming and in 3D can determine the differencebetween success and failure.

In an actual code, it is important to always loop over thefront and determine the fixed grid points from the frontlocation, not the other way around.

Numerical Method

Page 18: Moving Interface Problems: Methods & Applications Tutorial ... · PDF fileMoving Interface Problems: Methods & Applications Tutorial Lecture II ... Numerical Method. ... equations

Moving Interface Problems—Front Tracking

Constructingthe marker

function

Page 19: Moving Interface Problems: Methods & Applications Tutorial ... · PDF fileMoving Interface Problems: Methods & Applications Tutorial Lecture II ... Numerical Method. ... equations

Moving Interface Problems—Front Tracking

Since the fluid interface is explicitly tracked, theadvection equation for the density and othermaterial properties is not solved directly.Instead, the fields are constructed from the newlocation of the interface.

The simples method is tosimply set the propertiesdirectly from the locationof the front. This causesproblem for interfacesthat are close together.

Distribute the densitygradients on a grid andintegrate the gradients

Updating the Marker Function

Page 20: Moving Interface Problems: Methods & Applications Tutorial ... · PDF fileMoving Interface Problems: Methods & Applications Tutorial Lecture II ... Numerical Method. ... equations

Moving Interface Problems—Front Tracking

Construction of the density from the gradient

!

" i, j = " i#1, j + $x %" %x( )i+1/ 2, j

!

" i, j =1

4" i+1, j + " i#1, j + " i, j#1 + " i, j+1 +(

$x %" %x( )i+1/ 2, j

#$x %" %x( )i#1/ 2, j

+ $y %" %y( )i, j+1/ 2

#$y %" %y( )i, j#1/ 2)

Updating the Marker Function

Page 21: Moving Interface Problems: Methods & Applications Tutorial ... · PDF fileMoving Interface Problems: Methods & Applications Tutorial Lecture II ... Numerical Method. ... equations

Moving Interface Problems—Front TrackingUpdating the Marker Function

To reconstruct the markerfunction from the interface itis generally sufficient tolimit the iteration to anarrow band around theinterface. The grid points inthe band are identified bythe non-zero value of thegradient and are addressedby setting up a linked list.

Page 22: Moving Interface Problems: Methods & Applications Tutorial ... · PDF fileMoving Interface Problems: Methods & Applications Tutorial Lecture II ... Numerical Method. ... equations

Moving Interface Problems—Front TrackingUpdating the Marker Function

Page 23: Moving Interface Problems: Methods & Applications Tutorial ... · PDF fileMoving Interface Problems: Methods & Applications Tutorial Lecture II ... Numerical Method. ... equations

Moving Interface Problems—Front TrackingUpdating the Marker Function

The amount of marker ineach cell can also beconstructed from thelocation of the interface.For a general interfacelocation it can be difficult todo so locally, but if theoverall topology of theinterface is known (closedor periodic), then settingthe value of the marker inall cells below the interfaceresults in the correct value. Determining the crossing of front

elements with grid lines is easy in2D but complex in 3D!

Page 24: Moving Interface Problems: Methods & Applications Tutorial ... · PDF fileMoving Interface Problems: Methods & Applications Tutorial Lecture II ... Numerical Method. ... equations

Moving Interface Problems—Front Tracking

Solution of thepressureequation

Page 25: Moving Interface Problems: Methods & Applications Tutorial ... · PDF fileMoving Interface Problems: Methods & Applications Tutorial Lecture II ... Numerical Method. ... equations

Moving Interface Problems—Front Tracking

The solution of the pressure equation is the mostexpensive part of the simulations.

The solution of the pressure equation can be difficult whenthe density ratio is high.

Multigrid methods, in particular, can diverge but otheriterative methods seem (BICGSTAB, for example)seem todo well

SOR will always converge (if the density is well behaved)but the cost is very high.

For many problems, the influence of using smaller densityratios is small

Pressure Solution

Page 26: Moving Interface Problems: Methods & Applications Tutorial ... · PDF fileMoving Interface Problems: Methods & Applications Tutorial Lecture II ... Numerical Method. ... equations

Moving Interface Problems—Front TrackingPressure Solution

Page 27: Moving Interface Problems: Methods & Applications Tutorial ... · PDF fileMoving Interface Problems: Methods & Applications Tutorial Lecture II ... Numerical Method. ... equations

Moving Interface Problems—Front Tracking

ComputingSurfaceTension

Page 28: Moving Interface Problems: Methods & Applications Tutorial ... · PDF fileMoving Interface Problems: Methods & Applications Tutorial Lecture II ... Numerical Method. ... equations

Moving Interface Problems—Front Tracking

For the solution of the Navier-Stokes equations,we need the net force on each front element:

!F = "#nds$S%

= "&s

&sds

$S%

= " s2' s

1( )

!n ="s

"s

!F = " #ndA!A$

= " (n % &) % ndA!A$

= " s % ndsS$

-s2

s1

sn

m=s x n

Surface Tension

Page 29: Moving Interface Problems: Methods & Applications Tutorial ... · PDF fileMoving Interface Problems: Methods & Applications Tutorial Lecture II ... Numerical Method. ... equations

Moving Interface Problems—Front Tracking

The net force can be computed at either the elementcenters or the points.

2D

3D

!

ne

="x

12#"x

13

"x12#"x

13

!

"f1

=1

2n#$x

23

For point based scheme:

Surface Tension

Page 30: Moving Interface Problems: Methods & Applications Tutorial ... · PDF fileMoving Interface Problems: Methods & Applications Tutorial Lecture II ... Numerical Method. ... equations

Moving Interface Problems—Front Tracking

Computing Surface Tension in 2D—Accuracy test

40 points 80 points

Location of40 points

Surface Tension

Page 31: Moving Interface Problems: Methods & Applications Tutorial ... · PDF fileMoving Interface Problems: Methods & Applications Tutorial Lecture II ... Numerical Method. ... equations

Moving Interface Problems—Front Tracking

Parasitic Currents

The regular grid induces asmall anisotropy. Thesecurrents are typicallysmall in immersedboundary methods.

Stationary drop

Weak parasitic currents

Surface Tension

Page 32: Moving Interface Problems: Methods & Applications Tutorial ... · PDF fileMoving Interface Problems: Methods & Applications Tutorial Lecture II ... Numerical Method. ... equations

Moving Interface Problems—Front Tracking

Surface tension method of Shin and Juric (2005)

!

f i, j = "#( )i, j$Ii, j

!

"Ii, j # f i, j = $%( )i, j"Ii, j # "Ii, j

!

"#( )i, j

=$Ii, j % f i, j

$Ii, j % $Ii, j

To find the curvature we dot the surface tension withthe force found earlier

Or, solving for the curvature:

Seungwon Shin, S.I. Abdel-Khalik, Virginie Daru and Damir Juric: Accuraterepresentation of surface tension using the level contour reconstruction method.Journal of Computational Physics. Volume 203, 493-516, 2005.

Surface Tension

Page 33: Moving Interface Problems: Methods & Applications Tutorial ... · PDF fileMoving Interface Problems: Methods & Applications Tutorial Lecture II ... Numerical Method. ... equations

Moving Interface Problems—Front Tracking

Surface tension method of Shin and Juric (2005)

!

Ca =µU

max

"

!

La ="D

µ2

Curvature New Old

Surface Tension

Page 34: Moving Interface Problems: Methods & Applications Tutorial ... · PDF fileMoving Interface Problems: Methods & Applications Tutorial Lecture II ... Numerical Method. ... equations

Moving Interface Problems—Front Tracking

It should be possible to extend the Shin and Juric methodto any weights such that the curvature at grid pointsaround the front we have

!

"#( )i, j

=wi, j "#$s( )l

%l

wi, j$sl

l%

The surface tension is then found as before

!

f i, j = "#( )i, j$Ii, j

Surface Tension

Page 35: Moving Interface Problems: Methods & Applications Tutorial ... · PDF fileMoving Interface Problems: Methods & Applications Tutorial Lecture II ... Numerical Method. ... equations

Moving Interface Problems—Front Tracking

Accuracy tests

Page 36: Moving Interface Problems: Methods & Applications Tutorial ... · PDF fileMoving Interface Problems: Methods & Applications Tutorial Lecture II ... Numerical Method. ... equations

Moving Interface Problems—Front Tracking

• Comparison with analytical results: linear inviscidtheories for oscillating drops, Kelvin-Helmholtzinstability, and surface waves; Sangani’s results forregular arrays of drops in Stokes flow solutions forparallel flows

• Comparison with other computations such as the steady state shapes of drops and bubbles computed by Leal et al

• Grid refinement studies and comparison between different implementation of the method

• Comparison with experimental results (Law et al, for example)

Validations

Experiments

Computations

Page 37: Moving Interface Problems: Methods & Applications Tutorial ... · PDF fileMoving Interface Problems: Methods & Applications Tutorial Lecture II ... Numerical Method. ... equations

Moving Interface Problems—Front TrackingAdvection

!

u(x,y) = cos x " sin y

v(x,y) = #sin x " cos y

dt=0.025

Velocity field given:

π× π domain, resolvedby 32 × 32 grid points.Velocity interpolated byarea weightingSecond order predictor-corrector timeintegration

Page 38: Moving Interface Problems: Methods & Applications Tutorial ... · PDF fileMoving Interface Problems: Methods & Applications Tutorial Lecture II ... Numerical Method. ... equations

Moving Interface Problems—Front Tracking

High Viscosity

Low Viscosity

Exact64 points32 Points16 points

Validations

Page 39: Moving Interface Problems: Methods & Applications Tutorial ... · PDF fileMoving Interface Problems: Methods & Applications Tutorial Lecture II ... Numerical Method. ... equations

Moving Interface Problems—Front Tracking

Growth of KH Instability

Theoretical and computed growthrate

s = !ik"1U1 + "2U2"1 + "2

±k2"1"2 U1 !U2( )2

"1 + "2( )2!

T k3

"1 + "2

A = Aoes t+ i kx

We =!2"U

2

Tk

!U =U2 "U1 r = !1 !2

We <1 + r

We = 3

21+ r( )

For perturbations of the form:

The growth rate is given by

Defining

it can be shown that the perturbation isunstable if

and for given physical parameters, thewavelengthdetermined by

is the fastest growing one

Validations

Page 40: Moving Interface Problems: Methods & Applications Tutorial ... · PDF fileMoving Interface Problems: Methods & Applications Tutorial Lecture II ... Numerical Method. ... equations

Moving Interface Problems—Front Tracking

Oscillations ofan axisymmetricdrop.Comparisonwith theoreticalsolutions foroscillationfrequency andviscous decay

Validations

Page 41: Moving Interface Problems: Methods & Applications Tutorial ... · PDF fileMoving Interface Problems: Methods & Applications Tutorial Lecture II ... Numerical Method. ... equations

Moving Interface Problems—Front TrackingValidations

Grid refinement

Page 42: Moving Interface Problems: Methods & Applications Tutorial ... · PDF fileMoving Interface Problems: Methods & Applications Tutorial Lecture II ... Numerical Method. ... equations

Moving Interface Problems—Front Tracking

Otherconsiderations

Page 43: Moving Interface Problems: Methods & Applications Tutorial ... · PDF fileMoving Interface Problems: Methods & Applications Tutorial Lecture II ... Numerical Method. ... equations

Moving Interface Problems—Front Tracking

Although methods based on the one fluid formulationhave been used successfully for many problems,several challenges remain. These are slowly beingeliminated

• High Reynolds numbers: high order advectionmethods and non-conservative form of the advectionterms

• Continuity of the viscous stresses: interpolation usingthe harmonic mean

• Solution of the pressure equation/slow convergence athigh density ratios: More advanced fast solver

• Parasitic currents: increased smoothing helps—orseparate computations of the curvature and the normal

Numerical Method

Page 44: Moving Interface Problems: Methods & Applications Tutorial ... · PDF fileMoving Interface Problems: Methods & Applications Tutorial Lecture II ... Numerical Method. ... equations

Moving Interface Problems—Front TrackingParallelization

The method has been implemented in a fully parallelcode. The fluid equations are solved by a simple domaindecomposition. For the front, two strategies have beenused. In one the front is distributed to the differentprocessors using a master-slave technique. In the other,the front is processed using a separate processor.

Page 45: Moving Interface Problems: Methods & Applications Tutorial ... · PDF fileMoving Interface Problems: Methods & Applications Tutorial Lecture II ... Numerical Method. ... equations

Moving Interface Problems—Front Tracking

G. Agresar, J.J. Linderman, G. Tryggvason, and K.G. Powell. An Adaptive,Cartesian, Front-Tracking Method for the Motion, Deformation and Adhesionof Circulating Cells. J. Comput. Phys. 1998

Use patchesof finer gridsin regions ofhigh shearand aroundthe front.The patchesare moved asneeded.

Adaptive Mesh Refinement

Page 46: Moving Interface Problems: Methods & Applications Tutorial ... · PDF fileMoving Interface Problems: Methods & Applications Tutorial Lecture II ... Numerical Method. ... equations

Moving Interface Problems—Front Tracking

Changing theinterface

topology for 3Dflow

Page 47: Moving Interface Problems: Methods & Applications Tutorial ... · PDF fileMoving Interface Problems: Methods & Applications Tutorial Lecture II ... Numerical Method. ... equations

Moving Interface Problems—Front Tracking

Merge the corner points of close elementsPair up the corner points of close elements and move both points to the averagelocation of the point pairSet up a temporary linked where one point of a point pair (the one with the higherindex) points to the other point. The pointer for all other points is zero.Loop over elements and re-link those corner points that are dual points.Remove double elementsUsing the linked list to elements that should be merged, identify elements with thesame corner pointsDelete those elementsRemove points without an elementLoop over elements and set a flag for those points that the elements areconnected toLoop over the points and delete points whose flag has not been set.

Topology changes due to interface rupture

Page 48: Moving Interface Problems: Methods & Applications Tutorial ... · PDF fileMoving Interface Problems: Methods & Applications Tutorial Lecture II ... Numerical Method. ... equations

Moving Interface Problems—Front Tracking

Two examples of a simulation of topologychanges on a relatively coarse grid. Pinchingof a thin filament above and the merging of athin film to the right.

Topology changes due to interface rupture

Page 49: Moving Interface Problems: Methods & Applications Tutorial ... · PDF fileMoving Interface Problems: Methods & Applications Tutorial Lecture II ... Numerical Method. ... equations

Moving Interface Problems—Front TrackingTopology changes due to interface rupture

The accurate modeling of the rupture of thin films andthe pinching of thin threads can be critical for manymultiphase flow simulations. Explicit tracking of a theinterface allows the incorporation of subgrid models forthe draining of the films and non-continuum effects, butthe difficulties of incorporating topology changes havegenerally been considered one of the major drawback offront tracking methods. A recently developed methodovercomes this limitation. Simulations of a head-oncollision is shown below and an off-axis collision isshown to the right.

Simulationsby S.Mortazaviand G.Tryggvason

Page 50: Moving Interface Problems: Methods & Applications Tutorial ... · PDF fileMoving Interface Problems: Methods & Applications Tutorial Lecture II ... Numerical Method. ... equations

Moving Interface Problems—Front Tracking

The front tracking method described here has the rightcombination of simplicity and accuracy to allow simulationof fairly complex multiphase flow problems.

The control over topology changes provides the user withthe ability to either include or exclude such changes.

Generally, explicit tracking provides more accurateresults for the same resolution than marker functionmethods, but at the cost of slightly more complexity.

The presence of separate computational elements totrack the front allows for many extensions andimprovements

Summary