## Abstract

The vast majority of the energy consumed for urban water services is used to heat tap water. Heat recovery from wastewater is consequently an area of rapidly growing concern, both in research and by commercial interest, promoting the path towards a circular economy. To facilitate a system-wide evaluation of heat recovery from wastewater, this paper compares two one-dimensional models (mechanistic and conceptual) that can describe wastewater temperature dynamics in sewer pipe systems. The models are applied to successfully predict downstream wastewater temperature for sewer stretches in two Swedish cities (Linköping and Malmö). The root mean squared errors for the mechanistic model (Linköping Dataset1 – 0.33 °C; Linköping Dataset2 – 0.28 °C; Malmö – 0.40 °C) and the conceptual model (Linköping Dataset1 – 0.32 °C; Linköping Dataset2 – 0.20 °C; Malmö – 0.44 °C) indicate that both models have similar predictive capabilities, encouraging the use of conceptual models to reduce data requirements and model calibration efforts. Both models are freely distributed and can be easily integrated with wastewater generation and treatment models to facilitate system-wide wastewater temperature dynamics analysis.

## HIGHLIGHTS

Modelling tools to study energy recovery possibilities from wastewater are needed.

Mechanistic and conceptual models for temperature dynamics in sewer system are developed.

The models are applied for sewer pipes in two Swedish cities – Linköping and Malmö.

Both models offer similar prediction capabilities.

Further studies should include case studies outside Sweden and longer time periods.

### Graphical Abstract

## ABBREVIATIONS

## NOMENCLATURE

*A*Cross-sectional area of the flow [m

^{2}]*A*_{full}Cross-sectional area of the flow for fully filled pipe [m

^{2}]*c*_{p,p}Heat capacity of concrete pipe [J/kg·K]

*c*_{p,w}Heat capacity of wastewater [J/kg·K]

*d*_{s}Soil depth considered for heat transfer [m]

*e*_{cod}Reaction enthalpy for biological activity in the sewer [J/kgCOD]

*h*Depth of wastewater in sewer pipe [m]

*h*_{full}Depth of wastewater in fully filled pipe [m]

*h*_{sewer}Maximum heat transfer coefficient for the conceptual temperature model [W/K]

*h*_{sewer,total}Overall heat transfer coefficient for the conceptual temperature model [W/K]

*K*_{h}Half-saturation coefficient for heat transfer [m

^{3}/d]*k*_{p}Heat conductivity of the sewer pipe [W/m·K]

*K*_{res}Residence time of the conceptual sewer reservoir [d

^{−1}]*k*_{s}Thermal conductivity of soil [W/m·K]

*l*_{p}Length of the pipe [m]

*M*_{p}Mass of the concrete pipe [kg]

*n*_{flow}Calibration parameter to determine

*K*_{h}[–]*n*_{hill}Exponent value in the Hill function equation

*Pr*_{w}Prandtl number for wastewater flow [–]

*Q*Output flow rate from the sewer section [m

^{3}/d]*Q*_{avg}Average flow rate [m

^{3}/d]*q*_{cod}Heat flux due to biological activity [W]

*Q*_{in}Input flow rate for the hydraulic model [m

^{3}/d]*q*_{ps}Heat flux between sewer pipe and soil [W]

*q*_{sewer}Heat flux between wastewater and air for the conceptual temperature model [W]

*Q*_{w}Wastewater flow rate [m

^{3}/d]*q*_{wa}Convective heat flux between sewer wastewater and in-sewer air [W]

*q*_{wp}Heat flux between wastewater and sewer pipe [W]

*q*_{wp,p}Heat flux between wastewater and sewer pipe for sewer pipe temperature model [W]

*q*_{wp,w}Heat flux between wastewater and sewer pipe for sewer wastewater temperature model [W]

*r*_{cod}Reaction rate for biological activity in the sewer [kgCOD/m

^{3}·s]*Re*_{w}Reynolds number for wastewater flow [–]

*R*_{h,w}Hydraulic radius of the sewer pipe [m]

*S*_{o}Horizontal slope [m/m]

*T*_{air}Ambient air temperature [K]

*t*_{conv}Time conversion factor from days to seconds [–]

*T*_{p}Sewer pipe temperature [K, °C]

*T*_{s}Soil temperature [K, °C]

*T*_{sewer-air}In-sewer air temperature [K, °C]

*T*_{w}Wastewater temperature [K, °C]

*T*_{w,in}Input wastewater temperature to a sewer pipe [K]

*V*_{res}Volume of conceptual sewer reservoir [m

^{3}]*V*_{w}Volume of wastewater in the sewer pipe [m

^{3}]*W*_{p}Wetted perimeter of the pipe [m]

*w*_{t}Sewer pipe thickness [m]

*w*_{ww}Width of the wastewater surface in the pipe [m]

*α*_{ps}Overall heat transfer coefficient between the centre of the sewer pipe and soil [W/m

^{2}·K]*α*_{wa}Heat transfer coefficient between wastewater and in-sewer air [W/m

^{2}·K]*α*_{wp}Overall heat transfer coefficient between wastewater and centre of the sewer pipe wall [W/m

^{2}·K]*β*Representative term for square rote of slope divided by Manning's roughness factor [s

^{−1}·m^{1/3}]*η*Manning's coefficient [s·m

^{−1/3}]*λ*_{w}Thermal conductivity of wastewater [W/m·K]

*ρ*_{w}Density of wastewater [kg/m

^{3}]*Ψ*Sewer pipe section factor [m

^{8/3}]*Ψ*_{full}Sewer pipe section factor for fully filled pipe [m

^{8/3}]

## SOFTWARE AVAILABILITY

- Name of the software
Sewer_heat_transfer

- Developers
R. Saagi, M. Arnell, D. Reyes, C. Wärff, M. Ahlström, U. Jeppsson

- Contact information
Ramesh Saagi (ramesh.saagi@iea.lth.se)

- Year first available
2020

- Hardware required
PC

- Software required
MATLAB R2017a or later

- Availability

## INTRODUCTION

A staggering 90% of the total energy used for urban water services (drinking water treatment, water supply, wastewater transport through sewer system and treatment) is spent on heating tap water for domestic needs (Olsson 2012). A large percentage of this heat energy is discharged into the sewer system and lost to the environment (soil, sewer pipes, in-sewer air, etc.) before reaching the wastewater treatment plant (WWTP) (Somogyi *et al.* 2018). Several possibilities are already available to reduce this dramatic energy loss. Heat recovery installations and equipment are commercially available in various scales ranging from localized heat recovery (Tomlinson *et al.* 2012; Mazhar *et al.* 2018) at the appliance level (showers, dishwashers etc.) to centralized heat pumps at the WWTP effluent (Sitzenfrei *et al.* 2017; Vestberg 2017).

While recovering energy from wastewater at various locations (households, building level, sewer system) is an attractive option, it can adversely affect the performance of the wastewater treatment plant as lower temperatures reduce microbial activity, particularly nitrification (Wanner *et al.* 2005). Especially in colder climates, this effect may have a severe negative impact on the nitrogen removal capacity of the WWTP. Another possibility is heat recovery at the WWTP effluent. This is currently implemented at several large WWTPs in Sweden. While it eliminates the risk to WWTP operation, a large fraction of the wastewater heat content is already lost to the surrounding environment in the sewers, WWTP etc. by the time it reaches the WWTP effluent (Arnell *et al.* 2017). Hence, heat recovery possibilities should be evaluated at an integrated level where energy recovery, WWTP performance, impact on in-sewer processes etc. are considered in an integrated manner (Abdel-Aal *et al.* 2019). Model-based evaluation is an excellent approach to evaluate various objectives in an integrated city-wide heat recovery study. Such a model-based evaluation requires tools to describe: (i) generation of wastewater from households; (ii) wastewater temperature dynamics in the sewer system (such as the one presented in this paper); (iii) effects of wastewater temperature reduction on WWTP performance; (iv) heat recovery equipment; and finally (v) criteria for evaluation. It is also important that these tools can be easily integrated with one another to perform an integrated urban wastewater system-wide analysis. There are currently tools available only at a sub-system level that can take into consideration such temperature variations. For example, influent generator models (Gernaey *et al.* 2011; Talebizadeh *et al.* 2016) can simulate the temperature variation in the WWTP inlet due to rainfall, infiltration etc. Similarly, process models (Gabaldón *et al.* 1998; Khiewwijit *et al.* 2015) for WWTPs also include the effect of temperature on biological processes. However, it is currently difficult to integrate these sub-models with the existing sewer heat transfer models as the sub-models often contain different sets of state variables (for example, the currently available sewer heat transfer models do not contain all the pollutant state variables to integrate with WWTP models) and all the sub-models are not easily available in the same simulation platform.

In this paper, a heat transfer model for sewer systems is presented that can be easily integrated with other models available in the literature (upstream wastewater generation models from households (Wärff *et al.* 2020), standard WWTP models (Henze *et al.* 2000) and heat recovery equipment models describing the energy recovery, temperature variation etc. in heat exchangers and heat pumps (Geankoplis 1993; Arnell & Saagi 2020)) that can eventually promote system-wide studies (Arnell *et al.* 2017). Detailed two-dimensional heat transfer models for sewer networks already exist (Dürrenmatt & Wanner 2014; Elías-Maxil *et al.* 2017). However, such models need extensive information about the sewer pipe characteristics, surrounding environment, etc., which is often lacking in practice. A more simplified approach is described by Abdel-Aal *et al.* (2014) where temperature dynamics in the sewer network are described using a one-dimensional model. Such one-dimensional models still require information about sewer pipe characteristics, soil temperature and in-sewer air temperature. However, the simulation time is significantly reduced owing to the one-dimensional approach (compared to the two-dimensional models) The use of black-box models to describe temperature variations in the sewer system has also been explored (Abdel-Aal *et al.* 2015; Golzar *et al.* 2020). Golzar *et al.* (2020) estimated the heat recovery potential and WWTP inlet temperature based on several parameters (e.g. temperature at the inlet to the sewer system, ambient temperature, time of the day etc.). However, the model cannot be used to simulate temperature variations and heat recovery at other locations (between the sewer inlet and WWTP inlet) in the sewer system. Hence, such approaches may not be suitable for scenario analysis where historic data are not readily available and for configurations that differ significantly from the existing ones.

Currently, there are no model toolboxes that can address all the below points simultaneously. The model toolbox described here addresses several shortcomings in the existing sewer heat transfer models:

- i.
Ease of integration between the temperature and hydraulic models – The existing one-dimensional heat transfer models (Abdel-Aal 2015) describe the hydraulics separately, the information from which is then applied to the temperature model. While the two-dimensional models describe the wastewater temperature and flow rate dynamics in the same model, they are computationally demanding and need extensive information for model development and calibration. A one-dimensional heat transfer model as well as the hydraulic model (for both gravity and pumped systems) to describe the sewer system are developed within the same simulation software (Matlab) in this study.

- ii.
Applicability to city-wide studies – Developing a detailed hydraulic model at city-scale is time consuming and needs extensive information about the sewer pipe characteristics. Instead, a conceptual model that only needs limited information can be quickly developed and used for model-based analysis. With the availability of both a mechanistic and a conceptual model, it is now possible to choose the approach needed for city-wide modelling based on the available data. Such a comprehensive modelling toolbox which includes both temperature and flow rate dynamics in the same simulation software with the possibility to choose between mechanistic and conceptual models is currently not available.

- iii.
Availability of other sub-systems models in the same simulation platform – While it is possible to integrate a hydraulic model with a heat transfer model either directly in the hydraulic model software (Figueroa

*et al.*2021) or by interfacing (Abdel-Aal*et al.*2018), it can still be challenging to evaluate city-wide studies that also include the WWTP as well as any feedback loops for control strategies etc. In such cases, the availability of the entire model toolbox in the same simulation software is advantageous. In this study, a wastewater generation model (Wärff*et al.*2020), WWTP model (Arnell*et al.*2021) and heat transfer equipment models (Arnell & Saagi 2020) are developed using the same simulation platform (Matlab/Simulink) and can be easily integrated with both the mechanistic and conceptual sewer heat transfer models. This can significantly improve the possibilities for city-wide heat recovery studies with a wider scope.

Additionally, all of these models are packaged and shared as an open-source (applies to the source code for the presented models, a Matlab license is required for running the models), freely distributed toolbox. Model toolboxes are generally developed using several programming languages and interfaced together (Jansson & Moon 2001). These can be difficult to maintain in the long term due to future compatibility issues etc. The toolbox presented in this paper is primarily developed in Matlab to overcome such issues. (https://github.com/wwtmodels/Wastewater-Heat-Recovery-Models).

This paper extends the heat transfer phenomena described in Abdel-Aal *et al.* (2014) and Abdel-Aal (2015) by including: (i) additional components (sewer pipe temperature is considered as a state variables in addition to the wastewater temperature) to develop an improved one-dimensional heat transfer model for sewer pipes; and (ii) integrating the heat transfer model with a hydraulic flow rate model within the same simulation software. Additionally, a conceptual model based on a reduced set of model parameters and less data requirements is also developed. The model is calibrated and the performance is demonstrated (using the calibration dataset) for small sewer stretches (1.5 km–2.1 km) at two different locations (Malmö, Linköping) in Sweden. Another highlight is that the models are developed with a view towards integrated heat recovery analysis at system-wide scale. Hence, they can be easily integrated with both upstream (wastewater generation) and downstream (WWTP) models as state variables for pollutants are also included in the model. Model performance is evaluated using data for a section of the sewer network from two different cities in Sweden (Linköping and Malmö) with different sewer characteristics and ambient environmental conditions. A detailed comparison of the model results for the mechanistic and conceptual models is made in terms of model performance, model calibration efforts and input data requirements.

## MATERIALS AND METHODS

### Model description

Variations in wastewater temperature and flow rate are described using: (i) a mechanistic model; and (ii) a conceptual model. The models are developed in Matlab^{®}/Simulink^{®}. They describe both gravity and pressurized sewer networks. Each model is divided into two sub-models for describing the dynamics of: (i) temperature; and (ii) hydraulics/flow rate.

#### Mechanistic modelling approach

##### Temperature sub-model

Temperature dynamics are modelled for the wastewater (*T*_{w}) and the sewer concrete pipe (*T*_{p}). Figure 1 provides an overview of the state variables and major heat fluxes considered in the model. Sewer concrete pipe temperature is also included as a state variable in the model while only wastewater temperature is described in the existing one-dimensional models (Abdel-Aal 2015). The key processes affecting concrete pipe temperature are based on Dürrenmatt & Wanner (2014) and are simplified for a one-dimensional representation. Major phenomena describing temperature dynamics for wastewater in the sewer system are Abdel-Aal *et al.* (2014); Dürrenmatt & Wanner (2014); and Elías-Maxil *et al.* (2017):

- 1.Convective heat transfer between sewer wastewater and in-sewer air in gravity sewers (
*q*_{wa}) [W]where,*α*_{wa}[W/m^{2}.K] is the heat transfer coefficient between wastewater and in-sewer air,*w*_{ww}[m] is the width of the wastewater surface in the pipe,*l*_{p}[m] is the length of the pipe,*T*_{w}[K] and*T*_{sewer-air}[K] are the wastewater and in-sewer air temperature, respectively. - 2.Heat transfer between wastewater and sewer pipe (
*q*_{wp,w}) [W] through: (i) forced convection between wastewater and inner sewer pipe wall; and (ii) conduction from wastewater near the inner sewer pipe wall to the centre of the sewer pipe:where,*α*_{wp}[W/m^{2}·K] is the overall heat transfer coefficient between wastewater and centre of the sewer pipe wall,*α*_{ww}[W/m^{2}·K] is the heat transfer coefficient for forced convection due to turbulent flow of wastewater,*W*_{p}[m] is the wetted perimeter of the pipe,*T*_{p}[K] is the sewer pipe temperature,*k*_{p}[W/m.K] is the heat conductivity of the sewer pipe,*w*_{t}[m] is the sewer pipe thickness,*Re*_{w}(–) is the Reynolds number and*Pr*_{w}(–) is the Prandtl number for wastewater flow,*λ*_{w}[W/m·K] is the thermal conductivity of wastewater and*R*_{h,w}[m] is the hydraulic radius of the sewer pipe. Equation (4) represents the heat transfer coefficient for turbulent flow with*Re*_{w >}10,000 and 0.7<*Pr*_{w}< 160 (Incropera & Dewitt 2002; Dürrenmatt & Wanner 2014). - 3.
- The overall energy balance equation (Incropera & Dewitt 2002) for wastewater at each sewer section is:where,
*ρ*_{w}[kg/m^{3}] is the density of wastewater,*V*_{w}[m^{3}] is the volume of wastewater,*c*_{p}[J/kg·K] is the heat capacity of wastewater,*Q*[m^{3}/d] is the wastewater flow rate,*T*_{w,in}[K] and*T*_{w}[K] are the input and output wastewater temperatures, respectively. Time (*t*) is in days. The factor*t*_{conv}[–] (86,400) transforms the heat fluxes from J/s (W) to J/d to be consistent with the simulation time unit (days). For pumped sewer systems,*q*_{wa}is set to zero as the pipe is completely filled and no heat transfer takes place between wastewater and in-sewer air. The right-hand side of Equation (6) represents the change in heat energy which is given by the difference between incoming and outgoing heat flux and change in heat energy due to heat exchange between wastewater – in-sewer air, wastewater – sewer pipe wall and biochemical degradation of COD.

For the sewer pipe temperature model (*T*_{p}), the main processes considered are:

- 1.
- 2.Conductive heat transfer (
*q*_{ps}) [W] from: (i) centre of the sewer pipe wall to the outer sewer pipe wall; and (ii) outer sewer pipe wall to the soil:where,*α*_{ps}[W/m^{2}·K] is the overall heat transfer coefficient between the centre of the sewer pipe and soil,*T*_{s}[K] is the soil temperature,*k*_{s}[W/m·K] is the thermal conductivity of soil and*d*_{s}[m] is the soil depth considered for heat transfer. - The overall heat balance (Incropera & Dewitt 2002) for the pipe material at each sewer section is:where,
*M*_{p}[kg] is the mass of the concrete pipe and*c*_{p,p}[J/kg·K] is the heat capacity of concrete. As there is no incoming or outgoing mass flux to the sewer pipe wall, the change in energy is determined by the heat exchange between wastewater – sewer pipe and sewer pipe – soil. While the density of concrete is directly used in the model, it is possible to modify this into a model parameter to expand the usage of the model for other pipe materials.

##### Hydraulics sub-model

Wastewater flow rate is modelled using a kinematic wave approximation of the standard St. Venant's Equation (Saint-Venant 1870). The model uses detailed sewer characteristics (pipe diameter, length, slope, etc.) and input data (upstream flow rate, infiltration flow rate). In addition to the flow rate at the outlet of each sewer pipe, the model can also predict other sewer variables (e.g. water height, wetted perimeter, surface area, etc.). These variables are essential to simulate heat transfer phenomena in the sewer system.

*A*[m

^{2}] is the cross-sectional area of the flow,

*R*

_{h,w}[m] is the hydraulic radius,

*S*

_{o}[m/m] is the horizontal slope and

*η*[s·m

^{−1/3}] is the Manning's coefficient.

*t*

_{conv}is used to convert the flow rate units from m

^{3}/s to m

^{3}/d.

^{8/3}] (Chow 1959) that is dependent on flow area and pipe geometry. Lookup tables are defined in Rossman (2017) based on Chow (1959) that relate

*A*/

*A*

_{full}to

*Ψ*/

*Ψ*

_{full}. The value of

*A*can be computed based on Equation (12).

*A*

_{full}and

*Ψ*

_{full}can be computed based on pipe geometry. The lookup tables are used to identify the value of

*Ψ*and determine the flow rate

*Q*. Similarly, lookup tables also exist that relate

*A*/

*A*

_{full}with

*h*/

*h*

_{full}that can be used to compute the depth of wastewater in the sewer pipe.

For pumped sewer pipes, input and output flow rates are assumed to be the same and the pipe is assumed to be always full. Consequently, the change in volume is zero as the pipe is completely filled and the volume remains constant. Hence, *Q(t)* is the same as the incoming flow rate *Q*_{in}.

#### Conceptual modelling approach

##### Temperature sub-model

Various major processes considered for describing the energy balance in the sewer system (Equation (6)) are lumped into a single heat flux, *q*_{sewer} [W].

*h*

_{sewer,total}is considered to be varying based on the flow rate from the sewer section using a Hill function (Hill 1913). Due to its ease of use, such expressions have been used in the urban wastewater modelling as well (Gernaey

*et al.*2011) to represent complex non-linear processes. It can be considered as an empirical representation that can be used to mimic the process but does not necessarily describe the underlying processes. With a value of 1 for

*n*

_{hill}, it is similar to a Monod-like function (Monod 1949), which can represent non-linear behaviour for various biochemical processes. This conceptualization is used to reduce the need for extensive data and model calibration while still being able to maintain reasonable predictive capability (compared to the mechanistic models) for wastewater temperature variations in sewer systems:where,

*h*

_{sewer}[W/K] is the maximum heat transfer coefficient,

*K*

_{h}[m

^{3}/d] is the half-saturation coefficient for heat transfer and

*Q*is the flow rate from the sewer section. In order to estimate

*K*

_{h}, a correlation between

*K*

_{h}and average flow rate (

*Q*

_{avg}) [m

^{3}/d] is considered. The parameter

*n*

_{flow}[–] is more intuitive to calibrate than

*K*

_{h}directly, as the latter largely depends on the flow rate for a particular section:The energy balance for a sewer stretch (Incropera & Dewitt 2002) is now described as:where,

*V*

_{res}is the volume of the sewer section.

##### Flow rate sub-model

The hydraulic model described in the mechanistic model is replaced with a conceptual linear reservoir model that can describe the variation in output flow rate of a reservoir as a function of its volume.

*K*

_{res}[d

^{−1}] is the model parameter that defines the residence time of the sewer section and

*V*

_{res}[m

^{3}] is the volume of wastewater in the particular section. As in the case of the hydraulic flow model, for the pumped system,

*Q*(

*t*) equals

*Q*

_{in}and no volume balance is required. A series of reservoirs is used to represent a sewer system. The number of reservoirs in series is a model calibration parameter.

In both approaches, the model combines both flow rate and temperature dynamics in the same simulation software allowing for easy integration with wastewater generation and treatment plant models that will allow for a city-wide evaluation of heat recovery possibilities.

### Case study details

Both models are evaluated for sewer sections in two different Swedish cities (Linköping and Malmö).

In Linköping, data are collected from an isolated (no additional connections along the stretch) sewer pipe of 2.1 km between two pumping stations. The first 200 m is a pumped system with a pipe diameter of 225 mm and the rest is a gravity system with a pipe diameter of 400 mm (Table 1). Temperature sensors are installed at the upstream and downstream pumping stations. Flow measurements already exist for these locations.

Location . | Linköping . | Malmö . |
---|---|---|

Length | 2.1 km | 1.5 km |

Pipe diameter | 225 mm; 400 mm | 500 mm |

Average upstream flow rate | 1,600 m^{3}/d | 3,300 m^{3}/d |

Evaluation period | 28 Nov. to 04 Dec. 2019 13 Feb. to 23 Feb. 2020 | 10 March to 26 March 2019 |

Location . | Linköping . | Malmö . |
---|---|---|

Length | 2.1 km | 1.5 km |

Pipe diameter | 225 mm; 400 mm | 500 mm |

Average upstream flow rate | 1,600 m^{3}/d | 3,300 m^{3}/d |

Evaluation period | 28 Nov. to 04 Dec. 2019 13 Feb. to 23 Feb. 2020 | 10 March to 26 March 2019 |

For the city of Malmö, a 1.5 km stretch is chosen. Temperature and flow rate measurement equipment already exists at the downstream sewer point. Sensors for wastewater and in-sewer air temperature are installed at the upstream point. No infiltration flow is assumed. Also, no additional connections are assumed between the upstream and downstream points as a model simplification. The upstream flow rate is much higher than the combined flow rate arising from connections in between the two pipes and hence the assumption is considered to reduce model complexity and additional data requirements.

The location for data collection in both the cities is determined based on practical aspects like ease of sensor installation and maintenance, limited cross-connections and pre-existing sensor availability (flow rate and temperature). The measurement campaigns are planned so that data are collected during the relatively colder periods of the year when heat recovery is of greater interest, heat transfer is higher due to the larger difference between wastewater and in-sewer air temperatures and WWTP processes are more sensitive to changes in wastewater temperature.

The model performance was evaluated from 10 March to 26 March 2019 for the Malmö case study. Two evaluations periods are considered for the Linköping case study, 28 November to 4 December 2019 and 13 February to 23 February 2020. For the temperature measurements, encapsulated thermistor probes (Figure 2(a)) with a 10-meter cable (PB-5015-10M), which can record temperatures from −40 °C to +105 °C ± 0.2 °C, are used. While this is a broad measurement range, the accuracy of ± 0.2 °C is sufficient for the case studies. These probes are connected to waterproof (IP68) data loggers (Tinytag Plus 2 TGP-4020) (Figure 2(b)), which store the measurements at 5-minute intervals. The sensors and loggers used in Linköping were verified against a calibrated reference thermometer for quality control. Field visits are made to procure data using a custom software (EasyView) from the manufacturer. The temperature probes are installed to ensure that they are always submerged in the wastewater but do not touch the sewer pipe. The sensors have provided reliable data. Occasionally, data quality issues are noticed due to debris attaching to the sensors mainly during wet weather events. Overall, the maintenance and data quality issues are not considered to be very high.

### Evaluation criteria

Three different evaluation criteria were used to summarize the model performance. Sewer wastewater temperature at the downstream location of the sewer stretch from the model output and data are represented by *y* and *d*, respectively. *N* is the number of observations. These metrics are widely used in the environmental modelling field for model evaluation (Bennett *et al.* 2013). The metrics together capture both large errors (RMSE, MAE) as well as indicate the average model performance (MeAE), all in the same units as the model output – wastewater temperature, making it easy to interpret the results:

- 1.
- 2.
- 3.

## RESULTS

### Linköping

Two different datasets from Linköping are presented here. The first dataset is from November 2019 and the second from February 2020. The model uses upstream flow rate and sewer wastewater temperature as inputs. A constant (assumed) in-sewer air temperature of 10.5 °C is used for the first dataset. Measured in-sewer air temperature is used for the second dataset. The constant in-sewer air temperature for the first dataset is determined in three steps: 1. the difference between the mean ambient air temperatures for the two datasets is measured; 2: this value is subtracted from the mean in-sewer air temperature (measurements available) for the second dataset; and finally; three. the value is finally fine tuned based on simulation results. As no soil temperature measurements are available in the region, soil temperature is considered as a calibration parameter and assumed to be 5 °C and 4 °C for the first and second datasets, respectively. These values are within the range noticed in other studies from Sweden (Forsberg *et al.* 2012; Kjellander 2015). Other model parameters remain the same for both datasets (Table 2).

Parameter/model . | Linköping . | Malmö . | Comments/References . |
---|---|---|---|

Mechanistic model | |||

Heat transfer coefficient from wastewater to in-sewer air ( h_{wa}) | 10 W/m^{2}·K | 5 W/m^{2}·K | Abdel-Aal (2015) |

Thermal conductivity of concrete pipe (k_{p}) | 0.5 W/m·K | 1.3 W/m·K | Asadi et al. (2018) |

Thermal conductivity of soil (k_{s}) | 1 W/m·K | 1.5 W/m·K | Sundberg (1988) |

Soil depth for heat transfer (d_{s}) | 0.5 m | 0.2 m | Abdel-Aal (2015) |

Soil temperature (Ts) | 5 °C | 8 °C | Forsberg et al. (2012), Kjellander (2015) |

4 °C | |||

Reaction enthalpy for COD degradation (e_{cod}) | 14 × 10^{6} J/kg COD | 14 × 10^{6} J/kg COD | Wanner et al. (2005) |

COD degradation rate in sewers (r_{cod}) | 1 × 10^{−6} kg/m^{3}·s | 1 × 10^{−6} kg/m^{3}·s | Huisman et al. (2004) |

Conceptual model | |||

Overall heat transfer factor (h_{sewer}) | 20,000 W/K | 35,000 W/K | Calibration parameter |

8,000 W/K | |||

Q_{avg} (model parameter) | 1,600 m^{3}/d | 3,300 m^{3}/d | Measurement |

n_{flow} | 0.2 | 0.2 | Calibration parameter |

K_{res} | 200 d^{−1} | 200 d^{−1} | Calibration parameter |

Parameter/model . | Linköping . | Malmö . | Comments/References . |
---|---|---|---|

Mechanistic model | |||

Heat transfer coefficient from wastewater to in-sewer air ( h_{wa}) | 10 W/m^{2}·K | 5 W/m^{2}·K | Abdel-Aal (2015) |

Thermal conductivity of concrete pipe (k_{p}) | 0.5 W/m·K | 1.3 W/m·K | Asadi et al. (2018) |

Thermal conductivity of soil (k_{s}) | 1 W/m·K | 1.5 W/m·K | Sundberg (1988) |

Soil depth for heat transfer (d_{s}) | 0.5 m | 0.2 m | Abdel-Aal (2015) |

Soil temperature (Ts) | 5 °C | 8 °C | Forsberg et al. (2012), Kjellander (2015) |

4 °C | |||

Reaction enthalpy for COD degradation (e_{cod}) | 14 × 10^{6} J/kg COD | 14 × 10^{6} J/kg COD | Wanner et al. (2005) |

COD degradation rate in sewers (r_{cod}) | 1 × 10^{−6} kg/m^{3}·s | 1 × 10^{−6} kg/m^{3}·s | Huisman et al. (2004) |

Conceptual model | |||

Overall heat transfer factor (h_{sewer}) | 20,000 W/K | 35,000 W/K | Calibration parameter |

8,000 W/K | |||

Q_{avg} (model parameter) | 1,600 m^{3}/d | 3,300 m^{3}/d | Measurement |

n_{flow} | 0.2 | 0.2 | Calibration parameter |

K_{res} | 200 d^{−1} | 200 d^{−1} | Calibration parameter |

The references mentioned are used to define a good starting point and ensure that the final values are within a reasonable range.

Sewer characteristics (pipe diameter, slope, Manning's coefficient) are used for the hydraulic model and no further calibration is performed. A direct comparison of modelled and actual downstream flow rates is difficult as the downstream flow measurement is from a pumping station which is turned on/off intermittently. Hence, only a general trend can be observed. For the temperature sub-model calibration, the starting values for the model parameters are assumed from existing literature (Table 2). While the parameters *h*_{wa}, *k*_{p}, *k*_{s}, *w*_{t} and *d*_{s} have all been further calibrated in a heuristic manner, the COD degradation parameters (*e*_{cod}, *r*_{cod}) are left at their default values as changes to these parameters did not offer any improvements in the overall model prediction. This also confirms results from other studies (Elías-Maxil *et al.* 2017), which conclude that the COD degradation processes are not significant contributors to wastewater temperature variation in the sewer system.

For both datasets, the mechanistic model provided good predictions of the variations in wastewater temperature at the downstream sewer section (Figure 3; Table 3). For the first dataset, downstream wastewater temperature data from day 1 is very noisy. This could be due to accumulation of dirt on the temperature sensor or its placement in the wastewater and is corrected by the subsequent maintenance. Hence, the maximum prediction error is higher at 2.30 °C compared to 1.11 °C for Dataset2. Major model discrepancy for Dataset2 occurs during the end of the evaluation period for MAE (1.11 °C) where the downstream wastewater temperature predictions are much lower than the measurements. During this period, there is a drop in the in-sewer air temperature (which results in lower downstream wastewater temperature prediction) while there is no noticeable change in the upstream and downstream wastewater temperature measurements (Figure 4(a)). It is unclear from the available data (flow rate measurements, wastewater temperature) if the drop in the in-sewer air temperature is a measurement error or due to some other factors, e.g. disturbances that are not captured by the model or the data. The overall model predictions captured through RMSE and MeAE are very similar for Dataset1 (0.33 °C, 0.22 °C) and Dataset2 (0.28 °C, 0.21 °C).

Case study . | Model type . | RMSE (°C) . | MAE (°C) . | MeAE (°C) . |
---|---|---|---|---|

Linköping Dataset1 | Mechanistic model | 0.33 | 2.30 | 0.22 |

Conceptual model | 0.32 | 2.43 | 0.15 | |

Linköping Dataset2 | Mechanistic model | 0.28 | 1.11 | 0.21 |

Conceptual model | 0.20 | 0.94 | 0.16 | |

Malmö | Mechanistic model | 0.40 | 1.16 | 0.31 |

Conceptual model | 0.44 | 1.30 | 0.34 |

Case study . | Model type . | RMSE (°C) . | MAE (°C) . | MeAE (°C) . |
---|---|---|---|---|

Linköping Dataset1 | Mechanistic model | 0.33 | 2.30 | 0.22 |

Conceptual model | 0.32 | 2.43 | 0.15 | |

Linköping Dataset2 | Mechanistic model | 0.28 | 1.11 | 0.21 |

Conceptual model | 0.20 | 0.94 | 0.16 | |

Malmö | Mechanistic model | 0.40 | 1.16 | 0.31 |

Conceptual model | 0.44 | 1.30 | 0.34 |

The conceptual model is also calibrated for the two datasets described above. The flow rate sub-model is first calibrated followed by the temperature sub-model. As the downstream flow rate data cannot be used directly for calibration (as it is from a pumping station with intermittent on/off pumping), the flow rate prediction from the hydraulic sub-model is used for calibration of the residence time and the number of reservoirs in series. This is followed by calibration of the temperature sub-model, *Q*_{avg} is calculated from available flow rate data, *h*_{sewer} and *n*_{flow} are calibrated together in a trial-and-error manner. The heat transfer rate for the two datasets is different in order to compensate for the varying environmental conditions in November and January.

The flow rate prediction from the conceptual model is almost identical to that of the mechanistic model (Figures 5(a) and 5(c)). As this paper mainly describes dry weather scenarios in sewer systems without any significant backwater effects, flooding etc. the conceptual model is expected to perform very well as confirmed from several other studies (Fischer *et al.* 2009).

In spite of the major simplifications, the temperature model does offer a good predictive capability for the downstream sewer wastewater temperature. The MAE (2.43 °C, 0.94 °C) is higher for both datasets mainly due to noisy data for Dataset1 (Figure 5(b)) and the in-sewer air temperature discrepancy in Dataset2 (Figure 5(d)). RMSE and MeAE are low for both datasets (Dataset1 – 0.32 °C, 0.15 °C; Dataset2 – 0.20 °C, 0.16 °C). This confirms that the conceptual model is able to capture all the major heat transfer phenomena. While the use of in-sewer air temperature data is possible in this case due to availability of measurements, an alternative approach could be to use the outside air temperature. In such a case, it is expected that the prediction capability of the model will go down slightly as the correlation between in-sewer air temperature and downstream wastewater temperature is higher than that between ambient air temperature and downstream wastewater temperature in the sewer system (Figure 4(b)).

### Malmö

Sewer wastewater temperature and flow rate measurements from March 8 to March 26 2019 are used for model calibration. Soil temperature is assumed to be 8 °C. As there are limited data on soil temperature, it is treated as a model calibration parameter. However, it is ensured that these values are within the range noticed in other studies from Sweden (Forsberg *et al.* 2012; Kjellander 2015). As the flow rate measurement is only available at the downstream point, the downstream flow rate information is used as model input (representing the upstream flow rate). As it is a fairly short sewer stretch, it is concluded that this minor inaccuracy in flow rate predictions will not significantly affect the wastewater temperature predictions. Figure 6(a) confirms that the flow rate variation between the upstream and downstream points is not significant and supports the assumption made during model calibration. A similar calibration approach as described for the Linköping case study is applied. The variations in model parameters between Linköping and Malmö can be attributed to various aspects like soil properties, pipe conditions, incoming flow rate, pipe dimensions and other environmental factors. However, these variations are within reasonable ranges based on existing literature (Table 2). Variation in thermal conductivity of concrete (Asadi *et al.* 2018) and soil (Sundberg 1988) are within the range of the calibrated values.

The results show that variations between upstream and downstream sewer wastewater temperature measurements are reasonably well predicted by the model (Figure 6(b)). The MAE is 1.16 °C, which is a result of poor prediction during night-times. RMSE and MeAE are 0.40 °C and 0.31 °C, respectively (Table 3). The higher values for these two evaluation criteria compared to the Linköping case study are also mainly due to the lower predictive capability during night-times. The sewer wastewater temperature prediction deteriorates during night-time as shown in Figure 6(b). Several factors are hypothesized to explain this discrepancy: (i) model deficiency in describing the soil heat transfer dynamics; (ii) additional flows that are connected to the sewer stretch used in the case study – it was noted that additional flows reached the downstream manhole during the data collection period but it was unfortunately not possible to ascertain the extent of these flows.

For the conceptual model, the flow rate prediction from the hydraulic model is used for flow rate sub-model calibration (Figure 7(a)). The flow rate model is first calibrated using the parameter *K*_{res} and number of reservoirs in series using a trial-and-error approach method. The temperature model is then calibrated. The *n*_{flow} value is kept the same as in the Linköping case and *h*_{sewer} is varied. A good initial estimate of *h*_{sewer} can be derived by using the *h*_{wa} value from the mechanistic model. Assuming that the total heat transfer coefficient (which is *h*_{sewer}) equals *h*_{wa} × diameter × length gives a good initial estimate of *h*_{sewer} which can be further refined. The model results from the conceptual model are also quite similar to those of the detailed model (Figure 7(b)). The MAE is 1.30 °C while RMSE and MeAE are 0.44 °C and 0.34 °C, respectively. The discrepancies with the model prediction for downstream sewer wastewater temperature during night-times are also observed in the conceptual model. However, it is important to note that the accuracy of the temperature sensors is ± 0.2 °C.

Several factors affect the extent of sewer wastewater temperature loss (ambient air temperature, flow rate, pipe characteristics, infiltration flow, etc.). In neither case infiltration flow is included. It is assumed that the contribution from infiltration will be marginal (for the short distances considered here) in comparison to the wastewater flow rate from the upstream sewer network. The model naturally includes components to describe such extraneous flows, if required.

## DISCUSSION

### Comparison between the detailed and conceptual modelling approaches

In terms of data requirements, both models need upstream and downstream sewer wastewater temperature as well as flow rate data. While only upstream measurements are sufficient for simulations, downstream measurements are needed for model calibration. For smaller sewer stretches, flow rate data at either one of the ends can also be sufficient (when there are no major additive flows in between). The mechanistic model requires in-sewer air temperature while the conceptual model can either use in-sewer air temperature or outside air temperature data. The mechanistic model and the conceptual model for pumped sewer systems also need soil temperature. However, this temperature is difficult to obtain and has been used as a model parameter instead. A constant soil temperature is assumed, as the variation in soil temperature is not significant (Abdel-Aal *et al.* 2019) for the short simulation durations and sewer pipe depths (2–3 m below ground) used in this study. In addition, the mechanistic model needs information about the sewer pipes (diameter, lengths, slope etc.) while the conceptual model uses model parameters instead and no extensive sewer characteristics data are needed. The mechanistic model includes seven model parameters (the starting point for several of these parameters can be obtained from existing literature) while the conceptual model only has three parameters that need to be estimated. Two for the temperature sub-model and one for the flow rate sub-model.

In terms of predictive capability, no major drop in predictive capability is observed in the conceptual model vis-á-vis the mechanistic model (Figure 8). In principle, the evaluation criteria are marginally better for the conceptual model when compared to the mechanistic model for the Linköping data and vice-versa for the Malmö data. It can be concluded that the conceptual model can offer the same predictive capability as the mechanistic model despite the reduced model complexity, lower input data requirements and fewer model parameters.

### Model application for heat recovery studies

Both models have demonstrated the ability to successfully describe wastewater temperature dynamics in a sewer network. During the model development, ease of integration with other modelling tools used for urban city-wide heat recovery studies is taken into consideration. The model can be directly integrated with models generating household wastewater flow rate and temperature profiles with varying levels of complexity (Sitzenfrei *et al.* 2017; Wärff *et al.* 2020) and heat recovery models. The model outputs from the sewer network can be easily integrated with standard wastewater treatment process models (which is essential to study the effect of heat recovery at household or sewer network level on the wastewater treatment plant performance). Work is currently in progress towards integrating all the sub-models (wastewater generation, sewer heat transfer, WWTP and heat recovery equipment) for a city-wide study of Linköping. The model also includes several pollutant state variables that are transported through the sewer network. Currently, only transport of pollutant state variables is considered. A simplified COD degradation (first-order kinetics) is used in the mechanistic model and no biological degradation is considered in the conceptual model. However, the model framework provides the possibility to expand the sewer network model to include biological transformations as well.

### Model limitations

The soil temperature data are not available and a constant value is used as a calibration parameter. Such an approach is only justified for shorter simulation periods when soil temperature does not vary significantly. For long-term simulations, more information about the soil temperature variation will be required. Furthermore, both case studies are mainly gravity sewer systems (only a small pumped sewer system in the Linköping case study), hence the model predictions for the pumped system model should be further examined. In addition, the model predictions should be evaluated for a longer time series as well as for a larger sewer network in the future to demonstrate the model capability for city-wide studies. This will also allow us to use separate datasets for model calibration and validation. In the current study, the model performance is evaluated only for the calibration period due to limited data availability. Lastly, both case studies are selected for predominantly dry weather periods. The model does not include the influence of rainwater inflow/infiltration on sewer wastewater temperature (although it is possible to extend it, if required). In terms of application for heat recovery studies, the model cannot directly use energy recovery values as inputs. It is, however, possible to compute energy recovery by coupling the model with heat exchanger models (Arnell & Saagi 2020). Application of both models for several other case studies will throw more light on the model capability, calibration efforts and limitations.

## CONCLUSIONS

Two one-dimensional models (mechanistic and conceptual) describing wastewater temperature and flow rate dynamics in sewer systems are developed. The model toolbox offers the choice of either using a conceptual or mechanistic approach to describe both flow rate and wastewater temperature in the same simulation software and can be easily integrated with other upstream and downstream models (Wärff *et al.* 2020; Arnell *et al.* 2021) in the urban wastewater system for analysing heat recovery potential and other aspects where the temperature dynamics of the wastewater is of specific importance. The models are applied to describe wastewater flow rate and temperature dynamics for two sewer stretches from different cities in Sweden (Linköping and Malmö). Model performance determined by the root mean squared error is good for both the case studies while using the mechanistic (Linköping Dataset1 – 0.33 °C; Linköping Dataset2 – 0.28 °C; Malmö – 0.40 °C) as well as the conceptual (Linköping Dataset1 – 0.32 °C; Linköping Dataset2 – 0.20 °C; Malmö – 0.44 °C) modelling approach. The slightly lower performance in the Malmö case study is due to the lower ability of that model to describe night-time wastewater temperature variation. The performance of the mechanistic and conceptual model is virtually identical. This is encouraging and makes a strong case for further research on the application of the conceptual model for city-wide case studies. A freely distributed, open-source toolbox containing all the models is available for interested users. The next step will be to evaluate the model for several other scenarios (long time series, different geographical locations, pumped sewer systems) to produce an even more comprehensive evaluation of the model performance and its limitations.

## ACKNOWLEDGEMENTS

The authors acknowledge the financial support provided by Swedish research council Formas (942-2016-80), The Swedish Water and Wastewater Association (16-106) and Sweden Water Research for the project HÅVA (‘Sustainability analysis for heat recovery from wastewater’). VA Syd (Malmö) and Tekniska Verken (Linköping) are also gratefully acknowledged for their financial support, providing various details about the sewer network and supporting measurement campaigns.

## DATA AVAILABILITY STATEMENT

All relevant data are included in the paper or its Supplementary Information.

## REFERENCES

*Modelling the Viability of Heat Energy Recovery From Underground Pipes– Deterministic Modelling of Wastewater Temperatures in A 3048 Sewer Pipes Network*

*PhD Thesis*

*engrXiv*(preprint) (accessed 18 August 2021)

*Thermal Properties of Soils and Rocks. Report No. 35*

*Heat Recovery From Untreated Wastewater – A Case Study of Heat Recovery From Sewer Line to District Heating Network*

*MSc Thesis*