10.1 The Cooling Coffee Problem Revisited

Coffee Cup Cooling Problem

  • In this section we revisit the cooling coffee cup problem from Chapters 9.1 and 9.2, where an ODE was derived using Newton's law of cooling.
  • We will find the analytic solution using separation of variables, and numerically using RK4 in R.
  • We will also solve an ODE that uses the natural law of cooling, and compare the two solutions.

Newton's Law of Cooling

  • Assume air is moving over and around cup.

Coffee Cup ODE

From Ch9.2:

\[ \frac{dU}{dt} = -\lambda (U-u_s), \,\, \lambda= \frac{hS}{cm} \]

Parameters:

  • \( c \) = specific heat of coffee
  • \( m \) = mass of coffee
  • \( h \) = Newton cooling coefficient
  • \( S \) = surface area through which heat is lost
  • \( u_s \) = constant temperature of surroundings

Analytical Solution

Use separation of variables with \( U(0)=u_{0} \) and \( U > u_{s} \):

\[ \small{ \begin{aligned} \frac{dU}{dt} &=-\lambda(U-u_{s}) \\ \int \frac{dU}{U-u_{s}} & =-\lambda \int dt \\ \ln(U-u_{s}) &=-\lambda t +K \\ U-u_{s} &= e^{-\lambda t + K} \\ U &= e^{-\lambda t}e^{K} + u_{s} \end{aligned}} \]

Applying the initial condition \( U(0)=u_{0} \) we have

\[ U(t) = (u_{0}-u_{s})e^{-\lambda t}+u_{s} \]

Example 10.2

If it takes 10 minutes for a cup of coffee to cool from \( 60^\circ \) C to \( 50 ^\circ \) C in a room at temperature \( 20^\circ \) C, how long does it take to cool from \( 60^\circ \) C to \( 40 ^\circ \) C?

First, find \( \lambda \): \[ \small{ \begin{aligned} U(t) & = (u_{0}-u_{s})e^{-\lambda t}+u_{s} \\ U - u_s & = (u_{0}-u_{s})e^{-\lambda t} \\ e^{-\lambda t} & = \frac{U - u_s}{u_{0}-u_{s}} \\ -\lambda t & = \ln \left(\frac{U - u_s}{u_{0}-u_{s}} \right) \\ \lambda &= -\frac{1}{t} \ln \left(\frac{U - u_s}{u_{0}-u_{s}} \right) \\ \end{aligned}} \]

Example 10.2: Find Lambda

Recall that it takes 10 minutes for a cup of coffee to cool from \( 60^\circ \) C to \( 50 ^\circ \) C in a room at temperature \( 20^\circ \) C.

Thus we substitute \( U=50, u_0 = 60, u_s = 20, t = 10 \) into our equation and to find \( \lambda \):

\[ \small{ \lambda = \frac{1}{t} \ln \left(\frac{U - u_s}{u_0 - u_s} \right) = -\frac{1}{10} \ln \left(\frac{50 - 20}{60-20} \right) \cong 0.0288 } \]

-1/10*log(30/40)
[1] 0.02876821

Example 10.2: Find T

Now that we know what \( \lambda \) is, we adapt above formula to solve for time \( T \) required for coffee to cool from \( 60^\circ \) C to \( 40 ^\circ \) C:

\[ \small{ \begin{aligned} T &= \frac{1}{\lambda} \ln \left(\frac{U - u_s}{u_0 - u_s} \right) \\ &= -\frac{1}{0.0288} \ln \left(\frac{40 - 20}{60-20} \right) \\ & \cong 24.1 \end{aligned}} \]

-1/0.0288*log(20/40)
[1] 24.06761

Numerical Solution

Ch10.1Examples(50)

plot of chunk unnamed-chunk-4

Natural Law of Cooling

  • Assume air is motionless over and around cup.

\[ \frac{dU}{dt}=-\lambda(U-u_s)^{5/4} \]

Example 10.3: Stagnant Air

Apply the law of natural cooling to obtain

\[ \frac{dU}{dt} = -\lambda (U-u_s)^{\frac{5}{4}}, \,\, \lambda =\frac{h_1S}{cm} \]

This differential equation is separable and can be solved using the same technique as before (Exercise 10.1).

For specifications as in Example 2, it takes 25.3 minutes to reach \( 40° \) C, which is slower than the 24 minutes in Example 2.

Numerical Results

Ch10.1Examples(50)

plot of chunk unnamed-chunk-5

Comparing the Two Laws

  • The estimation time using the natural cooling law is slightly longer than that obtained using Newton's law of cooling.
  • This makes sense because we expect cooling with a slight breeze (Newton's law of cooling) to be more effective than cooling in perfectly still air (natural law of cooling).

Summary of Equations

  • Newton's law of cooling

\[ \frac{dU}{dt} = -\lambda (U-u_s), \,\, \lambda= \frac{hS}{cm} \]

  • Natural law of cooling

\[ \frac{dU}{dt} = -\lambda (U-u_s)^{\frac{5}{4}}, \,\, \lambda =\frac{h_1S}{cm} \]