Skip to Content
ThermoThermo
  • Article
  • Open Access

6 December 2026

24 Pages

Machine Learning-Based Prediction of Power Generation and Energy Efficiency from Flare Gas Waste Heat Recovery in Basrah Oil Fields, Iraq

,
,
and
1
Power Mechanical Engineering-Technical Engineering College, AlKunooze University, Basrah 6100, Iraq
2
Mechanical Engineering Department, Engineering College, University of Basrah, Basrah 6100, Iraq
*
Author to whom correspondence should be addressed.
Thermo2026, 6(4), 97;https://doi.org/10.3390/thermo6040097 
(registering DOI)
This article belongs to the Section Thermal Energy Systems and Decarbonization Processes

Abstract

Iraq flares large volumes of associated gas, mostly in Basrah, while it faces a serious power shortage. Previous studies focused on the lost gas and its pollution, and few estimated the power that the flare heat can produce. No study has used machine learning for this purpose. The current study evaluates the recoverable power from flare gas heat in four Basrah oil fields. A thermodynamic model of an externally fired gas turbine with a turboexpander was developed. It uses flare gas temperature, line pressure, and flow rate to estimate net power and overall efficiency. The model produced 21,025 cases over 450–1050 °C, 0.1–14 bar g, and 50,000–190,000 m3/h. Response surface methodology (RSM) and six machine learning models were trained on these cases and tested on a random split, on 2000 off-grid points, and on 80 field points. As the temperature rose, the cycle efficiency increased from about 10% to 30% and the overall efficiency from 6.5% to 20.4%. Gaussian process regression (GPR) gave the lowest root mean square error (RMSE). Its RMSE was 0.22 MW for power and 0.017 percentage points for efficiency, and its error on the field points was below 0.1%. Random forest and gradient boosting gave almost perfect results on the random split, but their RMSE increased to about 3.5 MW off the grid. Shapley values and Taguchi analysis of variance (ANOVA) showed that flow rate and temperature control the power, while temperature alone controls the efficiency. The four fields can supply about 583 MW (4600 GWh per year), led by West Qurna 2 (286 MW), Rumaila (145 MW), Zubair (78 MW), and West Qurna 1 (75 MW). GPR provides a fast and reliable tool to evaluate flares, and models trained on grid data should be checked on independent points.

1. Introduction

Gas flaring wastes a large amount of energy every year. Oil producers burn associated gas when they cannot use it or sell it. In 2024, the world flared about 151 billion cubic meters (bcm) of gas. This value was the highest level since 2007. It released about 389 million tonnes of CO2-equivalent [1]. In 2025, the flared volume rose again to 167 bcm. The lost gas was worth about 54 billion US dollars [2]. Satellite data now let researchers track each flare site around the world [3]. Iraq is one of the largest flaring countries. In 2025, it held third place among all flaring countries [2]. The World Bank figure for 2023 is about 17.7 bcm [4]. Satellite data show that Iraq flared about 17.8 bcm in 2021. About 40% of its gas production was flared [5]. Most of this gas is flared in Basrah, in the south of the country. Basrah flared about 9.9 bcm in 2023, which is 55–60% of the national total [4,6]. Remote sensing shows that the highest emissions in Iraq are near Basrah, Rumaila, and West Qurna [7]. Three Basrah fields, Rumaila, West Qurna 1, and Zubair, flared 5.8 bcm in 2023 [4].
Iraq also suffers from a big shortage of electricity. In summer 2022, the power stations generated about 23 GW at peak time. However, the demand was about 34 GW [4]. In 2026, the gap became more than 35 GW [8]. In addition, Iraq depends on gas from Iran. This gas covers more than 40% of the fuel for Iraqi power plants. In March 2026, this gas supply stopped. As a result, Iraq lost more than 3000 MW of generation [8]. The flares are also a local health issue. Air sampling around Rumaila for black carbon, PM2.5, PM10, and formaldehyde gave readings that mostly exceeded both Iraqi and World Health Organization (WHO) limits [9]. For Rumaila alone, about 180 flares waste gas worth roughly 348 million US dollars per year [10]. According to the same estimate, this gas could run more than 1100 MW of generation [10]. Basrah therefore faces two problems from one source: polluted air and wasted fuel. Converting flare heat into electricity addresses both, since it narrows the power gap while cutting the emissions per unit of useful energy.
Flare gas recovery has been studied from several angles. Szpalerski and Smoliński [11] studied the extra hydrocarbon gas in refineries. They found that recovery units usually return their cost in a short time. This is true when the gas is sent to a pipeline. It is also true when the gas is used in a combined heat and power unit. Parivazh et al. [12] built an ejector–compressor recovery scheme and rated each component through exergy and exergoeconomic balances. Taha et al. [13] tested two zero-flaring options at an Egyptian gas plant; each removed about 108 tonnes of CO2 per day and was profitable. Power generation from flare gas has also been examined. Kumar et al. [14] proposed a supercritical CO2 power cycle fired by flare gas and supported by solar heat. Their system raised the overall energy efficiency by about 26%. In Iraq, Hayder et al. [15] studied flare gas recovery at a central oil field. They found that about 15 million standard cubic feet per day of gas could provide about 82 MW of power. Their gas turbine had a thermal efficiency of about 35%. Abbas and Sultan [10] estimated the power potential of all flares at Rumaila. They reported more than 1100 MW. When the gas is burnt in the flare, its heat can still be used.
One beneficial option is the externally fired gas turbine (EFGT). In an EFGT, hot flue gas heats clean compressed air in a heat exchanger. The air then drives the turbine. The turbine blades are therefore kept away from the corrosive flue gas. Reale and Massoli [16] studied an EFGT with waste heat recovery. Adding heat recovery raised the net power by at least 16%. Pressure is a second, smaller energy source. Bielka and Kuczyński [17] simulated turboexpanders at gas pressure-reduction stations and obtained more electricity at higher inlet pressure and temperature. The EFGT route also matches the conditions in Basrah. In Basrah, most power plants work with gas turbines. For this reason, local engineers have good experience in running and maintaining these machines. The EFGT is also based on a gas turbine. Therefore, it suits the skills of local staff, and it can be connected easily to the local grid.
Today, machine learning (ML) is widely applied in power and energy research. Tüfekci [18] applied ML to predict the full-load power of a combined cycle plant. The inputs were ambient conditions. In 2025, Guo et al. [19] worked on similar plant data. Their CatBoost model gave R2 = 0.97. They also added features based on thermodynamics. These features improved the accuracy of all their models. This means that physical knowledge helps ML to give better results. ML is applied in waste heat recovery as well. Wang et al. [20] simulated an organic Rankine cycle (ORC) for vehicle engines. After that, they used a neural network for fast prediction and optimization. Mandal et al. [21] compared five ML models for a solar chimney power plant. Gaussian process regression (GPR) gave the best accuracy and robustness. In these studies, a physical model first produces the data. The ML model then learns from it and provides answers in a fraction of a second; this is called a surrogate model. Classical statistical methods are still widely used.
Mohammed et al. [22] built response surface methodology (RSM) and neural network models for a heat recovery steam generator. Both models predicted steam production with about 99% accuracy. Bademlioglu et al. [23] used the Taguchi method and ANOVA for an ORC. They identified the contribution of each parameter to cycle efficiency. Ngcukayitobi et al. [24] compared three ML models for a thermo-acoustic waste heat system. A hybrid neural network gave the best result. A suitable model should also be easy to explain. Shapley values provide the share of each input in each prediction [25]. GPR also provides a smooth, well-behaved model, which suits physical data [26].
ML has also been widely used in WHR systems with different thermal cycles. Lopez-Flores et al. [27] used multilayer perceptron (MLP) models for a steam Rankine cycle, an ORC, and an absorption refrigeration cycle. They then optimized industrial WHR with these models. Flores-Tlacuahuac [28] applied deep learning to forecast the thermal and exergy efficiency of ORC systems. Deepak et al. [29] developed a tri-level WHR system that includes fuel cell heat recovery, an ORC, and ejector refrigeration. Their ML models predicted the system behavior with R2 above 0.92, and the combined efficiency improved by 17.3%. Shahid et al. [30] used an ANN to predict hydrogen yield in a steam methane reforming process with WHR, and they obtained R2 = 0.999. Table 1 summarizes these studies. Most of them deal with ORC, refrigeration, or hydrogen systems.
Table 1. ML studies on WHR systems.
In contrast, previous studies on flare gas focused on three points: the amount of lost gas, the pollution it causes, and the cost of recovery. Few studies estimated the power that can be produced from the flare heat itself. To the authors’ knowledge, no study has used ML to predict the power and efficiency of WHR from flare gas in oil fields. In addition, studies with real data from several fields are rare. Engineers in Basrah need a fast method to evaluate each flare. This method should not require a full plant simulation every time. For this reason, the current study combined a gas turbine recovery model with RSM and six ML models. These models were then tested on new operating points. They were also tested on real data from four Basrah fields. Then, Shapley values and the Taguchi method were used to identify which flare readings matter most. Using only the temperature, pressure, and flow of a flare, the tool provides its power and efficiency in real time.

2. Methodology

The work was carried out in three stages. In the first, a thermodynamic model returns the power and efficiency for any given flare condition. Second, this model produces a large dataset. Third, statistical and ML models learn from the data and are tested. This section explains the basic idea of each method and its main equations.

2.1. Thermodynamic Model

The power block is an externally fired gas turbine (EFGT), which works on the Brayton cycle [31]. In an EFGT, the turbine does not burn the fuel. Instead, the hot flue gas from an enclosed flare heats compressed air in a heat exchanger, and this clean hot air drives the turbine. EFGTs suit dirty fuels such as biomass and waste [16]. Before combustion, a turboexpander recovers the pressure energy of the gas, as is done at natural gas pressure reduction stations [17]. The flare flow V ˙ is given in standard m3/h. The fuel mass flow and its heat input, based on the lower heating value (LHV) of the gas, are:
m ˙ f = ρ std   V ˙ 3600 ,   Q ˙ fuel = m ˙ f   LHV
The flue gas leaves the flare at the measured temperature Tf. The excess-air ratio λ is found from an energy balance on one kmol of fuel:
η cc   LHV ¯ = ∑ i n i λ   h ¯ i T f − h ¯ i T 0
Here ni(λ) is the number of moles of each product (CO2, H2O, SO2, N2, and O2) per kmol of fuel, found from an atom balance of the combustion reactions; hi is the molar enthalpy of product i, and ηcc is the heat-release efficiency of the enclosed flare (Section 3.2). The left side is the heat released by one kmol of fuel, and the right side is the heat needed to warm its products from To to Tf. Because λ appears in nN2 and nO2, Equation (2) has no direct solution. It was solved numerically with Brent’s root-finding method. For example, λ is about 6.2 at 450 °C and about 2.3 at 1050 °C. The specific heat of each gas follows the polynomial of Çengel [32]:
c ¯ p T = a + bT + c T 2 + d T 3
The air leaves the heat exchanger at the turbine inlet temperature, Tin = Tf − ΔThot. The flue gas leaves at Tout = T2 + ΔTcold, where T2 is the compressor outlet temperature. The recovered heat is:
Q ˙ rec = n ˙ f ∑ i n i h ¯ i T f − h ¯ i T out
For the compressor and the turbine, with pressure ratio rp:
h 2 = h 1 + h 2 s − h 1 η c ,   h 4 = h 3 − η t   h 3 − h 4 s
s 0 T 2 s = s 0 T 1 + R ln r p ,   s 0 T 4 s = s 0 T 3 − R ln r p 1 − Δ p
The net work per kg of air and EFGT power are
w net = h 3 − h 4 − h 2 − h 1 ,   W ˙ EFGT = η gen   Q ˙ rec   w net h 3 − h 2
The pressure ratio rp is set for each case to the value that gives the highest power. Raising rp improves the Brayton efficiency, yet it also lifts T2, which leaves less flue heat to recover. Where the line pressure exceeds 1 bar g, the gas first passes through the expander, from p1 down to the burner pressure p2:
W ˙ exp = η g   m ˙ f   c p   η exp   T 1 1 − p 2 p 1 k − 1 / k
The net power and the overall efficiency, the two targets of the prediction models, follow as:
P net = W ˙ EFGT + W ˙ exp ,   η overall = P net Q ˙ fuel ,   η cycle = W ˙ EFGT Q ˙ rec
The model is based on several assumptions. All components work at steady state. Changes in kinetic and potential energy are neglected. Fuel, air, and flue gas are ideal gases. Their specific heats follow Equation (3). The gas composition in (Section 3.2) is used for all four fields. Combustion in the flare is complete. Carbon forms CO2, hydrogen forms H2O, and sulfur forms SO2. CO, NOx, and soot are neglected. Heat loss from the flare is included by ηcc. Other heat losses from the heat exchanger and pipes are neglected. Air is dry and enters the compressor at 30 °C. The isentropic and generator efficiencies are constant (Section 3.2). The pressure loss in the heat exchanger is 3%. The approach temperatures at the hot and cold ends are 50 K and 30 K. The turboexpander works only above 1 bar g. Before expansion, the gas is preheated to 90 °C by the remaining flue heat. The flare conditions are constant at each operating point. Auxiliary loads, such as fans and pumps, are neglected. These assumptions are common in EFGT and WHR studies [16,31]. They make the model fast enough to produce a large dataset. However, they give an upper estimate of the real power, as discussed in Section 4.5.
The model was validated in two steps. First, the Brayton-cycle part was tested against the worked examples of Çengel [32]. These examples use a pressure ratio of 8, a compressor inlet of 300 K, and a turbine inlet of 1300 K. For the ideal cycle, the model gave a net work of 362.3 kJ/kg and an efficiency of 42.5%, against 362.4 kJ/kg and 42.6% in the reference. With compressor and turbine efficiencies of 0.80 and 0.85, the model gave 210.5 kJ/kg and 26.6%, against 210.4 kJ/kg and 26.6%. The outlet temperatures and the back work ratio also agreed within 0.5%. Second, the full EFGT model gave a cycle efficiency of 30.1% at a turbine inlet of 1000 °C. This value is within the 25–30% reported for simple indirectly fired gas turbines [33]. These results confirm that the model is reliable.

2.2. Statistical Models

2.2.1. Response Surface Methodology (RSM)

Box and Wilson introduced RSM in 1951; they worked for the chemical company ICI and wanted a fast way to find the best conditions of a chemical process [34]. Since then, RSM has spread to almost every field of engineering, from machining and welding to energy systems [22]. RSM fits a simple polynomial between the inputs x and the response y. A second-order model was used here:
y = β 0 + ∑ i = 1 k β i x i + ∑ i = 1 k β ii x i 2 + ∑ i < j β ij x i x j + ε
Here, k = 3 inputs (temperature, pressure, and flow rate); the β terms are found by least squares, and ε is the error. The model has 10 terms.
RSM was selected for three reasons. It gives a simple explicit equation. It needs very little computing time. It is also a good baseline for the ML models. RSM is widely used in thermal systems, such as refrigeration systems [35,36] and welding processes [37], solar heating [38], etc. RSM is usually applied with a designed set of runs, such as central composite, Box–Behnken, or I-optimal designs. These designs reduce the number of costly experiments. In the current study, the data come from a thermodynamic model, and each run takes very little time. Therefore, no reduced design was needed. The second-order model was fitted to the full grid of 21,025 cases by least squares. However, one quadratic surface may not capture complex trends. In thermal systems, ANN usually gives better predictions than RSM, with higher R2 values [39]. The same trend is found in the current study, as discussed in Section 4.2.

2.2.2. Taguchi Method

Genichi Taguchi developed his method in Japan in the 1950s to improve the quality of telephone equipment at low cost [40]. In thermal and energy work, it is a common way to rank the factors that control a response [23]. The method uses orthogonal arrays, so only a few runs are needed. Here, an L25 array covers three factors at five levels in only 25 runs. The response of each run is turned into a signal-to-noise (S/N) ratio, and since both power and efficiency should be as high as possible, the “larger-the-better” ratio applies:
S / N = − 10   log 10 1 n ∑ j = 1 n 1 y j 2
The share of each factor is then found by analysis of variance (ANOVA). The sum of squares of factor f and its percent contribution are:
S S f = n l ∑ l = 1 L S / N ¯ f , l − S / N ¯ 2 ,   P C f = S S f S S T × 100 %
where nl is the number of runs at each level, L = 5 levels, and SST is the total sum of squares.

2.3. Machine Learning Models

Six ML models were selected from three families. The first family is tree ensembles, which includes RF, ET, and GBM. These models handle nonlinear data with little tuning. They also show which inputs matter most. GBM was selected because boosting gave high accuracy for power plant data [19]. The second family is ANN. It is the most common ML model in heat transfer and WHR studies [20,30]. It also gave better accuracy than RSM in two-phase heat transfer [39]. The third family is kernel methods, which include SVR and GPR. They give smooth predictions, which suit physical data. GPR also gives an uncertainty band for each prediction. In addition, it fits noise-free data from simulations very well. Testing three families shows which type suits flare WHR data best. Figure 1 shows the architecture of the six models.
Figure 1. Architecture of the ML models: (a) RF; (b) ET; (c) GBM; (d) ANN; (e) SVR; (f) GPR.

2.3.1. Random Forest (RF)

Breiman proposed RF in 2001 [41]. It grows many decision trees, each on a random sample of the data and with a random choice of inputs at each split. The final answer is the average of all trees:
y ˆ x = 1 B ∑ b = 1 B T b x
where B is the number of trees (300 here). RF became popular in engineering in the 2000s because it needs little tuning. It has been used, for example, to predict the power of combined cycle plants [19].

2.3.2. Extra Trees (ET)

Geurts et al. [42] developed the extremely randomized trees (ET) method. ET works in the same way as RF, with one difference. In ET, the cut point at each split is selected randomly, and it is not optimized. Then, the outputs of all trees are averaged, as in Equation (13). Because of this random selection, the response becomes smoother. Also, the training time becomes shorter.

2.3.3. Gradient Boosting Machine (GBM)

Friedman proposed gradient boosting in 2001 [43]. Unlike RF, the trees are built one after another. Each new tree h_m corrects the errors of the model so far:
F m x = F m − 1 x + ν   h m x
where ν is the learning rate. In the current study, the histogram-based version of GBM was applied. In this version, each input is divided into bins before training. This idea was first used in LightGBM [44]. Nowadays, boosting is one of the most common methods in power plant studies [19].

2.3.4. Artificial Neural Network (ANN)

Neural networks have a long record in modelling thermal plants and waste heat recovery units [20]. The network used here is a multilayer perceptron with 64, 64, and 32 neurons in its three hidden layers, where each layer computes:
a l = W l a l − 1 + b l
where l is the layer number (l = 1, 2, 3 for the hidden layers), a(l) is the output vector of layer l, and a(0) is the input vector (temperature, pressure, and flow rate). W(l) and b(l) are the weight matrix and bias vector of layer l, and tanh is the activation function. The output layer is linear and gives the predicted power or efficiency. The weights and biases are found by minimizing the squared error with the Adam optimizer.

2.3.5. Support Vector Regression (SVR)

SVR is a kernel-based method that is often used to predict the power of energy plants [19]. SVR fits a function that keeps most points inside a tube of width ε and ignores errors smaller than ε. The prediction is:
f x = ∑ i = 1 N α i − α i *   K x i , x + b ,   K x i , x = exp − γ x i − x 2
where x is the input vector of a new case (temperature, pressure, and flow rate), xi is that of the i-th of the N training cases, αi and αi* are the Lagrange multipliers obtained in training, and b is a constant bias. K denotes the radial basis function (RBF) kernel, whose width is set by γ. The prediction depends only on the support vectors, that is, the training cases for which αi − αi* ≠ 0.

2.3.6. Gaussian Process Regression (GPR)

GPR is a probabilistic kernel method that is widely used as a quick substitute for physical and engineering models [21,26]. It assumes that the output f(x) follows a Gaussian process with a mean of zero and a covariance function k(x, x′). This function measures how similar two input points x and x′ are. An RBF kernel is used with a separate length scale for each input, plus a noise term:
k x , x ′ = σ f 2 exp − 1 2 ∑ d = 1 3 x d − x ′ d 2 ℓ d 2 + σ n 2   δ x , x ′
In this context, xd and x′d represent the values of input d at two specific points, where d = 1 corresponds to temperature, d = 2 corresponds to pressure, and d = 3 corresponds to flow rate, while ℓd denotes the length scale associated with input d. A short length scale means the output changes quickly with that input. σf2 is the signal variance, σn2 is the noise variance, and δ(x, x′) is equal to 1 when the two points are the same and 0 otherwise. These hyperparameters are found by maximizing the likelihood of the training data. The prediction at a new point x* is:
μ x * = k * T K + σ n 2 I − 1 y
where y is the vector of the N training outputs, K is the N × N covariance matrix of the training points (Kij = k(xi, xj)), k* is the vector of covariances between x* and each training point, and I is the identity matrix. GPR gives smooth predictions and also an estimate of uncertainty. This suits data that comes from a physical model [21].
The main objectives of the current study are to: (i) develop a thermodynamic model of an EFGT with a turboexpander that gives the net power and overall efficiency from the flare gas temperature, line pressure, and flow rate; (ii) generate a dataset of 21,025 cases that covers the operating ranges of four Basrah oil fields; (iii) train and compare RSM and six ML models (RF, ET, GBM, ANN, SVR, and GPR) on random, off-grid, and field test sets; (iv) rank the effect of the three inputs by Shapley values and Taguchi ANOVA; and (v) estimate the power potential of West Qurna 1, West Qurna 2, Zubair, and Rumaila.
Figure 2 summarizes the procedure in six steps. First, the thermodynamic model was built from the gas composition and cycle settings (Section 2.1). Second, the model was run on a full grid of inputs, and the limits of this grid were set from the field data. Third, RSM and six ML models were trained on the dataset (Section 2.2 and Section 2.3). Fourth, the models were tested on a random test set, 2000 off-grid points, and the 80 measured field points. Fifth, the importance of each input was ranked by Shapley values and Taguchi ANOVA. Finally, the best model was used to predict the power and energy of the four fields.
Figure 2. Workflow of the current study.

3. Experimental Work

3.1. Study Area and Field Data

The study covers four large oil fields in Basrah Governorate, southern Iraq. Rumaila and Zubair lie to the south-west of Basrah city. West Qurna 1 and 2 are located north-west of the city. Together, these fields flare a large part of the gas burnt in Iraq [4,6]. For each field, the flare gas temperature, line pressure, and flow rate were collected from several sources. The flaring volume of each field was taken from the global flaring database of the World Bank Global Gas Flaring Reduction Partnership [1]. This database is based on observations of the Visible Infrared Imaging Radiometer Suite (VIIRS) satellite sensor. The accuracy of its volume estimates is about ±9.5% [3]. The yearly volumes were converted to hourly flow rates by dividing them by 8760 h. The flare gas temperature and line pressure were provided by engineers of the operating companies (personal communication). The line pressures are in the normal range of associated gas leaving the separators. For example, Hayder et al. sampled the associated gas of an Iraqi oilfield at the first-stage separator at about 7 kg/cm2 [15]. In 2025, the total flaring in these fields was about 4.46, 3.89, 1.75, and 1.45 billion m3 for West Qurna 2, Rumaila, West Qurna 1, and Zubair [1,4]. The flows in Table 2 cover about 25% of this total. Therefore, the power estimated in the current study is conservative. Table 2 gives the range of the 80 operating points. At every field, the data cover a series of flare temperatures at two flow rates, a low one and a high one.
Table 2. Collected flare gas conditions in the four Basrah fields.
The Zubair pressure was reported as a range of 2–6 bar g, so its middle value of 4 bar g was used. All pressures are gauge values, and all flows are at standard conditions (15 °C, 1 atm). The four fields differ clearly. West Qurna 1 and Zubair run at moderate temperatures. West Qurna 2 has the largest flow, but its line pressure is very low. In contrast, Rumaila has the hottest flares and the highest pressure. These different conditions make the field data a hard test for the models. The effect of the data uncertainty was checked with the thermodynamic model. Since the power is proportional to the flow, a flow error of ±9.5% gives a power error of about ±9.5%. A temperature error of 10 °C changes the power by about 4% at the cool fields and by about 1% at the hot fields. The effect of a 5% pressure error is below 0.1%. Therefore, the flow rate is the main source of uncertainty in the field results.

3.2. Gas Composition and Model Inputs

The exact gas analysis of each flare was not available. Therefore, a typical associated gas composition for southern Iraq was used for all fields (Table 3). Heavier hydrocarbons (C4 and above) were grouped as n-butane. The gas has a higher heating value (HHV) of about 1257 British thermal units per standard cubic foot (BTU/SCF). This is close to the 1276 BTU/SCF reported for Iraqi associated gas by Hayder et al. [15].
Table 3. Assumed composition and properties of the flare gas [15,45].
Molar mass = 22.58 kg/kmol; density = 0.955 kg/m3 at 15 °C and 1 atm; lower heating value (LHV) = 44.58 MJ/kg (42.58 MJ/m3); higher heating value (HHV) = 46.85 MJ/m3.
The effect of the gas composition was checked with four other compositions. These are a lean gas with 81 mol% CH4, a rich gas with more heavy hydrocarbons, a gas with high CO2 and H2S, and the measured flare gas of the Khabaz field [45]. The LHV changed from −8.8% to +10.5% compared with the base case. The total power of the four fields changed by almost the same amount, from 533 to 644 MW compared with 583 MW for the base case. The reason is that the fuel energy is proportional to the heating value of the gas. However, the overall efficiency changed by less than 0.05 percentage points. The efficiency depends on the flare temperature, which sets the turbine inlet temperature, and not on the fuel type. For the measured Khabaz gas, the total power was only 3.9% lower than the base case. Therefore, the main trends of the current study do not depend on the assumed composition. Only the absolute power changes, in proportion to the heating value (Table S2).
Table 4 lists the main settings of the thermodynamic model. Most of these values are common for industrial gas turbines and heat exchangers [31]. The ambient temperature was set at 30 °C. This value suits the hot weather of Basrah. The effect of higher summer temperatures is discussed in Section 4.5. The compressor and turbine efficiencies (0.85 and 0.89), the air-side pressure loss (3%), and the mechanical-generator efficiency (0.97) are common design values for industrial gas turbines [31]. The heat-release efficiency of the enclosed flare (0.95) assumes that about 5% of the fuel energy is lost through the walls and by incomplete combustion. The approach temperatures of the heat exchanger (50 K at the hot end and 30 K at the cold end) are usual design differences for a gas-to-air exchanger. Smaller differences would recover more heat, but they would need a much larger and more costly exchanger. The pressure ratio was not fixed; for each case, it was searched between 1.5 and 25 and set to the value that gives the highest net power. The turboexpander settings are design choices of the current study. The expander is used only above 1 bar g, because below this pressure, the pressure ratio is too small to justify a machine (Section 4.1). Its outlet pressure of 0.1 bar g is the minimum pressure needed at the flare burner, and its efficiency of 0.80 is a conservative value for a radial expander.
Table 4. Main settings of the thermodynamic model.
The gas is preheated to 90 °C before the turboexpander, using the leftover heat of the flue gas. This stops the gas from getting too cold after expansion, which could cause liquids or hydrates to form.

3.3. Dataset Design and Model Training

A full-factorial grid of the three inputs (Table 5) was passed through the thermodynamic model. Its limits extend slightly beyond the four fields, and its 25 × 29 × 29 = 21,025 cases each return one value of net power and one of overall efficiency.
Table 5. Levels of the input variables.
Three data sets were used to test the models. First, 20% of the grid cases (4205 cases) were held out at random as a test set, and the other 80% were used for training and 10-fold cross-validation. Second, 2000 new points were drawn by Latin hypercube sampling within the same ranges. None of these points lie on the grid, so this independent set shows how well each model works between the grid points. Third, the 80 measured points in Table 2 were used for the final check. These points represent real operating conditions.
Model accuracy on each set was measured with the coefficient of determination (R2), the root mean square error (RMSE), the mean absolute error (MAE), and the mean absolute percentage error (MAPE). To rank the effect of each input, Shapley values [25] were computed for the best model. With only three inputs, they were calculated exactly, with no approximation.
For the Taguchi analysis, an L25 orthogonal array with five levels per factor was used. The levels were 450, 600, 750, 900, and 1050 °C for temperature; 0.1, 3.5, 7.0, 10.5, and 14.0 bar g for pressure; and 50,000, 85,000, 120,000, 155,000, and 190,000 m3/h for flow rate. The responses of the 25 runs were taken from the thermodynamic model.
Table 6 gives the main settings of each model. All models were built in Python 3.13 with scikit-learn [46]. For RSM, ANN, SVR, and GPR, the inputs and outputs were first scaled to zero mean and unit variance. RSM needs no tuning. Its coefficients were found by least squares. For RF and ET, 300 trees were used, and each tree was grown to full depth. This is a common choice that gives stable results. For GBM, 800 boosting steps with a learning rate of 0.08 and 31 leaves per tree were used. The ANN has three hidden layers with 64, 64, and 32 neurons and the tanh activation. It was trained with the Adam method. Early stopping was applied to avoid overfitting. Training stopped when the validation error did not improve for 60 epochs. For SVR, the RBF kernel was used with C = 100 and ε = 0.005. For GPR, the kernel parameters were not fixed by hand. They were optimized by maximizing the log marginal likelihood [26], with several random starts. SVR and GPR were trained on random subsets of 5000 and 1500 samples, respectively. The reason is their computing cost. GPR needs the inverse of an N × N kernel matrix, so its training time grows with N3 and its memory with N2 [26]. SVR also becomes slow for large N. With these subset sizes, the training of GPR took 68 s and that of SVR 11 s (Section 4.2). The training time and the learning curves of these models are discussed in Section 4.2. They show that both models reached high accuracy at these subset sizes. For all models, the settings were checked by 10-fold cross-validation on the training set. The low spread of the cross-validation scores confirmed that the selected settings were stable.
Table 6. Settings for the prediction models.
Overfitting was monitored and limited in several ways. First, three test sets were kept out of training: a random 20% of the grid, 2000 independent off-grid points, and 80 field points. Second, 10-fold cross-validation was applied on the training set. A small spread in the scores shows that the model does not depend on one part of the data. Third, the training and test errors were compared, and learning curves were plotted (Section 4.2). Each model also has its own control. RSM has only 10 terms, which is very few compared with 16,820 training points. In RF and ET, 300 trees are averaged, which reduces the variance. GBM uses a small learning rate of 0.08, so each tree adds only a small correction. The ANN uses an L2 penalty and early stopping. Here, 10% of the training data were kept for validation, and training stopped when the validation error did not improve for 60 epochs. In SVR, the ε-insensitive loss and the limit C control the model complexity. In GPR, the noise term in the kernel and the likelihood-based tuning prevent an exact fit to every point [26].

4. Results and Discussions

4.1. Effect of the Operating Conditions

Figure 3 presents the effect of the three inputs on net power and efficiency. Temperature and flow rate have the main effect. Pressure has only a small effect. Power increases with temperature, but the increase becomes slower at high temperatures (Figure 3a). For example, at 7 bar g and 190,000 m3/h, the power is 154 MW at 450 °C. It becomes 330 MW at 750 °C and 456 MW at 1050 °C. This is related to the turbine inlet temperature. A hotter flare gives a higher turbine inlet temperature. As a result, each unit of recovered heat produces more work [47]. Power also increases linearly with flow rate. At 750 °C and 7 bar g, it increases from 87 MW at 50,000 m3/h to 330 MW at 190,000 m3/h. This is because the fuel energy is directly proportional to the flow. The effect of pressure is much weaker (Figure 3b). Below 1 bar g, the turboexpander is not used, so the curves are flat. Above 1 bar g, the expander starts to work, and power increases slowly with pressure. At 120,000 m3/h, raising the pressure from 0.1 to 14 bar g increases the power by 7.2% at 450 °C. However, the increase is only 2.3% at 1050 °C. The reason is that the expander output depends only on gas flow and pressure. So, its share becomes smaller when the turbine power increases [17,48]. Across the entire dataset, the expander never provides more than 6.7% of the total power.
Figure 3. Net power and efficiency under different operating conditions: (a) power versus flare gas temperature; (b) power versus line pressure; (c) cycle and overall efficiency versus temperature.
Both efficiencies rise with temperature (Figure 3c). The EFGT cycle efficiency increases from 10.1% at 450 °C to 30.1% at 1050 °C. The overall efficiency, from fuel energy to electricity, increases from 6.9% to 20.3% (at 7 bar g). Two effects explain this. First, the optimum pressure ratio moves from 2.6 to 9.0, and the Brayton cycle becomes more efficient as it does. Second, a hotter flue gas means less excess air (λ falls from 6.2 to 2.3), so a larger part of the fuel energy can be recovered. On the other hand, the flue gas leaves the heat exchanger hotter at high temperature (171 °C at 450 °C against 363 °C at 1050 °C).
The contour maps of Figure 4 support these trends. In Figure 4a, the lines of constant power bend, which means that temperature and flow act jointly rather than independently. This is expected, since net power is close to the fuel energy (set by flow) multiplied by the overall efficiency (set by temperature). A small hot flare and a large cool flare can therefore give the same output; 200 MW, for example, needs about 152,000 m3/h at 600 °C but only about 87,000 m3/h at 1000 °C. In other words, a hot flare needs 43% less gas to produce the same power. A high flow therefore gives the most benefit when the flare is also hot. This is useful when choosing which flares to recover first: hot flares give more power for each cubic meter of gas.
Figure 4. (a) Map of net power against temperature and flow rate at 7 bar g; (b) map of overall efficiency against temperature and pressure at 120,000 m3/h.
In Figure 4b, the efficiency bands are almost vertical. This indicates that the overall efficiency depends mainly on temperature. The effect of pressure is very small. There is only one clear change, which is a small step near 1 bar g. At this point, the turboexpander starts to work. Below 1 bar g, the pressure ratio across the expander is lower than about 1.8. The energy that can be recovered is too small, and it does not justify installing a machine. For this reason, no expander is used in this range, and the bands remain flat. Just above 1 bar g, the expander starts to work. At 1.5 bar g, the pressure ratio is 2.3, and the expander gives about 2.5 MW for a flow of 120,000 m3/h. This raises the overall efficiency by about 0.17 percentage points at all temperatures (for example, from 14.30% to 14.47% at 750 °C).
After this step, higher pressure gives only a small benefit. When the pressure increases from 1.5 to 14 bar g, the expander output increases from 2.5 to 6.6 MW. However, the overall efficiency increases by only another 0.3 percentage points. The reason is that the expander work depends on the logarithm of the pressure ratio, not on the ratio itself. Xu et al. found a similar trend at natural gas city gate stations. In their study, the recovered energy increased with inlet pressure, but the curve became flat at high pressure [49].
The gas also cools as it expands. With the inlet preheated to 90 °C, the outlet is about 51 °C at 1.5 bar g and about 1 °C at 7 bar g. Above about 7 bar g, the outlet falls below 0 °C and reaches about −23 °C at 14 bar g. Such low temperatures can form liquids or hydrates in wet gas. So, at the high-pressure fields, such as West Qurna 1 and Rumaila, the gas must be preheated more, or the expansion must be split into two stages with reheating [17]. There is enough residual flue heat (171–363 °C) to do this. Real flare flows also vary through the day, and Zhu et al. found that such fluctuation cuts the actual output of pressure-recovery units to about 58% of the theoretical value, although the units remain profitable [50]. So, the expander gains reported here should be seen as an upper limit.

4.2. Accuracy of Prediction Models

Table 7 compares the seven models on the three test sets. All models show a good fit, and R2 is higher than 0.998 in all cases. However, the real differences appear in the error values. They are clearer on the independent set and the field set. GPR is the best model for both outputs. On the independent set, it predicts the power with an RMSE of 0.22 MW and a MAPE of 0.06%. On the 80 field points, its MAPE is 0.07% for power and 0.03% for efficiency. SVR, ET, and ANN come next, with errors about two to three times those of GPR. Even the second-order RSM keeps its errors under 2%, a sign that the response surface is smooth and only mildly nonlinear.
Table 7. Performance of the models on the random test set, the independent off-grid set (2000 points), and the field set (80 points).
The R2 of GPR in Table 7 appears as 1 because of rounding. This high value does not mean overfitting. The data come from a deterministic model without noise, so a smooth model can fit them almost exactly [26]. An overfitted model would fail on new data. However, GPR stayed the most accurate model on the 2000 independent points and on the 80 field points. In addition, the noise term in its kernel and the likelihood-based tuning limit the model complexity [26]. The behavior of RF and GBM is the most important result of this comparison. On the random test set, both models look almost perfect (R2 = 0.99997 and 0.99999 for power, and close to 1 for efficiency). However, on the independent set, their RMSE increases to about 3.5 MW. This value is twice the RSM error and 16 times the GPR error (Figure 5a). In addition, their field error (2.3%) is the highest among all models. The reason is related to the way tree models predict. A decision tree divides the input space into boxes. Then, it gives one constant value for each box. RF averages many trees, and GBM adds them one by one. In both cases, the result is still a step-like surface with constant parts [51]. This surface fits well where training points are dense. However, it cannot follow a smooth curve between these points. GBM has one more limitation. Its histogram version divides each input into a fixed number of bins before training [34]. So, it cannot separate values inside the same bin. In the current grid, temperature changes in steps of 25 °C, and flow changes in steps of 5000 m3/h. The random test points lie on the same levels. Therefore, the trees find almost exact matches. The independent points fall between these levels, and here the steps of the trees appear as errors. The efficiency results show this clearly. Efficiency depends only on temperature. Every temperature in the random test set also appears in the training set. As a result, RF and GBM give a “perfect” R2 of 1. For new temperatures, their error increases to 0.17 percentage points. This is ten times the GPR error (Figure 5b).
Figure 5. Errors of the seven models on the independent off-grid set, shown as RMSE on a log scale: (a) net power; (b) overall efficiency.
This effect is a kind of hidden information leak between the training and test sets. Roberts et al. explained this problem. When data have a structure, such as a spatial or regular pattern, a random split makes the test set very similar to the training set. As a result, the model looks better than it really is. For this reason, a structured or independent test is required [52]. The study results confirm this conclusion for engineering surrogate models built on a grid. So, any study that trains ML on a full-factorial or grid dataset should also test it on points away from the grid. Extra trees (ET) are also a tree model, but they did much better (RMSE 0.35 MW, Figure 5a). ET picks its split points at random instead of at the best point [42]. With 300 trees averaged, the step edges are scattered over many positions and largely cancel, leaving a nearly smooth surface. This explains why ET behaves like smooth models, even though it is built from trees. GPR gave the best results for both outputs and on all three test sets (Figure 5a,b). GPR has also proved to be an accurate surrogate for the simulation of thermal energy systems, where it matched a grid-based model while needing about 75% less training data [53].
The RSM lies between the two groups. Its second-order polynomial is smooth, so it is not affected by the grid problem. Its error on the independent set is similar to, or slightly lower than, its error on the random test. The values are 1.68 and 1.84 MW for power, and 0.041 and 0.045 percentage points for efficiency. However, one quadratic surface has to fit the whole range. This surface cannot show the slower rise in power at high temperatures. It also cannot show the step at 1 bar g, where the expander starts to work. As a result, a small bias appears, mainly near the edges of the range (Figure 6a,b). RSM is still useful for a first estimate. However, GPR is the better choice for accurate design work.
Figure 6. Predicted against thermodynamic-model values for RSM and GPR on the independent test set: (a) net power; (b) overall efficiency.
Figure 6 compares RSM and GPR on the 2000 independent points. For net power (Figure 6a), the GPR points lie on the line of perfect agreement over the whole range, from about 45 to 445 MW. Its mean absolute error is only about 0.1 MW at low, middle, and high power alike. The RSM points are more spread out. Their mean error is about 1.2 MW in the middle of the range and rises to 1.5–1.7 MW in the lowest and highest 10% of power values, with a largest single error of 7.0 MW. This situation is where a second-order polynomial cannot follow the curved response. For overall efficiency (Figure 6b), both models look closer to the line, because efficiency depends almost only on temperature and changes smoothly. Even so, GPR is about 2.4 times more accurate (RMSE 0.017 against 0.041 percentage points). The RSM error is spread fairly evenly, at about 0.035 percentage points across the whole range. The GPR error is smallest at high efficiency (about 0.004 percentage points), where the hot flares of Rumaila and West Qurna 2 lie. Therefore, GPR is most reliable in the areas where the highest power output is anticipated. Training GPR took about 68 s, much longer than the other models, but the process is done only once. After training, it predicts all 2000 points in under a second.
Table 8 and Figure 7a compare the training and test errors of all models. For GPR, the RMSE of power is 0.20 MW on the training set, 0.19 MW on the random test set, and 0.22 MW on the independent set. SVR, ANN, and RSM show the same small gap between the three sets. This means that these models generalize well. RF and GBM behave differently. Their training error is only 0.17 MW, but their independent error rises to about 3.5 MW. ET fits the training data exactly, but it still predicts new points well (0.35 MW). The learning curves in Figure 7b support these results. For GPR, SVR, ANN, and ET, the independent error falls as the training set grows. For RF and GBM, the error stops at about 3.5 MW, even with all 16,820 training samples. More data from the same grid do not remove their step-like error. Figure 7c shows the convergence of the ANN. The training loss dropped quickly in the first 10 epochs and then stayed nearly constant. Early stopping ended the training after 69 epochs for power and 65 epochs for efficiency, while the validation R2 stayed above 0.999.
Table 8. Training and test errors (RMSE) of the models.
Figure 7. Generalization of the models: (a) training, random test, and independent RMSE of net power; (b) learning curves on the independent set; (c) training loss and validation R2 of the ANN. * ET has zero training error.
Table 9 compares the computing cost of the models. All runs used one core of an Intel Xeon 2.1 GHz processor with 7 GB of RAM. RSM is the cheapest model. It was trained in 0.07 s, and its size is only 0.002 MB. This agrees with the high computing efficiency of RSM reported in thermal studies [39]. However, its accuracy is limited, as shown in Table 7. RF and ET were trained in about 6 s, but they need the most memory (421 and 669 MB) because they store 300 full-depth trees. They are also the slowest in prediction. GBM is compact (2.7 MB), but its off-grid error is high. The ANN is a good compromise. It is small (0.16 MB) and very fast in prediction, with good accuracy. SVR and GPR need more training time because their cost grows quickly with the number of samples. For this reason, they were trained on subsets of 5000 and 1500 samples. GPR had the longest training time (68 s) and a peak training memory of 258 MB. However, this cost is paid only once. After training, GPR needs 17 MB and predicts 1000 cases in 14 ms. Therefore, GPR gives the best balance between accuracy and cost for the current problem.
Table 9. Computing cost of the models (net power).

4.3. Importance of the Inputs

Shapley values and Taguchi ANOVA were used to rank the three inputs. The two methods are very different, but they provide the same ranking. For net power, flow rate is the most important input, with 55.0% of the total Shapley importance (Figure 8). Color shows the input value, from low (blue) to high (red), and the percentage under each input is its share of total importance. Temperature is close behind at 43.7%, while pressure accounts for only 1.3%. High flows and high temperatures (red points) increase the power. Low values decrease it. For efficiency, the pattern is different (Figure 8b). Temperature has 97.2% of the importance, and pressure has 2.8%. Flow rate has no effect. This result agrees with physics. The plant changes linearly with flow. So, a larger flare gives more power, but it does not give higher efficiency.
Figure 8. Shapley values of the GPR model for 600 random points: (a) net power; (b) overall efficiency.
The Taguchi results confirm the Shapley ranking (Figure 9a,b, Table 10). For power, flow rate gives 60.0% of the variation, and temperature 39.9%. For efficiency, temperature gives 99.8%. The main effect plots also show the best settings: the highest temperature (1050 °C) and the highest flow (190,000 m3/h) for power and the highest temperature for efficiency. Pressure is statistically significant (F = 22.0), but its share is very small. The temperature effect is strongest between 450 and 750 °C and becomes weaker above 900 °C, as also seen in Figure 3a.
Figure 9. Main effects of process parameters on the mean S/N ratio from the Taguchi L25 design: (a) net power; (b) overall efficiency.
Table 10. ANOVA of the S/N ratios from the Taguchi L25 design.
The agreement between a local, model-based method (Shapley) and a global, design-based method (Taguchi) adds confidence to the results. In practice, it means that operators should first look at the flare temperature and flow. Line pressure matters only when a turboexpander is considered.

4.4. Power Potential of the Four Basrah Fields

The GPR model was applied to the 80 measured points of the four fields. Table 11 and Figure 10 and Figure 11 present the results. The yearly energy assumes that the plant runs 90% of the time.
Table 11. Predicted power, efficiency, and yearly energy for each field.
Figure 10. Mean net power of each field, with the range from the lowest to the highest operating point.
Figure 11. GPR prediction against the thermodynamic model for the 80 measured field points.
The four fields together could provide about 583 MW on average, or about 4600 GWh of electricity per year. West Qurna 2 has the largest potential, with a mean of 286 MW (Figure 10). This advantage is because it has both the largest flow (up to 187,557 m3/h) and a high flare temperature (800–1000 °C). Its pressure is only 0.11 bar g, so it gains nothing from the turboexpander. Rumaila comes second with 145 MW. Its flow is moderate, but it has the hottest flares (950–1030 °C) and the highest overall efficiency (up to 20.1%). In addition, it gains 3–4 MW from its high pressure of 13.8 bar g.
West Qurna 1 (75 MW) and Zubair (78 MW) give almost the same results. Their flares have the lowest temperatures among the four fields (470–650 °C). For this reason, their overall efficiency is only about 7–12%. A large amount of heat is recovered in these fields. However, a simple EFGT converts only a small part of it into power. A combined cycle would be more suitable for them. Another option is a bottoming cycle that uses the remaining flue heat.
The overall efficiency is low at all four fields, and the reason is clear when it is split into two steps. First, the heat exchanger recovers only about 63–66% of the fuel energy. About 5% is lost from the flare itself, and the rest leaves with the flue gas at 170–360 °C. Second, the gas turbine cycle converts only 11–19% of the recovered heat into power at West Qurna 1 and Zubair, and 24–30% at Rumaila and West Qurna 2. Most of the loss occurs in this second step, as a simple Brayton cycle performs well only at a high turbine inlet temperature [31,47]. With a turbine inlet of only 420–600 °C at West Qurna 1 and Zubair, the compressor absorbs most of the turbine work and little net power remains. At Rumaila and West Qurna 2, the inlet reaches 750–980 °C, hence their higher efficiency. Low as these figures are, they apply to gas that is now simply burnt, so each recovered megawatt comes without any extra fuel.
The GPR model reproduces the field results almost exactly (Figure 11). The mean predicted power of each field differs from the thermodynamic model by less than 0.2 MW. Therefore, the trained model can be used as a quick tool to judge any flare in these fields from its three readings.
The value of 583 MW is important for Basrah. It is close to the capacity of a medium-size gas turbine station. This power can cover a useful part of the supply gap in the hot summer months. In this period, the grid is under the highest load [8]. In addition, recovering this heat supports Iraq’s target to stop gas flaring emissions by 2027. It also supports the national plan to decarbonize the petroleum industry [54].
These results are in line with earlier studies. The cycle efficiency of the current EFGT model (30.1% at a turbine inlet of 1000 °C) agrees with the 25–30% reported for simple indirectly fired gas turbines [33]. Camporeale et al. obtained higher values of 31–33% because their dual-combustion design adds extra firing and steam injection [55]. Direct burning of treated flare gas in a gas turbine gives about 4.6 MW per 1000 m3/h [15], against 0.9–2.4 MW per 1000 m3/h in the current study, since only the flare heat is used here.

4.5. Comparison with Earlier Studies and Limitations

The overall efficiency found in the current study (6.5–20.4%) is lower than that of a gas turbine that burns the flare gas directly. For such a plant in an Iraqi field, Hayder et al. reported a thermal efficiency of about 35% [15]. However, the two routes serve different needs. A direct gas turbine needs clean, dry gas at high pressure, so the gas must first be treated and compressed. The EFGT route burns the gas in its original state, sour or wet and at any pressure, and only its heat is transferred to the turbine. Therefore, it can be added to an existing flare with fewer changes. Abbas and Sultan estimated more than 1100 MW from all Rumaila flares by direct use of the gas [10]. The lower values for the Rumaila points in the current study are due to the smaller flows in the field data and the lower efficiency of heat recovery.
Other systems also reach higher efficiencies. Direct and dual-combustion gas turbines reach 31–35%, and indirectly fired gas turbines reach 25–30% [15,53,54]. These systems burn the fuel to give a high turbine inlet temperature. In the current study, the turbine uses only the flare heat. Its inlet temperature is 420–1000 °C, and the heat exchanger recovers only about 65% of the fuel energy. For the same reason, the specific power is 0.9–2.4 MW per 1000 m3/h, against about 4.6 MW for a direct gas turbine [15]. However, the current system needs no gas treatment or compression. It uses heat that is now lost, so every megawatt is produced without extra fuel. In other studies, adding WHR or a bottoming cycle raised the output by 16–17% [16,29]. A similar gain is possible here, because the flue gas still leaves at 171–363 °C. Even with the present efficiency, the four fields can give about 583 MW.
The ML results agree with earlier work. Mandal et al. also found GPR to be the most accurate and robust model for a power plant studied with simulated data [21]. Guo et al. found boosting models best for real plant data [19]. Real data contain noise, which boosting handles well. In contrast, the data of the current study come from a smooth physical model, which favors GPR. The current study also adds one more point. On grid-based data, tree models can look perfect on a random test and still make errors between the grid points.
The current study has some limitations. One typical gas composition was used for all fields, because a gas analysis of each flare was not available. The real gas changes between fields and with time, and this affects the heating value and the power. However, this effect was within about ±10% of the power (Section 3.2). The thermodynamic model assumes steady state and complete combustion. Heat losses from the heat exchanger and pipes are neglected, and so are the auxiliary loads. For this reason, the calculated power at each point is an upper limit. The flare conditions were also taken as constant at each point. In the field, the flow changes from hour to hour, and the real output becomes lower [50]. The ambient temperature was fixed at 30 °C. In the Basrah summer, the air can reach 50 °C, and the output of the gas turbine would drop. The field data are limited to 80 points, and the Zubair pressure was given only as a range. In addition, the outputs come from a thermodynamic model, not from a working plant. The ML models learned from these data within the ranges of Table 5. They are not suitable for conditions outside these ranges without new training.
The economics of the system are also limited by the heat exchanger. A turbine inlet close to 1000 °C requires nickel-based alloys or ceramics, which raise the capital cost. Since the flare gas is free, the levelized cost of electricity (LCOE) of the system depends mainly on this capital cost. A full LCOE calculation needs detailed cost data, which were not available in the current study. However, published studies show that flare gas recovery for power is profitable. Shayan et al. reported rates of return of 18.7–32.0% for four flare gas recovery routes, with the highest return for the combined cycle [56]. For an Iraqi oilfield, Hayder et al. found a net present value of about 134 million USD for a 29 million USD recovery project [15]. The material cost can also be reduced by limiting the turbine inlet temperature. When the inlet temperature was limited to 800–850 °C in the model, the power at the hot fields dropped by only 6–9%. At these temperatures, cheaper high-temperature steels can be used. Therefore, a lower turbine inlet temperature may give a lower LCOE, even with a small loss of power.

5. Conclusions

The current study examined the recovery of flare gas heat for power generation in four oil fields of Basrah, southern Iraq. A thermodynamic model of an externally fired gas turbine with a turboexpander was used to build a dataset of 21,025 cases covering 450–1050 °C, 0.1–14 bar g, and 50,000–190,000 m3/h. Seven prediction models were trained on these cases and tested on a random split, 2000 off-grid points, and 80 measured field points. The effect of each input was ranked by Shapley values and by a Taguchi L25 design with ANOVA. The main conclusions are:
  • Net power increased with flare gas temperature and flow rate, from 38 to 458 MW over the studied range. The overall efficiency rose from 6.5% to 20.4%, controlled almost entirely by temperature. Line pressure added at most 6.7% of the total power through the turboexpander, which operated only above 1 bar g.
  • GPR was the most accurate model for both outputs. On the off-grid test set, it gave an RMSE of 0.22 MW for power and 0.017 percentage points for efficiency, and its error on the field points was below 0.1%.
  • RF and GBM appeared almost exact on the random test set but gave an RMSE of about 3.5 MW on the off-grid points. A random split of grid-based data therefore overstates the accuracy of tree-based models, and an independent off-grid test is required for a reliable assessment.
  • Shapley values and Taguchi ANOVA gave the same ranking of the inputs. Flow rate (55–60%) and temperature (40–44%) controlled the net power, while temperature controlled 97.2% (Shapley) and 99.8% (Taguchi) of the overall efficiency.
Taken together, the four fields could generate about 583 MW, close to 4600 GWh a year, with West Qurna 2 contributing the most (286 MW), then Rumaila (145 MW), Zubair (78 MW), and West Qurna 1 (75 MW).

Supplementary Materials

The following supporting information can be downloaded at: https://www.mdpi.com/article/10.3390/thermo6040097/s1. Table S1: Nomenclature (symbols, Greek symbols, subscripts, and abbreviations); Table S2: Effect of the gas composition on the heating value, net power, and overall efficiency for the 80 field points.

Author Contributions

Conceptualization, A.K.J. and R.A.-S.; methodology, K.B.S. and H.I.K.; software, K.B.S. and R.A.-S.; validation, K.B.S., A.K.J. and H.I.K.; formal analysis, K.B.S. and R.A.-S.; investigation, K.B.S. and A.K.J.; resources, A.K.J. and H.I.K.; data curation, K.B.S. and A.K.J.; writing—original draft preparation, K.B.S. and R.A.-S.; writing—review and editing, A.K.J. and R.A.-S.; visualization, K.B.S. and R.A.-S.; supervision, A.K.J. and R.A.-S.; project administration, A.K.J. and R.A.-S. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Data Availability Statement

The original contributions presented in this study are included in the article/supplementary material. Further inquiries can be directed to the corresponding author.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. World Bank. Global Gas Flaring Data. Global Gas Flaring Reduction Partnership (GGFR). Available online: https://www.worldbank.org/en/programs/gasflaringreduction/global-flaring-data (accessed on 1 December 2026).
  2. World Bank. Global Gas Flaring Tracker Report; World Bank: Washington, DC, USA, 2026. [Google Scholar] [CrossRef] [Scilit]
  3. Elvidge, C.D.; Zhizhin, M.; Baugh, K.; Hsu, F.-C.; Ghosh, T. Methods for global survey of natural gas flaring from Visible Infrared Imaging Radiometer Suite data. Energies 2016, 9, 14. [Google Scholar] [CrossRef] [Scilit]
  4. Toledano, P.; David, M.; Bernstein, A.; Mitro, T. Igniting Action to Reduce Gas Flaring: Real Opportunities. Real Projects. Real Results; Columbia Center on Sustainable Investment: New York, NY, USA, 2025. [Google Scholar] [CrossRef] [Scilit]
  5. Faruolo, M.; Genzano, N.; Marchese, F.; Pergola, N. Multi-temporal satellite investigation of gas flaring in Iraq and Iran: The DAFI porting on Collection 2 Landsat 8/9 and Sentinel 2A/B. Sensors 2023, 23, 5734. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  6. Baban, M. Gas Flaring: A Field-by-Field and Province-by-Province Analysis in Iraq and the Kurdistan Region; Rudaw Research Center: Erbil, Iraq, 2025; Available online: https://www.rudawrc.net/en/article/gas-flaring-a-field-by-field-and-province-by-province-in-iraq-and-the-kurdistan-region-2025-04-09 (accessed on 15 October 2026).
  7. Al Sharaa, H.M.J. Spatial estimation for gas flaring and natural gas waste from oil production using remote sensing and GIS techniques. Al-Esraa Univ. Coll. J. Eng. Sci. 2026, 8, 269–279. [Google Scholar] [CrossRef] [Scilit]
  8. Istepanian, H. Iraq’s Electricity Sector Caught in a Perfect Storm. Available online: https://energy.auis.edu.krd/articles/iraqs-electricity-sector-caught-in-a-perfect-storm (accessed on 15 October 2026).
  9. Khreebsh, H.T.; Azeez, N.M. Assessment of gas flaring on air quality in the Al-Rumaila oil field region in Basra Governorate, Iraq. Environ. Asia 2024, 17, 105–115. [Google Scholar] [CrossRef]
  10. Abbas, H.A.; Sultan, H.S. Economic losses from flaring gases in Rumaila oil field. Basrah J. Eng. Sci. 2024, 24, 88–95. [Google Scholar] [CrossRef] [Scilit]
  11. Szpalerski, J.; Smoliński, A. Analysis of the excess hydrocarbon gases output from refinery plants. Processes 2019, 7, 253. [Google Scholar] [CrossRef] [Scilit]
  12. Parivazh, M.M.; Mousavi, M.; Naderi, M.; Rostami, A.; Dibaj, M.; Akrami, M. The feasibility study, exergy, and exergoeconomic analyses of a novel flare gas recovery system. Sustainability 2022, 14, 9612. [Google Scholar] [CrossRef] [Scilit]
  13. Taha, A.; Abdelalim, G.; AboulFotouh, T. The impact of a zero-flaring system on gas plants, environment, and health. J. Eng. Appl. Sci. 2024, 71, 131. [Google Scholar] [CrossRef] [Scilit]
  14. Kumar, L.; Sleiti, A.K.; Al-Ammari, W.A.; Hassan, I.; Rezaei-Gomari, S.; Rahman, M.A. Thermo-economic analysis of flare gas recovery for power and clean water production using integrated concentrated solar power and direct oxy-fuel combustion. Energy 2025, 335, 138091. [Google Scholar] [CrossRef] [Scilit]
  15. Hayder, H.A.; Shi, P.; Kadem, M.J.; Shyaa, A.N. From flare to power: Flare gas recovery in a central Iraqi oilfield (case study). J. Pet. Res. Stud. 2026, 16, 145–173. [Google Scholar] [CrossRef] [Scilit]
  16. Reale, F.; Massoli, P. A hybrid energy system based on externally fired micro gas turbines, waste heat recovery and gasification systems: An energetic and exergetic performance analysis. Energies 2024, 17, 3621. [Google Scholar] [CrossRef] [Scilit]
  17. Bielka, P.; Kuczyński, S. Energy recovery from natural gas pressure reduction stations with the use of turboexpanders: Static and dynamic simulations. Energies 2022, 15, 8890. [Google Scholar] [CrossRef] [Scilit]
  18. Tüfekci, P. Prediction of full load electrical power output of a base load operated combined cycle power plant using machine learning methods. Int. J. Electr. Power Energy Syst. 2014, 60, 126–140. [Google Scholar] [CrossRef] [Scilit]
  19. Guo, B.; Yang, B.; Shi, W.; Yang, F.; Wang, D.; Wang, S. CCPP power prediction using CatBoost with domain knowledge and recursive feature elimination. Energies 2025, 18, 4272. [Google Scholar] [CrossRef] [Scilit]
  20. Wang, X.; Chen, X.; Xing, C.; Ping, X.; Zhang, H.; Yang, F. Performance analysis and rapid optimization of vehicle ORC systems based on numerical simulation and machine learning. Energies 2024, 17, 4542. [Google Scholar] [CrossRef] [Scilit]
  21. Mandal, D.K.; Vaishali; Gupta, K.K.; Biswas, N.; Manna, N.K.; Santra, S.; Cuce, E. A novel comparative study of machine learning surrogate models for solar chimney (SC) plant performance evaluation: Thermo-physical insights. Energy 2025, 330, 136744. [Google Scholar] [CrossRef] [Scilit]
  22. Mohammed, A.; Al-Mansour, M.; Ghaithan, A.M.; Alshibani, A. An optimization approach for improving steam production of heat recovery steam generator. Sci. Rep. 2025, 15, 3860. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  23. Bademlioglu, A.H.; Canbolat, A.S.; Yamankaradeniz, N.; Kaynakli, O. Investigation of parameters affecting Organic Rankine Cycle efficiency by using Taguchi and ANOVA methods. Appl. Therm. Eng. 2018, 145, 221–228. [Google Scholar] [CrossRef] [Scilit]
  24. Ngcukayitobi, M.; Tartibu, L.K.; Bannwart, F. Enhancing thermo-acoustic waste heat recovery through machine learning: A comparative analysis of artificial neural network–particle swarm optimization, adaptive neuro fuzzy inference system, and artificial neural network models. AI 2024, 5, 13. [Google Scholar] [CrossRef] [Scilit]
  25. Lundberg, S.M.; Lee, S.-I. A unified approach to interpreting model predictions. In Advances in Neural Information Processing Systems 30 (NIPS 2017); Curran Associates: Red Hook, NY, USA, 2017; pp. 4765–4774. [Google Scholar]
  26. Rasmussen, C.E.; Williams, C.K.I. Gaussian Processes for Machine Learning; MIT Press: Cambridge, MA, USA, 2006. [Google Scholar] [CrossRef] [Scilit]
  27. López-Flores, F.J.; Rubio-Castro, E.; Ponce-Ortega, J.M. Incorporating machine learning for thermal engines modeling in industrial waste heat recovery. Chem. Eng. Res. Des. 2022, 181, 239–252. [Google Scholar] [CrossRef] [Scilit]
  28. Flores-Tlacuahuac, A.; Gutierrez-Limon, M.A.; Sales-Cruz, M. A probabilistic deep learning approach for thermal and exergy forecasting in organic Rankine cycles. Comput. Chem. Eng. 2022, 168, 108029. [Google Scholar] [CrossRef] [Scilit]
  29. Deepak, G.; Sudha, L.; Pauline, S.; Ketaraju, V.D.S.; Aravindan, N.; Neelima, S. Thermodynamic modeling and AI-enhanced optimization of a novel tri-level waste heat recovery system for industrial processes. Therm. Sci. Eng. Prog. 2024, 56, 103098. [Google Scholar] [CrossRef] [Scilit]
  30. Shahid, M.I.; Farhan, M.; Rao, A.; Li, W.; Salam, H.A.; Xiao, Q.; Chen, T.; Li, X.; Ma, F. Effect of methane/water flowrate on waste heat recovery and hydrogen production by steam methane reforming process and predicted by artificial neural network (ANN). Energy 2025, 331, 136877. [Google Scholar] [CrossRef] [Scilit]
  31. Saravanamuttoo, H.I.H.; Rogers, G.F.C.; Cohen, H. Gas Turbine Theory, 5th ed.; Pearson Education: Harlow, UK, 2001. [Google Scholar]
  32. Çengel, Y.A.; Boles, M.A. Thermodynamics: An Engineering Approach; McGraw-Hill: New York, NY, USA, 2004. [Google Scholar]
  33. Pierobon, L.; Nguyen, T.-V.; Mazzucco, A.; Larsen, U.; Haglind, F. Part-load performance of a wet indirectly fired gas turbine integrated with an organic Rankine cycle turbogenerator. Energies 2014, 7, 8294–8316. [Google Scholar] [CrossRef] [Scilit]
  34. Al-Sabur, R. Tensile strength prediction of aluminium alloys welded by FSW using response surface methodology—Comparative review. Mater. Today Proc. 2021, 45, 4504–4510. [Google Scholar] [CrossRef] [Scilit]
  35. Pektezel, O.; Ozdemir, S.N. Performance optimization of new generation R290 and R1234yf refrigerants: A response surface methodology approach. Appl. Therm. Eng. 2025, 269, 125927. [Google Scholar] [CrossRef] [Scilit]
  36. Prabakaran, R.; Mohanraj, T.; Dhamodharan, P.; Kim, S.C. Comparative condensation analysis of low-GWP refrigerants in a plate heat exchanger with response surface methodology optimization. Int. Commun. Heat Mass Transf. 2025, 169, 109653. [Google Scholar] [CrossRef] [Scilit]
  37. Al-Sabur, R.; Slobodyan, M.; Chhalotre, S.; Verma, M. Contact resistance prediction of zirconium joints welded by small scale resistance spot welding using ANN and RSM models. Mater. Today Proc. 2021, 47, 5907–5911. [Google Scholar] [CrossRef] [Scilit]
  38. Abo-Zahhad, E.M.; Hachicha, A.A.; Mistarihi, M.Z.; Salim, M.H.; Esmail, M.F.C. Optimization of ground material properties for enhanced solar chimney power plant efficiency: A CFD and RSM approach. Energy Rep. 2025, 13, 3929–3945. [Google Scholar] [CrossRef] [Scilit]
  39. Prabakaran, R.; Mohanraj, T.; Dhamodharan, P.; Sathishkumar, A.; Dhivagar, R.; Kim, S.C. Comparative evaluation of the ANN and RSM predictive modeling of the evaporation heat transfer characteristics of R290 in a plate heat exchanger. Appl. Therm. Eng. 2026, 299, 131135. [Google Scholar] [CrossRef] [Scilit]
  40. Asmare, A.; Al-Sabur, R.; Messele, E. Experimental investigation of friction stir welding on 6061-T6 aluminum alloy using Taguchi-based GRA. Metals 2020, 10, 1480. [Google Scholar] [CrossRef] [Scilit]
  41. Breiman, L. Random forests. Mach. Learn. 2001, 45, 5–32. [Google Scholar] [CrossRef] [Scilit]
  42. Geurts, P.; Ernst, D.; Wehenkel, L. Extremely randomized trees. Mach. Learn. 2006, 63, 3–42. [Google Scholar] [CrossRef] [Scilit]
  43. Friedman, J.H. Greedy function approximation: A gradient boosting machine. Ann. Stat. 2001, 29, 1189–1232. [Google Scholar] [CrossRef] [Scilit]
  44. Ke, G.; Meng, Q.; Finley, T.; Wang, T.; Chen, W.; Ma, W.; Ye, Q.; Liu, T.-Y. LightGBM: A highly efficient gradient boosting decision tree. In Advances in Neural Information Processing Systems 30 (NIPS 2017); Curran Associates: Red Hook, NY, USA, 2017; pp. 3146–3154. [Google Scholar]
  45. Baker, S.A.B. The possibility of using associated gases of the Khabaz oil field in supporting the production of electrical energy. J. Pet. Res. Stud. 2018, 8, 92–105. [Google Scholar] [CrossRef] [Scilit]
  46. Pedregosa, F.; Varoquaux, G.; Gramfort, A.; Michel, V.; Thirion, B.; Grisel, O.; Blondel, M.; Prettenhofer, P.; Weiss, R.; Dubourg, V.; et al. Scikit-learn: Machine learning in Python. J. Mach. Learn. Res. 2011, 12, 2825–2830. [Google Scholar]
  47. Elwardany, M.; Nassib, A.M.; Mohamed, H.A.; Abdelaal, M.R. Modeling of performance and thermodynamic study of a gas turbine power plant. Therm. Sci. Eng. 2024, 7, 8016. [Google Scholar] [CrossRef] [Scilit]
  48. Ermiş, M.; Çelik, M. Energy recovery and hydrogen production potential assessment in a natural gas pressure reduction station. Process Saf. Environ. Prot. 2024, 189, 693–701. [Google Scholar] [CrossRef] [Scilit]
  49. Xu, W.; Zhao, P.; Gou, F.; Liu, A.; Wu, W.; Wang, J. Performance analysis of a power generation system for pressure energy recovery at natural gas city gate stations. Appl. Therm. Eng. 2022, 213, 118714. [Google Scholar] [CrossRef] [Scilit]
  50. Zhu, X.; He, W.; Lei, Q.; Liu, Q. Optimization design of natural gas differential pressure power generation under flow fluctuation. Petroleum 2025, 11, 226–233. [Google Scholar] [CrossRef] [Scilit]
  51. Liu, Z.; Luong, P.; Boley, M.; Schmidt, D.F. Improving random forests by smoothing. Mach. Learn. 2026, 115, 152. [Google Scholar] [CrossRef] [Scilit]
  52. Roberts, D.R.; Bahn, V.; Ciuti, S.; Boyce, M.S.; Elith, J.; Guillera-Arroita, G.; Hauenstein, S.; Lahoz-Monfort, J.J.; Schröder, B.; Thuiller, W.; et al. Cross-validation strategies for data with temporal, spatial, hierarchical, or phylogenetic structure. Ecography 2017, 40, 913–929. [Google Scholar] [CrossRef] [Scilit]
  53. Lemos, L.F.L.; Starke, A.R.; da Silva, A.K. Constrained Gaussian processes as a surrogate model for simulation-based optimization of solar process heat systems. Appl. Energy 2025, 395, 126028. [Google Scholar] [CrossRef] [Scilit]
  54. AlSalait, A.; Al-Sabur, R. Decarbonization of Iraq’s Petroleum Industry: Challenges and Opportunities; Cambridge Open Engage: Cambridge, UK, 2024. [Google Scholar] [CrossRef] [Scilit]
  55. Camporeale, S.M.; Fortunato, B.; Pantaleo, A.M.; Sciacovelli, D. Biomass utilization in dual combustion gas turbines for distributed power generation in Mediterranean countries. In Proceedings of the ASME Turbo Expo 2011, Vancouver, BC, Canada, 6–10 June 2011. GT2011-45727. [Google Scholar] [CrossRef] [Scilit]
  56. Shayan, M.; Pirouzfar, V.; Sakhaeinia, H. Technological and economical analysis of flare recovery methods, and comparison of different steam and power generation systems. J. Therm. Anal. Calorim. 2020, 139, 2399–2411. [Google Scholar] [CrossRef] [Scilit]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Article Metrics

Citations

Article Access Statistics

Article metric data becomes available approximately 24 hours after publication online.