Solve for rho(T,s) instead of p(T,s) in inner loop