Skip to contents

Corrosion diagnostics

By using of b31crvl() simply imitate the output of CRVL.BAS which is the honored software for determining the allowable length and maximum allowable working pressure presented in ASME B31G-1991:

library(pipenostics)
    
b31crvl(
  maop = 910, d = 30, wth = .438, smys = 52000, def  = .72, depth = .1, l = 7.5
)
#> 
#> -- Calculated data --
#> Intermediate factor (A) = 1.847
#> Design pressure = 1093 PSI; Safe pressure = 1093 PSI
#> Pipe may be operated safely at MAOP, 910 PSI
#> With corrosion length 7.500 inch, maximum allowed corrosion depth is 0.2490 inch; A = 1.847
#> With corrosion depth 0.100 inch, maximum allowed corrosion length is Inf inch; A = 5.000

Probability of failure

Let’s consider a pipe in district heating network with

diameter           <- 762         # [mm]
wall_thickness     <-  10         # [mm]
UTS                <- 434.3697    # [MPa]

which transfers heat-carrier (water) at

operating_pressure <-   0.588399  # [MPa]
temperature        <-  95         # [°C]

During inline inspection four corroded areas (defects) are detected with:

depth  <- c(2.45,  7.86,   7.93,   8.15)  # [mm]

whereas the length of all defects is not greater 200 mm:

length <- rep(200, 4)  # [mm]
print(length)
#> [1] 200 200 200 200

Corrosion rates in radial and in longitudinal directions are not well-known and may vary in range 0.01–0.30 mm/year:

rar = function(n) stats::runif(n, .01, .30) / 365
ral = function(n) stats::runif(n, .01, .30) / 365

Then probabilities of failure (POFs) related to each corroded area are near:

pof <- mepof(
  depth, length, rep(diameter, 4), rep(wall_thickness, 4),
  rep(UTS, 4), rep(operating_pressure, 4), rep(temperature, 4),
  rar, ral, method = "dnv"
)
#> pipenostics::mepof: process case [1/4] - 25 % processed.pipenostics::mepof: process case [2/4] - 50 % processed.pipenostics::mepof: process case [3/4] - 75 % processed.pipenostics::mepof: process case [4/4] - 100 % . All done, thanks!

So, the POF of the pipe is near

print(max(pof))
#> [1] 0.771093

The value of POF changes in time. So, in a year after inline inspection of the pipe we can get something near

pof <- mepof(
  depth, length, rep(diameter, 4), rep(wall_thickness, 4),
  rep(UTS, 4), rep(operating_pressure, 4), rep(temperature, 4),
  rar, ral, method = "dnv", days = 365
)
#> pipenostics::mepof: process case [1/4] - 25 % processed.pipenostics::mepof: process case [2/4] - 50 % processed.pipenostics::mepof: process case [3/4] - 75 % processed.pipenostics::mepof: process case [4/4] - 100 % . All done, thanks!
print(pof)
#> [1] 0.000000 0.526552 0.647950 0.928970

For entire pipe we get something near:

print(max(pof))
#> [1] 0.92897

Two years ago before inline inspection the pipe state was rather good:

pof <- mepof(
  depth, length, rep(diameter, 4), rep(wall_thickness, 4),
  rep(UTS, 4), rep(operating_pressure, 4), rep(temperature, 4),
  rar, ral, method = "dnv", days = -2 * 365
)
#> pipenostics::mepof: process case [1/4] - 25 % processed.pipenostics::mepof: process case [2/4] - 50 % processed.pipenostics::mepof: process case [3/4] - 75 % processed.pipenostics::mepof: process case [4/4] - 100 % . All done, thanks!
print(pof)
#> [1] 0.000000 0.040453 0.072486 0.270790

For entire pipe we get something near:

print(max(pof))
#> [1] 0.27079

ℹ For underlying concepts and other usage examples refer to Concepts and Useful Notes