Thermodynamic analysis of hydrogen solubility in graphite