Corrosion of equipment by corrosive media is widespread in the processing of inferior crude oil. In hydroprocessing reactor effluent systems, corrosive media are very destructive to heat exchangers and air coolers during flow and cooling because of the high-temperature and -pressure environment. A fire and explosion in the air cooler or heat exchanger are highly likely when their tubes leak. Currently, there are no effective direct detection and prediction means to evaluate the corrosion risk in real time, creating significant hidden threats to the safe operation of the equipment. Therefore, this paper proposes a condition expansion method based on a Gaussian distribution. The distribution laws of characteristic corrosion parameters under various working conditions were studied, and the corrosion risk of the equipment was evaluated. A three-layer back-propagation neural network model is constructed to predict the characteristic corrosion parameters. After testing, the model is shown to have superior predictive accuracy and generalization performance. It can also meet the demand for real-time equipment corrosion prediction. The proposed method can serve an essential role in guiding engineers to take correct and timely prevention and control measures for different degrees of corrosion to reduce losses.

Energy is a significant material foundation of the economy, and the green and safe development of the oil refining industry guarantees national and societal stability. Crude oil is a nonrenewable resource, which has gradually been depleted after more than half a century of exploitation. Because China possesses more coal than oil, large petrochemical companies have been motivated to expand and transform their capacities.

In the process of equipment localization and large-scale, many core-refining equipment systems (such as electric desalination systems, hydrogenation reaction effluent systems, and atmospheric and vacuum tower systems) have experienced varying degrees of corrosion. As a result, equipment tube wall thicknesses of a heat exchanger or air cooler are reduced, causing perforation, leakage, and accidents, seriously affecting safe production and reducing the economic benefits of the enterprise.

In addition to hydrocarbon compounds, petroleum contains impurity elements such as sulfur (S), nitrogen (N), and chlorine (Cl). Although the content of these impurities is low, they can cause severe corrosion problems for equipment during processing. Furthermore, large amounts of water and Cl-containing chemical additives are applied during crude oil extraction, greatly increasing the content of corrosive impurities and salts, such as S, Cl, and N.1  These impurities undergo hydrolysis and reaction during crude oil transportation and processing to produce corrosive products such as HCl, H2S, and NH3.2  HCl, H2S, and NH3 flow, transfer heat, and change phases during production and transportation in different equipment systems and form multicomponent corrosive fluids with separated liquid water and oil.

Common types of corrosion in petroleum processing include chemical corrosion and electrochemical corrosion.3-6  The crude oil must be desalted and dehydrated before processing. However, it is challenging to remove inorganic salts completely, especially chlorides. Organic Cl cannot be removed by electrical desalination, which increases the risks of safe operation during subsequent processing and in transportation equipment. In the initial distillation stage, the water in the crude oil vaporizes to precipitate out Cl-containing inorganic salts, which react with water vapor to generate HCl, resulting in the corrosion of the condensation system at the top of the primary distillation tower.

In the hydrogenation unit, the temperature of the fluid medium in the tube gradually decreases as the air flows through the air cooler, and ammonium chloride and ammonium sulfide can readily crystallize and deposit. If the amount of water injection is insufficient, ammonium salts can deposit on the walls of the air cooler and block the tubes.7  The water injected for scouring the crystallization causes the ammonium chloride to quickly absorb moisture, making the concentration of the ammonium chloride solution in the tube too high to cause significant erosion under scale. If the flow rate of water injection is too high and the flow velocity is too fast, it can result in severe erosion and corrosion.8-9 

Ammonium salt crystal particles are affected by ambient temperature and humidity. Under certain conditions, high-concentration ammonium chloride solution forms and can be highly corrosive once a small amount of liquid water appears.10  When there is no liquid water in the environment, the ammonium salt can absorb water vapor from the surrounding air if the relative humidity exceeds 10%, causing corrosion under scale.11 

To predict the water vapor absorption rate in the deliquescent process, Li, et al.,12  used a heat transport model to determine the moisture absorbing ability of deliquescent crystallization in a controlled humidity environment. The model was used to find the mass transfer resistance during water vapor absorption and the uniformity of the sample. They also found that the porosity was not very large, and the particle size had no significant effect on the kinetics of the solid to absorb water vapor during the deliquescent process.

Hu, et al.,13  analyzed the volatilization and deliquescent processes of NH4Cl, NH4SO4, and NH4NO3 and studied the effects of particle size and humidity on the crystallization characteristics. Especially on the inner wall of the tube, the process medium and tube wall had a complex electrochemical reaction, which seriously damages the corrosion product protective film and the matrix. Gong, et al.,14  found that the corrosion form changes from general to pit corrosion as the dry/wet ratio (D/W) increases. With decreasing pH, the protection of the corrosion product layer was reduced, causing pitting corrosion and promoting anodic dissolution.

The composition of crude oil is complex. In addition, during the cooling process, the type and content of compositions, and physical parameters are constantly changing in the tube of the heat exchange equipment. Because sensors cannot directly monitor some flow-accelerated corrosion characteristic parameters, the international standard from the American Petroleum Institute15  provides calculation methods for them. However, basic data must be obtained by process simulation software, resulting in slow calculation speeds. At present, there is no systematic method to predict flow-accelerated corrosion parameters. The corrosion resistance of equipment is mainly enhanced by material upgrades. The existing control methods have limitations and poor results. Therefore, it is necessary to study the prediction method of multifluid flow-accelerated corrosion characteristic parameters.

Yang, et al.,16  proposed a data-driven corrosion diagnosis scheme and the random forest (RF) algorithm based on particle swarm optimization (PSO) was used to classify and predict the corrosion mechanism, type, and degree with improved accuracy. Mohamed, et al.,17  proposed a practical implementation of robust ensemble learning models to accurately predict the internal corrosion rate in oil and gas pipelines. Peng, et al.,18  introduced a hybrid intelligent algorithm to predict the corrosion rate in multiphase flow pipelines for oil and gas transportation. However, the corrosion environment in the above three references was different from this paper.

The artificial neural network (ANN) model is a fast computational tool for treating scientific data having various properties. It has shown great promise in physics and chemistry research in the last few years,19-20  especially in data prediction. Rocabruno-Valdés, et al.,21  developed ANN models for predicting the corrosion rates of metals in different biodiesels. The model had good predictive performance, but the corrosive environment was only biodiesel without fluidity. The current work used this model to study the prediction of corrosion characterization parameters of carbon steel piping in an air cooler under high temperature and high pressure in the multiphase flow environment.

Process

The process flow of the reaction effluent system of a 2.6 million ton/y wax oil hydrogenation unit was shown in Figure 1. After raw oil has undergone hydrogenation, the high-temperature gas enters the hot, high-pressure separator (D103) for gas-liquid two-phase separation. The high-temperature gas flows through the heat exchanger (E103), the air cooler (A101) cools it to 48°C, and it then enters the cold high-pressure separator (D105) for three-phase separation of oil, gas, and water.
FIGURE 1.

Process flow diagram.

FIGURE 1.

Process flow diagram.

Close modal

During the cooling process, crystallized components (HCl, NH3, and H2S) may generate NH4Cl and NH4HS salts, which were deposited on the tube walls, causing tube blockages. Therefore, the water injection points are set before the hot high gas enters the heat exchanger and the air cooler.

The raw material of the device is a mixture of vacuum wax oil, coking wax oil, tank area wax oil, and a small amount of catalytic diesel oil. Coking wax oil comes from the delayed coking unit and contains additional impurities such as S and N. It is the main source of impurities in the mixed feedstock oil.

The physical parameters of raw oil after mixing were shown in Table 1. In actual processing, the N content of the mixed raw oil reaches 5,000 mg/kg (design specification is ≤3,500 mg/kg), the Cl content reaches 1.5 mg/kg (design specification is less than or equal to 1 mg/kg), and the S content is within the design specification range (2.5 wt%).

Table 1.

Physical Parameters of Raw Oil

Physical Parameters of Raw Oil
Physical Parameters of Raw Oil

Through the analysis of the mixed raw oil, it is known that the N and Cl content of the wax oil hydrogenation unit under typical working conditions exceeds the standard, and the S content is very likely to exceed the design specification. Therefore, it is preliminarily judged that during the hydrogenation reaction effluent cooling process, readily crystallized components such as HCl, NH3, and H2S may undergo ammonium salt crystallization, deposition, corrosion, and erosion in the tubes. These flow-accelerated corrosion characteristics must be represented by relevant parameters, such as crystallization temperature and flow velocity, obtained by modeling, analysis, and calculation.

Simulation Model Construction

Aspen Plus (AspenTech Inc., USA) software simulated the physical parameters to explore the flow-accelerated corrosion characteristics of a hydroprocessing reactor effluent system. The simulations were performed according to the calibration report and the on-site material collection and analysis data. The Peng-Robinson cubic equation of state was utilized for three-phase flash evaporation separation. This equation can accurately predict critical and supercritical states when used in phase equilibrium calculations and has good applicability to the gas-liquid equilibrium of nonideal systems.

The simulation model simulated the changes in the hydrogenation reaction effluent physical parameters during the cooling process, presented in Figure 2.
FIGURE 2.

Simulation model in Aspen Plus.

FIGURE 2.

Simulation model in Aspen Plus.

Close modal

In Figure 2, the functions of the two-phase separation tank, heat exchanger, air cooler, and three-phase separation tank were respectively, equivalent to the hot high-pressure separator D103, heat exchanger E103, air cooler A101, and cold high-pressure separator D105 in Figure 1. The physical properties of the three product oils (diesel oil, hydrogenated wax oil, and naphtha) were given in Table 2. The volumetric flow rates of low gas and circulating hydrogen were 2,361.3 ncmh and 160,315 ncmh, respectively. The assumptions used to develop the simulation are listed in Table 3.

Table 2.

The Physical Properties of the Three Product Oils

The Physical Properties of the Three Product Oils
The Physical Properties of the Three Product Oils
Table 3.

Simulation Assumptions

Simulation Assumptions
Simulation Assumptions
Ammonium salt crystal corrosion risk in the hydrogenation reaction effluent system was analyzed for typical operating conditions during device operation. In this calculation process, the raw oil S, N, and Cl content adopts the normal value of the working condition: raw oil processing is 310 ton/h; no water injection before the heat exchanger E103, selecting 30 ton/h before the air cooler A101, which is the demineralized water in Figure 1. The N content in the crude oil is 5,000 mg/kg (depleted N rate is 50%), the S content is 1.2 wt% (desulfurization rate is 80%), and the Cl content is 1.5 ppm. The calculation process was illustrated in Figure 3 using the crystallization temperature of ammonium chloride salt as an example. Based on the phase change flash evaporation equilibrium calculation, the partial pressures of NH3 and HCl at different temperatures for a specific working condition were obtained, and the ammonium salt dissociation constant Kp was calculated. The Kp vs. T function and the ammonium salt crystallization equilibrium curve were obtained by Gaussian fitting, and the string cut-off method was iteratively solved for the ammonium salt crystallization temperature.22 
FIGURE 3.

The calculation process for ammonium salt crystallization.

FIGURE 3.

The calculation process for ammonium salt crystallization.

Close modal
The crystallization temperatures of ammonium salts are shown in Figures 4 and 5. From Figure 4, NH4Cl crystallizes under typical working conditions, and the crystallization temperature is 220°C. By analyzing the temperature changes in the hydrogenation reaction cooling process, the inlet and outlet temperatures of heat exchanger E103 were 245°C and 120°C, respectively, meaning that there was a risk of ammonium salt crystallization in heat exchanger E103. From Figure 5, the crystallization temperature of NH4HS under typical conditions was 12.5°C and does not fall within the temperature range of the hydrogenation reaction effluent system, so there is no risk of NH4HS crystallization.
FIGURE 4.

The crystallization temperature of NH4Cl (data calculated by Aspen Plus).

FIGURE 4.

The crystallization temperature of NH4Cl (data calculated by Aspen Plus).

Close modal
FIGURE 5.

The crystallization temperature of NH4HS (data calculated by Aspen Plus).

FIGURE 5.

The crystallization temperature of NH4HS (data calculated by Aspen Plus).

Close modal
The corrosive media readily dissolve in water to form a high-concentration ammonium salt solution (mainly NH4HS solution). During the flow of the medium, the NH4HS concentration continues to grow. The water phase corrosiveness also increases, affecting the air-cooled tube and outlet pipes and causing severe erosion and corrosion. According to the API RP 932-B-2019 standard, there is no risk of erosion when the NH4HS concentration in the air cooler’s carbon steel outlet pipe is below 4%, and there is a high risk when it reaches 8%. This study calculated the concentrations of NH4HS in the air cooler inlet and outlet pipes for different water injection rates, as shown in Figure 6. With the increase of water injection before air cooler, the concentration of NH4HS in the outlet and inlet pipes of the air cooler gradually decreased. Within the range of 10 ton/h to 35 ton/h of water injection, the concentration of NH4HS in the air-cooled outlet piping was greater than 4%. When the water injection rate was 30 ton/h under typical working conditions, the NH4HS concentration in the air cooler outlet pipe reached 8.65%, which was highly corrosive and easily caused a sharp erosion risk to the air cooler outlet pipe system.
FIGURE 6.

The concentration of NH4HS for different water injection flow rates (data calculated by Aspen Plus).

FIGURE 6.

The concentration of NH4HS for different water injection flow rates (data calculated by Aspen Plus).

Close modal

Flow-Accelerated Corrosion Characteristic Parameters

Along with the continuous changes in temperature, pressure, flow velocity, and other state parameters with the flow of the hydrogenation reaction effluent, the various parameters of the oil-gas-water mixture in the tube affect the timing of the ammonium salt crystallization and multiphase flow erosion. The flow-accelerated corrosion characteristics of the hydrogenation cold-exchange equipment depend on various actual production process factors that cause fluctuations in the working conditions. These factors include the processing volume mpc, feed oil S content ms, Cl content mCl, and N content mN changes, the change in the water injection flow rate mw1 before E103, and the water injection flow rate mw2 before A101.

In this paper, the ranges of mpc, ms, mCl, mN, mw1, and mw2 were specified, and several groups of working conditions were randomly generated within each variable range for simulation. Based on the change in feedstock oil varieties over multiple operation cycles of the device, mpc was 0 to 310 ton/h, ms was 0 to 3 wt%, mCl was 0 to 12 ppm, and mN was 0 to 7,000 mg/kg. The production load and feedstock oil’s S, N, and Cl content usually fluctuate around typical working conditions, and extreme working conditions rarely occur, conforming to the Gaussian distribution law. Therefore, it was necessary to randomly generate several groups of working conditions for mpc, ms, mCl, and mN according to the probabilities. The specific implementation was as follows:

  1. Construct the Gaussian function according to the device’s actual operating data:
    formula
    where μ is the expected value, taken as the parameter values under typical working conditions, and σ is the variance, adjusted according to the actual operating data.
  2. Generate n values of x within a given variable range, and find the corresponding y.

  3. Calculate the probability P(xi) corresponding to each xi value. The equation used is as follows:
    formula
  4. Take the values xi according to the probabilities P(xi) as a working condition parameter set.

  5. Repeat step 4 to generate a total of 10,000 sets of samples, with one sample set representing one working condition.

Gaussian functions for mpc, ms, mCl, and mN were constructed using the above steps. The independent variable in the function was the parameter value of each working condition, and the dependent variable was the probability that the parameter value was selected randomly:
formula
formula
formula
formula
The probability of each parameter for different working conditions was calculated, as shown in Figures 7 through 10. The peak point is a typical working condition, and the corresponding probability is the largest at that point. Therefore, when mpc, ms, mCl, and mN are randomly selected, the probability of selecting the typical working condition value is the largest. The greater the difference from the typical operating condition value, the less likely it is to be selected, conforming to the behavior of the actual production conditions of the device. In addition, the curves in the figures satisfy the following:
formula
FIGURE 7.

Probability density function of the processing volume.

FIGURE 7.

Probability density function of the processing volume.

Close modal
FIGURE 8.

Probability density function of the Cl content.

FIGURE 8.

Probability density function of the Cl content.

Close modal
FIGURE 9.

Probability density function of the N content.

FIGURE 9.

Probability density function of the N content.

Close modal
FIGURE 10.

Probability density function of the S content.

FIGURE 10.

Probability density function of the S content.

Close modal

According to the operation experience, the water injection rate before E103 was 0 to 15,000 kg/h, the water injection rate before A101 was 0 to 40,000 kg/h, mw1 and mw2 were generated randomly with equal probability. The crystallization temperature of ammonium salt, the concentration of NH4HS, the content of liquid water, and the flow velocity were important parameters that characterize the risk of flow-accelerated corrosion. The changes in these parameters are of great significance for judging the corrosion risk of the heat exchanger.

The Crystallization Temperature of Ammonium Salt

The crystallization temperature of ammonium salt refers to the critical temperature at which NH3, HCl, and H2S in the multiphase flow medium are transformed from the gaseous state to NH4Cl and NH4HS crystals during cooling. By calculating the crystallization temperature of ammonium salt, it was possible to locate the equipment or piping with risk of ammonium salt crystallization. Combined with heat transfer simulation, the exact position of the equipment or piping can be determined, and the corrosion effect of the corrosive medium on piping in the cooling process of multiphase fluid can be spatially represented. The calculated results for the ammonium salt crystallization temperature of 10,000 samples are presented in Figure 11. The NH4Cl salt’s crystallization temperature is distributed around 213.96°C. In addition, over 99% of crystallization temperatures fall between 140°C and 245°C, the temperature range of the inlet and outlet of heat exchanger E103. Therefore, ammonium salt crystallization easily occurs for typical operating conditions and is prone to appear in the E103 tubes.
FIGURE 11.

Scatter plot of ammonium salt crystallization temperatures (data calculated by Aspen Plus).

FIGURE 11.

Scatter plot of ammonium salt crystallization temperatures (data calculated by Aspen Plus).

Close modal

Liquid Water Content

The liquid water in the multiphase hydrogenation effluent mainly comes from the water injection, and the rest is composed of water vapor condensation from the gas phase. The liquid water content is the ratio of the sum of the mass flow rates of liquid water in the oil, gas, and water to the injected water. According to the “API RP 932-B-2019,” the water content of the liquid should be kept at least 25%. If it is less than 25%, the HCl, H2S, and NH3 in the gas phase are easily dissolved in liquid water, forming a high-concentration ammonium salt solution, which will cause corrosion and erosion under the ammonium salt deposition scale. If there is no liquid water, only oil and gas flow in tubes. There is no corrosive effect on the pipe wall. Therefore, controlling a reasonable amount of water injection is critical to the safe operation of the equipment. It is necessary not only to ensure that the injected water is not completely vaporized and wastes water resources but also to make the content of liquid water after the injection more than 25%. The liquid water content of 10,000 samples was calculated, and the results showed that the liquid water content at the inlet of E103 is 0 under any working conditions, mainly because the inlet temperature of the heat exchanger was 245°C, and the amount of injected water is relatively small, which is injected into the piping. All water is vaporized at the middle and the end, so there is no liquid water there. The liquid water content at the outlet of E103 is shown in Figure 12.
FIGURE 12.

Scatter plot of the liquid water content at the outlet of E103 (data calculated by Aspen Plus).

FIGURE 12.

Scatter plot of the liquid water content at the outlet of E103 (data calculated by Aspen Plus).

Close modal
Figure 12 shows that the liquid water content at the outlet of E103 is below 86.19% because the E103 outlet temperature is 120°C. The average liquid water content of the sample is around 70%, and about 21% of the samples were below the 25% critical liquid water content level. The water injection amounts for this 21% of samples were analyzed. As shown in Figure 13, it was found that the pre-E103 water injection flow rate for these samples was below 3,500 kg/h, which is obviously low. In these cases, the temperature of heat exchanger E103 was too high, so most of the water vaporized, and high-concentration ammonium salt deposition and local corrosion tended to occur in the tubes of heat exchanger E103.
FIGURE 13.

Water injection flow rates for the 21% of samples below the critical 25% water content value (data calculated by Aspen Plus).

FIGURE 13.

Water injection flow rates for the 21% of samples below the critical 25% water content value (data calculated by Aspen Plus).

Close modal
Similarly, the distribution of liquid water content at the A101 inlet for all samples is shown in Figure 14. The liquid water content at the air cooler inlet was above 97.5% in more than 99% of the samples. This result fully meets the specified critical value of 25%, mainly because the hydrogenation reaction effluent cooled to 120°C after being cooled by heat exchanger E103 and then flows to the air cooler. The inlet of this device was only 108°C. In this case, a large amount of liquid water had already appeared.
FIGURE 14.

Scatter plot of the liquid water content at the A101 inlet (data calculated by Aspen Plus).

FIGURE 14.

Scatter plot of the liquid water content at the A101 inlet (data calculated by Aspen Plus).

Close modal
After screening, it was found that the liquid water content of 28 samples was below 25%, even having no liquid water. From Figure 15, the water injection flow rates for these samples before E103 and A101 were very small. All were less than 2,500 kg/h, far less than the water injection under typical working conditions. After injection, the washing water vaporized immediately, and the residual liquid water content in the multiphase flow was minimal. Therefore, dew point corrosion and ammonium salt crystal corrosion tended to occur in the A101 air cooler.
FIGURE 15.

Pre-E103 and pre-A101 water injection flow rate for 28 samples below the 25% critical water content value (data calculated by Aspen Plus).

FIGURE 15.

Pre-E103 and pre-A101 water injection flow rate for 28 samples below the 25% critical water content value (data calculated by Aspen Plus).

Close modal

Flow Velocity

Flow velocity is the most critical factor affecting erosion. Some refineries control the minimum speed of the air cooler at 3 m/s to ensure sufficient flow to avoid ammonium salt deposition and fully remove salt deposition. However, when the flow rates are too high, it is easy to cause erosion and corrosion of corrosion solutions. Therefore, the maximum flow rate of carbon steel pipe should not exceed 6.1 m/s. This study calculated the inlet and outlet flow velocities of E103 and A101 for 10,000 samples, as shown in Figure 16. The inlet flow velocity of E103 was 3.9 m/s, and the outlet flow velocity of E103 was about 3.2 m/s. The inlet flow velocity of A101 was about 3.3 m/s, and the outlet flow velocity of A101 was about 2.8 m/s. The inlet and outlet flow velocity of E103 had a relatively obvious limit of 3.5 m/s, and the inlet and outlet flow velocity limit of A101 was 2.9 m/s.
FIGURE 16.

Scatter plots of the inlet and outlet flow velocities of the heat exchanger (E103) and air cooler (A101) (data calculated by Aspen Plus).

FIGURE 16.

Scatter plots of the inlet and outlet flow velocities of the heat exchanger (E103) and air cooler (A101) (data calculated by Aspen Plus).

Close modal

Ammonium Sulfide Concentration

According to the API RP 932-B-2019 standard, carbon steel experiences minimal corrosion if the NH4HS concentration is below 2%. After years of industry operating experience, the NH4HS concentration is controlled below 8%, and the flow velocity is ensured to be below 6.1 m/s. At an 8% NH4HS concentration, the corrosion of the carbon steel materials is still within the device’s acceptable operating range, and the flow velocity in the alloy piping can be controlled within 9.1 m/s. This study calculated the NH4HS concentration at the A101 air cooler outlet for 10,000 samples, and the results are shown in Figure 17, it can be seen that the NH4HS concentration in Figure 17 is generally high, and the concentrations of most samples are above 8%.
FIGURE 17.

Scatter plot of the NH4HS concentration distribution at the A101 outlet (data calculated by Aspen Plus).

FIGURE 17.

Scatter plot of the NH4HS concentration distribution at the A101 outlet (data calculated by Aspen Plus).

Close modal

Hydrogen Sulfide Partial Pressure

The hydrogen sulfide contributes its partial pressure, related to its volume ratio, to the total gas pressure. The API RP 932-B-2019 standard notes that H2S has a pronounced influence on corrosion when the NH4HS concentration is high. When the NH4HS concentration is 10%, and the H2S partial pressure reaches 200 kPa, the corrosion rate of carbon steel is 0.7677 mm/y. This study calculated the H2S partial pressure for 10,000 samples, and the results are shown in Figure 18.
FIGURE 18.

Scatter plot of the H2S partial pressure distribution (data calculated by Aspen Plus).

FIGURE 18.

Scatter plot of the H2S partial pressure distribution (data calculated by Aspen Plus).

Close modal

Corrosion Risk Evaluation

After calculating the flow corrosion characteristic parameters for many samples, the parameter rule of hydroprocessing reactor effluent systems for all working conditions was obtained. An equipment risk evaluation index system suitable for the work in this paper was constructed, and the risk grades for different parameters were obtained, as shown in Table 4.

Table 4.

Corrosion risk levels

Corrosion risk levels
Corrosion risk levels

Ammonium salt readily crystallizes in heat exchanger E103, so when the crystallization temperature is between 245°C and 120°C it is considered at high risk. Crystallization does not occur in the air cooler. If crystallization occurs, high-liquid water content can dissolve ammonium salt. It is considered a medium risk when the crystallization temperature is between 108°C and 50°C. When the crystallization temperature is between 120°C and 108°C, the piping between the heat exchanger outlet and the air cooler inlet has a large wall thickness and does not leak during operation, so when the temperature section crystallizes, it is regarded as low risk.

For liquid water content, referring to “API RP 932-B-2019,” lower than 25% is considered high risk, and higher than 25% is considered high risk. As for the flow velocity, considering that too high flow velocity will cause erosion and too low flow velocity will cause ammonium salt deposition, the flow rate at 3.1 m/s to 6.1 m/s is considered low risk, 6.1 m/s to 9.1 m/s is considered as medium risk, and <3.1 m/s or >9.1 m/s is considered as high risk. For ammonia hydride concentration, it is considered low risk at <4%, medium risk at 4% to 8%, and high risk at above 8%. Because there is no absolute measurement standard for hydrogen sulfide partial pressure, it is related to the operating pressure of the device, so there is no risk grade division.

Pearson Correlation Coefficient Analysis

The Pearson correlation coefficient (PCC) is a type of statistical index which determines the strength and direction of the linear relationship between two random variables.23-25  PCC has been widely used in economic management, chemical industry, and biomedicine, which involve numerous data analyses. The PCC of the input and output variables was calculated to measure their correlations. The calculation formula is as follows:
formula
This study has six input quantities: the processing quantity, Cl content, N content, S content, water injection flow rate before E103, and water injection flow rate before A101. The six output variables are the NH4Cl salt crystallization temperature, E103 outlet liquid water content, A101 inlet flow velocity, A101 outlet flow velocity, NH4HS concentration, and H2S partial pressure. Figure 19 shows the correlation between the inputs and outputs. Colors closer to crimson represent stronger positive correlations, while colors closer to dark blue represent stronger negative correlations. It can be seen from the figure that the crystallization temperature of the NH4Cl salt has a strong correlation with the Cl content and the S content. The liquid water content at the outlet of E103 had a strong correlation with the amount of water injected before E103. The inlet and outlet flow velocities of A101 are closely related to the treatment capacity but had little to do with the water injection flow rate before A101. There is little relationship between the concentration of NH4HS and the water injection before E103 and A101. The partial pressure of hydrogen sulfide had a great relationship with the S content in raw oil. On the basis of correlation analysis, a neural network model for predicting output parameters was proposed.
FIGURE 19.

Heat map of the correlations between input and output parameters.

FIGURE 19.

Heat map of the correlations between input and output parameters.

Close modal

Back-Propagation Neural Network Prediction Model

A neural network26-28  was used to construct a predictive model of the characteristic parameters of flow-accelerated corrosion to provide a reference basis for corrosion evaluation of air coolers and heat exchangers. Every neuron in a neural network has tens of thousands of synapses connected to other neurons.

An ANN is a system that imitates the human brain. A weight w represents the influence of one node of the ANN on another node. If the influence reaches a threshold θ, it is activated. A typical neuron structure is illustrated in Figure 20.
FIGURE 20.

Formal structure of a typical neuron.

FIGURE 20.

Formal structure of a typical neuron.

Close modal
A multilayer neural network is obtained by connecting multiple neurons and adding several hidden layers (the number can be adjusted according to the actual problem) between the input and output layers, as shown in Figure 21. During the propagation process, the neuron in the input layer receives an external input signal, subsequently transferring it to various hidden layer units for layer-by-layer processing, finally transferring it to the output layer.29 
FIGURE 21.

Structure of multilayer neural network.

FIGURE 21.

Structure of multilayer neural network.

Close modal

The error back-propagation algorithm30-32  is one of the most widely used and best performing neural network learning algorithms, with the learning process summarized as follows.

Suppose the training data set is , which includes d-dimensional input and l-dimensional output. The input of the jth hidden layer node is
formula
The input of the kth output node is
formula
where bj is the input of the jth hidden layer node.
For a training sample (xh, yh), assuming that the output of the neural network is
formula
then the mean square error of the neural network is as follows:33 
formula
The updated estimation formula for each parameter is
formula
For example, the increment of wjk can be expressed as follows:34 
formula
The effect of wjk on Ek can be expressed using the derivative chain rule as follows:
formula
The activation function uses the sigmoid function, which has the following characteristics:
formula
Therefore, the kth output error ζk is
formula
The updated formulas for wjk, vij, γj, and θk are then35 
formula
formula
formula
formula
formula

The implementation process of the back-propagation algorithm is as follows: inputting samples, signal forwarding, calculation of output error, error back propagation, parameter adjustment, and ending iteration until certain conditions are met.

This section constructs a back-propagation neural network (BPNN) flow-accelerated corrosion characteristic parameter prediction model to determine the crystallization temperature of ammonium chloride, the free water content, flow velocity, the concentration of ammonium sulfide, and the partial pressure of hydrogen sulfide.

The simulation environment in detail is as follows: CPU-Inter® Core™ i5-8400 CPU @ 2.80 GHz to 2.81 GHz; RAM-8.00 GB; Matlab 2019a.

Before BPNN training, 70% of the samples were randomly selected as the training set, 15% as the test set, and 15% as the verification set. The data normalization method was adopted to realize the conversion from real to coded variables. That is, the original data are linearly transformed so that the result value is mapped to [0,1]. The training parameters of the neural network model were set as follows: the learning rate was 0.01, the epoch was 10,000, and the training goal was 0.00001. Levenberg-Marquardt algorithm was used to train the neural network. Before ANN training, 70% of samples were randomly selected as the training set, 15% samples as the test set, and 15% samples as the verification set.

Each BPNN model was repeatedly trained 50 times, and the average mean squared error (MSE) was 0.000281, 0.000322, 0.00565, 0.00392, and 0.00398, respectively. The number of iterations for each model to reach the optimal MSE were 83, 57, 18, 35, and 10, respectively.

NH4Cl Crystallization Temperature Prediction

The correlation analysis indicated that the crystallization temperature of NH4Cl salt is highly correlated with the Cl content and S content in the feedstock oil. Therefore, the Cl and S contents were the input variables, and the crystallization temperature was the output variable. Neural networks with different hidden nodes were evaluated to select a reasonable number of hidden layer nodes. When the number of hidden layer nodes was 13, the root-mean-square of the neural network could not be minimized. Therefore, a “2-13-1” BPNN model structure was adopted.

The model was evaluated using the coefficient of determination R to represent the proportion of the output explained by the neural network model. The closer R is to 1, the greater the explanatory power of the neural network model

Figure 22 shows that the R of the training set, test set, validation set, and the total data set of the model are all above 0.987, indicating that the interpretation rate of input to output by the neural network model is above 98.7%.
FIGURE 22.

Regression R values: NH4Cl crystallization temperature from the Cl content and S content.

FIGURE 22.

Regression R values: NH4Cl crystallization temperature from the Cl content and S content.

Close modal

E103 Outlet Liquid Water Content Prediction

The correlation analysis indicated that there was a strong correlation between the liquid water content at the outlet of E103 and the amount of water injected before E103. Therefore, the amount of water injected before E103 is used as the input of the neural network, and the amount of liquid water at the outlet of E103 is the output. When predicting the E103 outlet liquid water content from the amount of water injected before E103, the root-mean-square of the neural network could not be minimized when the number of hidden layer nodes was 10. Therefore, a “1-10-1” BPNN model structure was adopted.

It can be seen from Figure 23 that the R of the training set, test set, validation set, and the total data set of the model are all above 0.998, indicating that the interpretation rate of input to output by the neural network model is above 99.8%.
FIGURE 23.

Regression R values: E103 outlet liquid water content from the amount of water injected before E103.

FIGURE 23.

Regression R values: E103 outlet liquid water content from the amount of water injected before E103.

Close modal

A101 Inlet and Outlet Flow Rate Prediction

The correlation analysis indicated that the inlet and outlet flow velocities of A101 have a strong correlation with the processing volume of feedstock oil. Therefore, feedstock oil processing volume was used as the input volume of the neural network, and the inlet and outlet flow velocities of the A101 were the output volume. Evaluate the structure of different numbers of hidden layer nodes. When the number of hidden layer nodes was 16, the root-mean-square of the neural network could not be minimized when predicting the A101 inlet and outlet flow velocities from the raw oil processing volume. Therefore, a “1-16-2” BPNN model structure was adopted.

The computed R values of the model are shown in Figure 24. The R values of the training set, test set, validation set, and total data set of the model are 0.88, 0.87, 0.84, and 0.87, respectively, indicating that the input volume influences the output volume with a neural network model explanation rate of 87.3%.
FIGURE 24.

Regression R values: A101 inlet flow rate and outlet flow rate from the raw oil processing volume.

FIGURE 24.

Regression R values: A101 inlet flow rate and outlet flow rate from the raw oil processing volume.

Close modal

The R of the model is lower than 0.9, which has an influence on the subsequent prediction accuracy. The main reason is that the flowmeter is installed in the inlet and outlet main piping of the air cooler, which is relatively close to the diverging point of the piping, where the fluid is easy to produce strong turbulence during the diverging, resulting in the numerical instability detected by the flowmeter. Therefore, as the output variable of the neural network, the large fluctuation of data is easy to cause the unsatisfactory training results for the model.

NH4HS Concentration Prediction

The correlation analysis indicated that the concentration of NH4HS has a strong correlation with the water injection flow rate in front of the air cooler and a weak correlation with the water injection flow rate in front of the heat exchanger. Therefore, the water injection flow rates were input variables, and NH4HS concentration was output variable. The network of nodes in different hidden layer was evaluated. The root-mean-square of the neural network could not be minimized when the number of hidden layer nodes is 18 when predicting the NH4HS concentration from the water injection flow rate before A101 and the water injection flow rate before E103. Therefore, a “2-18-1” BPNN model structure was adopted.

The R values of the training set, test set, validation set, and the total data set of the model, shown in Figure 25, are 0.898, 0.897, 0.883, and 0.896, respectively, indicating that the input volume impacts the output volume. The explanation rate of the neural network model reached 89.6%.
FIGURE 25.

Regression R value: NH4HS concentration from the water injection flow rate before A101 and the water injection flow rate before E103.

FIGURE 25.

Regression R value: NH4HS concentration from the water injection flow rate before A101 and the water injection flow rate before E103.

Close modal

Prediction of Hydrogen Sulfide Partial Pressure

The correlation analysis indicated that the partial pressure of H2S has a strong correlation with the S content in the feedstock oil. Therefore, the S content in the feedstock oil was input variable, while the partial pressure of H2S was the output. The network of nodes in different hidden layer was evaluated. During the prediction of the hydrogen sulfide partial pressure from the S content, the root-mean-square of the neural network could not be minimized when the number of hidden layer nodes was 7. Therefore, a “1-7-1” BPNN model structure was adopted.

The R values of the model were computed and are shown in Figure 26. The R values of the training set, test set, validation set, and total data set are above 0.95, and the neural network model’s interpretation rate of input to output is 95.6%.
FIGURE 26.

Regression R values: hydrogen sulfide partial pressure from the S content.

FIGURE 26.

Regression R values: hydrogen sulfide partial pressure from the S content.

Close modal

An additional 2,000 sets of data were selected to further test the overall model performance.

The crystallization temperature of ammonium salt is the most direct parameter to judge the location of flow-accelerated corrosion. As shown in Figures 27 and 28, the relative error of the prediction results is within 0.2%, and the maximum relative error is 0.188%, indicating that the model had good general performance and predictive accuracy.
FIGURE 27.

Prediction of NH4Cl crystallization.

FIGURE 27.

Prediction of NH4Cl crystallization.

Close modal
FIGURE 28.

Predictive relative error of NH4Cl crystallization.

FIGURE 28.

Predictive relative error of NH4Cl crystallization.

Close modal
Liquid water content is a key indicator for judging flow-accelerated corrosion. Insufficient liquid water content can easily lead to the local formation of a high-concentration ammonium salt solution, leading to corrosion. An additional 2,000 sets of data were selected for testing, and the results are presented in Figures 29 and 30. Figure 29 compares the predicted and actual liquid water content values at the E103 outlet. In Figure 30, the relative errors of most prediction results are within 1%. Of these, seven samples have fairly large relative errors, and the maximum relative error is 4.76%, indicating that the model had good overall performance and predictive accuracy.
FIGURE 29.

Prediction of the E103 outlet liquid water content.

FIGURE 29.

Prediction of the E103 outlet liquid water content.

Close modal
FIGURE 30.

Predictive relative error of the E103 outlet liquid water content.

FIGURE 30.

Predictive relative error of the E103 outlet liquid water content.

Close modal
Figure 31 shows the predicted A101 inlet and outlet flow velocities results. The relative errors are all within 1%, as shown in Figure 32. The relative error of 43 inlet flow velocities sample points was relatively large, with a maximum of 5.08%, and the relative error of 31 outlet flow velocity sample points was relatively large, with a maximum value of 2.62%.
FIGURE 31.

Prediction of the A101 inlet and outlet flow velocities.

FIGURE 31.

Prediction of the A101 inlet and outlet flow velocities.

Close modal
FIGURE 32.

Predictive relative error of the A101 inlet and outlet flow velocities.

FIGURE 32.

Predictive relative error of the A101 inlet and outlet flow velocities.

Close modal

Although the fitting degree of the neural network model for velocity prediction in A101 Inlet and Outlet Flow Rate Prediction section was not very good, it was found through data testing that its predictive accuracy could meet the requirements.

Another 2,000 sets of data were selected for testing the NH4HS concentration predictions. Figure 33 compares the predicted and actual values of the NH4HS concentration. Figure 34 shows that the relative errors of the NH4HS concentration prediction results were all within 3%. Only five samples had relatively large relative errors, with a maximum error of 43.9%. Compared with the predicted results, the actual NH4HS concentration was obtained through laboratory analysis, which had both time lag and laboratory errors, resulting in large prediction errors for some samples. It showed that the BPNN model has better generalization performance and higher prediction accuracy.
FIGURE 33.

Prediction of NH4HS concentrations.

FIGURE 33.

Prediction of NH4HS concentrations.

Close modal
FIGURE 34.

Predictive relative error of NH4HS concentrations.

FIGURE 34.

Predictive relative error of NH4HS concentrations.

Close modal
An additional 2,000 sets of data were selected for testing the H2S partial pressure predictions. Figure 35 compares the predicted H2S partial pressures with the actual values, while Figure 36 shows that the relative error of the predicted H2S partial pressure was 5%. The relative error of 23 samples was relatively large, with a maximum error of 14.6%. The prediction model is obtained when the operating pressure is constant, while the actual partial pressure of H2S varies with the operating pressure. When the pressure fluctuates abnormally at moment, it will cause a large error between the predicted data and the actual data. In general, the existing prediction error does not affect the judgment of the corrosion situation, so the model can meet the demand of the industry.
FIGURE 35.

Prediction of H2S partial pressures.

FIGURE 35.

Prediction of H2S partial pressures.

Close modal
FIGURE 36.

Predictive relative error of H2S partial pressures.

FIGURE 36.

Predictive relative error of H2S partial pressures.

Close modal

From the testing results just described, the BPNN models were found to have some errors. Possible reasons for these errors are as follows: (i) the amount of sample data was not large enough; (ii) there were individual abnormal data in the sample; and (iii) the test data sets and the training data sets were collected at different times, resulting in possible operating condition fluctuations. Moreover, a better predictive model than BPNN could be used to improve the results.

The behavior of the six flow-accelerated corrosion characteristic parameters predicted in this paper basically conformed to Gaussian distributions for the actual working conditions. Most of the sample data were concentrated near a particular working condition, and some data samples deviated substantially because of random working condition fluctuations during long-term device operation.

  • This study proposed a Gaussian distribution-based expansion method for the hydrogenation reaction effluent workload parameter population. A BPNN prediction model was constructed, validated, and tested, and each model had good predictive performance, for example, with a faster prediction speed (millisecond level) than Aspen Plus software (minute level).

  • The output variables were the NH4HS crystallization temperature, E103 outlet liquid water content, A101 inlet flow velocity, A101 outlet flow velocity, and NH4HS concentration, with relative prediction errors of about 0.2%, 1%, 1%, 3%, and 5%, respectively. Based on the BPNN prediction results and the corrosion risk evaluation method proposed in this paper, engineers can monitor real-time equipment corrosion status under different working conditions and execute timely preventive measures.

  • Although many flow-accelerated corrosion parameters have been predicted in this paper, there is still room for accuracy improvement. Because of the flow complexity, the diversity of material composition, and the fluctuations in working conditions, more process parameters related to flow-accelerated corrosion parameters can be mined as neural network inputs to improve the model’s accuracy. In addition, the neural network structure can be modified to improve the model’s predictive accuracy.

Trade name.

The authors are grateful to the National Natural Science Foundation of China (No. 51876194, No. 52176048, and No. U1909216) and the General Research Project of Zhejiang Provincial Department of Education (Y201942785) for supporting this study.

1.
Wu
B.
,
Li
X.
,
Li
Y.
,
Zhu
J.
,
Wang
J.
,
Energy & Fuels
30
,
2
(
2016
):
p
.
1524
1530
.
2.
Tang
P.
,
Yang
J.
,
Zheng
J.
,
Wong
I.
,
He
S.
,
Ye
J.
,
Ou
G.
,
Eng. Fail. Anal.
16
,
5
(
2009
):
p
.
1749
1756
.
3.
Wu
W.
,
Cheng
G.
,
Hu
H.
,
Zhou
Q.
,
Eng. Fail. Anal.
32
(
2013
):
p
.
23
34
.
4.
Zhang
X.
,
Ma
T.
,
Hua
X.
,
Zheng
J.
,
Wang
X.
,
Rao
S.
,
Eng. Fail. Anal.
117
(
2020
):
p
.
104802
.
5.
Vainio
E.
,
Kinnunen
H.
,
Laurén
T.
,
Brink
A.
,
Yrjas
P.
,
DeMartini
N.
,
Hupa
M.
,
Fuel
184
(
2016
):
p
.
957
965
.
6.
Bankiewicz
D.
,
Vainio
E.
,
Yrjas
P.
,
Hupa
L.
,
Lisak
G.
,
Fuel
265
(
2020
):
p
.
116886
.
7.
Ou
G.
,
Jin
H.
,
Xie
H.
,
Cao
J.
,
Qiu
J.
,
Eng. Fail. Anal.
18
,
6
(
2011
):
p
.
1458
1464
.
8.
Alvisi
P.P.
,
VdF. Cunha Lins
,
Eng. Fail. Anal.
15
,
8
(
2008
):
p
.
1035
1041
.
9.
Liu
X.
,
Duan
A.
,
Quan
J.
,
Jin
H.
,
Wang
C.
,
Eng. Fail. Anal.
112
(
2020
):
p
.
104529
.
10.
Sliem
M.H.
,
Fayyad
E.M.
,
Abdullah
A.M.
,
Younan
N.A.
,
Al-Qahtani
N.
,
Nabhan
F.F.
,
Ramesh
A.
,
Laycock
N.
,
Ryan
M.P.
,
Maqbool
M.
,
Arora
D.
,
J. Petrol. Sci. Eng.
204
,
23
(
2021
):
p
.
108752
.
11.
Chang
Y.-C.
,
Woollam
R.
,
Orazem
M.E.
,
J. Electrochem. Soc.
161
,
6
(
2014
):
p
.
C321
C329
.
12.
Li
N.
,
Taylor
L.S.
,
Mauer
L.J.
,
J. Food Eng.
169
(
2016
):
p
.
298
308
.
13.
Hu
D.
,
Chen
J.
,
Ye
X.
,
Li
L.
,
Yang
X.
,
Atm. Environ.
45
,
14
(
2011
):
p
.
2349
2355
.
14.
Gong
K.
,
Wu
M.
,
Xie
F.
,
Liu
G.
,
Sun
D.
,
Constr. Build. Mater.
260
(
2020
):
p
.
120478
.
15.
API RP 932-B-2019
, “
Design, Materials, Fabrication, Operation, and Inspection Guidelines for Corrosion Control in Hydroprocessing Reactor Effluent Air Cooler Systems
” (
Washington, D.C.
:
American Petroleum Institute
,
2019
).
16.
Yang
J.
,
Li
R.
,
Chen
L.
,
Hu
Y.
,
Dou
Z.
,
Process Safety Environ. Prot.
158
(
2022
):
p
.
418
431
.
17.
Ben Seghier
M.E.A.
,
Höche
D.
,
Zheludkevich
M.
,
J. Nat. Gas Sci. Eng.
99
(
2022
):
p
.
104425
.
18.
Peng
S.
,
Zhang
Z.
,
Liu
E.
,
Liu
W.
,
Qiao
W.
,
J. Nat. Gas Sci. Eng.
85
(
2021
):
p
.
103716
.
19.
Ali
H.A.M.
,
El-Zaidia
E.F.M.
,
Mohamed
R.A.
,
Chin. J. Phys.
67
(
2020
):
p
.
602
614
.
20.
Jin
H.
,
Wu
X.
,
Liu
X.
,
Zhang
L.
,
Gu
Y.
,
Quan
J.
,
Asia-Pac. J. Chem. Eng.
15
,
4
(
2020
):
p
.
e2450
.
21.
Rocabruno-Valdés
C.I.
,
González-Rodriguez
J.G.
,
Díaz-Blanco
Y.
,
Juantorena
A.U.
,
Muñoz-Ledo
J.A.
,
El-Hamzaoui
Y.
,
Hernández
J.A.
,
Renew. Energy
140
(
2019
):
p
.
592
601
.
22.
Jin
H.Z.
,
Gu
Y.
,
Ou
G.F.
,
Petrol. Sci.
18
,
4
(
2021
):
p
.
1219
1229
.
23.
Edelmann
D.
,
Mori
T.F.
,
Szekely
G.J.
,
Stat. Probab. Lett.
169
(
2021
):
p
.
108960
.
24.
Zhou
H.
,
Deng
Z.
,
Xia
Y.
,
Fu
M.
,
Neurocomputing
216
(
2016
):
p
.
208
215
.
25.
Pavanello
D.
,
Zaaiman
W.
,
Colli
A.
,
Heiser
J.
,
Smith
S.
,
J. Atmos. Sol. Terr. Phys.
130
(
2015
):
p
.
142
150
.
26.
Xu
A.
,
Chang
H.
,
Xu
Y.
,
Li
R.
,
Li
X.
,
Zhao
Y.
,
Waste Manage.
124
(
2021
):
p
.
385
402
.
27.
Dixit
M.
,
Daniel
J.
,
Bhattacharyya
S.P.
,
J. Ind. Chem. Soc.
98
,
9
(
2021
):
p
.
100
114
.
28.
Sheng
D.
,
Wei
Y.
,
Chen
Y.
,
Wang
Y.
,
Neurocomputing
408
(
2020
):
p
.
42
50
.
29.
Liu
W.
,
Ma
L.
,
Li
J.
,
Wang
T.
,
Ding
L.
,
Med. Novel Technol. Dev.
12
(
2021
):
p
.
100096
.
30.
Wang
B.
,
Chen
B.
,
Wang
G.
,
Li
R.
,
Wen
J.
,
Lu
C.
,
Tian
R.
,
Deng
J.
,
Ann. Nucl. Energy
148
(
2020
):
p
.
107711
.
31.
Chen
K.-Y.
,
Shaw
Y.-C.
,
Adv. Eng. Informat.
25
,
1
(
2011
):
p
.
11
22
.
32.
Liu
Z.
,
Liu
H.
,
Jia
W.
,
Zhang
D.
,
Tan
J.
,
Adv. Eng. Info.
50
(
2021
):
p
.
101396
.
33.
Bai
B.
,
Zhang
J.
,
Wu
X.
,
Zhu
G.W.
,
Li
X.
,
Expert Syst. Appl.
177
(
2021
):
p
.
114952
.
34.
Zhang
G.
,
Xia
B.
,
Wang
J.
,
J. Energy Storage
44
(
2021
):
p
.
103442
.
35.
Deshwal
D.
,
Sangwan
P.
,
Kumar
D.
,
Appl. Acoust.
164
(
2020
):
p
.
107289
.