19.09.2019 Views

fluid_mechanics

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

708 Appendix A ■ Computational Fluid Dynamics and FlowLab<br />

y<br />

U<br />

a<br />

+<br />

r<br />

θ<br />

j<br />

Δy<br />

(a)<br />

+<br />

Δ x<br />

i<br />

x<br />

(b)<br />

ψ<br />

i, j + 1<br />

Δy<br />

ψ<br />

i – 1, j<br />

ψi, j<br />

ψ<br />

i + 1, j<br />

Δ x<br />

Δ x<br />

Δy<br />

ψ<br />

i, j – 1<br />

(c)<br />

F I G U R E EA.2<br />

storage may be required. Considerable work has gone into forming<br />

appropriate grids 1Ref. 62. We consider a grid that is uniformly<br />

spaced in the x and y directions, as shown in Fig. EA.2b.<br />

As shown in Eq. 6.112, the exact solution to Eq. 1 1in terms<br />

of polar coordinates r, u rather than Cartesian coordinates x, y2<br />

is c Ur 11 a 2 r 2 2 sin u. The finite difference solution approximates<br />

these stream function values at a discrete 1finite2<br />

number of locations 1the grid points2 as c i, j , where the i and j indices<br />

refer to the corresponding x i and y j locations.<br />

The derivatives of c can be approximated as follows:<br />

and<br />

This particular approximation is called a forward-difference approximation.<br />

Other approximations are possible. By similar reasoning,<br />

it is possible to show that the second derivatives of c can<br />

be written as follows:<br />

and<br />

0c<br />

0x 1 ¢x 1c i1, j c i, j 2<br />

0c<br />

0y 1 ¢y 1c i, j1 c i, j 2<br />

0 2 c<br />

0x 2 1<br />

1¢x2 2 1c i1, j 2c i, j c i1, j 2<br />

0 2 c<br />

0y 2 1<br />

1¢y2 2 1c i, j1 2c i, j c i, j1 2<br />

(2)<br />

(3)<br />

Thus, by combining Eqs. 1, 2, and 3 we obtain<br />

0 2 c<br />

0x 2 02 c<br />

0y 2 1<br />

1¢x2 2 1c i1, j c i1, j 2 1<br />

1¢y2 2 1c i, j1<br />

Equation 4 can be solved for the stream function at and to give<br />

c i, j <br />

c i, j1 2 2 a 1<br />

1¢x2 2 1<br />

1¢y2 2b c i, j 0<br />

1<br />

31¢y2 2 1c<br />

231¢x2 2 1¢y2 2 i1, j c i1, j 2<br />

4<br />

1¢x2 2 1c i, j1 c i, j1 24<br />

c i, j<br />

Note that the value of depends on the values of the stream<br />

function at neighboring grid points on either side and above and<br />

below the point of interest 1see Eq. 5 and Fig. EA. 2c2.<br />

To solve the problem 1either exactly or by the finite difference<br />

technique2 it is necessary to specify boundary conditions for<br />

points located on the boundary of the flow domain 1see Section<br />

6.6.32. For example, we may specify that c 0 on the lower<br />

boundary of the domain 1see Fig. EA.2b2 and c C, a constant,<br />

on the upper boundary of the domain. Appropriate boundary conditions<br />

on the two vertical ends of the flow domain can also be<br />

specified. Thus, for points interior to the boundary Eq. 5 is valid;<br />

similar equations or specified values of c i, j are valid for boundary<br />

points. The result is an equal number of equations and unknowns,<br />

c i, j , one for every grid point. For this problem, these equations<br />

represent a set of linear algebraic equations for c i, j , the solution<br />

x i<br />

y j<br />

(4)<br />

(5)

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!