Introduction

Low permeability, presence of high percentages of clay minerals, and large negatively charge surface area differentiate shale from other clastic sedimentary rocks (Al-Bazali 2021; K 2009). The negative charge on the surface of shale is mainly acquired from isomorphous substitution (Al-Bazali 2021). In this phenomena, a cation of similar size but different charge replaces another cation on the surface of shale, thereby creating a charge deficiency on the shale surface (Al-Bazali 2021; Gonzalez Sanchez 2007). The replacement or substitution of ions in the clay mineral can either be positive or negative. A net charge is formed as a result of this substitution. The existence of negative net charge on the surface of clay mineral adsorbs the positive hydrogen ions from water molecules, thereby forming a hydrogen bond, which ultimately leads to swelling of shale (Azeem Rana et al. 2020) and reduction in strength of the formation (Al-Bazali 2021; Santarelli 1995). Moreover, the adsorb negative ions on the surface of clay minerals prevents the migration of anions, while simultaneously favors the transportation of positive cations, which ultimately impact the swelling characteristics and reduces the mechanical integrity of the formation (Al-Bazali 2021; Lomba et al. 2000).

Numerous scholars carried out the research in explaining the swelling mechanism of clay minerals, however, only two mechanism were widely acknowledged (Swai 2020). The work done by Mooney et al. (Mooney et al. 1952) is consider as a foundation in explaining the swelling behavior of clay mineral through both crystalline and osmotic pattern (Al-Bazali 2021; Lalji et al. 2022; Mooney et al. 1952; Swai 2020). The crystalline swelling mainly arises from hydration ability of positive ions on the surface of dry clay (Al-Bazali 2021) or by the intercalation of water layers in between the silicate layers (DA 2006; Swai 2020). Nevertheless, this type of swelling mechanism has insignificant contribution, as during drilling operations various layers of water molecules are always present (Swai 2020). On the other hand, osmotic swelling is primarily caused by the difference in ionic concentration between the aqueous solution and clay surface (Al-Bazali 2021; ML 2014; Swai 2020). This adverse interaction between these two sources develops wellbore instabilities issues. When the activity of water in shale is different from the activity of water in the water-based drilling fluid (WBDF), an exchange of water molecules takes place between the drilling fluid and the shale formation (Al-Bazali 2021; Albazali et al. 2011). This exchange of water ions eventually develops wellbore instability problems (Al-Bazali 2021; Albazali et al. 2011; Chenevert 1970). Therefore, it is extremely crucial to osmotically stop this migration of water molecules between drilling fluid and shale.

Exploiting the idea of osmosis many scholars try to control the movement of water in and out of shale formations (Al-Bazali 2005; Albazali et al. 2011). Back in the 1970s, the best practice was to use drilling fluid with low water activity in order to drill shale formations. This idea was based on the extraction of water molecules from shale formation through the process of osmosis (Al-Bazali 2021). The addition of salt in drilling fluid lowers the activity of water by decreasing its chemical potential. This phenomenon osmotically makes the water molecules flow out of shale, thus, creating an ionic concentration imbalance between the sources (Al-Bazali 2021; Albazali et al. 2011; Horsrud et al. 1998). In general, ions complements with the water molecules as water transported into the shale formation. This significantly affects the compressive strength of shale, which eventually leads to wellbore failure (Al-Bazali 2021; Albazali et al. 2011; Simpson and Dearing 2000). Migration of these ions with water clouds is mainly followed Fick’s law of diffusion (Al-Bazali 2021). Diffusion of these ions and water clouds are also highly dependent on the physicochemical properties of the shale (Albazali et al. 2011). Therefore, it is important to explore the diffusion mechanism of water molecules in and out of the shale.

Back in 1960, Lai and coworkers demonstrated the fundamentals concept of diffusion in bentonite clay (Lai 1960). In 1961, they further analyzed the diffusion velocity of various types of ions and substantiated the clay diffusion through Fick’s law (Lai 1961). Moreover, several researchers dealt with Fick’s second law of diffusion and its applications, particularly considering the effect of adsorption (Crank 1975; Crank et al. 1981; Hasenpatt et al. 1989). In 1986, Barbour and coworkers performed different chemico-osmotic consolidation tests. The test was based on collapsing the diffuse double layer and simultaneously removing the pore water from different specimens (Barbour 1986; Shackelford and Lee 2003). In 2001, Malusis et al. examined the membrane efficiency when subjected to different KCl concentration solutions (Malusis et al. 2001; Shackelford and Lee 2003). They observed a time-dependent reduction in the efficiency of the membrane with an increase in KCl concentration (Malusis et al. 2001; Malusis 2002; Shackelford and Lee 2003). This same diffusion concept that is followed by shale is common in hydrogel systems (Saud Hashmi et al. 2012).

Hydrogels are 3D polymeric cross-linked networks that swell substantially once in contact with water or biological solvents (Vatankhah-Varnoosfaderani et al. 2017; Hashmi et al. 2022). The swelling of hydrogels is mainly controlled by the contribution of elastic force that arises due to polymer chain stretching and chain dilution phenomena (Caccavo 2019). A delicate balance between water penetration and network stretching exists during swelling because of an elastic force contribution that continues to increase as a consequence of network stretching. This increase in elastic forces instantaneously reduces the diluting force. Equilibrium is established between the two forces under dynamic condition as also evidence by rheological studies reported elsewhere (Hashmi et al. 2012). If the system comprises of ionic network, then the expansion of this network takes places as result of electrostatic repulsion that is been set by localization of charges (Caccavo 2019; Hashmi et al. 2021). Apart from these stationary charges, there are also some movable counter-ions that decrease the swelling capacity as a result of the repulsion effect (Caccavo 2019; Ravve 2012). This behavior makes the hydrogels applications attractive in several fields. Additionally, in a complex system, the behavior of hydrogels significantly changes because of the presence of multiple species (Obiweluozor et al. 2014). This change in behavior eventually affects mass transport regimes and hence influences the adsorption of water capacity (Caccavo 2019). In literature, these regimes are stated as “Fickian” and non-Fickian diffusion (Caccavo 2019; H. Frisch 1980; Hajian 2004; Hashmi et al. 2019). The former regime is a simple diffusion driven by the difference in concentration between the two systems (Caccavo 2019). Moreover, in this mechanism, the relaxation time of the polymer matrix can either be very large or the diffusion of water molecules is very small (Bruschi 2015). On the other hand, non-Fickian diffusion is primarily dependent on the relaxation of the polymer network, which gets equal to solvent diffusion time (Bruschi 2015; Hashmi et al. 2019). These similar behaviors can be observed when shale and water-based drilling fluids are in contact with one another.

For a specific adsorption system, it is extremely important to take into the account the diffusion mechanism, as it helps in understanding the behavior of the system and mass transport regimes (Hashmi et al. 2021). The most common types of models that are used to explain the diffusion mechanism are the drug release fitting models. The simplicity of these models made their utilization extremely high in the scientific community (Caccavo 2019). The generalized form for this model is shown in (Eq. 1) (Caccavo 2019). Here, \({M}_{\mathrm{t}}(t)\) is defined as the total amount of drug that is been released at a particular time. \({M}_{\infty }\) is denoted as the total quantity of drugs released at the end of the experiment. F (t) and k are signified as time-dependent generic functions and characteristic constants, respectively (Caccavo 2019).

$$\frac{{M}_{\mathrm{t}}(t)}{{M}_{\infty }}=kf(t)$$
(1)

Based on (Eq. 1), several relationships were proposed by different prolific researchers in nineteenth century. The most commonly used equations were Higuchi’s equation, Peppas equation, and Peppas and Sahlin equation that were used to model the phenomenon of drug release. The solution obtained from these models demonstrates a similar trend as reported by shale swelling.

The main aim of this study is to investigate the mechanistic behavior of three different shale formations obtained from different regions of Pakistan. All these shale formations comprise varying proportions of clay minerals. Prediction of an appropriate diffusion model to examine the mass transport regimes in those shale formations was the main objective of this study. The accuracy of different diffusion models was also compared and analyzed using various graphical and statistical approaches. Moreover, these comparisons provide the essential insight view on how diffusion of ions takes place in those shale samples when comes in contact with water-based drilling fluid.

Diffusion models used in the study

Higuchi’s equation

In 1960 Higuchi model was originally designed to model the kinetics of the drug release from creams and ointments (Caccavo 2019; Margaux Vigata et al 2020). This model is also extended to 3D dosage in which the release of drug is controlled by diffusion only (Margaux Vigata et al 2020). (Eq. 2) denotes the Higuchi model equation that was reported in 1962 (Higuchi 1962).

$$\frac{{M}_{\mathrm{t}}(t)}{{M}_{\infty }}=k{t}^{1/2}$$
(2)

The above equation is based on following assumptions; Fickian type diffusion, dilute system, short period approximation, system having no swelling, and constant diffusivity (Caccavo 2019; Higuchi 1962). The short time estimation used in the formulation of the equation is basically the safety limit that the author placed. After this limit the system tends to divert from the true solution (Higuchi 1962). The square root of time in the equation should cautiously be used, as this equation is only valid for the systems that are already swollen or for those systems that are readily dissolvable (Caccavo 2019).

Peppas equation

Peppas and Korsmeyer, in 1981, proposed an equation that best describes the drug release from sheets comprises of thin planes (Caccavo 2019; Korsmeyer et al. 1983; Korsmeyer and Peppas 1981; Langer and Peppas 1981). The proposed equation proves to be extremely adjustable in describing the mechanism of drug release as compare to Higuchi model. (Eq. 3) shows the model equation developed by Peppas and Korsmeyer.

$$\frac{{M}_{\mathrm{t}}(t)}{{M}_{\infty }}=k{t}^{n}$$
(3)

Factor “n” is termed as an adjustable parameter. This model is the most commonly used to model the drug delivery rate (Margaux Vigata et al 2020). If the value of “n” in the above equation is ≤ 0.5 type-I diffusion mechanism is observed (Hashmi et al. 2019), which is also known as Fickian diffusion (Hashmi et al. 2019) or quasi-Fickian diffusion (Margaux Vigata et al 2020). In this type, the diffusion process is passive as compared with the relaxation processes. If the value of “n” is equal to 0.5 (Eq. 3) can be transformed into the Higuchi model equation that is based on Fickian diffusion only. If the value of “n” is equal to 1, then in that case (Eq. 3) is modified to zero-order kinetics equation where drug release is controlled by swelling mechanism (Margaux Vigata et al 2020; Mikac et al. 2019). If the value of “n” is between \(0.5<n<1,\) in that case, anomalous transport, also known as non-Fickian diffusion, is dominant (Hashmi et al. 2019; Margaux Vigata et al 2020). During this stage, both the diffusion and swelling contribute heavily to the release mechanism.

Peppas and Sahlin equation

In 1989, Peppas and Sahlin used a heuristic approach and further modified (Eq. 3). They separated Fickian and relaxation processes from each other and transformed (Eq. 3) into (Eq. 4). In this equation, \({k}_{1}{t}^{n}\) is the contribution from the Fickian process, whereas \({k}_{2}{t}^{2n}\) is the impact of the relaxation processes (Caccavo 2019). \({k}_{1} and {k}_{2}\) are denoted as the fitting parameters, while “n” depends on the geometry of the system (Peppas 1989).

$$\frac{{M}_{\mathrm{t}}(t)}{{M}_{\infty }}={k}_{1}{t}^{n}+{k}_{2}{t}^{2n}$$
(4)

Methodology

Preparation of data for diffusion analysis

The diffusion models that have been discussed in the above section were applied to the swelling data of three different shale formations, namely Ranikhot, Murree, and Talhar, which is been obtained from different regions of Pakistan. The experimental swellings were obtained from M.A. et al. and Lalji et al. (Khan et al. 2021; Lalji et al. 2021a; Lalji et al. 2021c) study. Table 1 (Khan et al. 2021; Lalji et al. 2021c) shows the mineralogy and swelling percentages for all three shale formations.

Table 1 Mineralogy and final swelling (%) of all the three shale samples

The mineralogy of all the shale samples are obtained from XRD report, whereas the final swelling (%) is gathered from the swelling experimentation performed on linear dynamic swell-meter (LDSM). From Table 1, it can be observed that in Ranikhot formation, the weight percentage of Smectite is very high, which also corresponds to higher swelling percentage. On the other hand, in Talhar formation, this mineral is on the lower side; therefore, it demonstrates lower swelling percentage. An intermediate swelling percentage was observed in Murree formation with clay weight percentages in between Ranikhot and Talhar formation. In LDSM, both Ranikhot and Lower Talhar were tested against salt polymer glycol mud, while Murree formation was experimentally tested in a pure-bore nanoparticle mud system. The composition of the salt polymer glycol water based mud system is shown in Table 2, and Table 3 shows the nanoparticle water-based mud system. Figure 1 exemplifies the workflow used in this study. The idea here is to investigate the concept of diffusion of water molecules in Pakistan shale formation, which comprises varying proportions of clay minerals.

Table 2 Composition of salt polymer glycol water based drilling mud used in the study (Khan et al. 2021)
Table 3 Composition of Pure-bore water based drilling mud used in the study (Lalji et al. 2021c)
Fig. 1
figure 1

Workflow implemented during the study

Performance evaluation of diffusion models

The performance of these diffusion models are evaluated using both the statistical and graphical error analysis. For statistical error source, mean absolute error (MAE) is calculated. If this error value is closer to zero, then it specifies a higher accuracy of the model. (Eq. 5) is used to compute the MAE for each diffusion model (Ali 2021; Lalji et al. 2022b; Ali et al. 2021).

$$\mathrm{MAE}= \frac{1}{N}\sum_{i=1}^{N}\left|{y}_{\mathrm{i}}-\widehat{{y}_{\mathrm{i}}}\right|$$
(5)

where \({y}_{\mathrm{i}}\) is the predicted values from the models, \(\widehat{{y}_{\mathrm{i}}}\) is the true value obtained from experimentation, and N is the total number of data points. Moreover, for in-depth analysis of the models, graphical error analysis was performed, which includes cross plots and relative error plots. Cross plot are plotted between the experimental swelling results obtained from LDSM and estimated swelling percentages obtained from different diffusion models. A unit slope line passing through origin indicates the perfect model. Accuracy of any model can be determined if a higher percentage of dataset points are near to this line. In relative error plot, relative deviation between experimental and predicted swelling results is obtained. Points that are closer to x-axis indicate a more accurate model. Equation 6 is used to calculate the relative error percentages at each time interval.

$$\mathrm{Relative erro}=\mathrm{abs}\left(\frac{{\mathrm{Swelling}}_{\mathrm{exp}}-{\mathrm{Swelling}}_{\mathrm{predicted}}}{{\mathrm{Swelling}}_{\mathrm{exp}}}\right)\times 100$$
(6)

Results and discussion

Swelling normalization ratio from all models

The swelling experimental data for three samples obtained from LDMS were processed by Higuchi, Peppas, and Peppas and Sahlin models. The normalized swelling intensity was fitted to all the models, as shown from Fig. 2, 3, and 4. The fitted constants, type of diffusion and selection of best model are listed in Table 4.

Fig. 2
figure 2

ac Higuchi Fickian diffusion model equation applied on all shale formations

Fig. 3
figure 3

ac Peppas diffusion model equation applied on all shale formations

Fig. 4
figure 4

ac Peppas and& Sahlin diffusion model equation applied on all shale formations

According to Fig. 2, it can be observed that the Higuchi Model represents closer normalized swelling ratios in Ranikhot formation in comparison with Talhar and Murree shale samples in the initial stages. The presence of higher weight percent of Smectite and Illite in Ranikhot formation results in a higher swelling capacity of this formation (Khan et al. 2021; Lalji et al. 2021a; Lalji et al. 2022a). Studies have shown that smectite minerals are more susceptible to swelling as the interlayered spacing between their structures is relatively larger in contrast with other clay minerals as shown in Fig. 5 (Aftab and Ibupoto 2017; Lalji et al. 2022a; Lalji et al. 2021b). By increasing the concentration of Smectite, swelling of shale sample increases. For sample with highest concentration of these minerals, deviation is dominant in the later stage of experiment, as shown in Fig. 2a. An over-estimation of swelling normalized ratio was witnessed in Ranikhot formation. This clear indicates that Higuchi model equation should not be in good agreement with the swelling systems (Bruschi 2015; Caccavo 2019). However, during the initial stage, exact replication of the swelling normalized ratio was witnessed, with no abnormality from the experimental result. Furthermore, the Higuchi model suffers in samples having a low concentration of clay minerals, as shown in Fig. 2b and c. The assumption of constant diffusivity is satisfied when these formations come in contact with a water-based mud system. The migration of water molecules is stopped, and the steady-state condition is achieved with no further diffusion existing in this system. Hence, in all the three samples, the efficacy of this model is the weakest, with relatively high discrepancy in the predicted swelling result.

Fig. 5
figure 5

Structure of smectite clay mineral demonstrating tetrahedral and octahedral stacking pattern (Xuan Qin 2019)

Similarly, when Peppas model was used to find this swelling normalized ratio, it was observed that all the three samples demonstrate a good agreement with the experimental swelling normalized ratio that can be witnessed from Fig. 3a, b, and c. The performance of this model declines slightly with increase in clay minerals concentration. Furthermore, when Peppas and Sahlin model was used to find the swelling normalized ratio, it was again evident that higher clay mineral sample was not found in consensus with the experiment results, as shown in Fig. 4a, b, and c. The swelling normalized ratio starts to get under-predicted as the concentration of Smectite and Illite increases. This model experiences difficulty in achieving the steady state behavior in greater weight proportion clay minerals samples especially Ranikhot formation. The non-constant diffusive flux state prolong to the entire course of experimentation. Besides this, the results in Fig. 2, 3, and 4 clearly shows that the equilibrium condition in sample with lower clay content is achieved faster. The exchangeable ions in Talhar formation are smaller in concentration; therefore, equilibrium attained at a faster rate after the penetration of water molecules.

Table 4 shows the fitting parameters obtained for Peppas and Peppas and Sahlin model. Here, “n” represents the exponent of transport mode in the three shale samples. These models are used in drug delivery systems, where if a tablet is of cylindrical shape, the value of n ≤ 0.45, which corresponds to Fickian diffusion (Suvakanta Dash et al. 2010). Here in the swelling experiment, similar shape tablets are created in a compactor before testing the swelling percentages in LDSM. From Table 4, it can be perceived that minimum the concentration of clay mineral lower will be the value of “n.” This clearly shows that lowering the clay content in the shale sample better is the approximation of Fickian diffusion. During this transport mechanism, water molecules diffuse at a higher velocity in the shale matrix, and relaxation of the chain in shale occuring at a slower rate. Figure 6 shows the schematic of the Fickian diffusion process occur in shale sample.

Table 4 Fitted constants, diffusion type, and selection of best model from diffusion models in all three shale samples
Fig. 6
figure 6

Schematic of Fickian diffusion in shale sample when comes in contact with water-based mud system

Figure 7a displays the Fickian contribution obtained from Peppas and Sahlin model for all three formations. For Talhar formation, this influence is relatively constant, while for Ranikhot formation, it continuous to increases throughout the experimentation. The wide gap in Smectite platelets is the main cause of high swelling tendency (Raoof Gholamia et al. 2018). In addition to Smectite, Ranikhot formation comprises of high concentration of Illite. The hydration tendency of this clay mineral is less than Smectite because of the presence of potassium ions in between its clay crystals (Raoof Gholamia et al. 2018), yet still, it demonstrates swelling characteristics. Both these factors contribute heavily in displaying Fickian transport mechanism in Ranikhot formation only. The transient state prevails, and diffusion of water molecules continuous during the entire experimentation. For Murree formation, Fickian behavior was observed equally throughout the experiment, thus indicating a constant diffusion process when this sample was in contact with water based drilling fluid.

Fig. 7
figure 7

a Fickian contribution; b R/F plot from Peppas and Sahlin model in both the samples

Figure 7b shows the ratio between the relaxation and Fickian contribution plot. According to this figure, it is clear that during the complete experimental process, relaxation contribution had no influence in Ranikhot formation, as is based on \(\frac{ R}{F}=0\). This clearly indicates a non-stopped diffusion process. While in Talhar formation, chain relaxation had a fundamental impact as the value of \(\frac{R}{F}>1,\) this indicates that the solvent diffusion in the interior of the Talhar formation is controlled by the relaxation of the shale mineral, which prevent migration of water molecules and terminates the transient state rapidly. Murree formation exhibits \(\frac{ R}{ F}\simeq 2\). This ratio indicates 2:1 contribution between relaxation and Fickian contribution.

Prediction of swelling from diffusion models

Figure 8a, b, c, d, e, f, g, h and i shows the estimated shale percentages obtained from all the diffusion models. The Higuchi model in Fig. 8a exhibits that for Ranikhot formation, this model is not compatible as \(\mathrm{Experimental}\;{\mathrm{swelling}}_{\mathrm{LDSM}}\ll{\mathrm{Swelling}}_{\mathrm{Higuchi}\;\mathrm{model}}\). The result of the elemental investigation of the Ranikhot formation shows that this formation has a higher concentration of clay minerals, especially smectite. This clearly indicates the presence of large interlayered spacing between its platelets. One of the assumptions of the Higuchi model is the negligible swelling of the matrix (Bruschi 2015). This hypothesis is terminated by the large interlayered spacing present in the smectite. Hence, this eventually results in over-predicted swelling values in the later stage of experiment.

Fig. 8
figure 8figure 8

ai Prediction of swelling % from diffusion models (a, b, and c) Higuchi Model; (d, e, and f) Peppas model; (g, h, and i) Peppas and Sahlin model

On the other hand, in Talhar formation, as shown in Fig. 8b, this assumption holds true as the weight percentage of smectite is relatively smaller. No significant swelling of the sample was observed upon contact with the drilling mud, as shown in Table 1. In addition to this, the plateau region in Talhar formation is achieved in the early state of experimentation. This means that the quantity of water penetrating into this formation gets negligible, and equilibrium is accomplished between the shale sample and drilling mud. Hence, the process of ions movement is terminated by this balance. However, the Higuchi model again fails in this formation as well, since this model is based on a constant diffusivity rate, which was also not there in the Talhar formation. Figure 8c shows the model swelling predicted values in Murree formation. Again a similar problem was witnessed in this formation as well, where the Higuchi model shows under-predicted swelling results with non-stopped transient phenomena.

Figure 8de, and f shows the predicted swelling values from Peppas model. Fickian diffusion is observed in all the three samples. It was noticed that the performance of this model in Ranikhot formation was far better as compared with Higuchi model. However, compatibility of this model in Talhar formation was not in agreement with the experiment results since an under-predicted swelling percentage was observed during initial time period. It was further notice that attenuation of swelling behavior and the attainment of equilibrium condition were achieved in the following respective order Talhar, Murree, and Ranikhot. This clearly shows that as the clay concentration gets higher in proportion, the model performance get weaken.

Figure 8gh, and i displays the swelling percentages obtained from Peppas and Sahlin model. This model consider the diffusion and relaxation terms as two separate entities. The condition of deviancy in Ranikhot formation, as observed from under-predicted result in Fig. 8g, is due to high degree of swelling (Caccavo 2019; Graham and McNeill 1984). No relaxation behavior was observed in this formation, as observed in Fig. 7a, b. The transient state continued throughout the course of experimentation, and no stability was achieved in Peppas and Sahlin model. Figure 8i shows that the deviation in the model performance that was there in Ranikhot formation gets considerably closer in Murree formation. The model effectively predicted the swelling percentages of this formation. This performance further improves in Talhar formation, as shown in Fig. 8h. The model almost exactly replicates the swelling percentages for this formation. This clear indicates that higher the concentration of clay mineral in the formation more will be the extension of pseudo state in the experiment. While if the concentration of clay is very small pseudo state terminates very quickly, thus, resulting in block the diffusion of water molecules and apparent swelling of the sample get stabilized. This phenomenon also improves the accuracy of this model in predicting the swelling percentages.

Statistical and graphical error analysis

The accuracy of all the models in predicting the diffusion behavior and swelling percentages of all shale samples was observed statistically and graphically. Using Eq. (5), mean absolute error (MAE) was calculated for all the models. It was observed in Fig. 9a that Peppas model was best in predicting the diffusion behavior of Ranikhot formation, with MAE below 1. However, the magnitude of error associated with this formation in all three models is extremely high. On the contrary, the performance of these models significantly improves in lower clay concentration samples, as shown in Fig. 9b and c. Peppas model and Peppas and Sahlin model both works effectively in these samples. The MAE values gets closer to zero as clay concentration decreases, thus indicating a relatively higher performance of these models in low concentration samples. On the contrary, Higuchi model was still not in good agreement with these samples as value of MAE is either closer to 1 or greater than 1.

Fig. 9
figure 9

ac Mean absolute error from all three diffusion models in predicting swelling (%) of a Ranikhot; b Talhar; c Murree

The graphical error analysis was conducted through relative error plots and cross plots, as shown in Fig. 10ab, and c and Fig. 11a, b, and c, respectively. From Fig. 10a, b, and c, it is clear that the performance of all the models suffers drastically in Ranikhot formation. It is evident from the figures that adequate numbers of dataset are away from the horizontal axis, causing a serious deviation from the experimental swelling results. Nonetheless, Peppas model validates the results with some degree of accuracy. Totally opposite behaviors of these models were witnessed when the clay concentration gets smaller, as observed in Talhar and Murree formation. It was further experiential that when using the Higuchi model, high inaccuracy develops in the later stage of experimentation in Ranikhot formation. The Higuchi model diverges sensibly after 5 h of the experiment, giving, and over-estimated swelling percentages at the later stages in this sample. A totally reverse condition was witnessed in the other two samples where clay content was minimum. A part from the Higuchi model, all the remaining models improves their performances in predicting the swelling behavior. However, during the transient states they demonstrate weak performance, which later improves drastically in equilibrium conditions.

Fig. 10
figure 10

ac Relative error comparison between different diffusion models a Ranikhot; b Talhar; c Murree

Fig. 11
figure 11

ac Cross plots for all diffusion models in both shale samples a Ranikhot; b Talhar; c Murree

To further investigate the performance of all the models, cross plots were generated, as shown in Fig. 11a, b, and c. The departure from the perfect model line indicates the poor performance of these models. For Ranikhot formation, Higuchi model shows some serious deviation from the perfect model line \(y=x\) at the later stages of the experiment. However, the performance of other two models in Ranikhot formation gets better in the later stages of the experimentation with lower values of relative error bar graphs, as shown in Fig. 10a. Larger accumulation of dataset points near to the perfect model line was observed. Quite a reverse behavior was perceived in Fig. 11b and c in other two formations, where the accumulation of majority of the points were near to the perfect model line for all the three models in the later stage of experiment.

Conclusion

The study was based on investigating the diffusion behavior of three shale formations obtained from different regions of Pakistan. The modeling of diffusion was carried out using Higuchi, Peppas, and Peppas and Sahlin diffusion models. Results revealed that the presence of higher concentration of clay mineral significantly deteriorates the performances of these diffusion models. In all the three samples, Higuchi model continues to demonstrate the transient state throughout the course of experimentation. This indicates the non-stopped diffusion of water molecules in all the samples. This model was unable to achieve the steady state condition in either of the samples; this was due to the violation of the assumptions on which it depends. Nevertheless, the magnitude of the error in this model gets smaller with decrease in clay mineralogy. Similar trends were observed in Peppas and Peppas and Sahlin model. The size of the MAE and relative error histograms get smaller and smaller as clay concentration decreases. Peppas model proves to be the best option in sample with greatest clay concentration, while Peppas and Sahlin was best in samples with lower clay weight percentage. In Talhar formation that has the least clay weight percent, Peppas and Sahlin model was able to replicate 90% of the swelling values obtained from LDSM. Moreover, it was further evident that a part from Higuchi model in Ranikhot formation, the remaining two models suffers in predicting the swelling % during the initial stage of swelling experiment. At this stage, the diffusion of water molecules takes place inside the shale samples. Once the diffusivity is constant and swelling reaches it equilibrium state with no further penetration of water molecules, the efficiency of these models considerably improves.