A theoretical treatment of changes in energy and entropy of solids caused by additives or impurities in solid solution