3.7 Implementation of Boundary Conditions
53
exact in the limit of infinitesimal grid size. The difference in the solutions
obtained with two approximations is due to the discretization errors being
different.
3.6 Approximation of Other Terms
In the scalar conservation equation there may be terms - which we have
lumped together into the source term q6 - which do not contain derivatives;
these also have t o be evaluated. In the FD method, only the values at the
nodes are normally needed. If the non-differentiated terms involve the dependent variable, they may be expressed in terms of the nodal value of the
variable. Care is needed when the dependence is non-linear. The treatment
of these terms depends on the equation and further discussion is put off until
Chaps. 5 and 7.
3.7 Implementation of Boundary Conditions
A finite-difference approximation to the partial differential equation is required at every interior grid point. To render the solution unique, the continuous problem requires information about the solution at the domain boundaries. Generally, the value of the variable at the boundary (Dirichlet boundary conditions) or its gradient in a particular direction (usually normal to
the boundary-Neumann
boundary conditions) or a linear combination of
the two quantities is given.
If the variable value is known a t some boundary point, then there is no
need to solve for it. In all FD equations which contain data a t these points,
the known values are used and nothing more is necessary. A problem does
arise when higher-order approximations of the derivatives are used; since they
require data at more than three points, approximations at interior nodes may
demand data a t points beyond the boundary. It may then be necessary to
use different approximations for the derivatives at points close to boundary;
usually these are of lower order than the approximations used deeper in the
interior and may be one-sided differences. For example, from a cubic fit t o the
boundary value and three inner points, Eq. (3.13) may be derived for the first
derivative at the next-to-boundary point. Fitting a fourth-order polynomial
through the boundary and four inner points, the following approximation for
the first derivative results at x = xz, the first interior point:
Approximation of the second derivative using the same polynomial gives:
Précédent

- 66/431

Suivant