Chemical energy storage cost calculation formula