Mechanical energy and its types