library(pipenostics)
# Minimum two nodes should be in district heating network graph:
tracefw(verbose = FALSE)
# Consider isomorphic representation of District Heating Network graph:
DHN <- pipenostics::m325testbench
# * remove irrelevant parameters from the test bench
DHN[c("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)
# * alter units:
DHN$d <- 1e3 * DHN$d # convert [m] to [mm]
# * 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/hour]
# * 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:
fw_report <- do.call(
"tracefw", c(as.list(DHN), list(loss = actual_loss), verbose = FALSE, elev_tol = .5)
)
Run the code above in your browser using DataLab