Thermodynamic performance analysis and optimization of a power and hydrogen generation system based on geothermal flash, dual-pressure organic Rankine cycle using zeotropic mixtures, and PEM electrolyzer

In this study, a thermodynamic model and optimization of a flash-binary geothermal system are proposed for power and hydrogen production. The binary cycles contain a dual-pressure ORC cycle and proton exchange membrane electrolyzer for power and hydrogen production. The combination of dual-pressure organic Rankine cycle with zeotropic mixtures enhances the performance of the system considerably, and selection of the best kind of zeotropic mixture as the working fluids of the DORC unit is one of the important methods to improve the performance of the suggested system. Also, the Genetic algorithm is employed to optimize the net output power of the system, in which the results of optimization show that the best performance belongs to Pentane (0.467)/Butane (0.533) with first and second-law efficiencies of 16.66%, 58.03%, respectively, and hydrogen production of 0.3683 kg/hr. Besides, for the base case simulation, the energy and exergy efficiencies of the whole system are reported by about 16.66% and 58.03%, respectively, also for this condition, the derived power from the proposed model and overall exergy destruction is calculated approximately 132.41 kW, and 90.08 kW, respectively and geothermal heat source generates 0.306 kg/hr hydrogen by the proton exchange membrane electrolyzer. * Corresponding Author, E-mail address: s.s.ashraf.t@gmail.com


Introduction
In the last years, due to the climate changes and ozone layer depletion, energy policies in various countries are implemented. Because of the mentioned environmental issues for the energy production process by fossil fuels and reduce this dependency, renewable energy sources are employed as a cost-effective alternative [1]. Recently, the use of clean energy resources like solar, geothermal, and wind are considerably planned by governments. In addition, the research and development of novel technologies with high efficiency are designed by researchers [2]. The Organic Rankine Cycle (ORC) is known as one of the popular systems to generate electricity with high capability, in which the working fluid is ranged from low to medium-enthalpy [3]. The geothermal energy with the properties of sustainable and low temperature has a significant role to be applied for the ORC systems [4]. among all of the energy extraction systems, binary and flash-binary units illustrate high performance in compared with the others. Yari [5] presents a comprehensive comparison for the various kinds of geothermal systems, the results of this paper shows that the flash-binary plant has the best performance with the efficiency of the 11.81 % when the mass flow rate and the temperature of the heat source of geothermal energy are 1 / , and 230 ℃, respectively. Jalilinasrabady and Itoi [6] investigated about the three different systems, including binary, single, and double flash units, from their works, the best performance is obtained for the binary ORC system. From the thermodynamic and thermoeconomic aspects, various geothermal cycles (binary, single, and double flash units, and kalina cycle) are compared and analyzed [7]. The results show that the optimum electricity production is founded with respect to the pressure of the flash chamber and turbine input pressure for double-flash and integrated flash-binary cycles. Shokati et al. [8] investigated about the single and binary-flash cycle comparison under thermoeconomic vantage point. Based on this work, the best first and second thermodynamic law efficiencies are founded for the single-flash Organic Rankine Cycle.
A new multigeneration system with the aim of power and hydrogen production based on flashbinary geothermal resources is proposed by Yilmaz et al. [9]. The obtained data show that the system produces 0.04981 / hydrogen when the geothermal resource temperature and mass flow rate are 200 ℃, and 100 / , respectively. Choosing a desirable working fluid for a flashbinary combined unit was performed by Ref. [10]. It's claimed that an optimum separator pressure can be founded for every working fluids and related to these optimum values, the efficiency and exergy destruction of the cycle can be optimized. Besides, some working fluids for the special range of geothermal temperatures illustrate proper performance. Zhao and Wang [11] assessed the ORC system as a flash-binary system, and the different design parameters are evaluated under exeroeconomic performance of the proposed cycle. The results show that at the best performance from exeroeconomic analysis, the highest energy and exergy efficiencies may not result and vice-versa. The analysis of exergy destruction at the ORC systems is introduced as one of the main challenges, especially at the evaporative, due to the inconformity between hot and cold fluid [12]. The destruction of the exergy of evaporative can be decreased by some approaches such as trilateral, flash binary, and two-stage units and also zeotropic mixtures.
Researchers in recent years investigated the zeotropic mixture concept due to its extremely interesting performance. The zeotropic mixtures have non-isothermal phase transitions at constant pressure. The isothermal condensing and evaporating is the largest deficiency of a pure fluid into the ORC system so that the zeotropic mixture is known by non-isothermal phase transition at constant pressure. These fluids matched the heat source and sink profiles, decreased the irreversibility, and enhanced the performance of the cycle. The utilization of the zeotropic mixture in Organic Rankine Cycle is investigated by the Chys et al. [13]. According to their results, by applying the zeotropic combination in comparison with the pure fluid. The energy efficiency of the system at the input temperature of 150 ℃ and 250 ℃ is enhanced about 16% and 6%, respectively The power generated by the ORC system utilizing the zeotropic mixture and low-grade heat source was done by Heberle et al. [14], in which the mixtures of R227ea-R245fa and Isobutane-Isopentane are used as working fluid of the cycle. Referring to this work, the efficiency related to second-low compared with pure fluid was improved about 15 %, when the energy source temperature is lower than 120 ℃. At another work, the effect of the zeotropic combination on the exergy efficiency of the ORC system driven by geothermal energy resource is analyzed by the Lecompte et al. [15]. The obtained data show that the second law efficiency can be improved from 7.11% to 14.21% in comparison with pure fluid. The effectiveness of the zeotropic mixture on the net power output of the proposed supercritical ORC system driven by the low-grade resource is evaluated in Ref. [16]. The results of their work presented that the use of zeotropic mixture leads to enhance the energy efficiency of approximately15% compared to the pure R-134a at a similar operation condition. Zhang  A number of the works focused on the system construction to improve the performance of cycles. Different constructions for organic Rankine cycles are investigated by Ho et al. [19].
According to their obtained data to improve the power generation, by splitting the expansion process into two steps and combining the liquid stream from flash evaporation in a secondary expansion stage, utilization efficiency gains of 10% above the optimized basic Organic Rankine Cycle (ORC) are achievable. Besides, a dual-pressure binary system is studied by the Kanoglu [20] under the exergy viewpoint, and the energy efficiency of proposed systems was improved to about 5.8% and 8.9%. Another dual-pressure evaporation organic Rankine cycle is presented in Ref. [21] that is powered by the heat source temperature between 100-200°. Different energy resources like geothermal, solar, biomass, and natural gas can be implemented to produce hydrogen [22]. Besides, different ways can be employed for hydrogen production under the electrolysis method, such as proton exchange membrane (PEM), and solid oxide fuel cell and alkaline. The hydrogen production as an energy carrier has high importance when renewable energy resources are applied due to its influence on the pollutions decreasing.
Amongst all of the approaches, the proton exchange membrane electrolyzer illustrates a high potential where green energy resources are utilized. Ni et al. [23] investigate exergy and energy efficiency for the PEM electrolysis device. From their results, exothermic state as the heat-producing was obtained for the PEM electrolysis and it is revealed that the operational temperature of the PEM electrolysis, thickness of electrolyzer, and current density effect on the energy performance of the system. Another improved PEM device, considering modular mathematical models of electrolyte, the voltage of cell, negative and positive electrolyte, is employed in Ref. [24]. To improve the selected parameters, an enhanced model of a PEM electrolyzer cell is presented, based on linked modular mathematical models of the anode, cathode, membrane and cell voltage. A great current density is exchanged by anode in an enhanced PEM electrolyzer, which results in a significant improvement of performance. A solarenhanced proton exchange membrane using Ocean Thermal Energy Conversion (OTEC) as the green energy resource for hydrogen production is evaluated in Ref. [25]. An organic Rankine cycle is applied to support the energy demand of the PEM device. According to the obtained data, efficiency of energy and exergy of the suggested model were increased by about 3.6%, and Main objectives of the present paper are summarized as:  A new configuration for hydrogen and power production is implemented based on a geothermal flash cycle, dual-pressure ORC system with zeotropic mixtures as working fluids, and PEM electrolyzer.
 A thermodynamic analysis and optimization process are done for the flash-binary system, and the key parameters of the suggested system are computed.
 Zeotropic mixtures with different combinations are used for reaching the best performance of the proposed system.
 The generated electricity power, amount of hydrogen production, energy/exergy outputs, and their efficiency and also optimization of the proposed system are analyzed.

Description of system
The schematic view of the proposed system is demonstrated in Fig.1. According to this figure, the system is divided into two systems: 1-the flash cycle that is employed for the geothermal energy extraction, 2-dual pressure-evaporation ORC system, and PEM electrolyzer that is known as the binary units for power and hydrogen production. The geothermal energy is extracted by the flash system, in which to reach a low-pressure flow, the extracted fluid from geothermal is isenthalpically expanded by the expansion valve. The flash chamber separates the low-pressure and two-phase flow into two saturated liquid and steam flows. The saturated steam flow goes into the turbine, which is expanded for power production, and the exit stream from the turbine enters the condenser and cools down to the lower temperatures. The saturated liquid leaves the flash chamber and is delivered to the evaporators (1) and (2) and heat exchanger (1) to adjust the demanded energy of the flash cycle. The required electricity and thermal energy to operate the PEM electrolyzer is supported by the ORC turbine and HX (2), respectively. Finally, the exit fluid of the HX (2) combined with the leaving fluid of condenser (2) and is fed to the reinjection well.
In addition, for the dual-pressure organic Rankine cycle, the pressure of the zeotropic fluid is increased by the low-pressure pump (1) and is heated up under leaving the HX (1). Then the working fluid is separated in the splitter, one section of the divided fluid is converted to the saturated flow by the evaporator (2), and another section of the flow is delivered to the pump (2) and then is fed to the Eva (1). So, the zeotropic fluid is saturated when gains enough thermal energy from the evaporator (1) and was pressurized by the pump (2). The working fluid after leaving the evaporator (1) with high-pressure goes into the turbine (ORC HP Turbine) and is expanded for power generation, where losses its pressure. The exiting fluid from the HP turbine is mixed with the exhaust saturated steam from the low-pressure evaporator (Eva (2)) and is delivered to the low-pressure turbine for extra power generation. Ultimately, at the flash-binary cycle, including zeotropic mixtures ORC subsystem, the condenser (Cond (1)) gains the heat of the low-pressure output flow, and the fluid is converted to the saturated liquid. Based on the − diagram of the dual-pressure organic Rankine cycle, the temperature glides due to the zeotropic mixtures at the two-phase sections are clearly shown in Fig.2.

1.2.Working fluid determining
The pure water is assumed as the geothermal fluid of the flash cycle, and the analysis of this section of the system is done based on the pure water features. Besides, the evaluations of the DORC unit are performed according to the various organic fluids which are introduced as the zeotropic mixtures. The choosing of the fluids type to access the best performance of the proposed system is at the center of attention. So, for the proper selection, the following indicators and characteristics should be regarded:  Medium critical temperature and pressure.
 High value for the thermal conductivity and low viscosity that led to high heat transfer and low frictions loss in heat exchanger.
 The safety and chemical stability, including flammability and toxicity, must be regarded.
 For the special amount of energy received for the system, the optimum values for first and second low efficiency and also net output power should be assessed.
 The slope of the vapor curve always is positive, and for the negative values, at the turbine blades, the droplet generation can be seen.
 Environmentally friendly based on ozone-depleting potential (ODP) and Global Warming Potential (GWP).
Based on the above-mentioned specifications, the determining of a suitable working fluid with all assumptions simultaneously can be caused by several limitations. The zeotropic fluids to overcome these problems instead of pure fluids are employed. For better certification, zeotropic mixtures can be used as proper candidates for organic Rankine cycle working fluids because of its good matching between temperatures of the heat source (based on the temperature glide in processes of heat exchangers (evaporation, condensation, and regeneration)) and working fluids.
In this paper, Pentane/Butane, pentane/Cis-2-butene, and Pentane/Trans-2-butene as (dry/dry) zeotropic mixtures are assessed to calculate the novel proposed ORC performance. The thermodynamic properties of the selected zeotropic mixtures are tabulated in Table 1.

Mathematical modeling
In this paper, energy and exergy equations are used for the evaluation of proposed system performance. Assumed considerations for thermodynamic modeling of a new combined system to simplify the MATLAB computation are as follow:  The steady-state conditions are assumed for all of the constitutes in the cycles [26,27]  The heat and friction losses in all of the heat exchangers are ignored [26,27].
 The kinetic and potential energy of water as the heat source is not be considered.
 The heat transfer variables are assumed as the entirely developed flow.
 The condition of zero state (dead-state condition) is set to = 293.15 and = 1 [28].
Besides the above-mentioned considerations, several other cases and conditions are required to assess the suggested system are given Table 2, and also, the simulation is done by MATLAB software so that the REFPROP toolbox is applied to call the thermodynamic features of the operational fluid [28].

2.1.Energy and exergy analysis
The related equations for the mass, energy, and exergy balance are represented as follows [29]: In which, ̇ is the mass flow rate; the inlet thermal energy and net output power is respectively denoted by ̇ and ̇; ℎ is known as the specific enthalpy, and ̇ illustrate the destruction rate of exergy. In addition, the exergy rate from heat transfer(̇), and specific exergy flow is presented by the Eqs. 4 and 5.
The relations of all components based on mass, energy, and exergy analysis are represented in Table 3 and Table 4. The parameters of exergy analysis, including fuel exergy, product exergy, exergy destruction, and exergy efficiency for every component is given in Table 4.

2.2.PEM electrolyzer
The required power for the proton exchange membrane electrolyzer to drive electrochemical reactions is produced by the DORC cycle, where the liquid water with ambient condition delivers to the heat exchanger (2) to increase its temperature up to the PEM electrolyzer temperature, and the preheated water is heated up by the heater. Ultimately, the hot water enters the PEM electrolyzer to produce hydrogen. Generated hydrogen after leaving the cathode cools down to environmental temperature; on the other side, the oxygen is separated from water, and the extra unreacted water is mixed again with the supply line of hot water for hydrogen production. The demanded energy of PEM electrolyzer is given as follows [30,31]: Here, Δ is the demanded electrical energy (Gibb's free energy), and Δ is the required thermal energy [ The electrolyzer potential with assuming that the < 10,000 2 [32], and ignoring the concentrating losses, can be calculated as: Where, 0 depicts the reversible potential which can be driven by the Nernst relation, besides, , , , are the activation over-potential of the cathode and anode, respectively and ℎ present the ohmic over-potential of the electrolyte. The reversible potential and ohmic voltage loss are computed by: and are the overall ohmic resistance current density,that computed by [32], [33]: Herein, ( ) is the local ionic conductivity which is given by: In which, ( ) depicts the water content at location (membrane depth from the cathode membrane) and are expressed by: Whereas, denotes the membrane thickness; and indicate the water contents at the anodemembrane and cathode-membrane interface, respectively.

As well,
, and , are the electrodes' activity metrics and are presented in the following form [32]: In this equation, 0 is the exchange and can be calculated by [32]: In this relation, presents the pre-exponential factor; denotes the activation energy.
Also, in the positive and negative electrodes, the molar flow rates of the produced hydrogen and oxygen are addressed by: Whereas, indicates current density and is Faraday constant. More details are presented in [34].

2.3.Performance criteria
The energy and exergy performances of the thermal plants can be described as: The efficiencies of the energy and exergy for the proposed system can be expressed as follows: Whereas;

2.4.Optimization
To reach the optimal solution in the problems, the Genetic Algorithm (GA) can be implemented as a heuristic optimization method. Genetic algorithm is a stochastic optimization technique, which is inspired under the natural selection laws and genetics. John Holland [35][36][37][38] initially enhanced the concept of this optimizer based on the Darwin's theory of evaluation, where the fitter individuals are likely to survive in a competing environment. GA algorithm has no need for functional derivative information to explore the solution set because this method is derivativefree in a sense, and the given objective function is minimized. As the advantages of this approach, GA decreases the burden of calculation and time of search as well as solves the complex objective functions. In this algorithm, each solution is assumed as a particle (chromosome), and the population includes several chromosomes, which is created by the random method as a low computational method. Every particle leads to a fitness value. For the stop state of the iteration, a selected number is employed. Between the particles, the determining pairs of particles with high fitness is in priority. In addition, a crossover approach is utilized for every pair to select the particles where the new particles are created. For the selection of some other particles is performed for the application of the mutation operator to generate new particles. Fitness amounts most be evaluated for all of the iterations of particles, and the best particle is founded. At the end of the iteration, the optimal particle will be determined [39].
In this work, the optimal values of the objective function are obtained based on the genetic algorithm. Maximizing the value of entire output power (̇) is the main aim of this work. The objective function reduces to maximize just the ̇. The ̇ has no changing with the variation of the optimization variables (according to the Eq. (21)). This is worthy to state that, the optimization of the top and low temperature of DORC unit ( , ) is the main objective.
The considered objective is mathematically expressed by: Whereas, indicates the mass fraction; besides, the below limitations should be implemented: And; For the above-mentioned limitations, Δ , Δ 2 present the pinch point temperature for the evaporator and condenser, respectively. depicts the heat exchangers efficiencies at the phase-change condition, which is assumed bigger than 50% [40]. The flowchart related to the GA optimization method is illustrated in Fig. 3.

3.1.Model validation
In order to model the new combined model for the power and hydrogen production, a simulation code applied REFPROP toolbox in MATLAB software is developed. According to obtained data from the simulation, the results are validated with the three previous work [41][42][43]. The validations are done for the dual-pressure ORC, PEM electrolyzer unit, and geothermal flash cycle. Fig. 4 illustrates a comparison between the obtained data of DORC unit of present work and the results that are reported by Li et al. [42]. According to this figure, the variation of the energy efficiency of the DORC in contrast to the different mass fractions for the Isobutane/Isopentane mixture is plotted. Also, the changes in the cell voltage due to the variation of the cell density to indicate the validation of the PEM electrolyzer unit is shown by Fig. 5.
Eventually, to certificate the performance proposed system, the behavior of the suggested model steam turbine is compared with the results that are reported by Yilmaz et al. [41] and are presented in Fig. 6. Referring to the Figs. 4, 5, and 6, there are good agreements between the obtained results in the present model and those reported in the literature.

Mass fraction impact on the performance of the system
In this section, the temperatures of the first evaporator and condenser are considered about 428.81 and 313 . Also, the pinch point temperature differences of these components are assumed to be 15 ad 10 , respectively. For the different mass fraction, under various zeotropic mixtures, the variation of mass flow rates is shown in Fig.7 (a). According to the results of this figure, with increasing of the mass fraction, the mass flow rate until specific range decreases and then continues with the rising trend so that the minimum value obtained for Pentane/Cis-2-butene fluid. Figs 7 (b-e) indicates the behavior of the net output power as well as the energy efficiency of the proposed system in contrast to the mass fraction changes. What stands from these figures is that firstly the power production rate and first-law efficiency increase with increment of the mass fraction of zeotropic mixtures, and after that, the intended fluids decrease. Due to this trend, an optimum value can be seen for each zeotropic mixtures; as presented in Fig. 7 (b) and (c), the best values related to the produced power through the DORC unit and net output power of system belong to the Pentane/Butane; this is due to this fact that the change of produced electricity not only relates to mass fractions but also depends to net specific power.
Besides, the total energy efficiency and thermal efficiency of dual-pressure evaporation system is depicted in Fig. (7) d and (e). the above-mentioned mathematical equations justify that the firslaw efficiency of the whole system depends on the temperature and mass flow rate of geothermal fluid, power utilized by the PEM electrolyzer and also net output power. It is good to mention that the geothermal temperature and mass flow rate are constant; the produced power from the flash-binary subsystem affects the energy efficiency of the entire system. Therefore, the best performances of the suggested system are obtainable at the mass fraction range of [0.4-0.6], and the maximum energy efficiency of the DORC system and the whole system is reported for Pentane/Butane and Pentane/Cis-2-Butene about 11.332 % and 16.74 %, respectively. Also, the variation of the produced hydrogen due to the different values of mass fraction for three assumed working fluids are represented in Fig. 7 (f), referring to this figure, the Pentane/Butane as the zeotropic mixture has the highest amount of generated hydrogen, this optimum production is due to the power used by the PEM electrolyzer. Fig.8 illustrates the exergy destruction rate in every constitute of the proposed system for the different mass fraction of considered zeotropic mixtures, including Pentane/Butane, Pentane/Trans-2-Butane and Pentane/Cis-2-Butene. As shown in Fig. 8 (a), the rate of exergy destruction of Eva (1) and Eva (2) firstly decreases and then increases, and for heat exchanger (1), the exergy destruction firstly drops, then rises. Minimum exergy destruction for Eva (1) and Eva (2)  Turbines is illustrated in Fig. 8 (b), as can be seen in Fig. 8  Rankine cycle unit is indicated in Fig. 9 (a), and the total exergy destruction is plotted in Fig.9 (b). It can be pointed out clearly that these two figures have the same trend in the different mass fractions because the DORC flash-binary system is dominated over the geothermal flash cycle.
The second-law efficiency of the dual-pressure organic Rankine cycle system and the whole system is respectively shown in Fig. 9 (c) and Fig. 9 (d). The exergy efficiency of system depends on the net output work and exergy of geothermal fluids. As mentioned above, the condition of geothermal fluid is constant, so the behavior of net output power and second-law efficiency of the entire system is similar. The lowest exergy efficiency of the system is founded at the highest exergy destruction, in which the mixtures of Pentane/Trans-2-Butene in a mass fraction of 0.5 has the highest exergy efficiency.

Operating parameters impact on system performance
In this study, energy and exergy investigation has been carried out based on various parameters effect on the system operating. According to the mass fraction analysis, Pentane (0.5)/Butane (0.5) amongst the other mixtures has the best performance; due to this reason, this mixture is chosen to analyze in this section. Fig.10 (a) (1) is performed for Eva (2), but as can be seen in Fig. 10 (b) the behavior of four parameters was different, the evaporation temperature of Eva (2)  production is assessed, and the results are plotted in Fig. 10 (c), in this figure with increment of the pinch point temperature difference, the rate of power generation and hydrogen production as well as system performance criteria (energy and exergy efficiency) decrease. The evaporating temperature is known as one of the dominant factors that influence system performance significantly. Besides, the impacts of inlet cooling water temperatures to condensers on the system efficiency between certain values are evaluated and presented in Fig. 10 (d); the results show that the increment of the inlet cooling water temperature has an inverse impact on the system performance, and with increasing the inlet temperature of cooling water, the performance of the system drops.

3.3.Thermodynamic properties and optimization results
Thermodynamic parameters contain pressure, temperature, enthalpy, entropy, mass flow rate, as well as some other performance metrics at the base case condition, resulted from the mathematical assessments is represented in Tables

Conclusion
In this paper, the application of renewable energy (geothermal) is implemented for power and          (2), ∆ , and inlet temperature of cooling water for various working fluids.           Tables: Table 1. The properties of the zeotropic mixtures. Fluid