Introduction

Low-carbon steel is widely manufactured into a variety of building components1,2, containers, sheets, bars, etc. Because of its good cold formability and excellent welding performance, low-carbon steel occupies a large proportion of many steel products. However, in service, low-carbon steel undergoes constant chemical or electrochemical corrosion in the presence of surrounding media. Trillions of dollars are lost globally each year due to corrosion. Therefore, appropriate anti-corrosion measures in the current steel industry are urgently needed to solve the problem, i.e., to reduce the corrosion of low-carbon steel, to clarify the corrosion mechanism of low-carbon steel, and to predict the life of low-carbon steel.

In order to clarify the corrosion dynamics of low-carbon steel and the protection mechanism of corrosion product film, people have done a large number of salt spray accelerated corrosion tests (SST), burst sunscreen tests, immersion tests, etc., and accumulated a large number of corrosion data. The corrosion mechanism is discussed in depth. However, to study the corrosion mechanism of carbon steel through specific experiments, the consumption of samples is very large, which requires a lot of labor power, material resources, and financial resources. So researchers are committed to developing research methods to solve this problem. With the continuous development of computer networks, it is believed that it will be an effective method to save time and effort if the simulation method is introduced into the corrosion mechanism research of carbon steel. At present, some researchers have carried out corrosion simulation research on other kinds of steel and obtained good results. In the current corrosion simulation study, the focus of the study is mainly on the growth process of corrosion pits. Caprio et al.3,4,5 carried out the simulation exploration of the growth law of single corrosion pits on the surface of metal materials, to explore the development of different types of corrosion pits by means of regionalization of pits. Cui et al.6,7,8, when simulating the corrosion evolution process of Q345 steel under the SST using the CA model, found that the emergence of corrosion pits can be regarded as a non-Poisson distribution process, the growth of corrosion pits can be regarded as a log-Gaussian distribution, and the corrosion depth of corrosion pits depends on the magnitude of the probability of downward movement of corrosive cells. However, there is no clear reference for the corrosion pit development process of carbon steel now. This paper established a 3D space corrosion model by using the cellular automata method and combined it with test data to find the optimal corrosion model parameters. The corrosion mechanism of carbon steel under the SST was investigated by this method.

Results and discussion

Salt-spray experiment

Figure 1a shows the rate of corrosion weight loss of carbon steel under the SST, The method of calculation is shown in Eq. (1). Some previous studies have shown that the corrosion status in the neutral SST for 1 day (24 h) is equivalent to that in the natural environment for 1 year. Therefore, the maximum test period is set at 15 days (360 h), which is equal to the corrosion status after 15 years. Observing Fig. 1a, it can be found that the corrosion weight loss curve is a kind of “step-type” upward process. In the early stage of corrosion, the corrosion weight loss rate is a linear increase, and then the weight loss rate slows down; at 168 h suddenly accelerates, and at 192 h slows down; at 216 h the third acceleration begins and then slows down; the fourth acceleration was at 288 h. This “step-type” change in the rate of corrosion weight loss is very different from the rate of corrosion weight loss of other research (e.g., alloy steels9,10,11,12, carbon steels13,14, weathering steels15, or aluminum alloys16,17,18, etc.) that follow the “S-shaped” trend was studied in early studies. This difference may be a result of the test period is short, which tested only the first stage and did not observe regular changes in the later stages. In order to clarify the essence, the morphology of the pits and rust layers of the test steel is observed and analyzed in detail in this paper.

Fig. 1: Analysis of Corrosion weight loss rate and macro rust layer.
figure 1

a Rate of Corrosion weight loss of carbon steel under the SST, b Macroscopic morphology (scale bars: 0.5 cm) of the rust layer of carbon steel under the SST.

Figure 1b shows the macroscopic morphology of the rust layer of carbon steel under the SST at 192 h, 216 h, 240 h, and 288 h. It can be clearly seen that the rust layer is relatively dense at 192 h, loose and shedding off at 216 h, and the rust layer became relatively dense again, after 240 h, it became loose and shedding off again after 288 h. The reason for this periodic shedding of the rust layer is speculated to be that, as corrosion proceeds, the accumulation of the rust layer isolates the steel matrix from oxygen and water, slowing down the corrosion process. However, under the influence of gravity, the thickening rust layer will fall due to the insufficient mechanical bite of the rust layer on the metal matrix. At the same time, a microcell effect will occur at the gap between the dense rust layer and the metal matrix19, and the newly generated corrosion products will top off the rust layer above due to volume expansion. Under the two actions, the rust layer shows periodic shedding, and the steel matrix is exposed to corrosive media, which accelerates the corrosion process. This analysis explains the reason for the “step-type” change in the rate of corrosion weight loss of carbon steel under the SST.

$${\rm{Rate}}\, {\rm{of}}\, {\rm{corrosion}}\, {\rm{weight}}\, {\rm{loss}}=\displaystyle\frac{{\rm{initial}}\,{\rm{sample}}\,{\rm{weight}}-{\rm{corroded}}\,{\rm{and}}\,{\rm{descaled}}\,{\rm{sample}}\,{\rm{weight}}}{{\rm{surface}}\,{\rm{area}}\,{\rm{of}}\,{\rm{the}}\,{\rm{sample}}}$$
(1)

It has been shown that the corrosion mechanism of carbon steel consists of a series of electrochemical and passivation reactions20,21,22, see Fig. 2a. The corrosion products undergo a constant evolution from the loose γ-FeOOH to the dense α-FeOOH. Figure 2b is the XRD curves of rust layer products with different corrosion periods. Through the physical phase analysis of the rust layer products, it can be seen that the compositions of the rust layer products after different corrosion periods are similar, and they are mainly γ-FeOOH, and there are also a small amount of α-FeOOH, β-FeOOH, and Fe3O4. These large amounts of γ-FeOOH corrosion products are loose and easy to shed. When the mechanical bite of the surface of the metal matrix for the rust layer is not enough to support the quality of the rust layer, the rust layer will shed in large areas. The mechanical bite force of the metal matrix for the rust layer is related to the roughness of the metal matrix surface. In order to clarify the change in the roughness of the metal matrix surface, the pit morphology of the metal matrix surface is analyzed in the next section.

Fig. 2: Mechanism of rust layer evolution and shedding.
figure 2

a Corrosion mechanism of carbon steel20. b XRD curves of rust layer products. c SEM image and EDS (scale bars: 50 μm) analysis of the cross-section of the rust layer of Carbon Steel under the SST. d Schematic of the rust layer shedding process.

Under the SST Usually, the structure of the rust layer and the distribution of ions in the rust layer will indirectly reflect the corrosion of the material. The loose structure will provide channels for corrosive media. The distribution of corrosive ions indicated the corrosive environment in which the metal base body is located and what it will face in the future. This information is an important basis for our research on corrosion mechanisms. In this section, a representative salt spray corrosion time was selected and the rust layer of the sample at that time was observed as shown in Fig. 2c.

Through EDS detection and analysis of the rust layer, it can be concluded that the rust layer composition of the samples from three periods is mainly composed of oxides or oxidized hydrates of iron and manganese. The diffusion trend of manganese element is characterized by a significant outward concentration gradient attenuation from the metal matrix, mainly concentrated inside the rust layer, To some extent, it increases the density of the rust layer19 and reduces the diffusion rate of corrosive ions. under the SST, Cl- is an important factor for corrosion acceleration, comparing the thickness of the rust layer and the distribution of Cl- in 120 h, 192 h, and 216 h, the rust layer in 120 h is thinner, and the concentration of Cl- is higher in the outer edge line of the rust layer. and the outer surface of the rust layer plays the role of a “wall”, which can effectively prevent Cl- entry into the interior of the rust layer. The rust layer at 192 h became loose and there were obvious cracks, Cl- was mostly concentrated in the interior of the rust layer. This may be because the cracks in the rust layer caused a large influx of Cl- and further spread. At 216 h, the rust layer becomes dense and the Cl- concentration inside the rust layer is higher than at 120 h and lower than at 192 h. The reason for this phenomenon may be due to the continuous accumulation of the rust layer, coupled with the change in the composition of the internal rust layer making the Cl- distribution gradually homogenized.

The rust layer will roughly show three stages in the growth process, see Fig. 2d. Possible reason for the rust layer shedding is: (1) the loose rust layer will shed due to gravity being greater than the mechanical bite force. (2) A microcell effect occurs below the dense rust layer, which produces loose corrosion products that will cause the top of the rust layer to shed.

Figure 3a shows the surface morphologies of the samples. The surface of the sample corroded for 120 h was observed with many single big corrosion pits, which of depth is relatively small and relatively flat, and there was no obvious salt residue; the surface of the sample for 192 h, the pit area decreased, the tendency of multiple corrosion pits to fuse and the corrosion traces are obvious; the surface of the sample for 216 h showed a state of uneven corrosion, as shown in the areas A, B, and C. Areas B and C are relatively flat, allowing the rust layer products to easily shed; The pits in area A are smaller, it is morphology was similar to a “honeycomb”, showing a strong pitting phenomenon, and indicating that a microcell effect occurred under the dense rust layer, which corresponds to the macroscopic morphology analysis of the rust surface.

Fig. 3: Pits morphology.
figure 3

a SEM images (scale bars: 10 μm) of corrosion pits and pits of Carbon Steel under the SST. b 3D morphology (scale bars: 500 μm) of corrosion pits of Carbon Steel under the SST. c Carbon Steel SEM image (scale bars: 500 μm) of 2D cross-section of corrosion pits under the SST.

Based on the above analysis, it was found that the morphology of the surface pits, as corrosion progressed, showed periodic changes. The first stage is the pit emergence period, which is mainly characterized by the damage of the oxide layer on the surface of the metal matrix, developing in the form of pitting; The second stage is the corrosion transition period, in this period the oxide layer is damaged. But the rust layer grows rapidly and gradually covers the surface of the metal matrix. With the continuous thickening of the rust layer, it has a protective effect on the metal matrix, and the corrosion rate decreases. The third stage is the periodic shedding of the rust layer, this stage is the periodic shedding of the rust layer makes the local steel matrix contact with oxygen and water, resulting in periodic corrosion acceleration. In this paper, the 3D morphology and 2D cross-sectional of the pit are analyzed and the roughness of the metal matrix is quantified.

Figure 3b shows the 3D morphology of the pit development of Carbon Steel under different salt spray environments. At 120 h, it is the pit emergence period, the depth of the pit is relatively shallow and the pit exists independently, and the maximum depth is 26.9 μm; At 192 h, it is the corrosion transition period, the depth of the pit is the deepest and the fusion between the pits begins, and the maximum depth is 51.6 μm; At 216 h, it is the corrosion acceleration period, the pit depth becomes slightly shallower compared to 192 h, and the maximum depth is 40.5 μm. Changes in the depth of pits can be a side effect of changes in the surface roughness of the steel. The greater the depth of the pits, the greater the roughness. According to the changes in the depth of pits with the increase of the test period, it can be found that the depth of pits is first increasing and then decreasing. It means that the roughness is also first increasing and then decreasing. At 216 h, the depth of the pit reduced, and the roughness went down, which led to the rust layer shedding and the corrosion accelerating.

Figure 3c shows the random 2D cross-sectional morphology of the test steel after different salt spray corrosion times. In order to compare the priority of development in the width of the pithead and the depth of the pit, the depth-to-diameter ratios of the samples were calculated for three time periods, 120 h, 192 h, and 216 h. And take the most obvious pit size among all specimens that the ratios were 22.5/142.5, 20/122.5, and 57.14/520, namely 0.158, 0.163, and 0.110, which were all far less than 1. From the analysis of the pit size, the increase in the pit depth is relatively slow. The development of the pit is mainly an expansion of the pithead area, and the corrosion mechanism is dominated by overall corrosion, and there will be slight differences in different corrosion periods due to changes in the local corrosion environment. The depth-to-diameter ratio of the pit is consistent with the 3D morphology results, showing a tendency that first increases and then decreases, which again illustrates the reduction in the roughness of the sample surface that occurs at 216 h.

Therefore, the analysis of the 3D and 2D morphology of the pit derives two conclusions:(1) The corrosion mechanism in carbon steel is full-scale corrosion with an obvious expansion of the pithead area and a less obvious increase of the pit depth; (2) The corrosion rate is controlled by the rust layer shedding mechanism. When the fusion of the local pits, the surface of the metal substrate becomes flat, the mechanical bite for the rust layer is reduced (i.e., the roughness of the surface of the metal matrix is reduced), and at last, the rust layer is shed. A new corrosion cycle begins. Ultimately corrosion rate curves show a “step-type”.

Analysis of the rate of corrosion weight loss thickness curve, surface morphology, and rust layer morphology under the SST. It is concluded that the corrosion behavior of carbon steel under the SST is determined by the evolution of the pits and the shedding of the rust layer. The destruction of the oxide film led to the formation of early pits. Next, the pits continue to develop (lateral development is the main, longitudinal development is supplemented), resulting in the surface area of the steel matrix always in a dynamic change. The change in the surface area of the steel matrix determines the change in the roughness of the surface of the steel matrix (the roughness of the surface of the steel matrix is used to determine the size of the rust layer of the mechanical bite force). With the continuous development of pits (lateral development is the main, longitudinal development is supplemented), the roughness of the steel matrix surface increases and then decreases, and when the roughness reaches a certain value, the probability of the rust layer dislodging increases. The corrosion rate shows a periodic accelerated behavior with the periodic shedding of the rust layer. This mechanism provides a more comprehensive and effective modeling mechanism for subsequent numerical simulations of the corrosion of carbon steel under the SST. For this reason, in the numerical simulation modeling process below, this paper adds the discovered mechanism of rust layer shedding. This has increased the number of modeling mechanisms for corrosion to three (i.e., mechanism of oxide film shedding, mechanism of pit evolution, and mechanism of rust layer shedding).

CA numerical simulation

In the comparison of the weight loss data of test corrosion with the CA simulated corrosion (Fig. 4), it can be found that there is a less high fitting degree in the early stage, but in the middle and late stages, the fitting degree is high. The overall fitting degree reaches 90%. Through the test result and simulated curve’s analysis contrast, the ratio of simulation steps and SST duration is 9.72:1. Thus the CA model can effectively simulate the real-time corrosion process. It provides corrosion life prediction for carbon steel.

Fig. 4
figure 4

Comparison of the 360 h of test corrosion weight loss data with the 3500 steps of CA simulated corrosion weight loss data.

Figure 5a shows the 3D surface morphology of the metal matrix obtained by the CA simulation under the parameters λ = 0.6, k1 = 0.3, k2 = 0.2. According to the ratio of 10.42:1, 125 steps, 250 steps, 750 steps, 1250 steps, 2050 steps, 2250 steps, and 3000 steps correspond to 12 h, 24 h, 72 h, 120 h, 196 h, 216 h, and 288 h corrosion periods, respectively. In order to accurately simulate the real surface of the metal matrix, initial pits were randomly set up for the surface of the metal substrate in the CA simulation, as shown in Fig. 5a 0 steps; Fig. 5a 125 steps shows the expansion of initial pits and the emergence of a small number of new pits; Fig. 5a 250 steps and Fig. 5a 750 steps show the emergence of a large number of new smaller pits. Comparing the results of the runs at 250 steps with different thresholds is shown in Table 1. With the increase of the threshold, it was found that the number of new pits emerging decreased significantly, but the maximum depth of the pits was not different significantly. The goodness of fit between the early simulation and test corrosion weight loss curves is the highest when the threshold is 5. At this stage, the corrosion mechanism is dominated by the mechanism of oxide film damage, which produces pits; In Fig. 5a 1250 steps and Fig. 5a 2050 steps, the corrosion area of the metal matrix increases significantly. At this stage, the pits are continuously generated and fused, the corrosion on the surface of the metal matrix is extremely heterogeneous, and there is a clear acceleration of corrosion. Corrosion is controlled by the evolution mechanism of the pit; In Fig. 5a 2250 steps and Fig. 5a 3000 steps, the fusion phenomenon in the pit of the local area is obvious. The pithead area is extended, the surface of the metal matrix is flat, and the corrosion products can shed easily. Corrosion is controlled by the mechanism of pit evolution and the mechanism of rust layer shedding.

Fig. 5: Pit morphology of CA model.
figure 5

a 3D surface of metal. b 2D cross-section of the pit.

Table 1 Statistics of data results for different numbers of contact times of the oxide film with Cl at 250 steps for CA

Figure 5b shows a randomly intercepted 2D cross-section of the pit with parameters λ = 0.6, k1 = 0.3, and k2 = 0.2. By observing the 2D pit map, it can be discussed the mechanism of pit development and the mechanism of rust layer shedding in the model. Comparison of Fig. 5b 0 steps and Fig. 5b 125 steps clearly shows that the pit is developing horizontally; Fig. 5b 250 steps and Fig. 5b 750steps show the emergence of new pits; Fig. 5b 1250 steps and Fig. 5b 2050 steps shows the beginning of a period of accelerated corrosion, during which new pits continue to emerge and begin to fuse with old pits; Fig. 5b 2250 steps and Fig. 5b 3000 steps show that the surface roughness of the metal matrix has been significantly reduced, the pits are almost completely fused, and the surface of the metal substrate tends to be flat. Therefore, the results calculated with parameters λ = 0.6, k1 = 0.3, and k2 = 0.2 also show that the method of pitting evolution in carbon steel is an obvious expansion of the pithead area and a less obvious increase of the pit depth; Roughness will be reduced by the obvious expansion of the pithead area, which promotes the shedding of corrosion products and accelerates the corrosion rate.

Figure 6a shows the 3D development of the rust layer. In the CA system, the development and shedding of the rust layer depends on the development of pits on the metal matrix surface (i.e., the roughness of the metal matrix surface). Combining Figs. 5b and 6a, it can be clearly seen that: at 750 steps the pits start to develop and emerge, the rust layer is relatively thin and the weight is light, so the rust layer is not easy to shed off; at 1250 steps the development of pits enters an explosive period, new pits are emerging and old pits are developing, meanwhile, the rust layer thickens and the weight increases. Though the surface of the metal matrix is relatively rough (i.e., the mechanical bite force for the rust layer is larger), the rust layer still does not easily shed off; at 2050 steps, the pits begin to enter the full-scale fusion stage, resulting in a reduction of the mechanical bite force on the surface of the metal matrix. At the same time, because a large number of rust layers accumulate, resulting in the probability of the rust layer shedding increases significantly; at 2250 steps, the rust layer becomes significantly thinner. These confirm the test speculations of the rust layer shedding mechanism.

Fig. 6: The rust layer diagram of CA model and the change of component content.
figure 6

a 3D development of rust layer. b Change of the number of corrosion products and oxygen content on the surface of the metal matrix as the increase of run steps.

Figure 6b shows Change of the number of corrosion products and oxygen content on the surface of the metal matrix as the increase of run steps The periodic accumulation and shedding of corrosion products can be seen visually. Before the 1000 step, the corrosion is controlled by a combination of the mechanism of oxide film shedding and the mechanism of pit evolution, at this stage corrosion products accumulate as the corrosion proceeds; Between the 1000 and 3500 steps, the development of corrosion is controlled by the mechanism of pit evolution and the mechanism of rust layer shedding. The oxide film on the surface of the metal substrate is almost entirely damaged, and the corrosion products enter into a periodic accumulation and shedding. This also confirms that CA can provide an accurate prediction of rust layer shedding for carbon steel under the SST. The change curve of oxygen content on the surface of the metal matrix as the increase of run steps, which reflected the effect of rust layer shedding on corrosion. At 2000 and 3000 steps, corrosion develops slowly due to the continuous accumulation of corrosion products resulting in the isolation of the metal matrix surface from oxygen. At step 1500 and step 3200, The corrosion accelerates due to the shedding of corrosion products resulting in the re-contact of the metal matrix surface with oxygen; This is a lateral reflection of the influence of the shedding mechanism of the rust layer on corrosion.

From the results of the above simulation calculations, the simulation of the corrosion behavior of carbon steel by CA established in this paper is completely effective and feasible. It shows us that carbon steel follows different mechanisms of corrosion in the early, middle, and late stages of corrosion. In the early stage of corrosion, it is controlled by the mechanism of pit evolution; in the middle stage of corrosion, it is controlled by the mechanism of oxide film shedding and the mechanism of pitting evolution; and in the late stage of corrosion, it is controlled by the mechanism pitting evolution and mechanism of rust layer shedding. Meanwhile, the corrosion simulation calculations used in this paper can provide an effective tool for life prediction of carbon steel.

In this paper, the corrosion process of Carbon Steel was studied by SST and CA. The oxide film shedding mechanism, the pits evolution mechanism, and the rust layer shedding mechanism were established and parameterized. By comparing and analyzing the rate of corrosion weight loss curves, the surface of the metal matrix, pit cross-section, and rust layer shedding between the SST and the CA, the following was concluded:

  1. 1.

    Combined with the analysis of the surface of pit morphology and rust layer cross-section morphology of carbon steel under the SST, it is concluded that the corrosion behavior of carbon steel, in addition to being controlled by the mechanism of oxide film shedding and the mechanism of pit evolution, is also controlled by a new corrosion mechanism, i.e., the mechanism of rust layer shedding.

  2. 2.

    3D carbon steel corrosion model was established based on the CA, and three corrosion mechanisms were used in the simulation calculations. The mechanism of oxide film shedding is based on the effective threshold of contacts of salt ions to the oxide film as a determination criterion for shedding; the mechanism of pit evolution is established by setting the probability of corrosion in the upper and lower regions of the pit, deciding the advantage development of the pits in horizontal or vertical directions; the mechanism of rust layer shedding is controlled by the roughness ‘e’ (i.e., the mechanical bite force of the surface of the metal matrix on the rust layer is used to control the probability of rust layer shedding), it is regarded as the judgment of rust layer shedding, which gives a “step-type” trend to the rate of corrosion weight loss.

  3. 3.

    By comparing the simulated and tested corrosion loss thickness data, the time ratio between the experiment and the simulation was determined. By analyzing the results of the simulation calculations, the corrosion mechanism of carbon steel at different stages under the SST has been established. In this paper, this way of using simulation results to study the corrosion mechanism of carbon steel under the SST opens up horizons for the study of corrosion mechanisms for other materials. Meanwhile, by optimizing the parameters, the CA-based corrosion model for carbon steel is obtained, which can accurately predict the service life of carbon steel under longer corrosion time.

Methods

Experimental method

Carbon Steel, as the test material, is produced by China Baowu Iron and Steel Group. Table 2 shows its chemical composition of it. The samples were washed with ethanol, and dried by a blower. In accordance with the executive standard of “Corrosion Test in Artificial Atmosphere-Salt Spray Test”, the samples were carried under the SST chamber of model HJ-200. This experiment set up 6 parallel control groups, and the surface of the sample was cleaned with anhydrous ethanol, then dried and placed under the SST chamber. The temperature of the corrosive environment is 35 ± 1 °C, the intermittent spray time is 0.5 h, the NaCl solution concentration is 5%, the temperature of the pressure barrel is 47 ± 1 °C, the air pressure is 0.1–0.12 Mpa, the pH of the aqueous solution in the salt box environment is stable at around 6.5–7.2. The sampling period is 24 h, and the total cycle duration is 360 h.

Table 2 Chemical composition of experimental materials (%)

After the SST is completed, first, use a rust remover (hydrochloric acid + water + hexamethylene tetramine, with a ratio of 3:7 hydrochloric acid and water) to clean three groups of parallel control samples in an ultrasonic cleaning machine at a constant temperature in a 30 °C water bath for 3 min. Then rinse with a large amount of water. Next, transfer the sample to anhydrous ethanol and clean it with an ultrasonic cleaning machine for 1 min. Finally dried in a drying oven, and calculated the corrosion change data of the sample before and after the test, using a vernier caliper and FA2004 electronic balance. The surface of the sample was at salt spray cycles of 120 h, 168 h, and 240 h observed by a Sigma500 SEM.

The rest three parallel samples with rust layers were cleaned and dried. It is cold-mounted with an epoxy resin. After curing at room temperature, they were sanded and polished. Finally, the rust layer cross-sections of the samples at salt spray cycles of 120 h, 192 h, and 216 h time were observed by Sigma500 SEM.

Corrosion mechanism of CA model

Mechanism of oxide film damage

In order to simulate the corrosion of carbon steel in a realistic way, an oxide film shedding mechanism is established for the cellular automata system, which is used to simulate the early corrosion of carbon steel. In the early stage of corrosion, the corrosive liquid film can be isolated by the oxide film of test steel. As shown in Fig. 7a, the gray part is the steel matrix, the red part is the oxide film, and the yellow part is the salt ions in the corrosive liquid film. However, as corrosion continues, the salt ions in the corrosive liquid film continue to damage the oxide film, eventually leading to oxide film shedding. The metal matrix is exposed to water and oxygen, which produces some pits. Therefore, the situation of oxide film damage determines the corrosion rate in the early stage, which shows a linear law.

Fig. 7: Corrosion mechanism diagram.
figure 7

a Modeling diagram of 2D cross-section. b Schematic diagram of spatial erosion crater area division5.

In the CA system, there is a threshold that when exceeded, the oxide film cell will be replaced as an empty cell, resulting in the generation of pit. Through the continuous adjustment of the threshold, when the threshold is 5, the simulation rate is closest to the test rate of corrosion weight loss at the early stage.

Mechanism of pit evolution

The probability of corrosion at a point in the pit depends on the location of the point in the pit, which is determined by three parameters, λ, K1, and K2. λ defines two areas in the pit with different probabilities of corrosion, K1 and K2 are the probabilities of corrosion in the two areas, respectively5. As shown in Fig. 7b, it was assumed that the location of a point in the pit where corrosion will occur is H - Hmin, the maximum depth of the pit where the point is Hmax - Hmin, and the ratio of the two is the pit proportional parameter h as shown in Eq. (2). When 0 < h < λ is defined as region I, the corrosion probability of iron cells within its range is K1, and when λ < h < 1 is defined as region II, the corrosion probability of iron cells within its range is K2. Three parameters, K1 and K2, determine the two forms of development of the pit: (1)The development of pits in carbon steel is a total corrosion mechanism with an obvious expansion of the pithead area and a less obvious increase of the pit depth;(2)The development of pits in carbon steel is a total corrosion mechanism with a less obvious expansion of the pithead area and an obvious increase of the pit depth; The values of λ, K1, and K2 can be any of the numbers (0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, and 0.9), and the three parameters were arranged and combined. A total of 729 trials were conducted with the full factorial test method and the results were counted. It is concluded that the simulation results of the pit development are most similar to the test results for λ = 0.6, k1 = 0.3, and k2 = 0.2.

$$\text{h}=\frac{\text{H}-\text{H}\min }{\text{H}\max -\text{H}\min }(0\le {\rm{z}}\le 1)$$
(2)

Mechanism of rust layer shedding

The shedding of the rust layer depends on the roughness of the metal matrix surface and the weight of the rust layer. Conclusions from the experiments in Section I: In the early and middle periods of the Carbon Steel under the SST, the corrosion pits grow more and produce a larger mechanical bite force that can withstand the weight of the larger rust layer; In the middle and late periods of the test, the pits on the surface of the metal matrix surface begin to fuse, showing a planar structure, which is not beneficial for the rust layer to adhere to the surface of the metal matrix, resulting in shedding or cracking of the rust layer. Therefore, roughness “e” is introduced to determine the time and probability of rust layer shedding. As corrosion proceeds, the pits continue to develop and fuse, which leads to an increase in the surface area “s” of the metal matrix. The roughness “e” can be defined as the ratio of the surface area “s” of the metal matrix after corrosion to the initial surface area “S” (i.e., when it is absolutely smooth), as shown in Eq. (3).

$$\text{e}=\frac{{\int }_{1}^{\text{n}}\text{s}}{\text{S}}$$
(3)

In the CA, the roughness “e” is defined as the proportion of the number of all iron cells on the surface of the metal matrix exposed to liquid, gaseous and rust layers in the CA to the number of cells 2500 (i.e., when it is absolutely smooth), as shown in Eq. (4). The larger the roughness “e” value, the rougher the metal matrix (i.e., the greater the mechanical bite force of the surface of the metal matrix on the rust layer). Conversely, the smaller the roughness “e” value, the smoother the surface of the metal matrix (i.e., the smaller the mechanical bite force generated by the surface of the metal matrix on the rust layer.)

$$\text{e}=\frac{{\int }_{1}^{\text{n}}\text{s}}{2500}$$
(4)

The value of roughness “e” is divided into three intervals, and in the three intervals, the probability of shedding the corrosion product cell in each running step is Pa, Pb, and Pc. After several tests, the three interval values of roughness “e” value and the probability values of Pa, Pb, and Pc in the CA are obtained by using the interval approximation method as shown in Eq. (5).

when “e” in the first interval, the rust layer shedding depends on the quality of the rust layer, the probability value of rust layer shedding Pa = 0.0001 (i.e., almost no shedding off), which represents the early stage of corrosion (i.e., pits are just beginning to emerge and develop) or the late stage of corrosion (i.e., after shedding off of the rust layer). In the first interval, the corrosion product is less likely to peel off due to the lighter quality of corrosion products, so not easy to peel off; when “e” is in the second and third intervals, the probability of rust layer shedding depends on the value of roughness “e”. In the second interval, it is the emergence and development of corrosion pits (i.e., the increase of roughness “e”). In the third interval, it is the fusion of pits (i.e., the decrease of roughness e).

$$\left\{\begin{array}{c}0.00 < {\rm{e}} < 1.70\quad{Pa}=0.0001\\ 1.70 < {\rm{e}} < 2.10\quad{Pb}=0.0150\\ 2.10 < {\rm{e}} < 3.50\quad{Pc}=0.0030\end{array}\right.$$
(5)

3D CA model

CA is a method to transform a dynamic process of continuous physics or chemistry into a simulation in which time, space, and state are discrete. Spatial interactions and temporal causality are localized for partial dynamics simulations, which can model the spatiotemporal evolution process of complex systems. Unlike general dynamical models, meta-cellular automata are not determined by strictly defined physical equations and functions but are constructed with a set of rules for model construction. The complete CA contains four basic elements: cells, cell neighbors, cell space, and evolution rules. It is defined as the equation A = A(S, N, Ld, f), where A is a system of cellular automata; S is the cells; N is a cell neighbor (including the central cell); L is the cell space and d is the dimension of the cell space; f is the evolution rule. degradation.

Cells

The basic components of CA are composed of discrete, finite-state cells. The CA model used in this paper is a 50*50*50 3D model, as shown in Fig. 8a, from the bottom up, the bright gray part with Z-coordinates 0–39 is the metal body, the red part with Z-coordinates 40 is the initial oxide film on the steel surface, and the discrete yellow part with Z-coordinates 40–50 is the liquid film environment (i.e., oxygen, water, and corrosion media) on the metal base body surface. Each coordinate point in the model is a cell, each cell has seven different states, presented as S=S (M, B, C, D, E, F, G) where M is the metal element; B is the metal ion; C is the corrosion product; D is the water element; E is the oxygen element, F is the corrosion medium, G is the empty cell. All the cells can be represented by a ternary integer matrix [Z, X, Y].

Fig. 8: CA model.
figure 8

a Steel matrix and liquid film model. b 3D Moore type. c 3D periodic type boundary conditions. d Corrosion mechanism diagram.

Cell neighbors

The neighbors are the spatial domains to be searched when the state of a particular central cell is updated, (i.e., other cells that can affect the state of the central cell). It is shown as N = N (s1, s2, …, sn), where si is the neighbor cell of the central cell and its state. There are usually two kinds of 3D neighbor models commonly used in CA, the 3D von Neumann type and the 3D Moore type, and the 3D Moore type is chosen for the CA system used in this paper as shown in Fig. 8b. Therefore, the probability that the red cell and the 26 neighboring cells exchange positions in CA is 1/26.

Cell space

The cell space is a set of grid points with certain boundary conditions. Theoretically, the cell space is infinite, but this ideal condition cannot be achieved in practical applications, and some virtual neighbors are constructed for the cells on the boundaries of this CA. The construction process uses boundary conditions. The commonly used types of neighbor boundary conditions are fixed, periodic, adiabatic, and mapped. In order to improve the simulation of the CA model in this paper, the 3D periodic boundary conditions are used. The core of periodic boundary conditions is the first and last connection. For example, the periodic boundary condition in the 2D condition, the first and the last element are neighbors of mutual; Similarly, the periodic type boundary in the 3D space can be understood as the first element and the last element in the same X/Y/Z axis direction are neighbors of mutual. As shown in Fig. 8c, the red cell is the central cell, and there are 26 real neighbors of this central cell, i.e., the orange cell and the blue cell.

Given the coordinates of the red cell in Fig. 8c (Z, X, Y), the coordinates of its 26 neighbors can be obtained by arranging and combining Z, X, Y in Eq. (5) to obtain a total of 27 coordinates. The coordinates of the 26 neighboring cells can be obtained by combining the Z, X, and Y coordinates in Eq. (6) to obtain a total of 27 coordinates. In the CA system used in this paper, the 3D periodic boundary conditions can be expressed by Eq. (7).

$$\begin{array}{l}Z+\left\{\begin{array}{l}-1\\ 0\\ 1\end{array}\right.X+\left\{\begin{array}{l}-1\\ 0\\ 1\end{array}\right.Y+\left\{\begin{array}{l}-1\\ 0\\ 1\end{array}\right.\\ \left\{\begin{array}{l}Z+1 > 50\\ Z+(-1) < 0\end{array}\right.{\rm{equals}}\,{\rm{to}}\left\{\begin{array}{l}Z+1=0\\ Z+(-1)=50\end{array}\right.\end{array}$$
(6)
$$\begin{array}{l}\left\{\begin{array}{l}X+1 > 50\\ X+(-1) < 0\end{array}\right.{\rm{equals}}\,{\rm{to}}\left\{\begin{array}{l}X+1=0\\ X+(-1)=50\end{array}\right.\\ \left\{\begin{array}{l}Y+1 > 50\\ Y+(-1) < 0\end{array}\right.{\rm{equals}}\,{\rm{to}}\left\{\begin{array}{l}Y+1=0\\ Y+(-1)=50\end{array}\right.\end{array}$$
(7)

Evolution rules

The evolution rule is a kinetic function that determines the state of the cell at the next moment based on the current state of the cell and the state of the neighboring cells. This function constructs a discrete space/time local evolution rule, which can be expressed in Eq. (8). Where Sit represents the state of a cell at a certain moment, t is the moment, and Nt is the state of the set of neighbors of a central cell at a certain moment. In short, Eq. (8) represents that the state of a central cell at the next time of unit is determined by the state of the central cell at the current moment and the state of the set of neighboring cells. Equation (8) represents only the local evolution rules of the CA system. The global evolution rule can be represented by Eq. (9), where n represents the number of all cells in the CA system.

$$\text{Sit}(t+1)=\text{Sit}(t+Nt)$$
(8)
$$\mathop{\sum }\limits_{t=1}^{t=n}\text{Sit}(t+1)=\mathop{\sum }\limits_{t=1}^{t=\text{n}}\text{Sit}(t+Nt)$$
(9)

The corrosion mechanism of carbon steel under the SST includes electrochemical corrosion and a series of passivation reactions as shown in Fig. 8d. The metal substrate and the liquid film environment are separated from the liquid film environment by an oxide film in the CA. In order to simplify the CA model, the three corrosion products α-Fe(OH)3, β-Fe(OH)3, and γ-Fe(OH)3 are uniformly set as Fe(OH)3. According to the test environment set in the liquid film layer salt concentration and oxygen concentration are 5%.

According to the corrosion mechanism diagram in Fig. 8d and the seven states of the cell, CA summarizes the evolution rules of the cell into five conversion rules, in which corrosion product one is XO2, corrosion product two is Fe(OH)2, corrosion product three is Fe(OH)3, and corrosion product four is Fe3O4.

  1. (1)

    Metal (iron) + oxygen + water → metal ion + empty cell + empty cell

  2. (2)

    Metal (trace element) + oxygen → corrosion product one + empty cell

  3. (3)

    Metal ion + oxygen + water → corrosion product two + empty cell + empty cell

  4. (4)

    Metal ion + oxygen → corrosion product three + empty cell

  5. (5)

    Corrosion product two + corrosion product three → corrosion product four + empty cell

To simplify the CA model, the number of cells of the reactants and the number of cells of the reaction products are the same in the five conversion rules, and if the number of cells of the reaction products is less than the number of cells of the reactants, the empty cells are replaced the position of the vanishing cells. There are three solutions for the empty cell, as follows:

  1. (1)

    Corrosion products may be produced at a position of hanging in the liquid, and corrosion products are solid, so set up for its fall mechanism: free fall. Until it falls on the metal matrix cell while playing the role of oxygen and water isolation.

  2. (2)

    As the initial corrosion environment in the CA system oxygen concentration of 5%, in order to maintain the 5% oxygen content, the CA system will continue to input a certain amount of oxygen, and the input oxygen will randomly replace the empty cell location.

  3. (3)

    Corrosion products have hydrogen ions and hydroxide ions. In practice, the solution of hydrogen ions and hydroxide ions will immediately combine to generate water. Therefore, in order to simplify the CA model, these two products are not counted in the cell state and are directly converted to empty cells. Finally, after replacing them according to scheme (1) and scheme (2), If there are still empty cells remaining in the CA, the remaining empty cells are replaced with water cells.