Simulation of rheological properties of polymeric fluids