Stokes preconditioning for Channelflow and Openpipeflow · 2018-11-08 · Jake Langham Ashley...

30
Stokes preconditioning for Channelflow and Openpipeflow Laurette Tuckerman Jake Langham Ashley Willis

Transcript of Stokes preconditioning for Channelflow and Openpipeflow · 2018-11-08 · Jake Langham Ashley...

Page 1: Stokes preconditioning for Channelflow and Openpipeflow · 2018-11-08 · Jake Langham Ashley Willis . Computation of steady state in plane Couette flow using Channelflow (Gibson)

Stokes preconditioning for

Channelflow and Openpipeflow

Laurette TuckermanJake LanghamAshley Willis

Page 2: Stokes preconditioning for Channelflow and Openpipeflow · 2018-11-08 · Jake Langham Ashley Willis . Computation of steady state in plane Couette flow using Channelflow (Gibson)

Computation of steady state in plane Couette flow using Channelflow (Gibson)

Fourier in x,z / Chebyshev in y

Page 3: Stokes preconditioning for Channelflow and Openpipeflow · 2018-11-08 · Jake Langham Ashley Willis . Computation of steady state in plane Couette flow using Channelflow (Gibson)

Computation of traveling waves in pipe flow using Openpipeflow (Willis)

Fourier in θ, z / finite differences in r

Page 4: Stokes preconditioning for Channelflow and Openpipeflow · 2018-11-08 · Jake Langham Ashley Willis . Computation of steady state in plane Couette flow using Channelflow (Gibson)

Methods used in hydrodynamics for computing steady states and traveling waves

Newton with full direct Jacobian inversion: from 1980s: Keller, Busse & Clever, Nagata, Generalis, Kerswell, Eckhardt scales like M3, so limited to small resolutions

non-Newton or variants of Newton: Newton-Picard with subspace iteration: Lust & Roose Selective frequency damping: Akervik Recursive projection method: Keller & Shroff

Newton with matrix-free Jacobian inversion via Stokes preconditioning: from 1989: Tuckerman, Henry/Bergeon/Beaume, Mercader, Mellibovsky

Newton with matrix-free Jacobian inversion via integration: from 2004: Sanchez-Umbria, Viswanath, Duguet, Gibson, Willis

Page 5: Stokes preconditioning for Channelflow and Openpipeflow · 2018-11-08 · Jake Langham Ashley Willis . Computation of steady state in plane Couette flow using Channelflow (Gibson)

Other computations using Stokes preconditioning

...................................................................................................................................................................................................................................................................

4634

Mercedes

5000 7000 10 000 20 000 30 000

.....................................................................................................................................................................................................................................

18 762

Cloverleaf

5000 7000 10 000

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

...

...

..

..

..

..

..

..

.........................................................

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

..

...

..

...

..

...

...

...

...

...

...

...

....

....

....

....

..................................................................................

Mitsubishi

4650 5000 7000 10 000

Marigold

2100 4650 5000 7000 10 000 20 0004103

Conductive|1985

|4103

|4634

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

5503

|18 762

Rayleigh-Bénard convection in a cylinder of aspect ratio with radius / height =2 Pseudospectral computation with (Mr,Mθ,Mz)=(60,130,30), leading to 500 000 degrees of freedom. From Boronska & Tuckerman Phys Rev E (2010).

Page 6: Stokes preconditioning for Channelflow and Openpipeflow · 2018-11-08 · Jake Langham Ashley Willis . Computation of steady state in plane Couette flow using Channelflow (Gibson)

3D binary fluid convection in a porous medium in cavity of size 6 x 6 x 1. Spectral element computation with 6 elements per quarter each with (23,23,17) points. From LoJacono, Bergeon & Knobloch FDR (2017).

Other computations using Stokes preconditioning

Page 7: Stokes preconditioning for Channelflow and Openpipeflow · 2018-11-08 · Jake Langham Ashley Willis . Computation of steady state in plane Couette flow using Channelflow (Gibson)

1800 1900 2000 21000

0.02

0.04

0.06

Rayleigh number

Nu −

1

SOC15

2PH15

2PC15

θ

R=2111 (2PH15)

R=1955 (2PH15)

R=1938 (2PC15)

C

Nuss

elt -

1

Other computations using Stokes preconditioning

Binary fluid convection in a domain with aspect ratio width / height = 14. Spectral computation. From Mercader, Batiste, Alonso & Knobloch JFM (2011).

Page 8: Stokes preconditioning for Channelflow and Openpipeflow · 2018-11-08 · Jake Langham Ashley Willis . Computation of steady state in plane Couette flow using Channelflow (Gibson)

Other computations using Stokes preconditioning

Steady states of a streamwise-independent reduced model for plane Couette flow.at Re ≈ 1000. Spectral element computation. From Beaume, Chini, Julien & Knobloch PRE (2015).

Page 9: Stokes preconditioning for Channelflow and Openpipeflow · 2018-11-08 · Jake Langham Ashley Willis . Computation of steady state in plane Couette flow using Channelflow (Gibson)

Ulam= y ex Ulam= (1-y2) exUlam= (1-r2) ez

Page 10: Stokes preconditioning for Channelflow and Openpipeflow · 2018-11-08 · Jake Langham Ashley Willis . Computation of steady state in plane Couette flow using Channelflow (Gibson)

For a long time, the only regular solutions known were the analytic laminar ones. First new solution found numerically for plane Couette flow by Nagata (1990). Then many many many many other solutions were found. Is turbulence a chaotic attractor with these solutions forming a skeleton?

Gibson, Halcrow, Cvitanovic, J. Fluid Mech. (2008)

Page 11: Stokes preconditioning for Channelflow and Openpipeflow · 2018-11-08 · Jake Langham Ashley Willis . Computation of steady state in plane Couette flow using Channelflow (Gibson)

Experimental Observation of Nonlinear Traveling Waves in Turbulent Pipe FlowHof, van Doorne, Westerweel, Nieuwstadt, Faisst, Eckhardt, Wedin, Kerswell, WaleffeScience (2004)

Experiment: instantaneous snapshots

Numerics: computed traveling wave solutions

Page 12: Stokes preconditioning for Channelflow and Openpipeflow · 2018-11-08 · Jake Langham Ashley Willis . Computation of steady state in plane Couette flow using Channelflow (Gibson)

∂U∂t

= LU + N(U)

0 = LU + N(U)

Navier-Stokes

Steady states

Steady states OR T-periodic orbits0 = U(T ) − U(0) ≡ (ΦT − I)U(0)

ΦT ≈ (BΔt)T/Δt

In theory ΦT : U(0) → U(T )

In practice

BΔt ≡ (I − ΔtL)−1(I + ΔtN)

where a single small timestep is, for example:

Page 13: Stokes preconditioning for Channelflow and Openpipeflow · 2018-11-08 · Jake Langham Ashley Willis . Computation of steady state in plane Couette flow using Channelflow (Gibson)

≈ Δt(L + N)≈ − L−1(L + N) for Δt large

for Δt small{

BΔt − I = (I − ΔtL)−1(I + ΔtN) − I= (I − ΔtL)−1[(I + ΔtN) − (I − ΔtL)]= (I − ΔtL)−1Δt(L + N) has same roots as L+N

Hence Δt interpolates between no preconditioner and preconditioning by L-1

Find roots via Newton’s method Solve linear systems of Newton’s method via BiCGSTAB

Page 14: Stokes preconditioning for Channelflow and Openpipeflow · 2018-11-08 · Jake Langham Ashley Willis . Computation of steady state in plane Couette flow using Channelflow (Gibson)

GUu = G(U)U ← U − u

G(U), GU G(U), G2U G(U), … Gk

U G(U), … GK−1U G(U)

Solve linear systems of Newton’s method via BiCGSTAB or GMRES or IDR or … Construct estimate of solution u within Krylov space:

Find roots via Newton’s method

Cost of making K-space should be product of: —number K of Krylov vectors constructed = actions of GU —cost of single action of GU

Page 15: Stokes preconditioning for Channelflow and Openpipeflow · 2018-11-08 · Jake Langham Ashley Willis . Computation of steady state in plane Couette flow using Channelflow (Gibson)

GStokesT ≡ BT − I

finds roots of

L + N =∂U∂t

GintT ≡ (BΔt)T/Δt − I

ΦT − I = U(T) − U(0)

finds roots of

many timesteps (T/Δt) per action of G

single timestep per action of G

Page 16: Stokes preconditioning for Channelflow and Openpipeflow · 2018-11-08 · Jake Langham Ashley Willis . Computation of steady state in plane Couette flow using Channelflow (Gibson)

(Gibson) in plane Couette flow Computation of steady state using Channelflow

NCBW: Nagata Clever Busse Waleffe solution

Page 17: Stokes preconditioning for Channelflow and Openpipeflow · 2018-11-08 · Jake Langham Ashley Willis . Computation of steady state in plane Couette flow using Channelflow (Gibson)

GStokes Gint

factor of 11

Computation of steady state using Channelflow

Page 18: Stokes preconditioning for Channelflow and Openpipeflow · 2018-11-08 · Jake Langham Ashley Willis . Computation of steady state in plane Couette flow using Channelflow (Gibson)

Total number of timesteps is product of K and (T/Δt) Integration method has lower K and higher (T/Δt) Stokes method has higher K and (T/Δt) = 1

Computation of steady state using Channelflow

Page 19: Stokes preconditioning for Channelflow and Openpipeflow · 2018-11-08 · Jake Langham Ashley Willis . Computation of steady state in plane Couette flow using Channelflow (Gibson)

Computation of traveling waves in pipe flow using Openpipeflow (Willis)

Fourier in θ, z / finite differences in r

Page 20: Stokes preconditioning for Channelflow and Openpipeflow · 2018-11-08 · Jake Langham Ashley Willis . Computation of steady state in plane Couette flow using Channelflow (Gibson)

∂U∂t

= − C∂U∂x

0 = LU + N(U) + C∂U∂x

Traveling waves

Additional unknown C Additional phase condition

Page 21: Stokes preconditioning for Channelflow and Openpipeflow · 2018-11-08 · Jake Langham Ashley Willis . Computation of steady state in plane Couette flow using Channelflow (Gibson)

factor of 35

Computation of traveling waves using Openpipeflow

Page 22: Stokes preconditioning for Channelflow and Openpipeflow · 2018-11-08 · Jake Langham Ashley Willis . Computation of steady state in plane Couette flow using Channelflow (Gibson)

As Re increases, the performance ratio measured by timesteps remains nearly constant. But the performance ratio measured by CPU time decreases drastically.

Why?

Page 23: Stokes preconditioning for Channelflow and Openpipeflow · 2018-11-08 · Jake Langham Ashley Willis . Computation of steady state in plane Couette flow using Channelflow (Gibson)

GMRES:

G(U), GU G(U), G2U G(U), … Gk

U G(U), … GK−1U G(U)

Construct estimate of solution u within Krylov space:

Each Krylov vector must be orthogonalized to every other. For K small, this cost is negligible. But not for K large.

where M is the number of gridpoints and 1 < α < 2

As Re increases, K increases. Why?

CPU ≈ cactionTΔt

KM1+α + corthK2M

Page 24: Stokes preconditioning for Channelflow and Openpipeflow · 2018-11-08 · Jake Langham Ashley Willis . Computation of steady state in plane Couette flow using Channelflow (Gibson)

Operator spectra for Re = 500

Page 25: Stokes preconditioning for Channelflow and Openpipeflow · 2018-11-08 · Jake Langham Ashley Willis . Computation of steady state in plane Couette flow using Channelflow (Gibson)

λmodelk = − k2/Re ± ikU

λStokesk ≈

λmodelk

k2/Re= − 1 ± iURe/k

( 1Re

∇2 + U∂x) u

Page 26: Stokes preconditioning for Channelflow and Openpipeflow · 2018-11-08 · Jake Langham Ashley Willis . Computation of steady state in plane Couette flow using Channelflow (Gibson)

Quantitative predictions for the spectra1) Most negative real value of λmodel is proportional to 1/Re

λmodelmost negative(Re = 500)

λmodelmost negative(Re = 1750)

=−360−105

= 3.5 ≈1750500

λmodelk = − k2/Re ± ikU

λStokesk ≈

λmodelk

k2/Re= − 1 ± iURe/k

2) Largest imaginary value of λStokes is proportional to Re

λStokeslargest imaginary(Re = 500)

λmodellargest imaginary(Re = 1750)

=35100

=1

2.9≈

5001750

Page 27: Stokes preconditioning for Channelflow and Openpipeflow · 2018-11-08 · Jake Langham Ashley Willis . Computation of steady state in plane Couette flow using Channelflow (Gibson)

Operator spectra for Re = 1750

Page 28: Stokes preconditioning for Channelflow and Openpipeflow · 2018-11-08 · Jake Langham Ashley Willis . Computation of steady state in plane Couette flow using Channelflow (Gibson)

3) Radius r of circle surrounding (-1,0) containing 95% of eigenvalues of Gint

r = e−Tk2* /Re ⟹ ln(1/r) = Tk2

* /Re

ln(1/r1)ln(1/r2)

=7.081.877

= 3.77 ≈1750500

=Re2

Re1

Conditioning of Gint depends on T/Re: can compensate for increasing Re by increasing T

Seek to reduce large imaginary eigenvalues of GStokes

k > k*These eigenvalues correspond to

Page 29: Stokes preconditioning for Channelflow and Openpipeflow · 2018-11-08 · Jake Langham Ashley Willis . Computation of steady state in plane Couette flow using Channelflow (Gibson)

NUu = − [U ⋅ ∇)u + (u ⋅ ∇)U − Ulam ∂xu + 2vU′�lamex]

U = Ulam(y) ex + U

Lu = ( 1Re

∇2 − Ulam∂x) u

∇ ⋅ (Lu) =1

Re∇2(∇ ⋅ u) − Ulam(y) ∂x(∇ ⋅ u) − U′�lam(y) ∂xv

Lu =1

Re∇2u − Ulam ∂xu + vU′�lamex

Seek to reduce large imaginary eigenvalues of GStokes

λStokesk ≈

λmodelk

k2/Re= − 1 ± iURe/k

Lu =1

Re∇2uimplicit NUu = − [U ⋅ ∇)u + (u ⋅ ∇)U]explicit

NUu = − [Ulam(y)∂xu + vU′�lam(y) ex + (U ⋅ ∇)u + (u ⋅ ∇)U]probably most responsible for bad conditioning AND easiest to make implicit!

BUT

SO ∇ ⋅ u = 0⟹∇ ⋅ Lu = 0

redefine

Bad for pressure projection step

redefine

so

WILL IT WORK????? WE HOPE SO!

Page 30: Stokes preconditioning for Channelflow and Openpipeflow · 2018-11-08 · Jake Langham Ashley Willis . Computation of steady state in plane Couette flow using Channelflow (Gibson)

Summary

Stokes preconditioning method (Tuckerman, 1989)

Computes steady states or traveling waves

Finds roots of L+N via preconditioned L-1(L+N)

Very easily implemented in time-stepping code with implicit viscous step

Can be up to 50 times faster than integration method

But conditioning worsens with increasing Reynolds number (trying to fix with implicit advective)