Project 1 A Mathematical Investigation of the Heating and Cooling of Buildings

$24.99 $18.99

Introduction In this project, we will use a compartmental analysis to model the temperature inside a building. We begin by letting T (t) ( F) be the temperature inside the building at time t (hours) and we consider the building to be a single compartment. The rate of change of the temperature inside the building,…

Rate this product

You’ll get a: zip file solution

 

Description

Rate this product
  • Introduction

In this project, we will use a compartmental analysis to model the temperature inside a building. We begin by letting T (t) ( F) be the temperature inside the building at time t (hours) and we consider the building to be a single compartment. The rate of change of the temperature inside the building, dT =dt, is then determined by all of the factors that generate or dissipate heat. Here we will consider three factors that impact the temperature inside the building: a) the effect of the ambient outside temperature, A(t); b) heat produced by people, machinery and lights inside the building, H(t); c) artificial heating and cooling by furnaces and air conditioners, Q(t). Consequently we have the differential equation

ddTt = A(t) + H(t) + Q(t) (1) In this project, we will assign certain functional forms to A(t); H(t) and Q(t) and solve the resulting differential equations or initial value problems analytically and numerically.

When you write your report for the project, do not simply list answers to the questions in the following task sets in the report. Instead, use these questions to guide your narrative, making sure that you indeed include answers (and/or figures) to the all of the questions in the narrative write-up.

When creating graphs, be sure to appropriately label the plots. This means including legends, titles, captions, axes names, etc. as needed. Be sure to see the ProjectGuidelines.pdf file in the Project Information Canvas module and read the project section of the syllabus in the Administrative Items Canvas module for more information.

  • Task Set A

To determine the functional form of A(t) we model the effects of the temperature of the air surrounding the building on the inside temperature using Newton’s Law of Cooling. This law states that the rate of change of the temperature of an object (here, the air inside the building; the building’s temperature) is directly proportional to the difference between the object’s temperature, T (t), and the temperature of the surroundings in which the object is located, M(t), (the outside or ambient temperature). This then gives

A(t) = [M(t) T (t)]

(2)

The constant of proportionality, given here by the Greek letter kappa, , is a positive constant independent of M(t); T (t) and t. Note that A(t) > 0 when the air surrounding the building is warmer than the temperature of the building, that is, M(t) > T (t), resulting in an increase of the building’s temperature. The opposite occurs if the outside air is colder than the building’s temperature. How much impact this difference has on the rate of change of the temperature of the building is governed by .

When we substitute Eq. (2) into Eq. (1) we have the following quite general differential equation governing the physical situation:

dT

= [M(t) T (t)] + H(t) + Q(t)

(3)

dt

  1. Give the order of the differential equation (3) and classify it as linear/nonlinear, constant/variable coefficient and homogeneous/non-homogeneous. As suggested by the notation, assume that M(t); H(t); Q(t) are functions of time (t) only. Would the classification change if, say, Q(t) = tT ? If so, how?

  1. What property(ies) must M(t); H(t) and Q(t) possess so that Picard’s Theorem guarantees the existence of a unique solution to the differential equation for any initial condition? Again, assume that M(t); H(t); Q(t) are functions of time (t) only. Would anything different be required should Q(t) = tT ? Interpret what existence and uniqueness of a solution means in terms of the physical scenario.

  1. Use the integrating factor method to find the general solution of Eq. (3), assuming that M(t); H(t) and Q(t) are functions of t only and are integrable for all t. Include at least a few of the solution steps in your write-up. Your answer will include an antiderivative.

  1. Assuming that the building has no people in it and the lights and machinery are off, no furnaces or air conditioners are running, and the outside temperature is constant with value M0, answer the following:

    1. Apply these assumptions to Eq. (3) to arrive at a new differential equation governing this scenario.

    1. Does the differential equation from part (a) possess any equilibrium solutions? If so, find them.

    1. Discuss the stability of the equilibrium solution(s) you found in part (b). Interpret what this means with regard to the physical situation.

CONTINUED

  1. Use your solution to task 3 above to analytically solve the initial value problem consisting of the differential equation from part

(a) and the initial condition T (t0) = T0. This means that you simply have to modify your answer from task 3 above based on the given information, perform a simple integration and apply the initial condition. Show the steps in your write-up. Do not solve the equation in part (a) from scratch.

  1. Let M0 = 75; t0 = 0; = 0:25. On the same graph, plot the solutions from part (d) for T0 = 50 and T0 = 80 on the interval 0 t 24 as well as any equilibrium solution(s) you found in part (b) (use dashes to plot any equilibrium solutions). Do these solutions confirm your answer to part (c)?

  1. On a separate graph from part (e), with M0 = 75, T0 = 50, and t0 = 0, on a single graph plot solutions from part (d) with values of = 1; 12 ; 14 over the interval 0 t 24. Interpret the effect that has on the temperature and the rate of change of temperature. What physical properties could change ?

  1. Using your solution from part (d) find the value of t = t t0 when the difference between the building’s temperature and the outside temperature is e 1 of the initial difference. You should show a few steps of this procedure in your write-up. This value of t is called the time constant. What are its units? When designing a building and considering temperature changes due only to the outside temperature, do you want the building to have a large time constant or a small one if you want the building’s temperature to not respond quickly to the outside temperature?

  • Numerical approximations

We will shortly have the need to use numerical techniques to approximate solutions to more complicated differential equations describing the temperature changes in our building. Although some software packages such as MATLAB have built in solvers for differential equations (for example, ode45), it is instructive to learn how to build and implement simple ones on your own. Indeed, your career could take you to a place where high end packages such as MATLAB do not exist because of their expense and you are on your own to develop code to solve problems.

Here we will use the Runge-Kutta fourth order method to solve a first order initial value problem of the form y0 = f(t; y); y(t0) = y0. An example script implementing this method in MATLAB is in the file rk4.m in the Project Information module in Canvas. This method is slightly more complicated than Euler’s method but is much more accurate.

Before moving on to more complicated problems involving self-written software, it is a good idea to test the software on problems whose solutions are known in order to verify that the code is doing what it is supposed to do. The next Task Set goes through this exercise.

3.1 Task Set B

This set of tasks will give you an opportunity to verify that your code is working properly.

  1. Write a MATLAB script that will use the function in rk4.m or write code to implement the Runge-Kutta fourth order method in another language. Remember you cannot use Excel or Numbers or other spreadsheets to do this. Include any code you use as an appendix to your write-up. MATLAB code can be output into a PDF.

  1. Use the code to solve the initial value problem

dT

= 0:25(75 T ); T (0) = 50

dt

on the interval [0; 24] using 240 points (stepsize h = 0:1). Note that this is the same initial value problem as in Task Set A part 4(e).

  1. On the same graph, plot the exact solution (solid blue line) of the initial value problem as well as the approximate solution (open red circles) obtained from your implementation of the Runge-Kutta fourth order scheme.

  1. By inspection, does the numerical approximation to the solution appear to be a good one? (Does your code appear to be working correctly?) You might consider running the code with fewer points (a larger step size, h) and see what happens but you need not include these experiments in your write-up.

  1. Quantify your answer to part 4 by graphing the error in the numerical approximation to the solution, that is, make a plot of the absolute value of the difference between the analytic (exact) solution and the approximate (numerical) solution.

  • Refining Our Model

We will now add more complexity to our differential equation Eq. (3). When asked to solve any initial value problems below, use your Runge-Kutta solver to approximate solutions over the interval 0 t 24 with stepsize h = 0:1 (240 points). Let = 0:25 in all cases. Include appropriately labeled plots. The MATLAB functions max, min and find and the idea of Array Indexing may prove beneficial. MATLAB has some built-in help information that you can use. For example to get information on the max function, type help max in the MATLAB command window. Searching online is also helpful. You can save MATLAB figures in a variety of forms using the Save As… feature from the figures themselves.

CONTINUED

4.1 Task Set C

Our first addition to the model will be to include a varying outside temperature with no other heating or cooling, that is, H(t) = Q(t) = 0 and

(t 5)

M(t) = M0 12 cos (4)

  1. Solve Eq. (3) subject to the above assumptions with M0 = 75 and the initial condition T (0) = 65.

  1. On the same graph, plot M(t) and the solution from part 1 on the interval 0 t 24.

  1. What are the maximum and minimum outdoor temperatures and when do they occur? Give times in hours and minutes, rounded to the nearest minute.

  1. What are the maximum and minimum temperatures in the building and when do they occur? Give times in hours and minutes, rounded to the nearest minute.

  1. Repeat steps 1-4 but let M0 = 35.

  1. Describe in words how the temperature of the building reacts to the outside temperatures in both cases.

4.2 Task Set D

Next we’ll explore the effects of people, lights and machinery on the rate of change of the building temperature in the absence of outdoor temperature influences and furnaces and air conditioners, that is, A(t) = Q(t) = 0 and

H(t) = 7 sech

4

(t 10)

(5)

3

1

2

in Eq. (1). The hyperbolic secant, sech t, is equal to the reciprocal of the hyperbolic cosine, that is, sech t =

=

.

cosh t

et + e t

  1. Solve Eq. (3) subject to the above assumptions with the initial condition T (0) = 65 and plot the solution.

  1. Plot H(t) on the interval 0 t 24 on a graph different from that in part 1.

  1. Find the maximum temperature in the building and when it occurs. Give times in hours and minutes, rounded to the nearest minute.

  1. If the building houses different numbers of people during the day that run machines, use lights, and work around the clock, can you provide a nonmathematical interpretation of H(t)? Study the graph of H(t) and think about what it is showing.

  1. Does the solution of the differential equation in this case make sense based on H(t)?

4.3 Task Set E

Here we look solely at the effects of furnaces and air conditioners, Q(t), on the temperature in the building assuming that A(t) = H(t) = 0. Suppose that a thermostat inside the building is set to Td (constant), the temperature we would like to have inside the building. If the temperature inside the building is lower than Td, furnaces turn on to warm up the building. Similarly, if the inside temperature is above Td, air conditioners kick on to cool the building. If we assume that the amount of heating or cooling provided by the furnaces or air conditioners is proportional to the difference between the building’s temperature, T (t), and the temperature set on the thermostat, Td, a function that will model this behavior is

Q(t) = d(Td T )

(6)

(Technically, Q(t) is a composite function, Q[T (t)]).

1. Solve Eq. (3) four times subject to the above assumptions with Td = 77 and using

(a) T (0) = 65; d = 0:2 (b) T (0) = 65; d = 2:0 (c) T (0) = 95; d = 0:2 (d) T (0) = 95; d = 2:0.

Plot all four solutions on the same graph. Be sure to include a legend.

  1. Provide a possible physical explanation of d based on your solutions. There’s not necessarily a right or wrong answer here, but think about what you could do to change the value of d.

  • Putting it altogether

Finally, we look at the combined effects of outside temperature, A(t), people, lights and machinery, H(t), and furnaces/air conditioners,

Q(t). For tasks 1, 2, 3 below, solve the initial value problems using your Runge-Kutta scheme on the interval 0 t 24 using 240 points.

Be sure to include a plot of your solution in each case.

5.1 Task Set F

  1. You should have noticed that when only the effects modeled by H(t) were included in the differential equation, the temperature rose substantially (see Task Set D). Suppose our equipment will be damaged if the temperature of the building exceeds 81 F. Use the solution to the initial value problem

dT

= 7 sech

3

(t 10) + 2 (77 T ) ; T (0) = 75

(7)

dt

4

to answer the following questions:

    1. Find the maximum temperature attained in the building and when it occurs. Give times in hours and minutes, rounded to the nearest minute.

    1. Can we prevent any equipment damage by using air conditioning?

    1. Is the air conditioning able to eventually maintain a nearly constant temperature? If so, what is that temperature?

  1. Suppose it is a hot weekend day when no people are in the building, the lights and machines are off, and there are no furnaces or air conditioners on, that is, H(t) = Q(t) = 0. Again assume that the equipment will be damaged if the building temperature exceeds 81 F. Solve the initial value problem

dt = 0:25

85 10 cos (t12

5)

T ; T(0)=75

(8)

dT

and use your solution to answer the following:

    1. Will the equipment be damaged? If so, when will the damage begin? Give times in hours and minutes, rounded to the nearest minute.

    1. What is the maximum temperature the building will attain?

  1. Given the same scenario as in part 2 but adding the affects of the furnaces and air conditioners gives the initial value problem

dt = 0:25

85 10 cos (t12

5)

T + d(77 T ); T (0) = 75

(9)

dT

Solve this initial value problem twice, once with d = 2 and again with d = 0:5 and answer the following in both cases:

    1. What is the maximum temperature inside the building?

    1. Will the equipment be safe? If not, how long will it be exposed to damaging temperatures (> 81 F)? Give times in hours and minutes, rounded to the nearest minute.

  1. Now let’s consider what happens over a longer time range, say over a Friday, Saturday, Sunday. Employees come to work on Friday and then go home Friday night, leaving the building vacant over the weekend. Solve the following initial value problem using your Runge-Kutta scheme over the interval 0 t 72 with 720 points and answer the following questions. Include a plot of your solution.

dt = 0:25

85 10 cos

12

T + 7 sech

4

(t 10)

+ 2(77 T); T(0) = 75

(10)

dT

(t 5)

3

  1. Will the equipment be safe during the whole time, that is, will the building temperature not exceed 81 F over the three-day period?

  1. Does the temperature in the building appear to reach a “steady state”?

  1. Plot the function

M(t) = 85 10 cos

(t 5)

(11)

12

on the interval 0 t 72. Plot this on a separate graph from the solution to the initial value problem.

  1. Comparing your solution to the plot in part (c), what appears to be driving the building’s temperature in this steady state?

  1. Try to describe your solution of Eq. (10) over the entire time interval in nonmathematical terms. Again, there is no right or wrong answer here, simply try to interpret the mathematics in layman’s terms.

Project 1 A Mathematical Investigation of the Heating and Cooling of Buildings
$24.99 $18.99