One of the main reasons for damage and shortened service life in reinforced concrete (RC) structures, particularly in abrasive coastal conditions, is chloride-induced rebar corrosion. Accurately predicting the onset of corrosion is crucial for assessing structural reliability and planning effective maintenance. This paper proposes a finite element model to predict the onset of corrosion for a two-dimensional diffusion problem. The model is based on Fick's Second Law of Diffusion and employs the weighted Galerkin residual method to solve the partial differential equation. Parameters influencing the diffusion process and the chloride threshold concentration for corrosion are analyzed in detail. A computational program is developed using Matlab code, utilizing bilinear rectangular elements, to simulate chloride ion ingress and determine the onset of corrosion. The calculated results from the model are compared with the Life365 program, showing acceptable reliability, particularly under saturated humidity conditions. The study also analyzes the influence of material, environmental, and structural parameters on the onset of corrosion. Finally, the proposed model has significant implications for infrastructure asset management, enabling predictive maintenance planning, optimizing life-cycle costs, and enhancing structural service life.