MCEN 4037 Heat Transfer Measurements and Model Comparison Introduction In this lab we will explore the transient heat transfer through the walls of the ITLL. When the ITLL was constructed a number of sensors were placed at various locations. High in the south tower, thermisters were embedded in each of the four walls facing north, east, south and west. The locations can be viewed from the HP Lab plaza floor as small rectangular plates in the center of each wall, a few feet from the ceiling. These thermister arrays are monitored continuously and recorded by a server running National Instruments LabVIEW and the Datalogging and Supervisory Control Systems (DSC) module. The current data, as well as historic data, is all available from a website at http://blt.colorado.edu. The goal of this lab will be to compare measured temperature distributions with ones predicted by solving the one-dimensional, time-dependent heat equation over a twenty-four-hour period. You may use any twenty-four-hour period of data that is available on the web site. The profiles at the start of the time period will serve as the initial condition, and the inner and outer surface temperatures will serve as the boundary conditions. Obtaining the Data 1. Acquire sensor data: Go to the Building as Learning Tool (http://blt.colorado.edu/index.html) website. Click on Building Systems, then Wall Temperatures (if viewing data on a non-ITL computer, you will have to install the LabVIEW Run Time Engine by clicking on the “Run Time Engine” link on the web site). Click on the Data View for the Light Monitor Walls image to open the LabVIEW front panel for accessing data. Note that all sensor location information can be obtained from this page as well 2. Select one of the walls. Set the Time Interval to give you one day of data (any day will do). 3. Enter your email address and hit Email Data. The server will send you a tab delimited text file with data sampled at the interval specified by the “Sample Interval.” This file can be opened in Excel by right clicking on the file and selecting Open With Excel. You will need to format the time column in the Excel sheet to display a time. 4. Repeat step 1-3 for the other walls for the same time period. Note that the manufacturer’s accuracy specification for the thermistors is ±0.2ºC (±0.36ºF) with a temperature range of 2ºC to 60ºC (35ºF to 140ºF). -1- MCEN 4037 One-Dimensional Transient Heat Transfer Theory To analyze the heat transfer in the walls we first assume that because the thickness of the wall is small compared to its extent, that we can treat the heat transfer as occurring in one dimension, that is normal to the wall. However, the heat transfer is transient (time dependent) because the inner- and outersurface temperatures are varying due to diurnal changes in the external temperature and solar conditions. The one-dimensional transient conduction equation is given by (the nomenclature is defined at the end of this section) T 2T 2 . t x This is a partial differential equation that requires initial conditions and two boundary conditions for solution. For simple boundary conditions it can be solved analytically using separation of variables. However, because the boundary conditions vary over time in an arbitrary fashion, it is more straightforward to solve it numerically using the finite-difference method. To solve the heat equation numerically, we divide the wall into equal width slabs parallel to the two surfaces. m-1 m m+1 x x The surface of each slab is given an integer index, m, so that distance can be written as x mx, m 0,1,2,... where x is the slab thickness. Each time step is given an integer index i so that the time can be written as t it, i 0,1,2,... where t is the time step. -2- MCEN 4037 Euler Method In the Euler method, we approximate the time derivative as T Tm,i 1 Tm,i t t The spatial term is typically approximated as 2T Tm 1,i 2Tm,i Tm 1,i x 2 x 2 Combining these two expressions we obtain Tm,i 1 Tm,i T 2Tm,i Tm1,i m1,i t x 2 The advantage of the Euler method is that this equation can be easily solved for the temperatures at timestep i + 1 assuming they are known at timestep i and that the values of temperature are known at the inner and outer walls. Tm,i 1 t x 2 T m 1,i 2Tm,i Tm 1,i Tm,i The term Fo t x 2 is called the Fourier Modulus [1]. However, for certain values of the Fourier Modulus the solution is numerically unstable. For the solution to be stable, we must have Fo 1 2 This places a limit on the ratio of t / x 2 . The smaller x , the smaller t needs to be. When programming the solution, you will need to decide on a finite-difference slab thickness, x . The placement of the thermisters is shown in Figure 1 and also on the website. There are eight sensors. If they were evenly spaced, it would make sense to define x so that the slab surface coincided with each sensor. However, they are somewhat oddly placed in that the spacing is the same except for -3- MCEN 4037 between sensors 1 and 2. Thus, you will have to interpolate the initial temperature profile to obtain the initial conditions. Regardless of your choice for x , you should make sure the solution is stable. Figure 1. Sensor installation pattern. Implicit Crank-Nicolson While explicit methods like the Euler method used above are convenient, they do have stability issues. Implicit methods involve solving a set of simultaneous algebraic equations, but are numerically stable. In the Crank-Nicolson method, the finite difference equations take on the form Tm,i 1 Tm,i 2Tm,i 1 Tm 1,i 1 1 Tm 1,i 2Tm,i Tm 1,i 1 T m 1,i 1 2 t x 2 x 2 2 These can be rearranged in the form of a set of linear algebraic equations involving a tridiagonal coefficient matrix. To rearrange the above equation, separate for the unknown temperatures on the left-hand side and place the known temperatures on the right-hand side. For every iteration (i), the system of equations solve for the unknown wall temperatures at time i + 1 (one time step in the future) and take the following form AmTm-1 + bmTm + cmTm+1 = dm m=1,2,3,…n or, in matrix form b1 c1 a b 2 2 0 a3 ... ... 0 ... ... 0 T1 d1 c2 ... ... 0 T2 d 2 b3 c3 ... 0 . . . ... ... ... cn 1 . . ... 0 an bn Tn d n 0 -4- ... MCEN 4037 Nomenclature T = temperature (in K for equations) t = time (sec) x = distance through the wall (m) k - thermal conductivity (W/m.K) A - area (m2) - density (kg/m3) Cp - specific heat (J/kg.K) - thermal diffusivity (m2/s) k C p In Computational Methods you have learned how to solve such a set of equations using methods such as Gaussian Elimination. Alternatively, you can use the Thomas Algorith-to solve for the Triadiagonal system. Programming We ask that you program both methods for comparison. You may program the finite difference solutions using Excel, Matlab or whatever programming environment you find suitable. The Euler method is easily done in Excel. However, Matlab is particularly suitable for solving matrix equations like the Crank-Nicolson method. Code Validation and Implementation It is necessary to employ a well-known example to develop an intuition for solving this problem and to validate your code. Code-Validation Problem Use the Euler method followed by the Crank-Nicolson to solve for the temperature distribution of a long, thin rod with a length of 10 cm and the following values k = 0.49 cal/(s· cm·oC), Δx = 2 cm, and Δt = 0.1s. At t=0, the temperature of the rod is zero and the boundary conditions are fixed for all times at T(0) = 100 oC and T(10) = 50 oC. Note that the rod is aluminum with Cp = 0.2174 cal/(g · oC) and ρ = 2.7 g/cm3 [2]. The following table summarizes the solutions using the Euler Method and Crank-Nicolson Methods for solving a system of equations. The results are for temperatures at t =10 s at x =2 cm for the rod. Note that the analytical solution is T(2,10) = 64.8018. -5- MCEN 4037 Table 1. Summary of results for solving the PDE via the Euler and Crank-Nicolson method. Δt Fourier Modulus Fo Euler Method Crank-Nicolson 10 5 2 1 0.5 0.2 2.0875 1.04375 0.4175 0.20875 0.104375 0.04175 208.75 -9.13 67.12 65.91 65.33 64.97 79.77 64.79 64.87 64.77 64.74 64.73 Code Implementation Now that your code is validated against the tabulated data, modify your code to solve the heat equation for heat transfer through the ITLL walls. Remember, the goal of this lab is to compare measured temperature distributions with ones predicted by solving the one-dimensional, time-dependent heat equation over a twenty-four-hour period. You may use any twenty-four-hour period of data that is available on the web site. The profiles at the start of the time period will serve as the initial conditions, and the inner and outer surface temperatures will serve as the boundary conditions. Accuracy Note that in both cases, accuracy is different than stability. Just because the implicit method is stable, using an arbitrary time step may result in poor results. The only way to assure that the time step is small enough is to systematically reduce it until the solution is unchanging. With regard to spatial resolution, the same issue arises. If the slab thickness x is too large, you will lose resolution and thus accuracy. In the present case, however, the resolution is limited by the number of thermisters, so you are pretty much limited to a x comparable to that spacing. Analysis Once you have the finite difference models running, compare the calculated solutions to the measured temperatures for each wall over the twenty-four hour period. Here are some questions to consider and on which to report. 1. For the two models, what time step provide sufficient accuracy and why? Which method is more accurate and how would you decide this? Which model (and associated time step) is most efficient? Explain. 2. How did you find the physical properties needed for the finite difference models, what are they, and what uncertainty is associated with them? How sensitive are the results to these properties? 3. Can the finite difference models be run for the full twenty-four-hour time span without the difference between the predicted and measured values reaching 10%? 4. What are the differences in the experimental and numericcal results for the four walls? Why do the different walls behave differently (if they do)? Select one sensor to compare measured data to numerical data in depth. -6- MCEN 4037 5. Can the model be extended to explicitly include convection and radiation to the walls? If so, what additional information would be needed and would the models be changed? References 1. Ferziger, Joel H. Numerical Methods for Engineering Applications. New York: Wiley, 1998. 2. Chapra, Steven C., and Raymond P. Canale. Numerical Methods for Engineers. Boston: McGraw Hill Companies, Inc., 2002. -7-