Heating and cooling of buildings

SM212 project, written by (former student) Brad Winston Hoff

Two points of note on this description of project one. The first point being that in order to conserve disk space (and keep download time to a minimum) only the command lines and text descriptions of these lines have been displayed. The second point of note reguards a problem that can arise when trying to graph functions that get really large (like in part 4 of this Project). For some reason Maple has a tendency to "crash" graphs of very large functions. By "crash" I'm not referring to freezing up your computer, rather I mean that the yellow graph line starts out at the correct level and quickly intersects the x axis. It is more than likely that this line is not going to be useful to you. The simplest way to fix this is to display the graph over a smaller interval (for example, graphing the function from 12..24 or 0..10 instead of from the entire 0..24 interval). This will be discussed further in part 4.

The point of this project is to determine what happens when you very the initial conditions (T(0)) and the time constant (K) of a first order differential equation. The equation we're given looks something like:

dT/dt = K[M(t) - T(t)] + H(t) + U(t)
We're also told that M(t) = 75 + 20sin((Pi)t/12), so instead of typing in M(t), just put in the sine equation just mentioned. Basically you type in something to the effect of:

> ode1:=diff(T(t), t$1)=K*(75+20*sin(Pi*t/12)-T(t))+H+U;

Now that Maple knows what equation it's working with, put in the first set of conditions that we're given for Part 1:

> K:=2; H:=75; U:=0;

In order to graph this thing, you have to tell Maple what blunt object to attack it with:

> with(DEtools);

Now put in the starting temperature for part (a) as the initial condition....

> ic:=T(0)=60;

....then give it the graphing command for differential equations:

> DEplot(ode1, T(t), 0..24, [[ic]], T(t)=0..150);

Now for part (b).... One of the nifty things about Maple is that you don't always have to re-type (or copy and paste as the case may be) everything if you're just varying one of the input conditions. Since all the previous stuff is still in memory, just tell Maple to redefine the initial temperature like so....

> ic:=T(0)=70;

Now copy the previous graphing command (or re-type it if you wish) and hit "ENTER"

> DEplot(ode1, T(t), 0..24, [[ic]], T(t)=0..150);

For part (c), use the same method as for part (b):

> ic:=T(0)=80;

> DEplot(ode1, T(t), 0..24, [[ic]], T(t)=0..150);

Part 2 is a short answer question. (Sorry, no help here. I'm just in charge of the Maple stuff)

Part 3 asks you to solve this equation explicitly....

Since changing the initial conditions did not significantly change the overall appearance of the graph, it is a safe to assume that the factor for this behavior can be determined using any of the previous initial conditions. Since the initial condition for (c) is currently stored in memory, this is the most convenient to use since you don't have to type any extra stuff in. (If you decide you want to use one of the other initial conditions, uses the same method as in (b) minus the graphing command).

The solving command for this equation is:

> dsolve({ode1, ic}, {T(t)});

[Hint: When evaluating this cluttered mess, ignore the terms that are constant. Then look at the remaining terms to determine what is causing the temperature to oscillate up and down.

For Part 4, the initial temperature will remain at 60 while different values for K are used. Redefine "ic" and "K" in much the same way as before:

> ic:=T(0)=60; K:=2;

Now graph as before:

> DEplot(ode1, T(t), 0..24, [[ic]], T(t)=0..150);

Now redefine K to be 4 and graph it; however, recall the point of note at the beginning of this project. When we define K to be 4, this function may become too large for Maple to handle on the 0..24 intervel. The easiest way to fix this is to narrow the interval. I left the interval as 0..24 on my example command, but you may need to change it to something like 0..10 or 10..20, or something to that effect.

> K:=4;

> DEplot(ode1, T(t), 0..24, [[ic]], T(t)=0..150);

Finally, when entering making K equal to 6, recall the warning given for the K=4 section.

> K:=6;

> DEplot(ode1, T(t), 0..24, [[ic]], T(t)=0..150);


Put into html by wdj on 5-15-97