Question 1.6.4: Temperature Dynamics of Water Consider again Example 1.4.1. ...
Temperature Dynamics of Water
Consider again Example 1.4.1. Water in a glass measuring cup was allowed to cool after being heated to 204°F. The ambient air temperature was 70°F. The measured water temperature at various times is given in the following table.
Time (sec) | 0 | 120 | 240 | 360 | 480 | 600 |
Temperature (°F) | 204 | 191 | 178 | 169 | 160 | 153 |
Time (sec) | 720 | 840 | 960 | 1080 | 1200 |
Temperature (°F) | 147 | 141 | 137 | 132 | 127 |
Obtain a functional description of the water temperature versus time.
Learn more on how do we answer questions.
From Example 1.4.1, we learned that the relative temperature, ΔT = T − 70 has the exponential form
\Delta T = be^{mt}
We can find values of m and b by using p = polyfit(x , log(y) , 1). The first element p_{1} of the vector p will be m, and the second element p_{2} will be ln b. We can find b from b = e^{p2} .
The following MATLAB program performs the calculations.
time = (0:120:1200);
temp = [204,191,178,169,160,153,147,141,137,132,127];
rel_temp = temp - 70;
log_rel_temp = log(rel_temp);
p = polyfit(time,log_rel_temp,1);
m = p(1),b = exp(p(2))
DT = b*exp(m*time);
J = sum((DT-rel_temp).^2)
S = sum((rel_temp - mean(rel_temp)).^2
r2 = 1 - J/S
The results are m=−6.9710 × 10^{−4} and b=1.2916 × 10², and the corresponding function is
\Delta T = be^{mt} or T = \Delta T + 70 = be^{mt} + 70
The quality-of-fit values are J = 47.4850, S = 6.2429×10³, and r² = 0.9924, which indicates a very good fit.