54
3. Finite Difference Methods
If the gradient is prescribed at the boundary, a suitable FD approximation
for it (it must be a one-sided approximation) can be used to compute the
boundary value of the variable. If, for example, zero gradient in the normal
direction is prescribed, a simple FDS approximation leads to:
which gives 41 = 42, allowing the boundary value to be replaced by the
value at the node next to boundary and eliminated as an unknown. From a
parabolic fit to the boundary and two inner points, the following second-order
approximation, valid on any grid, is obtained for the first derivative at the
boundary:
On a uniform grid this expression reduces to:
A third-order approximation on equispaced grids is obtained from a cubic fit
to four points:
Sometimes one needs to calculate first derivative normal to boundary at
points at which the boundary value of the variable is given (for example,
to calculate heat flux through an isothermal surface). In this case, any of
the one-sided approximations given above are suitable. The accuracy of the
result depends not only on the approximation used, but also on the accuracy
of the values at interior points. It is sensible to use approximations of the
same order for both purposes.
When the compact schemes described in Sect. 3.3.3 are used, one has to
provide both the variable value and the derivative at boundary nodes. Usually, one of these is known and the other must be computed using information
from the interior. For example, a one-sided approximation to the derivative
at the boundary node, like Eq. (3.40), can be employed when the variable
value is prescribed. On the other hand, polynomial interpolation can be used
to compute the boundary value if the derivative is known. From a cubic fit
to four points the following expression is obtained for the boundary value:
Précédent

- 67/431

Suivant