spreadsheet solutions to two-dimensional heat transfer problems - heat equation cf. rs warmth course...

Upload: dbowdenbigpondnetau

Post on 14-Apr-2018

215 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/29/2019 Spreadsheet Solutions to Two-Dimensional Heat Transfer Problems - Heat Equation Cf. RS Warmth Course - Exam

    1/6

    .-: classroom )SPREADSHEET SOLUTIONS TO

    TWO-DIMENSIONALHEAT TRANSFER PROBLEMS

    RONALD S. BESSERLouisiana Tech University. Ruston, LA 71272S tudents in the undergraduate heat transfer class seemto become more excited about the subject when theybegin solving realistic problems that somehow con-nect to their experience. While many of these problems canbe solved using the approximations of one-dimensional sym-metry, a large body of interesting and relevant problems mustbe tackled with two-dimensional (2-D) methods. This paperdescribes a simple method for solving these problems usingany of a number of spreadsheet programs, such as MicrosoftExcel, Corel Quattro Pro, Lotus 1-2-3, etc. We have success-fully used this method in junior-level heat transfer at Louisi-ana Tech University for the past two years.TWO-DIMENSIONAL METHODSVarious approaches are available for solving 2-D problems.

    Analytical solutions to engineering problems are highly de-sirable due to the elegant connection that becomes visiblebetween physical and mathematical principles. For a fewsimple geometries, methods such as separation ofvariablesl1Jcan be applied, or solutions to characteristic differential equa-tions may be available,12]but they cover only a small fractionof the possible problems.Graphical methodsI3,4]have been used for many years toproduce solutions for situations requiring qualitative or ap-

    proximate answers. Information about these methods is avail-able in several textbooks, but graphical techniques may beperceived as excessively approximate compared to the nu-merical methods that are so accessible today. Although nostatistics to this effect are known, the sense is that the graphi-cal methods are seldom taught.The explosion of the information age has provided ready

    access for engineers and students to high-powered desktop

    The method can. . . be extended by solvingproblems with time dependence (transientproblems), problems with geometries thatwould benefit from rectangular ratherthan square elements, geometries withedges at oblique angles, and eventhree-dimensional problems.machines that are suitedfor numerical solutions to heattrans-port andother engineeringproblems.While commercial soft-ware suchasANSYS,PDEase,FlexPDE, etc., can tackletwo-and even three-dimensional problems, extremely useful 2-Dsolutions using the Finite Difference Method (FDM) can beeasily obtained by students or engineers with an ordinaryspreadsheet. Furthermore, the process of setting up the prob-lem, including formulating the boundary conditions, layingout the geometry statement, determining the convergenceconditions, etc., reinforces the understanding of heat trans-fer principles by the student. Obtaining the solution bythis process also promotes understanding of how com-mercial solvers work.

    Ronald S. Besser has been Associate Pro-fessor of Chemical Engineering at the Louisi-ana Tech University Institute for Micro-manu-facturing since 1999. He holds a BS in chemi-cal engineering from U.C.Berkeley. and an MSand PhD in materials science and engineeringfrom Stanford University. His research and de-velopment interests are inchemical-MEMS andsensors, thin-film materials, plasma depositionand etching, sub-micron processing, devicephysics, and characterization.

    160@ Copyright ChE DMsjon ofA SEE 2002

    Chemical Engineering Education

  • 7/29/2019 Spreadsheet Solutions to Two-Dimensional Heat Transfer Problems - Heat Equation Cf. RS Warmth Course - Exam

    2/6

    The value of convenient spreadsheet programs for solvinga variety of chemical engineering problems has been previ-ously demonstrated in various sources.15]While the descrip-tion here applies solely to heat transfer, a nearly identicalapproach can be used to solve problems of mass transfer, fluidflow, electric current flow, mechanical stress, etc., becauseof analogous mathematical descriptions.BASIS OF FINITE DIFFERENCE METHODThe FDM starts by taking the system under study and di-viding it into a large (but "finite!") number of rectangularelements. Each element is assumed to be isothermal, i.e., the

    entire element existsat a single temperature.At the center ofeach element is a "node" or "mesh point" witha unique iden-tifier based on its positionin the "nodal network" or "mesh."Integer subscripts (m,n) relate toposition on an x-y axis sys-tem with a discrete value range. Figure I displays this setup.In order to solve for the temperatures in the system, weneed temperature derivativesfor insertion into the heat equa-

    tion. Consider the temperature T of an arbitrary element. (m,n) as shown in Figure 1. The fi~~tderivatives (in x and y)are written by assuming linear variation of temperature be-tween node points. Since second derivatives arejust first de-rivatives of first derivatives,aT

    I

    aTIa2T

    I

    - ax m+~,n ax m-~.nax2 ~xm,nTm+l,n -Tm.n~x Tm,n -Tm-I,n~x Tm+l,n -2Tm,n +Tm-In

    (~x)2x

    Tm,n+1

    Tm,n-1

    T_,;t !+IjxFigure 1.Mesh representing the body orsystem under study. T is the uniformtemperaturem~f theshaded element.

    Spring 2002

    "

    ;,Similarly, for the vertical direction

    a2TI

    Tm.n+l -2Tm,n +Tm,n-Iay2 (~y)2,n (2)

    We know the three-dimensional heat equation that relatesconductive fluxes and heat generation to the time rate ofchange of the temperature of a system as

    ~ (kaT)+~ (kaT )+~ (kaT )+q=PC aTax ax ay ay az az P atWe can apply some simplifying assumptions that neverthe-less hardly reduce the usefulness of the equation by impos-ing steady-stateconditions,no generation, anda thermal con-ductivity that is temperature independent. The result isLaPlace's equation, which,when wemake the additional as-sumption of 2-D symmetry, i.e., T is constant in z, is

    (3)

    a2T+ a2T=0 (4)ax2 ay2Inserting the secondderivatives (Eqs. I and 2) into Eq. (4),taking the case of a square mesh (i.e., ~x = ~y, assumedthroughout the rest ofthisarticle), and doing some algebra tosolve for T , we get,n

    T Tm+l,n +Tm-I,n +Tm,n+l +Tm,n-lm,n 4 (5)In other words, the temperature of interest of a location withinthe "bulk" of the system, and not at a boundary, is just theaverage of the four temperatures surrounding it.

    (1) SIMPLE EXAMPLE:CONSTANT BOUNDARY TEMPERATUREWecan apply thisresult immediately to solve a real prob-lem. Consider a metal plate 0.9 m x 0.9m in size that has its

    edges held at constant temperatures, as shown in Figure 2.We ask, what is the temperature field that develops in the298K

    :.::C')....N'"....'"A

    Figure 2.Metal plate 0.9m x 0.9 min size with edges held at constanttemperatures.161

  • 7/29/2019 Spreadsheet Solutions to Two-Dimensional Heat Transfer Problems - Heat Equation Cf. RS Warmth Course - Exam

    3/6

    ';;

    plate once steady-state conditions are attained?Weset up a simple spreadsheet, as showninFig-ure3, with acell representing the nodal tempera-ture of each 0.1 m x 0.1 m element in the plate.The nodes are at the center of each element, ex-cept at theboundaries.The boundary nodes sitatthe edge of their elements, and the elements arehalf the size of the nodes in the center portion(note that the comer elements are one-fourth thesize of the central elements).The spreadsheet is set up by first turning off

    any limitations on circular references. In Excel,this is done by going to Options and selectingthe Calculation tab, then choosing manual cal-culation. The number of iterations and conver-gence criteria are also set there. Theseare importantsteps, aswithout them,Excel will returnerrors whencopyingthenodalequations, leading to untold frustration.Now theperimeter temperatures canbe input as constants.Then the nodal equations are entered at the interior points.The equation for cell B9, for example, is

    Figure 3. Spreadsheet set up to solve for the temperature distributionof the plate in Figure 2. The interior nodes consist offormulae (asshown for B9), while the perimeter values are constants, as shown.

    =(A9+B8+C9+BlO)/4Once typed into B8, the equation can then simplybe copiedand pasted to the rest of the interior cells.Aftersetting up the equations, hitting F9causes thespread-sheet to calculate a number of times set by the calculation

    limit orthe convergencelimit ("maximumchange"as labeledin theExcelCalculation option) entered previously.Repeatedpresses of F9 guarantee that the solution converges beforereaching the number of iterations limit.This problem converges almost immediately (in 80 itera-tions)using amaximum change criterion of 0.001.Reducingthe sizeofthis convergence limit will resultin ahigherpreci-sion solution at the cost of increased CPU time. The accu-

    racy of the solution depends on how closely the mesh ap-proximatestheactual geometry.In general,accuracyimprovesas the node spacing decreases. Accuracy can be checked byhalving the node spacing and recalculating a solution. Thecalculation has reached its highest accuracy if the two solu-tions are found to be essentially the same. If substantial dif-ference exists, the process of reducing node spacing and re-calculating is continued until the difference diminishes.The solution, shown in Figure 4, was also graphed usingthe surface plot option in Excel. The plot gives an excellentview of what is going on with the plate's temperature field.Higherspatialresolutioncouldbe obtainedbysettinga smallerincrement size, resulting in a larger numberof cells.Thoughexecutiontimetradesoffwithresolution,evenhighly resolved

    arrays iterate quickly with a current-model Pc. Moreover,the linear nature of the equations being evaluated tends toprevent the occurrence of computational instabilities thatsometimesappear with iterative methods.162

    DERIVING EQUATIONS FOR BOUNDARYCONDITIONS

    (6)

    The above example is especially easy because of the con-stant boundary conditions (BCs). Changes in heat transfermode (e.g.,convection or radiation from a solid)or a changein material (transition to a region of different thermal con-ductivity) necessitate more complicated equations in theboundarycells. Several textbooks list these boundary condi-tions for various cases.[6.7]The ability to derive arbitrary BCequations,[8.9]owever, gives one the confidence to attack avariety of problems.The basic approach to deriving a BC equation is to per-form aheatbalance on theboundary elementof interest.Sincewe have assumed the absence of generation, this amounts to

    L,qin=0 (7)where the qinare rates of heat transfer from adjoining cells.

    .~70.350-360m34lJ.350.~..32(1.331).31().320a;0).310c2!JO.3JO.200-2!JO..270-2603

    Figure 4. Solution of slab problem after 80 iterations.Chemical EngineeringEducation

  • 7/29/2019 Spreadsheet Solutions to Two-Dimensional Heat Transfer Problems - Heat Equation Cf. RS Warmth Course - Exam

    4/6

    ;.

    A surprising array of complicated problems can be solved using thismethod that cannot be directly solved with analytical methods.Thiscan beillustratedbyexample.Considerconvectionabovea horizontal surface, as illustrated in Figure 5. Based on thefigure and Eq. (7),

    qi +q2 +q3+qc=0 (8)Some studentsmay see a comfortable analogy between thisequation and Kirchoff's current law in electric circuits, i.e.,the currents entering a circuit nodemust sum to zero. Now,using Fourier's Law for the conduction rates,

    dT t.Tql =-kA-=-kA-dx t.xand the standard expression for the convection transport rate

    qc=hMT (10)we have

    k(.X)lm) (Tm-I,n- Tm,n)+k(t.x)(lm) (Tm,n-I- Tm.n)+2 t.x t.xk( ~)(1m)(Tm+l,nA~Tm,n) +Mx(lm)(T=-Tm.n)=O (11)For this equation, we have assumed an arbitrary depth ofthe systemof I m.In the 2-D symmetry that wehave adopted,all properties of the system, including its structure and tem-perature, are constant with depth (i.e., the z direction). Thearbitrary choice of I m simplifies the arithmetic and permitscalculated secondary quantities to be considered on a per-meter-of-depth basis. The flux "faces" at the left and rightends of the cell are only a half-width tall since the elementsits at an edge. The Fourier Law terms are cast to have apositive sign by listing the T terms in the order of exteriortemperature minus interior temperature with respect to theelement being analyzed.After canceling and solving for the node temperature, weget

    Tm-1.n q.. T~c..T m,n T m+1,n

    Figure 5. Schematic for derivingboundary equation for the case ofconvection above a horizontalsurface.

    Spring2002

    T 1 (2h

    ).n - ( h ) Tm+I.n+2Tm.n-I +Tm-I.n+-t.xT= (12)2 2+-t.x kkThis equation is inserted into the corresponding spreadsheetcell. References to the convective heat transfer coefficient(h), thermal conductivity (k), element width (~x), and fluidtemperature (TJ can be made by giving these variables names,making it easier to transcribe and debug equations.

    (9) GENERATION EFFECTSThe effects ofheat generationmay be included byadding aterm to the heat balance of an element. This applies to bal-ances done on both edge cells and interior cells. Considerfirst the edge cell with convection from its top surface thatwe analyzed above. With the generation term, Eq. (7) be-comes

    .28in +

  • 7/29/2019 Spreadsheet Solutions to Two-Dimensional Heat Transfer Problems - Heat Equation Cf. RS Warmth Course - Exam

    5/6

    -

    CALCULATING THE HEAT TRANSFER RATEFROM THE TEMPERATURE FIELDFourier's law written for 2-D permits the determination of

    the heat rate at an arbitrary point given knowledge of thespatial temperature distribution. The heat rate can be treatedas a vector quantity and solved at an arbitrary direction bythis means, but for the purposes ofjunior-level heat transfer,it is sufficient to determine fluxes that are parallel to the x-and y-axes.Figure 6 shows an interior element where conduction isoccurring.Weknowthe heat transfer rate from element A toelement B fromFourier's law by

    ~T ( TA-TBqA~B ",,-kA-=Mx Im)-~x ~xBy now applying this formula along a vertical or horizontallength of several elements, and adding up the heat rate con-tributions of all these elements, we can calculate the totalrate across any plane in the system. Not only is this capabil-ity useful for determining heat transfer rates for specific cases,but it also permits one to check the self-consistency of anysolution by making sure that the heat balance around anyboundary is correct.The perimeter heat fluxes of the metal slab above were cal-

    culated as shown in the spreadsheet of Figure 7. Here theheat rates from each side of the body have been determinedby first calculating the rates on a cell-by-cell basis and thenadding them up. As we see from the figure, the heat ratesfrom all the sides, when summed, add to zero-as they shouldfor a body in steady-state without generation.

    (17)

    EXAMPLE:HEATING DUCTS IN THE FLOORWefurther illustrate the method by solving a more practi-

    cal, real-lifeproblemtakenfromourheat transfercourse.Theproblemshowsthe utilityof this method,as solutionsby otherroutes would only come with much difficulty.The problemis stated this way:

    A large, horizontal fiberglass slab serving as afloor is heated by hot air passing through ductsburied in it, as shown in the cross-section in Figure8, where S =160 mm. The square ducts are centeredin thefiberglass, which is exposed to the ambientabove and insulating earth below. For the case withthe top suiface and duct suifaces at 25 and 85C,respectively, calculate the heat ratefrom each duct,per unit length of duct. The thermal conductivity ofthe fiberglass is 2.5 W/(mK).

    The spreadsheet solution to this problem is shown in Fig-ure 9, with key equations spelled out for clarity. An area in164

    the upper left allows input parameters (whose cells are namedas variables) to be changed so that the problem can be solvedfor a variety of cases. The solution exploits the inherent sym-metry of the problem by solving only a segment of the sys-tem, yielding the heat rate for a half-duct, which is thendoubled to arrive at an answer.A detail of the spreadsheet shown is the labeling of the

    ., fu: IFigure 6.Heat transfer ratefrom aninternal element A into anotherinternal element B.

    Figure 7.Determination of heat ratesfrom all sides of themetal slab pictured in Figure2. The sum of the ratesequals zero, verifying the solution of thetemperature distribution.

    Figure 8. Fiberglassslab with embedded ducts forheating by airflow. The top surface of the slab isa room floor, while the bottom surfacelies against insulating earth.Chemical Engineering Education

  • 7/29/2019 Spreadsheet Solutions to Two-Dimensional Heat Transfer Problems - Heat Equation Cf. RS Warmth Course - Exam

    6/6

    nodal rows and columns and their locations in vertical andhorizontal directions. These labels help one to keep track ofthe geometry of the problem.The lower portion of the sheet (row 24 down) shows thecalculation of heat rates at nodes along the floor or top sur-face ("qtop") and along the duct perimeter ("qduct"). Theclose agreement of these heat rates serves as a check on theanswer and reinforces the notion that input and output ratesmust be equal in a steady-stateproblem.CONCLUSIONWehavedescribedhere a computer-aided,finite-differenceapproach to solving 2-D heat transfer problems in the under-graduatecurriculum.Asurprising arrayof complicatedprob-lems can be solvedusing thismethod that cannot be directlysolved with analytical methods.Once learned, themethod isapplicable to a number of other course situations. For ex-ample,our students in unitoperations laboratory have solvedfor heat transfer characteristics of critical but odd-shapedcomponents in heat transfer equipment under study. Themethod can also be extendedby solving problems with timedependence (transient problems), problems with geometriesthat would benefit from rectangular rather than square ele-ments, geometries with edges at oblique angles, and eventhree-dimensional problems.Spring2002

    '4or';

    Figure 9.Solutiontofiberglassslabproblem.Theheatratefromeachductis844 W

    ACKNOWLEDGMENTSThe author thanks the students of Chemical Engineering313 for their interaction with and feedback on the methodsdescribed here. He also thanks Dr. James Palmer and Mr.Rohit Ghan for reviewing the manuscript.REFERENCES1. Boyce, W.E., and R.C. DiPrima, Elementary Differential Equations

    and Boundary Value Problems, 2nd ed. John Wiley and Sons, NewYork, NY; p. 423 (1969)

    2. Jaeger, J .C., and H.S. Cars law, Conduct ion of Heat in Solids. 2nd ed.,Oxford University Press, Oxford, England (1986)

    3. Welty, J.R., C.E. Wicks, R.E. Wilson, and G.L. Rorrer , Fundamentalsof Momentum, Heat, and Mass Transfer, 4th ed. , John Wiley and Sons,New York, NY; p. 246 (2001)

    4. Incropera, F.P., and D.P. DeWitt , Fundamentals of Heat and MassTransfer, 4th ed., John Wiley and Sons , New York, NY; p. 167 (1996)

    5. See, for example, B.S. Gottfried, Spreadsheet Tools for Engineers,Excel 97 Vers ion, WCB/McGraw-Hi ll , Boston (1998); also see var i-ous articles in Chemical Engineering Education, e.g., M. Misovichand K. Biasca, "The Power of Spreadsheets in a Mass and EnergyBalances Course," Chem. Eng. Ed., 25(1),46 (1991) and P.E. Savage,"Spreadsheets for Thermodynamics Instruction," Chem. Eng. Ed.,29(4),262 (1995)

    6. Reference 4, page 1787. Mills, A.F., Heat and Mass Transfer, Irwin, Chicago, IL, p. 131, 197(1995)

    8. Chapra, S.c., and R.P. Canale, Numerical Methodsfor Engineers, 3rded., McGraw-Hi ll Book Company, Boston, MA; p. 820 (1998)

    9. Arpaci , V.S., S.-H. Kao, and A. Selamet, Introduction to Heat Trans-fer, Prentice-Hall , Upper Saddle River, NJ; p. 194 (1999) 0

    165