Pore-scale simulation of low-salinity waterflooding in mixed-wet systems: effect of corner flow, surface heterogeneity and kinetics of wettability alteration

The initial wettability state of the candidate oil reservoirs for low-salinity waterflooding (LSWF) is commonly characterized as mixed-wet. In mixed-wet systems, both the two-phase flow dynamics and the salt transport are significantly influenced by the corner flow of the wetting phase. Thus this study aims at comprehensive evaluation of LSWF efficiency by capturing the effect of corner flow and non-uniform wettability distribution. In this regard, direct numerical simulations under capillary-dominated flow regime were performed using the OpenFOAM Computational Fluid Dynamics toolbox. The results indicate that corner flow results in the transport of low-salinity water ahead of the primary fluid front and triggers a transition in the flow regime from a piston-like to multi-directional displacement. This then makes a substantial difference of 22% in the ultimate oil recovery factors between the 2D and quasi-3D models. Furthermore, the interplay of solute transport through corners and wettability alteration kinetics can lead to a new oil trapping mechanism, not reported in the literature, that diminishes LSWF efficiency. While the findings of this study elucidate that LSWF does exhibit improved oil recovery compared to high-salinity waterflooding, the complicating phenomena in mixed-wet systems can significantly affect the efficiency of this method and make it less successful.


Pore-scale simulation methodology
In this study, we utilized OpenFOAM (Open Field Operation and Manipulation) version number 11 38,39 which is a widely used, free, open-source CFD software from ESI group (https:// www.openf oam.com).While other CFD packages prove valuable in fluid dynamics simulations, we found OpenFOAM to be more efficient in simulating fluid-fluid interfaces with faster convergence.OpenFOAM's open-source nature allows for the exploration of novel aspects, especially in cases where there is no pre-existing solver for unprecedented problems.The advantage lies in the cost-free utilization and improvement of OpenFOAM due to its open-source framework.We also employed the interTransportFoam solver, which is well-suited for LSWF studies due to its ability to simulate species transfer.This solver is derived from the interFoam solver of OpenFOAM and belongs to GeoChemFoam, an OpenFOAM-based toolbox (the open-source code available at https:// www.julie nmaes.com/ geoch emfoam) that provides a broad spectrum of features to tackle complex fluid flows in multi-scale porous media.

Volume of fluid (VOF) method
The VOF approach 40 provides robust mathematical modeling for simulating two-phase flow systems that involve immiscible and incompressible fluids.It allows for accurate tracking of the interface evolution between different fluids, based on the velocity vector field obtained from the solution of the Navier-Stokes equations.In this method, the location of the interface is determined using an indicator function (α), which represents the volume fraction of a particular phase present in a given cell.To calculate fluid properties such as viscosity (µ), density (ρ), and velocity (u), weighted averaging is used between the two fluids involved, where indices 1 and 2 correspond to the water and oil phases, respectively.
Modeling the two-phase flow requires solving the continuity equation (conservation of mass) that is coupled with Navier-Stokes equation (conservation of momentum).These flow equations are given as follows: Continuity equation: Navier-Stokes equation: where t designates time, p pressure, S = µ(∇u + ∇u T ) viscous stress, F b , denotes external body forces, and F st is the interfacial (capillary) forces that act upon the volume occupied by the interface, and is approximated by the continuum surface force (CSF) formulation which is a function of IFT ( σ ), interface curvature ( κ ), and the indicator function gradient 41 : The CSF method may face limitations due to spurious currents caused by inaccuracies in calculating the interface normal vector ( n ) and curvature ( κ ) at low capillary numbers ( N ca ) 42 .However, the filtered surface force (FSF) model offers a solution to this problem by reducing spurious currents through smoothing and sharpening techniques 43 .The mean curvature expression is given as follows: Interface normal vector n = ∇α |∇α| on the wall can be computed based on the equilibrium contact angle ( θ ): In which n s and t s are normal and tangential vectors to the rock surface 41 .Finally, the progression of the phase distribution parameter ( α ) is controlled by the following advection equation: where u r is the relative velocity, applied on the interface.To minimize numerical dispersion and achieve a sharper interface, a compression constant ( c α ) is utilized, whereby u r is subsequently replaced with the compressive velocity 39 : (1)  44,45 .The global salinity concentration is acquired through the weighted averaging between the two phases: After using Henry's law ( c 2 = Hc 1 ), in which H is Henry's coefficient, Eq. ( 11) turns into: By applying the equilibrium-based mean diffusion, suggested by Maes and Soulaine 46 , we have: The CST equation then will be expressed as: where F represents the advective flux, and J is the diffusive flux.Using the compressive CST (CCST) formulation, the advective flux can be modeled over the interface via compressive velocity 47 : Assuming that no solute transfer occurs through the oil phase ( H≈0), Eq. ( 14) can be rewritten as shown in Eq. ( 17): During simulations, a boundary condition (BC) for concentration accounts for the rock-brine reactions on the walls, and is written as 48 : Equation (18) elucidates the slow kinetics associated with WA, as reported in our previous studies 2,6,49 , where D NS is the near-surface diffusion coefficient at the boundaries, and s signifies the global molar rate of species creation on the surface and can be defined as: In consideration of the exclusive impact of LSWF on the occurrence of surface reactions, the value of s 2 is assigned as zero.Additionally, since there is no analytical equation to precisely relate the extent of surface reactions with the salinity of the water, it is plausible to postulate that the variable s 1 exhibits a linear gradient, ranging from zero in the presence of high-salinity ( c HS ), to a maximum value denoted as s max , under low-salinity ( c LS ) circumstances: Hence, Eq. ( 18) can be rewritten as follows: where is a constant in which the subscript s/d indicates the ratio of surface reaction over diffusion coefficient.A reasonable value for this parameter was obtained through matching the simulation with experimental results, which is fully explained in the following section.

Time-scale of LSW-induced wettability alteration
According to Mahani et al. 2 , the slow kinetics of WA is responsible for the slow detachment of oil droplets exposed to LSW from a clay patch or rock surface.Following the study of Namaee-Ghasemi et al. 14,15 a boundary condition Eq. ( 21) for concentration accounts for the kinetics of WA and a value of R s/d ≈5000 m −1 can closely match the experimental contact angle data reported by Mahani et al. 2 .Nevertheless, this value was acquired under the stationary conditions of LSW exposure, and depending on numerical capabilities, may require adjustments at higher injection rates (higher N ca ).In fact, by increasing the injection rate to compensate for the time-intensive

Validation of the CFD model
The solver used in this study for simulating LSWF has been previously validated by Namaee-Ghasemi et al. 14,15 against two distinct experimental data from Chatzis and Dullien 50 and Zamula et al. 51 .Furthermore, upon comparing the simulation results with the experimental oil droplet data by Mahani et al. 2 , a good agreement between the two works was found, confirming the model's capability in describing the LSE.Hence, the same solver is employed in this study, ensuring consistency and reliability in the simulations.

Wettability alteration modeling
WA stands as a pivotal factor influencing the efficiency of oil recovery in subsurface reservoirs, yet modeling this alteration proves to be a challenging task.Qiao et al. 52 introduced a reactive transport model that intricately considers competitive surface reactions involving cations, carboxylic groups, and sulfate.Their approach mechanistically connects multiphase displacement, surface complexation, WA, and oil recovery for carbonate rocks.In our study, we uniquely associate WA, represented by contact angle reduction, solely with solute concentration (brine salinity).During LSWF, the contact angle ( θ ) is computed by interpolation between the contact angle on the oil-wet walls ( θ HS ) and a lower contact angle at low-salinity conditions ( θ LS ) representing less oil-wetting or more water-wetting states.Our study employs a linear interpolation method, as commonly found in the literature 11-14,19 , where we have utilized a salinity-dependent interpolation factor denoted as ω: Applying Eq. ( 23) results in the Full Range Interpolation (FRI) approach for computing the contact angle ( θ ) in the course of LSWF.

Pore-scale models and simulation scenarios
Geometry and physical properties of pore-scale models Throughout the simulation of LSWF, corners can act as conduits, creating new pathways for solutes to access areas that may otherwise be inaccessible.To thoroughly investigate this phenomenon, only a pore-network would satisfy the needs.For this purpose, we generated two pore-scale models: one homogeneous and one heterogeneous (see Fig. 1).The homogeneous geometry consists of uniformly sized circular grains in 2D and cylindrical grains (pillars) in 2.5D with mesh cells of size 2 × 2 × 2.5 μm, as shown in Fig. 1 b, c.The heterogeneous geometry, on the other hand, is made up of non-uniform grains with mesh cells sized 2 × 2 × 2 μm, as seen in Fig. 1d, e.To mitigate the high computational costs arising from the increased grid cells in the expanded heterogeneous domain compared to the homogeneous model's size, the thickness of the heterogeneous geometry was reduced from 30 to 20 µm .This adjustment was made to enhance computational efficiency, as each 2.5D simulation of LSWF in the heterogeneous model, even after this adjustment, required approximately 3 weeks run time on a high performance computing system with 64 GB RAM and a 12-processor CPU.However, to maintain numerical accuracy, adjustments were also made to the cell size in the direction of model depth, reducing it from 2.5 to 2 µm .While the study by Namaee-Ghasemi et al. 14 utilized a pore domain with a grid size of 1 µm to capture the diffusive-advective solute transport during LSWF simulations, our heterogeneous geometry, which is at least five times larger, employs grid cells of size 2 µm , maintaining the accuracy of the simulations.This ensures that the results are not grid sensitive and numerical dispersion is minimized.
The mesh construction of either geometry was conducted in the snappyHexMesh tool of OpenFOAM toolbox, and the roughness model used in our geometries follows the studies of Buchgraber et al. 53 and Fredriksen et al. 54 , in which vertical grooves are designed to resemble the reservoir-representative surface heterogeneities, applicable to both carbonates 53 and sandstones 54 .Additionally, surface heterogeneity as roughness was introduced to the model by mesh configuration.As shown in Fig. 1 a, the size of this saw-tooth roughness model is dictated by the mesh size.

Simulation scenarios
Two sets of simulations were performed to investigate the impact of pore geometry on the LSE/LSR during LSWF.The first set examined the homogeneous pore-network, while the second focused on the heterogeneous pore-network.Identical procedures were used in each set.Initially, oil was injected into the uniformly water-wet pore space until a steady-state condition was achieved.
Subsequently, following the methodology outlined in the study by Landry et al. 55 , the wettability state of the regions associated with the non-wetting phase was altered by creating oil-wet and water-wet patches using Blender, an open-source software (available at https:// www.blend er.org).This allowed for the creation of mixedwet pore spaces, which are commonly observed in natural systems.In the literature, several approaches have been utilized to assign a nonuniformly-wet state to a porous medium, incorporating both experimental [56][57][58] and numerical 55,[59][60][61] approaches.The simulations were then continued using secondary LSWF.In this study, and for the heterogeneous geometry, a base case was also established by injecting high-salinity water (HSW) into the pore space at a capillary number of 10 -5 .The purpose of this base case is to provide a benchmark against which the performance of secondary LSWF can be evaluated over different time-scales.The simulation scenarios are summarized in Table 1.Further information on fluid properties and boundary conditions (BCs) is included in the Supplementary Material (SM-1).

Oil migration into porous medium
To replicate the initial fluid distribution in oil reservoirs, oil was injected into pores initially filled with water at a capillary number of 1.33×10 -5 (see Fig. 2).As the oil moves through the water-wet pores ( θ IC = 5 • ), it encounters high capillary resistance, leading to incomplete drainage of the capillary channels and causing water to remain in the corners.Throughout this process, the oil continues to displace the water until it reaches a steady-state condition (see Fig. 2 T1-T3).The stages illustrated in Fig. 2

Effect of corner flow on secondary LSWF
After oil migration and modifying the wetting of the porous domain, the simulations were continued by secondary LSWF and using the fluid saturation obtained in Fig. 2 T5 as the initial saturation.The pore-scale displacement results are presented in Fig. 3.In Fig. 3 T1, T2, it is observed that LSW triggers oil production from left to right at N ca = 8.33 × 10 −6 .The contact angle on oil-wet walls decreases from θ HS =150 • to θ LS =10 • due to LSW action within a time-scale based on the study of Namaee-Ghasemi et al. 14 , which accurately reflects the actual time-scale of LSW WA ( R s/d = 5000).In Fig. 3 T3, the oil remains attached to the oil-wet wall while the LSW bypasses the oil through the water-filled corners of the geometry.This action changes the flow regime and enables LSW to access the pore throat that lies ahead, leading to a reduction in the thickness of the oil layers through WA caused by LSW in the mentioned throat.This thinning process is depicted in Fig. 3 T4, T5.Finally, in Fig. 3 T6, the moveable oil is produced, leaving some trapped oil as identified by the red dashed circle.
To prevent corner flow from acting as a displacement mechanism during secondary LSWF, simulations were conducted under identical conditions in the 2D model as well (as shown in Table 1).The results of these simulations are presented in Fig. 4. The procedure for the 2D drainage simulation and wettability modification was identical to that used in the 2.5D simulation.
In 2D simulations where the corner flow phenomenon is absent, the contact line of the LSW-oil and consecutively WA is only restricted to the primary front, which results in a piston-like displacement as shown by the red arrows in Fig. 4a T1-T2.Additionally, the encircled areas in Fig. 4a T1-T2 confirm that no change in the water saturation can be observed as this area has not been exposed to LSW yet.The displacement then continues until the meniscus collapse takes place upon contact with the grain wall in the red dashed circle in Fig. 4a T3.In contrast, 2.5D simulations show that corners act as conduits, causing multi-directional displacement as shown by red arrows in Fig. 4b T1.The recovery factor (RF) obtained from the 2.5D simulation is 58.3%, while maximum oil recovery of 80.4% is achieved in the 2D case, where LSW remains only behind the primary flow front.Overall, in addition to the observed variation in the flow regime due to corner flow, there is also significant variability in the residual oil saturation as depicted in Fig. 4c.This finding is significant and requires further examination.
In Fig. 3 T1, during the initial stages of imbibition, there exists a considerable distance between the initial oil saturation and the outlet.This distance results in a delay in the onset of the RF curves in both 2.5D and 2D simulations.As fluid flow is not precisely the same in both 2D and 2.5D models, it leads to a slightly distinct fluid distribution after the drainage process.In the 2D simulation, the initial displacement tip of the oil is somewhat more distant from the outlet compared to the 2.5D model at the onset of LSWF simulations, resulting in a separation between the two initiation points in the RF curves.Additionally, due to the presence of oil discontinuity at the outlet and the lack of continuous oil-wet walls throughout the mixed-wet geometry, RF curves no longer follow a linear trend.
In interpreting the results, one could argue that transitioning from 2D to 2.5D models might potentially lead to a reduction in the RF, given that RF reaches 100% within a 1D channel.However, as previously explained, the only theoretically feasible method to exclude the effects of corner flow (derived from a 2.5D framework) is by conducting simulations in a 2D model while keeping other potential aspects (e.g., the shape and size of the geometry) constant compared to a 2.5D model.Additionally, numerous pore-scale phenomena (observed in

Simulations performed in the heterogeneous geometry
To substantiate our findings from the homogeneous geometry, and to conduct a more comprehensive analysis of WA kinetics during LSWF, the following simulations were executed within a (quarter of) five-spot configuration.This conformation not only included greater heterogeneity in grain size but also encompassed an expansion of the entirety of the domain size.

Oil migration into porous medium
At a constant velocity of 0.005 m/s , oil migration into the pore space was initiated, corresponding to N ca = 5 × 10 simulation.Since, this outcome does not necessarily resemble the fluid distribution within a realistic porous material, the injection velocity of oil was set high.The pore-filling sequence of the drainage process simulation is presented in Fig. 5. Once steady-state was reached, the drainage process was stopped, and the final fluid distribution at this stage (Fig. 5 T9) was used as the initial fluid distribution during water injection processes after altering the wettability.As a result, the contact angle on walls adjacent to the oil was changed from θ IC = 5 • to θ HS = 100 • to establish mixed-wettability in the domain.Moreover, the water volumes (highlighted with dashed red circles) in Fig. 5 T9, along with the water present in the corners, serve as the initial HSW saturation before LSWF.

Effect of corner flow on high-salinity waterflooding (HSWF) efficiency
During the process of displacing oil by HSW, the entry capillary pressure acts as a barrier to the invading fluid, creating a competitive pathway for the injected HSW to advance through the corners of each pore.In fact, the corner flow displacement mechanism allows water to permeate more easily inside the water-wet and initially water-filled corners than to displace the oil volume inside the center of each pore that is attached to the oil-wet part of the mixed-wet pore walls.As a result of this behavior, the relative permeability of water is enhanced, leading to an expansion of the initial water volume (water banking).Subfigures T1-T3 in Fig. 6 illustrate this process.The injected water supplies the required amount of water to maintain the expansion through the corners of the pores, as shown by the red arrows in Fig. 6 T1.The expansion of the initial water saturation can be viewed as either favorable or unfavorable, depending on its proximity to the producing outlet.If the initial water volume expands near the outlet, it may obstruct oil production pathways and trap oil, as seen in the red dashed section α in Fig. 6 T8.On the one hand, when the expansion takes place at a distance away from the outlet, it enhances volumetric sweep efficiency and prevents oil entrapment.For example, the failure to produce the trapped oil volume β in Fig. 6 T8 is attributed to the oilwetness of the surrounding walls as well as the bypassing of the oil due to HSW flow through the center of the domain (fingering).Given the symmetry of the geometry, a similar volume of oil is expected to be trapped on the opposite side of the geometry (below the section α ) due to the same reasons.However, as water can penetrate through the corners of the pores, the initial water saturation in that area expands, preventing the entrapment of this oil cluster.The injection takes place under capillary-dominated conditions where the capillary number is set to 10 -5 .The range of capillary numbers used in this study falls within an accepted domain based on previous pore-scale LSW research [11][12][13][16][17][18][19] . Oil prduction is initiated as soon as LSW advances through the pore-network (see subfigure T1 in Fig. 7).As demonstrated in Fig. 7 T2, the transition of the LSW front along the red arrow results in the meniscus collapse.At this point, the encircled oil ganglia shown in Fig. 7 T3 remains continuous only through a single throat, making it prone to oil entrapment, which occurs shortly after in the highlighted area in Fig. 7 T4.These observations indicate that oil entrapment in the snap-off form results from the combination of several pore-scale phenomena (that are fully explained in the corresponding section).In the following stages of LSWF, oil is trapped similarly (Fig. 7 T5).However, these phenomena may have positive effects as well.The oil break-up during the displacement of oil by LSW is considered a controlling factor in this regard.In fact, after oil break-up in the yellow dashed areas, oil finds an exit route that is wider than the previous throat in which oil was trapped.
In contrast to HSWF resulting in the trapped oil ganglion β, as shown in Fig. 6 T8, LSWF can mobilize this cluster of oil (Fig. 7 T6).However, an oil break-up mechanism prevents part of this relocated oil from being entirely produced Fig. T7, T8).This observation is consistent with the findings from Bartels et al. 6 and Namaee-Ghasemi et al. 14 , who stated that WA is a necessary but not a sufficient condition for observing LSR.

Effect of corner flow on secondary LSWF ( R s/d = 100 ) efficiency
To gain additional insights into the time-effect of WA, secondary LSWF simulations were conducted at R s/d = 100, which means that the contact angle reduction upon exposure to LSW takes place more rapidly in comparison with the previous case ( R s/d = 1000 ).The results are presented in Fig. 8.
Consequently, the fast reduction in the entry capillary pressure causes LSW to preferentially sweep the oil instead of advancing through the corners of each pore.As a result, the water banking, observed during HSWF, no longer occurs in either of the cases ( R s/d = 100 or R s/d = 1000) during LSWF.However, due to the faster WA, LSWF at R s/d = 100 can fully displace this water bank (which works as a barrier), creating new flow pathways (see Fig. 8 T2, T3).Subsequently, more oil is recovered at the end of the injection period.As an evidence, the remaining oil volume ( γ in Fig. 7 T12) no longer exists in this case.

Discussion on oil break-up mechanisms and contributing factors affecting overall oil recovery by LSWF
Before proceeding with the discussion of the LSWF results, it is essential to elucidate the pore-scale phenomena observed during water injection simulations.Oil ganglia break-up takes place quite often through various mechanisms, as water displaces oil in the porous media.Lenormand et al. 24 described several processes that lead to discontinuity of the oil phase.For example, the I2 mechanism causes oil rupture when a meniscus comes in contact with the grain surface (or no flow walls), creating two separate interfaces moving through individual pores.This process is prevalent in both 2D and 2.5 (quasi-3D) models of fluid displacement, regardless of the www.nature.com/scientificreports/wettability state.In this study, we refer to the I2 mechanism as oil break-up type 1 (OBT1).Schematically, this mechanism occurs inside a geometry similar to our model as illustrated in Fig. 9, subfigure a. Lenormand et al. 24 proposed snap-off as another mechanism to explain the oil continuity collapse within water-wet capillary ducts.However, two aspects of this conclusion warrant further consideration.Firstly, mixedwettability is a more plausible wettability state to complex interactions within porous media, than uniformly water-wet state as considered by Lenormand et al.. Secondly, Namaee-Ghasemi et al. 15 found that during LSWF in oil-wet geometries, snap-off occurs mainly at very high rates of WA, even close to instantaneous WA.Therefore, snap-off is an infrequent occurrence due to the slow wettability change during LSW injection.As a result, our study proposes a new snap-off mechanism, which differs from the one described by Lenormand et al. 24 .This newly observed mechanism is called oil break-up type 2 (OBT2), and it is shown schematically in Fig. 9, subfigure b for a 2.5D model.OBT2 is an important finding because it sheds light on a previously unidentified mechanism that can contribute to the entrapment of oil in the course of LSWF.While displacing the oil, LSW propagation inside angular capillaries develops a primary flow front as well as a corner flow front (Fig. 9 b T1).The latter causes LSW to move ahead of the former (oil-water primary) front, changing the local wettability of rocks.According to the previous studies 14,15 , during LSWF, this wettability change may impose negative effects on LSR if LSW manages to bypass the unswept oil.Unlike the preceding investigations that introduced diffusion through competitive pathways as the only cause of the aforementioned bypassing, corner flow can be considered a new mechanism that provides comparable results.single throat.As illustrated in Fig. 7 T9-T11, the disconnection caused by OBT2 can be extended to several pores which brings more obstruction to the current oil production paths and even can be considered as another new entrapment mechanism during LSWF.In essence, conventional snap-off is characteristic of water-wet systems where water moves through the existing water layers on the water-wet walls, pinching off the oil in the pore throat region, and leading to the entrapment of a portion of the oil.On the other hand, OBT2 occurs in mixedwet systems and is triggered by WA resulting from the exposure of the system to LSW.Moreover, the fluid flow on rough surfaces observed during OBT2 could be regarded the same as corner flow phenomenon during the imbibition process in the angularities of pores, which was already explained by Hu et al. 23 and Zhao et al. 22 .This suggests that even within pores with circular cross-sections, the solute transport may still result in a faster oil relocation and/or oil entrapment through the blockage of the oil production path.
Another notable observation is that in comparison to the base case of HSWF, all LSWF cases exhibit a common characteristic of recovering more oil.However, there are factors unique to each LSWF case that may degrade its efficiency.For instance, when R s/d = 5000 , the simulation showed a slow rate of reduction in contact angle or WA, which impeded oil mobilization during LSWF and resulted in a displacement pattern similar to that of HSWF after a certain point.The slow WA, however, prevents further oil entrapment caused by the OBT2, promoting increased oil recovery.The Supplementary Material (see Figure S4) provides the numerical simulation sequences for this case.
In the case where R s/d = 1000 , though the oil relocation due to WA is noticeable, numerous oil entrapments caused by geometry-induced OBT2 eventually reduce the RF (Fig. 10).In Fig. 7   taking place inside a single pore.Trapped oil ψ is also left behind due to the same event, however, it is noticeably larger because as explained before, more blocked pores are involved in this event.Despite the current rate of WA, it could not fully displace (drain) the initial water that impeded oil production (water banking), leaving oil volume η behind in the pore-network.Regarding the case R s/d = 100, snap-off also causes numerous oil entrap- ments, but the formation of an oil bank is observable in Fig. 8 T4-T6, which accounts for the latest breakthrough (BT) time of this case (see Fig S1 b) corresponding to 0.76 PV.This explains the highest RF among the other cases.Nevertheless, as shown by the red dashed circles in Fig. 8 T8 multiple oil ganglia are trapped.Oil clusters α, β, and γ are consequences of the OBT2 event, and volume ψ is incorporated into the trapped oil due to the propagation of the injected LSW toward multiple pores ahead of the primary front.Although LSWF can still provide incremental oil recovery, the adverse effects of corner flow may diminish or erode the LSR even resulting in recoveries as low as that achieved by HSWF.This is quantitatively supported by the RF curves in Fig. 10.Consistent with the aforementioned discussion, the earliest BT time corresponding to 0.64 PV, belongs to the case R s/d =0, meaning an instant contact angle decrease from θ HS =100 • to θ LS =10 • .This speeds up oil production inside smaller capillary channels and provides a faster displacement towards the outlet compared to other cases but does not allow sufficient time for the oil to evacuate the pore space adequately.Therefore, based on the RF values in Figure S1 a, oil recovery follows a non-monotonic trend, which means RF does not necessarily increase as the rate of WA is increased.This result aligns with the findings in the existing literature 15,62 .The simulation result of case R s/d = 0 is also available in the Supplementary Material (see Figure S5).
The ultimate RF within LSWF cases is represented by the RF values displayed in Figure S1 a.To ensure that no oil remobilization would occur during subsequent pore volumes of LSW injection, the contact angle between water and oil was manually adjusted to θ LS =10 • , indicating the strong water-wetness of the porous medium.Despite oil detachment from the grain surfaces and walls, no additional oil was recovered, and the residual oil saturation remained unchanged (see Figure S2).Lack of oil remobilization, even though WA occurs, can likely explain some of the unsuccessful practices of LSWF reported in the literature 63 .

Model limitations
LSR can be influenced by various factors, including reactive transport, reservoir rock heterogeneities, and fluid-fluid interactions resulting from surface-active agents.Despite indirectly addressing some of these effects, such as using a specific boundary condition Eq. ( 21) to account for surface reaction during LSWF, we intentionally excluded the other phenomena.This simplification allows us to attribute results specifically to the phenomena present in our study, namely mixed-wettability, roughness, and corner flow.Consequently, while corner flow impact is important, it is the net effect of all these factors that ultimately determines the outcome of LSWF.
Moreover, the RF at the field-scale is primarily impacted by permeability variations at reservoir scale and the prevailing flow regimes.Thus, upscaling the findings of this small-scale research to a large-scale problem requires a comprehensive understanding of the link between the micro-scale effects and the macro-scale observations.Nevertheless, exploring the interplay between the effective pore-scale phenomena remains imperative for gaining insights into the outcomes from the macro-scale.

Conclusions
This study aimed to investigate the performance of LSWF in mixed-wet porous media to assess the combined effects of corner flow and time-effect of WA in rough pore geometries; a key aspect rarely investigated in the literature.Based on the results of pore-scale simulations in different geometries the following conclusions can be made: • The comparison of 2D and 2.5D simulations with homogeneous grain size highlights the influence of pore geometry, especially corner flow in angular geometries, on two-phase flow characteristics.In the absence of corner flow in 2D simulations, low-salinity water remains confined to the oil-water primary front, exhibiting a piston-like invasion.Conversely, in the 2.5D model with corner flow, multi-directional displacement occurs, enabling low-salinity water to advance ahead of the primary front.• Corner flow of low-salinity water may offer localized benefits such as a faster wettability alteration and local oil release.However, this may also increase the probability of bypassing in other locations.The study identifies the synchronization of corner flow, roughness, and wettability alteration kinetics leading to the oil snap-off phenomenon through oil break-up type 2 (OBT2) mechanism.This finding suggests that wettability alteration does not necessarily improves oil recovery.When low-salinity water moves beyond the primary flow front via corner flow or dispersion through alternative pathways, wettability alteration occurs ahead of the primary front, impeding oil production.This adverse effect on oil recovery through LSWF underscores how critical it is for low-salinity water to remain within or behind the primary flow region.• Corner flow not only impacts LSWF efficiency but also influences HSWF outcomes.In HSWF, the entry capillary pressure of mixed-wet pores acts as a barrier, causing injected HSW to bypass oil in the center of the pores and flow into corners.This can lead to the formation of a water bank, acting either as a displacing or blocking mechanism depending on its distance from the outlet.Corner flow has significant implications for the success or failure of both LSWF and HSWF.• The success of secondary LSWF for EOR hinges on the kinetics of wettability alteration.However, the quan- tity of recovered oil does not strictly correlate with the extent of local wettability alteration.An optimal rate of wettability alteration is crucial, as there is a risk of water bypassing oil through smaller capillaries, resulting in an early water breakthrough.

Figure 1 .
Figure 1.Magnified view of mesh configuration representing the roughness model (a), plus the physical dimensions of the homogeneous (b, c) and heterogeneous (d, e) geometries and their corresponding meshes.Sub-figures c and e also showcase the top and cross-sectional view planes, which will be employed to examine the simulation results in detail.

− 4 .Figure 2 .
Figure 2. Oil migration into the homogeneous pore-network: In each image set, the upper portion illustrates the top view of the geometry, while the lower portion provides a cross-sectional view of pores to allow for a detailed examination of the displacement.The labels "T1" to "T9" denote the chronological sequence of the porescale events.

Figure 3 .
Figure 3. Secondary LSWF into the 2.5D (quasi-3D) homogeneous pore-network.In each image, the upper portion illustrates the top view of the geometry, while the lower portion provides a cross-sectional view of the pores to allow for a detailed examination of the displacement.

Figure 5 .
Figure 5. Oil migration into the heterogeneous pore-network.The pore-filling events in this process can be observed through the sub-figures T1 to T9.

Figure 6 .Figure 7 .
Figure 6.Visualization of HSWF in the heterogeneous pore-network.In each illustration, the left side showcases the complete geometry, while the right side displays a cross-sectional view of the pore structure to emphasize the displacement phenomena at the pore-scale.

FigureFigure 9 .
Figure LSWF (S = 100) in the heterogeneous pore-network.On the left side of each image, the complete geometry is showcased, while the right side displays a cross-sectional view that enables a thorough analysis of pore-scale displacement phenomena.

Figure 10 .
Figure 10.Comparison of the RF curves of LSWF at different WA rates denoted by S

Table 1 .
Simulation scenarios performed in this study (simulations marked by a star (*) are presented in the Supplementary Material (SM-5)).
both homogeneous and heterogeneous models) are directly linked to corner flow, underscoring the importance of this phenomenon.