where, rij is the distance between ith and jth molecule carrying charges qi and qj. By integrating the above equation, we can
get the total energy of the system which can be used to calculate the total entropy change of the system as expressed in
Eq. (4). The molecules can be assumed to be a set of interconnected harmonic oscillators held together by electromagnetic
forces. The total number of accessible states to the system under electromagnetic potentials as shown in Fig. 4b is less than
expected number of states in Fig. 4a resulting in a reduction in entropy.
When photons interact with a particular system, energy is transmitted leading to heat generation which results in an
increase in overall entropy of the system. To illustrate, we consider photoelectric effect where the kinetic energy of the
emitted electron is a different between the energy of photon and threshold energy of the electron. This is expressed by the
following equation,