Lesson 7 of 15
Newton's Law of Cooling
Newton's Law of Cooling
The rate of heat loss of an object is proportional to the difference between the object's temperature and the ambient (surrounding) temperature:
- : object temperature
- : ambient temperature (constant)
- : cooling constant (depends on material and environment)
Exact Solution
The object approaches exponentially. This is just exponential decay applied to the temperature difference .
Applications
- Forensics: estimating time of death from body temperature
- Engineering: thermal management of electronics
- Food science: how quickly food cools to safe serving temperature
- Metallurgy: quenching and tempering of metals
Worked Example
A cup of coffee at 90°C in a 20°C room with :
Your Task
Implement cooling(k, T_env, T0, t_end, n) using Euler's method. Return the final temperature.
Pyodide loading...
Loading...
Click "Run" to execute your code.