1
Delft University of Technology
Numerical simulation of two-phase flows using acombined VOF / Levelset method
Computational Science 2005
2
Research team
�
Sander van der Pijl, Kees Vuik & Guus Segal
Department of Applied Mathematical Analysis
Faculty of Electrical Engineering, Mathematics and Computer Science
�
Benjamin Vrolijk & Frits Post
Department of Mediamatics
Faculty of Electrical Engineering, Mathematics and Computer Science
�
Emil Coyajee & Bendiks Jan Boersma
Laboratory of Aero- & Hydrodynamics
Faculty of Mechanical Engineering
3
Outline
�
Introduction
�
Theory
�
Numerical Method
�
Parallel Implementation
�
Visualization
�
Closing remarks
4
Introduction
Incompressible two-phase flows
�
gas-liquid
�
liquid-liquid
5
Applications
�
Chemical industry (separation, boiling, ..)
�
Combustion (fuel injectors)
�
Printing industry (inkjets)
�
Coating (spray paint, ..)
�
Maritime application (green water loading, water waves)
6
Applications: Spray combustion
(Ham et al. 2003)
7
Theory
8
Theory (cont’d.)
�
Conservation of mass in phase "0" and "1"
��� ���� � �
�
Conservation of momentum in phase "0" and "1"
���� �� � ���� � � � �� � � �
���� �
��� �� � � ��� �� � � � ���� � � � ���� � � �
�
Coupling between phase "0" and "1" through interface conditions
9
Interface conditions
�
Continuity of velocity
� � � � �
�
Continuity of stresses
� � � � �� � � �� � � � � � � � � � � � � � � � � � � �
� � � � �� � � �� � � � � � � � � � � � � � � � � � � � � � � � � � � � � �� �� ��
� � �� ��� � �
10
Interface conditions (cont’d).
�
In principle � is discontinuous and thus also �
�
Regularization of � gives
� � � � � � � � � �
�
Reduction of interface conditions to
� � � � � � � � �� � �
�
Surface tension force regularized into a volume force (Brackbill et al., 1992):
� � � � � � � � �� ��
�
Interface normal � and curvature � have to be known away from the interface
11
Computational method
Spatial discretization, with variable � and �:
�
Cartesian and uniform mesh
�
Marker and Cell layout
�
Discontinuous density, water/air � � � �� � � � �
�
Regularization of viscosity
�
Continuous surface force approach � no interfaceconditions
x∆
z∆
y∆
z
y
x
u
w
v
p ρ µ, , , ,φ ψ
Explicit time-integration for fluid flow and interface advection equations
�
Navier-Stokes: pressure correction method
12
Surface representation
Required for calculation of ���� and �
Front tracking:
�
Marker particles (Tryggvason and coworkers)
Front capturing:
�
Volume of Fluid (VOF) (Rider & Kothe 1998, Scardovelli & Zaleski 1999,Renardy & Renardy 2002, Pilliod & Puckett 2004)
�
Levelset (LS) (Sussman et al. 1994, Chang et al. 1996, Sethian 1999)
�
LS/VOF (Sussman & Puckett 2000)
Front tracking/capturing:
�
LS/Marker particles (Enright et al. 2003)
13
Volume of Fluid
Advantage
�
Mass conserving interface advection (numerically by construction)
Disadvantage
�
Elaborate reconstruction of interface position and curvature, i.e. density, viscosityand surface tension.
14
Levelset
Advantage
�
Straightforward extraction of interface position, computation of curvature, i.e.density, viscosity and surface tension
Disadvantage
�
Numerical implementation of interface advection is not mass conserving
15
LS advection
�� � � � � �
�
Numerical implementation � dissipation
�� � �
� � � �� ��� � ����� �
��
�
Numerical dissipation � Mass loss/gain
Advection
Exact
Numeric
�
Apply small corrections to LS function
� � � � �� � � �
16
How to calculate
� �
�
VOF reconstructed from LS
� � � � � � ��
� � � �
�
VOF advection is mass conserving by construction
� � � � � �
�
Invert (Newton-Raphson) with
� �
as initial guess
� � � � � � � � ��
� � � � �
�
Mass conservation, up to a specified �
17
Comp. Meth. Overview
�
Velocity update � ��
� � � � �
�
LS advection
� ��
� � � ��
�
VOF advection
� ��
� � � � � � � �
�
LS correction
� ��
� � � � � � �
�
Poisson equation
� ��
��� � � � � �
�
Solution with PCG
�
Pressure correction � � � � � �
A Mass-Conserving Level-Set (MCLS) Method for Modeling of Multi-Phase Flows, S.P. van der Pijl, A. Segal, C.Vuik, &
P. Wesseling (accepted: Int. Jour. for Num. Meth. in Fluids)
18
Results: Falling water drop
Serial code, numerical resolutions possible up to
�� � �
gridpoints
Relative mass error <
� � � � �
19
Stationary bubble/Laplace problem
�
Exact solution: Pressure constant, velocity zero
�
Numerical solution: Pressure perturbed, velocity non-zero
-0.5 -0.25 0 0.25 0.5
x
-0.5
-0.25
0
0.25
0.5
z
20
Surface tension
�
Similar implementation/problems for all structured-grid methods
�
Surface tension in N.S. equations: � � ��
(Brackbill et al. 1992)
�
Sources of error:
1. Delta function approximation of the discontinuity
2. Computation of curvature: � � ���� �
� � � � effect of� �
�
Resulting symptoms: Parasitic currents for a stationary bubble (Laplace problem)
21
Complete VOF/Level-Set reconstruction (1)
Simultaneously solve:
� � � � ��
� � �
and
� � � � � �
� ��
� � � � �� � � �� � ��� �
� � � � � � �
solved by 1st order Fast Marching method (Sethian 1999)
� � � � � ��
� � �
solved up to machine-precision
22
Complete VOF/Level-Set reconstruction (2)
x
0
0.2
0.4
0.6
0.8
1
y
0
0.2
0.4
0.6
0.8
1
vof0
0
0.2
0.4
0.6
0.8
1
X Y
Z
vof0
10.90.80.70.60.50.40.30.20.10
x
0
0.2
0.4
0.6
0.8
1
y
0
0.2
0.4
0.6
0.8
1
ph
i
-0.4
-0.2
0
0.2
X Y
Z
phi
0.20.150.10.050
-0.05-0.1-0.15-0.2-0.25-0.3-0.35-0.4
23
Remarks
� � � � � � �
ensures a unique solution for Level-Set function
�
’Classic’ re-initialization (Sussman 1994) no longer required
�
Surface tension representation improved, but not sufficient yet
�
Immediate future: obtain higher order solution to
� � � � � �
24
Parallelization of the code
�
Parallel code required for meshes larger than
� � � �
up to
� � � �
�
Approach: Message Passing Interface (MPI) library with domain decomposition
�
Parallel Poisson solver
�
CG without pre-conditioner
�
Quality of initial guess important
�
Code runs on SGI Origin 3800 or SGI Altix 3700 (Teras & Aster) at Sara
25
Parallelization: Domain decomposition
x
y z
x
y z
26
Parallel performance
� � � �
�
"Home made Beowulf cluster" with gigabit over copper
�
Supercomputers TERAS/ASTER
#NCPU Beowulf Aster
1 44
2 40
4 30
8 17
16 7
32 8
27
Visualization
�
Visualization of very large time-dependent data sets is a huge problem.
�
To visualize the boundaries between fluids (phase fronts) we need
�
interactive isosurface extraction and rendering of large time-varying data sets.
Time
Iso surf. value
28
Data structure
A data structure for
�
Interactive isosurface extraction
�
Time-dependent data sets
�
“Incremental” surfaces
�
Use of temporal coherence
�
Fast rendering
�
No need to keep original data in memory
29
Temporal Hierarchical Index Tree (Shen, 1998)
�
Each node represents a certain time range.
�
Each node contains “constant” cells for that time range.
�
Cells in one node need not be stored below that node.
�
The difference between (consecutive) time steps can be found by backtracking upthe tree.
�
In each node, a (possibly large) number of cells must be stored.
30
Out-of-core tree building
�
During creation of an index tree, we need the entire temporal evolution of every cell,because we want to make use of temporal coherence as much as possible.
�
Instead of using
� ��
��
� � -files, with each file representing a different time step, weuse
� ��
��
� �
-files
�
All time-dependent data for a cell is in one single file.
�
Split the data set in �-direction and create multiple trees.
�
For example, for a
� �� �
data set, we could create
�
trees of
� � � � � �� � ��
.
31
Out-of-core visualization
�
During visualization, all sub-trees have to be read to reconstruct the entire spatialdomain, but not complete.
�
A time window in is kept main memory, centered around the current time step.
�
This approach, alleviates the huge memory requirements for the visualization
32
Data sets
Data set Bubbles Clouds
Resolution
� � � � � �� � � � � � � � � � � � � � # Time steps
�� � Raw data size
� � � �
MB
� MB
# THI Trees
� � � � �
xy-resolution
� �� � � � � � �� � � � � � � � � �� � �� � � �� �
z-resolution
� � �� � �
# Time steps
�� �� � �
Total size
� � �
MB
� � � MB
�� �
MB
� �
MB
33
Visualization tool
34
Rendering benchmarks
0 1 2 3 4 5
x 105
0
50
100
150
200
250
Number of cells
Fra
mer
ate
(FP
S)
Rendering framerate as a function of the number of cells
Fast Point−based RendererShell Renderer
� � �
FPS for over
� � �
cells
� � �
FPS for over
�� �
cells
�
Even
� �
FPS for
� ��
cells
35
Playing benchmarks
0 0.5 1 1.5 2 2.5
x 105
0
20
40
60
80
100
120
Number of cells
Fra
mer
ate
(FP
S)
Average playing framerate as a function of the number of cells
Fast Point−based RendererShell Renderer
Extraction and rendering from all time steps
� � �
FPS (= time steps per second) for over
� � �
cells
� �
FPS (= time steps per second) for over
� � �
cells
�
As high as
� �
FPS (= time steps per second) for
� ��
cells
36
Some high resolution results
� � � �
(1)
X Y
Z
g
37
Some high resolution results
� � � �
(2)
X Y
Z
g
38
Closing remarks
�
A mass conserving VOF/LS method has been developed
�
Large scale flow simulations of complicated two-phase problems can be performed
�
Collaboration between three disciplines has been very productive
�
Scientific "freedom" of the NWO-CS program is very stimulating, new research linescan be developed.