Electric field calculation and electric dipole