https://www.blitznotes.org/ib/physics/thermal.html