Two physical systems are in thermal equilibrium if there is no net flow of thermal energy between them when they are connected by a path permeable to heat. Thermal equilibrium obeys the zeroth law of thermodynamics. A system is said to be in thermal equilibrium with itself if the temperature within the system is spatially uniform and temporally constant.
Systems in thermodynamic equilibrium are always in thermal equilibrium, but the converse is not always true. If the connection between the systems allows transfer of energy as 'change in internal energy' but does not allow transfer of matter or transfer of energy as work, the two systems may reach thermal equilibrium without reaching thermodynamic equilibrium.
The relation of thermal equilibrium is an instance of equilibrium between two bodies, which means that it refers to transfer through a selectively permeable partition, the contact path. For the relation of thermal equilibrium, the contact path is permeable only to heat; it does not permit the passage of matter or work; it is called a diathermal connection. According to Lieb and Yngvason, the essential meaning of the relation of thermal equilibrium includes that it is reflexive and symmetric. It is not included in the essential meaning whether it is or is not transitive. After discussing the semantics of the definition, they postulate a substantial physical axiom, that they call the "zeroth law of thermodynamics", that thermal equilibrium is a transitive relation. They comment that the equivalence classes of systems so established are called isotherms.
Thermal equilibrium of a body in itself refers to the body when it is isolated. The background is that no heat enters or leaves it, and that it is allowed unlimited time to settle under its own intrinsic characteristics. When it is completely settled, so that macroscopic change is no longer detectable, it is in its own thermal equilibrium. It is not implied that it is necessarily in other kinds of internal equilibrium. For example, it is possible that a body might reach internal thermal equilibrium but not be in internal chemical equilibrium; glass is an example.
One may imagine an isolated system, initially not in its own state of internal thermal equilibrium. It could be subjected to a fictive thermodynamic operation of partition into two subsystems separated by nothing, no wall. One could then consider the possibility of transfers of energy as heat between the two subsystems. A long time after the fictive partition operation, the two subsystems will reach a practically stationary state, and so be in the relation of thermal equilibrium with each other. Such an adventure could be conducted in indefinitely many ways, with different fictive partitions. All of them will result in subsystems that could be shown to be in thermal equilibrium with each other, testing subsystems from different partitions. For this reason, an isolated system, initially not its own state of internal thermal equilibrium, but left for a long time, practically always will reach a final state which may be regarded as one of internal thermal equilibrium. Such a final state is one of spatial uniformity or homogeneity of temperature. The existence of such states is a basic postulate of classical thermodynamics. This postulate is sometimes, but not often, called the minus first law of thermodynamics. A notable exception exists for isolated quantum systems which are many-body localized and which never reach internal thermal equilibrium.
Heat can flow into or out of a closed system by way of thermal conduction or of thermal radiation to or from a thermal reservoir, and when this process is effecting net transfer of heat, the system is not in thermal equilibrium. While the transfer of energy as heat continues, the system's temperature can be changing.
If bodies are prepared with separately microscopically stationary states, and are then put into purely thermal connection with each other, by conductive or radiative pathways, they will be in thermal equilibrium with each other just when the connection is followed by no change in either body. But if initially they are not in a relation of thermal equilibrium, heat will flow from the hotter to the colder, by whatever pathway, conductive or radiative, is available, and this flow will continue until thermal equilibrium is reached and then they will have the same temperature.
One form of thermal equilibrium is radiative exchange equilibrium. Two bodies, each with its own uniform temperature, in solely radiative connection, no matter how far apart, or what partially obstructive, reflective, or refractive, obstacles lie in their path of radiative exchange, not moving relative to one another, will exchange thermal radiation, in net the hotter transferring energy to the cooler, and will exchange equal and opposite amounts just when they are at the same temperature. In this situation, Kirchhoff's law of equality of radiative emissivity and absorptivity and the Helmholtz reciprocity principle are in play.
If an initially isolated physical system, without internal walls that establish adiabatically isolated subsystems, is left long enough, it will usually reach a state of thermal equilibrium in itself, in which its temperature will be uniform throughout, but not necessarily a state of thermodynamic equilibrium, if there is some structural barrier that can prevent some possible processes in the system from reaching equilibrium; glass is an example. Classical thermodynamics in general considers idealized systems that have reached internal equilibrium, and idealized transfers of matter and energy between them.
An isolated physical system may be inhomogeneous, or may be composed of several subsystems separated from each other by walls. If an initially inhomogeneous physical system, without internal walls, is isolated by a thermodynamic operation, it will in general over time change its internal state. Or if it is composed of several subsystems separated from each other by walls, it may change its state after a thermodynamic operation that changes its walls. Such changes may include change of temperature or spatial distribution of temperature, by changing the state of constituent materials. A rod of iron, initially prepared to be hot at one end and cold at the other, when isolated, will change so that its temperature becomes uniform all along its length; during the process, the rod is not in thermal equilibrium until its temperature is uniform. In a system prepared as a block of ice floating in a bath of hot water, and then isolated, the ice can melt; during the melting, the system is not in thermal equilibrium; but eventually, its temperature will become uniform; the block of ice will not re-form. A system prepared as a mixture of petrol vapour and air can be ignited by a spark and produce carbon dioxide and water; if this happens in an isolated system, it will increase the temperature of the system, and during the increase, the system is not in thermal equilibrium; but eventually, the system will settle to a uniform temperature.
Such changes in isolated systems are irreversible in the sense that while such a change will occur spontaneously whenever the system is prepared in the same way, the reverse change will practically never occur spontaneously within the isolated system; this is a large part of the content of the second law of thermodynamics. Truly perfectly isolated systems do not occur in nature, and always are artificially prepared.
One may consider a system contained in a very tall adiabatically isolating vessel with rigid walls initially containing a thermally heterogeneous distribution of material, left for a long time under the influence of a steady gravitational field, along its tall dimension, due to an outside body such as the earth. It will settle to a state of uniform temperature throughout, though not of uniform pressure or density, and perhaps containing several phases. It is then in internal thermal equilibrium and even in thermodynamic equilibrium. This means that all local parts of the system are in mutual radiative exchange equilibrium. This means that the temperature of the system is spatially uniform. This is so in all cases, including those of non-uniform external force fields. For an externally imposed gravitational field, this may be proved in macroscopic thermodynamic terms, by the calculus of variations, using the method of Langrangian multipliers. Considerations of kinetic theory or statistical mechanics also support this statement.
There is an important distinction between thermal and thermodynamic equilibrium. According to Münster (1970), in states of thermodynamic equilibrium, the state variables of a system do not change at a measurable rate. Moreover, "The proviso 'at a measurable rate' implies that we can consider an equilibrium only with respect to specified processes and defined experimental conditions." Also, a state of thermodynamic equilibrium can be described by fewer macroscopic variables than any other state of a given body of matter. A single isolated body can start in a state which is not one of thermodynamic equilibrium, and can change till thermodynamic equilibrium is reached. Thermal equilibrium is a relation between two bodies or closed systems, in which transfers are allowed only of energy and take place through a partition permeable to heat, and in which the transfers have proceeded till the states of the bodies cease to change.
An explicit distinction between 'thermal equilibrium' and 'thermodynamic equilibrium' is made by C.J. Adkins. He allows that two systems might be allowed to exchange heat but be constrained from exchanging work; they will naturally exchange heat till they have equal temperatures, and reach thermal equilibrium, but in general, will not be in thermodynamic equilibrium. They can reach thermodynamic equilibrium when they are allowed also to exchange work.
Another explicit distinction between 'thermal equilibrium' and 'thermodynamic equilibrium' is made by B. C. Eu. He considers two systems in thermal contact, one a thermometer, the other a system in which several irreversible processes are occurring. He considers the case in which, over the time scale of interest, it happens that both the thermometer reading and the irreversible processes are steady. Then there is thermal equilibrium without thermodynamic equilibrium. Eu proposes consequently that the zeroth law of thermodynamics can be considered to apply even when thermodynamic equilibrium is not present; also he proposes that if changes are occurring so fast that a steady temperature cannot be defined, then "it is no longer possible to describe the process by means of a thermodynamic formalism. In other words, thermodynamics has no meaning for such a process."