The term "thermal energy" is used loosely in various contexts in physics and engineering. It can refer to several different well-defined physical concepts. These include the internal energy or enthalpy of a body of matter and radiation; heat, defined as a type of energy transfer (as is thermodynamic work); and the characteristic energy of a degree of freedom, , in a system that is described in terms of its microscopic particulate constituents (where denotes temperature and denotes the Boltzmann constant).
In thermodynamics, heat is energy transferred to or from a thermodynamic system by mechanisms other than thermodynamic work or transfer of matter. Heat refers to a quantity transferred between systems, not to a property of any one system, or "contained" within it. On the other hand, internal energy and enthalpy are properties of a single system. Heat and work depend on the way in which an energy transfer occurred, whereas internal energy is a property of the state of a system and can thus be understood without knowing how the energy got there.
In a statistical mechanical account of an ideal gas, in which the molecules move independently between instantaneous collisions, the internal energy is the sum total of the gas's independent particles' kinetic energies, and it is this kinetic motion that is the source and the effect of the transfer of heat across a system's boundary. For a gas that does not have particle interactions except for instantaneous collisions, the term "thermal energy" is effectively synonymous with "internal energy". In many statistical physics texts, "thermal energy" refers to , the product of Boltzmann's constant and the absolute temperature, also written as . In a material, especially in condensed matter, such as a liquid or a solid, in which the constituent particles, such as molecules or ions, interact strongly with one another, the energies of such interactions contribute strongly to the internal energy of the body, but are not simply apparent in the temperature.
The term "thermal energy" is also applied to the energy carried by a heat flow, although this can also simply be called heat or quantity of heat.
In an 1847 lecture titled "On Matter, Living Force, and Heat", James Prescott Joule characterised various terms that are closely related to thermal energy and heat. He identified the terms latent heat and sensible heat as forms of heat each affecting distinct physical phenomena, namely the potential and kinetic energy of particles, respectively. He described latent energy as the energy of interaction in a given configuration of particles, i.e. a form of potential energy, and the sensible heat as an energy affecting temperature measured by the thermometer due to the thermal energy, which he called the living force.
If the minimum temperature of a system's environment is and the system's entropy is , then a part of the system's internal energy amounting to cannot be converted into useful work. This is the difference between the internal energy and the Helmholtz free energy.
We define the thermal current density to be a vector parallel to the direction of heat flow, whose magnitude gives the thermal energy per unit time crossing a unit area perpendicular to the flow.
I am inclined to believe that both of these hypotheses will be found to hold good,--that in some instances, particularly in the case of sensible heat, or such as is indicated by the thermometer, heat will be found to consist in the living force of the particles of the bodies in which it is induced; whilst in others, particularly in the case of latent heat, the phenomena are produced by the separation of particle from particle, so as to cause them to attract one another through a greater space.