Direct numerical simulations of breaking waves and adaptive dispersive wave models Stéphane Popinet, Luc Deike, Ken Melville Institut Alembert, CNRS/UPMC, Paris Scripps Institution of Oceanography, UC San Diego February 8, 2016
Multiscale fluid mechanics: from interfacial flows... Edgerton, 1952 Breaking wave Savart Plateau Rayleigh instability, Jameson, 1971
Introduction Breaking waves Dispersive wave models... to geophysical fluid dynamics Dynamics and chemistry of black smokers, Walter 2012 Tohoku tsunami, 2011 Avalanches of granular material Idealised climate models
Outline 1 Introduction: equations, adaptivity, Gerris 2 A numerical study of breaking waves 3 Dispersive wave model: the Serre Green Naghdi equations
Outline 1 Introduction: equations, adaptivity, Gerris 2 A numerical study of breaking waves 3 Dispersive wave model: the Serre Green Naghdi equations
The Navier Stokes equations Conservation of mass and momentum Equations of state, for example t ρ + (ρu) = 0 ρ( t u + u u) = τ + S τ = p(ρ,...)i + η(ρ, u,...)( u + u T ) Incompressibility u = 0 diagnostic Poisson equation 1 ρ p =... Source terms S = gravity, Coriolis, surface tension, electric stresses,...
Unstructured statically refined mesh Adaptive in space Multigrid difficult
Regular Cartesian grid Not adaptive Multigrid easy
Dynamic refinement using quadtrees Adaptive in space and time Multigrid easy (require storage on non-leaf levels)
A natural multi-scale/frequency representation Efficient multigrid solvers for linear/nonlinear systems A large collection of other efficient divide-and-conquer algorithms: spatial indexing, compression etc... Formally linked to wavelets/multifractals ( multiresolution analysis )
A natural multi-scale/frequency representation Efficient multigrid solvers for linear/nonlinear systems A large collection of other efficient divide-and-conquer algorithms: spatial indexing, compression etc... Formally linked to wavelets/multifractals ( multiresolution analysis )
A natural multi-scale/frequency representation Efficient multigrid solvers for linear/nonlinear systems A large collection of other efficient divide-and-conquer algorithms: spatial indexing, compression etc... Formally linked to wavelets/multifractals ( multiresolution analysis )
Why adaptivity? Scaling of solution cost Number of degrees of freedom scales like C 4 (4 = 3 spatial dimensions + time) Moore s law Computing power doubles every two years combined with the above scaling gives Spatial resolution of climate models doubles every eight years
Does this work? 1e+09 1e+08 # degrees of freedom 1e+07 1e+06 100000 ECMWF MetOffice resolution doubles every 8 years resolution doubles every 10 years 10000 1979 1982 1985 1988 1991 1994 1997 2000 2003 2006 2009 2012 Year
Gerris A framework to solve partial differential equations on adaptive quad/octree meshes First released as Free Software in 2001 Free Software ideals and practice fit well with Open Science Reproductible results from publications Release early, release often no dark secrets General Public License ensures perennity of contributions A simple but powerful interface for research in fluid mechanics Fast setup and exploration of numerical experiments Multiphysics extensions A large community of users and developers share expertise on fluid mechanics in general Some numbers: > 400 subscribers to the mailing lists 10 active developers > 50 papers published in 2015
Outline 1 Introduction: equations, adaptivity, Gerris 2 A numerical study of breaking waves 3 Dispersive wave model: the Serre Green Naghdi equations
Geometric Volume-Of-Fluid on quad/octrees t c + u c = 0 C t t C a b C a C b Popinet, JCP 228, 2009
Spurious currents (circa 1995) Numerical imbalance between pressure gradient and surface tension
Balanced-force Continuum-Surface-Force model 0 = p + σκnδ S Renardy & Renardy, JCP, 2001; Francois et al, JCP, 2006 Continuum-Surface-Force (CSF) model: σκnδ s σκ C Equilibrium if σκ d C = d p Can κ be computed accurately from the discretisation of C?
Progress 1995 2009 Amplitude of spurious currents as a function of spatial resolution
Context: ocean atmosphere interactions Global scale fluxes
Context: ocean atmosphere interactions Start with smaller waves (λ O(10) cm)
Independent parameters for gas liquid Stokes waves 1 Initial conditions: third-order Stokes waves of varying steepness ak (with a the amplitude and k the wave number) 2 Density ratio: set to air water value (1.2/1000) 3 Dynamic viscosity ratio: set to air water value (1/51) 4 Reynolds number Re = gλ 3 /ν w : set to 40 000 (λ 5 cm) 5 Bond number Bo = ρga 2 /γ: varying from 1 to 10 000
Gravity capillary wave Bo = 5, ak = 0.3
Spilling-overturning breaker Bo = 15, ak = 0.45
Plunging breaker Bo = 1000, ak = 0.55
Systematic parametric study Criteria for the different regimes Spilling breaker θ 90 Overturning breaker θ 180 Re = 4 10 4, air water density and viscosity ratios Boundaries found iteratively using dichotomy on ak or Bo
State diagram
Breaking criteria Observation: the spilling and breaking boundaries scale like ɛ B = (ak) B (1 + Bo) 1/3
Breaking criteria Observation: the spilling and breaking boundaries scale like ɛ B = (ak) B (1 + Bo) 1/3 Relationship between vorticity, viscous stress tensor and pressure (taking the divergence of Navier Stokes) Γ 2 D 2 = 2 p ρ, at High Re Γ2 2 p ρ
Breaking criteria Observation: the spilling and breaking boundaries scale like ɛ B = (ak) B (1 + Bo) 1/3 Relationship between vorticity, viscous stress tensor and pressure (taking the divergence of Navier Stokes) Γ 2 D 2 = 2 p ρ, at High Re Γ2 2 p ρ The pressure due to capillary effects is 2 p γk 4 a
Breaking criteria Observation: the spilling and breaking boundaries scale like ɛ B = (ak) B (1 + Bo) 1/3 Relationship between vorticity, viscous stress tensor and pressure (taking the divergence of Navier Stokes) Γ 2 D 2 = 2 p ρ, at High Re Γ2 2 p ρ The pressure due to capillary effects is 2 p γk 4 a The vorticity is (Longuet-Higgins, 1992) with ω 2 = gk + γ/ρk 3 Γ = 2(ak) 2 ω
Breaking criteria Putting everything together gives ) (ak) 4 gk (1 + γk2 ρg γk4 a ρ
Breaking criteria Putting everything together gives ) (ak) 4 gk (1 + γk2 ρg γk4 a ρ The Bond number is Bo = ρg/(γk 2 ), so that (ak) (1 + Bo) 1/3
Energy dissipation: different regimes 1.1 1 Theoretical 0.9 Stable ak=0.25 Total energy 0.8 0.7 0.6 0.5 Spilling ak=0.35 Spilling-overturning ak=0.45 0.4 Plunging ak=0.55 0.3 0 1 2 3 4 5 6 7 8 9 Time Bo = 10
Statistical modelling of breaking wave dissipation Dissipation rate per unit length of breaking crest ɛ l = bρc 5 /g with b the non-dimensional breaking parameter (Duncan, 1981, Phillips, 1985)
Statistical modelling of breaking wave dissipation Dissipation rate per unit length of breaking crest ɛ l = bρc 5 /g with b the non-dimensional breaking parameter (Duncan, 1981, Phillips, 1985) Semi-empirical relationship for b (Drazen et al, 2008) b = 0.4(S 0.08) 5/2 with S = ak the slope of the wave.
Statistical modelling of breaking wave dissipation Dissipation rate per unit length of breaking crest ɛ l = bρc 5 /g with b the non-dimensional breaking parameter (Duncan, 1981, Phillips, 1985) Semi-empirical relationship for b (Drazen et al, 2008) b = 0.4(S 0.08) 5/2 with S = ak the slope of the wave. We fit the energy decay as E(t) = E 0 exp( ζt) which gives with c 2 = g/k + (γ/rho)k b = ɛ l g/ρc 5 = E 0 ζg/ρc 5
Breaking parameter as a function of wave slope Red curve b = 0.4(ɛ 0.08) 5/2
3D plunging breaker Bo = 33 333, 0.35 < ak < 0.45
Adaptive mesh refinement Mass conservation relative error is less than 1/25 000
Bubble formation and evolution
Bubble formation and evolution
Bubble formation and evolution
Bubble formation and evolution
Bubble formation and evolution
Bubble formation and evolution
Bubble size distribution Garett et al (2000): steady-state model N (r) Qɛ 1/3 r 10/3 with N (r) the size distribution per unit volume, ɛ the time-averaged turbulence dissipation rate and Q the constant air flow rate per unit volume of water. Experimental measurements
Evolution of bubble size distribution (from simulations) Evolution of N(r, t) Decay rate and bubble rise velocity
Time-averaged bubble size distributions N(r, t) r 10/3 exp [ 2 ( r ) ] 2 r m (t)
Conclusions (on breaking waves) Simple breaking criterion for gravity capillary Stokes waves Classical wave dissipation empirical models work also in the capillary limit Dissipative capillary effects are important for the global energy budget of air-water waves (at all scales!) We can capture (just!) the inertial bubble breakup cascade for 3D breaking waves Deike, Popinet & Melville, Capillary effects on wave breaking, 769:541-569, JFM, 2015. Deike, Melville & Popinet, Air entrainment and bubble statistics in three-dimensional breaking waves, under review, JFM, 2016 Basilisk: a new, simpler, more efficient, framework for quadtree-adaptive numerical methods (basilisk.fr)
Outline 1 Introduction: equations, adaptivity, Gerris 2 A numerical study of breaking waves 3 Dispersive wave model: the Serre Green Naghdi equations
The Saint-Venant equations Conservative form t q = h hu hv Ω qdω =, f(q) = f(q) nd Ω hg z Ω hu hv hu 2 + 1 2 gh2 huv huv hv 2 + 1 2 gh2 System of conservation laws (with source terms) Ω Analogous to the 2D compressible Euler equations (with γ = 2) Hyperbolic characteristic solutions Godunov-type (colocated) 2nd-order finite-volume, shock-capturing Wetting/drying, positivity, lake-at-rest balance: scheme of Audusse et al (2004)
The Serre Green Naghdi equations with t η + (h V ) = 0 t V + ɛ V V + η = D (I + µt )(D) = µq( V ) T (D) = (h 3 D) +... and Q( V ) a (complicated) function of the first- and second-derivatives of V.
The Serre Green Naghdi equations with t η + (h V ) = 0 t V + ɛ V V + η = D (I + µt )(D) = µq( V ) T (D) = (h 3 D) +... and Q( V ) a (complicated) function of the first- and second-derivatives of V. No source term in the mass equation
The Serre Green Naghdi equations with t η + (h V ) = 0 t V + ɛ V V + η = D (I + µt )(D) = µq( V ) T (D) = (h 3 D) +... and Q( V ) a (complicated) function of the first- and second-derivatives of V. No source term in the mass equation Requires the inversion of a (spatially-coupled), time-dependent, 2nd-order linear system for (vector) D
The Serre Green Naghdi equations with t η + (h V ) = 0 t V + ɛ V V + η = D (I + µt )(D) = µq( V ) T (D) = (h 3 D) +... and Q( V ) a (complicated) function of the first- and second-derivatives of V. No source term in the mass equation Requires the inversion of a (spatially-coupled), time-dependent, 2nd-order linear system for (vector) D Can be recast into two scalar tridiagonal systems (on regular grids). Lannes and Marche, 2015, JCP
Geometric multigrid Fedorenko (1961), Brandt (1977) Convergence acceleration technique for iterative solvers e.g. Gauss Seidel converges in O(λ/ ) iterations wavelength decomposition of the problem on different grids 1 Given an initial guess u 2 Compute residual on fine grid: R = β L(u ) 3 Restrict residual to coarser grid: R R 2 4 Solve on coarse grid: L(δu 2 ) = R 2 5 Prolongate the correction onto fine grid: δu 2 δu 6 Smooth the correction (using e.g. Gauss Seidel iterations) 7 Correct the initial guess: u = u + δu Full multigrid has optimal computational cost O(N) Similar to Fourier (frequency domain) and closely-related to wavelet decomposition of the signal
Basilisk: a new quadtree-adaptive framework Free Software (GPL): basilisk.fr Principal objectives: Precision Simplicity Performance Generalised Cartesian grids : Cartesian schemes are turned seamlessly into quadtree-adaptive schemes Basic abstraction: operations only on local stencils a[ 1,1] a[0,1] a[1,1] a[ 1,0] a[0,0] a[1,0] a[ 1, 1] a[0, 1] a[1, 1] Code example: b = 2 a f o r e a c h ( ) b [ 0, 0 ] = ( a [ 0, 1 ] + a [ 1, 0 ] + a [0, 1] + a [ 1,0] 4. a [ 0, 0 ] ) / sq ( D e l t a ) ;
Restriction v o i d r e s t r i c t i o n ( s c a l a r v ) { v [ ] = ( f i n e ( v, 0, 0 ) + f i n e ( v, 1, 0 ) + f i n e ( v, 0, 1 ) + f i n e ( v, 1, 1 ) ) / 4. ; }
Prolongation v o i d p r o l o n g a t i o n ( s c a l a r v ) { / b i l i n e a r i n t e r p o l a t i o n from p a r e n t / v [ ] = ( 9. c o a r s e ( v, 0, 0 ) + 3. ( c o a r s e ( v, c h i l d. x, 0 ) + c o a r s e ( v, 0, c h i l d. y ) ) + c o a r s e ( v, c h i l d. x, c h i l d. y ) ) / 1 6. ; }
Boundary conditions Guarantees stencil consistency independently of neighborhood resolution active points restriction prolongation v o i d boundary ( s c a l a r v, i n t l e v e l ) { f o r ( i n t l = l e v e l 1 ; l <= 0 ; l ) f o r e a c h l e v e l ( l ) r e s t r i c t i o n ( v ) ; f o r ( i n t l = 0 ; l <= l e v e l ; l ++) f o r e a c h h a l o l e v e l ( l ) p r o l o n g a t i o n ( v ) ; }
Generic multigrid implementation in Basilisk v o i d m g c y c l e ( s c a l a r a, s c a l a r r e s, s c a l a r dp, v o i d ( r e l a x ) ( s c a l a r dp, s c a l a r r e s, i n t depth ), i n t n r e l a x, i n t m i n l e v e l ) { / r e s t r i c t r e s i d u a l / f o r ( i n t l = depth ( ) 1 ; l <= m i n l e v e l ; l ) f o r e a c h l e v e l ( l ) r e s t r i c t i o n ( p o i n t, r e s ) ; / m u l t i g r i d t r a v e r s a l / f o r ( i n t l = m i n l e v e l ; l <= depth ( ) ; l ++) { i f ( l == m i n l e v e l ) / i n i t i a l g u e s s on c o a r s e s t l e v e l / f o r e a c h l e v e l ( l ) dp [ ] = 0. ; e l s e / p r o l o n g a t i o n from c o a r s e r l e v e l / f o r e a c h l e v e l ( l ) p r o l o n g a t i o n ( dp ) ; boundary ( dp, l ) ; / r e l a x a t i o n / f o r ( i n t i = 0 ; i < n r e l a x ; i ++) { r e l a x ( dp, r e s, l ) ; boundary ( dp, l ) ; } } / c o r r e c t i o n / f o r e a c h ( ) a [ ] += dp [ ] ; }
Application to Poisson equation 2 a = b The relaxation operator is simply v o i d r e l a x ( s c a l a r a, s c a l a r b, i n t l ) { f o r e a c h l e v e l ( l ) a [ ] = ( a [ 1, 0 ] + a [ 1,0] + a [ 0, 1 ] + a [0, 1] sq ( D e l t a ) b [ ] ) / 4. ; } The corresponding residual is v o i d r e s i d u a l ( s c a l a r a, s c a l a r b, s c a l a r r e s ) { f o r e a c h ( ) r e s [ ] = b [ ] ( a [ 1, 0 ] + a [ 1,0] + a [ 0, 1 ] + a [0, 1] 4. a [ ] ) / sq ( D e l t a ) ; }
The Serre Green Naghdi residual [( h α d h 2 2 xy z b + xη y z b ) h 3 xd x + h [α d ( xη xz b + h2 ) 2x z b α ( d 3 x ) D y + h2 y z b xd y h2 3 2 xy D y h y D y ] + 1 D x+ ( xh + 1 )] 2 xz b = b x v o i d r e s i d u a l ( v e c t o r D, v e c t o r b, v e c t o r r e s ) { f o r e a c h ( ) f o r e a c h d i m e n s i o n ( ) { double hc = h [ ], dxh = dx ( h ), dxzb = dx ( zb ), d x e t a = dxzb + dxh ; double h l 3 = ( hc + h [ 1, 0 ] ) / 2. ; h l 3 = cube ( h l 3 ) ; double hr3 = ( hc + h [ 1, 0 ] ) / 2. ; hr3 = cube ( hr3 ) ; } } r e s. x [ ] = b. x [ ] ( a l p h a d / 3. ( hr3 D. x [ 1, 0 ] + h l 3 D. x [ 1,0] ( hr3 + h l 3 ) D. x [ ] ) / sq ( D e l t a ) + hc ( a l p h a d ( d x e t a dxzb + hc /2. d2x ( zb ) ) + 1. ) D. x [ ] + a l p h a d hc (( hc /2. d2xy ( zb ) + d x e t a dy ( zb )) D. y [ ] + hc /2. dy ( zb ) dx (D. y ) sq ( hc ) / 3. d2xy (D. y ) hc dy (D. y ) ( dxh + dxzb / 2. ) ) ) ;
Are dispersive terms important? (for large-scale tsunamis) Saint-Venant Serre Green Naghdi 30 minutes after the event Colorscale ±2 metres
Are dispersive terms important? (for large-scale tsunamis) Saint-Venant Serre Green Naghdi 60 minutes after the event Colorscale ±2 metres
Are dispersive terms important? (for large-scale tsunamis) Saint-Venant Serre Green Naghdi 90 minutes after the event Colorscale ±2 metres
Are dispersive terms important? (for large-scale tsunamis) Saint-Venant Serre Green Naghdi 120 minutes after the event Colorscale ±2 metres
Are dispersive terms important? (for large-scale tsunamis) Saint-Venant Serre Green Naghdi 150 minutes after the event Colorscale ±2 metres
Are dispersive terms important? Saint-Venant Serre Green Naghdi 30 minutes after the event
Are dispersive terms important? Saint-Venant Serre Green Naghdi 60 minutes after the event
Are dispersive terms important? Saint-Venant Serre Green Naghdi 90 minutes after the event
Are dispersive terms important? Saint-Venant Serre Green Naghdi 120 minutes after the event
Are dispersive terms important? Saint-Venant Serre Green Naghdi 150 minutes after the event
Conclusions The Serre Green Naghdi dispersive model can be implemented as a momentum source added to an existing Saint-Venant model Preserves the well-balancing, positivity of water depth (wetting/drying) of the orginal scheme Multigrid is simple and efficient for inverting the SGN operator on adaptive quadtree grids. Popinet, 2015, JCP The effective number of degrees of freedom of the physical problem scales like C d with d the effective (or fractal or information ) dimension. This leads to large gains in computational cost for a given error threshold for a wide range of problems (including wave dynamics). Current developments 4th-order quadtree-adaptive discretisations MPI parallelism (dynamic load-balancing etc...) GPUs