Introduction

Even though the energy resource revolution has become more common these days, the use of crude oil, as a well-known energy resource, ranks as one of the most significant. The formation of water-in-crude oil (W/O) emulsion resulting from well-production is one of the major obstacles in the petroleum industry1,2. Crude oil involving water as an impurity surrounded by indigenous oil surfactants, especially asphaltene (ASP) molecule, takes its toll on transportation, corrosion3, storage, and catalyst poisoning4. Therefore, some demulsification approaches in the oil refining process, which include electrical, mechanical, and chemical methods, are carried out to coalesce the individual water droplets and separate them from the crude oil phase5. Among the above-mentioned methods, chemical methods have attracted the attention of researchers since they are more economical and they cushion the devastating effect on the crude oil phase5. Since the surfactants can replace the ASP in the rigid film as a coalescence inhibitor of the water droplets, and cause a change in film properties6, countless research studies have been carried out into the interfacial film essence and the effects of the structural properties of both ASP and oil7,8. After recognizing the physical properties of interfacial films6,9, some scientists were urged to eradicate the films with more sufficient demulsifiers4. It means that demulsifiers reduce the stability of the emulsion and the water extracted from crude oil increases. Some experimental investigations proved that surfactants, in both ionic10 and neutral forms11, and polymers12 play a significant role in the demulsification process of crude oil.

From the molecular dynamics simulation, MD, point of view, the arrangements of the individual content at the interfacial film were explored to confirm the construction of the interfacial film in the presence of disparate demulsifiers13,14. It has been concluded that ionic demulsifiers and polymers have a tendency to be adsorbed on the interfacial film and change the ASP arrangements compared to their initial arrangement15. In addition, more proper arrangements concerning the available contents in the interface were examined from the quantum mechanics standpoint16.

Despite the substantial increase in using adequate demulsifiers, there are some unanswered questions. For instance, how different demulsifiers can alter the structure of an interfacial film. Therefore, it is important to know whether predicting a demulsifier is plausible or not. Therefore, in this work, an MD simulation study was carried out to trace the root of the change in the interfacial film caused by the demulsification process under different conditions such as the type of surfactant, concentration, and the effect of temperature, which were less investigated in previous studies. Next, a quantum mechanics study was carried out to demonstrate the interaction energy between the individual contents. Also, the changes in HOMO and LUMO energy of the ASP were studied before and after adding the surfactants. Additionally, the trend in the computational prediction was proven by an experimental study.

Materials and methods

MD simulation method

All contents of systems such as ASP, water, toluene, and surfactant molecules demonstrated in Fig. 1 were embedded in a simulation box using packmol17. For the initial structure, a water droplet was put into the box center, and it was encapsulated by an ASP shell at a certain distance4. Then, the box was filled with toluene molecules. The reason for using petroleum ASP is attributed to its properties, including heteroatoms located in different parts of the molecule, peripheral substitution, and the benzene rings that are fused together18. In the following, the prepared box was initially simulated in the NPT ensemble at T = 298 K and P = 1 atm with the time step of 2 fs for 6 ns, and then its output was employed as an initial structure in other parts. Later, the surfactant molecules were added to the previous output to set up an initial situation. The TIP3P model was implemented on the water molecules19. The simulations were performed by means of NAMD20. CHARMM General Force Field (CGenff) was employed for all contents of the system21. The periodic boundary condition was employed in three directions, namely x, y, and z. The Lenard-jones potential was applied to make a non-bonded interaction model, and the Vander Waals attraction and steric repulsion were achieved with the cut off of 12 Å22. The long-range electrostatic force was calculated using the Particular Mesh Ewald (PME) method23. In order to verify the force field accuracy, the diffusion coefficient for a toluene box was calculated and the result was given in Figure S1. All properties of the system were also given in Table S1.

Figure 1
figure 1

The three-dimensional chemical structures of molecules used in the simulations. SDBS (C18H29NaO3S) (a), SDS (C12H25NaSO4) (b), H2O (c), CTAB (C19H42BrN) (d), petroleum ASP (C47H55NS) yellow and orange circles depict N and S respectively (e), Toluene (C7H8). The counter ion of ionic surfactants was omitted.

Quantum calculation

The geometric optimization was performed for ASP and all surfactants using the Gaussian 09 program and density functional theory (DFT) method with M062X density functions and 6-311g(d,p) basis set. The adsorption energies were calculated as follows

$${E}_{adsorption}= {E}_{asphaltene-surfactant}-\left({E}_{surfactant}+{E}_{asphaltene}\right)$$
(1)

The molecular electrostatic surface potential (ESP) was plotted using GaussView 6. The atom in the molecule (AIM) method, through AIM 2000 package, was employed to evaluate the hydrogen bonding, and the energy of the hydrogen bonding (\({E}_{HB}\)) was estimated similar to our previous study (Eq. 3)24, where \(V\left(r\right)\) signifies the value for a local potential energy Moreover, as reported in our previous study25, the energy gap \(({E}_{g})\), electronic chemical potential \((\mu )\), and chemical hardness \((\eta )\) were calculated using Eqs. (35):

$$\text{The energy of Hydrogen bonding }\left({E}_{HB}\right)\, {E}_{HB}=0.5 V\left(r\right)$$
(2)
$$\text{Energy gap }({E}_{g})\, {E}_{g}={E}_{LUMO}-{E}_{HOMO}$$
(3)
$$\text{Electronic chemical po tential }\left(\mu \right) \mu =\frac{{E}_{LUMO}+{E}_{HOMO}}{2}$$
(4)
$$\text{Chemical hardness }(\eta )\,\eta =\frac{{E}_{LUMO}-{E}_{HOMO}}{2}$$
(5)

Materials

The chemical materials used in the current study include sodium dodecyl sulfate (Merck, purity 98%), cetrimonium bromide (CTAB), and sodium dodecyl benzene sulfonate (Aldrich, technical grade). Moreover, the dead crude oil (API = 17.4, viscosity = 37.7 cP) was taken from the Iranian reservoir.

The crude oil characterization

The percentage of various components of the crude oil such as saturate, aromatic, resin, and asphaltene (SARA), was determined using the ASTM D-2007 method. The results of the SARA analysis are represented in Table S2. Also, the viscosity of crude oil was measured at 298 K (Table S2). The results have already been reported in the previous study26.

The preparation of water in crude oil emulsion

The distilled water was gradually added to the crude oil (the proportion of crude oil to water was 3:2 V/V), and the mixture was stirred at 1100 rpm for 110 min. The water was not separated from the W/O emulsion over 24 h.

Dehydration method

A customary method for evaluating the demulsifier’s performance is the bottle test26,27. The formed W/O emulsion was poured into the graded bottles (at room temperature), and then the surfactants (as demulsifiers) were added to the stable emulsion, and the water precipitated from the emulsion was noted.

The demulsification efficiency was calculated by Eq. (6), where \({V}_{0}\) and \({V}_{\text{s}}\) are the initial volume and separated water, respectively.

$$E\text{\%}=\frac{{V}_{s}}{{V}_{0}} \times 100$$
(6)

To study the effect of temperature on the demulsification performance, the more effective demulsifier was selected. After that, the function of the selected demulsifier was evaluated at different temperatures (298, 323, and 348 K). It is noteworthy that other conditions such as the formation of W/O emulsion, are the same as mentioned above.

Result and discussion

MD simulation

Effect of demulsifier intrinsic features

As a first step, to find out about the dimension of interfacial ASP film, several ASP molecules were put around the water droplet (Fig. 2a,c). After the calculation, the organized interfacial film stemmed from ASPs adsorption indicates self-aggregation among ASPs at some parts4 (Fig. 2b,d). In general, asphaltenes tend to self-aggregate, this behavior has also been seen in other systems containing asphaltenes28. If the interfacial film settled between two phases is assumed as a 2D film, a fence-like structure appears. However, an utterly uniform film was not observed. The result is consistent with the results approved by the Cadena-Nava RD team29. By characterizing 2D and 3D structures in the ASP accumulations, they revealed the dimensions of the interfacial film and highlighted their importance.

Figure 2
figure 2

The snapshot of the initial configuration of the system containing all contents other than surfactant molecule (demulsifier) (a), and its side view (c). The final structure of the system (b), and its side view (c). Color code: color schemes are the same as Fig. 1.

In the following, anionic and cationic surfactants as demulsifiers are separately added around the interfacial film obtained from the previous step to determine what happens to the interfacial film after exposure to various demulsifiers. The interfacial film features related to demulsifier-added systems were compared with the film features without any demulsifiers. Density is one of the critical physical quantities to depict the system content distribution30,31. Therefore, the density profile in the direction of the Z-axis is utilized to determine the transformation of interfacial ASP film based on the contents distribution variation20,32.

The observed plots in the density of water (Fig. 3b–e) are appropriate evidence to approve that the spherical structure of water droplets remained moderately stable. By looking at Figure S2, it can be seen that by adding surfactants to systems, the density figures deviate from the figures of the non-surfactant system. This variation shows that ASP film has gone through a rearrangement5, thereby causing uncovered parts onto the surface of the water droplets. Underlying causes of appearing asp-uncovered part of droplets are the reduction of the ASP molecule distance and more aggregation at the position of maximum fluctuation33. According to the density profiles (Fig. 3c–e), the cationic surfactant, CTAB, did it better than others. But in the following, it will be revealed why the CTAB molecule is not as effective as anionic demulsifiers.

Figure 3
figure 3

The snapshot of the final structure of four systems with non-surfactant, CTAB, SDS, SDBSand as demulsifier, from left to right (a). Color code: color schemes are the same as Fig. 1. The density profile of some contents of the four mentioned systems (be).

The snapshot of the water droplet (Fig. 3a) shows that the demulsifiers make the water droplet uncover and the interfacial film rupture more34, simultaneously. All changes in the ASP film are considered film transformations instead of a film eradication. Other physical quantities such as non-bond energy35 (Enon-bond), radial distribution function18 (RDF or g(r)), mean square displacement (MSD), and diffusion coefficient (D)4 were calculated to estimate the efficiency of demulsifiers. The Enon-bond is divided into two parts:, namely van der Waals interaction energy (EVDW) and electrostatic interaction energy (Eele). The contribution of each term affects the Enon-bond. The Enon-bond between pair contents is used to more accurately predict the film alteration (Fig. 4a–d). In the presence of the demulsifier, the value of absolute Enon-bond between ASP–ASP decreases, and also the distance between them declines. The change in distance will be indicated by the g(r) intensity variation in the following. The contribution of the Enon-bond is shown in Figure S3. It is noticeable that the more the absolute Enon-bond between the ASP–SUR, the less the absolute Enon-bond between the ASP-ASP molecules would be. This reverse trend is quite observable in Fig. 4a,b. Figure 4b depicts a higher attraction energy between the anionic surfactants and the ASP molecules, showing the greater tendency of the anionic surfactants to be near the ASP molecules. Also, by adding the surfactants to the systems, the Enon-bond of the ASP molecules with both oil and water phase decreases Fig. 4c,d. The redial distribution function (g(r)) shows the distance of the shell surrounding a certain molecule36.

Figure 4
figure 4

The plot of Enon-bond between some pair contents of the four systems with non-surfactant, CTAB, SDS, SDBS as demulsifier (ad). The RDF of the systems containing different demulsifier (e).

Figure 4e shows that by embedding surfactants into the interfacial film, the intensity of the first peak of g(r)ASP-ASP, at \(r=\) 3.45 Å, there is a decrease in the distance of ASPs18,37, and the first peak of g(r)ASP-SUR corresponds to the hydrogen bonding calculated in the quantum section. The amount of g(r) of CTAB-ASP indicates that the distance between CTAB and ASP molecule is greater than the distance between the anionic surfactant and ASP38. So, the first reason for the different performance of cationic and anionic surfactants can be traced to the difference in their tendency to select adsorption sites on the interfacial film. All the results can be justified by the tendency of anionic surfactants’ head group to be adsorbed next to the positively charged hydrogen bonded to the ASP heteroatom, i.e., N atom. These results are consistent with both Enon-bond between the surfactants and the ASP molecules and the interaction energy obtained in the quantum section.

It was mentioned above that demulsifiers were added to the output of the first calculation, which was the system without demulsifiers (Fig. 2b,d), so after adding the surfactant, the value of MSD of ASPs shows the displacement of the ASP molecules present in the ASP film (Fig. 5a). Therefore, the more the ASP molecule displacement occurs, the more alteration will be observed in the film structure. Figure 5a depicts that the most value of MSD and its slope39 (diffusion coefficient) belong to the system containing CTAB surfactant, which is consistent with the density profile (Figure S1). It means that the most variation related to the density profile of ASP is consistent with the trend of MSD and diffusion coefficient in the system including CTAB as a demulsifier. According to these results, it is expected that the performance of the CTAB surfactant will be higher than the performance of anionic surfactants. But, in addition, the number of adsorbed surfactants on the water surface can significantly predict which type of surfactant can be more efficient in high-yielding demulsification. Although CTAB molecules contribute to more rearrangement of the film, the number of CTAB molecules adsorbed onto the water surface causes a circumstance that either seals or drains away the water droplets.

Figure 5
figure 5

The mean squared displacement and its slope (diffusion coefficient) which belong to ASP and demulsifier molecules for the systems with different demulsifiers (a). Distribution histogram of the number of demulsifier molecules adsorbed onto the water droplet (b).

Figure 5b displays the more CTAB molecules adsorbed on water. It is explained that the more the demulsifiers are adsorbed on the water droplet, the more the rupture should be sealed. Therefore, this phenomenon can constrain draining water away from the droplet to adjacent droplets and also hamper the formation of bigger surrounded droplets compared to the case of anionic demulsifiers. Although g(r) peak positions (Fig. 4e) and Eint (Table S3) of anionic surfactants show that they have formed more robust hydrogen bonds with water molecules in comparison to the cationic ones, Ead in the quantum section conveys that anionic surfactant desire to be near the ASP molecule. The length of the hydrogen bond was confirmed by the available peak at \(r\) ≈ 2 Å (Fig. 4e) and Table S4. Despite the more robust hydrogen bond between anionic demulsifiers and water, the tendency of the anionic surfactant to be adsorbed near the ASP molecule can prevent the water droplet from being sealed. The results of this section cast a positive light on the way of selecting more effective demulsifiers and can pave the way for anticipating that anionic surfactants, SDS and SDBS, can be more adequate demulsifiers than cationic surfactants (CTAB). Because not only do they interact with the ASP molecules and transform the interfacial film, but also they make ruptures in the interfacial film and preserve them. All of these are conducive to creating a better demulsification function. In addition, among the anionic surfactants, SDS and SDBS, SDBS has been considered to be a more efficient demulsifier because of the benzene ring in its structure. The π- π interaction between ASP and SDBS helps SDBS stay near the ASP molecule. According to the research investigation carried out by Ming Duan2 the effective demulsifier tends to settle in the vicinity of not only water but also the ASP molecules. Therefore, SDBS has been selected as the desired surfactant, which was confirmed by the experimental results obtained in the bottle test (Fig. 12).

Observed trend of increasing demulsifier concentration

After selecting SDBS as the desired surfactant, the effect of the demulsifier concentration on the interfacial film was investigated. Figure 6a shows the systems consisting of 100, 200, and 400 SDBS surfactant molecules residing around the water droplets surrounded by ASPs. According to the previous section, the MSD value was utilized to scrutinize the alteration in the ASP film. Figure 6b shows that the MSD (ASP) of the system (200 SDBS) is more than that of others, which shows that the ASP film changes more, whereas 100 SDBS molecules are not propellant enough to cause this change.

Figure 6
figure 6

The snapshot of systems with 100, 200, and 400 ASP molecules, respectively (a). The mean squared displacement and its slope (diffusion coefficient) belonging to ASP and demulsifier molecules for the systems (b). The RDF of the systems with the different number of demulsifier molecules (c).

But conversely, by redoubling the number of surfactants, from 200 to 400 surfactants, the MSD value decreases. It is noticeable that after the specified number of demulsifiers, the interfacial film structure undergoes fewer changes relative to the initial structure. In addition to the MSD plot, Figure S2 shows that the ASP density figures prove the more ruptures caused on the water surface (system 200 SDBS), and conversely, the more stable arrangement of ASP film (system 400 SDBS), which is observed from the less fluctuation of the density profile.

For the system 400 SDBS, the Enon-bond between ASP-ASP molecules reaches a higher level (Fig. 7a), and both g(r)ASP-ASP and g(r)ASP-SUR intensities decline (Fig. 6c), which are acceptable evidence for preserving the ASP film structure by preventing its formation from changing. These promising results can anticipate that beyond the required concentration, at 400 SDBS, the surfactant molecules can join together and form self-aggregation and consequently give rise to retaining the initial arrangement of the ASP film. Therefore, at this concentration, draining the water droplet away34 becomes less, and the amount of water extracted from the oil phase will reduce. This prediction is in good agreement with the experimental result in "Bottle test", showing a point in which a reverse trend occurs.

Figure 7
figure 7

The plot of Enon-bond between some pair contents of the systems with the different number of demulsifier molecules (ad).

The temperature effect on ASP film

The previous section examined the impact of the desired surfactant concentration on the interfacial film. The temperature efficiency on the interfacial film is one unconsidered evaluation in the previous studies of demulsification. In the current part of this study, all system conditions except the temperature are equal. According to the results assessed in both previous parts, some of the determining factors to predict the improvement of the demulsification trend include (a) increasing intensity of g(r) (ASP-ASP), (b) appearing g(r) (ASP-SUR) in less radius, (c) decreasing Enon-bond between ASP-ASP molecules, (d) and enhancing the MSD of ASP molecules in the interfacial film. Therefore, it seems unusual that by increasing the temperature, the absolute value of Enon-bond among the ASP molecules increases (Fig. 8c–f) while the intensity of g(r)ASP-ASP reaches a higher level (Fig. 8(a)). To investigate the unexpected trend, the results of MSD became more significant. As the MSD plot shows (Fig. 8b), the more the system receives the temperature, the more the ASP displacement occurs. These displacements allow ASP molecules to go through more spatial orientations relative to each other. Mousavi40 and coworkers demonstrated the diagonal structure has less distance.

Figure 8
figure 8

The RDF of the systems with 200 SDBS molecules, as demulsifier, at different temperatures of 298.15 K, 323.15 K, and 348.15 K (a). The mean squared displacement and its slope (diffusion coefficient) belonging to ASP and demulsifier molecules at different temperatures (b). The plot of \({E}_{non-bond}\) between some pair contents of the systems at different temperatures (cf).

On the other hand, alleviating the intensity of g(r)ASP-WAT is a piece of evidence of a moderately declining interaction between water and the ASP molecules (Fig. 8a), which causes more conformation changes in the ASP molecules. In addition, the higher value of surfactant's MSD stemmed from increasing temperature conforms to a higher pace of surfactant toward interfacial film, which accelerates the transforming of the interfacial film (Fig. 9). The obtained results advocate that the higher temperature a system has, the more unstable the system becomes. Consequently, it becomes clear that more water would be separated at a higher temperature. The results are consistent with those of experimental investigations explained in "Determining the temperature role", which confirms that more water is extracted from the oil phase.

Figure 9
figure 9

The snapshot of systems with 200 SDBS at different temperatures of 298.15 K (a), 323.15 K (b), and 348.15 K (c).

Quantum calculation

Several studies have shown that the quantum calculation is an adequate method to evaluate the adsorption of demulsifiers on ASP and to assess different interactions between them. Ren and his team used the quantum calculation to estimate the interaction between graphene oxide and ASP16. Also, the DFT method was employed by Flores and coworkers to study the correlation between quantum parameters and the experimental behavior of different demulsifiers41.

The adsorption of surfactants on ASP

Table 1 presents the adsorption energy of surfactants on ASP (calculated using Eq. 1). The adsorption energies of anionic surfactants are relatively equal, whereas the adsorption energy of CTAB is notably lower than theirs. This trend was confirmed by Eint calculated in the MD simulation ("Effect of demulsifier intrinsic features"). Generally, in the demulsification process, a higher adsorption energy can be more effective because it can be conducive to the transformation of the interfacial ASP film. Moreover, the SDBS adsorption configuration on ASP (Fig. 10) shows that the SDBS benzene ring interacts with the aromatic ring of the ASP structure, which results from the π–π interaction. According to some research investigations26,42, the π–π interaction between ASP and the demulsifier has positive effects on the demulsification function. In continuation of this section, some parameters influencing surfactant–ASP interactions will be evaluated.

Table 1 The HOMO, LUMO energy, energy gap, hardness, for ASP, surfactants, and complexes (upon eV.).
Figure 10
figure 10

Surfactants adsorption on ASP configuration, (a) SDBS, (b) SDS (c) CTAB.

An electrostatic interaction, as one of the possible interactions between the surfactant and ASP, is attributed to both the net charge of ionic surfactants and different potential charges of ASP’s heteroatoms and functional groups. To investigate the electrostatic interaction, the electrostatic surface potential (ESP) was used. Figure 11 indicates the ESP for ASP and surfactants, with red and blue colors representing the negative and positive potential, respectively. Therefore, the anionic and cationic surfactants have a negative and positive potential respectively, which is related to the negative and positive charges of their heads. Despite the neutral nature of ASP, both sites with a positive and negative potential can be seen on it simultaneously. It is noticeable that the blue color near the nitrogen atom refers to the existing positive charge, whereas the lack of clarity of the yellow color shows that the negative potential was distributed in many areas of the ASP structure.

Figure 11
figure 11

The ESP of (a) ASP. (b) SDBS, (c) SDS, (d) CTAB, (e) SDBS on ASP, (f) SDS on ASP, and (g) CTAB on ASP.

The ASP site, containing a positive potential, is an suitable position for the adsorption of anionic surfactants, on which the anionic surfactant heads were adsorbed. In addition, Fig. 11 shows the chnage in the ASP potential area, which stems from the strong interaction caused by the adsorption of the surfactant. Contrary to the anionic surfactants, the CTAB surfactant head, containing a positive potential, cannot be adsorbed on this site because of the electrostatic repulsion. Thus, the electrostatic attraction between ASP and the anionic surfactants, SDBS and SDS, plays a key role in increasing their absolute adsorption energy at a certain distance.

The HOMO and LOMO energies were calculated for some contents including surfactants, ASP, and the complex of an adsorbed surfactant on ASP. The electronic properties of contents can assist us to understand the interaction between them. Figure S6 in SI shows the graphical shape of HOMO and LUMO for ASP, surfactants, and surfactants-ASP. In addition to the shapes of HOMO and LUMO, the energy gap is an important parameter calculated from the HOMO and the LUMO energies. The energy gap of ASP-SDBS is 5.31 eV (Table 1), which is lower than the energy gap of both ASP and SDBS individually. The reduction of the energy gap is an index for the interaction between ASP and SDBS43. This phenomenon was observed for two other surfactants.

The global hardness is another parameter derived from the HOMO and LUMO energy, which is an index for reactivity. Thus, a compound with a higher energy gap is harder and less reactive25. Between the two anionic surfactants, SDBS with a lower hardness value became more polarized than SDS. So, during the interaction with ASP, SDBS was more effective than SDS. The electronic chemical potential of different compounds, estimated using the HOMO and LUMO energies, can determine the direction of the electron transfer. The ASP molecule has a lower electronic chemical potential than both of the anionic surfactants, so it conducts and transfers electrons towards ASP. This behavior was approved with an increase in the red area of ASP (Fig. 11). On the other hand, the lower chemical potential of CTAB, compared with ASP, leads to a reverse behavior for CTAB.

Several oxygen atoms available in the head group of anionic surfactants enable the formation of hydrogen bonds (HB) between ASP and the anionic surfactants. The results of the AIM analysis reveal that one of the oxygen atoms available in an anionic surfactant structure could form the hydrogen bond with the hydrogen connected to nitrogen in ASP. By comparing the charge density, ρ, and the bond energy of HBs, it can be concluded that the HB strength between ASP and SDS is slightly stronger than the HB strength between ASP and SDBS (Table 2), which is confirmed by a shorter HB length. The HB length of anionic surfactants is consistent whit the g(r) obtained in the MD simulation section (Fig. 4e). Also, it should be emphasized that HB formation between ASP and the demulsifiers can deform the ASP films, thereby accelerating the demulsification process. According to these promising results, it is expected that both anionic surfactants would separate water more efficiently than CTAB.

Table 2 The values of electron density (ρ), its Laplacian (2ρ), the energy of hydrogen bonding \(\left({E}_{HB}\right),\) bond length, and different charge (D.C) for hydrogen bonding between ASP surfactants.

Experimental section

Bottle test

The size of water droplets in the emulsion was estimated to be 2.3 ± 1.5 μm by optical microscope. Several studies have shown that the size of water droplets in the water-in-oil emulsion can vary from a sub-micrometer44 to a several micrometers44.

The results of the bottle test for all surfactants (Fig. 12) indicate that the anionic surfactants as demulsifiers are more efficient than the cationic surfactant (CTAB). According to the figures, SDBS and SDS completely removed water from crude oil (at 17 and 40 min respectively), whereas CTAB cannot completely dehydrate it (95% at 61 min). The amount of water remaining in crude oil after demulsification by surfactant CTAB is more than allowed45. This trend was anticipated with MD and quantum calculations. In this way, that anionic surfactants have stronger interactions with ASP (Table 1; Fig. 4b). The interaction of demulsifiers with ASP changes the ASP hydrophilicity46, thereby coagulating the water droplets more rapidly. The formation of HB for anionic surfactants, as another factor calculated with AIM, propels the process of demulsification26. Also, hydrogen bonding can affect asphaltene accumulation47. It should be pointed out that all surfactants applied in this study can dehydrate crude oil by rupturing the ASP film surrounding the water droplets. The changes in Eint and g(r) related to ASP-ASP, which were computed as evidence of film changes in the MD section, took place following the addition of demulsifiers to crude oil. As shown in Fig. 1, SDBS has a benzene ring that facilitates its diffusion in the crude oil medium26, thus enhancing the SDBS function in comparison to SDS. Besides, the SDBS benzene ring interacts with ASP available in the interfacial film16 and helps to coalesce the individual water droplets. These observations confirm the critical role of the benzene ring in the demulsification process, which is consitent with some approving research about the constructive effect of the aromatic ring16,26,42.The efficiency of demulsification can be manipulated by another parameter known as hydrophilic–lipophilic balance (HLB). The higher the HLB value the surfactant has, the more the surfactant is hydrophilic. The HLB value for SDBS and SDS were reported to be 10.6 and 40, respectively48. The SDS head with a higher value of HLB has more tendency to be entrapped in the water phase49, whereas the moderate HLB value for SDBS helps to maintain its head on the water–crude oil interface, so it would improve the demulsification function. Various factors, which belong to the demulsifier nature, affect the demulsification efficiency, but many papers have reported that the demulsifiers with moderate hydrophilicity function better49,50.

Figure 12
figure 12

The demulsification performance of SDBS, SDS and CTAB at 298 K.

As mentioned in the MD part (Fig. 6a), the sealing of ruptures by the extra surfactants takes place after an optimum concentration, so it decreased the dehydration efficiency of the three surfactants. Electrostatic repulsion can have a great influence on the behavior of systems containing ionic surfactants51, therefore the electrostatic repulsion of the ionic surfactant at the interface is another reason52. Based on the MD results indicating a greater number of CTAB sealed available ruptures on the interface (Fig. 5b), it is expected that CTAB as a demulsifier would have a less optimum concentration. Besides, SDS and SDBS with a lower and similar number of adsorbed demulsifiers on ruptures should have an equal optimum concentration, i.e., higher than the CTAB optimum concentration. All predictions about the optimum concentration were confirmed by the experimental approach, i.e., the optimum concentrations for CTAB, SDS and SDBS were 20, 140, and 150 ppm, respectively (Fig. 12). The decrease in the dehydration efficiency after the optimum concentration has been reported in some studies26,53,54.

Figure 12 indicates that beyond the specified concentration which belong to all of the intended demulsifiers, the separated water decreses. There are two reasonsfor the phenomenon mentioned above, namely (1) the electrostatic repulsions between identical demulsifiers, and (2) the sealing film of the demulsifier surrounding the ASP interfacial film. These phenomena are common in the demulsification process and have been reported in some studies26,55.

Determining the temperature role

To study how temperature affects the demulsification process, the SDBS optimum concentration was regarded as the desired concentration, and the temperature range was considered 298, 323, and 348 K (Fig. 13). Some studies have demonstrated the importance of the temperature effect on the demulsification process26,56,57. The bottle test results explained that the demulsification time for the complete removal of water from crude oil declined by increasing the temperature. The more the temperature of the system is, the better the demulsification process function would be. It is time to scrutinize the underlying factors behind the temperature as a propellant factor. The reduction in viscosity caused by increasing the temperature is known as a significant factor in the improvement of demulsification performance58 because in this situation, water droplets could diffuse together easily. Besides, increasing the temperature not only accelerates the movement of demulsifiers towards the interface26, but also can increase the kinetic energy of water droplets and the collision between them59. The MSD results displayed in Fig. 8b confirm the increase in movement of the the demulsifier along with the increase in the temperature.

Figure 13
figure 13

The temperature effect on demulsification time for the optimum concentration of SDBS at 298, 323, and 348 K.

The stability of the ASP film around the water droplet can change with temperature changes60, the MD results mentioned above predicted that the displacement of ASP increases with the increase in temperature. So, it is more likely to alter the interface film and extract the water efficiently. In this way, the water droplets coalesce quickly. This trend was confirmed by the bottle test in this section.

Conclusion

This work provides useful insights into how the interfacial film, as an obstacle to demulsification, changes during the demulsification process. So, it should be noticed that the transformation of the interfacial film is a predominant step in rupturing the interfacial film and draining the water droplets into each other. Moreover, the factors which transform the film have been carefully scrutinized. Therefore, the MD simulation and quantum mechanics studies show that it is imperative to keep a demulsifier molecule in the proximity of ASP. This is attributed to the electrostatic interaction and hydrogen bonding formed between ASP and demulsifier molecules. MD simulation demonstrated that a suitable demulsifier has a tendency not only to ASP molecules but also to the water molecule, both of which contribute to the film alteration. Next, by increasing the concentration of demulsifier molecules, they were conducted towards the film ruptures and encapsulated the water droplets more. The consequence of this effect was observed in the decline in the demulsification performance in the experimental section. Finally, at a higher temperature, raising the diffusion coefficient of the demulsifier as well as the possibility of ASP movement can accelerate the interfacial film transition.