update residuals for real gas