How to determine the energy storage of capacitors