Add heat capacity.
Merge https://gist.github.com/f3f37daa4cf1884f02ad