s
Two microscale numerical models are developed in this work using a moving-mesh approach to investigate the growth process of pitting in different iron phases and the corrosion prevention capability of polyaniline (PANi) on steels. The distributions of corrosion potential and current in the electrolyte-coating-steel system are computed to evaluate the anti-corrosion ability of PANi. The arbitrary Lagrangian–Eulerian approach was used to accomplish the continuous remesh process as was needed to simulate the dynamic growing forefront of the modeled pitting domain. Experimental validation of the numerical models was conducted using the technique of scanning kelvin probe force microscopy (SKPFM). The SKPFM-scanned surface topography and Volta potential difference exhibit comparable results to and thereby prove the numerical results. The potential distribution in the electrolyte phase of the validated models shows that the corrosion pit grows faster in the epoxy-only-coated steel than that in the PANi-primer-coated steel over the simulation time; also, the corrosion pit grows faster in the ferrite phase than in the cementite phase. The simulation results indicate that the epoxy-only coating lost its anti-corrosion capability as the coating was penetrated by electrolyte, while the PANi-based coating can still protect the steel from corrosion after the electrolyte penetration. The models developed in this work can be used to study the mechanisms of pitting corrosion as well as develop more effective corrosion prevention strategies for general metallic materials.