This document outlines a thesis on modeling and predicting pipeline corrosion penetration rates during crude oil transportation. The objectives are to review previous studies, model the effects of transportation variables using response surface methodology and fuzzy logic, compare prediction techniques using mean absolute error, and determine optimal variable values. The scope involves collecting field data from a Libyan oil company to calculate actual penetration rates using the NORSOK model and design experiments to model the rate based on temperature, pressure, pH, and shear stress ranges. The results will be analyzed using ANOVA and discussed to show the effects of variables and determine optimal conditions.
2. Thesis Outlines
• Briefly, the structure of this thesis is as follows:
Chapter one A background of CO2 Corrosion, CO2corrosion mechanisms, types of
CO2 Corrosion, prediction CO2 effects on pipeline corrosion penetration rate, objectives
of study and scope of the study.
Chapter two Literature review on some of the related previous researches.
Chapter three The mathematical approaches to model and predict the corrosion
penetration rate.
Chapter four Implementation of the modeling and prediction of the corrosion as
well as their evaluation penetration rate .
Chapter five Conclusions and the recommendations for the future work.
2
3. CO2 Corrosion
Corrosion is defined as destruction or deterioration of the material by chemical or
electrochemical attack.
CO2 corrosion is a significant problem in oil and gas production and transportation
process for many reasons:
Causes failure on the equipment and transportation pipelines (Economy impact),
The breakdowns are followed by large losses of the products ,
environmental pollution and
Ecological disasters
The corrosion penetration rate is an important task needed to manage and control the
corrosion.
Libya is one of the countries of the crude oil and gas production, which is considered as
one of the most important economic resources.
3
4. The mechanism of carbon dioxide corrosion is a complicated process that is influenced by many
factors and conditions as ( temperature, pH, a partial pressure of CO2, etc.)
Aqueous CO₂ corrosion of carbon steel is an electrochemical process involving the anodic
dissolution of iron and the cathodic evolution of hydrogen. The overall reaction is:
Fe + CO₂ + H₂O → FeCO₃ + ↑H₂
CO2 Corrosion Mechanisms
Figure 1. The corrosion process
4
5. can appear in two principal forms:
Pitting (localized attack that results in rapid penetration
and removal of metal at a small discrete area) and
Mesa attack (localized CO₂ corrosion under medium-flow
conditions)]
Two main steps are involved in the localized corrosion
process: initiation, and propagation.
CO₂ corrosion
(sweet corrosion)
H₂S is not corrosive by itself, H₂S when dissolved in water
forms a weak acid, and is the most damaging to drill pipe and
the deterioration of metal .
The corrosion products are iron sulfides (FeSx) and
hydrogen.
(H₂S) corrosion
(sour corrosion) .
Continuously removing the passive layer of corrosion
products from the wall of the pipe.
High turbulence flow regime that it is dependent on the
density and morphology of solids present in the fluid and high
velocities
Erosion corrosion
is normally a localized corrosion taking place in the narrow
clearances or crevices in the metal and the fluid getting
stagnant in the gap.
Crevice corrosion
The effect of coupling two different metals/alloys together.Galvanic
corrosion
Types of Corrosion
Figure 2. Pitting corrosion
Figure 3.Mesa attack
Figure 4. sour corrosion
Figure 6. Galvanic corrosion
Figure 5. crevice corrosion
5
6. Corrosion Assessment
• It Can be made using corrosion monitoring
devices such as:
Electrical Resistant (ER) probes,
Weight loss corrosion coupons,
Linear Polarization Resistance (LPR)
probes
In-Line Inspection there are two primary
types of ILI tools also referred to as smart
or intelligent pigs are :
magnetic flux leakage (MFL) tools
and ultrasonic tools (UT).
• Is structured process is intended to improve safety by assessing
and reducing the impact of external corrosion on pipeline
integrity.
It is based on following four steps:
1.The Pre-Assessment step
2. The Indirect Inspection step uses a above ground survey
techniques such as: (CIPS), (ACVG), (DCVG), AC Attenuation for
the identification of areas with corrosion activities or coating faults
3. The Direct Examination step covers the selection of sites which
requiring repair or replacement.
4. The Assessment step evaluates the previous and establishes a
future assessment schedule.
Internal Corrosion Assessment External Corrosion Assessment
Figure 8. Voltage gradient in the soil surrounding a defect
6Figure7. MFL tool for Pigging of A pipeline
7. Objectives of Study
The main objectives of the study are :
1. Reviewing of some of the previous studies that deal with the problem of pipeline corrosion penetration
rate that are taking place when transporting crude oil.
2. Displaying the effect of crude oil transportation processes variables on the pipeline corrosion penetration
rate.
3. Using a suitable mathematical modelling technique, namely, RSM and FL to model the effect of crude oil
transportation process variables on the pipeline corrosion penetration rate.
4. Developing a suitable prediction technique, by using RSM and FL to predict the effect of crude oil
transportation process variables on the pipeline corrosion penetration rate.
5. Comparing between these prediction techniques will be performed by means of Mean Absolute Error
(MAE) to determining other technique can give results close to real data is as far as possible intended to
replace Norsok software
6. Determining the optimal values of the transportation processes variables under available work
conditions .
7
8. Table1 : Summary of some previous works
Author(s) Year Type of method Name of model Objective Country
1.Grtland and Roy 2003 Risk based inspection
(RBI)
Casandra Corrosion modeling by Risk assessment of
the pipelines
-
2.Rolf Nyborg 2006 Groups of models De Waard- Norsok-Hydrocor-
ECE-Casandra . etc.
Evaluation and Use for Corrosivity
Prediction and Validation of Models I
Norway
3. Nesic S 2007 Mechanistic ,
Electrochemical models
De Waard and Milliams model Modelling of Internal Corrosion of Oil and
Gas Pipelines
USA
4. Vanessa et al 2007 Experimental model rotating cylinder electrode Effect of Organic Acids In Co2 Corrosion Greece
5. Zhang 2009 Electrochemical model De Waard model Reviewing and Investigating of the
Fundamentals of Electrochemical Corrosion
of X65 steel in CO2-Containing Formation
Water in The Presence of Acetic Acid in
Petroleum Production
Norway
6. Badmos et al 2009 Experimental model Weight loss Calculating co2 Corrosion In Petroleum
Pipelines by Weight loss
USA
7. Martin 2009 Experimental model LPR, RCE, Potentiodynamic
sweep
Effect Of Low Concentration Acetic Acid On
Co2 Corrosion In Turbulent Flow Conditions
-
8. Singer 2009 Experimental work Measuring Condensed rate CO2 top of the line corrosion in presence of
acetic acid A parametric study
Greece
9. Rolf Nyborg 2012 Group of co2 corrosion
models
De Waard- Norsok-Hydrocor-
ECE-Casandra . etc.
Evaluation and Use for Corrosivity
Prediction and Validation of Models II
Norway
10. Mysara et al 2011 Empirical model Norsok Co2 Corrosion Prediction Model With
Pipelines Thermal/Hydraulic Models to
Simulate Co2 Corrosion Along Pipelines
Malaysia
11. Mohammed 2011 Experimental model rotating cylinder electrode
(RCE) and weight loss
Corrosion of Carbon Steel in High CO2
Environment: Flow Effect
Greece
12.Iftikhar Ahmad 2011 Pipeline Integrity
Management system
PIM Pipeline Integrity Management Through
Corrosion Mitigation and Inspection Strategy in
Corrosive Environment: An Experience of
Arabian Gulf Oil Company in Libya
Libya
13. P. Asmara, M.C.
Ismail
2013 Empirical model RSM Predict CO2 Corrosion Malaysia8
10. Real CO₂ corrosion
penetration rate will be
calculated by using Norsok
standard M-506 model.
Field data will be collected
from Arabian Gulf Oil
Company, Benghazi (Libya)
that has large network of oil
and gas.
MOL Sarir - Tobruk during
transportation operation 315.6km.
during peroid1/1/2016 to
20/2/2016.. In the technical
affairs department-process
engineering section
The data range for this the
study are pH between 5.1-
5.65, temperature between
44.4 -52.78 ͦ C, shear stress1-
30 Pa and total pressure
between 13.4- 34.2 bar.
The design was generated
and analyzed using
MINITAB16 statistical
Experiments were designed on
the basis of (RSM) is collection of
mathematical and statistically
techniques to model and predict
the effect of crude oil
transportation process variables
on the pipeline CPR
Full factorial design
( two-factorial is widely used in
factor screening experiments, Useful in
the early stages of design experiments
and provides the smallest number of
runs, because there are two only levels
for each factor.
A central composite design (CCD) is the
commonly used in response design
experiments, allows estimation of curvature,
efficiently estimate first-second terms by adding
center and axial points. CCD is used factorial
or fractional factorial and useful in sequential
experiments
Analysis of variance (ANOVA)
will be used to analyze the data.
Fuzzy Logic technique to predict
the effect of crude oil
transportation process variables
on the pipeline corrosion
penetration rate.
The comparison between
these prediction techniques
will be performed based on
Mean Absolute Error
(MAE).
Optimal values of crude oil
transportation process
parameters
11. No Factors Units
Levels
-1 +1
1 pH - 5.51 5.65
2 Temperature ͦ C 44.4 52.78
3 Total pressure bar 13.4 34.2
4 Shear stress Pa 1 30
11
The experimental design is implemented using RSM in two steps:
• Full factorial design (FFD)
•Central composite design (CCD) Table 2
Experimental of parameters
For the four variables the number of runs 31experiments
16 star points (cube points),
Eight axial points and seven center points ,
Six replicates to estimate the experimental error.
Significant value at confidence level of α = 0.05 is selected
The Experiment Design
14. The NORSOK M-506 model
The NORSOK M-506 software
the Norsok standards are developed by the Norwegian petroleum industry to:
o ensure adequate safety and
o calculate the CO₂ corrosion penetration rate on basis of give temperature, pH, partial pressure and shear stress.
Figure 9.The main dialogue box, where all corrosion penetration rate calculations. 14
The model is valid for
5-150 ͦ CTemperature
3.5-6.5pH
0.1-10 barCO ₂ partial pressure
1-100 pashear stress
PH2S > 0.5
The model is not applicable when :
Pco2/PH2S < 20
the total content of
organic exceeds 100
ppm
The model can lead to under prediction of
CPR when:
Pco2 < ,0.5
16. 16
Displaying the effect of crude oil
transportation processes variables on the
pipeline corrosion penetration rate by NORSOK
model as basic
17. effect of Temperature and pH on CPR*****
In Figure 10, shows that:
At low Temperature CO2 corrosion is a function of pH.
When pH reduces due to CPR increases
Figure 10. Corrosion penetration rate at 13.4bar total pressure, 1Pa shear stress , 1.8%mole CO2and
sweet corrosion at pH= 4, 5, 6 and temperature 44.4 to 52.78 ͦ C .
18
corrosion penetration rate(mm/y),
،Temperature ( ° C)
CPR
,Temp(52.78°C).
CPR,
Temp(44.4°C. )
pH
3.142.954
1.981.965
0.660.766
44.4; 2.951779
52.78; 3.144308
44.4; 1.960638
52.78; 1.983495
44.4; 0.757579 52.78; 0.655644
0
0.5
1
1.5
2
2.5
3
3.5
42 44 46 48 50 52 54
Corrosionpenetrationrate/(mm/year)
Temperature / (°C)
pH=4
pH=5
pH=6
18. • According to results were obtained on analysis of
Norsok software in Figures (11-12-13), effect of
shear stress with interval [1, 15.5,30 pa], at pressure
13.4 bar, 4pH found that corrosion penetration rate
increases 3.144, 4.44, 4.82 mm/y respectively, these
confirming with previous researches, which were
proved that at low pH and increasing shear stress
due to increase the corrosion penetration rate.
44.4;
4.522157
52.78;
4.817114
44.4;
3.003718
52.78;
3.038735
44.4;
1.160619
52.78;
1.004453
0
1
2
3
4
5
6
42 44 46 48 50 52 54
corrosionpenetrationrate/
(mm/year)
Temperature / (°C)
pH=
4
pH=
5
pH=
6
44.4;
2.951779
52.78;
3.144308
44.4;
1.960638
52.78;
1.983495
44.4;
0.757579
52.78;
0.655644
0
0.5
1
1.5
2
2.5
3
3.5
42 44 46 48 50 52 54
corrosionpenetrationrate/
(mm/year)
Temperature / (°C)
pH
=4
pH
=5
pH
=6
44.4;
4.167265
52.78;
4.439073
44.4;
2.76799
52.78;
2.80026
44.4;
1.069535
52.78;
0.925625
0
1
2
3
4
5
42 44 46 48 50 52 54
corrosionpenetrationrate
/(mm/year)
Temperature / (°C)
pH=4
pH=5
pH=6
Figure11. Corrosion penetration rate under 13.4bar total pressure,
1Pa shear stress , 1.8%mole CO2and sweet corrosion at pH= 4, 5, 6
and range of temperature 44.4 to 52.78 ͦ C .
Figure 13: Corrosion penetration rate under 13.4bar total pressure, 30Pa shear
stress , 1.8%mole CO2 and sweet corrosion at pH= 4, 5, 6 and range of
temperature 44.4 to 52.78 ͦ C..
Figure 12:Corrosion penetration rate at same the conditions of
temperature 44.4 ͦ C to 52.78 ͦ C, pressure = 13.4 bar, shear stress
= 15.5Pa and 1.8 mole%CO2.
19
corrosion penetration rate(mm/y)pH
30 Pa15.5 Pa1 Pa
4.824.443.1444
2.803.0381.985
1.000.920.6566
19. • Based on analysis of Norsok software in figures (15-16-17),
at effect of shear stress with interval [1,15.5,30 pa], at
pressure 23.8 bar, 4pH found that corrosion penetration rate
increases 5.4, 6.21, 6.78 mm/y respectively, these confirming
with previous researches, which were proved that at low pH
and increasing shear stress due to increase the corrosion
penetration rate.
77.5;
5.489152
150;
1.644413
55.75;
3.239892
41.25;
1.294749
150;
0.0874180
1
2
3
4
5
6
0 50 100 150 200
corrosionpenetrationrate
/(mm/year)
Temperature / (°C)
pH=4
pH=5
pH=6
Figure 15: corrosion penetration rate under 23.8bar total pressure,1 pa
shear stress, 1.8%mole CO2and sweet corrosion at PH=4,5,6 and range
of temperature 0 to 150 ͦ C .
Figure16: corrosion penetration rate under 23.8bar total pressure,
15.5pa shear stress , 1.8%mole CO2 and sweet corrosion at pH= 4,
5, 6 and range of temperature 44.4 to 52.78 ͦ C.
Figure17: corrosion penetration rate at same the conditions of
temperature 44.4 ͦ C to 52.78 ͦ C, pressure = 23.8 bar, shear
stress = 30 pa and 1.8 mole%CO2. 20
corrosion penetration rate(mm/y)
pH
30 Pa15.5 Pa1 Pa
6.786.215.44
4.2783.9113.2395
1.41461.290.0876
20. • According to results were obtained on analysis of Norsok
software in figures (17-18-19), effect of shear stress with
interval [1,15.5,30 pa], at pressure 34.2 bar, 4pH found
that corrosion penetration rate increases 5.24, 7.63, 8.33
mm/y respectively, these confirming with previous
researches, which were proved that at low pH and
increasing shear stress due to increase the corrosion
penetration rate.
44.4;
4.920495
52.78;
5.241433
44.4;
3.268302 52.78;
3.306405
44.4;
1.262853 52.78;
1.092931
0
1
2
3
4
5
6
42 44 46 48 50 52 54
corrosionpenetration
rate/(mm/year)
Temperature / (°C)pH=4 pH=5
Figure 17: Corrosion penetration rate under 34.2bar total pressure, 1Pa shear
stress , 1.8%mole CO2 and sweet corrosion at pH= 4, 5, 6 and range of
temperature 44.4 to 52.78 ͦ C.
Figure 19. Corrosion penetration rate under 34.2bar total
pressure, 30Pa shear stress, 1.8%mole CO2and sweet corrosion
at pH= 4, 5, 6 and range of temperature 44.4 to 52.78 ͦ C.
Figure 18. Corrosion penetration rate under 34.2bar total pressure,
15.5Pa shear stress , 1.8%mole CO2 and sweet corrosion at pH= 4,
5, 6 and range of temperature 44.4 to 52.78 ͦ C.
44.4;
7.81987
52.78;
8.329919
44.4;
5.194132
52.78;
5.254686
44.4;
2.006982
52.78;
1.736935
0
2
4
6
8
10
40 45 50 55
corrosionpenetrationrate/
(mm/year)
Temperature / (°C)pH=4 pH=5
21
corrosion penetration
rate(mm/y)
pH
30 Pa15.5 Pa1 Pa
8.337.625.244
5.254.813.3065
1.7361.591.0926
23. Analysis Response Surface Methodology For Significance Of
Regression Coefficients.
The ANOVA Results
• The p-values that determine whether the effects are significant
or insignificant.
• The value of correlation coefficients values (R² ) =99.83%, the
model is good fit.
• R²(adjusted)= 99.68% confirm that the relationships between
independent factors and response can adequately be explained
by model.
In order to test the significant of each individual term in the
model, results that show corrosion penetration rate is the most
effected by temperature, pressure, pH, shear stress.
It is also obvious that the quadratic effects are insignificant
model term.
Addition to the interaction model effect of (temperature and
shear stress), (pressure and pH), (pressure and shear stress)
and (pH and shear stress) the most significant model on
corrosion penetration rate.
CPR = 2.3 -0.08*T+0.519*P -0.1437*pH+ 0.44* S -
0.0187*T*P -0.1875*T*S-0.03125*P*pH+0.13125*P*S
-0.03125*pH*S
Term Coef SE T p
Constant 2.3001 0.00806 258.282 0.000
Temperature ( ͦC) -0.0812 0.00780 -10.410 0.000
Pressure (bar) 0.5186 0.00780 66.462 0.000
pH -0.1437 0.00780 -18.417 0.000
Shear Stress(P) 0.4436 0.00780 56.853 0.000
Temperature(ͦC)*Temperature( ͦC) - 0.0797 7.64662 -0.010 0.992
Pressure (bar)* Pressure (bar) - 0.0797 7.64662 -0.010 0.992
pH*pH - 0.0797 7.64662 -0.010 0.992
Shear Stress(Pa)*Shear Stress(Pa) - 0.0797 7.64662 -0.010 0.992
Temperature( ͦC)* Pressure (bar) 0.01875 0.0078 -2.403 0.029
Temperature ( ͦ C)*pH 0.00625 0.0078 -0.801 0.4.35
Temperature( ͦC)*Shear Stress (Pa) -.01875 0.0078 -2.054 0.029
Pressure (bar)*pH -.03125 0.0078 -4.004 0.001
Pressure (bar)* Shear Stress(Pa) 0.03125 0.0078 16.818 0.001
pH* Shear Stress(Pa) 0.03125 0.0078 -4.004 0.001
Table6: Analysis of variance and Estimated Regression
Coefficients for corrosion penetration rate
24
24. Figure 20. Probability plot for corrosion penetration rate for sweet
corrosion .
210-1
99.9
99
90
50
10
1
0.1
Residual
Percent
321
2
1
0
-1
Fitted Value
Residual
1.51.00.50.0-0.5-1.0
120
90
60
30
0
Residual
Frequency
180160140120100806040201
2
1
0
-1
Observation Order
Residual
Normal Probability Plot Versus Fits
Histogram Versus Order
Residual Plots for corrosion rate(mm/y)
Figure 4-11(a): Normal plot of Residual Figure 4-11(b): Residual order of data
Figure 4-11(c): Residual frequency Figure 4-11(d): Residual fitted values
Residuals Residuals order of data
Residuals frequency Residuals fitted data
25
25. Analysis of Effect of Process Variables on
Corrosion Penetration Rate(CPR) Using
Response Surface Methodology (RSM).
26
26. Effect Temperature and pH on CPR
• The Figures show prediction of the effect parameters
on corrosion penetration rate (CPR), in both surface
and contour plot of CPR.
• At holds at shear stress 15.5 pa and pressure at 23.8
bar, effect of temperature and pH on CR is presented
in Figure(21),
• The Figure shows that decreasing of temperature and
pH leads to an increase of corrosion penetration rate.
Contour plot shows that CR increases to 2.719mm/y at
temperature=44.46 ͦ C, pH=5.5 is shown in Figure22.
Figure21. Surface plot of CPR (mm/y), temperature,
pH.(pressure=23.8bar,shear stress=15.5 pa).
Temperature(c)
PH
5251504948474645
5.64
5.62
5.60
5.58
5.56
5.54
5.52
Pressure (bar) 23.8
Shear stress(pa) 15.5
Hold Values
>
–
–
–
–
–
–
< 2.1
2.1 2.2
2.2 2.3
2.3 2.4
2.4 2.5
2.5 2.6
2.6 2.7
2.7
rate(mm/y)
corrosion
Contour Plot of corrosion rate(mm/y) vs PH; Temperature(c)
Temperature(c) = 44.4164
PH = 5.51004
corrosion rate(mm/y) = 2.71962
Figure 22. Contour plot of CPR (mm/y), temperature,
pH.(pressure=23.8bar,shear stress=15.5 pa). 27
CPR↑pH↓Temperature↓
27. Effect Temperature and Pressure on CPR
At shear stress=15.5 Pa and pH=5.58 , effect of
temperature and shear stress on CPR is presented in
Figure 25.
The figure shows that increasing of pressure and
decreasing of temperature leads to an increase of
corrosion penetration rate.
Effect of pressure is more dominant than temperature
on corrosion penetration rate .
Contour plot shows that CPR increases to reach to
2.719 mm/y at temperature=44.46 ͦ C, pressure =34.19
bar as shown in Figure 26.
Temperature(c)
Pressure(bar)
5251504948474645
32.5
30.0
27.5
25.0
22.5
20.0
17.5
15.0
PH 5.58
Shear stress(pa) 15.5
Hold Values
>
–
–
–
–
< 1.8
1.8 2.0
2.0 2.2
2.2 2.4
2.4 2.6
2.6
rate(mm/y)
corrosion
Contour Plot of corrosion rate(mm/y) vs Pressure (bar); Temperature(c)
Temperature(c) = 44.4164
Pressure (bar) = 34.1879
corrosion rate(mm/y) = 2.74463
Figure 25.Surface plot of CPR(mm/y), temperature,
pressure.(shear stress=15.5Pa, pH=5.58).
Figure 26. Contour plot of CPR(mm/y), temperature,
pressure.(shear stress=15.5 Pa, pH=5.58).
29
CPR↑Pressure↑Temperature↓
28. Effect Shear stress and pH on CPR
At temperature=48.59 ͦ C and pressure=23.8
bar , effect of pH and shear stress on CPR is
presented in Figure 27,
The Figure shows that increasing of shear
stress and decreasing of pH leads to an
increasing of corrosion penetration rate.
Contour plot shows that CPR increases to
reach to 2.73mm/y at pH=5.51, shear stress
=29.9Pa is shown in Figure 28.
Figure 27.Surface plot of CPR(mm/y),pH, shear
stress.(pressure=23.8 Pa, temperature=48.9 ͦ C).
PH
Shearstress(pa) 5.645.625.605.585.565.545.52
30
25
20
15
10
5
Temperature(c) 48.59
Pressure (bar) 23.8
Hold Values
>
–
–
–
–
< 1.50
1.50 1.75
1.75 2.00
2.00 2.25
2.25 2.50
2.50
rate(mm/y)
corrosion
Contour Plot of corrosion rate(mm/y) vs Shear stress(pa); PH
PH = 5.51041
Shear stress(pa) = 29.9326
corrosion rate(mm/y) = 2.73829
Figur28.Contour plot of CPR(mm/y), pH, shear
stress.(pressure=23.8 Pa, temperature=48.9 ͦ C).
30
CPR↑Shear stress↑pH↓
29. Effect Pressure and pH on CPR
At temperature=48.59 ͦ C and shear
stress=15.5 Pa ,
Effect of pressure at higher values and
difference values of pH on CPR is
presented in Figure 29,
The figure shows that increasing of pressure
and at decreasing of pH leads to an
increase of corrosion penetration rate, but
at decreasing the pressure with increasing
of pH leads to decrease of corrosion
penetration rate.
Contour plot shows that CPR increases to
reach to 2.79mm/y at pH=5.51, pressure
=34.10 bar as shown in Figure30.
Figure 29. Surface plot of CPR(mm/y), pH, pressure.(shear
stress=15.5 Pa, temperature=48.9 ͦ C).
Pressure (bar)
PH
32.530.027.525.022.520.017.515.0
5.64
5.62
5.60
5.58
5.56
5.54
5.52
Temperature(c) 48.59
Shear stress(pa) 15.5
Hold Values
>
–
–
–
–
–
–
< 1.6
1.6 1.8
1.8 2.0
2.0 2.2
2.2 2.4
2.4 2.6
2.6 2.8
2.8
rate(mm/y)
corrosion
Contour Plot of corrosion rate(mm/y) vs PH; Pressure (bar)
Pressure (bar) = 34.1024
PH = 5.51790
corrosion rate(mm/y) = 2.79534
Figure 30. Contour plot of CPR(mm/y), pH, pressure.(shear
stress=15.5 Pa, temperature=48.9 ͦ C).
31
CPR↑Pressure↑pH↓
30. Effect Pressure and Shear stress on CPR
Figure31,shows that the corrosion penetration
rate decreases with low pressure and stress
shear, when low values of the pressure and
increasing the shear stress noted an increase in
the values of the corrosion penetration rate, and
if the increase both increase the corrosion
penetration rate to a maximum value.
In Figure 32, shows at an increase the pressure
and shear stress leads to the corrosion
penetration rate increases, when the highest
value for the pressure = 33.98 bar and shear
stress= 29.77 pa, the highest of the rate of
corrosion = 2.94mm/y.
Based on these the analysis above, it is
necessary to determine the optimizing situation
for each parameter and response.
Figure 31. Surface plot of CPR(mm/y), shear stress,
pressure.(pH=5.58,temperature=48.9 ͦ C).
Pressure (bar)
Shearstress(pa)
32.530.027.525.022.520.017.515.0
30
25
20
15
10
5
Temperature(c) 48.59
PH 5.58
Hold Values
>
–
–
–
–
–
< 1.50
1.50 1.75
1.75 2.00
2.00 2.25
2.25 2.50
2.50 2.75
2.75
rate(mm/y)
corrosion
Contour Plot of corrosion rate(m vs Shear stress(pa); Pressure (bar)
Pressure (bar) = 33.9675
Shear stress(pa) = 29.7659
corrosion rate(mm/y) = 2.94134
Figure 32. Contour plot of CPR(mm/y), shear stress,
pressure.(pH=5.58, temperature=48.9 ͦ C).
32
CPR↑Shear stress↑Pressure↑
31. D
th
P
33
Fuzzy Logic
model
Prof. Lotfi A. Zadeh suggests by his principle
of incompatibility: “The closer one looks at a
real-world problem, the fuzzier becomes the
solution,”
32. Fuzzy logic
• .
• Fuzzy Logic (FL) is based on Fuzzy Set Theory that was established in 1965
• The information required for the initial analysis and design of the system is divided in two kinds:
numerical and linguistic information obtained from skilled human beings.
• These systems are then calibrated until results start producing answers closer to the original goal.
• Simulations are ran to validate the system and prove its correct performance for the specific
problem
• Sampled input-output pairs are recorded by the human expert. Human experience is presented
as a set of IF-THEN rules explaining under what conditions what action should be taken.
• The types of information are different in nature but they both have a common characteristic
• Although the system can be controlled successfully by a human operator.
• Numerical data is not enough to predict future control situations.
• The investigation based on fuzzy-logic finds applications are in unclear and undecided
environment.
• In the recent research trends, fuzzy-logic-based multi-criteria decision making techniques have
become very popular in doing optimization of different manufacturing processes 34
33. The Mamdani-type
Inference process there are two main types of Fuzzy Inference Systems (FIS): The Mamdani-type and
the SUGENO-type .
• The Mamdani FIS is more widely used,
• Mostly because it provides reasonable results with a relatively simple structure, and
• Also due to the intuitive and interpretable nature of the rule base.
• The Mamdani FIS can be used directly for either MISO systems and MIMO systems
• Fuzzy inference is the process of formulating the mapping from a given input to an output using fuzzy
logic
• The mapping then provides a basis from which decisions can be made, or patterns discerned.
• Fuzzy logic and the concept of linguistic variables have found a number of applications in such
diverse fields as:
• industrial process control,
• medical diagnosis, assessment of credit worthiness
• risk analysis
35
34. Mamdani type can be summarized as the
following:
• Step 1: Identify the principal input, output and
process tasks.
• Step 2: Identify linguistic variables used and
define fuzzy sets and memberships accordingly.
• Fuzzification is the process of transforming crisp
(bivalued) input values into linguistic,
• —Step 3: Use these fuzzy sets and linguistic
variables to form procedural rules.
• Step 4: Determine the defuzzification method
all steps are shown in Figure 33.
Figure 33. Steps of Fuzzy Control System
Step 1
Step 4
Step 2
Step 3
36
36. Step 1: Identify the principal input, output and process tasks.
OUTPUTINPUT
Step 2: Identify linguistic variablesused and define fuzzy sets and memberships accordingly.
Figure 39. Control membership function by "Edit" menu
Figure 38. The four inputs-one output in "FIS Editor"
39
The structure of the four inputs and one outputs fuzzy logic controllerdevelopedfor this work is shown in
Figure 38.
Linguistic variables :are defined as the variables whose values are sentences in natural language such as l (low,
medium and high) and can be represented by fuzzy sets.
Fuzzy sets : where many degrees of membership are allowed with number between 0 and 1
A fuzzy set :is an extension of a classical set.
Memberships functions : are mathematical tools for indicating flexible memberships to a set,
37. The fuzzy inputs are linguisticallydivided into
three levelssuch as low, medium and high which is
shown in Figure 40.
Figure 41 shows the fuzzy output linguistically
divided into five levels such as very low, low,
medium, high and very high
40
(a) Temperature
(b) Pressure (bar)
(c) pH
(d) shear stress (Pa).
Figure40: Membership functionsfor inputs process parameters
Figure 41: Membership functions for outputs(CPR)
mm/y
DegreeofmembershipDegreeofmembershipDegreeofmembershipDegreeofmembership
Step 2: Identify linguistic variablesused and
define fuzzy sets and memberships accordingly.
38. Step 3: Use fuzzy sets and linguistic variables to form procedural rules.
Table 6
Fuzzy Rule For corrosion penetration rate Of API X52 Composites
X1, x2,x3,x4,: fuzzy inputs and Y is fuzz out put (CPR).
Ai, Bi, Ci, Di and Fi are fuzzy sets: , i=1,2,3,..31rules
fuzzy sets that corresponding membership functions, i.e.,
μAi (x1), μBi (x2), μCi (x3), μDi( x4) and μFi(y) . .
the rule set is represented by union of these rules.
Based on the descriptions of the input and output variables
defined with the FIS Editor,
the Rule Editor allows to construct the rule statements
automatically, From the GUI (graphical user interface)
For example:
Rule1. If (Temperature ( ͦ C) is Med) and (pressure(bar) is Med)
and (pH is Med) and (Shear Stress(Pa) is Med) then (corrosion
penetration rate(mm/y) is High) (0.75)
43
Rule i: if x1is Ai, x2is Bi, x3is Ci and x 4 is Di then y is Fi
weight
Figure42 . The rule editor window
40. Step 4: Determine the defuzzification method.
Defuzzification converts the fuzzy values into crisp (bivalued) value, methods of
defuzzification:
Centroid method Calculation :
1. Multiply the weighted strength of each output member function by the respective member
function center points
2. Add these values
3. Divide area by the sum of the weighted member function .
Are shown in Table 7 and corrosion penetration rate is 2.17 mm/y.
The Root-sum-square: a combination scale functions to respective magnitudes
with root of sum of squares, and compute fuzzy centroid of composite area.
1. Multiply the scale function of each output member function by the respective fuzzy
centroid of composite area
2. Add these values
3. Divide area by the sum of the combination scale function .
Table7: Calculating the CPR Of The Output Fuzzy
Region
Corrosionpenetrationrate=
𝒄𝒆𝒏𝒕𝒆𝒓∗𝒘𝒆𝒊𝒈𝒉𝒕
𝒘𝒆𝒊𝒈𝒉𝒕
= 2.17mm/y.
45
Center
(mm/y)
weight Center* weight
2.3 0.75 1.725
2.3 0.75 1.725
2.11 0.01 0.0211
1.07 1 1.07
2.3 0.75 1.725
2.3 0.75 1.725
1.54 0.02 0.0308
3.19 0.45 1.4355
2.3 0.75 1.725
2.3 0.75 1.725
2.3 0.75 1.725
1.15 0.02 0.023
2.3 0.75 1.725
2.78 0.75 2.085
1.99 1 1.99
1.99 1 1.99
2.3 0.75 1.725
1.84 0.70 1.288
1.07 0.45 0.4815
1.54 0.01 0.0154
2.3 0.75 1.725
3.2 0.6 1.92
2.3 0.75 1.725
2.3 0.75 1.725
1.54 0.01 0.0154
3.06 0.02 0.0612
2.3 0.75 1.725
2.2 1 2.2
2.3 0.75 1.725
Very low = √(12+0.022+0.452+12= 1.097
Low =√(0.012+0.022 +0.72+0.012+0.012+0.012 +12= 1.221
Med =√ 12 + 12 +12=1.732
High =√0.752*16 = 3
Very High=√ 0.452+0.62+0.022= 0.563
CPR=
1.097∗1+1.221∗1.309+1.732∗1.995+3∗2.797+0.563∗3.4
1.097+1.221+1.732+3+0.563
=2.16
mm/y
42. Exp.
No
Predicted CPR,
Using RSM (mm/y)
FL predicted
result
Experimental
CPR,
Using (Norsok)
Error for
RSM
Error for
Fuzzy
1 2.32 2.3 2.3 0.02 0
2 2.30 2.3 2.3 0 0
3 2.30 2.11 2.1 0.2 0.01
4 1.52 1.07 1.0 0.52 0.07
5 2.29 2.3 2.3 0.01 0
6 2.31 2.3 2.3 0.01 0
7 2.19 1.54 1.7 0.49 0.16
8 3.88 3.19 3.4 0.48 0.21
9 2.33 2.3 2.3 0.03 0
10 2.30 2.3 2.3 0 0
11 2.30 2.3 2.3 0 0
12 1.68 1.15 1.2 0.48 0.05
13 2.28 2.3 2.3 0.02 0
14 2.90 2.78 2.7 0.2 0.08
15 2.02 1.99 1.9 0.12 0.09
16 2.48 1.99 2.0 0.48 0.01
17 2.30 2.3 2.3 0 0
18 1.98 1.84 1.8 0.18 0.04
19 1.26 1.07 1.1 0.16 0.03
20 1.70 1.54 1.6 0.1 0.06
21 2.30 2.3 2.3 0 0
22 3.31 3.2 3.2 0.11 0
23 2.30 2.3 2.3 0 0
24 2.27 2.3 2.3 0.03 0
25 2.19 1.54 1.7 0.49 0.16
26 3.47 3.06 3.0 0.47 0.06
27 2.30 2.3 2.3 0 0
28 2.48 2.2 2.0 0.48 0.2
29 2.30 2.3 2.3 0 0
30 2.30 2.3 2.3 0 0
31 1.43 1.35 1.3 0.13 0.05
MAE 0.1681 0.0412
Table 8:The Experimental, Predicted And Mean Absolute Error of The Corrosion Rate
The Mean Absolute Error is calculated as :
MAERSM=
Σ|Experimental result − RSM predicted result|
runs of experiments
=0.1681
MAEFL =
Σ|Experimental result − FL predicted result|
runs of experiments
= 0.0412
• The results from fuzzy logic simulation indicated that the
predicted and experimental values closely agreed
• In some cases, the predicted and experimental values are
observed to be little deviated. That might be due to some
experimental error
• The predicted results using fuzzy logic model
has reduced the errors by 0.1269 mm/y,
0
0.5
1
1.5
2
2.5
3
3.5
4
4.5
1 4 7 10 13 16 19 22 25 28
corrosionpenetrationratemm/y
Predicted CPR,
Using RSM
,(mm/y)
FL Predicted
result
Experimental
CPR, Using (
Norsok)
Experiment Number
Figure 44.Comparison of results between, Predicted CPR using RSM and Predicted using Fuzzy logic
43. CONCLUSIONS
1. Based on ANOVA analysis, the individual and interaction order have significant effect on CPR, while the
quadratic effect was insignificant.
2. Based on comparison between models that were developed by using fuzzy logic and RSM technique, it was
concluded that, models based on fuzzy logic were better with mean absolute error of 0.0412 with in
comparison 0.1681 for RSM.
3. The optimal values for the numerically calculated CPR using the fuzzy logic model with the formula using
Root- Sum Square, are CPR=2.16 mm/y, temperature=44.4 ͦ C, pressure=34.28bar, pH=5.51and shear
stress=1Pa.
4. The study proved that there are other technique can give results close to real data instead of Norsok
software .
49
44. Recommendations for Future Work
1. This study dealt with certain duration from first of January to twentieth of February (2016). Selection of
different durations of work conditions is needed to obtain other ranges of input parameters for year the effect on
corrosion penetration rate.
2. Other input parameters such as flow rate and acetic acid must be considered, because they have important
effects on the corrosion penetration rate.
3. In the oil extraction and processing industries, inhibitors have always been considered to be the first line of
defense against corrosion. So the efficiency of inhibitors that have very important effect on elimination corrosion
penetration rate can be investigated .
4. The corrosion penetration rate which sometimes causes failure, it must be considered to locate the corrosion
and to estimate the pipeline life.
5. Other prediction techniques such as Artificial Neural Network, Nero-fuzzy might be implemented to model
and predict the corrosion penetration rate.
50