• Nie Znaleziono Wyników

Applications of preconitioned Newton-Krylov methods

N/A
N/A
Protected

Academic year: 2021

Share "Applications of preconitioned Newton-Krylov methods"

Copied!
57
0
0

Pełen tekst

(1)

APPLICATIONS OF PRECONDITIONED

NEWTON-KRYLOV METHODS

ulent D¨

uz

September 15, 2009 in Delft

Bo˘gazi¸ci University - Department of Mechanical Engineering Flow Modeling & Simulation Laboratory

(2)

1

Motivation

2

Numerical Tools

3

Details of the Analysis

4

Results and Discussion

5

Future Works

(3)

Role of CFD

Analysis

Design (Direct and Inverse Approach)

Optimization

(4)

Nonlinear Equations

Discretization yields a system of nonlinear equations

Nonlinear-GS (or Jacobi)

Newton’s Method (Inexact NM)

Full Approximation Scheme (Multigrid)

Picard - (governing equations one-by-one )

(5)
(6)

Newton’s Method

Used to linearize the non-linear system of equations.

1

J(x

k

)∆x

k+1

= −f (x

k

)

2

x

k+1

= x

k

+ ∆x

k+1

3

J

ij

=

∂x

∂f

ij

Quadratically convergent from good starting guesses.

Not globally convergent

(7)

Krylov Methods and Preconditioners

Following linear Krylov sub-space solvers are used.

BiCGSTAB (Bi-conjugate Gradient Stabilized)

GMRES (Generalized Minimal Residual)

Combined with the preconditioners

Jacobi

SGS (Symmetric Gauss-Seidel)

(8)

Matrix-free algorithms

Using directional differencing the Jacobian matrix vector

multiplications are carried out using only the f vector.

Jv

=

f

(x + ǫv ) − f (x)

ǫ

(1)

where

ǫ = σ

1/2

/kxk[8]

(2)

if kxk = 0, the result of the matrix vector product is set identically

to zero.

(9)

Matrix-free algorithms

Advantages:

Low memory requirement

Faster matrix vector multiplications

Suitable for using storage schemes and some preconditioners

such as Jacobi, SGS.

Disadvantages:

(10)

Compressed Storage Schemes

CCS (Compressed Column Storage):

Value vector: Stores the subsequent non-zeros of the matrix

rows.

Row indicator: Stores the row indexes of the elements in the

value vector.

Column pointer: Stores the locations in the value vector that

start a column.

(11)

Grid Generation - 2D

The Winslow Equations

g22 ∂2x ∂ξ2− 2g12 ∂2x ∂ξ∂η+ g11 ∂2x ∂η2 = −g  P∂x ∂ξ+ Q ∂x ∂η  (3) g22 ∂2y ∂ξ2− 2g12 ∂2y ∂ξ∂η+ g11 ∂2y ∂η2 = −g  P∂y ∂ξ+ Q ∂y ∂η  (4) where g = g11g22− g12g12and P(ξ, η), Q(ξ, η) are suitably selected control functions.

A set of possible control functions was proposed by Thompson, Thames, and and Mastin (The TTM Method):

P(ξ, η) = − N X n=1 an (ξ − ξn) |ξ − ξn|e −cn|ξ−ξn|XI i=1 bi (ξ − ξi) |ξ − ξi| e−di h (ξ−ξi)2+(η−ηi)2i12 (5) Q(ξ, η) = − N X n=1 an (η − ηn) |η − ηn| e−cn|η−ηn |− I X i=1 bi (η − ηi) |η − ηi| e−di h (ξ−ξi)2+(η−ηi)2i12 (6)

(12)

Domain Decomposition Methods

The idea: Divide the problem into regions and solve them

separately instead of dealing with it as a whole.

Advantages:

Geometrical simplicity

Application of different modeling equations For example;

Navier Stoke’s at the objects proximity and Euler at the other

regions

Gain in computation speed with parallel processing

(13)

External Flow: Flow Past an Airfoil

Figure:

Seperate domains

(14)

Overlapping Domains

From the cartesian domain to the inner by simple interpolation

From the inner domain to the cartesian by bilinear

interpolation

Repeat the process until the convergence is achieved

(15)

Advantages

No grid generation in the cartesian domain

Dealing with complex geometries is easier

Solving the equations for the cartesian and inner domain

separately (parallel computing)

Calculation of the flow at different angle of attacks

(16)

Internal Flow: Flow Between Turbomachinery Blades

Shock waves

Turbulent boundary layers and wakes

Complex geometry

(17)

Flow Between Turbomachinery Blades

(18)

Flow Between Turbomachinery Blades

(19)

Flow Between Turbomachinery Blades

(20)

Formulations and Assumptions

Stream Function-Vorticity formulation (2D)

Velocity-Vorticity formulation (2D - 3D)

Steady and incompressible (2D - 3D)

Finite difference discretization (2D - 3D)

(21)

Governing Equations in 2D

Stream function - Vorticity:

2

Ψ + Ω = 0

(7)

2

Ω − Re

 ∂Ψ

∂y

∂Ω

∂x

∂Ψ

∂x

∂Ω

∂y



= 0

(8)

Velocity - Vorticity:

2

u

∂x

2

+

2

u

∂y

2

= −

∂Ω

∂y

(9)

2

v

∂x

2

+

2

v

∂y

2

=

∂Ω

∂x

(10)

u

∂Ω

∂x

+ v

∂Ω

∂y

=

1

Re

 ∂

2

∂x

2

+

2

∂y

2



(11)

(22)

Coordinate Transformation

(23)

Transformed Form of The Governing Equations in 2D

Stream Function Equation ∂ψ ∂η " ∂y ∂ξ ∂2x ∂ξ2α+ ∂2x ∂η2β− 2 ∂2x ∂ξ∂ηγ ! −∂x ∂ξ ∂2y ∂ξ2α+ ∂2y ∂η2β− 2 ∂2y ∂ξ∂ηγ ! # +∂ψ ∂ξ " ∂x ∂η ∂2y ∂ξ2α+ ∂2y ∂η2β− 2 ∂2y ∂ξ∂ηγ ! −∂y ∂ξ ∂2x ∂ξ2α+ ∂2x ∂η2β− 2 ∂2x ∂ξ∂ηγ ! # +∂ 2ψ ∂ξ2Jα+ ∂2ψ ∂η2Jβ− 2 ∂2ψ ∂ξ∂ηJγ= −J 3 (12) Vorticity Transport Equation

Re∂ψ ∂η ∂Ω ∂ξJ ∂x ∂ξ ∂y ∂η− ∂y ∂ξ ∂x ∂η  + Re∂ψ ∂ξ ∂Ω ∂ηJ ∂x ∂η ∂y ∂ξ− ∂y ∂η ∂x ∂ξ  = +∂Ω ∂η " ∂y ∂ξ ∂2x ∂ξ2α+ ∂2x ∂η2β− 2 ∂2x ∂ξ∂ηγ ! −∂x ∂ξ ∂2y ∂ξ2α+ ∂2y ∂η2β− 2 ∂2y ∂ξ∂ηγ ! # +∂Ω ∂ξ " ∂x ∂η ∂2y ∂ξ2α+ ∂2y ∂η2β− 2 ∂2y ∂ξ∂ηγ ! −∂y ∂η ∂2x ∂ξ2α+ ∂2x ∂η2β− 2 ∂2x ∂ξ∂ηγ ! # +∂ 2 ∂ξ2Jα+ ∂2Ω ∂η2Jβ− 2 ∂2Ω ∂ξ∂ηJγ (13)

(24)

Governing Equations in 3D

Equations for the velocity components in vector form:

2

¯

u

= − ¯

∇ × ¯

(14)

The three-component vorticity transport equation,:

¯

u. ¯



¯

Ω − ¯

Ω. ¯

∇ ¯u −

1

Re

(25)

Boundary conditions

(26)

Flow Past an Airfoil

(a) Stream function contours

(b) Vorticity contours

Figure:

Flow Past an Airfoil (Re=50)

(27)

Flow Past an Airfoil

(a) Stream function contours

(b) Vorticity contours

Figure:

Flow Past an Airfoil (Re=50)

(28)

Stream function contours

(a) Re=100

(b) Re=500

(29)

Vorticity contours

(a) Re=100

(b) Re=500

(30)

Streamtrace contours

(a) Streamtrace contours

(b) Streamtrace contours

Figure:

Velocity-Vorticity Approach

(31)

Streamtrace contours

(a) Streamtrace contours

(b) Streamtrace contours

Figure:

Velocity-Vorticity Approach

(32)

Vorticity contours

(a) Vorticity contours

(b) Vorticity contours

Figure:

Velocity-Vorticity Approach

(33)

Vorticity contours

(a) Vorticity contours

(b) Vorticity contours

Figure:

Velocity-Vorticity Approach

(34)

Streamtrace contours

(a) Streamtrace contours (b) Streamtrace contours

Figure:

Velocity-Vorticity Approach

(35)

Streamtrace contours

(a) Vorticity contours

(b) Vorticity contours

Figure:

Velocity-Vorticity Approach

(36)

Performance

(37)

Comparison of the Solvers and the Preconditioners

(38)

Comparison of the Solvers and the Preconditioners

Implementation of an effective preconditioner is crucial.

Jacobi does not have a major effect on the convergence

pattern.

BiCGSTAB has a more stable pattern than GMRES and is the

fastest solver by means of iteration steps and computation

time.

GMRES is the most stable solver, enables a continuous

residual reduction.

In GMRES the computational work increases linearly with the

iteration⇒ Restartable GMRES(m)

(39)

Fluid-Structure Interaction

The idea:

Extract grid points on the blade surface from ANSYS to an

aerodynamic code

Generate grid, execute fluid analysis and achieve the velocity,

vorticity and pressure fields

Transfer pressure values to ANSYS, execute solid analysis and

acquire displacements

With storing displacements from ANSYS, finish first step of

FSI

By using displacements from ANSYS, update geometry and

start second step

(40)

Future Works

Parallel Computing

Nonlinear Preconditioning

Multigrid/Multilevel Techniques

(41)

Schobeiri, M., Turbomachinery Flow Physics and Dynamic Performance, Springer, 2005

Hoffman, K.A., Computational Fluid Dynamics for Enginners - Volume I, Engineering Education System,

Kansas, 1997.

Saad, Y., Iterative Methods for Sparse Linear Systems, PWS Publishing Company, Boston, 1996.

Barrett, R., Berry, M., Chan, T.F., Demmel, J., Donato, J., Dongarra, J., Eijkhout, V., Pozo, R., Romine, C.

and Van der Vorst, H., Templates for the Solution of Linear Systems: Building Blocks for Iterative Methods, 2nd Edition, SIAM, Philadelphia, PA, 1994.

Roache, P.J., Fundamentals of Computational Fluid Dynamics, Hermosa Pub., USA, 1998

http://www.ansys.com

Cai, X.C., Keyes, D.E., Nonlinearly preconditioned inexact Newton algorithms, SIAM J.SCI.COMPUT., Vol.24,

No.1, pp.183-200

Ning Qin, David K. Ludlow and Scott T. Shaw, ”A matrix-free preconditioned Newton:GMRES method for

unsteady NavierStokes solutions” International Journal for Numerical Methods in Fluids, Vol. 33, pp. 223248, 2000

(42)
(43)

Non-linear & Linear Preconditioning

(a) Newton iterations

(b) PIN iterations

Figure:

Nonlinear residual history for the flow problem with different

Reynolds number [7]

(44)

Solid Analysis

Figure:

Blade mesh in ANSYS (3D-2D)

Hexahedral - Quadrilateral

MMB: Linear - Elastic - Isotropic

(45)

Deformation Under Aerodynamic Loads

(a) x-component of

displace-ment

(b) y-component of

displace-ment

(46)

Deformation Under Aerodynamic Loads

(a) Deformed shape with

unde-formed edge

(b) Vector plot of translation

(47)

Transformation Terms

α =



∂x

∂η



2

+



∂y

∂η



2

β =



∂x

∂ξ



2

+



∂y

∂ξ



2

γ =

∂x

∂ξ

∂x

∂η

+

∂y

∂ξ

∂y

∂η

J

=

∂x

∂ξ

∂y

∂η

∂y

∂ξ

∂x

∂η

(16)

(48)

Governing Equations in 3D

x-component of velocity :

2

u

=

∂Ω

y

∂z

∂Ω

z

∂y

(17)

y-component of velocity :

2

v

=

∂Ω

z

∂x

∂Ω

x

∂z

(18)

z-component of velocity :

2

w

=

∂Ω

x

∂y

∂Ω

y

∂x

(19)

vorticity transport :

∇. (uΩ) − (Ω.∇) u −

1

Re

2

Ω = 0

(20)

(49)

Coordinate Transformation

The chain rule of partial differentiation

1

∂x

= ξ

x

∂ξ

+ η

x

∂η

+ ζ

x

∂ζ

2

∂y

= ξ

y

∂ξ

+ η

y

∂η

+ ζ

y

∂ζ

3

∂z

= ξ

z

∂ξ

+ η

z

∂η

+ ζ

z

∂ζ

J

=

∂(x,y ,z)

∂(ξ,η,ζ)

(50)

Streamtrace contours

(a) Streamtrace contours

(b) Vorticity contours

Figure:

Velocity-Vorticity Approach

(51)

Preconditioning and Matrix-free Approach

P

−1

L

J(¯

x)¯

v

= P

L

−1

¯

f

x

+ P

−1

R

y) − ¯

¯

f

x)

ε

= ¯

z

(21)

P

R

ǫ¯

v

= ¯

y

(22)

P

L

¯

z

= J ¯

v

(23)

(52)

Comparison of the Solvers and the Preconditioners

Table:

Comparison of the solvers and preconditioners by means of

iteration number and computation time

Method

# of iterations per

Time

Newton Step (average)

(sec.)

Jacobi-BiCGSTAB

490.5

25.7

SGS-BiCGSTAB

108.8

23.1

ILU(6)-BiCGSTAB

16.2

187.8

Jacobi-GMRES(100)

313.6

26.1

SGS-GMRES(100)

97.7

22.7

ILU(6)-GMRES(100)

12.5

182.14

(53)

Coordinate Transformation

Second derivative of an arbitrary variable in the transformed form

2

u

∂x

2

=

∂u

∂ξ

2

ξ

∂x

2

+

∂u

∂η

2

η

∂x

2

+

∂u

∂ζ

2

ζ

∂x

2

+

2

u

∂ξ

2

 ∂ξ

∂x



2

+

2

u

∂η

2

 ∂η

∂x



2

+

2

u

∂ζ

2

 ∂ζ

∂x



2

+ 2

2

u

∂ξ∂η

∂ξ

∂x

∂η

∂x

+ 2

2

u

∂ξ∂ζ

∂ξ

∂x

∂ζ

∂x

+ 2

2

u

∂ζ∂η

∂ζ

∂x

∂η

∂x

(54)

Blade Shape

(55)

Effect of Reynolds Number

(a) Re=100

(b) Re=300

(56)

Effects of Reynolds Number

(a) Re=100

(b) Re=300

(57)

Effects of Reynolds Number

Pressure distribution

distribution character ⇒ slightly

values ⇒ extensively

Cytaty

Powiązane dokumenty

1860/61 wcześniej, bo 10 czerwca, a nie w ostatnich dniach lipca, jak to wyni- kało z przepisów. Ze względu na zaistniałą sytuację we wszystkich placówkach

Tabel 1 toont voor 15 metropolitane functies (1) de score van Rotterdam op de functie en de rangschikking in West-Europa, (2) de mate waarin de score afwijkt van wat verwacht

It is striking to see that the model results exhibit this strong correlation between the precipitation rate at cloud base and the entrainment rate considering the multitude of

Urobek ten w poszczególnych okresach eksploatacji złoża różni się od średniej jakości kopaliny określonej dla zasobów bilansowych i przemysłowych wedle

Zmiana ta znajduje odbicie w nauczaniu języka polskiego jako obcego – na poziomie dla początkujących pojawiają się nazwy istot młodych niedorosłych z formantem -ak.. Seretny

Lionnet claims that in order to interpret the work of female Mauritian writers it does not suffice to see it in the light of broadly understood postcolonial studies, but

Bulk and boundary then come together when we show how to engineer a nodal topological superconducting phase in monolayer molybdenum dichalcogenides, protected by a combination of

Wskazuje to, że pomimo coraz częściej podejmowanej w dyskursie społecznym tematyki dotyczącej zdrowia prokreacyjnego oraz stosunkowo bogatej oferty