Cooling coffee

A cup of coffee cools off in a room at constant temperature. The temperature T It satisfies the differential equation

T' = - (T - Tenv)/tau

where tau is the relaxation time, the amount of time the temperature difference scales by 1/e. The temperaure is calculated by simple step approximations

T(t + dt) = T(t) - (T - Tenv).dt / tau

The blue graph plots the approximate solution with steps dt = 1 second. The red graph plots the room temperature.

In this version, the room tempearture increases linearly with time.

Click on the black node to suspend the process. Move it to change its speed. Set the initial temperature with the blue node, rate of growth environment temperature with red one.

[Where the room temperature varies in a simple periodic fashion| Where the room temperature varies in discontinuous steps| Back to the Mathematics 256 page]

Lecture in .pdf format