Opportunity Analysis of Cogeneration and Trigeneration Solutions: An Application in the Case of a Drug Factory

: Increasing the energy efﬁciency of a drug factory is the main purpose of this paper. Different conﬁgurations of cogeneration systems are analyzed to meet most of the heat demand and to ﬂatten the heat load duration curve. Due to the variable nature of heat demand, there is a need for heat storage, but there is also a need for the fragmentation of power into two units of cogeneration to increase the operational ﬂexibility in these plants. When the heat produced by the combined heat and power (CHP) unit is insufﬁcient to meet the heat load, the heat stored can then be used to meet that demand. Heat storage plays a signiﬁcant role in managing the heat supply and demand proﬁles in the CHP system, and in reducing its capacity and size. Trigeneration and heat storage are used as options to increase the operating time of cogeneration units and, implicitly, the amounts of heat and electricity generated in cogeneration. The results of this study demonstrate the economic and technical viability of the cogeneration and trigeneration solutions proposed. For the values of electricity and natural gas prices at the time of the analysis (2021), Scenario 4 is characterized as the optimal economical and technical option for the current rate of consumption, as it ensures the highest values of heat and electricity production and the shortest investment payback period (5.06 years). Compared with separate heat and power generation, we highlight a primary energy saving of 25.35% and a reduction in CO 2 emissions of 241,138 kg CO 2 /year.


Introduction
The environmental constraints of energy use have become increasingly evident in recent times. The decarbonization of the energy sector is a very complex issue in which many environmental, economic, technical, social, and political aspects need to be considered simultaneously [1][2][3]. An analysis based on the optimization of decarbonation pathways, and the flexibility requirements in highly renewable power systems, is presented in [4]. In [5], the historical development of the global decarbonization process and an assessment of the technology options for decarbonization in each sector are discussed. Current research on the transition to a decarbonized energy system in the future is dominated by renewable energy solutions and energy storage [6,7]. The author of [8] compares levelized costs of electricity (LCOE) for different electricity generation technologies, including both fossil and renewable sources, by considering a wide range of values for each of their determinants. In [9,10], the economic profitability of sizing photovoltaic systems without storage is analyzed. A model-based decarbonization pathway for Europe's electricity supply system until 2050 is presented in [11]. Therefore, the current concerns in the field of energy generation are oriented towards the application of technologies with the least impact on the environment [12][13][14]; however, there are also opportunities for commercially mature technologies that use a combination of other low-carbon energy sources and mixed technologies. Furthermore, final energy consumption must be controlled and managed by

•
The heat demand of a drug factory was analyzed in detail and with high accuracy to identify the hourly, daily, weekly, monthly, and annual load profiles; • Meeting the variations in heat demand, flattening the load duration curve, and increasing energy efficiency were the challenges we overcame.
The paper is organized as follows. Section 2 presents the methodology used. The technical and economic viability of cogeneration and trigeneration solutions is discussed in Section 3. The findings and their implications are summarized in Section 4. Finally, the conclusions of this paper are presented in Section 5.

Materials and Methods
The process for assessing the appropriateness of applying cogeneration to a site begins with an assessment of technical potential and continues with an assessment of cost-effectiveness [38]. Figure 1 shows the steps in the initial assessment of a cogeneration application. As a first step, the compatibility of any existing heating system with the proposed cogeneration plant must be established. This will help the designer to use the existing infrastructure. Important user features to consider include electricity and heat demand profiles, the predominant costs of conventional utilities, and any physical location restrictions.
The paper is organized as follows. Section 2 presents the methodology used. The technical and economic viability of cogeneration and trigeneration solutions is discussed in Section 3. The findings and their implications are summarized in Section 4. Finally, the conclusions of this paper are presented in Section 5.

Materials and Methods
The process for assessing the appropriateness of applying cogeneration to a site begins with an assessment of technical potential and continues with an assessment of costeffectiveness [38]. Figure 1 shows the steps in the initial assessment of a cogeneration application. As a first step, the compatibility of any existing heating system with the proposed cogeneration plant must be established. This will help the designer to use the existing infrastructure. Important user features to consider include electricity and heat demand profiles, the predominant costs of conventional utilities, and any physical location restrictions. A successful evaluation study, despite having the characteristics of an analytical tool, involves a practical approach, with extensive fieldwork, data collection, and measurements, but with a rigorous technical and financial analysis. The aid of a computer is very Yes Is there potential to save energy for final consumers?
Are the site conditions adequate (access, space, fuel)?
Is there an average continuous demand for electricity?
Is there an average continuous demand for heat?
Carrying out an energy audit to identify measures that would lead to energy savings Are there any other potential thermal loads (e.g. for cooling)?
Does the simultaneous demand for electricity and heat exceed 4000 h/year?

Investigating the feasibility of cogeneration
Cogeneration is unlikely to be viable A successful evaluation study, despite having the characteristics of an analytical tool, involves a practical approach, with extensive fieldwork, data collection, and measurements, but with a rigorous technical and financial analysis. The aid of a computer is very useful in such analyses, with its function being to complete and support the main activities of field work and direct metering.
Avoiding the oversizing of the cogeneration plant by applying traditional energy efficiency measures is also an efficient way to reduce costs; therefore, it is necessary to carry out an energy audit in advance, and to ensure that potential energy saving opportunities are implemented before adopting the cogeneration and trigeneration solutions. The correct Energies 2022, 15, 2737 4 of 27 identification and consideration of the actual energy demand of the analyzed contour will help to avoid the problem of oversizing the cogeneration system.
The consumption curve or load profile illustrates the variation in the final energy demand over a certain time interval. A load curve describes the variation in electrical or thermal power over time (day, month, year). The load duration curve for the heat demand is obtained from the chronological load curve. The load duration curve is a curve ordered by the value of the power, starting from the highest value to the lowest ( Figure 2). Thus, the load duration curve is always a downward curve and shows how long a certain power is required. useful in such analyses, with its function being to complete and support the main activities of field work and direct metering.
Avoiding the oversizing of the cogeneration plant by applying traditional energy efficiency measures is also an efficient way to reduce costs; therefore, it is necessary to carry out an energy audit in advance, and to ensure that potential energy saving opportunities are implemented before adopting the cogeneration and trigeneration solutions. The correct identification and consideration of the actual energy demand of the analyzed contour will help to avoid the problem of oversizing the cogeneration system.
The consumption curve or load profile illustrates the variation in the final energy demand over a certain time interval. A load curve describes the variation in electrical or thermal power over time (day, month, year). The load duration curve for the heat demand is obtained from the chronological load curve. The load duration curve is a curve ordered by the value of the power, starting from the highest value to the lowest ( Figure 2). Thus, the load duration curve is always a downward curve and shows how long a certain power is required. The shape of the graded curve q = f(τ) can be expressed analytically using the Sochinsky-Rossander equation [39,40]: where the coefficient of non-uniformity β is: and where: qm is the minimum heat demand (kWt); qmd represents the average heat demand (kWt); qM denotes the maximum heat demand (kWt); and τF stands for the annual time of heat demand (hours/year). The annual heat demand is determined either by summing the records of the heat meters (steam and/or hot water, if any) or by processing the fuel consumption records. Heat consumption is almost always variable over time, with a "basic" component (long/quasi-constant) overlapping "peak" components (shorter/interrupted). Variations in consumption are determined by both the outside temperature and the specific periods, durations, and regimes of the technological processes.
The correct determination of the final energy consumption curves (electricity, heat, cooling) is of particular importance for the choice of cogeneration technology. With the The shape of the graded curve q = f (τ) can be expressed analytically using the Sochinsky-Rossander equation [39,40]: where the coefficient of non-uniformity β is: and where: q m is the minimum heat demand (kW t ); q md represents the average heat demand (kW t ); q M denotes the maximum heat demand (kW t ); and τ F stands for the annual time of heat demand (hours/year). The annual heat demand is determined either by summing the records of the heat meters (steam and/or hot water, if any) or by processing the fuel consumption records. Heat consumption is almost always variable over time, with a "basic" component (long/quasiconstant) overlapping "peak" components (shorter/interrupted). Variations in consumption are determined by both the outside temperature and the specific periods, durations, and regimes of the technological processes.
The correct determination of the final energy consumption curves (electricity, heat, cooling) is of particular importance for the choice of cogeneration technology. With the help of the annual graded heat consumption curve, the main indicators necessary for the choice of cogeneration solution will be determined: cogeneration coefficient and duration of annual use of the installed thermal power. The annual heat demand Q: The cogeneration coefficient α cogen : The amount of heat generated by the cogeneration plant Q CHP : The duration of annual use of installed thermal power τ mdCHP : The total fuel consumption of the cogeneration plant W CHP : The fuel consumption for cogeneration heat generation W hCHP : The electricity generated by the cogeneration plant E CHP : The fuel consumption for cogeneration electricity generation W eCHP : The cost of fuel for the generation of electricity in cogeneration C eCHP : The cost of electricity that is no longer purchased from the public network C enetwork : The operating and maintenance costs (O&M) of CHP C O&MCHP : The annual saving in monetary units C t (the yearly revenue): The investment cost, C 0 , refers to the costs of equipment and services required for the installation and commissioning of a cogeneration or trigeneration system. The unit value of investment costs varies significantly between different cogeneration technologies. However, basic economies of scale logic apply to all cogeneration technologies in terms of installed unit capacity. Figure 3 shows the specific investment i sp depending on the installed capacity P ne of the cogeneration unit in the case of reciprocating gas engines [41]:  All costs associated with the cogeneration project must be considered; thus, the costs for planning, design, construction, operation, and maintenance (O&M) are added to the investment costs of cogeneration units. The share of operation and maintenance (O&M) costs is usually in the range of 1.5-3.0% per year of total capital costs. An example of the distribution of investment costs is shown in Figure 4 [41]. The technology and size of CHP unit may influence these shares. The investment cost (C0), the annual saving in monetary units (Ct), and the discount rate (i) are taken into account for the selection of the optimal variant from an economic, technological and ecological point of view. The evaluation is made during the lifetime of the investment in years (N). Several economic indicators can be used to assess the technical and economic viability of the proposed technical solutions [42]: Gas engine 59% Equipment 6% Implementati on 9% Planning 13% Incidentals 13% All costs associated with the cogeneration project must be considered; thus, the costs for planning, design, construction, operation, and maintenance (O&M) are added to the investment costs of cogeneration units. The share of operation and maintenance (O&M) costs is usually in the range of 1.5-3.0% per year of total capital costs. An example of the distribution of investment costs is shown in Figure 4 [41]. The technology and size of CHP unit may influence these shares.  All costs associated with the cogeneration project must be considered; thus, the costs for planning, design, construction, operation, and maintenance (O&M) are added to the investment costs of cogeneration units. The share of operation and maintenance (O&M) costs is usually in the range of 1.5-3.0% per year of total capital costs. An example of the distribution of investment costs is shown in Figure 4 [41]. The technology and size of CHP unit may influence these shares. The investment cost (C0), the annual saving in monetary units (Ct), and the discount rate (i) are taken into account for the selection of the optimal variant from an economic, technological and ecological point of view. The evaluation is made during the lifetime of the investment in years (N). Several economic indicators can be used to assess the technical and economic viability of the proposed technical solutions [42]: Gas engine 59% Equipment 6% Implementati on 9% Planning 13% Incidentals 13% The investment cost (C 0 ), the annual saving in monetary units (C t ), and the discount rate (i) are taken into account for the selection of the optimal variant from an economic, technological and ecological point of view. The evaluation is made during the lifetime of the investment in years (N). Several economic indicators can be used to assess the technical and economic viability of the proposed technical solutions [42]: where: NPV is net present value; IRR represents internal rate of return; SPBP indicates a simple payback period. Primary energy saving (PES) is used to compare cogeneration production and separate production of heat and electricity using the same type of fuel [43]: (18) or: where: W sep is the primary energy consumption for separate production of electricity and heat (kWh); W CHP indicates the primary energy consumption in cogeneration (kWh); η hCHP represents the heat efficiency of CHP (%); η eCHP denotes the electricity efficiency of CHP (%); η hRef stands for the reference heat efficiency (%); η eRef represents the reference electricity efficiency (%); and p loss is correction factor for η eRef . The carbon dioxide emissions are calculated by use of the following equation: where f CO2 is emission factor (for natural gas f CO2 = 0.205 kgCO 2 /kWh). In this paper, the cogeneration and trigeneration solutions are compared with the reference scenario in which the heat is generated separately from the gas boilers and the electricity is purchased from the grid. In Table 1, we present the prices of natural gas and electricity that were taken into account in our analysis, at the time of the analysis in 2021 [44,45]. The harmonized reference values for the efficiency of separate heat production and separate electricity production (established on the basis of Directive 2012/27/EU) are given in Table 2 [46]. Trigeneration and heat storage are used as solutions to increase the flattening degree of the heat demand curve µ and to increase the operating time of the cogeneration units: Trigeneration is an extension of cogeneration that includes cooling as the final form of energy use. The combined generation of electricity, heat, and cooling from the same primary energy source offers even more flexibility for a cogeneration plant. The extension consists of the integration of an absorption refrigeration system, which consumes the available thermal energy of the cogeneration plant in the hot season. The balance of cogeneration energy production and the demand for electricity and heat is an important challenge in the implementation of CHP units. In addition, variations in electricity and heat demand can make CHP units difficult to operate. Balancing the production and demand of electricity can be done easily if the CHP unit is connected to the public grid. In case of heat demand variations, they can be taken up using heat storage solutions [47][48][49][50][51][52]. Thermal energy storage (TES) will increase the flexibility of the cogeneration unit and ensure the simultaneous demand for electricity and heat.

Case Study
This section provides a case study on the application of cogeneration and trigeneration solutions in a drug factory.

Current Situation Regarding Energy Sources and Consumers in the Drug Factory
Currently, the drug factory purchases natural gas and electricity to meet the needs of the final consumers of energy in the form of heat, cooling, and electricity.
In addition to the technological needs of steam and electricity, the drug production process also requires energy for air conditioning and ventilation of the production facilities, offices, and laboratories. A total of 39 pieces of heating, ventilation, and air conditioning (HVAC) equipment are used in the whole factory. A basic diagram of a piece of HVAC equipment is shown in Figure 5.
heat demand can make CHP units difficult to operate. Balancing the production and demand of electricity can be done easily if the CHP unit is connected to the public grid. In case of heat demand variations, they can be taken up using heat storage solutions [47][48][49][50][51][52]. Thermal energy storage (TES) will increase the flexibility of the cogeneration unit and ensure the simultaneous demand for electricity and heat.

Case Study
This section provides a case study on the application of cogeneration and trigeneration solutions in a drug factory.

Current Situation Regarding Energy Sources and Consumers in the Drug Factory
Currently, the drug factory purchases natural gas and electricity to meet the needs of the final consumers of energy in the form of heat, cooling, and electricity.
In addition to the technological needs of steam and electricity, the drug production process also requires energy for air conditioning and ventilation of the production facilities, offices, and laboratories. A total of 39 pieces of heating, ventilation, and air conditioning (HVAC) equipment are used in the whole factory. A basic diagram of a piece of HVAC equipment is shown in Figure 5. Thermal agents, or energy carriers, currently in use:  Thermal agents, or energy carriers, currently in use: The power from the electrical distribution network is supplied by means of four MV/LV transformers with a nominal power of 1000 kVA each.

Monthly Consumption of Natural Gas, Heat, and Electricity
The monthly consumption of natural gas, heat, and electricity for the previous year of operation of the medicinal plant are shown in Table 3.  Figure 6 shows the total monthly heat demand (steam and hot water) and the heat demand only at low temperature (hot water). The total heat consumption in the previous year of operation was 2,555,293 kWh, of which ( Figure 7):
The power from the electrical distribution network is supplied by means of four MV/LV transformers with a nominal power of 1000 kVA each.

Monthly Consumption of Natural Gas, Heat, and Electricity
The monthly consumption of natural gas, heat, and electricity for the previous year of operation of the medicinal plant are shown in Table 3.  Figure 6 shows the total monthly heat demand (steam and hot water) and the heat demand only at low temperature (hot water). The total heat consumption in the previous year of operation was 2,555,293 kWh, of which ( Figure 7): • Low temperature heat (hot water) was 1,828,213 kWh (72%); • High temperature heat (steam) was 727,080 kWh (28%).  The power from the electrical distribution network is supplied by means of four MV/LV transformers with a nominal power of 1000 kVA each.

Monthly Consumption of Natural Gas, Heat, and Electricity
The monthly consumption of natural gas, heat, and electricity for the previous year of operation of the medicinal plant are shown in Table 3.  Figure 6 shows the total monthly heat demand (steam and hot water) and the heat demand only at low temperature (hot water). The total heat consumption in the previous year of operation was 2,555,293 kWh, of which ( Figure 7): • Low temperature heat (hot water) was 1,828,213 kWh (72%); • High temperature heat (steam) was 727,080 kWh (28%).  The total electricity consumption was 2,434,791 kWh. Figure 8 shows the average monthly electricity demand.
Using a comparative analysis of the heat and electricity demand from Figures 6 and 8, the following findings can be made: • The average power of the two types of consumption is comparable (292 kW t and 278 kW e , respectively), and even lower in the case of heat, if only the consumption of heat in the form of hot water is taken into account (209 kW t ); • The heat demand is higher in the cold season and lower in the warm season; • Although, the electricity demand is lower in the cold season and higher in the warm season. The total electricity consumption was 2,434,791 kWh. Figure 8 shows the average monthly electricity demand. Using a comparative analysis of the heat and electricity demand from Figures 6 and 8, the following findings can be made: • The average power of the two types of consumption is comparable (292 kWt and 278 kWe, respectively), and even lower in the case of heat, if only the consumption of heat in the form of hot water is taken into account (209 kWt); • The heat demand is higher in the cold season and lower in the warm season; • Although, the electricity demand is lower in the cold season and higher in the warm season.

Unit Costs of Fuel and Electricity Purchased
The unit costs of fuel and electricity purchased from the public networks at the time of analysis was: 1. Electricity: 0.11 EUR/kWh; 2. Natural gas: 0.036 EUR/kWh.

Analysis of Heat Demand
The variation in the total heat consumption in the previous year of operation is shown in Figure 9. The load duration curve for heat demand, highlighting the low heat demand, is displayed in Figure 10. The operating time of a cogeneration unit at rated thermal load should be at least 4000-5000 h/year for the cogeneration system to be economically viable. From the load duration curve it can be seen that, currently, the heat demand at 4000 operating hours is 160 kWt, and at 5000 h, the heat demand is 110 kWt. These values are considered as reference values in the choice of possible variants of cogeneration and trigeneration solutions.
Two months of the year (July and December) were analyzed, as they were characteristic in terms of heat consumption. In July (Figure 11), there is an average variation between 130 kWt and 370 kWt; whereas in December (Figure 12), an average variation between 300 kWt and 900 kWt exists between the heat demand outside working hours (approximately 14 h) and daytime heat demand (approximately 10 h). The variation in thermal energy consumption can be easily observed in the weekly heat demand (Figures 13  and 14) and the daily heat demand (Figures 15 and 16), respectively.

Unit Costs of Fuel and Electricity Purchased
The unit costs of fuel and electricity purchased from the public networks at the time of analysis was:

Analysis of Heat Demand
The variation in the total heat consumption in the previous year of operation is shown in Figure 9. The load duration curve for heat demand, highlighting the low heat demand, is displayed in Figure 10. The operating time of a cogeneration unit at rated thermal load should be at least 4000-5000 h/year for the cogeneration system to be economically viable. From the load duration curve it can be seen that, currently, the heat demand at 4000 operating hours is 160 kW t , and at 5000 h, the heat demand is 110 kW t . These values are considered as reference values in the choice of possible variants of cogeneration and trigeneration solutions.
Two months of the year (July and December) were analyzed, as they were characteristic in terms of heat consumption. In July (Figure 11), there is an average variation between 130 kW t and 370 kW t ; whereas in December (Figure 12), an average variation between 300 kW t and 900 kW t exists between the heat demand outside working hours (approximately 14 h) and daytime heat demand (approximately 10 h). The variation in thermal energy consumption can be easily observed in the weekly heat demand (Figures 13 and 14) and the daily heat demand (Figures 15 and 16), respectively.

Analysis of Electricity Demand
As there are no hourly or daily records for electricity, measurements were made to estimate the average and maximum demand on a winter day and a summer day, respectively (Figures 17 and 18).
The analysis of electricity demand highlights the following characteristic aspects of the drug factory:

•
The maximum demand for electricity is between 721 and 1445 kW in summer, and between 249 and 500 kW in winter; • The average demand for electricity is between 443 and 887 kW in summer, and between 164 and 309 kW in winter; • The minimum electricity demand is between 320 and 642 kW in summer, and between 126 and 225 kW in winter.

Heat demand (kW)
Heat demand on a winter day (December) Figure 16. Heat demand on a winter day (December).

Analysis of Electricity Demand
As there are no hourly or daily records for electricity, measurements were made to estimate the average and maximum demand on a winter day and a summer day, respectively (Figures 17 and 18).   4 5 6 7 8 9 10 11 12 13 14 15 16 17 19 20 21 22 23

Analysis of Electricity Demand
As there are no hourly or daily records for electricity, measurements were made to estimate the average and maximum demand on a winter day and a summer day, respectively (Figures 17 and 18).   4 5 6 7 8 9 10 11 12 13 14 15 16 17 19 20 21 22 23

The Results of the Investigations
The results of the investigations regarding the viability of cogeneration and trigeneration are highlighted in the following scenarios.

Case 1. Cogeneration (1 × 200 kW e , 1 × 256 kW t )
In the first case (Figure 19), the economic viability of a cogeneration unit with an internal combustion engine using natural gas combustion with the following nominal characteristics is analyzed: • The minimum electricity demand is between 320 and 642 kW in summer, and between 126 and 225 kW in winter.

The Results of the Investigations
The results of the investigations regarding the viability of cogeneration and trigeneration are highlighted in the following scenarios.

Case 1. Cogeneration (1 × 200 kWe, 1 × 256 kWt)
In the first case (Figure 19), the economic viability of a cogeneration unit with an internal combustion engine using natural gas combustion with the following nominal characteristics is analyzed:  To estimate the annual savings, it is necessary to break down the fuel consumption of the two forms of useful energy generated, according to the following algorithm:

1.
Thermal energy considered to be generated with the efficiency of the current hot water boilers: 641,024/0.92 = 696,765 kWh; 2.
This amount is subtracted from the total amount of natural gas consumed in cogeneration, resulting in the fuel consumption for electricity generation: 1,339,640 kWh − 696,765 kWh = 642,875 kWh; 3.
The cost of electricity currently purchased from the public energy grid, which will be generated in cogeneration: 500,800 kWh × 0.11 EUR/kWh = 55,088 EUR/year; 5.
Annual savings: 55,088 − 23,143 − 7920 = 24,025 EUR/year. The results obtained for this scenario are summarized in Figure 20 and Table 4. The scenario was also estimated when the specific investment was 20% higher (unforeseen expenses) at 1584 EUR/kW e . This results in a payback period of 13.19 years. The reduction in CO 2 emissions in this scenario is 87,044 kgCO 2 /year. 696,765 kWh = 642,875 kWh; 3. The cost of fuel consumed to generate electricity in cogeneration: 642 875 kWh × 0.036 EUR/kWh = 23,143 EUR/year; 4. The cost of electricity currently purchased from the public energy grid, which will be generated in cogeneration: 500,800 kWh × 0.11 EUR/kWh = 55,088 EUR/year; 5. Operation and maintenance cost (O&M): 7920 EUR/year; 6. Annual savings: 55,088 − 23,143 − 7920 = 24,025 EUR/year.
The following investment values were considered for the calculation of the payback period: • The results obtained for this scenario are summarized in Figure 20 and Table 4. The scenario was also estimated when the specific investment was 20% higher (unforeseen expenses) at 1584 EUR/kWe. This results in a payback period of 13.19 years. The reduction in CO2 emissions in this scenario is 87,044 kgCO2/year.  Note: The determination of the annual savings and the payback period for the following scenarios, is based on the same calculation algorithm; therefore, only the main characteristics of the analyzed variants and the data synthesis will be presented.  Note: The determination of the annual savings and the payback period for the following scenarios, is based on the same calculation algorithm; therefore, only the main characteristics of the analyzed variants and the data synthesis will be presented.

Case 2. Cogeneration (2 × 100 kW e , 2 × 130 kW t )
In the second case, the economic viability of a cogeneration system with two identical cogeneration units is analyzed (Figure 21): Given the load duration curve for the heat demand (Figure 10), the operating time at the rated thermal load is 4998 h/year for the first CHP unit, and 2492 h/year for the second CHP unit. The following are the characteristic data results for the cogeneration system:  In the second case, the economic viability of a cogeneration system with two identical cogeneration units is analyzed (Figure 21): The results obtained for this scenario are summarized in Figure 22 and Table 5.  The results obtained for this scenario are summarized in Figure 22 and Table 5.

Case 2. Cogeneration (2 × 100 kWe, 2 × 130 kWt)
In the second case, the economic viability of a cogeneration system with two identical cogeneration units is analyzed (Figure 21): The results obtained for this scenario are summarized in Figure 22 and Table 5.    In this scenario, in addition to the previous scenario, heat storage is used ( Figure 23) using 3000 kWh (heat accumulation 200 kW t for an operating time of 15 h). The results obtained for this scenario are summarized in Figure 24 and Table 6

Case 3. Cogeneration (2 × 100 kWe, 2 × 130 kWt) and Heat Storage (3000 kWh)
In this scenario, in addition to the previous scenario, heat storage is used ( Figure 23) using 3000 kWh (heat accumulation 200 kWt for an operating time of 15 h). The results obtained for this scenario are summarized in Figure 24 and Table 6.    In this scenario, in addition to the previous scenario, an absorption chiller is used, with a cooling power of 180 kW, and coefficient of performance (COP) = 0.7 ( Figure 25). The results obtained for this scenario are summarized in Figure 26 and Table 7. The thermal potential available during the summer (hot water 80/60 °C), and which can be delivered from the cogeneration plant, was considered when sizing the absorption chiller. Therefore, for this thermal level, single-stage chiller modules were considered for their flexibility in operation.   By introducing heat storage and using the heat available during the summer in an absorption refrigeration system, the operating time at the rated thermal load will increase to 8200 h/year for the first CHP unit, and 5863 h/year for the second CHP unit.   The thermal potential available during the summer (hot water 80/60 • C), and which can be delivered from the cogeneration plant, was considered when sizing the absorption chiller. Therefore, for this thermal level, single-stage chiller modules were considered for their flexibility in operation.
By introducing heat storage and using the heat available during the summer in an absorption refrigeration system, the operating time at the rated thermal load will increase to 8200 h/year for the first CHP unit, and 5863 h/year for the second CHP unit.
The following are the characteristic data results for the cogeneration system: The results obtained for this scenario are summarized in Figure 27 and Table 8.   By introducing heat storage and using the heat available during the summer in an absorption refrigeration system, the operating time at the rated thermal load will be 8200 h/year for the first CHP unit, and 2012 h/year for the second CHP unit. It can be seen that, in this scenario, there is a thermal power reserve installed in the second CHP unit (higher power unit); therefore, the annual operating time of this CHP unit will increase with increased drug production and heat demand.

Summary Results and Discussion
Heat demand is the decisive factor in justifying the efficiency of the cogeneration solution and is foundational for sizing a cogeneration unit; therefore, at the installation site, the most rigid conditioning of the operating regime, in the case of cogeneration systems, is determined by the thermal consumption. The differences in electricity between the on-site consumption and the production of the CHP plant (proportional to the thermal load) are compensated, without technical difficulties, from the public electricity network to which the CHP plant is connected. In order for a cogeneration system to be viable in energy savings (with sufficient energy savings to compensate for the investment effort), the annual operating time of the cogeneration plant must be sufficiently long, loading as close as possible to the rated load. An annual operating time of at least 4000 h/year for a cogeneration unit can be considered as one of the basic rules that are necessary to abide by.
The basic question that any potential investor faces is the viability and profitability of the cogeneration solution under the specific conditions of the plant location. Figure 28 comparatively shows all the scenarios analyzed in terms of the payback period and the reduction in carbon dioxide emissions. The economic and environmental viability of cogeneration and trigeneration solutions can be easily seen in all scenarios. Obviously, the heat demand and the annual time of this demand are the main factors that influence the profitability of cogeneration solutions.  Of all the scenarios analyzed, Scenario 4 and Scenario 5 can be considered as possible solutions to be implemented. Due to the variable nature of heat demand, there is a need for heat storage, as well as the fragmentation of power, in several cogeneration units to increase the operational flexibility of these units. Scenario 4 is characterized as the optimal economic option for the current energy demand profiles. This scenario ensures the highest values of heat and electricity production, respectively, but also the shortest payback period on investment. In addition, the reduction in carbon dioxide emissions has the greatest value in this scenario.
In Scenario 5, there is a thermal power reserve installed in the second CHP unit (the higher power unit); therefore, the annual operating time of this CHP unit will increase with the expansion in drug production and, implicitly, the payback period on investment Of all the scenarios analyzed, Scenario 4 and Scenario 5 can be considered as possible solutions to be implemented. Due to the variable nature of heat demand, there is a need for heat storage, as well as the fragmentation of power, in several cogeneration units to increase the operational flexibility of these units. Scenario 4 is characterized as the optimal economic option for the current energy demand profiles. This scenario ensures the highest values of heat and electricity production, respectively, but also the shortest payback period on investment. In addition, the reduction in carbon dioxide emissions has the greatest value in this scenario.
In Scenario 5, there is a thermal power reserve installed in the second CHP unit (the higher power unit); therefore, the annual operating time of this CHP unit will increase with the expansion in drug production and, implicitly, the payback period on investment will reduce.

Conclusions
Current research on the transition to carbon-free energy generation are dominated by renewable energy solutions; however, the continued use of natural gas with the aid of energy efficient technologies, such as cogeneration, seems to be one of the solutions for transitioning to a decarbonized energy system.
The proper sizing and selection of equipment is the most important factor for the success of any cogeneration project. If the selection is incorrect, the CHP system will not properly meet the energy demand or the expected payback period.
The main issues investigated by us in this case study were the variation in heat and electricity demands, and the flattening of the load duration curve for the heat demand. Thus, the heat demand was analyzed in detail and with high accuracy to identify the hourly, daily, weekly, monthly, and annual load profiles. The main purpose of integrating heat storage is the takeover of load variations and to increase the flexibility of the cogeneration plant. A heat storage system will allow a cogeneration unit to work continuously and, consequently, avoid repeated startups and stops that may harm it.
The oversizing of a cogeneration system compared with the consumption needs of an analyzed meter can negatively influence the economic viability of cogeneration and trigeneration projects. If the power of the CHP plant exceeds the consumption needs of the site, the surplus electricity will be delivered to the public electricity network, usually at a much lower rate than the purchase. On the other hand, if the thermal power in cogeneration exceeds the consumption needs, the resulting excess heat will usually be discharged into the atmosphere, as a lost amount of heat. In both cases, the energy savings achieved are not as expected, and the payback period of the cogeneration project increases accordingly.
A major economic incentive for the application of cogeneration technology is the reduction in operating costs by generating electricity at a lower cost than the cost of purchase from the local electricity supplier; therefore, the application of cogeneration can be viable if there is a significant difference between the cost of natural gas and the cost of electricity purchased from the public network. An approximate 1:3 ratio between the cost of natural gas and the cost of electricity was considered in this study. Electricity is significantly more expensive than natural gas, and the viability of cogeneration applications is therefore much more sensitive to changes in the unit price of electricity purchased from the public network.
The results of this study demonstrate the economic and technical viability of the proposed cogeneration and trigeneration solutions. For the values of the electricity and natural gas prices at the time of the analysis (2021), Scenario 4 is characterized as the optimal economical and technical option for the current consumption situation, as it ensures the highest values of heat and electricity production, and the shortest investment payback period (5.06 years). Compared with the separate generation of heat and power, we highlight a primary energy saving of 25.35% and a reduction in CO 2 emissions of 241,138 kg CO 2 /year. Nomenclature q m minimum heat demand (kW t ); q md average heat demand (kW t ); q M maximum heat demand (kW t ); τ F annual time of heat demand (hours/year); q h heat demand (kW t ); Q CHP amount of heat generated in cogeneration (kWh/year); P h thermal load of the cogeneration plant (kW t ); P nh rated thermal load of the CHP plant (kW t ); b CHP fuel consumption of the CHP plant (kW t ); η boiler boiler efficiency (%); P ne rated power of the CHP plant (kW e ); p naturalgas price of natural gas (EUR/kWh); p electricity price of electricity (EUR/kWh); p O&MCHP operation and maintenance cost (EUR/kWh); i discount rate; N lifetime of the investment (years); W sep primary energy consumption for separate generation (kWh); W CHP primary energy consumption in cogeneration (kWh); η hCHP heat efficiency of cogeneration generation (%); η eCHP electrical efficiency of cogeneration generation (%); η hRef efficiency reference value for separate generation of heat (%); η eRef efficiency reference value for separate production of electricity (%); p loss correction factor for avoided grid losses.