Numerical Methods in Computational Fluid Dynamics (CFD

)
Tao Xing and Fred Stern
IIHR Hydroscience & Engineering C. Maxwell Stanley Hydraulics Laboratory The University of Iowa 58:160 Intermediate Mechanics of Fluids http://css.engineering.uiowa.edu/~me_160/ Oct. 8, 2004

Outline
1. Introduction to Numerical Methods 2. Components of Numerical Methods
2.1. Properties of Numerical Methods 2.2. Discretization Methods 2.3. Application of Numerical methods in PDE 2.4. Numerical Grid and Coordinates 2.5. Solution of Linear Equation System 2.6. Convergence Criteria Methods for Unsteady Problems Solution of Navier-Stokes Equations Example

3. 4. 5.

2

Introduction to numerical methods
Approaches to Fluid Dynamical Problems: 1. Simplifications of the governing equations AFD 2. Experiments on scale models EFD 3. Discretize governing equations and solve by computers CFD CFD is the simulation of fluids engineering system using modeling and numerical methods Possibilities and Limitations of Numerical Methods: 1. Coding level: quality assurance, programming defects, inappropriate algorithm, etc. 2. Simulation level: iterative error, truncation error, grid error, etc.

3

Components of numerical methods (Properties)
Consistence
1. The discretization should become exact as the grid spacing tends to zero 2. Truncation error: Difference between the discretized equation and the exact one

Stability: does not magnify the errors that appear in the course off numerical solution process.
1. Iterative methods: not diverge 2. Temporal problems: bounded solutions 3. Von Neumann s method 4. Difficulty due to boundary conditions and non-linearities present.

Convergence: solution of the discretized equations tends to the exact solution of the differential equation as the grid spacing tends to zero.
4

Von Neumann s method 4. The numerical scheme should on both local and global basis respect the conservation laws. Cont d) Conservation 1. Errors due to non-conservation are in most cases appreciable only on relatively coarse grids. or multiphase flow) should be designed to guarantee physically realistic solutions. 3. Realizability: models of phenomena which are too complex to treat directly (turbulence. either individual control volume or the whole domain. 2. Temporal problems: bounded solutions 3. Accuracy: 1. Iterative methods: not diverge 2. Difficulty due to boundary conditions and non-linearities present. Discretization errors 3. Iterative errors 5 . Automatically satisfied for control volume method.Components of numerical methods (Properties. Modeling error 2. but hard to estimate quantitatively Boundedness: 1. combustion.

Governing equations in integral form solution domain is subdivided into a finite number of contiguous control volumes conservation equation applied to each CV. 3. Introduced by Euler in the 18th century. FV with methods higher than 2nd order will be difficult. 2. Finite Element Method (not covered in this lecture): 1. Equations are multiplied by a weight function before integrated over the entire domain. Applied to any type of grids. 6 . Compared to FD. Governing equations in differential form domain with grid replacing the partial derivatives by approximations in terms of node values of the functions one algebraic equation per grid node linear algebraic equation system. especially for 3D. 2. Similar to FV 2. especially complex geometries 4.Finite Difference Method (focused in this lecture) 1. 3. Applied to structured grids Components of numerical methods (Discretization Methods) Finite Volume Method (not focused in this lecture) 1. Computational node locates at the centroid of each CV.

introduction) First step in obtaining a numerical solution is to discretize the geometric domain to define a numerical grid Each node has one unknown and need one algebraic equation. Numbers of equations and unknowns must be equal 7 . The approach is to replace each term of the PDE at the particular node by a finite-difference approximation.Discretization methods (Finite Difference. which is a relation between the variable value at that node and those at some of the neighboring nodes.

Discretization methods (Finite Difference. in the vicinity of xi . can be expressed as a Taylor series: . approximation of the first derivative) Taylor Series Expansion: Any continuous differentiable function.

x ! *.

xi  .

x  xi ¨ x* ¸  .

x  xi * © ¹ xx º i 2! ª ¨x ¸ © ¹ xx º i ª i 1 i 2 ¨ x 2 * ¸ .

x  xi 3 ¨ x 3* ¸ .

..  © 2 ¹  © xx ¹ © xx ¹ n! © xx ¹i 3! ª º ª ºi ª ºi ¸ ¹ ¹ ºi xi 1 xi xi 1 xi ¨ x 2 © 2 2 © xx ª .x  xi n ¨ x n * ¸  H © n ¹ © 3 ¹  .

order of accuracy Pkest=1 8 . we can have: ¨ x* ¸ * i 1  * i © ¹ } xi 1  xi ª xx º i ¨ x* ¸ * i 1  * i 1 © ¹ } xi 1  xi 1 ª xx ºi Forward-FDS Central-FDS ¨ x* ¸ * i  * i 1 © ¹ } xi  xi 1 ª xx º i Backward-FDS 1st order. By writing Taylor series at different nodes.xi 1 2 xi ¨ x 3 © 3 © xx 6 ª ¸ ¹ H ¹ ºi Higher order derivatives are unknown and can be dropped when the distance between grid points is small. order of accuracy Pkest=1 2nd order. xi-1. xi+1. or both xi-1 and xi+1.

and xi+1. and computing the first derivative at xi. Example: fitting a parabola to the data at points xi-1.Discretization methods (Finite Difference. approximation of the first derivative.xi. Cont d) Polynomial fitting: fit the function to an interpolation curve and differentiate the resulting curve. we obtain: ¨ x* ¸ * i 1 .

(xi  * i 1 .

(xi 1  * i .

(xi 1  .

(xi © ¹ } (xi 1(xi .

2nd order and 4th order CDS. it reduced to the CDS approximation given in previous slide. Compact schemes: Depending on the choice of parameters . For uniform meshing. 4th order and 6th order Pade scheme are obtained. it will be necessary to use smaller (x in regions where derivatives of the function are large and larger (x where function is smooth 9 (xi ! xi  xi 1 . * i 1  * i 1 * i  2  * i 2 ¨ x* ¸ ¨ x* ¸ ¨ x* ¸ E© K ¹ © ¹ E© ¹ !F 2(x 4(x ª xx º i 1 ª xx º i ª xx ºi 1 Non-Uniform Grids: to spread the error nearly uniformly over the domain. .(xi  (xi 1 ª xx º i 2 2 2 ? 2 A 2nd order truncation error on any grid. and .

¨ x 2* ¸ © 2 ¹ © xx ¹ ª ºi ¨ x* ¸ ¨ x* ¸ ¹ © ¹ © xx º i 1 ª xx ºi ª } xi 1  xi Estimate the outer derivative by FDS.Discretization methods (Finite Difference. approximation of the second derivative) Geometrically. the second derivative is the slope of the line tangent to the curve representing the first derivative. and estimate the inner derivatives using BDS. we get ¨ x 2 * ¸ * i 1 .

xi  xi 1  * i 1 .

xi 1  xi  * i .

xi 1  xi 1 © 2 ¹ } © xx ¹ .

xi 1  xi 2 .

xi  xi 1 ª ºi For equidistant spacing of the points: ¨ x 2 * ¸ * i 1  2* i  * i 1 © 2 ¹ } © xx ¹ .

such as xi-2. and xi+3 10 . and xi+2.(x 2 ª ºi Higher-order approximations for the second derivative can be derived by including more data points. even xi-3.

Discretization methods (Finite Volume) FV methods uses the integral form of the conservation equation FV defines the control volume boundaries while FD define the computational nodes Computational node located at the Control Volume center Global conservation automatically satisfied y j i x NW WW W nw w sw (x N n NE EE SW ne ne E (y P e s se SE Typical CV and the notation for Cartesian 2D FV methods uses the integral form of the conservation equation ´ S fdS ! § ´ fdS k Sk 11 .

which are formulated for unsteady flows as initial and boundary value problems (IBVP). T is the true or exact solution) LT . which is defined by a continuous partial differential equation (PDE) operator LT (no modeling or numerical errors.Application of numerical methods in PDE Fluid Mechanics problems are governed by the laws of physics.

T ! 0 IC : T .

t ! 0 ! GT .x.

x BC : T .

t ! H T .xB .

t A1 LM .

M ! 0 Analytical and CFD approaches formulate the IBVP by selection of the PDE. and BC to model the physical phenomena IC : M . IC.

x. t ! 0 ! GM .

x BC : M .

xB . t ! H M .

t A2 LN .

S ! +1 Using numerical methods. the continuous IBVP is reduced to a discrete IBVP (computer code). and thus introduce numerical errors: I : S .

x. t ! 0 ! g N .

x BC : S .

xB . t ! hN .

i J g .t A3 Numerical errors can be defined and evaluated by transforming A4 the discrete IBVP back to a continuous IBVP.

x i LModified .

S ! LM .

S ! +N BC : S .

xB . t ! H Modified .

t ( j xS J S ! S C  §§ i i! xx j +N ! +1  § + j j !1 i !1 IC : S .

x. t ! 0 ! .

x j !1 Modified Truncation error 12 .

Application of numerical methods in PDE (Truncation and Discretization errors) Subtracting equations A2 and A4 gives the IBVP that governs the simulation numerical error H SN ! S  M J LM ( S  M ) ! LM .

H SN ! +N ! +1  § + j IC :H SN .

t ! 0 ! .x.

x  M .

x BC :H SN .

t ! H Modified .xB .

t  H M .

t Modified j !1 A5 An IBVP for the modeling error M-T can be obtained by subtracting A1 and A2: LM ( M  T ) ! LM .

H SM ! +M !  LM .

T IC :H SM .

x. t ! 0 ! GM .

x  GT .

x BC :H SM .

t ! H M .xB .

t  H T .

t A6 Adding A5 and A6 LM ( S  T ) ! LM .

H S ! +N  +M IC :H S .

0 ! GModified .x.

x  GT .

x H S ! S  T ! H SN  H SM BC : H S .

t ! H Modified .xB .

t  H T .

t 13 .

Different coordinates have been covered in Introduction to CFD 14 . structured (regular grid). 2.Numerical grids and coordinates The discrete locations at which the variables are to be calculated are defined by the numerical grid Numerical grid is a discrete representation of the geometric domain on which the problem is to be solved. and 3. Unstructured grids Detailed explanations of numerical grids will be presented in the last lecture of this CFD lecture series. It divides the solution domain into a finite number of sub-domains Type of numerical grids: 1. Block-structured grids.

The matrices derived from partial differential equations are always sparse with the non-zero elements of the matrices lie on a small number of well-defined diagonals 15 . initial guess iterate converged results obtained. is a system of algebraic equations. which are linear or non-linear A* ! Q For non-linear case. the system must be solved using iterative methods. i.Components of numerical methods (Solution of linear equation systems.e. introduction) The result of the discretization using either FD or FV.

. . . . © ©A ª n1 A12 A22 . An 2 A13 A23 . U !© © . 0 A13 A23 . . ¹ . . . © . 0 . . . . . . A!© © .¹ . . . A1n ¸ ¹ A2 n ¹ . . . . ¨ A11 © © A21 © . ¹ ¹ Ann ¹ º Qn *n ! Ann Qi  *i ! k ! i 1 §A * ik n k Aii LU Decomposition: the factorization can be performed without knowing the vector Q A ! LU U* ! Y LY ! Q Tridiagonal Systems: Thomas Algorithm or Tridiagonal Matrix Algorithm (TDMA) P95 i i i AW * i 1  AP * i  AE * i 1 ! Qi ¡     i i AW AE1 i i AP ! AP  i AP1 i AW Qi*1 Qi* ! Qi  Ai 1 Qi*  Ai * i 1 *i ! Ai 16 . © © 0 ª A12 A22 . An 3 . . . ¹ . . . . . ¹ ¹ Ann ¹ º ¨ A11 © © 0 © . A1n ¸ ¹ A2 n ¹ . . . © .Solution of linear equation systems (direct methods) Gauss Elimination: Basic methods for solving linear systems of algebraic equations but does not vectorize or parallelize well and is rarely used without modifications in CFD problems. ¹ . . .¹ . . . . ¹ .

Solution of linear equation systems (iterative methods) Why use iterative methods: 1. Discretization error is larger than the accuracy of the computer arithmetic Purpose of iteration methods: drive both the residual and error to be zero Rapid convergence of an iterative method is key to its effectiveness. in CFD. A* ! Q A* n ! Q  V n AI ! V n n I n ! *  *n V n residual 17 * n Approximate solution after n iteration I n Iteration error . 2. the cost of direct methods is too high since the triangular factors of sparse matrices are not sparse.

Successive Over-Relaxation (SOR).Solution of linear equation systems (iterative methods. Conjugate Gradient Methods 6. or LSOR 4. Jacobi method 2. Biconjugate Gradients and CGSTAB 7. Gauss-Seidel method 3. Multigrid Methods 18 . Alternative Direction Implicit (ADI) method 5. cont d) Typical iterative methods: 1.

examples) Jacobi method: Rik * ik 1 ! * ik  Aii R ! Qi  § Aij x k j k i j !1 n .Solution of linear equation systems (iterative methods.

...2. n Gauss-Seidel method: similar to Jacobi method.. but most recently computed values of all * i are used in all computations.i ! 1. Rik * ik 1 ! * ik  Aii Rik * ik 1 ! * ik  [ Aii Rik ! Qi  § Aij x k 1  § Aij x k j j j !1 j !i i 1 n .

n Successive Overrelaxation (SOR): Rik ! Qi  § Aij x k 1  § Aij x k j j j !1 j !i i 1 n .2...i ! 1...

n 19 ..i ! 1..2...

dominant variable of each equation occurs in some of the other equations Solution approaches: 1. and iterating until the solution is obtained.e. For sequential solution. treating the other variables as known. i. inner iterations and outer iterations are necessary 20 .Solution of linear equation systems (coupled equations and their solutions) Definition: Most problems in fluid dynamics require solution of coupled systems of equations. Sequential Solution: Each equation is solved for its dominant variable. Simultaneous solution: all variables are solved for simultaneously 2.

Solution of linear equation systems (nonlinear equations and their solutions) Definition: Given the continuous nonlinear function f(x). find the value x= . such that f( )=0 or f( )= Solution approaches: 1. Seldom used for solving Navier-Stokes equations. Newton-like Techniques: faster but need good estimation of the solution. f .

x } f .

x0  f .

x0 .

x  x0 ' f .

xk 1 xk ! xk 1  ' f .

Global: guarantee not to diverge but slower.xk 1 2. such as sequential decoupled method 21 .

j ¨ © § (* ik.1 j I I (for all i.j1 © ª i. Integral variable vs.kj n (for all i. Order drops of the residuals 3.j1 I I f i .j1 * ik. Difference between two successive iterates 2.Solution of linear equation systems (convergence criteria and iteration errors) Convergence Criteria: Used to determine when to quite for iteration method 1. j) (* ik. j n k 1 i. j n (* ik. j § i. j) § (* i. iteration history (* ik. j .

22 . Details on how to estimate iterative errors have been presented in CFD lecture. 2 ¸ ¹ ¹ º 12 I Inner iterations can be stopped when the residual has fallen by one to two orders of magnitude.

Differences with spatial discretization: a force at any space location may influence the flow anywhere else.Methods for unsteady problems (introduction) Unsteady flows have a fourth coordinate direction time. forcing at a given instant will affect the flow only in the future (parabolic like). The solution at t1=t0+ (t. . can be used as a new initial condition and the solution can be advanced to t2=t1+ (t . The basic problem is to find the solution * a short time (t after the initial point. t3=t2+ (t. which must be discretized.etc. 23 . These methods are very similar to ones applied to initial value problems for ordinary differential equations.

Two-Level Methods (explicit/implicit Euler) 2.Methods for unsteady problems Methods for Initial Value Problems in ODEs 1. Predictor-Corrector and Multipoint Methods 3. Runge-Kutta Methods 4. Other methods d* .

t ! f .

* .t .

t dt * .

Explicit methods 2.t0 ! * 0 Application to the Generic Transport Equation 1. Implicit methods 3. Other methods x* x* + x 2 * ! u  xt xx V xx 2 24 .

Methods for unsteady problems (examples) Methods for Initial Value Problems in ODEs (explicit and implicit Euler method) explicit * n 1 ! * n  f .

* n 1 (t implicit .n . * n t t ( * n 1 ! * n  f t n 1 .

* n n 2 2 ¸ (t ¨ ** n © t 1 . Methods for Initial Value Problems in ODEs (4th order Runge-Kutta method) (t * n * 1 !*  f tn . ** 1 ¹ * 1 !*  f© n 2 ª n 2 n 2 ¹ 2 º .

* ** 1 ¹ * ! *  (tf © n n ¹ 2 º ª 2 ¨ ¸ ¨ ¸ (t « n 1 n n * © t 1 . * ** 1 ¹  f t n 1 . * 1 ¹  2 f © t 1 . *  2 f © n © n n n ¹ n ¹ 6 ¬ 2 º 2 º ª 2 ª 2 ­ * n 1 n . * * 1 * ! *  ¬ f tn . ¨ ¸ © t 1 .

.

» ¼ ¼ ½ 25 .

Methods for unsteady problems (examples) Application to the Generic Transport Equation (Explicit Euler methods) * n 1 i « * in1  * in1 + * in1  * in1  2* in » ! *  ¬ u  ¼ (t 2 2 (x V .

(x ­ ½ n i Assume constant velocity * n 1 i c¸ n ¨ c¸ n ¨ 1 ! .

 2d *  © d  ¹* i 1  © d  ¹* i 1 2º 2º ª ª n i +(t Time required for a disturbance to be transmitted d! 2 V .

(x By diffusion over a distance (x c! u(t (x Courant number. when diffusion negligible. Courant number should be smaller than unity to make the scheme stable 26 .

Methods for unsteady problems (examples) Application to the Generic Transport Equation (Implicit Euler methods) * n 1 i « * in11  * in11 + * in11  * in11  2* in 1 »  ! *  ¬ u ¼ (t Assume constant velocity 2 2 (x V .

(x ­ ½ n i .

27 .1  2d * in 1  ¨ c  d ¸* in11  ¨  c  d ¸* in11 ! * in © ¹ © ¹ ª2 º ª 2 º Advantage: Use of the implicit Euler method allows arbitrarily large time steps to be taken Disadvantage: first order truncation error in time and the need to solve a large coupled set of equations at each time step.

Solution of Navier-Stokes equations Special features of Navier-Stokes Equations Choice of Variable Arrangement on the Grid Pressure Poisson equation Solution methods for N-S equations 28 .

Solution of N-S equations (special features) Navier-Stokes equations (3D in Cartesian coordinates) « x 2u x 2 u x 2 u » Ö xu xu xu xu xp  Vu  Vv  Vw !  Q¬ 2  2  2 ¼ V xt xx xy xz xx xy xz ½ ­ xx « x 2v x 2v x 2v » Ö xv xv xv xv xp  Vu  Vv  Vw !  Q¬ 2  2  2 ¼ V xt xx xy xz xy xy xz ½ ­ xx « x2w x 2w x2w » Ö xw xw xw xw xp  Vu  Vv  Vw !   Q¬ 2  2  2 ¼ V xt xx xy xz xz xy xz ½ ­ xx Local acceleration Convection Piezometric pressure gradient xV x .

V u x .

V v x .

3. significance is kinetic energy. 2. pressure and Viscous terms Conservation properties: 1. Incompressible isothermal flows.V w    !0 xt xx xy xz Viscous terms Continuity equation Discretization of Convective. Guaranteeing global energy conservation in a numerical method is a worthwhile goal. heat transfer: thermal energy>>kinetic energy 29 . but not easily attained.

Solution of N-S equations (choice of variable arrangement on the grid) Colocated arrangement: 1. Advantages: easy to code 3. Not all variables share the same grid 2. approximation for terms Staggered Arrangements: 1. Advantages: (1). (2). Disadvantages: pressure-velocity decoupling. Strong coupling between pressure and velocities. 3. Some terms interpolation in colocated arrangement can be calculated withh interpolcation. Store all the variables at the same set of grid points and to use the same control volume for all variables 2. Disadvantages: higher order numerical schemes with order higher than 2nd will be difficult Colocated Staggered 30 .

e. 2. i. N-S equations lack an independent equation for the pressure. in incompressible flows. continuity equation cannot be used directly Derivation: obtain Poisson equation by taking the divergence of the momentum equation and then simplify using the continuity equation. pressure values on boundaries must be known to compute the whole flow field x xxi ¨ xp ¸ x © ¹! © xx ¹ xxi ª iº « x .Solution of Navier-Stokes equations (Pressure Poisson equation) Why need equation for pressure: 1. Poisson equation is an elliptic problem.

i u j » u ¬ ¼ ¬ xx j ¼ ­ ½ 31 .

Solve the p equation (The pressure-correction equation) 4.v*. concentration. 32 . w from their starred values using the velocity-correction equations 6. and turbulence quantities. Solve the momentum equations to obtain u*. and repeat the whole procedure until a converged solution is obtained. return to step 2. 7. v.Solution methods for the Navier-Stokes equations Analytical Solution (fully developed laminar pipe flow) Vorticity-Stream Function Approach The SIMPLE (Semi-Implicit Method for pressure-Linked Equations) Algorithm: 1. Guess the pressure field p* 2. such as temperature.w* 3. p=p*+p 5. Calculate u. Treat the corrected pressure p as a new guessed pressure p*. Solve the discretization equation for other variables.

Example (lid-driven cavity) The driven cavity problem is a classical problem that has wall boundaries surrounding the entire computational region. u=UTOP. v=0 UTOP u=v=0 y o x u=v=0 u=v=0 33 . the vorticity-stream function method is used to solve the driven cavity problem. Incompressible viscous flow in the cavity is driven by the uniform translation of the moving upper lid.

Example (lid-driven cavity. governing equations) xu xv  !0 xx xy ¨ x 2u x 2u ¸ xp xu xu xu !  R © 2  2 ¹ v u © xx xy ¹ xx xy xx xt º ª ^ ! xv xu  xx xy ¨ x 2v x 2v ¸ xv xv xv xp u v !  R © 2  2 ¹ © xx xt xx xy xy xy ¹ ª º x] !u xy x] ! v xx x^ x^ x^ 1 ¨ x 2^ x 2 ^ © 2  2 u v ! xt xx xy Re l © xx xy ª «¨ x 2] x p x p  2 ! 2¬© 2 2 © xx xy ¬ª xx ­ 2 2 ¸ ¹ ¹ º 2 x 2] x 2]  2 ! ^ 2 xx xy » ¼ ¼ ½ ¸¨ x ] ¹© 2 ¹© xy ºª 2 ¸ ¨x] ¸ ¹© ¹ ¹ © xxxy ¹ º º ª 2 Ul Re l ! R x^ x^ x .

u^ x .

v^ u v !  xx xy xx xy 34 .

Example (lid-driven cavity. boundary conditions) ! 0 on all walls 2 x 1 2 x .

(n 2 w 1 ! w  (n w  xn 2 xn The top wall ( w  o .

n 2.

NJ ! xp xs 2. ? A 3 ^ i .

NJ  (y  . i .

NJ 1 2 ^w ! .(y w i .

(n 2 w1  w The other Three walls w 1 x^ ! Re l xn ps 1. w 2(s 1 ! Re l ¨  3^ s . w  ps 1. using the tangential momentum equation to the fluid adjacent to the wall surface. w1  ^ s . get: * s is measured along the wall surface and n is normal to it * Pressure at the lower left corner of the cavity is assigned 1. w  4^ s .0 35 . w 2 ¸ © ¹ © ¹ 2(n ª º For wall pressures.

j  uin1. j 1  ] in1. j  p in1. j   2 (x  vin. j 1 ((y ) 2 ¸¨ ] in. j i. j 1^ in j 1 . j  ] in1.Example (lid-driven cavity.j . (t  uin1. j i 1. j ( (x ) 2 pin1. . j 1^ in j 1  vin. j 1  2] in.  ©  ¹  2 2 © ¹ ( (x ) ( (y ) ª º  ] in. j^ in 1. j  2 p in. j 1 ¸ ¹ ¹© ¹© 2 ¹ ¹ © ¹© 4(x(y ( (y ) º º ª ºª 2 «¨ ] n  2] n  ] n i 1. j ( (x ) 2 ( (y ) 2  p in. j ! 2¬© ¬© ((x) 2 ­ª » ¼ ¼ ½ 2nd order central difference scheme used for all spatial derivatives 36 . 1st order upwind for time derivative 1 ! Re l ] in1. j 1 ¸ ¨ ] in1. 2 (y ¨ ^ in 1. j ^ in j 1  2^ in j  ^ in j 1 ¸ . j  pin. j 1  2 pin. j 1 ! ^ in j . . j 1  ] in1. j 1  ] in1. discretization methods) ^ in 1  ^ in j . j  ] in. j  2] in. j^ in 1. . j  ] in. j 1  2] in. . j  2^ in j  ^ in 1.

9. 6.g. 3.Example (lid-driven cavity. 4. 8. 37 . Specify boundary conditions Determine (t n 1 Solve the vorticity transport equation for ^ n 1 Solve stream function equation for ] Solve for un+1 and vn+1 Solve the boundary conditions for ^ n 1 on the walls Continue marching to time of interest. or until the steady state is reached. u=v= ^ = ] =0). 5. Specify the geometry and fluid properties Specify initial conditions (e. solution procedure) 1. 2. 7.

38 .j . j ^ n i. j !1 1 NI v NJ i ! NI . j e 1v 10 8 and i !1. j ! NJ § ^ n 1 i. j ! NJ i !1.Example (lid-driven cavity. residuals) 1 NI v NJ i ! NI . j !1 § ^ in 1  ^ in j e 1v 10 8 .

0064 -0.8 0.8 0.3 0.0101 0.9 1 x ¢ 9 7 5 3 1 0.4 0.4 0.7 0.2 21 29 27 25 7 21 5 3 1 24 25 23 0 0.9 1 1 14 16 19 x 15 11 25 Level 29 p 1.0393 -0.4 0.0119 -0.2 0.0667 -0.1041 -27.6 0.Example (lid-driven cavity.9 5 5 3 11 13 13 9 11 9 7 27 13 28 25 23 29 21 19 17 25 15 29 27 0.3 0.7 0.4 0.2711 8.1562 -24.0521 -30.4273 -0.8 0.1153 1.2603 -18.4686 -6.6 7 17 21 21 23 11 13 27 25 23 21 19 17 15 13 11 9 7 5 3 1 5 9 y 0.9800 27 25 17 1 9 21 23 27 29 19 13 9 15 0.3 0.1 0.4 0.0338 -0.0009 -0.0502 -0.7 0.2 0.1 17 15 2 3 25 27 21 7 3 x 9 11 17 0.3644 -12.1 0.6 13 15 19 4 8 17 Level 29 27 25 23 21 19 17 15 13 11 9 7 zeta 11.9 27 25 21 23 0. sample results) 1 29 27 0.8 0.5 0.1 0.1 0 0 0.3 0.0283 -0.9 0.0552 1.0557 -0.7 0.2 0.6 0.1754 1.5 0.5 0.7 0.1 0.9950 0.6 15 17 21 19 23 25 27 29 y 0.8 0.2 0.5 0.4 0.3753 2.9 0.8 0.1003 1.0000 21 21 19 y 0.0776 1 14 7 5 19 7 0.9 1 x 39 .5 0.0448 -0.0174 -0.3 0.1905 1.0228 -0.1 0 21 0.4165 -9.0852 1.6 0.1 0 0 1 0.1604 1.3 0.4 0.2 0.4 0.7 0.3 0.9 1 1.5 0.1303 1.0612 -0.0251 1.8 0.2 0.0721 -0.5 0.6 0.8 0.1 0 0 5 0.6 17 27 25 23 21 19 17 15 13 11 13 11 9 3 y 0.7 29 25 19 17 15 13 1 1 9 29 23 21 27 23 29 23 21 19 evel psi 31 0.0018 29 -0.7 0.0702 1.3232 5.3124 -15.3 0.2082 -21.2 0.5206 -3.5 0.0401 1.1454 1.

J. 1998 3.. 3rd edition. White. 2004 40 . 2002. Hermosa publishers. 2. Peric. Ferziger. Roache. H. ³Verification and Validation in Computational Science and Engineering´. Frank. M. M. Springer. Patric J. ³ Computational Methods for Fluid Dynamics´. McGraw-Hill Inc.Some good books 1. ³Viscous Fluid Flow´.

Sign up to vote on this title
UsefulNot useful

Master Your Semester with Scribd & The New York Times

Special offer for students: Only $4.99/month.

Master Your Semester with a Special Offer from Scribd & The New York Times

Cancel anytime.