• No results found

Numerical Methods for the Navier-Stokes Equations

N/A
N/A
Protected

Academic year: 2021

Share "Numerical Methods for the Navier-Stokes Equations"

Copied!
31
0
0

Loading.... (view fulltext now)

Full text

(1)

Computational Fluid Dynamics I

P

P

P

PIIII

W

W

W

W

Numerical Methods for

the Navier-Stokes

Equations

Instructor: Hong G. Im University of Michigan

(2)

Computational Fluid Dynamics I

P

P

P

PIIII

W

W

W

W

• Summary of solution methods

- Incompressible Navier-Stokes equations - Compressible Navier-Stokes equations • High accuracy methods

- Spatial accuracy improvement - Time integration methods

Outline What will be covered

What will not be covered

• Non-finite difference approaches such as - Finite element methods (unstructured grid) - Spectral methods

(3)

Computational Fluid Dynamics I

P

P

P

PIIII

W

W

W

W

Incompressible

Navier-Stokes Equations

(4)

Computational Fluid Dynamics I

P

P

P

PIIII

W

W

W

W

Incompressible Navier-Stokes Equations

w

v

u

=

u

0

=

u

ρ

α

p

t

+

=

u

u

u

u

2

The (hydrodynamic) pressure is decoupled from the

rest of the solution variables. Physically, it is the pressure that drives the flow, but in practice pressure is solved such that the incompressibility condition is satisfied.

The system of ordinary differential equations (ODE’s)

are changed to a system of differential-algebraic equations (DAE’s), where algebraic equations acts like a constraint.

(5)

Computational Fluid Dynamics I

P

P

P

PIIII

W

W

W

W

Vorticity-stream function formulation Advantages:

- Pressure does not appear explicitly (can be obtained later) - Incompressibility is automatically satisfied

(by definition of stream function) Drawbacks:

- Limited to 2-D applications

(6)

Computational Fluid Dynamics I

P

P

P

PIIII

W

W

W

W

Solution Methods for Incompressible N-S Equations in Primitive Formulation:

• Artificial compressibility (Chorin, 1967) – mostly steady • Pressure correction approach – time-accurate

- MAC (Harlow and Welch, 1965)

- Projection method (Chorin and Temam, 1968) - Fractional step method (Kim and Moin, 1975) - SIMPLE, SIMPLER (Patankar, 1981)

(7)

Computational Fluid Dynamics I

P

P

P

PIIII

W

W

W

W

Back to a system of ODE by

• With properly-chosen , solve until

• Originally developed for steady problems

• The term “artificial compressibility” is coined from equation of state

• Possible numerical difficulties for large

Artificial Compressibility - 1

0

2

=

+

u

c

t

p

ρ

α

p

t

+

=

u

u

u

u

2 2

c

: arbitrary constant 2

c

0

(

p

p

(

x

)

)

t

p

=

ρ

2

c

p

=

2

c

(8)

Computational Fluid Dynamics I

P

P

P

PIIII

W

W

W

W

The concept can be applied to a time-accurate method by using “pseudo-time stepping” at every sub-steps.

Artificial Compressibility - 2

0

2

=

+

u

c

p

τ

ρ

α

τ

β

p

t

+

=

+

u

u

u

u

u

2

At every “real” time step, take “pseudo-time stepping” using explicit time integration until

0

,

0

τ

τ

p

u

Since the pseudo time scale is not physical, we can accelerate the integration however we want.

(9)

Computational Fluid Dynamics I

P

P

P

PIIII

W

W

W

W

Marker-and-Cell (MAC) Method – Harlow and Welch (1965) • Originally derived for free surface flows with staggered grid

Pressure Correction Method - 1

0

=

u

ρ

α

p

t

+

=

u

u

u

u

2

)

(

)

(

2 2 1 n h h h n h n h n h n h

p

t

u

u

u

u

u

+

=

+

+

α

ρ

)

(

2 n h n h h

p

=

u

u

ρ

Taking divergence of momentum equation,

Poisson equation

ρ

α

p

t

h n h n h n n n

+

=

+

u

u

u

u

u

1 2 and Explicit integration

(10)

Computational Fluid Dynamics I

P

P

P

PIIII

W

W

W

W

Projection Method – Chorin (1968), Temam (1969) • Originally derived on a colocated grid

• Identical to MAC except for the Poisson equation Pressure Correction Method - 2

p t p t h t n h t n ∇ ∆ − = ⇒ ∇ − = ∆ − + +

ρ

ρ

u u u u 1 1 1 0 1 = ⋅ ∇ n+ h u p t h h t h n h ∇ ⋅∇ ∆ − ⋅ ∇ = ⋅ ∇ +

ρ

u u 1 t h h

t

p

u

=

2

ρ

0

(11)

Computational Fluid Dynamics I

P

P

P

PIIII

W

W

W

W

MAC vs. Projection

1. Integration without pressure

Pressure Correction Method - 3

p

t

h t n+

=

ρ

u

u

1

(

n n

)

n t

t

A

D

u

u

=

+

+

t h h

t

p

u

=

2

ρ

2. Poisson equation

3. Projection into incompressible field

)

(

2 n h n h h

p

=

u

u

ρ

n n

u

u

=

(

)

t

p

t

n n h n n+

=

+

+

ρ

D

A

u

u

1

(12)

Computational Fluid Dynamics I

P

P

P

PIIII

W

W

W

W

SIMPLE Algorithm – Patankar (1981)

(Semi-Implicit Method for Pressure Linked Equations) - Iterative procedure with pressure correction

Pressure Correction Method - 4

p p

p = 0 + ′

1. Guess the pressure field

2. Solve the momentum equation (implicitly)

3. Solve the pressure correction equation

0 p

ρ

α

0 0 2 0 0 0

p

t

n

+

=

u

u

u

u

u

(

0

)

2

u

=

t

p

ρ

(13)

Computational Fluid Dynamics I

P

P

P

PIIII

W

W

W

W

Pressure Correction Method - 5

4. Correct the pressure and velocity

5. Go to 2. Repeat the process until the solution converges.

p p p = 0 + ′

p

t

=

ρ

0

u

u

Notes:

- Originally developed for the staggered grid system.

- The corrected velocity field satisfies the continuity equation

even if the pressure correction is only approximate. - Sometimes tends to be overestimatedp

) 8 . 0 ( 0 + ′ ≈ = p

ω

p

ω

p underrelaxation

(14)

Computational Fluid Dynamics I

P

P

P

PIIII

W

W

W

W

SIMPLER (SIMPLE Revised)

- Incorporating the projection method (fractional step) Pressure Correction Method - 6

1. Guess the velocity field

2. Solve momentum equation (implicitly) without pressure

3. Solve the pressure Poisson equation

0 u

u

u

u

u

u

ˆ

ˆ

ˆ

ˆ

0 2

+

=

α

t

(

u

ˆ

)

* 2

=

t

p

ρ

(15)

Computational Fluid Dynamics I

P

P

P

PIIII

W

W

W

W

Pressure Correction Method - 7

5. Solve the momentum equation with

6. Pressure correction equation

7. Correct the velocity, but not the pressure

8. Go to 2. Repeat the process until solution is converged. * * 2 * * 0 *

1

p

t

=

+

ρ

α

u

u

u

u

u

( )

* 2

u

=

t

p

ρ

*

p

p

t

=

ρ

*

u

u

(16)

Computational Fluid Dynamics I

P

P

P

PIIII

W

W

W

W

Stability Consideration

Explicit time integration in 2-D requires the stability condition:

(

)

α

α

4 and 4 2 2 h t v u t ∆ < + < ∆ t ∆ α 4 2 h t = ∆

(

)

α / 1 4 u v 2 t = + ∆ Re ~ / 1

α

0 → ∆t at both limits! High-Re flow: advection-controlled

Low-Re flow: diffusion-controlled Use implicit schemes for

(17)

Computational Fluid Dynamics I

P

P

P

PIIII

W

W

W

W

Accuracy Improvement – Spatial 1

Spatial Accuracy

• Explicit differencing - use larger stencils ) ( 2 2 1 1 h O h f f f j′ = j+ − j− + ) ( 12 8 8 1 1 2 4 2 h O h f f f f f j′ = j− − j− + j+ − j+ +

• Tridiagonal - Padé (compact) schemes

(

)

( ) 3 4 1 1 1 4 1 f f O h h f f f j + j′ + j+ = j+j + • Pentadiagonal L + + + + + = ′ + ′ + ′ + ′ + ′2 j1 j j+1 j+2 j2 j1 j j+1 j+2 j f f f f af bf cf df ef f

β

γ

δ

ε

α

(18)

Computational Fluid Dynamics I

P

P

P

PIIII

W

W

W

W

Accuracy Improvement – Spatial 2

Ref: Kennedy, C. A. and Carpenter, M. H.,

Applied Numerical Mathematics, 14, pp. 397-433 (1994) .

kk' ∆ 0 1 2 3 0 1 2 3 Exact 2E 4E 6E 6T 8E 8T

(19)

Computational Fluid Dynamics I

P

P

P

PIIII

W

W

W

W

Accuracy Improvement – Temporal 1

Temporal Accuracy • Implicit – Crank-Nicolson

(

)

[

1 2 2 1

]

1/2 1 ) ( ) ( ) ( 2 + + + + n = n + n + n + n n n p t t

ρ

α

u u u A u A u u

p

t

=

+

ρ

1

)

(

)

(

u

D

u

A

u

(20)

Computational Fluid Dynamics I

P

P

P

PIIII

W

W

W

W

Accuracy Improvement – Temporal 2

Linearization of Advection Terms • For example, a 2-D equation

can be linearized as 0 = ∂ ∂ + ∂ ∂ + ∂ ∂ y x t F E U           = v u ρ ρ ρ U           − − + = xy xx uv p u u τ ρ τ ρ ρ 2 E             − + − = yy xy p v uv v τ ρ τ ρ ρ 2 F

[ ]

[ ]

= 0 ∂ ∂ + ∂ ∂ + ∂ ∂ y B x A t U U U

[ ]

[ ]

U F U E ∂ ∂ = ∂ ∂ = B A ,

(21)

Computational Fluid Dynamics I

P

P

P

PIIII

W

W

W

W

Accuracy Improvement – Temporal 3

Fractional Step Method – Kim & Moin (1985)

• Projection method extended to higher accuracy

[

]

( ) Re 2 1 ) ( ) ( 3 2 1 n n 1 2 t n n t t A u A u u u u u + ∇ + − − = ∆ − −

Adams-Bashforth (AB2) Crank-Nicolson

t n t n t t u u u u ⋅ ∇ ∆ = ∇     = ⋅ ∇ −∇ = ∆ − + + 1 0 2 1 1

φ

φ

Note that is different from the original pressure

φ

φ

φ

2 Re 2 ∇ ∆ − = t p

(22)

Computational Fluid Dynamics I

P

P

P

PIIII

W

W

W

W

Accuracy Improvement – Temporal 4

Treatment of implicit viscous terms

[

]

( ) Re 2 1 ) ( ) ( 3 2 1 n n 1 2 t n n t t A u A u u u u u + ∇ + − − = ∆ − − Factorizing,

(

)

=       ∆ ⇒ t n zz yy xx t t t u u

δ

δ

δ

Re 2 Re 2 Re 2 1

[

]

(

)

n zz yy xx n n t t u u A u A − + ∆

δ

+

δ

+

δ

∆ − − Re ) ( ) ( 3 2 1

(

)

=       ∆       ∆       t n zz yy xx t t t u u

δ

δ

δ

Re 2 1 Re 2 1 Re 2 1

[

]

(

)

n zz yy xx n n t t u u A u A − + ∆

δ

+

δ

+

δ

∆ − − Re ) ( ) ( 3 2 1

(23)

Computational Fluid Dynamics I

P

P

P

PIIII

W

W

W

W

Accuracy Improvement – Temporal 5

Notes on Fractional Step Method

• Originally implemented into a staggered grid system • Later improved with 3rd-order Runge-Kutta method

Ref: Le & Moin, J. Comp. Phys., 92:369 (1991)

• The method can be applied to a variable-density problem (e.g. subsonic combustion, two-phase flow) where

Poisson equation becomes

Ref: Rutland, Ph. D. Thesis, Stanford University (1989) Bell, Collela and Glaz, JCP, 85:257 (1989)

( )

      ∂ ∂ + ⋅ ∇ ∆ = ∇ t t t t t

ρ

ρ

φ

1 u 2

ρ

T =1 Eq. of State

(24)

Computational Fluid Dynamics I

P

P

P

PIIII

W

W

W

W

Boundary Conditions

Boundary Conditions for Incompressible Flows

• In general, boundary condition treatment is easier than for the compressible flow formulation due to the absence of acoustics

• Typical boundary conditions:

- Periodic: etc. - Inflow conditions:

- Outflow conditions: convective outflow condition

2 1 1, f f f fN = N+ = ) , , ( ) 0 (x F y z t f = = L x x U t = = ∂ ∂ + u 0 at u     =

udA A U 1

(25)

Computational Fluid Dynamics I

P

P

P

PIIII

W

W

W

W

Compressible

Navier-Stokes Equations

(26)

Computational Fluid Dynamics I

P

P

P

PIIII

W

W

W

W

0

=

+

+

+

z

y

x

t

G

F

E

U

                = E w v u ρ ρ ρ ρ ρ U                 + + − − − + = x xz xy xx u p E uw uv p u u ψ ρ τ ρ τ ρ τ ρ ρ ) ( 2 E                   + + − − + − = y yz yy xy v p E vw p v uv v ψ ρ τ ρ τ ρ τ ρ ρ ) ( 2 F                   + + − + − − = z zz yz xz w p E p vw vw uw w ψ ρ τ ρ τ ρ τ ρ ρ ) ( 2 G T c h T c e RT p = ρ , = v , = p R e T e p R cv , ( 1) , ( 1) 1 − = − = − = γ ρ γ γ or Constitutive relations z zz yz xz z y yz yy xy y x xz xy xx x q w v u q w v u q w v u + − − − = + − − − = + − − − = τ τ τ ψ τ τ τ ψ τ τ τ ψ where

(27)

Computational Fluid Dynamics I

P

P

P

PIIII

W

W

W

W

Solution methods for compressible N-S equations

follows the same techniques used for hyperbolic equations

z

y

x

t

+

+

=

U

E

F

G

For smooth solutions with viscous terms, central differencing usually works.

⇒ No need to worry about upwind method, flux-splitting, TVD, FCT (flux-corrected transport), etc.

In general, upwind-like methods introduces numerical dissipation, hence provides stability, but accuracy

(28)

Computational Fluid Dynamics I

P

P

P

PIIII

W

W

W

W

- MacCormack method

- Leap frog/DuFort-Frankel method - Lax-Wendroff method - Runge-Kutta method Explicit Methods Implicit Methods - Beam-Warming scheme - Runge-Kutta method

Most methods are 2nd order.

The Runge-Kutta method can be easily tailored to higher order method (both explicit and implicit).

(29)

Computational Fluid Dynamics I

P

P

P

PIIII

W

W

W

W

Most of the time, an implicit integration method involves nonlinear advection terms

which are linearized as

z

y

x

t

+

+

=

U

E

F

G

[ ]

[ ]

[ ]

z C y B x A t n n n n n ∂ ∂ + ∂ ∂ + ∂ ∂ = ∆ − + + + +1 1 1 1 U U U U U

[ ]

A n

[ ]

B n

[ ]

Cn      ∂ ∂ =       ∂ ∂ =       ∂ ∂ = U G U F U E , ,

(30)

Computational Fluid Dynamics I

P

P

P

PIIII

W

W

W

W

Ultimately, compressible Navier-Stokes equations can be written as a system of ODE’s

z

y

x

t

+

+

=

U

E

F

G

(

)

0 0

)

(

)

(

,

U

U

U

U

=

=

=

t

t

t

t

F

dt

d

Initial condition Solution techniques for a system of ODE applies.

- Explicit vs. Implicit (Nonstiff vs. Stiff) - Multi-stage vs. Multi-step

(31)

Computational Fluid Dynamics I

P

P

P

PIIII

W

W

W

W

Boundary Conditions

Boundary Conditions for Compressible Flows

• In general, boundary condition for the compressible flow is trickier because all the acoustic waves must be

properly taken care of at the boundaries. • Typical boundary conditions:

- Periodic: still easy to implement

- Both inflow and outflow conditions require treatment of characteristic waves

References

Related documents

If you’re a beer buff, take a guided tour at Deschutes Brewery to learn more about how the craft beer scene got its start in Central Oregon, then visit a few.. of the city’s

Combining Properties and Evidence to Support Overall Confor- mance Claims: Safety-critical system development increasingly relies on using a diverse set of verification

Request approval to 1) accept a grant award from, and enter into a grant agreement with, the American Psychological Association Board of Educational Affairs to pursue accreditation

The State of California, Department of Insurance (CDI) has awarded the District Attorney¶s Office (DA) $4,700,955 for the Automobile Insurance Fraud (AIF) Program, $2,121,829 for

77273 with Caban Resources, LLC (Caban), effective upon Board approval to: (i) extend the term of the Agreement for the period July 1, 2015 through June 30, 2016 with an option

Pursuant to Insurance Code Sections 1872.8(b)(1)(d) (AIF), 1874.8 (Urban Grant), 1872.83(d) (WCIF), and 1872.85(c)(2) (DHIF), CDI is authorized to award and distribute certain funds

Disturbing asbestos-containing materials that are in good condition may produce dust and increase health risks.. When we survey homes to find out whether there are

On June 9, 2003, the Tax Discovery Bureau (Bureau) of the Idaho State Tax Commission issued a Notice of Deficiency Determination (NODD) to [Redacted] (taxpayers), proposing income