Formulation and Study of an Environmentally Friendly Microemulsion-Based Drilling Fluid (O/W) with Pine Oil

: This work has developed and evaluated a microemulsion-based drilling ﬂuid formulation with characteristics to be applied in oil wells. The microemulsion was formulated with a solution of water/glycerol, pine oil, and Tween 80, a nonionic and biodegradable surfactant. The physical and chemical properties of the drilling ﬂuid obtained in this work were investigated through rheology and ﬁltration analysis, solids content, aging, lubricity, toxicity, and thermal degradation. A non-toxic microemulsion-based drilling ﬂuid oil-in-water (O/W) with high lubricity (0.07638) and thermal stability was obtained with suitable viscosity, gel strength and low ﬂuid loss (4.0 mL), low solids content (6%), stability in a wide range of salinity conditions, and the possibility of high water content (above 85% in mass fraction). The ﬂuid presented a pseudoplastic behavior, and statistically signiﬁcant Herschel–Bulkley parameters were obtained.


Introduction
The rotary drilling rig is capable of reaching great depths, which are very complex operation regions. Such activity is only possible due to the action of drilling fluid, which the American Petroleum Institute (API) defines as a circulating fluid that makes drilling operations feasible. The continuous circulation of drilling fluid was one of the main reasons for the successful use of rotary drilling, especially in areas considered non-drillable [1]. The success and the cost of rotary drilling depend substantially on factors such as the penetration rate of the drill bit into the formation; cleaning the face of the drill, as well as cleaning the bottom of the wellbore; and the support of the drilled wellbore. Drilling fluids directly affect all three factors mentioned [1][2][3][4][5]. It is often said that most problems in drilling operations are linked in some way to poor planning of the drilling fluids [6].
Drilling fluid, also called drilling mud, is injected by pumps into the drill string and returns to the surface through the annulus, a space between the wellbore walls and the drill string, carrying the cuttings generated by the drill bit. The returning fluid is diverted through a series of tanks or pits at the surface, allowing cutting separation and any necessary treatment, as the drilling mud must be adequate to the drilled formation [7]. Besides the cuttings carrying capacity, the drilling fluid is expected to cool the drill bit and the fluid had been performed since 1984 to minimize damages to the marine environments. These damages were primarily caused by the disposal of fluids, cuttings, and associated waste. Thus, polymeric fluids, glycol and glycerol additives, and synthetic fluids, despite their high costs, are less harmful to the environment and have superior properties than OBDF.
Glycerol is a liquid polyol, viscous and transparent, generated from vegetable or animal oils, and is soluble in water and alcohol in all proportions [32]. Corrêa et al. [33] studied the use of glycerol as the base for WBDF, where they concluded that it could be an alternative for aqueous drilling fluids, replacing other organic bases, due to its good thermal and oxidative stability, small interaction with the clay and different rheological properties that were adjusted by specific additives.
Tween 80 is a nonionic surfactant, i.e., it does not present ions in an aqueous solution, and it is water-soluble due to the presence of functional groups in its molecules that have an affinity for water [34]. In addition, Tween 80 is non-toxic and biodegradable [34][35][36][37]. It is mainly used in drilling fluids to improve rheology by increasing viscosity, for lubricious application, and for providing clay-swelling inhibition in water-based drilling fluids. Besides that, this surfactant presents excellent emulsifying properties [30].
Therefore, this work aimed to develop and study an environmentally friendly microemulsion-based drilling fluid applied to drilling operations of oil wells. For this, an oil-in-water (O/W) microemulsion was first designed, formulated with an aqueous solution of glycerol/water, pine oil, and Tween 80. The obtained drilling fluid was analyzed with regard to its rheological behavior, aging, HPHT conditions, fluid loss, solid and liquid contents, lubricity coefficient, pH analyses, toxicity, Fourier transform infrared spectroscopy (FTIR), and thermal stability (TGA/DTG).

Microemulsion Preparation
In order to obtain the microemulsion, a 1:1 water/glycerol solution (by weight) (acquired from Isofar Indústria e Comércio de Produtos Químicos, Rio de Janeiro, Brazil) was used as an aqueous phase, commercial pine oil as an oily phase, and Tween 80 (acquired from Dinâmica Química Contemporânea LTDA, Indaiatuba, Brazil) as a nonionic surfactant. The ternary diagram was then obtained using a titration methodology of the weight fraction, using a centrifuge to separate the phases, an analytical balance, and magnetic agitators to mix the components at 25 • C.
The mass titration was performed by fixing the proportion of two components of the diagram (binary side of the triangle) and titrating the third component ( Figure 1). The titration occurs until it is possible to verify the solubility of the ternary mixture throughout the region of the diagram, observing the formation or disappearance of the microemulsion region or other phases of the system. The visual observation of the macroscopic properties, such as the number of phases and physical state of the samples, makes it possible to determine the boundaries of microemulsion (homogeneous, Winsor IV or WIV region), two (water-in-oil microemulsion, or WII region, and oil-in-water microemulsion, or WI region) and three phases region (WIII region), and, later, the phase diagram.
After the ternary diagram construction, it was possible to choose the best composition point to design the drilling fluid.

Drilling Fluid Preparation
The drilling fluid was prepared with 200 g of microemulsion using additives and their respective amounts, as shown in Table 1. The microemulsion presented the following fraction by weight: 70% of the aqueous phase, 25% surfactant, and 5% oily phase. The desired concentrations of additives were chosen based on experimental investigation. After the ternary diagram construction, it was possible to choose the best composition point to design the drilling fluid.

Drilling Fluid Preparation
The drilling fluid was prepared with 200 g of microemulsion using additives and their respective amounts, as shown in Table 1. The microemulsion presented the following fraction by weight: 70% of the aqueous phase, 25% surfactant, and 5% oily phase. The desired concentrations of additives were chosen based on experimental investigation. The drilling fluid was prepared by adding xanthan gum to the aqueous phase of the microemulsion under constant stirring for 30 min. Then, the system rested for 72 h so as to complete the gum hydration. Next, NaCl and a Tween 80 and pine oil mixture were added to the system, with 5 min of stirring between each addition. Then, HP-starch, triazine, barite, and water were included, at 10 min intervals, under intense agitation of 17,000 rpm, using a Hamilton Beach Fann Model HMD200 mixer (Glen Allen, VA, USA).

Properties of Drilling Fluid
The specific gravity of the fluid was determined through a Fann Model 140 Mud Balance. A Fann 35A Viscometer was used to determine the apparent viscosity (AV), plastic viscosity (PV), yield point (YP), and initial and 10-min gel strength (G0 and Gf, respectively), for both drilling fluid and microemulsion.
The methodology used for the initial and 10-min gel strength analysis was based on the API Standard 13B [38], in which the rest time for the initial gel before starting the shear stress was 10 s and for the final gel was 10 min. The analyses were performed at 600, 300, 200, 100, 6, and 3 rpm, with the fluid remaining for 1 min in each rotation followed by  The drilling fluid was prepared by adding xanthan gum to the aqueous phase of the microemulsion under constant stirring for 30 min. Then, the system rested for 72 h so as to complete the gum hydration. Next, NaCl and a Tween 80 and pine oil mixture were added to the system, with 5 min of stirring between each addition. Then, HP-starch, triazine, barite, and water were included, at 10 min intervals, under intense agitation of 17,000 rpm, using a Hamilton Beach Fann Model HMD200 mixer (Glen Allen, VA, USA).

Properties of Drilling Fluid
The specific gravity of the fluid was determined through a Fann Model 140 Mud Balance. A Fann 35A Viscometer was used to determine the apparent viscosity (AV), plastic viscosity (PV), yield point (YP), and initial and 10-min gel strength (G 0 and G f , respectively), for both drilling fluid and microemulsion.
The methodology used for the initial and 10-min gel strength analysis was based on the API Standard 13B [38], in which the rest time for the initial gel before starting the shear stress was 10 s and for the final gel was 10 min. The analyses were performed at 600, 300, 200, 100, 6, and 3 rpm, with the fluid remaining for 1 min in each rotation followed by deflection readings. This API standard bases its viscosity model on the number of measurements conducted at a shear rate range typically spanning from 5.11 to 1022.1 s −1 [39]. Although limited, the API standard is still used in the field, as the data generated from the VG-meter is put into practice.
The flow curve was then plotted from the obtained VG-meter data, and the rheological parameters were accessed. The apparent and plastic viscosities and the yield point were calculated using Equations (1)- (3). where θ 600 is the reading at 600 rpm; θ 300 is the reading at 300 rpm.
To determine the initial and 10-min gel strength, the viscometer was submitted to a 600 rpm rotation for 1 min, then shifted to 3 rpm and turned off. After the rest time indicated previously for each gel, the viscometer was turned on, and maximum deflection reading was performed.
The microemulsion-based drilling fluid aging test was conducted in a Fann Roller Oven (Houston, TX, USA), inside a stainless-steel pressure cell with a capacity of 260 mL, at 66 • C for 16 h. After this period, the rheological test was repeated to evaluate the changes in the fluid properties caused by time, temperature, and agitation.
The fluid's rheological behavior at high pressure and high temperature (HPHT) was obtained using a Chandler Engineering HPHT viscometer (Tulsa, OK, USA), model 7500, in which five pressure and temperature pairs were applied ( Table 2). The same parameters as in the Fann viscometer (Houston, TX, USA) were determined, i.e., apparent viscosity, plastic viscosity, yield point, and the initial and 10-min gel strength. The fluid loss (filtrate volume) was obtained by static filtering in an API Pressurized Filter Press (Fann, Houston, TX, USA), at 6.895 × 10 2 Pa of compressed air and 28 • C during 30 min, according to API Standard 13B [38]. The filtering medium was a Fann filter paper (Houston, TX, USA), specially hardened, and this filtrate volume was measured in a graduated cylinder for 30 min.
The solid and liquid contents were determined using Fann Retort Kit Oil and Water 10 mL (Houston, TX, USA), with the addition of antifoam to the fluid. This equipment consists of a sample cup with a capacity of 10 mL, a heating chamber, an oven, and a condenser. The distilled fluid is collected in a graduated test tube. The distillation occurs for 35 min and reaches a temperature of 500 • C. The oil and water volumes collected in a graduated cylinder are measured and subtracted from the fluid sample volume, determining the volume of solids. If the fluid has a high NaCl content, it is necessary to subtract it from the solid volume.
The lubricity coefficient was obtained in an equipment EP-Lubricity Tester from OFITE (Houston, TX, USA). First, the fluid was stirred for 5 min in the Hamilton Beach mixer at a speed of 17,000 rpm. Then, the fluid was transferred into the equipment chamber, with a zero initial torque and at a speed of 60 rpm. Then, a force of 8.4 m/kg for 5 min was slowly applied, reading the amperes values. The amperes are converted in lubricity coefficient by a calibration graph.
The pH of the fluid was measured using a high-precision measuring instrument, a pH meter, which uses an electrometric method using a glass electrode that provides a direct reading in pH units.
The microemulsion and filtered reducer's particle size was obtained using the equipment ZetaPlus from Brookhaven Instruments Corporation (Holtsville, NY, USA) through Dynamic Light Scattering (DLS). The HP-starch was solubilized in distilled water to perform the measurement. This technique is based on the incidence of a light beam on the sample particles, causing it to disperse in different directions, with or without power loss. A discount of the particle size in the device's software was performed for the samples dissolved in a solvent. The particle size changes the intensity and angle of the light beam. The usage of lasers results in a scattering angle that is inversely proportional to the particle diameter [40].

Toxicity of Drilling Fluid
Toxicity reflects the potential to harm different organisms under specific exposure conditions. In order to determine the degree of toxicity of the EDF (excellent drilling fluid), toxicity and phytotoxicity tests were performed.
The toxicity test with Artemia salina is widely used because it is fast, reliable, low-cost, and has shown a good correlation with several biological activities. This species presents a clear response to slight variations in the quality of the environment so that its lethality is used to identify biological responses, with death or life being the only variables [41].
According to the methodology presented by Meyer et al. [41], the toxicity test was carried out using brine shrimp (Artemia salina) as an indicator of toxicity. Eggs were cultivated in seawater, exposed to sunlight for 48 h. Then, 5 mL of seawater was placed in test tubes, and 10 Artemia larvae were added to each tube. In these tubes, 5 mL of the tested drilling fluid dilution was placed with different concentrations for each tube. One of the tubes, which served as a control, was left without fluid, and 10 mL was completed with 5 mL of seawater. The system was observed for 24 h to determine the mortality rate [42].
The lethal concentration (LC50) was the lowest concentration that killed all shrimp larvae tested within 24 h. The test was performed in triplicate with the following fluid concentrations: 3, 6, 14, 20, and 26 (g fluid/L of seawater). According to Meyer et al. [41], compounds with an LC50 less than 1000 ppm are considered toxic.
Tests with plants sensitive to toxic substances may also be used to assess and monitor environmental contaminants [43]. The drilling fluid phytotoxicity assay was an adaptation of the methodology developed by Tiquia, Tam, and Hodgkiss [44], and Rufino et al. [42], in which the phytotoxicity of the fluid was evaluated in a static test by seed germination and root elongation of the gherkin (Cucumis anguria).
Solutions of the drilling fluid with distilled water were prepared at the following concentrations: 10, 14, and 20 g fluid/L of distilled water. Ten gherkin seeds were inoculated into Petri dishes containing filter papers. Each plate was inoculated with 10 mL of the fluid solution and incubated in the dark for five days at room temperature. After this period, seed germination, root elongation (≥5 mm), and germination rate were measured according to Equations (4)- (6).

Thermogravimetric Analysis and FTIR
Thermogravimetric analysis was developed using a TGA Q 500 balance from TA Instruments (New Castle, DE, USA), from 25 • C to 600 • C at 10 • C min −1 , using 100 mL min −1 of N 2 (99.999%) and approximately 10 mg of each sample. The FTIR spectra were obtained in a Fourier Transform Bio-Raid Excalibur Series (model FTS 3000 MX) spectrophotometer (Hopkinton, MA, USA), from 4000 to 500 cm −1 .

Phase Diagram
A ternary diagram was developed for the water/glycerol solution (G/W), pine oil (PO), and Tween 80 (S) (Figure 2). The presence of regions with one (microemulsion) and two phases (Winsor regions-blue areas) in the ternary diagram was observed for the studied system. For the construction of the ternary phase diagram, the mass fractions of each point in the diagram of the solubility curve of each region were calculated by mass balance from the quantities of each component obtained experimentally through the titration methodology. Initially, the mass of two components is fixed, and a titration starts with the third component until the transition from turbidity to transparency (monophasic ternary mixture) appears, meaning that the microemulsion region Winsor IV (WIV) was achieved [24,25].

Drilling Fluid
A ternary point within the microemulsion region with 70% aqueous phase, 25% surfactant, and 5% oily phase (Point 1) was chosen ( Figure 2). This point was chosen on the For the construction of the ternary phase diagram, the mass fractions of each point in the diagram of the solubility curve of each region were calculated by mass balance from the quantities of each component obtained experimentally through the titration methodology. Initially, the mass of two components is fixed, and a titration starts with the third component until the transition from turbidity to transparency (monophasic ternary mixture) appears, meaning that the microemulsion region Winsor IV (WIV) was achieved [24,25].

Drilling Fluid
A ternary point within the microemulsion region with 70% aqueous phase, 25% surfactant, and 5% oily phase (Point 1) was chosen ( Figure 2). This point was chosen on the bottom left due to the presence of a relatively small mass fraction of surfactant and a relatively significant mass fraction of the aqueous phase to reduce the drilling fluid's cost.
Using the formulated microemulsion with the chosen composition and following the described methodology, a homogeneous drilling fluid (Figure 3), named EDF, was obtained with a specific gravity of 1.12 g/mL and a pH of 7.20.
The formulated fluid presented a lubricity coefficient (CoF) of 0.07638. According to Redburn et al. [45], this value of CoF is similar to those obtained for non-aqueous fluids (NAFs), whose CoF usually ranges from 0.05 to 0.15. The smaller the CoF, the easier it will be to start or maintain motion between the surfaces.
The low CoF value obtained for EDF fluids is associated with the surfactant, which reduces the surface tension and the vegetable oil used in the formulation, allowing such fluids to be used in highly deviated and horizontal wells. These components decrease the risk of differential pressure sticking and friction of the mechanical parts and the wellbore walls, resulting in a better drill bit performance and increasing the penetration rate by reducing the drill pipe torque [46]. bottom left due to the presence of a relatively small mass fraction of surfactant and a relatively significant mass fraction of the aqueous phase to reduce the drilling fluid's cost.
Using the formulated microemulsion with the chosen composition and following the described methodology, a homogeneous drilling fluid (Figure 3), named EDF, was obtained with a specific gravity of 1.12 g/mL and a pH of 7.20. The formulated fluid presented a lubricity coefficient (CoF) of 0.07638. According to Redburn et al. [45], this value of CoF is similar to those obtained for non-aqueous fluids (NAFs), whose CoF usually ranges from 0.05 to 0.15. The smaller the CoF, the easier it will be to start or maintain motion between the surfaces.
The low CoF value obtained for EDF fluids is associated with the surfactant, which reduces the surface tension and the vegetable oil used in the formulation, allowing such fluids to be used in highly deviated and horizontal wells. These components decrease the risk of differential pressure sticking and friction of the mechanical parts and the wellbore walls, resulting in a better drill bit performance and increasing the penetration rate by reducing the drill pipe torque [46].

Rheology and Aging
Before preparing the drilling fluid, the microemulsion rheological studies were carried out at room temperature, 26.7 °C. For the developed drilling fluid (EDF), the rheology tests were performed at 26.7 °C and 71.1 °C, suitable for deep wells [47][48][49]. The consistency curves for the microemulsion and the EDF fluid at 26.7 °C and 71.1 °C are shown in Figure 4.

Rheology and Aging
Before preparing the drilling fluid, the microemulsion rheological studies were carried out at room temperature, 26.7 • C. For the developed drilling fluid (EDF), the rheology tests were performed at 26.7 • C and 71.1 • C, suitable for deep wells [47][48][49]. The consistency curves for the microemulsion and the EDF fluid at 26.7 • C and 71.1 • C are shown in Figure 4.  It was not possible to determine the deflection at 600 rpm for the microemulsion since this fluid presented a deflection angle above 300°, which is the device's maximum reading. This high value of deflection at 600 rpm indicates a fluid with high viscosity, probably due to its components interacting with each other so strongly that the structure of the compound closes itself, and the particle agglomerate is organized in a way that is very similar to a solid material particle.
Therefore, for the microemulsion, the shear stress (τ), in N/m 2 , as a function of shear rate (γ), in s −1 , at 600 rpm was estimated based on the curve of Equation (7), through a polynomial regression with R 2 equal to 0.9997.
The EDF fluid was aged and, subsequently, submitted again to rheological tests. The consistency curves of the aged fluid at 26.7 °C and 71.1 °C are shown in Figure 5.  It was not possible to determine the deflection at 600 rpm for the microemulsion since this fluid presented a deflection angle above 300 • , which is the device's maximum reading. This high value of deflection at 600 rpm indicates a fluid with high viscosity, probably due to its components interacting with each other so strongly that the structure of the compound closes itself, and the particle agglomerate is organized in a way that is very similar to a solid material particle.
Therefore, for the microemulsion, the shear stress (τ), in N/m 2 , as a function of shear rate (γ), in s −1 , at 600 rpm was estimated based on the curve of Equation (7), through a polynomial regression with R 2 equal to 0.9997.
The EDF fluid was aged and, subsequently, submitted again to rheological tests. The consistency curves of the aged fluid at 26.7 • C and 71.1 • C are shown in Figure 5. Therefore, for the microemulsion, the shear stress (τ), in N/m 2 , as a function of shear rate (γ), in s −1 , at 600 rpm was estimated based on the curve of Equation (7), through a polynomial regression with R 2 equal to 0.9997. τ = −0.0001γ 2 + 0.2759γ + 4.4457 (7) The EDF fluid was aged and, subsequently, submitted again to rheological tests. The consistency curves of the aged fluid at 26.7 °C and 71.1 °C are shown in Figure 5. The rheological model that fits the behavior of the fluid was the Herschel-Bulkley model, which is a three parameters model, being the yield stress (τ 0 ), which allows predicting the minimum force required to start the flow; the fluid consistency (k), which measures the fluid resistance to flow; and the index flow (n), which measures the away from the fluid behavior of the Newtonian model. The Herschel-Bulkley parameters and the rheological properties calculated of the microemulsion (Micro) and EDF fluid are presented in Table 3. The designed microemulsion (Micro) and EDF fluid presented pseudoplastic behavior, 0 < n < 1, at both temperatures and before and after aging ( Table 3). The microemulsion presented a high-stress yield and a high index flow, indicating a higher force required to start the flow and behavior close to the Newtonian. However, the Micro presented a lower resistance to flow. From Table 3, it can be seen that temperature had the most significant effect on the fluid EDF before aging, through increased yield stress and fluid consistency, making it more difficult to flow the fluid, and distanced the behavior from the Newtonian. In addition, the aging increased the yield stress and the index flow but reduced the fluid consistency.
As shown in Table 4, the microemulsion presented as the most viscous fluid, with higher AV and PV, requiring more power from the pump to flow from the higher YP. For the EDF drilling fluid, it is possible to notice that the increase in temperature and aging reduced the apparent and plastic viscosity of the fluid and increased the gel strength, with a more significant reduction of viscosities when the temperature increased. The increase in temperature decreased the YP (Yield Point), as there was a reduction in the attractive forces between the colloidal particles of both the microemulsion and the fluids (EDF and aged EDF), which can lead to a decrease in the fluid's capacity to carry the cuttings. However, it is possible to increase YP by adding a flocculant [6]. The transfer of the amount of movement due to the molecular activity in the aqueous medium is more negligible when compared to the cohesion force between molecules. Therefore, the shear stress and viscosities (AV and PV) are dependent on the magnitude of these cohesion forces that tend to resist the movement, keeping the molecules fixed. When the temperature increases, there is Brownian motion and a consequent reduction of the cohesion forces, reducing the electrostatic interactions and, therefore, reducing the viscosities.
Based on the American Petroleum Institute [38], Petrobras N-2604 (1998) established that drilling fluids should present apparent and plastic viscosities greater than 15.0 mPa.s and 4.0 mPa.s, respectively. Microemulsion-based drilling fluid viscosity may be very high for conventional field applications (Table 4). These high viscosities values can be decreased by raising the concentration of water or the addition of salts. However, after aging, the rheological properties of the fluid were more applicable, with a higher gel strength and lower viscosities.
Other models can mathematically represent the results shown in Figures 4 and 5, including Bingham plastic, Casson, and Hershel-Bulkley models [30]. Although Hershel-Bulkley presents the best fit for the data, none of these models fits the experimental data perfectly. Comparisons of the experimental versus calculated shear stress values, determined by the Herschel-Bulkley Model for the microemulsion and EDF fluid, were statistically analyzed using regression from ANOVA, with 95% confidence, as shown in Table 5. The approximation of the Herschel-Bulkley model for the microemulsion and the drilling fluid EDF are statistically significant (Table 5), with p-values below the significance level, α (0.05), and limits pairs, upper and lower, with the same sign.

Viscosity
The variation of the apparent viscosity with the shear rate made it possible to study microemulsion and EDF fluid behavior at 26.7 • C and 71.1 • C before and after aging. Linear regressions statistical analyses of the apparent viscosity curves were performed using the ANOVA of Microsoft Excel, with 95% confidence (Table 6). The decrease in apparent viscosity as the shear rate increases is known as shearthinning behavior, and it is usually a desirable property for drilling fluids. The apparent viscosity will be relatively low at high shear rates, prevailing in the drill pipe, thus, reducing the pumping pressures, and relatively high at low shear rates, located in the annular space that increases the cutting carrying capacity [50].
Evaluating Table 6, it is concluded that the linearization of the curves was statistically significant, with p-values below the significance level, α (0.05) and limits pairs, upper and lower, with the same sign.

HPHT Rheology
It is essential to simulate the high pressure and high temperature (HPHT) conditions that can be applied to drilling fluids at the bottom of the wellbore to quantify the fluid's behavior in these scenarios, which are different from the results measured on the surface. It is said that HPHT projects, mainly when drilled with synthetic-based drilling fluid (SBDF), have forced the industry to rethink hydraulics and rheology [51].
Following the API 13B Standard [38], using the same readings from the Fann viscometer, in the pressure and temperature pairs shown in Table 2, rheological tests were performed for the EDF fluid. As shown in Figure 6, they are related to test time, deflection readings, applied pressures, and temperatures. Through the analysis of the figure, it is possible to see that the fluid initially had high readings. Still, as the pressure and temperature increased, the deflection readings reduced and showed the same behavior, with slight variations in the intensity of the peaks, indicating that the EDF fluid stabilized with the increase in pressure and temperature, and that there was no degradation of its components in the duration of the test. behavior in these scenarios, which are different from the results measured on the surface. It is said that HPHT projects, mainly when drilled with synthetic-based drilling fluid (SBDF), have forced the industry to rethink hydraulics and rheology [51]. Following the API 13B Standard [38], using the same readings from the Fann viscometer, in the pressure and temperature pairs shown in Table 2, rheological tests were performed for the EDF fluid. As shown in Figure 6, they are related to test time, deflection readings, applied pressures, and temperatures. Through the analysis of the figure, it is possible to see that the fluid initially had high readings. Still, as the pressure and temperature increased, the deflection readings reduced and showed the same behavior, with slight variations in the intensity of the peaks, indicating that the EDF fluid stabilized with the increase in pressure and temperature, and that there was no degradation of its components in the duration of the test. According to the result, the fluid maintained its non-Newtonian behavior for all pressure and temperature pairs, having non-linear behavior with non-zero initial shear stress. Figure 7 shows the rheological properties of EDF fluid in HPHT. Analyzing the figure, it is possible to observe that the increase in pressure and temperature makes the fluid less viscous. Analyzing the apparent viscosity (Figure 7a), it is noticed that there was an oscil- According to the result, the fluid maintained its non-Newtonian behavior for all pressure and temperature pairs, having non-linear behavior with non-zero initial shear stress. Figure 7 shows the rheological properties of EDF fluid in HPHT. Analyzing the figure, it is possible to observe that the increase in pressure and temperature makes the fluid less viscous. Analyzing the apparent viscosity (Figure 7a), it is noticed that there was an oscillation in the values of the pairs followed, tending to stabilization in 35 mPa.s. For the plastic viscosity (Figure 7b), a reduction in this property was observed with the increase in pressure and temperature. The yield point (Figure 7c) showed a behavior similar to the apparent viscosity, with an oscillation of values and a tendency to stabilize at 46 × 0.4788 Pa. By simulating the rheological properties of EDF fluid in an HPHT scenario, it was concluded that, although viscosities are higher at ambient conditions (4.83 × 10 6 Pa and 26.7 °C), with increasing pressure and temperature, these properties have been reduced, as well as the necessary force for the flow. In addition, the fluid presented a very stable behavior, indicating that its composition does not change with the increase in pressure and temperature, thus being suitable for application in HPHT wells.
Jha, Mahto, and Saxena [16] proposed a new drilling fluid whose base is an O/W emulsion, composed of diesel, brine, carboxymethyl cellulose, gum tragacanth, and KCl, for application in low-pressure reservoirs or depleted reservoirs. Therefore, it can be noted that the emulsion was more stable with the increase in temperature, while in the microemulsion, there was a reduction to have stability in rheological properties later. AV, PV, and YP values were similar at close temperatures between the microemulsion and the emulsion. The microemulsion had the advantages of being composed of less toxic components and having similar rheological properties. By simulating the rheological properties of EDF fluid in an HPHT scenario, it was concluded that, although viscosities are higher at ambient conditions (4.83 × 10 6 Pa and 26.7 • C), with increasing pressure and temperature, these properties have been reduced, as well as the necessary force for the flow. In addition, the fluid presented a very stable behavior, indicating that its composition does not change with the increase in pressure and temperature, thus being suitable for application in HPHT wells.
Jha, Mahto, and Saxena [16] proposed a new drilling fluid whose base is an O/W emulsion, composed of diesel, brine, carboxymethyl cellulose, gum tragacanth, and KCl, for application in low-pressure reservoirs or depleted reservoirs. Therefore, it can be noted that the emulsion was more stable with the increase in temperature, while in the microemulsion, there was a reduction to have stability in rheological properties later. AV, PV, and YP values were similar at close temperatures between the microemulsion and the emulsion. The microemulsion had the advantages of being composed of less toxic components and having similar rheological properties.

HPHT Viscosity
For analysis of the fluid pseudo-plasticity, statistical analyses were performed using linear regressions of the apparent viscosity curves using ANOVA, with 95% confidence ( Table 7). From the analysis of Table 7, it can be concluded that the linearization of the curves was statistically significant, with a p-value below the significance level, α (0.05), and upper and lower limit pairs with the same sign. Furthermore, it was noticeable that the EDF fluid is pseudoplastic for all pressure and temperature pairs. The fluid oscillates its pseudoplasticity and reaches a stable value from 37.9 × 10 6 Pa and 80.0 • C; that is, the fluid presents more remarkable shear plasticity with the increase in pressure and temperature, reaching an R 2 of 0.9999 at 4.83 × 10 6 Pa and 216 • F.

Filtration and Solid/Liquid Content Analyzes
The filtrate volume obtained after 30 min at a pressure of 6.895 × 10 2 Pa was 4.5 mL in a formulation containing 1.72 g of filtrate reducer (HP-starch), according to Table 1. The result is lower than the maximum acceptable within the norms, remaining within API standards and showing optimal results. Furthermore, microemulsion-based drilling fluids are thermally stable, so, at HPHT (high-pressure, high-temperature) conditions, a similar result is expected, once they remain stable above 71 • C.
Junior et al. [30] studied the influences of the NP100 surfactant and pine oil on the formation of the filter cake and filtrate volume of microemulsion-based drilling fluid, and the obtained data are consistent with the found result.
This low filtrate volume can be explained by the microemulsion structure formed by smaller-scale components compared to the custom-made polymeric fluid loss control. It blocks the pores in the filter cake of the drilling fluid, reducing the loss of filtrate and growth of the filter cake. In addition, the surfactant adsorbs preferentially on the surfaces of clays and minerals; thus, it allows more efficient packaging and less permeable filter cakes, which inhibits fluid loss and filter cake growth (Figure 8).
In order to confirm the tamponade theory presented in Figure 8, a study of the particle size of microemulsion and filtrate reducer, the HP-starch, was performed. The effective particle average diameter of the pure microemulsion was 165 nm, and the HP-starch was 3376.6 nm, confirming the smaller particle size of the microemulsion that will plug the rock pores without the need of any filtrate reducer.
Energies 2021, 14, x. https://doi.org/10.3390/xxxxx www.mdpi.com/journal/energies formation of the filter cake and filtrate volume of microemulsion-based drilling fluid, and the obtained data are consistent with the found result. This low filtrate volume can be explained by the microemulsion structure formed by smaller-scale components compared to the custom-made polymeric fluid loss control. It blocks the pores in the filter cake of the drilling fluid, reducing the loss of filtrate and growth of the filter cake. In addition, the surfactant adsorbs preferentially on the surfaces of clays and minerals; thus, it allows more efficient packaging and less permeable filter cakes, which inhibits fluid loss and filter cake growth (Figure 8). In order to confirm the tamponade theory presented in Figure 8, a study of the particle size of microemulsion and filtrate reducer, the HP-starch, was performed. The effective Then, the fluid loss test was repeated for the drilling fluid developed without the addition of a filtrate reducer. The filtrate volume obtained was 4 mL, confirming the plugging action of the microemulsion, and the obtained results were as good as the ones found in the literature [6,[52][53][54].
Because this is a microemulsion-based drilling fluid, the retort test is not very conclusive regarding the liquid content since it is not possible to distinguish each liquid's collect volume. The test obtained a total volume of liquid of 9.4 mL, separated into three phases: a cloud phase representing 86% of the total volume, a small phase mixed to cloud phase, and a dark yellow phase, representing 8% of the total volume.
The cloud phase corresponds to the aqueous phase with a small amount of the other two microemulsion components; the small, dispersed cloud phase is associated with the oily phase, and the dark yellow phase corresponds to surfactant. Therefore, by adding the percentages of the two phases and subtracting them from 100%, it is possible to calculate the 6% value of suspended solids in the fluid, a shallow and desirable value. This fact increases the working life of the drill bit and pumps, increases the drilling rate, allows easier control of the fluid rheology, and reduces the chances of differential pressure sticking problems during cementation.

Toxicity
According to the toxicity test using Artemia saline, the EDF fluid presented a lethal concentration, LC50, representing the concentration at which all the Artemia larvae died, of 14 g of fluid/L of seawater-that is, 14,000 ppm-being then classified as non-toxic, according to the classification by Meyer et al. [41].
The phytotoxicity test using gherkin seeds for the EDF fluid showed that, for all concentrations tested, the root elongation was less than 5 mm, making it impossible to calculate the relative root length and germination rate. However, according to Equation (4), relative seed germination was 100% for concentrations of 10 g fluid/L and 14 g fluid/L of water, and dropped to 90% at 20 g fluid/L of water. This result indicates that plant growth was more sensitive to fluid components than seed germination, which was affected only at concentrations above 20,000 ppm.

Fourier-Transform Infrared Spectroscopy (FTIR) and Thermogravimetric Analysis
The elucidation of the microemulsion and the drilling fluid obtained may be achieved from the FTIR analysis, comparing the individual components that make up the microemulsion and the final compounds obtained. The glycerol infrared spectrum showed C-O stretches of primary and secondary alcohols at 993 cm −1 , 1035 cm −1 , and 1109 cm −1 , CH 2 deformations, and C-O-H stretch, superimposed at 1214 cm −1 , 1329 cm −1 , and 1417 cm −1 , CH stretch at 2878 cm −1 , CH 2 stretch at 2933 cm −1 and OH stretch at 3300 cm −1 (Figure 9), following the results presented by Alba [55]. As found by Oliveira [56], the infrared spectrum of pine oil showed several bands of angular deformation C-C and aliphatic C-H between 500 and 1500 cm −1 , out-of-plane deformation of trans alkenes at 911 cm −1 , and bands with two signals at 1154 cm −1 and 1131 cm −1 , referring to the C-OH stretch of a secondary alcohol. The methyl band was observed at 1444 cm −1 and the geminal methyl, in pairs, at 1379 cm −1 and 1371 cm −1 . Bands at 1710 cm −1 and 1674 cm −1 are associated with C=C axial deformation, between 2965 cm −1 and 2924 cm −1 , referring to the C-H of saturated aliphatic carbon sp 3 , with the high-intensity characteristic of the terpene skeleton, and at 3375 cm −1 , to the stretch of O-H ( Figure 10). Complete characterization of pine oil is not possible as the composition of the material is complex and variable. The infrared spectrum of the Tween 80, following the results of Ren et al. [57], showed bands of angular deformation C-C and aliphatic C-H between 500 cm −1 and 1000 cm −1 , a signal referring to the deformation =C-H at 945 cm −1 , a signal of solid intensity characteristic of C-OH of primary alcohol at 1099 cm −1 , a 1460 cm −1 signal referring to methyl, a C=C stretch at 1636 cm −1 , a weak signal at 1734 cm −1 for ester C=O, aliphatic CH sp 3 - Figure 9. Infrared absorption spectrum of glycerol.
As found by Oliveira [56], the infrared spectrum of pine oil showed several bands of angular deformation C-C and aliphatic C-H between 500 and 1500 cm −1 , out-of-plane deformation of trans alkenes at 911 cm −1 , and bands with two signals at 1154 cm −1 and 1131 cm −1 , referring to the C-OH stretch of a secondary alcohol. The methyl band was observed at 1444 cm −1 and the geminal methyl, in pairs, at 1379 cm −1 and 1371 cm −1 . Bands at 1710 cm −1 and 1674 cm −1 are associated with C=C axial deformation, between 2965 cm −1 and 2924 cm −1 , referring to the C-H of saturated aliphatic carbon sp 3 , with the high-intensity characteristic of the terpene skeleton, and at 3375 cm −1 , to the stretch of O-H ( Figure 10). Complete characterization of pine oil is not possible as the composition of the material is complex and variable. As found by Oliveira [56], the infrared spectrum of pine oil showed several bands of angular deformation C-C and aliphatic C-H between 500 and 1500 cm −1 , out-of-plane deformation of trans alkenes at 911 cm −1 , and bands with two signals at 1154 cm −1 and 1131 cm −1 , referring to the C-OH stretch of a secondary alcohol. The methyl band was observed at 1444 cm −1 and the geminal methyl, in pairs, at 1379 cm −1 and 1371 cm −1 . Bands at 1710 cm −1 and 1674 cm −1 are associated with C=C axial deformation, between 2965 cm −1 and 2924 cm −1 , referring to the C-H of saturated aliphatic carbon sp 3 , with the high-intensity characteristic of the terpene skeleton, and at 3375 cm −1 , to the stretch of O-H ( Figure 10). Complete characterization of pine oil is not possible as the composition of the material is complex and variable. The infrared spectrum of the Tween 80, following the results of Ren et al. [57], showed bands of angular deformation C-C and aliphatic C-H between 500 cm −1 and 1000 cm −1 , a signal referring to the deformation =C-H at 945 cm −1 , a signal of solid intensity characteristic of C-OH of primary alcohol at 1099 cm −1 , a 1460 cm −1 signal referring to me- The infrared spectrum of the Tween 80, following the results of Ren et al. [57], showed bands of angular deformation C-C and aliphatic C-H between 500 cm −1 and 1000 cm −1 , a signal referring to the deformation =C-H at 945 cm −1 , a signal of solid intensity characteristic of C-OH of primary alcohol at 1099 cm −1 , a 1460 cm −1 signal referring to methyl, a C=C stretch at 1636 cm −1 , a weak signal at 1734 cm −1 for ester C=O, aliphatic CH sp 3 -s stretch at 2918 cm −1 (asymmetric) and 2859 cm −1 (symmetric), and an OH stretch at 3528 cm −1 (Figure 11). The infrared spectrum of the microemulsion, composed of glycerol, water, Tween 80, and pine oil, showed two signals referring to the C-OH stretch of a primary and secondary alcohol, at 1108 cm −1 and 1039 cm −1 , overlapping bands in the region from 1460 cm −1 to 1207 cm −1 referring to C-OH absorptions, CH2 deformation, methyl, and C=C stretching, a signal in 1649 cm −1 referring to the carbonyl (C=O) of ester, sp 3 -s stretching of aliphatic CH at 2928 cm −1 (asymmetric) and 2884 cm −1 (symmetric), and an OH stretch at 3340 cm −1 (Figure 12). The infrared spectrum of the EDF drilling fluid, composed of the microemulsion with additives, was very similar to the spectrum of the pure microemulsion, with two signals referring to the C-OH stretching of a primary and secondary alcohol, at 1082 cm −1 and 1039 cm −1 , overlapping bands in the region from 1460 cm −1 to 1250 cm −1 referring to C-OH absorptions, CH2 deformation, methyl, and C=C stretching, a signal at 1640 cm −1 referring to carbonyl (C=O) ester, sp 3 -s stretching of aliphatic CH at 2923 cm −1 (asymmetric) and 2962 −1 −1 Figure 11. Infrared absorption spectrum of Tween 80.
The infrared spectrum of the microemulsion, composed of glycerol, water, Tween 80, and pine oil, showed two signals referring to the C-OH stretch of a primary and secondary alcohol, at 1108 cm −1 and 1039 cm −1 , overlapping bands in the region from 1460 cm −1 to 1207 cm −1 referring to C-OH absorptions, CH2 deformation, methyl, and C=C stretching, a signal in 1649 cm −1 referring to the carbonyl (C=O) of ester, sp 3 -s stretching of aliphatic CH at 2928 cm −1 (asymmetric) and 2884 cm −1 (symmetric), and an OH stretch at 3340 cm −1 (Figure 12). The infrared spectrum of the microemulsion, composed of glycerol, water, Tween 80, and pine oil, showed two signals referring to the C-OH stretch of a primary and secondary alcohol, at 1108 cm −1 and 1039 cm −1 , overlapping bands in the region from 1460 cm −1 to 1207 cm −1 referring to C-OH absorptions, CH2 deformation, methyl, and C=C stretching, a signal in 1649 cm −1 referring to the carbonyl (C=O) of ester, sp 3 -s stretching of aliphatic CH at 2928 cm −1 (asymmetric) and 2884 cm −1 (symmetric), and an OH stretch at 3340 cm −1 (Figure 12). The infrared spectrum of the EDF drilling fluid, composed of the microemulsion with additives, was very similar to the spectrum of the pure microemulsion, with two signals referring to the C-OH stretching of a primary and secondary alcohol, at 1082 cm −1 and 1039 cm −1 , overlapping bands in the region from 1460 cm −1 to 1250 cm −1 referring to C-OH absorptions, CH2 deformation, methyl, and C=C stretching, a signal at 1640 cm −1 referring to The infrared spectrum of the EDF drilling fluid, composed of the microemulsion with additives, was very similar to the spectrum of the pure microemulsion, with two signals referring to the C-OH stretching of a primary and secondary alcohol, at 1082 cm −1 and 1039 cm −1 , overlapping bands in the region from 1460 cm −1 to 1250 cm −1 referring to C-OH absorptions, CH 2 deformation, methyl, and C=C stretching, a signal at 1640 cm −1 referring to carbonyl (C=O) ester, sp 3 -s stretching of aliphatic CH at 2923 cm −1 (asymmetric) and 2962 cm −1 (symmetrical), and stretching of OH at 3361 cm −1 (Figure 13). The results of thermogravimetric analysis (TGA/DTG) of the glycerol, pine oil, and Tween 80 ( Figure 14) showed only one mass loss event, proving the purity of these components. On the other hand, the thermogravimetric curve of the microemulsion showed three mass loss events in the same decomposition temperature ranges for each added component. Pine oil (Pinus sylvestris) is a vegetable oil consisting of terpene alcohols (65%) and terpene hydrocarbons, being a slightly polar compound with medium molecular weight, showing decomposition in the range of 35 °C to 321 °C. Glycerol, a polar liquid polyol with high intermolecular forces and low molecular weight, showed decomposition in the range of 70 °C to 213 °C and Tween 80 is more thermally stable due to its composition being basically a polyether, being a polar compound and of high molecular weight, decomposing at 310 °C to 488 °C.  The results of thermogravimetric analysis (TGA/DTG) of the glycerol, pine oil, and Tween 80 ( Figure 14) showed only one mass loss event, proving the purity of these components. On the other hand, the thermogravimetric curve of the microemulsion showed three mass loss events in the same decomposition temperature ranges for each added component. Pine oil (Pinus sylvestris) is a vegetable oil consisting of terpene alcohols (65%) and terpene hydrocarbons, being a slightly polar compound with medium molecular weight, showing decomposition in the range of 35 • C to 321 • C. Glycerol, a polar liquid polyol with high intermolecular forces and low molecular weight, showed decomposition in the range of 70 • C to 213 • C and Tween 80 is more thermally stable due to its composition being basically a polyether, being a polar compound and of high molecular weight, decomposing at 310 • C to 488 • C.
In thermogravimetric analysis, the decomposition range of pine oil varies from 35-121 • C, with a mass loss of 99.08% for the pure compost. In microemulsion, the first event corresponds to the range of 27-115 • C, with a mass loss of 39.75%. This range encompasses the loss of mass of pine oil and water present in the aqueous phase of the microemulsion. Adding the percentages of water (35%) present in the aqueous phase and pine oil (5%) to the microemulsion, the approximate mass lost in the first event is obtained. The maximum decomposition temperature of pure pine oil, observed by the DTG curve ( Figure 14), was 107.93 • C, and no residue percentage was obtained.
Glycerol decomposes in the range of 70-213 • C, with a mass loss of 99.1% for the pure component and, corresponding to the second microemulsion event, of 115-221 • C, with a mass loss of 36.21%, confirming approximately the percentage of glycerol added to the microemulsion (35%). The maximum decomposition temperature of pure glycerol was 203.6 • C, and no residue percentage was obtained.  ) is a vegetable oil consisting of terpene alcohols (6 and terpene hydrocarbons, being a slightly polar compound with medium molecu weight, showing decomposition in the range of 35 °C to 321 °C. Glycerol, a polar liq polyol with high intermolecular forces and low molecular weight, showed decomposi in the range of 70 °C to 213 °C and Tween 80 is more thermally stable due to its comp tion being basically a polyether, being a polar compound and of high molecular wei decomposing at 310 °C to 488 °C. In thermogravimetric analysis, the decomposition range of pine oil varies from 121 °C, with a mass loss of 99.08% for the pure compost. In microemulsion, the first ev corresponds to the range of 27-115 °C, with a mass loss of 39.75%. This range encompa the loss of mass of pine oil and water present in the aqueous phase of the microemuls Tween 80 (TW80) decomposes in the range of 310-488 • C, with a mass loss of 93.31% for the pure component and, corresponding to the third event of the microemulsion, of 290-485 • C, with a mass loss of 23.43%, approximately the fraction that was added to the microemulsion (25%). The maximum decomposition temperature of pure TW80 was 403.76 • C, with a percentage of residues of 2.40%.
Finally, for the drilling fluid (Figure 15), the first 60 % mass loss event occurs between 20-140 • C and corresponds to the oil and water fractions added to the fluid. The total mass of fluid was approximately 433 g. To this mass, 70 g of water was added in the aqueous phase of the microemulsion, 170 g of water as an additive, and 10 g of oil in the microemulsion, representing a total of 57.76%, approximately the value lost in the first event. The second event, between 140-230 • C, with a 15% mass loss, represents approximately 16.2% of glycerol added to the fluid. Furthermore, between 230-430 • C, a mass loss of 13% is observed, representing approximately 11.54% of the surfactant Tween 80 added to the fluid. Whereas the microemulsion had no residue percentage, with a maximum decomposition temperature of 67.94 • C, the drilling fluid had a residue percentage of 12%, corresponding to approximately 14.5% of added solid additives, with a maximum decomposition temperature of only 66.5 • C. This increase in the percentage of residues from the microemulsion to the drilling fluid refers to the added solid additives-being 0.7% xanthan gum, 2.32% NaCl, 0.4% HP-starch, and 11.08% barite-that have not degraded. The drilling fluid obtained has a maximum decomposition temperature of 66.5 • C. Despite starting its degradation at medium temperatures, the EDF fluid is indicated for usage in deep wells (HPHT). As shown in the HPHT tests, it maintains its stable rheology under this condition.
ies 2021, 14, x. https://doi.org/10.3390/xxxxx www.mdpi.com/journal/energies drilling fluid obtained has a maximum decomposition temperature of 66.5 °C. Despite starting its degradation at medium temperatures, the EDF fluid is indicated for usage in deep wells (HPHT). As shown in the HPHT tests, it maintains its stable rheology under this condition.

Conclusions
In this study, an environmentally friendly microemulsion-based drilling fluid (O/W) comprised of an aqueous phase, oily phase, and a biodegradable nonionic surfactant was studied. From the results, the following observations and conclusions may be drawn: - The oil-in-water (O/W) type microemulsion drilling fluid formulated had an adequate viscosity, gel strength, and low fluid loss and may be classified as a drill-in fluid. - The environmentally friendly microemulsion-based drilling fluid (O/W) developed offers a low cost because it is obtained from glycerol, a by-product of the biodiesel process, which presents a low commercial value. It is stable in a wide range of salinity conditions, presenting good lubricity characteristics, and allows a high concentration of water in the formulation, making it more economical. -It has unusual characteristic behavior since it presents better properties when the temperature is raised and presents itself as a sustainable and environmentally friendly alternative, since it uses pine oil, a vegetable and biodegradable oil, glycerol, that is not toxic, and Tween 80, a biodegradable surfactant. Another advantage is that it can be reused due to its stability, generating less waste in the drilling process. - The high viscosity of microemulsion-based drilling fluid (O/W) has utility in high temperature reservoirs, where the microemulsion is still stable, but its viscosity is substantially reduced, and the gel strength improves.

Patents
The fluid obtained is an innovative product protected by the patent number BR1020160 19048-7, INPI (National Institute of Industrial Property), Brazil.