Sie sind auf Seite 1von 13

5. THE MOMENTUM EQUATION 5.1 Special features of the momentum equations 5.2 Pressure-velocity coupling 5.

3 Pressure-correction methods 5.4 Summary

SPRING 2005 Revised 22 Feb

Every fluid flow satisfies both mass and momentum equations. Each momentum component satisfies a scalar-transport equation, which can be written for a single control volume as d ( V) + ( C A ) = SV (1) dt n faces rate of change advection diffusion source where C is the mass flux through a cell face.

In the case of momentum: concentration, diffusivity, source


velocity component ( = u, v or w) viscosity, forces

5.1 Special Features of the Momentum Equations The most important feature is that the coefficients of the scalar-transport equation are not fixed but depend on the solution itself (since the mass flux C depends on velocity) and hence evolve as the solution develops. As a result the equations must be solved: together; (we say that the equations are coupled); iteratively. Specifically, when = u, v or w,. advective fluxes (mass flux velocity; e.g. ( uA)u or ( uA)v) contain non-linear quantities like u2 and uv and the matrix coefficients change as the solution develops; the mass and momentum equations are coupled because each velocity component appears in all the other equations; pressure appears in each momentum equation: this (i) further couples the equations; (ii) demands a means of specifying pressure; there are 4 equations (mass + 3 momentum). Therefore, we would expect 4 unknowns: u, v, w + 1 other.

In compressible flow, mass conservation provides a transport equation for density , an energy or enthalpy equation yields temperature T, and pressure p is determined from a thermodynamic relation such as the ideal gas law (p = RT).

In incompressible flow, density variations are not linked to pressure. A pressure equation arises from the requirement that the solution of the momentum equation also satisfies continuity.

CFD

5-1

David Apsley

In many codes mass and momentum equations are solved sequentially and iteratively according to the following pseudocode. We call this a segregated approach.

DO WHILE (not_converged) CALL SCALAR_TRANSPORT( u ) CALL SCALAR_TRANSPORT( v ) CALL SCALAR_TRANSPORT( w ) CALL MASS_CONSERVATION( p ) END DO

5.2 Pressure-Velocity Coupling Question 1. How are velocity and pressure linked? Question 2. How does a pressure equation arise? Question 3. Should velocity and pressure be collocated (stored at the same positions)?

5.2.1 Pressure-Velocity Linkage In the momentum equation, pressure forces appear as a source of momentum; e.g. in the x-momentum equation: pressure force = p w A p e A Hence the discretised momentum equation is of form a P u P a F u F = A( p w pe ) + other forces
F net flux pressure forces

p w

uP

pe

(2)

Hence, u P = d P ( pw pe ) +
Answer 1 (a) The force terms in the momentum equation provide a link between velocity and pressure. (b) Velocity depends on the pressure gradient or, when discretised, on the difference between pressure values cell either side.

where

dP =

A aP

(3)

momentum equation Symbolically,

u P = d P ( p w pe ) +

u = d ( p +1 / 2 p 1 / 2 ) + = d p + where indicates a centred difference.

CFD

5-2

David Apsley

N
Substituting for velocity in the continuity equation, 0 = ( uA) e ( uA) w +

= ( Ad ) e ( p P p E ) ( Ad ) w ( pW p P ) +

P
s

= aW pW + a p p p a E p E +

This has the same algebraic form as the scalar-transport equations.

Answer 2 The momentum equation gives a link between velocity and pressure which, when substituted into the continuity equation, gives an equation for pressure.

The posh version of this is A pressure equation arises as a constraint on solutions of the momentum equation to satisfy continuity.

(*** MSc course only ***) The Navier-Stokes equation for an incompressible fluid may be written u i (u i u j ) 1 p + = + 2ui t x j xi Hence velocity depends on the pressure gradient.

Taking the divergence (i.e. / xi) and using continuity ( ui/ xi = 0) gives 2 (u i u j ) 1 = 2 p xi x j or 2 (u i u j ) 2 p= xi x j

Hence, analytically, the combination of momentum and continuity gives a Poisson equation for pressure.

CFD

5-3

David Apsley

5.2.2 Collocated Storage and Linear Interpolation

First of all, suppose that pressure and velocity are collocated (stored at the same positions) and that mass fluxes are evaluated by linear interpolation of velocities to cell faces. Momentum Equation The net pressure force depends on the difference of values pw and pe. These must be obtained by interpolation; i.e. i-1 w i i+1 e 1 pw = 1 ( p + p ), p = ( p + p ) i 1 i e i i +1 2 2 Then the net pressure force (in the i direction) is A A( p w p e ) = ( p i 1 p i +1 ) (4) 2 with pi cancelling out. Hence, when discretised, ui depends on the difference in pressure at nodes separated by 2 x. It does not depend on pi, which could, in fact, take any value without affecting the momentum balance of that cell.

Continuity Equation Apply continuity to a control volume i-2 i-1 w centred on a pressure node. Obtain advective velocities ue and uw on the cell faces by linear interpolation: uw = 1 ue = 1 2 (u i 1 + u i ), 2 (u i + u i +1 ) Mass conservation implies 1 0 = ( Au ) e ( Au ) w + = A{ 1 2 (u i + u i +1 ) 2 (u i 1 + u i )} +

i+1

i+2

(5)

= 1 2 A{u i +1 u i 1 } + A pressure equation is generated by linking velocities to pressure differences using (4), 1 1 0 = ( Au ) e ( Au ) w + = 1 2 A{ 2 d i +1 ( p i p i + 2 ) 2 d i 1 ( p i 2 p i )} + Thus, the continuity equation yields an equation for pressure. However, once again, it only links pressure values at every second node.

p
In other words, the combination: collocated u, p; linear interpolation for advective velocities; leads to a decoupling of odd nodal values p1, p3, p5, from even nodal values p2, p4, p6, . This odd-even decoupling or checkerboard effect leads to indeterminate oscillations in the pressure field.

x
1 2 3 4 5 6 7 8 9 10

There are two common remedies (described below): (1) use a staggered grid (velocity and pressure stored at different locations); or (2) use a collocated grid but a different method of interpolation for the advective velocities (the face velocities used to compute mass fluxes). Both techniques provide a linkage between adjacent pressure nodes, preventing odd-even decoupling.

CFD

5-4

David Apsley

5.2.3 Staggered Grid (Harlow and Welch, 1965)

p v

In the staggered-grid arrangement, velocity components are stored half-way between the pressure nodes that drive them. This leads to different sets of control volumes.

The usual convention is that each velocity node has the same index (P or ijk) as the pressure node to which it points. Other scalars are stored at the same position as pressure.

up

pp vp

pressure/scalar control volume

u control volume

v control volume

Advantages On a cartesian mesh: (Momentum): pressure is now stored at precisely the points required to compute the pressure force; no interpolation is required. u i = d i ( pi 1 pi ) +

pi-1

ui

pi

(Mass): velocity components are stored at precisely the points required to pi-1 compute mass fluxes: 0 = Au i +1 Au i + = Ad i +1 ( pi pi +1 ) Ad i ( pi 1 pi ) +

ui pi

ui+1 pi+1

= Ad i pi 1 + A(d i +1 + d i ) pi Ad i +1 pi +1 + The contribution from pi doesnt cancel out, so that there is no odd-even decoupling. Moreover, the pressure equation is of the same form ( a P p P a F p F = bP ) as that for the scalar-transport equation, so that one can use the same matrix-solution subroutines.

Disadvantages Added geometrical complexity of having multiple different sets of nodes and control volumes.

If the mesh is not cartesian then the velocity nodes may cease to lie between the pressure nodes that drive them (see right). 5-5 David Apsley

CFD

5.2.4 Rhie-Chow Velocity Interpolation (Rhie and Chow, 1983)

The alternative approach is to use collocated pressure and velocity nodes, but use a different interpolation for advective velocities (those used in calculating mass fluxes).

i-1

i+1

The momentum equation provides a relationship between cell-centre velocity and pressure nodes cell either side: a F u F + bP A uP = + ( pw pe ) aP aP i.e. P + d P ( pw pe ) uP = u (6) Rhie and Chows idea is to interpolate non-pressure and pressure parts separately: e + d e ( pP pE ) ue = u where an overbar indicates averaging (strictly, linear interpolation) from nodes to faces. Equivalently (and more conveniently) add and subtract the centred pressure differences: u e = u d ( p 1 / 2 p1 / 2 ) e + d e ( p P p E ) (7)

Basically, one is just adding and subtracting a quantity proportional to the pressure gradient: p p u (u + c ) c x x except that the first term on the RHS is an average of quantities discretised at cell centre, whilst the second is discretised by central differencing across the cell face. Using this interpolative technique, mass conservation gives: 0 = u i +1 / 2 u i 1 / 2 + = d e ( pi pi +1 ) d w ( pi 1 pi ) +
= d w pi 1 + (d w + d e ) pi d e pi +1 + Notes. The central pressure value pi does not cancel, so there is no odd-even decoupling. This is a pressure equation. Moreover, it has the same algebraic form as that arising from the scalar-transport equation: a P p P = a F p F + bP , where a F 0 , a P = a F
F

(8)

Pressure-velocity coupling is the dominant feature of the Navier-Stokes equations. Staggered grids are the most effective way of handling it on cartesian meshes. However, for noncartesian (or curvilinear) meshes, collocated grids are the norm and are features of almost all general-purpose CFD codes.

CFD

5-6

David Apsley

Classroom Example

For the u and p values given, calculate the advective velocity by Rhie-Chow interpolation on the cell face marked f. Compare this with the value obtained by linear interpolation. Assume that the momentum equation gives a pressure/velocity linkage u = 4 p + for each cell, where denotes a centred difference.

f
u= p= 1 1.0 2 0.8 3 0.7 3 0.6

Pressure Smoothing By retaining general values of ui and pi and following the same analysis with a general pressure-velocity coefficient d the above example gives 1 d u face = (u 2 + u 3 ) + ( p1 + 3 p 2 3 p3 + p 4 ) 2 4 Thus, Rhie-Chow interpolation is equivalent to the addition of a pressure-smoothing term to the advective velocity obtained by linear interpolation. Expanding pressures about the cell face shows that the bracketed term is, to first order, x 3 p on the cell face, and hence, when combined with a similar term on the opposite face of a cell to give the net mass flux, gives an additional term x 4 p ( iv ) , corresponding to (4th-order) diffusion.

CFD

5-7

David Apsley

5.3 Pressure-Correction Methods

What are pressure-correction methods? Iterative numerical schemes for incompressible flow. Used to derive velocity and pressure fields satisfying both mass and momentum eqns. Consist of alternating updates of velocity and pressure: first, fix pressure and solve for velocity to satisfy the momentum equations; then, calculate the pressure correction p necessary to nudge the velocity field towards mass conservation. There are two common schemes: SIMPLE and PISO.

That changing pressure can be used to enforce mass conservation is illustrated below.

Net mass flux in; must increase cell pressure

Net mass flux out; must decrease cell pressure

5.3.1 SIMPLE

SIMPLE Semi-Implicit Method for Pressure-Linked Equations (Patankar and Spalding, 1972). START For simplicity we consider only the steady-state situation.

Stage 1. Solve momentum equations with current pressure. a u a u = A( p* p* ) + b


P p F F w e P pressure force other sources

solve momentum equations

The resulting velocity field will generally not satisfy continuity.

solve pressurecorrection equation

Stage 2. Formulate pressure-correction equation.

(i)

Relate changes in u to changes in p: aF u F u + d P ( p P = w pe ) aP where d P = A / a P . (Other sources are assumed to be exact and not need correcting).

correct velocity and pressure

no converged? yes

(ii)

Make the SIMPLE approximation: neglect u P d P ( pw pe )

aF u F .
END

CFD

5-8

David Apsley

(This is legitimate since we are only interested in the converged solution, where all corrections will be zero anyway.) (iii) Apply mass conservation to a control volume centred on the pressure node. The net mass flux will be the resultant of that from current (u*) and correction (u) velocity fields: net mass flow out = u* + u =0 n A nA

faces

faces

Hence,
( u A) e ( u A) w + = m* (minus the current net mass flux) or, writing in terms of the pressure correction (staggered or non-staggered mesh): ( Ad ) ( p p ) ( Ad ) ( p p ) + = m*

This results in a pressure-correction equation of the form: a p a p = m*


P P F F F

(9)

where a E = ( Ad ) e , etc., and a P =

aF .

Stage 3. Solve the pressure-correction equation The important thing to notice is the discretised pressure-correction equation (9) is of precisely the same form as the discretised scalar equations, and hence the same algebraic solution techniques may be used.

Stage 4. Correct pressure and velocity: p p* + p


P P P

u P u* P + d P ( pw pe ) (and similarly for the other velocity components).

(10)

Notes Staggered and unstaggered grids. The distinction between staggered and etc. at cell faces unstaggered grids is subtle. In both cases, the expression for ue depends on the pressure corrections at adjacent nodes. However, for a (cartesian) staggered grid the relevant normal velocities are actually stored on the faces of the pressure control volumes where they are required to establish mass conservation.

Source term for the pressure-correction equation. That the source for the pressure-correction equation should be minus the current net mass flux ( m * ) is reasonable. If there is a net mass flow into a control volume then, in a hand-waving sort of way, one would expect the pressure in that control volume to have to rise in order to push mass back out of the cell. Under-relaxation. In practice, substantial under-relaxation of the pressure update is needed to prevent divergence. In the correction step the pressure (but not the velocity)

CFD

5-9

David Apsley

update is relaxed: p p* +

p Typical values of p are in the range 0.1 0.3. Velocity is under-relaxed in the momentum equations, but the under-relaxation is generally less severe: u 0.5 0.8.

Iterative process. Since the equations are non-linear and coupled, the matrix equations may change at each iteration. There is little to be gained by solving the matrix equations exactly at each stage, but only doing enough iterations of GaussSeidel, line iteration or other iterative method to reduce the error in the solution by a sufficient amount.

Alternative strategies at each SIMPLE iteration are: m iterations of each u, v, w equation, followed by n iterations of the p equation (typically m = 1, n 4); or do enough iterations of each equation to reduce the residual error by a fixed percentage (typically 90%).

Classroom Example (Patankar, 1980)

In the steady, one-dimensional, constant-density situation shown, the velocity u is calculated for locations A, B and C, whilst the pressure p is calculated for locations 1, 2 and 3. The velocity-correction formula is u = u * + u , where u = d ( pi1 p i ) where the locations i 1 and i lie on either side of the location for u. The value of d is 2 everywhere. The boundary condition is uA = 10. If, at a given stage in the iteration process, * and p the momentum equations give u * B = 8 and u C = 11 , calculate the values of p1 2 and the resulting velocity corrections. A more advanced 2-dimensional example is given on the Examples sheet.

5.3.2 Variants of SIMPLE

The SIMPLE scheme can be inefficient and requires considerable pressure under-relaxation. This is because the corrected fields are good for updating velocity (since a mass-consistent flow field is produced) but not pressure (because of the inaccuracy of the approximation connecting velocity and pressure corrections). To remedy this, a number of variants of SIMPLE have been produced, including: SIMPLER (SIMPLE Revised Patankar, 1980), SIMPLEC (Van Doormaal and Raithby, 1984), SIMPLEX (Raithby and Schneider, 1988)

CFD

5-10

David Apsley

SIMPLER This variant acknowledges that the correction equation is good for updating velocity but not pressure and precedes the momentum and pressure-correction equations with an equation for the pressure itself. (*** MSc course only ***) Specifically, d p u=u Then mass conservation div(u ) = 0 leads to a pressure equation (not pressure-correction equation) of the form ) div( d p ) = div(u i.e. ) a P p P a F p F = div(u where div means the divergence or net mass flux from a control volume.

SIMPLEC This scheme seeks a more accurate approximation to correct velocity and pressure changes. From the momentum equations, the velocity and pressure equations are related by 1 u aF u P = F + d P ( p w pe ) aP

(11)

(*) The SIMPLE approximation is to neglect the term (*). However, this is actually of comparable size to the LHS. In the SIMPLEC scheme, (11) is rewritten by subtracting (1 / a P ) a F u P from both sides: (1 1 aP a F )u P = 1 aP a F (u F u P ) + d P ( p w pe ) ()

Assuming that u u F uP P , it is more accurate to neglect the term (**), thus producing an alternative formula connecting velocity and pressure changes: dP pe ) u ( pw (12) P 1 a F /a P Compare: u (SIMPLE) P d P ( p w pe ) dP (13) (SIMPLEC) u ( p P w pe ) 1 a F /a P The remainder of the analysis proceeds as for SIMPLE. Although conceptually appealing, there is a difficulty here. The sum-of-the-neighbouringa F /a P = 1 , and coefficients constraint on aP means that, in steady-state calculations, hence the denominator of (12) vanishes. This problem doesnt arise in time-varying calculations, where a time-dependent part is added to aP, removing the singularity. CFD 5-11 David Apsley

SIMPLEX This scheme assumes that velocity and pressure corrections are related by some general relationship u (14) P P ( p w pe ) This includes (see equation (13)) both SIMPLE and SIMPLEX as special cases. However, the SIMPLEX scheme attempts to improve on this by actually solving equations for the P. These equations are derived from (11) but we shall not go into the details here.

My experience is that SIMPLER and SIMPLEX offer substantial performance improvements over SIMPLE on staggered grids, but that the advanced schemes are difficult to formulate and offer little advantage on collocated grids.

5.3.3 PISO

PISO Pressure Implicit with Splitting of Operators (Issa, 1986). This was originally proposed as a time-dependent, non-iterative pressure-correction method. Each timestep (told tnew) consists of a sequence of three stages: (1) Solution of the time-dependent momentum equation with the told pressure in the source term. (2) A pressure-correction equation and pressure/velocity update la SIMPLE to produce a mass-consistent flow field. (3) A second corrector step required to produce a second mass-consistent flow field but with time-advanced pressure. Apart from time-dependence, steps (1) and (2) are essentially the same as SIMPLE. However, step (3) is designed to eliminate the need for iteration at each time step as would be the case with SIMPLE. Evidence suggests that PISO is more efficient in time-dependent calculations, but SIMPLE and its variants are better in direct iteration to steady state.

CFD

5-12

David Apsley

5.4 Summary

Each component of momentum satisfies its own scalar-transport equation, with the following correspondence: concentration, velocity component (u, v or w) diffusivity, viscosity, source, S forces

However, the momentum equations are: non-linear; coupled; pressure-linked. and, as a consequence, have to be solved: together; iteratively. For incompressible flow the combination of mass and momentum equations generates a pressure equation. This yields 4 equations (mass + 3 components of momentum) for 4 unknowns (u, v, w, p). Pressure-gradient source terms can lead to an odd-even decoupling (checkerboard) effect when all variables are collocated (stored at the same nodes). This may be remedied by using either: a staggered velocity grid; a non-staggered grid, but Rhie-Chow interpolation for advective velocities.
Pressure-correction methods operate by making small corrections to pressure in order to nudge the solution towards mass conservation.

Widely-used pressure-correction algorithms are SIMPLE (and its variants) and PISO. The first is an iterative scheme; the second is a non-iterative, time-dependent scheme.

CFD

5-13

David Apsley