ABSTRACT

As an example of the shooting method using iteration, let's solve the heat transfer problem presented in Section 8.1. The boundary-value ODE is [see Eq. (8.1)]:

T(O.O) = 0.0 C and T(1.0) = 100.0 C (8.20) Rewrite the second-order ODE, Eq. (8.20), as two first-order ODEs:

(8.21) (8.22)

(8.25)

Equations (8.21) and (8.22) can be solved by the implicit trapezoid method, Eq. (7.141): L1x

For nonlinear ODEs, the implicit trapezoid method yields nonlinear implicit finite difference equations, which can be solved by the modified Euler (i.e., the modified trapezoid) method, Eqs. (7.141) and (7.142), or by Newton's method for systems of nonlinear equations, Section 3.7. However, for linear ODEs, such as Eqs. (8.21) and (8.22), the finite difference equations are linear and can be solved directly. Rearranging Eq. (8.23) yields

L1x L1x T'+I -2 Vi+1 = T'+2Vj (8.24a)

Equation (8.24) can be solved directly for Ti+ 1 and V j+ l • Let (X2 = 16.0 cm-2 , Ta = 0.0 C, and L1x = 0.25 em. To begin the solution, let

V(O.O)(I) = T'(O.O)(I) = 7.5 Clem, and V(0.0)(2) = T'(0.0)(2) = 12.5 Clem. The solutions for these two values of V(O.O) are presented in Table 8.2 and Figure 8.6. From Table 8.2, T(1.0i l ) = 75.925926C, which does not equal the specified boundary condition T(1.0) = 100.0C, and T(1.0)(2) = 126.543210C, which also does not equaI100.0C. Applying the secant method yields:

Slope = T(1.0)(2) - T(I.O)(I) 126.543210 - 75.925926 = 10.123457 V(0.0)(2) - V(O.O)(I) 12.5 - 7.5

V(O.O)(]) = V(0.0)(2) + 100.0 - T(1.0P) = 9.878049 (8.26) Slope

The solution for V(O.O)(]) = 9.878049 Clem is presented in Table 8.3 and illustrated in Figure 8.6. For this linear problem, T( 1.0)(3) = 100.0 C, which is the desired value. The three solutions for T'(O.O)(I), T'(O.O)(2), and T'(O.OP) are presented in Figure 8.6. The final solution is presented in Table 8.4, along with the exact solution T(x) and the error, Error(x) = [T(x) - T(x)].