On the origin of surface tension and its application to micro/nano-scale devices