How to measure battery energy density