potential energy storage function

From OSL Demo