Review of underbalanced drilling techniques highlighting the advancement of foamed drilling fluids

Overbalanced drilling is the most common drilling technique; nevertheless, it has several disadvantages such as formation damage, mud losses, and stuck pipes; challenges that are common in high permeability zones and highly fractured formations. To overcome those issues, the underbalanced drilling method could be implemented. The underbalanced drilling (UBD) technique is widely utilized in hard, under pressure, depleted, and fractured/vuggy formations. Low-density drilling fluids are usually used in UBD operations and could be categorized into a gas (i.e., air, nitrogen, and natural gas) or two-phase (i.e., mist and foam). Although foamed fluid attracted attention in enhanced oil recovery and hydraulic fracturing operations, it is ideal for UBD operations due to its low density and efficient transport capacity. This paper highlights the applications, limitations, advantages, and disadvantages of UBD operations. It also discusses the drilling foam chemistry, structure, characterization, and rheological properties. Finally, this paper highlights a few successful UBD operations utilizing foamed drilling fluids worldwide.


Introduction
The process of oil and gas well drilling involves creating a hole several miles deep into the ground until a reservoir section is reached. The hole is made by rotating a bit to which downward forces are applied (Bourgoyne et al. 1986). Drill string is used to make the drill bit rotate at the bottom of the wellbore. It consists of drill pipes and the bottom hole assembly.
During the drilling process, drilling fluid is injected through the drill string, which leaves through the nozzles of the drill bit to cool, lubricate the bit and the drilling string, and transport the cutting to the surface (Ayling et al. 2002;Guo Boyun and Liu 2011). Many types of drilling fluids are utilized in the drilling process such as water, oil, synthetic, gas, or foam-based fluids. Water-based muds are the most formulated with additives including polymer beads, fibers, or nanoparticles to enhance their rheological properties (Mahmoud et al. 2020). However, they show some critical issues; at elevation temperature, the rheological properties may change, affecting the penetration rate (Li et al. 2020b). Furthermore, water-sensitive formations such as shale could swell by water, leading to shale instability (Saleh 2022). These issues could be overcome by utilizing oil-based drilling fluids. They have shown good rheological properties, thermal stability, and shale inhibition properties. In terms of environmental issues, some concerns with oil-based drilling were addressed such as toxicity. Synthetic-based drilling fluids are usually composed of synthetic organic compounds that are dispersed in salt brine to form an emulsion. They were designed to substitute oil-based mud in complicated drilling situations due to their low toxicity (Paul and Adewale 2018). However, they are costly. Air or foam-based drilling fluids are utilized in underbalanced drilling to minimize the formation damages, enhance cuttings transportation and hole cleaning. However, the successful application of foam depends on foam stability.
The main function of drilling mud is to offer the hydrostatic pressure, added to the frictional pressure drop in the annular space between the drill string and wellbore/casing required to balance the reservoir formation pressure. The technique where the pressure in the wellbore is larger than the reservoir pressure is known as overbalanced drilling technique. However, when the hydrostatic pressure is less than the formation pressure, the well is said to be underbalanced (Lyons et al. 2021). The most common drilling method is overbalance, where the hydrostatic pressure is larger than the formation pressure to prevent any influx of formation fluids (i.e., water, gas, and oil) into the wellbore (Moore and Ormsby 1974).
To keep the well overbalanced all the time during an operation, the mud weight should be higher than the formation pore pressure (Sloan et al. 1975), as shown in Fig. 1. However, if the borehole pressure is too high, it can cross the fracture initiation pressure, resulting in rock breakdown and loss of drilling fluid to the formation (Aarsnes 2016). This can result in an expensive drilling operation due to formation damage and loss of costly drilling fluid, which in some situations hinder drilling from proceeding further. Therefore, in overbalanced operations, wellbore pressure should be kept above the formation pore and collapse pressures and below the fracture pressure in the exposed zone.
Overbalanced drilling (OBD) techniques are subjected to formation damage with varying degrees of severity, depending upon the formation condition (Jilani et al. 2002). Formation damage occurs mainly due to the invasion of drilling fluids into the near-wellbore, altering the flowing properties and reducing the productivity or injectivity (Ding et al. 2004). Various authors have documented the mechanism of formation damage (Krueger 1988;Bennion and Thomas 1994;Bennion 2003;Ling et al. 2015) and can be summarized as shown in Table 1.
However, horizontal wells are well-known for formation damage for some reasons, including drilling of horizontal wells takes longer time which results in potential deeper entry of damaging filtrates and solids (Bennion et al. 1998c). Additionally, most of the horizontal wells are completed in an open hole technique, causing fairly shallow invasive formation damage (Shaw and Chee 1996). Moreover, horizontal drilling suffers from poor cleanup due to the localized drawdown (Saleh et al. 1997). In some cases where the vertical permeability is not equivalent to the horizontal permeability, the damage is preferentially created out in the streamline of greatest permeability (Bennion et al. 1998c).
Additionally, differential sticking and low penetration rate are the most concerning disadvantages of the OBD method. The severity of differential sticking is ranged from a minor problem to major complications that can have significant undesirable consequences, including loss of the drill string or complete loss of the well (Qutob 2004). Differential sticking is known as stuck pipe caused by differential pressure forces from an overbalanced mud column acting on the drill string against a filter cake deposited on a permeable formation. This mechanism of pipe sticking usually arises while the pipe is stationary such as when Table 1 A summary of the most common formation damage types that occurred during OBD

Damage type
Refs.
Fines migration This shows the ability of in situ fine particles to move through a formation. This movement is strongly attributed to matrix wettability. Typically, the mobility of particles tends to be a very critical problem in the clastic environment due to the higher concentration of mobile materials (Byrne et al. 2000;Jaf et al. 2017) External solids entrainment During OBD operation, a net positive pressure exists, which may lead to driving the fluid and associated solids into the formation. Typically, conventional drilling fluids have a wide variety of suspended solids such as weighting materials, fluid loss agents, and solid loss circulation materials. This type of damage is attributed to a region typically very close to the wellbore (1-2 cm in depth). It mainly occurred in an open hole or uncemented linear situation (Gruesbeck and Collins 1982;Qutob 2004) Phase trapping Phase trapping is the permanent or temporary trapping of oil or water-based fluids introduced into the porous media during the drilling. The phase trapping caused a major reduction in permeability. The mechanism of phase tapping takes place when the wetting phase (water-based or formation fluids) comes into contact with a sub irreducibly saturated formation and is absorbed into the porous medium through the overbalanced pressure, decreasing the relative permeability to the phase which expected to be produced or injected. A tight gas reservoir, with its low porosity and low permeability, is too sensitive to aqueous phase trapping (APT) ) (Bennion et al. 1996a;Yu et al. 2010) Clay swelling Clay swelling is known as the reaction between hydrophilic materials and freshwater or water with low salinity (Bennion and Thomas 1994). The mechanism of expansion and sloughing of clays can cause a major reduction in permeability depending on the amount and location of the clay in the rock matrix. For example, if the swelling occurred in the pore throat, only a small amount of expansion can cause a massive reduction in permeability in this configuration (Bennion 2002) Chemical and polymer adsorption Conventional drilling may contain polymers and high molecular weight materials, which improve fluid viscosity and eliminate fluid losses in an overbalanced process. Those chemicals can be adsorbed on the surface of rock formation causing restrictions on inflow area and reduction in rock permeability (Lohne et al. 2010) Formation of a stable emulsion An emulsion is a mixture of two or more liquids that are normally immiscible. It is defined as a colloidal dispersion of one liquid into another (continuous phase). An emulsion can be water-in-oil or oil-in-water. These emulsions may have high apparent viscosity and may exist in the formation matrix as an emulsion block in a near-wellbore area, which may significantly impair oil or gas production rates in the affected zone (Bennion et al. 1996b) Wettability alterations Many drilling fluids have some polar surfactants and additives which are utilized for emulsion control, imbibition, corrosion, torque reduction, etc. These components could be adsorbed on both carbonate and sandstone surfaces, causing a wettability alternation (Lohne et al. 2010) connections are being made or when a survey is being taken (Simon et al. 2005;Prasad et al. 2012). The low penetration rate results in longer drilling time, which increases the drilling costs (Bland et al. 1997). The rate of penetration (ROP) is defined as the volume of rock removed per unit area per unit time. Also, it can be defined as the speed or the progress of breaking the rock under the bit. Typically, the high ROP values resulted in faster delivery of well. Where the overbalanced pressure leads to an increase in confining pressure around the formation rock and consequently, the rock breaks under the bit action, and therefore low rate of penetration (ROP) is reduced (Bennion et al. 1998b;Zare and Shadizadeh 2014).
UBD is applied to overcome the formation damage related to mud drilling technologies, where UBD is defined as the downhole circulation pressure of the fluid system that is less than the formation pressure (Lyons et al. 2021). Additionally, the mud loss during OBD can shift the process to underbalanced due to the loss of hydrostatic pressure at this stage (Saponja et al. 1996). UBD method is well-recognized for eliminating formation damages, increasing penetration rate, minimizing lost circulation, and eliminating differential sticking (McLennan 1997;Bennion et al. 1998b). However, some potential formation damage is linked to UBD, such as lack of potential sealing cake, spontaneous imbibition, and glazing and mashing damage (Bennion and Thomas 1994) (Porter et al. 2018). Meanwhile, a wide variety of low-density drilling fluid techniques have been developed to maintain the well in the underbalanced condition, which is generally classified into three main groups, gas phase (air, nitrogen, and natural gas) (Maranuk et al. 2014), supercritical fluid (CO 2 ) (Haizhu et al. 2011), and two-phase (foam and mist) (Su et al. 2018).
Dry air is the most economical type of drilling fluid since it does not involve any chemicals, reducing costs (Lavrov 2016). Additionally, it is suitable for hard formation and faster rates of penetration. However, it is limited to dry reservoirs and suffers from downhole fire problems. In mist drilling, compressed air or gas is pumped into the wellbore with a liquid fluid such as oil or water. The mixing of liquid into the gas stream leads to the generation of mist/unstable foam. It is mainly similar to air drilling but with the addition of liquid. It minimizes downhole fire and reduces the formation of mud rings (Guo and Ghalambor 2002). Dry nitrogen is utilized to minimize the risk of downhole fire, but it cannot generate an adequate torque in the downhole motor due to its low density (Gupta et al. 2005). Supercritical carbon dioxide (scCO 2 ) contains two phases in equilibrium, a dense liquid, and a low-density gas. Gupta et al. (2005) found that scCO 2 can maintain underbalanced conditions. Another type of drilling fluid is foam. Foam is typically composed of gas, liquid, and foaming agent, known as surfactants. It is defined as the dispersion of gas (bubble) in a continuous liquid phase, stabilized by a surfactant. It is characterized by high viscosity and low density, and the high viscosity provides efficient cutting lifting, while low density grants underbalanced conditions to be performed (Ozbayoglu et al. 2005). The foam structure can be divided into dry and wet foam based on foam quality, which is the ratio of gas volume to the total solution volume. It can be generated through co-injection in porous media or high mixing (Enzendorfer et al. 1995;Bonilla and Shah 2000;Herzhaft et al. 2005;Duan et al. 2008;Parikh et al. 2019). Foam is a non-Newtonian complex two-phase fluid whose rheological and hydraulic properties are largely affected by foam quality, liquid phase viscosity, temperature, method of generation, wall slip, and gelling concentration. Authors have reported numerous experimental studies of drilling foam rheology, covering a wide range of foam viscosity, liquid viscosity, and quality (Beyer et al. 1972;Sanghani and Ikoku 1983;Harris 1989;Khade and Shah 2003;Loureno et al. 2004).
This study aims to provide an overview of drilling techniques and identify the common formation damages for both underbalanced and overbalanced methods. Additionally, it highlights the applications, limitations, advantages, and disadvantages of the UBD method. Also, it shows some drilling fluid systems and displays the properties of the underbalanced drilling fluid, focusing on the foam system. A detailed discussion of foam chemistry, properties, and rheology is provided. This paper covers all foam rheological properties and applications in the field from 2000 until now. Compared with other reviews, this paper particularly enlightens the readers with wide knowledge about foam properties, foam chemistry, foam generation techniques, and foam rheology.

Applications, limitations, advantages, and disadvantages of underbalanced drilling techniques
UBD has advantages in cases where the potential for total or partially lost circulation presents, such as low-pressure reservoirs, hard rocks, and highly fractured carbonate or sandstone formation. Drilling on such depleted formation pressure with the OBD technique would cause a massive circulation loss and increase the risk of blowouts or damage to the reservoir. Another reason for employing the UBD technique is to raise the well's productivity by minimizing formation damage that can be resulted from drilling fluid losses (Shadravan et al. 2009). In the case of OBD, many zones may not have been drilled because of its risks, such as lost circulation and differential sticking (Marbun et al. 2011).
In reservoirs with the potential for severe fluid loss and mud invasion, UBD can keep the formation impairment to a minimum because drilling fluids are not forced by hydrostatic pressure into the target formation. Additionally, natural fracture formations have a complex pore structure where pores and pore throats have a wide range of diameters. In the case of OBD, the circulation fluid would invade and fill the fracture with mud solids, impairing productivity. Therefore, minimizing fluid invasion is very important in such reservoir types.
Hard rock can cause a low rate of penetration and intend to increase drilling time, resulting in high drilling costs. In UBD, the rate of penetration could be ten times higher than the conventional drilling (Shi et al. 2018). Furthermore, UBD operation could be utilized in reservoirs with heterogeneous high-permeability vuggy carbonates and formations with high permeability unconsolidated or consolidated sands.
However, UBD is restricted to some reservoir characterizations which are reservoirs with high-pressure zones that exhibit high flow and are possible for well control problems. Additionally, UBD cannot be applied in high permeability and high pore pressure formations. Also, formations susceptible to spontaneous imbibition and formations with no adequate data should be avoided.

Advantages of underbalanced drilling
Currently, UBD has been used as a technique to eliminate invasive formation damage in both horizontal and vertical reservoirs and improve the productivity of wells. UBD offers several important advantages over conventional drilling methods, including improving formation evaluation, eliminating the lost circulation, increasing the penetration rate, and eliminating the differential sticking.

Reduce formation damage
UBD is classified as a drilling procedure to protect the reservoir by eliminating formation damage during the operation. It reduces the problems associated with solid and fluid invasion into the pore, which causes pore blocking, phase trapping, clay reaction, and the formation of emulsion (Islam and Hossain 2021). Thus, the main benefit of the UBD technique is the elimination of formation damage attributable to solids and fluid invasion. Formation damage has been evaluated numerically on a cross section of a horizontal well in an oil reservoir for both OBD and UBD. The average permeability and initial pressure of the reservoir were 8 mD and 320 bar, respectively. In the case of OBD, the overbalance pressure was 15 bar, and the permeability of the filter cake was 0.02 mD with a thickness of 4 mm. In the case of UBD, the underbalanced pressure was − 20 bar. The results indicated that the UBD, as shown in Fig. 2, shows better performance than UBD, where the skin factor of UBD was almost zero while it was six for OBD. Additionally, the productivity index of UBD was higher than OBD (Ding et al. 2004). Skin factor is defined to characterize the well condition and the degree of connectivity between the well and the reservoir. It accounts for additional pressure drop due to damage or stimulation around the wellbore.

Increase the rate of penetration
In a formation with a very low rate of penetration (ROP), UBD is utilized to enhance the penetration rate. The increase in ROP is attributed to the reduction in the confined strength of the rock associated with the lower bottom-hole circulating pressure, and consequently, the rock is broken more easily under the bit action and reduces operation cost. For example, the Arab-D formation, which is located in Ghawar field, Saudi Arabia, is composed of fractured carbonate reservoirs; those reservoirs have been drilled vertically using waterbased mud with an overbalanced pressure of 200 psi. This exceeds pressure resulted in mud filtrate invasion and drilled solids penetration into the micro-and macro-fractures of the carbonate formation. In this regard, Saudi Aramco has introduced UBD to minimize formation damage. In the case of OBD, the average life attained for a bit run was of the order of 653 ft. In the case of UBD, the average bit run accomplished approximately 3163 ft. Moreover, the penetration rate during UBD was higher than OBD three times (Muqeem et al. 2006). Fattah et al. (Fattah et al. 2010) analyzed the data of UBD worldwide cases, and the same trend was observed for ROP, as shown in Fig. 3.

Eliminate differential sticking and lost circulation
The filter cake is a thin impermeable layer of solid particles deposited from the drilling fluid onto the borehole wall of the drilled formation. The drilling fluid loss can lead to formation damage due to the rock wettability alteration, fines migration, and formation water chemistry incompatibilities. However, filter cake plays a significant role in stabilizing  (Ding et al. 2004) porous permeable formation. It prevents the leak-off of drilling fluid into the formation. The high-quality filter cakes are characterized by low filtration rate, thin, tough, and impermeable. Recent studies found that using bentonite (BT) and dual-functionalized cellulose nanocrystals (fCNCs) as additives in water-based could form a filter cake with a filtration rate of 3.8 × 10 -3 cm 3 /s, a thickness of 0.07 cm, and permeability of 0.8 μD (Li et al. 2020c). Other studies found using cellulose nanofiber and polyanionic cellulose hybrids as additives in bentonite water-based drilling fluids have produced a high-quality filter cake with a filtration rate of 3.71-4.49 cm 3 /s of and thickness of 0.1 cm (Li et al. 2020a).
Differential sticking takes place when the drill stem comes to rest against filter cake in an overbalanced hole (Rehm et al. 2012b). In UBD, the hydrostatic pressure is less than the formation pressure, and no filter cake builds up. Thus, the conditions for differential sticking are reduced. Lost circulation is defined as the loss of drilling fluid into the formation. It occurs when the mud density is increased to the point where the formation fracture pressure is exceeded. Naturally fractured zones, low-pressure, or high permeability reservoirs can be more costly to drill overbalanced when expensive drilling fluids are lost downhole (Qutob 2004). The Weatherford team applied the UBD method using an aerated mud system to overcome the mud losses in the Upper Yuahuarango formation, which is located in Peru. The crew experienced partial mud losses when conventional drilling was applied. Using UBD, the mud losses were reduced, saving more than 120,000 barrels of mud valued at US$1,440,000.

Disadvantages of underbalanced drilling
UBD has been used widely to minimize problems related to invasive formation; however, there is some possible formation damage like UBD, including lack of potential sealing cake, spontaneous imbibition, counter-current imbibition, macroporosity, induced invasion, and glazing and mashing damage. When UBD is designed and executed, no filter cake on the surface of the rock forms because drilling fluids do not contain any weighting material. It is, however, very difficult to maintain underbalanced pressure conditions from the beginning of drilling to the completion stage.
Spontaneous imbibition occurs when the initial saturation of fluid (hydrocarbon-based or water-based) is less than the irreducible saturation of the drilling fluid phase, and then, the capillary pressure (Pc) and wettability will result in spontaneous countercurrent imbibition (Naseri and Sinayuc 2012). It is possible to imbibe the drilling fluid in the near-wellbore zone, which may decrease permeability due to the matrix rock-fluid or fluid-fluid incompatibility. This mechanism also could reduce the flow capacity due to the permeability effect (Bennion and Thomas 1994;Abd et al. 2019).
Drilling a formation with macroporosity horizontally would allow the drilling fluid and solids to invade the bottom side of the well due to the gravity force. When a very large porous formation is drilled at UBD operations, the fluid superficial velocity will be minimized. Consequently, the drilling fluid and solids invade these features (Bennion et al. 1998b).
Glazing is the polishing of the external surface of the wellbore due to the direct action at the formation face. This mechanism occurs when the UBD technique is used in a hard formation with a damaged bit or at low ROP (Al-Bajalan 2015). When pure gas is injected during the UBD, the combination of heat, connate water, and fine crystalline cuttings are generated, resulting in a ceramic coating-like glaze in the near-wellbore matrix. The glaze is typically composed of a thin low-permeable layer around the wellbore, which can impair well productivity (Bennion et al. 1998a, b).
Also, the UBD is subjected to some disadvantages such as high cost, safety concerns, and wellbore instability (Garcia Sanchez and Moreyra 2007). Generally, UBD is more costly than a conventional drilling program, especially if drilling is performed in a sour environment. However, a percentage of this cost may be offset by improving ROP conditions, causing a significant reduction in drilling and rig time. In addition, UBD requires more equipment and procedures to control the produced fluid while the well is being drilled. The produced fluids contain multi-phases, gases, hydrocarbons, cuttings/solids, and mud fluid systems. If the rig is not completed in a UBD mode, this will require an additional cost for snubbing equipment required to strip the drill string from the hole in an underbalanced flow condition (Cuthbertson et al. 1997).
The UBD of horizontal wells comprises the injection of gas along with drilling mud. Nitrogen is typically utilized to avoid fire and explosion hazards during UBD; however, this brings an additional cost to the drilling operation.

3
Costs could be reduced significantly by the usage of normal air, deoxygenated air, or vitiated air (air/nitrogen mixture), but this increases the risk of fire or explosion (Mehta et al. 1995). The mechanism of downhole fire occurs when the mixture of hydrocarbons and air is exposed to an ignition source (Porter et al. 2018). The utilization of ScCO 2 in a UBD technique could eliminate some issues which addressed with gaseous drilling fluid, such as the risk of downhole fire since it is non-flammable, environmentally compatible, and inexpensive (Aladwani 2007). Literature reported that the foam drilling fluid has less potential for a downhole fire since the structure of foam isolates the air inside the bubble, which could eliminate the risk of combustion. Recently, the usage of surface control equipment, rotating blowout prevention equipment, and coiled tubing in UBD has improved UBD operations.
In UBD operations, the bottom-hole pressure is less than the formation pressure, which increases borehole instability because the mechanical stress around the borehole would likely go above the shear strength of the rock due to underbalanced conditions (McLellan and Hawkes 2001). Researchers have concluded that the interaction of rock formation and drilling fluid has a serious impact on the wellbore stability for OBD. However, only mechanical stresses were reported as a reason for the instability of the wellbore during UBD (Manshad et al. 2014). Different models were established to predict wellbore instability during UBD operations. Salehi et al. (Salehi et al. 2007) applied an elastoplastic model coupled with a finite explicit code to predict optimum equivalent circulating density where UBD is applied. Foam could potentially control the effective circulation density of the drilling fluid, which may contribute to the maintenance of a desired bottom-hole pressure (Saxena et al. 2017). Foam as an underbalanced drilling fluid benefits from a higher viscosity and a lower density that lead to the transport of a large quantity of produced drilled cuttings and also allows the drilling with minimum formation damage (Vaziri et al. 2020).

Underbalanced drilling fluid system
Various low-density drilling fluid techniques have been developed to maintain well under underbalanced conditions, generally classified into two main groups: gas phase (dry air, gas, and nitrogen) and two phases (mist, foams, and aerated). Table 2 presents the densities of the air-based system in pound/gallon and the gas ratio for each fluid system.

Air drilling
The usage of air or gas as a circulation medium was introduced in the 1950s. In dry air, also known as dust drilling, compressed air is the only essential of the drilling fluid system (Lavrov 2016). In particular, dry air is the most economical type of fluid drilling since it does not involve any chemicals, reducing costs. Usually, a small amount of hammer oil is pumped into the well to deliver some lubrication and cooling and to reduce corrosion. Dust drilling can accomplish the maximum rate of penetration due to the lowest specific weight of the dry air (Cooper et al. 1977). Additionally, high annular velocity in dust drilling enhances hole cleaning. However, dry air is not recommended to be considered once formation fluid influx occurs. The use of dry air has been considered only for vertical wellbores that are small in diameter with no sour gas and with no downhole fire expectations (McLennan 1997).
The main disadvantages of dry air drilling are water influx, downhole fires, and wellbore instability. The flow of water into a well being drilled with dry air can cause serious issues that are significant enough to exclude dry air drilling, such as the sloughing of sensitive shales (Kitsios et al. 1994). Dry air should be considered in hard formations, which relatively produce few formation liquids. Also, when the formation has a very low liquid influx or is completely dry, the cuttings leave the wellbore as a form of dust on the surface (Guo and Ghalambor 2002).
Additionally, three conditions must be met to cause a fire or combustion, including fuel, oxygen, and an ignition source. The fuel is in the form of natural gas, and the oxygen is in the form of compressed air. Ignition sources during air drilling are mud rings, downhole sparks, and a small hole in the drill string. Downhole fires and explosions can destroy downhole equipment (Cooper et al. 1977). One scenario is when drilling collars and pipe are melted, and slag has been blown up-hole several hundred feet. Therefore, fishing operations are necessary due to the damages incurred to downhole equipment after a burn-off.
To minimize lost circulation, it must be drilled using an underbalanced technique. In the San Juan Basin of New Mexico, dry air is first to be considered as a low cost; however, the air is not applicable when hydrocarbon zones are crossed. Additionally, downhole fire is expected when air and hydrocarbon (methane) are met. In an attempt to lower the drilling cost and consider the safety of gas-drilled 1 3 horizontal wells, Meridian Oil assisted in designing a nitrogen drilling system. This system works by removing oxygen from standard air, thus yielding variable degrees of pure nitrogen gas without the cryogenic equipment and cost typical of most nitrogen operations. (Allan 1994) found that the nitrogen drilling system reduced the costs by 15% over pipeline gas drilling.

Mist drilling
In mist drilling, compressed air or gas is pumped into the formation with a liquid fluid such as oil or water along with a foaming agent. Air volume must be increased (30-40% more than dry air drilling) at the time of pumping; hence, higher pressure is required to keep the same performance. The mixing of liquid into the gas stream leads to mist/unstable foam generation. It is usually used when the rock formation starts to produce an amount of water (10-100 bbls/hour) during the air drilling program. Another purpose of adding liquid is to saturate the cuttings, prevent them from choking the top of the drill collar and prevent the pipe from sticking. It also can eliminate the risk of mud ring formation. Characteristics of mist drilling are summarized in Table 3.

Aerated drilling
Aerated drilling fluid has been utilized for drilling purposes since the mid of 1930s (Kuadjovi et al. 2020). Aerated drilling fluid composes of adding compressed air into viscosified fluid or mud. The encapsulation of the compressed air into the drilling fluid leads to fluid volume expansion and reduction of density per unit volume. The mechanism of cuttings transport in the aerated fluid is based on the lifting and carrying capacity of mud fluid. The main objective of aeration is to lower the density of the fluid column on the formation and eliminate the risk of lost circulation without changing the properties of the drilling fluid. The air is added to the downhole of the well; otherwise, the air would travel to the surface, leaving mud behind. Table 4 summarizes the advantages and disadvantages of aerated fluids. In Saudi, Wasia and Shu'aiba fields (Javay et al. 2020) are categorized as fractured limestone formations and highly water-sensitive shales. Originally, lighten drilling fluid system (diesel oil emulsion) was utilized, but it changed to high-bentonite drilling fluid for environmental reasons such as rising concerns on the preservation of underground water resources and land pollution. High-bentonite drilling fluid shows very low ROP, compared to diesel oil emulsion by 37%. In this regard, aerated drilling fluid was developed to overcome the losses. In the aerated mud drilling process, the air is directly encapsulated into the mud fluid at the standpipe manifold. Then, the aerated mud is circulated down to the drill string and through the bit nozzles. The fluid then runs up the annulus to the surface through the rotating circulating head. The mud phase of the aerated fluid is composed of a polymeric water-based system with a polyamine shale inhibitor. The ROP through aerated fluid was 35 and  The friction factor is sometimes larger in aerated fluids compared to mud fluids, thus resulting in higher torque and drag The guarantee of a thorough cleaning of the well and the zones of interest (reservoir and permeable zones) The vibration of the drill string occurs because aerated drilling fluid does not support the pipe fully as in the case of conventional drilling fluids Lowering the density of the drilling fluid resulted in less hydrostatic pressure which would reduce the probability of the drill string becoming stuck due to differential pressure 113% higher than oil emulsion mud and bentonite mud, respectively.

Foam drilling
Foam drilling fluids have been introduced to the drilling technology since 1975. Foam has been successfully utilized as the motive fluid for several operations such as UBD, well stimulation, enhanced oil recovery, and acidizing processes in the petroleum industry. Foam is typically composed of gas, liquid, and foaming agent, known as surfactants. It is defined as the dispersion of gas in a continuous liquid phase, stabilized by a surfactant. The gas phase can be nitrogen, air, carbon dioxide, or natural gas, while the liquid phase is mainly water and can be oil as well. Foam is characterized by high viscosity and low density, the high viscosity provides efficient cutting lifting, and low-density grants underbalanced conditions to be performed (Ozbayoglu et al. 2005). Foam drilling eliminates the potential formation damage that can be addressed by the conventional method and applies less pressure than the formation pressure (Guo and Ghalambor 2006). The underbalanced pressure between the reservoir and the wellbore during foam drilling boosts the production of formation (Bennion et al. 1996b). Originally, the air was utilized for UBD, but the foam's ability to carry a large amount of cutting along with its capability of eliminating the down-hole fire and explosion made it a worthy competitor. Foam has been employed as an option for UBD in depleted, low pressure, faulted, and water-sensitive formations where fine migration and swelling clays are a concern. Additionally, foam drilling is capable of handling large water influxes, which maximizes the cutting carrying capacity.
The key principle for successfully drilling an underbalanced well depends on selecting the right drilling fluid system. Since the penetration rate increases with a decrease in viscosity; thus, air has the highest ROP (Caenn et al. 2017). For hard formation, the air is preferred use over others, but when water comes from the formation, gaseous fluids are non-preferred. The high annular velocity of air or gas drilling could erode the wellbore. On the other hand, an inadequate air volume and low annular velocity (below 2500 ft/ min) may not lift cuttings. Foam does not require high annular velocity to lift cuttings due to its high viscosity. Once a large lifting capacity is needed, aerated is preferred. Aerated fluid has higher density and annular velocity than foam, cuttings lift to the surface by the implies of upward velocity (Javay et al. 2020). Table 5 summarizes the application of the fluid system in UBD.

Advantages and disadvantages of foam-based drilling fluid
Hole cleaning is one of the main concerns influencing the cost, time, and quality of directional, horizontal, and multilateral wells. Inadequate hole cleaning could cause several drilling problems such as pipe sticking, slow drilling, and high torque and drag . Cuttings transport is mostly influenced by many factors, such as the well inclination angle, hole, and drill pipe diameters, ROP, cuttings characteristics (size, porosity of bed), fluid velocity, and flow regime (Saintpere et al. 2000;Rojas et al. 2002). Foams can have low-density and high viscosity. Foam low density provides easier and better clean up, minimizes the formation damages, and grants underbalanced conditions. While high viscosity provides higher lifting efficiency of cuttings to the surface (Chen et al. 2007).
In addition, they provide design flexibility that could improve their performance during drilling operations. Several parameters could be changed, such as foam quality, foaming agents, and foam stabilizers, which provide tighter flexibility in their design (Faroughi et al. 2018). Foam can handle water influxes up to 500 bbl/hr. If water influx increases, foam quality would drop, which results in a reduction in the foam viscosity and different bubble structure configurations. To overcome this issue, air could be added downhole to increase foam quality. The main drawback of using foam as a drilling fluid is foam stability. As a function of time, foam tends to separate into liquid and gas phases (Lv et al. 2015). Foam fluid must be stable and maintain its characteristics during circulation to transport cuttings to the surface. Foam stability is dependent on several parameters such as foam quality, type of surfactant, type of gas phase, and salinity. Specifically, three major mechanisms occur during foam decay: drainage, coarsening, and coalescence. The liquid drainage process plays a dominant role in foam instability (Kruglyakov et al. 2008). It reduces the liquid content of foam, which controls the thickness of the bubble film. When the thickness of liquid film decreases, gas could easily diffuse through the film, and this mechanism is defined as bubble coarsening. Then, the large bubbles become larger and small ones tend to disappear, leading to the rupture of thinning films (Babcsán et al. 2007). Zhou et al. (2020) have proposed different strategies for the stabilization of foam. They found that Zwitterionic (or amphoteric) surfactants have a special ability in foam stabilization because they maintain foam stability over 100 °C, such as betaine, Ammonyx ® LMDO, and Petrostep ® SB. Viscoelastic surfactants are becoming popular in foam stabilization due to the generation of wormlike micelles (Danov et al. 2004;Varade et al. 2011). Also, many polymers were introduced to the surfactant liquid solution to improve the stability, such as regenerated cellulose (RC), phenolic resin cross-linker, and partially hydrolyzed polyacrylamide (HPAM) (Dupas et al. 2013;Zhao et al. 2015;Yin et al. 2018).
Foams are mostly stabilized by surfactants, where surfactant molecules are usually oriented at the gas-liquid interface lowering interfacial surface tension to generate foam. However, those surfactants could be adsorbed on the rock surface, altering the wettability (Abdulelah et al. 2018). Skalli et al. (Skalli et al. 2006) investigated the effect of surfactant (A polyamine fatty acid) on very strongly water wet sandstone core samples. They found that a small quantity of surfactant can potentially affect the rate of imbibition into Berea sandstone core which became somewhat less water wet.

Foam chemistry
The structure of foam, as shown in Fig. 4, can be divided into parts depending on the liquid fraction, dry foam, and wet foam. In dry foam, the bubbles of the gas phase are polyhedral and have well-defined edges, while in wet foam, the bubbles are more spherical and stable (Gonzalez Perdomo and Wan Madihi 2022). Thin film (also known as lamellae) is formed between two bubbles. The connection of three approaching bubbles is referred to as plateau borders (PBS) (Pitois et al. 2005). However, foam is not stable and potentially separates into gas and liquid phases due to the high surface energy ). The stability of foam depends on three mechanisms: liquid drainage, coarsening, and bubble coalescence (Koehler et al. 2000;Pitois et al. 2005). Liquid drainage plays a substantial role in the foam decay process, and it decreases the liquid content of the foam, which governs the thickness of the film (Kruglyakov et al. 2008). It is driven by gravity and capillary pressure, where the capillary pressure drains the liquid content from foam film to PBS, while gravity drains the liquid from the network of PBS (Lioumbas et al. 2015). The mechanism of bubble coarsening initiates when the gas diffuses through the liquid film due to a pressure difference, where the large bubbles tend to become larger, and the small ones tend to vanish (Zhou et al. 2020). Bubble coalescence refers to the rupture of two neighboring films. To overcome these phenomena, several chemical additives, mainly surfactants, are used to improve foam stability by increasing the liquid viscosity and developing a chain network between films to limit the liquid drainage and coarsening (Abdelaal et al. 2021).

Fundamental of surfactant
Surfactants, also known as surface-active agents, are amphiphilic compounds composed of a hydrophobic tail (nonpolar) and a hydrophilic head group (polar) that modify the surface and interfacial properties amongst immiscible media (Schramm 2010). These molecules are oriented at the interface based on their affinity to the respective media. Typically, the hydrophobic tail (nonpolar hydrocarbon chain) has an affinity for the nonpolar media, while the hydrophilic head has an affinity for polar media (aqueous solution, mainly water). At dilute surfactant concentrations, the surfactant molecules are oriented at the surface interface, forming a monolayer, portraying a solution with normal electrolytes. Also, this mechanism provides an expanding force acting against the normal interfacial tension as a result of surfactant adsorption at the interface. Therefore, surfactants have the potential to lower interfacial tension as the surface free energy is reduced. At higher surfactant concentrations, the aqueous solution tends to form micelles, which are organized on self-assembled molecular structures. Generally, micelles are oriented where the tail group cluster in the interior of the micelles, while the head parts contact and interact with the aqueous medium through dipole-dipole or ion-dipole interactions (Schramm and Wassmuth 1994;Samuel et al. 2000). Surfactants are classified depending on their moiety head group into four classes, as summarized in Table 6. Many anionic surfactants have been utilized in research studies for the generation of foam such as sodium dodecyl sulfate (SDS), sodium sulfate, fatty acid soap, and a fatty alcohol, ether sulfate. They have a high foamability; however, they have poor foamability and stability at high salinity (Agneta et al. 2019). Cationic surfactants have relatively low foamability as compared to anionic surfactants. Non-ionic surfactants do not dissociate ions in water but they convert to cationic at low pH. Also, they can produce a viscoelastic solution which leads to high foamability and stability . Additionally, salinity has no major effect on foamability and foam stability of non-ionic surfactants (Agneta et al. 2019). Zwitterionic surfactants have both positive charge and negative charge on their hydrophilic end. They showed a potential to form wormlike micelles that can generate high foam viscosity, and they can produce stable foam at high temperatures ).

Nanoparticles to stabilize foam
Due to the instability of surfactants under harsh reservoir conditions, nanoparticles (NPs) have been utilized as foam stabilizers. The synergistic interactions of NPs and surfactants at the liquid/gas interface could generate more stable foam in harsh conditions. Surfactants have lower adhesion energy compared to NPs, which makes foam stabilized by NPs more stable (Li et al. 2022). Solid particles could be oriented at the liquid/gas interface and improve foam stability by minimizing the contact area between liquid and gas. The adsorption of NPs at the interface strengthens the films and increases the elasticity of the lamella. This may lower the gas permeability through the liquid film, reducing the bubble coarsening (Zhou et al. 2020). Additionally, the equilibrium and stability of the NPs at the interface are related to electrostatic repulsion, van der Waals attraction, and capillary attraction (Fu et al. 2018). The addition of NPs to the surfactant solution could change or modify the properties of the liquid solution. They alter the surface charges and the hydrophilicity which enhance the foam half-life of the solution. The size of the bubble was found to be in the range of 10 μm to 1 mm. The literature review stated that the size of NPs foam is lower than foam alone. This allows the foam to transport through the pore throats (Almubarak et al. 2020).
AlYousef et al. ) studied the potential of non-modified silica NPs to improve the stability of the foam. Three alcohol ethoxylate nonionic were used to generate foam. They found that the concentration of NPs plays a significant role in the stabilization of foam. The experiments were run at different concentrations of NPs, 0.25, 0.5, 0.75, and 1 wt%. The results show that the NPs could enhance the foam stability at a certain concentration, and the highest stability was 29 h at a concentration of 0.75 wt%. Once the NPs concentration increased to 1 wt%, the foam stability reduced to 23 h. Another study was performed by AlYousef et al. (2017) to investigate the capability of modified silica NPs to increase the foam half-life. The results indicated the half-life increased by 10%. They proposed that the stability of foam was increased due to the aggregate growing of NPs into the liquid film. Almobarak et al. (Almubarak et al. 2020) study the synergistic effects of cationic surfactants and modified silica on foam stability. The experiments were conducted at different NPs concentrations at different temperatures (25-65 °C) and gas volume fractions of 67%. The authors claimed that the synergic surfactant and low NPs concentration lead to better foam stability and result in small bubble size. Most studies have applied silica NPs as foam stabilizers (Li et al. 2022). However, the studies on other metal oxides such as TiO 2 , CuO, Al 2 O 3 , and NiO are limited. Recently, Yekeen et al. (2021) investigated the effect of different NPs (carbon nanotubes, SiO 2 , CuO, Al 2 O 3 , and TiO 2 ) in the stabilization of foam. The results suggested that TiO 2 and Al 2 O 3 nanoparticles obtained the highest stability among others.

Foam characterization
The foam quality is defined as the ratio of the gas phase volume to the total foam volume as shown in Eq. (1): where FQ is the foam quality, v gas and v liquid are the volume of gas and liquid, respectively. The required FQ is ranged between 52 and 95%. At low foam quality (wet foam), the number of bubbles is less and far apart with insignificant interaction, resulting in low viscosity. On the other hand, at high FQ (dry foam), bubbles are more significant interaction, resulting in high viscosity (Edrisi and Kam 2012). However, there is no conclusion on what the foam quality value for stable foam is. Okpobiri and Ikoku (1986) observed that foam became unstable at a quality of 94% for shear rates below 5000 s −1 . Beyer et al. (1972) found that the foam collapsed to slug at a foam quality of 98%.
The texture is referred to the size and distribution of the bubbles. The foam bubble diameter was found to be in the range of 10 μm-1 mm (Den Engelsen et al. 2002). Foam is defined as fine-textured when the bubble size is small, while it is defined as coarse texture when the bubble size is large (Ozbayoglu et al. 2005). Fine-textured bubble leads to higher viscosity due to the increase in the interfacial area and thinner films, resulting in high flow resistance. When the bubble size distribution is narrow and, bubbles are homogenous, the viscosity tends to be higher (Harris 1989). Foam is thermodynamically unstable; therefore, the small bubbles will shrink, and large ones will grow (Engelsen et al. 2002). This mechanism leads to an increase in the distribution of the bubble size. Generally, foam texture is affected by multi parameters such as concentration of surfactant, type of surfactant, pressure, pore structure, injection rate, and liquid content.
Foamability is described as the capability of the surfactants to form foam irrespective of the special foam properties. In contrast, foam stability is defined as the change of foam height or volume with respect to the time immediately after foam generation. Foam stability is dependent on electric double layer repulsion, gravity drainage, capillary suction, surface elasticity, dispersion force attraction, steric repulsion, and surface and bulk viscosity (Schramm and Wassmuth 1994). When the foam is generated, there will be a potential for liquid to flow downward due to the force of gravity that destabilized the foam. An increased surface and bulk viscosity do not always increase the stability of the foam. However, the viscous solution sometimes hinders foamability. Bulk viscosity does not directly impact film stabilization. It rather works as a resistance to the film thinning and rupturing processes (Belhaij et al. 2014).

Foam rheology
Drilling foam is a two-phase mixture of gas and liquid whose rheological properties are dependent on foam quality, liquid phase viscosity, pressure, and temperature. Several experiments (Beyer et al. 1972;Reidenbach et al. 1986;Cawiezel and Niles 1987) were conducted to investigate the drilling foam rheology, studying a wide range of quality, liquid viscosity, and flow properties. A summary of the rheological properties from the aforementioned articles is shown in Table 9.

Foam rheology models
Generally, fluids are classified as Newtonian or non-Newtonian depending on their response to shearing. Foams are considered non-Newtonian since the viscosity varies with the shear rate. Rheology characteristics are evaluated on a continual behavior, while drilling is adjusted with additives or dilution to reach the requirements of the operation. The relationship between the shear rate and stress or viscosity is established using one of the rheological models; Power-Law, Bingham, and Herschel-Bulkley models (Yield Power Law).
The power-law model is defined as Ostwald-de Waele model, where the model was derived based on two variables parameters; consistency index, K, and flow behavior index, n. Those parameters are used to relate shear stress to the shear rate (Firoze Akhtar et al. 2018).
The apparent viscosity (η) is described as the ratio of shear stress to shear rate and is given by: When the flow behavior index (n) is less than 1, the fluid is defined as a shear-thinning (Pseudoplastic) fluid (Firoze Akhtar et al. 2018). The shear thing or pseudoplastic is a phenomenon in which the fluid viscosity decreases with increasing shear rate. When n is equal to 1, the power-law model behaves like the Newtonian model where the viscosity is independent of shear rate and shear stress. The fluid behaves as shear-thickening (dilatant fluid) when n is more than 1 (Sherif et al. 2015).
Bingham plastic model is the most common model used in the drilling industry. Bingham plastic model was derived based on two parameters including yield stress (τ y ) and plastic viscosity (μ p ) of the fluid (Faroughi et al. 2018). Initially, the fluid resists flowing till the shear stress goes beyond a certain value. Then, the fluid begins to flow, showing a linear Newtonian fluid behavior between shear stress and shear rate. The shear stress-shear rate relationship is expressed as follows: While the apparent viscosity is given as follows: Herschel-Bulkey model is also defined as the yield power-law model. Initially, the fluid does not flow until the shear stress goes above the yield stress. Then, the fluid starts to flow, showing power-law fluid behavior Richardson 1999, 2008). The shear stress-shear rate relationship is expressed as follows: where the apparent viscosity is given as follows:

Foam generation techniques
The foam is typically generated as a result of the gas-liquid interface with the application of external shearing force due to the increase in the net surface energy of the system. The literature review reported various methods of foam generation; foam could be generated through porous media, using open and closed flow loops and pipe viscometer. Foam generation through porous media has been divided into three generation processes: snap-off, leave behind, and lamella division (Kovscek and Radke 1994). Snap-off occurs when gas invades the pore throat and blocks it, increasing capillary pressure. This allows bubbles to pass through the pore throat once the entry pressure is exceeded. Lamella division takes place when a large lamella is divided into smaller lamellae as it reaches a branch point, as shown in Fig. 5. The rate at which the lamellae subdivide depends on the capillary number, which is associated with the pressure gradient in the porous media, the number of pore branches, and the density of flowing bubbles. Leave behind takes place when gas goes into a porous medium that is initially saturated with a liquid or when two gas fronts reach a pore space that is already filled with liquid; these processes squeeze the liquid into a lamella, which is left behind.
Several studies generated foams through the use of a single-pass foam generator packed with a flow restriction such as porous media (Enzendorfer et al. 1995;Bonilla and Shah 2000;Herzhaft et al. 2005;Duan et al. 2008; Parikh et al. Similarly, Parikh (Parikh et al. 2019) has generated foam on a single flow loop. The foam generator, as shown in Fig. 6, is a system composed of a clear acrylic tube, filled with soda-lime beads of diameters (1, 2, and 3 mm). Air and liquid solution mixed at a wye connector and fed to the generator through an OMEGA pressure transducer. The foams are produced once the mixture flows and passes through the soda-lime beads.  Foams also are generated using a setup including static mixers, recirculation closed-loop, and throttled needle valves (Babatola 2014; Obisesan et al. 2021), shown in Fig. 7. Akhtar (Firoze Akhtar et al. 2018) produced foams using a foam generator which consists of a static tank, differential pressure transmitters, and throttled needle valve. Firstly, the surfactant solution is injected into the system and allows it to circulate through the open loop to vent the air. When the system had no air bubble, it switched to a closed-loop configuration. Then, the nitrogen was injected into the system, while the liquid was recirculated. Due to the recirculation of fluid through the static mixer and needle valve, surfactant solution was mixed with the gas phase to generate foam. The needle valve of the foam generator was throttled to obtain a differential pressure of 0.15 Mpa for foam production.

Foam rheology measurements
The literature reported three common types of rheometers that are used for determining foam rheology: rotational rheometer (Saintpere et al. 1999), a circulating pipe rheometer (Reidenbach et al. 1986), and a single-pass pipe rheometer (Blauer et al. 1974), as shown in Fig. 8. In rotational viscometer systems, the foam is needed to be generated before taking any rheological measurements, using a suitable agitation technique (Khan et al. 1988). There are three major rotational viscometer geometries include Couette, parallel plate, and cone and plate. Couette geometry is commonly used, where the fluid is injected between rotational sleeves, which shears the fluid by inducing a torque on the surface of the bob. The rheology measurements must be conducted after guaranteeing that the flow between the coaxial cylinders is steady, laminar, and tangential. The Couette viscometer is applicable for high-foam quality and low pressure.
In recirculation and single-pass viscometers, the rheological data are acquired in-line, while the foam is flowing. The test fluid is pumped through a channel of standard dimensions under isothermal conditions. The rheology measurements must be performed in a fully developed flow and steady state. Thus, the linear relationship between nominal Newtonian wall shear rates (calculated from flow rate) with wall shear stress (obtained from pressure drop) is estimated to provide information about fluid rheology.
The most common devices used to evaluate the rheology of foam drilling fluids are circulating pipes and singlepass foam rheometers. Those instruments were designed to evaluate foam viscosity at a different range of shear rates (100 to 2000 1/s) (Hutchins and Miller 2005). Also, some instruments are capable to operate at pressure up to 5000 psi and temperatures up to 400 °F . The apparent foam viscosity is very sensitive to foam quality, as it increases the viscosity increases. Those two instruments can generate foam at a wide range of foam quality. Visualization of foam structure and ensuring the formation of foam is essential (see Table 7).

The effect of chemistry and additives used on foam drilling properties
The literature review reported three types of foam drilling (see Table 8). Stable foam is an aqueous foam that contains water along with surfactants. Stiff foam comprises water and surfactant with polymers or thickeners to viscosified the liquid phase and improve the foam stability. Oil-based foam is introduced to drill water-sensitive formations. It contains diesel or a blend of diesel and mineral oil and oil-soluble surfactant. Table 9 summarizes recent publications that demonstrate the use of foam fluid in UBD. It includes the chemicals, additives, experimental conditions, and a summary of the findings. Aqueous foam finds many applications in the oil field, such as drilling, fracturing, and enhanced oil recovery. Akhtar et al. (2018) studied the properties of aqueous foam at ambient temperature using a foam recirculating flow loop consisting of three pipe viscometers under a variation of pressure. The aqueous phase contains fresh water and 2 vol% of anionic surfactant (Howco Suds), while nitrogen was used as the gas phase. The experimental results indicated that foams behaved as a strong shear-thinning fluid, which best describes the Herschel-Bulkley model with no observation of wall slip. Additionally, they found that pressure has a significant impact on apparent viscosity due to the foam expansion and compression. As pressure increases, the viscosity increases. Power-law rheological model used The foams behave like shear-thinning fluids For low-quality foams (70-80%), n is sensitive to polymer concentration and foam quality For high-quality foams (80-90%), n is less sensitive to polymer concentration and foam quality (Sani et al. 2001) Howcosuds/Xanthan gum 0.5 inches stainless steel 1000 psi/75-200 °F

Horizontal
Foam fluid behaves as the Herschel-Bulkley model Foam viscosity increases as the foam quality increases and a more viscous liquid phase generated higher foam viscosities The apparent viscosity decreases with increasing temperature, Increasing the temperature destabilizes the foam by thinning the liquid phase and the foam film thickness (Khade and Shah 2003) -/guar 0.5 inches stainless steel 1000 psi/100-200 °F

Horizontal
Foam fluid behaves as a power-law model Apparent viscosity decreases with an increase in temperature The apparent viscosity of highquality foams is more sensitive to change in shear than low-quality foams At low quality (less than 50%), the flow behavior index ratio decreases slightly and for high quality, it decreases sharply At low quality (less than 50%), the flow behavior consistency index ratio increases slightly and for high quality, it increases sharply The low viscosity of 0.1% HECbased foams showed a higher level of wall slip than the high viscosity of 0.2% HEC-based foams (Saxena et al. 2014 Lourenço et al. (2004) investigated the effect of temperature and pressure on the viscosity of aqueous foam drilling using the U. of Tulsa's Advanced Cuttings Transport Facility. The tests were conducted at varying temperatures (80-180 °F), pressures (100-650 psig), foam qualities (60-90%), and pipe diameters (2, 3, and 4 in). An alkyl ether sulfate anionic surfactant at 1% v/v concentration in water was used. The temperature effect was not observed; however, the increase in temperature decreased the liquid phase viscosity. Additionally, they found that pressure does not affect foam viscosity which is in disagreement with Akhtar et al. (2018). Gumati et al. (2011) studied the effect of foam quality on the foam bubble configuration using KA foam as a surfactant. At a foam quality of 80%, foam bubbles have a small diameter and perfect circular shape with no significant interaction between bubbles. While at 90%, the bubble size increased and the shape of the bubble changed to an irregular configuration with high interaction between bubbles.
Stiff foam utilizes polymer additives to make bubbles stronger, increase cutting's lift capacity, and stabilize the borehole. It required less air than stable foams, which helps in drilling fragile formations. It shows an excellent performance in loss circulation zones, fractures, and coarse gravel zones. Chen et al. (2005b) studied the rheology of aqueous and stiff foam at ambient temperature and 100 psig using air as the gas phase. 1%v of Klean surfactant and different concentrations (0, 0.25, and 0.5%) of hydroxyethylcellulose (HEC) suspension were prepared and used as the liquid phase. A power-law model was used to characterize foam rheology. They found that the liquid phase consistency decreases significantly as polymer concentration decreases. The experimental results indicated that the polymer did not affect the foam rheology. Foam with high polymer concentration develops higher foam viscosity. Chen et al. (2005a) extended their approach using different apparatus under ambient temperature and low pressure of 25 psig. This apparatus conducted by generating foam and then filled it into the Couette. Foam rheology experiments were conducted with smooth and roughened cup motor assemblies. They found that better foam rheology measurements can be obtained using roughened cup-rotor assemblies. Duan et al. (2008) studied the foam rheology using similar chemicals (Klean surfactant, HEC) with foam qualities ranging from 60 to 90% and varying pressures from 25 to 400 psig. They found that pressure affects foam rheology by changing foam texture. However, at low foam quality (< 80%), pressure effects are negligible. Sani et al. (2001) studied the foam properties by varying temperatures from 75 to 200 °F and by covering a wider range of Xanthan gel concentrations (20, 30, and 40 lb/ Mgal). The test pressure was 1000 psig, and foam quality ranged from 0 to 80%. 0.5 vol% of (Howco Suds) surfactant was used as the foaming agent. Nitrogen was used as the gas phase. The flow data indicated that the xanthan foam behaved as Herschel-Bulkley model fluids. Similar behavior was observed by Sinha et al. (2019). Saxema et al. (2014) investigated the stiff foam properties using anionic surfactant SDS (sodium dodecyl sulfate) along with different concentrations of HEC. The test was conducted at 86 °F at varied foam qualities (70-90%). They found that polymer internally increased the foam viscosity and then decreased as the polymer concentration increased.
Oil-based foam is less common than stable and stiff foams; however, it shows great performance in the Niobrara shale wells (Wyoming). Studies on oil-based foams displayed better control of fluid loss, preservation of formation permeability, and improved drilling performance (Blázquez et al. 2014).
In this regard, Sherif et al. (2016) studied the rheology of oil-based drilling foams. Experiments were conducted at 100 psi, ambient temperature (80 ± 3 °F), and foam quality (34-68%) using a flow loop that can generate and circulate foam. They found that the bubble size increases as foam quality increases, similar to stable and stiff foam. At a foam quality of 68%, oil-based foam shows strong shear-thinning behavior, the same trend observed on aqueous and polymerbased foam. The effect of other parameters such as wall slip, foam quality, temperature, and gelling agent on foam rheology is explained in the next sections.

Wall slip
Wall slip is described as the formation of a thin liquid film at the wall of the tube, acting as a lubricating layer between the bulk foam and tube wall. This phenomenon has become significant since it is attributed to the reduced foam viscosity near the wall. In pipe viscometer, wall slip is determined with the use of different pipe diameters. The wall slip is detected when the flow data on the rheogram (shear stress versus shear rate) of different tubes are not overlapped. In a rotational viscometer, wall slip is detected when the same shear stress is applied to foam with two or more different gaps. Saintpere et al. (1999) performed rheology tests using two different gaps; 2 and 3 mm. The tests show two different curves, indicating the presence of a slip at the wall. Several rheology studies have reported the presence of wall slip in pipe viscometers. Chen et al. (2005b) have determined the foam rheology properties for three different pipe diameters (2-, 3-, and 4-in.); the results indicate the presence of wall slip since the experimental data displayed three distinct flow curves. The same observation was reported by Capo et al. (2004) and Ozbayoglu et al. (2005), where the Oldroyd-Jastrzebski model was implemented to determine the true shear rate. However, Affonso et al. (Loureno et al. 2004) claimed that the Oldroyd-Jastrzebski model is not capable of explaining each effect influencing the slip at the wall, such as wall roughness and wettability. They observed that the smoothest pipe with a 2-in diameter had the highest shear stress, while the 3-and 4-in pipes exhibited the lower shear rate. Saxena et al. (2017) investigated foam rheology through smooth vertical pipes. The experiments were conducted with different pipe diameters (25.4, 38.1, and 50.8 mm). The flow data of foam show the same trend, indicating the absence of a slip effect. Akhtar et al. (2018) also did not observe any significant wall slip as well as Sinha et al. (2019). The existence of wall slip was examined by testing oil foam in different diameters (13.4, 19.6, and 31.8 mm) tubes. Results exhibit a noticeable right of flow curve attained from the small diameter (13.4 mm) pipe, while the shafting was not noticed in medium diameter pipe (19.6 mm) (Sherif et al. 2016). Similarly, Sherif et al. (Sherif et al. 2015) have observed the wall slip only in the smallest diameter due to the high shear stress compared to larger pipes at the same flow rate. When a slip takes place in a viscometer, the rheological data may not be very reliable. However, the foam viscosity data are strongly dependent on the rheometer geometry type. Mei-Chun et al. (Li et al. 2021) found that the use of a serrated plate or concentric vane could diminish the wall slippage effect. Also, they concluded the addition of cellulose nanocrystals to fluid has reduced the wall slippage.

Effect of foam quality
Quality is defined as the ratio of gas volume to the total volume of gas and liquid. High qualities are composed of a large volume fraction of the gas phase, which generates a complex foam structure with a lower volume of liquid trapped between tightly packed bubbles. As the foam quality increases, foam bubble structure tends to transform from a loosely packed to a more closely packed structure, initiating greater bubble interaction, which causes an increase in foam viscosity (Beyer et al. 1972;Sanghani and Ikoku 1983;Harris 1989;Khade and Shah 2003;Loureno et al. 2004). Gummati et al. (2011) investigated the foam bubble structure of aqueous foam at different qualities of 80, 85, and 90%. At a foam quality of 80%, they found that foam bubbles are relatively small in size and circular in shape, and no interaction between bubbles was observed. At 85%, the interaction was noticed, and the average size of the bubble was larger. While at 90%, greater interaction and the circularity of bubbles were less than a perfect circle due to a high content of gas that tends to interact between bubbles. Chen et al. (2005b) have investigated the rheological properties of polymer-based foam with different foam qualities; 70, 80, and 90%. The foam behaved like a power-law model, where the flow behavior index, n, decreases as foam quality increases. Chen et al. (2005a) determined the foam's apparent viscosity through a rotational viscometer at different foam qualities of 70, 80, and 90%. Two types of cup-rotor assemblies were utilized, including smooth and roughened cup-rotor. At low quality (70%), higher shear stress with roughened cup-rotor was obtained, which means that the roughened cup-rotor assembly is capable of minimizing the wall slip at low foam qualities. While at high quality (80 or 90%), lower measurements were obtained due to the presence of a thin liquid layer at the wall. Additionally, Results exhibit that for lowquality foams (70%), the flow behavior index, n, is sensitive to polymer concentration and foam quality. However, for high-quality foams (80-90%), n is less sensitive to polymer concentration and foam quality. Sani et al. (2001) found as the quality increased from 0 to 80%, the viscosity increased extremely from 35 to 300 cP at 100 s −1 and low temperature (75 °F). Sherif et al. (Sherif et al. 2016) studied the rheological properties of oil-based drilling foam at quality ranging from 34 to 68% using three pipe viscometers. The measured data fit the power-law model, where the yield stress was not observed, and the flow behavior index of the foams slightly decreased with increasing foam quality. Akhtar et al. (2018) examined the effect of foam quality on the rheological properties of aqueous foams using recirculating flow loop at different foam qualities. Results indicate that foams behave power-low model at low quality (less than 50%), as the flow behavior index is slightly decreased. This is because the foams behave as a bubbly liquid. On the other hand, at high quality (more than 50%) the yield stress was observed, fitting Herschel-Bulkley model, and the flow behavior index was sharply decreased.

Effect of temperature
Generally, as the temperature increases, the foam viscosity decreases due to the diminishing of continuous deformation, affecting the foamability, and stability (Harris and Reidenbach 1987;Bonilla and Shah 2000). Additionally, decreasing viscosity due to thermal thinning of the base liquid fluid exaggerates the liquid drainage in the PBS (bubble lamellae). Sani et al. (2001) observed thermal thinning when the temperature increased due to the liquid drainage in the lamellae. Khade and Shah (2003) found that the reduction in apparent viscosity for high-quality is less than for low-quality ones. Similar observation by other authors (Chen et al. 2007). On the other hand, Lourenço et al. (2004) claimed that temperature does not have a significant influence on foam viscosity based on their data. Suradi et al. (2015) investigated the effect of Xanthan gum on foam viscosity using the Brookfield viscometer at 27 °C. The experimental results indicated that the addition of Xanthan gum increased the foam viscosity, as shown in Fig. 9. This behavior can be attributed to the repulsive interaction between surfactants and polymers (Rojas et al. 2001). Khade et al. (2003) found the viscosity of liquid base has a dominant role which affecting foam viscosity; when the 40 lbm/M gal of guar polymer is added to the surfactant solution, foam viscosity increases from 90 to 150 cp at a shear rate of 500 s −1 . The same trend was observed by Sani et al. (2001). Chen et al. claimed that at low foam viscosity (70%), the polymer has a minor effect on foam viscosity while it has a significant effect at higher foam quality (90%). On the contrary, Saxena et al. investigated the effect of HEC, as a polymer, on foam viscosity. The authors claimed that as the polymer concentration increases, the foam viscosity increases, reaching a maximum and then beginning to decrease. This behavior can be attributed to the electrostatic forces between the heads and tails of the surfactant molecule adsorbed on the polymer chain (Hoff et al. 2001;Janiaud et al. 2007).

Effect of rock surface chemistry
The interactions between injected foam and reservoir rocks play a critical role in the success of a drilling operation. Foam is stabilized by surfactants; however, these surfactants may get adsorb on the rock surface. Surfactant adsorption in rock surfaces (sandstone and carbonate) depends on the surfactant type, surfactant structure, rock type, and mineralogical composition. The anionic surfactant is typically adsorbed on rock surfaces due to the ionic attraction of negative charge from surfactant and positive minerals of sandstone or carbonate formation (Lawson 1978). Cationic surfactants are widely used in carbonate formation. In sandstone, the adsorption amount of cationic surfactants decreases once the pH and temperature increase (Cui et al. 2015). Zwitterionic surfactant has a complex adsorption system. At low pH, it becomes more cationic and adsorbs more on sandstone and less on carbonate, based on electrostatic interactions (Zhang et al. 2016). However, nonionic surfactant does not interact through the electrostatic force. The adsorption is controlled Fig. 9 Rheological properties of different types of foam. (Suradi et al. 2015) through the hydrogen bond between the hydroxyl group in the rock surface and oxygen or ethoxy groups of nonionic surfactant (Jian et al. 2016).

Effect of pressure
There is a noticeable conflict regarding the effect of pressure on foam rheology. It is still not obvious and not wellunderstood and further studies need to be implemented. Lourenco et al. (2004) performed flow loop tests in foam viscometer at a different range of pressure (25-650 psi). They found that pressure has no significant impact on foam viscosity, inconsistent with other authors (Firoze Akhtar et al. 2018). Tariq et al. (2022) studied the effect of pressure on foam viscosity using an artificial intelligence model based on experimental data. They concluded that pressure has a weak inverse relationship with foam viscosity. While, Duan et al. (2008Duan et al. ( , 2010 found that the apparent viscosity increased with pressure at a shear rate of 0 to 600 1/s and foam quality of 80%.

Effect of ionic strength
Surfactants are sensitive to brine ionic strength, which could affect the stability, foamability, and viscosity of generated foam. Kadafur et al. (2021) determined the foam's apparent viscosity of different surfactants under harsh reservoir conditions (100 °C, 1000 psi) and various salinity water. The results showed that the higher the water salinity, the higher the effective viscosity. The foam viscosity of Duomeen TTM at a shear rate of 100 1/s was 21 cp in distilled water, 32 cp in seawater, and 76 cp in formation water. Almobarky et al. (2018) investigated foamability and foam stability using AAS and IOS surfactants at different salinities. They found that salinity does not affect the foamability of AAS surfactant, while IOS has impacted it. The foam half-life of AAS is higher than IOS; however, the foamability declined sharply as the salinity increased.

Case studies
Case Study1: PR-70 well (Shadravan et al. 2009 The Parsi field is located 130 km southeast of Ahwaz in Iran. Parsi field is a naturally fractured reservoir composed of limestone with intercalations of dolomite and clay roasts into shale layers. The average permeability in the north area of Parsi is 731 mD, while it is 178 mD in the south part. The expected reservoir pressure at the top of the pay zone was 2190 psi. The reservoir temperature was about 150 °F (NIDC a 2005). Since the reservoir is highly fractured with low bottom-hole pressure, UBD techniques were selected to eliminate the fluid losses, minimize formation damage, and increase the well productivity. The UBD operation started after the casing shoe at a depth of 2226 m to the final depth of 2592 m (Shadravan et al. 2009). The UBD fluids were composed of nitrogen and native crude oil. The bottom hole circulation pressure was maintained at 1800-2000 psi to ensure underbalanced pressure. The drilling injection rate of nitrogen was 1500 scfm, while the oil injection rate was 300 gpm. The annular liquid velocity was 213 ft/min, which provided efficient cuttings carrying capacity. The UBD methods were successfully applied due to some reasons including, no circulation losses, no hole cleaning issues, and 24-30% better than OBD in terms of safety.
Well and field name Qadirpur field Location It is located in northern Sindh, Pakistan Well and field name Qadirpur field Reservoir description (NIDC a 2005) The formation consists of a highly fractured Sui Main Limestone (SML) formation. The average porosity is 18-20%, and the average permeability is 20-25 milli Darcy (mD) Drilling method Started to drill conventionally up to 1919 m depth, then UBD started to reach the final depth of 2074 m, drilled horizontally Drilling fluid selection A nitrified foam system. ECD = 3.4 ppg Operation conditions Drilling injection rates = 1000-1100 scfm nitrogen and 60-70 gpm liquid solution with %1.5-2 v/v surfactant Outcomes UBD is 24-30% better than conventional OBD Average gas and oil production rates while drilling were 9000 scfm and 250 bbl/min, respectively No circulation losses no hole cleaning problems while drilling the UBD section Qudirpur gas field is located in northern Sindh, and it was discovered in 1990. This formation has more than 60 wells that produce about 290 million standard cubic feet/day (MMSCFD) gas under compression. The formation mainly consists of Sui Main Limestone (SML). The pressure of Qudirpur was 890 psi at 1350 m true vertical depth with an average porosity of 18-20% and an average permeability of 20-25 milli Darcy (md). Numerous problems were reported when the SML formation was drilled conventionally, such as total circulation losses, extreme formation invasion damage, and stuck pipe. In this regard, UBD was implemented to overcome the potential formation damage using nitrified foam fluid. The equivalent circulating density of foam fluid was maintained to be 3.4 ppg, lower than the formation (3.9 ppg). The drilling started conventionally up to a depth of 1919 m and then shifted to UBD until the target depth of 2074 m. The nitrogen injection rates were maintained between 1000 and 1100 scfm and the liquid pumping rate at 60-70 gpm with the addition of foam surfactant from 1.5 to 2% v/v. The UBD was applied successfully with no damage and zero skin factor. The offset well produced 20 MMSCFD, compared favorably with the conventional drilling method, which produced only 1-2 MMSCFD. Additionally, UBD obtained a higher penetration rate compared with the conventional technique.
Case 3 Drilling method Started with OBD up to the shoe track at a depth of 3365 m, then UBD started to the final depth of 4102 m ROP = 5.14 m/hr The drawdown of the initial reservoir pressure was 5-15% Drilling fluid selection Nitrogen Outcomes 40% of the drilling cost was recovered during the drilling Oil production was 4.5 times more than conventional at the same production area Hassi Messaoud field is located in Algeria, it has more than 1000 wells that cover 2000 km 2 . The formation is composed of hard Cambrian age sandstone with porosity of 7.4% and permeability of 2.5 mD. The initial reservoir pressure was 3555 psi. The drilling operation began with OBD up to the depth of 3365 m, then, the formation drilled slightly overbalanced until the depth of 3442 m. A flow test was performed at this depth. Later, the UBD started with a 5-15% drawdown of the initial pressure until the depth of 4102 m. The average production rate of the neighboring wells that were drilled conventionally was 2.5875 m 3 /h. while, the average production rate of the UBD well was 11.93 m 3 /h. This was approximately 4.5 times more than the conventional nearby wells. The authors found that 40% of the drilling cost was recovered during the drilling operation due to the production during the drilling phase, where the total drilling cost was expected to recover within 278 days (assuming $50 per bbl for crude).

Conclusions
UBD can be a very favorable technique in certain reservoir conditions to reduce formation damage if properly designed and executed. The accurate application of UBD can reduce the risk of stuck pipe, mud losses, hole conditioning, logging operation, casing running, etc. Based on the analysis of the existing studies, conclusions could be drawn as the following: • UBD is not a solution for all reservoirs, but the time and financial results can be significant when properly implemented. It is suitable for depleted, highly fractured, and hard formation. Therefore, the characterization of the reservoir is very important to design and execute the UBD properly. • To accomplish underbalanced pressure, low-density fluids must be utilized, including dry air, foam, or aerated fluid.
• Dry air is the cheapest, but it suffers from downhole fires, bad hole cleaning, and a low carrying capacity for cutting transport. • Foam is a complex fluid containing liquid, gas, and foaming agent. Technically, foam drilling fluids provide better clean-up, effective cuttings lift capacity, and less formation and environmental damage. Foam drilling fluids are categorized into three classes, stable foam, stiff foam, and oil foam. • Stiff foam is the most common one because polymers tend to create a stronger bubble that could lift more cuttings and stabilize the borehole. • The main disadvantages of applying foam drilling fluids are foam stability and its propagation. However, the literature review reported different methods to stabilize the foam, including nanoparticles, viscoelastic surfactant, and surfactant mixture. • Foam texture plays a significant role in the transportation of cuttings, coarse bubbles have a low suspension capacity of cuttings due to the low viscosity.

Recommendations
This paper highlighted the application of foam in the underbalanced drilling process, and it is observed that there are a few studies on the rheology of foam drilling. Hence, the following recommendations can be drawn: • The numbers of surfactants and additives used in foam drilling research are limited. Various surfactant types could be utilized such as cationic, nonionic, zwitterionic, and Gemini surfactants. • It is recommended to examine the impact of water chemistry on foam rheology and foam stability. To the best of our understanding, no study investigated the effect of water chemistry on foam drilling properties. • The stability of foam makes it possible to reduce pressure in the hole and maintain it consistently. Minimum hydrostatic pressure is achieved with a greater gas content. This can be done without inducing the separation of gas and water. Therefore, it is recommended to study the stability of foam drilling. • Most of the experiments were conducted at low temperatures, to represent the reservoir conditions, experiments could be performed under harsh conditions (high temperature and high salinity).
Funding The authors declare no competing financial interest.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http:// creat iveco mmons. org/ licen ses/ by/4. 0/.