40
3. Finite Difference Methods
discretization methods the grid is usually locally structured, i.e. each grid
node may be considered the origin of a local coordinate system, whose axes
coincide with grid lines. This also implies that two grid lines belonging t o
the same family, say El, do not intersect, and that any pair of grid lines
belonging to different families, say J1 = const. and J2 = const., intersect only
once. In three dimensions, three grid lines intersect at each node; none of these
lines intersect each other a t any other point. Figure 3.1 shows examples of
one-dimensional (ID) and two-dimensional (2D) Cartesian grids used in FD
methods.
0
3
C
0
n
-
"
"
"
1
i-l
i
i+ l
N
Fig. 3.1. An example of a 1D (above) and 2D (below) Cartesian grid for FD methods (full symbols denote boundary nodes and open symbols denote computational
nodes)
Each node is uniquely identified by a set of indices, which are the indices of
the grid lines that intersect at it, (i, j ) in 2D and ( i , j , k) in 3D. The neighbor
nodes are defined by increasing or reducing one of the indices by unity.
The generic scalar conservation equation in differential form, (3.1), serves
as the starting point for FD methods. As it is linear in 4, it will be approximated by a system of linear algebraic equations, in which the variable values
a t the grid nodes are the unknowns. The solution of this system approximates
the solution to the partial differential equation (PDE).
Each node thus has one unknown variable value associated with it and
must provide one algebraic equation. The latter is a relation between the
variable value a t that node and those at some of the neighboring nodes. It
is obtained by replacing each term of the PDE at the particular node by
a finite-difference approximation. Of course, the numbers of equations and
unknowns must be equal. At boundary nodes where variable values are given
(Dirichlet conditions), no equation is needed. When the boundary conditions
3. Finite Difference Methods
discretization methods the grid is usually locally structured, i.e. each grid
node may be considered the origin of a local coordinate system, whose axes
coincide with grid lines. This also implies that two grid lines belonging t o
the same family, say El, do not intersect, and that any pair of grid lines
belonging to different families, say J1 = const. and J2 = const., intersect only
once. In three dimensions, three grid lines intersect at each node; none of these
lines intersect each other a t any other point. Figure 3.1 shows examples of
one-dimensional (ID) and two-dimensional (2D) Cartesian grids used in FD
methods.
0
3
C
0
n
-
"
"
"
1
i-l
i
i+ l
N
Fig. 3.1. An example of a 1D (above) and 2D (below) Cartesian grid for FD methods (full symbols denote boundary nodes and open symbols denote computational
nodes)
Each node is uniquely identified by a set of indices, which are the indices of
the grid lines that intersect at it, (i, j ) in 2D and ( i , j , k) in 3D. The neighbor
nodes are defined by increasing or reducing one of the indices by unity.
The generic scalar conservation equation in differential form, (3.1), serves
as the starting point for FD methods. As it is linear in 4, it will be approximated by a system of linear algebraic equations, in which the variable values
a t the grid nodes are the unknowns. The solution of this system approximates
the solution to the partial differential equation (PDE).
Each node thus has one unknown variable value associated with it and
must provide one algebraic equation. The latter is a relation between the
variable value a t that node and those at some of the neighboring nodes. It
is obtained by replacing each term of the PDE at the particular node by
a finite-difference approximation. Of course, the numbers of equations and
unknowns must be equal. At boundary nodes where variable values are given
(Dirichlet conditions), no equation is needed. When the boundary conditions