2.1. Graph-Based Thermal Networks
The use of graph-based network models is widely used in engineering and as such e.g., in the field of mechanical systems, production processes and decision analysis [
17]. Furthermore, thermal energy systems like DHNs can also be modeled through graph networks, where the two fundamental properties, nodes and branches, are used to represent the thermo-fluid dynamic properties of the system [
14,
17]. Considering
Figure 1a, a general graph network consists of
nodes connected by
branches.
In thermal networks, the branches represent the pipes, while the nodes represent junctions/splitters where different pipes are connected. Despite the fact that heating networks are closed networks, usually they are represented as open networks, considering only the supply network. In this case, the boundary nodes are representing the thermal energy users or producers, i.e., the buildings connected with the network and the thermal plants. Based on that, mass flow rates are assigned to the branches, while temperatures and pressures are assigned to the network nodes. In nodes representing the users/producers, a mass flow rate is extracted/injected. Each branch is conventionally oriented. Inlet and outlet nodes can be identified according with their conventional verse. A mass flow rate is positive or negative depending if its real direction is coherent or opposite to the conventional one.
The result of that approach is a graph representation of the thermal network considering mass flows, temperature and pressure values as shown in
Figure 1b.
According to graph theory [
18], the topology of the graph, including the information of the connections between the nodes, can be described through the incidence matrix. The incidence matrix
provides information on the interconnections of the network. The general term
is equal to 1 if the
i-th node is the inlet node of the
j-th branch, while it is −1 if the node is the exiting node and it is 0 if the node is not related with the branch.
Different models to calculate mass flows, temperature and pressure values can be considered in a network. Nevertheless, this work focuses on the results that can be obtained by a thermo-fluid dynamic approach developed in [
14], which is particularly suitable to effectively model transient operations in large networks with multiple loops. It must be noted that, in transient operation, both the thermodynamic properties and the directions of the hot water flow can change in time, which implies the calculation of time-dependent network properties.
2.2. Control Volume Definition and Exergetic Analysis
The exergetic analysis of the network provides the basis for the exergy cost approach and must be carried out using the results of the network model. As described before, the model result provides information about the mass flow rates of each branch and the temperature/pressure level at each node of the network. The control volume is essential for assigning exergy flows to branches and nodes of the network.
Figure 2 shows the control volumes for both exergy and exergy cost analysis defined in this work.
The control volume defines the position of the exergy balance around the node and is shown in its general form in
Figure 2a. Considering a generic node
, a distinction between upstream nodes
and downstream nodes
must be made according to the direction of the mass flow rates at a specific time-step. Upstream nodes are those supplying exergy to the control volume through entering mass flow rates, while downstream nodes extract exergy flow from the control volume through exiting mass flow rates.
In order to define the exergy flow crossing the control volume boundary, a numerical “upwind scheme” is applied. This is the same numerical scheme that is adopted for calculating temperature distributions in the network [
14], while here it is extended to the exergetic costs. In general, the exergetic flow at the control volume boundary
between node
and its upstream node
is a function of the mass flow rate
in the branch crossing the control volume and the temperature and pressure of the upstream node
and
respectively.
The functional relation to evaluate the exergy flow exchanged at the control surface with surrounding control volumes is the definition of thermal and mechanical exergy according to [
19]. In the case of entering flows, the expression for incompressible fluid is given in Equation (1)
where
is the specific heat,
and
are the ambient temperature and pressure values and
is the fluid density.
In the case of exiting flows, node becomes the upstream node. Therefore, the properties of node should be considered for evaluating the exergy flows.
Exergy can be directly extracted from the node and supplied to an external user
or supplied to the node from an external producer
. These streams are directly associated with the mass flow rates extracted or injected in the node, as indicated in
Figure 1b. Equation (1) is used for their evaluation, where temperature and pressure are the source values in the case of entering flows and the node values in the case of exiting flows.
Furthermore, a transient term of exergetic flow must be considered to account for the time-dependent thermodynamic behavior of the network. It was already mentioned that directions of mass flow in the branches may change in time. In a steady-state condition, the temperature of the upstream node of a given branch always has a higher temperature than its downstream node, due to thermal losses. In case a change in direction takes place in a certain branch, the downstream node results in a higher temperature than its upstream node, which is followed by the effect that the downstream node cools down to a certain level lower than its upstream temperature. During that time, the exergy flow exiting the control volume of the downstream node is higher than the entering exergy flow, which would not be possible if only steady-state balance equations would be considered. During this cool-down phase, the downstream node is therefore providing previously-stored exergy to the control volume balance. Comprehensively, the same effect applies when node temperature increase, where also in this case, a transient term must be considered in order to avoid overestimation of exergy destruction. To account for this transient behavior, the change in exergy of the mass in the control volume
of node
must be considered and evaluated according to Equation (2)
where
is the mass in the control volume of node
. For each branch, half of its mass is contributing to the control volume, except for nodes that have only one branch connected (such as user nodes). This is due to the energy balance formulation in the underlying thermo-fluid dynamic model.
is then the sum of the contributions of all branches in the control volume
, while each contributing mass is calculated based on the geometric properties of the corresponding branch, length
and diameter
as well as fluid density
, see Equation (3):
Simply speaking, the mass in the control volume, which must be evaluated to account for transient change in exergy, is the sum of half of the mass in each branch, except for user nodes.
No mechanical exergy is considered in Equation (2) since the fluid flow problem is typically written in steady state due to the much higher propagation velocity of pressure waves, which travel the network at the speed of sound, different to the advective flows, which travel the network at the fluid velocity.
The transient term can either be included negative or positive in the exergy balance. According to the formulation in Equation (2), the term is negative if node cools down, which implies that the absolute value of must be added as a fuel exergy stream to the control volume and vice versa.
Finally, a certain amount of exergy destruction at each node
must be considered due to irreversibilities in the network. Based on those terms, the exergy balance equation can be written down for node
according to Equation (4)
Through applying the exergy balance of Equation (4), it is possible to calculate the amount of exergy destroyed in the control volume of each node in the network. The destruction of exergy is the major driving factor for increased exergetic costs at the network nodes, which is developed in the next subsection.
2.3. Exergetic Cost Balance
Exergetic cost
is a conservative value accounting for the amount of external exergy that is necessary to make an exergy flow available within a specific productive process [
16]. A unit exergy cost
can be defined by dividing the exergetic cost by the corresponding exergy, as in Equation (5)
assuming the primary resources with a unit exergy cost equal to one, unit exergy costs
are thus a measure of the amount of irreversibilities, thus exergy destructions, which occur during the upstream processes in order to form a given exergy stream. Therefore, the higher the exergy destruction, the higher the unit exergy cost.
The definition of exergetic costs in Equation (5) is applied to the control volume in
Figure 2a, leading to the exergetic cost balance for each node. As for exergy, exergetic costs are also defined at the border of the control volumes. The result can be seen in
Figure 2b, which shows an example of a generic node having two entering exergy cost streams from upstream nodes
and
(resource flows), two exiting exergy cost streams
and
(product flows), one external exergy cost stream
(resource flow) entering, e.g., an exergy cost stream from an energy supplying unit and one external product exergy cost stream
(product flow), supplying, for instance, a connected subnetwork or consumer. This formulation of resources and products is not strictly necessary for calculation of costs but has been indicated in order to better relate the general nodal behavior with the prepositions proposed in the “theory of exergy cost”. Firstly, this definition does not contradict alternative formulations of resources and products in the case of mixing between different streams, as it occurs in the junctions. For example in the SPECO approach, the resource would be defined as the exergy decrease of the hotter stream and the product would be defined as the exergy increase of the colder stream [
20]. In fact, in the present formulation, the exergetic cost of the node results through application of the exergy cost balance of the node. Secondly, the definition of the control volume, thus assigning a unit exergetic cost to each single node, assures that the principles of exergetic costing, are included: (1) the exergetic cost balance for a generic node
is written as in Equation (6):
(2) multi-product flows have equal unit exergetic costs, which is the unit cost of the node through the upwind scheme; (3) unit costs of exergy streams entering the system from outside, i.e., from the external producers, are imposed through Dirichelet boundary conditions, in agreement with the thermal model. This means that costs are calculated without any specific application of the prepositions, but only proceeding coherently with the numerical scheme adopted for solving the energy equation.
The cost balance at node evaluates the unit exergy costs based on the cost flows entering and exiting the control volume. This approach can be applied to each node in the network leading to a set of linear systems that can be numerically solved. In order to provide a compact formulation for graph-based networks, a matrix formulation is developed which uses the network topology and its characteristic properties only.
2.4. Matrix Formulation of the Approach
In this section, the matrix formulation for the exergetic cost balance is developed. The aim is to provide an analytical matrix formulation on the basis of the network topology. To represent the network topology, the incidence matrix
is used:
It is worth mentioning, that to apply the upwind scheme, the real verses of mass flow rates should be considered instead of the conventional ones. This means that the incidence matrix should be updated at each time step of the analysis once the fluid flow problem is solved, by changing the signs in each column corresponding with negative mass flow rates.
Furthermore, the exergy flows exchanged between all control volumes of the network, i.e., the flows in all branches, can be casted in an exergy flow vector
. Another vector
is needed to include information on the amount of exergy stored/released in each control volume based on its transient behavior. The boundary conditions associated with the external fuel costs are imposed in the vector
, while the costs of extracted flows appear in vector
. Equations (8)–(11) show the defined vectors:
Through the use of matrix representation of Equations (7)–(11), the exergetic cost balance in Equation (6) can be rewritten as in Equation (12):
where
is the identity matrix and matrix
is the positive part of the incidence matrix and can be obtained through applying Equation (13) to each matrix entry:
This approach can be used for any type of DHN topology, where every branch is connected with two nodes. The result is the calculation of unit exergetic costs at network nodes , which provides information on thermodynamic-based costs of exergy destruction at network nodes. Based on Equation (12), is evaluated numerically for a specific time-step. When analyzing the time-dependent behavior of the thermal network, Equation (12) must be applied to each single time-step. In that case, each term must be evaluated based on current exergy flows and the actual directions in the branches. Therefore, both and the exergy-based vectors of Equations (8)–(11) must be updated according to the actual condition. For a given timeframe , a time-dependent unit exergy cost matrix can be derived, which shows the unit exergy cost behavior of each node in time.
This approach is especially suitable for application to large networks because its formulation is based on the network topology and can therefore be easily integrated into the numerical algorithm, which is coherent with the one used for calculating temperature and pressure evolutions. Furthermore, information on external exergy costs is integrated into , which makes additional auxiliary equations unnecessary. This avoids increasing the problem size and reduces computation costs compared to the classical formulation, while the principles of exergetic costing are integrated. It must be noted that, in the case of real applications, economic costs like capital, operating and maintenance costs must also be considered as external exergy cost flows. Based on the provided matrix formulation in Equation (12), those costs can comfortably be included in .