m325tracebw: Minenergo-325. Massively trace backwards thermal-hydraulic...

View source: R/m325tracebw.R

m325tracebwR Documentation

Minenergo-325. Massively trace backwards thermal-hydraulic regime for district heating network

Description

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.

Usage

m325tracebw(
  sender = 6,
  acceptor = 7,
  temperature = 70,
  pressure = pipenostics::mpa_kgf(6),
  flow_rate = 20,
  d = 100,
  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",
  verbose = TRUE,
  csv = FALSE,
  file = "m325tracebw.csv"
)

Arguments

sender

identifier of the node which heat carrier flows out. Type: any type that can be painlessly coerced to character by as.character.

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 as.character.

temperature

Sensor-measured temperature of heat carrier (water) sensor-measured on the terminal acceptor node, [°C]. Use NA_float_s for (terminal) nodes without temperature sensor. Type: assert_double.

pressure

Sensor-measured absolute pressure of heat carrier (water) inside the pipe (i.e. acceptor's incoming edge), [MPa]. Type: assert_double.

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/hour]. Type: assert_double. Use NA_float_s for nodes without flow rate sensor.

d

internal diameter of pipe (i.e.diameter of acceptor's incoming edge), [mm]. Type: assert_double.

len

pipe length (i.e. length of acceptor's incoming edge), [m]. Type: assert_double.

year

year when the pipe (i.e. acceptor's incoming edge) is put in operation after laying or total overhaul. Type: assert_integerish.

insulation

identifier of insulation that covers the exterior of pipe (i.e. acceptor's incoming edge):

0

no insulation

1

foamed polyurethane or analogue

2

polymer concrete

Type: assert_subset.

laying

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_subset.

beta

logical indicator: should they consider additional heat loss of fittings located on this pipe (i.e. acceptor's incoming edge)? Type: assert_logical.

exp5k

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

roughness of internal wall of pipe (i.e. acceptor's incoming edge), [m]. Type: assert_double.

inlet

elevation of pipe inlet, [m]. Type: assert_double.

outlet

elevation of pipe outlet, [m]. Type: assert_double.

method

method of determining Darcy friction factor:

  • romeo

  • vatankhan

  • buzelli

Type: assert_choice. For more details see dropp.

opinion

method for aggregating values of regime parameters on each node for the next tracing step:

mean

values of parameter are averaged before the next tracing step

median

median of parameter values are used for the next tracing step

Type: assert_choice.

verbose

logical indicator: should they watch tracing process on console? Type: assert_flag.

csv

logical indicator: should they incrementally dump results to csv- file while tracing? Type: assert_flag.

file

name of csv-file which they dump results to. Type: assert_character of length 1 that can be used safely to create a file and write to it.

Details

They consider the topology of district heating network represented by m325testbench:

m325tracebw0.png

The network may be partially sensor-equipped too:

m325tracebwp.png

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 m325testbench.

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.

Value

data.frame containing results (detailed log) of tracing in narrow format:

node

Tracing 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.

tracing

Tracing 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.

backward

Tracing job. Identifier of tracing direction. It constantly equals to TRUE. Type: assert_logical.

aggregation

Tracing job. Identifier of aggregation method: span, median, mean, or identity. Type: assert_character.

loss

Traced thermal hydraulic regime. Normative specific heat loss power of adjacent pipe, [kcal/m/h]. Type: assert_double.

flux

Traced thermal hydraulic regime. Normative heat flux of adjacent pipe, [W/m^2]. Type: assert_double.

Q

Traced thermal hydraulic regime. Normative heat loss of adjacent pipe per day, [kcal]. Type: assert_character.

temperature

Traced thermal hydraulic regime. Traced temperature of heat carrier (water) that is associated with the node, [°C]. Type: assert_double.

pressure

Traced thermal hydraulic regime. Traced pressure of heat carrier (water) that is associated with the node, [MPa]. Type: assert_double.

flow_rate

Traced thermal hydraulic regime. Traced flow rate of heat carrier (water) that is associated with the node, [ton/hour]. Type: assert_double.

job

Tracing job. Value of tracing job counter. Type: assert_count.

Type: assert_data_frame.

See Also

Other Regime tracing: m325tracefw(), m325traceline(), tracebw(), tracefw(), traceline()

Examples

library(pipenostics)

## It is possible to run without specification of argument values:
m325tracebw()

## Consider isomorphic representation of District Heating Network graph:
DHN <- pipenostics::m325testbench
DHN$d <- 1e3*DHN$d  # convert [m] to [mm]

## When tracing large network graphs put screen log to file
output <- do.call("m325tracebw", c(as.list(DHN), verbose = TRUE))

## 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")
)

## The differences between aggregations should be:
aggregation_differences <- c(delta_t = 0.03732, delta_p = 0.00139, delta_g = 0)
print(aggregation_differences)

## Check:
stopifnot(
  round(
    subset(
      output_mean,
      node == 13 & aggregation == "median",
      c("temperature", "pressure", "flow_rate")
    ) - subset(
      output_median,
      node == 13 & aggregation == "median",
      c("temperature", "pressure", "flow_rate")
    ),
    5
    # difference between aggregation options
  ) == aggregation_differences
)

## 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
output <- do.call("m325tracebw", c(as.list(DHN)))
print(output)


pipenostics documentation built on May 29, 2024, 2:43 a.m.