Moved dm. Now use P_new and T_new to calc rho.