Applications of Biodiesel in Drilling Fluids

Biodiesel, referred to as the monoalkyl ester of long-chain fatty acid ester that is synthesized by the complete transesterification of triglycerides, has captured the attention of drilling researchers attributing to its magnificent characteristics such as the high flash point, excellent lubricity, nontoxicity, high biodegradability, and abundant feedstock resources, which make it ecofriendly and technically and economically feasible for a sustainable drilling operation. There are several studies that reported and documented the usage of biodiesel in drilling fluids on laboratory and field scales. In this paper, the production and the key physical and chemical properties of biodiesel are thoroughly reviewed. Moreover, the applications of biodiesel in drilling muds either as base fluids or additives were comprehensively surveyed. The literature review revealed that the challenges of biodiesel applications in drilling mud systems are related to its chemical reactivity and adverse interactions with some additives, along with its performance deficiency at temperature above 120°C. Therefore, further investigation on temperature stability and additive compatibility is recommended. In addition, as a new approach, it is recommended to study the potentiality of using crude waste oils in drilling mud formulations. The lessons learned and recommendations stated in this paper will assist in enhancing the proved use of biodiesel and drilling fluid optimization.


Introduction
Over the years, the petroleum industry has employed different chemicals and additives to design various fluid systems-named as drilling fluids or drilling muds-to drill a wellbore. These drilling fluids are composed of a continuous phase mixed with active/inactive solids and chemicals [1].
Appropriate drilling fluid design has always been a challenge. It requires some standardized testing and screening for many key factors such as the formation type, pressure, temperature, well trajectory, economics, and environmental restrictions. Hence, the drilling fluid system must be designed and treated in a manner that its chemical and physical properties fulfil the optimum drilling performance criteria alleviating problems associated with drilling operations such as stuck pipe, wellbore instability, lost circulation, formation damage, and shale heaving [2][3][4][5].
The commonly used types of drilling fluids over drilling operations, either onshore or offshore, are the aqueous drilling fluids commonly named water-based mud and nonaqueous-based drilling fluids called oil-based mud [6][7][8].
Accordingly, the industry has recognized the need for alternative ecofriendly and cost-effective additives and base fluids that uphold the higher technical criterions and fulfil the environmental regulations [31][32][33][34][35]. As a response, synthetic-based muds were developed to combine the practical advantages of both oil-and water-based muds. Different base fluids were developed (i.e., synthetic hydrocarbons, ethers, acetals, and esters) [36][37][38]. The synthetic hydrocarbons include linear alpha olefins (LAOs), polyalphaolefins (PAOs), internal olefins (IOs), linear alkyl benzenes (LABs), and linear paraffins (LP). The ethers are usually synthesized by condensing and partially oxidizing different chain lengths of alcohols. Acetals can be generated by reacting an aldehyde with an alcohol or carbonyl compound in the presence of catalyzed acid, while the reaction of carboxylic acids with an alcohol under acidic conditions is used to produce the esters [22,25].
Generally, esters have three types: natural, synthetic oleochemical, and petrochemical esters. The conventional esters, which are artificially synthesized, associate relatively high cost [48][49][50][51]. Therefore, the attention was shifted to biodiesel as naturally occurring esters that have the favorable characteristics of conventional esters [52][53][54][55]. The substantial increase in the global production of biodiesel from 0.81 million m 3 in 2000 to 30.8 million m 3 in 2018 makes biodiesel a sustainable and cost-efficient option in drilling operations [56,57]. Many investigations and case studies have been conducted on core and reservoir scales with promising outcomes [51,[58][59][60][61][62][63][64][65]. In this paper, the production process and the key physical and chemical properties of biodiesel were thoroughly reviewed. Then, a comprehensive assessment was conducted on the applications of biodiesel in drilling muds as base fluids or additives.

Biodiesel Formulation
Biodiesel is the monoalkyl ester that is generated by the complete transesterification process of the long-chain fatty acid esters (known as triglycerides) [58,66,67]. This process refers to the chemical reaction for converting the triglycerides contained in the natural fats and oils to biodiesel and glycerol as a by-product.
Recently, among these different sources, waste oils have been heavily targeted to produce biodiesel. This is mainly attributed to the global trend of managing the waste disposals and reducing the negative impact on the environment, along with the cost reduction (i.e., the feedstock constitutes 70-95% of biodiesel production cost) [103,104].

Biodiesel Characteristics
The physical and chemical properties of biodiesel vary depending on the used feedstock. Table 1 lists the key properties of biodiesel that are derived from different feedstock [60,[105][106][107][108][109][110][111][112]. Generally, biodiesel shares similar characteristics as diesel. The content of unsaturated fatty acids contained in biodiesel, however, reduces the liquidity resulting in higher kinematic viscosity and higher pour point [113,114]. Moreover, biodiesel has a spectacularly higher flash point, reducing flammability risks. The absence of aromatic and sulfur contents in most biodiesel types reduces toxicity and corrosivity [61,115]. Biodiesel has good oxidation stability, exhibiting good shelf life, but less than that of diesel because of the low content of linoleic acid in the biodiesel [116]. Acid values present in the biodiesel controls the rheological properties. Biodiesel free of fatty acid is preferred at low temperature to assure high drilling performance [117,118].

Biodiesel Applications in Drilling Fluids
According to the ASTM D6751 [119] and EN14214 standards [120] and considering the abovementioned characteristics, biodiesel has an acceptable low kinematic viscosity, sufficiently high flash point, pour point lower than the most ambient temperature, nontoxicity, reasonable acid value, suitable thermal stability, remarkable biodegradability, lubricity, environmentally friendly production process, and abundancy [121][122][123]. All these characteristics have made biodiesel a viable option in drilling operations. Many researchers have developed different drilling mud formulations using biodiesel either as base fluids or additives.

Free Water
Biodiesel-Based Mud. The feasibility of biodiesel replacing diesel in nonaqueous-based mud has been extensively reported in the literature. Wang et al. [58] took the initiative to formulate water-free biodiesel-based mud. The formulated mud showed competent rheological and shale stabilization behavior compared to the oil-based mud commonly known as white oil. They showed that biodiesel, as base fluid which is less viscous than white oil by 50%, can serve the purpose of preparing a high-density mud more easily. Moreover, biodiesel showed better tolerance to the impurity of calcium and dry soil. In that study, several mud formulations were investigated to acquire the optimum recipe including biodiesel, bentonite, and ecodetrimental additives, such as organolignite for filtration reduction, without investigating the potential adverse environmental impact. Another study on water-free biodiesel-based mud was performed by Yang et al. [124]. They followed a similar approach to obtain the optimum formulation for desirable properties by adjusting and varying the included additives and barite particles. It is worth mentioning that the origin of biodiesel used in these studies was not described. 2 Geofluids Nevertheless, total elimination of water associates cost and rheological challenges [125].

Biodiesel in Water Emulsion
Mud. Different approaches of using biodiesel in water emulsion were introduced by Ismail et al. [60]. The work focused on studying the toxicity and biodegradation rate of biodiesel produced from palm, rice bran, and corn oils in comparison with conventional diesel. The formulated muds showed satisfactory environmental performance with the rice bran upholding the highest standards of environmental impact. Paswan and Mahto [65] developed sunflower-derived biodiesel in water emulsion mixed with a novel surfactant sodium methyl ester sulfonate that is synthesized from sunflower oil. Their developed formulation indicated better rheology and high emulsion and thermal stability. Table 2 describes the mud used in these two studies and the main findings. In aforementioned formulations of biodiesel in the water emulsion system, shale inhibition was problematic since water was the external phase.

Water in Biodiesel Invert Emulsion Mud.
Many studies investigated the development of water in biodiesel invert emulsion mud. Amin et al. [30] used biodiesel derived from palm oil as an external phase for the formulated invert emulsion mud. The formulation showed an acceptable operation and environmental characteristics. The drawbacks are the economical concern of using palm oil as a source of biodiesel and the potential adverse contamination with cement and seawater. Radzlan et al. [126] studied the effect of lime and primary emulsifier on the performance of biodiesel invert emulsion mud and found that the high content of lime increases the biodiesel hydrolysis, in which biodiesel reacts with water to form the undesirable carboxylic acid and alcohol. Hence, the lime content should be carefully controlled to reduce the hydrolysis effect [127]. A series of studies were  Figure 1: Biodiesel production by transesterification reaction [69]. Figure 2: Separation of transesterification products [75].  [51,61,63,111,125] to develop biodiesel invert emulsion mud formulation using the waste cooking oil as feedstock. They performed extensive experimental work to investigate the technical, environmental, and economic feasibility of the approach. They showed that such formulations have satisfied rheological and filtration properties, high lubricity and competency to be applied in deviated and horizontal wells, reasonable shale inhibition, tolerance to contamination, nontoxicity and high biodegradability, and economic feasibility. They also determined the appropriate amount of lime content to assure hydrolytic stability. Moreover, they improved the mud performance by developing various novel emulsifiers, organophilic clay, and rheological modifier. Sulaimon et al. [128] formulated biodiesel invert emulsion mud from palm oil. It shows comparable performance with diesel and better environmental performance. Palm oil was also used by Said and El-Sayed [67] to develop an optimized biodiesel invert emulsion mud formulation free of lime to obtain a flat rheology, contamination-tolerant and stable mud up to 18 ppg. A comprehensive study was conducted by Amanullah and Arfaj [129] to formulate biodiesel mud and derive a novel green emulsifier and lubricant from waste cooking oil. The laboratory tests showed a competent performance of the developed products as potential alternatives to the commercially used ones.

Biodiesel Glycerol
Oseh et al. [112,130] investigated the potentiality of using biodiesel derived from almond seed oil in invert emulsion mud formulation. The experiments proved its technical and environmental competency, as it showed comparable behavior to diesel in terms of rheology, filtration, shale compatibility, and thermal and electrical stability. Moreover, the formulation showed an improved environmental performance with less toxicity and better biodegradability. Recently, Onuh et al. [131,132] studied the use of biodiesel extracted from Calophyllum inophyllum plant oil as a continuous phase for invert emulsion mud with similar promising results compared to commercial synthetic base oil.
The mud description and findings of the water in biodiesel invert emulsion mud studies are summarized in Table 3.
Generally, utilizing biodiesel in the invert emulsion drilling fluid system has favorable operational and environmental characteristics but restricted to thermal stability of around 120°C, a temperature that could be exceeded in harsh drilling operations.

Biodiesel as Additives.
Li et al. [54] introduced a novel biodiesel-derived lubricant to be used with water-based muds. The results reported high lubricity performance with different aqueous mud formulations. The presence of sulfonated lignite, however, incapacitates the lubricity behavior due to the adsorbability and surface activity of sulfonated lignite. A green lubricant derived from waste vegetable oil was introduced by Amanullah and Arfaj [64], showing an improved lubricity of different water-based muds. The novelty of using biodiesel as a lubricant in water-based muds can be integrated with the usage of nanoparticle materials which indicated satisfied improvement in mud lubricity and rheology, particularly at elevated temperature [133].  Biodiesel has less toxicity rating, lower mortality rate, and higher degradation rate.
Biodiesel showed lower plastic viscosity by 6.3% and higher yield point by 110% compared to diesel.

Geofluids
Waste cooking oils are also used to develop emulsifiers with comparable performance to the commercially available ones as indicated by Amanullah and Arfaj [129]. Li et al. [111] also developed a stable package of an emulsifier containing tall-oil fatty acids, alkanolamides, alkyl sulfonate, and biodiesel derived from waste cooking oil for an improved mud formulation. Ramasamy and Amanullah [134,135] developed an emulsifier from waste vegetable oil and applied as a primary emulsifier in invert emulsion oil-based muds with competent rheological and filtration behavior. Paswan and Mahto [65] derived an emulsifier from sunflower oil biodiesel and studied its effect on biodiesel in water emulsion and indicated high emulsion stability.
Generally, the functional additives (either lubricant or emulsifier) derived from biodiesel were used successfully with different mud formulations and presented superior performance. However, a compatibility test is highly recommended for these additives with other mud components.
4.5. Biodiesel By-Product. As a by-product of the biodiesel production process, glycerol is produced with an amount ranging 9-13% w/w [72,136,137]. Extensive research has been conducted to utilize the considerable surplus of the produced glycerol. Pormerlau [138] investigated using glycerolbased mud in water-sensitive formations. Glycerol was used as a base fluid for drilling mud with 95/5 to 20/80 volume% of glycerol/water ratio. The results proved the competency of glycerol-based mud in such formations. Soares et al. [72] showed that glycerol has excellent performance as a lubricant with water-based mud and as an emulsifier with oil-based mud when compared with the available commercial prod-ucts. Marbun et al. [73,139] also evaluated the application of both crude and purified glycerol as base fluid for invert emulsion mud and lubricant for water-based mud. The results showed an increase in the viscosity of the crude glycerol-based mud, while the purified glycerol-based mud showed a significant viscosity reduction. They reported that glycerol has very effective lubricity and film strength with better filtration properties when used with water-based mud.
Allen et al. [140] verified that using polyglycerol as a dispersed phase has better behavior than calcium chloride in the invert emulsion mud system. The results showed some enhancement in the rate of penetration and well stability when using polyglycerol.
Malgaresi et al. [141] developed a new mud system by substituting 50% of water in water-based mud by crude glycerol. The results indicated superior filtration performance with lower formation damage and higher return permeability compared with the conventional water-based mud.
Pacheco et al. [142] examined drilling muds containing glycerol in presalt formation drilling by studying the dissolution kinetics of NaCl in these mud systems. They studied crude and purified glycerol at several rotation speeds and salt concentrations. They concluded that crude glycerol is not recommended due to the presence of residues in its composition.
4.6. Direct Usage of Biodiesel Feedstock. Over the years, there are several groups studying comprehensively the direct use of plant and vegetable oils in drilling fluids such as soybean, jatropha, palm, rapeseed, cottonseed, castor, coconut, groundnut, and moringa oils. They reported advantageous

Lessons Learned
Based on the conducted review on biodiesel formulation, characteristics, and applications in drilling fluids, the lessons learned are summarized as follows: (i) The direct usage of plant oils in drilling mud applications showed some beneficial properties, but they are expensive and thermally and hydrolytic unstable and have excessive viscosity (ii) To overcome the limitations of formulating drilling muds from pure vegetable oils, biodiesel is derived from nonedible and waste oils (iii) The studies proved that using biodiesel in drilling fluids showed improved rheological and filtration properties, excellent lubricity, reasonable emulsion stability, nontoxicity, and high biodegradation, which make biodiesel technically, economically, and environmentally feasible (iv) The deficiencies of biodiesel in drilling mud systems are related to the chemical reactivity and the interactions with other additives (v) The hydrolysis tendency of biodiesel is significantly affected by the presence of base catalysts, so the lime concentration in mud formulations must be highly controlled (vi) The review showed that biodiesel performance is limited to 120°C, and over this temperature, biodiesel might not be stable (vii) The application of water-free biodiesel-based mud is undesirable in terms of cost-saving and obtaining satisfactory rheological properties (viii) Shale inhibition is problematic when using biodiesel in water emulsion mud since water is the external phase (ix) The novel biodiesel-derived lubricants and emulsifiers have competent performance

Recommendations
Based on the review of the literature, some recommendations can be drawn as follows: (i) Compatibility test between drilling fluid components is advised before using biodiesel-derived additives (ii) The effect of different biodiesel mud formulations on formation damage should be verified (iii) Studies should be conducted to investigate the effect of high temperature on biodiesel performance. Thermal stabilizers could be investigated for potential use (iv) The viscoelastic properties of biodiesel muds should be studied to examine the elasticity behavior and the inner structure (v) Detailed cost analysis is required to verify the economic feasibility of biodiesel muds (vi) The potentiality of using crude waste oils in drilling mud formulations should be thoroughly studied

Data Availability
No data were used to support this study.

Conflicts of Interest
The authors declare that there is no conflict of interest regarding the publication of this paper.