Question 24.3: Use the shooting method to solve Eq. (24.6) for the rod in E...
Use the shooting method to solve Eq. (24.6) for the rod in Example 24.1 : L = 10 m, h^′ = 0.05 m^{−2} [ h = 1 J/(m^2 · K · s), r = 0.2 m, k = 200 J/(s · m · K)], T_∞ = 200 K, and T(10) = 400 K. However, for this case, rather than having a fixed temperature of 300 K, the left end is subject to convection as in Fig. 24.5.
For simplicity, we will assume that the convection heat transfer coefficient for the end area is the same as for the rod’s surface .
0=\frac{d^2}{d x^2}+h^{\prime}\left(T_{\infty}-T\right) (24.6)

As in Example 24.2 , Eq. (24.6) is first expressed as
\frac{dT}{d x} = z
\frac{dz}{dx} = −0.05(200 − T )
Although it might not be obvious, convection through the end is equivalent to specifying a gradient boundary condition. In order to see this, we must recognize that because the system is at steady state, convection must equal conduction at the rod’s left boundary (x = 0). Using Fourier’s law [Eq. (24.5)] to represent conduction, the heat balance at the end can be formulated as
q = − k \frac{dT}{ dx} (24.5)
h A_c\left(T_{\infty}-T(0)\right)=-k A_c \frac{d T}{d x}(0) (24.12)
This equation can be solved for the gradient
\frac{d T}{d x}(0)=\frac{\hbar}{k}\left(T(0)-T_{\infty}\right) (24.13)
If we guess a value for temperature, we can see that this equation specifies the gradient.
The shooting method is implemented by arbitrarily guessing a value for T (0). If we choose a value of T (0) = T_{a1} = 300 K, Eq. (24.13) then yields the initial value for the gradient
z_{a 1}=\frac{d T}{d x}(0)=\frac{1}{200} (300-200) =0.5
The solution is obtained by integrating the pair of ODEs from x = 0 to 10. We can do this with MATLAB’s ode45 function by first setting up an M-file to hold the differential equations in the same fashion as in Example 24.2. We can then generate the solution as
>> [t,y] = ode45(@ Ex2402,[0 10],[300,0.5]);
>> Tb1 = y(length(y))
Tb1 =
683.5088
As expected, the value at the end of the interval of T_{b1} = 683.5088 K differs from the desired boundary condition of T_b = 400. Therefore, we make another guess T_{a2} = 150 K,which corresponds to z_{a2} = −0.25, and perform the computation again.
>> [t,y] = ode45(@ Ex2402,[0 10],[150,−0.25]);
>> Tb2 = y(length(y))
Tb2 =
−41.7544
Linear interpolation can then be employed to compute the correct initial temperature:
T_a=300+\frac{150-300}{-41.7544-683.5088}(400-683.5088)=241.3643 \mathrm{~K}
which corresponds to a gradient of z_a = 0.2068. Using these initial conditions, ode45 can be employed to generate the correct solution, as depicted in Fig. 24.6.
Note that we can verify that our boundary condition has been satisfied by substituting the initial conditions into Eq. (24.12) to give
1 \frac{\mathrm{J}}{\mathrm{m}^2 \mathrm{~K} \mathrm{~s}} \pi \times(0.2 \mathrm{~m})^2 \times(200 \mathrm{~K}-241.3643 \mathrm{~K})=-200-\frac{\mathrm{J}}{\mathrm{mKs}} \pi \times(0.2 \mathrm{~m})^2 \times 0.2068 \frac{\mathrm{K}}{\mathrm{m}}
which can be evaluated to yield −5.1980 J/s = −5.1980 J/s. Thus, conduction and convection are equal and transfer heat out of the left end of the rod at a rate of 5.1980 W.
