**1. Introduction**

Liaohe Oilfield in China mainly produces heavy oil and super heavy oil. It is very difficult to demulsify the oil emulsion because of its large asphaltene content and high viscosity [1]. Liaohe Oilfield has entered the middle and late stage of exploitation. Since water flooding cannot meet the demand of the oilfield production increase, alkali–surfactant– polymer (ASP) flooding technology can better meet the demand of the production increase in Liaohe Oilfield in the middle and later stages of production [2,3]. ASP flooding technology can greatly improve oil recovery, but the synergistic effect and emulsifying effect in the process of oil displacement make the emulsification of produced fluid very serious [4,5]. When the crude oil is produced by ASP flooding, a large number of surfactants, polymers

**Citation:** Geng, X.; Li, C.; Zhang, L.; Guo, H.; Shan, C.; Jia, X.; Wei, L.; Cai, Y.; Han, L. Screening and Demulsification Mechanism of Fluorinated Demulsifier Based on Molecular Dynamics Simulation. *Molecules* **2022**, *27*, 1799. https:// doi.org/10.3390/molecules27061799

Academic Editors: Shiling Yuan and Heng Zhang

Received: 31 December 2021 Accepted: 7 March 2022 Published: 9 March 2022

**Publisher's Note:** MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

**Copyright:** © 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/).

and other chemicals are used, resulting in more complex produced fluid systems and more difficult demulsification [6]. Transportation and refining of this stable emulsion without treatment can cause serious problems, such as pipeline corrosion, scaling, increased equipment load and fuel consumption [7,8]. Conventional demulsification technology mainly includes physical demulsification, chemical demulsification and biological demulsification [9–11]. Chemical demulsification requires simpler equipment and has a lower cost and better demulsification effect. It can be used alone or combined with other demulsification methods to achieve efficient demulsification [12,13]. However, at present, many demulsifiers cannot meet the actual needs of Liaohe Oilfield or are difficult to apply due to cost, safety and other factors [14]. Therefore, the synthesis of a kind of demulsifier which is suitable for the development of Liaohe Oilfield and can efficiently and rapidly demulsify has become an urgent problem, which is of great significance to the good and efficient development of Liaohe Oilfield.

In recent years, molecular dynamics simulation technology has developed rapidly and is gradually applied to surfactants such as demulsifiers. Molecular dynamics simulation refers to the use of computer technology, discusses the interfacial structure and interfacial action of emulsion after adding the demulsifier at the molecular level in order to explain the role of demulsifiers through this technology, optimizes the selection of efficient demulsifiers and better serves oilfield production [15,16]. Using molecular dynamics simulation to guide experimental research not only makes the experimental data and their universal mechanism more visible, but also provides a new direction for future experimental research.

Marquez et al. [17] first studied the demulsification behavior of demulsifiers at the oil–water interfacial film of oil-in-water emulsion using an atomic model. They found that surfactants that can be used as demulsifiers must have the following characteristics: Firstly, the solubility of demulsifiers in the aqueous phase must be higher than that in the oil phase. Secondly, they must have certain diffusions and concentrations. Finally, the surface activity of demulsifiers must be higher than that of emulsifiers. The demulsifier with the above characteristics can reach the oil–water interface film and reduce the stability of the interface film to achieve demulsification.

Ballal et al. [18] used the improved iSAFT (interfacial statistical association fluid theory) to explore the influence of poly (ethylene oxide)–propylene oxide polyether on the interfacial film of water–toluene by studying the molecular weight, the ratio of EO to PO, branching degree and order degree, so as to understand the influence of demulsifier structure on the interfacial film at the molecular level and predict the performance of real demulsifiers. The results show that the interfacial tension decreased with the increase in molecular weight and the number of branched chains. When EO:PO = 1:1, the interfacial tension is at its minimum. Moreover, the surface activity of PEO-PPO-PEO is higher than that of PPO-PEO-PPO.

Zhang et al. [19] used a polyamide-amine dendrimer demulsifier to study the effect of the hydrophobic chain on interfacial properties and demulsification with molecular dynamics simulation technology. The results show that with the increase in the demulsifier concentration, the kinetic parameters n and t\* obtained by characterizing the molecular diffusion rate decreased. At the same time, unlike the traditional demulsifier adsorption and diffusion behavior, with the increase in the hydrophobic chain length, the t\* value decreased and the n value increased, showing a slow diffusion–adsorption process.

A machine model algorithm can predict and integrate new rules and development trends from a large number of data texts in multiple dimensions. In general, the process of using machine algorithm to simulate experimental data can be divided into two steps: inputting old data and simulating new trends. With the development and widespread application of computer algorithms, researchers often use the neural network algorithm and genetic algorithm to predict the mixed-phase pressure, and good prediction results have been achieved.

The purpose of this study was to provide efficient and economical fluorinated polyether demulsifiers for Liaohe Oilfield. Compared with general demulsifiers, the fluorine atoms

contained in this demulsifier can partially or completely replace the hydrogen atoms on the hydrocarbon chain, so that the nonpolar groups in the demulsifier can form carbon– fluorine bonds with stronger bond energy, and this carbon–fluorine chain with higher bond energy can show strong stability. Fluorinated polyether demulsifiers have better surface activity, chemical stability, thermal stability and compatibility than conventional demulsifiers. Fluorinated hydrocarbon groups are also hydrophobic, which can reduce pollution. The interfacial generation energy (IFE) in molecular dynamics was used to screen 24 kinds of demulsifiers. Neural network analysis (NNA) and genetic function approximation (GFA)were applied to predict demulsification, so as to look for the rules from the existing experimental data to obtain the corresponding prediction conclusions.

### **2. Experimental**

### *2.1. Materials*

Tetraethylenepentaamine was purchased from Beijing Tianyu Kanghong Chemical Technology Co., Ltd. (Beijing, China). P-trifluoromethyl phenol was purchased from Shanghai Sahn Chemical Technology Co., Ltd. (Shanghai, China). Formaldehyde was purchased from Shanghai Macklin Biochemical Technology Co., Ltd. (Shanghai, China). Xylene and toluene were ordered from Shanghai Jizhi Biochemical Technology Co., Ltd. (Shanghai, China). Potassium hydroxide was purchased from Shanghai Sibaiquan Chemical Co., Ltd. (Shanghai, China). Potassium hydroxide was purchased from Shanghai Sibaiquan Chemical Co., Ltd. Ethylene oxide (EO) and propylene oxide (PO) were purchased from Zibo Shandong Zixiang Sales Chemical Co., Ltd. (Zibo, China). The tested oil sample was produced from fluid from a block in Liaohe Oilfield. Fluorinated demulsifiers were synthesized by using trifluoromethyl phenol, formaldehyde and other raw materials as initiators and then synthesized through polymerization reaction with propylene oxide and ethylene oxide [20]. The physiochemical characteristics are shown in Table 1.



### *2.2. Molecular Optimization and Model Construction*

All the simulations were performed on the molecular dynamics software Materials Studio2018. The interaction parameters of surfactants came from the condensed-state optimized molecular force field—COMPASS force field.

Firstly, the 3D model structures of n-decane and demulsifier molecules were built by using the Visualizer module in the program, and the geometric optimization of the structures of the three surfactant molecules was carried out by using the Smart method through the COMPASS force field of the Dmol3 module, so that the surface molecular system could achieve the minimum energy, and the optimized molecular structure of the optimal molecular conformation was obtained, as shown in Figure 1.

Then, the crude oil system model and demulsifier system model were established at 278 K by using the construction tool under AC module, COMPASS force field and Periodic Cell periodic boundary conditions. Based on the position reference of the rectangular coordinate system, the size of the system box was set. With the origin as the center, the lengths in x, y and z directions were 4 nm × 4 nm × 12 nm, respectively. The system model is shown in Figure 2. The simulation systems with different EO/PO ratios were composed of 2000 n-sunane molecules and 500 water molecules.

Finally, the Dynamics tool under the Forcite module was used. The simulation level was MEDIUM, and the simulation system ensemble was NVT ensemble, keeping the system at a constant temperature of 298 K. AtomBased was used to represent van der Waals

interaction and electrostatic interaction. Andersen method was selected for parameter control of ensemble, namely temperature control. In addition, Berendsen method was used for pressure change. A 3000-step process was established and the last nanosecond result was obtained by statistical analysis.

**Figure 1.** Schematic diagram of optimized molecular structure, where blue is N, red is O, white is H, gray is C, and purple is R<sup>3</sup> = (C3H6O)x(C2H4O)y.

**Figure 2.** Demulsifier system model.

### *2.3. Neural Network Analysis (NNA)*

Neural network analysis (NNA) refers to the method of machine learning and data processing that controls various parameters and layers based on the way in which neurons in the brain of organisms transmit information [21,22]. NNA was first proposed by McCulloch and Pitts in 1943 as a way to simulate the analysis of neurons in the brain. Although it makes too many assumptions and simplifications than real brain neurons, it still contributes considerable intelligence in research. Therefore, NNA has considerable research and application value. Since then, NNA has been greatly developed, and hundreds of models have been proposed. Figure 3 is a complete typical three-layer neural network structure, which is divided into three parts: multinode input layer, single-node output layer and hidden layer. A three-layer BP neural network can solve almost all the prediction problems near exact precision, so only one hidden layer was used in this study.

**Figure 3.** Basic structure of three-layer neural network.

Neurons refer to nodes, which are the most basic structure of neural networks. Each node is an information-processing element. In addition to the input layer, each node uses the transformed linear combination of node output from the lower layer as its input:

$$I\_i = \sum\_j w\_{ij} X\_j + \theta\_i \tag{1}$$

In the expression, *I<sup>i</sup>* is the input to the *i* node, *X<sup>j</sup>* is the output of the *j* node in the previous layer, *j* is the summation of all nodes in the previous layer, *wij* is the connection weight between nodes, and *θ<sup>i</sup>* is the offset value. It is worth noting that the nodes between each layer are not fixed, which needs to be set according to the actual situation. When exploring MMP, the nodes in the input layer are designed as multiple variables that affect MMP, and the output is the corresponding MMP value. The number of hidden layers and the number of nodes in each layer can be defined by users themselves, so as to make the output results closer to the real value.

The transfer function needs to be realized through the transfer function between the input layer and the hidden layer and between the hidden layer and the output layer. In addition, the conversion information is realized by setting the weights and bias values. In this way, the data between the input layer and the output layer can be connected and their relationship can be directly reflected. The study uses a transfer function called Sigmoid transfer function (Formula (2)), which allows for easy differentiation and has a smooth function to achieve data output in a narrow range.

$$y = \frac{1.2}{1 + e^{-\chi}} - 0.1\tag{2}$$

After setting the above information, training should be started and the neural network should be learned independently. The training minimizes the error and makes the final prediction more accurate. Here, BFGS algorithm is used to find the minimum value of the error, and the error function (3) is used to determine the matching degree between the calculated output and the expected output:

$$E = \sum\_{i=1}^{n} \mathbb{C}\_{i} (y\_{i} - y\_{i}')^2 + \mathbb{Q} \sum\_{j} (x\_{j} - \overline{x\_{j}})^2 + P \sum\_{k,l} w\_{k,l}^2 \tag{3}$$

where *C<sup>i</sup>* is the parameter value of the proportion of results. In this study, the item is 1, *y<sup>i</sup>* and *y* 0 *i* represent the true value and the predicted value, respectively. *Q* is the penalty factor set for the missing value, *x<sup>j</sup>* is the missing data value of the system guess, *x<sup>j</sup>* is the average value of each input data, *P* represents the penalty factor of connection weight, and *wk*,*<sup>l</sup>* represents the connection weight. The first item is the main item of the error, which is the sum of squares of the difference between the predicted value and the actual output value of the model. The second item represents the error caused by filling the missing data. In addition, the average connection weight is added to the error function to prevent the collapse or error caused by excessive weight. In this way, the learning cycle iteration of the neural network can be carried out until the error drops to a certain level, and finally a trained neural network can be obtained.
