1 Introduction

Precipitation of inorganic minerals has been known to be a catastrophe in enhanced oil recovery (EOR) processes, particularly in water-flooding projects during which aqueous solutions are introduced into porous formation for reservoir pressure maintenance and displacement of oil toward production wells. This phenomenon referred to as scaling in petroleum engineering terminology has already been identified as one of the major unsolved problems in oil industry. Crystallization of mineral scales is categorized among the most costly and critical problems which may strike within the reservoir causing a significant decline in permeability (Lindlof and Stoffer 1983; Moghadasi et al. 2003) or in surface facilities and production equipment resulting in severe operational problems (Moghadasi et al. 2004). Common types of scale frequently occurring in hydrocarbon production are sulfate and carbonate scales (Vetter 1976; Campbell and Nancollas 1969; Noncollas and Liu 1975; Moghadasi et al. 2004). It is believed that the occurrence of carbonate scale is associated with alterations in pressure and pH of production fluid, whereas formation of sulfate scale is chiefly due to incompatibility between commingling fluids (Vitthal and Sharma 1992; Moghadasi et al. 2004).

Sea water usually contains a high concentration of sulfate and bicarbonate anions, while formation water holds an abundance of cations such as barium, strontium, or calcium (Binmerdhah 2007; Yuan 1989; Moghadasi et al. 2003). When these brines come into contact in the reservoir during secondary recovery processes, ions may precipitate as their sulfate or carbonate form in rock matrix causing considerable productivity and injectivity impairment owing to tremendous decline in permeability of the formation (Bedrikovetsky et al. 2006, 2009). Of all the scale forming minerals, \(\mathrm{{CaCO}}_{3}\) and \(\mathrm{{BaSO}}_{4}\) are most often encountered in North Sea offshore operations (Mitchell et al. 1980; Yuan 1989). Barium sulfate and strontium sulfate has also been reported to form a completely complex mixture hampering petroleum production in oil industries (Yuan 1989; Todd and Yuan 1992; Mitchell et al. 1980). Despite carbonate scales, cleaning of sulfate scales appears to be difficult in water treatment plants and very limited remedial actions are available for sulfate scale removal especially in flow through porous media (Yuan 1989).

Deposition of inorganic scales on rock surface can cause severe formation damage and may also trigger pore throat blockage or bridging. Scaling of safety valves can also be so serious making it impossible to close them in critical situations (Jamialahmadi and Muller-Steinhagen 2008). Although massive problems are associated with precipitation of scaling minerals in oil reservoirs, for many of the EOR processes it is almost impossible to find the appropriate water which is compatible with the indigenous formation water. Therefore, a thorough understanding of the mechanism of sulfate scale crystallization on rock surface may prove beneficial in improving reservoir management through minimizing scale deposition risk. Scaling of sparingly soluble salts in porous media is often studied is three distinct phases namely, thermodynamics, kinetics, and hydrodynamics. Thermodynamics provides information on the maximum amount of scale formed in porous media at infinite time; in other words, the factor of time is not considered in thermodynamic models. A number of thermodynamic studies and models for scarcely soluble salts have been presented in the literature (Spencer et al. 1990; Monnin and Galinier 1988; Møller 1988; Monnin 1990, 1999; Harvie and Weare 1980; Oddo and Tomson 1994; Mohammadi and Richon 2007). In contrast to thermodynamics, kinetics gives the extent of deposition in a specified amount of time considering the reactions occurring between several ionic species contributing to scale formation (Jamialahmadi and Muller-Steinhagen 2008; Nancollas and Reddy 1974). Moreover, effect of flow rate on scale precipitation and degree of permeability reduction is considered by hydrodynamics of scale formation (Jamialahmadi and Muller-Steinhagen 2008).

Scale deposition has been the subject of many experimental and theoretical investigations (Jamialahmadi and Muller-Steinhagen 2008; Bedrikovetsky et al. 2004; Mackay 2003; Woods and Harker 2003; Moghadasi et al. 2004). Several researchers have investigated the precipitation of scaling minerals in porous media in an effort to develop mathematical models capable of predicting formation damage and permeability reduction (Jamialahmadi and Muller-Steinhagen 2008; Bedrikovetsky et al. 2004; Woods and Harker 2003). However, most of these studies have only been focused on single salt precipitation during water injection processes and barely any information is available on mixed salt deposition. Moghadasi et al. (2004) investigated the formation damage resulted by injection of pure calcium carbonate and calcium sulfate into porous media. Nevertheless, their results cannot be applied for scale formation of mixed salts from aqueous solutions. Woods and Harker (2003) simulated the reaction occurring between barium and sulfate ions when two incompatible waters came into contact in the reservoir. In their model, conservation of mass was written for barium and sulfate ions which were subsequently coupled and solved using a numerical finite difference approach. Variations of barium and sulfate ions concentrations were estimated as function of time and space considering the kinetics of barite formation. Bedrikovetsky et al. (2004) also described the formation damage due to barium sulfate deposition as a result of incompatibility between mixing fluids by presenting a mathematical model incorporating the kinetics and hydrodynamics of \(\mathrm{{BaSO}}_{4}\) scale formation in porous media. Their model was very similar to the model developed by Woods and Harker (2003), and was based on mass conservation written for barium and sulfate ions. However, both models contained some deficiencies and shortcomings and were only limited to barium sulfate deposition not accounting for the mixed co-precipitation of scaling minerals. In addition, only concentration profiles of barium and sulfate ions were reported in their studies and these outputs were not connected to the amount permeability decline in porous media.

In contrary to single salt precipitation, mixed salt deposition is rather a complicated process due to complexity of the aqueous system and interaction of different ions during precipitation process. This complexity of the crystallization process has restricted most of the developed models in porous media to single salt precipitation and traditionally not much attention has been paid to interactive forces of co-precipitating salts, especially those sharing a common ion. When multiple salts co-precipitate in porous media, each salt follows different precipitation mechanism and single salt deposition models developed so far may no longer be applicable when these salts co-exist (Sheikholeslami and Ong 2003). This is mainly due to the fact that co-precipitation of inorganic salts and composite scale formation might affect the thermodynamic and kinetic behavior of each salt in the mixture. The deposits in oilfields are believed to be seldom pure, and are frequently a mixture of two or more inorganic compounds plus paraffin, silica and some other impurities which further complicate the deposition and removal processes (Moghadasi et al. 2004). In an effort to comprehend the mixed salt precipitation mechanisms, Todd and Yuan (1992) conducted some laboratory experiments to examine the permeability decline as a result of barium sulfate and strontium sulfate deposition in porous media; however no mathematical model demonstrating the formation damage caused by deposition of scaling minerals was presented. Chang (1992) developed a mathematical model for predicting formation damage occurring in porous media through considering the geochemical reactions and the interactions between rock and fluid. Despite his outstanding effort in modeling formation damage due to rock–fluid interactions, the developed model carried a list of possible computational and theoretical drawbacks. In modeling formation damage, generic equations of fluid flow through porous media were written for water and the ionic components existing in solution. For a complex system, an increased number of equations have to be written and coupled together to predict the overall damage, thereby introducing a huge amount of computational burden into modeling problem. Moreover, presented model contained too many tuning parameters obtained by Levenberg–Marquardt optimization algorithm which further complicated the modeling approach. Besides, Levenberg–Marquardt is generally a gradient-based optimization method which is prone to local rather than global optima. Also, the parameters of permeability ratio equation linked to porosity ratio were optimized through experimental data obtained from core-flood experiments; nevertheless this approach may be inaccurate and may result in model over-fitting mainly due to the reason that optimization of these parameters are usually performed through using petro-physical and well log data.

Therefore, development of a mechanistic, simple and robust model capable of predicting the formation damage imposed to the reservoir due to mixed salt deposition yet appears to be of extreme value. Despite several experimental and numerical studies carried out so far, a reliable and satisfactory model capable of predicting the rate of scaling and permeability reduction in porous media is still lacking. Thus, the aim of this work is to primarily develop an analytical model for single salt deposition taking into accounts the thermodynamics, kinetics and hydrodynamics of scale deposition and further promote the model to account for mixed scale precipitation as well. So far, studies on scale precipitation have mostly been devoted to calcium sulfate and calcium carbonate and less research have been undertaken on studying and modeling of barium sulfate and strontium sulfate deposition. Therefore, our primary objective is to study the thermodynamics, kinetics, and hydrodynamics of \(\mathrm{{BaSO}}_{4}\) and \(\mathrm{{SrSO}}_{4}\) precipitation in porous media. However, the presented model can also be applied to other types of scales following a similar mechanism as barite and celestite.

This article is organized in the following sections. First, an equation will be developed for predicting the rate of scale crystallization through employing some basic mass transfer and kinetic equations previously presented and approved. Continuing, an analytical model will initially be developed for single salt precipitation and will further be extended to account for co-precipitation of inorganic salts in porous media. Finally, a comparison will be drawn between model predictions and sound experimental data for single precipitation of \(\mathrm{{BaSO}}_{4}\) and then for mixed deposition of \(\mathrm{{BaSO}}_{4}\) and \(\mathrm{{SrSO}}_{4}\) in porous media. In order to tune the kinetic parameters embedded in the mathematical model, particle swarm optimization (or PSO, a non-deterministic search method) will be used to estimate the model parameters by minimizing the error between model predictions and experimental data on barite deposition and co-precipitation of barite and celestite. The error will subsequently be refined using pattern search algorithm (or PS, a deterministic search method).

1.1 Rate of Scale Precipitation

Prior to developing any model, a mathematical description of salt deposition in porous media and precipitation mechanism is of paramount importance. When a crystalline salt precipitates onto rock surface, the following reaction may take place between the cation and anion contributing to scale formation:

$$\begin{aligned} M^{\mathrm{{m}}+}+X^{\mathrm{{n}}-}\rightarrow {M_\mathrm{{n}}}{X_\mathrm{{m}}}. \end{aligned}$$
(1)

In order to calculate the rate of permeability decline, determination of the net precipitation rate is essential. In practice, the net precipitation rate is defined as the resultant effect of precipitation (\(\dot{{{m}}}_\mathrm{p}\)) and removal rates (\(\dot{{{m}}}_\mathrm{r}\)):

$$\begin{aligned} \dot{m}_\mathrm{{pn}} = \dot{m}_\mathrm{{p}} - \dot{m}_\mathrm{{r}}. \end{aligned}$$
(2)

Helalizadeh (2002) showed that for salt crystallization, the attractive forces between surface and crystalline scale are much stronger than the shear forces applied by the fluid. Todd and Yuan (1992) also indicated that crystalline salts grown on the rock surface are so hard that their mechanical removal can be neglected in practice. Therefore, once the crystals have grown onto the surface, their removal can be assumed negligible. However, it should be mentioned that dissolution and removal are two distinct phenomena. Dissolution happens when under-saturated water comes into contact with a previously formed crystal and mass transfer occurs from surface to the bulk of the fluid. Thus, unlike salt crystallization, dissolution processes are usually mass transfer controlled, especially for sulfate scaling minerals (Noncollas and Liu 1975). However, when supersaturated solution flows through porous media, ions contributing to the inorganic mineral formation will transfer from solution bulk to the surface after which reaction and crystallization will occur. This mechanism was initially observed by Campbell and Nancollas (1969) for strontium sulfate and was later confirmed by Noncollas and Liu (1975) for barium sulfate scaling mineral as well. Our assumption in this study is that the water flowing through porous media is always supersaturated with respect to scaling minerals, thus dissolution of these minerals can almost be neglected.

For a crystalline deposit to develop onto rock surface, it is essential that key components are transferred from bulk of the fluid to edge of the boundary layer formed between aqueous solution and grain surface (Noncollas and Liu 1975). It is generally believed that scale precipitation rate is equal to mass flux of the reactants transported to the reaction zone and for diffusion controlled processes can be expressed according to the following relationship (Noncollas and Liu 1975; Helalizadeh 2002; Campbell and Nancollas 1969):

$$\begin{aligned} \dot{m}_\mathrm{{p}} = \beta \left( {C}_\mathrm{{sb}} - {C}_\mathrm{{si}}\right) , \end{aligned}$$
(3)

where \({\beta }\) is the mass transfer coefficient and \(\left( {{C}}_{\mathrm{sb}} -{{C}}_\mathrm{si} \right) \) is the mass transfer concentration drop which provides the concentration driving force between solution bulk and solid-fluid interface.

The second step in forming crystalline salts is the chemical reaction occurring between ions on grain surface. Diffusion and reaction are believed to happen in series; hence, chemical reaction rate should be assumed equal to mass transfer rate complying with the assumption that no mass accumulation occurs on grain surface (Helalizadeh 2002; Noncollas and Liu 1975). Assuming nth order chemical reaction between ionic components, the rate of reaction can be obtained through the following relationship (Noncollas and Liu 1975):

$$\begin{aligned} \dot{m}_\mathrm{{p}} = k_\mathrm{{r}} \left( {{C}}_\mathrm{{si}} - {{C}}_\mathrm{{s}}^{*}\right) ^{n}\!, \end{aligned}$$
(4)

where \({{k}}_\mathrm{r}\) is the reaction rate constant and \(\left( {{{C}}_\mathrm{si} -{{C}}_\mathrm{{s}}^{*}}\right) \) is the supersaturation at grain surface.

Reaction rate constant generally depends on temperature and this dependence is usually given by Arrhenius rate law:

$$\begin{aligned} k_\mathrm{{r}} =K_0 \mathrm{{e}}^{- \frac{E}{RT}}, \end{aligned}$$
(5)

where \(\mathrm{{K}}_0\) is the pre-exponential factor, E is the activation energy, R is the universal gas constant, and T is the absolute temperature.

Nancollas and Reddy (1974) indicated that for most of the scaling salts, particularly for sulfate scaling minerals, crystallization is independent of the fluid dynamics and is rather controlled through a surface reaction. Relatively high energy barriers obtained by Noncollas and Liu (1975) for scaling minerals strongly suggests that crystal growth occurs on the surface instead of the solution bulk. These findings were also confirmed by Todd and Yuan (1992) while investigating the crystallization of barium sulfate and strontium sulfate in static and dynamic flow conditions. In case of bulk crystallization, low values of activation energy are expected and further precipitation occurs as a result of particulate fouling on rock surface (Najibi et al. 1997).

Equations (3) and (4) can be combined together to eliminate the interface concentration:

$$\begin{aligned} \left( \frac{\dot{m}_\mathrm{{p}}}{k_\mathrm{{r}}}\right) (1/n) + \frac{\dot{m}_\mathrm{{p}}}{\beta } - \left( {{{C}}_\mathrm{{sb}} -{{C}}_\mathrm{{s}}^{*}}\right) ^{2} = 0. \end{aligned}$$
(6)

For sulfate scaling minerals, particularly barium sulfate (or barite), strontium sulfate (or celestite) and various forms of calcium sulfate (gypsum, anhydrate, and hemi-hydrate), it has been shown by several researchers that the reaction between scale forming ions follows a second order rule (Nancollas and Reddy 1974; Bedrikovetsky et al. 2004; Helalizadeh 2002). Therefore, Eq. (6) can be reduced to following form for sulfate scales:

$$\begin{aligned} \dot{m}_\mathrm{{p}}^{2} - \left( \frac{\beta ^{2}}{k_\mathrm{{r}}}+2\beta \left( {{C}_\mathrm{{sb}} -{C}_\mathrm{{s}}^{*}}\right) \right) \dot{m}_\mathrm{{p}} + \beta ^{2} \left( {{C}_\mathrm{{sb}} -{C}_\mathrm{{s}}^{*}}\right) ^{2} = 0. \end{aligned}$$
(7)

After some mathematical manipulations, deposition rate can be determined form the above quadratic equation in terms of mass transfer coefficient, kinetic rate constant, and bulk and saturation concentrations:

$$\begin{aligned} \dot{m}_\mathrm{{p}} = \beta \left[ \frac{1}{2} \left( \frac{\beta }{k_\mathrm{{r}}}\right) - \sqrt{\left( \frac{\beta }{2k_\mathrm{{r}}}\right) ^{2}+ \frac{\beta }{k_\mathrm{{r}}}\left( {{C}_\mathrm{{sb}} -{C}_\mathrm{{s}}^{*}}\right) +\left( {{C}_\mathrm{{sb}} -{C}_\mathrm{{s}}^{*}} \right) }\right] . \end{aligned}$$
(8)

1.1.1 Mass Transfer Coefficient

Mass transfer coefficient can be computed through Geankoplis (1983) correlation for fluid flow through porous media:

$$\begin{aligned} J_\mathrm{{D}} =\frac{1.09}{\emptyset } Re^{-2/3}, \end{aligned}$$
(9)

where \({{J}}_\mathrm{D}\) is the Chilton and Colburn analogy:

$$\begin{aligned} J_\mathrm{{D}} =\frac{\beta }{u} Sc^{2/3}. \end{aligned}$$
(10)

By combining Eqs. (9) and (10), the following relationship is obtained for mass transfer coefficient, which is valid for Reynolds numbers from 0.0017 to 55 and Schmidt numbers from 165 to 10,690 covering both Darcian and non-Darcian flow (Geankoplis 1983; Jamialahmadi and Muller-Steinhagen 2008):

$$\begin{aligned} \beta =\frac{1.09u}{\emptyset }\left( \frac{ud_\mathrm{{p}} }{D}\right) ^{-2/3}=\frac{1.09u}{\emptyset } Pe^{-2/3}, \end{aligned}$$
(11)

where u is velocity, \(\emptyset \) is porosity of the medium, and D is diffusivity of the electrolytes in solution. Weir and White (1996) demonstrated that almost 8 % reduction in porosity results in 48 % reduction in permeability as a result of early deposition. Todd and Yuan (1992) also indicated that maximum amount of 93.2 % reduction in permeability caused a 29.23 % reduction in porosity in simultaneous injection of North sea water and formation water bearing excessive amounts of various cationic components. As an illustration, if 0.25 of sea water carrying a sulfate concentration of 3,000 ppm, is entirely mixed with 0.75 of formation water holding a barium concentration of 1,000 ppm in a rock with pore volume of 11, then less than 2 g of \(\mathrm{{BaSO}}_{4}\) scale will form reducing the overall porosity by a factor of 0.05 % (Mackay 2003). Equilibrium concentrations of strontium and barium ions calculated by Todd and Yuan (1992) in their experiments along with the maximum variations in porosity and permeability of the medium also confirms the slight porosity changes as compared to variations in ionic compositions. Therefore in Eq. (11), since porosity of the medium changes so slightly and slowly compared to the rate of change in concentrations of ions in solution, then it can be assumed constant as having no substantial effect on mass transfer coefficient \((\emptyset ~\cong ~\emptyset _0)\) (Chang 1992; McCune et al. 1975; Bedrikovetsky et al. 2004). However, the overall change in porosity is calculated after assessing the cumulative volume of scaling minerals deposited in porous medium. On the other hand, mass transfer coefficient is rather a strong function of velocity. Thus, at higher injection rates, rate of scale deposition increases for diffusion controlled processes, while for reaction controlled systems, the precipitation rate is almost independent of velocity as long as the temperature of the medium remains constant.

1.1.2 Diffusion Coefficient

Diffusivity of sulfate scaling minerals in water at \(25~^{\circ }\mathrm{{C}}\) can be predicted from Nernst–Haskell equation as follows (Poling et al. 2001) :

$$\begin{aligned} D_\mathrm{{AB}}^{\circ } =\frac{RT\left[ \left( \frac{1}{z_+}\right) +\left( \frac{1}{z_- }\right) \right] }{F^{2}\left[ \left( \frac{1}{\lambda _+^{\circ }}\right) +\left( \frac{1}{\uplambda _-^{\circ }}\right) \right] }, \end{aligned}$$
(12)

where R is universal gas constant \((8.314~\mathrm{{J~mol}}^{-1}~\mathrm{{K}}^{-1})\), \(F\) is Faraday \((96,500~\mathrm{{C~g{\text{- }}equiv}}^{-1})\), \(\mathrm{{z}}_{+}\) and \(\mathrm{{z}}_{-}\) are valence of ions, and \(\lambda _{+}^{\circ }\) and \(\lambda _{-}^{\circ }\) are limiting ionic conductances. Values of limiting ionic conductances for barium sulfate and strontium sulfate scaling salts in water at \(25~^{\circ }\mathrm{{C}}\) are given in Table 1. An approximate correction factor of \(\mathrm{{T}}/334\mu _\mathrm{w}\), must be applied to obtain the values of limiting ionic conductances at other temperatures.

Table 1 Limiting ionic conductances in water at \(25~^{\circ }\mathrm{{C}}\) for sulfate scaling minerals

1.1.3 Average Particle Diameter

When supersaturated solution flows through porous media, the pressure drop developed along the bed in flow direction is a function of system geometry, bed porosity, and physical properties of the solution. The operating conditions may result in four distinct flow regimes namely Darcy or creeping flow, inertial flow, unsteady laminar flow, and chaotic flow. The first two regimes are generally encountered in oil reservoirs; the Darcian flow regime occurs away from the production wells and the non-Darcian flow regime usually happens in vicinity of the wellbore (Jamialahmadi and Muller-Steinhagen 2008). Critical values of Reynolds number at the onset on non-Darcian flow according to most experiments may range between 1 and 15 (Hassanizadeh and Gray 1987). The proportiopnality between pressure gradient and fluid velocity may not hold at higher rates of fluid flow through porous media (Hassanizadeh and Gray 1987). The well-known Carman–Kozeny correlation is still the most wiedly applied equation for prediction of pressure gradient in homogenious porous media (Carman 1997; Jamialahmadi and Muller-Steinhagen 2008):

$$\begin{aligned} \frac{\Delta P}{L}=\frac{150 (1-\emptyset )^{2}}{\emptyset ^{3}d_\mathrm{{p}}^2 }\mu u+\frac{1.75(1-\emptyset )}{\emptyset ^{3}d_\mathrm{{p}} }\rho u^{2}. \end{aligned}$$
(13)

However, at low flow rates, the inertial term is negligible and flow occurs under creeping flow comditions, hence Darcy’s law is applicable:

$$\begin{aligned} -\frac{\mathrm{{d}}P}{\mathrm{{d}}x}=\frac{\mu }{k}u. \end{aligned}$$
(14)

A general equation for permeability of porous media can be obtained through combining the Eqs. (13) and (14) covering both Darcian and non-Darcian flow condition (Jamialahmadi and Muller-Steinhagen 2008)

$$\begin{aligned} k=\frac{\emptyset ^{3}d_\mathrm{{p}}^2 }{6\left( {1-\emptyset } \right) ^{2}(25+0.292Re_\mathrm{{m}} )}, \end{aligned}$$
(15)

where \(Re_m\) represents the moedified Reynolds number:

$$\begin{aligned} Re_\mathrm{{m}} =\frac{\rho ud_\mathrm{{p}} }{(1-\emptyset )\mu }. \end{aligned}$$
(16)

In Darcian flow regimes, \(Re_\mathrm{{m}}\) is so small that it could be neglected. Thus, Eq. (15) reduces to:

$$\begin{aligned} k=\frac{\emptyset ^{3}d_\mathrm{{p}}^2 }{150\left( {1-\emptyset } \right) ^{2}}. \end{aligned}$$
(17)

However, Carman–Kozeny correlation given in Eq. (17) is only applicable in homogeneous porous media and away from wellbore where fluid flow occurs under Darcian flow regime. Thus, Eq. (17) may not yeild accurate permeability values under certain circumstances where turbulent flow or high velocity flow occurs in porous media, thereby inertial effects must also be considered in non-Darcian flow regimes (Valdes-Parada et al. 2009).

In order to calculate the average particle diameter, Carman–Kozeny correlation for Darcian flow can be employed from which the Reynolds number has been omitted (Carman 1997):

$$\begin{aligned} k=\frac{\emptyset ^{3}d_\mathrm{{p}}^2 }{150(1-\emptyset )^{2}}\quad \mathrm{{or}}\quad d_\mathrm{{p}} =\left( \frac{150 k(1-\emptyset )^{2} }{\emptyset ^{3}}\right) ^{1/2}. \end{aligned}$$
(18)

This equation indicates that the permeability for Darcian flow is independent of Reynolds number as opposed to non-Darcian flow which is a function of fluid Reynolds number.

A number of other correlations are also available for predicting the pressure drop in flow through porous media which incorporate particle diameter. Jamialahmadi and Muller-Steinhagen (2008) have fully reviewed these correlations and best accordance was observed between measured and predicted values from Carman–Kozeny correlation and the correlation presented by Ergun (1952). However, Carman–Kozeny correlation was implemented in this study due to its wide acceptance and applicability in porous media and slight discrepancies was observed when employing the correlation provided by Ergun (1952).

1.1.4 Solubility

In general, crystallization and precipitation are solubility dependent processes. In other words, for a salt to precipitate out of solution, it must exceed its solubility product. Solubility of a single salt in water is a function of temperature, pressure, pH and ionic strength of the solution. The concentration solubility product between cationic components and anions contributing to scale formation can be given as follows (Butler 1964):

$$\begin{aligned} K_\mathrm{{sp,MX}} ={m_\mathrm{{M}}}{m_\mathrm{{X}}}. \end{aligned}$$
(19)

Solubility of an inorganic mineral in pure water is only a function of its solubility product given in Eq. (19), as long as these two ions are present in the solution. Once another external source is introduced to the medium having a common ion with the salt previously present in solution, equilibrium will no longer be maintained and the overall solubility will decrease (Butler 1964). Sheikholeslami and Ong (2003) suggested that when salt mixtures co-exist in solution, \(K_\mathrm{{sp}}\) values of pure salts are not suitable to be used in solubility prediction.

In concentrated solutions, ions interact electrostatically by each other so that stoichiometric solubility product (see Eq. 19) no longer represents true solubility of ionic salts. Activity coefficients thereby are introduced into Eq. (19) as adjusting parameters to convert ionic concentrations to effective concentrations (or activities) relative to dilute solutions. Hence, thermodynamic solubility product \((\mathrm{{K}}_{\mathrm{sp}}^{\circ })\) can be defined as follows:

$$\begin{aligned} K_\mathrm{{sp,MX}}^{\circ } ={a_\mathrm{{M}}}{a_\mathrm{{X}}}, \end{aligned}$$
(20)

where activities (a) are given as:

$$\begin{aligned} a_\mathrm{{Me}} ={m_\mathrm{{M}}}{\gamma _\mathrm{{M}}}; \ a_\mathrm{{An}} ={m_\mathrm{{X}}}{\gamma _\mathrm{{X}}}. \end{aligned}$$
(21)

In this study, the activity coefficients are calculated using the well-known ion interaction model developed recently by Pitzer and co-workers (Pitzer 1975, 1973; Wang et al. 1997; Phutela et al. 1987; Pitzer et al. 1985, 1984; Rogers and Pitzer 1981). The activity coefficients calculated by Pitzer model take into account the interactions between individual ions due to electrostatic forces, long and short-range interactions between ions in aqueous solutions. According to Pitzer ion interaction theory, the following equations are used to calculate the activity coefficients of cationic and anionic components in electrolyte solutions:

$$\begin{aligned} \ln \gamma _\mathrm{{M}}&= z_\mathrm{{M}}^2 F^{\delta }+\mathop \sum \limits _a m_\mathrm{{a}} \left( {2B_\mathrm{{Ma}} +ZC_\mathrm{{Ma}} } \right) + \mathop \sum \limits _c m_\mathrm{{c}} \left( 2\emptyset _\mathrm{{Mc}} +\mathop \sum \limits _a m_\mathrm{{a}} \psi _\mathrm{{Mca}} \right) \nonumber \\&+\mathop \sum \limits _a \mathop \sum \limits _{a^{*}} m_\mathrm{{a}} m_{\mathrm{{a}}^{*}} \psi _{\mathrm{{Maa}}^{*}} +\left| {z_\mathrm{{M}} } \right| \mathop \sum \limits _c \mathop \sum \limits _a m_\mathrm{{c}} m_\mathrm{{a}} C_\mathrm{{ca}}\end{aligned}$$
(22)
$$\begin{aligned} \ln \gamma _\mathrm{{X}}&= z_\mathrm{{X}}^2 F^{\delta }+\mathop \sum \limits _c m_\mathrm{{c}} \left( {2B_\mathrm{{Mc}} +ZC_\mathrm{{Mc}} } \right) + \mathop \sum \limits _a m_\mathrm{{a}} \left( 2\emptyset _\mathrm{{Ma}}+\mathop \sum \limits _c m_\mathrm{{c}} \psi _\mathrm{{cXa}} \right) \nonumber \\&+\mathop \sum \limits _c \mathop \sum \limits _{c^{*}} m_\mathrm{{c}} m_{\mathrm{{c}}^{*}} \psi _{\mathrm{{Mcc}}^{*}} +\left| {z_\mathrm{{X}} } \right| \mathop \sum \limits _c \mathop \sum \limits _a m_\mathrm{{c}} m_\mathrm{{a}} C_\mathrm{{ca}}, \end{aligned}$$
(23)

where \({{z}}_\mathrm{M}\) and \({{z}}_\mathrm{X}\) are the charges of cation M and anion X in electrolyte MX, respectively, \(Z=\mathop \sum \limits _i m_i \left| {z_i } \right| \), a and \({{a}}^{*}\) represent anion species, c and \({{c}}^{*}\) denote cationic species, m the molality (mol L\(^{-1}\) solvent). The remaining parameters are calculated using the equations and coefficients provided in Tables 2 and 3, respectively.

Table 2 Equations implemented in calculating the activity coefficients by Pitzer model
Table 3 The coefficients of temperature dependence equation regarding binary interaction parameters of pure single electrolytes

The ionic activity coefficients calculated by Pitzer model in Eqs. (22) and (23), are then implemented to obtain the mean activity coefficient using the following relationship:

$$\begin{aligned} ln\gamma _\mathrm{{MX}} =\varphi ^{-1}\left( \varphi _\mathrm{{M}} \mathrm{{ln}}\gamma _\mathrm{{M}} + \varphi _\mathrm{{X}} \mathrm{{ln}}\gamma _\mathrm{{X}}\right) , \end{aligned}$$
(24)

where \(\varphi =\varphi _\mathrm{{M}} +\varphi _\mathrm{{X}}\) represents the total number of molecules or ions given by one mole of electrolyte.

By taking a look at Eqs. (19), (20), and (21), one may realize that the thermodynamic solubility product is related to stoichiometric solubility product as,

$$\begin{aligned} K_\mathrm{{sp,MX}}^{\circ } =m_\mathrm{{M, e}} m_\mathrm{{X, e}} \quad \gamma _\mathrm{{M }} \gamma _\mathrm{{X }} = K_\mathrm{{sp, MX}} \gamma _\mathrm{{M }} \gamma _\mathrm{{X }}, \end{aligned}$$
(25)

where \(\gamma _\mathrm{{M}}\) and \(\gamma _\mathrm{{X}}\) are defined in Eqs. (17) and (18), respectively, \(\gamma _\mathrm{{MX}} \) is the mean ionic activity defined in Eq. (19).

Thermodynamic solubility product of electrolytes in solution substantially depends on temperature. The temperature dependence of equilibrium constants at a pressure of 1 bar for temperatures expressed in K can be described as,

$$\begin{aligned} \mathrm{{ln}} K_\mathrm{{sp,MX}}^{\circ } (T)= l_1 +\frac{l_2 }{T}+l_3 lnT+l_4 T+\frac{l_5 }{T^{2}}, \end{aligned}$$
(26)

where coefficients \(l_1\)\(l_5 \) are given in Table 4 for \(\mathrm{{BaSO}}_{4}\) and \(\mathrm{{SrSO}}_{4}\) scaling minerals.

Table 4 Coefficients of Eq. (21) for temperature dependence of equilibrium constant (Pedersen et al. 2006)

To be able to apply the ion interaction model of Pitzer to oilfield conditions, solubility values must also be corrected with respected to pressure. This is mainly because of the high pressures existing in down-hole conditions where deposition may take place. After calculating the solubility values from Eq. (25) at pressure of 1 bar, the following equations can be used in order to correct the effect of pressure:

$$\begin{aligned}&\displaystyle R_\mathrm{{BaSO_4 }} =\mathrm{{exp}}\left( A\left( {P-P^{r}} \right) +B(P^{2}-(P^{r})^{2})\right) \mathrm{{exp}}\left( CI^{0.5}+DI\right) \end{aligned}$$
(27)
$$\begin{aligned}&\displaystyle R_\mathrm{{SrSO_4 }} =\mathrm{{exp}}\left( A(2-T/298)\left( {P-P^{r}} \right) +B(P^{2}-(P^{r})^{2})\right) \mathrm{{exp}}\left( CI^{0.5}+DI\right) \qquad \end{aligned}$$
(28)
$$\begin{aligned}&\displaystyle R=\frac{Q_\mathrm{{sp}} }{Q_\mathrm{{sp,r}} }. \end{aligned}$$
(29)

Coefficients of Eqs. (27) and (28) along with the maximum values of pressure and ionic strength up to which these correlations are valid have been outlined in Table 5.

Table 5 Coefficients of Eqs. (22) and (23) for temperature dependence of solubility (Yuan 1989)

2 Development of the Permeability Reduction Model

Scaling of mineral precipitates can cause detrimental formation damage owing to permeability and porosity reduction in porous medium. While our comprehension of the scaling probability prediction has advanced, a sound mathematical model capable of predicting the permeability reduction as function of time, particularly for media undergoing mixed salt deposition is still lacking. In this section, formulation of a basic model for prediction of the permeability reduction will be described. The model should include fluid dynamics through porous media, chemical reaction kinetics, aqueous thermodynamics, and mass transfer processes. The main assumptions behind the permeability reduction model developed in this study are:

  • Flow is 1D and horizontal.

  • The porous medium is homogenous and isothermal.

  • Single phase fluid flows through porous media with density and viscosity independent of composition.

  • The fluid and solid phase are incompressible.

  • Darcian flow regime is assumed (occurring away from production wells up to the critical Reynolds numbers ranging between 1 and 15).

  • Chemical reaction between ionic components contributing to the salt formation is second order.

  • Porosity changes so slightly that it can be considered constant in mass transfer equation.

2.1 Single Salt Precipitation

It is often a formidable task to obtain the rate of scaling at a given time and space, whereas calculating the average mass of mineral scales appears somewhat straightforward. Therefore, the net mass of scale deposited on the rock surface between time zero and t can be defined as:

$$\begin{aligned} m_\mathrm{{p}} = \dot{m}_\mathrm{{p}} \times A_\mathrm{{g}} \times t \end{aligned}$$
(30)

, where \({A}_\mathrm{g}\) is total surface area of grains, which may be expressed as:

$$\begin{aligned} A_\mathrm{{g}} = N_\mathrm{{g}} \pi d_\mathrm{{p}}^2. \end{aligned}$$
(31)

Total number of grains \(({N}_\mathrm{g})\) in the above formula can be linked to porosity of the medium through following expression:

$$\begin{aligned} V_\mathrm{{g}} =\left( {1-\emptyset _0 } \right) V_\mathrm{{b}} = N_\mathrm{{g}} \frac{\pi d_\mathrm{{p}}^3 }{6}\quad \mathrm{{or}}\quad N_\mathrm{{g}} =\frac{6 \left( {1-\emptyset _0 } \right) V_\mathrm{{b}} }{\pi d_\mathrm{{p}}^3 }. \end{aligned}$$
(32)

Replacing Eqs. (31) and (32) into Eq. (30) provides the following relationship for mass of deposited scale:

$$\begin{aligned} m_\mathrm{{p}} = \frac{6 \left( {1-\emptyset _0 } \right) V_\mathrm{{b}} }{d_\mathrm{{p}} } \dot{m}_\mathrm{{p}} t. \end{aligned}$$
(33)

Volume of mineral deposited on grain surface can be expressed as the ratio of mass of scale deposited divided by its density:

$$\begin{aligned} V_\mathrm{{s}} = \frac{6 \left( {1-\emptyset _0 } \right) V_\mathrm{{b}} }{\rho _\mathrm{{s}} d_\mathrm{{p}} } \dot{m}_\mathrm{{p}} t, \end{aligned}$$
(34)

where typical values for \(\mathrm{{BaSO}}_{4}\) and \(\mathrm{{SrSO}}_{4}\) densities are 2,160 \(\mathrm{{Kg~m}}^{-3}\) and 3,960 \(\mathrm{{Kg~m}}^{-3}\), respectively. Finally, the fraction of bulk volume occupied by each sulfate scaling mineral can be expressed as:

$$\begin{aligned} \emptyset _\mathrm{{s}} =\frac{V_\mathrm{{s}} }{V_\mathrm{{b}} }=\frac{6(1-\emptyset _0 )}{\rho _\mathrm{{s}} d_\mathrm{{p}} } \dot{m}_\mathrm{{p}} t. \end{aligned}$$
(35)

Thus, the porosity ratio at time t can be obtained from:

$$\begin{aligned} \frac{\emptyset _t }{\emptyset _0 }=1-\frac{\emptyset _\mathrm{s} }{\emptyset _0 }=1-\frac{6(1-\emptyset _0 )}{\rho _\mathrm{s} d_\mathrm{p} \emptyset _0 } \dot{m}_\mathrm{{p}} t. \end{aligned}$$
(36)

Replacing \(\dot{{{m}}}_\mathrm{p}\) into Eq. (36) gives the following equation for porosity reduction as a result of single salt deposition:

$$\begin{aligned} \frac{\emptyset _t }{\emptyset _0 }=1-\frac{6\left( {1-\emptyset _0 } \right) \beta }{\rho _\mathrm{s} d_\mathrm{p} \emptyset _0 } \left[ \frac{1}{2}\left( {\frac{\beta }{k_\mathrm{r} }} \right) -\sqrt{\left( {\frac{\beta }{2k_\mathrm{r} }} \right) ^{2}+\frac{\beta }{k_\mathrm{r} }\left( {C_\mathrm{{sb}} -C_\mathrm{s}^*} \right) +(C_\mathrm{{sb}} -C_\mathrm{s}^*)}\right] t.\nonumber \\ \end{aligned}$$
(37)

2.2 Mixed Salt Precipitation

The mechanism of precipitation for mixed salt scaling is identical with that of single salt deposition; however, it should be mentioned that the density and rate of precipitation are dissimilar for different scaling minerals simultaneously precipitating in porous medium. Thus, the overall scaling volume can be represented as follows:

$$\begin{aligned} V_\mathrm{{st}} = \frac{6 \left( {1-\emptyset _0 } \right) V_\mathrm{b} }{ d_\mathrm{p} } \mathop \sum \limits _{i=1}^n \frac{\dot{m}_\mathrm{{pi}}}{\rho _\mathrm{{si}}}t, \end{aligned}$$
(38)

where n indicates the total number of supersaturated scaling salts in the aqueous solution. Moreover, fraction of the media occupied by scaling minerals contributing to precipitation process may be expressed as:

$$\begin{aligned} \emptyset _\mathrm{s} =\frac{V_\mathrm{{st}} }{V_\mathrm{b} }= \frac{6 \left( {1-\emptyset _0 } \right) V_\mathrm{b} }{ d_\mathrm{p} } \mathop \sum \limits _{i=1}^n \frac{\dot{m}_\mathrm{{pi}}}{\rho _\mathrm{{si}}}t. \end{aligned}$$
(39)

In a broader perspective, the overall change in porosity of the formation as a result of mixed salt deposition can be determined through following relationship:

$$\begin{aligned} \frac{\emptyset _t}{\emptyset _0 }=1-\frac{\emptyset _\mathrm{s} }{\emptyset _0 }=1-\frac{6 \left( {1-\emptyset _0 } \right) V_\mathrm{b} }{\emptyset _0 d_\mathrm{p} } \mathop \sum \limits _{i=1}^n \frac{\dot{m}_\mathrm{{pi}}}{\rho _\mathrm{{si}}}t. \end{aligned}$$
(40)

2.3 Permeability Reduction Model

In order to obtain a meaningful relationship between porosity ratios obtained for single salt deposition (see Eq. 37) or co-precipitation of scaling minerals from aqueous solution (see Eq. 40) and permeability damage imposed to medium, Eq. (18) can be written for scaling and non-scaling condition; hence, dividing the two equations provides the following expression:

$$\begin{aligned} \frac{k}{k_0 }=\left( \frac{\emptyset _t }{\emptyset _0 }\right) ^{3}\left( \frac{1-\emptyset _0 }{1-\emptyset _t }\right) ^{2}. \end{aligned}$$
(41)

The above equation can be used to predict the permeability decline induced to porous rock through relating porosity and permeability of the medium.

3 Validating the Presented Model

The proposed model contains some kinetic parameters pertinent to each mineral deposit in supersaturated solution which need to be tuned through sound experimental data. Due to high nonlinearity of the predictive model, conventional nonlinear regression techniques may yield in over-fitting and poor parameter estimation. In order to decrease the risk of entrapment in local minima while optimizing the kinetic parameters, global optimization techniques are more preferable. In this context a hybrid of PSO and PS algorithms is used in an effort to optimize the Arrhenius correlation parameters employed in the model, namely activation energy and pre-exponential factor.

3.1 Hybrid of PSO–PS

PSO is one of the latest evolutionary optimization techniques, developed by Eberhart and Kennedy (1995), which is inspired by coordinated motion of animals, such as bird flocking or fish schooling. PSO shares many resemblances with other evolutionary global optimization techniques such as genetic algorithm (GA). Like GA, PSO is a population-based stochastic algorithm which is initialized with random initial populations possessing random positions and random velocities in a multi-dimensional search space. The particles which are also the candidate solutions to optimization problem fly around in the search space in an effort to find the optimum solution. The theory of PSO describes an iterative solution process in which each particle’s velocity and position in space are constantly updated according to previous best performance of the particle or its neighborhood (i.e., cognitive behavior), as well as the best performance of the particles in entire population (i.e., social behavior). The PSO algorithm can be formulated as follows (Poling et al. 2001):

$$\begin{aligned}&\displaystyle v_i^{j+1} =w^{j}v_i^j +a_1 \alpha _1^j \left( {\mathrm{{Pb}}_i^j -x_i^j } \right) + a_2 \alpha _2^j \left( {\mathrm{{Gb}}_i^j -x_i^j } \right) \end{aligned}$$
(42)
$$\begin{aligned}&\displaystyle {{x}}_{i}^{{j}+1} ={{x}}_{i}^{j} +{{v}}_{i}^{{j}+1}, \end{aligned}$$
(43)

where \({{v}}_{i}^{j}\) and \({{x}}_{i}^{j}\) indicate velocity and position vectors of the ith particle at iteration j, respectively. \(\mathrm{{Pb}}_{i}\) is the personal best of each individual in the population (i.e., best value of cost function obtained so far for each individual), while \(\mathrm{{Gb}}_{i}\) is global best position found so far in the entire population (i.e., overall best value obtained for cost function). In fact, during optimization process the velocity of each particle is iteratively adjusted so that the particle heuristically oscillates around \(\mathrm{{Pb}}_{i}\) and \(\mathrm{{Gb}}_{i}\) (Poling et al. 2001). The parameters \({\alpha }_{1,2} \in [0,1]\) are vectors of uniformly distributed random numbers, \({{a}}_{1,2} \) are acceleration constants and \({{w}}\) is called the inertia weight. The concept of inertia weight was introduced by Shi and Eberhart (1998) into Eq. (42) in order to damp the natural tendency of standard PSO to explode as oscillations became wider and wider. Reducing \(\mathrm{{w}}\) over time results in a shift from exploratory to exploitative search mode, which further guarantees convergence toward global minima. In general, w reduces linearly with iteration number, from \({{w}}_{\mathrm{initial}}\) to \(w_{\mathrm{finial}} \) (Shi and Eberhart 1998):

$$\begin{aligned} w^{j}=\frac{(j_\mathrm{{max}} -j)\times (w_\mathrm{{initial}} -w_\mathrm{{finial}} )}{j_\mathrm{{max}} }+w_\mathrm{{finial}}, \end{aligned}$$
(44)

where \({{j}}_{\mathrm{max}} \) indicates maximum number of iterations performed. A good starting point would be to set \({{w}}_{\mathrm{initial}} \) to 0.9 and \({{w}}_{\mathrm{finial}} \) to 0.4 (Poli et al. 2007).

Compared to GA, PSO has some appealing characteristics. Under PSO paradigm, search is carried out by speed of the particle and no cross-over or mutation operation is applied to the population. In PSO, knowledge of good solutions is retained by all particles during construction of several generations. Thus, PSO appears to work faster than GA, although it may be dependent upon the optimization problem and distinctions between these algorithms continues to blur.

In PSO optimization algorithm, the position and velocity vectors hold a list of decision variables that must be optimized which in our case are the kinetic parameters namely activation energy and pre-exponential factors pertinent to each crystalline salt. In this work, optimization proceeds by minimizing the following cost function defined between experimental data and model predictions of permeability ratio:

$$\begin{aligned} \mathrm{{Cost}}=\frac{1}{N_\mathrm{{pts}} }\mathop \sum \limits _{N_\mathrm{{pts}} } \sqrt{\left( \frac{\left( \frac{k}{k_0 }\right) _\mathrm{{exp}} -\left( \frac{k}{k_0 }\right) _\mathrm{{Pre}} }{\left( \frac{k}{k_0 }\right) _\mathrm{{exp}} }\right) ^{2}}, \end{aligned}$$
(45)

where \({{N}}_{\mathrm{pts}}\) defines the total number of data points, and subscripts pre and exp denote predicted and experimental permeability ratios.

A hybrid of PSO and PS was found to provide better optimization results, due to deterministic nature of pattern search algorithm as opposed to PSO and GA which are stochastic in nature. PS is a simple algorithm which proceeds through computing a set of points around the current point according to a fixed set of vectors called pattern, searching for locations where value of the objective function is lower than its value at current point (Lewis and Torczon 1999). The set of points called by PS at each step is defined as a mesh. At each iteration step, the algorithm polls the current mesh through computing their cost value. If the mesh point has a smaller value than the current point, polling is called successful and the mesh size doubles, otherwise the poll is considered unsuccessful and the mesh size will be reduced to its half. One similarity between these algorithms is that none of them requires any information about the gradient of the objective function being minimized. The hybrid of PSO and PS was implemented in this work by simply taking the best solution achieved by PSO and feeding it to PS algorithm. A simple flowchart indicating the basic optimization procedure is shown in Fig. 1.

Fig. 1
figure 1

A typical flow chart of PSO–PS algorithm

3.2 (Ba,Sr) SO\(_{4}\) Precipitation in Porous Media

Sulfate scale precipitation is indeed one of the major and severe production problems occurs in water injection processes. In particular, as water injection is a common option in depleted reservoirs for pressure maintenance in many oil fields around the globe, severe production problems may occur as a result of sulfate scale deposition. Barium sulfate is the most dominant type of sulfate scales occurring in water-flooding projects and is usually accompanied by strontium sulfate to form (Ba,Sr) \(\mathrm{{SO}}_{4}\) mixtures which further intensifies the scaling problems in underground formation (Yuan 1989). Todd and Yuan (1992) carried out laboratory tests at elevated temperatures \((70~^{\circ }\mathrm{{C}})\) to investigate the formation of (Ba,Sr) \(\mathrm{{SO}}_{4}\) in porous media by mixing two incompatible waters which provided an excellent source of data for validating the presented model. In these experiments, two incompatible brines were injected concurrently into a core to examine the effect of scale deposition on permeability and porosity decline. Two forms of simple artificial brines were prepared. One was synthesized by dissolving barium and strontium chloride into distilled water to make Ba–Sr rich water; the other was made by simply dissolving sodium chloride and sodium sulfate into distilled water which was labeled as sulfate rich water. Compositions of synthetic brines used in their studies are given in Table 6. Core flooding tests were performed by initially stabilizing the pressure employing one of the fluids and then two incompatible fluids were injected concurrently into the medium at an equal rate of 7.5 cc min\(^{-1}\). The experiments were ended either automatically when the pressure limit of one of the pumps was reached or manually after a certain period of time had passed.

Table 6 Salt concentrations dissolved in synthetic waters at \(20~^{\circ }\mathrm{{C}}\) (Yuan 1989)

Prior to validating the mechanistic model proposed earlier in this context, some essential parameters embedded in the mathematical model need to be calculated for different compositions given in Table 6. Average particle diameter of different cores, mass transfer coefficients of barium sulfate and strontium sulfate scaling salts and their saturation concentrations at given thermodynamic condition are estimated and are outlined in Table 7. Solubility curves of \(\mathrm{{BaSO}}_{4}\) and \(\mathrm{{SrSO}}_{4}\) calculated by Pitzer ion interaction model in pure water at various temperatures are also given in Figs. 2 and 3, respectively. As illustrated in Fig. 2, solubility of barium sulfate or barite is a direct function of temperature; that is, its solubility increases by increasing temperature in pure water. On the other hand, strontium sulfate or celestite has inverse temperature solubility leading to more celestite deposition at higher temperatures, as is shown in Fig. 3. Normally, pure barite or celestite is not encountered in petroleum reservoirs and most barite scales will carry some strontium ion in their crystals (Todd and Yuan 1992; Cowan and Weintritt 1976). Therefore, ion association and ion interaction must be considered while calculating the saturation concentrations of barite and celestite in solution.

Fig. 2
figure 2

\(\mathrm{{BaSO}}_{4}\) solubility as a function of temperature using Pitzer ion interaction model

Fig. 3
figure 3

\(\mathrm{{SrSO}}_{4}\) solubility as a function of temperature using Pitzer ion interaction model

Table 7 Calculated model parameters for different water compositions and core properties

3.2.1 Deposition of \(\mathrm{{BaSO}}_{4}\)

Tables 6 and 7 indicate that brines BSS0 (Sr/Ba = 0.1) and BSS1 (Sr/Ba = 1) are under-saturated with respect to \(\mathrm{{SrSO}}_{4}\) salt, whereas barite is highly supersaturated in both solutions. Moreover, SEM analysis performed by Todd and Yuan (1992) demonstrates that grown crystals in brines BSS0 and BSS1 have tabular rhombic shape. Morphology of crystals changes as strontium concentration increases in the solution, due to simultaneous crystallization and precipitation of barite and celestite in the medium. In this respect, brines BSS0 and BSS1 were singled out to examine the applicability of the model for single salt deposition, since only \(\mathrm{{BaSO}}_{4}\) precipitates out of solution and onto the rock surface. Experimental data and model predictions of permeability decline as a result of barium sulfate scale precipitation in brines BSS0 and BSS1 are illustrated in Figs. 4 and 5, respectively. As both experimental and model predictions show, deposition starts with a rapid increase in permeability reduction followed by rather slower changes due to depletion in supersaturation of the solution.

Fig. 4
figure 4

Permeability reduction as a function of time in brine BSS0 (Sr/Ba = 0.1)

Fig. 5
figure 5

Permeability reduction as a function of time in brine BSS1 (Sr/Ba = 1)

Attempts to determine the values of activation energy and pre-exponential factor in Eq. (5) have been limited in success. A logical explanation for this may be the sensitivity of both values to experimental measurements, since these constants are specific to the crystallizing salt. Presence of other impurities and hydrodynamic forces between the fluid and rock surface may affect the crystal growth rate leading to variations in the value of kinetic parameters. As accurate values of the activation energy and pre-exponential factor for barium sulfate and strontium sulfate are not present in the literature, these values were obtained through minimizing Eq. (45) by a hybrid of PSO–PS algorithm which is a powerful tool for nonlinear optimization problems especially when the gradient of the objective function is not available. The values of activation energy and pre-exponential factor found for deposition of barium sulfate are summarized in Table 8. Slight variations in these values can be attributed to the experimentally induced errors and also presence and interaction of other ionic components and other impurities. Values of average absolute error (AAE), mean square error (MSE) and coefficient of determination (\({{R}}^{2})\) were also calculated to observe the model performance in separate runs. Regression plot of simulated and experimentally obtained permeability ratio is shown in Fig. 6. Model predictions accord well with experimental data.

Fig. 6
figure 6

Predicted versus measured permeability ratios for brines BSS0 (Sr/Ba = 0.1) and BSS1 (Sr/Ba = 1)

Table 8 Optimized model parameters for \(\mathrm{{BaSO}}_{4}\) deposition

3.2.2 Co-precipitation of \(\mathrm{{BaSO}}_{4}\) and \(\mathrm{{SrSO}}_{4}\)

In contrast to brines BSS0 and BSS1, solution brines BSS2 and BSS3 are highly supersaturated with strontium sulfate and supersaturation of barium sulfate dwindles from brine BSS0 to BSS3. Therefore, supersaturation of both barium sulfate and strontium sulfate in BSS2 and BSS3 confirms the co-precipitation of these salts in solution. Results presented in Tables 6 and 7 indicate that the concentration of common ion (i.e., sulfate ion) increase from solution BSS0 (Sr/Ba = 0.1) to BSS3 (Sr/Ba = 1,000), leading to a decline in saturation concentrations of both \(\mathrm{{BsSO}}_{4}\) and \(\mathrm{{SrSO}}_{4}\). Rate of precipitation and density of barite and celestite differ substantially from each other and single salt deposition models will not yield proper predictions of the deterioration of permeability caused by mixed salt scaling. Therefore, the mixed salt deposition model developed earlier in this study can be applied whenever co-precipitation of inorganic minerals occurs in porous media. Simultaneous precipitation of \(\mathrm{{BaSO}}_{4}\) and \(\mathrm{{SrSO}}_{4}\) strikes in brines BSS2 and BSS3 owing to their high supersaturation with respect to both scaling minerals. Hence, these brines were selected as part of the study to further investigate the validity of the proposed model for mixed precipitation of scaling salts. Variations of permeability as a function time due to \(\mathrm{{BaSO}}_{4}\) and \(\mathrm{{SrSO}}_{4}\) deposition are represented in Fig. 7 for both BSS2 and BSS3 brines. Permeability damage is much more severe when barium sulfate and strontium sulfate are both precipitating onto rock surface. According to typical solubility diagrams given in this context, an increase in temperature must lead to a reduction in barium sulfate deposition, while increasing the rate of strontium sulfate precipitation. The synthetic brine with 1,000:1 Sr/Ba ratio caused the most chronicle formation damage as is illustrated in Fig. 7 by both experimental measurements and model predictions. Values of activation energy and pre-exponential factor as well as regression parameters revealing the accuracy and robustness of the presented model for mixed deposition of \(\mathrm{{BaSO}}_{4}\) and \(\mathrm{{SrSO}}_{4}\) are presented in Table 9. Variations in activation energies and pre-exponential factors can be attributed to interactions between ions present and also to co-precipitation of \(\mathrm{{BaSO}}_{4}\) and \(\mathrm{{SrSO}}_{4}\) from solution. A regression plot of experimentally measured permeability ratios and model prediction for brines BSS2 and BSS3 is shown in Fig. 8. Satisfactory agreement exists between model predictions and experimental data.

Fig. 7
figure 7

Permeability reduction as a function of time in brines BSS2 (Sr/Ba = 100) and BSS3 (Sr/Ba = 1,000)

Fig. 8
figure 8

Predicted versus measured permeability ratios for brines BSS2 (Sr/Ba = 100) and BSS3 (Sr/Ba = 1,000)

Table 9 Optimized model parameters for mixed \(\mathrm{{BaSO}}_{4}\) and \(\mathrm{{SrSO}}_{4}\) deposition

Although proposed model takes into account a combination of diffusion and reaction processes, high values of activation energy obtained in optimization process suggest that barium sulfate and strontium sulfate crystallization onto rock surface are controlled by a surface reaction. The results obtained in this study suggest that precipitation of scaling minerals on rock surface is less affected by flow velocity and is controlled by the surface reaction occurring between ionic components. Thus, the mechanisms of scale crystallization and precipitation found by Noncollas and Liu (1975) is further confirmed in this study.

When scaling minerals deposit onto rock surface, porosity and permeability of the medium diminish until the flowing fluid becomes under-saturated or pore throat blocking occurs. After a while if pore throat blockage does not hinder fluid flow through porous media, an asymptotic behavior is usually observed in trend of the permeability reduction curves versus time suggesting mineral dissolution (Moghadasi et al. 2004). However, this study assumes that the flowing water is always supersaturated with respect to scaling minerals and crystal dissolution into bulk of the flowing solution does not occur. Moreover, experimental data of Todd and Yuan (1992) employed in this study to validate the mathematical model do not show such a flat trend as flooding process approaches to an end.

4 Conclusions

In this study, a mechanistic model was developed taking into accounts the thermodynamics, kinetics and hydrodynamics of salt precipitation in porous media. Applicability of the model was examined through comparing the predicted permeability reduction rates with experimental data of Todd and Yuan (1992), for both single barium sulfate deposition and mixed precipitation of \(\mathrm{{BaSO}}_{4}\) and \(\mathrm{{SrSO}}_{4}\). A novel hybrid approach based on a combination of PSO algorithm and PS technique was implemented in order to tune the kinetic parameters through minimizing error between measured experimental data and model predictions. The assumption made in developing such model was that the precipitation phenomenon is a combination of mass transfer and reaction controlled processes during flow through porous media. However, high value of activation energies obtained suggests the dependence of barium sulfate and strontium sulfate deposition to surface reaction occurring between the ions. Deviations ranging from 1.03 to 9.3 % were observed which prove that the presented model is capable of being used for both single and mixed precipitation of inorganic salts in predicting permeability and porosity ratio of the medium. Observed discrepancies between model prediction and experimental data can be attributed to many factors and assumptions used in developing the mathematical model. Incorporating the pore size distribution into the developed model may result in better predictions of permeability decline as compared to assuming a homogeneous porous medium. Also, solubility values predicted by Pitzer ion interaction model for each scaling mineral may also carry some uncertainties owing the assumptions and simplifications made for \(\mathrm{{BaSO}}_{4}\) and \(\mathrm{{SrSO}}_{4}\) salts thermodynamic behaviors in aqueous solutions. The values of activation energy and pre-exponential factor tuned from experimental data can also be obtained through batch reactor tests and further be compared with the optimized values in order to provide an insight into the effect of different ions on crystallization and precipitation in porous media.

Conducting core-flood experiments for determining the permeability loss in porous media are always hard and time consuming not to mention the variety of costs associated with these experiments. Moreover, it is not within the realm of possibility to consider all the operating conditions usually encountered in oilfield industries. Developed mathematical model capable of predicting the rate of permeability reduction in porous media can be implemented as an invaluable tool in designing successful water-flood projects along with saving a huge amount of time and money. Moreover, kinetic parameters obtained in this study can be employed in simulation software aiming to define the formation damage induced to porous media by co-precipitation of inorganic minerals.