You are on page 1of 17
36 NUMERICAL. HEAT TRANSHER AND FLUID FLOW 18H) (3.18) (say ‘The foregoing intzoductory discussion provides sufficient background to allow the formulation of the basic rules that our diseretization equations should obey, to ensure physical realism and overall balance, These seeminzly simple rules Tave farreaching implications, and shey will guide the develop. nent af methods throughout this book 3.4 THE FOUR BASIC RULES Rule 1: Consistency at controlvolume faces Whes a face is common 1 ‘Wo adjacent contro! volumes, the Nux across it must be represented by the same expression in the diserstization equations for the two contol volumes, Discussion. Obviously, the heat flux that leaves one control volume particular face must be identical to the flux that enters the next volume igough the same face, Otherwise, the overall balanee would he satisfied, Although this: req violations must be watched for. For the contyol volume shown jn Fig. 3.2, we could have nj the interface heat fluxes & dTjdx trom a quadzatic profile passin Ty. Tr. and Ty. The use of the same kine of formulation for the next control volume implies that the gradient dT idx at the common interface is calculated from different profile, depending, on whieh contro! volume Js being consigered. The resulting inconsistency” in aT idx (and hence in the heat flux) is sketched tp Pig. 3.5. Another practice that could lead to flux inconsistency is to assume that the fluxes st the faces of a siven control volume are all governed by the centerpoint conductivity ky, Then the heat Hux at the interteee e (shown in Fig. 3.2) will be expressed as kip (Ip Tp W(6x)e when the surrounding the point P is considered, and as Kp (Tp— Tp)(Ox}e when the equation with £ as the center point is constructed, To avoid soch incon not nl is easy to understand, subtle sontro) volume "1 se happens that, ifthe intetaces sre feste midiy between the ed pois, te type of Guadrate profile shown in Tie, 3.5 doce not sve any ancomsitency This because the slope of a parabola st lestion anigway between two points is exaeU¥ eg lo the slope of the sagt lie jolaig the to points. But this property of the pars rust be sezarded a6 forcuitous, and one must, in fencral, geeaht ftom changing the Interface x expression Wile going fiom ene coat) volusme to the nex DISCRETIZATION METHODS a | Sipe trom rant Slope from int Figure 3. ux inconsistency resulting fom quadate profil sisteneles, i is usefull to remember that an interface flux must be considered jn fits own right, and not as belonging to 2 certain control volume Rule 2: Positive coefficients Most situations of interest here will bes that the value of a dependent variable at a grid point is influenced by the values at neighboring grid points only through the processes of convection ind diffusion. Then i follows that an increase in the value at one grid point should, with other conditions remaining unchanged, lead to an Increase (and not 2 decrease) in the value at the neighboring grid point. Ta Py, (3.13), sf am increase in Tip must lend to an increase in J'p it follows that the coefficients az and ap must have the same sign. In other words, for sl equation (3.15), the neighbor coefficients dqy and the centerpoint coefficient ap all must be of the same sign. We can, of fe, choose t© make tem all positive or all negative, Let us decide to ‘write our discretization equations such that the coeffieients are postive then Rule 2 can be stated as Fallows: All coefficients (@p and neig Noor coefficients ayy) must always be Comments. The cvetic ilustiative diseretizatio nt definitions given in Eqs, (3.14) show thst our ation (Eq. G.13)] does obey the positive feient rule, However, as we shall see ater, thece are sumerous formule tions dat flequently violate this sule, Usually, the consequence is a psy'siealy 38 NUMERICAL HEAT TRANSFER AND FLUID FLOW bor coofficient can lead unrealistic solution. The presence of a nepative 2 to the situation in which an increase in a boundary temperature causes the temperature at the adjacent grid point to ceeresse, We shall accept only those ormslations that guarantee positive INicients under all circumstances Rule 3: Negative-slope linearization of the source term If we consider the eltisient definitions in Egs. (3.18), it appears that, even if the neighbor coellisients are positive, the centerpoint coeffi 1 ap can become negative via the Sp term, OF course, che danger can be completely avoided by requiring that Sp will not be positive. Thus, we formulate Rule 3 as follows: When tHe source term is linearized as 3= Se +SpTp, the cnetficient Sp mist always be less than oF equal to zer0, Remarks, This cule is not as arbitrary as it sounds. Most physical processes do have a negativeslope relationship between the source teum and the Gependent variable. Indeed, if Sp were positive, the physical siustion could be lc. A postive Sp implies that, as Tp inereases, the source term increases; IF an effective heattemoval mechanism is not available, tals ‘may, in turn, lead to an inetease in Tp, and so on. Computationally, i is vital to Keep Sp negati realistic solutions éo not arise, The souree-term Linearization is fucther discussed in the next .9 that instabilities and physically pier. It is sufficient to note here that, for computational success, the principle of negative Sp is essential Rule 4: Sum of the fs Often the gover sential equations coctain. only sof the dependent variable. Then, if T represents the dependent varisble, the fanctions T ané T+. (where © is an arbiteery constant) both satisly the differential equation. This property of the differential equation must also be reflected by the discretization equation, Thus, Eq. (3.15) should Tp and all Tyy’s aze increased by 2 constant. Prom duis requirement, i follows that ap must equal the sum of the neighbor cosfficicats. Henes the statement of Rule 4 is main valid ever: when We require ap = Day G9) for situations where the differential equstion continues te remain satisfied alter a constant is added to the dependent variable, Discussion. 12 is easy to see that Pq, (3.13) doss satisfy this rule, The rule implies that the center-point value Tp is a weighted average of the neighbor DISCRETIZATION METHODS: » values Tp. Unlike Fg. (3.13), the coefficients in Eq. (1 nls. This is, howeves, not a violation, but a ease of mapplicability of the cule When the source term depends on 7, both T'and T +e do not sitisly the afferential equation. Even in sued cases, the rule should not be forgotten, but should ¢ applied by Sp is sot equal to z8r0 in Fg, (3.17), the rule becomes applicable and is indeed obeyed. When the differential equation is satisfied ay both T aad T+, the desired temperature field T does not become multivalued or indeterminate The values of T can be made determinate by appropriate boundary conditions, Conformity to Rule 4 ensures that, if, for example, the boundary terapees: é by a constant, all temperatures would increase by exeetly do not obey the wisaging a special case of the equation. If, for example, that constant Another way of looking at Rule 4 is this: When the source term is absent are Tp would not and tae neighbor temperatures Tay ate all equal, the eenter temper: ‘must become predict Tp Tyy under these circumstances. caual to them. Only a poor discretization equat 3.§ CLOSURE In this chapter, we fave made cestain basic decisions about the type of iseretization method to be developed in this book. Through «simple able to formulate four basie rules, whieh constitute the underlying guiding principles for all further work. The discussion has been sven in ferms of temperature T as the dependent vasiable. This was done simply for conceptual convenience. We shall coatinue with T in Chapter 4 but switeh to the goneral variable @ from Chapter § ooward. OF couse, the fous rules developed in this chapter are all applicable to the general variable ¢. ‘The convection term in the general differential equation (2.13) requites special formulation, This matter is deferred to Chapter 5. The emaining three terms of Eg, (2.13) are dealt with in Chapter 4 in the framework of heat conduction, example, we have PROBLEMS Su Using the Tayorseties expansion around point P ia Fig. 32, show that oh linite-itference approximation ford" Fis? is sven hy er 2 [re-tm 1, aay tas [tact att] 3.2 For the diferent equation (3.10), dotve a discreszation equation by the method of weighted residuals in the following manner! Asume f and 4 fo be soactant (lor ss NUMERICAL HEAT TRANSFER AND FLUID FLOW The tridiggonalmatrix algorithm is @ very powerful and convenient equation solver whenever the algebraic equations ean be represented in the form of Pq. (4.22). Unlike general matrix methods, the TDMA. coquives computer storage and computer time proportional only to. rather than to N? og NA 4.3 UNSTEADY ONE-DIMENSIONAL CONDUCTION 43-1 The General Diseretization Equation With reference to the general differential equation For @, we have now seen, at least in the one-dimensional context, how to handle the diffusion term and the source term. Here, we turn to the uasteady term and temporarily drop the source (erm, since nothing new needs to he said abéut it, Thus, we seek to solve the unsteady one-din somal heat-conduetion equation (4.30) Further, for convenience, we shall assume pe ta be constant, (In Chapter 2, i was shown how the eat conduction equation could be modified to take secount of the variable specifi heat ¢, See Problem 2.2,) Since time is a one-way coordinate, we obtain the solution by marching time from a given initial distribution of temperature, Thus, ina typical step” the task is this. Given the grid-point values of T at time 4, find ‘The “old” (siven) values of Tat the grid Ty, and the “new” (unknown) values at the values of T points will ke denoted by 78, 7 time ¢4 ar by Tp, TE, Th ‘Toe iseretization equation is now derived by integrating Eq, (4.30) over the contiol volume shown in Fig, 3,2 and over the time interval tom 1 10 1+ Ar. Thus, where the order of the intearations is chosen according to the nature of th tern. For the representation of the term A7/34, we shall assume thst the gricpoint value of T prevails throughout the control volume, Then, “ff oF a dx pe Ax (Th — TB) (432) BAT CONDUCTION 88 Following our steady-state practice for k O7/2x, we obtain pe Ax (Th ne f I is at this point that we need an assumption about how Tp, Tp, and Tyy vary with lime fiom ¢ t0 + AF, Many assumptions are possibie, and some of them ean be generalized by proposing f Tp de = fT} + — ATR] Ar where fis a weighting factor between O and 1. Using similar formulas for the incegrals of Ty and Typ, we deve ftom Eo. (4.33) [3% =p) _ KwlTe =| at. (433) xe Gx j fBe(TE = TB) — TA = TH Ge Oe Ax ce STR TB. ve SC i While rearranging this, we shall drop the superseuipt 1, and remember that Tp, Tp, Ty henceforth stané for the aew values of T at time ¢F OF. The re sult ss app =a¢ Te +} —SYTE) Say Tw FO Te +e} fae aw TE (4.36) where (3%) (437) (a7) ap = fag + Say +0 3m) 56 NUMERICAL HEAT TRANSFRR AND FLUID FLOW 4.3-2_ Explicit, Crank-Nicolson, and Fully Implicit Schemes For certain specific values of she weighting factor f, the cisertization equstion reduces £0 one of the wellknown schemes for parabolic differential equations. In particular, f-=0 leads to the explicit scheme, f= 0.5 t0 the Cranke-Nicolson scheme, and f= 1 10 the fully implicit scheme, We shall briefly discuss these scltemes and filly indicate the Tally impli scheme 3s our preference The different values of f can be interpreted in terms of the Ty~s Variations shown in Fig, 45. The explicit scheme essentially assumes that the old value 7B prevails throughout the entite time step except at time f+ Av The fully implicit scheme postulates that, et time & Tp sitdenly drops feom Th to Th and then stays at T} over the whole of the time step: thus the temperature during the time step is characterized by Tp, the new value. The CrankNicolson scheme assures a linear variation of Tp. At ist sight linear variation would appear more sensible than the two other altemative Why then would we prefer the fully implicit scheme? The answer will emerge xery shorty For the explicit scheme (f—0), Ka, (4.36) becomes app = apt? + ay Thy + (02 ~ ay — ews TS (438) This means that Tp is not welated to other unknowns sich as Ti oF Ty, but is explicitly obtainable in terms of the known tempesatutes TP, TE, 1%. This is why the scheme is called explicit, Any scheme with £0 woule be implicit: - Crankeoteon Figure 4.6 Vaition of temperate with tne for thw diferent schemes. HiT CONDUCTION 7 that i, Tp woul be linked tothe unkoowas Tip and Ty, ane the solution a set of simultaneous equetions would be necessary, The convenience of the explicit scheme in ths regard i, however, offset by a serious limitation. If we remember the bis rule about positive coe‘icents (Role 2) and examine Fg (4.38), we note that fe coefficient of TE can become nesativ, (We cons Th as a neighbor of Tp in the time section.) Indeed, for this cofficien: to be postive, the time stop AF would have % he small enough so that of exstees ay ay. For vnifou conduciity and Ax ~ (Ore =Ox)y. thi condition can be expressed 1c PLAX 2 (439) 1 this condition is violated, physically unzealistic results could emerge because the negative coefficient implies that a higher Tf results im a lower Tp. Exqution (6.39) is the well-known stability criterion for the explicit scheme is interesting to note that we have bees able to éovive this from physical aiguraents ased on one of our basic rules. ‘The troublesome feature sbout ane forced to use a rauch smaller Av The CrankeNic A inexperienced us solution wil result no matter how large the time step, and such a user is, therefore, suepsised to encounter ossillatory solutions. The “stability” in a mathematical sense simply ensures that these oscillations will eventually die cout, ut it Jnyscally plausible solutions. Some examples of unease soluions given by the CrankeNicoson scheme can be found in Patankar and Baliga (1978), jon (4.39) is that, as we reduce Ax to improve the spatial accuraey, we Json scheme is usually described as uneondition: ly stable often intexprets this to imply tat a physically realistic ork, this behavior is cay, to explain, For f= 0.5, the costiient of Tein Fay (4.36) becomes of (ey hay)/2. Por uniform ondutity and uniform gi spacing, ths ceficent can be seen to be pe AxIAr—K/Ax. Again, whenever the te step is not suTcently small, this coefficient could become negative, wit its potent for physically untdise result, ‘The seemingly resonable linear profilin Fig 4.5. 4. good representation of the. temperature-time. whtionship_ for only. small tim interls, Over larger interval, he intasclly exponential decay of temper ture is akin to a steep drop in the begining, flowed. by a ft tl. The fssisptons made in the fully ampli sere are this closer to eat than the fine profile used inthe Crank-Ncoson scheme, especially To Inge time steps IF we reguie that the coeficent of 7 nq, (4.36) must never become ive he ony constant value ofthat ensures thsi 1 (OF course, is tot meaningful for to be areater than 1.) Ths, the fully implet scheme (f=) saises our requirements of sinpllity and. physelly satisfactory ss NUMERICAL HEAT TRANSEER AND FLUID FLOW behavior, It is for this reason that we shall adopt the fully implicit seheme in his book 1k must be admitted that for small dine steps the fully implicst scheme is not as accurate as the Crank-Nicolson scheme, Again, the reason can be seen fiom Fig, 4.5; che temperature-time curve is nearly linear for small time intervals, It is tempting 10 seck a scheme that combines the advantages of both schemes and shaves the disadvantages of acither, Indoed, this has been dione, snd the result, called the exponential scheme, has been described by Patanker and Baliga (1975), That scheme, however, is somewhat complicated, aril its inclusion in this book, in which msny other themes ars to be presented, would have made the treatment quite intricate 4.3.3 The Fully Implicit Discretization Equation Here we record the fully implicit form of Bq. (4.36). In doing so, we shal intraduee the linearized source fem, which we hae temmportiy dropped. The testis apTp=acTe + oyTy +6 (240) whee fe (44la) (x). Garey ay = Be 4 Oxy (44ib) ag eas as 3 (sie) > + ath (sid ap =ag Vay +af —Sp Ax (sie It can be seen that, as Ar-r=, this equation reduces to our steady-state iscretization equation The main principle of che fully implicit scheme is that the new value Tp over the entize time step. Thus, iF the conductivity kp depended on temperature, it should be iteratively recalculated from Tp, exactly as in our steady-state ‘procedwe. Other aspects of the steady-state procedure, such as boundery conditions, source-term linesrization, and the TDMA, are also cqually applicable 10 the unsteady situacion, Our detziled consideration of the one-dimensional problem has now set 80 NUMERICAL HEAY TRANSFER AND FLUID FLOW as one unit. This is why the words “convection and iffusion” form the tile of ds chapters other texts ean also be present, but only ia the background It should be remembered that the word diffusion is used here in generalized sense, It is not restiicted only to che diffusion of a chemical species caused by concentration gradients. ‘The diffusion flux due to the uadiont of the general variable @ is ~I' 86/@x}, which, for specific meanings of @ would represent chemiealspecies diffusion flux, heat ux, viscous stress, ete, The general differential equation (2.15) eo (Glauj UP Hide), which Is designated as the difhusion term, Actually, this expression denotes the sum of theee terms for the three coordinate directions; yet it is convenient 10 refer to chem collectively as the diffusion term. The Same is true of the convection term, which is (3/23)) (ot6) One feature of the convectionsiffusion situation may be noted at this point. Since the given Now Feld must satis'y the cantinmity equation sins the term % + Buy oo, sy the general diferent equation a A 2 2) ay re) + oy 43 FOr area (Bley 6 30 4 yy, 2 [pa : toy 2 = 2 (py WY 3 oR bon na (eae) ts 6a From this form of the eouation, it follows that, for given distributions of p, ij, Py and S, sy solusion @ and sts variant (@ plus a constant) would both satisfy Eq. (5.3). Under these eitcumstanees, the basfe rule ebout the sum of the coefficients (Rule 4) continues to apply 5.2. STEADY ONE-DIMENSIONAL CONVECTION AND DIFFUSION As in the last chapter, roueh can be learned from consideration of the sinpfest possible case. Here we shall consider a steady oneimensional situation in Wwhicis only the convection and diffusion terms are present, The governing Aitierentil equation is as) ( “) . (sa) a, (ous CONVECTION AND DIFFUSION st slacity in the x direction, Also, the continuity where a represents. the equation becomes ghow=o cr pu~cmstmt 5) For deriving the diseretization equation, we shall use te three-grid-point cluster shown in Fig, S.1. Although the act faces ¢ and w would not insluence our final formulation, st is convenient to assume that e is located midway between P and #, and se midway between W and P. va) location of the control-volume S.2-1 A Preliminary Derivation Integration of Eq, (S.4) over the control volume shown in Fig. $.1 r ) 66 We saw in the last chapter how to represent the tem doje from a piveewise-linear profile for «. For the convection term, the same choice of profile would at frst seem natural. The result is (ough, — Oe= ler #02) and Oy =F Er + ow) 6 ‘The factor $ arises from the essumption of the interfaces being midway; some ther imexpolaion factors woulé. heve appeared for diferently. loeted +. Nove, Ba. (5.6) can he written as Ton — Gr) _ Pulon ~ dw) Ode dw OW) +O) — HoWwalOr # Ow) a) where the values of Ty and Py ate to be obtsined by the prescription presented in Section 4.2'3, (This applies throughout the book, although such roferences to previous sections may not be repeated.) | woe —b— ss — Figure 5.1 Typical pri-point cluster for she one-imensional problen. 2 NUMERICAL HEAT TRANSFFR AND FLUID FLOW To arrange 1 we define two new symbols F and D, 28 follows: ‘equation more comp Fem, pat (59) Both have the same dimensions: F indivates the strength of the convection (o flow), while D is the diffusion conductance. It should be noted that, whereas ‘D always remains positive, F can teke either positive or negative values depending on the direction of the Muid flow. With the new symbols, the discretization equation becomes 4p6p = ae Ge + avow 10) i) Guy Discussion. (1) Since by continuity Fe=Fy, we do g apap ay, Further, it is interesting to note from Eq, (S.lle) that the discretization equation has this property only if the flow field satishes continuity, just as Eq, (5.3 Gerived from Eq. (3.2) only if the continuity equation is satisie€, (2) The discretization equetion (5.10) 13 sents the implications of the piecewiselinear profile for @. This form is also known ss the centrataifference scheme and is the natural outcome of = Taylocseries formulation, (3) It is instuuetive to consider a simple example in which and Further, if the values of ¢ye and gy are given, wo can obtain dp from Eq (5.10), Consider two sets of values @) I oe (8) Ge = 100 and oy 100 and gy = 100, dhe result is p = 50! 200, the result is gp = 250! CONVECTION AND DIFFUSION 8 cannot fall outside the sange of 100-200 established by its neighbors, these results are clearly unrealistic, (4) Indeed, we could have anticipated these unrealistic results, because Fas. (3.11) indicate that the Coelficients could, at times, become negative. When [P| exceeds 2D, then, depending on whether Fis positive or negative, there is a possiblity of a oF fay becoming negative, This will be a violation of one of the baste cules, with a possible disasttous outcome. (5) Also, the negative coefficients would imply that ap, which equals 2dyy, is less than Zlaayl, which falls t0 satisfy the Scarborough criterion, ‘Then, ® point-by-poine solution of the discretization quations may diverge, This is why all the early attempts <0 solve convective problems by the centealdifTerence scheme were limited to Tow Reynolds Dpumibers (i2., to low values of FJD), (6) For the case of zero diffusion (that js, P=0), the scheme leads to ay = 0, Then, Bq, (5.10) becomes unsuitable for solution by Since gp, in seal point-by-point method, aud by most other iterative methods, ‘Since the foregoing preliminary formulation has resulted in anus aoeeptanle discretization equation, we must seek better formulations. Some sueh possibilities are deserined in the following subsections, 5.2-2 The Upwind Scheme ‘A wellknown remedy for the ¢ifficulties encountered is the upwind scheme, his also Known as the upwind-difference schesne, the upstreamditterene scheme, the donorcell method, etc. Tk was dist put forward by Couran Tsaseson, and Rees (1952) anxd subsequently cemvented by Gentry, Mattin, and Daly (1966), Barakat and Clsck (1966), and Runeinal and Wolfshtein (1969), ‘The upwind scheme secognizes that the weak point in the preliminary formulstion is the assumption that the convected property ge at the interac Js the average of Op and dp, and it proposes a better prescription. ‘The fosmnulation of the diffusion term is left unchanged, but the convection term is caleulated from the following assumption: ‘The value of @ at an interface is equal to Ue value of @ at the grid point fon the upwind side of the face, Thus, (5.124) and beobe i OR

You might also like