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, diameter > 700)$diameter))
# Let sensor-measured flow rate in the inlet of pipe
# under consideration be proportional to d, [ton/hour]:
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/hour]
result <- flow_rate - dropg(adj, d, flow_rate)
print(result)
# [1] 75.96439 134.72222 65.70302 180.80580 78.05995
# For more clarity they may perform calculations in `data.table`.
Run the code above in your browser using DataLab