What is the formal, rigorous definition of useful energy? In thermodynamics, we talk of useful energy vs. useless energy, or heat. I want to know what is the formal definition of useful energy. It seems too subjective. So, can anyone clarify this for me.
 A: Thermodynamic systems have internal energy, typically kinetic energy of random vibrations of their atoms.
Perhaps you mean energy is useful to the degree it can be used to do work? Work and heat are the transfer of energy from one system to another, or perhaps one system to its surroundings.
Work is energy transfer in a form that can exert macroscopic forces on external systems. For example, a hot gas can expand and drive a piston.
Heat is energy transfer by means other than work or transfer of matter. For example, thermal conduction can transfer energy from a hot system to a cold one.
But it may not be true that work is useful and heat is useless. For example work that goes into overcoming friction may be useless wasted energy. Heat that melts ice or warms your house may be just what you want.
Often both work and heat are transferred together. In that case, there are quantities that help separate work and heat. For example, enthalpy is $H = U + pV$. Suppose you have carbon and oxygen. You burn them. Some of the internal energy in chemical bonds is converted to heat, which warms the surroundings. Some is converted to mechanical energy, because for every O$_2$ you started with, you wind up with $2$ CO$_2$ molecules, or twice the volume of gas once it has cooled back to room temperature. The extra gas had to push back the atmosphere against atmospheric pressure. The energy that went into pushing did not go into warming the surroundings. In this case, you can figure out the heat by figuring out the change in enthalpy.
A: 
In thermodynamics, we talk of useful energy vs. useless energy, or
heat. I want to know what is the formal definition of useful energy.

Heat is not useless energy. But not all of the heat input to a system is available to perform useful work. Per the second law of thermodynamics, some of the heat received by the system from a high temperature reservoir must be rejected to a lower temperature reservoir, leaving only the net heat into the system potentially available to perform work.
A more formal definition of useful energy is the exergy of a system. The exergy of a system is the maximum useful work possible during a process that brings the system into equilibrium with a heat reservoir, reaching maximum entropy. In other words, exergy is the maximum energy available to produce work.
In the case of a heat engine, exergy is the heat input times the Carnot efficiency, since the efficiency of a Carnot cycle is the maximum possible efficiency of any heat engine operating between to thermal reservoirs. The exergy of the Carnot cycle is therefore an upper limit for useful net work produced by any heat engine.
For a more complete description of exergy, see the following:
https://en.wikipedia.org/wiki/Exergy
Hope this helps.
