how is energy measured in physics