Electric field calculations for needle electrodes with space charge effects