CET vol 99 DOI: 10.3303/CET2399057 Paper Received: 12 January 2023; Revised: 11 March 2023; Accepted: 19 April 2023 Please cite this article as: Ancione G., Bartolozzi V., Bragatto P., Milazzo M.F., 2023, Monitoring Equipment Corrosion due to Sour Crude Oils: a Bayesian Approach, Chemical Engineering Transactions, 99, 337-342 DOI:10.3303/CET2399057 CHEMICAL ENGINEERING TRANSACTIONS VOL. 99, 2023 A publication of The Italian Association of Chemical Engineering Online at www.cetjournal.it Guest Editors: Sauro Pierucci, Flavio Manenti Copyright © 2023, AIDIC Servizi S.r.l. ISBN 978-88-95608-98-3; ISSN 2283-9216 Monitoring Equipment Corrosion due to Sour Crude Oils: a Bayesian Approach Giuseppa Ancionea, Vincenzo Bartolozzib, Paolo Bragattoc*, Maria Francesca Milazzob a Department of Engineering, University of Messina, Contrada di Dio, 98166, Messina, Italy b Agenzia Regionale per la Protezione dell’ Ambiente, Lungomare Cristoforo Colombo snc, 90149 Palermo, Italy c Department of Engineering, Università Campus Biomedico, via Álvaro del Portillo, 21, 00128 Roma, Italy p.bragatto@unicampus.it Sour crude oils, featuring high sulphur content and high acidity, have low costs and high availability. Although processing is more difficult, these oils represent a good opportunity for many refineries, but their treatment causes accelerated equipment deterioration due to corrosion. This work focuses on the control of corrosion due to sulphur, which is one of the most important damage mechanisms triggering random ruptures. A Bayesian Belief Network (BBN) has been developed to control the risk of release due to random ruptures. The rules used in developing the BBN are the relationships amongst parameters described in the API guidelines for the calculation of the corrosion rate. The temperature, sulphur content and acidity for a set of online hangers have been measured for a month. The BBN provides a stress indicator for the equipment, which is updated by the last-minute changes, according to the characteristics of the feed and the operating parameters. The indicator allows updating the residual useful lifetime (RUL) and can be used for immediate choices to mitigate the effects of the aggressive feeds and is also essential to address decisions about inspections and maintenance in order to manage corrosion and prevent ruptures. The indicator could be, furthermore, used in the evaluation of the additional costs deriving from the choice of processing sour crude oils to adequately support the decision- making of the typologies of crude to be treated. 1. Introduction Sulphur is commonly found in crude oil and petroleum products. If its concentration is high, the formation of sulphur dioxide is possible. Therefore, the presence of sulphur in fossil fuels is harmful for the environment due to the release of its dioxide (Tavan et al., 2020). Sulphur oxides are also undesired compounds in the products of crude oil distillation, as they poison the catalysts used in the refining units and also cause equipment deterioration (Mohammadi et al., 2022). The deterioration can be more severe depending on the crude acidity due to the naphthenic acid (Speight, 1999; Bamos et al., 2009; Afaf et al., 2015). For these reasons, crude oils with high sulphur content have a lower economic value. Sour crude oils, featuring high sulphur content and high acidity, have lower costs and higher availability thus, in order to seize market opportunities, many refineries organise their processes to be able in treating even aggressive and variegate diverse crude oils. In some refineries, a cargo tanker can be processed in a couple of days, therefore the chemical characteristics of the feed change more times than once a week. Although their processing is more difficult and has the drawbacks mentioned above, they represent a good economic opportunity for refineries. Deterioration effects have been studied for decades, hence the law governing the chemical phenomenon is currently well-known (API, 2016; API, 2019). Equipment deterioration is the cause of random ruptures and the release of hazardous substances, therefore it affects the risk and needs to be monitored to update the risk. Risk assessment and management tools are still inadequate, as the risk level is currently updated on a multi-annual basis. In many cases, the risk of accidental rupture of critical equipment varies up to nearly two orders depending on the characteristics of the feed. A dynamic assessment is essential to manage risk every day, as well as to support strategic decisions. The use of Bayesian Belief Networks (BBN) is popular in different fields for the 337 modelling dependencies amongst variables and conducting inferences (Vairo et al., 2019). Thus, a BBN can support in establishing the correlation between factors influencing corrosion and updating the information about the equipment conditions. In this work, a BBN has been developed to control the risk of release due to random ruptures; its development is based on the corrosion law available in the literature and trained with monitoring data. The BBN provides a stress indicator for the equipment, which is updated by the last-minute changes (i.e. according to the characteristics of the feed and monitored operating parameters) to calculate the Residual Useful Lifetime (RUL) for the equipment. In the current practice, the RUL of critical equipment is calculated a priori during periodic shutdowns and internal inspections and accounts for the average equipment condition. The Integrated Operative Windows (IOW) introduced some flexibility into the working practice (API, 2014), nevertheless the proposed method is an even more dynamic approach. IOW basically take into account occasional breaches to safer operating parameters that occasionally occur during the plant’s operation. These variations may be due to the characteristics of the crudes processed and their effect is reflected in corrections of RUL expectations. The proposed approach tries to overcome the limits of this an approach by exploiting the strength of the developed BBN. The BBN has been developed to monitor the effect of naphthenic acid and sulphide corrosion, which is one of the damage mechanisms mostly affecting heat exchangers. The paper is structured as follows: Section 2 presents the method proposed for the monitoring of equipment conditions; Section 3 describes the case-study where the method has been applied. Section 4 shows the results of the study. A few conclusions are given in Section 5. 2. Methodology A Bayesian Belief Network has been developed to monitor the conditions of equipment affected by naphthenic acid and sulphide corrosion (Figure 1). The BBN has been built by taking into account the relationships between the process parameters (temperature, sulphur and acidity) and the corrosion rate as included, in the API 581 guidelines (API, 2016, i.e. Table 2.B.3.2M “High Temperature Sulfidic and Naphthenic Acid Corrosion – Estimated Corrosion Rates for Carbon Steel”). A further extension to the API’s table can be obtained by integrating the McConomy curves (Sharifi-Asl et al., 2017). Then, the knowledge that derives from the experimental works of scholars can be updated by means of periodically measured data. Within the BBN, a set of variables that influence the corrosion represent the nodes, these are connected to each other through oriented arcs creating a hierarchy between the parent and child nodes. The relationships highlight the dependencies between variables and allow expression the joint probability distribution. The BBN describes the behaviour of a given variable as the state of a parent node varies. Each node of the network has discrete states and, once the relationships have been created, the criteria for attributing the conditioned probabilities to the various states are defined with the aim of updating a probability distribution for a stress indicator of the equipment (target node). Figure 1: Relationship amongst parameters affecting equipment condition and RUL updating. 3. Case-study The BBN has been developed with respect to a case study, which is the preheating unit of a topping distillation reconstructed in order to contain the essential items (Figure 2). Within the unit, the crude oil (feed) leaves the flashing and desalting equipment and enters the preheating unit at 150°C. It passes through some of the exchangers (E1-E2) and the temperature of the crude oil increases about a hundred degrees. Before being sent 338 to the distillation unit, the feed enters the furnace (F1) and its temperature reaches a value up to 350°C. The heat exchangers are made by carbon steel, as well as the connecting lines, the oven and the column. Sulfidic and naphthenic acid corrosion is the dominant damage mechanism. The process parameters have been monitored in the last heat exchanger E2 (location M1) of the pre-heating zone and in the piping at the exit of the furnace F1 (location M2) because the inlet and outlet of the oven and related piping are the most critical points, given that the corrosion rate highly depends on the temperature. The construction materials in the monitoring points are different as the temperature is about 280°C in M1 and 350°C in M2. The carbon steel and low alloy steel 5g are respectively used for lower and higher temperatures. Therefore, the relationships extracted from the API 581 (API, 2019) to learn the BBN are different. In M1 and M2, the temperature, sulphur content and acidity have been measured on an hourly basis over one month; monitoring data have been used to fine-tune the BBN. Table 1 shows the typical classes used in the API standard for sulphur, acidity (TAN), temperatures and corrosion rate and the state defined in this work for the nodes of the BBN. There are two further nodes, the initial condition and the stress factor, which are defined by expert judgments. The former represents an initial qualitative evaluation of the equipment, the latter gives a qualitative combination of the equipment’s initial condition and the corrosion rate (when the initial conditions are good and the corrosion rate is low, the equipment has low stress and vice versa. Figure 2: Simplified scheme of the preheating unit of a topping in a refinery. Table 1: Classes for sulphur, acidity (TAN), and temperature. Temperature(°C) TAN (mg KOH/g) Sulphur (%wt) Corrosion rate (mm/y) State name Range State name Range carbon steel Range low alloy steel 5g State name Range State name Range 1 T<232 ultra low TAN<0.48 TAN<0.9 very low S<0.3 very low r<0.08 2 232≤T<260 low 0.48≤TAN <1.08 0.9≤TAN <1.42 low 0.3≤S<0.5 low 0.08≤r<0.16 3 260≤T<288 medium 1.08≤TAN <2.25 1.42≤TAN <2.37 medium low 0.5≤S<1.0 5 medium low 0.16≤r<0.32 4 288≤T<315 high 2.25≤TAN <3.5 2.37≤TAN <3.5 medium high 1.5≤S<2 medium 0.32≤r<0.64 5 315≤T<343 very high TAN>3.5 TAN>3.5 high 2≤S<2.75 medium high 0.64≤r<1.28 6 343≤T<371 very high S>2.75 high 1.28≤r<2.56 7 371≤T<392 very high 2.56≤r<5.12 8 T>392 ultra high r>5.12 339 4. Results The BBN includes three parent nodes, representing the input data (temperature, sulphur and TAN) collected on an hourly basis. An intermediate node represents the corrosion rate, which depends on the three input nodes and is a deterministic function. The states of the input and intermediate nodes have been established to exactly match API 581 tables (Table 1). A critical discussion of the API is not the focus of this research, as they are used only to introduce the McConomy curves into the network. The initial conditions of the equipment are represented by another node; these are a priori assumed to be adequate or good. The stress factor depends on the initial conditions and the corrosion over the monitoring period. Finally, the rules matching the corrosion rate and the equipment’s initial conditions to the stress factor are probabilistic and based on expert opinions as gathered within this work. It must be pointed the network learns by different API tables being the two critical elements made of different materials, i.e. carbon steel and low alloyed steel 5g. Temperatures are also different, whereas TAN and sulphur are the same. At the begin (to) the RUL is calculated with conventional methods and the initial conditions are the best. After a certain observation period, the stress factor is calculated by the BBN and is used to update the RUL and the "initial condition" data to be used as input for the following update. Available hourly temperature data covers four weeks and allows the network training. To have a proper dataset for the validation of the network, some sequences of credible TAN, sulphur and temperatures have been generated, suitable for covering long periods and thus obtaining subsequent confirmations of the results. The variation of the characteristics of the feed (sulphur and TAN) have been generated with a fairly simple random algorithm, which permits a draw among a number of different crude oils. The period of treatment of a crude oil is also subject to randomness, starting from a minimum of 48 hours with variable extensions up to 100 hours, depending on the size of the tankers. In the detail, 15 different types of crude oil (available on the market) have been considered, each one characterised by a specific TAN and sulphur content. Table 2 shows the simulated data for each crude oil, over an entire year, these are indicated with a numerical identifier and the characteristics of acidity and sulphur content are reported. Table 2: Characteristics of the crude oil treated in the establishment. Crude oil #1 #2 #3 #4 #5 #6 #7 #8 #9 #10 #11 #12 #13 #14 #15 Sulphur 0.2 2.6 4.1 5.5 0.5 0.5 3.2 0.1 2.3 2 2.7 2.4 1.4 3.2 0.3 TAN 0.3 3.4 0.2 1.2 0 1.6 2.5 0.4 1.6 0.1 3.7 0.1 0.1 0.6 0.9 The temperature simulation uses Markov chains. By monitoring the real data in M1 and M2, it has been observed that the temperatures detected are distributed between two states, corresponding to two temperature classes of the API tables. The transition probabilities between the two states have been calculated based on real data. The same transition probabilities are used for the generation of the sequences, adding a little random disturbance. Finally, a simulated year has been obtained with data is generated on an hourly basis. (a) (b) Figure 3: BBN stress factor calculation (a) for item M1 (carbon steel); (b) for item M2 low alloy steel 5g. 340 At the beginning of the year, the RUL a priori is assumed to be 10 years. The experimental data of the first four weeks has been exploited to train the network both for item 1 and item 2. Figure 3 gives the stress factor calculation for the first quarter in M1 and M2. For the following quarters the initial conditions are those obtained from the previous quarter. The calculated stress factor has been used to update the RUL taking into account the elapsed time. This procedure is repeated for each quarter until the end of the year. The comparison with the experts has allowed the subsequent adjustment of the tables that relate initial conditions and stress factors. The stress factor node represents the condition of the equipment, accounting for the cumulative effects of corrosion, and is defined by two states, i.e. high and low. The high stress state indicates a worsening of the conditions compared to the norm, while the low state indicates a limited worsening. Information about the equipment status can be used to change the RUL. The RUL that is updated based on the simple subtraction of the passing years is the so-called RUL a priori (Equation 1); the dynamic update considers that the years to be subtracted can be more than the actual ones depending on the percentage of high stress Shigh, this means that the RUL at a given time becomes lower than that calculated a priori (Equation 2): o o( ) ( )RUL t t RUL t t+  = − (1) o o( ) ( ) (1 )highRUL t t RUL t t s+ = −  + (2) By using Equation 2, the trend of the RUL(to + t) is clearly understood. The formula shows that if the high stress probability is 0 then the RUL(to + t) would coincide with the value calculated a priori, since the high stress value is different from 0 there will be a penalty in terms of reduction of the RUL. Currently the formula needs of validation, which can be done using field experiences or taking into account the opinion of experts. The validation could lead to the introduction of an appropriate correction factor in Equation 2, alternatively, in the absence of such information, a penalty factor can be used which would provide conservative estimates. (a) (b) Figure 4: A priori and dynamic estimates of expected RUL after one year of operation for M1 (a) and M2 (b). 341 Figure 4 shows the trend of the dynamic RUL, updated every quarter and compared with the previous one for the two critical items M1 (Heath Exchanger – Carbon Steel) and M2 (Pipe – Low Alloy Steel 5g) 5. Conclusions The developed method makes it possible to manage the RUL of critical equipment, even for systems subject to the great variability of feeds. The method has been tested for two different equipment using both real and simulated data. While the API documents provide adequate information about the dependences of the corrosion rate on the temperature, acidity and sulphur content, the relationship between the corrosion rate, the initial conditions and the stress factor have been defined by the experience of the authors, which can be made less subjective by extending the audience of experts to establishment operators. By comparing the approach with the use of IOW, the advantage is the greater flexibility and versatility which truly allows handling any type of crude oil, which is different from facing a few deviations from normal processing The Bayesian method has shown all its strength in this application because it also allows capitalizing on the experience and competence of the operators. The petroleum sector currently must face great challenges and to be able to safely process aggressive crude oils is a great advantage for the refineries. The ecological transition will soon pose further challenges to the refineries themselves, in particular, the processing of oils and by-products having a biological origin. For these cases, the variability and difficulty could be even greater. Nomenclature r – Corrosion rate, mm/y RUL – Residual Useful Lifetime, d s – stress factor, dimensionless S – sulphur content – %wt t – time, d T – temperature – °C TAN – crude acidity – mg KOH/g Acknowledgments This research is funded by INAIL within the framework of the call BRIC/2019/ID2 (Project DYN-RISK). The authors would like to thank the company ISAB s.r.l. for the useful discussions supporting this work. References Afaf G.A., Badia H.A., Hassan E.E., 2015, Corrosion management methods of high TAN crude case study: (fula crude oil-sudan), American scientific research journal for engineering, technology, and sciences (ASRJETS), 11(1), 1-7. API (American Petroleum Institute), 2014, Integrity Operating Windows, API RP 584, API Publishing Services, Washington. API (American Petroleum Institute), 2016, Risk-Based Inspection Methodology, API RP 581, 3rd ed. API Publishing Services, Washington. API (American Petroleum Institute), 2019, Guidelines for Avoiding Sulfidation Corrosion Failures in Oil Refinery. API RP 939-C, 2nd ed. Publishing Services, Washington. Badmos A.Y., Ajimotakan H.A., Emmanuel E.O., 2009, Corrosion in petroleum pipelines, New York science journal, 2(5), 36-40. Mohammadi M., Khorrami M.K., Vatanparast H., Karimi A., Sadrara M., 2022, Classification and determination of sulfur content in crude oil samples by infrared spectrometry, Infrared Physics & Technology, 127, 104382. Sharifi-Asl S., Liang A., Cooke D., Chapman D.R., Chaloner-Gill B., Kuperman A.E., 2017, High-temperature sulfidic corrosion of carbon steel in model oil/sulfur compound blends, Corrosion, OnePetro. Speight J.G., 1999, The chemistry and technology of petroleum, 3rd ed. New York: Marcel Dekker. Tavan Y., Shahrokhi M., Farhadi F., 2020, Electrochemical oxidative desulfurization for high sulfur content crude gas-oil, Separation and Purification Technology, 248, 117117. Vairo T., Milazzo M.F., Bragatto P., Fabiano B., 2019, A Dynamic Approach to Fault Tree Analysis based on Bayesian Beliefs Networks, Chemical Engineering Transactions, 77, 829–834. 342 314bragatto.pdf Monitoring Equipment Corrosion due to Sour Crude Oils: a Bayesian Approach