heat generation function

From OSL Demo