Post on 27-Jun-2020
Computational Fluid Dynamics
Dr, Yasser Ben Salah
National Engineering School Monastir
1
Contents Chap>1 Introduction
Chap>2 Conservation laws of fluid motion and boundary conditions
Chap>3 Turbulence and its modeling ‐‐ skipped
Chap>4 The finite volume method for diffusion problems
Chap>5 The finite volume method for convection‐diffusion problems
Chap>6 Solution algorithms for pressure‐velocity coupling in steady flows
Chap>7 Solution of discretized equations
Chap>8 The finite volume method for unsteady flows
2
CHAPTER 6: SOLUTION ALGORITHMS FOR PRESSURE‐VELOCITY COUPLING IN STEADY FLOWS
3 3
Contents Introduction The staggered grid The momentum equations The SIMPLE algorithm Assembly of a complete method The SIMPLER algorithm The SIMPLEC algorithm The PISO algorithm General comments on SIMPLE, SIMPLER, SIMPLEC and PISO Worked examples of the SIMPLE algorithm Summary
4
Introduction The convection of a scalar variable φ depends on the magnitude and direction of the
local velocity field. How to find flow field?
In the previous chapter, we assumed that the velocity field was ”somehow ”known. In general the velocity field is, however, not known and emerges as part of the overall
solution process along with all other flow variables.
Governing equations (2D steady‐state N‐S eqs.)
5
Introduction Two (2) new problems
Non‐linearities The convective terms of the momentum equations contain non‐linear quantities (ρu2). All three equations are intricately* coupled because every velocity component appears in each
momentum equation and in the continuity equation. The pressure‐velocity linkage
The most complex issue to resolve is the role played by the pressure. It appears in both momentum equations, but there is evidently no (transport or other) equation for the pressure.
If the flow is compressible, continuity eq used as transport eq for density Energy eq is the transport eq for TT Pressure may then be obtained by using eq of state, p = p(ρ,T)
If the flow is incompressible the density is constant and hence by definition not linked to the pressure. In this case coupling between pressure and velocity introduces a constraint in the solution of
the flow field– If the correct pressure field is applied in the momentum equations the resulting velocity field should satisfy
continuity.
Both problems can be resolved by adopting an iterative solution strategy such as SIMPLE Patankar and Spalding
6* intricately (FR) de façon complexe ! SIMPLE : Semi‐Implicit Method for Pressure Linked Equations
()Principle behind SIMPLE• The principle behind SIMPLE is quite simple!• It is based on the argument that fluid flows from regions with high pressure to low pressure.
– Start with an initial pressure field.– Look at a cell.– If continuity is not satisfied because there is more mass flowing into that cell than out of the cell, the
pressure in that cell compared to the neighboring cells must be too low.– Thus the pressure in that cell must be increased relative to the neighboring cells.– The reverse is true for cells where more mass flows out than in.– Repeat this process iteratively for all cells.
• The trick is in finding a good equation for the pressure correction as a function of mass imbalance. These equations will not be discussed here but can be readily found in the literature.
Improvements on SIMPLE• SIMPLE is the default algorithm in most commercial finite volume codes.• Improved versions are:
– SIMPLER (SIMPLE Revised).– SIMPLEC (SIMPLE Consistent).– PISO (Pressure Implicit with Splitting of Operators).
• All these algorithms can speed up convergence because they allow for the use of larger underrelaxation factors than SIMPLE.• All of these will eventually converge to the same solution. The differences are in speed and stability.• Which algorithm is fastest depends on the flow and there is no single algorithm that is always faster than the other ones. 7
Introduction SIMPLE algorithm
The convective fluxes per unit mass F through cell faces are evaluated from so‐called guessed velocity components.
A guessed pressure field is used to solve the momentum equations A pressure correction equation, deduced from the continuity equation, is solved to obtain a
pressure correction field, which is in turn used to update the velocity and pressure fields. To start the iteration process we use initial guesses for the velocity and pressure fields. The process is iterated until convergence of the velocity and pressure fields.
8
Contents Introduction The staggered grid The momentum equations The SIMPLE algorithm Assembly of a complete method The SIMPLER algorithm The SIMPLEC algorithm The PISO algorithm General comments on SIMPLE, SIMPLER, SIMPLEC and PISO Worked examples of the SIMPLE algorithm Summary
If you stagger, you walk very unsteadily, for example because you are ill or drunk.
9
The staggered grid Where to store the velocities? If the velocities and the pressures are both defined at the nodes of an ordinary CV a
highly non‐uniform pressure field can act like a uniform field in the discretized momentum equations. Checker board problem The pressure at the central node (P)
does not appear dp/dx, dp/dy
Zero at all the nodal points even with the oscillations
Zero momentum sourceThis behaviour is obviously Checker board pressure field
non‐physical.
Solutions Use a staggered grid Rhie‐Chow interpolation
10
CV Faces values
()The idea is :
to evaluate scalar variables, such as pressure, density, temperature etc., at ordinary nodal points
but to calculate velocity components on staggered grids centred around the cell faces.
The arrangement for a two‐dimensional flow calculation is shown in Figure 6.2.
11
The staggered grid Harlow and Welch (1965)
Scalar variables Pressure Stored at
Velocities Stored at and x‐direction: y‐direction:
Scalar node (I,J)
Velocity node (i,J) (I,j)
12
The staggered grid Harlow and Welch (1965)
Scalar variables Pressure Stored at
Velocities Stored at and x‐direction: y‐direction:
Scalar node (I,J)
Velocity node (i,J) (I,j)
13
The staggered grid
14
Harlow and Welch (1965) Scalar variables
Pressure Stored at
Velocities Stored at and x‐direction: y‐direction:
Scalar node (I,J) intersection of 2 grid lines
Velocity node (i,J) (I,j)intersection of :a line defining a cell boundaryand a grid line mix of subscripts
The staggered grid In the staggered grid arrangement
Pressure gradient At (i,J) and (I,j)
Advantages No checkerboard problem No interpolation to
calculate velocities at cellfaces
15
Contents Introduction The staggered grid The momentum equations The SIMPLE algorithm Assembly of a complete method The SIMPLER algorithm The SIMPLEC algorithm The PISO algorithm General comments on SIMPLE, SIMPLER, SIMPLEC and PISO Worked examples of the SIMPLE algorithm Summary
16
The momentum equations On staggered grid
Scalar grid: I-1, I, I+1, …. , J-1, J, J+1, …. Unbroken grid lines ____ Velocity grid: i-1, i, i+1, …. , j-1, j, j+1, …. Dashed lines that construct cell faces ------ Backward staggered grid
i I vu j J2 2x x 1 x y y 1y
17
The momentum equations Discretized momentum equation
x‐directional momentum eq.
18
Fig . 6.3
The momentum equations Discretized momentum equation
x‐directional momentum eq.
ui, Jui1,J 222 I ,J I 1,J 1 I 1,J I ,J Fe ue
ww ui1, Jui,J 222 I 1,J I 2, J 1 I ,J I 1,J F u
2
2 2
2 nw nen n
vI 1, j 1 vI , j11 I 1,J 1 I 1,J I ,J 1 I ,J
F v 1 v u
sesws s
vI , jvI 1,j 2
2 2
21 I 1,J I 1,J 1 I ,J I ,J 1
u F v 1 v
19
Fig . 6.3
The momentum equations Discretized momentum equation
x‐directional momentum eq.
20
The momentum equations Discretized momentum equation
x‐directional momentum eq.
21
The momentum equations Discretized momentum equation
x‐directional momentum eq.
22
The momentum equations Discretized momentum equation
x‐directional momentum eq.
23
The momentum equations Discretized momentum equation
x‐directional momentum eq.
24
The momentum equations Discretized momentum equation
y‐directional momentum eq.
: include the velocity, non‐linear part, use the previous iteration values Iterative solution method is required.
Given a pressure field p, discretized momentum equations of the form can be written for each u‐ and v‐control volume and then solved to obtain the velocity fields.
If the pressure field is correct the resulting velocity field will satisfy continuity. As the pressure field is unknown, we need a method for calculating pressure.
Fe, Fw, Fn , Fs
25
x‐directional momentum eq:
Contents Introduction The staggered grid The momentum equations The SIMPLE algorithm Assembly of a complete method The SIMPLER algorithm The SIMPLEC algorithm The PISO algorithm General comments on SIMPLE, SIMPLER, SIMPLEC and PISO Worked examples of the SIMPLE algorithm Summary
26
The SIMPLE algorithm SIMPLE = Semi‐Implicit Method for Pressure Linked Equations
Patankar and Spalding Guess‐and‐correct procedure for the calculation of pressure on the staggered grid
arrangement
Initiation of the SIMPLE calculation Guess: p*
Solve the discretized momentum equations
Intermediate velocity– Two systems of equations
– For u* and v*
Pressure correction, velocity corrections27
The SIMPLE algorithm Semi‐Implicit Method for Pressure Linked Equations
ai,J ui,J anbunb pI 1,J pI ,J Ai,J bi,J
28
The SIMPLE algorithm Semi‐Implicit Method for Pressure Linked Equations
For simplicity, the following two terms are dropped.
' ' nb nb nb nba u a v
a I ,J i,J'u '
i,J i,J I1,J
a 'v'I , j I ,j
p' AI ,J I , j
p p ' A pI ,J1
Omission of these terms Is the main approximation of SIMPLE
Express u and v using p’
29
The SIMPLE algorithm Semi‐Implicit Method for Pressure Linked Equations
Solve the momentum equations with guessed pressure and guessed velocities for non‐linear terms.
The predicted velocity should satisfy continuity equation.
Express u and v using p’
30
The SIMPLE algorithm Semi‐Implicit Method for Pressure Linked Equations
Continuity equation on scalar node
Express u and v using p’
Derive the pressure correction eq.
I ,jI , j1i,Ji1,J
n se wf
uA
vA 0 uA vA uA
vA vA u A uA
31
The SIMPLE algorithm Semi‐Implicit Method for Pressure Linked Equations
Continuity equation on scalar node
I ,jI , j1i,Ji1,J vA 0 uA vAuA
32
The SIMPLE algorithm Semi‐Implicit Method for Pressure Linked Equations
Continuity equation on scalar node Rearrange
33
The SIMPLE algorithm Semi‐Implicit Method for Pressure Linked Equations
Continuity equation on scalar node Cell pressure correction equation
34
The SIMPLE algorithm Semi‐Implicit Method for Pressure Linked Equations
Continuity equation on scalar node Collect the cell pressure equations for all cells System pressure correction equation
'
I ,J 1
I 1, J
I ,J
I1,J
I ,J 1I1,JI ,JI1,JI ,J1' b'
p'
I , J p '
p
p '
p
a a a
I ,J1
a a
35
The SIMPLE algorithm Semi‐Implicit Method for Pressure Linked Equations
Solve the pressure correction equation Pressure correction p’ can be obtained.
Not the final solution. Why?
a I ,J i,J'u '
i,J i,J p p' AI1,J
a I ,J I ,j'v'
I , j I ,j p' A pI ,J1
Fe, Fw, Fn , Fs 36
The SIMPLE algorithm Semi‐Implicit Method for Pressure Linked Equations
Under relaxation
u‐ and v‐ velocity under relaxation factors
A correct choice of under‐relaxation factors α is essential for cost‐effective simulations. Too large a value of α may lead to oscillatory or even divergent iterative solutions, and a value
which is too small will cause extremely slow convergence. Unfortunately, the optimum values of under‐relaxation factors are flow dependent and must be
sought on a case‐by‐case basis.
Pressure under‐relaxation factor0 p 1
37
The SIMPLE algorithm Semi‐Implicit Method for Pressure Linked Equations
Discretize momentum equations from the second iteration
38
The SIMPLE algorithm Semi‐Implicit Method for Pressure Linked Equations
Pressure correction equation from the second iteration
39
The SIMPLE algorithm
40