On the Configurational Entropy of Nanoscale Solutions for More Accurate Surface and Bulk Nano-Thermodynamic Calculations

The configurational entropy of nanoscale solutions is discussed in this paper. As follows from the comparison of the exact equation of Boltzmann and its Stirling approximation (widely used for both macroscale and nanoscale solutions today), the latter significantly over-estimates the former for nano-phases and surface regions. On the other hand, the exact Boltzmann equation cannot be used for practical calculations, as it requires the calculation of the factorial of the number of atoms in a phase, and those factorials are such large numbers that they cannot be handled by commonly used computer codes. Herewith, a correction term is introduced in this paper to replace the Stirling approximation by the so-called “de Moivre approximation”. This new approximation is a continuous function of the number of atoms/molecules and the composition of the nano-solution. This correction becomes negligible for phases larger than 15 nm in diameter. However, the correction term does not cause mathematical difficulties, even if it is used for macro-phases. Using this correction, future nano-thermodynamic calculations will become more precise. Equations are worked out for both integral and partial configurational entropies of multi-component nano-solutions. The equations are correct only for nano-solutions, which contain at least a single atom of each component (below this concentration, there is no sense to make any calculations).


Introduction
Nanoscale technologies today are mostly empirical.They will be based on nanoscale science only if the validity of different scientific disciplines on which macroscale technologies are based are extended towards the nanoscale.One of those scientific disciplines is chemical thermodynamics, originally developed by Gibbs [1].The classical validity of this discipline is restricted by the size of the phases in the system considered: it is classically valid only if all dimensions of all phases in a system are in the micro-or macroscale (above 100 nm), as in this case all molar Gibbs energies are size-independent quantities.However, if any of the phases in a system has at least one of its dimensions in the nanoscale (below 100 nm), the molar Gibbs energies and therefore phase equilibria will be size-dependent .
Thus, all previous papers on nano-thermodynamics neglected the difference between the actual value (after Boltzmann) and its Stirling approximation, being the subject of this paper.As follows, Equation ( 1) is only an approximated equation, obtained by using the Stirling approximation [41,42] to the exact equation of Boltzmann [43,44].This is done for two reasons: firstly, Equation ( 1) is much easier to use for practical calculations compared to the exact equation; secondly, the difference between the two is negligible for a large number of atoms/molecules of microscale and macroscale solutions.In the present paper, this difference will be studied for nanoscale solutions, and a correction term will be introduced as function of the number of atoms/molecules and the composition of nanoscale solutions.

The Exact Equation for the Integral Molar Configurational Entropy of Solutions
Entropy was defined in the most general way by Boltzmann [43,44] as: where k (J/K) is the Boltzmann constant (=R/N Av , where N Av is the Avogadro number), W (dimensionless) is the number of possible configurations of the atoms in the solution.Now, let us consider a binary solution made of N A atoms/molecules A and N B atoms/molecules B, with the total number of atoms/molecules: N = N A + N B .The A atoms/molecules are not distinguishable from each other, and the B atoms/molecules are not distinguishable from each other, either.Then, the number of possible configurations equals the number of multiset permutations: Now, let us substitute Equation (4) into Equation (3): Now, let us convert Equation (5) into a molar integral configurational entropy by multiplying it with the ratio of the Avogadro number to the total number of atoms/molecules in the solution and remembering that k•N Av = R: Equation ( 6) is the exact equation for the molar integral configurational entropy of binary solutions (S conf , J/mol).It can be extended to n-component solutions as:

The Stirling Approximation for the Integral Molar Configurational Entropy of Solutions
Equation ( 6) is difficult to use, as the factorials of large numbers are so large that even computers refuse to calculate them (the Microsoft Office EXCEL 2007 software calculates the factorials to the maximum number of 170! = 7.3 × 10 306 , although other mathematical packages such as Maple or Mathematica are capable of handling the factorials of large numbers).Therefore, the Stirling approximation is usually applied, written as [41,42]: Now, let us replace both the ln N! and the ln N i !terms in Equation ( 7) by Equation (8).After some re-arrangements, the approximated equation is obtained for the approximated integral molar configurational entropy of the solution, which is identical to Equation (1), if the mole fraction is defined by Equation (2).
Calculated results by Equations ( 1) and ( 6) are compared in Figures 1-3.In Figures 2 and 3 the relative error is shown, defined as: One can see that the Stirling approximation significantly deviates from the exact Boltzmann equation for low values of N-especially for non-equi-molar and for multi-component solutions.Although the relative error decreases with increasing the number of atoms in the phase, it is still too large for nano-Calphad calculations, even at N = 170 (the largest number for which we calculated the factorial using the Microsoft Office EXCEL 2007 software): this is 2.4% for binary equimolar solution, 4.3% for binary solution with 10 or 90 at % of the components (see Figure 2), and 3.8% for the equimolar, five-component solution (see Figure 3).It is especially critical when surface/interfacial thermodynamics is calculated, as the surface and interface regions contain much fewer atoms compared to bulk phases.That is why a new approximation is needed for more accurate nano-Calphad and surface/interface calculations.

The Stirling Approximation for the Integral Molar Configurational Entropy of Solutions
Equation ( 6) is difficult to use, as the factorials of large numbers are so large that even computers refuse to calculate them (the Microsoft Office EXCEL 2007 software calculates the factorials to the maximum number of 170! = 7.3 × 10 306 , although other mathematical packages such as Maple or Mathematica are capable of handling the factorials of large numbers).Therefore, the Stirling approximation is usually applied, written as [41,42]: Now, let us replace both the ln ! and the ln !terms in Equation ( 7) by Equation ( 8).After some re-arrangements, the approximated equation is obtained for the approximated integral molar configurational entropy of the solution, which is identical to Equation (1), if the mole fraction is defined by Equation (2).
Calculated results by Equations ( 1) and ( 6) are compared in Figures 1-3.In Figures 2 and 3 the relative error is shown, defined as: One can see that the Stirling approximation significantly deviates from the exact Boltzmann equation for low values of N-especially for non-equi-molar and for multi-component solutions.Although the relative error decreases with increasing the number of atoms in the phase, it is still too large for nano-Calphad calculations, even at N = 170 (the largest number for which we calculated the factorial using the Microsoft Office EXCEL 2007 software): this is 2.4% for binary equimolar solution, 4.3% for binary solution with 10 or 90 at % of the components (see Figure 2), and 3.8% for the equimolar, five-component solution (see Figure 3).It is especially critical when surface/interfacial thermodynamics is calculated, as the surface and interface regions contain much fewer atoms compared to bulk phases.That is why a new approximation is needed for more accurate nano-Calphad and surface/interface calculations.

Selection of the Optimum Approximation to Replace the Stirling Approximation
There are several new approximations for factorial expressions in the recent mathematical literature [45][46][47][48][49][50][51][52].These approximations are different modified forms of the Stirling equation.However, all of them are so complex that their usage is not practical for the calculation of nano-equilibria.Let us rather go back to the 18th century, using the excellent book of Tweedle [42], which contains the original work of Stirling [41] and many useful commentaries.The equation in question was discussed by Stirling in his proposition 28, example 2. According to Tweedle, this equation of Stirling can be written in terms of natural logarithm as: Although Equation ( 10) at first sight is quite different from Equation (8), it is true that Equation (10) becomes identical to Equation ( 8) at the limit of → ∞.Based on the correspondence between Stirling and de Moivre, soon after the publication of Equation ( 10), de Moivre published his own equation, which was somewhat different from Equation (10).According to Tweedle, the equation of de Moivre can be written as:

Selection of the Optimum Approximation to Replace the Stirling Approximation
There are several new approximations for factorial expressions in the recent mathematical literature [45][46][47][48][49][50][51][52].These approximations are different modified forms of the Stirling equation.However, all of them are so complex that their usage is not practical for the calculation of nano-equilibria.Let us rather go back to the 18th century, using the excellent book of Tweedle [42], which contains the original work of Stirling [41] and many useful commentaries.The equation in question was discussed by Stirling in his proposition 28, example 2. According to Tweedle, this equation of Stirling can be written in terms of natural logarithm as: Although Equation (10) at first sight is quite different from Equation (8), it is true that Equation (10) becomes identical to Equation (8) at the limit of → ∞.Based on the correspondence between Stirling and de Moivre, soon after the publication of Equation ( 10), de Moivre published his own equation, which was somewhat different from Equation (10).According to Tweedle, the equation of de Moivre can be written as:

Selection of the Optimum Approximation to Replace the Stirling Approximation
There are several new approximations for factorial expressions in the recent mathematical literature [45][46][47][48][49][50][51][52].These approximations are different modified forms of the Stirling equation.However, all of them are so complex that their usage is not practical for the calculation of nano-equilibria.Let us rather go back to the 18th century, using the excellent book of Tweedle [42], which contains the original work of Stirling [41] and many useful commentaries.The equation in question was discussed by Stirling in his proposition 28, example 2. According to Tweedle, this equation of Stirling can be written in terms of natural logarithm as: Although Equation ( 10) at first sight is quite different from Equation ( 8), it is true that Equation (10) becomes identical to Equation ( 8) at the limit of N → ∞ .Based on the correspondence between Stirling and de Moivre, soon after the publication of Equation ( 10), de Moivre published his own equation, which was somewhat different from Equation (10).According to Tweedle, the equation of de Moivre can be written as: Equations ( 10) and ( 11) provide similar numerical results, especially at relatively large N values.For practical purposes, however, Equation ( 11) is better than Equation (10), as its first two terms are exactly the same as those of the so-called "Stirling approximation" (Equation ( 8)).Thus, the de Moivre equation is more straightforward for use as the extended Stirling approximation.Now, the question is: how many terms of the de Moivre equation should be used for practical nano-Calphad calculations?
For nano-Calphad calculations, the region with N < 10 is out of interest.Thus, we need a new approximation which will provide relative errors less than 0.1% at N ≥ 10.The relative error of different combinations of terms of Equations ( 10) and ( 11) compared to the exact ln N! value is calculated for N = 10 in Table 1.As follows from Table 1, the first three terms of both Equations ( 10) and ( 11) reduce the relative error below 0.1% at N = 10.Although the first three terms of Equation ( 10) provide a somewhat better agreement with ln N! compared to Equation (11), Equation ( 11) is preferred here for the reasons given above.Thus, instead of the Stirling approximation of Equation ( 8), herewith the following "de Moivre approximation" is suggested for nano-solutions: Table 1.The relative errors (%) provided by different combinations of terms at N = 10 in Equations ( 10) and ( 11), compared to the exact value of ln N!.
Term Numbers Combined Equation ( 10) Equation ( 11 Equation ( 12) will hopefully be easily accepted in the literature, as it is a clear extension of the "Stirling approximation" (Equation ( 8)), widely used in the literature.Now, let us see how Equation (12) performs to calculate configurational entropy of nano-solutions.

The Integral Configurational Entropy of Nano-Solutions in the de Moivre Approximation
Substituting Equation ( 12) into Equation ( 6) and taking Equation (2) into account, the following equation is found: where x (dimensionless) is the mole fraction of component B in the binary A-B solution.Comparing Equation (13) to Equation (1), one can see that the first term of Equation ( 13) is the same as the Stirling approximation, and it does not depend on the number of atoms in the solution.The second term of Equation ( 13) is the correction term for binary nano-solutions.One can see that this second term is inversely proportional to N, and therefore (although it is also proportional to lnN), the second term of Equation ( 13) will diminish at large N-s.Still, the second term of Equation ( 13) will cause no harm, even if it is used for large N values.The performance of Equation ( 13) vs. the performance of Equation ( 1) is shown in Figure 4a, compared to the exact Boltzmann Equation ( 6) for an equimolar binary solution.At N ≥ 10, the relative error of the de Moivre approximation Equation ( 13) is less than 0.45% compared to the exact Boltzmann equation.The same comparison is shown in Figure 4b for a binary solution with 0.1 or 0.9 mole fractions of the components.The conclusion is the same as above, with the relative error being below 0.36% for N ≥ 10.Equation ( 13) can also be extended to C-component solutions (C ≥ 2) if Equation ( 12) is substituted into Equation ( 7): One can see that Equation ( 13) is a simplified version of Equation ( 14) if C = 2 is substituted.As an example, Figure 5 shows the performance of Equation ( 14) vs. the exact Equation ( 7) for the equi-molar five-component solution.One can see a good agreement with a relative error being less than 0.17% at N ≥ 10.
Entropy 2017, 19, x 6 of 11 shown in Figure 4b for a binary solution with 0.1 or 0.9 mole fractions of the components.The conclusion is the same as above, with the relative error being below 0.36% for  ≥ 10.Equation ( 13) can also be extended to C-component solutions ( ≥ 2) if Equation ( 12) is substituted into Equation ( 7): One can see that Equation ( 13) is a simplified version of Equation ( 14) if C = 2 is substituted.As an example, Figure 5 shows the performance of Equation ( 14) vs. the exact Equation ( 7) for the equi-molar five-component solution.One can see a good agreement with a relative error being less than 0.17% at  ≥ 10.    1) called the "Stirling approximation" (horizontal bold line), Equation ( 7) called the "exact Boltzmann equation" (points), and by Equation ( 13) called the "de Moivre approximation" (line mostly across the points).The vertical dotted line corresponds to N = 10.

The Partial Configurational Entropies of Components of Nano-Solutions in the de Moivre Approximation
According to general thermodynamic rules, partial quantities can be derived from integral quantities using any two of the following three equations [36][37][38][39][40]: where , (J/mol•K) is the partial configurational entropy of component A and , (J/mol•K) is the partial configurational entropy of component B. Substituting Equation (13) into Equations ( 15)-( 17), the following equations follow for the partial configurational entropies of the two components: Equations ( 18) and (19) have been extended to multi-component systems using Equation ( 14): Equation ( 20) leads to Equation ( 14) when substituted into the following generally valid equation:

The Partial Configurational Entropies of Components of Nano-Solutions in the de Moivre Approximation
According to general thermodynamic rules, partial quantities can be derived from integral quantities using any two of the following three equations [36][37][38][39][40]: where S A,conf (J/mol•K) is the partial configurational entropy of component A and S B,conf (J/mol•K) is the partial configurational entropy of component B. Substituting Equation (13) into Equations ( 15)-( 17), the following equations follow for the partial configurational entropies of the two components: Equations ( 18) and ( 19) have been extended to multi-component systems using Equation ( 14): Equation ( 20) leads to Equation ( 14) when substituted into the following generally valid equation:

Situations When the de Moivre Approximation Must Be Used
When equilibrium calculations are performed for macroscopic bulk solutions, the Stirling approximation Equation ( 1) is sufficient, and the de Moivre approximations Equations ( 13), (14), and ( 18)-( 20) are not needed, as they provide a negligible difference from the Stirling approximation.The corrections of the de Moivre approximations are needed in the following two cases: i.
The first case is the bulk calculations below the size of the solution phase, when the integral entropies calculated by the Stirling approximation lead to more than 0.1% relative error compared to the de Moivre approximation (in this case, this error cannot be compared to the exact Boltzmann equation, as it cannot be calculated for large numbers).For example, the difference between the Stirling approximation and the de Moivre approximation becomes smaller than 0.1% for Figure 4a,b and Figure 5 at N ≥ 7000, N ≥ 14, 000, and N ≥ 10, 000, respectively.Thus, the de Moivre approximation should be used whenever the number of atoms is below 15,000.Let us take the average molar volume of a metal (10 cm 3 /mol), leading to the volume of the phase 2.5 × 10 −25 m 3 .If it is a cubic phase, its side length equals 6.3 nm.For molecular solutions, this critical size will be larger, as the molecules are larger than the atoms.ii.
The second case is when surface or interface equilibrium calculations are performed, being routinely used in nano-equilibrium calculations.In this case, the de Moivre approximation should be used whenever the surface/interface region contains less than 15,000 atoms.Suppose a single layer of atoms along the surface and the average molar surface area of 45,000 m 2 /mol.Then, 15,000 atoms will cover a 1.2 × 10 −15 m 2 surface area.If this phase is cubic, its side length is 13.7 nm.So, we can conclude that when the diameter of a nano-phase is below 15 nm, the de Moivre approximation should be used instead of the Stirling approximation.
For molecular solutions, this critical size will be larger, as the molecules are larger than the atoms.
The last term of Equations ( 18)-( 20) leads to incorrect values when they are used for solutions containing less than one atom per component.Thus, all the above equations should be used only at: Equation ( 22) provides a reasonable limit, as there is no physical sense to conduct any calculation beyond it.

Conclusions
It is demonstrated that for nano-phases smaller than about 15 nm (in diameter), the Stirling approximation leads to a significant error in the molar entropy of solutions compared to its exact equation.This deviation increases with decreasing number of atoms/molecules in the phase, with increasing deviation of the composition of the solution from its equimolar value, and with increasing number of components in the phase.A new de Moivre approximation is suggested in this paper, which is able to correct the Stirling approximation as a function of the number of atoms/molecules in the solution and its composition for C-component solutions.The new de Moivre approximation is a continuous function of the number of atoms/molecules in the solution and its composition, and it can be easily calculated without running into the problem of too-large numbers, as is the case for the exact Boltzmann equation.The de Moivre approximation (as any other calculation) should be used only for cases when there is at least one atom of each component in the nano-solution.

Figure 1 .
Figure 1.The dependence of the integral molar configurational entropy of a binary, equimolar solution on the number of atoms/molecules in it, calculated by Equation (1) called the "Stirling approximation" and Equation (6) called the "exact Boltzmann equation" (C = the number of components).

Figure 1 .
Figure 1.The dependence of the integral molar configurational entropy of a binary, equimolar solution on the number of atoms/molecules in it, calculated by Equation (1) called the "Stirling approximation" and Equation (6) called the "exact Boltzmann equation" (C = the number of components).

Figure 2 .
Figure 2. The relative error in integral molar configurational entropy values of binary solutions as function of the number of atoms/molecules calculated by Equation (9) (numbers on the curves are the mole fractions of any of the component in the solution).

Figure 3 .
Figure 3.The relative error in integral molar configurational entropy values of equimolar solutions as function of the number of atoms/molecules calculated by Equation (9) (numbers on the curves equal the number of components in the solution).

Figure 2 .
Figure 2. The relative error in integral molar configurational entropy values of binary solutions as function of the number of atoms/molecules calculated by Equation (9) (numbers on the curves are the mole fractions of any of the component in the solution).

Figure 2 .
Figure 2. The relative error in integral molar configurational entropy values of binary solutions as function of the number of atoms/molecules calculated by Equation (9) (numbers on the curves are the mole fractions of any of the component in the solution).

Figure 3 .
Figure 3.The relative error in integral molar configurational entropy values of equimolar solutions as function of the number of atoms/molecules calculated by Equation (9) (numbers on the curves equal the number of components in the solution).

Figure 3 .
Figure 3.The relative error in integral molar configurational entropy values of equimolar solutions as function of the number of atoms/molecules calculated by Equation (9) (numbers on the curves equal the number of components in the solution).

Figure 4 .
Figure 4.The dependence of the integral molar configurational entropy of a binary solution on the number of atoms/molecules in it, calculated by Equation (1) called the "Stirling approximation" (horizontal bold line), Equation (6) called the "exact Boltzmann equation" (points), and by Equation (13) called the "de Moivre approximation" (line mostly across the points).The vertical dotted line corresponds to N = 10.(a) corresponds to the equimolar solution, while the bottom figure (b) corresponds to the solution with 0.1 or 0.9 mole fractions of the components.

Figure 4 .
Figure 4.The dependence of the integral molar configurational entropy of a binary solution on the number of atoms/molecules in it, calculated by Equation (1) called the "Stirling approximation" (horizontal bold line), Equation (6) called the "exact Boltzmann equation" (points), and by Equation (13) called the "de Moivre approximation" (line mostly across the points).The vertical dotted line corresponds to N = 10.(a) Corresponds to the equimolar solution, while the bottom figure (b) corresponds to the solution with 0.1 or 0.9 mole fractions of the components.

Figure 5 .
Figure 5.The dependence of the integral molar configurational entropy of the equimolar five-component solution on the number of atoms/molecules in it, calculated by Equation (1) called the "Stirling approximation" (horizontal bold line), Equation (7) called the "exact Boltzmann equation" (points), and by Equation (13) called the "de Moivre approximation" (line mostly across the points).The vertical dotted line corresponds to N = 10.

Figure 5 .
Figure 5.The dependence of the integral molar configurational entropy of the equimolar five-component solution on the number of atoms/molecules in it, calculated by Equation (1) called the "Stirling approximation" (horizontal bold line), Equation (7) called the "exact Boltzmann equation" (points), and by Equation (13) called the "de Moivre approximation" (line mostly across the points).The vertical dotted line corresponds to N = 10.