improving convergence of quickflowta.twi.tudelft.nl/users/vuik/numanal/kessels_presentation1.pdf ·...

23
1 V ORtech Computing Delft University of Technology Improving convergence of QuickFlow A Steady State Solver for the Shallow Water Equations Femke van Wageningen-Kessels January 22, 2007

Upload: others

Post on 23-Aug-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Improving convergence of QuickFlowta.twi.tudelft.nl/users/vuik/numanal/kessels_presentation1.pdf · n+1 m un+1 m ¡un m¡1 ¢x Alternative un+1 m ¡un m ¢t = u n m un+1 m ¡un m¡1

1

VORtechComputing Delft University of Technology

Improving convergence ofQuickFlowA Steady State Solver for the ShallowWater Equations

Femke van Wageningen-Kessels

January 22, 2007

Page 2: Improving convergence of QuickFlowta.twi.tudelft.nl/users/vuik/numanal/kessels_presentation1.pdf · n+1 m un+1 m ¡un m¡1 ¢x Alternative un+1 m ¡un m ¢t = u n m un+1 m ¡un m¡1

January 22, 2007 2

VORtechComputing Delft University of Technology

Background

Page 3: Improving convergence of QuickFlowta.twi.tudelft.nl/users/vuik/numanal/kessels_presentation1.pdf · n+1 m un+1 m ¡un m¡1 ¢x Alternative un+1 m ¡un m ¢t = u n m un+1 m ¡un m¡1

January 22, 2007 3

VORtechComputing Delft University of Technology

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

Page 4: Improving convergence of QuickFlowta.twi.tudelft.nl/users/vuik/numanal/kessels_presentation1.pdf · n+1 m un+1 m ¡un m¡1 ¢x Alternative un+1 m ¡un m ¢t = u n m un+1 m ¡un m¡1

January 22, 2007 4

VORtechComputing Delft University of Technology

Goal & content

• How does QuickFlow work?• Shallow water equations• Spatial discretization• Time iteration methods• Test problems

• Improvements to QuickFlow• Planning

Page 5: Improving convergence of QuickFlowta.twi.tudelft.nl/users/vuik/numanal/kessels_presentation1.pdf · n+1 m un+1 m ¡un m¡1 ¢x Alternative un+1 m ¡un m ¢t = u n m un+1 m ¡un m¡1

January 22, 2007 5

VORtechComputing Delft University of Technology

2D Shallow water equations

Navier Stokes equations ⇒ Reynolds equations⇒ 2D Shallow water equations:

∂U∂t

+ U ∂U∂x

+ V ∂U∂y

− fV + g∂ζ∂x

−τbottom,x

ρ0H− νH

(

∂2U∂x2

+∂2U∂y2

)

= 0

∂V∂t

+ U ∂V∂x

+ V ∂V∂y

+ fU + g∂ζ∂y

−τbottom,y

ρ0H− νH

(

∂2V∂x2

+∂2V∂y2

)

= 0

∂ζ∂t

+∂HU∂x

+∂HV∂y

= 0

⇒ Shallow water equations on curvilinear grid

Page 6: Improving convergence of QuickFlowta.twi.tudelft.nl/users/vuik/numanal/kessels_presentation1.pdf · n+1 m un+1 m ¡un m¡1 ¢x Alternative un+1 m ¡un m ¢t = u n m un+1 m ¡un m¡1

January 22, 2007 6

VORtechComputing Delft University of Technology

Spatial discretization: grid

PSfrag replacements

11

2

2

3

3

4

5

m

n depthwater level U -velocityV -velocity

identical (m, n) index

one computational cell

Page 7: Improving convergence of QuickFlowta.twi.tudelft.nl/users/vuik/numanal/kessels_presentation1.pdf · n+1 m un+1 m ¡un m¡1 ¢x Alternative un+1 m ¡un m ¢t = u n m un+1 m ¡un m¡1

January 22, 2007 7

VORtechComputing Delft University of Technology

Spatial discretization: methods

Momentum equations:

• Third order upwind: U ∂V∂x

and V ∂U∂y

• Central difference

Continuity equations:• Finite volume

Page 8: Improving convergence of QuickFlowta.twi.tudelft.nl/users/vuik/numanal/kessels_presentation1.pdf · n+1 m un+1 m ¡un m¡1 ¢x Alternative un+1 m ¡un m ¢t = u n m un+1 m ¡un m¡1

January 22, 2007 8

VORtechComputing Delft University of Technology

Spatial discretization: boundaries

PSfrag replacements

water levelboundary

discharge orvelocity

boundary

closedfree slip

Page 9: Improving convergence of QuickFlowta.twi.tudelft.nl/users/vuik/numanal/kessels_presentation1.pdf · n+1 m un+1 m ¡un m¡1 ¢x Alternative un+1 m ¡un m ¢t = u n m un+1 m ¡un m¡1

January 22, 2007 9

VORtechComputing Delft University of Technology

Spatial discretization: moving boundary

PSfrag replacementsboundary

Hsurface

bottom

H ≤ δ ⇒ U = 0

Page 10: Improving convergence of QuickFlowta.twi.tudelft.nl/users/vuik/numanal/kessels_presentation1.pdf · n+1 m un+1 m ¡un m¡1 ¢x Alternative un+1 m ¡un m ¢t = u n m un+1 m ¡un m¡1

January 22, 2007 10

VORtechComputing Delft University of Technology

Time iteration: WAQUA - ADI

stage 1: V -momentum explicitdudt

= A1(ul,ul+1/2)

stage 2: U -momentum & continuity explicitdudt

= A2(ul+1/2,ul+1)

Stationary:dudt

= 1

2[A1(u,u) + A2(u,u)] ≡ A(u)

Page 11: Improving convergence of QuickFlowta.twi.tudelft.nl/users/vuik/numanal/kessels_presentation1.pdf · n+1 m un+1 m ¡un m¡1 ¢x Alternative un+1 m ¡un m ¢t = u n m un+1 m ¡un m¡1

January 22, 2007 11

VORtechComputing Delft University of Technology

Time iteration: Euler Backward

du

dt= A(u) ⇒

un+1 − u

n

∆t= A(un+1) ⇒

∆t M (un+1− u

n) + A(un+1) − b = 0

Advantages:• easy implementation• unconditionally stable

Page 12: Improving convergence of QuickFlowta.twi.tudelft.nl/users/vuik/numanal/kessels_presentation1.pdf · n+1 m un+1 m ¡un m¡1 ¢x Alternative un+1 m ¡un m ¢t = u n m un+1 m ¡un m¡1

January 22, 2007 12

VORtechComputing Delft University of Technology

Time iteration: Newtons method

F(x) ≡ ∆tM(un+1− u

n) + A(un+1) − b = 0

xk+1 = x

k− α

(

F′(xk)

)−1F(xk)

Advantages:• easy implementation• global convergence (line search)

Page 13: Improving convergence of QuickFlowta.twi.tudelft.nl/users/vuik/numanal/kessels_presentation1.pdf · n+1 m un+1 m ¡un m¡1 ¢x Alternative un+1 m ¡un m ¢t = u n m un+1 m ¡un m¡1

January 22, 2007 13

VORtechComputing Delft University of Technology

Test problem: Chézy

0.1 0.2 0.3 0.4 0.5 0.6 0.7

0.0

0.1

0.2

0.3

0.4

0.5

X−coordinate [km]

Y−

coor

dina

te [k

m]

Solution by WAQUA

[m]

0.2

0.4

0.6

0.8

1

1.2

• Rectangular gutter

• 25 × 11 grid cells

• inflow:velocity boundary

• outflow:water level boundary

Page 14: Improving convergence of QuickFlowta.twi.tudelft.nl/users/vuik/numanal/kessels_presentation1.pdf · n+1 m un+1 m ¡un m¡1 ¢x Alternative un+1 m ¡un m ¢t = u n m un+1 m ¡un m¡1

January 22, 2007 14

VORtechComputing Delft University of Technology

Test problems: real

Lek Randwijk

Page 15: Improving convergence of QuickFlowta.twi.tudelft.nl/users/vuik/numanal/kessels_presentation1.pdf · n+1 m un+1 m ¡un m¡1 ¢x Alternative un+1 m ¡un m ¢t = u n m un+1 m ¡un m¡1

January 22, 2007 15

VORtechComputing Delft University of Technology

Test problem: Lek

0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0

−0.5

0.0

0.5

1.0

1.5

2.0

X−coordinate [km]

Y−

coor

dina

te [k

m]

MAPS.sep at T=Inf, stationary

[m]

0.5

1

1.5

2

2.5

3

3.5

4

4.5

0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0

−0.5

0.0

0.5

1.0

1.5

2.0

X−coordinate [km]

Y−

coor

dina

te [k

m]

Difference WAQUA − QuickFlow

[m]

−7

−6

−5

−4

−3

−2

−1

0

1

2

x 10−3

• Relatively easy

• 42 × 34 grid cells

• inflow:discharge boundary

• outflow:water level boundary

Page 16: Improving convergence of QuickFlowta.twi.tudelft.nl/users/vuik/numanal/kessels_presentation1.pdf · n+1 m un+1 m ¡un m¡1 ¢x Alternative un+1 m ¡un m ¢t = u n m un+1 m ¡un m¡1

January 22, 2007 16

VORtechComputing Delft University of Technology

Test problem: Randwijk

170.0 175.0 180.0 185.0 190.0432.0

434.0

436.0

438.0

440.0

442.0

444.0

446.0

448.0

450.0

X−coordinate [km]

Y−

coor

dina

te [k

m]

Difference WAQUA − QuickFlow

[m]

−0.025

−0.02

−0.015

−0.01

−0.005

170.0 175.0 180.0 185.0 190.0432.0

434.0

436.0

438.0

440.0

442.0

444.0

446.0

448.0

450.0

X−coordinate [km]

Y−

coor

dina

te [k

m]

Difference WAQUA − QuickFlow

[m]

−0.025

−0.02

−0.015

−0.01

−0.005

• Relatively complex

• 287 × 26 grid cells

• inflow:discharge boundary

• outflow:water level boundary

Page 17: Improving convergence of QuickFlowta.twi.tudelft.nl/users/vuik/numanal/kessels_presentation1.pdf · n+1 m un+1 m ¡un m¡1 ¢x Alternative un+1 m ¡un m ¢t = u n m un+1 m ¡un m¡1

January 22, 2007 17

VORtechComputing Delft University of Technology

Improvements: damping BC’s

’hard’ open boundaries ⇒

nonphysical reflection of waves⇒ long ’run-up’ time

Remedie:damping boundary conditions

Page 18: Improving convergence of QuickFlowta.twi.tudelft.nl/users/vuik/numanal/kessels_presentation1.pdf · n+1 m un+1 m ¡un m¡1 ¢x Alternative un+1 m ¡un m ¢t = u n m un+1 m ¡un m¡1

January 22, 2007 18

VORtechComputing Delft University of Technology

Improvements: semi-explicit time

Example: advection equation∂u∂t

= u∂u∂x

Euler Backward & upwindun+1

m − unm

∆t= un+1

mun+1

m − unm−1

∆x

Alternativeun+1

m − unm

∆t= un

mun+1

m − unm−1

∆x

Implementation in Euler Backward or in Newton

Page 19: Improving convergence of QuickFlowta.twi.tudelft.nl/users/vuik/numanal/kessels_presentation1.pdf · n+1 m un+1 m ¡un m¡1 ¢x Alternative un+1 m ¡un m ¢t = u n m un+1 m ¡un m¡1

January 22, 2007 19

VORtechComputing Delft University of Technology

Improvements: quasi-Newton

Approximate Jacobian F′(x0) ≈ Bk

xk+1 = x

k−(

Bk)−1

F(

xk)

Advantages:• reduce costs for computing F′

• reduce costs for LU-decomposition of F′

• possibly faster convergence (depends onmethod)

Page 20: Improving convergence of QuickFlowta.twi.tudelft.nl/users/vuik/numanal/kessels_presentation1.pdf · n+1 m un+1 m ¡un m¡1 ¢x Alternative un+1 m ¡un m ¢t = u n m un+1 m ¡un m¡1

January 22, 2007 20

VORtechComputing Delft University of Technology

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

Page 21: Improving convergence of QuickFlowta.twi.tudelft.nl/users/vuik/numanal/kessels_presentation1.pdf · n+1 m un+1 m ¡un m¡1 ¢x Alternative un+1 m ¡un m ¢t = u n m un+1 m ¡un m¡1

January 22, 2007 21

VORtechComputing Delft University of Technology

Plan

• Resolve large errors near open boundaries• Inventorise & solve problems

• Chézy• Lek• Randwijk

Page 22: Improving convergence of QuickFlowta.twi.tudelft.nl/users/vuik/numanal/kessels_presentation1.pdf · n+1 m un+1 m ¡un m¡1 ¢x Alternative un+1 m ¡un m ¢t = u n m un+1 m ¡un m¡1

January 22, 2007 22

VORtechComputing Delft University of Technology

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

Page 23: Improving convergence of QuickFlowta.twi.tudelft.nl/users/vuik/numanal/kessels_presentation1.pdf · n+1 m un+1 m ¡un m¡1 ¢x Alternative un+1 m ¡un m ¢t = u n m un+1 m ¡un m¡1

January 22, 2007 23

VORtechComputing Delft University of Technology

Questions?