## 2 The Design of the Electrolytic Corrosion Experiment  
### The Design of the Experiment  
#### 2.1.1 The Preparation and Pretreatment of Specimens  
The specimens used in electrolytic corrosion experiments were divided into block corrosion and tensile specimens, and the material used for specimens is low-alloy steel used for hydrogen production reactors. The size of block corrosion specimens is 20 mm \(\times\) 20 mm \(\times\) 10 mm, and the size and shape of the tensile specimens were determined according to the test method required by ISO 6892-1:2019 [27], Metallic materials--Tensile testing, Part 1, method of test at room temperature. The shape and the size of tensile specimens are shown in Figure 1c, and the dimensions of the specimens shown in Figure 1c are in mm. The experiments were divided into two parts, different surface roughness corrosion and different surface residual compressive stress corrosion, and four sets of experiments were designed for each part. Meanwhile, three specimens were used for each set of experiments to reduce the contingency of experiments. The number of block specimens used in corrosion experiments carried out in the paper is 24, and the number of tensile specimens is 8; before corrosion, all specimens were annealed and stored in a dry room temperature environment.  
Before conducting experiments on the effect of surface roughness on corrosion resistance, four different surface processing methods were used to machine the specimens: filing, grinding with 80# sandpaper, grinding with 1200# sandpaper, and polishing to obtain different surface roughness on one side of the block specimen and both sides of the tensile specimens, respectively. Before conducting experiments on the effect of surface residual stress on corrosion resistance, different residual stresses were generated using shot peening on one side surface of the block specimen and on both side surfaces of the tensile specimen, respectively. The shot peening process parameters are as follows: the diameter of the steel pellet is 0.5 mm, the shot peening time is 2 min, and the shot peening pressures are 0 MPa, 0.2 MPa, 0.3 MPa, and 0.4 MPa, respectively. Using shot peening processing, the surface roughness might be inconsistent. Therefore, the surfaces of specimens were slightly ground with 80# sandpaper after shot peening to avoid inconsistencies in surface roughness. During the grinding process, the surface roughness was checked several times to ensure that the surface roughness of the ground specimens was similar. The surface cleaning for complete rust removal and pretreatment of specimens was carried out uniformly using anhydrous ethanol. The surface topography, surface roughness, surface residual stress, surface microstructure, and initial quality of specimens were tested after surface cleaning.  
To ensure the effectiveness of the experiment and avoid the corrosion of noninspection areas, the noninspection area of the specimens was wrapped in special anticorrosion tape. The four sides and the bottom of block specimens and both ends of the tensile specimens were wrapped, exposing the treatment surface of block specimens and the corroding area of tensile specimens; this operation benefits the control of current density. The wrapped specimens are shown in Figure 1a,b. After wrapping, the leakage area of the block specimen is 400 mm\({}^{2}\), and the leakage area of the tensile specimen is approximately 1560 mm\({}^{2}\) on each side.