Improving convergence of QuickFlow A Steady State Solver for the Shallow Water Equations Femke van Wageningen-Kessels January 22, 2007 1
Background January 22, 2007 2
Background: software WAQUA QuickFlow - since 1970 s - - since 2006 - slow convergence time-dependent solution not well suited for stationary solution fast convergence only stationary solution uses WAQUA output as initial solution January 22, 2007 3
Goal & content How does QuickFlow work? Shallow water equations Spatial discretization Time iteration methods Test problems Improvements to QuickFlow Planning January 22, 2007 4
2D Shallow water equations Navier Stokes equations Reynolds equations 2D Shallow water equations: U + U U t x + V U y V t + U V x + V V y ζ fv + g x τ bottom,x ρ 0 H ζ + fu + g y τ bottom,y ρ 0 H ν H ν H ( 2 U x 2 + 2 U y 2 ( 2 V x 2 + 2 V y 2 ) ) = 0 = 0 ζ t + HU x + HV y = 0 Shallow water equations on curvilinear grid January 22, 2007 5
Spatial discretization: grid 5 n 4 3 V -velocity depth water level U-velocity one computational cell dex 2 1 1 2 3 m January 22, 2007 6
Spatial discretization: methods Momentum equations: Third order upwind: U V x Central difference and V U y Continuity equations: Finite volume January 22, 2007 7
Spatial discretization: boundaries replacements discharge or velocity boundary closed free slip water level boundary January 22, 2007 8
Spatial discretization: moving boundary ents dary H δ U = 0 H surface bottom January 22, 2007 9
Time iteration: WAQUA - ADI stage 1: V -momentum explicit du dt = A 1 (u l, u l+1/2 ) stage 2: U-momentum & continuity explicit du dt = A 2 (u l+1/2, u l+1 ) Stationary: du dt = 1 2 [A 1(u, u) + A 2 (u, u)] A(u) January 22, 2007 10
Time iteration: Euler Backward du dt = A(u) un+1 u n t = A(u n+1 ) t M (u n+1 u n ) + A(u n+1 ) b = 0 Advantages: easy implementation unconditionally stable January 22, 2007 11
Time iteration: Newtons method F(x) tm(u n+1 u n ) + A(u n+1 ) b = 0 x k+1 = x k α ( F (x k ) ) 1 F(x k ) Advantages: easy implementation global convergence (line search) January 22, 2007 12
Test problem: Chézy 0.5 Solution by WAQUA 1.2 Rectangular gutter 0.4 1 25 11 grid cells Y coordinate [km] 0.3 0.2 0.8 0.6 [m] inflow: velocity boundary 0.1 0.4 outflow: 0.0 0.2 water level boundary 0.1 0.2 0.3 0.4 0.5 0.6 0.7 X coordinate [km] January 22, 2007 13
Test problems: real Lek Randwijk January 22, 2007 14
Test problem: Lek MAPS.sep at T=Inf, stationary 2.0 1.5 4.5 4 3.5 Relatively easy Y coordinate [km] 1.0 0.5 3 2.5 2 [m] 42 34 grid cells inflow: 2.0 1.5 0.0 0.5 Difference WAQUA QuickFlow x 10 3 2 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 X coordinate [km] 1 0 1.5 1 0.5 discharge boundary outflow: water level boundary Y coordinate [km] 1.0 0.5 1 2 3 [m] 0.0 4 5 0.5 6 January 22, 2007 15 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 X coordinate [km] 7
Test problem: Randwijk 450.0 Difference WAQUA QuickFlow Relatively complex 2.0 448.0 446.0 0.005 287 26 grid cells Y coordinate [km] 444.0 442.0 440.0 438.0 0.01 0.015 [m] inflow: discharge boundary 436.0 0.02 outflow: 434.0 432.0 170.0 175.0 180.0 185.0 190.0 X coordinate [km] 0.025 water level boundary 0.0 January 22, 2007 16
Improvements: damping BC s hard open boundaries nonphysical reflection of waves long run-up time Remedie: damping boundary conditions January 22, 2007 17
Improvements: semi-explicit time Example: advection equation u t = u u x Euler Backward & upwind u n+1 m u n m t = u n+1 m u n+1 m u n m 1 x Alternative u n+1 m u n m t = u n m u n+1 m u n m 1 x Implementation in Euler Backward or in Newton January 22, 2007 18
Improvements: quasi-newton Approximate Jacobian F (x 0 ) B k Advantages: x k+1 = x k ( B k) 1 F ( x k ) reduce costs for computing F reduce costs for LU-decomposition of F possibly faster convergence (depends on method) January 22, 2007 19
Improvements: adaptive time stepping complicated area small time step or large time step for continuity equation: ζ l+1 ζ l t + x (Hu) = 0 t x (Hu) = 0 January 22, 2007 20
Plan Resolve large errors near open boundaries Inventorise & solve problems Chézy Lek Randwijk January 22, 2007 21
Conclusion Software: WAQUA & QuickFlow Modelling river flow: Shallow water equations Spatial discretization Time iteration: ADI, Euler Backward, Newton Improvements: Damping boundary conditions Semi-explicit time iteration Quasi-Newton Adaptive time stepping January 22, 2007 22
Questions? January 22, 2007 23