Energy Transformations in Devices