Segregation of alloying elements in passive systems—II. Numerical simulation