Parametric analysis for performance and emissions of gasoline direct injection engine using mathematical modelling

The study aims to estimate the performance and emissions of a gasoline direct injection (GDI) engine by analyzing parameters such as engine speed between 2000 and 6000 rpm, compression ratio (CR) between 9 and 13, and the start of ignition between 140 and 180 deg. A thermodynamic mathematical model was developed using MATLAB to simulate the two-zone combustion process of a four-cylinder, four-stroke direct injection engine operating on gasoline at specified parameters. The results showed that parameter variations greatly affect the performance and emissions of the GDI engine. The highest values of in-cylinder pressure, burned and unburned temperature, cumulative engine power, Carbon monoxide CO and Nitrogen oxide NO emissions were found at low engine speeds, while heat transfer increased as engine speed increased, and it's been noticed that the maximum power per cycle at speed (2000 rpm), fuel injection pressure (40 MPa), and S.O. ignition angle (165). Increasing the compression ratio between 9 and 13 increased cylinder pressure, but it is observed that a compression ratio has a minimal effect on the temperature in both the burned and unburned areas. Cumulative engine power and heat transfer decreased when the compression ratio rose, and the percentage mole fraction of CO and NO emissions decreased with increasing CR. The engine observed maximum power per cycle at a compression ratio of 10, an engine speed of 2000 rpm, and a cylinder bore/stroke ratio of 100%. Advancing the spark timing increased in-cylinder pressure and burned and unburned temperatures while delaying the ignition timing increased heat transfer. It is also noticed that in cylinder pressure, burned, and unburned temperatures increase when spark timing is advanced. As the ignition timing was delayed, heat transfer increased. In contrast, the minimum cumulative engine power at the advanced spark timing and the peak power values at the ignition angle were 170 deg. The peak values of the percentage mole fraction of CO and NO emissions at early spark timing. Also, maximum power per cycle at ignition angle (170 deg.), engine speed (1500 rpm), and engine load (75%).

• Mathematical model was developed using MATLAB to simulate the two-zone combustion process • A compression ratio has a minimal effect on the temperature in both the burned and unburned areas • In cylinder pressure, burned, and unburned temperatures increase when spark timing is advanced • Maximum engine performance and emissions occur at low speeds • As compression ratios increase, power, and heat transfer decrease, with peak power at a 170-degree ignition angle The study aims to estimate the performance and emissions of a gasoline direct injection (GDI) engine by analyzing parameters such as engine speed between 2000 and 6000 rpm, compression ratio (CR) between 9 and 13, and the start of ignition between 140 and 180 deg.A thermodynamic mathematical model was developed using MATLAB to simulate the two-zone combustion process of a four-cylinder, four-stroke direct injection engine operating on gasoline at specified parameters.The results showed that parameter variations greatly affect the performance and emissions of the GDI engine.The highest values of incylinder pressure, burned and unburned temperature, cumulative engine power, Carbon monoxide CO and Nitrogen oxide NO emissions were found at low engine speeds, while heat transfer increased as engine speed increased, and it's been noticed that the maximum power per cycle at speed (2000 rpm), fuel injection pressure (40 MPa), and S.O.ignition angle (165).Increasing the compression ratio between 9 and 13 increased cylinder pressure, but it is observed that a compression ratio has a minimal effect on the temperature in both the burned and unburned areas.Cumulative engine power and heat transfer decreased when the compression ratio rose, and the percentage mole fraction of CO and NO emissions decreased with increasing CR.The engine observed maximum power per cycle at a compression ratio of 10, an engine speed of 2000 rpm, and a cylinder bore/stroke ratio of 100%.Advancing the spark timing increased in-cylinder pressure and burned and unburned temperatures while delaying the ignition timing increased heat transfer.It is also noticed that in cylinder pressure, burned, and unburned temperatures increase when spark timing is advanced.As the ignition timing was delayed, heat transfer increased.
In contrast, the minimum cumulative engine power at the advanced spark timing and the peak power values at the ignition angle were 170 deg.The peak values of the percentage mole fraction of CO and NO emissions at early spark timing.Also, maximum power per cycle at ignition angle (170 deg.), engine speed (1500 rpm), and engine load (75%).

Introduction
The internal combustion engine, invented in the 1860s, significantly influenced transportation and commercial advancements.Various industries, including aviation, shipbuilding, and power generation, have relied on combustion engines.Gasoline spark ignition engines have evolved to improve power output, efficiency, and emissions.The fuel system in ignited spark engines has changed over time from carburetion to throttle body injection, continuous port fuel injection (PFI), and gasoline direct injection (GDI).Where gasoline is immediately poured into the combustion chamber [1], direct injection engines have numerous benefits compared to traditional homogeneous-charge spark ignition engines, such as decreased fuel consumption, enhanced efficiency, and reduced harmful emissions to meet environmental regulations [2].By controlling the fuel injection quantity instead of altering the intake air, it is feasible to decrease the energy losses caused by the pumping process and regulate the power output.Although GDI engines provide rapid reaction and flexible control, several aspects impact engine performance and emissions, including ignition and injection timings, injection pressure, injection duration, engine speed, and compression ratio.Studying these parameters experimentally is challenging because of the sophisticated experimental facilities required to perform the experiments.Therefore, researchers tend to perform theoretical or analytical analyses such as simulation and numerical analysis before conducting any experimental activity [3].
An engine combustion simulation is one of the most important tools for optimizing GDI engines' performance.In the real world, mathematical models can significantly reduce the number of prototypes and experiments conducted during the initial stages of the design process, alter important parameters, and aid in examining various control schemes throughout the engine's calibration phase.As a result, it reduces both expenses and time consumption.In modern times, numerous manufacturers of internal combustion engines heavily rely on simulation programs that comprehensively depict the engine's performance, from the intake mouth to the exhaust tailpipe [4].The MATLAB/Simulink software is one of these programs used to simulate the workings of a GDI engine.This software offers a versatile and modular tool for integrating engine cycle simulations with mathematical models of the engine, including combustion models, physical property models, injector models, and flow models.
Several studies have investigated the effect of operating parameters on a GDI engine's performance and emission characteristics.Addepalli and Mallikarjuna [5] conducted a computational fluid dynamics (CFD) analysis to examine the impact of engine parameters on the characteristics of a gasoline direct injection (GDI) engine.The researchers examined three engine velocities (2000, 3000, and 4000 rpm), three compression rates (10, 11, and 12), and three fuel injection pressure levels (200, 300, and 400 bar).In all the situations described, the roller mixture's equivalency rate remained constant at 0.75.The researchers demonstrated that the engine's velocity is more sensitive to turbulent kinetic energy and the dropping ratio than other parameters.In addition, the researchers found that the fuel injection pressure is vital in putting a combination of flammable substances near the spark plug precisely when the spark occurs.Furthermore, the researchers observed decreased heat generation at an engine speed of 4,000 revolutions per minute, a compression ratio of 10, and a fuel injection pressure of 200 bar.However, there hasn't been much research on the combined effects of these parameters.Using computational fluid dynamics (CFD) software.
Iliev and Hadjiev [6] investigated the impact of engine speed on the efficiency of a four-cylinder direct injection (DI) gasoline engine, testing it at various engine speeds.The simulation findings show that the cylinder pressure reaches a maximum of 57.76 bar at an engine speed of 3000 rpm and drops to a minimum of 45.1 bar at 1000 rpm.The study revealed that the maximum pumping mean effective pressure (MEP) for petrol engines is -0.0357 bar at 1000 rpm, whereas the minimum MEP is -1.7497 bar at an engine speed of 6000 rpm.The study also demonstrated that the upper limit of the computed temperature in a cylinder for a petrol engine is 2851K at 4000 rpm, while the lower limit is 323.61K at 1000 rpm.The engine model demonstrated the lowest brake-specific fuel consumption at an engine speed of 2000 rpm.At 4,500 rpm, the engine recorded the maximum brake power of 63.76 kW and the highest indicator power of 77.09 kW at the same engine speed.Researchers, however, have not extensively examined the impact of additional variables and collective influence.Munoz et al. [7] conducted an experimental study to analyse the impact of varying compression ratios on the stratified-charge direct injection (SCDI) mode.They gathered combustion data from a single-cylinder GDI engine.There are tests in the stratified-charge direct injection (SCDI) mode that show higher compression ratios make thermal conversion more efficient, even when advanced phasing is used.We measure and analyse this benefit through an efficiency assessment.The findings indicate that hydrocarbon emissions tend to rise with compression ratio, reducing combustion efficiency during stratified charge operation.This could be due to the increased cylinder pressure or the piston being closer to the injection point.The data analysis indicated that higher compression ratio points exhibited greater stability.This could result in a further decrease in fuel usage.Kramer et al. [8] studied the impact of different compression ratios on full load performance, knocking sensitivity, fuel consumption, emissions, combustion stability, and exhaust gas temperature at λ = 1 and for a stratified charge.The benefits of a high compression ratio are seen in improved part load fuel consumption and combustion stability.An 8-bar IMEP can achieve stratified charging up to 3000 rpm.Under high load conditions, a reduced compression ratio can lead to consistent fuel consumption (because of decreased knocking sensitivity), improved full load performance, and reduced hydrocarbon emissions.Decreasing the compression ratio increases full load torque and reduces emissions, but it also worsens fuel economy at both part load and full load.
Yan et al. [9] employed a 3D computational fluid dynamics (CFD) model of a single-cylinder, four-stroke spark ignition gasoline direct injection (GDI) engine with a compression ratio of 10.3.The purpose was to investigate this intricate process at various crank angles (270, 280, 290, and 300-degree crank angles before the top dead center).We kept the other conditions constant, including the rotational speed at 2000 RPM.We incorporated the spray, turbulence, and combustion equations.The results indicated that a delay in ignition timing significantly decreased drop-wall impingement.However, it also significantly exacerbated the disparity in mixture concentration, forming a fuel-rich zone around the cylinder.The shorter available mixing time significantly exacerbated the mixture's unevenness.Due to the prolonged ignition period, the combustion deteriorated, as the region with an excessively high equivalence ratio hindered the propagation of the flame, ultimately halting it in the most irregular region.In the long run, this has an adverse effect on thermal efficiency and engine performance.To sum up, this paper illustrates the complete sequence from injection to mixing.Droplet-wall impingement and the available mixing time are the primary factors influencing mixture formation and subsequent combustion.As the ignition's timing changes, Also, as noted in previous studies, the model was not tested for different speeds.Al-Khishali et al. [10] studied flow characteristics in the inlet and exhaust manifolds of internal combustion engines on a variable compression ratio single-cylinder gasoline engine.To compare and present flow characteristics, they used computer simulations and gas exchange cycle program data.The experimental work varied the compression ratio from 7 to 11 at variable speeds with constant throttle opening.The results showed increased brake power with a higher compression ratio, but decreased brake-specific fuel consumption.Volumetric and mechanical efficiency increased with compression ratio but decreased with engine speed.
Based on the previous discussion, many researchers have focused on different aspects of GDI engines' engine parameters, employing diverse methodologies and techniques.However, these researchers did not test a wider range of variables and study their combined effect on GDI engine performance and emissions.This paper extensively studied several variables under a variety of conditions.So, the main thing this study adds is an estimate of how changing the engine speed (between 2000 and 6000 rpm), the compression ratio (between 9 and 13), and the start of ignition (between 140 and 180 deg.) affects the performance and emissions of a gasoline direct injection (GDI) engine.It also helps find the best values for these parameters for a GDI engine to work efficiently by using a thermodynamic mathematical model that was created.

Theoretical model 2.1 The engine specifications
In this research, a single-cylinder, four-stroke GDI engine has been selected for the analysis.The detailed specifications of the engine are shown in Table 1.

Model assumptions
The assumptions that are considered in this study are stated below: The model equations are derived for a four-stroke GDI engine cycle without a turbo and supercharger.
The model depends on a two-zone thermodynamic (more accurate and less complicated than other models and more commonly used with S.I engines) study of the combustion process, which has been separated into two parts, one where the charge mixture of fuel and air has burned and another where it hasn't burned.
In-cylinder pressure is presumed to be similar across both the burned and unburned regions.
In the cycle of the engine, all gases are considered to be ideal gases.On this basis, we determine the properties of air and iso-octane.To account for temperature fluctuations, we use formulas for each gas.By using a polynomial approach, we can determine the specific heat ratio.The cylinder walls' temperature is considered consistent and even throughout.
The ambient temperature and pressure are assumed to be constant.The various modes by which heat is transferred are brought together in an equation for convection.This equation explains how heat is transferred between the gases and the wall of the cylinder using what is known as the Anand correlation.
There is no heat transfer between the two zones.Negligible effect of the Exhaust system.Assuming homogeneous charge (early injection) operation, fuel begin injecting into cylinder during the intake stroke and evaporates in the cylinder.

Mathematical model development
This model simulates a direct injection engine, in which gasoline gets injected directly into the engine cylinder.The model depends on a two-zone thermodynamic study of the combustion process, which separates the combustion chamber into burned and unburned areas.The cylinder charge is supposed to be made up of ideal gases, and the first law of thermodynamics, state equation, mass, and volume conservation are used.A set of equations may be constructed for the temperature, pressure, mass, and volume of burned and unburned gases.
The Wiebe function has a characteristic "S-shape" and is defined as follows in Equation (1) Heywood [11]: where X b(θ) represents mass fraction burned, ϴ(i) represents the immediate crank angle, ϴ(0) represents the sparking angle at the beginning of combusting, and ϴ(b) represents the combustion duration.The numbers representing a plus k are changeable constants (5 and 2 are typical).Engine-specific burn profiles can be adapted to a particular engine or altered by variables a and k.
The following equation is created by differentiating the ideal gas equation of state by Guezennec and Hamama [12]: where the instantaneous quantities P, V, and T are modeled in relation to the crank angle of the engine.The first law of thermodynamics, which has the following formal formulation, may be implemented using the same procedure: Here, Q represents the overall heat input in the system, W represents the work's output, and U represents the change in inner energy inside the system.Equation ( 4) may be produced by diffusing Equation (3): Cv denotes the gas in the combustion chamber's specific heat.By dividing the specified heat by the universal gas constants, using Ƞ (the combustion efficacy) and LHV (the low heating values for the provided fuel), we get Equation 5, which expresses the variation within temperatures as a function of crank angle: The definition of the fuel's heat input is (Guezennec and Hamama) [12]: where the actual air-fuel ratio is AF ac, Vd is the displacement volume of the engine, and  is the lower heating value of the fuel.The final definition of the pressure change would be: Equation ( 7) serves ais the foundation for a mathematical model that simulates engine performance.

Modeling engine friction
Several studies utilized general linear types of equations in forecasting friction mean effective pressure (fmep) losses as a function of RPM [11], [13].Although this approach only offers rough estimates of friction losses, it serves as a starting point for a numerical simulation.The following is Blair's equation for the linear fmep loss: L represents the engine's stroke [m], rpm represents the engine speed [rev/min], while a and b represent constants that depend on the engine type.According to the engine displacement, Blair has aspired to several variations of the fmep loss equations for an engine with basic internal bearings that uses spark ignition if ((Vd ˃ 500 cm 3 ) Equation ( 8a) is used and if (Vd ˂ 500 cm 3 ) Equation ( 8b) is used, respectively: The indicated relative fmep losses are given in Pascal units.

Modeling of burned and unburned zones
Assumptions must be made regarding the burned and unburned zones because such a model ignores heat transmission in the burned and unburned areas.Also, it does not explore the geometric location of the flaming front.The definitions of the unburned and burned zones are given by Rakopoulos and Michos [14]: (Xb) denotes the mass fraction burned due to the crank angle.The area of the cylinder that is now in contact with combustion chamber gases is known as A(i).Although this technique ignores heat transmission among areas and presupposes a surface zone for the cylinder head, this could be demonstrated to have physical consistency since the fractional heat transfer amid the burned gases with the cylinder wall has at all times been greater inside the burned zone, Kirkpatrick and Ferguson [15].The mass, volume, and temperature in the burned and unburned areas could be estimated using the following procedure.The equation of state could be applied to the unburned and burned gas regions at any instant, Kirkpatrick and Ferguson [15]: For the assumption of no mass loss from the combustion chamber, the total mass in the system at any stage can be expressed as: The total volume at any stage These are the main equations used; at any instant during combustion, there are seven unknown parameters to be solved (  ,   ,   ,   ,   ,   , P).An extra equation specifying the burning rate is required to solve these parameters.In the simple model form, the burning rate can be expressed by the exponential form of the Wiebe function Equation (1).

Heat transfer estimation
The main modes of heat transfer from each zone are convection and radiation.This heat is determined using relationships based on the work of Annand [15].Nusselt and Reynolds number correlations for forced convection are: The coefficient of radiation heat transferring is calculated as [16]: Here, Tw represents the wall temperature.The following formula is used to determine convective loss through the wall as a result of the crank angle: The overall change in heat transmission as a result of the crank angle can be calculated as follows:

Injector calculations
Fuel velocity in model accounts as follows Siebers [17]: where  is the discharge coefficient and () is the area-contraction coefficient.
The mass flow rate, measured in kilograms per millisecond, is calculated as follows: where   is injection area and   is fuel density.
The following is how the mass flow rate per crank angle unit is calculated: where ns Rotation Engine Velocity and MWf is Molecular weight Crank angle unit injection duration is calculated as follows: The pressure injection for each time step accounts for the following relationship: where  is maximum injection pressure,  is minimum injection pressure, and  is the crank angle.

Performance parameter predictions
The power is represented by the braking power, Wb, and the engine torque, , represents the amount of work completed per unit revolution (radians) of the crank , Kirkpatrick and Ferguson [15].

𝑊𝑊 𝑏𝑏 ̇= 2𝜋𝜋𝜏𝜏𝑁𝑁 (23)
The stated work is the network transmitted from the gas to the piston throughout a cycle.Wi, which represents the integration of the pressure over the cylinder volume.
while the designated power Wi, for any engine using   cylinders are: The mechanical efficiency   is determined by the braking power to indicate the power rate:

Modeling of combustion reaction:
The chemical Equilibrium equations have been coded following the equations of Kirkpatrick and Ferguson [15]: where  stands for moles' total number.Therefore, the total of the mole fractions is 1: These equations define the following three constants: After some rearranging and replacement into the atom balancing equations, we have: Six gas-phase equilibrium processes are now shown.Such reactions result in the creation of OH and NO as well as the dissociating of hydrogen, oxygen, water, and carbon dioxide: The equilibrium constants had been curve-fitted to the JANAF Table data regarding the temperature that ranges 600 T > 4000 K by (Olikara and Borman) [18].Their expressions take the following form:  10   () =   ln( 1000) + where T is the temperature in kelvin and (  ,   ,   ,   ,   ) are the curve-fitting equilibrium constants.The unburned and burned mixed zones are independent open systems according to thermal characteristics.The atom balance equations are changed to correspond to the six separate equilibrium reacting equations, resulting in four equations with four unknowns ( 3 ,  4 ,  5 ,  6 ).Such four equations have numerical solutions.

Variable specific heat ratio model
For combustion processes, including iso-octane and different fuels, Krieger and Borman [19] created this polynomial approach in 1966.The Krieger and Borman technique simulates variations within internal energy by using "correction factors" for ideal gas constants that correlate to temperature variations (based on a given reference temperature).It is possible to derive the exact heat rate as a temperature function using this approach and the related polynomials.

Matlab model
Figure A1 in Appendix A illustrates the model's mathematical formulation flow chart, which was programmed in a Matlab environment.The primary model creates sub-models to carry out certain tasks.The mathematical model's structure is as follows, and the sub-models are coded in the Matlab scripting language.The piston's isentropic compression and expansion in the cylinder are simulated as in the following :

The isentropic sub-model
This model calculates the thermodynamic properties of the cylinder in each step, equal to 1 of the crank angle degrees, in piston movement according to the isentropic relation and by employing the engine geometry relations.

Injection sub-model
It replicates the processes of fuel injection and association, such as combusting, heat release, and heat transmission.This model, regarded as the most significant model, includes several sub-models for the injector, fuel characteristics, heat release and transmission, and ignition delay.

Equilibrium sub-model
This model calculates the mole fraction of the combustion products and their specifications.The general algorithm of this model is shown in Figure A2 in Appendix A. The equilibrium model comprises several sub-models, such as the minimum step  sub-model, guess sub-model, newton sub-model, and line search sub-model.

Validation of the matlab mod
The in-cylinder pressure was calculated using MATLAB software and validated by comparing the results obtained with those of another researcher.Figure 1 illustrates a comparison between the in-cylinder pressures derived from the MATLAB model and those being matched to the experimental results of Li [20] under the following specified conditions: engine operation speed of 1500 rpm, compression ratio of 11.3 and 10 MPa fuel injection pressure.From the figure, it is clear that there is a good consensus among the results.This indicates that the models utilized in this MATLAB model are effective and can be relied upon for research purposes with confidence.The error is estimated using Equation (33) based on average results.

Effect of variation of engine speed
The influence of changing engine speed between (2000-6000 rpm) on the changing of in-cylinder pressure, burned and unburned gas temperatures with crank angle is shown in Figures (2) and ( 3) of the mathematical model for a GDI engine using the MATLAB software under engine operating conditions (30 MPa fuel injection pressure, compression ratio 10.5, and spark timing 150°).The turbulence generated within the engine by altering the speed and maintaining a constant spark timing leads to changes in the in-cylinder pressure and burned and unburned gas temperatures.It is noted that increasing the engine rotational speed from 2000 to 6000 rpm results in a drop in both maximum cylinder pressure and temperature inside the engine cylinder.This phenomenon happens due to high engine speeds, resulting in increased turbulence.Consequently, air and fuel vapor has improved mixing, increasing flame speed.Additionally, the unburned mixture is physically carried into the reaction zone.Consequently, turbulence alters the heat transport mechanism by introducing significant convective mixing.Excessive turbulence of the charges amplifies heat dissipation from the combustion zone and causes erratic flame core growth, resulting in reduced pressure and temperature levels.
Figure ( 4) describes how heat transfer is influenced by altering the engine speed.As the engine speed increases, there is an increase in heat transfer.This occurs because there is low turbulence inside the cylinder, resulting in the irregular mixing of charges.Consequently, this leads to a reduced flame speed and a reduced pressure, temperature, and heat transfer rate.Therefore, the heat transfer rate from the gases inside the cylinder to the cylinder wall at engine speeds becomes higher.Figure (5) describes the impact of engine speed between (2000-6000 rpm) on cumulative engine power with the crank angle changing.It has been observed that when engine speed increases, cumulative power will be decreased.Due to the energy required for compression, the power remains negative until reaching the top dead center (TDC).With increasing engine speed, the needed power is higher because compression must happen quickly, so the negative power is high at high engine speed.Still, the difference in positive power for different engine speeds is small.6) and ( 7) depict the percentage mole fraction of CO and NO emissions with crank angle changing with the engine speed variation between (2000-6000 rpm).These emissions are seen to rise at low engine speeds.This occurs.Consequently, there is an elevated cylinder pressure and dissociation of combustion products at high temperatures, reaching their greatest value when the temperature inside the cylinder is at its highest at an engine speed of 2000 rpm.The greater gas temperature inside the cylinder is the main source of NO production.
Figures (8) and ( 9) depict the maximum engine power per cycle and the ideal engine speed that gives maximum engine power with changing fuel injection pressure with the varying S.O.ignition angle.

Effect of variation of compression ratio
The influence of changing the compression ratio (CR) between (9-13) on the changing of cylinder pressure with crank angle is shown in Figure (10) of the mathematical model for a GDI engine using the MATLAB software under engine operating conditions (2500 rpm, spark timing 150° and 30 MPa fuel injection pressure).As seen in Figure (10), the change of (CR) will affect the in-cylinder pressure.The maximum in-cylinder pressure rises as the compression ratio (CR) increases.When the CR is higher, the pressure at the end of the compression stroke becomes greater, leading to a peak in-cylinder pressure during combustion.This is due to improved air and fuel mixing at CR thanks to reduced cylinder volume, resulting in a shorter ignition delay.Figure (11) depicts the effect of varying CR on the gas temperatures of burned and unburned zones as the crank angle changes.It has been shown that a larger CR has a modest effect on raising the maximum temperature in both the burned and unburned areas but significantly reduces the release temperature (at the exhaust valve opening) (EVO).This occurs due to the earlier attainment of the maximum temperature in the combustion zone, resulting in a larger effective expansion ratio.The elevated temperature and pressure after the compression stroke also impact the velocity of the flame throughout the combustion process.Because of the high pressure and temperature at the critical moment, the gas conditions at the end of the combustion process (called the end gas and located at the exterior of the combustion chamber) are more likely to ignite (or detonate) when compressed more strongly spontaneously.
Figure (12) illustrates the impact of the compression ratio between (9-13) on cumulative engine power with the crank angle changing.As the compression ratio increases, the cumulative power decreases.Due to the energy required for compression, the power remains negative until reaching the top dead center (TDC).As the compression ratio increases, the power needed increases, so the negative power is high at a high compression ratio.Still, the difference in positive power for different compression ratios is small.Figure (13) illustrates the impact of varying the compression ratio on heat transfer.It is evident that as the CR increases, the heat transfer will drop due to the considerable impact of the CR on the combustion chamber's geometry.A higher CR frequently leads to a narrower aspect ratio in the combustion chamber.Consequently, the earlier contact between the flame and the piston will result in a decrease in the rate of heat transfer.13).The level of carbon monoxide drops as the combustion rate increases.This phenomenon occurs as the volumetric efficiency rises and the residual gas fractions decline with the increase in compression ratio.Consequently, by raising the compression ratio (CR), there is a greater amount of fresh air and reduced dilution.The air-to-fuel ratio is primarily responsible for influencing (CO) emissions.An increase in the air-to-fuel ratio reduces CO emissions.Figure (15) depicts the percentage mole fraction of NO emissions with crank angle changing with a compression ratio variation (9)(10)(11)(12)(13).With the increases in the compression ratio, there is a noticeable decrease in the levels of NOx.The oxygen concentration, the highest temperature reached, and the length of exposure at that temperature all impact the generation of NOx.As the compression ratio increases, the fuel-air mixture's combustion approaches a constant volume, resulting in a shorter combustion duration and a significant rise in the amount of fresh air. Figure (11) demonstrates that the impact of the compression ratio on the maximum temperature during combustion is minimal, resulting in a decrease in NOx emissions at higher compression ratios.16) and ( 17) depict the maximum engine power per cycle and the optimal compression ratio that gives maximum engine power with changing engine speed and the varying cylinder bore/stroke ratio.Figure (16) shows that the highest engine power per cycle is (15.53)kW generated at compression ratio (10), engine speed (2000 rpm), and bore/stroke ratio (100%).

Effect of variation of ignition timing
The influence of changing spark ignition timings between (140-180 deg.) on the changing of cylinder pressure with crank angle is shown in Figure (18) of the mathematical model for a GDI engine using the MATLAB software under engine operating conditions (2500 rpm, compression ratio 10.5, and 30 MPa fuel injection pressure).Figure (18) shows that the incylinder pressure changes with spark timing.It is noted that as the spark timing advances, the cylinder pressure increases.Advancing the spark timing results in a prior combustion process, although there is a prolonged ignition delay period.This causes additional fuel to be burned before reaching the top dead center (TDC), increasing in-cylinder pressure and a more rapid burning rate during the initial combustion.Additionally, advancing the spark timing causes an increase in combustion pressure due to the earlier heat release during the initial expansion stroke.Figure (19) depicts the effect of different spark timings on burned and unburned gas temperatures with a change of crank angle.Although the impact of spark timing on unburned gas temperature is minimal, it significantly influences the burned temperature.It is evident that, like the pressure inside the cylinder, the maximum temperature of burned gas increases and occurs earlier when the spark timing is advanced.This can be mainly due to the higher rate of combustion and the more focused release of heat during the short combustion time that occurs with earlier spark timing.Reduced fuel consumption and decreased heat generation during the late combustion stage are associated with sluggish and delayed combustion, resulting in lower combustion and exhaust temperatures.In Figure (20), we can observe the impact of spark timings on the cumulative engine power.It is evident from the figure that during the compression stroke, the cumulative engine power rates are consistently negative across all cases due to the compression work.However, the minimum power at advanced spark timing is because of the sufficient time to complete the compression stroke; thus, the total power is low compared to other cases.During the initial stages of combustion, the power 13 rates for all cases rise due to an increment in pressure and temperature within the cylinder.The data indicates that the maximum power values occur at an ignition angle of 170 degrees.
Figure ( 21) depicts how varying the spark timings affect heat transfer.It is evident from the figure that as the ignition advance angle increases, the combustion process advances well.However, the heat transfer remains almost consistent across spark timings.As the spark timing advances, the combustion process also progresses closer to the dead center (TDC) and has a shorter duration.Hence, optimizing the spark timing can effectively decrease the combustion period and enhance the rate at which heat is released.This, in turn, allows for improving engine performance and fuel efficiency.Increasing the mixing duration, enhancing combustion, and augmenting the peak instantaneous heat transfer yield advantageous outcomes.Nevertheless, by prolonging the delay in ignition timing, the phase associated with the initiation of ignition shifts backward.This results in an extended combustion duration and a decrease in the flame's speed.Consequently, the heat transfer process of the working mixture in the cylinder gradually slows down, resulting in a reduction in the maximum value of the instantaneous heat transfer rate, which also shifts backward.

Conclusion
A cycle with four strokes of a gasoline direct injection engine type was mathematically modeled.Mathematical modeling may be utilized to analyze the performance of pollutants from a gasoline direct injection engine.Modeling the combustion with various engine rotational speeds, compression ratios, and the different start of ignition angles was done using the MATLAB algorithm.The following are the key findings from the current investigation: The highest pressure values inside the engine cylinder, burned and unburned gas temperature,cumulative engine power , CO and NO emissions were found at low engine speed and decreased as engine speed increased.Heat transfer rises as engine speed increases.Also, maximum power per cycle at engine speed (2000 rpm), fuel injection pressure (40 MPa), and S.O.ignition angle (165).Increasing the compression ratio (CR) caused an increase in cylinder pressure.Still, it has been noted that an elevated (CR) leads to a modest rise in the highest temperature reached in both the burned and unburned areas.The cumulative engine power and heat transfer decrease when the compression ratio increases.The percentage mole fraction of CO and NO emissions decreases with increasing CR.Also, maximum power per cycle at compression ratio (10), engine speed (2000 rpm), and cylinder bore/stroke ratio (100%).In-cylinder pressure, burned, and unburned temperatures increased when spark timing was advanced.Heat transfer increased as the ignition timing was delayed, while the minimum cumulative engine power at the advance spark timing and the peak power values at the ignition angle of 170 deg.The peak values of percentage mole fraction of CO and NO emissions at early spark timing.Also, maximum power per cycle at ignition angle (170 deg.), engine speed (1500 rpm), and engine load (0.75%).

Nomenclatures
Pave is the average pressure for the other researcher, and Pprog is the calculated pressure.The comparison shows good compatibility.

Figure 1 :
Figure 1: Comparison of in-cylinder pressure with experimental results of Li[18]

Figure 2 : 3 :
Figure 2: In-cylinder pressure for different engine speeds Figure 3: Burned and unburned gas temperature for different engine speeds

Figure 4 : 5 :
Figure 4: Heat transfer for different engine speeds Figure 5: Cumulative engine power for different engine speeds Figures (6) and (7) depict the percentage mole fraction of CO and NO emissions with crank angle changing with the engine speed variation between (2000-6000 rpm).These emissions are seen to rise at low engine speeds.This occurs.Consequently, there is an elevated cylinder pressure and dissociation of combustion products at high temperatures, reaching their greatest value when the temperature inside the cylinder is at its highest at an engine speed of 2000 rpm.The greater gas temperature inside the cylinder is the main source of NO production.Figures(8) and (9) depict the maximum engine power per cycle and the ideal engine speed that gives maximum engine power with changing fuel injection pressure with the varying S.O.ignition angle.Figure (8) shows the highest engine power per cycle is (17.36)kW generated at engine speed (2000 rpm), fuel injection pressure (40 MPa) and S.O.ignition angle (165)

Figure ( 8 )Figure 6 : 7 :
Figures(6) and(7) depict the percentage mole fraction of CO and NO emissions with crank angle changing with the engine speed variation between (2000-6000 rpm).These emissions are seen to rise at low engine speeds.This occurs.Consequently, there is an elevated cylinder pressure and dissociation of combustion products at high temperatures, reaching their greatest value when the temperature inside the cylinder is at its highest at an engine speed of 2000 rpm.The greater gas temperature inside the cylinder is the main source of NO production.Figures(8) and (9) depict the maximum engine power per cycle and the ideal engine speed that gives maximum engine power with changing fuel injection pressure with the varying S.O.ignition angle.Figure (8) shows the highest engine power per cycle is (17.36)kW generated at engine speed (2000 rpm), fuel injection pressure (40 MPa) and S.O.ignition angle (165)

Figure 8 :Figure 9 :
Figure 8: Maximum power for Engine speed variation for different fuel injection pressure & S.O.Ignition angle Figure 9: Engine speed variation gives Maximum power for different fuel injection pressure & S.O.Ignition angle

Figure 10 :Figure 11 :
Figure 10: In-cylinder pressure for different compression ratios

Figure 12 :Figure 13 :
Figure 12: Cumulative engine power for different compression ratios

Figure 14 :
Figure 14: Emissions of CO for different compression ratios

Figure 15 :
Figure 15: Emissions of NO for different compression ratios

Figure 16 :Figure 17 :
Figure 16: Maximum power for compression ratio variation for different cylinder bore/stroke ratio & Engine speed

Figure 18 :Figure 19 :
Figure 18: In-cylinder pressure for different start of ignition

Figure 20 :Figure 21 :
Figure 20: Cumulative engine power for different start of ignition

Figure 22 :
Figure 22: Emissions of CO for different start of ignition Figure 23: Emissions of CO for different start of ignition Figures (24) and (25) show the maximum engine power per cycle and the optimal start of ignition angle that gives maximum engine power with changing engine speed and the varying engine load.Figure (24) depicts the highest engine power per cycle is (45.13)kW generated at the ignition angle (170 deg.), engine speed (1500 rpm), and engine load (75%).

Figure 24 :Figure 25 :
Figure 24: Maximum power for ignition timing variation for different engine load & engine speed