Simulation of the magnetization dynamics of diluted ferrofluids in medical applications