Introduction

The success of drilling oil and gas wells is mainly among other factors, dependent on the quality of drilling mud being circulated which performs various functions that may influence the drilling rate and the cost efficiency as well as ensuring the safety of the entire operation (Holland et al. 2003). Both water-based mud and oil-based mud are widely used for this purpose. However, oil-based drilling muds are extensively preferred because they offer additional features such as: great ability to withstand high temperatures, provision of faster penetration rates and shale stability, as well as lubricious feature which makes them to be specially used to drill horizontal and deviated wells, thereby overcoming any risk of differential pipe sticking, and also inert to salt and anhydrite contamination (Fadairo et al. 2012). Mineral oil-based mud formulations have been used to meet these desirable features in more unreceptive drilling environments (Plank 1992). However, because of their non-biodegradability, toxicity, bioaccumulation, high aromatic content and also contaminated drill cuttings which are directly discharged into the local wildlife and flora which are harmful or poisonous to local life, they consequently became a worldwide concern. As a result, oil-producing countries like Cameroon, Nigeria, Norway, Holland, Australia, UK and USA have all strictly prohibited the use of mineral oil for the mud formulation in the off-/onshore activities (Radzlan et al. 2014; Withayapanyanon et al. 2013). According to Institution of Mechanical Engineers (2015), UK, there is approximately only about 1.3 trillion barrels of proven oil reserves still left in the world’s major oil fields, which at current rates of consumption will only be sufficient to last for 40 years. However, the ever-growing oil and gas demand is driving the industry among other options (e.g., enhanced recovery) to carry out more exploration and drill more oil wells to search for new resources in unexplored areas in deeper formations. For these reasons, it is crucial to explore a suitable substitute for mineral oil which has less detrimental effect on the environment. Biodiesel is an excellent candidate, since it is environmentally innocuous. Biodiesel/ester/synthetic oil are one of the promising oils, since they have the same properties as that of mineral oils and additional advantages of having zero toxicity and exhibit excellent biodegradability.

Biodiesel or free fatty alkyl ester is derived from vegetable oil or animal fats and consists of long-chain alkyl (methyl, ethyl, or propyl) esters. Biodiesel fuel exhibits low viscosity, consequently allowing the formulation of low-viscosity drilling mud. The feedstocks (waste vegetable oil, Jatropha curcas, trapped grease, soap and acidified oil) used for the production of biodiesel in China are diversified (Ding et al. 2012). It is therefore produced in large scale in the industries without any risk of shortage of the raw materials.

Ester-based muds were first used to drill some wells in the North Sea in Norway in 1990, then in UK in 1991 and the Gulf of Mexico in 1992 (Okorie et al. 2015; Friedheim and Conn 1996). They are relatively stable at neutral conditions but are susceptible to hydrolysis at high temperatures in the presence of water in an alkali or acidic medium. Hence, ester muds have seen limited applications in the field (Fechhelm et al. 1999; Dardir and Hafiz 2013). However, much global researches are presently ongoing and are focused on the investigation of suitable working conditions in the field in spite of its less adaptivity when exposed to severe wellbore conditions. Amin et al. (2010) have developed more environmentally friendly high-performance synthetic oil-based drilling mud with esters and a blend of ester and paraffin and a blend of ester and mineral oil as the main oil components. Palm fatty acid distillate biodiesel, lime and primary and secondary emulsifier biodiesel-based drilling fluid have also been recently formulated by Radzlan et al. (2014). They demonstrated the stability of oil-based mud by the introduction of a secondary emulsifier. The API filtration of a biodiesel-based drilling fluid successfully formulated by Wang et al. (2012) was also found to be 10 ml after aging at 180 °C, and additionally, its rheological properties was not affected by dry soil and calcium.

Biodiesels produced from waste vegetable oil have the ability to demonstrate greater stability compared to those from other feedstock. This may be due to the presence of antioxidants in the oil which inhibit the oxidation of the ester under severe conditions (Dunn 2008). This study in contrast to others centers on the production and examination of the performance of waste vegetable oil as additive in water-based bentonite mud in association with enhanced rheological behavior and filtration fluid loss control under high temperature, high pressure and saline field condition.

Experimental

Chemicals

The potassium hydroxide (90%) analytically pure was supplied by Wuhan Transit Chemical Company Limited, and ethanol (99.7%) and sodium carbonate (99.8%) were from Tianjin Beilian Fine Chemicals Development Company Limited. Hydrochloric acid (36–38%) was supplied by Xinjiang Chemical Reagent Factory. Bentonite clay, emulsifier, sulfonated methyl phenol, sulfomethyl hunate and phenolic resin, carboxymethyl cellulose sodium salt and barite were procured from Xinjiang Oilfield Company Limited. Lastly, the white oil 5# was obtained from Jingzhou Jiahua Technology Ltd.

Pre-treatment of the waste vegetable oil

The waste vegetable oil (WVO) supplied by Wuhan Mejie Feiyou Chuli Company Limited (Wuhan, China) was first dried and hot-filtered. The initial acid value of the oil was determined according to the China standard method (GB/T5530 2005) and was found to be 83.07 mg KOH/g oil using Eq. 1

$$ {\text{Acid value}} = \frac{{56.1\,\left( {\text{base}} \right)\,V}}{w} $$
(1)

where V is volume of base, (base) is concentration of base, and w is mass of oil sample.

Production of biodiesel

The biodiesel production consisting of three steps was carried out in a three-necked flask equipped with a reflux condenser, placed in a water bath.

Acid-catalyzed esterification reaction was first carried out by mixing 40 ml of the WVO and 14 ml of ethanol with 0.44 ml of HCl as catalyst at a temperature of 65 °C for 5 h. The free fatty acid in the waste oil reacted with the ethanol to produce free fatty alkyl ester with acid value of 3.36 mg KOH/g.

Ethanolic de-acidification of the esterified oil was then performed. This reduced further the acid value of the product to 0.56 mg KOH/g (<2 mg KOH/g) required to enhance the yield of the transesterification reaction.

The third and the final step of the process is the base-catalyzed transesterification reaction. Forty grams (40 g) of de-acidified oil was reacted with 14 g ethanol and 0.6 g of KOH as the catalyst at a temperature of 70 °C for 6 h as described in Tchameni et al. (2015). The biodiesel was washed with warm de-ionized water to remove the unwanted soap and the excess ethanol and then dried.

White oil 5# is a low toxic, synthetic and colorless mineral oil manufactured from mixtures of refined paraffinic and naphthenic hydrocarbons derived from crude oil. It has a viscosity ranging from 3 to 5 cP and high stability. Hence, it is used in oil-based drilling mud as a viscosifier, lubricant, fluid filtration loss control and also prevents clays from swelling. Its effectiveness was compared with the produced waste vegetable oil biodiesel as additive in water-based drilling mud under simulated saline downhole condition.

Recipe of drilling mud formulation and testing

In the three formulations, base mud consisting of 380 ml de-ionized water, 3 g sodium carbonate and 16 g (and 15 g for WBM) bentonite clay was first prepared using electrical mechanical stirrer and allowed to age for 1 day at 28 °C. Other ingredients were then added in bits with uniform mixing using high-speed mixer to form the biodiesel emulsion mud (BEM), white oil emulsion mud (WEM) and water-based mud (WBM) according to Table 1. Different tests were conducted after aging and cooling at 28 °C and stirring in a mixing cup for 5 min with a high-speed mixer according to American Petroleum Institute Procedure (API 2008). The results are shown in Figs. 1, 2, 3, 4, 5, 6 and 7. Rheological behavior of the different mud was measured using ZNN-D6 six-speed rotating viscometer. API filtration loss was measured using ZNS-A filter press test by applying nitrogen gas of 0.7 Mpa. High pressure high temperature fluid loss was investigated at a temperature range from 28 to 180 °C and constant pressure of 3.5 Mpa. The thermal stability of the mud samples was also investigated using roller-oven to age for 16 h at temperatures 110–180 °C. The Baroid mud balance was used to determine the mud density of the different samples. All the instruments used in these tests were supplied by Qingdao Haitongda Specialized Instrument Factory.

Table 1 Constituent of different mud formulation
Fig. 1
figure 1

Thermal effect on the rheological parameters of salt-free mud

Fig. 2
figure 2

Thermal effect on the rheological parameters of monovalent electrolyte-contaminated mud

Fig. 3
figure 3

Thermal effect on the rheological parameters of divalent electrolyte-contaminated mud

Fig. 4
figure 4

Shear stress versus shear rate profile, a without electrolyte, b with 0.3 N NaCl, c with 0.03 N CaCl2

Fig. 5
figure 5

Effect of temperature on the HTHP fluid loss

Fig. 6
figure 6

Filter cake and fluid loss of salt-free muds after aging at 180 °C

Fig. 7
figure 7

Comparative study of the mud cake thickness

Evaluation of the oil properties

The produced waste vegetable oil biodiesel used in this comparative study was characterized by determining some basic physicochemical properties.

Acid value

The acid values of the samples were determined same as the pre-treatment stage according to China standard method (GB/T5530 2005). The procedure is outlined as follows: 0.5 g of the oil sample was weighed and completely dissolved in a neutralized ethanol at 50 °C after adding a few drops of phenolphthalein, stirred and titrated against 0.1N KOH. The acid level was then determined using the formula above.

The viscosity

The viscosity was estimated using Brookfield DV-III Ultra programmable rheometer (Brookfield Engineering Lab, Middleboro, USA) equipped with a temperature controller at 40 °C. The oil sample was poured into a temperature-regulating container, and the viscosity was then determined using spindle 61 as described in Boakye (2013).

Moisture content

The moisture was determined in triplicate using 5 g of the oil. The oil sample was dried to constant weight in a thermostatically controlled oven at 103 °C for 12 h. It was then cooled in a desiccator and reweighted. The loss in weight expressed as a percentage of the initial weight of sample gives the percent moisture content on wet basis as stated in association of official analytical chemists methods (AOAC 1990).

Density

The density was determined using JA5003N digital precision electronic analytical balance at 15 °C according to ASTM D4052 (1995) using the specific gravity bottle. The steps are outlined as follows: An empty bottle was weighed, filled with water and reweighed. The water was poured out and dried. The same procedure was repeated using the different oil samples.

Flash point

The flash point was also estimated using Pensky–Martens closed cup method (ASTM D93 2003). The oil was poured into a container and tightly closed. Equipped with a thermometer, the temperature was increased gradually until a flash appeared and the temperature was immediately recorded.

Investigation of the rheological properties of the mud samples

Rheological properties of the mud samples were investigated for salt-free mud system and for both monovalent (NaCl) and divalent (CaCl2) electrolyte contamination between temperatures 28 and 180 °C. The different properties tested were: mud density (at 28 °C), plastic viscosity, thixotropy, yield point, rheological model, API filtration loss, cake thickness, HPHT filtration loss (for divalent electrolyte mud).

Results and discussion

Properties of the produced biodiesel and white oil 5#

Table 2 shows some basic physicochemical properties of the waste vegetable oil biodiesel and white oil 5#.

Table 2 Basic physicochemical properties of the produced biodiesel and white oil 5#

The density (0.87 g/cm3) and flash point (187 °C) of waste vegetable oil biodiesel were observed to be higher than those of white oil 5# which are beneficial for high-density drilling mud formulation and safe handling. The waste vegetable oil had favorably low viscosity (3.7 cP) for low-temperature operability. The acid value (0.4 mg KOH/g) and moisture content (0.035%) of the waste vegetable oil determined were within the acceptable range.

Mud density measurement

Water was first used as a calibrating fluid, and the density of the different mud samples were then measured at 28 °C. The results are shown in Table 3.

Table 3 Results of mud density for different samples

Biodiesel emulsion mud (BEM) density was found to be higher than that of WEM. This observation was attributed to the higher density of the WVOB compared to that of white oil 5# used in the mud formulation. But both BEM and WEB had lower density than WBM. When contaminated with the electrolytes, the mud densities increased with electrolyte valences. Controlling mud density is important to ensure the success of drilling operations. BEM exhibited the least density variation when NaCl and CaCl2 contaminants were added, hence displayed better density control than both WEM and WBM.

Evaluation of rheological parameters

The stability of mud rheological properties is mostly guaranteed by its homogeneity after prolonged heat treatment. Muds with relatively constant viscosity are preferred for performance efficiency during drilling operations. The results of the thermal effect on the rheological properties of salt-free muds and salt-contaminated muds are discussed as follows.

Thermal effect on salt-free mud system

Figure 1 shows the thermal effect on the rheological parameters of salt-free mud. It was observed that BEM had lower plastic viscosity at 28 °C compared to WEM. This was attributed to the high viscosity of the white oil 5# as shown in Table 2.

As observed in Fig. 1a, BEM exhibited the better retention of plastic viscosity while WEM declined in plastic viscosity by almost 38% (31–19 cP) when aged from 28 to 180 °C. Biodiesel emulsion mud (BEM) dropped by 16% (25–21 cP) under a similar condition. The plastic viscosity of WBM slightly increased by 4.5% (22–23 cP) when aged from 28 to 130 °C and then dropped by about 30% (23–16 cP) after further heat treatment between 130 and 180 °C. The yield point for WBM increased by almost 69% (from 19 to 63 lb/100 ft2) from 28 to 130 °C and then declined by about 47% (from 63 to 33 lb/100 ft2) within a temperature ranging from 130 to 180 °C, and that for WEM increased by almost 52% (from 21 to 44 1b/100 ft2) from 28 to 180 °C. However, BEM was relatively stable within the same temperature range as indicated in Fig. 1b suggesting its greatest ability to carry cuttings to the surface. This was probably due to the presence of antioxidants in biodiesel. As a hygroscopic compound, biodiesel strongly interacted with water molecules through their carbonyl groups and hydrogen bonds leading to absorption of droplets on the surface bentonite platelets and carboxymethyl cellulose colloids. Thus, preventing aggregation and flocculation of the particles as well as compression of clay double layer when exposed to heat treatment while WEM and WBM gradually lost their initial properties from the unaged mud at 28 °C to the heat-treated mud at 180 °C because WEM containing white oil 5# is non-polar compound, hence de-emulsification took place under thermal effect resulting in progressive phase separation. The thermal effect on the mud thixotropy is presented in Fig. 1c. It was observed that as the temperature increased from 28 to 180 °C, WBM thixotropy gradually diminished from 15 to 1 lb/100 ft2 suggesting a high flat gel structure at 180 °C which is undesirable during drilling activities. Biodiesel emulsion mud (BEM) and WEM, however, experienced sharp decreased from 12–2 to 15–3 lb/100 ft2, respectively, from 130 to 180 °C but still retained their suspension properties at 180 °C.

Thermal effect on salt-contaminated muds

The thermal effect on the rheological properties of monovalent and divalent salt-contaminated muds is presented in Figs. 2 and 3, respectively. The rheological properties of the BEM were better because of the addition of waste vegetable oil biodiesel than that of WEM and WBM (Table 4).

Table 4 Effect of the temperature on the rheological behavior of different mud samples contaminated with divalent electrolytes

Monovalent electrolyte contamination

When exposed to monovalent electrolytes (sodium chloride), the plastic viscosity of BEM dropped by only 16% (24–20 cP) while that of WEM (27–17 cP) and water-based mud (19–12 cP) reduced by about 37% within the temperature range of 28–180 °C as shown in Fig. 2a. Biodiesel emulsion mud (BEM) demonstrated a relative stability yield strength under thermal treatment from 28 to 180 °C (see Fig. 2b) while WEM and WBM sharply increased in yield points from 19–46 to 4–41 1b/100 ft2 under similar condition. The thixotropy of WBM progressively vanished (see Fig. 2c), while WEM and BEM gradually decreased but still maintained their suspension properties.

Divalent electrolyte contamination

As shown in Fig. 3a, when exposed to divalent electrolytes (calcium chloride), BEM still exhibited the best retention of plastic viscosity by losing only 28% (28–20 cP) of its initial viscosity when aged from 28 to 180 °C while WEM and WBM experienced serious drop by 55 (29–13) and 47% (19–10 cP), respectively. The yield point increased in order of BEM (26.5), WBM (58), WEM (68%) (see Fig. 3b). Hence, it was obvious that yield point of BEM was relatively stable compared to other muds within the temperature range of 28–180 °C and indicated favorable mud suspension properties as illustrated in Fig. 3c. When exposed to monovalent and divalent electrolytes, BEM can provide a fastest rate of penetration with the highest ability to carry drilled cuttings to the surface compared to WEM and WBM.

Rheological model

Figure 4 shows the rheological behavior of the muds. The rheograms of all suspensions exhibited a non-Newtonian flow. The rheological behaviors of the mud samples closely follow patterns of Bingham plastic model (see Eq. 2) at 28 °C. However, at a temperature of 180 °C, the samples rheogram generally approached the Herschel–Bulkley model (see Eq. 3). Herschel–Bulkley model is a general model of a non-Newtonian fluid, applicable to nonlinear curve and yield stress. It accounts for minimum yield stress required for the fluid to start flowing. White oil emulsion mud (WEM) and WBM exhibited higher yield stress compared to BEM (see Fig. 4a–c). The increase in yield stress was ascribed to the swelling of clay platelets as a result of thermal and electrolyte effect caused increased in the number of links between the particles

$$ \tau = \tau_{o} + \gamma \left( {\text{PV}} \right) $$
(2)
$$ \tau = \tau_{o} + \kappa \times \gamma^{n} $$
(3)

where τ is the shear stress, τ o is the yield stress, κ is the consistency factor, n is the flow behavior index, γ is the shear rate, and PV is the plastic viscosity.

High temperature high pressure (HTHP) filtration loss

HTHP filtration loss test was conducted at different temperatures ranging from 28 to 180 °C at a constant pressure of 3.5 MPa on the different mud samples contaminated with divalent electrolyte (CaCl2). In Fig. 5, BEM demonstrated a lowest HTHP filtration loss by providing a twofold fluid loss control (9.40 cm3) compared to WEM (18.40 cm3) and sevenfold effect over WBM (65 cm3). This gives an indication of the superior performance of BEM at high temperature high pressure. The low filtration loss in BEM was attributed to the absorption of ester compound by the interaction of its carbonyl molecule and charged colloidal particles through hydrogen bonds of water. The formed biodiesel protective layer enhanced the synergetic interaction between the ionic molecules of carboxymethyl cellulose (CMC), sulfomethyl humate and phenolic resin (SNPH), sulfonated methyl phenol-3 (SMP-3). This improves the mud performance through formation of a thin permeable filter cake and thus will minimize the fluid flow into the formation during drilling operation.

Investigation of the mud cake thickness of the different mud samples

In most cases, the mud cake thickness is related to the filtration volume. The higher the filtration volume, the thicker the mud cake which can cause stuck pipe incidents. Biodiesel emulsion mud (BEM) showed the lowest API filtration loss at 7.5 min for all mud conditions examined and hence the thinnest mud cake compared with WEM and WBM at 180 °C (see Fig. 6). The values of the API filtration loss which are not shown on the graphs are as follows: salt-free mud (1.50–1.80 cm3) for BEM, (1.50–5.05 cm3) for WEM and (1.60–19 cm3) for WBM; in monovalent contaminated mud: (1.25–1.90 cm3) for BEM, (1.25–5.05 cm3) for WEM and (1.80–22.50 cm3) for WBM; in divalent contaminated mud (1.85–2.20 cm3) for BEM, (2.50–6.40 cm3) for WEM and (3.50–28.00 cm3) for WBM. In salt-free mud, the addition of waste vegetable oil biodiesel in water-based mud reduced the movement of water into the clay pores leading to reduce the filtration volume as well as improved the quality of the cake. The BEM and WEM produced smaller mud thickness compared to WBM at 28 °C. However, at higher temperature of 180 °C, BEM produced much smaller cake thickness followed by WEM and WBM in that order. This is an indication of greatest stability of BEM compared with the others. Exposure to both sodium chloride and calcium chloride electrolytes increased the cake thickness of all the mud samples at 180 °C with a more important effect in calcium chloride, but BEM still maintained its best performance by producing the smallest thickness as indicated in Fig. 7.

Conclusion

High-quality biodiesel which meets international standards was successfully produced from waste vegetable oil under optimized conditions. Low cost, better performance and environmentally innocuous BEM was then formulated using the waste vegetable oil biodiesel (WVOB) as an additive. The formulated BEM proved to be more tolerant to viscosity changes as compared with WEM under both thermal and saline conditions. Biodiesel emulsion mud (BEM) demonstrated less API fluid loss of 2.20 cm3 and HTHP filtration loss of 9.40 cm3 as against WEM of 6.40 and 18.40 cm3 at 180 °C, respectively. Biodiesel emulsion mud (BEM) also exhibited relatively stable rheological properties compared to WEM after aging up to 180 °C. Biodiesel emulsion mud (BEM), WEM and WBM rheological models at room temperature followed Bingham plastic model, but at high temperature, their rheograms approached Herschel–Bulkley model. The formulated BEM demonstrated thermal and saline stability compared to WEM and WBM.