9
1 Computational Fluid Dynamics Methods to Track Moving Fluid Interfaces Grétar Tryggvason Spring 2011 http://www.nd.edu/~gtryggva/CFD-Course/ Computational Fluid Dynamics Motivation Governing Equations The One-FluidApproach Numerical approach Advecting the Marker Function VOF; LS; FT; Other; Tests Surface Tension Outline 2 Computational Fluid Dynamics Motivation and Goals School of fish Splash Microstructure Cavitation Atomization Bubbly Flow 3 Computational Fluid Dynamics Example: The two-fluid model! !t " p # p + $% " p # p u p ( ) = ˙ m p ! !t " p # p u p ( ) + $% " p # p u p u p ( ) = &" p $p p +$% " p μ p D p ( ) + " p # p g + $% " p # p < uu > ( ) + F int interfacial forces Reynolds stresses The goal is to simulate accurately the smallest continuum scales for multiphase systems that are sufficiently large so that meaningful averages can be obtained and the results used to help generate insight and closure models for engineering tools Equations for the average motion of each constituent Motivation and Goals 4 Computational Fluid Dynamics BC: Birkhoff and boundary integral methods for the Rayleigh-Taylor Instability 65Harlow and colleagues at Los Alamos: The MAC method 75Boundary integral methods for Stokes flow and potential flow 85Alternative approaches (body fitted, unstructured, etc.) 95Beginning of DNS of multiphase flow. Return of the one-fluidapproach and development of other techniques CFD of Multiphase Flows—one slide history From: B. Daly (1969) Numerical Method 5 Computational Fluid Dynamics Governing Equations 6

Governing Equations - University of Notre Damegtryggva/CFD-Course/2011-Lecture-28.pdf · Governing Equations!! The “One-Fluid” Approach!! Numerical approach!! Advecting the Marker

Embed Size (px)

Citation preview

Page 1: Governing Equations - University of Notre Damegtryggva/CFD-Course/2011-Lecture-28.pdf · Governing Equations!! The “One-Fluid” Approach!! Numerical approach!! Advecting the Marker

1

Computational Fluid Dynamics!

Methods to Track Moving Fluid

Interfaces!

Grétar Tryggvason!Spring 2011!

http://www.nd.edu/~gtryggva/CFD-Course/!Computational Fluid Dynamics!

Motivation!!Governing Equations!!The “One-Fluid” Approach!!Numerical approach!!Advecting the Marker Function!!VOF; LS; FT; Other; Tests!!Surface Tension!

Outline!2!

Computational Fluid Dynamics!Motivation and Goals!

School of fish!Splash!

Microstructure!Cavitation!

Atomization!

Bubbly Flow!

3! Computational Fluid Dynamics!

Example: The “two-fluid model”

!!t"p#p + $ % "p#pup( ) = ˙ m p

!!t

"p#pup( ) + $ % "p#pupup( ) = &"p$pp

+$ % "pµpDp( ) + "p#pg + $ % "p#p < uu >( ) + Fint

interfacial forces

Reynolds stresses

The goal is to simulate accurately the smallest continuum scales for multiphase systems that are sufficiently large so that meaningful averages can be obtained and the results used to help generate insight and closure models for engineering tools

Equations for the average motion of each constituent

Motivation and Goals!4!

Computational Fluid Dynamics!

BC: Birkhoff and boundary integral methods !for the Rayleigh-Taylor Instability!!65’ Harlow and colleagues at Los Alamos: !The MAC method!!75’ Boundary integral methods for Stokes flow and potential flow !!85’ Alternative approaches (body fitted, unstructured, etc.)!!95’ Beginning of DNS of multiphase flow. Return of the “one-fluid” approach and development of other techniques!

CFD of Multiphase Flows—one slide history!

From: B. Daly (1969)!

Numerical Method!5! Computational Fluid Dynamics!

Governing Equations

6!

Page 2: Governing Equations - University of Notre Damegtryggva/CFD-Course/2011-Lecture-28.pdf · Governing Equations!! The “One-Fluid” Approach!! Numerical approach!! Advecting the Marker

2

Computational Fluid Dynamics!

Incompressible flows:

Navier-Stokes equations (conservation of momentum)

D!Dt

= 0

D!Dt

+ !"#u = 0

! "u = 0

! "u"t

+ !u#u = $#p + ! fb + # % µ #u + #Tu( )

!"u!t

+ # $ "uu = " f + # $T

!"!t

+ # $ ("u) = 0

Conservation of mass :

Governing Equations!7! Computational Fluid Dynamics!

The conservation equations for mass and momentum apply to any flow situation, including flows of multiple immiscible fluids. Each fluid generally has properties that are different from the other constituents and the location of each fluid must therefore be tracked. We usually also have additional physics that must be accounted for at the interface, such as surface tension. The “regular” conservation equations can be extended to handle these situations by using generalized functions

Sharply stratified flows

Governing Equations!8!

Computational Fluid Dynamics!

The “One-Fluid” approach!

9! Computational Fluid Dynamics!

H (x, y,t) = ! (x " x ')! (y " y ')da 'A(t )#

!H = ![" (x # x ')" ( y # y ')]da 'A$

= # ! '[" (x # x ')" ( y # y ')]da 'A$

= # " (x # x ')" ( y # y ')S!$ nds '

= # " (x # x ')" ( y # y ')S$ nds '

= # " (s)" (n)S$ nds '

= #" (n)n

A!

S!

!H!t

+u "#H = 0

H=1! H=0!

!(x " x')!(y " y') = !(s)!(n)Using:!

n s

x

y

10!

Governing Equations!

Computational Fluid Dynamics!

The conservation equations are solved on a regular fixed grid and the front is tracked by connected marker points. !The “one fluid” formulation of the conservation equations is the starting point for several numerical methods, including MAC, VOF, level sets, and front tracking.!

! "u"t

+ !# $uu = %#p + f + # $ µ #u + #Tu( ) + &F' (n) x % x f( )da

! "u = 0

D!Dt

= 0; DµDt

= 0

Conservation of Momentum!

Conservation of Mass!

Equation of State:!

Singular interface term!

Incompressible flow!

Oscillating drop: pressure!

Constant properties!

11!

Governing Equations!Computational Fluid Dynamics!

The “one-fluid” formulation implicitly contains the proper interface jump conditions. Integrating each term across a small control volume centered at the interface:!

! DuDt

dv"V# = $ %pdv

"V# + fdv"V# + % & µ %u + %Tu( )dv"V# + '( n" n( )dv

"V#=0! =0!

p[ ]n

µ !u + !Tu( )[ ]n

!" n

Jump Condition:!

!p + µ "u + "Tu( )[ ]n = !#$n

12!

Governing Equations!

Page 3: Governing Equations - University of Notre Damegtryggva/CFD-Course/2011-Lecture-28.pdf · Governing Equations!! The “One-Fluid” Approach!! Numerical approach!! Advecting the Marker

3

Computational Fluid Dynamics!

u = H1u1 + H2u2P = H1p1 + H2p2! = H1!1 + H2!2

Write:

Substitute into the momentum equation

H1 ………( ) + H2 ………( ) + ! x f( ) ………( ) = 0

Interface conditions

Momentum equation in phase 2

Momentum equation in phase 1

=0 =0 =0

We can also show that the “one-fluid” formulation contains the equations written separately for each fluid and the jump conditions:

Governing Equations!13! Computational Fluid Dynamics!

Numerical Solutions

14!

Computational Fluid Dynamics!

Work with the finite volume approximation

u = 1V

udVV!

Dc =

1V

! "µ !hu+!hTu( )dV

V# =

1V

µ !hu+!hTu( )nds

S!#

Ac =

1V

! " uu( )dVV# =

1V

u u "n( )dsS!#

!!t

"udv# + "u(u $n)ds!# =

" f dv# + µ %u +%Tu( )nds!# + &' n( n( )dvV#

Discretize each term

Discretization in time 15! Computational Fluid Dynamics!

!h "ui , jn +1 = 0

Discretization in time

ui, jn+1 !ui, j

n

"t= !A i, j

n ! 1#n ($h p +Di, j

n + f%n ) + fb

n

Summary of discrete vector equations

No explicit equation for the pressure!

Evolution of the velocity—first order explicit in time:

Constraint on velocity

u = 1V

udVV!

Dc = 1V

! " µ !hu +!hTu( )dV

V#

= 1V

µ !hu +!hTu( )nds

S#

A c = 1V

! " uu( )dVV# = 1

Vu u "n( )ds

S#

16!

Computational Fluid Dynamics!

ui, jn+1 !ui, j

tmp

"t= ! 1

#n $h pi, j

ui, jtmp !ui, j

n

"t= !A i, j

n + fbn + 1

#n Di, jn + f$

n( )The momentum equation is solved in two steps

and Projection Method

To derive an equation for the pressure we take the divergence of the second equation and use . The result is:

!h "ui, jn+1 = !h "ui, j

tmp #$t !h "1%n !h pi, j

&

' (

)

* +

0

!h "1#n !h pi, j

$

% &

'

( ) = 1

*t!h "ui, j

tmp

!h "ui , jn +1 = 0

Discretization in time 17! Computational Fluid Dynamics!

1. Find a temporary velocity using the advection and the diffusion terms only:

2. Find the pressure needed to make the velocity field incompressible

3. Correct the velocity by adding the pressure gradient:

ui, jn+1 = ui, j

tmp ! "t#n $h pi, j

!h "1#n !h pi, j

$

% &

'

( ) = 1

*t!h "ui, j

tmp

ui, jtmp = ui, j

n + !t "A i, jn + fb

n + 1#n Di, j

n + f$n( )%

& '

(

) *

4. Update the marker function to find new density and viscosity

Discretization in time 18!

Page 4: Governing Equations - University of Notre Damegtryggva/CFD-Course/2011-Lecture-28.pdf · Governing Equations!! The “One-Fluid” Approach!! Numerical approach!! Advecting the Marker

4

Computational Fluid Dynamics!

Advecting the marker function!

19! Computational Fluid Dynamics!

������

!H!t

+ u " #H = 0

Identify each fluid by a marker function H

The marker moves with the fluid and is updated by integrating the following advection equation in time

H =1 in fluid10 Otherwise! " #

Updating H—in spite of its apparent simplicity—is one of the hard problems in CFD!

Governing Equations!20!

Computational Fluid Dynamics!

The sharp marker function H can be approximated in several different ways for computational purposes. Below we show a smoothed marker function, I, the volume of fluid approximation, C, and a level set representation, Φ. !

Advecting the Marker Function 21! Computational Fluid Dynamics!

������

In 1D, using upwind and LW.!The solution quickly deteriorates.!Modern advection methods help, but not completely.!

Advecting the Marker Function 22!

Computational Fluid Dynamics!

Volume of Fluid!

Advecting the Marker Function 23! Computational Fluid Dynamics!

������

Upwind

To advect a discontinuous marker function, first consider 1D advection. Using simple upwind leads to excessive diffusion due to averaging the function over each cell, before finding the fluxes!

Advecting the Marker Function 24!

Page 5: Governing Equations - University of Notre Damegtryggva/CFD-Course/2011-Lecture-28.pdf · Governing Equations!! The “One-Fluid” Approach!! Numerical approach!! Advecting the Marker

5

Computational Fluid Dynamics!

������

One-dimensional Volume-Of-Fluid!

Since the marker function only takes on two values, 0 and 1, the advection can be made much more accurate by “reconstructing” the function in each cell before finding the fluxes, integrated over time:!

Advecting the Marker Function 25! Computational Fluid Dynamics!

������

While VOF works extremely well in one-dimension, there are considerable difficulties extending the approach to higher dimensions. The basic problem is the “reconstruction” of the interface in each cell, given the volume fraction in neighboring cells. !!In the SLIC method the interface was taken to be perpendicular to the advection direction.!!

In the Hirt/Nichols method the interface was taken to be parallel to one axis. !!

In PLIC the interface is a line with arbitrary orientation.!!Once the interface has been reconstructed, the marker function is advected by geometric considerations!

26!

Computational Fluid Dynamics!

������

Original!SLIC!

PLIC!Hirt/Nichols VOF!

27! Computational Fluid Dynamics!

Level Set Methods!

28!

Computational Fluid Dynamics!

Identify the interface as a “level-set” of a smooth function!

Advect the level set function by!

use!

to get!

29! Computational Fluid Dynamics!

The level set function can be arbitrarily smooth. To identify each fluid it is necessary to construct a marker function with a narrow transition zone!

!

I !( )

The marker function can be generated by (for example):!

The delta function is generated as the derivative of the marker function !

30!

Page 6: Governing Equations - University of Notre Damegtryggva/CFD-Course/2011-Lecture-28.pdf · Governing Equations!! The “One-Fluid” Approach!! Numerical approach!! Advecting the Marker

6

Computational Fluid Dynamics!

������

The level set function for two circles, as a distance function!

31! Computational Fluid Dynamics!

To keep the interface shape the same, it is necessary to “reinitialize” the level set function. This is usually done by making it a distance function.!

At each time step, solve:!

For most applications, the shape of the level set functions must remain the same close to the interface!

32!

Computational Fluid Dynamics!

Front-Tracking Methods!

33! Computational Fluid Dynamics!

The method has been used to simulate many problems and extensively tested and validated.!

See also Tryggvason et al. (2002) for details, tests and applications!

Tracked front to advect the fluid interface and find surface tension!

Fixed grid used for the solution of the Navier-Stokes equations. Relatively standard explicit finite volume fluid solver!

Front Tracking (Unverdi & Tryggvason, 1992) !

34!

Numerical Method!

Computational Fluid Dynamics!

!l = !ijk" wijk

The velocities are interpolated from the grid:!

The front values are distributed onto the grid by!

!ijk = !l" wijk#slh3

On the front: per length!On the grid: per volume!

the weights wijk can be selected in several different ways!

Interpolating from grid!35!

Tracked Front!

Finite Difference Grid!

Computational Fluid Dynamics!Numerical Method!

36!

Page 7: Governing Equations - University of Notre Damegtryggva/CFD-Course/2011-Lecture-28.pdf · Governing Equations!! The “One-Fluid” Approach!! Numerical approach!! Advecting the Marker

7

Computational Fluid Dynamics!

Phase Field Methods!

37! Computational Fluid Dynamics!

The phase field Method (Jacqmin)!Solve modified Navier-Stokes equations, developed by thermodynamic considerations at the microscale!

and!

The energy function can take several different forms, for example, if:!

and!Then it can be shown that surface tension and interface thickness are:!

and

38!

Computational Fluid Dynamics!

Several other methods have been developed to improve the performance of those described here, including hybrid methods, such as Particle Level Set and VOF-LS, as well as methods that capture the interface more sharply, such as the Ghost Fluid Method and the Immersed Interface Method. Similar approach has also been used to capture rigid and elastic boundaries, both moving and stationary.

Advecting the Marker Function 39! Computational Fluid Dynamics!

Standard Tests for advection!

40!

Computational Fluid Dynamics!

Zalasak’s test: A notched circular blob is advected by a solid body rotation, measuring how the blob deteriorates!

Advecting the Marker Function 41! Computational Fluid Dynamics!

������

High order advection (PPM)!

Level Set! PLIC!Markers!

From W. J. Rider and D.B. Kothe. Reconstructing volume tracking. Los Alamos National Laboratory Report la-ur-96-2375. Technical report, 1996!

Advecting the Marker Function 42!

Page 8: Governing Equations - University of Notre Damegtryggva/CFD-Course/2011-Lecture-28.pdf · Governing Equations!! The “One-Fluid” Approach!! Numerical approach!! Advecting the Marker

8

Computational Fluid Dynamics!

Surface Tension

43! Computational Fluid Dynamics!

In addition to advect the marker function accurately, we must often account for physics unique to the interface. The most common example is surface tension.

Surface Tension

m

t

n u const.

v const.

xv

xu

k = !" #n

xu = !x!u; xv = !x

!v

n = xu ! xvxu ! xv

x u,v( ) = x u,v( ),y u,v( ),z u,v( )( )Tangent vectors

Normal to the surface

It can be shown that: kn = lim

!A"0m!# ds

Definition of a surface

and

44!

Computational Fluid Dynamics!

Singular interface forces are approximated by a smoothed delta function that becomes “more singular” as the smoothing is reduced

k = !" #n

!H!t

+ u " #H = 0

45! Computational Fluid Dynamics!

Parasitic Currents!!The regular grid induces a small anisotropy. These currents are typically small in immersed boundary methods.!

Stationary drop!

Weak parasitic !currents!

Numerical Method—Surface Tension!

!h p + f"n = 0

At steady state the pressure gradient should be balanced by surface tension!

46!

Computational Fluid Dynamics!

Surface tension can be added in several ways:!

Numerical Method—Surface Tension!47!

fij = !"( )ij#Iij Curvature and normal vector computed directly on the fixed grid—marker function!

Curvature and normal vector computed on the front, distributed to the fixed grid—our original approach!

Curvature computed on the front, distributed to the fixed grid. Normal vector computed on the grid!

fij = !"( )ijf#Iij

f

fij = !"( )ijf#Iij

The last approach seems to combine the accuracy of tracking with the possibility of balancing pressure exactly!

Computational Fluid Dynamics!

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

! f f = "#nds$S% =

" s2 & s1( ) 2D

" s ' nds 3DS!%

()*

+*!n = "s

"s-s2!

s1!

s!n!

m=s x n!

Numerical Method—Surface Tension!48!

!"( )ij =± # fp( )wij

p

front$

%s pwijp

front$! f f = "#nds

$S% & "#n$sDistribute to the grid using!

The force can be distributed directly to the fixed grid. Or, we can distribute only the magnitude and find the normal on the grid !

Page 9: Governing Equations - University of Notre Damegtryggva/CFD-Course/2011-Lecture-28.pdf · Governing Equations!! The “One-Fluid” Approach!! Numerical approach!! Advecting the Marker

9

Computational Fluid Dynamics!

Although methods based on the one fluid formulation have been used successfully for many problems, several challenges remain. These are slowly being eliminated

•  High Reynolds numbers: high order advection methods and non-conservative form of the advection terms

•  Continuity of the viscous stresses: interpolation using the harmonic mean

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

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

49!