Modelling and Optimal Design of Gas Engine CCHP System in Hospital

The combined heating and power (CHP) system and the combined cooling, heating and power (CCHP) system have attracted great attention during the last decade. However, many CHP systems don’t perform well in the actual operation. This paper presents a complete hierarchical modeling tool of the gas engine CHP/CCHP system which is built on the software Dymola. Meanwhile, a gas-engine CHP hybrid energy system serving a hospital in Shanghai is studied as a case. To validate the accuracy of newly-built models, the operating data of the CHP part of the system in 2017 is compared with the simulation results, it is found that the minimum error is 2.1%, and the maximum error is 7.0%. Then, the original gas engine CHP hybrid energy system is reconstructed to a gas engine CCHP system. To analyze the feasibility of the optimal design, the conventional energy supply system which was used in the hospital before 2013, the original gas engine CHP hybrid energy system and the optimized gas engine CCHP system are modeled and simulated. From the simulation results, it is found that the primary energy ratio is increased from 72.55% to 133.37%, the payback period of investment is decreased from nearly 11.8 years to 3.9 years, and the CO 2 emissions reduction rate is increased from 4.83% to 93.72%. Therefore, the optimization scheme is feasible.


Introduction
Nowadays, the energy crisis and the environmental impact of fossil fuels have been increasingly serious globally (Moussawi et al, 2016;Ameri et al, 2016;Yousefiet et al, 2017;Zheng et al, 2018;Jiang et al, 2018). Efficient technology for energy conservation is urgently needed to ensure energy supplies and reduce environmental emissions (Jiang et al, 2018). Combined heating and power (CHP) system and combined cooling, heating and power (CCHP) system have received widespread attention due to the advantage of substantial reliability, energy-saving, environmental friendliness and cost-saving Zheng et al, 2018;Jiang et al, 2018;Das et al, 2018;Afzali et al, 2018;Zhang et al, 2018). CCHP system is defined as an effective energy system that generates cooling, heating and power simultaneously, while CHP system removes cooling from the list , mainly through the cascade utilization of energy Kavvadias et al, 2018). In recent years, CHP and CCHP have been introduced to small-medium scale places, such as hospitals, hotels, domestic houses and office buildings Zhang et al, 2018;Santo, 2012;Kavvadias et al, 2010).
CHP has developed rapidly since the first CHP energy supply technology was introduced in the 1990s. However, it is worth noting that many CHP systems suffer from the uncertainty of the actual economic results. Because these CHP systems only provide a fraction of energy for buildings, such as hot water and a part of power, while excess energy is still fed by the conventional energy system. A possible solution is optimizing the CHP hybrid energy system to a CCHP system.
During the last decade, many researchers used system modeling and simulation to optimize the performance and the design procedure of CHP and CCHP systems. Wei et al. proposed a multi-objective optimization model to provide a guiding principle for CCHP system optimization . They adopted software MATLAB and TRNSYS to identify a series of compromised optimal operation strategies with different operational parameters using Non-dominated Sorting Genetic Algorithm-II (NSGA-II). Ameri et al. described a mixed integer linear programming (MILP) model to determine the optimal capacity and operation of seven CCHP systems in eastern Tehran (Iran) (Ameri et al, 2016). Results showed that compared with generating heat by boilers and purchasing electricity from the local grid, the optimal CCHP system was able to save costs and reduce CO2 emissions. A mixed integer non-linear programming (MINLP) model was developed by Zheng et al. to achieve multi-objective optimization of a smart micro-grid using the modeling environment GAMS (Zheng et al, 2018). Results described by four scenarios showed that net present value, primary energy saving and CO2 emissions were reduced significantly by installing roof-top PV, ground source heat pump, natural gas-based CCHP and storage systems. Espirito Santo proposed a computational DOI 10.3384/ecp193105

Proceedings of Asian Modelica Conference 2022
November 24-25, 2022, Tokyo, Japan hourly profile simulation methodology (Santo, 2012) and performed an integrated thermal system simulation (Santo, 2014) using software COGMCI. An effective method for the design optimization of CCHP coupled multi-energy system was developed by Lu et al. (Lu et al, 2018). They established a correlation model for configuration and operation optimization based on a bilevel model construction method, proposed a solution method, and developed an optimization tool using MATLAB. Mago et al. optimized CCHP systems for an office building in Columbus (USA) following the thermal load (FEL), the electrical load(FTL)and a hybrid electrical-thermal load (HETS) strategies (Mago et al, 2009). Results showed that HETS was better than FEL and FTL. Pagliarini et al. studied the feasibility of integrating an existing natural gas-fired-boiler central plant in Parma (Italy) into the CCHP system (Pagliarini et al, 2012). The space heating and cooling loads were calculated by TRNSYS. The national policies supporting CHP were found to have a strong influence on the results. TRNSYS was also used by Rosato et al. to simulate the performance of a micro-CHP system and a conventional system (Rosato et al, 2013). Results showed that the micro-CHP system could significantly reduce primary energy consumption, carbon dioxide emissions and operating costs. Hu et al. proposed a stochastic multi-objective optimization model to optimize the CCHP operation strategy for different climate conditions based on operational cost, primary energy consumption (PEC) and carbon dioxide emissions (CDE) and added a higher reliability level of the probability constraint to it (Hu et al, 2014). Moreover, an incentive model was developed to support the multi-objective decision analysis. The feasibility of integrating air-conditioning system and heat storage tank into the CCHP system was studied by Li et al. (Li et al, 2014). They formulated the optimal problem as a nonlinear programming problem using genetic algorithm (GA). Furthermore, a sensitivity analysis was conducted to explore the impact of natural gas prices on system economics. Jannelli et al. developed a 0-1dimensional model of a small-size CCHP based on the integration of a 20 kW diesel engine and a double-effect water-LiBr absorption chiller on platform AVLBOOST (Jannelli et al, 2014). The manufacturer's sample data was used to validate the performance parameters of the gas engine under different operating conditions and the average error was found to be less than 5%. Particle Swarm Optimization (PSO) was used by Hajabdollahi et al. to optimize the gas engine CCHP system for the purpose of comparing a new operational strategy named variable electric cooling ratio (VER) with constant electric cooling ratio (CER) for different climates . Piacentino et al. used a decision tool to optimize the layout, design and strategy of a CCHP plant simultaneously in the hotel sector (Piacentino et al, 2015). In addition, two sensitivity analyses were performed on tax exemption for the fuel consumed in "high-efficiency cogeneration mode" and on the dynamic behavior of the system. Moussawi et al. conducted a simulation study using TRNSYS software for diesel engine-driven CCHP systems used to provide electricity, space heating, space cooling and sanitary hot water (SHW) to a typical residential family house in Beirut (Moussawi et al, 2015). Wang et al. simulated and evaluated four different gas-engine CCHP systems applied for a remote island using TRNSYS, and the results showed that the one adopting the double-effect absorption chiller and the gas-fired boiler was the best option (Wang et al, 2016 proposed a gas turbine-driven CCHP system combining solar thermal energy and compressed air energy storage (S-CAES) and developed system off-design models. In comparison with the corresponding optimized CCHP system without S-CAES, the system with S-CAES performed better (Yang et al, 2017).
However, few models are built with hierarchical architecture, so models and sub-models lack reusability and are difficult to debug separately. In this study, the gas engine CHP/CCHP system is modeled and dynamically simulated in Dymola software ("DYMOLA Systems Engineering, Multi-Engineering Modeling and Simulation based on Modelica and FMI.") using Modelica language. Based on the results of dynamic simulation, the feasibility of optimization from the gas engine CHP hybrid energy system to the gas engine CCHP system will be discussed. The main contributions in this research are summarized as follows: (1) Simulation models of important equipment and the whole system of CHP hybrid energy system and CCHP system are built and validated.
(2) The original gas engine CHP hybrid energy system is optimized to a gas engine CCHP system for a case study.
(3) The feasibility of optimization is analyzed by comparing the performance of two systems.
This paper is organized as follows: Section 2 describes the case for optimization, presents the modeling approach and validation results for simulation models of the important equipment in CHP and CCHP systems. Section 3 gives the load calculation results and system optimal design for the case building. Section 4 presents the performance evaluation method used in this study. Section 5 analyzes and compares the performance of the original gas engine CHP hybrid energy system and the gas engine CCHP system. The conclusions are drawn in the last section.

Case study
The case building, Ruijin Hospital North, is located in Jiading District, Shanghai, China, with a floor area of 72000 m 2 . A conventional energy supply system was applied to this hospital before 2013. By replacing the hot water boilers with a 334kW gas engine and two heat exchangers, the conventional system was optimized to a gas engine CHP system in October 2013. The energy supply layouts of the conventional system and the gas engine CHP system are shown in Figure 1 and Figure 2, respectively, and the main parameters of system components are shown in Table 1.
Ruijin Hospital North has stable electrical load and hot-water heating load, and the former is much higher than the latter. Due to the current policy that power generated by self-provided units can only be gridconnected but not exported to the grid, the gas engine CHP system applied to this hospital operates in the "power determined by heat" energy supply mode, i.e. only the demand for sanitary hot water is considered to be necessarily met by the CHP unit, based on which the corresponding generated power output is connected to the hospital power supply system. To ensure the stability of power generation and waste heat output, and to prolong the service life of the equipment, there are only two states of the gas engine generator set in actual operation: rated state (100% load) and shutdown (0% load). In consideration of the resulting mismatch between the stable sanitary hot water input on the supply side and the ever-changing hot-water heating load on the demand side, a heat storage tank was installed to control the start and stop of the gas engine according to its water level. The gas engine will be started when the water level drops to 0.2 meters and shut down when the water level rises to 4.8 meters.

Gas engine
This study mainly focuses on the system's overall performance. Since the gas engine is just one component of the whole system, its performance parameters, such as electrical power, total heat recovery, exhaust gas heat, coolant heat, mixture heat, fuel input, natural gas consumption, electrical efficiency, thermal efficiency and total efficiency, rather than internal structural parameters, should be mainly concerned. The performance documentation provided by manufacturers contains specific performance parameters for different gas engine models at 50% load, 75% load and 100% load, based on which the performance parameters of gas engines operating in the range of 50% load to 100% load can be calculated by interpolation method. Therefore, the gas engine performance parameter model consists of two parts: a performance parameter sheet model used to store the datasheet of different samples and an interpolation model used to read the datasheet and output the corresponding performance parameters according to the input parameter (electricity demand).
Up to now, this performance parameter sheet model library has stored datasheets of more than 20 samples of different brands such as Mannheim, Caterpillar and Schmitt.

LiBr absorption chiller
There are many types of LiBr absorption chiller, among which single-effect hot water type and double-effect flue gas type are used in the present study. The internal structure of the whole LiBr absorption chiller model is shown in Figure 3. The LiBr absorption chiller model also consists of a performance parameter sheet model and an interpolation model. The performance parameter sheet model stores the datasheet of main rated parameters of LiBr absorption chiller samples, such as cooling capacity, heat consumption, heat source temperature, inlet and outlet temperature of cooling water, inlet and outlet temperature of chilled water, COP, etc. Unlike the stable performance parameters of gas engines at rated operating conditions, the most important performance parameter of LiBr absorption chiller, coefficient of performance (COP), is influenced by several factors and is therefore given as the COP curve by manufacturers. For ease of reading, the COP curve is converted into 4 data tables: chilled water temperature correction table,  cooling water temperature correction table, heat source  temperature correction table and cooling capacity  correction table. Each table contains two columns, where the first column is the independent parameter (chilled water temperature, cooling water temperature, heat source temperature, cooling capacity) and the second column is the corresponding COP.

Interpolation model
The input parameter of the interpolation model is the cooling load, and the output parameters are the actual cooling capacity, the heat exchange capacity of the generator and the heat removed by the cooling water. The specific calculation process is as follows.
The actual COP of LiBr absorption chiller can be calculated by the following formula, which is provided in the LiBr absorption chiller technical manual. (1) Since the cooling capacity datasheet needs to be read on the basis of partial load rate, it's necessary to convert the cooling load into partial load rate.
The cooling load ( ) can be calculated as follows: ( 2) where, is the flow rate of chilling water, kg/s; is the specific heat of chilled water, kJ/(kg·°C); and respectively represent the inlet temperature and set temperature of chilling water, °C . The maximum load rate and the minimum temperature limit of the heat source must be taken into consideration when calculating the partial load rate (PLR) of LiBr absorption chiller. PLR is between the minimum and maximum load rate, and is 0 when the heat source temperature is lower than its minimum.
Then, the actual heat consumption ( ) of LiBr absorption chiller can be calculated as follows: (3) where, represents the actual cooling capacity read by the performance parameter sheet model, kW.
The heat removed by the cooling water includes the heat released by the absorber and the condenser, and the heat absorbed by the LiBr absorption chiller includes the heat absorbed by the evaporator and the generator. Neglecting the heat dissipation of pump, the energy balance equation can be expressed as: where, represents the heat removed by the cooling water, kW.

Actual operation data
Monthly operation data of the case CHP unit in 2017 is investigated, as shown in Table 2, to validate the accuracy of models.

Model validation
As shown in Figure 4 and Figure 5, discrepancies between the simulation results and operation data are less than 10% for both system power generation and natural gas consumption, and thus, the model accuracy is validated. Therefore, the subsequent results of system operation characteristics and optimization are expected to be of sufficient accuracy. An error or robust design analysis would be required to predict expected accuracy of additional model predictions.

Load calculation of the case building
To optimize the design of system and further simulate it, it's necessary to calculate the hourly cooling load, heating load and hot water load of the case building. The specific flow direction and flow distribution of the hot water are of no importance in modeling, hence only the hot water load is considered. During the simulation, the monthly hot water load is distributed to the hourly load according to the load factor method (Shan, 1989). The hourly hot water load is shown in Figure 6.

Optimal design
To improve the comprehensive performance and economy of CHP unit, the original gas engine CHP system is optimized to a gas engine CCHP system. The CCHP part of optimized CCHP system will provide all the heating load and hot water load of the hospital, along with most of the cooling load and electric load. The remaining part of the cooling load is provided by the  The energy supply layout and model schematic of optimized CCHP system is shown in Figure 8 and Figure 9, respectively. A 4300kW gas engine and four heat exchangers are used to replace heating water boilers, while two absorption chillers are used to replace an electric chiller. Main parameters of new system components are shown in the Table 3. The system process is as follows. The 334kW gas engine supplies all the sanitary hot water. In summer, two absorption chillers are preferred to meet the cooling load of the hospital, and the shortage is met by the electric refrigeration unit. The flue gas generated by the operation of the 4300kW gas engine is passed into the double-effect flue gas type absorption chiller for cooling, and the jacket water (rated at 98 °C) generated by it and the remaining jacket water of the 334kW gas engine are accessed to the single-effect hot water type absorption chiller. In winter, the flue gas of the 4300kW gas engine is introduced into the flue gas-hot water plate heat exchanger for heating. The jacket water (rated at 98 °C) generated by it and the remaining jacket water of the 334kW gas engine are also used for heating.
The system follows the hybrid operating mode. The 334kW gas engine is operated at full load in winter and summer. It is started and stopped according to the water level in the transition season. The 4300kW gas engine is only operated in winter and summer and it is controlled by return water temperature. In order to evaluate the comprehensive performance of gas engine system and gas engine CCHP system, the 3E analysis (Gao et al, 2022) is conducted in this section.

Energy efficiency analysis
Primary energy ratio ( ) is adopted to evaluate the energy efficiency of system. Primary energy ratio is defined as the ratio between the output energy and the where, and respectively represent the system electrical power generation and electrical power use from local grid, kJ. and respectively represent the system heat supply and cooling capacity, kJ. represents the system fuel consumption, Nm 3 . represents the low calorific value of fuel, kJ. represents the product of electrical power generation efficiency and transmission efficiency of local grid, %.

Economy analysis
Economic analysis is based on two indicators: annual operating cost and payback period of investment.
System annual operating cost ( ) is the sum of annual fuel cost ( ), annual electrical power cost ( ) and system maintenance cost ( ), and can be expressed as follows: (6) For reconstruction, system payback period of investment ( ) is the recovery period of system's incremental investment ( ), and can be expressed as follows: (7) where, and respectively represent the annual operating cost of conventional system and reconstructed system.

Environment analysis
CO2 emissions per unit capacity ( ) and CO2 emissions reduction rate ( ) are important indicators for environment analysis, which can be calculated as follows: (8) Where, represents the system CO2 emissions, Nm 3 /s. and respectively represent the CO2 emission coefficient of local grid and natural gas. and respectively represent the CO2 emissions per unit capacity of conventional system and reconstructed system, Nm 3 /kJ. (In engineering calculation and trade settlement, China stipulates that the volume at a pressure of 101.325 KPa and a temperature of 293.15 K is defined as a standard cubic meter, expressed in Nm 3 . For the convenience of analysis and calculation, this unit is used uniformly in the following.)

Simulation results
The simulation results of system electricity generation, natural gas consumption and electricity consumption are obtained by dynamic simulation with Dymola software, as shown in Table 4.

Energy efficiency analysis
According to the test of the hospital's energy station, the average low calorific value of natural gas is 34.308 MJ/Nm 3 . Moreover, product of electrical power generation efficiency and transmission efficiency of local grid is assumed to be 40% in this study. Then, the primary energy ratios can be obtained by Eq. (5), and the results are shown in Figure 10.

Economy analysis
In Shanghai, the price of natural gas is 2.45 yuan/m³ for distributed energy systems and is 3.82 yuan/m³ for gas boilers. Besides, the electricity price is 0.641 yuan/kWh for non-resident users. For conventional energy supply system, original gas engine CHP hybrid energy system and optimized gas engine CCHP system, the average system maintenance cost is 0.024 yuan/kWh, 0.12 yuan/kWh, 0.15yuan/kWh, respectively. Through investigation and calculation, the incremental investment of original gas engine CHP hybrid energy system and optimized gas engine CCHP system is 4 million yuan and 27.58 million yuan respectively. Based on Eq. (6)-(7), the payback period of investment of three systems are shown in Table 5.

Environment analysis
According to the survey, the CO2 emission coefficient of natural gas source in Shanghai is 1.04Nm 3 /Nm 3 natural gas and the national average CO2 emission coefficient of electrical power generation is 0.412 Nm 3 /(kWh). Based on these, Eq. (8)-(10) are used to calculate total CO2 emission, CO2 emissions per unit capacity and CO2 emissions reduction rate of these systems. Calculation results are shown in Figure 11 and Figure 12.

Feasibility analysis
Through the above evaluation calculation, it is easy to find that, compared with the original gas engine CHP hybrid energy system, the optimized gas engine CCHP system is improved a lot. Firstly, the optimized system solves the economic problem efficiently. The payback period of investment is decreased from 11.8 years to 3.9 years. Meanwhile, the energetic and environmental performance of the system are also optimized. Primary energy ratio is increased by 83.83% and CO2 emissions reduction rate is increased by 93.40%. Therefore, it can be concluded that reconstructing a CHP hybrid energy system to a CCHP system has a high feasibility.

Conclusions
In this paper, a complete hierarchical modeling method of the gas engine CHP/CCHP system was presented. And the models of gas engine generator set, heat exchanger and LiBr absorption chiller were then built based on theoretical analysis, mathematical equation and the performance curve of equipment. Then we validated the accuracy of the presented model by taking the gas engine CHP system of a hospital in Shanghai as an example. By modeling and simulating the system, we found that the minimum error between the calculated results of the model and the operational data of this system in 2017 is 2.1% and the maximum error is 7.0%. The results meet the requirement that the simulation deviation is less than 10%, which validates the accuracy of the model. Furthermore, we reconstructed the original gas engine CHP hybrid energy system to a gas engine CCHP system in our model. Then the conventional energy supply system used in the hospital before 2013, the original gas-engine CHP hybrid energy system and the optimized gas engine CCHP system were modeled and simulated to analyze the feasibility of this optimization. The simulation results show that the gas engine CCHP system can increase the primary energy ratio from 72.55% to 133.37%, shorten the payback period from nearly 11.8 years to 3.9 years and increase the CO2 reduction rate from 4.83% to 93.72%, which validates the feasibility of this optimization.