W_e=-\frac{1}{2}\int_V\vec{D}\cdot grad\varphi dV