In separate production of electricity some energy is lost as waste heat , but in cogeneration this energy performs useful work ( see energy ) . In separate production of electricity some energy must be rejected as waste heat , but in cogeneration this thermal energy is put to good use .