Optimization and Process Modeling of Viscosity of Oil Based Drilling Muds

The viscosity of oil-based drilling mud was optimized and modeled in this study. Imported bentonite and local clay additives, and diesel oil (base fluid) were used to prepare two muds; oil-based mud with bentonite (OBMB) and oil-based mud with clay (OBMC). The local clay was beneficiated with hydrochloric acid (HCl) and then characterized using an x-ray fluorescence (XRF) spectrometer. The result of the characterization revealed that the local clay is more silica (SiO 2 ) than kaolin. The interactive effects of three operating conditions, temperature, aging time, and bentonite/clay dosage, respectively, on the viscosity of each mud were determined. The Response surface methodology (RSM) of the central composite design tool of Design Expert software (version 12) was employed to optimize the viscosity of each mud. The RSM carried out revealed the interaction between the three operating variables of temperature, time, and dosage of bentonite/clay and their impact on the viscosity of each mud. Optimum viscosity of 19.3 𝑐𝑃 for OBMB and 25.9 for OBMC were obtained at temperature of 313K, aging time of 30 minutes and bentonite/clay dosage of 9 wt%. Analysis of variants (ANOVA), mathematical modeling, and graphical plots further established the actual interaction between the response-viscosity of each mud and the considered process factors. The generated models revealed linear, interactive, and quadratic equations which adequately described the relationship between the viscosity of each mud and the considered factors of temperature, time, and dosage. The experimental data and the predicted results were compared, and the model predicted values are in good agreement with the experimental results. respectively. These equations revealed that the highest power of the factors is 2 which is typical of a quadratic equation.


Introduction
The process of designing drilling muds is extremely important and is becoming one of the major focus points [1] in drilling operations. Generally, the main functions of drilling mud include: cooling and lubrication of the drill bit; cleaning the bottom of the hole; removal of drill cuttings to the surface; keeping cuttings in suspension; formation of filter cake; ensuring adequate information from the hole and preventing hole damage to the pay zone; minimizing risk to personnel, the environment, and drilling equipment; transmission of hydraulic horse-power to the bit; stabilizing the wellbore and controlling subsurface pressure [2][3][4]. In order to obtain superior performance from the drilling mud, optimizing its rheological properties suitable for different types of field/well is very pertinent.
Rheology is an important flow characteristic of muds, and the mud rheology must be controlled at adequate levels so as to provide optimum performance, since it is the basis for all analyses of well bore hydraulics [2]. Rheological properties consist of viscosity, gel strength, and yield point. However, viscosity -the internal resistance offered by a fluid to flow, according to Azinta et al. (2021) [4] is considered the most important rheological flow property on account of its ability to hold formation chip at the bottom [5,6]. Measuring and designing these properties is beneficial in formulating a good mud that can remove cuttings, hold cuttings and weight materials in suspension when not circulating, release cuttings at the surface and reduce to a minimum any adverse effect on the well bore [7] that could result in financial loss and, in extreme cases, abandonment of the well. In order to fulfil the requirements of different drilling wells, the rheological properties of drilling muds are enhanced using various additives for the mud formation. Additives commonly used in drilling mud formulations are; viscosifiers, viscosity reducers, weighting materials, fluid-loss reducers, lost circulation materials, corrosion control chemicals, and pH control additives [3].
It is essential for a mud engineer to understand the changes in mud rheology particularly viscosity brought about by varying subsurface conditions especially in oil wells [7]. In order to allot the most suitable drilling mud, a good understanding of the variation in mud rheology with temperature, mixing time and dosage of viscosity control agents (clay materialsclay/bentonite) is necessary. A model will be required to further understand these variations, more specifically in regards to factors such as viscosity.
Depending on the base materials/fluids used, drilling muds are classified into three major types; water based mud (WBM), oil based mud (OBM), and synthetic based mud (SBM). Compared to other types of drilling muds, OBM has the prominent advantages of higher penetration rate, thermal stability in deep high-temperature wells, increased lubricity in deviated offshore wells, and hole stability in thick, water-sensitive shales [7,8]. Well friction is lowered with oil-based drilling fluids. They are also often used in long-reach wells where friction is a paramount factor [1]. Furthermore, oil based muds offer excellent corrosion protection and could be stored for longer periods of time [5]. Considering the practical applicability of this study, an important area of application is in designing a suitable drilling mud for drilling geothermal wells, in addition to understanding the nature of wells since well situations may vary on account of geographical location [7,[9][10][11][12].
In this work, the viscosity of formulated oil based mud with bentonite (OBMB) and oil based mud with clay (OBMC) respectively, were optimized using response surface methodology and modelled, thereby revealing the effects of three process factors (aging time of mixture, temperature and bentonite/clay dosage) on the viscosity of each mud. Other rheological properties (such as gel strength, yield point, mud weight, and pH) of each of the formulated muds were determined as viscosity accompanying/allied rheological properties. Several studies have been carried out on the production of drilling mud and its additives, and the effects of aging time and temperature on the rheological and allied properties of drilling muds [13][14][15][16]. However, there is very little experimental data available that pertains to the optimization of viscosity of drilling muds and to the understanding of the interaction between the flow behavior of OBMB and OBMC (with particular emphasis on local clay from Awgu region in Enugu State, Nigeria), and the operating process factors of temperature, time and dosage. From the review of the previous studies, there is need to carry out the optimization study and process modeling of viscosity of oil based muds.

Equipment and Raw Materials
The equipment used in this work include; graduated measuring cylinder, beakers, electronic weighing balance, mixer, viscometer, drilling mud balance, water bath, pH meter, and stop watch. The raw materials used in the formulation of the oil based drilling fluids using bentonite and Awgu clay are presented in Table 1.

Experimental Procedure
The local clay obtained from Awgu region in Enugu State, Nigeria ( Figure 1) was beneficiated according to the method used by Omotioma et al. (2015) and Azinta et al. (2021) [3,4]. The various quantities of the raw materials were measured using a graduated cylinder and electronic weighing balance. The raw materials were then poured, one after the other, with an interval of 5 minutes into the steel cup of the single spindle mixer in a descending order as arranged in Table 1. As each material is being put into the mixer, the mixer is powered to cause the spindle to rotate and mix the contents inside the steel cup being held at a fixed position. As the materials have been completely applied into the mixer steel cup, it was allowed to age for 30 minutes, under stirring condition, for a total uniformity of the materials to give finely formulated oil based drilling mud whose colour appears brownish. The production methods and determination of the rheological and allied properties of the drilling muds were carried out based on the American Petroleum Institute (API) drilling mud production standards [3]. The mixing method used by Kinate and Dune (2016) [17] was adopted. Drilling mud balance was used to measure the density of the mud. Viscometer was used for the measurement of rheological properties of the formulated drilling mud. The rheological readings, API Testing, 600 RPM (revolution per minutes), 300 RPM, 6 RPM and 3 RPM, were recorded. Also, 10 seconds, 10 minutes and 30 minutes gel strength values were recorded. The plastic viscosity and yield point values were appropriately evaluated. The pH meter was used to measure the pH of the formulated drilling mud. This procedure is carried out in triplicate, and average value for each parameter was obtained. OBMB was formulated first, then followed by OBMC.

Optimization Study of Viscosity
The optimization of the viscosity was done using central composite design of response surface methodology. Design Expert software (version 12 trial version) was used in this study to design the experiments and to analyze significance of the model and determination of the optimum values of viscosity of each of the muds. The experimental design employed in this work was a one-level three factor fractional factorial design, involving 20 experiments. Temperature, time of mixing and dosage of bentonite/clay were selected as independent factors for the optimization study. The response chosen was one of the most important mud rheological propertyviscosity of the formulated OBMB and OBMC.

Characterization of Beneficiated Clay
The characterization results of the beneficiated clay sample using X-Ray fluorescence, Philips PW 2400 XRF spectrometer are shown in Table 2. It shows that the beneficiated clay sample is more of silica (SiO 2 ) which is typical of a kaolinitic clay [4].

Rheological Properties
The results of the rheological properties of the formulated oil based mud with bentonite (OBMB) and oil based mud with local clay (OBMC) at the optimum operating conditions of 9wt% bentonite/clay dosage, 30 minutes aging time and 313K temperature, including their dial readings are presented in Table 3. The table shows the values of other allied rheological properties of the formulated muds. 6.0 6.9

RPM (Revolution per minute)
The Plastic viscosity, yield point and apparent viscosity of each mud were calculated using Equations 1, 2, and 3 respectively [3,4]:

Analysis of variance of viscosity of OBMB and OBMC
The Analysis of variance (ANOVA) of viscosity of OBMB and OBMC are shown in Tables 6 and 7 respectively. The ANOVA was applied for estimating the significance of the model at 5% significance level. A model is considered significant if the p-value (significant probability value) is less than 0.05 and highly significant if the p-value is < 0.0001 [18,19]. From the p-values presented in Tables 6 and 7, it can be deduced that model terms A, B, and AB for OBMB, and B and B² for OBMC are highly significant terms. Also, all the linear terms A, B, and C, interactive term AB, and the quadratic terms A², B² and C² are significant model terms for OBMB and OBMC (except C² term for OBMC). Based on this, the insignificant terms AC and BC for OBMB, and AC, BC and C² for OBMC of the models were removed and the models reduced to Equations 4 and 6 respectively in previous Section. The Predicted R² of 0.8248 and 0.8746 for OBMB and OBMC respectively are in reasonable agreement with the Adjusted R² of 0.9504 and 0.9630 for OBMB and OBMC respectively, since the differences are less than 0.15 in each case. Adequate Precision measures the signal to noise ratio. A ratio greater than 4 is desirable for both models. The ratio of 21.475 and 23.639 for OBMB and OBMC respectively, indicate adequate signals. These models can be used to navigate the design space [20].

Mathematical Model of Viscosity of OBMB and OBMC
The mathematical model of viscosity of OBMB and OBMC for significant (VBS and VCS) model terms and general (VBG and VCG) model terms are expressed in Equations 4 and 6, and in Equations 5 and 7. Equations 4 and 6 contain only significant model terms for OBMB and OBMC respectively, while Equations 5 and 7 contain general model terms for OBMB and OBMC respectively. These equations revealed that the highest power of the factors is 2 which is typical of a quadratic equation.

Graphical Analysis of Viscosity of OBMB and OBMC
The predicted versus actual viscosity of OBMB and OBMC are shown in Figures 2 and 3 respectively. The figures revealed linear graphs where the points clustered along the lines of best fits. This is an indication that the generated models can be used to adequately predict viscosity of OBMB and OBMC.

Surface Plots for Viscosity of OBMB and OBMC
The 3D response surface was generated to estimate the effect of the combinations of the independent variables on the viscosity of OBMB and OBMC. The plots are shown in Figures 4 to 9. Figure 4 shows the dependency of viscosity of OBMB on the interaction of temperature and dosage of bentonite. As can be seen from Figure 4, viscosity of OBMB increases as both temperature and dosage of bentonite increase. It is a scientific fact that viscosity of fluids decreases with increase in temperature but increase with increase in dosage of clay materials [15,21]. This shows that the effect of increase in temperature balances the effect of increase in dosage of bentonite on the viscosity of OBMB.   Figure 6 shows the dependency of viscosity of OBMB on the interaction of temperature and time. The viscosity of OBMB increases as both temperature and time increase, but the increase of viscosity with time is more rapid linearly than with temperature. Figure 7 shows the dependency of viscosity of OBMC on the interaction of temperature and dosage of clay. As can be seen from the Figure 7, viscosity of OBMC increases as both temperature and dosage of clay increase. This is in good agreement with the findings by Apugo-Nwosu (2011) [15].

Optimum Parameters
The optimum parameters; optimum dosage, optimum temperature, optimum time and optimum response (viscosity) of OBMB and OBMC respectively are shown in Table 8. It revealed the values of the optimum viscosity of each of the drilling muds (OBMB and OBMC) at the mid-point/optimum operating conditions.

Validation of Results
The validation of results for optimum dosage, optimum temperature, optimum time, and experimental and predicted viscosities for OBMB and OBMC, respectively, together with the percentage deviations, are shown in Table  9. The experimental viscosity and the predicted viscosity are in good agreement since the percentage deviation for each mud is less than 3% [18]. This indicates that the models can adequately predict the viscosity of OBMB and OBMC [19]. Furthermore, the optimum viscosity responses of each of the muds in Table 8 are approximate values of the average experimental and predicted viscosity values of each mud in Table 9.

Conclusions
At the end of this optimization study and modeling of the process variables of the viscosity of oil based muds, the following conclusions were arrived at:

Data Availability Statement
The data presented in this study are available on request from the corresponding author.

Funding
The authors received no financial support for the research, authorship, and/or publication of this article.

Declaration of Competing Interest
The authors declare that there is no conflict of interests regarding the publication of this manuscript. In addition, the ethical issues, including plagiarism, informed consent, misconduct, data fabrication and/or falsification, double publication and/or submission, and redundancies have been completely observed by the authors.