Simulation of free surface fluids in incompressible dynamique Dena Kazerani INRIA Paris Supervised by Pascal Frey at Laboratoire Jacques-Louis Lions-UPMC Workshop on Numerical Modeling of Liquid-Vapor Interfaces in Fluid Flows 12 th December 2016 Institut Henri Poincaré 1 / 24
Free-surface incompressible flows 2 / 24
Incompressible fluids Incompressible Navier Stokes equations : ρ ( u + (u )u) µ u + p = ρf t div u = 0 u(0, x) = u 0(x). Parameters : ρ density, µ dynamic viscosity Unknowns : u velocity, p pressure Data : u 0 initial velocity, f density of external force (NS) 3 / 24
Incompressible fluids Incompressible Navier Stokes equations : ρ ( u + (u )u) µ u + p = ρf t div u = 0 u(0, x) = u 0(x). Parameters : ρ density, µ dynamic viscosity Unknowns : u velocity, p pressure Data : u 0 initial velocity, f density of external force Difficulties (NS) 1 Mathematical complexity of the Navier Stokes equations 2 Time evolution of the fluid domain 3 / 24
Incompressible fluids Incompressible Navier Stokes equations : ρ ( u + (u )u) µ u + p = ρf t div u = 0 u(0, x) = u 0(x). Parameters : ρ density, µ dynamic viscosity Unknowns : u velocity, p pressure Data : u 0 initial velocity, f density of external force Difficulties (NS) 1 Mathematical complexity of the Navier Stokes equations 2 Time evolution of the fluid domain Approaches 1 Study of shallow water approximations of incompressible Navier Stokes/Euler (Advantages : simplicity, dimension reduction) 2 Study directly incompressible Navier Stokes/Euler (Advantages : precision, general regime) 3 / 24
First approach : Shallow water Shallow water models : Saint-Venant (1871), Green Naghdi (1967) used mainly in Oceanography 1 The water surface is presented by an unknown function : No extra numerical difficulty to treat the free surface 2 Reduction of dimension 3 Valid in shallow water regime, sometimes for irrotational fluids 4 The water surface is presented by a spatial function (Pb : Breaking waves) 4 / 24
Second approach Free surface incompressibles fluid equations (Euler or Navier Stokes) : (Similar techniques as for bi-fluide Navier Stokes incompressible flows) It covers more regimes, free surface is not a function The treatment of the free surface is a numerical problem : 1 MAC methods : fixed grid, finite difference methods, free surface represented by markers transported by the flow velocity 2 ALE : Particles are transported by flow velocity (along the characteristic curves), moving mesh to deal with topology changes and sever displacements. 3 VF : Surface represented by a discontinuous characteristic function (weak formulation of advection equation), good to deal with topology changes, tedious to implement on unstructured mesh 4 LS : Surface represented by a continuous characteristic function : good to deal with topology changes, easy to implement on unstructured meshes. 5 / 24
Plan 1 Mathematical model 2 Numerical algorithm General idea Numerical tools Global scheme 3 Numerical results 6 / 24
Mathematical model 7 / 24
Mathematical model Fluid equations : ρ ( u + (u )u) µ u + p = ρf in Ω t t, div u = 0 in Ω t, u(0, x) = u 0(x) in Ω 0. (1) 7 / 24
Mathematical model Fluid equations : ρ ( u + (u )u) µ u + p = ρf in Ω t t, div u = 0 in Ω t, u(0, x) = u 0(x) in Ω 0. Boundary conditions : u n = 0 on Ω t \ Γ t, [ ( αu + µ u + t u ) n ] = 0 on Ωt \ Γt, tan ( ( µ u + t u ) p ) n = (γκ + p a ) n in Γ t, (1) (2) 7 / 24
Mathematical model Fluid equations : ρ ( u + (u )u) µ u + p = ρf in Ω t t, div u = 0 in Ω t, u(0, x) = u 0(x) in Ω 0. Boundary conditions : u n = 0 on Ω t \ Γ t, [ ( αu + µ u + t u ) n ] = 0 on Ωt \ Γt, tan ( ( µ u + t u ) p ) n = (γκ + p a ) n in Γ t, (1) (2) Kinematic boundary condition : { (1, u) is tangential to the free surface (t, Γ t), t 0. (3) 7 / 24
Level set formulation to characterize the fluid domain Ω t is characterized by a continuous function φ such that 8 / 24
Level set formulation to characterize the fluid domain Ω t is characterized by a continuous function φ such that The kinematic boundary condition on the free surface is now replaced by { tφ + ũ φ = 0 (x, t) D [0, T ], φ(0, x) = φ 0(x) on D, (4) where ũ is a smooth field defined on D such that ũ = u on Γ t, and φ 0 is a level set function for the initial fluid domain. 8 / 24
Level set formulation to characterize the fluid domain Ω t is characterized by a continuous function φ such that The kinematic boundary condition on the free surface is now replaced by { tφ + ũ φ = 0 (x, t) D [0, T ], φ(0, x) = φ 0(x) on D, (4) where ũ is a smooth field defined on D such that ũ = u on Γ t, and φ 0 is a level set function for the initial fluid domain. Question : How to construct the velocity field ũ defined on D from u defined on Ω t? 8 / 24
Velocity extension Question : How to construct the velocity field ũ defined on D from u defined on Ω t? a ~u + ~u = 0 in D \ Ω t ~u n = 0 on D (5) ~u = u on Ω t 9 / 24
Velocity extension Question : How to construct the velocity field ũ defined on D from u defined on Ω t? a ~u + ~u = 0 in D \ Ω t ~u n = 0 on D (5) ~u = u on Ω t a > 0 is large enough such that the extended velocity is smooth enough. a > 0 is small enough such that the values of the flux on the free surface do not interfere with its values outside or inside the fluid. 9 / 24
Velocity extension Question : How to construct the velocity field ũ defined on D from u defined on Ω t? a ~u + ~u = 0 in D \ Ω t ~u n = 0 on D (5) ~u = u on Ω t a > 0 is large enough such that the extended velocity is smooth enough. a > 0 is small enough such that the values of the flux on the free surface do not interfere with its values outside or inside the fluid. Numerical resolution : Lagrange finite elements method 9 / 24
Plan 1 Mathematical model 2 Numerical algorithm General idea Numerical tools Global scheme 3 Numerical results 10 / 24
General idea The problem is time dependent and we intend to solve it on [0, T ]. 11 / 24
General idea The problem is time dependent and we intend to solve it on [0, T ]. We divide the problem time interval, [0, T ] to N sub-intervals [t n, t n+1 ] n {0,..,N 1}. 11 / 24
General idea The problem is time dependent and we intend to solve it on [0, T ]. We divide the problem time interval, [0, T ] to N sub-intervals [t n, t n+1 ] n {0,..,N 1}. Iteration n Resolution of the problem on [t n, t n+1 ]. 11 / 24
General idea The problem is time dependent and we intend to solve it on [0, T ]. We divide the problem time interval, [0, T ] to N sub-intervals [t n, t n+1 ] n {0,..,N 1}. Iteration n Resolution of the problem on [t n, t n+1 ]. At each iteration : 1 We move the fluid domain following the fluid velocity using the 1 velocity extension (construction of velocity field of the level set advection equation) 2 distancing (construction of the convenient initial condition for the level set advection equation) 3 resolution of the advection equation (to find the level set corresponding to the advected domain). 2 We solve the time-discretized fluid equation on the advected domain using a convenient mesh adaptation. 11 / 24
Distancing The level-set advection equation on the time sub-interval [t n, t n+1 ] writes { tφ + ũ φ = 0 (x, t) D [t n, t n+1 ], (Adv) φ(t n, x) = φ t n(x) on D, where φ t n is a level-set function for the fluid domain Ω t n at time t n. 12 / 24
Distancing The level-set advection equation on the time sub-interval [t n, t n+1 ] writes { tφ + ũ φ = 0 (x, t) D [t n, t n+1 ], (Adv) φ(t n, x) = φ t n(x) on D, where φ t n is a level-set function for the fluid domain Ω t n at time t n. For stability reasons, φ t n must satisfy in the vicinity of the free surface. φ t n = 1, (6) 12 / 24
Distancing The level-set advection equation on the time sub-interval [t n, t n+1 ] writes { tφ + ũ φ = 0 (x, t) D [t n, t n+1 ], (Adv) φ(t n, x) = φ t n(x) on D, where φ t n is a level-set function for the fluid domain Ω t n at time t n. For stability reasons, φ t n must satisfy φ t n = 1, (6) in the vicinity of the free surface. Distancing is the construction of a level-set function φ t n(x) of Ω t n that (6) is satisfied [Dapogny, Frey 2012 ]. such 12 / 24
Distancing Problem : Loose of φ = 1 property through the advection equation Solution : Redistancing process before the resolution of the advection equation at each iteration of the algorithm : φ (x, t) + sgn(φ0)( φ 1) = 0 t φ(x, 0) = φ 0 (x) x D with φ(x) if x T Γ φ 0 (x) = + if x T h \ T Γ if x (D h \ T h ) \ T Γ where T Γ is a vicinity of the free surface. [Dapogny,Frey 2012] 13 / 24
Method of characteristics for advection equation Under regularity assumption for ~u and φ 0, the unique solution φ to (Adv) is constant along characteristic curves i.e. φ(x, t) = φ 0(X(x, t; 0)), (7) 14 / 24
Method of characteristics for advection equation Under regularity assumption for ~u and φ 0, the unique solution φ to (Adv) is constant along characteristic curves i.e. φ(x, t) = φ 0(X(x, t; 0)), (7) where s X(x, t; s) the characteristic curve of ~u passing through x at time t : dx(x, t; s) = ~u(x(x, t; s), t) for s R dt (8) X(x, t; t) = x 14 / 24
Method of characteristics for advection equation Under regularity assumption for ~u and φ 0, the unique solution φ to (Adv) is constant along characteristic curves i.e. φ(x, t) = φ 0(X(x, t; 0)), (7) where s X(x, t; s) the characteristic curve of ~u passing through x at time t : dx(x, t; s) = ~u(x(x, t; s), t) for s R dt (8) X(x, t; t) = x The characteristic equation is solved using a fourth order Runge-Kutta scheme. 14 / 24
Time discretization of the Navier Stokes equations we use the fact that ( ) u du(x(x, t; s), s) + (u )u = s=t, t ds where X(x, t; s) is the characteristic curve (parametrized by s) which cross x at time t. 15 / 24
Time discretization of the Navier Stokes equations we use the fact that ( ) u du(x(x, t; s), s) + (u )u = s=t, t ds where X(x, t; s) is the characteristic curve (parametrized by s) which cross x at time t. Discretized NS equation at iteration n is then ρ un (x) u n 1 X n 1 (x) µ u n (x) + p n (x) = ρf n in Ω t n t divu n (x) = 0 in Ω t n The time-discretized equation is solved by a standard finite elements method using the Uzawa algorithm. Remark : Slip boundary conditions are taken into account using a penalization technique. 15 / 24
Mesh adaptation The fluid free surface is explicitly discretized. The mesh is adapted such that the approximation, geometric and interpolation errors are controlled. Mesh elements outside the fluid (far from the free surface) are large since no value is of interest in this region. 16 / 24
Global scheme Notations : D n represents a convenient meshing of the computational domain D at time t n. T n is a subset of D n and represents a convenient meshing of the fluid domain Ω t n at time t n 17 / 24
Global scheme Notations : Scheme D n represents a convenient meshing of the computational domain D at time t n. T n is a subset of D n and represents a convenient meshing of the fluid domain Ω t n at time t n 1 At time t 0 = 0 : T 0 D 0 characterizing Ω t 0, u 0. 2 For n = 0,..., N 1, mesh input output Velocity extension (D n \ T n ) Γ n u n ~u n Distancing D n (D n, T n ) φ n Advection D n (~u n, φ n ) φ n+1 Mesh adaptation D n (φ n, D n ) D n+1 Interpolation D n+1 ~u n ~u n NS resolution T n+1 ~u n (u n+1, p n+1 ) 3 We return u N, p N, φ N, D N. Related paper : Pascal Frey, Dena Kazerani, Thi Thanh Mai Ta. An adaptative numerical scheme for solving incompressible two-phase and free-surface flows. Submitted. 17 / 24
Plan 1 Mathematical model 2 Numerical algorithm General idea Numerical tools Global scheme 3 Numerical results 18 / 24
Viscous fluid in the unit circular domain Parameters : ρ = 1, µ = 1, γ = 7.2, α = 10, p a = 0. Data : f = (0, 100) and the initial solution is given by : Space and time step : t 10 3, h min = h max = 0.3 and Final time : T = 4.435. 19 / 24
Dam break test cases The dam break test cases considered here are the same as in Marcela A. Cruchaga, Diego J. Celentano, Tayfun E. Tezduyar. Collapse of a liquid column : numerical simulation and experimental validation. Published in Comput. Mech., 2007. 20 / 24
Dam break test cases The dam break test cases considered here are the same as in Marcela A. Cruchaga, Diego J. Celentano, Tayfun E. Tezduyar. Collapse of a liquid column : numerical simulation and experimental validation. Published in Comput. Mech., 2007. The test cases are done for shampoo water 20 / 24
Dam break test cases The dam break test cases considered here are the same as in Marcela A. Cruchaga, Diego J. Celentano, Tayfun E. Tezduyar. Collapse of a liquid column : numerical simulation and experimental validation. Published in Comput. Mech., 2007. The test cases are done for shampoo water Our results are compared with the physical experiments the numerical results presented in this reference. 20 / 24
Dam break test cases The dam break test cases considered here are the same as in Marcela A. Cruchaga, Diego J. Celentano, Tayfun E. Tezduyar. Collapse of a liquid column : numerical simulation and experimental validation. Published in Comput. Mech., 2007. The test cases are done for shampoo water Our results are compared with the physical experiments the numerical results presented in this reference. Differences Our framework Reference s framework Mathematical problem bi-fluid problem free-surface fluid Fluid equation computational domain fluid domain Meshing homogenous fixed meshing mobile unstructured meshing Advection equation ETILT method of characteristics Time step t = 0.001 5/10 times larger We use the same friction law as well as the same turbulent model (for the dam break with water problem) as in this reference. 20 / 24
Dam break with shampoo Parameters : ρ = 1024, µ = 8, γ = 0.07, p a = 0 and α = 10 2 (computed following the law α = ρ U C f 2 with C f = 190 and U = 0.4). Data : f = (0, 9.8). Domain dimensions : Computational domain is 0.42m 0.44m, fluid domain is 0.114m 0.114m. Time step : t = 0.01 or the first ten iterations and t = 0.02 for other iterations. Final time : T = 0.5. Space step : h min = 0.0009, h max = 1 and hgrad = 2.5. t = 0.1 t = 0.2 t = 0.3 t = 0.4 t = 0.5 21 / 24
Dam break with water Parameters : ρ = 1000, µ = 0.001, α = 10 6, p a = 0 and γ = 0.07. Data : f = (0, 0.98). Specificity : Reynolds number is high turbulent effects energy dissipation we correct the model by modifying the viscosity as ) µ mod = min (µ + lmix 2 ρ D(u) : D(u)/2; µ max, where l mix = C t h UGN such that C t is a modelling parameter, h UGN is a characteristic element size and µ max is a cut-off value. We set here C t = 3.57, h UGN = hmin = 9 10 4, µ max = 1.5. 22 / 24
Dam break with water Parameters : ρ = 1000, µ = 0.001, α = 10 6, p a = 0 and γ = 0.07. Data : f = (0, 0.98). Specificity : Reynolds number is high turbulent effects energy dissipation we correct the model by modifying the viscosity as ) µ mod = min (µ + lmix 2 ρ D(u) : D(u)/2; µ max, where l mix = C t h UGN such that C t is a modelling parameter, h UGN is a characteristic element size and µ max is a cut-off value. We set here C t = 3.57, h UGN = hmin = 9 10 4, µ max = 1.5. In practice : we take µ = 0.001 for the first iteration of the algorithm. Then, we take the cut-off value µ max for viscosity i.e. 1.5. 22 / 24
Dam break with water Parameters : ρ = 1000, µ = 0.001, α = 10 6, p a = 0 and γ = 0.07. Data : f = (0, 0.98). Specificity : Reynolds number is high turbulent effects energy dissipation we correct the model by modifying the viscosity as ) µ mod = min (µ + lmix 2 ρ D(u) : D(u)/2; µ max, where l mix = C t h UGN such that C t is a modelling parameter, h UGN is a characteristic element size and µ max is a cut-off value. We set here C t = 3.57, h UGN = hmin = 9 10 4, µ max = 1.5. In practice : we take µ = 0.001 for the first iteration of the algorithm. Then, we take the cut-off value µ max for viscosity i.e. 1.5. Time step : t = 0.001 for the first iteration of the algorithm and t = 0.005 for others. Final time : T= 1.5. Space step : hmax = 1 and hgrad = 2.5. 22 / 24
Dam break with water t = 0.1 0.5 t = 0.6 1.0 t = 1.1 1.5 23 / 24
Thank you for your attention! 24 / 24