[Math] Newton’s Law of Cooling

ordinary differential equations

Newton's Law of Cooling/Warming

As shown in Figure 3.3.11, a small metal bar is placed inside container A, and container A then is placed within a much larger container B. As the metal bar cools, the ambient temperature $T_A(t)$ of the medium within container A changes according to Newton's law of coding. As container A cools, the temperature of the medium inside container B does not change significantly and can be considered to be a constant $T_B$. Construct a mathematical model for the temperature $T(t)$ and $T_A(t)$, where $T(t)$ is the temperature of the metal bar inside container A. Find a solution of the system subject to the initial conditions $T(0) = T_0 , T_A(0) = T_1$.

what I had try:

$\frac{dTA}{dt} = -k(T_A-T_B)$

$T_A – T_B = Ce^{-kt}$

$T_A(0) – T_B = Ce^{-k0}$

$T_1-T_B = C$

so, $T_A(t) = (T_1-T_B)e^{-kt}$

$\frac{dT}{dt} = -K(T-T_A)$

$\frac{dT}{dt} + KT = KT_A$

$e^{Kt}\frac{dT}{dt} + KTe^{Kt} = KT_Ae^{Kt}$

$\frac{d(e^{Kt}T)}{dt} = KT_Ae^{Kt}$

$Te^{Kt} = K(T_1-T_B)\int{e^{(K-k)t}} + C$

$T = K(T_1-T_B)\frac{e^{(K-k)t}}{(K-k)e^{Kt}} + C$

$T(0) = T_0$

$C = T_0 – \frac{K(T_1-T_B)}{(K-k)}$

so,

$T(t) = K(T_1-T_B)\frac{e^{(K-k)t}}{(K-k)e^{Kt}} + T_0 – \frac{K(T_1-T_B)}{(K-k)} $

but i doubt of my assumption that $\frac{dTA}{dt} = -k(T_A-T_B)$ , i think that $T_A$ is impacted by $T$ too. help please ^^

Best Answer

I imagine this problem was presented during the discussion on coupled linear systems. You are going astray fairly rapidly. Your first differential equation should read $$C\frac{dT}{dt}=-q_A=-h_A(T-T_A)$$ Where $C$ is the heat capacity of the metal bar, $q_A$ is the rate of heat flowing from the bar to container $A$ and $h_A$ is the heat transfer coefficient between the bar and $A$ (times the area of contact). You can't try to integrate this right away be $T_A$ will vary with time. You need the second differential equation which is $$C_A\frac{dT_A}{dt}=q_A-q_B=-h_A(T_A-T)-h_B(T_A-T_B)$$ And now $C_A$ is the heat capacity of container $A$ and $h_B$ is the heat transfer coefficient (times area) between containers $A$ and $B$. To make things simpler, construct variables $\theta=T-T_A$ and $\theta_A=T_A-T_B$. Then your differential equations read $$\frac{d\theta}{dt}=-\frac{h_A}{C}\theta$$ $$\frac{d\theta_A}{dt}=\frac{h_A}{C_A}\theta-\frac{h_B}{C_A}\theta_A$$ EDIT: As pointed out in the comment by @Makoto Daiwa Ambara the above was just wrong, and I should have instead defined $\theta=T-T_B$ and $\theta_A=T_A-T_B$. Then we get the differential equations $$\frac{d\theta}{dt}=-\frac{h_A}{C}\left(\theta-\theta_A\right)$$ $$\frac{d\theta_A}{dt}=-\frac{h_A}{C_A}\left(\theta_A-\theta\right)-\frac{h_B}{C_A}\theta_A$$ Then the matrix form of the equations is $$\frac d{dt}\begin{bmatrix}\theta\\ \theta_A\end{bmatrix}=\begin{bmatrix}-\frac{h_A}{C}&\frac{h_A}{C}\\\frac{h_A}{C_A}&-\frac{(h_A+h_B)}{C_A}\end{bmatrix}\begin{bmatrix}\theta\\ \theta_A\end{bmatrix}$$ This system now seems to have distinct eigenvalues for its characteristic equation.