A polytropic model for the solar wind