*Data Description*

Data were collected from different wells which were drilled using NaCl-WBDIF. Nine-hundred data records of MD, FT, SP, PV, and YP were used to train, test and validate the developed correlations for different RHPs. The data were collected while drilling a different reservoir section in which non-damaging drill-in fluid was used. The rheological properties were measure twice a day, and the mud density, solid percent and Marsh funnel time were measured at the same time.

Table 1 lists the statistical parameters of the nine-hundred data points. The drill-in fluid covered a wide range of fluid density where the MD ranged from 64 to 121 ppg. The FT ranged from 35 to 91 s/quart, and SP ranged from 0 to 32.5%. PV ranged from 7 to 51 cP, and the YP ranged from 19 to 45 lb/100 ft2. Figure 1 shows that the PV was a strong function of MD and SP, where the R was 0.76 and 0.70 for MD and SP, respectively. PV was a moderate function of FT, with its R being 0.57. YP was a strong function of MD and moderate function of SP and FT. The R was 0.67, 0.58, and 0.42 for MD, SP, and FT, respectively, as seen in Figure 1.



**Figure 1.** The relative importance of the input parameters to plastic viscosity and yield point.

#### **3. Results and Discussion**

#### *3.1. Building Artificial Intelligence Models*

The MSaDE technique was applied to optimize the ANN model for the PV. Equations (3)–(6) were used to normalize the input and the output parameters for the model. To train the ANN model, 570 data points were used.

$$\text{MD}\_{\text{ln}} = 0.034 \ast (\text{MD} - 64) - 1 \tag{3}$$

$$\text{FT}\_{\text{B}} = 0.036 \ast (\text{FT} - 35) - 1 \tag{4}$$

$$\text{SP}\_{\text{n}} = 0.062 \ast \text{SP} - 1 \tag{5}$$

$$\text{PV}\_{\text{B}} = 0.044 \ast (\text{PV} - 6) - 1 \tag{6}$$

The optimization process showed that the best training function was Bayesian regularization backpropagation (trainbr) when using three input parameters (MD, FT, SP), and the optimized number of neurons was 30 when only one hidden layer was applied. The optimization process showed that the best transferring function was Elliot symmetric sigmoid (elliotsig).

Figure 2 shows that the R was 0.97 and the AAPE was 7.8% between the actual and predicted PV for the training data. For testing the model, 180 data points were used. Figure 2 shows that the R was 0.95 and the AAPE was 8.4% between the actual and predicted PV for the testing data.

**Figure 2.** Prediction of plastic viscosity using the modified self-adaptive differential evolution-artificial neural network (MSaDE-ANN) technique.

The above results confirmed the high accuracy of using the MSaDE-ANN technique to predict the PV. For further validation, 150 unseen data points were used to evaluate the developed ANN-PV model. Figure 2 shows that the R was 0.96 and the AAPE was 8.6%, with an excellent match between the actual and predicted PV values for the validation points.

The same procedure was used to estimate the YP values using MD, FT, and SP. Training data (570 data points) were used to build the ANN-YP model. The optimization process after applying the MSaDE technique showed that the optimized number of neurons was 29, the optimum training function was Bayesian regularization backpropagation (trainbr), and the best transferring function was Elliot symmetric sigmoid (elliotsig).

Figure 3 shows that the R was 0.96 and the AAPE was 3.5% when using the MSaDE-ANN model to predict the YP values for the training data set. To test the developed model for YP, another set of data (180 unseen data points) was used. Figure 3 shows that for the unseen data, the R was 0.95 and the AAPE was 3.6. These results confirmed the high accuracy of the MSaDE-ANN model for predicting the YP from the MD, FT, and SP.

The flow behavior index (n) was used to describe the degree of fluid deviation from the standard Newtonian behavior. In other words, n was used to represent the degree of non-Newtonian behavior. For drilling fluids that act according to the pseudoplastic fluids behavior, the standard value of n is between zero and 1 [39], where the value is 1 for Newtonian fluids behavior and less than 1 for dilatant fluids. n also can be used as a representation of the shear-thinning properties of the drilling fluids. A fluid with a low value of n is good for hole cleaning purposes.

The flow behavior index (n) can be calculated through Equation (7) based on the values of PV and YP [40].

$$\mathbf{n} = 3.32 \ast \log \left( \frac{2\mathbf{P}\mathbf{V} + \mathbf{Y}\mathbf{P}}{\mathbf{P}\mathbf{V} + \mathbf{Y}\mathbf{P}} \right) \tag{7}$$

**Figure 3.** Prediction of yield point using the MSaDE-ANN technique.

The MSaDE technique was applied to optimize the variable parameters of the ANN model for n. The optimization process yielded that the optimized number of neurons was 29, the optimum training function was Bayesian regularization backpropagation (trainbr), and the best transferring function was Elliot symmetric sigmoid (elliotsig).

Figure 4 shows that the MSaDE-ANN predicted n with high accuracy, where the R was 0.94 and the AAPE was 3.96% for the training dataset (570 data points). The same results were obtained when applying the ANN-n model for the unseen data set (180 data points). The R was 0.93 and the AAPE was 4.1% between the actual and predicted values of n, as seen in Figure 4.

A new set of data was used to validate the developed ANN-n model (150 data points). Figure 4 shows the high accuracy of the developed model to calculate n values based on MD, FT, and SP. The R was 0.94 and the AAPE was 4.0% between the calculated and actual values of n.

The flow consistency index (K) can be calculated from the PV and YP values using Equation (8) [39].

$$\mathbf{K} = \frac{2\mathbf{P}\mathbf{V} + \mathbf{Y}\mathbf{P}}{1022^{3.22\log\left(\frac{2\mathbf{P}\mathbf{V} + \mathbf{Y}\mathbf{P}}{\mathbf{P}\mathbf{V} + \mathbf{Y}\mathbf{P}}\right)}}\tag{8}$$

The optimization technique (MSaDE) was applied for the training dataset (570 data points) to determine the best combination of ANN variables to predict the K values based on MD, FT, and SP. The optimization process showed that the optimum number of neurons was 30, the optimum training function was Bayesian regularization backpropagation (trainbr), and the best transferring function was Elliot symmetric sigmoid (elliotsig).

Figure 5 shows that the R was 0.92 and the AAPE was 8.0% when plotting the actual and predicted values of K for the training dataset. For testing the developed ANN-K model, 150 unseen data points were used. Figure 5 shows that the R was 0.90 and the AAPE was 8.6% for the testing data.

For further validation for the developed model for K, a new set of data was used (150 data points). Figure 5 shows that the R was 0.91 and the AAPE was 8.4% when plotting the calculated and actual values of K.

**Figure 4.** Prediction of the flow behavior index using the MSaDE-ANN technique.

**Figure 5.** Prediction of the consistency index using the MSaDE-ANN technique.

#### *3.2. Development of Empirical Correlations*

Plastic viscosity can be estimated using Equation (9) in normalized form using the weights and biases of the optimized PV-ANN model.

$$\text{PV}\_{\text{n}} = \sum\_{\text{i}=1}^{\text{N}} \mathbf{w}\_{2\_{\text{i}}} \frac{\mathbf{w}\_{1\_{\text{i}}} \text{MD}\_{\text{n}} + \mathbf{w}\_{1\_{\text{2}}} \text{FT}\_{\text{n}} + \mathbf{w}\_{1\_{\text{3}}} \text{SP}\_{\text{n}} + \mathbf{b}\_{1\_{\text{i}}}}{1 + \left| \mathbf{w}\_{1\_{\text{1}}} \text{MD}\_{\text{n}} + \mathbf{w}\_{1\_{\text{2}}} \text{FT}\_{\text{n}} + \mathbf{w}\_{1\_{\text{3}}} \text{SP}\_{\text{n}} + \mathbf{b}\_{1\_{\text{i}}} \right|} + \mathbf{b}\_{2} \tag{9}$$

where PVn is the PV in the normalized form; N is the optimized number of neurons (30 neurons); w1 and w2 are the weights between the input layer and hidden layer and the weights between the hidden layer and the output layer, respectively (see Table 2); b1 is the biases between the input layer and the hidden layer; b2 = 0.073, which is the bias associated with hidden layer and output layer; and MDn, FTn, and SPn are the normalized value of the MD, FT, and SP, respectively.

**Table 2.** Weight and biases for the MSaDE- ANN-PV (plastic viscosity) model.


The de-normalized value of the PV can be obtained using Equation (10).

$$\text{PV} = 22.727 \ast \text{PV}\_{\text{n}} + 28.727 \tag{10}$$

Using the weights and biases of the optimized MSaDE-ANN model for YP, Equation (9) can be used to calculate the normalized value of YP by changing the PVn by YPn. Equation (11) can be used to determine the actual value of YP. Table 3 list the values of w1, w2, i, and b1. The value of b2 was 1.309.

$$\text{YP} = 16.393 \ast \text{YP}\_{\text{n}} + 28.393 \tag{11}$$


**Table 3.** Weight and biases for the MSaDE-ANN-YP model.

The normalized flow behavior index can be calculated using Equation (9) by changing PVn by nn based on the optimized ANN-n model by extracting the weights and biases. To obtain the de-normalized value of n, Equation (12) can be used. Table 4 lists the values of w1, w2, b1, and i. b2 was 1.209.

$$\mathbf{n} = 0.226 \ast \mathbf{n}\_{\mathbf{n}} + 0.516 \tag{12}$$

**Table 4.** Weight and biases for the MSaDE-ANN-n (artificial neural network-flow behavior index) model.



**Table 4.** *Cont.*

The flow consistency index (K) can be estimated as a function of MD, FT, and SP using Equation (9) in a normalized form which was developed using the weights and biases of the optimized ANN-K model. The normal values of K can be calculated using Equation (13). Table 5 lists the values of w1, w2, b1, and i. b2 was −0.148.

$$k = 2.16 \ast \text{K}\_{\text{n}} + 2.90 \tag{13}$$


**Table 5.** Weight and biases for the MSaDE-ANN-K (artificial neural network-flow consistency index) model.

AV can be calculated using Equation (9) as a function of MD, FT, and SP, which was developed based on the optimized ANN-AV model by extracting the weights and biases. Equation (14) can be used to calculate the de-normalized values of AV. Table 6 lists the values of w1, w2, b1, and i. b2 was −0.248.

$$\text{AV} = 10.73 \,\text{\*}\,\text{AV}\_{\text{R}} + 27.23 \,\tag{14}$$


**Table 6.** Weight and biases for the MSaDE-ANN-AV (apparent viscosity) model.
