Every system has a fixed quantity of energy, known as the internal or intrinsic energy (symbol: U as per IUPAC recommendations). The internal energy of a system can be changed in two modes. These are (1) transfer of heat and (2) in the form of work. Whenever there is a temperature difference between the systems and surroundings, energy in the form of heat is exchanged if the two are in thermal contact.
Heat flows from a body of higher temperature to the one at lower temperature. The internal energy of the body receiving heat is increased, whereas that losing heat is decreased Fig.
A given amount of gas in enclosed in a cylinder with a movable piston. The boundary of the cylinder is an adiabatic one (heat can neither enter nor leave the system). Now, if the pressure of the gas within the cylinder is greater than the external pressures on the piston, the latter is pushed out by the gas till the pressures inside and outside become equal. In moving the piston, the system (gas within the cylinder) does some work against the external pressure. In doing so, it loses an equivalent amount of energy, thus a decrease in its internal energy takes place. On the other hand, if pressure on the piston is greater than the pressure of the gas, the piston moves down and the work is done on the system. This work done by the surroundings on the system appears in the form of an increase in the energy of the system (i.e. gas within the cylinder).
The internal energy of an isolated system remains constant as no interactions, either in the form of heat transfer or work done on/by the system, with the surroundings can take place. For a closed system, where interactions with the surroundings are allowed, energy is merely transferred from system to surroundings or vice versa in the form of heat or work, or a combination of these two. Thus, the total energy of the system plus surrounding is preserved. This statement is known as the law of conservation of energy. According to this law, energy may be transformed from one form to another but the total energy of the universe always remains constant. In other words, energy can neither be created nor destroyed.