Apparent Viscosity Prediction of Water-Based Muds Using Empirical Correlation and an Artificial Neural Network

Apparent viscosity is of one of the main rheological properties of drilling fluid. Monitoring apparent viscosity during drilling operations is very important to prevent various drilling problems and improve well cleaning efficiency. Apparent viscosity can be measured in the laboratory using rheometer or viscometer devices. However, this laboratory measurement is a time-consuming operation. Thus, in this paper, we have developed a new empirical correlation and a new artificial neural network model to predict the apparent viscosity of drilling fluid as a function of two simple and fast measurements of drilling mud (i.e., March funnel viscosity and mud density). 142 experimental measurements for different drilling mud samples have been used to develop the new correlation. The calculated apparent viscosity from the developed correlation and neural network model has been compared with the measured apparent viscosity from the laboratory. The results show that the developed correlation and neural network model predict the apparent viscosity with very good accuracy. The new correlation and neural network models predict the apparent viscosity with a correlation coefficient (R) of 98.8% and 98.1% and an average absolute error (AAE) of 8.6% and 10.9%, respectively, compared to the R of 89.2% and AAE of 20.3% if the literature correlations are used. Thus, we conclude that the newly developed correlation and artificial neural network (ANN) models are preferable to predict the apparent viscosity of drilling fluid.


Introduction
Drilling mud, or drilling fluid, represents any fluid which used during an oil well drilling operation [1]. Generally, drilling fluid pumps from the surface tanks to the well bottom via the drill string and bit and circulates back to the surface tanks through the annulus (i.e., the annular space between the drill string and the open hole or casing) [2]. In drilling mud, solids are suspended in water or oleic fluid with surfactants. The solids provide weight to the drilling fluid for pressure control, which represents the main objective of the drilling mud [3]. Furthermore, drilling mud has many other functions, including removing the cutting from the well bottom to the surface, sealing permeable reservoirs, transmitting the hydraulic power to the bit, reducing the formation damage, and cooling, lubricating the drill string, etc. [4]. The majority of the used drilling fluids are water-based. In water-based mud, the used liquid can be either freshwater or saltwater, which have been used in this study. Water-based muds are preferable because they are cheap, easy to prepare, and able to mitigate most well control problems [5]. Water-based mud can be classified into three types, which are inhibitive, non-inhibitive, and polymer fluids [2]. Drilling mud also can be a gaseous or nonaqueous base [4,5]. Drilling mud viscosity is one of the rheological properties of drilling mud [5]. Viscosity represents a measure of matter's resistance to a deforming force [3]. Thus, drilling mud viscosity needs to be adequately measured and controlled. Generally, the amount of drilling mud viscosity must be sufficient to suspend the mud solids. Thus, a drilling cutting's retention in drilling mud depends on the drilling mud's viscosity. Viscosity is highly affected by the shear rate. Increasing the shear rate in high viscosity drilling muds improves the retention of the solids on the drilling mud and decreases the performance of high shear solid removal tools (e.g., shale shaker) [6]. However, decreasing the shear rate in high viscosity drilling muds decreases the performance of the low shear solid removal tools (e.g., centrifuges) because the viscosity is inversely proportional to the solid settling velocity and the efficiency of separation [7]. Drilling fluid viscosity can be altered favourably for downhole conditions by using nanomaterials [8][9][10]. However, such complexities in the composition of viscosity prediction have not been considered in this study.
Even though apparent viscosity can be measured in the lab using a VG meter apparatus, this lab measurement is considered a time-consuming operation. There were some previous studies carried out in this area, which resulted in the development of new empirical correlations to predict the apparent viscosity of drilling mud.
Pitt [11] introduced a correlation (µ a = ρ (t − 25)) to predict the apparent drilling fluid viscosity (µ a ) as a function of Marsh funnel viscosity (t) and mud weight (ρ), with a correlation coefficient of 89.2. He used a numerical model to simulate the drilling mud's flow behavior in a Marsh funnel.
Elkatatny et al. [12] developed new empirical correlations to estimate the apparent viscosity of the drilling fluid as a function of mud density, solid percent, and Marsh funnel viscosity using an artificial neural network (ANN).
Thus, here, a new correlation and a new artificial neural network model have been developed to estimate the apparent viscosity of drilling fluid as a function of March funnel viscosity and mud density using 142 experimental measurements.

Artificial Neural Network
An Artificial neural network (ANN) is considered an important tool to solve non-linear and complex problems between any input and output parameters [13][14][15][16][17][18][19][20][21]. ANNs have various applications in different fields (e.g., medicine, electronics, aerospace, petroleum industry, and chemistry) [22][23][24][25]. The structure of the ANN model comprises of three different components, which are a learning algorithm, transfer function, and network architecture [13][14][15][16][17][18][19][20][21]. In addition, each ANN model should be made up of at least three layers (i.e., input, hidden and output layers). Some ANN models may have multiple hidden layers. These layers are connected to each other by weights, which is an adjustment between the layers is the main factor affecting the neural network performance. Further, the number of hidden layer neurons affects the neural network's performance (i.e., reducing the number of hidden layer neurons results in underfitting, while increasing the number of hidden layer neurons leads to overfitting) [26]. Hidden layers are usually assigned to a transfer function (tan or log), while output layers usually assign to an activation function (per line). Thus, it is essential to optimize the number of neurons in the hidden layer. Network training is the first step in the development of a neural network model. Hence, the input data processes from the input layer to the output layer via the hidden layer. In the output layer, the predicted data will be compared with the actual data. This training processes continuously until the average error between the measured and predicted data reached the user-defined value.

Experimental Measurements
This section covers the used experimental procedure to measure the field data (i.e., apparent viscosity, Marsh Funnel viscosity, and mud weight) that are used in this study to develop the new mathematical model.

Drilling Mud Preparation
In order to prepare the required experimental data to develop the new correlation for predicting apparent viscosity, 142 laboratory and field experiments were performed on two different types of Energies 2019, 12, 3067 3 of 10 drilling mud: Ferro Chrome Lignosulfonate (FCL) mud, and Salt Saturated mud (SSM), which is a water-based mud containing high concentrations of sodium chloride (NaCl) [4]. First, for both types of water-based drilling mud, the PH of water was treated to be approximately 9 by adding caustic Soda (NaOH). Second, the water March Funnel viscosity increased by using Bentonite for the FCL muds and hydrated Bentonite or Attapulgite for the SSM muds. Carboxymethyl cellulose (CMC), and Starch were used to control the fluid loss and filtration of the FCL and SSM muds, respectively. Finally, for both FCL and SSM muds, Barite was used to increase the mixture density in order to obtain the required drilling mud weight [27].

Apparent Viscosity Measurement
Drilling fluids can be classified into two main groups: Newtonian fluids and non-Newtonian fluids [3]. Viscosity is independent of the shear rate in Newtonian fluids, while it is a function of the shear rate in non-Newtonian fluids. Apparent viscosity and the other rheological properties (i.e., plastic viscosity, yield point, and gel strengths) of non-Newtonian drilling fluids are measured in the oil industry using the Bingham Plastic mathematical rheological model [28,29]. All above rheological properties are calculated from VG meter readings (i.e., R 300 and R 600 ). In the Bingham Plastic model, it is assumed that the curve of shear stress vs. the shear rate is a straight line, which should not cross the origin (i.e., the curve intercept point with the shear stress, which is called the yield point, should be more than zero) ( Figure 1) [30]. The Bingham Plastic model uses the following equations: where τ = shear stress (lb/100 ft 2 ), γ = shear rate (sec −1 ), PV = plastic viscosity (cP), YP = yield point (lb/100 ft 2 ), and µ a = apparent viscosity (cP).
Energies 2019, 12, x FOR PEER REVIEW 3 of 11 drilling mud: Ferro Chrome Lignosulfonate (FCL) mud, and Salt Saturated mud (SSM), which is a water-based mud containing high concentrations of sodium chloride (NaCl) [4]. First, for both types of water-based drilling mud, the PH of water was treated to be approximately 9 by adding caustic Soda (NaOH). Second, the water March Funnel viscosity increased by using Bentonite for the FCL muds and hydrated Bentonite or Attapulgite for the SSM muds. Carboxymethyl cellulose (CMC), and Starch were used to control the fluid loss and filtration of the FCL and SSM muds, respectively. Finally, for both FCL and SSM muds, Barite was used to increase the mixture density in order to obtain the required drilling mud weight [27].

Apparent Viscosity Measurement
Drilling fluids can be classified into two main groups: Newtonian fluids and non-Newtonian fluids [3]. Viscosity is independent of the shear rate in Newtonian fluids, while it is a function of the shear rate in non-Newtonian fluids. Apparent viscosity and the other rheological properties (i.e., plastic viscosity, yield point, and gel strengths) of non-Newtonian drilling fluids are measured in the oil industry using the Bingham Plastic mathematical rheological model [28,29]. All above rheological properties are calculated from VG meter readings (i.e., R300 and R600). In the Bingham Plastic model, it is assumed that the curve of shear stress vs. the shear rate is a straight line, which should not cross the origin (i.e., the curve intercept point with the shear stress, which is called the yield point, should be more than zero) ( Figure 1) [30]. The Bingham Plastic model uses the following equations: where τ = shear stress (lb/100 ft 2 ), γ = shear rate (sec -1 ), PV = plastic viscosity (cP), YP = yield point (lb/100 ft 2 ), and μa = apparent viscosity (cP).

Marsh Funnel Viscosity Measurement
The marsh Funnel viscosity represents the time in seconds that it takes a quart of fluid (1500 mL) to flow out of a cone via a short cylinder into a graduated cup ( Figure 2) [31]. Marsh funnel viscosity is a direct indication of the overall viscosity of drilling mud. The standard Marsh funnel viscosity of water is approximately 26 seconds.

Marsh Funnel Viscosity Measurement
The marsh Funnel viscosity represents the time in seconds that it takes a quart of fluid (1500 mL) to flow out of a cone via a short cylinder into a graduated cup ( Figure 2) [31]. Marsh funnel viscosity is a direct indication of the overall viscosity of drilling mud. The standard Marsh funnel viscosity of water is approximately 26 s.

Mud Weight Measurement
Mud weight (density) is measured by using a mud balance device (Figure 3), which consists of a mud cup with a fixed volume, a graduated beam, counterweight, rider, and lid [2,23]. Mud balance is a very simple and very accurate way to measure the mud density. The measurement of mud density using a mud balance is independent of the drilling mud temperature.

Development of New Empirical Correlation
In this section, we develop a new empirical correlation for predicting the apparent viscosity of drilling fluid as a function of the march funnel's viscosity and mud weight. All data used to develop this correlation were obtained from our experimental measurements on 142 samples of two different types of water-based mud (i.e., Ferro Chrome Lignosulfonate (FCL) mud, and Salt Saturated mud (SSM), Table 1 and Figure 4), please refers to section three for the used experimental measurement techniques.

Mud Weight Measurement
Mud weight (density) is measured by using a mud balance device (Figure 3), which consists of a mud cup with a fixed volume, a graduated beam, counterweight, rider, and lid [2,23]. Mud balance is a very simple and very accurate way to measure the mud density. The measurement of mud density using a mud balance is independent of the drilling mud temperature.

Mud Weight Measurement
Mud weight (density) is measured by using a mud balance device (Figure 3), which consists of a mud cup with a fixed volume, a graduated beam, counterweight, rider, and lid [2,23]. Mud balance is a very simple and very accurate way to measure the mud density. The measurement of mud density using a mud balance is independent of the drilling mud temperature.

Development of New Empirical Correlation
In this section, we develop a new empirical correlation for predicting the apparent viscosity of drilling fluid as a function of the march funnel's viscosity and mud weight. All data used to develop this correlation were obtained from our experimental measurements on 142 samples of two different types of water-based mud (i.e., Ferro Chrome Lignosulfonate (FCL) mud, and Salt Saturated mud (SSM), Table 1 and Figure 4), please refers to section three for the used experimental measurement techniques.

Development of New Empirical Correlation
In this section, we develop a new empirical correlation for predicting the apparent viscosity of drilling fluid as a function of the march funnel's viscosity and mud weight. All data used to develop this correlation were obtained from our experimental measurements on 142 samples of two different types of water-based mud (i.e., Ferro Chrome Lignosulfonate (FCL) mud, and Salt Saturated mud (SSM), Table 1 and Figure 4), please refers to section three for the used experimental measurement techniques.
The data analysis software system (STATISTICA) was used with the nonlinear multiple regression method to obtain the best match for our data [32]. The below correlation is identified as the best form, representing the relationship between our output parameter (apparent viscosity) and the two input parameters (i.e., the march funnel viscosity and mud weight): where µ a represents apparent viscosity (cp), ρ represents mud density (gm/cc), and t is March Funnel viscosity, while A 1 to A 8 are mathematical model constants from the simulation model, which are listed in Table 2.   The data analysis software system (STATISTICA) was used with the nonlinear multiple regression method to obtain the best match for our data [32]. The below correlation is identified as the best form, representing the relationship between our output parameter (apparent viscosity) and the two input parameters (i.e., the march funnel viscosity and mud weight): where μ a represents apparent viscosity (cp), ρ represents mud density (gm/cc), and t is March Funnel viscosity, while A1 to A8 are mathematical model constants from the simulation model, which are listed in Table 2.  To check the accuracy of our established new correlations, the output data for prediction are compared with the experimental results. Statistical parameters (i.e., the correlation coefficient (R) and the average absolute error (AAE)) are calculated and compared with the literature correlation µ a = ρ (t − 25) by Pitt [11] for predicting the apparent viscosity and listed in Table 3. The results show that the new correlation predicts the apparent viscosity with very high accuracy. For example, the new correlation has the highest R (98.8%) (Figure 5), which was only (89.2) for the correlation found in the literature ( Figure 6 and Table 3). Further, the new correlation estimates the apparent viscosity with a very low average absolute error (e.g., the AAE was only 8.6% for our developed correlation, while it was more than 20% (20.3%) for the literature correlation (Table 3)). These good agreements suggest that our new mathematical model is able to predict the apparent viscosity for two different types of drilling mud, for the first time, with high accuracy. To check the accuracy of our established new correlations, the output data for prediction are compared with the experimental results. Statistical parameters (i.e., the correlation coefficient (R) and the average absolute error (AAE)) are calculated and compared with the literature correlation μ a = ρ (t-25) by Pitt [11] for predicting the apparent viscosity and listed in Table 3. The results show that the new correlation predicts the apparent viscosity with very high accuracy. For example, the new correlation has the highest R (98.8%) (Figure 5), which was only (89.2) for the correlation found in the literature ( Figure 6 and Table 3). Further, the new correlation estimates the apparent viscosity with a very low average absolute error (e.g., the AAE was only 8.6% for our developed correlation, while it was more than 20% (20.3%) for the literature correlation (Table 3)). These good agreements suggest that our new mathematical model is able to predict the apparent viscosity for two different types of drilling mud, for the first time, with high accuracy.

Development of an Artificial Neural Network Model
ANN model development starts with the model training process. The model trained and tested the data, as described in Table 1. In the training process, we provided two input parameters (i.e., the march funnel viscosity and mud weight) and output data (i.e., apparent viscosity) for 70% (100 samples), while the other 30% (42 samples) was used to test the model. In this study, we used a 3 layer (input, hidden, and output layers) feed-forward backprop network (Figure 7). The characteristics of the used network are shown in Table 4. Figure 6. Cross-plot of the (measured) experimental and predicted apparent viscosity from the Pit's [11] correlation.

Development of an Artificial Neural Network Model
ANN model development starts with the model training process. The model trained and tested the data, as described in Table 1. In the training process, we provided two input parameters (i.e., the march funnel viscosity and mud weight) and output data (i.e., apparent viscosity) for 70% (100 samples), while the other 30% (42 samples) was used to test the model. In this study, we used a 3 layer (input, hidden, and output layers) feed-forward backprop network (Figure 7). The characteristics of the used network are shown in Table 4.     Figure 8 presents the log for the measured and the predicted apparent viscosity from the newly developed ANN for the training data (100 samples). It is clear that the new ANN model is able to determine the apparent viscosity with an average absolute error (AAE) of 7.3% and a correlation coefficient (R) of 99.2%, when the measured and predicted lithology is compared. After the training process, the model is tested using unseen samples during the training process (42 samples). The result of the testing process is shown in Figure 9 and Table 3. It is obvious that the new ANN model is able to predict apparent viscosity with good accuracy (R = 98.1 and AAE = 10.9%).
In summary, we conclude that the newly developed ANN model can be used to predict the apparent viscosity of drilling mud. determine the apparent viscosity with an average absolute error (AAE) of 7.3% and a correlation coefficient (R) of 99.2%, when the measured and predicted lithology is compared. After the training process, the model is tested using unseen samples during the training process (42 samples). The result of the testing process is shown in Figure 9 and Table 3. It is obvious that the new ANN model is able to predict apparent viscosity with good accuracy (R = 98.1 and AAE = 10.9%).
In summary, we conclude that the newly developed ANN model can be used to predict the apparent viscosity of drilling mud.

Conclusions
Apparent viscosity is an important drilling fluid property, and monitoring this property during drilling operations is vital to prevent many drilling issues [5]. Even though apparent viscosity can be measured experimentally using a VG meter device, such a measurement is an expensive and timeconsuming operation. Thus, in this paper, we have presented a new field correlation and a new artificial neural network model to estimate the drilling mud apparent viscosity directly from two

Conclusions
Apparent viscosity is an important drilling fluid property, and monitoring this property during drilling operations is vital to prevent many drilling issues [5]. Even though apparent viscosity can be measured experimentally using a VG meter device, such a measurement is an expensive and time-consuming operation. Thus, in this paper, we have presented a new field correlation and a new artificial neural network model to estimate the drilling mud apparent viscosity directly from two simples and fast drilling mud measurements (i.e., march funnel viscosity and mud density). To do this, we have performed 142 laboratory measurements for two different drilling mud samples (i.e., FCL and SSM). Then, these obtained, experimental data were used with a data analysis software system and neural network to develop a new correlation and neural network model. The results obtained from the new correlation and neural network were compared with the measured apparent viscosity from the laboratory. In addition, the statistical accuracy of the new correlation and neural network model were compared with the correlation in the literature [11]. The results show that the new correlation provides promising results and could be further improved to increase its acceptability. The results show that the R coefficient and AAE for the new correlation are 98.8% and 8.6%, respectively. In addition, our results show that the newly developed artificial neural network model provides promising results (e.g., the results show that the newly developed artificial neural network model predicts the apparent viscosity with R= 98.2 and AAE = 10.9). Thus, we conclude that the newly developed correlation and ANN model are preferable to predict the apparent viscosity of drilling mud.