moving interface problems: methods & applications tutorial ... · pdf filemoving interface...
TRANSCRIPT
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
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
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
Moving Interface Problems—Front Tracking
The conservationequations aresolved on a regularfixed grid and thefront is tracked byconnected markerpoints
Numerical Method
Moving Interface Problems—Front Tracking
The structureof the front
Moving Interface Problems—Front TrackingNumerical Method
Data structure for thesurface elements. Theelements carryessentially all informationabout the structure of thefront.
The points only“know” theirlocations
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
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
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
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
Moving Interface Problems—Front Tracking
Dynamicregridding ofa buoyantbubbleresolved on a16 by 16 by16 grid
Dynamic Regridding
Moving Interface Problems—Front Tracking
Transferringinformationbetween the
fixed grid andthe front
Moving Interface Problems—Front Tracking
Fluid 2
Fluid 1
Finite Volume Grid
Tracked Front
Tangent
Normal
Numerical Method
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
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
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
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
Moving Interface Problems—Front Tracking
Constructingthe marker
function
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
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
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.
Moving Interface Problems—Front TrackingUpdating the Marker Function
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!
Moving Interface Problems—Front Tracking
Solution of thepressureequation
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
Moving Interface Problems—Front TrackingPressure Solution
Moving Interface Problems—Front Tracking
ComputingSurfaceTension
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
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
Moving Interface Problems—Front Tracking
Computing Surface Tension in 2D—Accuracy test
40 points 80 points
Location of40 points
Surface Tension
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
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
Moving Interface Problems—Front Tracking
Surface tension method of Shin and Juric (2005)
!
Ca =µU
max
"
!
La ="D
µ2
Curvature New Old
Surface Tension
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
Moving Interface Problems—Front Tracking
Accuracy tests
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
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
Moving Interface Problems—Front Tracking
High Viscosity
Low Viscosity
Exact64 points32 Points16 points
Validations
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
Moving Interface Problems—Front Tracking
Oscillations ofan axisymmetricdrop.Comparisonwith theoreticalsolutions foroscillationfrequency andviscous decay
Validations
Moving Interface Problems—Front TrackingValidations
Grid refinement
Moving Interface Problems—Front Tracking
Otherconsiderations
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
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.
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
Moving Interface Problems—Front Tracking
Changing theinterface
topology for 3Dflow
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
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
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
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