for , and . Suppose that satisfies mixed boundary conditions in the -direction:

(215) |

(216) |

(217) |

As before, we discretize in time on the uniform grid
, for
.
Furthermore, in the -direction, we discretize on the uniform grid
, for
, where
. Finally, in the -direction, we discretize
on the uniform grid
, for , where
.
Adopting the Crank-Nicholson temporal differencing scheme discussed in Sect. 6.6, and
the second-order spatial differencing scheme outlined in
Sect. 5.2, Eq. (214) yields

where . The discretized boundary conditions take the form

plus

Here, ,

Adopting the Fourier method introduced in Sect. 5.7, we
write the in terms of their Fourier-sine harmonics:

When Eq. (218) is written in terms of the , it reduces to

for , and . Here, , and . Moreover, the boundary conditions (219) and (220) yield

where

In order to advance our solution by one time-step, we first Fourier transform the and the boundary conditions, according to Eqs. (223) and (227). Next, we invert the tridiagonal equations (224)--(226) to obtain the . Finally, we reconstruct the via Eq. (222).