You are on page 1of 6

MECH 3040 Heat Transfer Numerical Methods for Conduction Problems

1. Transient/Lumped Capacity Problems Consider an object of that is being heated simultaneously by convection and radiation. This could be, for example, a small coal particle as it is injected into a ame. From conservation of energy, an energy balance on the object is dE = Qconv + Qrad (1) dt or, using our rate laws dE 4 4 = hAs (T Ts ) + As (Tenv Ts ) dt (2)

A more formal approach to estimating derivatives is to employ a Taylor series: T (t + t) = T (t) + t or, T (t + t) T (t) 1 d2 T ... t t 2 dt2 t t T (t + t) T (t) = + O(t) (8) t What is obtained from this approach is an idea of the accuracy of the forward dierence approximation. Specifically, the approximation is order t, which means that if the t is halved, the error in the approximation would be reduced by around 1/2. Equation (7) could also be used to represent the temperature at time t t, and by subtracting the result from Eq. (7) and rearranging, the central dierence approximation to the derivative is obtained: dT dt = dT dt =
t

dT dt

+
t

2 1 2 d T (t) 2 dt2

+ . . . (7)
t

If the resistance to heat transfer to or from the object (by convection and radiation) is signicantly larger that the resistance to heat transfer within the object by conduction, the assumption can be made that the temperature of the object is uniform at any time. This is the small Biot number approximation, under which Eq. (2) becomes cV dT 4 = hAs (T T ) + As (Tenv T 4 ) dt (3)

T (t + t) T (t t) + O(t)2 2t

(9)

The initial condition on this DE is T = Ti at t = 0. It turns out that Eq. (3) has no known analytical solution, and numerical methods must be used to predict the temperature of the object at dierent times. The basic idea behind the numerical solution of Eq. (3) is to represent the derivative as a nite dierence. There are several ways to do this; the most direct is simply to use the denition of a derivative: dT T (t + t) T (t) = lim t0 dt t (4)

The key feature of a central dierence is that the error scales with (t)2 : halving t would reduce the error by around 1/4. The forward dierence formula leads to a simple procedure for numerically solving Eq. (3). Replacing Eq. (5) into Eq. (3) results in cV T (t + t) T (t) hAs (T T (t)) t 4 + As (Tenv T 4 (t)) (10)

Rearranging and using = k/c results in hAs t (T T (t)) kV As t 4 + (Tenv T 4 (t)) (11) kV Equation (11) provides a relatively simple algorithm to calculate the temperature of the object at discrete time steps. The temperature of the object at t = 0 is given from the initial condition, and the temperature at time t = t would be (approximately) T (t + t) = T (t) + T (t) = Ti + hAs t (T Ti ) kV As t 4 + (Tenv Ti4 ) kV

An approximation of a derivative is obtained from this formula by keeping t small yet nite, i.e., dT dt
t

T (t + t) T (t) t

(5)

The above is known as a forward dierence approximation of the derivative in that the temperature at time t along with the temperature at t + t is used to estimate the time derivative at time t. A backwards dierence would use temperature at t and t t to estimate the derivative at t: dT dt
t

T (t) T (t t) t

(6) 1

(12)

The temperature at t = t can now be used to get the temperature at t = 2t, i.e., T (2t) = T (t) + hAs t (T T (t)) kV As t 4 + (Tenv T 4 (t)) (13) kV

And so on. This process is typically referred to as an explicit method: the temperature at time t + t is calculated explicitly from the temperature at time t. An explicit method is a consequence of using the forward difference formula in the dierential equation. An important parameter in this numerical solution scheme is the time step t. Some results for several values of t are plotted below. The diameter of the particle is 2 mm, h, k, and are 100, 10, and 1106 (in the usual units), is unity, and Ti , Tenv , and T are 300, 1000, and 500 K, respectively. The legend refers to the dierent t values used in the calculations.

800 700 600 500 400 300 0 50 100 150 200 0.1 1 5 10 20 25

steady state, and the error in the numerical solution will also goes to zero providing that t is not too large. If t is larger than a certain value unexpected and unrealistic things start happening to the numerical solution. The solution for t = 20 s predicts that the temperature of the sphere will overshoot the steady state temperature during the heatup process, and the curve for t = 25 s actually oscillates back and forth around the steady state temperature. These results are physically impossible, and what is happening is a purely numerical phenomena known as instability. Basically, the formula used to numerically calculate the temperature, Eq. (11), will become unstable once t is increased beyond a certain value. Instability results in wild, highly inaccurate changes in temperature from one time step to the next. The error can actually grow with each additional time step, resulting in negative absolute temperatures (which again are physically impossible) and ultimately numerical overow (i.e., the solution will blow up). The unstable behavior of the solution for t greater than a certain value is an unavoidable feature of all explicit numerical methods. The critical value of t will depend on the specics of the DE that is being solved, and an estimation of this value can be obtained for sufciently simple DEs. Say, for example, radiation is neglected in the energy balance. The explicit formula in Eq. (11) would then be T (t + t) = T (t) + hAs t (T T (t)) kV = T (t) + C1 t(T T (t))

(14)

where C1 = hAs /kV . Now take the dierence between temperatures at successive time steps and form a ratio of the dierence; this will result in T (t + 2t) T (t + t) = 1 C1 t T (t + t) T (t) (15)

Figure 1. Numerical predictions of the solution to Eq. (3), for dierent t A couple of important features can be observed in the plot. The rst has to do with the accuracy of the solution. As would be expected, the accuracy is related to the size of t: smaller t results in a more accurate solution. Furthermore, the largest errors, which occur at times around 3050 s, correspond to a relatively large second derivative of the temperature. This behavior is a consequence of the Taylor series formula in Eq. (8): large second derivatives will result in a poorer approximation to the rst derivative. For t greater than around 80 s the sphere attains its steady state temperature. All curves appear to reach the same limit; this is because the derivatives of temperature with respect to time go to zero as the sphere attains a 2

From physical reasons, the left hand side of the above equation would be expected to always be less than one and greater than zero. As the temperature of the object approaches the ambient temperature, the rate at which its temperature changes will decrease and eventually go to zero. Consequently, the change in temperature from one time step to the next will be increasingly smaller for each new time step. This physical reasoning puts some constraints on the right hand side of Eq. (15). If t is chosen so that t < 1/C1 , we would expect to get a physically realistic (although perhaps inaccurate) solution. If, on the other hand, t exceeds 1/C1 , the dierence in temperatures from one time step to the next would oscillate between positive and negative values. In other words, the numerical solution would become unstable. As mentioned above, instability is a feature of explicit methods. It is possible to avoid the instability problem

by formulating the numerical solution using a backwards dierence formula. Using Eq. (6) in Eq. (3) results in T (t + t) = T (t) + hAs t (T T (t + t)) kV As t 4 (Tenv T 4 (t + t)) (16) + kV

The above formulation is known as an implicit method. Unlike the explicit method, the temperature at time t+t is not given explicitly from the temperature at time t. Rather, at each time step the above equation must be solved for the temperature at t + t. Because of radiation this solution involves nding the root to a nonlinear equation for T (t+t). Obviously this is not as convenient as the explicit method. However, the implicit method is unconditionally stable. In other words, the numerical solution will not diverge regardless of the size of t. The accuracy of the implicit method, on the other hand, is the same as for the explicit method, i.e., proportional to t. For the simple transient problem examined here, it does not make any sense to use an implicit method. The computer requirements for calculating T with the explicit method are minimal, and it is no problem to make t suciently small so that the solution is accurate and stable. The implicit method, however, will be useful for more complicated problems involving transient as well as spacial variations in temperature. 2. Transient & Spacial Problems 2.1. Formulation of the dierence equations Consider a n of uniform cross section. Initially, the n is at the ambient temperature T . The base is then brought to a temperature T0 . The objective is to determine the temperature in the n as a function of time and position, and determine the rate of heat transfer from the n. The typical n assumption will be made, in that the temperature varies only in the lengthwise (x) direction. This problem diers from the Chapter 3 material on ns, in that the heat transfer process is transient. It is relatively straightforward to include time dependence in the n dierential equation, and the end result is c Ac T 2T = k Ac 2 h P (T T ) t x (17)

a numerical approximation to the time and space dependent temperature distribution in the n, which happens to be predicted by Eq. (17). One approach to developing a numerical solution is to discretize the DE. This approach was used in the previous section, in which a forward dierence was used to approximate the time derivative. Application of this approach to Eq. (17) would require a nite dierence approximation to the second derivative in x, and such an approximation can be easily obtained from the Taylors series expansion in Eq. (7), applied to T (x x, t) and T (x + x, t), and eliminating the rst derivatives in x. An alternative approach, which can be somewhat easier to conceptualize, is to start with the physical system under examination, i.e., the n. Divide the n into N + 1 control volumes (CVs), denoted as 0, 1, 2, . . . N , with all except the one adjacent to the base (CV 0) having a length x, and the base control volume having a length (x)/2; the reason for this distinction will be made clear in what follows.

Figure 2. Control volume model of the n An energy balance can now be applied to each CV. In particular, for CV i in the gure, the rate of change of the energy of i would equal the net rate of heat transfer to i. And the net rate of heat transfer can be estimated by application of a 1D, networkbased analysis to the CV. To do this, a node, illustrated by the black circles, will be assigned to each CV. The rate of conduction heat transfer from CV i 1 to CV i can be estimated from a 1D model, applied to the temperatures at the nodes, i.e., kAc (Ti1 (t) Ti (t)) x Likewise, the rate of convection heat transfer from CV i to the surrounding uid would be qcond (i 1 i) qconv (i) hAs (Ti (t) T ) h P x(Ti (t) T ) where the exposed surface area As of the CV would be AS = P x. The volume of the CV is V = Ac x. Finally, the mean temperature of the CV which is a measure of the total energy of the CV is taken to be the temperature at the node. The energy balance on CV i would therefore appear as [ ] kAc di = (i1 i ) (i i+1 ) c Ac x dt x h P x (i), i = 1, 2, . . . N 1 (18) 3

where Ac and P are the n cross sectional area and perimeter, both of which are constants for this example. An analytical solution to Eq. (17) can be obtained using separation of variables methods, although such methods are relatively dicult to apply. Of interest here is the numerical solution to Eq. (17) or, more specically,

where is the temperature relative to ambient: i = Ti T (19)

The right hand side of the DEs will also be evaluated at time t, and this results in an explicit algorithm for the nodal temperatures: i (t + t) = i (t) [ kAc t (i1 (t) + i+1 (t) 2i (t)) + c Ac x x ] h P x i (t) , i = 1, 2, . . . N 1 (22)

Use of will make the formulas easier to code. This balance appears as an ordinary DE: the dependence of the nodal temperatures on time, i.e., i (t), is implied. In addition, Eq. (18) assumes that node i is interior, that is, the node is bordered by CVs on either side. Equation (18) will not apply to CV i = N since there is no i + 1 CV for this case. A special energy balance must be performed at the tip (CV N ). To do this it will be assumed that convection occurs at the tip, so the outow of conductive heat in Eq. (18) is simply replaced with the outow of convective heat from the tip surface: c Ac x kAc dN = (N 1 N ) dt x h (P x + Ac ) N

N (t + t) = N (t)

[ t kAc (N 1 (t) N (t)) + c Ac x x

(20)

] (23)

h(P x + Ac ) N (t)

An energy balance, and corresponding ODE, is not needed for the base CV (CV 0): the temperature 0 = T0 T is known and xed from the base boundary condition. And this fact explains why CV 0 has a length of (x)/2: the node of the CV should be placed at the point where the temperature is either specied (in the case of a boundary condition) or sought. The boundary condition has = 0 at x = 0, so the node for 0 should be located at x = 0. In addition, the nodes for this problem at least should be placed an equal distance from each other, and the boundary of the CV should fall half way between two adjacent nodes. For the specic case of this example, the relation between n length L, number of CVs N , and x would be L = (x)/2 + N x x = 2L 2N + 1

Beginning with the initial condition i (0) = 0, Eqs. (22) and (23) can be solved explicitly for the nodal temperatures at times t = t, 2t, . . .. This method is dangerous for the same reasons that produced the erroneous results in Fig. (1): when the time step t becomes too large, the solution can become unstable and blow up. The general criterion for stability is that the coecient multiplying Ti (t) on the right hand side of Eq. (22) must be positive, i.e., 1 t c Ac x ( ) 2kAc + h P x > 0 x (24)

If, for example, the temperature at the tip of the n was also specied, say T (x = L) = TL , then the CV at the tip would have a length of (x)/2, and the node would be placed right on the surface at x = L. The quantities L, N , and x would now be related by L = (x)/2 + (N 1)x + (x)/2 x = 2.2. The explicit algorithm Equations (18) and (20) represent N coupled rstorder ODEs for the nodal temperatures 1 (t), 2 (t), . . . N (t). The simplest yet most dangerous method to solve these equations is to approximate the time derivative by a forward dierence, i.e., i (t + t) i (t) di dt t (21) 4 L N

This implies that a ne spacial mesh corresponding to small x will require a correspondingly small time step t. The explicit method is very easy to code: it will involve a simple pair of nested loops, with time step as the outer loop and node number the inner. Those familiar with the matrix multiplication features of MatLab can further simplify the coding. The relations in Eqs. (22) and (23) can be viewed as a matrixvector multiplication, so that (t + t) = (t) + t A (t) with 0 1 = 2 . . . N (25)

(26)

and

0 0 b a 0 b A = . . . 0 0 0 0 with

0 b a ... ...

0 ... 0 ... b ... 0 0 b 0

0 0 0 a b b a 0 0 0

(27)

) ( 1 2kAc + h P x c Ac x x ( ) 1 kAc a = + h (P x + Ac ) c Ac x x 1 kAc b= c Ac x x a=

and this condition is identied simply by noting the relative dierence between the values at (t + t) and (t); the solution loop would exit when this relative dierence drops below a set criterion. The dashed curve on the plot is the analytical solution for the steadystate n (with convection at the tip), and this solution closely matches the transient numerical solution in the steadystate limit. The heat transfer from the n, as a function of time, can be obtained from the numerical solution by evaluating the ow of heat into the n at the base: q(t) = k Ac x

(28) (29) (30)

x=0

kAc (0 1 (t)) x

(31)

The matrix A has a tridiagonal structure: this occurs for 1D conduction problems, and a multitude of algorithms have been developed to exploit this structure in numerical methods. The rst row of the matrix is zero: this is because the rst row would account for the change in T0 and this change is zero. Results for the temperature distribution in the n, as a function of time and position, are shown in Fig. (3). The properties are k = 200 W/m K, h = 5 W/m2 K, L = 0.1 m, thickness d = 0.001 m (rectangular n), = 70106 m2 /s (properties correspond to Aluminum), and T0 T = 70 C. Twenty control volumes were used, corresponding to x 1/2 cm. The coecient on i in Eq. (22) is 1 5.887 t for this case, and accordingly t < 1/5.887 for a stable integration. In general one would want to choose a t signicantly smaller than this maximum value.
80

Predictions of q (heat per unit n width) vs. t are shown in Fig. (4). The results are shown on a LogLog scale. The heat transfer precisely at t = 0 would actually be innite at least as predicted mathematically for the problem as it is stated. This is because the initial condition has the base temperature instantly changing from T to T0 at t = 0: this would result in an instantaneous innite temperature gradient at the base. Again, this is a mathematical artifact: in the physical world there are no discontinuities. The exact steady state result is also shown, and the numerical result again converges well to the SS prediction for large t.
2000 numerical 1000 SS exact 500 q', W m

200 100 50

60

0.1

10 t, s

100

40

20

Figure 4. Predicted heat transfer as a function of time.

0 0.00 0.02 0.04 x 0.06 0.08 0.10

Problems 1. A 2 cm 4 cm 8 cm block of steel is initially at a uniform temperature of 1150 C. The steel is then cooled by combined free convection and radiation to the surrounding air at 30 C. The heat transfer coecient is h = 30 W/m2 K and the surface emissivity is = 0.75. Assuming lumped capacity conditions, numerically calculate and plot the temperature of the block as a function of time. Use an explicit time integration scheme. 5

Figure 3. Transient temperature distribution in the n Results shown in the plot were calculated using t = 0.1 s, and the lines correspond to temperature distributions at t = 0, 1, 2, 4, 8,. . .77 s. The solution will eventually reach a steady state providing the solution is stable

2. It is not uncommon for ns to have a triangular prole shape, as illustrated below. Consider the case where the n, which is constructed from aluminum and has a width W in and out of the paper, is initially at the ambient temperature. At time t = 0 the base of the n is instantly brought to the temperature TB , in which TB > T . The heat transfer coecient is uniform over the n and has the value h = 30 W/m2 K. Following the procedure described for the uniform cross section n, develop a discretized formulation for the transient and one dimensional temperature distribution in the triangular n. Using an explicit scheme, calculate and plot the temperature prole in the n for various values of time, including the steadystate case.

L b x

The n can be considered long in and out of the paper. Note that the cross sectional area, at any position x, will be given by Ac (x) = bW x/L, where b is the base thickness, W is the width (in and out) and L is the length of the n. The surface area of a control volume of length x would be given by As = 2xW (1 + (b/2L)2 )1/2 .

You might also like