Optimization of turbojet engine cycle with dual-purpose PSO algorithm

In this article, the J85-GE-21 turbojet engine for an altitude of 1000–8000 m, with the speed of 200 m/s and at 10, 20, and 40 °C, was provided, and then, based on the objective functions, the above system was optimized using particle swarm optimization method. For the purpose of optimization, the Mach number, compressor efficiency, turbine efficiency, nozzle efficiency, and compressor pressure ratio were assumed to be in the range of 0.6–1.4, 0.8–0.95, 0.8–0.95, 0.8–0.95, and 7–10, respectively. The highest exergy efficiency of 73.1% for different components of the engine at sea level and speed of 200 m/s belonged to the diffuser. Second and third to it were nozzle and combustion chamber with 68.6 and 51.5%, respectively. The lowest exergy efficiency of 4% belonged to the compressor, and the second to it was the afterburner with 11.6%. Also, the values of entropy production and efficiency of the second law of thermodynamics were 1176.99 and 479 K/W, respectively, prior to optimization, which were respectively changed to 1129 and 51.4 K/W postoptimization. Obviously, the entropy production is reduced, while the efficiency of the second law of thermodynamics is increased.


Introduction
The engine mounted on an airplane is used to produce thrust. The exhaust gases from the aircraft engine, which are intensely pushed back from the engine nozzle, cause the aircraft to move forward, which allows air to pass above the airplane's wing. Since an aircraft's wing is similar to an airfoil, the topside area of the wing is more than the underside area. As a result, the pressure on the topside of the wing is lower than that on the underside, and a lifting force would be generated, called "lift force," which causes the aircraft to ascend. Most of the modern aircrafts use the gas turbine engines for generation of thrust force, since they are light and compact and their power-to-weight ratio is high. The aircraft gas turbines work in an open cycle named "jet-propulsion cycle." The ideal jet-propulsion cycle is different from the ideal Brayton cycle from the aspect that in jet-propulsion cycle the gases are not expanded to the level of the turbine's ambient pressure; however, they are expanded to the extent that the power generated by the turbine is exactly of the same extent needed for ignition of compressor and other auxiliary tools such as the generator and hydraulic pump, i.e., the net output work from jetpropulsion is zero [1]. The term "gas turbine" is used as a general term for different types of turbine engines, and it refers to jet engines including turbojet, turbofan, turboshaft, and all the turbine engines working with jet mechanism. Among other propulsion systems that generate thrust with fluid velocity, but are not from turbine type, are ramjet, pulsejet, and rocket engines, each working with separate mechanisms and principles, having different constructs. The turbojet is the first and simplest type of a jet engine, used for generation of thrust. Turbojet consists of air inlet (diffuser), compressor, combustion chamber, turbine, and nozzle. In modern advanced turbojet engines, for increasing the thrust a unit called "afterburner" is used immediately after the turbine. There is an obvious difference between a turbojet engine and a simple gas turbine. The turbojet's compressor has a much higher density ratio than a simple gas turbine. The other prominent difference is that in the turbojet, the turbine is solely connected to the compressor and only a little proportion of the same turbine is used for other subsidiary tools such as generator and hydraulic pump. In the turbojet the high energy of the exhaust gases is a very important and vital matter, while in a turbine engine the gas turbine is placed on the outlet of the combustion chamber that is actually connected to the engine outlet shaft, used for such cases as power generation and the like. What is important of note about the gas turbine engines is that except for the dual production, their exhaust gases are not put to any other use. Therefore, attempt is made to extract all the usable heat and energy from the combusted gases for higher efficiency before they are moved out from the exhaust [1][2][3][4]. The aircraft moves forward with fluid velocity against the direction of its movement. This is done either by a small mass of fluid (air) with high acceleration (turbojet engine) or by a massive mass of fluid that has a slight acceleration (turbofan engine) [1][2][3][4][5]. The production of jet aircraft engines began in the 1960s. It has an old jet engine technology with low-energy efficiency (around 20%). Since its inception, many advances have been made in these engines. On the other hand, higher power, lower costs and environmental demands, effective engineering roles, the materials science, and the use of computer in the design and research activities have been provided in the current technology levels. Initially, these engines emerged as turbojet engines that were gradually improved, regarding the need for greater power, lower noise, and lower fuel consumption, and advances toward turbofan engines were made [3]. In 2007, there were about 16,800 jet aircraft, with this number expected to increase to 35,300 in 2024. Also, the traffic and passengers have risen by an average of 4.8% per year. Many researchers have dealt with interpretation and analysis of aircraft engine and powertrain exergy [4]. Etele and Rosen in 2001 dealt with the exergy analysis for investigation of the effects of different states of environment on the turbojet engines at the altitude of 15,000 m for determination of effects of reference point. They concluded that the real logical efficiency (which is obtained as the ratio of the effective work of the system to the total exergy consumption for the inputted air and fuel) for this engine decreases with increase in altitude, the range being 169.9% at sea level to 15.3% at an altitude of 15,000 m [5]. Bejan and Siems in 2001 [6] emphasized on the necessity for thermodynamic and exergy optimization methods in aircraft systems processes. The key problem is the extraction of maximum exergy from a hot gas flow that is gradually cooled and discharged into the environment. The optimized form includes a heat exchange level with a temperature that is modally decreased parallel to the flow. For this state, the counter-flow heat exchanger is used. This study aimed to analyze and interpret C-17A transport aircraft (Boeing C-17 Globemaster) at an altitude of 9150 m, with Mach number of 0.74, and ambient temperature of À65°C. The exergy rates based on the engine fan outed air, thermal model, and the water separator were 7.4, 16.7, and 76.4 kW, respectively [6]. Pasini et al. in 2002 dealt with the exergy analysis of turbojet engine in outside design conditions. In this regard, the applied software (experimental analysis and interpretation) was quantitatively used for aircraft propulsion. Here, with applied analysis, the exergy behavior of a simple turbojet outside design conditions has been noted. First, some of the parameters used for defining exergy efficiency per component and turbojet as a whole were discussed. Some of the outside design conditions such as Mach number, flight conditions, altitude, maximum temperature cycle, etc. were investigated and the critical points in different conditions were focused. It allows the availability of an analysis of exergy efficiency. Therefore, through a much deeper evaluation of turbojet engine behavior, a complete optimization of its function can be obtained [7]. Paulus and Gaggioli in 2004 expressed their observation on extremizing (maximum or minimum) the fluid flow. This study was conducted for obtaining a general principle extremum, and three models of flow were investigated: 1. The nondensible flow, when the flow of a mass from a given channel of stratified and turbulent flow is selected with more time for the entropy. For each type of mass flow rate, two parallel channels are divided in a way so that entropy production is obtained. 2. For densible flow, two cases are as follows: one is adiabatic and Fanno (friction) and the other is without friction with heat exchange (Rayleigh distribution). In these two cases, when the flow is low, the entropy production rate is high. 3. In the third case, the compression is done in the combustion chamber, and by maximizing the entropy, the production rate is obtained [8].
Turgut et al. in 2007 dealt with exergy analysis of a turbofan engine with afterburner at sea level and at an altitude of 11,000 m. The highest exergy loss at sea level belonged to the afterburner with 48.1%, and after it were the combustion chamber and turbine with 17.2-29.7 and 2.5%. Also, the exergy efficiency for the above four components were 59.9, 65.6, 67.7, and 88.5%, respectively. In the 11,000 m altitude, the exergy efficiency was 66.1 and 54.2% [9]. Tona et al. in 2009 dealt with exergy and thermoseconomy (thermometry) analysis of a turbofan engine during an ordinary commercial flight. This study aimed at provision of an analysis based on exergy, as the analysis of overall performance of a sample turbofan engine and its components. This study provided the values of exergy efficiency during the flight cycle and exergy efficiency of the critical equipment and flight stages, as well as the exergy loss. The highest exergy efficiency was obtained in cruise phase (horizontal motion without acceleration at constant speed), which was 26.5%, reduced to 6% at the time of landing. Also, the highest efficiency was obtained when the air exergy was not negative anymore (22.7%), which reduced to 11% at the time of reduction [10]. In 2012, Turan investigated the effect of the reference altitude on turbofan engine, with the help of specific exergy method at 400-900 m altitude. In this analysis, the exergy efficiency of the engine ranged from 50.3% at 400 m altitude to 48.9% at 900 m altitude. The results of this study indicated that the increase in the reference altitude leads to the decrease in exergy efficiency and the increase in energy efficiency of the engine [11]. Ehyaei et al. [12] in 2013 dealt with exergy analysis of the turbojet engine J85-GE-21 with afterburner. This engine works based on the Ideal Brayton Cycle (gas turbine) and consists of six main components: diffuser, compressor, combustion chamber, turbine, afterburner, and nozzle.
Using the little information obtained from the cabin indicators and writing the computer code, the exergy analysis was conducted for all the components of the selected turbojet engine at sea level and at an altitude of 11,000 m. The highest exergy efficiency at sea level belonged to the compressor with 96.72% efficiency. Second and third to it were nozzle and turbine with 93.70 and 92.31%. With the increase in engine inlet air speed at both mentioned altitudes, the efficiency of all the components of engine, as well as the overall efficiency, decreased. The lowest exergy efficiency at sea level belonged to the afterburner with 45.81%. The combustion chamber was placed second to it with 80.42%. The overall efficiency of the engine, with the assumption of air pressure being constant, is decreased by 0.45% per degree of temperature increase in engine inlet air. Balli and Hepbasli [13] in 2013 dealt with economic, sustainability, and environmental damage costs exergy analyses for T56 turboprop engine. The main objective of this study was to evaluate the performance of T56 turboprop engine by the use of economic, sustainability, and environmental damage costs exergy analyses methods at different power loads. The exergy cost of shaft power unit is reduced from 76.34US$/ GJ in the 75% mode to 58.32US$/GJ in takeoff mode, due to the increase in shaft power. The exergy costs of kinetic exergy unit is increased from 599.43US$/GJ in 75% mode to 666.76 US$/GJ in takeoff mode, due to the exergy costs of exhaust gases unit with the increase in fuel flow. The sustainability analysis shows that the gas turbine has highest sustainability index. The increase in fuel flows leads to the rise in environmental pollutants and environmental damage costs. The environmental damage costs for this engine, in 75% mode, 100% mode, military mode, and takeoff mode are 423.94, 576.97, 634.93, and 665.85 US$/GJ, respectively. The total cost is obtained from summation of fuel cost, the cost of fixed investment, maintenance costs, and the cost of environmental damage. The overall costs of engine in 75% mode, 100% mode, military mode, and takeoff mode are 1702.59, 2100.26, 2220.42, and 2284.50 US$/GJ, respectively. Hassan in 2013 dealt with evaluation of local exergy loss on the inlet and fan of turbofan engine. The modern aircraft and the aviation industry are the main consumers of fuel. The use of exergy analysis is a powerful instrument for designing and judging the performance of these systems. In this study, the local entropy production and exergy loss on a turbofan engine's inlet and fan were investigated. This fan, which has a worryingly sharp twist, was mounted on the turbofan engine eCF6-50, and the flow field was solved in the flight conditions. In addition, the local entropy production, including the thermal and viscose types, was calculated from the predetermined flow field. The results of the ranges of entropy production in the borders, as well as the blade-toblade paths, were indicated. Also, significant entropy was produced in the tail area near the trailing edge, in ultrasonic bubbles sticking to the edge of the attack, and in the passage of the shock wave through one blade to the other. The exergy loss, calculated by the fan and the input, shows a good fitness with the calculated analytical results. It has been revealed that in the cruise conditions, the fan is responsible for 1.95 mW of loss in the useful work potential, while this value is 4.6 kW for the input, which is ignorable compared to the fan [14]. Aydin et al. in 2013 investigated the exergetic sustainability indices in turboprop aircraft for the first phases of a flight. In this study, the sustainability indices for eight flight phases were provided and finally it was decided that the study on exergy indices would determine to what extent the improvement of aircraft's engines is possible for achieving a stable flight [15]. Aydin et al. in 2013 dealt with evaluation of a turboprop engine's energy and exergy evaluation under different loads. A mechanism that is able to improve the performance parameters such as thermodynamic and power efficiency, specific fuel consumption, and aircraft's engine specific power for reduction of environmental effects is necessary. In this study, the turboprop engine analysis at full and partial loads modes was conducted. The highest overall exergy efficiency of the turboprop engine was obtained as 30.7 and 29.2%, respectively. The lowest specific fuel consumption and highest shaft power were 0.2704 kW and 1948 hp, respectively. Comprehensive evaluations of turboprop engines are mostly done for improving the design of special types of regional transport aircraft [16]. Aydin et al. in 2014 dealt with investigation stability of turbofan engine PW6000 with an exergy approach. In this study, the theory, method, and applied examples of turbofan engine (big fan), which is developed and indicated, are considered as an approach for exergy stability. For obtaining the exergy stability index, first the exergy analysis was precisely conducted for the engine. Then, the exergy stability index, which is the exergy efficiency ratio to the exergy loss, the exergy destruction factor, and the environmental effects factor were studied. The mentioned parameters for the highest flight takeoff conditions are 29.7, 70.3, 59.4, 2.367, and 0.423, respectively. Finally, it is expected that these parameters affect the perception of the connection between the design parameters for engine propulsion and the global aspects in terms of environment and sustainable development, and therefore, this would lead to designing a more stable and environment-friendly engine [17]. Tai in 2014 dealt with energy and exergy optimization of a turbofan engine, using genetic algorithm. In this study, using an ultrainnovative genetic algorithm for designing and optimizing two pulleys separating the flow of the turbofan engine were studied based on the energy and exergy laws, and the optimized value, in eight parameters of turbofan engine by a computer program running based on the engine's thermodynamic computations and optimized design, with the following criteria: (1) energy efficiency, (2) exergy efficiency, and (3) a mixture of both. The objective function was formulated by the use of the first and second laws of thermodynamics. The design delimitations were the primary or hard limitation and the secondary or soft limitation. The fuel discharge rate of the constituent components for the above three criteria was estimated as 4.73, 505, and 4.87 for the fan, 1.14, 1.34, and 1.43 for the low-pressure compressor, 1.37, 1.51, and 1.39 for the high-pressure compressor, 26.85, 27.50, and 27.44 for the afterburner, 0.83, 0.97, and 0.87 for the highpressure turbine, 2.25, 2.60, and 2.53 for the low-pressure turbine, 0.31, 0.34, and 0.34 for the cold nozzle, and 38.10, 39.53, and 39.90 for the hot nozzle [18]. Turan et al. in 2014 evaluated some of the exergy criteria for the turbofan engine JT8D at the time of takeoff. The exergy criteria in this study were fuel reduction ratio, nonproductivity ratio, fuel exergy factor, production exergy factor, and improved potential rate. The engine consists of low-pressure compressor, high-pressure compressor, single high-pressure turbine, and finally, three low-pressure turbines. The results of this study are used for evaluation of factors needed for the maximum adjustment power of exergy values in engine's components, which are used generally for middle range commercial aircraft. These results included the fuel reduction rate for different components of engine, which is 1.7% for the fan, 2% for the high-pressure compressor, 12.6% for the combustion chamber, 0.2% for the high-pressure turbine, and 0.4% for the low-pressure turbine. Also, the productivity reduction rate for different components was 2.01% for the fan, 2.45% for the highpressure compressor, 15.23% for the combustion chamber, 0.29% for the high-pressure turbine, and 0.53% for the lowpressure turbine. The fuel exergy factor for different components was 11.6% for the fan, 13.2% for the highpressure compressor, 49.5% for the combustion chamber, 13.5% for the high-pressure turbine, and 12.2% for the lowpressure turbine. The productivity exergy rate for different components was 12.01% for the fan, 13.41% for the highpressure compressor, 44.40% for the combustion chamber, 16.02% for the high-pressure turbine, and 14.16% for the low-pressure turbine. The productivity potential rate for different components was 0.36% for the fan, 0.47% for the high-pressure compressor, 4.82% for the combustion chamber, 0.01% for the high-pressure turbine, and 0.02% for the low-pressure turbine [19]. Aydin et al. in 2014 investigated the exergy performance of a turbofan engine (low bypass ratio) in takeoff conditions. In this study, the exergy method for a turbofan engine with low bypass ratio in maximum power was used. This engine was a turbofan with low bypass ratio, of which all versions were mounted on the model 737-100/200. All of them consisted of six lowpressure compressors and seven high-pressure compressors, a single turbine, and finally, three low-pressure turbines. At the end of analysis, the most irreversible components were combustion chamber and fan with exergy drop rate of 18.7 and 2.486 MW, respectively. The exergy efficiency for the fan, high-pressure compressor, and combustion chamber was 856, 84.5, and 74.6%, respectively. Also, for the highpressure and low-pressure turbines, the exergy efficiencies were calculated as 98 and 96.3%, respectively [20]. Aydin et al. in 2015 investigated the exergetic sustainability indicators as a tool in commercial aircraft for turbofan engines. This study was conducted to indicate the exergy sustainability for middle range commercial aircraft engines in normal situation on the ground (testing conditions) and stable environment. A detailed exergy analysis of turbofan engine in engine test cell by the use of sustainability measurement and second law of thermodynamics was performed. This study was based on the mentioned six sustainable development indices and exergy analysis. The indicators created in the engine in terms of sustainable development indicators and exergy analysis are as follows: (1) exergy efficiency, (2) waste exergy efficiency, (3) exergy destruction factor, (4) recoverable exergy rate, (5) environmental effects factor, and (6) exergy sustainability index. The evaluated sustainability indicators have been calculated using exergy analysis outputs for aircraft ground running condition. The results of this study show that exergy efficiency for different components of engine is 86.4% for the fan, 87% for the low-pressure compressor, 89% for the high-pressure compressor, 85% for the combustion chamber, 98.6% for the high-pressure turbine, and 98.2% for the low-pressure turbine. Also, the exergy destruction is 10.4% for the fan, 5.2% for the low-pressure compressor, 17.7% for the high-pressure compressor, 58% for the combustion chamber, 4.7% for the high-pressure turbine, and 3.8% for the low-pressure turbine. The fuel reduction ratio is 1.18% for the fan, 0.59% for the lowpressure compressor, 2% for the high-pressure compressor, 6.5% for the combustion chamber, 0.53% for the highpressure turbine, and 0.43% for the low pressure turbine. Also, the nonproductivity ratio is 1.3% for the fan, 0.66% for the low-pressure compressor, 2.2% for the high-pressure compressor, 7.39% for the combustion chamber, 0.6% for the high-pressure turbine, and 0.49% for the low-pressure turbine. The mentioned factors quantitatively show that by application of the above conditions, the environment would be safer and more stable [21].
Kaya et al. in 2015 evaluated the improvement potential of exergy sustainability of an unmanned aerial vehicle's engine (remote-piloted) using hydrogen as fuel, by heating the fuel through exhaust gases. The exergy parameters such as exergy efficiency, waste exergy ratio, environmental effects factor, and exergetic sustainability indices were investigated. The evaluation included all the flight phases of the UAV in standard space with relative humidity of 60% from the ground to an altitude of 16 km. The environmental effects factor and exergy sustainability index at the moment are values close to the best cumulative values, as 0.98 and 1.035, which are applied to all [22]. Turan in 2015 investigated the exergy method for determination of sustainability values for turbofan engines with bypass (big fan). In this study, in terms of fuel consumption, the performance and aerodynamic design are more of a concern. For dealing with this demand, the presence of a newly proposed method, which uses the exergy criterion for mapping all the exergy flows on the turbofan engine maximum power level, is needed for identification of the sustainability. The studied engine with thrust force of 206 kN was used in the first gigantic aircraft. The results of the exergy sustainability analysis showed that engine exergy efficiency and the exergy destruction factor were 29.6 and 0.5037%, respectively. Also, the environmental effects factor of this turbofan engine was 0.675%, while the exergy sustainability index was calculated as 1.48. In this study, the value of recovered exergy from the engine is zero, because the energy emitted from the engine exhaust cannot be moved back to the engine. To conclude, the exergy sustainability method is a useful and effective method for evaluation of sustainability of the aircraft and its engine, and a proper tool for designers, operators, decision-makers, and researchers in the field of transportation. Hence, this parameter makes the engine and aircraft environment friendly and safe and stable [23].
Şöhret et al. in 2015 dealt with advanced exergy analysis of a gas turbine engine by division of waste exergy to several parts. In this framework, the main exergy parameters of the engine components have been introduced, while the waste exergy rate has been divided into internal/external and avoidable/unavoidable. Also, the interdependence of the engine components and the real potential improvement depend on the working conditions, which is obtained through analysis. As a result of this study, the real values of the engine component's efficiencies are 89, 86, 60, and 98.6% for the low-pressure compressor, high-pressure compressor, combustion chamber, and gas turbine, respectively. The system has a low improvement potential since the unavoidable waste exergy rate is 93.5%. The weak relations between the components (low power) include 81.83% of the internal waste exergy. Finally, this waste exergy may include the combustion chamber components and the obtained results should be focused [24]. Söhret et al. in 2015 dealt with exergy analysis of a turbofan engine for an unmanned aerial vehicle which was on a surveillance mission. First, an engine was produced by parameters and conditions of engine design, using a real code. Then, the exergy analysis was performed based on the thermodynamics laws. At the end of the study, the combustion chamber turned out to be the most irreversible component of the engine. The lowest exergy efficiency belonged to the combustion chamber with 58.2% and the highest exergy efficiency belonged to highpressure component of turbine with 99.9%. Also, the highest exergy destruction inside the engine happened in delay phase [25].
Turan in 2016 performed the exergy and energy analysis for MD-80 aircraft only on takeoff mode, regarding the increase in demands for aerial transportation and the environmental concerns. In this regard, with consideration for the energy and exergy equations, the input exergy rate is 93.92 kW, output exergy is 28.06 kW, and exergy destruction rate is 50.82 kW. Also, the exergy efficiency is 29.88% and the energy efficiency is 11.48%. Moreover, on takeoff, the aircraft's thrust force is 144 kN with specific fuel consumption of 14.58 g/s [26].
Baklacioglu et al. in 2016 dealt with modeling the energy and exergy efficiency of a transportation aircraft through the improver topology of the Neural Evolution Algorithm by the provision of the topology of NE (Neural Evolution) algorithm modeling improver, for evaluation of energy and exergy efficiency of a transportation aircraft in the first phases of flight. In this regard, the energy and exergy information which were obtained from the aircraft through several methods of engine power measurement were used for implementation of ANN (artificial neural network) models and the models optimized by GA (genetic algorithm). The neural evolution algorithm is a feed forward neural network by backward algorithm for obtaining the optimal point in weighing network and improvement of topology of training network. The general structure of energy and exergy efficiency based on anticipation of ANN's model has five layers as input torque, power, gas production speed, engine air flow, and fuel mass flow. In this regard, the exergy efficiency for torque power, gas production speed, engine air flow, and fuel mass flow is 17%, 53%, 80%, 0, and 0, respectively. Also, the energy efficiency for torque power, gas production speed, engine air flow, and fuel mass flow is 0, 0, 6%, 83%, and 58%, respectively [27]. Balli in 2016 dealt with advanced exergy analysis of a military turbojet engine with afterburner for performance evaluation and division of the exergy waste to avoidable/unavoidable and endogenous/exogenous. In this study, a normal and advanced exergy analysis of a military aircraft turbojet engine is provided and in this framework, the important parameters of engine components exergy are defined. The exergy waste rates in the engine components are divided into indigenous/exogenous and avoidable/unavoidable. Also, the interdependence of engine components and the real improvement potentials are obtained through this analysis, based on the working conditions. As a result of this study, the engine exergy in the military mode (MIL) (the maximum engine through without fuel combustion in the afterburner) was 39.41% and it was 17.90% in afterburner mode (AB) (the maximum engine through with fuel combustion in the afterburner). This system has a low improvement potential since the unavoidable exergy waste is 93% in MIL mode and 98% in AB mode. The relation between the components seems to be weak since the indigenous exergy waste is 83% in MIL mode and 94% in AB mode. Finally, it can be concluded based on the results that the high-pressure compressor, combustion chamber, and afterburner output pipe should be focused [28]. Cem in 2016 dealt with thermodynamic analysis of the load compartment for a small-scale gas turbine jet engine, using the exergy analysis method. For understanding the functions of this jet engine, tests in four different loads (neutral, part 1 load, part 2 load, and full load) were performed. The highest exergy efficiency for part 1 load was 69% for compressor, 72% for the combustion chamber, and 79% for the gas turbine. Also, the highest exergy efficiency for part 2 load was 72% for compressor, 80.6% for combustion chamber, and 72% for gas turbine. For full load, it was 75% for compressor, 81% for combustion chamber, and 77% for gas turbine [29]. It should be noted that numerous studies have been conducted on energy, exergy, economic, and environmental analysis of power generating systems (several types of power plants) and their optimization by different algorithms [30][31][32][33][34][35][36][37][38][39][40][41][42][43][44]. In the current study, first the energy and exergy equations are written and an energy modeling is performed in MATLAB, and then, based on the obtained model, the system's parameters such as pressure ratio and air-to-fuel ratio based on particle swarm optimization (PSO) algorithm are optimized. The study's innovation is as follows: -Optimization of jet engine by PSO algorithm; -Calculation the optimum variable of jet engine; -Sensitive analysis of optimum result; -Comparison optimum results at different working conditions.

Mathematical modeling
The J85-GE-21 engine was designed and made for F-5 air fighter (models E and F) by General Electric Corporation and is currently used on the mentioned models. Based on Figure 1, this engine consists of a diffuser, compressor, combustion chamber, turbine, afterburner, and nozzle.
The diffuser in this model includes a part of fuselage that is so-called "intake," and its isentropic efficiency is assumed to be 90%. The mentioned turbojet engine, which is briefly called "engine," from now on, works on Brayton cycle and includes the following four processes under ideal conditions: 1. Isentropic density in compressor.
2. Heat exchange in constant pressure in combustion chamber and afterburner. 3. Isentropic expansion in turbine. 4. Heat exchange in a constant pressure in nozzle.
The following hypotheses are used in mathematical modeling: 1. The selected engine works in stable mode. 2. The output air and gases are assumed to be ideal. 3. The altitudes are assumed to be at sea level. 4. The fuel used is kerosene with chemical formula C 12 H 23 . 5. The changes in potential energy are assumed to be tiny. 6. The oxygen is assumed to be completely burned in the afterburner flow. 7. The hydraulic pump and generator are ignorable due to the low work consumption compared to the compressor. 8. The chemical exergy analysis is performed based on low heat value of liquid fuel JET A-1.
The compressor in this engine is of 9-phase shaft type with compression ratio of 0:1.9 in each phase. The average compression ratio of r c = 9 is considered for the purpose of this study. The combustion chamber is of circular type. A total of 12 fuel injectors spray the fuel JET A-1 at high pressure into the chamber. The turbine consists of two phases; it generates the power needed for the rotation of the compressor, the hydraulic pump, and the generator. A total of 20 fuel injectors are used in the afterburner for spraying the powdered fuel in order for all the oxygen in the combustive gases output from the turbine to be burned for more thrust and add to their energy. About 15% of the air output from the diffuser passes around the engine for its overall cooling, which is called the dead air. The rest of air enters the compressor. About 40% of the compressor output air passes the space surrounding the combustion chamber, which is used for keeping the fire flame in the center of the combustion chamber and afterburner. The output hot and high-energy gases are expanded to ambient pressure by a nozzle and their speed is increased during the expansion [45].
The above turbojet engine consists of the following components: 1. Diffuser 2. Compressor 3. Combustion chamber 4. Turbine 5. Afterburner 6. Nozzle The condition on the diffuser inlet which is the same P 1 , V 1 , T 1 is clear. For calculating the pressure and speed on the outlet of the diffuser, equations (1)-(6) are used. It should be noted that the diffuser outlet temperature is measured by a sensor on its outlet for determining the amount of fuel input into the combustion chamber and afterburner.
T 01 ¼ T 02 ð5Þ Here, T 01 is the stagnation temperature of the air inputted to the diffuser (K), T 02 is the stagnation temperature of the output air (K), T 02S is the output stagnation temperature in isentropic mode (K), P 02S is the stagnation pressure in isentropic mode (K), h D is the diffuser efficiency, k is the ratio of the heat capacity at constant pressure (C P ) to heat capacity at constant volume (C V ), T 2 is the diffuser outlet temperature (K), T 1 is the Fig. 1. Turbojet engine demonstration diagram. ambient temperature (K), P 1 is the ambient pressure (kPa), and P 02 is the stagnation pressure output from the diffuser (kPa). The compressor outlet temperature and pressure can be calculated by equations (7) and (8).
Here, T 4 is the compressor outlet temperature (K), T 3 is the compressor input air temperature (K), r c is the compressor density ratio, h c is the compressor efficiency, which is assumed to be 0.90, P 4 is the compressor outlet pressure, and P 3 is the compressor input pressure (kPa). The consumed work is calculated based on the mass flow of compressor through equation (9).
Here, R is the air constant (kJ/kg · K), r C is the compressor pressure ratio, h C is the isentropic efficiency of compressor, T 3 is the compressor input air temperature (K), and W C is the work of compressor mass flow unit (kJ/ kg). Kerosene (1) is a type of petroleum distillation product that is currently used in aeronautics. This fuel, especially in commercial aviation, can have different names for variable operating conditions by modifying some properties. The fuel used can be of JET A and JET A-1 types, of which the latter is chosen for the purpose of this study [45,46]. It should be noted that regarding the type of ball bearing, roll bearing, seal, and packing of the selected engine, we are permitted to use only either JET A-1 or JP4 [47].
Based on Figure 1, there are two parts in which the combustion happens. The overall combustion equations based on mass flows are as follows: Combustion chamber: The combustion process in the combustion system is also as follows: Here, h cc is the combustion efficiency, h is the enthalpy (kJ/kg), h 0 is the enthalpy in reference temperature (kJ/kg), and 8 h f is the enthalpy of generation (kJ/kg). The combustion temperature and products can be calculated by equations (10)- (12).
The pressure inside the combustion chamber can be also calculated using the following equation: Here, n 5 is the number of moles before entering the combustion chamber, n 6 is the number of moles inside the combustion chamber, T 5 is the temperature before entering the combustion chamber (K), T 6 is the temperature of combustion chamber (K), P 5 is the input gas pressure (kPa), and P 6 is the temperature of combustion chamber (kPa). The temperature and pressure output from the afterburner are also the same as the combustion chamber. The temperature and pressure output from the turbine can be calculated by the following equations: Here, T 7 is the turbine outlet temperature (K), h t is the turbine efficiency, r t is the turbine pressure ratio, and P 7 is the turbine outlet pressure (kPa).
The turbine output work per mass unit is written: Here, T 6 is the turbine input air temperature (K), P 6 is the turbine input pressure (kPa), P 7 is the turbine outlet pressure (kPa), h t is the isentropic efficiency of turbine, and W t is the engine turbine mass flow work (kJ/kg). The temperature of the nozzle outlet can be calculated by equation (17).
Here, T 8 is the nozzle input temperature (K), T 9 is the nozzle output temperature (K), and C is the speed of sound on the nozzle outlet (m/s). The nozzle output pressure is the ambient pressure. In the absence of effects of nuclear, magnetic, electrical, and surface stresses in thermal systems, total exergy, for a material flow in a system, can be expressed as follows [4]: Here, e t is the total exergy (kJ/kg), e kn is the kinetic exergy (kJ/kg), e pt is the potential exergy (kJ/kg), e ch is the chemical exergy, and e ph is the physical exergy (kJ/kg). Since there is no difference in the altitudes of turbojet engine components input and output, the potential exergy is ignored in the current study.
The kinetic exergy is calculated by the following equation [4]: Here, _ E KN is the kinetic exergy (kW), _ m is the mass flow (kg/s), and V is the speed (m/s). The physical exergy of air or combustive gases with constant heat capacity can be calculated as follows [48,49]: Here, e Ph is the physical exergy (kJ/kg), C is the constant pressure heat capacity (kJ/kg · K), T is the certain temperature (K), T 0 is the reference temperature (298.15K), R is the gas constant (kJ/kg · K), P is the certain pressure (kPa), and P 0 is the reference pressure (101.3 kPa). The chemical exergy of liquid fuels can be calculated as follows [48]: Here, g f is the fuel exergy grade function. S, O, C, and H are the hydrogen, carbon, oxygen, and sulfur mass components in liquid fuel. g f for JET A-1 liquid fuel with C 12 H 23 formula is 1.067893 [3]. The chemical exergy of fuels that is created by a mixture of two or more gases can be calculated by equation (23) [9]: Here, e Ch is the chemical exergy (kJ/kg), and e Ch,i is the chemical exergy of each component of fuel (kJ/kg). The exergy of each component can be calculated as follows: Here, _ E t is the total exergy rate (kW), _ E kn is the kinetic exergy (kW), _ E ch is the chemical exergy (kW), _ E ph is the physical exergy (kW), and _ E pt is the potential exergy (kW).
The exergy efficiency is defined as the ratio of total input exergy to the total output exergy. or Here, _ E T ;0 is the total output exergy (kW), _ E T ;i is the input exergy (kW), and _ E D is the wasted exergy (kW). The exergy waste can be calculated by equation (31): In the entropy production _ E 2 is the diffuser output exergy rate (kW) and _ E 1 is the diffuser input exergy rate (kW).
The exergy efficiency rate in the compressor can be calculated as follows [50]: Here, _ W net is the network produced (kW). The exergy efficiency in the diffuser is calculated as follows: Here, _ E 4 is the compressor output exergy (kW), _ E 3 is the compressor input exergy (kW), and _ W c is the power consumption by the compressor (kW). There is no work done on the flow in the combustion chamber.
Here, _ E 6 is the exergy of the gas output from combustion chamber (kW), _ E 5 is the exergy of air inputted to the combustion chamber (kW), and _ E 10 is the exergy of fuel input to the combustion chamber (kW).
Turbine exergy is calculated as follows: Here, _ E 6 is the gas turbine input exergy (kW), _ E 7 is the gas turbine output exergy (kW), and _ W t is the work produced by the turbine. The work production in afterburner is zero. Thus, the exergy efficiency here is calculated as follows: Here, _ E 8 is the afterburner output exergy (kW), _ E 11 is the exergy of fuel input to the afterburner (kW), and _ E 7 is the exergy of gas input to the afterburner (kW). Finally, the nozzle exergy, which is placed at the end of engine for reduction of pressure and increase in the speed, is calculated as follows: The overall exergy of the turbojet engine is calculated as follows: The work production in diffuser is zero, so its entropy production is calculated as follows: The entropy production in the compressor is calculated as follows: No work is done on the flow in the combustion chamber, so the entropy production is calculated as follows: The entropy production in the turbine is calculated as follows: The entropy production in the afterburner is calculated as follows: There is no work done on the flow in the nozzle, so the entropy production is calculated as follows:

PSO algorithm
The PSO method is a global minimization method that can be used to solve problems with a solution of a point or surface in an n-dimensional space. In such a space, hypotheses are raised and an initial speed is allocated to them. Also, the connecting channels between the particles are considered. Then, these particles move in the solution space and the obtained results are calculated based on a "merit criterion" after each time interval. Over time, particles tend to accelerate toward particles with a higher degree of merit in the same communication group. Although each method works properly for a scope of problems, this method has proved to be highly successful in solving the continuous optimization problems. This algorithm was first introduced in 1995 by Eberhart and Kennedy, as an uncertain search method for functional optimization; this algorithm is inspired by the collective movement of birds seeking food. A group of birds in the space are randomly looking for food. There is only one piece of food in the mentioned space. None of the birds know the location of food. One of the best strategies can be following the bird that is closest to the food. This strategy is actually the algorithm's placement. Each solution is called a particle. The PSO in the algorithm is the same as a bird in the collective movement algorithm of birds. Each particle has a merit value, which is calculated by the merit function. The closer the particle in the space search is to the target food in birds movement pattern, the more merited it would be. Each particle, through following the particles in the current state, continues its movement in the problem space, in a way that the PSO particles are initially created randomly, and through updating the generations, they seek to find the solution to the problem. In each step, every particle is updated by the use of the two best values. The first case is the best position the particle has managed to reach. This position is identified and kept.

Results and discussion
The information on temperature, pressure, mass flow rate, physical, chemical, and kinetic exergy, as well as the overall exergy rate for different components of the engine at sea level and with the speed of 200 m/s were calculated according to the numbers in Table 1. Using the values given in Table 1, the exergy efficiency, exergy waste, and entropy production by different components of the engine at sea level were calculated and are provided in Table 2.
For the purpose of optimization, the variables as Mach number, compressor efficiency, turbine, nozzle, and compressor pressure ratio have been considered. The ranges of these variables are as follows: The target function is as follows: Figure 2 shows the Pareto chart for turbojet engine at an altitude of 3500 m. Figure 2 shows the distribution of turbojet engine cycle answers after the optimization, as well as the high and low intervals for the values based on the PSO algorithm. It is clear that with the decrease in the second law of thermodynamics from 51 to 34%, the entropy is increased from 11 to 36 kW/K. Table 3 shows the optimal values for the variables in Figure 2. Table 4 shows the entropy production and efficiency of second law, prior and postoptimization. As indicated in the above table, after optimization, the entropy production is decreased, while the efficiency of second law of thermodynamics is increased. The entropy production is decreased by 4.25 and efficiency of second law of thermodynamics is increased by 7.3%. In Table 4, the values are provided for an altitude of 3500 m. Table 5 shows the optimal values of cycle variables at different altitudes. Based on the table, it is revealed that with the increase in altitude, the entropy production of the cycle decreases and the efficiency of the second law of thermodynamics increases. With increase in altitude from 1000 to 3000 m, the entropy production is reduced from 1189.9 to 1101 W/K. Also, the efficiency of second law of thermodynamics is increased from 47.7 to 53.2%. Figure 3 shows the sensitivity analysis of second law of thermodynamics for a cycle per compressor pressure ratio in optimal values of Table 3 with 10, 20, and 30°C temperature. It is clear that with increase in compression ratio, the efficiency of the second law of thermodynamics decreases. Figure 4 shows the sensitivity analysis of second law of thermodynamics for a cycle per Mach number at an altitude of 3000 m at 0, 20, and 30°C. As can be observed from the figure, with increase in Mach number from 0.6 to 0.95, the efficiency of second law of thermodynamics decreases. With increase in temperature of input air, efficiency of second law of thermodynamics increases. Figure 5 shows the sensitivity analysis of second law of thermodynamics at different altitudes and for Mach numbers 0.5, 0.7, and 0.9 at 20°C. With increase in Mach number, the efficiency of second law of thermodynamics decreases. Also, generally, with increase in altitude, efficiency of second law of thermodynamics increases. Figure 6 shows the sensitivity analysis of second law of thermodynamics for the cycle at different altitudes for different pressure ratios of the compressor. It should be noted that these values are provided for Figure 6 and temperature of 20°C. It is clear from the figure that the changes in efficiency of compressor do not significantly affect the efficiency of second law of thermodynamics.

Discussion and conclusion
In this study, the exergy and energy equations of the system were first written, and based on these equations, a model of energy was performed in MATLAB. Then, based on the obtained model, the system's parameters such as pressure ratio and air-to-fuel ratio were optimized based on the PSO and genetic algorithms. Among the limitations of the system, the selected altitude of 7500 m and speed of 200 m/day and temperatures of 10, 20, and 30°C can be named. Based on the changes in optimal values, including the maximizing efficiency of first law of thermodynamics, and minimizing the entropy production, and with the assumption of stability of the system and that the system is one-dimensional, the system variables for optimization are Mach number, compressor efficiency, turbine efficiency, nozzle efficiency, and compressor pressure ratio. The highest exergy efficiency belonged to the diffuser with 73.1%, and after it, nozzle and combustion chamber with 68.6 and 51.5%. The lowest exergy belonged to compressor with 4%, and second to it, was afterburner with 11.6%. The highest exergy loss belonged to the combustion chamber with 2596.3 kW. Second and third to it were the nozzle and afterburner with 967.54 and 404.68 kW, respectively. In terms of irreversibility of processes, the combustion chamber has ranked first. The nozzle is second, due to the quick change in cross section. Therefore, the combustion process in  engine is highly irreversible. The afterburner is ranked third. In the beginning of the optimization, based on the PSO algorithm (particles), the Pareto chart of the turbojet engine at the altitude of 3500 m was drawn regarding the efficiency of second law of thermodynamics and entropy production, which indicated the reverse relationship between these two variables, i.e., with the increase efficiency of second law of thermodynamics, the entropy production is reduced and vice versa, which indicates a logical relationship between the two parameters. After optimization based on PSO and genetic algorithm, the entropy production by the system is reduced from 1176.99 to 1129 W/K, and efficiency of second law of thermodynamics is increased from 47.9 to 51.4%, which is indicative of successful optimization.      Also, with the increase in the altitude from 1000 to 5000 m, the efficiency of second law of thermodynamics is increased from 47.9 to 51.4%.