How to calculate the length of the capacitor