Abstract
This study explores the rheological insights into how divalent ions, specifically calcium (Ca2+) and magnesium (Mg2+), influence the stability and phase behavior of oil-in-water (O/W) emulsions. O/W emulsions are employed for different purposes in the petroleum industry, including drilling muds, viscosity-reducing agents, enhanced oil recovery (EOR), and transportation of crude oil. We investigated the effects of salinity concentration, time, and surfactant dosage on emulsion properties. Eighteen stable emulsions were prepared using CaCl2 and MgCl2 brines at 0.5% (group A) and 5.0% v/v (group B) concentrations of a commercial anionic surfactant, Hercoten, (from a carboxylate family). Our findings demonstrate that brine composition significantly affects emulsion phase inversion, rheological behavior, and viscosity; CaCl2 emulsions reached viscosities of up to 240 cP at 25,000 ppm (day 7), up to one order of magnitude higher than MgCl2 systems. Furthermore, we identified phase inversion in CaCl2 systems and evidence of multiple emulsions (O/W/O) in MgCl2 systems, both at 8000 ppm and 5.0% v/v surfactant. To complement the experimental analysis, we developed a custom Python-based tool, ROJA, for automated image analysis and statistical characterization of emulsion droplets. We suggest that intermolecular forces and increased friction due to electrostatic interactions between Ca2+ and the anionic surfactant led to higher viscosities and smaller, more concentrated droplets (as low as 54.27 μm at 25,000 ppm) at higher salinities. In contrast, Mg2+ emulsions showed lower viscosities due to larger droplets (up to 127.87 μm at 25,000 ppm), resulting in fewer droplet–droplet interactions. The presence and concentration of divalent ions are therefore critical for the performance of O/W emulsions in petroleum industry applications.


1. Introduction
Numerous mature oil fields encounter flow assurance challenges due to water production, often resulting in the formation of water-in-oil (W/O) emulsions that significantly impact the handling, conditioning, and processing of hydrocarbons. − Oil’s viscosity is pivotal in mature oil fields as it directly influences reservoir recovery and productivity. Although density and viscosity are not directly correlated, a decrease in °API usually corresponds to an increase in viscosity. Consequently, transporting heavy oils through porous media and pipelines demands additional energy, such as heat or diluents, to ensure acceptable flow rates.
The formation of oil-in-water (O/W) emulsions is one of the few viable methods for transporting heavy oils, with the potential to reduce viscosity to 50-200 cP. Additionally, emulsion technology offers an avenue to enhance residual oil recovery from mature fields that may not be efficiently recovered through traditional methods involving heat or diluents. Emulsions suitable for pipeline transport, containing up to 75% crude, have demonstrated a viscosity reduction of near to two orders of magnitude. This economic and operational preference aims to maximize oil transportation while minimizing the water content. ,−
The O/W emulsions find diverse applications in the petroleum industry, including use in drilling muds, viscosity-reducing agents, and enhanced oil recovery (EOR) additives; for example, their injection into reservoirs to enhance mobility control of heavy oils, improve conformance, and increase the recovery factor of mature fields. Blocking more permeable zones with emulsion drops can improve reservoir sweep, resulting in substantial additional recoveries compared to conventional water flooding. , O/W emulsion flooding may be more effective than some chemical EOR techniques, such as polymer flooding.
The stability of emulsions hinges on various factors, including the viscosity of the continuous phase, the volume fraction of components, droplet size, interfacial tension, and the density of the different components. External factors such as inorganic species, temperature, droplet-size distribution, brine pH, and composition also influence emulsion stability. For instance, many studies have reported that salinity strongly influences emulsions’ stability. ,− Moradi et al. 2011 concluded that low ionic strength favors the stability of water/oil emulsions, and Wang et al. 2012, presented results consistent with these findings. In contrast, Perles et al. 2012 observed that the presence of salts increases the stability of water/oil emulsions up to a critical value. Castro Nóbrega et al. 2022, reported that higher salt concentrations result in larger droplets for O/W emulsions, whereas for W/O emulsions, smaller droplets are formed, leading to more stable emulsions, consistent with the findings of Mohamed Reyani et al. 2023. Additionally, higher salt concentrations in the water phase can enhance the stability of O/W emulsions, potentially due to ion barriers between oil droplets and the continuous water phase. ,
The effect of divalent ions has been studied for more complex systems, such as that reported by Mansouri et al. 2025, whose study introduces a targeted chemical method that leverages the synergistic interplay between specific brine ions, calcite particles, asphaltene molecules, and cationic surfactants. High concentrations of magnesium or calcium ions promote the formation of rigid asphaltene complexes, which stabilize emulsions and hinder oil mobilization, while divalent ions also enhance the accumulation of the cationic surfactant at the oil-water interface, increasing the electrostatic repulsion between droplets. This complex interplay underscores the critical role of the ionic composition in determining emulsion stability and effective oil recovery strategies.
Related to this, it has been reported that increasing the salinity up to 8,000 ppm reduces the average droplet size, promoting better dispersion of the aqueous phase and enhancing emulsion stability; however, beyond this threshold, the droplet size increases and the emulsion become less stable. This trend can be explained by the Gibbs adsorption isotherm: as salt concentration increases, the oil’s capacity to adsorb salt at the oil–water interface is eventually exceeded, causing salt to accumulate preferentially in the bulk aqueous phase rather than at the interface. As a result, the excess interfacial area becomes negative, leading to decreased emulsion stability. Nonetheless, chemical reactions between salt ions and surfactants can affect emulsion stability, as excess ions may lead to surfactant precipitation and hinder performance. ,
Recent reports demonstrate that divalent ions, particularly calcium (Ca2+) and magnesium (Mg2+), play a crucial role in surfactant performance, emulsion formation, and stability. ,,,− For instance, the phase behavior of anionic surfactant systems is more sensitive to changes in Ca2+ and Mg2+ concentrations than in Na+ (monovalent cations), a phenomenon that becomes more pronounced at lower surfactant/TDS (total dissolved solids) concentrations. Anionic surfactants with modified structures, designed to withstand high temperatures and salinity, have demonstrated greater resistance to these ions.
Although many laboratory studies have examined the conditions and components described above to understand the emulsion formation and stability, most of this work has focus on W/O emulsions, which represent one of the significant challenges in the petroleum industry during recovery, treatment, and transportation of crude oil, reducing oil quality, affecting flow behavior, and ultimately leading to flow assurance problems. Some studies suggest that Ca2+ and Mg2+ ions interact significantly with the emulsifiers used in drilling fluids, altering their functional properties and stabilizing W/O emulsions. ,, Castro Nóbrega et al. 2022, suggested that divalent ions can interact at the droplet interface as counterions, due to the droplets’ positive electrical charge, altering the physical properties of the interfacial film and thereby increasing the solubility of the oil phase. Similarly, Hao et al. 2023, evaluated the effect of pH and cations on the formation and stability of crude oil emulsions, focusing on the formation process, droplet size, and the stability mechanisms under different conditions; their results showed that the emulsification potential of cations followed the order: CaCl2 > MgCl2 > NaCl, and the authors suggested that divalent ions form chemical bonds between emulsion droplets. Kazemzadeh et al. 2019 studied W/O emulsification of crude oil at various pressures and salinities, showing that the type and concentration of cations present in the aqueous phase govern the emulsion stability: at lower salinities, W/O emulsion stability increases, decreasing as salt concentration rises, and divalent cations form more stable emulsions than monovalent ions at high pressures.
Despite this growing body of work on W/O systems, there is still a lack of understanding of the stability mechanisms governing O/W emulsions under different conditions. The present work aims to evaluate the effects of Ca2+ and Mg2+ ions on the formation and stability of the O/W emulsions. Other parameters considered in this work include salinity, time, and surfactant concentration, since emulsification involves several concurrent processes (droplet breakup, surfactant adsorption, and droplet collisions) that occur repeatedly, over very short time scales. Understanding the complex interplay of factors that influence emulsion stability is critical for the successful application of emulsions across various petroleum industry processes.
It is important to note that, given the complexity of working with live crude oil and reservoir fluids under controlled laboratory conditions, this study relies on a model oil system rather than real crude oil, which constitutes a limitation when extrapolating these findings directly to field-scale operations. Nevertheless, the relevance of the model system employed here to actual field conditions is supported by several considerations. First, synthetic, mineral, and vegetable oils have been widely used as proxies for crude oil in fundamental emulsion studies, allowing controlled and reproducible evaluation of interfacial phenomena without the compositional variability inherent to crude oil. − Second, the surfactant concentrations and brine compositions tested in this work (0–25,000 ppm) fall within the range of conditions encountered in EOR operations and produced water handling. Third, the ionic interactions between anionic surfactants and divalent ions (Ca2+, Mg2+) identified in this study are consistent with those reported in more complex, crude-oil-based systems. ,,,,,, Taken together, these considerations indicate that, while direct validation with reservoir fluids remains necessary, the model system used here provides mechanistic insights into the role of divalent ions in O/W emulsion stability that are expected to be transferable to real crude oil systems.
2. Materials and Methods
2.1. Materials
All reagents were obtained from Sigma-Aldrich and used without further purification. The NaCl, CaCl2 and MgCl2 brines (0, 1000, 8000, 15000, and 25000 ppm) were prepared using distilled water and the corresponding salt; NaCl (0.000, 0.017, 0.137, 0.257, and 0.428 M), MgCl2·6H2O (0.000, 0.005, 0.039, 0.074, and 0.123 M), or CaCl2·2H2O (0.000, 0.007, 0.054, 0.102, and 0.170 M), all salts were reagent grade (purity ≥ 99%). Also, we used distilled water (0 ppm salinity) to prepare emulsions as a control experiment. Brines were employed to prepare three groups (10 each) of 70/30 ratio emulsions, by mixing 70 mL of oil (ρ = 0.918 g/mL, μ = 72.7 cP; composed mainly of triglycerides rich in oleic acid, (C57H104O6)) and 30 mL of brine.
The commercial anionic surfactant used in this study, referred to as H, is Hercoten (ρ = 0.923 g/mL, pH = 13.5, CMC = 0.43%), supplied by Cosmopolita. The surfactant belongs to the carboxylate family of anionic surfactants. The infrared and 1H/13C NMR spectra are shown in Figures S11–S13. 0.5% v/v of H was added to the first group (A) of emulsions and 5.0% v/v to the second group (B).
2.2. Preparation of Emulsions
This section details the procedure for 70/30 ratio systems with Na+, Ca2+, and Mg2+ brines. It is worth noting that we studied 50/50 and 30/70 oil-brine ratios; however, the 70/30 ratio led to the most stable emulsions overall. Emulsions were prepared by vigorously mixing 30 mL of brine plus surfactant H (0.5% −A– or 5.0% v/v −B−) and 70 mL of oil using the IKA RW20 Digital homogenizer at a rate of 700 r/min for 15 min at room temperature (298 K). The emulsions were allowed to equilibrate on the bench and kept under their initial preparation conditions at ambient temperature (298 K), and the glass bottle was sealed. We studied the properties of the resulting systems from day 0 to day 7. [Day 0 corresponds to the day the emulsion was prepared.]
2.3. Stability of Emulsions
The stability of the emulsions was measured qualitatively by observing phase separation over 20 days. All Mg2+ emulsions from group A were stable, but phase separation started 200 min after preparation (day 0), therefore, we characterized these emulsions immediately after formulation. The Ca2+ emulsions from the same group (A) showed more stability, since the homogeneous liquid phase remains up to day 9 (see Figures and S3). Since NaCl systems (group A) were unstable, we only characterized the 1,000 ppm emulsion (5.0% v/v at H dosage), which resulted in a shear-thinning O/W system at day 0. No further characterization was possible; thus, we did not discuss the data using this ion.
1.

Emulsions formed with 0.5% v/v of H (A) and 5.0% v/v (B) on day 0, after characterization (∼250 min).
Group B emulsions were more stable than group A. For instance, the Mg2+ systems remain steady over time (day 20), especially at lower salinities (0, 1,000 and 8,000 ppm). The Ca2+ emulsions from this group (B) were the most stable systems, overall. For consistency, we characterized the emulsions up to day 7, although some of the low salinity systems remained unchanged for more than 20 days (see Figures S3 and S4).
2.4. Surface Tension
The surface tension was measured using a SITA tensiometer DynoTester+, based on the bubble pressure method for measuring the dynamic surface tension. The bubble pressure method is based on passing an air stream is led through a capillary into the process liquid. A sensor measures the pressure needed to generate a bubble. According to the Young–Laplace equation, the pressure difference, ΔP = ΔPmax – ΔPmin, observed during the bubble’s lifetime, is proportional to the surface tension (mN/m), σ. We used a beaker to measure the surface tension of the brine solutions containing surfactant H (0.5% and 5.0%) and set the lifetime at 50 ms.
2.5. Characterization of Emulsions
2.5.1. Emulsion Type
Immediately after preparing the emulsion, we used the drop test, a qualitative method to infer the type of system formed. Thus, in a 5 mL vial with distilled water, one drop of emulsion was added; if the drop dispersed into the water, then the system was inferred to be an oil-in-water (O/W) emulsion. In the opposite case, if the drop remained suspended in water, the resulting system was inferred to be a water-in-oil (W/O) emulsion. Emulsion stability against creaming and coalescence was determined by monitoring the position of the oil, water, and emulsion interfaces over time (bottle test).
2.5.2. Optical Microscopy and Image Analysis
An OMAX A3550U microscope was used to capture images of the emulsion drops, using a syringe to place a drop on a slide covered with a coverslip. Micrographs were taken at magnifications of 10x and with the Toup View microscope software. Samples for microscopic analysis systematically were collected from near the top of the glass bottle with a pipet and placed on a glass slide. The emulsion droplet size distribution was analyzed over time using micrographs and an image processing program, that we developed (ROJA). Although open-source software such as ImageJ is widely used for droplet analysis, it presents limitations under noisy imaging conditions. It frequently misidentifies gaps or suspended particles as droplets, requiring manual correction and pre-processing steps. To address these issues, ROJA integrates specialized libraries and filters for the accurate segmentation and characterization of droplets in complex emulsions. This tool enables automated extraction of key metrics, including droplet area and radius, along with descriptive statistics (mean, median, mode, and standard deviation), outputted in Excel-compatible format (see Table S7). Compared with ImageJ, ROJA generates cleaner and more accurate binary masks, effectively discriminating droplets from background noise and particulate impurities. Additionally, the software produces spatial droplet distribution heatmaps (Figure S7), facilitating visual interpretation of the size heterogeneity across the emulsion.
2.6. Viscosity and Rheological Behavior
A Brookfield DvNext viscometer was used to measure the viscosity (μ) [cP] and the shear rate (γ̇) [1/s] from 30 to 250 revolutions per minute (rpm) for 20 seconds at each shear rate. The following equation was used to determine the shear stress (τ) [mPa].
The rheological behavior was obtained by applying Oswald’s law (power-law) τ = K(γ̇) n , where τ is in Pa, K consistency index (apparent viscosity) is in [Pa·s], (γ̇) is in [1/s], and n is the fluency index; if n = 1 the fluid is Newtonian; if n < 1, the fluid is shear-thinning, and if n > 1, the fluid is shear-thickening.
3. Results and Discussion
As expected, surface tension decreased with increasing the surfactant concentration, favoring emulsion formation and stability (Figures S1 and S2). Surface tension for brines using 0.5% v/v concentration of H increased with salinity, ranging from 52.2 mN/m (0 ppm) to 71.9 mN/m (25 000 ppm). When the surfactant concentration was increased to 5.0% v/v, the surface tension ranged from 41 mN/m (1000 ppm) to 63 mN/m (25,000 ppm). We used distilled water as the control brine, with a surface tension of 72.1 mN/m.
Figure shows the Ca2+ and Mg2+ emulsions prepared with 0.5% v/v (A) and 5.0% v/v (B) of H on day 0, using a 70/30 oil–brine ratio. See Figure S3 for day 20. Figures and show the effect of salinity at a constant shear rate of 4.17 s–1. Tables and exhibit the type of emulsion, fluency index “n”, and the rheological behavior for groups A and B, on day 0, respectively. Shear stress (Pa) was determined using the power law and the shear rate (s–1) for MgCl2 and CaCl2 emulsions over time, within a range from 0.5 to 4.17 s–1.
2.

Viscosity vs salinity for emulsions prepared with CaCl2 (green) and MgCl2 (blue) for A. The dotted line represents the viscosity of the oil employed to prepare the emulsions. Lighter colors correspond to day 0 results. Darker colors correspond to day 7 results.
3.

Viscosity vs salinity for emulsions prepared with CaCl2 (green) and MgCl2 (blue) for B. The dotted line represents the viscosity of the oil employed to prepare the emulsions. Lighter colors correspond to day 0 results. Darker colors correspond day 7 results.
1. Type of Emulsion, Fluency Index “n”, and Rheological Behavior with Salinity for Group A (CaCl2 and MgCl2 at 0.5% v/v of Surfactant) on Day 0 .
| CaCl2 0.5% D0 |
MgCl2 0.5% D0 |
|||||
|---|---|---|---|---|---|---|
| salinity ppm | emulsion type | rheological behavior | n | emulsion type | rheological behavior | n |
| 0 | O/W | shear-thinning | 0.566 | O/W | shear-thinning | 0.566 |
| 1,000 | O/W | shear-thickening | 1.057 | O/W | shear-thickening | 1.043 |
| 8,000 | O/W | shear-thickening | 1.035 | O/W | shear-thinning | 0.918 |
| 15,000 | O/W | shear-thickening | 1.035 | O/W | shear-thinning | 0.896 |
| 25,000 | W/O | shear-thinning | 0.982 | W/O | shear-thinning | 0.942 |
See Table S1 in the supporting information for day 7 results.
2. Type of Emulsion, Fluency Index “n”, and Rheological Behavior with Salinity for Group B (CaCl2 and MgCl2 at 5.0% v/v of Surfactant) on Day 0 .
| CaCl2 5.0% D0 |
MgCl2 5.0% D0 |
|||||
|---|---|---|---|---|---|---|
| salinity ppm | emulsion type | rheological behavior | n | emulsion type | rheological behavior | n |
| 0 | O/W | shear-thinning | 0.738 | O/W | shear-thinning | 0.738 |
| 1,000 | O/W | shear-thinning | 0.653 | O/W | shear-thinning | 0.652 |
| 8,000 | W/O | shear-thinning | 0.854 | O/W | shear-thinning | 0.667 |
| 15,000 | W/O | shear-thinning | 0.797 | W/O | shear-thinning | 0.747 |
| 25,000 | W/O | shear-thinning | 0.819 | W/O | shear-thinning | 0.756 |
See Table S2 in the supporting information for day 7 results.
For CaCl 2 systems in group A, most of the emulsions were O/W and exhibited shear-thickening behavior. On day 7, we observed that the rheological behavior of 1,000 ppm emulsion changed from shear-thickening (day 0) to shear-thinning (day 7), see Tables and S1, respectively. Increasing surfactant concentration to 5.0% v/v (B) resulted mainly in W/O emulsions for 8,000 to 25,000 ppm. The rheological behavior of all of the emulsions was shear thinning. (see Tables and S2).
Most of the MgCl2 systems in group A resulted in an O/W and exhibited a shear-thinning behavior at day 0 (Table ). Nevertheless, we identified (in the micrographs) that on day 0, the 8,000 ppm emulsion was a multiple system (O/W/O) at high surfactant concentrations (B), suggesting that a phase inversion occurs at this salinity, explaining the change in emulsion type at higher ionic strength. As mentioned before, Mg2+ systems were less stable than the Ca2+ systems (section ). For group A, the emulsions were regenerated on day 7 by mixing the phases at 700 r/min for 15 min at room temperature. Although emulsions were less stable, and phase separation was observed 15 min after re-emulsification, the emulsion type and rheological behavior remained similar to day 0 for all salinities; however, at 1,000 ppm, the rheological behavior changed from shear-thickening to shear-thinning, see Table S1.
In general, for both groups (A and B), the higher the salinity, the greater the viscosity. At 0.5% v/v (A) surfactant concentration viscosity was lower than 200 cP for all the emulsions. Only at 0 ppm the viscosity was lower (47.28 cP) than the oil phase (72.7 cP), which suggests that the ionic strength reduce the distance among droplets, resulting in greater interactions between the anionic surfactant and the divalent ions (Ca2+ and Mg2+). For group B (5.0% v/v), the CaCl2 emulsions were more viscous than MgCl2 by up to one order of magnitude (8,000 ppm). The viscosity trend endures over time; however, the viscosity increased for CaCl2, from day 0 to day 7 (188.2 and 240.0 cP at 25,000 ppm, respectively). MgCl2 systems did not show an increase in viscosity over time. See Figures and . Nevertheless, the surfactant’s interaction with Ca2+ and Mg2+ differs in each case. For example, higher viscosity for the systems with CaCl2, in group B, could be attributed by significant interactions between Ca2+ ions and the emulsion droplets, resulting in an increase in friction, which is consistent with the findings reported previously, see Figure . A possible explanation is that Ca2+ ions interact simultaneously with two negatively charged droplet surfaces stabilized by the surfactant, specifically, with the carboxylate headgroups of the anionic surfactant at the oil-water interface, altering interfacial film rigidity. This electrostatic bridging promotes droplet aggregation (flocculation) without immediate coalescence, leading to the formation of a network-like structure that increases the apparent viscosity of the emulsion. Also, a more rigid interfacial film resists droplet deformation under shear, contributing to higher viscosity. Over time, these ionic interactions lead to progressive microstructural reorganization, such as compaction or partial coalescence, which is consistent with the observed viscosity increase. ,
Yuan et al. 2023 investigated the effects of calcium and magnesium ions on the stability of an anionic surfactant-emulsified asphalt. Their results showed that the addition of Ca2+ or Mg2+ to a salt-containing system induces aggregation between the head groups of the surfactant molecules, reducing the mobility of the water molecules surrounding the headgroup, which diminishes the thickness of the surfactant headgroup distribution along the Z-axis, weakening the stability of the anionic surfactant-emulsified asphalt. The authors concluded that the addition of Mg2+ reduces the stability of the emulsion, since Mg2+-emulsifier headgroup molecules bind to water molecules, making dissociation more difficult. Another example of this effect was reported by Mansouri et al. 2025, they evaluated a cationic surfactant, and compared emulsions prepared with magnesium and calcium brines. They found that calcium-enriched seawater stabilizes the emulsion film, whereas magnesium-enriched seawater reduces stability.
In the case of magnesium systems (see Figure ), the viscosity of emulsions did not change significantly for B either, which suggests that this divalent ion interact less with charged droplet surfaces (carboxylate headgroups). The ionic radius of Mg2+ (72 pm) is smaller than that of Ca2+ (100 pm), resulting in a higher surface charge density; therefore, it is a better charge acceptor so it would be expected to bind more tightly to carboxylate groups; however, this causes it to hold onto its hydration shell of water molecules with great force. Ca2+ requires much less energy to shed its hydration layer and interact directly with the carboxylate group, resulting in low droplet concentration or droplet–droplet interactions, and a minimal change in viscosity.
The droplet radii for groups A and B ranged from 0.1 to 100 μm. CaCl2 and MgCl2 emulsions in group A, exhibited smaller droplet radii at lower salinities (0 to 8,000 ppm), and slightly increased with salinity (Figure ); the trend remains over time. Previous reports , showed that lower ionic strength conditions lead to more stable emulsions, due to smaller droplets, while high salinity reveals large droplets, resulting in less stability for emulsions, which is consistent with our findings.
4.

Mean radius vs salinity for 0.5% v/v surfactant concentration (A) over time. The droplets’ size of MgCl2 emulsions increased, on day 0, at higher salinity (25,000 ppm) compared to CaCl2 emulsions.
The MgCl2 emulsions’ radii decreased over time for the re-emulsified system (group A), the higher the salinity, the greater difference in the emulsion radii. For example, the droplet size at 1,000 ppm was 17.89 μm on day 0 and day 7; however, at 25,000 ppm the droplet size was 96.22 μm on day 0 and 39.03 μm on day 7 (Figures and S5). In addition, the mechanical stirring applied to regenerate the MgCl2 emulsion may have resulted in droplet redispersion and reorientation of the surfactant H leading to smaller droplets. Note that these systems were less stable and phase separation was observed 15 min after re-emulsification. In this case, less surfactant concentration (0.5% v/v) results in fewer surfactant molecules adsorbed at the oil/water interface (that provides a barrier to the coalescence of the dispersed phase); which over time resulted in less stable emulsions. Thus, droplet size measurement took place immediately after redispersion.
Group B emulsions presented slightly smaller droplets (see Figures and S6) than group A systems, which could be attributed to the reduction in interfacial tension caused by higher surfactant concentration, resulting in the formation of smaller droplets. Thus, the number of droplets contacting the continuous phase increases, which ultimately increases the emulsion viscosity. , We note that, for 5.0% v/v of H, salinity plays a significant role in droplet size; for example, at 8,000 ppm droplet size reached the lowest value for all the emulsions in group B, coinciding with the inversion of CaCl2 emulsions, and the multiple system (O/W/O) observed for the MgCl2 (Table and Figure ), yet as salinity increased, droplet size of Ca2+ and Mg2+ emulsions increased. This trend remains over time; however, for CaCl2 at 25,000 ppm, the radius decreased at day 7 (39.78 μm); see Figure . Although emulsion aging is generally expected to result in an increase in droplet size due to coalescence (or Ostwald ripening), a decrease in the average droplet diameter measured by optical microscopy is likely attributable to the sampling protocol rather than to an actual reduction in droplet size. The 25,000 ppm of CaCl2 emulsion is a W/O system, in which the dispersed phase (Ca2+ brine) has a higher density than oil. Consequently, during aging, the larger water droplets tend to sediment more rapidly toward the bottom of the vial. Since samples for microscopic analysis were collected from near the top of the glass bottle, the observed decrease in average droplet diameter most likely reflects a sampling bias associated with the sampling location and gravitational separation of the emulsion, rather than a true decrease in droplet size.
5.

Mean radius vs salinity for 5% v/v surfactant concentration over time. The droplets’ size of MgCl2 emulsions increased considerably over time (day 7) compared to CaCl2 emulsions.
At 25,000 ppm, the interplay between droplet size, viscosity, and stability becomes most evident when comparing the two divalent cations. CaCl2 emulsions (group B) retained relatively small droplet radii (∼39.78 μm, at day 7) together with the highest viscosity values recorded across all systems, consistent with strong electrostatic bridging between Ca2+ and the carboxylate headgroups, which promotes droplet flocculation, a rigid interfacial film, and restricted droplet mobility under shear. In contrast, MgCl2 emulsions (B) at 25,000 ppm exhibited substantially larger droplet radii (127.87 μm, at day 7) and lower viscosity, reflecting weaker ion-headgroup interactions due to the strongly hydrated nature of Mg2+, which limits electrostatic bridging and interfacial film rigidity. As a result, MgCl2 droplets coalesce more readily over time, producing larger, more polydisperse droplets and a mechanically weaker emulsion. These results indicate that at high salinity, droplet size and viscosity are not independent outcomes of ionic strength alone but are jointly governed by the specific ion-surfactant interaction: stronger electrostatic bridging (Ca2+) sustains smaller droplets, higher viscosity, and greater stability, whereas weaker bridging (Mg2+) results in larger droplets, lower viscosity, and reduced stability. This contrast reinforces that ionic specificity, rather than salinity per se, is the dominant factor controlling emulsion stability at the highest salinities tested.
In the case of MgCl2 emulsions (W/O) at 15,000 and 25,000 ppm, the droplet radii increased with salinity, going from 34.04 μm (0 ppm) to 127.87 μm (25,000 ppm) at day 7 (Figure ). Because Mg2+ systems were consistently less stable than the Ca2+ systems, coalescence occurs faster, leading to larger water droplets and lower viscosity (Figures and S3).
Figures S5 and S6 show histograms generated using ROJA (our Python-based image processing tool, see Supporting Information). Statistical droplet size data are provided in Table S7; the distribution asymmetry is attributed to the stability of the systems, which in general decreases with increasing salinity, resulting in higher droplet size and polydispersity that increase hydrodynamic interactions, leading to non-Newtonian behavior. Overall, MgCl2 systems exhibited lower viscosity than CaCl2 systems (and higher polydispersity), see Figures and S6. This difference was greater at higher salinities for group B. This trend likely results from a combined effect of ion-specific interactions with the surfactant headgroups and the consequent interfacial hydration/structuring, which alter emulsion stability and the ability of droplets to rearrange under shear. Consequently, the dominant mechanisms controlling viscosity may vary with the interfacial structure and the emulsion response to applied shear rather than being explained by a single route.
In Figure we show the relationship between measured shear stress and droplet size for CaCl2 and MgCl2 emulsion (group A, day 0). For MgCl2, higher measured shear stress is associated with larger mean droplet size, whereas for CaCl2, no clear trend was observed. Notably, shear stress is a response variable rather than an independently controlled processing parameter; which depends on the emulsion’s rheology and microstructure. Therefore, the observed correlation does not allow us to unambiguously discriminate whether larger droplets arise due to shear-induced coalescence or whether changes in droplet size/microstructure modify the rheological response and, thus, the measured shear stress. Nevertheless, we observed that magnesium-containing emulsions exhibited lower viscosity than calcium emulsions, while also showing larger mean droplet sizes. Therefore, these findings suggest that ionic composition alters both the rheological response and the emulsion stability, leading to coupled rheology/microstructure behavior. Overall, the data indicate that ionic composition impacts emulsion stability and the coupled rheology/microstructure response through multiple, nonexclusive pathways.
6.

Mean radius and droplet size at different salinities for 0.5% v/v surfactant concentration, under a constant shear rate of 4.17 s–1. The droplet size of MgCl2 emulsions increased as the shear stress increased.
8. Conclusions
This study investigated the effects of divalent ions, calcium (Ca2+) and magnesium (Mg2+), on the emulsification performance over time, using an anionic surfactant H at two concentrations (0.5% and 5.0% v/v). The surfactant H formed stable macroemulsions in the presence of divalent ions but produced unstable emulsions with sodium ions (Na+), confirming that ionic valence plays a decisive role in emulsion stability.
At low surfactant concentration (0.5% v/v), droplet size in MgCl2 emulsions increased with salinity (from 17.89 μm at 1,000 ppm to 96.22 μm at 25,000 ppm on day 0), resulting in less stable systems compared to CaCl2 emulsions. Viscosity in CaCl2 increased with time and salinity, reaching up to 240.00 cP at 25,000 ppm (day 7, 5.0% v/v), representing up to one order of magnitude higher viscosity than equivalent MgCl2 systems. In contrast, MgCl2 emulsions did not show a significant increase in viscosity over time, which is consistent with the larger droplet sizes and lower droplet–droplet interaction observed for this system.
At higher surfactant concentration (5.0% v/v), both CaCl2 and MgCl2 emulsions showed phase inversion phenomena; at 8,000 ppm CaCl2 inverted to W/O systems, while MgCl2 emulsions formed multiple (O/W/O) systems coinciding with the minimum droplet size observed across all the emulsions in group B.
Overall, CaCl2 emulsions exhibited higher viscosities than MgCl2 systems across all of the conditions tested, particularly at high salinity and shear rate (4.17 s–1). This behavior is likely due to stronger electrostatic interactions between Ca2+ and the carboxylate headgroups of the anionic surfactant, promoting droplet flocculation, rigid interfacial films, and an increased apparent viscosity. In comparison, Mg2+ ions retain a stronger hydration shell, limiting their interaction with the surfactant headgroups and resulting in larger droplets, weaker droplet–droplet interactions, and a lower viscosity.
Emulsion studies often produce large datasets that require specialized tools for efficient processing and interpretation. To address this need, we developed ROJA, a flexible tool that integrates advanced image-processing algorithms and customizable filtering techniques to ensure accurate, reproducible droplet analysis.
Supplementary Material
Acknowledgments
J.M.S. and A.P.G.F. acknowledge funding from PAPIIT IA102919 and PAPIIT IN109524. Also, we acknowledge the support of Bernardo from the Zenit group, Erick J. Gordillo and Adrián Peralta from the LIRFFF group, during the development of this work. We acknowledge Y. A. Amador-Sánchez for measurement and interpretation of NMR experiments
The Supporting Information is available free of charge at https://pubs.acs.org/doi/10.1021/acsomega.6c01366.
Series of supplementary figures and tables providing detailed experimental data on the physical properties of various oil–water emulsions, including surface tension, droplet size distribution, shear stress, and rheological behavior (fluency index) under varying conditions of salinity, with CaCl2 and MgCl2 brines, surfactant concentration, and time. Furthermore, the document introduces and describes ROJA, a custom Python-based image processing program developed to accurately segment, measure, and statistically analyze emulsion droplets, overcoming the limitations of standard software like ImageJ in noisy imaging environments. The surfactant characterization is also included (PDF)
Janett Montaño-Salazar: Research, writing – original draft, and editing; Paulina Gómora-Figueroa: Conceptualization, Project administration, supervision, writing–review and editing, funding acquisition; Roberto Zenit: Supervision and writing–review; Rosa María Mariscal-Romero: Python tool development and validation and writing – original draft.
The authors declare no competing financial interest.
Declaration of AI tool technologies used in the manuscript preparation process. The authors used Claude Sonnet 5 to revise grammar, language, and the manuscript’s proofreading, and to highlight important aspects, maintain original ideas, and focus on the study’s key findings, while organizing them in a more structured and cohesive manner. After using this tool, the authors reviewed and edited the content as needed and take full responsibility for the content of the manuscript.
References
- Oliveira, M. ; Teixeira, A. ; Vieira, L. ; Da Fonseca, R., Jr. . Flow assurance challenges for long subsea pipelines. In Rio Oil Gas Expo and Conference, 2014; pp 1–11 10.13140/2.1.4090.1445 [DOI] [Google Scholar]
- Maaref S., Ayatollahi S.. The effect of brine salinity on water-in-oil emulsion stability through droplet size distribution analysis: A case study. Dispersion Science and Technology. 2018;39:721–733. doi: 10.1080/01932691.2017.1386569. [DOI] [Google Scholar]
- Zhou H., Luo Q., Gong Q. T., Liu Z. Y., Liu M., Zhang L., Zhang Lu, Zhao S.. Interfacial dilational properties of di-substituted alkyl benzene sulfonates at kerosene/water and crude oil/water interfaces. Colloids Surfaces A: Physicochemical Engineering Aspects. 2017;520:561–569. doi: 10.1016/j.colsurfa.2017.02.011. [DOI] [Google Scholar]
- Santos R. G., Loh W., Bannwart A. C., Trevisan O. V.. An overview of heavy oil properties and its recovery and transportation methods. Brazilian Journal of Chemical Engineering. 2014;31:571–590. doi: 10.1590/0104-6632.20140313s00001853. [DOI] [Google Scholar]
- Kokal S. L.. Chapter 12 Crude Oil Emulsions. Petroleum Engineering handbook. 2006:533–569. doi: 10.2118/9781555631086-ch12. [DOI] [Google Scholar]
- Kumar S., Mahto V.. Emulsification of Indian heavy crude oil using a novel surfactant for pipeline transportation. Petroleum Science. 2017;14:372–382. doi: 10.1007/s12182-017-0153-6. [DOI] [Google Scholar]
- Plegue T. H., Frank S. G., Fruman D. H., Zakln J. L.. Studies of Water-Continuous Emulsions of Heavy Crude Oils Prepared by Alkali Treatment. Society of Petroleum Engineers (SPE) Production Engineering. 1989;4:181–183. doi: 10.2118/18516-PA. [DOI] [Google Scholar]
- Nielloud F., Marti-Mestres G., Salager J.-L.. Emulsion Properties and Related Know-how to Attain Them. Pharmaceutical Emulsions and Suspensions. 2000;2:73–125. doi: 10.1201/b14005-4. [DOI] [Google Scholar]
- Salager J.-L.. The fundamental basis for the action of a chemical dehydrant. Influence of the physical and chemical formulation on the stability of an emulsion. International Chemical Engineering. 1990;30:103–116. [Google Scholar]
- Salager J. L., Forgiarini A. M.. Emulsion stabilization, breaking, and inversion depends upon formulation: Advantage or inconvenience in flow assurance. Energy and Fuels. 2012;26:4027–4033. doi: 10.1021/ef3001604. [DOI] [Google Scholar]
- Mandal A., Samanta A., Bera A., Ojha K.. Characterization of oil-water emulsion and its use in enhanced oil recovery. Industrial & Engineering Chemistry Research. 2010;49:12756–12761. doi: 10.1021/ie101589x. [DOI] [Google Scholar]
- Romero M. I., Carvalho M. S., Alvarado V.. Experiments and network model of flow of oil-water emulsion in porous media. Phys. Rev. E. 2011;84:046305. doi: 10.1103/PhysRevE.84.046305. [DOI] [PubMed] [Google Scholar]
- Daripa P., Glimm J., Lindquist B., McBryan O.. Polymer floods: A case study of nonlinear wave analysis and of instability control in tertiary oil recovery. Society for Industrial and Applied Mathematics (SIAM) Journal on Applied Mathematics. 1988;48:353–373. doi: 10.1137/0148018. [DOI] [Google Scholar]
- Destribats M., Rouvet M., Gehin-Delval C., Schmitt C., Binks B. P.. Emulsions stabilised by whey protein microgel particles: Towards food-grade Pickering emulsions. Soft Matter. 2014;10:6941–6954. doi: 10.1039/C4SM00179F. [DOI] [PubMed] [Google Scholar]
- Pietrangeli, G. ; Quintero, L. ; Jones, T. ; Darugar, Q. ; Hughes, B. . Treatment of Water in Heavy Crude Oil Emulsions with Innovative Microemulsion Fluids Emulsion Problems in Heavy Crude Oil. In Society of Petroleum Engineers (SPE) Heavy and Extra Heavy Oil Conference: Latin America, Medellín, Colombia, 2014; pp 1–15. 10.2118/171140-MS [DOI]
- Nour A. H., Rosli Mohd Y.. Stability Investigation of Water-in-Crude Oil Emulsion. Journal of Applied Sciences. 2006;6:2895–2900. doi: 10.3923/jas.2006.2895.2900. [DOI] [Google Scholar]
- Alves D. R., Carneiro J. S.A., Oliveira L. F., Façanha F. Jr, Santos A. F., Dariva C., Franceschi E., Fortuny M.. Influence of the salinity on the interfacial properties of a Brazilian crude oil-brine systems. Fuel. 2014;118:21–26. doi: 10.1016/j.fuel.2013.10.057. [DOI] [Google Scholar]
- Ling N. N. A., Haber A., Graham B. F., Aman Z. M., May E.F, Fridjonsson E.O., Johns M.L.. Quantifying the Effect of Salinity on Oilfield Water-in-Oil Emulsion Stability. Energy and Fuels. 2018;32:10042–10049. doi: 10.1021/acs.energyfuels.8b02143. [DOI] [Google Scholar]
- Reyani M., Sharifi Haddad A., Rafati R.. An experimental investigation on the impact of divalent ions on the emulsification of oil: Comparison of biodegradable (green) and petroleum-based surfactants. Geoenergy Science and Engineering. 2023;227:211869. doi: 10.1016/j.geoen.2023.211869. [DOI] [Google Scholar]
- Mansouri A. T., Mahdavi M. S., Dehaghani A. H. S.. Experimental investigation of divalent ions and CTAB effects on heavy oil emulsion stability in carbonate reservoirs. Scientific Report. 2025;15:43462. doi: 10.1038/s41598-025-27425-8. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Jiang J., Mei Z., Xu J., Sun D.. Effect of inorganic electrolytes on the formation and the stability of water-in-oil (W/O) emulsions. Colloids Surfaces A: Physicochemical Engineering Aspects. 2013;429:82–90. doi: 10.1016/j.colsurfa.2013.03.039. [DOI] [Google Scholar]
- Moradi M., Alvarado V., Huzurbazar S.. Effect of salinity on water-in-crude oil emulsion: Evaluation through drop-size distribution proxy. Energy and Fuels. 2011;25:260–268. doi: 10.1021/ef101236h. [DOI] [Google Scholar]
- Wang X., Alvarado V.. Effects of Aqueous-Phase Salinity on Water-in-Crude Oil Emulsion Stability. Journal of Dispersion Science and Technology. 2012;33:165–170. doi: 10.1080/01932691.2010.548689. [DOI] [Google Scholar]
- Perles C. E., Volpe P. L. O., Bombard A. J. F.. Study of the cation and salinity effect on electrocoalescence of water/crude oil emulsions. Energy and Fuels. 2012;26:6914–6924. doi: 10.1021/ef301433m. [DOI] [Google Scholar]
- Castro Nóbrega K., Viana Amorim L., Alves de Medeiros Nascimento R.C., Barbosa Morais de Melo K., Rodrigues Pontes da Costa W., Amorim Costa A.C.. Interactions between different type of brine and emulsifier: effects on stability of olefin emulsions. Petroleum Science Technology. 2022;40:1302–1317. doi: 10.1080/10916466.2021.2019766. [DOI] [Google Scholar]
- Lim J. S., Wong S. F., Law M. C., Samyudia Y., Dol S. S.. A Review on the Effects of Emulsions on Flow Behaviours and Common Factors Affecting the Stability of Emulsions. Journal of Applied Sciences. 2015;15:167–172. doi: 10.3923/jas.2015.167.172. [DOI] [Google Scholar]
- Ashrafizadeh S. N., Kamran M.. Emulsification of heavy crude oil in water for pipeline transportation. Journal of Petroleum Science and Engineering. 2010;71:205–211. doi: 10.1016/j.petrol.2010.02.005. [DOI] [Google Scholar]
- Shams S. M., Dehghan A. A., Kazemzadeh Y., Riazi M.. Experimental investigation of emulsion formation and stability: Comparison of low salinity water and smart water effect. Journal of Dispersion Science and Technology. 2024;45:1646–1655. doi: 10.1080/01932691.2023.2225612. [DOI] [Google Scholar]
- Obuebite A. A., Okwonna O. O., Ghonhinbor J. R.. Design of salinity tolerant in alkaline surfactant systems for high salinity reservoirs. Global Scholary Communication (GSC) Advanced Research and Reviews. 2023;14:193–208. doi: 10.30574/gscarr.2023.14.3.0076. [DOI] [Google Scholar]
- Hao X., Elakneswaran Y., Afrin S., Shimokawara M., Kato Y., Kitamura R., Hiroyoshi N.. Role of pH and cations on emulsion formation and stability of crude oils. Geoenergy Science and Engineering. 2023;227:211905. doi: 10.1016/j.geoen.2023.211905. [DOI] [Google Scholar]
- Kazemzadeh Y., Ismail I., Rezvani H., Sharifi M., Riazi M.. Experimental investigation of stability of water in oil emulsions at reservoir conditions: Effect of ion type, ion concentration, and system pressure. Fuel. 2019;243:15–27. doi: 10.1016/j.fuel.2019.01.071. [DOI] [Google Scholar]
- Lim M. Y., Stokes J. R.. Lubrication of non-ionic surfactant stabilised emulsions in soft contacts. Biotribology. 2021;28:100199. doi: 10.1016/j.biotri.2021.100199. [DOI] [Google Scholar]
- Puerto, M. C. ; Hirasaki, G.J. ; Miller, C.A. ; Reznik, C. ; Dubey, S. ; Barnes, J.R. ; vanKuijk, S. . Effects of Hardness and Cosurfactant on Phase Behavior of Alcohol-Free Alkyl Propoxylated Sulfate Systems. In Society of Petroleum Engineers (SPE) Improved Oil Recovery Symposium, Tulsa, Oklahoma, 2014; pp 1–23. 10.2118/169096-MS [DOI] [Google Scholar]
- Hocine, S. ; Pousset, B. ; Courtaud, T. ; Degré, G. . Long Term Thermal Stability of Chemical EOR Surfactants. In Society of Petroleum Engineers (SPE) Enhanced Oil Recovery (EOR) Conference at Oil and Gas, West Asia, Muscat, Oman, 2018; SPE-190361-MS, pp 1−14. 10.2118/190361-MS [DOI] [Google Scholar]
- Kolotova D. S., Kuchina Y. A., Petrova L. A., Voron’ko N. G., Derkach S. R.. Rheology of water-in-crude oil emulsions: Influence of concentration and temperature. Colloids and Interfaces. 2018;2:64. doi: 10.3390/colloids2040064. [DOI] [Google Scholar]
- Huang X., Sun J., Lv K., Liu J., Shen H.. An alternative method to enhance w/o emulsion stability using modified dimer acid and its application in oil-based drilling fluids. Royal Society Chemistry (RSC) Advances. 2018;8:26318–26324. doi: 10.1039/C8RA02293C. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Tadros T. F.. Emulsion Formation, Stability, and Rheology. Emulsion Formation and Stability. 2013:1–75. doi: 10.1002/9783527647941.ch1. [DOI] [Google Scholar]
- Zhou D., Karatayev K., Fan Y.. Water-in-Oil Emulsion Temporal and Spatial Evolution at Static Conditions and Its Impact on Pipeline Restart. Society of Petroleum Engineers (SPE) Journal. 2024;29:3635–3650. doi: 10.2118/219741-PA. [DOI] [Google Scholar]
- Altaş L., Büyükgüngör H.. From composition to performance: Evaluating the effect of emulsion liquid membrane components on lead removal from water. Journal of Environmental Management. 2026;406:129818. doi: 10.1016/j.jenvman.2026.129818. [DOI] [PubMed] [Google Scholar]
- Alanazi K. M., Mohan R. S., Kolla S. S., Shoham O.. Oil–Water Emulsion Behavior Under Variable Brine Salinity and pH Conditions. Journal of Fluids Engineering. 2026;148:031401. doi: 10.1115/1.4070251. [DOI] [Google Scholar]
- Ye M., Wang W., Lin H., Han S.. Optimization of lubrication performance in vegetable oil-based cutting fluids stabilized with SiO2-C16 via response surface methodology. Colloids Surfaces A: Physicochemical Engineering Aspects. 2026;740:140192. doi: 10.1016/j.colsurfa.2026.140192. [DOI] [Google Scholar]
- Oliveira M. C. S., Silva C. E. P., Ferreira E. S., Almeida J. M., Bernardes J. S.. Interfacial stabilization mechanism in one-step W/O/W multiple emulsions: The role of cellulose nanofibrils and oleic acid. Food Hydrocoll. 2026;178:112665. doi: 10.1016/j.foodhyd.2026.112665. [DOI] [Google Scholar]
- Gong B., Mao S., Li X., Chen B.. Mineral oil emulsion species and concentration prediction using multi-output neural network based on fluorescence spectra in the solar-blind UV band. Analytical Methods. 2024;16:1836–1845. doi: 10.1039/D3AY01820B. [DOI] [PubMed] [Google Scholar]
- Webb E. B., Koh C. A., Liberatore M. W.. High pressure rheology of hydrate slurries formed from water-in-mineral oil emulsions. Industrial & Engineering Chemistry Research. 2014;53:6998–7007. doi: 10.1021/ie5008954. [DOI] [Google Scholar]
- Balavi A., Ayatollahi S., Mahani H.. The Simultaneous Effect of Brine Salinity and Dispersed Carbonate Particles on Asphaltene and Emulsion Stability. Energy Fuels. 2023;37:5827–5840. doi: 10.1021/acs.energyfuels.3c00293. [DOI] [Google Scholar]
- Rayhani M., Simjoo M., Chahardowli M.. Effect of water chemistry on the stability of water-in-crude oil emulsion: Role of aqueous ions and underlying mechanisms. Journal of Petroleum Science and Engineering. 2022;211:110123. doi: 10.1016/j.petrol.2022.110123. [DOI] [Google Scholar]
- Macosko, C. W. Rheology: Principles, Measurements, and Applications; Advances in Interfacial Engineering; Wiley-VCH, 1994; Vol. 1, pp 1–578 [Google Scholar]
- Tatar B. C., Sumnu G., Sahin S.. Rheology of Emulsions. Advances in Food Rheology and Its Applications. 2017:437–457. doi: 10.1016/B978-0-08-100431-9.00017-6. [DOI] [Google Scholar]
- Yuan Y., Chen H., Wang Y., Xu S., Xue B., Zou G., Wang B.. How calcium and magnesium ions affect the stability of asphalt with anionic emulsifiers: A molecular dynamics study. Construction and Building Materials. 2023;400:132770. doi: 10.1016/j.conbuildmat.2023.132770. [DOI] [Google Scholar]
- Collins K. D.. Charge Density-Dependent Strength of Hydration and Biological Structure. Biophysical Journal. 1997;72:65–76. doi: 10.1016/S0006-3495(97)78647-8. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Jing Z., Liu C., Qi R., Ren P.. Many-body effect determines the selectivity for Ca2+ and Mg2+ in proteins. Proceedings of the National Academy of Sciences of the United States of America. 2018;115:E7495. doi: 10.1073/pnas.1805049115. [DOI] [PMC free article] [PubMed] [Google Scholar]
- McClements D. J.. Edible nanoemulsions: Fabrication, properties, and functional performance. Soft Matter. 2011;7:2297–2316. doi: 10.1039/C0SM00549E. [DOI] [Google Scholar]
Associated Data
This section collects any data citations, data availability statements, or supplementary materials included in this article.
