Methodologyο
Linearization of heat losses and pipe investment costsο
The maximal mass flow πΜ with the corresponding velocities π£ of each considered piping diameter π must be determined to linearize the maximal thermal power flow in a district heating pipe with length l. Subsequently, the heat losses of the district heating network pipes can be determined for each diameter. The relationship between the investment costs and heat losses of a pipe with regard to the maximal thermal power flow is modeled with a linear regression.
Initial Assumptionsο
The considered heat carrier medium is liquid water and, therefore, incompressible
Temperature changes are assumed to be smaller than π₯π=40β¦C, therefore,temperature dependencies of the fluid properties (e.g.,density π,heat capacity cp and dynamic viscosity π) are neglected because the variations in the property values are small for the considered parameter range.
The fluid properties of water are constant and determined at 70β¦C. The feed line temperature is assumed to be at constant 90β¦C, while the return temperature is assumed to be at constant 55β¦C, and with an outdoor temperature of β20β¦C
The district heating pipes are buried at a depth of 1m and the pipe roughness is assumed to be 0.05mm
The thermal conductivity of the ground is equal to 2.4W/(mβ K) and the conductivity of the thermal insulation, formed by polyurethane, to 0.024W/(mβ K)
Calculationsο
The following equations are used to form a full nonlinear thermohydraulic model of a district heating pipe.
Calculating the pressure loss between the nodes i and j:
Calculating the Reynolds Number:
Calculate the friction factor for a turbulent flow (Re > 2300) with pipe roughness π
An iterative calculation (using SciPy) is performed to determine the maximum velocity in a pipe with a given inner diameter. The specific pressure drop per meter pipe length should range from 70Pa/m to 350Pa/m and the initial velocity is 0.5 m/s.
After calculating the maximum speed the maximum flow rate can be calculated using (πΜ = π β π£ β πΒ² β πβ4)
To model the thermal behavior of an insulated pipe buried underground the temperature difference π© between the water temperature in the pipe and the outside temperature is introduced:
The combined thermal resistance π ππ of the pipe and soil per unit length is calculated with the ratio π between outer and inner diameter. the buried depth of a pipe β, as well as the thermal conductivities of the ground (πα΅) and of the pipeβs insulation (πβ±βΏΛ’αΆΈΛ‘) are used to calculate the combined thermal resistance.
Linear regressionο
To represent the considered diameter range in a MILP, the nonlinear dependencies have to be represented as continuous and linear within the optimization problem. The linearization in this study is performed with a simple linear regression π¦ = a β π₯ + b, where π¦ is the dependent variable, π₯ is the independent variable, and the factors a and b are the regression coefficients. This approach is adopted to formulate an optimization problem that can be solved within a feasible computing time, consistent with the methodologies of previous works.
For pipes ranging from DN 20 to DN 400, the thermal losses are calculated through the temperature difference between the water and the pipe calculated earlier using the maximal mass flow rate, while the total investment costs for piping are adapted from Nussbaumer & Thalmann (2016)
Mixed-integer formulations for district heating network designο
Graphical representationο
A graph representation of a district heating network has to be introduced to mathematically represent pipes, junctions, producers, and consumers. The district heating systemsβ pipes correspond to the graphβs edges and the networkβs junctions to the nodes. The district heating network consists of a feed and return network with edges of opposite directions. This superstructure contains all possible connections and pathways from the heat source to the consumers.
The set of all nodes N is subdivided into three different subsets: int denotes all nodes without a consumer or a producer, the subscript p describes all nodes connected to at least one producer, and the subscript c all nodes connected to at least one consumer.
This set π΄ representing all edges of the network is subdivided into three different subsets: int represents the geometrical pipe connection between two different internal nodes. p and c denote the state transition between the district heating system and a producer or a consumer, respectively.
A certain network node will be referred to as π, whereas a directed edge going from node π to node π as ππ β A.
Single Time Step Formulationο
The bidirectionality of the network (two edges per pipe) is explicitly considered and modeled in the single time step formulation of topotherm. In order to allow flows in the opposite direction, every potential pipe ππ is also modeled in the direction ππ.
The constraints of the sts solution are as follows:
The heat balance of the pipe, which contains the heat outflow of each pipe Qout, the heat inflow Qin and the thermal losses over the length lππ.The thermal losses are determined by the linear regression coefficients aβββα΅£β and bβββα΅£β while the binary variable πππ represents the flow direction of the considered pipe.
A big-M constraint is formulated to enforce zero thermal power flow if the direction ππ is not used. Μ πmax is modeled as a sufficiently large constant power flow.
Each consumer connection to the district heating grid is modeled as unidirectional, and thus no heat feed-in from a consumer is possible. Moreover,energy conservation is assumed in every node under consideration of the consumerβs heat demand and the heat sourceβs feed-in
To ensure a unidirectional use of a pipe and to reduce the solution space during the Branch-and-Bound, this constraint prevents the simultaneous use of the direction ππ and ππ.
In this study, all consumers must be connected to the district heating system grid therefore, the direction πππ of pipe ππ to a consumer node π is set to 1, forcing the edge to be used and heating to be supplied.
The thermal power output Μ ππ is constrained by the installed thermal capacity of the source Μ πinstπ
The annuity method distributes investment costs of pipes or heat sources over the defined life span πyears with an interest rate w.
Additional constraints with redundant information can help to tighten further the Branch-and-Bound during the optimization. To that end, a supplementary constraint is formulated to ensure the total system energy conservation.
Finally, the objective function minimizes the district heating networkβs total investment and operational costs.
The investment costs are determined by the linear regression factors aαΆα΄ΌΛ’α΅ and bαΆα΄ΌΛ’α΅. By introducing full load hours flh, the investment and operational costs are weighted.
Multiple Time Step Formulationο
In order to optimize district heating systems with multiple time steps and changing flow directions with topotherm_mts, the previous formulation needs to be expanded. Not only the bidirectional operation of the pipe has to be modeled, but also a binary variable has to be incorporated to model the decision if a pipe is built independent of the flow direction. As with the sts formulation, only equations in direction ππ are provided in exemplary fashion below. Moreover, π‘ refers to the set of all considered hourly timesteps defined in the set T.
The constraints of the mts solution are as follows:
The heating power balance of each pipe is enforced. πoutππ,π‘ is the mean power outflow of each pipe, Μ πinππ,π‘ the inflow and Μ πlossππ,π‘ the thermal losses during time step π‘.These equations can be adapted for different time steps durations by changing from a power flow to an energy flow with ππ‘= Μ ππ‘ β π₯ππ‘.
The thermal losses for pipe ππ need to be modeled as an independent variable and cannot be incorporated into the equation directly. This is due to the thermal losses along a pipe being nearly independent of the inflowing mass flow rate and depending mostly on the installed diameter
lππ is the pipe length, atherm and btherm are linear regression coefficients calculated previously, and πππ,π‘ is the binary decision to operate direction ππ in time step t.
If the direction ππ is not used,the first equation ensures that the heat losses equal 0. The second equation enforces the heat loss calculation with the maximal built thermal capacity Μ πmax according to the flow direction in the pipe.
This constraint enforces zero thermal flow if the direction ππ of a pipe is not used.
Additionally, the maximal thermal power inflow Μ πinππ,π‘ at each time step π‘βT is limited to the maximal thermal capacity of a pipe and maximal thermal capacity to the binary decision πbuiltππ if a pipe is built or not.
The decision to build a pipe has to be linked with the possibility to use a certain direction of the pipe.
The simultaneous use of the direction ππ and ππ is prevented using this constraint.
In this study, all consumers must be connected to the district heating system grid.Therefore at a node π with a consumer,the binary direction ππ pipe and the binary building decision of that pipe is set to 1
Additional constraint for energy conservation
The thermal power of the source Μ ππ,π‘ is limited by the optimal installed thermal power Μ πinstπ.
The objective function of the sts case is adapted to depict multiple time steps and flow directions. The full load hours are scaled according to the simulated time period and adjust the considered heat demand to the yearly heat demand.
The forced expansion assumed can be easily modified for a planned expansion by eliminating the constraints connecting all consumers and modifying the objective function to economic indicators, such as revenue maximization.
Simplified Multiple Time Step Formulationο
As previously mentioned, the thermal losses in a pipe do not depend on the thermal power flow into the pipe but rather on the installed capacity of the pipe.As the consideration of the installed capacity of the pipe earlier is computationally expensive, an alternative formulation named topothermmts_easy is formulated, where the thermal losses do not depend on the maximal thermal pipe capacity but rather on the thermal power inflow at each time step.
Modified heat balance constraint:
Modified objective function