An analytical expression for temperature in a thermodynamically consistent model with a Mie-Gruneisen equation for pressure