Estimation of the polytropic index for in-cylinder pressure prediction in engines