Top Banner
Performance of SIMPLE-type Preconditioners in CFD Applications for Maritime Industry Christiaan Klaij and Kees Vuik February 28, 2013 SIAM CSE 2013, Boston, USA
21

Performance of SIMPLE-type Preconditioners in CFD ...ta.twi.tudelft.nl/nw/users/vuik/siam_cse_2013/cse2013-cklaij.pdf · Performance of SIMPLE-type Preconditioners in CFD Applications

Mar 20, 2018

Download

Documents

lyxuyen
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Performance of SIMPLE-type Preconditioners in CFD ...ta.twi.tudelft.nl/nw/users/vuik/siam_cse_2013/cse2013-cklaij.pdf · Performance of SIMPLE-type Preconditioners in CFD Applications

Performance of SIMPLE-type Preconditionersin CFD Applications for Maritime Industry

Christiaan Klaij and Kees Vuik

February 28, 2013SIAM CSE 2013, Boston, USA

Page 2: Performance of SIMPLE-type Preconditioners in CFD ...ta.twi.tudelft.nl/nw/users/vuik/siam_cse_2013/cse2013-cklaij.pdf · Performance of SIMPLE-type Preconditioners in CFD Applications

Maritime Research Institute Netherlands

Located in Wageningen, Ede and Houston

Agents in Spain and Brasil

Joint Venture in China

330 employees

Foundation

Non-profit

Since 1932

9200 models

7100 propellers

2

Page 3: Performance of SIMPLE-type Preconditioners in CFD ...ta.twi.tudelft.nl/nw/users/vuik/siam_cse_2013/cse2013-cklaij.pdf · Performance of SIMPLE-type Preconditioners in CFD Applications

Activities

3

Page 4: Performance of SIMPLE-type Preconditioners in CFD ...ta.twi.tudelft.nl/nw/users/vuik/siam_cse_2013/cse2013-cklaij.pdf · Performance of SIMPLE-type Preconditioners in CFD Applications

OverviewProblem description: maritime applications require large, unstructuredgrids

• matrix-free approach for coupled Navier-Stokes system

• only compact stencil for velocity and pressure sub-systems

Proposed solution: solve coupled system with Krylov subspace methodand SIMPLE-type preconditioner

• coupled matrix not needed to build preconditioner

• special treatment of stabilization

Evaluation: SIMPLE as solver versus SIMPLE as preconditioner

• reduction in number of non-linear iterations and wall-clock time?

4

Page 5: Performance of SIMPLE-type Preconditioners in CFD ...ta.twi.tudelft.nl/nw/users/vuik/siam_cse_2013/cse2013-cklaij.pdf · Performance of SIMPLE-type Preconditioners in CFD Applications

Container vessel (unstructured grid)

RaNS equations

k-ω turbulence model

y+ ≈ 1

Model-scale:

Re = 1.3 · 107

13.3m cells

max aspect ratio 1 : 1600

5

Page 6: Performance of SIMPLE-type Preconditioners in CFD ...ta.twi.tudelft.nl/nw/users/vuik/siam_cse_2013/cse2013-cklaij.pdf · Performance of SIMPLE-type Preconditioners in CFD Applications

Tanker (block-structured grid)

Model-scale:

Re = 4.6 · 106

2.0m cells

max aspect ratio 1 : 7000

Full-scale:

Re = 2.0 · 109

2.7m cells

max aspect ratio 1 : 930 000

6

Page 7: Performance of SIMPLE-type Preconditioners in CFD ...ta.twi.tudelft.nl/nw/users/vuik/siam_cse_2013/cse2013-cklaij.pdf · Performance of SIMPLE-type Preconditioners in CFD Applications

streamlines around the stern and the axial velocity field in the wake.

7

Page 8: Performance of SIMPLE-type Preconditioners in CFD ...ta.twi.tudelft.nl/nw/users/vuik/siam_cse_2013/cse2013-cklaij.pdf · Performance of SIMPLE-type Preconditioners in CFD Applications

DiscretizationCo-located, cell-centered finite volume discretization of the steadyNavier-Stokes equations with Picard linearization leads to linear system:2666664

Q1 0 0 G1

0 Q2 0 G2

0 0 Q3 G3

D1 D2 D3 C

3777775

2666664u1

u2

u3

p

3777775 =

2666664f1

f2

f3

g

3777775 for brevity:

24Q G

D C

35 24u

p

35 =

24f

g

35

with Q1 = Q2 = Q3.

⇒ Solve system with FGMRES and SIMPLE-type preconditionerTurbulence equations (k-ω model) remain segregated

8

Page 9: Performance of SIMPLE-type Preconditioners in CFD ...ta.twi.tudelft.nl/nw/users/vuik/siam_cse_2013/cse2013-cklaij.pdf · Performance of SIMPLE-type Preconditioners in CFD Applications

Defect correction: cornerstone of FVMConsider a lower-order scheme (e.g. the upwind scheme)

QUDS u = fUDS

and a higher-order scheme (e.g. central or κ-scheme with limiter)

QCDS u = fCDS

Then a single defect correction becomes

QUDS uk+1 = fCDS − (QCDS u

k −QUDS uk)

⇒ matrix QUDS is an M-matrix. Easy to solve. Eccentricity andnon-orthogonality corrections also in defect correction form.

9

Page 10: Performance of SIMPLE-type Preconditioners in CFD ...ta.twi.tudelft.nl/nw/users/vuik/siam_cse_2013/cse2013-cklaij.pdf · Performance of SIMPLE-type Preconditioners in CFD Applications

Series of linear partial differential eqs:

CFD model: non-linear partial differential eqs (Navier-Stokes):

Preconditioner: AP−1y = b, x = P−1y

Ax = b[Q GD C

] [up

]=

[fg

]

Momentum:

Qu = f

Pressure:

Rp = g

with R ≡ C −Ddiag(Q)−1G

SIMPLEP−1 ≡

[I −diag(Q)−1G0 I

] [Q 0D R

]−1

Picard linearization

Finite Volume discretization

Krylov subspace method

N(x) = 0

(ρu2)(k+1) ≈ (ρu)(k)u(k+1)

x(k+1) = x(k) + ωA−1k (b− Akx

(k))

non-linear iterations

linear iterations

sub-sytem linear iterations

Linear system of algebraic equations:

Page 11: Performance of SIMPLE-type Preconditioners in CFD ...ta.twi.tudelft.nl/nw/users/vuik/siam_cse_2013/cse2013-cklaij.pdf · Performance of SIMPLE-type Preconditioners in CFD Applications

SIMPLE-methodGiven uk and pk:

1. solve Qu∗ = f −Gpk

2. solve (C −DQ−1G)p′ = g −Du∗ − Cpk

3. compute u′ = −Q−1Gp′

4. update uk+1 = u∗ + u′ and pk+1 = pk + p′

with the SIMPLE approximation Q−1 ≈ diag(Q)−1.

⇒ “Matrix-free”: only assembly and storage of Q and(C −DQ−1G). For D, G and C the action suffices.

10

Page 12: Performance of SIMPLE-type Preconditioners in CFD ...ta.twi.tudelft.nl/nw/users/vuik/siam_cse_2013/cse2013-cklaij.pdf · Performance of SIMPLE-type Preconditioners in CFD Applications

SIMPLER: additional pressure prediction

Given uk and pk, start with a pressure prediction:

1. solve(C −D diag(Q)−1G)p∗ = g −Duk −D diag(Q)−1(f −Quk)

2. continue with SIMPLE using p∗ instead of pk

11

Page 13: Performance of SIMPLE-type Preconditioners in CFD ...ta.twi.tudelft.nl/nw/users/vuik/siam_cse_2013/cse2013-cklaij.pdf · Performance of SIMPLE-type Preconditioners in CFD Applications

Some practical constraintsCompact stencils are preferred on unstructured grids:

• neighbors of cell readily available; neighbors of neighbors not

Also preferred because of MPI parallel computation:

• domain decomposition, communication

Compact stencil?

3 Matrix Q1(= Q2 = Q3), thanks to defect correction

7 Stabilization matrix C

⇒ modify SIMPLE(R) such that C is not required on the l.h.s.

12

Page 14: Performance of SIMPLE-type Preconditioners in CFD ...ta.twi.tudelft.nl/nw/users/vuik/siam_cse_2013/cse2013-cklaij.pdf · Performance of SIMPLE-type Preconditioners in CFD Applications

Treatment of stabilization matrix• In SIMPLE, neglect C in l.h.s. of pressure correction equation

(C −Ddiag(Q)−1G)p′ = g −Du∗ − Cpk

−Ddiag(Q)−1Gp′ = g −Du∗ − Cpk

• In SIMPLER, do not involve the mass equation when deriving thepressure prediction p∗

(C −D diag(Q)−1G)p∗ = g −Duk −D diag(Q)−1(f −Quk)

−D diag(Q)−1Gp∗ = −D diag(Q)−1(f −Quk)

13

Page 15: Performance of SIMPLE-type Preconditioners in CFD ...ta.twi.tudelft.nl/nw/users/vuik/siam_cse_2013/cse2013-cklaij.pdf · Performance of SIMPLE-type Preconditioners in CFD Applications

Example of iterative convergence (tanker)

SIMPLE KRYLOV-SIMPLER

1e-14

1e-12

1e-10

1e-08

1e-06

0.0001

0.01

1

0 1000 2000 3000 4000 5000

RM

S r

esid

uals

non-linear iterations

mom-umom-vmom-wmass-p

turb-kturb-o

1e-14

1e-12

1e-10

1e-08

1e-06

0.0001

0.01

1

0 200 400 600 800 1000R

MS

resid

uals

non-linear iterations

mom-umom-vmom-wmass-p

turb-kturb-o

ωu = 0.2 ωp = 0.1 ωu = 0.8 ωp = 0.3

14

Page 16: Performance of SIMPLE-type Preconditioners in CFD ...ta.twi.tudelft.nl/nw/users/vuik/siam_cse_2013/cse2013-cklaij.pdf · Performance of SIMPLE-type Preconditioners in CFD Applications

Container vessel

Tables show number of non-linear iterations and wall clock timeneeded to converge to machine precision, starting from uniformflow.

Model-scale Re = 1.3 · 107, max cell aspect ratio 1 : 1600

grid CPU cores SIMPLE KRYLOV-SIMPLER

# its Wall clock # its Wall clock

13.3m 128 3187 5h 26mn 427 3h 27mn

15

Page 17: Performance of SIMPLE-type Preconditioners in CFD ...ta.twi.tudelft.nl/nw/users/vuik/siam_cse_2013/cse2013-cklaij.pdf · Performance of SIMPLE-type Preconditioners in CFD Applications

TankerModel-scale Re = 4.6 · 106, max cell aspect ratio 1 : 7000

grid CPU cores SIMPLE KRYLOV-SIMPLER

its Wall clock its Wall clock

0.25m 8 1379 25mn 316 29mn

0.5m 16 1690 37mn 271 25mn

1m 32 2442 57mn 303 35mn

2m 64 3534 1h 29mn 519 51mn

Full-scale Re = 2.0 · 109, max cell aspect ratio 1 : 930 000

grid CPU cores SIMPLE KRYLOV-SIMPLER

its Wall clock its Wall clock

2.7m 64 29 578 16h 37mn 1330 3h 05mn

16

Page 18: Performance of SIMPLE-type Preconditioners in CFD ...ta.twi.tudelft.nl/nw/users/vuik/siam_cse_2013/cse2013-cklaij.pdf · Performance of SIMPLE-type Preconditioners in CFD Applications

Remaining problems

1e-14

1e-12

1e-10

1e-08

1e-06

0.0001

0.01

1

0 200 400 600 800 1000

RM

S r

esid

ua

ls

non-linear iterations

mom-umom-vmom-wmass-p

turb-kturb-o

0.1

1

0 5 10 15 20 25 30 35

lin

ea

r re

sid

ua

l

linear iterations

Outer convergence... ...but inner stagnation(!)

• Larger nb of non-linear iters to compensate for stagnation of lineariter. Does not happen for academic cases (backward-facing step,lid-driven cavity, finite flat plate)

17

Page 19: Performance of SIMPLE-type Preconditioners in CFD ...ta.twi.tudelft.nl/nw/users/vuik/siam_cse_2013/cse2013-cklaij.pdf · Performance of SIMPLE-type Preconditioners in CFD Applications

Remaining problems (cont’d)

Main theoretical weakness is the approximation of the Schurcomplement S ≡ C −DQ−1G

1. The SIMPLE approximation Q−1 ≈ diag(Q)−1.

2. The stabilization matrix C is moved to r.h.s

3. The matrix −Ddiag(Q)−1G is approximated by a matrix R withlocal stencil.

Other weaknesses are on the level of the discretization(Picard linearization, defect corrections, ...)

18

Page 20: Performance of SIMPLE-type Preconditioners in CFD ...ta.twi.tudelft.nl/nw/users/vuik/siam_cse_2013/cse2013-cklaij.pdf · Performance of SIMPLE-type Preconditioners in CFD Applications

Summary

• Coupled Navier-Stokes system has 10 blocks, we onlyassemble and store 2, for the others their action suffices.

• The stabilization matrix C has a wide stencil, we changedSIMPLE(R) so that its assembly and storage is not needed.

• For maritime applications, we find that SIMPLE(R) aspreconditioner reduces the number of non-linear iterations by 5to 20 and the CPU time by 2 to 5. Greatest reduction found formost difficult case.

19

Page 21: Performance of SIMPLE-type Preconditioners in CFD ...ta.twi.tudelft.nl/nw/users/vuik/siam_cse_2013/cse2013-cklaij.pdf · Performance of SIMPLE-type Preconditioners in CFD Applications

Summary (cont’d)C.M. Klaij and C. Vuik, SIMPLE-type preconditioners for cell-centered, colocatedfinite volume discretization of incompressible Reynolds-averaged Navier-Stokesequations, Int. J. Numer. Meth. Fluids 2013, 71(7):830–849.

Contains details on:

• academic benchmark cases (backward-facing step, lid-driven cavity,flat plate)

• choice of relaxation parameters

• choice of linear solvers and relative tolerances for sub-systems

• other variants (MSIMPLE and MSIMPLER)

• ...

20