An Algorithm for Thermodynamic Parameter Optimization: Application to the Martian Mantle. (11th May 2021)