Exergy analysis and optimization of the Rankine cycle in steam power plants using the ﬁ re ﬂ y algorithm

. The analysis of the exergy ef ﬁ ciency has always been considered as a fundamental criterion to study the behavior of the thermodynamic cycles. In this research, the exergy analysis of a steam power plant for generating electricity with Rankine thermodynamic cycle is carried out. Zarand steam power plant, which is located in the Kerman province, is considered as a case study. In order to optimize these thermodynamic processes and to achieve the highest exergy ef ﬁ ciency value, some primary parameters were considered as the decision variables. By changing the values of these parameters, an attempt was made to enhance the exergy ef ﬁ ciency by using a novel approach. The six decision variables, which are, output temperature and pressure values of the boiler, as well as the output pressure values of the four stages of the turbine, were chosen on the basis of probability of variations in a certain range of electricity generation parameters for the studied power plant. The exergy ef ﬁ ciency was considered as the objective function. Afterwards, optimization of the power plant by employing the ﬁ re ﬂ y algorithm, which is one of the relatively latest invented algorithms for solving the optimization problems, was carried out. The ﬁ re ﬂ y model performs the optimization process inspired by the behavior and action of ﬁ re ﬂ ies to attract mates and reject enemies. For the purpose of analysis of the exergy ef ﬁ ciency, at the ﬁ rst stage, the optimization of exergy ef ﬁ ciency function was performed for the studied steam power plant, and then the results were compared with the solutions obtained using the genetic and particle swarm optimization algorithms. Final results are indicative of the fact that by appropriate changes in the decision variables and employing the ﬁ re ﬂ y algorithm, the exergy ef ﬁ ciency of the thermal power plant increased from 30.1 to 30.7037 percent. This increase was equivalent to 0.6037 for the cycle, and compared to the results obtained from the genetic and swarm particle optimization algorithms, it was 0.04% and 0.0398% higher, respectively.


Introduction
The growth of the electricity production using variety of sources is increasing considerably, every rate with the rate of 2.4 percent. It is expected that in 2030, electricity generation around the world will reach to the thirty billion and three hundred million kilowatt-hours. It is worthy to mention that, although the sustainable sources of power are expanding at a fast rate, major contribution of power belongs to the fossil fuels.
In a thermal power plant, the mechanical energy required to drive generators is supplied from the heat of burning fuel oils. In about 86 percent of power plants, the steam is used to generate mechanical energy. These are called thermal power plants, which often use the Rankine cycle to generate electricity. That is why the experts are always trying to increase the cycle efficiency.
In a recent study, Vandani et al. [1] carried out a research on the impact of heat recovery of boiler's blow down on the overall efficiency of power plant's Rankine cycle, and using the GA and PSO algorithms, the optimal parameters for each element of the cycle were determined. Tajik et al. [2] obtained the difference between heat recovery steam generator with two pressure levels and the same generator with three pressure levels and simultaneously calculated and compared the exergy of each model. In a series of studies conducted in 2013, by employing different objective functions, an attempt was made to optimize the various parameters in heat recovery steam generator of combined cycle power plants [3][4][5]. By the help of the Pinch analysis, Bade and Bandyopadhyay [6], performed the optimal sizing of an integrated gas turbine for the purpose of retrofitting and grassroots design. Uro sevićet al. [7] calculated the power reduction of a steam turbine in a cogeneration power plant (heat and electricity). Can et. al. [8] analyzed the energy and exergy in a cogeneration power plant in Turkey. Tanetsakunvatana and Kuprianov [9] investigated the effects of the fuel quality and air ratio in the efficiency of a boiler. They calculated the boiler efficiency and evaluated the amount of radiation produced in different conditions. Liu and Bansal [10] combined the genetic algorithm with computational fluid dynamics and reduced the slagging phenomena in furnaces and consequently were able to increase the combustion efficiency. Raval and Patel [11] offered ways to reduce the power plants start-up power especially for pumps and compressors. Lee [12] studied the efficiencies of an ideal Rankine cycle with various fluids and calculated the thermo-physical properties of cycle fluids using the equation of state. The results indicated that the thermal capacity of the system directly depends on the boiling point at atmospheric pressure, critical pressure, and the molecular weight of the fluid. Habib [13] performed different studies and concluded that the combined cycle power plants have 25% higher efficiency and 35% lower irreversibility than traditional power plants. Biegler-König [14] employed the Bees' algorithm to optimize a series of data derived from thermal power plants. Denjare and Goswami [15] carried out a comparative analysis among modern methods of optimization for reducing production costs in thermal power plants. They performed this by comparing the obtained results from Bees', SFL (sequential forward selection) algorithm and the IABC (improved artificial bee colony) algorithm.

Material and methods
The first law of thermodynamics expresses the principle of the energy conservation. In the first law we deal with various forms of energy. The effects and reactions of work and heat in a cycle or thermodynamic system cause changes in the system. The effect of changing the state of a system is more than the effects of heat. Therefore, the second law of thermodynamics holds more value for the heat, which means that the effects and reactions of the work have more usefulness degree than heat. In a real thermodynamic cycle, the work can be totally converted to heat, but converting the amount of heat into work, is very limited and complicated. Basically, the energy quality in the thermodynamic analysis refers to the energy capacity for the production of work [16]. Hence it can be said that the quality of energy is the potential, ability and the talent of energy to produce useful work. In other words, the potential for a certain amount of energy for useful work may be defined as the maximum energy, which can be achieved in an especial environment. Environment is considered as the basis for measuring of work potential [17]. In the thermodynamic contexts, sometimes it is declared that the degree of energy has reduced. This means that the potential for a certain amount of energy has been decreased during that process. Therefore, the first law of thermodynamics is defined as the total amount of energy, which remains constant. While, the second law of thermodynamics is considered as the potential of producing useful work, which is always reducing [16].
It is true that the first law of thermodynamics includes the work term, but the effects of irreversibility, which is the same as entropy production is not considered. Here, the second law comes in to help and also calculates the entropy production. When a system and its environment (in standard condition) are in equilibrium, it is said that the system is in mechanical and thermal equilibrium. For the dead state, standard environmental conditions of temperature and pressure should be used. The potential for a system that only has heat exchange with the environment, compared to its dead state; it is called the exergy of that state or thermodynamic accessibility. According to this definition, exergy is the maximum useful work that can be achieved from a material flow or energy. Therefore, the useful work is maximized when the process is irreversible [17].
The first law of thermodynamics for a volume control in stable condition can be written as follows [16]: In a volume control, three types of energy may be transferred, work transfer, heat transfer, and exergy transfer [18]. However, unlike the energy, which is always constant, exergy is wasted or disappeared. Exergy balance in a thermodynamic cycle is as follows: In this equation, _ Ex D is the wasted exergy, _ Ex W and _ Ex Q are the exergy of heat and work respectively. As defined by [17]: where T 0 is the ambient temperature, and T r the temperature at which the heat transfer occurred. _ Ex w is the exergy of control volume. The total exergy is made up of kinetic, potential, physical and chemical exergy: Kinetic exergy and potential exergy can be neglected [17]. The physical exergy can be obtained from the following formula: where T 0 is the absolute temperature of the environment, h is enthalpy, and h 0 is the enthalpy in the absolute temperature environment. S is the entropy and s 0 is the entropy in absolute temperature environment.
Potential exergy usually is associated with the fuel consumption and is calculated by the following formula [17]: where j is the coefficient of chemical exergy rate, and LHV is the lowest fuel heating value. j can obtain different values on the basis of the gas type [17]. For example, for methane is equal to 1.06 and for hydrogen is equal to 0.0985. From the equations (3)-(9), the exergy equation for all parts of a thermodynamic cycle can be calculated. Table 1 shows the exergy destruction equation for various components of the power plant.
The total exergy of a steam power plant is calculated through the following equation: where _ w net is the total work produced in power plant, and _ m fuel is the fuel mass flow.

System description
For evaluating the exergy and performing the optimization process, Zarand Power Plant in the Kerman Province was selected as a case study. Zarand is a Rankine cycle steam power plant, which enjoys two similar units each with a capacity of 30 MW. The flow diagram of the power plant is shown in Figure 1. The inlet water of the boiler plant after passing the hot boiler pipes, turns into superheated highpressure steam and enters into the turbine. The turbine of Zarand power plant is an extraction type and with an efficiency of over 93 percent. In extraction turbines, the steam comes out in different stages of turbine and is sent for the feed water heaters to improve the overall efficiency of the system. There are two types of feed water heaters in Zarand power plant which one is open type and the other closed. Steam cycle thermodynamic study demonstrates that the warming up of feed water before entering the boiler increases the efficiency of the cycle. This process of heating is typically performed through extracting small amounts of steam through the turbine into heat exchangers, which are also called feed water heater. Increasing the temperature of water entering the boiler reduces the thermal energy required to produce steam in boilers and also the irreversibility in the process. On the other hand, due to the high specific volume of steam at the end of extraction turbines, some of the steam will help to avoid increasing moisture in low pressure parts of the turbine to improve its efficiency. Thus, we can conclude that in a cycle of recovery or heater, some of the heat is recovered in the cycle and the amount of heat released to the environment is reduced through the condenser and thereby its efficiency increases. The existence of waste heat recovery and its proper function in increasing the temperature of inlet water and decreasing the fuel consumption of boiler and the air volume needed and thereby leads to the reducing of the rate of combustion products and lower damage to the furnace. Each unit of the Zarand power plant enjoys four feed water heater. After generating the power in the turbine, in the last extraction stage, the steam moves from the turbine into the condenser where it becomes liquid. Afterwards, the liquid is pumped into the feed water heater and finally reentered into the boiler.

Results and discussion
In order to perform the optimization and efficiency enhancement of the exergy in the power plant, each of its components should be evaluated. On the basis of IAPWS IF-97 standard, pressure, temperature, enthalpy and entropy were calculated in MATLAB, and considering the mass and energy balance, the exergy of all components were calculated. Table 2 shows the measured values for each element before the optimization [1]. As can be seen in Figure 2, the highest share for the exergy destruction belongs to the boiler. Therefore, in order to obtain the best and satisfactory results in the optimization, the most focus and attention should be devoted on this component. According to the equation (10), the exergy efficiency achieved was equal to 30.10%.
During the optimization process, it is required to focus on the elements, which have the greatest impact on the exergy efficiency. Considering the impossibility of changing the plant mass flow, the mass flow rate of each stage was considered constant. Due to the characteristics of the boiler and the possibility of changes in temperature and pressure in a certain range, temperature and pressure were selected as design variables. As it is being noted, the power plant turbine is an extraction model in a way that the pressure and temperature output could be controlled at each stage.
In the four stages extraction of the steam turbine, the steam comes out from the turbine and is used for heating the outlet water from condenser. The temperature of four stages was considered constant and the pressure of each four stages was selected as decision variables. Afterwards, the steam, which its heat energy has been taken, enters to condenser and the pressure and temperature come down. Nevertheless, the mass flow rate is constant. The outlet water from the condenser is pumped into the open type heat recovery heater and then closed type heat recovery heater, which its temperature and pressure goes slightly higher. Then it is re-entered into the boiler and the cycle completed. Therefore, in this problem, six optimization variables including the output pressure and temperature of boiler, and the pressures of all four extraction stages of turbine were selected. The net work produced by power plants is obtained from the equation (11):  By expanding the equation (11), the objective function is obtained. The equation (12) shows the objective function, which depends on fluid mass flow rate, enthalpy and heating value of the fuel.

Initial boundary conditions
Initial boundary conditions are designed according to the features of different components of the cycle. It should be noted that the optimization is acceptable if it can satisfy all initial conditions. It means that design variables can be only selected in the range that power plant can operate in a suitable condition and with no damage to its elements. Due to limitations in the design of the boiler, the boiler pressure should always be between the outlet pressure of 40.68 bar and 49.72 bar and a temperature of between 480 and 500°C.
Output extraction pressure of turbine decreases in each stage compared to the previous stage, and the final output extraction pressure should be higher than the work pressure of condenser. The working pressure of condenser is not among the design variables and always is constant and equal to 0.077 bar. Due to the design of the turbine, in addition to the mentioned condition, the pressure of each stage can be changed only in a certain range. The temperature of steam at each stage of turbine is not among the decision variables and always is constant. Therefore: 40:68 bar < P 2 < 49:72 bar ð14Þ P cond < P 17 < P 15 < P 13 < P 11 < P 2 10:5 bar < P 11 < 25 bar ð16Þ 5 bar < P 13 < 10:49 bar ð17Þ 3 bar < P 15 < 4:99 bar ð18Þ 3.2 Implementation of the firefly algorithm (FA) model Firefly algorithm (FA) is one of the collective intelligence algorithms presented in 2006 by Yang. In this algorithm, the inspiring behavior of the fireflies, which attract mates or reject the enemies, has been analyzed. The algorithm is an iterative process based on the population by factors such as fireflies. These factors are allowed to examine the objective function. The Intelligent optimization technique based on the assumption that the solution of an optimization problem can be considered as a factor (firefly) is emitted according to its quality in an environment. Consequently, each firefly attracts its counterparts regardless of their gender that explores the search space more effectively. Firefly algorithm considers the following especial conditions, which are based on characteristics of real fireflies: -All the fireflies are bisexual, and regardless of their sex will move more attractive and more transparent. -The attractiveness degree of a firefly is proportional to its brightness. It is also possible that the brightness decreases with increasing distance from other fireflies. Then, if there is no more attractive or more transparent firefly, it will move randomly. -The brightness or light intensity of a firefly is determined by the value of the objective function. Figure 3 shows the flowchart of the proposed firefly algorithm in this study.
By using the input parameters and the proposed settings shown in the Table 3, the optimization program was launched and performed on the MATLAB software.
The diagram of the exergy efficiency according to the iterative loop in the employed FA model is shown in Figure 4. It is worthy to note that, with each iterative calculation which has been performed by the proposed FA model, the produced results became closer to the optimal solutions and finally the curve has become completely converged.
In the Figures 5-9 , the values obtained for other decision variables are depicted. Figure 5 shows the variations of the output temperature values for the boiler during the optimization process. Considering the upper bound of the boiler temperature which was 500°C, the temperature achieved by optimization was close to 500°C, which was about 10°C higher than the current temperature. By increasing the output temperature of the boiler, the enthalpy of superheated steam has increased, and according to equation (12), the net work produced by the turbine went up and as a result the exergy efficiency has been increased. Figure 6 demonstrates the output pressure changes of the boiler during the optimization process. Due to the characteristics of the boiler installed in the Zarand power plant, and its functional range, it is not possible to decrease the pressure to a certain amount. According to the results, the best output pressure of the boiler was 40.68 bar, which is 4.5 bar lower than the current condition. According to the equation (12) as well as the tables extracted from the "IAPWS IF-97", whenever the pressure is lower and the output temperature of the boiler is higher, resulting enthalpy and consequently exergy efficiency will be higher. Figures 7 and 8 demonstrate the effect of decision variables on the exergy efficiency. Clearly, in order to obtain the highest value of enthalpy at the turbine inlet, the maximum temperature value could be produced by the boiler needs to coincide the lowest pressure value. The highest enthalpy could be obtained from the boiler, considering the IAPWS IF-97 standards as well as the equations (10) and (12). Figure 9 illustrates the effect of changes in the extraction pressures of turbine on the exergy efficiency. As can be seen, the pressure has decreased at each stage, and the conditions of problem have been completely satisfied. The optimized pressure values have been increased from the first to third stages. Only the final stage pressure, which is the input pressure of the condenser has been reduced. As expected, in the entering stage to the condenser, the fluid is in the form of saturated liquid.
Furthermore, the optimized values for each of the decision variables using the FA model are presented in the Table 4. As it is shown, with regard to the pressure values of the stream turbine, the lowest value belongs to the 4th extraction pressure of the turbine and it is estimated to be 0.781 bars, while the highest value is calculated for the first extraction steam with value of 25 bars.

Validation of the proposed model
To validate the results of the optimization using the FA, the obtained results are compared with the actual measured values as well as the results of the other optimization methods, namely, genetic algorithm and the particle swarm optimization, to find out about the improvements on the exergy efficiency. Genetic algorithm (GA) optimization method is based on biological evolution, which was introduced in 1970 by John Holland. This algorithm offers very large sets of possible solutions. Each of these solutions is evaluated by a fitness function and some of the best approaches are selected. These approaches generate new solutions in the next step. Therefore, the search space evolved in a way that the optimal solution is reached.
The particle swarm optimization (PSO) method was firstly introduced by Kennedy and Eberhart in 1995. This algorithm is an evolutionary calculating optimization method inspired from nature and the social behavior of animals such as birds and fishes and is based on repetition. In this method, a certain number of particles randomly get   initial values. For each particle, two parameters of position and velocity is defined which are modeled using a position vector and a velocity vector. The particles, by measuring the optimal values as a measurement criterion, repeatedly move in the n-dimensional space of problem to search the possible options available. According to the previous memory, particles search for a new space to reach the optimal solution. Table 5 shows the results of the optimization for the exergy efficiency values calculated empirically and also by using three employed optimization algorithms. As it is evident from the results, before applying the heuristic optimization on the exergy efficiency of the power plant, the efficiency was 30.1 percent. However, after performing the optimization, as it is shown from the results, the exergy efficiency has been improved significantly. GA and PSO algorithms demonstrated relatively close results with estimated difference of 2 Â 10 À4 . FA produced the highest value of exergy efficiency with amount of 30.70369, compared to other utilized algorithms.

Conclusion
Steam power plants are widely used around the world for the electricity generation. Most of them have old technologies and there is the possibility of enhancing and optimization of their components. Improvements in the optimization process is not only related to the purchasing and installation of new and updated equipment. It is possible that by making some improvements in the generation process of power plants, their final efficiency can be increased. Exergy and energy efficiency analysis is an excellent method for analyzing a thermodynamic system or cycle. Exergy efficiency can be calculated and optimized. Using collective intelligence techniques is relatively a new method in the optimization of systems. Firefly algorithm is also one of these methods. In this study, it was concluded that by using this algorithm implemented by MATLAB, and by modifying the decision variables in the studied steam power plant, the exergy efficiency has increased from 30.1% to 30.7037%, which means an improvement of 0.6037% in exergy efficiency. This amount of increase would have significant effect on the power plant output. In other words, with lower fuel consumption, the power plant will have its previous output. This study also demonstrated the performance of three studied evolutionary algorithms in order to perform the optimization of exergy efficiency. It was concluded that the utilization of the firefly algorithm, which is newer compared to the other utilized algorithms, has demonstrated more convergence results. Furthermore, it also became clear that the optimal solutions obtained from the FA were achieved in a shorter span of time.

_ E x
Exergy flow rate (kW) Exergy destruction