Calculation of temperature using Gibbs free energy equation