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 graph, the room temperature varies in a jerky periodic fashion.

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

[Where the room temperature varies in a simple periodic fashion|Where the room temperature increases linearly with time]

[Where the room temperature varies in a simple periodic fashion| Where the room temperature increases linearly with time| Back to the Mathematics 256 page]

Lecture in .pdf format