| Title: | Diagnostics, Reliability and Predictive Maintenance of Pipeline Systems |
|---|---|
| Description: | Functions that represent some useful empirical and data-driven models for heat loss, corrosion diagnostics, and predictive maintenance of pipeline systems. The package is designed for data analysts and engineers who are involved in exploratory or routine calculations. Methods are described in Timashev et al. (2016) <doi:10.1007/978-3-319-25307-7>, A.C.Reddy (2017) <doi:10.1016/j.matpr.2017.07.081>, Minenergo (2008) <https://docs.cntd.ru/document/902148459>, Minenergo (2005) <https://docs.cntd.ru/document/1200035568>, Xing LU. (2014) <doi:10.1080/23744731.2016.1258371>. |
| Authors: | Yuri Possokhov [aut, cre] (ORCID: <https://orcid.org/0000-0002-3570-4337>) |
| Maintainer: | Yuri Possokhov <[email protected]> |
| License: | GPL-3 |
| Version: | 0.3.0 |
| Built: | 2026-05-17 07:03:36 UTC |
| Source: | https://github.com/omega1x/pipenostics |
Functions that represent some useful empirical and data-driven models for heat loss, corrosion diagnostics, and predictive maintenance of pipeline systems. The package is designed for data analysts and engineers who are involved in exploratory or routine calculations. Methods are described in Timashev et al. (2016) doi:10.1007/978-3-319-25307-7, A.C.Reddy (2017) doi:10.1016/j.matpr.2017.07.081, Minenergo (2008) https://docs.cntd.ru/document/902148459, Minenergo (2005) https://docs.cntd.ru/document/1200035568, Xing LU. (2014) doi:10.1080/23744731.2016.1258371.
Maintainer: Yuri Possokhov [email protected] (ORCID)
Useful links:
Data represents specified minimum yield strength (SMYS) and ultimate tensile strength (UTS) both achieved when producing line pipes according to regulatory specifications.
api5l3tdataapi5l3tdata
A data frame with 57 rows and 4 variables:
designation of standard grade of manufactured pipe.
Type: assert_character.
SMYS - specified minimum yield strength, [psi].
Type: assert_double.
UTS - ultimate tensile strength, [psi].
Type: assert_double.
Identifier for the information origin regarding the specifications of pipe, []:
10API SPECIFICATION 5L .Table 3A
3GOST 20295-85. Table 7
11
GOST 31443-2012 . Tables 6, 7
Type: assert_integer.
API SPECIFICATION 5L. Specification for Line Pipe
GOST 20295-85. Steel welded pipes for main gas-and-oil pipelines. Specifications
GOST 31443-2012. Steel pipes for crafts pipelines. Specifications.
library(pipenostics) head(api5l3tdata)library(pipenostics) head(api5l3tdata)
Imitation of CVRL.BAS computer program presented in ASME B31G-1991 Appendix A for determining allowable length and allowable operating pressure
b31crvl(maop, d, wth, smys, def = 0.72, depth, l)b31crvl(maop, d, wth, smys, def = 0.72, depth, l)
maop |
maximum allowable operating pressure - MAOP, [PSI].
Type: |
d |
nominal outside diameter of pipe, [inch].
Type: |
wth |
nominal wall thickness of pipe, [inch].
Type: |
smys |
specified minimum yield of stress (SMYS) as a characteristics of
steel strength, [PSI]. Type: |
def |
appropriate (combined) design factor from
ASME B31.4,
ASME B31.8, or
ASME B31.11, [].
Type: |
depth |
measured maximum depth of the corroded area, [inch].
Type: |
l |
measured maximum longitudinal length of the corroded area, [inch].
Type: |
Columns maop, d, wth, smys, def, depth, l in the output data.frame come from function's input, other columns are calculated.
For univariate case (when lengths of all input vectors are one) messages that imitate CRVL.BAS console output are printed.
Object of S3-class crvl which is a data.frame with the next numeric columns:
maximum allowable operating pressure - MAOP, [PSI].
Type: assert_double.
nominal outside diameter of pipe, [inch].
Type: assert_double.
nominal wall thickness of pipe, [inch].
Type: assert_double.
specified minimum yield of stress (SMYS) as a characteristics of
steel strength, [PSI].
Type: assert_double.
appropriate (combined) design factor from
ASME B31.4,
ASME B31.8,
or
ASME B31.11,
[]. Type: assert_double.
measured maximum depth of the corroded area, [inch].
Type: assert_double.
measured maximum longitudial length of corroded area, [inch].
Type: assert_double.
operational status of pipe:
1 - excellent,
2 - monitoring is recommended,
3 - alert! replace the pipe immediately!
Type: assert_numeric.
design pressure of pipe, [PSI].
Type: assert_double.
safe maximum pressure for the corroded area, [PSI].
Type: assert_double.
whether operator's action is required to reduce MOAP lower than
the maximum safe pressure of the corroded area.
Type: assert_logical.
allowable depth of the corroded area, [inch].
Type: assert_double.
intermediate factor related to the geometry of the corroded area, [].
Type: assert_double.
allowable length of the corroded area, [inch].
Type: assert_double.
another intermediate factor related to the geometry of the corroded
area, []. Type: assert_double.
ASME B31 G-1991. Manual for determining the remaining strength of corroded pipelines. A supplement to ASME B31G code for pressure piping.
Other ASME B31G:
b31gacd(),
b31gacl(),
b31gafr(),
b31gdep(),
b31gops(),
b31gsap()
library(pipenostics) ## Further examples are inspired by those used in Appendix A of ## ASME B31G-1991 to verify correct entry of CRVL.BAS source code: ## Standard example 1 b31crvl( maop = 910, d = 30, wth = .438, smys = 52000, def = .72, depth = .1, l = 7.5 ) ## Standard example 2 b31crvl( maop = 400, d = 20, wth = .25, smys = 35000, def = 0.5, depth = 0.18, l = 10 ) ## Standard example 3 b31crvl( maop = 910, d = 24, wth = .432, smys = 52000, def = .72, depth = 0.13, l = 30 ) ## Standard example 4 b31crvl( maop = 910, d = 24, wth = .432, smys = 52000, def = .72, depth = .3, l = 30 ) ## Standard example 5 b31crvl( maop = 731, d = 24, wth = .281, smys = 52000, def = 0.72, depth = 0.08, l = 15 ) ## Standard example 6 b31crvl( maop = 1e3, d = 36, wth = .5, smys = 52000, def = 0.72, depth = 0.41, l = 100 ) ## Standard example 8 b31crvl( maop = 877, d = 12.625, wth = .5, smys = 35000, def = .4, depth = .035, l = 3 ) ## Standard example 9 b31crvl( maop = 790, d = 24, wth = .5, smys = 42000, def = .5, depth = .125, l = 12 ) ## TEST #1 b31crvl( maop = 790, d = 24, wth = .5, smys = 42000, def = .5, depth = .179, l = 12 ) ## TEST #1A b31crvl( maop = 790, d = 24, wth = .5, smys = 42000, def = .5, depth = .179, l = 12.182 ) ## TEST #1B b31crvl( maop = 790, d = 24, wth = .5, smys = 42000, def = .5, depth = .180, l = 12.182 ) ## TEST #2 b31crvl( maop = 790, d = 24, wth = .5, smys = 42000, def = .5, depth = .179, l = 12.297 ) ## All examples at once: data(b31gdata) with(b31gdata, b31crvl(maop, d, wth, smys, def, depth, l))library(pipenostics) ## Further examples are inspired by those used in Appendix A of ## ASME B31G-1991 to verify correct entry of CRVL.BAS source code: ## Standard example 1 b31crvl( maop = 910, d = 30, wth = .438, smys = 52000, def = .72, depth = .1, l = 7.5 ) ## Standard example 2 b31crvl( maop = 400, d = 20, wth = .25, smys = 35000, def = 0.5, depth = 0.18, l = 10 ) ## Standard example 3 b31crvl( maop = 910, d = 24, wth = .432, smys = 52000, def = .72, depth = 0.13, l = 30 ) ## Standard example 4 b31crvl( maop = 910, d = 24, wth = .432, smys = 52000, def = .72, depth = .3, l = 30 ) ## Standard example 5 b31crvl( maop = 731, d = 24, wth = .281, smys = 52000, def = 0.72, depth = 0.08, l = 15 ) ## Standard example 6 b31crvl( maop = 1e3, d = 36, wth = .5, smys = 52000, def = 0.72, depth = 0.41, l = 100 ) ## Standard example 8 b31crvl( maop = 877, d = 12.625, wth = .5, smys = 35000, def = .4, depth = .035, l = 3 ) ## Standard example 9 b31crvl( maop = 790, d = 24, wth = .5, smys = 42000, def = .5, depth = .125, l = 12 ) ## TEST #1 b31crvl( maop = 790, d = 24, wth = .5, smys = 42000, def = .5, depth = .179, l = 12 ) ## TEST #1A b31crvl( maop = 790, d = 24, wth = .5, smys = 42000, def = .5, depth = .179, l = 12.182 ) ## TEST #1B b31crvl( maop = 790, d = 24, wth = .5, smys = 42000, def = .5, depth = .180, l = 12.182 ) ## TEST #2 b31crvl( maop = 790, d = 24, wth = .5, smys = 42000, def = .5, depth = .179, l = 12.297 ) ## All examples at once: data(b31gdata) with(b31gdata, b31crvl(maop, d, wth, smys, def, depth, l))
Calculate allowable depth of the corroded area in the pipe.
b31gacd(dep, maop, d, wth, l)b31gacd(dep, maop, d, wth, l)
dep |
design pressure of pipe, [PSI].
Type: |
maop |
maximum allowable operating pressure - MAOP, [PSI].
Type: |
d |
nominal outside diameter of pipe, [inch].
Type: |
wth |
nominal wall thickness of pipe, [inch].
Type: |
l |
measured maximum longitudinal length of corroded area, [inch].
Type: |
Allowable depth of the corroded area in the pipe, [inch].
Type: assert_double.
ASME B31G-1991. Manual for determining the remaining strength of corroded pipelines. A#' supplement to ASTME B31 code for pressure piping.
Other ASME B31G:
b31crvl(),
b31gacl(),
b31gafr(),
b31gdep(),
b31gops(),
b31gsap()
library(pipenostics) b31gacd(1093, 910, 30, .438, 7.5)library(pipenostics) b31gacd(1093, 910, 30, .438, 7.5)
Calculate allowable length of the corroded area in the pipe.
b31gacl(dep, maop, d, wth, depth, l)b31gacl(dep, maop, d, wth, depth, l)
dep |
design pressure of pipe, [PSI].
Type: |
maop |
maximum allowable operating pressure - MAOP, [PSI].
Type: |
d |
nominal outside diameter of pipe, [inch].
Type: |
wth |
nominal wall thickness of pipe, [inch].
Type: |
depth |
measured maximum depth of the corroded area, [inch].
Type: |
l |
measured maximum longitudinal length of the corroded area, [inch].
Type: |
Allowable length of the corroded area in the pipe, [inch].
Type: assert_double.
ASME B31G-1991. Manual for determining the remaining strength of corroded pipelines. A supplement to ASTME B31 code for pressure piping.
Other ASME B31G:
b31crvl(),
b31gacd(),
b31gafr(),
b31gdep(),
b31gops(),
b31gsap()
library(pipenostics) # Corrosion is low, no limit for the corroded area length: b31gacl(1093, 910, 30, .438, .1, 7.5) # Finite allowed length of the corroded area b31gacl(438, 400, 20, .25, .18, 10)library(pipenostics) # Corrosion is low, no limit for the corroded area length: b31gacl(1093, 910, 30, .438, .1, 7.5) # Finite allowed length of the corroded area b31gacl(438, 400, 20, .25, .18, 10)
Calculate intermediate factor related to the geometry of the corroded area.
b31gafr(d, wth, l)b31gafr(d, wth, l)
d |
nominal outside diameter of pipe, [inch].
Type: |
wth |
nominal wall thickness of pipe, [inch].
Type: |
l |
measured maximum longitudinal length of the corroded area, [inch].
Type: |
Intermediate factor related to the geometry of the corroded area, [].
Type: assert_double.
ASME B31G-1991. Manual for determining the remaining strength of corroded pipelines. A supplement to ASTME B31 code for pressure piping.
Other ASME B31G:
b31crvl(),
b31gacd(),
b31gacl(),
b31gdep(),
b31gops(),
b31gsap()
library(pipenostics) # A-factor is less than 5, so the corrosion is not critical: b31gafr(30, .438, 7.5)library(pipenostics) # A-factor is less than 5, so the corrosion is not critical: b31gafr(30, .438, 7.5)
Data represents examples used for verification of computer program CRVL.BAS listed in Appendix A of ASME B31G-1991.
b31gdatab31gdata
A data frame with 12 rows and 15 variables:
maximum allowable operating pressure - MAOP, [PSI].
Type: assert_double.
nominal outside diameter of pipe, [inch].
Type: assert_double.
nominal wall thickness of pipe, [inch].
Type: assert_double.
specified minimum yield of stress (SMYS) as a
characteristics of steel strength, [PSI].
Type: assert_double.
appropriate (combined) design factor from
ASME B31.4,
ASME B31.8,
or
ASME B31.11, []. Type: assert_double.
measured maximum depth of the corroded area, [inch].
Type: assert_double.
measured maximum longitudinal length of corroded area, [inch].
Type: assert_double.
operational status of pipe:
1 - excellent,
2 - monitoring is recommended,
3 - alert! replace the pipe immediately!
Type: assert_numeric.
design pressure of pipe, [PSI].
Type: assert_double.
safe maximum pressure for the corroded area, [PSI].
Type: assert_double.
whether operator's action is required to reduce MOAP lower than
the maximum safe pressure of the corroded area.
Type: assert_logical.
allowable depth of the corroded area, [inch].
Type: assert_double.
intermediate factor related to the geometry of the corroded area, [].
Type: assert_double.
allowable length of the corroded area, [inch].
Type: assert_double.
another intermediate factor related to the geometry of the corroded
area, []. Type: assert_double.
https://law.resource.org/pub/us/cfr/ibr/002/asme.b31g.1991.pdf
library(pipenostics) head(b31gdata)library(pipenostics) head(b31gdata)
Calculate the design pressure that according to ASME B31G-1991 is the conditioned construction characteristic that should not in no way exceeded.
b31gdep(d, wth, smys, def)b31gdep(d, wth, smys, def)
d |
nominal outside diameter of pipe, [inch].
Type: |
wth |
nominal wall thickness of pipe, [inch].
Type: |
smys |
specified minimum yield of stress (SMYS) as a characteristics of
steel strength, [PSI]. Type: |
def |
appropriate (combined) design factor from
ASME B31.4,
ASME B31.8,
or
ASME B31.11, []. Type: |
Design pressure of pipe, [PSI].
Type: assert_double.
ASME B31G-1991. Manual for determining the remaining strength of corroded pipelines. A supplement to ASTME B31 code for pressure piping.
Other ASME B31G:
b31crvl(),
b31gacd(),
b31gacl(),
b31gafr(),
b31gops(),
b31gsap()
library(pipenostics) b31gdep(30, .438, 52e3, .72)library(pipenostics) b31gdep(30, .438, 52e3, .72)
Calculate failure pressure of the corroded pipe according to Modified B31G,Level-1 algorithm listed in ASME B31G-2012.
The next assumption of corrosion shape is adopted by Modified B31G:
The value depicted in the figure above is represented
by argument depth.
b31gmodpf(d, wth, smys, depth, l)b31gmodpf(d, wth, smys, depth, l)
d |
nominal outside diameter of pipe, [inch].
Type: |
wth |
nominal wall thickness of pipe, [inch].
Type: |
smys |
specified minimum yield of stress (SMYS) as a characteristics of
steel strength, [PSI]. Type: |
depth |
measured maximum depth of the corroded area, [inch].
Type: |
l |
measured maximum longitudinal length of corroded area, [inch].
Type: |
Since the definition of flow stress, Sflow, in ASME B31G-2012 is recommended with Level 1 as follows:
no other possibilities of its evaluation are incorporated.
For this code we avoid possible semantic optimization to preserve readability and correlation with original text description in ASME B31G-2012. At the same time source code for estimated failure pressure preserves maximum affinity with its semantic description in ASME B31G-2012.
Numeric NAs may appear in case prescribed conditions of
use are offended.
Estimated failure pressure of the corroded pipe, [PSI].
Type: assert_double.
ASME B31G-2012. Manual for determining the remaining strength of corroded pipelines: supplement to B31 Code for pressure piping.
S. Timashev and A. Bushinskaya, Diagnostics and Reliability of Pipeline Systems, Topics in Safety, Risk, Reliability and Quality 30, doi:10.1007/978-3-319-25307-7.
Other Failure estimation:
b31gpf(),
dnvpf(),
mepof(),
pcorrcpf(),
shell92pf()
library(pipenostics) ## Example: maximum percentage disparity of original B31G ## algorithm and modified B31G showed on CRVL.BAS data with(b31gdata, { original <- b31gpf(d, wth, smys, depth, l) modified <- b31gmodpf(d, wth, smys, depth, l) round(max(100 * abs(1 - original/modified), na.rm = TRUE), 4) }) ## Example: plot disparity of original B31G algorithm and ## modified B31G showed on CRVL data with(b31gdata[-(6:7),], { b31g <- b31gpf(d, wth, smys, depth, l) b31gmod <- b31gmodpf(d, wth, smys, depth, l) axe_range <- range(c(b31g, b31gmod)) plot(b31g, b31g, type = 'b', pch = 16, xlab = 'Pressure, [PSI]', ylab = 'Pressure, [PSI]', main = 'Failure pressure method comparison', xlim = axe_range, ylim = axe_range) inc <- order(b31g) lines(b31g[inc], b31gmod[inc], type = 'b', col = 'red') legend('topleft', legend = c('B31G Original', 'B31G Modified'), col = c('black', 'red'), lty = 'solid') })library(pipenostics) ## Example: maximum percentage disparity of original B31G ## algorithm and modified B31G showed on CRVL.BAS data with(b31gdata, { original <- b31gpf(d, wth, smys, depth, l) modified <- b31gmodpf(d, wth, smys, depth, l) round(max(100 * abs(1 - original/modified), na.rm = TRUE), 4) }) ## Example: plot disparity of original B31G algorithm and ## modified B31G showed on CRVL data with(b31gdata[-(6:7),], { b31g <- b31gpf(d, wth, smys, depth, l) b31gmod <- b31gmodpf(d, wth, smys, depth, l) axe_range <- range(c(b31g, b31gmod)) plot(b31g, b31g, type = 'b', pch = 16, xlab = 'Pressure, [PSI]', ylab = 'Pressure, [PSI]', main = 'Failure pressure method comparison', xlim = axe_range, ylim = axe_range) inc <- order(b31g) lines(b31g[inc], b31gmod[inc], type = 'b', col = 'red') legend('topleft', legend = c('B31G Original', 'B31G Modified'), col = c('black', 'red'), lty = 'solid') })
Determine the operational status of pipe: is it excellent? or is technological control required? or is it critical situation?
b31gops(wth, depth)b31gops(wth, depth)
wth |
nominal wall thickness of pipe, [inch].
Type: |
depth |
measured maximum depth of the corroded area, [inch].
Type: |
Operational status of pipe as an integer value:
1 - excellent
2 - monitoring is recommended
3 - alert! replace the pipe immediately!
Type: assert_numeric and
assert_subset.
ASME B31G-1991. Manual for determining the remaining strength of corroded pipelines. A supplement to ASTME B31 code for pressure piping.
Other ASME B31G:
b31crvl(),
b31gacd(),
b31gacl(),
b31gafr(),
b31gdep(),
b31gsap()
library(pipenostics) # Typical status for the most of pipes: b31gops(.438, .1) # Alert! Corrosion depth is too high! Replace the pipe! b31gops(.5, .41)library(pipenostics) # Typical status for the most of pipes: b31gops(.438, .1) # Alert! Corrosion depth is too high! Replace the pipe! b31gops(.5, .41)
Calculate failure pressure of the corroded pipe according to Original B31G, Level-1 algorithm listed in ASME B31G-2012.
The next assumption of the corrosion shape is adopted by ASME B31G-2012:
There (a) is a parabolic and (b) is a rectangular idealizations of a corroded area.
b31gpf(d, wth, smys, depth, l)b31gpf(d, wth, smys, depth, l)
d |
nominal outside diameter of pipe, [inch].
Type: |
wth |
nominal wall thickness of pipe, [inch].
Type: |
smys |
specified minimum yield of stress (SMYS) as a characteristics of
steel strength, [PSI]. Type: |
depth |
measured maximum depth of the corroded area, [inch].
Type: |
l |
measured maximum longitudinal length of corroded area, [inch].
Type: |
Since the definition of flow stress, Sflow, in ASME B31G-2012 is recommended with Level 1 as follows:
no other possibilities of its evaluation are incorporated.
For this code we avoid possible semantic optimization to
preserve readability and correlation with original text description in
ASME B31G-2012. At the same time source code for estimated failure
pressure preserves maximum affinity with its semantic description in
ASME B31G-2012 and slightly differs from that given by
Timashev et al. The latter deviates up to 0.7 % on examples
supplied with CRVL.BAS - (b31gdata).
Numeric NAs may appear in case prescribed conditions of
use are offended.
Estimated failure pressure of the corroded pipe, [PSI].
Type: assert_double.
ASME B31G-2012. Manual for determining the remaining strength of corroded pipelines: supplement to B31 Code for pressure piping.
S. Timashev and A. Bushinskaya, Diagnostics and Reliability of Pipeline Systems, Topics in Safety, Risk, Reliability and Quality 30, doi:10.1007/978-3-319-25307-7.
Other Failure estimation:
b31gmodpf(),
dnvpf(),
mepof(),
pcorrcpf(),
shell92pf()
library(pipenostics) ## Example: maximum percentage disparity of original B31G ## algorithm and modified B31G showed on CRVL.BAS data with(b31gdata, { original <- b31gpf(d, wth, smys, depth, l) modified <- b31gmodpf(d, wth, smys, depth, l) round(max(100 * abs(1 - original / modified), na.rm = TRUE), 4) }) ## Example: plot disparity of original B31G algorithm and ## modified B31G showed on CRVL data with(b31gdata[-(6:7),], { b31g <- b31gpf(d, wth, smys, depth, l) b31gmod <- b31gmodpf(d, wth, smys, depth, l) axe_range <- range(c(b31g, b31gmod)) plot(b31g, b31g, type = 'b', pch = 16, xlab = 'Pressure, [PSI]', ylab = 'Pressure, [PSI]', main = 'Failure pressure method comparison', xlim = axe_range, ylim = axe_range) inc <- order(b31g) lines(b31g[inc], b31gmod[inc], type = 'b', col = 'red') legend('topleft', legend = c('B31G Original', 'B31G Modified'), col = c('black', 'red'), lty = 'solid') })library(pipenostics) ## Example: maximum percentage disparity of original B31G ## algorithm and modified B31G showed on CRVL.BAS data with(b31gdata, { original <- b31gpf(d, wth, smys, depth, l) modified <- b31gmodpf(d, wth, smys, depth, l) round(max(100 * abs(1 - original / modified), na.rm = TRUE), 4) }) ## Example: plot disparity of original B31G algorithm and ## modified B31G showed on CRVL data with(b31gdata[-(6:7),], { b31g <- b31gpf(d, wth, smys, depth, l) b31gmod <- b31gmodpf(d, wth, smys, depth, l) axe_range <- range(c(b31g, b31gmod)) plot(b31g, b31g, type = 'b', pch = 16, xlab = 'Pressure, [PSI]', ylab = 'Pressure, [PSI]', main = 'Failure pressure method comparison', xlim = axe_range, ylim = axe_range) inc <- order(b31g) lines(b31g[inc], b31gmod[inc], type = 'b', col = 'red') legend('topleft', legend = c('B31G Original', 'B31G Modified'), col = c('black', 'red'), lty = 'solid') })
Calculate safe maximum pressure for the corroded area of pipe.
b31gsap(dep, d, wth, depth, l)b31gsap(dep, d, wth, depth, l)
dep |
design pressure of pipe, [PSI].
Type: |
d |
nominal outside diameter of pipe, [inch].
Type: |
wth |
nominal wall thickness of pipe, [inch].
Type: |
depth |
measured maximum depth of the corroded area, [inch].
Type: |
l |
measured maximum longitudinal length of the corroded area, [inch].
Type: |
Safe maximum pressure for the corroded area of pipe, [PSI].
Type: assert_double.
ASME B31G-1991.Manual for determining the remaining strength of corroded pipelines. A supplement to ASTME B31 code for pressure piping.
Other ASME B31G:
b31crvl(),
b31gacd(),
b31gacl(),
b31gafr(),
b31gdep(),
b31gops()
library(pipenostics) # safe pressure is equal to design pressure: b31gsap(1093, 30, .438, .1, 7.5) # safe pressure is lower than design pressure due corrosion: b31gsap(877, 24, .281, .08, 15)library(pipenostics) # safe pressure is equal to design pressure: b31gsap(1093, 30, .438, .1, 7.5) # safe pressure is lower than design pressure due corrosion: b31gsap(877, 24, .281, .08, 15)
Check the correspondence inside nominal diameter/wall thickness value pair for pipes manufactured in accordance with regulatory standards.
Verification is performed using reference values from the
b36pipedata-table. So, the result is TRUE if d-
and w-value combination can be found in rows of this dataset.
b36dwthv(d, wth)b36dwthv(d, wth)
d |
nominal (outside) diameter of pipe, [mm].
Type: |
wth |
nominal wall thickness of pipe, [mm].
Type: |
Verification status. Type: assert_logical.
Other ASME B36.10M:
b36mass(),
b36pipedata
library(pipenostics) # All pipes in test bench of district heating network have strictly # consistent diameters and wall thicknesses: all(b36dwthv(m325nxdata[["d"]], m325nxdata[["wth"]]))library(pipenostics) # All pipes in test bench of district heating network have strictly # consistent diameters and wall thicknesses: all(b36dwthv(m325nxdata[["d"]], m325nxdata[["wth"]]))
Estimate mass or geometric specifications of the manufactured pipes
b36mass(d, wth, len = 1, rho = 7.85, origin = NULL) b36d(wth, mass, len = 1, rho = 7.85) b36wth(d, mass, len = 1, rho = 7.85)b36mass(d, wth, len = 1, rho = 7.85, origin = NULL) b36d(wth, mass, len = 1, rho = 7.85) b36wth(d, mass, len = 1, rho = 7.85)
d |
nominal outside diameter of pipe, [mm].
Type: |
wth |
nominal wall thickness of pipe, [mm].
Type: |
len |
pipe length, [m]. Type: |
rho |
mass density of pipe material, [g/cm³].
Type: |
origin |
identifier for the information origin regarding the specifications of pipe.
Type: |
mass |
actual mass of pipe, [kg].
Type: |
The mass of a one-meter pipe segment is determined by linear interpolation
based on the tabular data provided in the specified origins (see
b36pipedata). If the origin of the initial data is
NULL (default), the mass of the pipe is calculated using a formula:
where
- mass of a pipe, [kg]
- mass density of pipe material, [g/cm³]
- nominal wall thickness of the manufactured pipe,
[mm]
- nominal outside diameter of the manufactured pipe,
[mm]
- actual pipe length, [m]
For origin in c(1, 2, 4, 5) the values provided in the
b36pipedata match the calculated values obtained from the
formula with an accuracy of 1 %.
Inverse calculations b36wth and b36d are
performed using algebraically derived formulas.
b36mass
pipe mass, [kg]
b36wth
pipe wall thickness, [mm]
b36d
outside diameter of pipe, [mm]
Other ASME B36.10M:
b36dwthv(),
b36pipedata
library(pipenostics) # Since some specification origins provide the mass of a one-meter pipe # segment taking into account possible deviations during its production # process, when the user specifies the origin ID directly, the mass values # are calculated using linear interpolation: b36mass(68, 13, rho = 7.9, origin = 7L) # The discrepancy with the calculations based on the formula can be more # than 7 %: b36mass(68, 13, rho = 7.9, origin = NULL) # For origins which are ASME B36 standards such differences should be # minimal: b36mass(965, 10.31, origin = 1L) - b36mass(965, 10.31, origin = NULL) # The calculations of diameter and wall thickness are straightforward and # use only inverse formulas without origin references: b36d(10.31, 242.74) b36wth(965, 242.74)library(pipenostics) # Since some specification origins provide the mass of a one-meter pipe # segment taking into account possible deviations during its production # process, when the user specifies the origin ID directly, the mass values # are calculated using linear interpolation: b36mass(68, 13, rho = 7.9, origin = 7L) # The discrepancy with the calculations based on the formula can be more # than 7 %: b36mass(68, 13, rho = 7.9, origin = NULL) # For origins which are ASME B36 standards such differences should be # minimal: b36mass(965, 10.31, origin = 1L) - b36mass(965, 10.31, origin = NULL) # The calculations of diameter and wall thickness are straightforward and # use only inverse formulas without origin references: b36d(10.31, 242.74) b36wth(965, 242.74)
Data represents the nominal specifications of steel pipes produced by the industry according to regulatory standards.
b36pipedatab36pipedata
A data frame with 6064 rows and 5 variables:
Nominal outside diameter of the manufactured pipe, [mm].
Type: assert_double.
Nominal wall thickness of the manufactured pipe, [mm].
Type: assert_double.
Nominal mass density of the steel rank applied in the pipe manufacturing,
[g/cm³]. Type: assert_double.
Nominal mass of one-meter length pipe segment, [kg].
Type: assert_double.
123GOST 20295-85. Table 1
4GOST 33229-2015. Table 1
5GOST 33229-2015. Table 2
6GOST R 57423-2017. Table 1
7GOST R 57423-2017. Table 2
8GOST R 57423-2017. Table 3
9GOST R 57423-2017. Table 4
Type: assert_integer.
NOTE! Due to numerous typos in origins with identifiers 4,
5 all mass values in those origins are the recalculations made with
formula
where
- mass of one-meter pipe segment, [kg]
- nominal outside diameter of the manufactured pipe,
[mm]
(wth) - nominal wall thickness of the manufactured
pipe, [mm]
ASME B36.10M-2018. Welded and seamless wrought steel pipe.
ASME B36.19M-2018. Stainless steel pipe.
GOST 20295-85. Steel welded pipes for main gas-and-oil pipelines. Specifications.
GOST 33229-2015. Tubes for boiler and heat exchanging equipment. Technical specifications. Part 1. Seamless steel pipes to work under pressure. not more than 6,4 MPa and at temperatures not exceeding 400 °C
GOST R 57423-2017. Tubes for boiler and heat exchanging equipment. Part 2. Seamless steel tubes for pressure purposes more 6.4 MPa and temperatures exceeding 400 °C. Specifications.
Other ASME B36.10M:
b36dwthv(),
b36mass()
library(pipenostics) head(b36pipedata)library(pipenostics) head(b36pipedata)
Convert temperature measured in Kelvin- or Fahrenheit-scale to Celsius (°C).
c_k(x) c_f(x)c_k(x) c_f(x)
x |
temperature in initial scale:
Type: |
Temperature in Celsius-scale, [°C].
Type: assert_double.
k_c and f_c for converting from Celsius-scale.
Other Measurement Unit Converter:
f_k(),
inch_mm(),
k_c(),
kgf_mpa(),
loss_flux(),
mm_inch(),
mpa_kgf(),
mpa_psi(),
psi_mpa()
library(pipenostics) # Convert from Kelvin to Celsius: c_k(c(0, 373.15)) # Convert from Fahrenheit to Celsius: c_f(c(-459.67, 212))library(pipenostics) # Convert from Kelvin to Celsius: c_k(c(0, 373.15)) # Convert from Fahrenheit to Celsius: c_f(c(-459.67, 212))
Calculate failure pressure of the corroded pipe according to Section 8.2 of DNV-RP-F101. The estimation is valid for single isolated metal loss defects of the corrosion/erosion type and when only internal pressure loading is considered.
The next assumption of the corrosion shape is adopted by DNV-RP-F101:
There dcor represents argument depth.
dnvpf(d, wth, uts, depth, l)dnvpf(d, wth, uts, depth, l)
d |
nominal outside diameter of pipe, [mm].
Type: |
wth |
nominal wall thickness of pipe, [mm].
Type: |
uts |
ultimate tensile strength (UTS) or
specified minimum tensile strength (SMTS) as a
characteristic of steel strength, [MPa].
Type: |
depth |
measured maximum depth of the corroded area, [mm].
Type: |
l |
measured maximum longitudinal length of corroded area, [mm].
Type: |
In contrast to ASME B31G-2012 property of pipe metal is characterized by specified minimum tensile strength - SMTS, [N/mm²], and SI is default unit system. SMTS is given in the line pipe steel material specifications (e.g. API 5L) for each material grade.
At the same time Timashev et al. used ultimate tensile strength - UTS in place of SMTS. So, for the case those quantities may be used in interchangeable way.
Numeric NAs may appear in case prescribed conditions of
use are offended.
Estimated failure pressure of the corroded pipe, [MPa].
Type: assert_double.
Recommended practice DNV-RP-F101. Corroded pipelines. DET NORSKE VERITAS, October 2010.
ASME B31G-2012. Manual for determining the remaining strength of corroded pipelines: supplement to B31 Code for pressure piping.
S. Timashev and A. Bushinskaya, Diagnostics and Reliability of Pipeline Systems, Topics in Safety, Risk, Reliability and Quality 30, doi:10.1007/978-3-319-25307-7.
Other Failure estimation:
b31gmodpf(),
b31gpf(),
mepof(),
pcorrcpf(),
shell92pf()
library(pipenostics) # Consider two pipes with the next specifications: d <- c(812.8, 219.0) # [mm] wth <- c( 19.1, 14.5) # [mm] uts <- c(530.9, 455.1) # [N/mm²] l <- c(203.2, 200.0) # [mm] depth <- c( 13.4, 9.0) # [mm] # Get the failure pressure for that pipes: dnvpf(d, wth, uts, depth, l)library(pipenostics) # Consider two pipes with the next specifications: d <- c(812.8, 219.0) # [mm] wth <- c( 19.1, 14.5) # [mm] uts <- c(530.9, 455.1) # [N/mm²] l <- c(203.2, 200.0) # [mm] depth <- c( 13.4, 9.0) # [mm] # Get the failure pressure for that pipes: dnvpf(d, wth, uts, depth, l)
Calculate drop or recovery of flow rate in pipe using geometric factors.
The calculated value may be positive or negative. When it is positive they have the drop, i.e. the decrease of flow rate in the outlet of pipe under consideration. When the calculated value is negative they have the recovery, i.e. the increase of flow rate in the outlet of pipe under consideration. In both cases to calculate flow rate on the outlet of pipe under consideration simply subtract the calculated value from the sensor-measured flow rate on the inlet.
dropg(adj = 0, d = 700, flow_rate = 250)dropg(adj = 0, d = 700, flow_rate = 250)
adj |
diameters of adjacent pipes through which discharges to and recharges from network occur, [mm]. Types:
Positive values of diameters of adjacent pipes correspond to discharging process through those pipe, whereas negative values of diameters mean recharging. See Details and Examples for further explanations. |
d |
diameter of pipe under consideration, [mm].
Type: |
flow_rate |
sensor-measured amount of heat carrier (water) that is transferred through
the inlet of pipe during a period, [ton/h].
Type: |
It is common that sensor-measured flow rate undergoes discharges to network and recharges from it. For calculation of flow rate drop or recovery the next configuration of district heating network segment is assumed:
Usually, there are no additional sensors that could measure flow rate in each flow fork. In that case they only may operate with geometric factors, i.e. assuming that flow rate is proportional to square of pipe diameter.
The simple summation of flow rates over all adjacent pipes produces the required flow rate drop or recovery located on the outlet of the pipe under consideration. Since there is concurrency between discharges and recharges the diameters of discharge pipes are regarded positive whereas diameters of recharge pipes must be negative.
Be careful when dealing with geometric factors for large amount of recharges from network: there are no additional physical constraints and thus the calculated value of recovery may have non-sense.
Flow rate drop or recovery at the outlet of pipe,
[ton/h], numeric vector. The value is positive for drop,
whereas for recovery it is negative. In both cases to calculate
flow rate on the outlet of pipe under consideration simply subtract the
calculated value from the sensor-measured flow rate on the inlet.
Type: assert_double.
Other Regime tracing:
dropp(),
dropt(),
m325tracebw(),
m325tracefw(),
m325traceline(),
tracebw(),
tracefw(),
traceline()
library(pipenostics) # Let consider pipes according to network segment scheme depicted in figure # in [?dropg] help-page. # Typical large diameters of pipes under consideration, [mm]: d <- as.double(unique(subset(pipenostics::m325nhldata, d > 700)$d)) # Let sensor-measured flow rate in the inlet of pipe # under consideration be proportional to d, [ton/h]: flow_rate <- .125 * d # Let consider total diameter case when total diameters of adjacent pipes are # no more than d, [mm]: adj <- c(450, -400, 950, -255, 1152) # As at may be seen for the second and fourth cases they predominantly have # recharges from network. # Let calculate flow rate on the outlet of the pipe under consideration, # [ton/h] flow_rate - dropg(adj, d, flow_rate)library(pipenostics) # Let consider pipes according to network segment scheme depicted in figure # in [?dropg] help-page. # Typical large diameters of pipes under consideration, [mm]: d <- as.double(unique(subset(pipenostics::m325nhldata, d > 700)$d)) # Let sensor-measured flow rate in the inlet of pipe # under consideration be proportional to d, [ton/h]: flow_rate <- .125 * d # Let consider total diameter case when total diameters of adjacent pipes are # no more than d, [mm]: adj <- c(450, -400, 950, -255, 1152) # As at may be seen for the second and fourth cases they predominantly have # recharges from network. # Let calculate flow rate on the outlet of the pipe under consideration, # [ton/h] flow_rate - dropg(adj, d, flow_rate)
Calculate pressure drop in straight cylindrical steel pipe of district heating system (where water is a heat carrier) that is a result of pipe orientation in space (hydrostatic component), and friction between water and internal wall of pipe.
dropp( temperature = 130, pressure = mpa_kgf(6), flow_rate = 1276, d = 1, len = 1, roughness = 0.006, inlet = 0, outlet = 0, method = "romeo" )dropp( temperature = 130, pressure = mpa_kgf(6), flow_rate = 1276, d = 1, len = 1, roughness = 0.006, inlet = 0, outlet = 0, method = "romeo" )
temperature |
temperature of heat carrier (water) inside the pipe, [°C].
Type: |
pressure |
absolute pressure of heat carrier (water) measured at the entrance (inlet)
of pipe, [MPa]. Type: |
flow_rate |
amount of heat carrier (water) that is transferred by pipe during a period,
[ton/h]. Type: |
d |
internal diameter of pipe, [m].
Type: |
len |
pipe length, [m]. Type: |
roughness |
roughness of internal wall of pipe, [m].
Type: |
inlet |
elevation of pipe inlet, [m].
Type: |
outlet |
elevation of pipe outlet, [m].
Type: |
method |
method of determining Darcy friction factor.
Type: |
The underlying engineering model for calculation of pressure drop considers only two contributions (components):
Pressure drop due to gravity (hydrostatic component).
Pressure drop due to friction.
The model does not consider any size changes of pipe and presence of fittings.
For the first component that depends on pipe position in space the next figure illustrates adopted disposition of pipe.
So, the expression for the first component can be written as:
where - is gravity factor, m/s², and - density
of water (heat carrier), kg/m³; (inlet) and
(outlet) are appropriate pipe elevations (under sea or any
other adopted level), m.
The second component comes from
Darcy–Weisbach
equation and is calculated using heating carrier regime parameters
(temperature,pressure, flow_rate). Temperature and
pressure values of heat carrier define water properties according to
IAPWS formulation.
Several methods for calculating of Darcy friction factor are possible and limited to the next direct approximations of Colebrook equation:
Romeo, Royo and Monzon, 2002
Vatankhah and Kouchakzadeh, 2009
Buzzelli, 2008
According to Brkic, 2011 approximations errors of those methods do
not exceed 0.15 % for the most combinations of
Reynolds numbers and
actual values of internal
wall roughness of
pipe.
Pressure drop at the outlet of pipe, [MPa].
Type: assert_double.
W.Wagner et al. The IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam, J. Eng. Gas Turbines Power. Jan 2000, 122(1): 150-184 (35 pages).
M.L.Huber et al.New International Formulation for the
Viscosity of , Journal of Physical and Chemical Reference
Data 38, 101 (2009).
D.Brkic. Journal of Petroleum Science and Engineering, Vol. 77,Issue 1, April 2011, Pages 34-48.
Romeo, E., Royo, C., Monzon, A., 2002. Improved explicit equation for estimation of friction factor in rough and smooth pipes. Chem. Eng. J. 86 (3), 369–374.
Vatankhah, A.R., Kouchakzadeh, S., 2009. Discussion: Exact equations for pipe-flow problems, by P.K. Swamee and P.N. Rathie. J. Hydraul. Res. IAHR 47 (7), 537–538.
Buzzelli, D., 2008. Calculating friction in one step. Mach. Des. 80 (12), 54–55.
dropt for calculating temperature drop in pipe
Other Regime tracing:
dropg(),
dropt(),
m325tracebw(),
m325tracefw(),
m325traceline(),
tracebw(),
tracefw(),
traceline()
library(pipenostics) # Typical pressure drop for horizontal pipeline segments # in high-way heating network in Novosibirsk: dropp(len = c(200, 300))library(pipenostics) # Typical pressure drop for horizontal pipeline segments # in high-way heating network in Novosibirsk: dropp(len = c(200, 300))
Calculate temperature drop in steel pipe of district heating system (where water is a heat carrier) that is a result of heat loss through pipe wall and insulation.
dropt( temperature = 130, pressure = mpa_kgf(6), flow_rate = 250, loss_power = 7000 )dropt( temperature = 130, pressure = mpa_kgf(6), flow_rate = 250, loss_power = 7000 )
temperature |
temperature of heat carrier (water) inside the pipe measured at the
inlet of pipe, [°C]. Type: |
pressure |
absolute pressure of heat carrier (water) inside the pipe, [MPa].
Type: |
flow_rate |
amount of heat carrier (water) that is transferred by pipe during a period,
[ton/h]. Type: |
loss_power |
power of heat loss - heat loss through area of pipe wall per hour,
[kcal/h]. Type: |
Specific isobaric heat capacity used in calculations is calculated according to IAPWS R7-97(2012) for Region 1 since it is assumed that state of water in district heating system is always in that region.
Temperature drop at the outlet of pipe, [°C].
Type: assert_double.
Other Regime tracing:
dropg(),
dropp(),
m325tracebw(),
m325tracefw(),
m325traceline(),
tracebw(),
tracefw(),
traceline()
library(pipenostics) # Calculate normative temperature drop based on Minenergo-325 for pipe # segment pipeline <- list( year = 1968, laying = "channel", d = 700, # [mm] len = 1000 # [m] ) regime <- list( temperature = c(130, 150), # [°C] pressure = .588399, # [MPa] flow_rate = 250 # [ton/h] ) pipe_loss_power <- do.call( m325nhl, c(pipeline, temperature = list(regime[["temperature"]]), duration = 1) ) temperature_drop <- dropt( temperature = regime[["temperature"]], # [°C] loss_power = pipe_loss_power # [kcal/h] ) # [°C] print(temperature_drop)library(pipenostics) # Calculate normative temperature drop based on Minenergo-325 for pipe # segment pipeline <- list( year = 1968, laying = "channel", d = 700, # [mm] len = 1000 # [m] ) regime <- list( temperature = c(130, 150), # [°C] pressure = .588399, # [MPa] flow_rate = 250 # [ton/h] ) pipe_loss_power <- do.call( m325nhl, c(pipeline, temperature = list(regime[["temperature"]]), duration = 1) ) temperature_drop <- dropt( temperature = regime[["temperature"]], # [°C] loss_power = pipe_loss_power # [kcal/h] ) # [°C] print(temperature_drop)
Convert temperature measured in Kelvin- or Celsius-scale to Fahrenheit (°F).
f_k(x) f_c(x)f_k(x) f_c(x)
x |
temperature in initial scale: Type: |
Temperature in Fahrenheit-scale, [°F].
Type: assert_double.
k_f and c_f for converting from
Fahrenheit-scale.
Other Measurement Unit Converter:
c_k(),
inch_mm(),
k_c(),
kgf_mpa(),
loss_flux(),
mm_inch(),
mpa_kgf(),
mpa_psi(),
psi_mpa()
library(pipenostics) # Convert from Kelvin to Fahrenheit: f_k(c(0, 373.15)) # Convert from Celsius to Fahrenheit: f_c(c(-273.15, 100))library(pipenostics) # Convert from Kelvin to Fahrenheit: f_k(c(0, 373.15)) # Convert from Celsius to Fahrenheit: f_c(c(-273.15, 100))
Find and list all possible paths of heat carrier flow (water) in the given topology of district heating system.
flowls(sender = "A", acceptor = "B", use_cluster = FALSE)flowls(sender = "A", acceptor = "B", use_cluster = FALSE)
sender |
identifier of the node which heat carrier flows out.
Type: any type that can be painlessly coerced to character by
|
acceptor |
identifier of the node which heat carrier flows in. According to topology
of test bench considered this identifier should be unique.
Type: any type that can be painlessly coerced to character by
|
use_cluster |
utilize functionality of parallel processing on multi-core CPU.
Type: |
Only branched topology without cycles is considered where no more than one
incoming edge exists for every acceptor node. For instance,
m325nxdata has permitted topology.
Though input arguments are natively vectorized their individual values
all relate to common part of district heating network, i.e. associated with
common object. It is due to isomorphism between vector representation and
directed graph of this network. For more details of isomorphic topology
description see m325nxdata.
Named list that contains integer vectors as its elements. The
name of each element in the list is the name of
acceptor associated with terminal node of district heating network.
Each vector in the list represents an ordered sequence of
indexes in acceptor that enumerates incoming edges from starting node
to terminal one. The length of returned link{list} is equal to number
of terminal nodes for topology considered.
Type: assert_list.
m325nxdata for example of topology of district heating
system
library(pipenostics) # Find path from A to B in trivial line topology: flowls("A", "B") # More complex example with two terminal nodes D and E: flowls(c("A", "B", "B"), c("B", "D", "E")) # All possible flow paths in test bench illustrated in `?m325nxdata`: all_paths <- list( c(12, 13, 11, 8, 4, 1), # hereinafter indexes of acceptor nodes c(12, 13, 11, 8, 4, 2), c(12, 13, 11, 8, 6, 5, 3), c(12, 13, 11, 8, 6, 7), c(12, 13, 11, 8, 6, 9), c(12, 13, 11, 10), c(12, 13, 14, 15), c(12, 13, 16, 17), c(12, 13, 16, 18, 20, 19), c(12, 13, 16, 18, 20, 21), c(12, 13, 16, 18, 22, 24), c(12, 13, 16, 18, 22, 25), c(12, 13, 16, 18, 20, 23, 26) ) # find those paths: with(m325nxdata, flowls(sender, acceptor))library(pipenostics) # Find path from A to B in trivial line topology: flowls("A", "B") # More complex example with two terminal nodes D and E: flowls(c("A", "B", "B"), c("B", "D", "E")) # All possible flow paths in test bench illustrated in `?m325nxdata`: all_paths <- list( c(12, 13, 11, 8, 4, 1), # hereinafter indexes of acceptor nodes c(12, 13, 11, 8, 4, 2), c(12, 13, 11, 8, 6, 5, 3), c(12, 13, 11, 8, 6, 7), c(12, 13, 11, 8, 6, 9), c(12, 13, 11, 10), c(12, 13, 14, 15), c(12, 13, 16, 17), c(12, 13, 16, 18, 20, 19), c(12, 13, 16, 18, 20, 21), c(12, 13, 16, 18, 22, 24), c(12, 13, 16, 18, 22, 25), c(12, 13, 16, 18, 20, 23, 26) ) # find those paths: with(m325nxdata, flowls(sender, acceptor))
Estimate Darcy friction factor explicitly with extremely accurate Buzzelli approximation of Colebrook equation.
fric_buzzelli(reynolds, roughness = 0, strict = FALSE)fric_buzzelli(reynolds, roughness = 0, strict = FALSE)
reynolds |
Reynolds number, []. Type: |
roughness |
relative roughness, []. Type: |
strict |
calculate only inside the precision region.
Type: |
Buzzelli's formula is reported to be extremely accurate in the region:
3.0e3 <= reynolds <= 3.0e8
0 <= roughness <= 0.05
In strict = TRUE mode argument values outside this precision region
are not allowed, whereas in strict = FALSE either NAs are
generated in that case or calculation for laminar flow is performed when
reynolds < 2100.0.
Pipe friction factor, []. Type: assert_double.
Offor, U. and Alabi, S. (2016) An Accurate and Computationally Efficient Explicit Friction Factor Model. Advances in Chemical Engineering and Science, 6, pp. 237-245. doi:10.4236/aces.2016.63024.
Buzzelli, D. (2008) Calculating friction in one step. Machine Design, 80 (12), pp. 54–55.
Other Fluid properties:
fric_romeo(),
fric_vatankhan(),
re_u()
library(pipenostics) fric_buzzelli(c(2118517, 2000, 2118517), c(1e-6, 70e-3/1, 7e-3/1)) fric_buzzelli(c(2118517, 5500, 2118517), c(1e-6, 50e-3/1, 7e-3/1), TRUE)library(pipenostics) fric_buzzelli(c(2118517, 2000, 2118517), c(1e-6, 70e-3/1, 7e-3/1)) fric_buzzelli(c(2118517, 5500, 2118517), c(1e-6, 50e-3/1, 7e-3/1), TRUE)
Estimate Darcy friction factor explicitly with extremely accurate Romeo-Royo-Monzón approximation of Colebrook equation.
fric_romeo(reynolds, roughness = 0, strict = FALSE)fric_romeo(reynolds, roughness = 0, strict = FALSE)
reynolds |
Reynolds number, []. Type: |
roughness |
relative roughness, []. Type: |
strict |
calculate only inside the precision region.
Type: |
Romeo's formula is reported to be extremely accurate in the region:
3.0e3 <= reynolds <= 1.5e8
0.0 <= roughness <= 0.05
In strict = TRUE mode argument values outside this precision region
are not allowed, whereas in strict = FALSE either NAs are
generated in that case or calculation for laminar flow is performed when
reynolds < 2100.0.
Pipe friction factor, []. Type: assert_double.
Offor, U. and Alabi, S. (2016) An Accurate and Computationally Efficient Explicit Friction Factor Model. Advances in Chemical Engineering and Science, 6, pp. 237-245. doi:10.4236/aces.2016.63024.
Eva Romeo, Carlos Royo, Antonio Monzón, Improved explicit equations for estimation of friction factor in rough and smooth pipes, Chemical Engineering Journal, Volume 86, Issue 3, 2002, Pages 369-374, ISSN 1385-8947. doi:10.1016/S1385-8947(01)00254-6.
Other Fluid properties:
fric_buzzelli(),
fric_vatankhan(),
re_u()
library(pipenostics) fric_romeo(c(2118517, 2000, 2118517), c(0, 70e-3/1, 7e-3/1)) fric_romeo(c(2118517, 3030, 2118517), c(0, 50e-3/1, 7e-3/1), TRUE)library(pipenostics) fric_romeo(c(2118517, 2000, 2118517), c(0, 70e-3/1, 7e-3/1)) fric_romeo(c(2118517, 3030, 2118517), c(0, 50e-3/1, 7e-3/1), TRUE)
Estimate Darcy friction factor explicitly with extremely accurate Vatankhah-Kouchakzadeh approximation of Colebrook equation.
fric_vatankhan(reynolds, roughness = 0, strict = FALSE)fric_vatankhan(reynolds, roughness = 0, strict = FALSE)
reynolds |
Reynolds number, []. Type: |
roughness |
relative roughness, []. Type: |
strict |
calculate only inside the precision region.
Type: |
Vatankhah's formula is reported to be extremely accurate in the region:
5.0e3 <= reynolds <= 1.0e8
1e-6 <= roughness <= 0.05
In strict = TRUE mode argument values outside this precision region
are not allowed, whereas in strict = FALSE either NAs are
generated in that case or calculation for laminar flow is performed when
reynolds < 2100.0.
Pipe friction factor, []. Type: assert_double.
Offor, U. and Alabi, S. (2016) An Accurate and Computationally Efficient Explicit Friction Factor Model.Advances in Chemical Engineering and Science, 6, pp. 237-245. doi:10.4236/aces.2016.63024.
Ali R. Vatankhah, Salah Kouchakzadeh (2009) Exact equations for pipe-flow problems.Journal of Hydraulic Research, 47:4, pp. 537-538, doi:10.1080/00221686.2009.9522031.
Other Fluid properties:
fric_buzzelli(),
fric_romeo(),
re_u()
library(pipenostics) fric_vatankhan(c(2118517, 2000, 2118517), c(1e-6, 70e-3/1, 7e-3/1)) fric_vatankhan(c(2118517, 5500, 2118517), c(1e-6, 50e-3/1, 7e-3/1), TRUE)library(pipenostics) fric_vatankhan(c(2118517, 2000, 2118517), c(1e-6, 70e-3/1, 7e-3/1)) fric_vatankhan(c(2118517, 5500, 2118517), c(1e-6, 50e-3/1, 7e-3/1), TRUE)
Calculate geographical metrics (distance, area) for two or three geographical locations.
geoarea(lat1, lon1, lat2, lon2, lat3, lon3, earth = 6371008.7714) geodist(lat1, lon1, lat2, lon2, earth = 6371008.7714)geoarea(lat1, lon1, lat2, lon2, lat3, lon3, earth = 6371008.7714) geodist(lat1, lon1, lat2, lon2, earth = 6371008.7714)
lat1 |
latitude of the first geographical location, [DD].
Type: |
lon1 |
longitude of the first geographical location, [DD].
Type: |
lat2 |
latitude of the second geographical location, [DD].
Type: |
lon2 |
longitude of the second geographical location, [DD].
Type: |
lat3 |
latitude of the third geographical location, [DD].
Type: |
lon3 |
longitude of the third geographical location, [DD].
Type: |
earth |
Earth radius, [m]. See Details.
Type: |
geodist calculates distance between two geographical locations on
Earth, whereas geoarea calculates the area of spherical
triangle between three geographical locations.
Both functions use absolute positions of geographical locations described
by
geographical coordinate system in
decimal degrees
units denoted as DD. The
haversine formula
is applied to calculate the distance, and so the spherical model of
Earth is considered in both functions.
Since several variants of Earth radius can be accepted,
the user is welcome to provide its own value.
WGS-84
mean radius of
semi-axes,, is the default value.
The resulting distance is expressed in metres (m), whereas the area is expressed in square kilometers (km²).
geodist:distance between two geographical locations, [m].
geoarea:area of spherical triangle between three geographical locations, [km²].
Type: assert_double.
Other Geo Information:
meteos(),
mgtdhid()
library(pipenostics) # Consider the longest linear pipeline segment in Krasnoyarsk, [DD]: pipe <- list( lat1 = 55.98320350, lon1 = 92.81257226, lat2 = 55.99302417, lon2 = 92.80691885 ) # and some official Earth radii, [m]: R <- c( nominal_zero_tide_equatorial = 6378100.0000, nominal_zero_tide_polar = 6356800.0000, equatorial_radius = 6378137.0000, semiminor_axis_b = 6356752.3141, polar_radius_of_curvature = 6399593.6259, mean_radius_R1 = 6371008.7714, same_surface_R2 = 6371007.1810, same_volume_R3 = 6371000.7900, WGS84_ellipsoid_axis_a = 6378137.0000, WGS84_ellipsoid_axis_b = 6356752.3142, WGS84_ellipsoid_curvature_c = 6399593.6258, WGS84_ellipsoid_R1 = 6371008.7714, WGS84_ellipsoid_R2 = 6371007.1809, WGS84_ellipsoid_R3 = 6371000.7900, GRS80_axis_a = 6378137.0000, GRS80_axis_b = 6356752.3141, spherical_approx = 6366707.0195, meridional_at_the_equator = 6335439.0000, Chimborazo_maximum = 6384400.0000, Arctic_Ocean_minimum = 6352800.0000, Averaged_center_to_surface = 6371230.0000 ) # Calculate length of the pipeline segment for different radii: len <- with( pipe, vapply( R, geodist, double(1), lat1 = lat1, lon1 = lon1, lat2 = lat2, lon2 = lon2 ) ) range(len) # Consider some remarkable objects on Earth, [DD]: objects <- rbind( Mount_Kailash = c(lat = 31.069831297551982, lon = 81.31215667724196), Easter_Island_Moai = c(lat =-27.166873910247862, lon =-109.37092217323053), Great_Pyramid = c(lat = 29.979229451772856, lon = 31.13418110843685), Antarctic_Pyramid = c(lat = -79.97724194984573, lon = -81.96170583068950), Stonehendge = c(lat = 51.179036665131870, lon =-1.8262150017463086) ) # Consider all combinations of distances between them: path <- t(combn(rownames(objects), 2)) d <- geodist( lat1 = objects[path[, 1], "lat"], lon1 = objects[path[, 1], "lon"], lat2 = objects[path[, 2], "lat"], lon2 = objects[path[, 2], "lon"] ) * 1e-3 cat( paste( sprintf("%s <--- %1.4f km ---> %s", path[, 1], d, path[, 2]), collapse = "\n" ) ) # Consider two areas # * Bermuda triangle * Polynesian Triangle lat1 <- c(Miami = 25.789106, Hawaii = 19.820680) lon1 <- c(Miami = -80.226529, Hawaii = -155.467989) lat2 <- c(Bermuda = 32.294887, NewZeland = -43.443219) lon2 <- c(Bermuda = -64.781380, NewZeland = 170.271360) lat3 <- c(SanJuan = 18.466319, EasterIsland = -27.112701) lon3 <- c(SanJuan = -66.105743, EasterIsland = -109.349668) # Area provided by manually operated Google Earth: GETriangleArea <- c( Bermuda = 1147627.48, # [km²] Polynesian = 28775517.77 # [km²] ) # Show the discrepancy in calculations, [km²]: geoarea(lat1, lon1, lat2, lon2, lat3, lon3) - GETriangleArealibrary(pipenostics) # Consider the longest linear pipeline segment in Krasnoyarsk, [DD]: pipe <- list( lat1 = 55.98320350, lon1 = 92.81257226, lat2 = 55.99302417, lon2 = 92.80691885 ) # and some official Earth radii, [m]: R <- c( nominal_zero_tide_equatorial = 6378100.0000, nominal_zero_tide_polar = 6356800.0000, equatorial_radius = 6378137.0000, semiminor_axis_b = 6356752.3141, polar_radius_of_curvature = 6399593.6259, mean_radius_R1 = 6371008.7714, same_surface_R2 = 6371007.1810, same_volume_R3 = 6371000.7900, WGS84_ellipsoid_axis_a = 6378137.0000, WGS84_ellipsoid_axis_b = 6356752.3142, WGS84_ellipsoid_curvature_c = 6399593.6258, WGS84_ellipsoid_R1 = 6371008.7714, WGS84_ellipsoid_R2 = 6371007.1809, WGS84_ellipsoid_R3 = 6371000.7900, GRS80_axis_a = 6378137.0000, GRS80_axis_b = 6356752.3141, spherical_approx = 6366707.0195, meridional_at_the_equator = 6335439.0000, Chimborazo_maximum = 6384400.0000, Arctic_Ocean_minimum = 6352800.0000, Averaged_center_to_surface = 6371230.0000 ) # Calculate length of the pipeline segment for different radii: len <- with( pipe, vapply( R, geodist, double(1), lat1 = lat1, lon1 = lon1, lat2 = lat2, lon2 = lon2 ) ) range(len) # Consider some remarkable objects on Earth, [DD]: objects <- rbind( Mount_Kailash = c(lat = 31.069831297551982, lon = 81.31215667724196), Easter_Island_Moai = c(lat =-27.166873910247862, lon =-109.37092217323053), Great_Pyramid = c(lat = 29.979229451772856, lon = 31.13418110843685), Antarctic_Pyramid = c(lat = -79.97724194984573, lon = -81.96170583068950), Stonehendge = c(lat = 51.179036665131870, lon =-1.8262150017463086) ) # Consider all combinations of distances between them: path <- t(combn(rownames(objects), 2)) d <- geodist( lat1 = objects[path[, 1], "lat"], lon1 = objects[path[, 1], "lon"], lat2 = objects[path[, 2], "lat"], lon2 = objects[path[, 2], "lon"] ) * 1e-3 cat( paste( sprintf("%s <--- %1.4f km ---> %s", path[, 1], d, path[, 2]), collapse = "\n" ) ) # Consider two areas # * Bermuda triangle * Polynesian Triangle lat1 <- c(Miami = 25.789106, Hawaii = 19.820680) lon1 <- c(Miami = -80.226529, Hawaii = -155.467989) lat2 <- c(Bermuda = 32.294887, NewZeland = -43.443219) lon2 <- c(Bermuda = -64.781380, NewZeland = 170.271360) lat3 <- c(SanJuan = 18.466319, EasterIsland = -27.112701) lon3 <- c(SanJuan = -66.105743, EasterIsland = -109.349668) # Area provided by manually operated Google Earth: GETriangleArea <- c( Bermuda = 1147627.48, # [km²] Polynesian = 28775517.77 # [km²] ) # Show the discrepancy in calculations, [km²]: geoarea(lat1, lon1, lat2, lon2, lat3, lon3) - GETriangleArea
Convert length measured in millimeters (mm) to inches
inch_mm(x)inch_mm(x)
x |
length measured in millimeters, [mm].
Type: |
Length in inches, [inch].
Type: assert_double.
mm_inch for converting inches to mm
Other Measurement Unit Converter:
c_k(),
f_k(),
k_c(),
kgf_mpa(),
loss_flux(),
mm_inch(),
mpa_kgf(),
mpa_psi(),
psi_mpa()
library(pipenostics) inch_mm(c(25.4, 1))library(pipenostics) inch_mm(c(25.4, 1))
Convert temperature measured in Celsius- or Fahrenheit-scale to Kelvin (K).
k_c(x) k_f(x)k_c(x) k_f(x)
x |
temperature in initial scale:
Type: |
Temperature in Kelvin-scale, [K].
Type: assert_double.
c_k and f_k for converting from Kelvin-scale.
Other Measurement Unit Converter:
c_k(),
f_k(),
inch_mm(),
kgf_mpa(),
loss_flux(),
mm_inch(),
mpa_kgf(),
mpa_psi(),
psi_mpa()
library(pipenostics) # Convert from Celsius to Kelvin: k_c(c(-273.15, 100)) # Convert from Fahrenheit to Kelvin: k_f(c(-459.67, 212))library(pipenostics) # Convert from Celsius to Kelvin: k_c(c(-273.15, 100)) # Convert from Fahrenheit to Kelvin: k_f(c(-459.67, 212))
Convert pressure (stress) measured in megapascals (MPa) to kilogram-force per square cm (kgf/cm²).
kgf_mpa(x)kgf_mpa(x)
x |
pressure (stress) measured in megapascals, [MPa].
Type: |
Pressure (stress) in
kilogram-force per square cm, [kgf/cm²].
Type: assert_double.
mpa_kgf for converting kilogram-force per square cm to
megapascals
Other Measurement Unit Converter:
c_k(),
f_k(),
inch_mm(),
k_c(),
loss_flux(),
mm_inch(),
mpa_kgf(),
mpa_psi(),
psi_mpa()
library(pipenostics) kgf_mpa(c(0.0980665, 1))library(pipenostics) kgf_mpa(c(0.0980665, 1))
Convert heat flux measured for a cylindrical steel pipe to specific heat loss power of pipe.
loss_flux(x, d = 720) flux_loss(x, d = 720)loss_flux(x, d = 720) flux_loss(x, d = 720)
x |
value of
Type: |
d |
nominal (outside) diameter of pipe, [mm].
Type: |
Value of
specific heat loss power, [kcal/m/h], for
loss_flux(x, d, wth)
heat flux, [W/m²], for flux_loss(x, d, wth)(x)
Type: assert_double.
Other Measurement Unit Converter:
c_k(),
f_k(),
inch_mm(),
k_c(),
kgf_mpa(),
mm_inch(),
mpa_kgf(),
mpa_psi(),
psi_mpa()
library(pipenostics) # Consider pipes with nominal (outside) diameters: d <- c(998, 1395) # [mm] # Then maximum possible normative neat loss according (Minenergo-325) is loss_max <- c(218, 1040) # [kcal/m/h] # The appropriate flux is flux <- flux_loss(loss_max, d) print(flux) stopifnot(all.equal(loss_flux(flux, d), loss_max, tolerance = 1e-5))library(pipenostics) # Consider pipes with nominal (outside) diameters: d <- c(998, 1395) # [mm] # Then maximum possible normative neat loss according (Minenergo-325) is loss_max <- c(218, 1040) # [kcal/m/h] # The appropriate flux is flux <- flux_loss(loss_max, d) print(flux) stopifnot(all.equal(loss_flux(flux, d), loss_max, tolerance = 1e-5))
Calculate normative heat loss through the thermal insulation of the open-air supplying pipe as a function of construction, operation, and technical condition specifications according to Appendix 5.1 of Minenergo Method 278.
This type of calculations is usually made on design stage of district heating network (where water is a heat carrier) and is closely related to building codes and regulations.
m278hlair( t1 = 110, t2 = 60, t0 = 5, insd1 = 0.1, insd2 = insd1, d1 = 0.25, d2 = d1, lambda1 = 0.09, lambda2 = 0.07, k1 = 1, k2 = k1, lambda0 = 26, len = 1, duration = 1 )m278hlair( t1 = 110, t2 = 60, t0 = 5, insd1 = 0.1, insd2 = insd1, d1 = 0.25, d2 = d1, lambda1 = 0.09, lambda2 = 0.07, k1 = 1, k2 = k1, lambda0 = 26, len = 1, duration = 1 )
t1 |
temperature of heat carrier (water) inside the supplying pipe, [°C].
Type: |
t2 |
temperature of heat carrier (water) inside the returning pipe, [°C].
Type: |
t0 |
temperature of environment, [°C]. In case of open-air pipe this is
the ambient temperature. Type: |
insd1 |
thickness of the insulator which covers the supplying pipe, [m].
Type: |
insd2 |
thickness of the insulator which covers the returning pipe, [m].
Type: |
d1 |
outside diameter of supplying pipe, [m].
Type: |
d2 |
outside diameter of returning pipe, [m].
Type: |
lambda1 |
thermal conductivity of insulator which covers the supplying pipe
[W/m/°C]. Type: |
lambda2 |
thermal conductivity of insulator which covers the returning pipe
[W/m/°C]. |
k1 |
technical condition factor for insulator of supplying pipe, [].
Type: |
k2 |
technical condition factor for insulator of returning pipe, [].
Type: |
lambda0 |
thermal conductivity of environment, [W/m/°C]. In case of overhead
laying this is the thermal conductivity of open air.
Type: |
len |
length of supplying pipe, [m].
Type: |
duration |
duration of heat loss, [h].
Type: |
Details on using k1 and k2 are the same as for
m278hlcha.
Normative heat loss of the open-air laid supplying cylindrical pipe
during duration, [kcal].
If len of pipe is 1 m (meter) as well as duration is
set to 1 h (hour) (default values) then the return value is also the
specific heat loss power, [kcal/m/h] and so comparable with
those prescribed by
Minenergo Order 325. Type: assert_double.
Other Minenergo:
m278hlcha(),
m278hlund(),
m278insdata,
m278inshcm(),
m278soildata,
m325beta(),
m325nhl(),
m325nhldata,
m325nvl(),
m325nxdata
library(pipenostics) m278hlair()library(pipenostics) m278hlair()
Calculate normative heat loss through the thermal insulation of the supplying pipe mounted in underground channel as a function of construction, operation, and technical condition specifications according to Appendix 5.1 of Minenergo Method 278.
This type of calculations is usually made on design stage of district heating network (where water is a heat carrier) and is closely related to building codes and regulations.
m278hlcha( t1 = 110, t2 = 60, t0 = 5, insd1 = 0.1, insd2 = insd1, d1 = 0.25, d2 = d1, lambda1 = 0.09, lambda2 = 0.07, k1 = 1, k2 = k1, lambda0 = 1.74, z = 2, b = 0.5, h = 0.5, len = 1, duration = 1 )m278hlcha( t1 = 110, t2 = 60, t0 = 5, insd1 = 0.1, insd2 = insd1, d1 = 0.25, d2 = d1, lambda1 = 0.09, lambda2 = 0.07, k1 = 1, k2 = k1, lambda0 = 1.74, z = 2, b = 0.5, h = 0.5, len = 1, duration = 1 )
t1 |
temperature of heat carrier (water) inside the supplying pipe, [°C].
Type: |
t2 |
temperature of heat carrier (water) inside the returning pipe, [°C].
Type: |
t0 |
temperature of environment, [°C]. In case of channel laying this is
the temperature of subsoil. Type: |
insd1 |
thickness of the insulator which covers the supplying pipe, [m].
Type: |
insd2 |
thickness of the insulator which covers the returning pipe, [m].
Type: |
d1 |
outside diameter of supplying pipe, [m].
Type: |
d2 |
outside diameter of returning pipe, [m].
Type: |
lambda1 |
thermal conductivity of insulator which covers the supplying pipe
[W/m/°C]. Type: |
lambda2 |
thermal conductivity of insulator which covers the returning pipe
[W/m/°C]. Type: |
k1 |
technical condition factor for insulator of supplying pipe, [].
Type: |
k2 |
technical condition factor for insulator of returning pipe, [].
Type: |
lambda0 |
thermal conductivity of environment, [W/m/°C]. In case of channel
laying this is the thermal conductivity of subsoil.
Type: |
z |
channel laying depth, [m].
Type: |
b |
channel width, [m]. Type: |
h |
channel height, [m]. Type: |
len |
length of supplying pipe, [m].
Type: |
duration |
duration of heat loss, [h].
Type: |
k1 and k2 factor values equal to 1 mean the best
technical condition of insulation of appropriate pipes, whereas for poor
technical state factor values tends to 5 or more.
Nevertheless, when k1 and k2 both equal to 1 the
calculated specific heat loss power [kcal/m/h] is sometimes
higher than that listed in
Minenergo Order 325.
One should consider that situation when choosing method for heat loss
calculations.
Normative heat loss of supplying cylindrical pipe mounted in channel during
duration, [kcal].
If len of pipe is 1 m (meter) as well as duration is
set to 1 h (hour) (default values) then the return value is also the
specific heat loss power, [kcal/m/h] and so comparable with
those prescribed by
Minenergo Order 325.
Type: assert_double.
Other Minenergo:
m278hlair(),
m278hlund(),
m278insdata,
m278inshcm(),
m278soildata,
m325beta(),
m325nhl(),
m325nhldata,
m325nvl(),
m325nxdata
library(pipenostics) m278hlcha() ## Naive way to find out technical state (factors k1 and k2) for pipe ## segments constructed in 1980: optim( par = c(1.5, 1.5), fn = function(x) { # functional to optimize abs( m278hlcha(k1 = x[1], k2 = x[2]) - m325nhl( year = 1980, laying = "channel", d = 250, temperature = 110 ) ) }, method = "L-BFGS-B", lower = 1.01, upper = 4.4 )$parlibrary(pipenostics) m278hlcha() ## Naive way to find out technical state (factors k1 and k2) for pipe ## segments constructed in 1980: optim( par = c(1.5, 1.5), fn = function(x) { # functional to optimize abs( m278hlcha(k1 = x[1], k2 = x[2]) - m325nhl( year = 1980, laying = "channel", d = 250, temperature = 110 ) ) }, method = "L-BFGS-B", lower = 1.01, upper = 4.4 )$par
Calculate normative heat loss through the thermal insulation of the supplying underground pipe as a function of construction, operation, and technical condition specifications according to Appendix 5.1 of Minenergo Method 278.
This type of calculations is usually made on design stage of district heating network (where water is a heat carrier) and is closely related to building codes and regulations.
m278hlund( t1 = 110, t2 = 60, t0 = 5, insd1 = 0.1, insd2 = insd1, d1 = 0.25, d2 = d1, lambda1 = 0.09, lambda2 = 0.07, k1 = 1, k2 = k1, lambda0 = 1.74, z = 2, s = 0.55, len = 1, duration = 1 )m278hlund( t1 = 110, t2 = 60, t0 = 5, insd1 = 0.1, insd2 = insd1, d1 = 0.25, d2 = d1, lambda1 = 0.09, lambda2 = 0.07, k1 = 1, k2 = k1, lambda0 = 1.74, z = 2, s = 0.55, len = 1, duration = 1 )
t1 |
temperature of heat carrier (water) inside the supplying pipe, [°C].
Type: |
t2 |
temperature of heat carrier (water) inside the returning pipe, [°C].
Type: |
t0 |
temperature of environment, [°C]. For underground pipe this is
the temperature of subsoil. Type: |
insd1 |
thickness of the insulator which covers the supplying pipe, [m].
Type: |
insd2 |
thickness of the insulator which covers the returning pipe, [m].
Type: |
d1 |
outside diameter of supplying pipe, [m].
Type: |
d2 |
outside diameter of returning pipe, [m].
Type: |
lambda1 |
thermal conductivity of insulator which covers the supplying pipe
[W/m/°C]. Type: |
lambda2 |
thermal conductivity of insulator which covers the returning pipe
[W/m/°C]. Type: |
k1 |
technical condition factor for insulator of supplying pipe, [].
Type: |
k2 |
technical condition factor for insulator of returning pipe, [].
Type: |
lambda0 |
thermal conductivity of environment, [W/m/°C]. For underground pipe
this is the thermal conductivity of subsoil.
Type: |
z |
underground laying depth of supplying pipe, [m].
Type: |
s |
distance between supplying and returning pipes, [m].
Type: |
len |
length of supplying pipe, [m].
Type: |
duration |
duration of heat loss, [h].
Type: |
Details on using k1 and k2 are the same as for
m278hlcha.
Normative heat loss of supplying underground cylindrical pipe during
duration, [kcal]. If len of pipe is 1 m (meter)
as well as duration is set to 1 h (hour) (default values) then
the return value is also the specific heat loss power,
[kcal/m/h] and so comparable with those prescribed by
Minenergo Order 325.
Type: assert_double.
Other Minenergo:
m278hlair(),
m278hlcha(),
m278insdata,
m278inshcm(),
m278soildata,
m325beta(),
m325nhl(),
m325nhldata,
m325nvl(),
m325nxdata
library(pipenostics) m278hlund()library(pipenostics) m278hlund()
Data represent values of terms (intercept and factor) for calculating thermal conductivity of pipe insulation as a linear function of temperature of heat carrier (water).
m278insdatam278insdata
A data frame with 39 rows and 4 variables:
Number of insulation material table 5.1 of Appendix 5.3 in
Minenergo Method 278.
Type: assert_integerish.
Designation of insulation material more or less similar
to those in table 5.1 of Appendix 5.3 in
Minenergo Method 278.
Type: assert_character.
Value for intercept, [mW/m/°C].
Type: assert_integer.
Value for factor. Type: assert_integer.
Those values are set for different insulation materials in Appendix 5.3 of Minenergo Method 278 as norms.
Usually the data is not used directly. Instead use function
m278inshcm.
https://docs.cntd.ru/document/1200035568
Other Minenergo:
m278hlair(),
m278hlcha(),
m278hlund(),
m278inshcm(),
m278soildata,
m325beta(),
m325nhl(),
m325nhldata,
m325nvl(),
m325nxdata
library(pipenostics) head(m278insdata)library(pipenostics) head(m278insdata)
Get normative values of thermal conductivity of pipe insulation materials affirmed by Minenergo Method 278 as a function of temperature of heat carrier (water).
m278inshcm(temperature = 110, material = "aerocrete")m278inshcm(temperature = 110, material = "aerocrete")
temperature |
temperature of heat carrier (water) inside the pipe, [°C].
Type: |
material |
designation of insulation material as it stated in
|
Thermal conductivity of insulation materials at given set of temperatures,
[W/m/°C], [W/m/K].
Type: assert_double.
Other Minenergo:
m278hlair(),
m278hlcha(),
m278hlund(),
m278insdata,
m278soildata,
m325beta(),
m325nhl(),
m325nhldata,
m325nvl(),
m325nxdata
library(pipenostics) # Range of thermal conductivity of pipe insulation at 110 °C: range(m278inshcm(110, m278insdata[["material"]]))library(pipenostics) # Range of thermal conductivity of pipe insulation at 110 °C: range(m278inshcm(110, m278insdata[["material"]]))
Data represent normative values of thermal conductivity of subsoils which can surround pipes according to Table 5.3 of Appendix 5.3 in Minenergo Method 278.
m278soildatam278soildata
A data frame with 15 rows and 3 variables:
Geological name of subsoil.
Type: assert_character.
The degree of water penetration to the subsoil.
Type: assert_character.
Value of thermal conductivity of subsoil regarding water penetration,
[W/m/°C]. Type: assert_double.
https://docs.cntd.ru/document/1200035568
Other Minenergo:
m278hlair(),
m278hlcha(),
m278hlund(),
m278insdata,
m278inshcm(),
m325beta(),
m325nhl(),
m325nhldata,
m325nvl(),
m325nxdata
library(pipenostics) head(m278soildata)library(pipenostics) head(m278soildata)
Calculate - local heat loss coefficient according to rule
11.3.3 of
Minenergo Order 325.
Local heat loss coefficient is used to increase normative heat loss
of pipe by taking into account heat loss of fittings (shut-off valves,
compensators and supports). This coefficient is applied mostly as a factor
during the summation of heat losses of pipes in pipeline leveraging
formula 14 of
Minenergo Order 325.
m325beta(laying = "channel", d = 700)m325beta(laying = "channel", d = 700)
laying |
type of pipe laying depicting the position of pipe in space:
Type: |
d |
nominal (outside) diameter of pipe, [mm].
Type: |
Two possible values of : 1.2 or 1.15 depending on
pipe laying and its diameter. Type: assert_double.
Other Minenergo:
m278hlair(),
m278hlcha(),
m278hlund(),
m278insdata,
m278inshcm(),
m278soildata,
m325nhl(),
m325nhldata,
m325nvl(),
m325nxdata
library(pipenostics) norms <- within(m325nhldata, { beta <- m325beta(laying, as.double(d)) }) unique(norms$beta)library(pipenostics) norms <- within(m325nhldata, { beta <- m325beta(laying, as.double(d)) }) unique(norms$beta)
Calculate normative heat loss of pipe through the thermal insulation that is legally affirmed by Minenergo Order 325.
m325nhl( year = 1986, laying = "underground", exp5k = TRUE, insulation = 0, d = 700, temperature = 110, len = 1, duration = 1, beta = FALSE, extra = 2 )m325nhl( year = 1986, laying = "underground", exp5k = TRUE, insulation = 0, d = 700, temperature = 110, len = 1, duration = 1, beta = FALSE, extra = 2 )
year |
year when the pipe is put in operation after laying or total overhaul.
Type: |
laying |
type of pipe laying depicting the position of pipe in space:
Type: |
exp5k |
pipe regime flag: is pipe operated more that 5000 hours per year?
Type: |
insulation |
insulation that covers the exterior of pipe:
Type: |
d |
nominal (outside) diameter of pipe, [mm].
Type: |
temperature |
temperature of heat carrier (water) inside the pipe, [°C].
Type: |
len |
length of pipe, [m]. Type: |
duration |
duration of heat loss, [h].
Type: |
beta |
should they consider additional heat loss of fittings?
Type: |
extra |
number of points used for temperature extrapolation: |
Temperature extrapolation and pipe diameter interpolation are leveraged
for better accuracy. Both are linear as it dictated by
Minenergo Order 325.
Nevertheless, one could control the extrapolation behaviour by extra
argument: use lower values of extra for soft curvature near
extrapolation edges, and higher values for more physically reasoned
behaviour in far regions of extrapolation.
Normative heat loss of cylindrical pipe during duration,
[kcal]. If len of pipe is 1 m (meter) as well as
duration is set to 1 h (hour) (default values) then the
return value is also the specific heat loss power,
[kcal/m/h], prescribed by
Minenergo Order 325.
Type: assert_double.
Other Minenergo:
m278hlair(),
m278hlcha(),
m278hlund(),
m278insdata,
m278inshcm(),
m278soildata,
m325beta(),
m325nhldata,
m325nvl(),
m325nxdata
library(pipenostics) ## Consider a one-meter length pipe with pipe_diameter <- 700.0 # [mm] pipe_dating <- 1980 pipe_laying <- "underground" ## Linear extrapolation adopted in Minenergo's Order 325 using last two ## points: operation_temperature <- seq(0, 270, 10) qs <- m325nhl( year = pipe_dating, laying = pipe_laying, d = pipe_diameter, temperature = operation_temperature ) # [kcal/m/h] plot( operation_temperature, qs, type = "b", main = "Minenergo's Order 325. Normative heat loss of pipe", sub = sprintf( "%s pipe of (outside) diameter %i [mm] laid in %i", pipe_laying, pipe_diameter, pipe_dating ), xlab = "Temperature, [°C]", ylab = "Specific heat loss power, [kcal/m/h]" ) ## Consider heat loss due fittings: operation_temperature <- 65 # [°C] m325nhl( year = pipe_dating, laying = pipe_laying, d = pipe_diameter, temperature = operation_temperature, beta = c(FALSE, TRUE) ) # [kcal/m/h]library(pipenostics) ## Consider a one-meter length pipe with pipe_diameter <- 700.0 # [mm] pipe_dating <- 1980 pipe_laying <- "underground" ## Linear extrapolation adopted in Minenergo's Order 325 using last two ## points: operation_temperature <- seq(0, 270, 10) qs <- m325nhl( year = pipe_dating, laying = pipe_laying, d = pipe_diameter, temperature = operation_temperature ) # [kcal/m/h] plot( operation_temperature, qs, type = "b", main = "Minenergo's Order 325. Normative heat loss of pipe", sub = sprintf( "%s pipe of (outside) diameter %i [mm] laid in %i", pipe_laying, pipe_diameter, pipe_dating ), xlab = "Temperature, [°C]", ylab = "Specific heat loss power, [kcal/m/h]" ) ## Consider heat loss due fittings: operation_temperature <- 65 # [°C] m325nhl( year = pipe_dating, laying = pipe_laying, d = pipe_diameter, temperature = operation_temperature, beta = c(FALSE, TRUE) ) # [kcal/m/h]
Data represent values of specific heat loss power through the thermal
insulation officially accepted by
Minenergo Order 325 as
norms. Those values are maximums which are legally
affirmed to contribute to normative heat loss of
district heating systems with water as a heat carrier.
m325nhldatam325nhldata
A data frame with 17328 rows and 8 variables:
Identifier of data source: identifiers suited with
glob t?p? mean appropriate table ?.? in
Minenergo Order 325;
identifier sgc means that values are additionally
postulated (see Details).
Type: assert_character.
Year depicting the epoch when the pipe is put in operation after laying
or total overhaul. Type: assert_integer.
Type of pipe laying depicting the position of pipe in space. Only five types of pipe laying are considered:
air,
channel,
room,
tunnel,
underground.
Type: assert_character.
Logical indicator for pipe regime: if TRUE pipe is
operated more that 5000 hours per year.
Type: assert_logical.
Identifier of insulation that covers the exterior of pipe:
0no insulation
1foamed polyurethane or analogue
2polymer concrete
Type: assert_integerish.
Nominal (outside) diameter of pipe, [mm].
Type: assert_double.
Operational temperature of pipe, [°C].
Type: assert_double.
Normative value of specific heat loss power equal to heat flux output by
one-meter length steel pipe during an hour,
[kcal/m/h].
Type: assert_double.
Data is organized as a full factorial design, whereas for some factorial combinations Minenergo Order 325 does not provide values. For that cases values are postulated by practical reasons in Siberian cities and marked with source label sgc.
Usually the data is not used directly. Instead use function
m325nhl.
https://docs.cntd.ru/document/902148459
Other Minenergo:
m278hlair(),
m278hlcha(),
m278hlund(),
m278insdata,
m278inshcm(),
m278soildata,
m325beta(),
m325nhl(),
m325nvl(),
m325nxdata
library(pipenostics) head(m325nhldata)library(pipenostics) head(m325nhldata)
Calculate normative material loss of heat carrier (water) from cylindrical pipe according to rule 10.1.2 of Minenergo Order 325.
m325nvl(a = 0, d = 720, wth = 12, len = 1) m325nml( temperature = 130, pressure = mpa_kgf(6), a = 0, d = 720, wth = 12, len = 1 )m325nvl(a = 0, d = 720, wth = 12, len = 1) m325nml( temperature = 130, pressure = mpa_kgf(6), a = 0, d = 720, wth = 12, len = 1 )
a |
heat carrier (water) volume loss factor of cylindrical pipe,
[h⁻¹]. Type: |
d |
nominal (outside) diameter of pipe, [mm].
Type: |
wth |
nominal wall thickness of pipe, [mm].
Type: |
len |
pipe length, [m].
Type: |
temperature |
temperature of heat carrier (water) inside the pipe, [°C].
Type: |
pressure |
absolute
pressure of heat carrier (water) inside the pipe, [MPa].
Type: |
The calculations are based on the a-factor, which may be treated as the maximum allowed rate of heat carrier (water) volume loss per hour. So, its value varies from 0.0 h⁻¹ (no loss of heat carrier) up to 0.0025 h⁻¹ (maximum possible loss allowed). The cylindrical form of pipe is always assumed in calculations.
m325nvl
volume loss of heat carrier per hour, [m³/h].
m325nml
mass loss of heat carrier per hour, [ton/h].
Type: assert_double.
Other Minenergo:
m278hlair(),
m278hlcha(),
m278hlund(),
m278insdata,
m278inshcm(),
m278soildata,
m325beta(),
m325nhl(),
m325nhldata,
m325nxdata
library(pipenostics) # According to Minenergo-325 it may be granted to loose right up to the next # value of tons of heat carrier (water) per year (nine-month heating season) # for the typical supplying 100-meter length pipe: m325nml(a = 0.0025, len = 100) * 24 * 90library(pipenostics) # According to Minenergo-325 it may be granted to loose right up to the next # value of tons of heat carrier (water) per year (nine-month heating season) # for the typical supplying 100-meter length pipe: m325nml(a = 0.0025, len = 100) * 24 * 90
Data describes a virtual test bench of branched district heating network by exposing parameters associated with Minenergo Order 325. They treat data as a snapshot of network state and use it primarily for static thermal-hydraulic computations and topology effects.
m325nxdatam325nxdata
A data frame with 26 rows (number of nodes and incoming edges) and 17 variables:
An identifier of node which heat carrier flows out.
Type: any type that can be painlessly coerced to character
by as.character.
An identifier of node which heat carrier flows in. According to topology
of test bench considered this identifier should be unique for every row.
Type: any type that can be painlessly coerced to
character by as.character.
Snapshot of thermal-hydraulic regime state: temperature of heat carrier
(water) sensor-measured on terminal acceptor node, [°C].
Type: assert_double. NAs are introduced
for nodes without temperature sensor.
Snapshot of thermal-hydraulic regime state:
sensor-measured
absolute pressure of heat carrier (water) inside the pipe (i.e.
acceptor's incoming edge), [MPa].
Type: assert_double. NAs are introduced
for nodes without pressure sensor.
Snapshot of thermal-hydraulic regime state:
sensor-measured amount of heat carrier (water) on terminal node that is
transferred by pipe (i.e. acceptor's incoming edge) during a period,
[ton/h]. Type: assert_double.
NAs are introduced for nodes without flow rate sensor.
Heat carrier (water) volume loss factor of cylindrical pipe,
[h⁻¹]. Type: assert_double.
nominal (outside) diameter of pipe (i.e.diameter of acceptor's incoming
edge), [mm]. Type: assert_double.
nominal wall thickness of pipe, [mm].
Type: assert_double.
pipe length (i.e. length of acceptor's incoming edge), [m].
Type: assert_double.
year when the pipe (i.e. acceptor's incoming edge) is put in operation
after laying or total overhaul.
Type: assert_integerish.
identifier of insulation that covers the exterior of pipe (i.e. acceptor's incoming edge):
0no insulation
1foamed polyurethane or analogue
2polymer concrete
Type: assert_integerish.
type of pipe laying depicting the position of pipe in space. Only five types of pipe laying are considered:
air,
channel,
room,
tunnel,
underground.
Type: assert_character.
logical indicator: should they consider additional heat loss of fittings
located on this pipe (i.e. acceptor's incoming edge)?
Type: assert_logical.
logical indicator for regime of pipe (i.e. acceptor's incoming edge): if
TRUE pipe is operated more that 5000 hours per year.
Type: assert_logical.
roughness of internal wall of pipe (i.e. acceptor's incoming edge),
[m]. Type: assert_double.
elevation of pipe inlet, [m].
Type: assert_double.
elevation of pipe outlet, [m].
Type: assert_double.
The test bench has the next configuration:
As it may be seen from the figure there is a particularity in topology of
the provided directed graph: each node has only single ancestor. Hence one
of isomorphic representation of such directed graph is a
data.frame in which each row describes a node along with its
incoming edge and each column contains an attribute value for that node or
an attribute value for its incoming edge.
Since they deal with incoming edges and hence nodes are all flow acceptors the natural enumeration of nodes is by acceptor id.
Note that to leverage igraph functionality for plotting there is a zero sender of flow.
Other Minenergo:
m278hlair(),
m278hlcha(),
m278hlund(),
m278insdata,
m278inshcm(),
m278soildata,
m325beta(),
m325nhl(),
m325nhldata,
m325nvl()
library(pipenostics) # Do not hesitate to use `data.table` and `igraph` for larger chunks of # network. # Check for declared topology isomorphism: stopifnot( all(!duplicated(m325nxdata$acceptor)) ) # Do all terminal nodes have sensor-measured regime parameters?: terminal_nodes <- subset(m325nxdata, !(acceptor %in% sender)) stopifnot( all( !is.na( subset(terminal_nodes, select = c(temperature, pressure, flow_rate)) ) ) )library(pipenostics) # Do not hesitate to use `data.table` and `igraph` for larger chunks of # network. # Check for declared topology isomorphism: stopifnot( all(!duplicated(m325nxdata$acceptor)) ) # Do all terminal nodes have sensor-measured regime parameters?: terminal_nodes <- subset(m325nxdata, !(acceptor %in% sender)) stopifnot( all( !is.na( subset(terminal_nodes, select = c(temperature, pressure, flow_rate)) ) ) )
Trace values of thermal-hydraulic regime (temperature, pressure, flow rate, and other) in the bunched pipeline against the flow direction using norms of heat loss values prescribed by Minenergo Order 325.
Algorithm also suits for partially measurable district heating network with massive data lack conditions, when there are no temperature and pressure sensor readings on the majority of terminal nodes.
m325tracebw( sender = 6, acceptor = 7, temperature = 70, pressure = pipenostics::mpa_kgf(6), flow_rate = 20, a = 0, d = 100, wth = 6.5, len = 72.446, year = 1986, insulation = 0, laying = "tunnel", beta = FALSE, exp5k = TRUE, roughness = 0.001, inlet = 0.5, outlet = 1, method = "romeo", opinion = "median", strict_sizes = FALSE, verbose = TRUE, csv = FALSE, file = "m325tracebw.csv" )m325tracebw( sender = 6, acceptor = 7, temperature = 70, pressure = pipenostics::mpa_kgf(6), flow_rate = 20, a = 0, d = 100, wth = 6.5, len = 72.446, year = 1986, insulation = 0, laying = "tunnel", beta = FALSE, exp5k = TRUE, roughness = 0.001, inlet = 0.5, outlet = 1, method = "romeo", opinion = "median", strict_sizes = FALSE, verbose = TRUE, csv = FALSE, file = "m325tracebw.csv" )
sender |
identifier of the node which heat carrier flows out.
Type: any type that can be painlessly coerced to character by
|
acceptor |
identifier of the node which heat carrier flows in. According to topology
of test bench considered this identifier should be unique for every row.
Type: any type that can be painlessly coerced to character by
|
temperature |
sensor-measured temperature of heat carrier (water) sensor-measured on
the terminal acceptor node, [°C]. Use |
pressure |
sensor-measured
absolute pressure of heat carrier (water) inside the pipe (i.e.
acceptor's incoming edge), [MPa].
Type: |
flow_rate |
sensor-measured amount of heat carrier (water) on terminal node that is
transferred by pipe (i.e. acceptor's incoming edge) during a period,
[ton/h]. Type: |
a |
heat carrier volume loss factor of pipe:
|
d |
nominal (outside) diameter of pipe (i.e.diameter of acceptor's incoming
edge), [mm]. Type: |
wth |
nominal wall thickness of pipe, [mm].
Type: |
len |
pipe length (i.e. length of acceptor's incoming edge), [m].
Type: |
year |
year when the pipe (i.e. acceptor's incoming edge) is put in operation
after laying or total overhaul.
Type: |
insulation |
identifier of insulation that covers the exterior of pipe (i.e. acceptor's incoming edge):
Type: |
laying |
type of pipe laying depicting the position of pipe in space. Only five types of pipe laying are considered:
Type: |
beta |
logical indicator: should they consider additional heat loss of fittings
located on this pipe (i.e. acceptor's incoming edge)?
Type: |
exp5k |
logical indicator for regime of pipe (i.e. acceptor's incoming edge): if
|
roughness |
roughness of internal wall of pipe (i.e. acceptor's incoming edge),
[m].
Type: |
inlet |
elevation of pipe inlet, [m].
Type: |
outlet |
elevation of pipe outlet, [m].
Type: |
method |
method of determining Darcy friction factor:
Type: |
opinion |
method for aggregating values of regime parameters on each node for the next tracing step:
Type: |
strict_sizes |
verify diameter and wall thickness with the actual pipe specifications
produced. Type: |
verbose |
logical indicator: should they watch tracing process on console?
Type: |
csv |
logical indicator: should they incrementally dump results to csv-
file while tracing?
Type: |
file |
name of csv-file which they dump results to.
Type: |
They consider the topology of district heating network represented by
m325nxdata:
The network may be partially sensor-equipped too:
In latter case no more than two nodes must be equipped with pressure and temperature sensors whereas for other nodes only flow rate sensors must be installed.
Tracing starts from sensor-equipped nodes and goes backwards, i.e against the flow direction.
Though some input arguments are natively vectorized their individual values
all relate to common part of district heating network, i.e. associated with
common object. It is due to isomorphism between vector representation and
directed graph of this network. For more details of isomorphic topology
description see m325nxdata.
Before tracing starts for the next node, previously calculated values of thermal-hydraulic parameters are aggregated by either averaging or by median. The latter seems more robust for avoiding strong influence of possible outliers which may come from actual heating transfer anomalies, erroneous sensor readings or wrong pipeline specifications.
Aggregation for values of flow rate at the node is always sum.
Optional verification of pipe diameters and wall thicknesses is performed
against b36pipedata data.
A data.frame containing results (detailed log) of tracing in
narrow format:
nodeTracing job. Identifier of the node which regime parameters is
calculated for. Values in this vector are identical to those in
argument acceptor.
Type: assert_character.
tracingTracing job. Identifiers of nodes from which regime parameters
are traced for the given node. Identifier sensor is used when
values of regime parameters for the node are sensor readings.
Type: assert_character.
backwardTracing job. Identifier of tracing direction. It constantly
equals to TRUE.
Type: assert_logical.
aggregationTracing job. Identifier of aggregation method: span,
median, mean, or identity.
Type: assert_character.
lossTraced thermal hydraulic regime. Normative specific heat loss
power of adjacent pipe, [kcal/m/h].
Type: assert_double.
fluxTraced thermal hydraulic regime. Normative heat flux of
adjacent pipe, [W/m²].
Type: assert_double.
QTraced thermal hydraulic regime. Normative heat loss of
adjacent pipe per day, [kcal].
Type: assert_character.
temperatureTraced thermal hydraulic regime. Traced temperature of heat
carrier (water) that is associated with the node, [°C].
Type: assert_double.
pressureTraced thermal hydraulic regime. Traced pressure of heat
carrier (water) that is associated with the node, [MPa].
Type: assert_double.
flow_rateTraced thermal hydraulic regime. Traced flow rate of heat
carrier (water) that is associated with the node, [ton/h].
Type: assert_double.
jobTracing job. Value of tracing job counter.
Type: assert_count.
Type: assert_data_frame.
Other Regime tracing:
dropg(),
dropp(),
dropt(),
m325tracefw(),
m325traceline(),
tracebw(),
tracefw(),
traceline()
library(pipenostics) ## It is possible to run without specification of argument values: m325tracebw() ## Consider isomorphic representation of District Heating Network graph: DHN <- m325nxdata ## Distinct options for opinion aggregation lead to distinct traced ## temperature and pressure: ## * When aggregation is by mean: output_mean <- do.call( "m325tracebw", c(as.list(DHN), verbose = FALSE, opinion = "mean") ) ## * When aggregation is by median: output_median <- do.call( "m325tracebw", c(as.list(DHN), verbose = FALSE, opinion = "median") ) ## It is possible to process partially measurable District Heating Network: ## * Simulate lack of temperature and pressure sensors: DHN[c(7, 10, 21, 24), c("temperature", "pressure")] <- NA_real_ ## * Trace thermal-hydraulic regime: do.call("m325tracebw", c(as.list(DHN), verbose = FALSE))library(pipenostics) ## It is possible to run without specification of argument values: m325tracebw() ## Consider isomorphic representation of District Heating Network graph: DHN <- m325nxdata ## Distinct options for opinion aggregation lead to distinct traced ## temperature and pressure: ## * When aggregation is by mean: output_mean <- do.call( "m325tracebw", c(as.list(DHN), verbose = FALSE, opinion = "mean") ) ## * When aggregation is by median: output_median <- do.call( "m325tracebw", c(as.list(DHN), verbose = FALSE, opinion = "median") ) ## It is possible to process partially measurable District Heating Network: ## * Simulate lack of temperature and pressure sensors: DHN[c(7, 10, 21, 24), c("temperature", "pressure")] <- NA_real_ ## * Trace thermal-hydraulic regime: do.call("m325tracebw", c(as.list(DHN), verbose = FALSE))
Trace values of thermal-hydraulic regime (temperature, pressure, flow rate, and other) in the bunched pipeline along the flow direction using norms of heat loss values prescribed by Minenergo Order 325.
m325tracefw( sender = c(0, 1), acceptor = c(1, 2), temperature = c(70, NA_real_), pressure = c(pipenostics::mpa_kgf(6), NA_real_), flow_rate = c(20, NA_real_), a = c(0, 0), d = c(100, 100), wth = c(12, 12), len = c(72.446, 72.446), year = c(1986, 1986), insulation = c(0, 0), laying = c("tunnel", "tunnel"), beta = c(FALSE, FALSE), exp5k = c(TRUE, TRUE), roughness = c(0.001, 0.001), inlet = c(0.5, 1), outlet = c(1, 1), elev_tol = 0.1, method = "romeo", strict_sizes = FALSE, verbose = TRUE, csv = FALSE, file = "m325tracefw.csv", use_cluster = FALSE )m325tracefw( sender = c(0, 1), acceptor = c(1, 2), temperature = c(70, NA_real_), pressure = c(pipenostics::mpa_kgf(6), NA_real_), flow_rate = c(20, NA_real_), a = c(0, 0), d = c(100, 100), wth = c(12, 12), len = c(72.446, 72.446), year = c(1986, 1986), insulation = c(0, 0), laying = c("tunnel", "tunnel"), beta = c(FALSE, FALSE), exp5k = c(TRUE, TRUE), roughness = c(0.001, 0.001), inlet = c(0.5, 1), outlet = c(1, 1), elev_tol = 0.1, method = "romeo", strict_sizes = FALSE, verbose = TRUE, csv = FALSE, file = "m325tracefw.csv", use_cluster = FALSE )
sender |
identifier of the node which heat carrier flows out.
Type: any type that can be painlessly coerced to character by
|
acceptor |
identifier of the node which heat carrier flows in. According to topology
of test bench considered this identifier should be unique for every row.
Type: any type that can be painlessly coerced to character by
|
temperature |
sensor-measured temperature of heat carrier (water) sensor-measured on
the root node, [°C].
Use |
pressure |
sensor-measured
absolute pressure of heat carrier (water) inside the pipe on the root
node, [MPa]. Use |
flow_rate |
sensor-measured amount of heat carrier (water) on root node that is
transferred by pipe during a period, [ton/h].
Type: |
a |
heat carrier (water) volume loss factor of cylindrical pipe,
[h⁻¹]. Type: |
d |
nominal (outside) diameter of pipe (i.e.diameter of acceptor's incoming
edge), [mm].
Type: |
wth |
nominal wall thickness of pipe, [mm].
Type: |
len |
pipe length (i.e. length of acceptor's incoming edge), [m].
Type: |
year |
year when the pipe (i.e. acceptor's incoming edge) is put in operation
after laying or total overhaul.
Type: |
insulation |
identifier of insulation that covers the exterior of pipe (i.e. acceptor's incoming edge):
Type: |
laying |
type of pipe laying depicting the position of pipe in space. Only five types of pipe laying are considered:
Type: |
beta |
logical indicator: should they consider additional heat loss of fittings
located on this pipe (i.e. acceptor's incoming edge)?
Type: |
exp5k |
logical indicator for regime of pipe (i.e. acceptor's incoming edge): if
|
roughness |
roughness of internal wall of pipe (i.e. acceptor's incoming edge),
[m]. Type: |
inlet |
elevation of pipe inlet, [m].
Type: |
outlet |
elevation of pipe outlet, [m].
Type: |
elev_tol |
maximum allowed discrepancy between adjacent outlet and inlet elevations
of two subsequent pipes in the traced path, [m].
Type: |
method |
method of determining Darcy friction factor:
Type: |
strict_sizes |
verify diameter and wall thickness with the actual pipe specifications
produced. Type: |
verbose |
logical indicator: should they watch tracing process on console?
Type: |
csv |
logical indicator: should they incrementally dump results to csv-
file while tracing?
Type: |
file |
name of csv-file which they dump results to.
Type: |
use_cluster |
utilize functionality of parallel processing on multi-core CPU.
Type: |
The calculated (values of) regime may be considered as representation of district heating process in conditions of hypothetically perfect technical state of pipe walls and insulation.
They consider the topology of district heating network represented by
m325nxdata:
Tracing starts from sensor-equipped root node and goes forward, i.e along
the flow direction. Function m325traceline serves under the
hood for tracing identified linear segments from root node to every
terminal node. Hence they only need root node to be equipped with sensors.
Sensors at other nodes are redundant in forward tracing, since the tracing
algorithm by no means consider them for tracing.
Moreover in the forward tracing algorithm they assume the flow of heat carrier is distributed proportionally to the cross-sectional area of the outgoing pipeline. Actually, a lot of reasons may cause significant deviations from this assumption. As a result, the sequence of paired backward/forward tracing may be divergent for regime parameters.
Though some input arguments are natively vectorized their individual values
all relate to common part of district heating network, i.e. associated with
common object. It is due to isomorphism between vector representation and
directed graph of this network. For more details of isomorphic topology
description see m325nxdata.
They are welcome to couple the algorithm with functionality of data.table.
Optional verification of pipe diameters and wall thicknesses is performed
against b36pipedata data.
A data.frame containing results (detailed log) of tracing in
narrow format:
nodeTracing job. Identifier of the node which regime parameters is
calculated for. Values in this vector are identical to those in
argument acceptor.
Type: assert_character.
tracingTracing job. Identifiers of nodes from which regime parameters
are traced for the given node. Identifier sensor is used when
values of regime parameters for the node are sensor readings.
Type: assert_character.
backwardTracing job. Identifier of tracing direction. It constantly
equals to FALSE.
Type: assert_logical.
aggregationTracing job. Identifier of the aggregation method associated
with traced values. For forward tracing the only option is
identity.
Type: assert_character.
lossTraced thermal hydraulic regime. Normative specific heat loss
power of adjacent pipe, [kcal/m/h].
Type: assert_double.
fluxTraced thermal hydraulic regime. Normative heat flux of
adjacent pipe, [W/m²].
Type: assert_double.
QTraced thermal hydraulic regime. Normative heat loss of
adjacent pipe per day, [kcal].
Type: assert_character.
temperatureTraced thermal hydraulic regime. Traced temperature of heat
carrier (water) that is associated with the node, [°C].
Type: assert_double.
pressureTraced thermal hydraulic regime. Traced pressure of heat
carrier (water) that is associated with the node, [MPa].
Type: assert_double.
flow_rateTraced thermal hydraulic regime. Traced flow rate of heat
carrier (water) that is associated with the node, [ton/h].
Type: assert_double.
jobTracing job. Value of tracing job counter.
For forward tracing value of job counts the number of traced
paths from root node. Type: assert_count.
Type: assert_data_frame.
Other Regime tracing:
dropg(),
dropp(),
dropt(),
m325tracebw(),
m325traceline(),
tracebw(),
tracefw(),
traceline()
library(pipenostics) # Minimum two nodes should be in district heating network graph: m325tracefw(verbose = FALSE) # Consider isomorphic representation of District Heating Network graph: DHN <- m325nxdata # * avoid using numeric identifiers for nodes: DHN$sender <- sprintf("N%02i", DHN$sender) DHN$acceptor <- sprintf("N%02i", DHN$acceptor) # Perform backward tracing to get regime on root node: bw_report <- do.call("m325tracebw", c(as.list(DHN), verbose = FALSE)) # Put the traced values to the root node of test bench: root_node_idx <- 12 root_node <- sprintf("N%02i", root_node_idx) regime_param <- c("temperature", "pressure", "flow_rate") DHN[root_node_idx, regime_param] <- subset(bw_report, node == root_node & aggregation == "median", regime_param) rm(root_node, root_node_idx) # Trace the test bench forward for the first time: fw_report <- do.call( "m325tracefw", c(as.list(DHN), verbose = FALSE, elev_tol = .5) ) # Let's compare traced regime at terminal nodes back to test bench: report <- subset( rbind(bw_report, fw_report), node %in% subset(DHN, !(acceptor %in% sender))$acceptor & aggregation == "identity" ) regime_delta <- colMeans( subset(report, backward, regime_param) - subset(report, !backward, regime_param) ) print(regime_delta) stopifnot(sqrt(regime_delta %*% regime_delta) < 0.5) # To address the problem of possible norm losses of the heat carrier, # they could roughly define the leaks as follows: DHN[, "a"] <- 0.0025 * (365 - 90) / 365 # so that forward tracing fw_report_loss <- do.call( "m325tracefw", c(as.list(DHN), verbose = FALSE, elev_tol = .5) ) # produces slightly different results [kcal/m/h]: max(abs(fw_report[, "loss"] - fw_report_loss[, "loss"]), na.rm = TRUE)library(pipenostics) # Minimum two nodes should be in district heating network graph: m325tracefw(verbose = FALSE) # Consider isomorphic representation of District Heating Network graph: DHN <- m325nxdata # * avoid using numeric identifiers for nodes: DHN$sender <- sprintf("N%02i", DHN$sender) DHN$acceptor <- sprintf("N%02i", DHN$acceptor) # Perform backward tracing to get regime on root node: bw_report <- do.call("m325tracebw", c(as.list(DHN), verbose = FALSE)) # Put the traced values to the root node of test bench: root_node_idx <- 12 root_node <- sprintf("N%02i", root_node_idx) regime_param <- c("temperature", "pressure", "flow_rate") DHN[root_node_idx, regime_param] <- subset(bw_report, node == root_node & aggregation == "median", regime_param) rm(root_node, root_node_idx) # Trace the test bench forward for the first time: fw_report <- do.call( "m325tracefw", c(as.list(DHN), verbose = FALSE, elev_tol = .5) ) # Let's compare traced regime at terminal nodes back to test bench: report <- subset( rbind(bw_report, fw_report), node %in% subset(DHN, !(acceptor %in% sender))$acceptor & aggregation == "identity" ) regime_delta <- colMeans( subset(report, backward, regime_param) - subset(report, !backward, regime_param) ) print(regime_delta) stopifnot(sqrt(regime_delta %*% regime_delta) < 0.5) # To address the problem of possible norm losses of the heat carrier, # they could roughly define the leaks as follows: DHN[, "a"] <- 0.0025 * (365 - 90) / 365 # so that forward tracing fw_report_loss <- do.call( "m325tracefw", c(as.list(DHN), verbose = FALSE, elev_tol = .5) ) # produces slightly different results [kcal/m/h]: max(abs(fw_report[, "loss"] - fw_report_loss[, "loss"]), na.rm = TRUE)
Trace values of thermal-hydraulic regime (temperature, pressure, flow_rate, and other) along the adjacent linear segments of pipeline using norms of heat loss values prescribed by Minenergo Order 325.
m325traceline( temperature = 130, pressure = mpa_kgf(6), flow_rate = 250, g = 0, a = 0, d = 711, wth = 12.7, len = c(600, 530, 300, 350), year = 1986, insulation = 0, laying = "underground", beta = FALSE, exp5k = TRUE, roughness = 0.006, inlet = 0, outlet = 0, elev_tol = 0.1, method = "romeo", forward = TRUE, absg = TRUE, strict_sizes = FALSE )m325traceline( temperature = 130, pressure = mpa_kgf(6), flow_rate = 250, g = 0, a = 0, d = 711, wth = 12.7, len = c(600, 530, 300, 350), year = 1986, insulation = 0, laying = "underground", beta = FALSE, exp5k = TRUE, roughness = 0.006, inlet = 0, outlet = 0, elev_tol = 0.1, method = "romeo", forward = TRUE, absg = TRUE, strict_sizes = FALSE )
temperature |
Traced thermal hydraulic regime. Sensor-measured temperature of heat
carrier (water)
inside the pipe sensor-measured at the inlet
(forward tracing) or at the outlet (backward tracing) of path, [°C].
Type: |
pressure |
Traced thermal hydraulic regime. Sensor-measured
absolute
pressure of heat carrier (water) sensor-measured at the inlet
(forward tracing) or at the outlet (backward tracing) of path,
[MPa].Type: |
flow_rate |
Traced thermal hydraulic regime. Amount of heat carrier (water)
sensor-measured at the inlet (forward tracing) or at the outlet (backward
tracing) of path, [ton/h].
Type: |
g |
amount of heat carrier discharge to network for each pipe segment in the
tracing path enumerated along the direction of flow. If flag |
a |
heat carrier (water) volume loss factor of cylindrical pipe,
[h⁻¹]. Type: |
d |
nominal (outside) diameters of subsequent pipes in tracing path that are
enumerated along the direction of flow, [mm].
Type: |
wth |
nominal wall thickness of pipe, [mm].
Type: |
len |
length of subsequent pipes in tracing path that are enumerated
along the direction of flow, [m].
Type: |
year |
year when pipe is put in operation after laying or total overhaul for
each pipe in tracing path enumerated along the direction of flow.
Type: |
insulation |
insulation that covers the exterior of pipe:
for each pipe in tracing path enumerated along the direction of flow.
Type: |
laying |
type of pipe laying depicting the position of pipe in space:
for each pipe in tracing path enumerated along the direction of flow.
Type: |
beta |
logical indicator: should they consider additional heat loss of fittings?
Logical value for each pipe in tracing path enumerated along the direction
of flow. Type: |
exp5k |
logical indicator for regime of pipe: is pipe operated more that
|
roughness |
roughness of internal wall for each pipe in tracing path enumerated along
the direction of flow, [m].
Type: |
inlet |
elevation of pipe inlet for each pipe in tracing path enumerated along
the direction of flow, [m].
Type: |
outlet |
elevation of pipe outlet for each pipe in tracing path enumerated along
the direction of flow, [m].
Type: |
elev_tol |
maximum allowed discrepancy between adjacent outlet and inlet elevations of
two subsequent pipes in the traced path, [m].
Type: |
method |
method of determining Darcy friction factor
Type: |
forward |
tracing direction flag: is it a forward direction of tracing?
If |
absg |
whether argument |
strict_sizes |
verify diameter and wall thickness with the actual pipe specifications
produced. Type: |
They consider only simple tracing paths which do not contain rings and any kind of parallelization. At the same time bidirectional (forward and backward) tracing is possible in accordance with sensor position. They also may consider discharges to network at the inlet of each pipeline segment as an approximation of actual forks of flows.
Relevant illustration of the adopted assumptions for 4-segment tracing path is depicted on the next figure.
They make additional check for consistency of inlet and outlet
values for subsequent pipe segments. Discrepancy of appropriate elevations
cannot be more than elev_tol.
They also may consider some normative volume loss of heat carrier (water) by tuning volume loss factor a in range 0.0 – 0.0025 h⁻¹.
Optional verification of pipe diameters and wall thicknesses is performed
against b36pipedata data.
A list containing results (detailed log) of tracing for each
pipe in tracing path enumerated along the direction of flow:
temperatureTraced thermal hydraulic regime. Traced temperature of heat
carrier (water), [°C].
Type: assert_double.
pressureTraced thermal hydraulic regime. Traced pressure of heat
carrier (water) for each pipe in tracing path enumerated along the
direction of flow, [MPa].
Type: assert_double.
flow_rateTraced thermal hydraulic regime. Traced flow rate of heat
carrier (water) for each pipe in tracing path enumerated along the
direction of flow, [ton/h].
Type: assert_double.
lossTraced thermal hydraulic regime. Normative specific heat
loss power for each pipe in tracing path enumerated along the direction
of flow, [kcal/m/h].
Type: assert_double.
fluxTraced thermal hydraulic regime. Normative heat flux for each
pipe in tracing path enumerated along the direction of flow,
[W/m²]. Type: assert_double.
QTraced thermal hydraulic regime. Normative heat loss for each
pipe in tracing path enumerated along the direction of flow per day,
[kcal]. Type: assert_double.
Type: assert_list.
Other Regime tracing:
dropg(),
dropp(),
dropt(),
m325tracebw(),
m325tracefw(),
tracebw(),
tracefw(),
traceline()
library(pipenostics) # Consider 4-segment tracing path depicted. # First, let sensor readings for forward tracing: t_fw <- 130 # [°C] p_fw <- mpa_kgf(6) * all.equal(.588399, mpa_kgf(6)) # [MPa] g_fw <- 250 # [ton/h] # Let discharges to network for each pipeline segment are somehow determined # as discharges <- seq(0, 30, 10) # [ton/h] # Then the calculated regime (red squares) for forward tracing is m325traceline(t_fw, p_fw, g_fw, discharges, forward = TRUE) # Next consider values of traced regime as sensor readings for backward # tracing: t_bw <- 127.3367 # [°C] p_bw <- .5870330 # [MPa] g_bw <- 190 # [ton/h] # Then the calculated regime (red squares) for backward tracing is regime_bw <- m325traceline(t_bw, p_bw, g_bw, discharges, forward = FALSE) print(regime_bw) # Let compare sensor readings with backward tracing results: with(regime_bw, { lambda <- function(val, constraint) c(val, constraint, constraint - val, abs(constraint - val) * 100/constraint) first <- 1 structure( rbind( lambda(temperature[first], t_fw), lambda(pressure[first], p_fw), lambda(flow_rate[first], g_fw) ), dimnames = list( c("temperature", "pressure", "flow_rate"), c("sensor.value", "traced.value", "abs.discr", "rel.discr") ) ) }) # To address the problem of possible norm losses of the heat carrier, # they could roughly define the leaks as follows: # * maximum value prescribed to heat carrier loss factor, [h⁻¹], # multiplied by heating season relative duration: a <- 0.0025 * ( (365 - 90)/365 ) # * length of subsequent pipes, [m]: l <- c(600, 530, 300, 350) # * nominal (outside) diameters of subsequent pipes, [m]: D <- rep.int(700, 4) * 1e-3 # * average year volumes of heat carrier (no heat carrier for 90 days in # summer), [m³] V <- pi * D^2 / 4 * l # * finally they get, [ton/h]: discharges <- a * V * drop(iapws::if97("rho", mpa_kgf(6), k_c(130))) * 1e-3 # * and the calculated regime (red squares) for forward tracing becomes m325traceline(g = discharges, forward = TRUE) # Let's compare it with more formal calculations: m325traceline(a = a, forward = TRUE)library(pipenostics) # Consider 4-segment tracing path depicted. # First, let sensor readings for forward tracing: t_fw <- 130 # [°C] p_fw <- mpa_kgf(6) * all.equal(.588399, mpa_kgf(6)) # [MPa] g_fw <- 250 # [ton/h] # Let discharges to network for each pipeline segment are somehow determined # as discharges <- seq(0, 30, 10) # [ton/h] # Then the calculated regime (red squares) for forward tracing is m325traceline(t_fw, p_fw, g_fw, discharges, forward = TRUE) # Next consider values of traced regime as sensor readings for backward # tracing: t_bw <- 127.3367 # [°C] p_bw <- .5870330 # [MPa] g_bw <- 190 # [ton/h] # Then the calculated regime (red squares) for backward tracing is regime_bw <- m325traceline(t_bw, p_bw, g_bw, discharges, forward = FALSE) print(regime_bw) # Let compare sensor readings with backward tracing results: with(regime_bw, { lambda <- function(val, constraint) c(val, constraint, constraint - val, abs(constraint - val) * 100/constraint) first <- 1 structure( rbind( lambda(temperature[first], t_fw), lambda(pressure[first], p_fw), lambda(flow_rate[first], g_fw) ), dimnames = list( c("temperature", "pressure", "flow_rate"), c("sensor.value", "traced.value", "abs.discr", "rel.discr") ) ) }) # To address the problem of possible norm losses of the heat carrier, # they could roughly define the leaks as follows: # * maximum value prescribed to heat carrier loss factor, [h⁻¹], # multiplied by heating season relative duration: a <- 0.0025 * ( (365 - 90)/365 ) # * length of subsequent pipes, [m]: l <- c(600, 530, 300, 350) # * nominal (outside) diameters of subsequent pipes, [m]: D <- rep.int(700, 4) * 1e-3 # * average year volumes of heat carrier (no heat carrier for 90 days in # summer), [m³] V <- pi * D^2 / 4 * l # * finally they get, [ton/h]: discharges <- a * V * drop(iapws::if97("rho", mpa_kgf(6), k_c(130))) * 1e-3 # * and the calculated regime (red squares) for forward tracing becomes m325traceline(g = discharges, forward = TRUE) # Let's compare it with more formal calculations: m325traceline(a = a, forward = TRUE)
Calculate probability of failure (POF) of the corroded pipe taking into account its actual level of defectiveness and exploiting Monte-Carlo simulation within Principle of maximum entropy.
Consistent estimate of POF for pipeline systems plays a critical role in optimizing their operation. To prevent pipeline failures due to actively growing defects it is necessary to be able to assess the pipeline system failure operation probability during a certain period, taking into account its actual level of defectiveness. The pipeline limit state comes when the burst pressure, considered as a random variable, reaches an unacceptable level, or when the defect depth, also a random variable, exceeds the predetermined limit value.
That is why in the method they consider two possible failures for a single pipeline cross section with the on-surface and longitudinally oriented defect of metal-loss type:
a decrease of value of failure pressure down to the operating pressure.
increase of corrosion depth (defect) up to the specified ultimate permissible fraction of pipe wall thickness.
Since up to now no methods existed which would give absolutely correct POF assessments they suggest simple fiddling with random values of affecting factors without deeping into intrinsic mechanisms of corrosion. For this purpose they choose classical Monte-Carlo simulation within the Principle of maximum entropy. The latter allows to avoid doubtful and excessive preferences and detalization when choosing probability distribution models for failure factors and for inline inspection measurements.
mepof( depth = seq(0, 10, length.out = 100), l = seq(40, 50, length.out = 100), d = rep.int(762, 100), wth = rep.int(10, 100), strength = rep.int(358.5274, 100), pressure = rep.int(0.588, 100), temperature = rep.int(150, 100), rar = function(n) stats::runif(n, 0.01, 0.3)/365, ral = function(n) stats::runif(n, 0.01, 0.3)/365, days = 0, k = 0.8, method = "b31g", n = 1e+06 )mepof( depth = seq(0, 10, length.out = 100), l = seq(40, 50, length.out = 100), d = rep.int(762, 100), wth = rep.int(10, 100), strength = rep.int(358.5274, 100), pressure = rep.int(0.588, 100), temperature = rep.int(150, 100), rar = function(n) stats::runif(n, 0.01, 0.3)/365, ral = function(n) stats::runif(n, 0.01, 0.3)/365, days = 0, k = 0.8, method = "b31g", n = 1e+06 )
depth |
maximum depth of the corroded area measured during inline inspection,
[mm]. Type: |
l |
maximum longitudinal length of corroded area measured during
inline inspection, [mm].
Type: |
d |
nominal outside diameter of pipe, [mm].
Type: |
wth |
nominal wall thickness of pipe, [mm].
Type: |
strength |
one of the next characteristics of steel strength, [MPa]:
Type: |
pressure |
absolute pressure of substance (i.e. heat carrier) inside the pipe
measured near defect position, [MPa]. In most cases this is a nominal
operating pressure. Type: |
temperature |
temperature of substance (i.e. heat carrier) inside the pipe measured near
defect position, [°C]. In case of district heating network this is
usually a calculated value according to actual or normative
thermal-hydraulic regime. Type: |
rar |
random number generator for simulating of distribution of radial corrosion
rate in pipe wall, [mm/day]. The only
argument |
ral |
random number generator for simulating of distribution of longitudinal
corrosion rate in pipe wall, [mm/day]. The only argument |
days |
number of days that have passed after or preceded the
inline inspection, []. Negative values are for retrospective
assumptions whereas positives are for failure prognosis.
Type: |
k |
alarm threshold for leakage failure. It usually |
method |
method for calculating failure pressure:
Type: |
n |
number of observations to generate for
Monte-Carlo simulations
,
Type: |
Since for all influence factors they can more or less assume range limits,
the uniform distribution gets the maximum entropy in this context
(see
JCGM 101:2008
).
That is why parameters of corrosion defects measured during the
inline inspection as well as regime parameters and engineering
characteristics of pipe segment - all they are simulated by
runif.
runif-limits for depth of corrosion defect are
associated with precision of commonly applied measurement instruments. For
traditionally exploited ultrasonic control those limits are well-known and
can reach up to 10 % of pipe wall thickness. Whereas uncertainty of defect
longitudinal length may be more than enough constrained with 5 %.
Recommendations for choosing stochastic characteristics of pipe
engineering factors (i.e. cross section diameter, wall thickness and material
strength) are taken from aggregated review of Timashev et al. but
gently transformed for compatibility with
Principle
of maximum entropy, i.e. runif.
Uncertainties of regime parameters in stochastic models are set minimized by regarding only precision of metering devices which commonly applied in district heating networks. For temperature it is about 2 °C.
Since the rate of corrosion processes in the pipe wall is a consequence of physical and chemical processes occurring at the atomic scale, it depends on a large number of environmental factors differently and ambiguously. That is why various deterministic and stochastic models can be potentially involved in POF assessment. For that purpose radial and longitudinal corrosion rate can be independently formulated as random value generation functions. They only admit that change in depth and length of corrosion defects in time is close to linear for the generated value of corrosion rate.
Probability of pipe failure for each corroded area measured during
inline inspection. Type: assert_double.
If NAs returned use another method
for calculating failure pressure.
S. Timashev and A. Bushinskaya, Diagnostics and Reliability of Pipeline Systems, Topics in Safety, Risk, Reliability and Quality 30, doi:10.1007/978-3-319-25307-7.
BIPM. Guides in Metrology (GUM). JCGM 101:2008 . Evaluation of measurement data – Supplement 1 to the Guide to the expression of uncertainty in measurement – Propagation of distributions using a Monte Carlo method.
Other Failure estimation:
b31gmodpf(),
b31gpf(),
dnvpf(),
pcorrcpf(),
shell92pf()
library(pipenostics) # 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] # Corrosion rates in radial and in longitudinal directions are not well-known # and may vary in range .01 - .30 mm/year: rar = function(n) stats::runif(n, .01, .30) / 365 ral = function(n) stats::runif(n, .01, .30) / 365 # Then 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" ) print(pof) # So, the POF of pipe is near max(pof) # 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 ) print(pof) # for entire pipe we get something near: max(pof) # 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 ) print(pof) # for entire pipe we get something near: max(pof)library(pipenostics) # 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] # Corrosion rates in radial and in longitudinal directions are not well-known # and may vary in range .01 - .30 mm/year: rar = function(n) stats::runif(n, .01, .30) / 365 ral = function(n) stats::runif(n, .01, .30) / 365 # Then 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" ) print(pof) # So, the POF of pipe is near max(pof) # 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 ) print(pof) # for entire pipe we get something near: max(pof) # 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 ) print(pof) # for entire pipe we get something near: max(pof)
Get a list of weather stations located primarily in the central and northern parts of Eurasia. For each weather station, the following information is provided: an integer station ID, geographic coordinates, altitude, and the mean annual ground temperature averaged over depth.
meteos()meteos()
List of weather stations (meteos) with the next fields:
station_idWeather station unique identifier.
Type: assert_integer.
nameHuman-readable name of weather station.
Type: assert_character.
latGeographical position of weather station. Latitude, [DD].
Type: assert_double.
lonGeographical position of weather station. Longitude, [DD].
Type: assert_double.
altAltitude - position of weather station above sea level, [m].
Type: assert_double.
avgMean annual ground temperature averaged over depth, [°C].
Type: assert_double.
Type: assert_data_frame.
Climate Change Investigation Laboratory. Description of the array of daily data on soil temperature at depths up to 320 cm by meteorological stations of the Russian Federation.
mgtdhid to get hourly ground temperature values at different
depths measured at the listed weather stations.
Other Geo Information:
geoarea(),
mgtdhid()
library(pipenostics) head(meteos())library(pipenostics) head(meteos())
Get the undisturbed (median) value of ground temperature at different depths at a specified time leveraging Modified Ground Temperature Double Harmonic Model (MGTDH-model).
mgtdhid(id, tau = 1440L, depth = 2.4) mgtdhidt(tau, id = 28434L, depth = 2.4) mgtdhgeo(lat, lon, tau = 1440L, depth = 2.4, use_cluster = FALSE) mgtdhgeot(tau, lat = 57, lon = 57, depth = 2.4)mgtdhid(id, tau = 1440L, depth = 2.4) mgtdhidt(tau, id = 28434L, depth = 2.4) mgtdhgeo(lat, lon, tau = 1440L, depth = 2.4, use_cluster = FALSE) mgtdhgeot(tau, lat = 57, lon = 57, depth = 2.4)
id |
weather station unique identifier. Only identifiers from
|
tau |
time point for which it is necessary to obtain the value of the soil
temperature; it can be specified as an integer, representing the
number of hours that have passed since the beginning of the year, or
as a value of |
depth |
depth at which the ground temperature is calculated, [m].
Type: |
lat |
latitude of the geographical location where the value of soil temperature
needs to be determined, [DD].
Type: |
lon |
longitude of the geographical location where the value of soil temperature
needs to be determined, [DD].
Type: |
use_cluster |
utilize functionality of parallel processing on multi-core CPU.
Type: |
The MGTDH-model is a modified solution of the thermal conductivity equation for soil and can be expressed by the formula
where
undisturbed (median) ground temperature [°C] at specified depth
[m], and time [h].
time point (tau) calculated in hours since the beginning of the
year, [h].
depth (depth) at which the ground temperature should be
calculated, [m].
shift constant, [].
,
temperature diffusivity factors, [].
rate of rotation of the Earth, expressed with an accuracy equal to the inverse of an hour, [h⁻¹].
soil diffusivity, [mm²/s].
constant that represents the number of seconds in one day, [s/day].
,
harmonic temperature amplitudes, [°C].
,
phase shifts, depending on the geographical location, [].
Soil diffusivity, , harmonic temperature amplitudes,
, , and phase shifts , are
geographically dependent parameters which values were established for each
weather station listed in meteos-dataset.
For the convenience of using the MGTDH-model, several interface
functions have been provided. Each function generates a vector of type
assert_double as an output.
The mgtdhid and mgtdhidt functions are used to obtain
ground temperature data from specific meteorological stations.
The functions mgtdhgeo and mgtdhgeot provide ground
temperatures at any geographical location, but note that their usage is
primarily limited to the Northern Asian part of Eurasia, as most
meteorological stations and parameters for the MGTDH-model are
established there. Ground temperature at the specified location is obtained
by linear interpolation using barycentric coordinates formed in the system
of the three nearest meteorological stations.
Undisturbed (median) ground temperature value calculated with
the MGTDH-model, specifically for the location of the
user-specified meteorological station, at specified depth, and time,
[°C].
Type: assert_double.
Lu Xing & Jeffrey D. Spitler (2017) Prediction of undisturbed ground temperature using analytical and numerical modeling. Part I: Model development and experimental validation. Science and Technology for the Built Environment, 23:5, 787-808, doi:10.1080/23744731.2016.1258371.
Other Geo Information:
geoarea(),
meteos()
library(pipenostics) # Let consider the next geographical positions: lat <- c(s28434 = 56.65, s28418 = 56.47, s23711 = 62.70, ControlPoint = 57) lon <- c(s28434 = 57.78, s28418 = 53.73, s23711 = 56.20, ControlPoint = 57) # * ground temperatures at first three locations on 02 March 2023 # at depth 3 m: mgtdhgeo( head(lat, 3), head(lon, 3), tau = as.POSIXct("2023-03-02"), depth = 3 ) # * it is the same as obtaining ground temperatures from weather stations: mgtdhid( id = c(28434L, 28418L, 23711L), tau = as.POSIXct("2023-03-02"), depth = 3 ) # * undisturbed ground temperature plot at Control Point: days <- as.POSIXct("2023-01-01") + 3600 * 24 * (seq.int(1, 365) - 1) plot( days, mgtdhgeot(days, lat[["ControlPoint"]], lon[["ControlPoint"]]), type = "l", ylab = "Temperature, °C" )library(pipenostics) # Let consider the next geographical positions: lat <- c(s28434 = 56.65, s28418 = 56.47, s23711 = 62.70, ControlPoint = 57) lon <- c(s28434 = 57.78, s28418 = 53.73, s23711 = 56.20, ControlPoint = 57) # * ground temperatures at first three locations on 02 March 2023 # at depth 3 m: mgtdhgeo( head(lat, 3), head(lon, 3), tau = as.POSIXct("2023-03-02"), depth = 3 ) # * it is the same as obtaining ground temperatures from weather stations: mgtdhid( id = c(28434L, 28418L, 23711L), tau = as.POSIXct("2023-03-02"), depth = 3 ) # * undisturbed ground temperature plot at Control Point: days <- as.POSIXct("2023-01-01") + 3600 * 24 * (seq.int(1, 365) - 1) plot( days, mgtdhgeot(days, lat[["ControlPoint"]], lon[["ControlPoint"]]), type = "l", ylab = "Temperature, °C" )
Convert length measured in inches to millimeters (mm)
mm_inch(x)mm_inch(x)
x |
length measured in inches, [inch].
Type: |
Length in millimeters, [mm].
Type: assert_double.
inch_mm for converting mm to inches
Other Measurement Unit Converter:
c_k(),
f_k(),
inch_mm(),
k_c(),
kgf_mpa(),
loss_flux(),
mpa_kgf(),
mpa_psi(),
psi_mpa()
library(pipenostics) mm_inch(c(0.03937008, 1))library(pipenostics) mm_inch(c(0.03937008, 1))
Convert pressure (stress) measured in kilogram-force per square cm (kgf/cm²) to megapascals (MPa)
mpa_kgf(x)mpa_kgf(x)
x |
pressure (stress) measured in kilogram-force per square cm,
[kgf/cm²]. Type: |
Pressure (stress) in megapascals, [MPa].
Type: assert_double.
kgf_mpa for converting megapascals to
kilogram-force per square cm
Other Measurement Unit Converter:
c_k(),
f_k(),
inch_mm(),
k_c(),
kgf_mpa(),
loss_flux(),
mm_inch(),
mpa_psi(),
psi_mpa()
library(pipenostics) mpa_kgf(c(10.1971619998, 1))library(pipenostics) mpa_kgf(c(10.1971619998, 1))
Convert pressure (stress) measured in pounds per square inch (PSI) to megapascals (MPa)
mpa_psi(x)mpa_psi(x)
x |
pressure (stress) measured in pounds per square inch (PSI).
Type: |
Pressure (stress) in megapascals (MPa).
Type: assert_double.
psi_mpa for converting megapascals to
pounds per square inch
Other Measurement Unit Converter:
c_k(),
f_k(),
inch_mm(),
k_c(),
kgf_mpa(),
loss_flux(),
mm_inch(),
mpa_kgf(),
psi_mpa()
library(pipenostics) mpa_psi(c(145.03773800721814, 1))library(pipenostics) mpa_psi(c(145.03773800721814, 1))
Calculate failure pressure of the corroded pipe according to PCORRC model.
PCORRC methodology was developed on the basis of studying the mechanism of destruction of pipes, material of which has improved or high fracture toughness, and on the high-precision modelling of the finite element pipe models performed at the Battelle Institute. According to field test results of a large number of actual pipe segments, the destruction mechanism for defective pipeline segment depends on the pipe material fracture toughness. These tests also showed that only pipes made out of steel with improved or high fracture toughness fail a result of plastic fracture. In determining the Folias factor the effect of increased stress concentration and steel hardening in the plastic deformation zone at the start of the defect failure process was taken into account.
This code should be applied only to
a single cross section of the pipeline containing a longitudinally oriented, flat bottom surface defect of corrosion/erosion type;
pipelines, which operate at temperatures exceeding the temperature of pipe material ductile–brittle transition, and for pipe material with the impact energy of Charpy 61 [J] and above.
pcorrcpf(d, wth, uts, depth, l)pcorrcpf(d, wth, uts, depth, l)
d |
nominal outside diameter of pipe, [mm].
Type: |
wth |
nominal wall thickness of pipe, [mm].
Type: |
uts |
ultimate tensile strength (UTS) or
specified minimum tensile strength (SMTS) as a
characteristic of steel strength, [MPa].
Type: |
depth |
measured maximum depth of the corroded area, [mm].
Type: |
l |
measured maximum longitudinal length of corroded area, [mm].
Type: |
Estimated failure pressure of the corroded pipe, [MPa].
Type: assert_double.
S. Timashev and A. Bushinskaya, Diagnostics and Reliability of Pipeline Systems, Topics in Safety, Risk, Reliability and Quality 30, doi:10.1007/978-3-319-25307-7.
A.C.Reddy, Safety Failure Criteria of Fluorocarbon Plastic Pipes for Dry Chlorine Transport using Finite Element Analysis Materials today: proceedings, Vol. 4(8), 2017, pp. 7498-7506. doi:10.1016/j.matpr.2017.07.081.
Other Failure estimation:
b31gmodpf(),
b31gpf(),
dnvpf(),
mepof(),
shell92pf()
library(pipenostics) # Consider two pipes with the next specifications: d <- c(812.8, 219.0) # [mm] wth <- c( 19.1, 14.5) # [mm] uts <- c(530.9, 455.1) # [N/mm²] l <- c(203.2, 200.0) # [mm] depth <- c( 13.4, 9.0) # [mm] # Get the failure pressure for that pipes: pcorrcpf(d, wth, uts, depth, l)library(pipenostics) # Consider two pipes with the next specifications: d <- c(812.8, 219.0) # [mm] wth <- c( 19.1, 14.5) # [mm] uts <- c(530.9, 455.1) # [N/mm²] l <- c(203.2, 200.0) # [mm] depth <- c( 13.4, 9.0) # [mm] # Get the failure pressure for that pipes: pcorrcpf(d, wth, uts, depth, l)
Convert pressure (stress) measured in megapascals (MPa) to pounds per square inch (PSI)
psi_mpa(x)psi_mpa(x)
x |
pressure (stress) measured in megapascals. [MPa].
Type: |
Pressure (stress) in pounds per square inch,
[PSI]. Type: assert_double.
mpa_psi for converting pounds per square inch to
megapascals
Other Measurement Unit Converter:
c_k(),
f_k(),
inch_mm(),
k_c(),
kgf_mpa(),
loss_flux(),
mm_inch(),
mpa_kgf(),
mpa_psi()
library(pipenostics) psi_mpa(c(6.89475728e-3, 1))library(pipenostics) psi_mpa(c(6.89475728e-3, 1))
Estimate Reynolds number for fluid flow in a cylindrical pipe.
re_u(d, mu, u, rho) re_v(d, mu, v, rho) re_m(d, mu, m)re_u(d, mu, u, rho) re_v(d, mu, v, rho) re_m(d, mu, m)
d |
internal diameter of pipe, [m].
Type: |
mu |
dynamic viscosity of fluid in pipe, [kg/m/s].
Type: |
u |
mean velocity of fluid in pipe, [m/s].
Type: |
rho |
mass density of fluid in pipe, [kg/m³].
Type: |
v |
volumetric flow rate of fluid in pipe, [m³/s].
Type: |
m |
mass flow rate of fluid in pipe, [kg/s].
Type: |
The calculation of Reynolds number is bounded by physically reasonable limits of fluid properties found in domain specificity of the package.
Reynolds number - a dimensionless quantity that reveals the ratio
between inertial and viscous forces in the fluid, [].
Type: assert_double.
Other Fluid properties:
fric_buzzelli(),
fric_romeo(),
fric_vatankhan()
library(pipenostics) # Reynolds numbers for typical district heating water flows at temperature # near 25 °C in a set of pipes with different sizes: range(re_u(seq(.25, 1, 0.05), .89, 1, 1000))library(pipenostics) # Reynolds numbers for typical district heating water flows at temperature # near 25 °C in a set of pipes with different sizes: range(re_u(seq(.25, 1, 0.05), .89, 1, 1000))
Calculate failure pressure of the corroded pipe according to Shell92 code.
This code should be applied only to
single cross section of the pipeline containing a longitudinally oriented, flat bottom surface defect of corrosion/erosion type;
defects which depth is less than 85 % of pipe wall thickness.
The estimation is valid for single isolated metal loss defects of the corrosion/erosion type and when only internal pressure loading is considered.
As in the case of dnvpf, the defect is approximated by a
rectangular form.
shell92pf(d, wth, uts, depth, l)shell92pf(d, wth, uts, depth, l)
d |
nominal outside diameter of pipe, [mm].
Type: |
wth |
nominal wall thickness of pipe, [mm].
Type: |
uts |
ultimate tensile strength (UTS) or
specified minimum tensile strength (SMTS) as a
characteristic of steel strength, [MPa].
Type: |
depth |
measured maximum depth of the corroded area, [mm].
Type: |
l |
measured maximum longitudinal length of corroded area, [mm].
Type: |
Numeric NAs may appear in case prescribed conditions of
use are offended.
Estimated failure pressure of the corroded pipe, [MPa].
Type: assert_double.
Timashev and A. Bushinskaya, Diagnostics and Reliability of Pipeline Systems, Topics in Safety, Risk, Reliability and Quality 30, doi:10.1007/978-3-319-25307-7.
Other Failure estimation:
b31gmodpf(),
b31gpf(),
dnvpf(),
mepof(),
pcorrcpf()
library(pipenostics) # Consider two pipes with the next specifications: d = c(812.8, 219.0) # [mm] wth = c( 19.1, 14.5) # [mm] uts = c(530.9, 455.1) # [N/mm²] l = c(203.2, 200.0) # [mm] depth = c( 13.4, 9.0) # [mm] # Get the failure pressure for that pipes: shell92pf(d, wth, uts, depth, l)library(pipenostics) # Consider two pipes with the next specifications: d = c(812.8, 219.0) # [mm] wth = c( 19.1, 14.5) # [mm] uts = c(530.9, 455.1) # [N/mm²] l = c(203.2, 200.0) # [mm] depth = c( 13.4, 9.0) # [mm] # Get the failure pressure for that pipes: shell92pf(d, wth, uts, depth, l)
Temperature is highly influence on pipe material properties and especially on its strength. Since in API SPECIFICATION 5L values of SMYS or UTS are postulated at room conditions, in case of higher temperature magnitudes they should be corrected. For that purpose DNV-RP-F101 offers linear de-rating for SMYS or UTS according to figure 2-3.
strderate(x, temperature = 24.3)strderate(x, temperature = 24.3)
x |
specified minimum yield of stress (SMYS), or ultimate tensile
strength (UTS), or specified minimum tensile strength (SMTS)
as a characteristic of steel strength at room temperature,
[MPa]. Type: |
temperature |
temperature of pipe wall, [°C].
Type: |
De-rated value of x, i.e. of appropriate pipe material property,
[MPa] .
Type: assert_double.
library(pipenostics) pipe_specs <- api5l3tdata[api5l3tdata$origin == 10,] # De-rate SMYS for a single value of temperature: with(pipe_specs, strderate(mpa_psi(smys), 53)) # De-rate UTS for a set of temperature values: with( pipe_specs, strderate(mpa_psi(uts),seq(0, 250, length.out = length(uts))) )library(pipenostics) pipe_specs <- api5l3tdata[api5l3tdata$origin == 10,] # De-rate SMYS for a single value of temperature: with(pipe_specs, strderate(mpa_psi(smys), 53)) # De-rate UTS for a set of temperature values: with( pipe_specs, strderate(mpa_psi(uts),seq(0, 250, length.out = length(uts))) )
Trace values of thermal-hydraulic regime (temperature, pressure, flow rate, and other) in the bunched pipeline against the flow direction using user-provided values of specific heat loss power.
Algorithm also suits for partially measurable district heating network with massive data lack conditions, when there are no temperature and pressure sensor readings on the majority of terminal nodes.
tracebw( sender = 6, acceptor = 7, temperature = 70, pressure = pipenostics::mpa_kgf(6), flow_rate = 20, d = 100, wth = 8, len = 72.446, loss = 78.4, roughness = 0.001, inlet = 0.5, outlet = 1, method = "romeo", opinion = "median", verbose = TRUE, csv = FALSE, file = "tracebw.csv" )tracebw( sender = 6, acceptor = 7, temperature = 70, pressure = pipenostics::mpa_kgf(6), flow_rate = 20, d = 100, wth = 8, len = 72.446, loss = 78.4, roughness = 0.001, inlet = 0.5, outlet = 1, method = "romeo", opinion = "median", verbose = TRUE, csv = FALSE, file = "tracebw.csv" )
sender |
identifier of the node which heat carrier flows out.
Type: any type that can be painlessly coerced to character by
|
acceptor |
identifier of the node which heat carrier flows in. According to topology
of test bench considered this identifier should be unique for every row.
Type: any type that can be painlessly coerced to character by
|
temperature |
sensor-measured temperature of heat carrier (water) sensor-measured on
the terminal acceptor node, [°C].
Use |
pressure |
sensor-measured
absolute pressure of heat carrier (water) inside the pipe (i.e.
acceptor's incoming edge), [MPa].
Type: |
flow_rate |
sensor-measured amount of heat carrier (water) on terminal node that is
transferred by pipe (i.e. acceptor's incoming edge) during a period,
[ton/h]. Type: |
d |
outside diameter of pipe (i.e.diameter of acceptor's incoming edge),
[mm]. Type: |
wth |
wall thickness of pipe, [mm].
Type: |
len |
pipe length (i.e. length of acceptor's incoming edge), [m].
Type: |
loss |
user-provided value of specific heat loss power for each pipe,
[kcal/m/h]. Values of the argument can be obtained experimentally,
or taken from regulatory documents.
Type: |
roughness |
roughness of internal wall of pipe (i.e. acceptor's incoming edge),
[m]. Type: |
inlet |
elevation of pipe inlet, [m].
Type: |
outlet |
elevation of pipe outlet, [m].
Type: |
method |
method of determining Darcy friction factor:
Type: |
opinion |
method for aggregating values of regime parameters on each node for the next tracing step:
Type: |
verbose |
logical indicator: should they watch tracing process on console?
Type: |
csv |
logical indicator: should they incrementally dump results to csv-
file while tracing?
Type: |
file |
name of csv-file which they dump results to.
Type: |
They consider the topology of district heating network represented by
m325nxdata:
The network may be partially sensor-equipped too:
In latter case no more than two nodes must be equipped with pressure and temperature sensors whereas for other nodes only flow rate sensors must be installed.
Tracing starts from sensor-equipped nodes and goes backwards, i.e against the flow direction.
Though some input arguments are natively vectorized their individual values
all relate to common part of district heating network, i.e. associated with
common object. It is due to isomorphism between vector representation and
directed graph of this network. For more details of isomorphic topology
description see m325nxdata.
Before tracing starts for the next node, previously calculated values of thermal-hydraulic parameters are aggregated by either averaging or by median. The latter seems more robust for avoiding strong influence of possible outliers which may come from actual heating transfer anomalies, erroneous sensor readings or wrong pipeline specifications.
Aggregation for values of flow rate at the node is always sum.
data.frame containing results (detailed log) of tracing in
narrow format:
nodeTracing job. Identifier of the node which regime parameters is
calculated for. Values in this vector are identical to those in
argument acceptor.
Type: assert_character.
tracingTracing job. Identifiers of nodes from which regime parameters
are traced for the given node. Identifier sensor is used when
values of regime parameters for the node are sensor readings.
Type: assert_character.
backwardTracing job. Identifier of tracing direction. It constantly
equals to TRUE.
Type: assert_logical.
aggregationTracing job. Identifier of aggregation method: span,
median, mean, or identity.
Type: assert_character.
lossTraced thermal hydraulic regime. Normative specific heat loss
power of adjacent pipe, [kcal/m/h].
Type: assert_double.
fluxTraced thermal hydraulic regime. Normative heat flux of
adjacent pipe, [W/m²].
Type: assert_double.
QTraced thermal hydraulic regime. Normative heat loss of
adjacent pipe per day, [kcal].
Type: assert_character.
temperatureTraced thermal hydraulic regime. Traced temperature of heat
carrier (water) that is associated with the node, [°C].
Type: assert_double.
pressureTraced thermal hydraulic regime. Traced pressure of heat
carrier (water) that is associated with the node, [MPa].
Type: assert_double.
flow_rateTraced thermal hydraulic regime. Traced flow rate of heat
carrier (water) that is associated with the node, [ton/h].
Type: assert_double.
jobTracing job. Value of tracing job counter.
Type: assert_count.
Type: assert_data_frame.
Other Regime tracing:
dropg(),
dropp(),
dropt(),
m325tracebw(),
m325tracefw(),
m325traceline(),
tracefw(),
traceline()
library(pipenostics) # It is possible to run without specification of argument values: tracebw() # Consider isomorphic representation of District Heating Network graph: DHN <- m325nxdata # * Adapt node identifiers for ordering representation simplification: DHN[["sender"]] <- sprintf("N%02i", DHN[["sender"]]) DHN[["acceptor"]] <- sprintf("N%02i", DHN[["acceptor"]]) # * Provided actual values of specific heat loss power # (say, field measurements) for each pipe in DHN, [kcal/m/h]: actual_loss <- c( 96.2360000000000, 96.2880000000000, 70.5840000000000, 116.0449431257620, 70.7340165868372, 96.2114863150603, 78.4000000000000, 116.0158816197730, 28.1152000000000, 24.9182000000000, 116.6790503515620, 152.8311474487970, 152.7893321276950, 96.7331745004449, 96.6000000000000, 116.6668284940720, 24.9596000000000, 115.9228232554340, 28.1658000000000, 96.1226072815915, 77.8240000000000, 115.9455144867840, 70.6899252508703, 96.1840000000000, 96.2360000000000, 70.5400000000000 ) # * Remove inappropriate attributes of the graph: DHN.1 <- DHN[, setdiff( colnames(DHN), c("a", "year", "insulation", "laying", "beta", "exp5k") ) ] # * Trace thermal-hydraulic regime for DHN: tracebw_report <- do.call( "tracebw", c(as.list(DHN.1), list(loss = actual_loss), verbose = FALSE) ) # * If the actual values of specific heat loss power presented above are # close to those in Minenergo-325, then the results of regime tracing match # the normative procedure: m325_report <- do.call("m325tracebw", c(as.list(DHN), verbose = FALSE)) stopifnot( all.equal(tracebw_report$temperature, m325_report$temperature, tol = 1e-4), all.equal(tracebw_report$pressure, m325_report$pressure, tol = 1e-4), all.equal(tracebw_report$flow_rate, m325_report$flow_rate, tol = 1e-4) )library(pipenostics) # It is possible to run without specification of argument values: tracebw() # Consider isomorphic representation of District Heating Network graph: DHN <- m325nxdata # * Adapt node identifiers for ordering representation simplification: DHN[["sender"]] <- sprintf("N%02i", DHN[["sender"]]) DHN[["acceptor"]] <- sprintf("N%02i", DHN[["acceptor"]]) # * Provided actual values of specific heat loss power # (say, field measurements) for each pipe in DHN, [kcal/m/h]: actual_loss <- c( 96.2360000000000, 96.2880000000000, 70.5840000000000, 116.0449431257620, 70.7340165868372, 96.2114863150603, 78.4000000000000, 116.0158816197730, 28.1152000000000, 24.9182000000000, 116.6790503515620, 152.8311474487970, 152.7893321276950, 96.7331745004449, 96.6000000000000, 116.6668284940720, 24.9596000000000, 115.9228232554340, 28.1658000000000, 96.1226072815915, 77.8240000000000, 115.9455144867840, 70.6899252508703, 96.1840000000000, 96.2360000000000, 70.5400000000000 ) # * Remove inappropriate attributes of the graph: DHN.1 <- DHN[, setdiff( colnames(DHN), c("a", "year", "insulation", "laying", "beta", "exp5k") ) ] # * Trace thermal-hydraulic regime for DHN: tracebw_report <- do.call( "tracebw", c(as.list(DHN.1), list(loss = actual_loss), verbose = FALSE) ) # * If the actual values of specific heat loss power presented above are # close to those in Minenergo-325, then the results of regime tracing match # the normative procedure: m325_report <- do.call("m325tracebw", c(as.list(DHN), verbose = FALSE)) stopifnot( all.equal(tracebw_report$temperature, m325_report$temperature, tol = 1e-4), all.equal(tracebw_report$pressure, m325_report$pressure, tol = 1e-4), all.equal(tracebw_report$flow_rate, m325_report$flow_rate, tol = 1e-4) )
Trace values of thermal-hydraulic regime (temperature, pressure, flow rate, and other) in the bunched pipeline along the flow direction using user-provided values of specific heat loss power.
tracefw( sender = c(0, 1), acceptor = c(1, 2), temperature = c(70, NA_real_), pressure = c(0.588399, NA_real_), flow_rate = c(20, NA_real_), d = c(100, 100), wth = c(8, 8), len = c(72.446, 72.446), loss = c(78.4, 78.4), roughness = c(0.001, 0.001), inlet = c(0.5, 1), outlet = c(1, 1), elev_tol = 0.1, method = "romeo", verbose = TRUE, csv = FALSE, file = "tracefw.csv", use_cluster = FALSE )tracefw( sender = c(0, 1), acceptor = c(1, 2), temperature = c(70, NA_real_), pressure = c(0.588399, NA_real_), flow_rate = c(20, NA_real_), d = c(100, 100), wth = c(8, 8), len = c(72.446, 72.446), loss = c(78.4, 78.4), roughness = c(0.001, 0.001), inlet = c(0.5, 1), outlet = c(1, 1), elev_tol = 0.1, method = "romeo", verbose = TRUE, csv = FALSE, file = "tracefw.csv", use_cluster = FALSE )
sender |
identifier of the node which heat carrier flows out.
Type: any type that can be painlessly coerced to character by
|
acceptor |
identifier of the node which heat carrier flows in. According to topology
of test bench considered this identifier should be unique for every row.
Type: any type that can be painlessly coerced to character by
|
temperature |
sensor-measured temperature of heat carrier (water) sensor-measured on
the root node, [°C].
Use |
pressure |
sensor-measured
absolute pressure of heat carrier (water) inside the pipe on the root
node, [MPa]. Use |
flow_rate |
sensor-measured amount of heat carrier (water) on root node that is
transferred by pipe during a period, [ton/h].
Type: |
d |
outside diameter of pipe (i.e.diameter of acceptor's incoming edge),
[mm]. Type: |
wth |
wall thickness of pipe, [mm].
Type: |
len |
pipe length (i.e. length of acceptor's incoming edge), [m].
Type: |
loss |
user-provided value of specific heat loss power for each pipe in
tracing path, [kcal/m/h]. Values of the argument can be obtained
experimentally, or taken from regulatory documents.
Type: |
roughness |
roughness of internal wall of pipe (i.e. acceptor's incoming edge),
[m]. Type: |
inlet |
elevation of pipe inlet, [m].
Type: |
outlet |
elevation of pipe outlet, [m].
Type: |
elev_tol |
maximum allowed discrepancy between adjacent outlet and inlet elevations
of two subsequent pipes in the traced path, [m].
Type: |
method |
method of determining Darcy friction factor:
Type: |
verbose |
logical indicator: should they watch tracing process on console?
Type: |
csv |
logical indicator: should they incrementally dump results to csv-
file while tracing?
Type: |
file |
name of csv-file which they dump results to.
Type: |
use_cluster |
utilize functionality of parallel processing on multi-core CPU.
Type: |
They consider the topology of district heating network represented by
m325nxdata:
Tracing starts from sensor-equipped root node and goes forward, i.e along
the flow direction. Function traceline serves under the
hood for tracing identified linear segments from root node to every
terminal node. Hence they only need root node to be equipped with sensors.
Sensors at other nodes are redundant in forward tracing, since the tracing
algorithm by no means consider them for tracing.
Moreover in the forward tracing algorithm they assume the flow of heat carrier is distributed proportionally to the cross-sectional area of the outgoing pipeline. Actually, a lot of reasons may cause significant deviations from this assumption. As a result, the sequence of paired backward/forward tracing may be divergent for regime parameters.
Though some input arguments are natively vectorized their individual values
all relate to common part of district heating network, i.e. associated with
common object. It is due to isomorphism between vector representation and
directed graph of this network. For more details of isomorphic topology
description see m325nxdata.
They are welcome to couple the algorithm with functionality of data.table.
data.frame containing results (detailed log) of tracing in
narrow format:
nodeTracing job. Identifier of the node which regime parameters is
calculated for. Values in this vector are identical to those in
argument acceptor.
Type: assert_character.
tracingTracing job. Identifiers of nodes from which regime parameters
are traced for the given node. Identifier sensor is used when
values of regime parameters for the node are sensor readings.
Type: assert_character.
backwardTracing job. Identifier of tracing direction. It constantly
equals to FALSE.
Type: assert_logical.
aggregationTracing job. Identifier of the aggregation method associated
with traced values. For forward tracing the only option is
identity.
Type: assert_character.
lossTraced thermal hydraulic regime. Normative specific heat loss
power of adjacent pipe, [kcal/m/h].
Type: assert_double.
fluxTraced thermal hydraulic regime. Normative heat flux of
adjacent pipe, [W/m²].
Type: assert_double.
QTraced thermal hydraulic regime. Normative heat loss of
adjacent pipe per day, [kcal].
Type: assert_character.
temperatureTraced thermal hydraulic regime. Traced temperature of heat
carrier (water) that is associated with the node, [°C].
Type: assert_double.
pressureTraced thermal hydraulic regime. Traced pressure of heat
carrier (water) that is associated with the node, [MPa].
Type: assert_double.
flow_rateTraced thermal hydraulic regime. Traced flow rate of heat
carrier (water) that is associated with the node, [ton/h].
Type: assert_double.
jobTracing job. Value of tracing job counter.
For forward tracing value of job counts the number of traced
paths from root node.
Type: assert_count.
Type: assert_data_frame.
Other Regime tracing:
dropg(),
dropp(),
dropt(),
m325tracebw(),
m325tracefw(),
m325traceline(),
tracebw(),
traceline()
library(pipenostics) # Minimum two nodes should be in district heating network graph: tracefw(verbose = FALSE) # Consider isomorphic representation of District Heating Network graph: DHN <- m325nxdata # * remove irrelevant parameters from the test bench: DHN[c("a", "year", "insulation", "laying", "beta", "exp5k")] <- NULL DHN[c("temperature", "pressure", "flow_rate")] <- NA_real_ # * avoid using numeric identifiers for nodes: DHN$sender <- sprintf("N%02i", DHN$sender) DHN$acceptor <- sprintf("N%02i", DHN$acceptor) # * provide current regime parameters for root node: root_node <- 12 DHN[root_node, "temperature"] <- 70.4942576978 # [°C] DHN[root_node, "pressure"] <- 0.6135602014 # [MPa] DHN[root_node, "flow_rate"] <- 274.0 # [ton/h] rm(root_node) # * provide actual values of specific heat loss power, [kcal/m/h], for each # segment N01 - N26. Since N12 is a root node, the specific heat loss # power for this acceptor is set to 0 (or may be any other numeric value). actual_loss <- c( 96.8, 96.8, 71.2, 116.7, 71.3, 96.8, 78.5, 116.7, 28.6, 24.5, 116.7, 0.0, 153.2, 96.8, 96.8, 116.7, 24.5, 116.7, 28.6, 96.8, 78.5, 116.7, 71.3, 96.8, 96.8, 71.1 ) # Trace the test bench forward for the first time: do.call( "tracefw", c(as.list(DHN), list(loss = actual_loss), verbose = FALSE, elev_tol = .5) )library(pipenostics) # Minimum two nodes should be in district heating network graph: tracefw(verbose = FALSE) # Consider isomorphic representation of District Heating Network graph: DHN <- m325nxdata # * remove irrelevant parameters from the test bench: DHN[c("a", "year", "insulation", "laying", "beta", "exp5k")] <- NULL DHN[c("temperature", "pressure", "flow_rate")] <- NA_real_ # * avoid using numeric identifiers for nodes: DHN$sender <- sprintf("N%02i", DHN$sender) DHN$acceptor <- sprintf("N%02i", DHN$acceptor) # * provide current regime parameters for root node: root_node <- 12 DHN[root_node, "temperature"] <- 70.4942576978 # [°C] DHN[root_node, "pressure"] <- 0.6135602014 # [MPa] DHN[root_node, "flow_rate"] <- 274.0 # [ton/h] rm(root_node) # * provide actual values of specific heat loss power, [kcal/m/h], for each # segment N01 - N26. Since N12 is a root node, the specific heat loss # power for this acceptor is set to 0 (or may be any other numeric value). actual_loss <- c( 96.8, 96.8, 71.2, 116.7, 71.3, 96.8, 78.5, 116.7, 28.6, 24.5, 116.7, 0.0, 153.2, 96.8, 96.8, 116.7, 24.5, 116.7, 28.6, 96.8, 78.5, 116.7, 71.3, 96.8, 96.8, 71.1 ) # Trace the test bench forward for the first time: do.call( "tracefw", c(as.list(DHN), list(loss = actual_loss), verbose = FALSE, elev_tol = .5) )
Trace values of thermal-hydraulic regime (temperature, pressure, flow_rate, and other) along the adjacent linear segments of pipeline using user-provided values of specific heat loss power.
traceline( temperature = 130, pressure = mpa_kgf(6), flow_rate = 250, g = 0, d = 720, wth = 12, len = c(600, 530, 300, 350), loss = c(348, 347.1389, 346.3483, 345.861), roughness = 0.006, inlet = 0, outlet = 0, elev_tol = 0.1, method = "romeo", forward = TRUE, absg = TRUE )traceline( temperature = 130, pressure = mpa_kgf(6), flow_rate = 250, g = 0, d = 720, wth = 12, len = c(600, 530, 300, 350), loss = c(348, 347.1389, 346.3483, 345.861), roughness = 0.006, inlet = 0, outlet = 0, elev_tol = 0.1, method = "romeo", forward = TRUE, absg = TRUE )
temperature |
Traced thermal hydraulic regime. Sensor-measured temperature of heat
carrier (water)
inside the pipe sensor-measured at the inlet
(forward tracing) or at the outlet (backward tracing) of path, [°C].
Type: |
pressure |
Traced thermal hydraulic regime. Sensor-measured
absolute
pressure of heat carrier (water) sensor-measured at the inlet
(forward tracing) or at the outlet (backward tracing) of path, [MPa].
Type: |
flow_rate |
Traced thermal hydraulic regime. Amount of heat carrier (water)
sensor-measured at the inlet (forward tracing) or at the outlet (backward
tracing) of path, [ton/h].
Type: |
g |
amount of heat carrier discharge to network for each pipe segment in the
tracing path enumerated along the direction of flow. If flag |
d |
outside diameters of subsequent pipes in tracing path that are enumerated
along the direction of flow, [mm].
Type: |
wth |
wall thickness of pipe, [mm].
Type: |
len |
length of subsequent pipes in tracing path that are enumerated
along the direction of flow, [m].
Type: |
loss |
user-provided value of specific heat loss power for each pipe in
tracing path enumerated along the direction of flow, [kcal/m/h].
Values of the argument can be obtained experimentally, or taken from
regulatory documents. Type: |
roughness |
roughness of internal wall for each pipe in tracing path enumerated along
the direction of flow, [m].
Type: |
inlet |
elevation of pipe inlet for each pipe in tracing path enumerated along
the direction of flow, [m].
Type: |
outlet |
elevation of pipe outlet for each pipe in tracing path enumerated along
the direction of flow, [m].
Type: |
elev_tol |
maximum allowed discrepancy between adjacent outlet and inlet elevations of
two subsequent pipes in the traced path, [m].
Type: |
method |
method of determining Darcy friction factor
Type: |
forward |
tracing direction flag: is it a forward direction of tracing?
If |
absg |
Whether argument |
They consider only simple tracing paths which do not contain rings and any kind of parallelization. At the same time bidirectional (forward and backward) tracing is possible in accordance with sensor position. They also may consider discharges to network at the inlet of each pipeline segment as an approximation of actual forks of flows. Relevant illustration of adopted assumptions for 4-segment tracing path is depicted on the next figure.
They make additional check for consistency of inlet and outlet
values for subsequent pipe segments. Discrepancy of appropriate elevations
cannot be more than elev_tol.
Since inner diameter of the pipe is used as input, the the thickness of the pipe wall additionally considered in heat flux calculations. Pipe wall thickness is derived from pipe diameter using GOST 30732 specifications.
list containing results (detailed log) of tracing for each
pipe in tracing path enumerated along the direction of flow:
temperatureTraced thermal hydraulic regime. Traced temperature of heat
carrier (water), [°C].
Type: assert_double.
pressureTraced thermal hydraulic regime. Traced pressure of heat
carrier (water) for each pipe in tracing path enumerated along the
direction of flow, [MPa].
Type: assert_double.
flow_rateTraced thermal hydraulic regime. Traced flow rate of heat
carrier (water) for each pipe in tracing path enumerated along the
direction of flow, [ton/h].
Type: assert_double.
lossUser-provided specific heat
loss power for each pipe in tracing path enumerated along the direction
of flow, [kcal/m/h], - copy of input.
Type: assert_double.
fluxHeat flux for each pipe
in tracing path enumerated along the direction of flow, [W/m²].
Type: assert_double.
QHeat loss for each
pipe in tracing path enumerated along the direction of flow per day,
[kcal]. Type: assert_double.
Type: assert_list.
Other Regime tracing:
dropg(),
dropp(),
dropt(),
m325tracebw(),
m325tracefw(),
m325traceline(),
tracebw(),
tracefw()
library(pipenostics) # Consider 4-segment tracing path. # First, let sensor readings for forward tracing: t_fw <- 130 # [°C] p_fw <- mpa_kgf(6) # [MPa] g_fw <- 250 # [ton/h] # Let discharges to network for each pipeline segment are somehow determined # as discharges <- seq(0, 30, 10) # [ton/h] # Experimentally obtained values of specific heat loss power are actual_loss <- c(348.0000, 347.1389, 346.3483, 345.8610) # [kcal/m/h] # Then the calculated regime (red squares) for forward tracing is traceline( t_fw, p_fw, g_fw, discharges, loss = actual_loss, forward = TRUE ) # Next consider values of traced regime as sensor readings for backward # tracing: t_bw <- 127.3367 # [°C] p_bw <- .5870330 # [MPa] g_bw <- 190 # [ton/h] # Then the calculated regime (red squares) for backward tracing is regime_bw <- traceline( t_bw, p_bw, g_bw, discharges, loss = actual_loss, forward = FALSE ) print(regime_bw) # Let compare sensor readings with backward tracing results: with(regime_bw, { lambda <- function(val, constraint) c(val, constraint, constraint - val, abs(constraint - val) * 100/constraint) first <- 1 structure( rbind( lambda(temperature[first], t_fw), lambda(pressure[first], p_fw), lambda(flow_rate[first], g_fw) ), dimnames = list( c("temperature", "pressure", "flow_rate"), c("sensor.value", "traced.value", "abs.discr", "rel.discr") ) ) })library(pipenostics) # Consider 4-segment tracing path. # First, let sensor readings for forward tracing: t_fw <- 130 # [°C] p_fw <- mpa_kgf(6) # [MPa] g_fw <- 250 # [ton/h] # Let discharges to network for each pipeline segment are somehow determined # as discharges <- seq(0, 30, 10) # [ton/h] # Experimentally obtained values of specific heat loss power are actual_loss <- c(348.0000, 347.1389, 346.3483, 345.8610) # [kcal/m/h] # Then the calculated regime (red squares) for forward tracing is traceline( t_fw, p_fw, g_fw, discharges, loss = actual_loss, forward = TRUE ) # Next consider values of traced regime as sensor readings for backward # tracing: t_bw <- 127.3367 # [°C] p_bw <- .5870330 # [MPa] g_bw <- 190 # [ton/h] # Then the calculated regime (red squares) for backward tracing is regime_bw <- traceline( t_bw, p_bw, g_bw, discharges, loss = actual_loss, forward = FALSE ) print(regime_bw) # Let compare sensor readings with backward tracing results: with(regime_bw, { lambda <- function(val, constraint) c(val, constraint, constraint - val, abs(constraint - val) * 100/constraint) first <- 1 structure( rbind( lambda(temperature[first], t_fw), lambda(pressure[first], p_fw), lambda(flow_rate[first], g_fw) ), dimnames = list( c("temperature", "pressure", "flow_rate"), c("sensor.value", "traced.value", "abs.discr", "rel.discr") ) ) })