Simulation of magnetorehological fluids