A Numerical Model for Multiphase Flow, I: The Interface Tracking Algorithm Frank Bierbrauer A Numerical Model for Multiphase Flow • Part I, Kinematics: The Interface Tracking Algorithm (Marker-Particle Method) • Part II, Dynamics: The Navier-Stokes Solver Contents • What should an Interface “Tracking” Algorithm be able to do ? • Multiphase Flow, what does phase really mean ? • Interface “Tracking” • The Marker-Particle Method • Benchmark Tests of the MP Method • Conclusions • Associated Problems Solid-Liquid Impact Liquid Jets Jet-Liquid Impact Jet-Solid Impact Jet Breakup Melting and Mixing Fluid Mixing Phase Change: melted glass Droplets and Bubbles Droplet Pinch Off Sessile drops Bubbles Droplet Collisions and Shock Impact Two Droplets Colliding Shock Wave/Droplet Impact Droplet/Liquid Impact Splash Corona & Rayleigh Jet Formation Droplet Splash Capillary Waves Secondary Droplet Expulsion Collision of Two Droplets Example: Three-Phase Flow Fluid phase 1 – droplet, fluid phase 2 – air, fluid phase 3 – other fluid Fluid Phases • Fluid Phases defined by individual densities and viscosities • Can define physical properties such as density and viscosity as a single field varying in space, the socalled one-field formulation • Then the interfaces between fluid phases represent a discontinuity in density or viscosity • Can define these phases by a phase indicator function C Volume Fraction C1 = 0.45 C2 = 0.00 C3 = 0.00 C1 = 0.00 C2 = 0.00 C3 = 0.23 C1 = 0.00 C2 = 0.32 C3 = 0.00 The phase indicator function is often the volume fraction occupied by the fluid (m) in the volume V: Cm = Vm/V so that C1 + C2 + C3 = 1 in V Example: Grid Volume Fraction C1 = 0.2 C2 = 0.8 C1 = 0 C2 = 1 C1 = 0.7 C2 = 0.3 C1 = 0 C2 = 1 C1 = 0.95 C2 = 0.05 C1 = 0.3 C2 = 0.7 C1 = 1 C2 = 0 C1 = 0.7 C2 = 0.3 Volume fraction information within grid cells C1 – blue fluid, C2 – yellow fluid One-Field Formulation • For example, for 3 phase flow the density and viscosity fields are: • density: r(x,y,t) =r1C1(x,y,t) + r2C2(x,y,t) + r3C3(x,y,t) • viscosity: m(x,y,t) =m1C1(x,y,t) + m2C2(x,y,t) + m3C3(x,y,t) • so that r(x,y,t) =r1C1(x,y,t) + r2C2(x,y,t) + r3[1-C1(x,y,t)-C2(x,y,t)] m(x,y,t) =m1C1(x,y,t) + m2C2(x,y,t) + m3[1-C1(x,y,t)-C2(x,y,t)] • Where the mi and ri are the constant viscosities and densities within each fluid phase • In general for M fluid phases we have M M r ( x, y, t ) m 1 r m C ( x , y , t ), m m ( x, y, t ) m 1 m mC ( x, y, t ) m Interface Tracking • Surface Tracking – The interface is explicitly tracked – The interface is represented as a series of interpolated curves – A sequence of heights above a reference line, e.g. level set method – A series of points parameterised along the curve, e.g. front tracking Surface Tracking 1. Points parameterised along a curve (x(s),y(s)) 2. Sequence of heights h above a reference line Interface Capturing • Volume Tracking – The interface is only implicitly “tracked”, it is “captured” – The interface is the contrast created by the difference in phase, e.g. MAC method, MarkerParticle method – Or it can be geometrically re-constructed, e.g. VOF methods SLIC, PLIC Interface Capturing Volume Tracking Eulerian Methods • Fixed Grid methods – There is an underlying grid describing the domain, typically a rectangular mesh, e.g. FDM – The interface does not generally coincide with a grid line or point – Advantages: interface can undergo large deformation without loss of accuracy, allows multiple interfaces – Disadvantage: the interface location is difficult to calculate accurately Lagrangian Methods • These methods are characterised by a coordinate system that moves with the fluid, e.g. fluid particles • Advantages: accurately specifies material interfaces, interface boundary conditions easy to apply, can resolve fine structures in the flow • Disadvantage: strong interfacial deformation can lead to tangled Lagrangian meshes and singularities • Examples: SPH, LGM, PIC Eulerian-Lagrangian Methods • Makes use of aspects of both Eulerian and Lagrangian methods • Particle-Mesh methods – use an Eulerian fixed grid to store velocity and pressure information – Use Lagrangian particles to keep track of fluid phase and thereby density and viscosity The Marker-Particle Method • Define a fixed Eulerian mesh made up of computational cells with centres x i x1 / 2 y j y1 / 2 1 i Dx 2 1 j Dy 2 • In Xmin < x < Xmax, Ymin< y < Ymax, x1/2 = Xmin, y1/2 = Ymin, Dx = (Xmax-Xmin)/I, Dy = (Ymax-Ymin)/J • Within each computational cell assign a set of particles with positions (xp, yp) Computational Cell & Initial Particle Configuration Fluid Colour • Each fluid phase (m) has a set of marker particles (p) located at position (xp, yp) • Every marker particle of the mth set is assigned a colour C pm C m x p , y p such that • C m p 1 0 if particle if particle p is located in fluid m p is not located in fluid m Initial Particle Colours • For example, for those particles of the 2nd phase: Particle Velocities • Particle velocities up = u(xp,yp) are interpolated from the nearest four grid velocities ui,j, ui+1,j, ui,j+1, ui+1,j+1 Grid-to-Particle Velocity Interpolation x xi u ( x , y ) 1 Δx x xi Δx y-y j x xi 1 u i, j Δy Δx x xi y-y j u i 1, j 1 1 Δy Δx y-y j u i 1, j 1 Δy y-y j u i, j Δy Interpolation Function or J u (x,y) I S(x x i ,y y j )u i,j j 1 i 1 Where the interpolation function S is given by x xi 1 S Dx y yj 1 Dy 0 if otherwise 0 x xi Dx , y yj Dy 1 Particle Kinematics • Lagrangian particle advection: solve u = dx/dt which moves fluid particles along characteristics with velocity u • Predictor Dt n 1 / 2 xp y • Corrector n 1 / 2 p xp n y n p 2 Dt 2 D tv x x p D tu x p n 1 yp yp n n n n p n p v x ,y n 1 xp n u xp, yp , n 1 / 2 n 1 / 2 p n 1 / 2 , yp n 1 / 2 , yp , Particle Boundary Conditions • No-Slip: On approaching the boundary the fluid velocities there approach zero. The simplest way to impose this boundary condition is to reflect the particle back into the domain by the amount it has exceeded it • Periodic: For periodic conditions the particle must exit the domain and appear out of the opposite face by the amount it exceeded the first boundary Volume Fraction Update m , n 1 • Require the updated grid volume fraction C i , j to update the grid densities and viscosities • Use the same interpolation function, S, as defined previously • Usually, particles-to-grid interpolation involves many irregularly placed particles, in excess of four Volume Fraction Interpolation • This requires a normalisation of the interpolation • Then, for each fluid m at the next time step n+1 N S x C m , n 1 i, j n 1 p xi , y n 1 p yj C p 1 N S x p 1 n 1 p xi , y n 1 p yj m p Algorithm 1. Initialisation at t = 0 1. Assign a set number of particles per cell with a total number N in the domain 2. Assign an initial particle colour C pm for each fluid 3. Construct initial grid cell volume m ,0 fractions C i , j Algorithm 2. For time steps t > 0 Given un and time centred grid velocities un+1/2 interpolate velocities to all particles obtaining u np , u np 1 / 2 2. Solve the equation of motion u = dx/dt using the predictor-corrector strategy already mentioned m , n 1 3. Interpolate the new grid volume fractions C i , j from the m advected particle colours C p 4. Update density and viscosity using the new volume fractions 5. Store old time particle positions as well as particle colour. Increment the time step n -> n+1 and go to step 1. above 1. Benchmark Tests • Two-Phase Flow test, droplet and ambient fluid of different densities and viscosities in a unit domain. Let the droplet have volume fraction C = 1 and the ambient fluid have C= 0 (C = C1, C2 = 1 - C1). • Apply various velocity fields up to time t = T/2 to the problem of a fluid cylinder, of radius R = 0.15, located at (0.50,0.75) • Reverse velocity field at t = T/2 and measure difference between initial and final droplet configuration at t = T (T = total time) Error Measures • Use a 642 grid (Dx = Dy = 1/64 = 0.016) with either 4 or 16 particles per cell (ppc) • At t = T measure droplet volume/mass given by 1 1 C ( x , y ) dxdy 0 0 • Measure changes in transition width, the minimised, +ve, distance over which the volume fraction changes from C = 1 (droplet), in grid cell (x,y), to C = 0 (surrounding fluid), in grid cell (X,Y) min 0 x , X ; y ,Y 1 ( X x ) (Y y ) 0 • Obtain relative percentage errors 2 2 Benchmark Tests Test Type Velocity Field Specified Field Simple translation u(x,y) = (1,0) Advection rotation u(x,y) = (y-1/2,-(x-1/2)) Topology shearing flow u(x,y) = (-sin2px sin2py, sin2px sin 2py) Change vortex u(x,y) = (sin 4p (x+1/2) sin4p (y+1/2), cos 4p (x+1/2) cos4p (y+1/2)) Expected Shearing Flow Effect Expected Vortex Field Effect Translation: relative % errors Rotation: relative % errors Shearing Flow: relative % errors Vortex: relative % errors Translation: transition width Rotation: transition width Shearing Flow: transition width Vortex: transition width Relative Errors L1 norm Conclusions • Tests have shown the MP method can accurately “track” multiple fluid phases provided a sufficient number of marker particles are used • The method performs well even for severely distorted flows • The method maintains a constant interface width of about two grid cell lengths • The method maintains particle colour permanently never losing this information Local Mass Conservation Local conservation of mass equation states, for incompressible fluids, u 0 r t u r 0 Or for M fluid phases C m m r m t u C m 1 M 0 Local Volume Conservation So we could choose, for each fluid m: DC m Dt C t m u C m 0 1. Therefore C im, j, n also satisfies the discrete form of the equation: C m , n 1 i, j C m ,n i, j D t (u G C ) m n i, j 0 Total Mass The total initial volume for M fluid phases is M Y max X max C m ( x , y , 0 ) dxdy m 1 Y min X min With the corresponding total initial mass given by Y max X max M r C m m 1 Y min X min m ( x , y , 0 ) dxdy Global Mass Conservation This must be conserved for all time, i.e. Y max X max M t rm m 1 C ( x , y , t ) dxdy 0 m Y min X min or M r m 1 m t Y max X max C Y min X min m ( x , y , t ) dxdy 0 Global Volume Conservation Can choose t Y max X max C m ( x , y , t ) dxdy 0 Y min X min Or Y max X max Y min X min Y max X max C m , n 1 ( x , y ) dxdy C Y min X min m ,n ( x , y ) dxdy Discretised Volume Conservation 2. In discretised form J I C j 1 i 1 m , n 1 i, j J I C j 1 i 1 m ,n i, j Particle to Grid Volume Fraction Interpolation 3. Already know N S x m , n 1 C i, j n 1 p n 1 xi , y p yj Cp p 1 N n 1 S xp n 1 xi , y p yj p 1 4. And 1 D xD y Y max X max S (x x , y y i j ) dxdy 1 or Y min X min J I S (x x , y y i j 1 i 1 m j ) 1 Non-Solenoidal Particle Velocities 5. Given a solenoidal velocity field ui,j the interpolated particle velocity field is not necessarily also solenoidal: J u ( x, y ) I S (x x , y y i j 1 i 1 J I u j 1 i 1 i, j S 0 j )u i , j 0 Solutions ? • How do you construct a modified interpolation function S which maintains solenoidality ? • What equation does S have to satisfy when considering the previous points 1-5 ?