## 4 Vettability Alteration Due to Rock Dissolution and Precipitation
### Wettability Alteration Due to Precipitation  
Another study [72] investigated the impact of carbonate precipitation on pore structure and two-phase fluid flow in porous media. To examine changes in porosity and relative permeability caused by carbonate precipitation, a pore-scale numerical model was developed and applied to real rock microstructures. The geometric model of these rocks was created based on micro-CT scans of Berea sandstone samples. Direct flow simulations were conducted on the reconstructed rock space model. By analyzing changes in pore structure resulting from deposition, permeability changes can be assessed. The scanned images of Berea sandstone have a resolution of up to 3.2 \(\upmu\)m. The entire dataset comprises 396 slices. In the study, nitrogen (CO\({}_{2}\)) was used as the non-wetting phase, while water served as the wetting phase. Two clogging models were used to study the impact of carbonate precipitation on pore structure and relative permeability in porous media. The first model employed chemical reaction theory to assess local changes in sediment volume and introduced a mass variable to track the amount of deposited carbonate. The second model adjusted the grayscale threshold to modify sediment structure, effectively narrowing the pore space and reducing porosity, thereby eliminating the need to calculate the Ca\({}^{2+}\) concentration field. Figure 24 shows the results of modeling two-phase flow through Berea sandstone, specifically the relative permeability curves for the two clogging models. Using the relative phase permeability data, the wettability index was calculated using the Lak method for various porosity values due to precipitation. Figure 25 shows the results of the wettability changes as a function of porosity reduction for the first model. Overall, it was observed that the wettability of the rock remained closer to neutral across all porosity values. As porosity decreased, the wettability index trended toward a more strongly neutral state. Figure 24: The evolution of relative permeability with changes in porosity (0.210–0.103) of Berea sandstone due to precipitation under the first (**left**) and second (**right**) clogging models [72]. The reactive precipitation model focuses on the concentration of reactive components, with advection and diffusion of the concentration field being regulated by the flow, pore structure, and pore connectivity. Thus, changes in wettability caused by precipitation depend on both the distribution of flow velocity and modifications in pore geometry. Wettability behavior is related to changes in pore structure due to carbonate precipitation (Figure 26), which resulted in a significant reduction in the absolute permeability of the porous medium. Absolute permeability decreased from 769 mD to 169 mD and 11 mD at porosities of 21% and 10.3%, respectively [72]. During two-phase flow simulations, the relative permeability of the non-wetting phase was significantly reduced after precipitation, affecting the liquid flow properties (Figure 24). Figure 27 shows the results of the wettability index as a function of porosity change according to the second model. At both maximum and minimum porosities, it can be observed that the wettability index remained practically unchanged, despite the fact that absolute permeability decreased from 769 mD to 268 mD and 103 mD at porosities of 21% and 10.3%, respectively [72]. Figure 26: The evolution of pore structure due to precipitation according to the first model at cross-sections perpendicular to the flow direction (light gray, initial; dark red, plugged areas) [72]. Figure 25: Changes in wettability as a function of porosity during carbonate precipitation according to the first model. Such minimal change is attributed to the fact that in the threshold adjustment model, the pore space contracts along the edge walls, and the artificially added particles attain uniformity (Figure 28). The wettability index shows different values in the two models.