The partial differential equation that describes steady-state flow in a two-dimensional, homogeneous, isotropic region of flow (Section 2.11) is Laplace’s equation:
To find the finite-difference equation for an interior node in the nodal grid used to discretize the region of flow, we must replace the second-order partial derivatives in Eq. (A6.1) by differences. Let us consider the first term of the equation first. Recall that the definition of the partial derivative with respect to x of a function of two variables h(x ,z) is
On a digital computer it is impossible to take the limit as , but it is possible to approximate the limit by assigning to some arbitrarily small value; in fact, we can do so by designing a nodal network with a mesh spacing of .
For any value of z, say z0, we can expand h(x, z0) in a Taylor’s expansion about the point (x0, z0) as follows:
If we let (this is known as a forward difference) and abandon all the terms of order greater than unity, we can approximate by
The abandoned terms of the Taylor expansion represent the truncation error in the finite-difference approximation.
We can obtain a similar expression to Eq. (A6.4) by substituting the backward difference, , into Eq. (A6.3). This yields
To obtain the approximation for , we write the difference equation in terms of using a forward-difference expression:
and substitute the backward-difference expression Eq. (A6.5) in Eq (A6.6) to get
In a similar manner, we can develop a difference expression for as
For a square grid, ; adding Eqs. (A6.7) and (A6.8) to for Laplace’s equation yields
If we let (x0, z0) be the nodal point (i, j), Eq. (A6.9) can be rearranged to yield
which is identical to Eq. (5.24).