## 6 Numerical Results
### Energy and Exergy Analysis  
According to Figure 2 the first step deals with the definition of the physical structure of the installation. This is simply done by detecting the incoming and outgoing flows of each component. Then, the second step requires the definition of the productive structure, which is based on the functional analysis and can be different according to the research purpose. Figure 7 represents the structural diagram chosen for the case study: each main component is represented in a square composed by an entering flag (which represents the fuel, F) and an outgoing flag (the product, P); besides, diamonds and circumferences are used to reflect junctions and bifurcations of the flows. As mentioned previously, the ratio P/F reflects the efficiency of each component. According to this productive definition, Table 2 contains the annual cumulative energy values of the fuel and the product of each main component. The numerical values of this table supports the introduction of different options for defining F and P.  
Figure 6: Schematic modelling of the heating and DHW installation. Figure 7: Productive structure of the system. As can be seen, the fuel of M1 is high in comparison with the energy product of the cogeneration engines, which is precisely related to the definition of each F and P. The product of cogeneration engines are defined as the enthalpy increment in between the outgoing and the incoming water flow plus the produced electricity. That is, \(\mathrm{P_{C1}}=(\mathrm{E_{1}}-\mathrm{E_{3}})+\mathrm{E_{6}}\) and \(\mathrm{P_{C2}}=(\mathrm{E_{2}}-\mathrm{E_{4}})+[\mathrm{E_{6}}+(\mathrm{E_{24 }}+\mathrm{E_{34}}+\mathrm{E_{35}}+\mathrm{E_{36}}+\mathrm{E_{37}}+\mathrm{E_{ 38}}+\mathrm{E_{39}})]\). However, the fuel of M1 is: \(\mathrm{F_{M1}}=\mathrm{E_{1}}+\mathrm{E_{2}}\) and that is why both values cannot be directly compared. Something similar happens in HC. The fuel was defined as the sum of incoming flows, \(\mathrm{F_{HC}}=\mathrm{E_{12}}+\mathrm{E_{14}}+\mathrm{E_{17}}+\mathrm{E_{22}} +\mathrm{E_{25}}\), and the product as \(\mathrm{P_{HC}}=\mathrm{E_{15}}+\mathrm{E_{18}}+\mathrm{E_{20}}+\mathrm{E_{21 }}+\mathrm{E_{23}}\). However, another option can be to define \(\mathrm{F_{HC}}\) such as \(\mathrm{F_{HC}}=(\mathrm{E_{12}}-\mathrm{E_{21}})+(\mathrm{E_{14}}-\mathrm{E_ {15}})+(\mathrm{E_{17}}-\mathrm{E_{18}})\) and \(\mathrm{P_{HC}}=(\mathrm{E_{20}}-\mathrm{E_{22}})+(\mathrm{E_{23}}-\mathrm{E_ {25}})\) and different thermoeconomic results would appear. Obviously, the final products of the system are heating (\(\mathrm{E_{27}}\)), DHW (\(\mathrm{E_{31}}-\mathrm{E_{32}}\)) and the electricity generated in the micro-cogeneration engines (\(\mathrm{E_{6}}+\mathrm{E_{13}}\)). Since pumps are powered by this electricity, the net electrical production is equal to the electricity generated by both engines minus the pumps' consumption, (\(\mathrm{E_{24}}+\mathrm{E_{34}}+\mathrm{E_{35}}+\mathrm{E_{36}}+\mathrm{E_{37}} +\mathrm{E_{38}}+\mathrm{E_{39}}\)). Then, the total resources consumed by the installation include the fuel of the boilers plus the fuel of the cogeneration engines (\(\mathrm{E_{41}}+\mathrm{E_{10}}+\mathrm{E_{16}}+\mathrm{E_{19}}\)), since the pumps are powered by the electricity generated in the cogeneration units. According to the efficiency values of Table 2 one can see that the diverter D1, mixer M1, hydraulic compensator HC and heat exchangers HX1-HX2, are very energy-efficient, and even some of these components have an efficiency of 100%, as they are practically adiabatic. Similarly, the efficiency of the tanks T1-T2 are close to unity, and the energy efficiency of the internal combustion engines C1-C2 is also high, around 80%. The pumps were not considered as components but as part of other components and then the electricity consumed by the circulation pumps is included in that of those components. This is done to avoid the calculation of the mechanical energy along the system, since the pressure changes are negligible in almost all the rest of the equipment.