Developing a Mathematical Modelling Code for Keeping the Power of Multi Turbocharged Engines at Flight Altitudes

: In this paper, a code is developed in C++ programming language aiming to select and introduce a well-chosen propulsion system for appropriate operation in an aircraft. By using a suitable turbocharged engine, the inlet pressure of the engine manifold will increase to a level equal to the pressure at sea level. Therefore, the aircraft engine will not notice the drop of pressure caused by the increase in altitude. Consequently, the engine power will not be reduced. On the other hand, at high altitude, using only one turbocharger is not adequate to supply engine inlet pressure and flow rate equivalent to sea level conditions, requiring the use of more turbochargers. The code developed in this study will be able to introduce the appropriate turbocharged engine based on the flight altitude and the required power engine of an air vehicle. The altitude defined in this code ranges from 5 to 30 kilometers, which leads to a selection of one to three turbochargers plus a number of intercoolers, according to user input parameters. The objective function of this optimization problem is defined as a function of turbochargers efficiency. However, this objective function can be modified according to the user requests and requirements.


INTRODUCTION
The quest of achieving high flight altitudes for an aerial vehicle has always been pursued by diverse researchers. The flight altitude depends on the mission established for the aircraft, such as military missions, atmospheric data collecting, air patrolling etc. Regardless of the aircraft type, it is important to choose an appropriate propulsion system to provide the required power for desired flight altitude. There are multiple options when it comes to choosing propulsion sets. However, the most available and popular variety is the air breathing engine, which falls into two types: turbine engines and turbocharged internal combustion engines.
Air breathing engines require a sufficient amount of air intake to perform desirably. Considering that ambient pressure and air density decrease as the altitude rises, the density and pressure reduction of engine air intake results in the decrease of the intake mass flow rate. Consequently, the engine power will also be reduced, preventing the aircraft from achieving higher flight altitudes. In other words, the maximum power of an air breathing engine is only available while operating at sea level and, by increasing the flight altitude, this power will be continuously reduced, such that, from a certain altitude on, there will not be sufficient amount of air for engine combustion process. Hence, the desirable engine performance will not be attainable at high altitudes. As a result, one is not able to exceed a certain altitude while employing only a single specific engine, once it is associated with air pressure and density of the target flight altitude, which are the most important and effective atmospheric parameters on the performance of an air vehicle (Vaughan 2014). Figure 1 illustrates the air density reduction trend with altitude. The power generated by a jet engine in low altitudes is about 2 to 5 times higher than reciprocating engines, since the engine can draw a sufficient amount of mass flow rate for the combustion process at low altitudes with high density of the air (Frisch 2014;Cirigliano 2017). In addition to the scarcity of oxygen at high flight altitudes, another issue to be dealt with is that aircraft lift force also drastically drops at these altitudes, due to a significant air density redaction at the altitudes. As a result, the lift is not sufficient for flying the aircraft at high flight altitudes. Although the reduced lift can be compensated by turbine engines, they demand an increase in speed. To put it another way, the flying Mach number of an aerial vehicle must exceed 0.8, providing a sufficient lift at the given altitude (Bents et al. 1996). By increasing the velocity, some issues, such as generation of shock waves in the flying vehicles, are raised, which is a major factor for the change in aerodynamic forces and turbulence generation (Mele et al. 2017). The issue is of more significance when the defined mission goal is, for example, atmospheric data collecting and activities related to geology. In such cases, the generated shock wave will cause data collecting precision to be reduced (Cirigliano et al. 2018). Furthermore, in terms of technology enhancement, reciprocating engines are more developed than turbine engines. In addition, the cost of a reciprocating engine, even with a turbocharger, is lower than that of a jet engine (Daidzic et al. 2014). In other words, reciprocating engines have higher efficiency and lower fuel consumption compared to jet engines (Stevenson 2014), which makes the use of reciprocating engines, for many applications, more popular than gas turbines.
The compensation mechanism of altitude-induced air shortage in internal combustion engines is different from jet engines. By adding a single or multiple turbocharger, the intake air pressure and density of the engine increase in order to offset the altitudeinduced power loss. Since most of the missions defined for vehicles able to fly at high altitudes require subsonic velocities, it is the case for using a propulsion set that includes turbocharged internal combustion engines, which is more widely applicable.
The aforementioned facts show that making use of a turbocharged internal combustion engine for flying at high altitudes offers more advantages, which is the reason why this kind of propulsion system is more widely applicable at varying altitudes. For instance, the ROTAX_V-Four engine has been combined with three turbochargers manufactured by Garrett company. In the experimental tests carried out, the propulsion system was able to supply a power of 73 hp at an altitude of 18 km. Moreover, this engine can supply a power of about 103 hp at a flying altitude of 16 km, employing two TMS8 turbochargers (Bents et al. 1998). As it can be noticed, although the internal combustion engines used in each case are the same, the turbochargers used make differences in the generated power for the desired altitude. Therefore, it is vital to select an optimal propulsion set to achieve the preset goal.
Currently, there are various software that introduce best turbochargers for required powers, most of which have been developed by turbocharger manufacturers. Nonetheless, they are all designed for ground application and cannot be used for aerial vehicles. For example, Shi et al. (2018) have introduced a new method of selecting a suitable turbocharger for matching with a rotorcraft diesel engine, but it is only usable for low altitudes, so that the use of one turbocharger can compensate for the power reduction of the engine. However, it is needed to make use of more turbochargers for most aerial applications during the missions, and the existing software and methods propose only one turbocharger. To meet this need, a C-programming code is developed with the minimum user input data able to offer an optimum propulsion system, including the number of turbochargers, and main parameters, such as required pressure ratio, required mass flow rate etc., in accordance with the user. Some of other code outputs include consideration of whether intercoolers are needed or not, as well as their number and placement for achieving the optimal performance.

TURBOCHARGED ENGINE
The purpose of using turbochargers for ground applications is slightly different compared to aerial applications. Regarding ground applications, making use of a turbocharger results in the rising of intake air density and pressure of a ground vehicle, the increasing of inlet flow rate, and, consequently, the enhancing of the engine power. In other words, using a turbocharger causes intake manifold pressure, named boost pressure, to rise. On the other hand, in aerial applications, the turbocharger is used to compensate the air pressure associated with increased altitude. It means that the pressure of ambient air passing through the propulsion set rises across the turbocharger compressor, so that the intake pressure at engine intake manifold equals to that of the sea level. Accordingly, the internal combustion engine does not undergo any change as the altitude rises, when its power is the same as the power generated at sea level.
Moreover, another device, named intercooler, must be incorporated into the system to combine the turbocharger with the internal combustion engine. As its name suggests, the intercooler function is reducing the temperature of the air that exits the compressor and sequentially enters the engine, such that its pressure does not significantly fall. The advantage of using intercoolers outweighs the slight decrease in pressure induced by them at the exhaust air of the compressor, which is the reason why intercoolers are used along with turbocharged internal combustion engines (Watson and Janota 1982). Furthermore, using intercoolers enables an increase of the compressor pressure ratio for higher fuel efficiency by reducing the compressor airflow temperature. Using an intercooler, the temperature reduction propagates downstream, resulting in a lower temperature at the internal combustion engine inlet manifold, effectively reducing NO x (Jimenez and Mavris 2017). Figure 2 depicts how an internal combustion engine runs with a turbocharger and an intercooler. However, an important thing that should be considered is the airflow path. A typical air flow path is shown in Huao (2010). 1) Compressor inlet 2) Compressor discharge 3) Charge air cooler (CAC) 4) Intake valve 5) Exhaust valve 6) Turbine inlet 7) Turbine discharge

PERFORMANCE CHARACTERISTICS OF TURBOCHARGERS
Compressor and turbocharger performances are defined by a performance map, which includes the main parameters of turbomachines: mass flow rate, pressure ratio, efficiency, and rotating speed of turbomachinery. In fact, such a map of a turbomachine demonstrates how it behaves and reacts in different working conditions.
It must be noted that the performance map of a compressor is more significant than that of a turbine, covering larger areas. In other words, compressor performance varies in different working conditions, while turbine performance is shown almost as a line in different conditions. Hence, a mean curve is used to demonstrate turbine performance. The compressor performance map, in another hand, also includes the hazardous, unsteady surge region, where the performance is accompanied by considerable flow rate fluctuations, causing serious damage to the compressor. Therefore, continuous operation in this area must be avoided. Figure 3 shows some exemplary performance maps of a turbocharger compressor: As it can be seen in Fig. 3, a compressor performance map covers a broad area, showing all main parameters of the compressor. The hazardous performance area of the compressor, or surge region, is depicted at the left side of the map. The values of these efficiency curves, which are called efficiency islands, are much larger when they are small. It must be noted that the flow rate and rotating speed parameters of the compressor are typically represented as corrected ones in the performance maps. This definition aims to eliminate how these parameters depend on the input conditions; that is, compressor inlet pressure and temperature (Mattingly 1996). Corrected mass flow rate and corrected compressor rotational speed equations are represented as follow: where N is rotational speed of turbo; T, P, and m . are temperature, pressure and mass flow rate, respectively; and subscripts c and ref refer to corrected condition and reference condition, respectively. Although reference conditions and atmospheric standard conditions are conceptually different, they are usually considered as the same in turbomachinery problems. A thorough review of the standard and reference atmospheres has been summarized in Vaughan (2010). However, reference values for each turbo are determined by its manufacturer.

THE MATHEMATICAL MODELLING CODE METHODOLOGY
To select a well-chosen turbocharger, information about the internal combustion engine is needed, some of which are part of the specifications of the engine and are usually available, while others can be estimated with a good precision. Also, some important parameters should be considered for more detailed investigations (Huao 2010).
The chosen methodology uses the target power (and, therefore, the mass flow rate of the intake air entering the compressor and the engine), as well as the manifold pressure of the engine inlet (proportional to the compressor pressure ratio), in a way that the operating point for the turbocharger is placed at an appropriate position in the compressor map of the turbocharger, allowing the requirements to be fulfilled.
As mentioned previously, the compressor performance map is much more important than that of a turbine. For this reason, provided the operating point is located in an appropriate position of the compressor performance map, it will not make any significant difference whether or not said point is correctly located in the turbine performance map. Therefore, the requirements of the method here presented include the basic engine information, and access to the performance map of the compressor. In the following discussions, the details of the method used in the code for selecting the right turbochargers will be explained.

REQUIRED PARAMETERS TO USE MAPS
As aforementioned, the compressor performance map includes various associated parameters, making the knowledge of some of them essential to interpret and draw a performance map of a turbocharger compressor. The most significant parameters of the compressor performance map are the pressure ratio and mass flow rate of the compressor inlet. The purpose of this section is thus to calculate and obtain these two important parameters.
The information needed to select a turbocharger for a certain engine is: • The target power (objective power); • Specific fuel consumption; • Air to fuel ratio; • Environmental conditions (such as atmospheric pressure and temperature).
Assuming that the whole mass flow rate passing through the compressor enters the internal combustion engine, the required mass flow rate for the engine can then be calculated by Eq. 3: is the target engine power; BSFC is the brake specific fuel consumption; and A/F is the air-fuel ratio. After the calculation showed, the corrected mass flow rate must also be calculated, using the environmental conditions and the Eq. 3. If there is not enough data available from the engine for calculating its mass flow rate, it can be estimated with a rough approximation, in which, as a general rule, turbocharged gasoline engines will generate 10 hp for each lb/min of airflow. For example, an engine with a target peak horsepower of 400 hp will require approximately 40 lb/min of airflow to achieve that target.
As already stressed, the reason why turbochargers are used in aerial applications is to equal the engine manifold intake air pressure to the ambient air pressure at sea level, such that the internal combustion engine does not sense any changes as the altitude rises. Thus, using the ambient pressure at the desired altitude, the total pressure ratio, which must be provided by the compressor(s), is calculated from Eq. 4: where s.l and alt represent sea level pressure (equal to 1 atm) and ambient pressure at the desired altitude, respectively; and P.R means pressure ratio. However, it must be noted that intercooler impact is not incorporated in the pressure ratio calculated by Eq. 4, making necessary, when an intercooler is employed, to also consider the pressure reduction induced by it. Hence, letting for the contribution of intercooler pressure loss, the Eq. 4 turns to Eq. 5: If the exact value of intercooler pressure loss is available, the compressor pressure ratio will be calculated more accurately, but, if the pressure loss of the intercooler is not specified, it can be approximated to a value of 1.0 psi (Mohd 2012;Djemel et al. 2017). Although pressure loss value can vary depending on shape and size of the intercooler, this value represents about the average amount used in this code.
It must be noted that the pressure ratio obtained from Eq. 5 is equivalent to that which must be generated by a set of turbochargers so that the pressure at the engine intake equals the sea level conditions. Therefore, if the calculated pressure ratio is supplied by only one compressor, the use of a single turbocharger will be sufficient. Usually, the maximum pressure ratio generated by turbochargers is about 3 to 4, so, as the altitude rises from a certain level, the ambient air pressure reduces accordingly and, consequently, the use of a single turbocharger is no longer sufficient, which creates the need of more turbochargers to obtain this pressure ratio. Moreover, the number of required intercoolers also depends on the number of turbochargers used, such that an intercooler must follow each compressor. Thus, its pressure loss should also be taken into account. All these factors are incorporated into the developed code to obtain the desired pressure by a set of appropriate turbochargers.
It is worth noting that, if more turbochargers are used, even though the intake airflows of all compressors are the same, their corrected mass flow rates are quite different, because intake pressure and temperature of each compressor are equal to exhaust pressure and temperature of the preceding one, leading to a change in the corrected mass flow rate for each of them. Therefore, given that pressure and temperature increase as air passes through each compressor, the corrected mass flow rate of both the first compressor, (which is related to the ambient pressure) and the final one (whose discharge pass through the intake manifold) decrease, taking into account Eq. 2. These factors are also incorporated into the code.
Thus, using the corrected mass flow rate and the pressure ratio for each compressor, one can evaluate the performance map of different turbochargers and select the best option for the operating point obtained to be located in the proper place of the performance map, being sufficiently away from the hazardous, inefficient compressor areas.

DETERMINING OF THE MAPS APPROPRIATE REGION
Assuming that sufficient information about the internal combustion engine is available and that the engine performance points have also been specified for all its operating points, its performance map can be devised. If a typical turbocharger compressor map and engine performance maps are appropriately put together in one diagram, it resembles a new diagram (Zinner and Winkler 1981). This sample diagram is shown in Fig. 4 In Fig. 4, the lines associated with the internal combustion engine (bevel, constant-load, and near-vertical) represent constantvelocity. As it is well known, with the increasing of internal combustion engine revolution, the surge margin also increases, which is a positive point for the current application -aiming to fly at high-altitudes with maximum engine power and revolution. What is important in choosing a turbocharger is that its performance at design point must be located in the right position of the compressor performance map. To achieve the maximum flight altitude, the internal combustion engine must operate at its maximum power and revolution, using an appropriate propulsion set. Thus, the target mission design point, shown in Fig. 4 with a solid circle, corresponds to these conditions. Therefore, in order to select the appropriate turbocharger for the aerial mission, the point shown should be in a right position in the compressor performance map. Other points and lines associated with the offdesign performance of the engine, if required, must have their characteristics calculated after selecting the appropriate turbocharger to ensure good performance of the compressor in all conditions.
In order to select the right region of the compressor performance map, it is necessary to introduce the peak efficiency line, which represents the maximum efficiency of the compressor, obtained in every RPM. In fact, the peak efficiency line is the one that makes a connection between large diagonals of the efficiency islands present in the performance map. This line is specified in performance maps of compressors manufactured by most companies.
Based on the definition in this code, the best turbocharger to be selected (at a certain design point) is the one whose equivalent operating point on the compressor performance map (corresponding to the engine design point) is closer to the peak efficiency line. However, since there is a broad range of choices concerning mass flow rate for diverse turbochargers, this distance should become dimensionless, providing a better comparison between turbochargers. To define this dimensionless distance, consider In Fig. 5, the compressor operating point corresponding to the engine design point is assumed to be located in the region shown by solid point. Based on the definitions displayed in Fig. 5, the dimensionless distance to the peak efficiency line for this working point will be calculated as A/B ratio. Therefore, every turbocharger that has a smaller dimensionless distance in compression with the peak efficiency line will be selected as optimum option. It should be noted that this is a choice made among compressors whose operating points are located within the range of their performance map. Obviously, compressors whose operating points fall outside of this range will be eliminated during the first filtration of the code.

MATHEMATICAL MODELLING PROBLEM
The present problem can be considered an optimization one, such that the best turbocharger is selected among available options in accordance with the mission defined for the aerial vehicle, the altitude, and the target power needed by the user. In general, an optimization problem has three main elements: In the following section, each of these bases will be separately studied and presented for the current problem.

DESIGN VARIABLES
Design variables are those that, by being changed, cause optimization in the objective function considered for the desired problem. In fact, the final purpose of an optimization problem is to achieve these parameters, so that the best result is obtained based on the given objective. This code uses turbochargers manufactured by two famous companies, which have a good reputation in turbocharger products in the world, named Garrett and BorgWarner. However, if the compressor map of any other turbocharger is available, it can easily be added to the code database library. In this problem, design variables are the various turbochargers whose performance maps are available. Therefore, the number of design variables is the number of turbochargers that are defined at the code.
The number of turbochargers whose specifications and compressor maps are defined in the code are 47 and 36 for Garrett and BorgWarner companies, respectively. As already mentioned, if the performance map of other compressors is available, they can be added to the intended set, increasing the number of design variables.
There is an extra option at this developed code, so that the user can choose to run the code for Garrett turbochargers or for the ones manufactured by BorgWarner. If the user's choice was to use the Garret turbochargers, the number of design variables would be 47. Otherwise, this number would be reduced to 36 choosing the optimum set of turbochargers from BorgWarner.
It is worth noting that, in the present work, conventional and usual optimization algorithms, like gradient and non-gradient optimization methods, are not used. Therefore, the code does not present an iteratively search (like steepest descent algorithm) or a random search (like Genetic algorithm). By using this code, all available turbochargers are checked to find the best option. In fact, because we deal with a certain number of design variables in the current problem, the way to select the best option is to calculate the objective function for each design variable (all turbochargers), and compare them to each other. Among turbochargers, the options that minimize this objective function are selected as the optimum case.

OBJECTIVE FUNCTION
The objective function, or cost function, is a parameter that, if optimized, brings to an end the optimization problem, allowing for the design variables corresponding to the optimal value of the objective function to be introduced as the output of the optimization problem. This function is defined in accordance with the needs of the problem. As an example, in the current problem, the objective function can be defined as surge margin, pressure ratio, mass flow rate, and so on, which should be optimized (minimized or maximized). According to the explanations and reasons given in the previous section, the objective function is considered as the dimensionless distance of peak efficiency line, which is evaluated by various design variables. Thus, according to Fig. 5 and the definitions associated with the distance, we have: where p.eff index of the m . cp.eff parameter represents the corrected mass flow rate on the peak efficiency line for the same pressure ratio corresponding to the operating point. Therefore, the turbocharger which has a minimum value for this parameter, compared to other turbochargers, will be selected as the optimum case.

PROBLEM CONSTRAINTS
As its name implies, there are constraints that limit the optimization problem. The current problem constraints are considered to be three. The first is the maximum achievable pressure ratio, which is limited to a certain value with respect to turbomachinery problems. For the compressor of turbochargers, the value is usually between 3 to 4. If more pressure ratio is needed, more turbochargers should be used.
The second constraint is the maximum corrected mass flow rate of compressors, which is of more significance with the use of more turbochargers, especially at higher altitudes. As altitude increases, a larger compressor is required to handle the mass flow rate due to the lower air density. Moreover, the diameter of the commercially available turbocharger inlets is as large as a certain amount, unless the purpose is to design a specific turbocharger, which is not the case here. Regarding the current problem, where the goal is to select the best from existing turbochargers, this is perceived as an important constraint.
Finally, the third constraint associated with the developed code relates to the consideration of whether or not intercoolers are needed, as well as the required number of them, given that the temperature rises about 80 to 120 o C as the airflow passes through each turbocharger compressor (Alaviyoun and Ziabasharhagh 2018; Mohtar et al. 2011). In this code, 60 °C is considered as the final limit of the compressor exhaust temperature. Therefore, considering ambient temperature at user input altitude, if the compressor exhaust temperature exceeds 60 °C , the use of an intercooler is essential and the amount of its pressure loss should be considered in equations and relationships. Otherwise, there is no need for intercoolers to be used. All of these constraints are considered in the source code.

THE CODE ALGORITHM
This code is developed in C++. As noted, the user inputs are target power and flying altitude. The user must then select the company whose turbocharger products he wants to use and run the code. Using the target power and other engine information, the air mass flow rate required to achieve the target is calculated by Eq. 3. The ambient temperature and pressure are posteriorly calculated, to correct the mass flow rate parameter and obtain the compressor pressure ratio, employing the user input altitude. It must be noted that, for this purpose, a subroutine is written to calculate temperature and pressure of the ambient according to the International Civil Aviation Organization (ICAO) standard, from 5 to 30 km.
Furthermore, the absolute pressure in the engine intake manifold must equal to its value at sea level. To achieve such a value, the required pressure ratio is calculated using the obtained ambient pressure. The corrected mass flow rate of the first compressor is then calculated, using the required engine mass flow rate, as well as pressure and ambient temperatures.
A safe region is adjusted for the performance maps of each of the 83 compressors analyzed, which is sufficiently far from surge, and choke and inefficient regions of the map. Afterwards, the performance maps of various compressors, from the smallest to the largest, are searched, one by one, in the code, using a corrected mass flow rate. If this rate lies within the permissible region of the performance map, the operating point of the compressor is specified on its map and the dimensionless distance to the peak efficiency line for this point is obtained, using the pressure ratio obtained in the previous step. After this parameter is calculated for the compressors whose operating ranges lie within their permissible performance map, the best option is the turbocharger that has a minimum dimensionless distance between its operating point and the peak efficiency line. Figure 6 is a simplified flowchart illustrating how the code operates for a single turbocharger. At this flowchart, i and N_DV are the loop counter and the number of design variables, respectively.

THE CODE ALGORITHM FOR MULTI-TURBOCHARGERS
Assume that two turbochargers are required for a certain altitude. Accordingly, the code process is determined as follows: at first, using the corrected mass flow rate resulted from ambient conditions at that altitude, the turbochargers that can supply this corrected mass flow rate are selected; then, their maximum permissible pressure ratios (according to the area determined for the performance map of each turbocharger) are determined; in view of this corrected mass flow rate and the pressure ratio, the corresponding operating point in the performance map for each turbocharger is found, thereby specifying the dimensionless distance between this point and the peak efficiency line for each turbocharger; finally, a turbocharger with a minimum distance is selected as the best option. The first turbocharger is thus selected, known as a low pressure turbocharger.
However, to select the second turbocharger, or high pressure turbocharger, its inlet pressure is calculated employing the already calculated pressure ratio of the low pressure turbocharger and the ambient pressure at that specific altitude. The inlet temperature of the high pressure turbocharger is measurable and achievable due to the use of an intercooler. Therefore, with this information, it is possible to calculate the corrected mass flow rate for the high pressure compressor, which is very different from that of the low pressure compressor (due to different input conditions). Having obtained this parameter, the search for a high pressure turbocharger throughout different turbochargers initiates in a way similar to the approach used for the low pressure turbocharger.
Care must be taken to allow the pressure ratios selected for the high and low pressure compressors to be finally multiplied by each other. Thus, the pressure ratio to be obtained must be equal to the one required to keep the engine intake manifold at a pressure equal to that at the sea level. It must be noted that the contribution of the intercooler pressure loss is incorporated in the calculation of the inlet pressure that enters the high pressure compressor is incorporated in the calculation of the overall pressure ratio. In the selection of turbochargers, if the total pressure ratio of two of them is equal to the required pressure ratio, the search operation for finding the best cases will be ceased, and the selected turbochargers will be presented as the best options. Otherwise, selecting the low pressure turbocharger will start with a slightly lower pressure ratio than the previous one. After determining the best option, the second-stage turbocharger (high pressure) will be selected. This process continues up to the point that the product of the pressure ratios of low and high pressure turbochargers (considering the intercoolers pressure loss) equals to the value required to provide the same pressure as the one achieved at sea level at the engine intake manifold.  The operation required to make use of three turbochargers is conducted in the same manner as the approach previously introduced. However, with addition of the intermediate pressure turbocharger, thereby using another intercooler, the number of loops is greater and the search for finding the optimum turbocharger is slightly more complicated. It is worth noting that, according to the written code, the reduction of the compressor pressure ratio, to achieve the required pressure for all stages, including high, intermediate and low pressures, is carried so the compressor pressure ratio does not fall by more than 30% of its design set maximum pressure ratio. Therefore, the performance of the compressor whose operating point is approximately located within the high pressure ratio region of the performance map, tipically the best working area for a compressor, is examined. This is another constraint that can be considered for this problem. According to this constraint, the selected compressors are more confidently the best options for achieving the desired objective.

RESULTS AND DISCUSSION
In this section, C++ code outputs are represented, aiming to choosing the best turbocharger to operate (well) at a certain flying altitude by supplying the required power. Here, to display the functionality of the code in different flying altitudes, the code outputs will be presented for three of them, which correspond to the use of one, two, and three turbochargers, respectively. It must be noted that the validation of this work is carried out by showing the operating point obtained by the software on the performance map of the compressor selected by the code. Obviously, if the resulting operating point is located on or near the peak efficiency line, the code functionality is desirable, and the objective function is optimized. Therefore, the selected set of turbochargers can be identified as the best set for the user objective. All the turbocharger compressor maps shown in this article are from Garrett Turbo Catalogue (2013) and BorgWarner Performance Turbochargers Catalogue (2017).

RESULTS FOR SINGLE-TURBOCHARGER
In this section, the flight altitudes requiring the use of a single turbocharger to achieve the desired goal are evaluated. Thus, the code output introduces the best turbocharger for the flight altitude supplying the power required by the user. As aforementioned, the code inputs include the required power and the flight altitude, which are taken from the user. Afterwards, the user is asked whether to use the Garrett or BorgWarner turbochargers. If Garrett turbochargers are chosen, the number of design variables is as large as the number of the turbochargers of this company (in this case, 47). However, if the purpose is to use the turbochargers of BorgWarner Company, the number of design variables would be 36, and a selection would be made based on these turbochargers. Assume that the user inputs the value of required power as 80 hp and the value of target flying altitude as 5 km and then select to use the Garrett turbochargers.
Therefore, the corrected mass flow rate and the required compressor pressure ratio are computed by the means of ambient conditions at this altitude and assignment of the values in Eqs. 2 and 5. In this case, considering the objective function, the best turbocharger for achieving this altitude will be introduced by the code. Thus, the code output for introducing the best turbocharger is shown in Table 1. Thus, using corrected mass flow and pressure ratio calculated by the code, the operating point of the selected turbocharger can be displayed on its compressor performance map. This is presented as a solid point in Fig. 7.
It can be seen that the computed operating point is located in an appropriate region of the compressor performance map of the selected turbocharger. Obviously, this operating point either is not located in the stable and permissible area of the other compressor performance maps or is far away from the peak efficiency line of other compressor maps (which are available in the code library). Thus, according to the selected objective function, the turbocharger introduced by the code is the best possible option for achieving the user's goal.
On the other hand, if the user's input data was the aforementioned, but with the user intending to use BorgWarner Company turbochargers, the code output for introducing the best turbocharger would be as shown in Table 2.  It can be observed that the results are very close to each other. It must be noted that there is a little difference between the corrected mass flow rate in these two cases, due to different pressure and temperature reference values defined for each turbocharger of the company. As aforementioned, the reference value of temperature and pressure is arbitrary, and every company may choose different values for this purpose.
Using corrected mass flow rate and pressure ratio calculated by the code, for this case, the operating point of the selected turbocharger can be displayed on its compressor performance map. It is presented as a solid point in Fig. 8. Likewise, it can be seen that the computed operating point is located in an appropriate region of the compressor performance map of the selected turbocharger. It is noteworthy that an intercooler should also be placed, following the compressor and preceding the internal combustion engine at both cases.

RESULTS FOR MULTI-TURBOCHARGERS
In this section, the flying altitudes that require the use of more than one turbocharger to achieve the desired target are evaluated. Thus, the main functionality of the code, whose object is to choose multi-stage turbochargers, will be better defined.
Assume that the required power is 90 hp and the target flight altitude is 12 km. Also, the user intends to use BorgWarner turbochargers. With these inputs, the code output will be as shown in Table 3. As shown in Table 3, the corrected mass flow rate for the low pressure turbocharger, which is the first-stage turbocharger exposed to the ambient air, is computed to be 39.37 lb/min. Therefore, given the calculated pressure ratio for this compressor, the operating point of the selected low pressure turbocharger can be displayed on its performance map. This operating point is shown as a solid point in Fig. 9. It can be seen that the obtained operating point is located in an appropriate region of the compressor operational map of the selected low pressure turbocharger. The corrected mass flow rate for the high pressure compressor, according to Table 3, is 15.04 lb/min. Therefore, given the calculated pressure ratio for this compressor, the operating point is shown on Fig. 10. Again, it can be seen that the obtained operating point is located in an appropriate region of the compressor operational map of the selected low pressure turbocharger. It's noteworthy that the two intercoolers are required for this case, as can be seen in Table 3. One after low pressure stage and the other after the high pressure one (before engine).
Assume the required power to be 100 hp and the target flight altitude, 20 km. For this case, the user intends to apply Garrett turbochargers. Considering the ambient pressure at this altitude, a large pressure ratio is required, which can be supplied by three turbochargers. The characteristics of the best turbocharger set selected by the code will be listed in Table 4. As shown in Table 4, the corrected mass flow rate for the low pressure turbocharger, which is the first-stage turbocharger exposed to the ambient air, is computed to be 156.51 lb/min. Therefore, given the calculated pressure ratio for this compressor, the operating point for the selected low pressure turbochargercan be displayed on its performance map. This operating point is shown as a solid point in Fig. 11. It can be seen that the obtained operating point is located in an appropriate region of the compressor operational map of the selected low pressure turbocharger, as close as possible to the peak efficiency line. The corrected mass flow rate for the intermediate pressure compressor is computed to be to 51.7 lb/min. Therefore, given the calculated pressure ratio for this compressor, the operating point is shown on Fig. 12  Likewise, it can be seen that, for the intermediate pressure compressor, the operating point is located in an appropriate region of the compressor operational map and it is very close to the peak efficiency line. However, the corrected mass flow rate for the selected high pressure compressor is computed to be 22.2 lb/min. Therefore, in view of the calculated pressure ratio for this compressor, the operating point can be displayed on its performance map. This point is shown in Fig. 13. As shown in Fig. 13, the operating point is located in an extremely appropriate region within the performance map of the high pressure compressor, near the peak efficiency line. Thus, the selected turbocharger set with an appropriate and optimal function will be able to achieve the user goal. In fact, according to the user-selected objective, these three turbochargers are the best possible option among all of the turbochargers manufactured by Gareth Company. Obviously, these options may change, depending on the selected objective function. According to the explanations given in previous sections, however, the selected objective function seems to be the best function for optimal operation in the safe and stable region of the compressor. Anyhow, the written code has the ability to change the objective function in accordance with the user's needs.
From Table 4, it can be seen that the two intercoolers are required for this case, due to the low ambient temperature at the user's intended altitude, such that, despite the temperature rise at the low pressure turbocharger, the temperatures at the low pressure compressor outlet and, consequently, at the intermediate pressure compressor inlet are still within an acceptable region, and thus cooling process is not needed in this part. As aforementioned, this region is one of the constraints applied to the optimization problem. Therefore, the position of the required intercoolers indicated by the code is after the intermediate pressure compressor and also before the internal combustion engine.
As said before, intake pressure and temperature of each compressor must be specified in order to calculate the corrected mass flow rate. Inlet pressure and temperature of the low pressure compressor, which is adjacent to the environment, must be ambient conditions. For the next compressors, however, the temperature and pressure must be calculated using the previous compressor discharge conditions, and thus the corrected mass flow rate could be obtained. The input conditions for each compressor are also obtained by the means of selected pressure ratio for the previous compressor, as well as the consideration of whether or not the intercooler must be used, hence, taking into account temperature decrease and pressure loss in the flow passing through the intercooler. Then, the best option for the second compressor will be selected. Similarly, the process continues to the last compressor.
In addition, given a certain total pressure ratio, which must be provided by a set of turbochargers, there are different possibilities for each compressor pressure ratio, possibilities further increased by considering whether or not the intercooler must be used. Hence, it must be noted that all the possibilities are examined in accordance with the search algorithm used in the (developed) code provided, and finally the best options are introduced. Thus, it can be asserted that the options suggested by the code are the best choices of the turbocharger library in the code, optimizing the chosen objective function.
Finally, it should be noted that, considering the excessive ambient pressure decrease as the altitude exceeds a certain limit, three turbochargers must be employed in order to provide the total pressure ratio in such a way that the internal combustion engine intake conditions meet closely the sea level conditions. Although the required total pressure ratio can theoretically be provided from the addition of more turbochargers, this is not practically feasible, unless the flying vehicle is allowed to operate at a certain altitude with less power than generated at sea level. This preset allowable power is specified by the designer, which is known as regulating rules (Peng et al. 2015). Nevertheless, flying at very high altitudes with the same power generated at sea level is practically impossible. In fact, the use of more than three turbochargers is not cost-effective, due to the additional costs involved, the complexity of the set, and the increase in weight, size, and overall dimensions of the propulsion set. It must also be taken into account the limitations of aerial vehicles (Tonskotter and Scheithauer 1995). Therefore, at the moment, triple-stage turbochargers can be used to achieve high flying altitudes at most. Given these constraints, the code also offers one to three turbochargers to achieve the user's intended altitudes in accordance with the target power.

CONCLUSIONS
In the present work, in accordance with requests of users, a code was developed, which introduces the best option for selecting turbocharged engine in the shortest possible time. Thus, enormous cost and time can be saved by choosing a propulsion set that fits the target. This is of more significance when it comes to the use of turbochargers in aerial applications, especially at high flight altitudes, since the cost and complexity of the experimental tests will increase dramatically as the number of turbochargers increases. Therefore, it is possible to avoid the additional costs of conducting various experimental tests by selecting a suitable propulsion set with the use of the code developed, which is able to select and introduce the best propulsion set according to the user's requirements, requesting the minimum user input data.
One of the achievements of this research is its ability to employ the developed code in a wide range of altitudes (5 to 30 km). This code can introduce the best propulsion system for a variety of aerial vehicles with different flight altitudes. Another major achievement of this study is the ability to execute the code by obtaining the minimum possible information from the user. Moreover, since the source code is available, several actions can be taken to improve performance and accuracy of the code. For instance, the accurate calculation of the rising in the temperature of the air flowing through the compressors; the exact calculation of mass flow rate required by the engine using the engine parameters; the accurate calculation of pressure loss of intercoolers, changes in safety factors, and other actions that can be mentioned in this category. The other features of this code are related to the fact that the code database is simply extensible, allowing the choice of the best option to be made from a larger number of turbochargers. To have access to the performance map of a turbocharger one has just to add its operating parameters to the existing database. Besides, in this code, there is the ability to select a turbocharger among those of a specific company, according to the requirements of the user. Therefore, all of the parameters of the optimization procedure, including design variables, cost functions, and constraints, can be modified.
It must be noted that the calculations and evaluations performed by the code are associated with the performance of the aircraft during its largest flying regime, which corresponds to the flying vehicle performance at the design point. Clearly, for the final use of the propulsion set, it is vital to analyze the off-design operating points of the aerial vehicle, such that all the operating points of the internal combustion engine are located in an appropriate region in the performance map of the selected turbocharger. Therefore, this code is recommended for aircraft designers who want to preliminary design and analyze an appropriate propulsion set that operates with a desire power during the longest flying regime of the aerial vehicle, according to the mission defined. In the next step, using the performance maps of the selected propulsion set, a more detailed analysis must be carried out in order to make sure that all off-design operating points are not located within unstable aerodynamic regions of the selected turbochargers, such as the surge and choking regions. Finally, it is recommended to conduct some experimental tests to ensure that the selected propulsion system is properly functioning. If it is not possible to conduct experimental tests for all operating points, it is crucial to test the critical operating points at least.