thermal energy storage function

From OSL Demo