Interface tension prediction method and device based on machine learning and molecular dynamics

By constructing a mixed system model of CO2, surfactant molecules, and crude oil, and using machine learning and molecular dynamics methods to optimize surfactant configuration, the problem of poor oil displacement effect caused by excessive interfacial tension was solved, thereby improving oil extraction efficiency.

CN121545601BActive Publication Date: 2026-03-24XI'AN PETROLEUM UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-01-16
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

Existing technologies cannot predict interfacial tension dynamically in real time, resulting in excessively high interfacial tension, which affects oil displacement, increases extraction costs, and reduces oil extraction efficiency.

Method used

A model of a mixture of CO2, surfactant molecules, and crude oil was constructed. Machine learning and molecular dynamics methods were used to train a particle swarm optimization system using the LightGBM model to minimize the surfactant configuration and optimize the effect by combining molecular dynamics simulation.

Benefits of technology

It enables accurate prediction of interfacial tension under different temperature and pressure conditions, finds the optimal surfactant configuration, avoids multiple extraction operations, and improves oil extraction efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121545601B_ABST
    Figure CN121545601B_ABST
Patent Text Reader

Abstract

The application discloses an interfacial tension prediction method and device based on machine learning and molecular dynamics, and relates to the technical field of molecular dynamics simulation. The method comprises the following steps: a mixed system model comprising CO2, surfactant molecules and crude oil is constructed, surfactant related parameters are defined as a variable set, molecular dynamics software is used for simulation, simulation data and interfacial tension data are obtained and preprocessed. The temperature, pressure and variable set are used as input features, the interfacial tension is used as a target variable, a LightGBM model is trained, and a prediction model is obtained. Each particle represents the configuration of a surfactant, the prediction model is used to obtain the predicted interfacial tension corresponding to each particle, the velocity and position of the particle are iteratively updated, and the optimal surfactant configuration that minimizes the interfacial tension is obtained. The problem of how to avoid the problem of low oil recovery efficiency caused by the fact that multiple mining operations are performed due to the poor oil displacement effect caused by the failure to accurately predict the interfacial tension is solved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of molecular dynamics simulation, and particularly relates to an interfacial tension prediction method and device based on machine learning and molecular dynamics. BACKGROUND

[0002] The size of the crude oil interfacial tension affects the oil displacement efficiency, and accurate prediction of the interfacial tension is of great significance for optimizing the selection of surfactants and improving oil exploitation benefits.

[0003] At present, the prediction of interfacial tension mainly depends on experimental methods and molecular dynamics simulation. Experimental methods include drop weight method, maximum bubble method, pendant drop method and the like, and data are obtained by directly measuring the liquid interfacial tension, but the experimental method cannot dynamically predict the interfacial tension under different conditions in real time. Although molecular dynamics simulation can provide atomic-level information and help understand molecular interactions, it faces the bottleneck of large consumption of computing resources. The simulation system has numerous molecules and complex interactions, and the calculation amount increases exponentially with multiple dimensions and variables, which is time-consuming and expensive. This limits its popularization in industrial applications and makes it difficult to realize real-time optimization and rapid decision-making. In actual oil exploitation, the interfacial tension is often not accurately predicted, resulting in high interfacial tension and poor oil displacement effect, and multiple exploitation operations have to be performed, which not only increases the exploitation cost but also reduces the oil exploitation efficiency and affects the oil production.

[0004] Therefore, how to avoid multiple exploitation operations due to the inability to accurately predict the interfacial tension and high interfacial tension leading to poor oil displacement effect, thereby reducing the oil exploitation efficiency, becomes a technical problem to be solved. SUMMARY

[0005] In the embodiments of the present application, by providing an interfacial tension prediction method based on machine learning and molecular dynamics, the optimal surfactant configuration that minimizes the interfacial tension is found, and the technical problem of how to avoid multiple exploitation operations due to the inability to accurately predict the interfacial tension and high interfacial tension leading to poor oil displacement effect, thereby reducing the oil exploitation efficiency, is solved.

[0006] In a first aspect, the embodiments of the present application provide an interfacial tension prediction method based on machine learning and molecular dynamics, which comprises: constructing a mixed system model comprising CO2, surfactant molecules and crude oil, defining the number of main chains, the number of branched chains, the type of functional groups and the concentration of the surfactant as a variable set, setting different temperature and pressure conditions, simulating the mixed system model by using a molecular dynamics software, obtaining simulation data and interfacial tension data under different temperature and pressure conditions; preprocessing the simulation data and the interfacial tension data; taking the temperature, the pressure and the variable set as input features, taking the data set formed by integrating the preprocessed simulation data and the interfacial tension data as training samples, taking the interfacial tension as a target variable, training a LightGBM model by using a weighted mean square error loss function to obtain a prediction model; initializing a particle swarm, each particle representing a configuration of a surfactant, maintaining the same conditions as the input features, the position of the particle corresponding to the parameter value in the configuration of the surfactant, and the velocity of the particle being the step and direction of the configuration of the surfactant moving in the parameter space; obtaining the predicted interfacial tension corresponding to each particle by using the prediction model, iteratively updating the velocity and position of the particle based on the predicted interfacial tension corresponding to each particle, until a preset maximum number of iterations is reached, obtaining an optimal configuration of the surfactant that minimizes the interfacial tension; performing molecular dynamics simulation using the optimal configuration of the surfactant, maintaining the same conditions as the input features, obtaining a simulated interfacial tension, and evaluating the optimization effect of the optimal configuration of the surfactant based on the simulated interfacial tension.

[0007] In a possible implementation, the preprocessing comprises: performing standardization or normalization processing on the simulation data and the interfacial tension data; obtaining abnormal values or error data in the simulation data and the interfacial tension data, and supplementing missing data by using an interpolation method.

[0008] In a possible implementation, the expression of the weighted mean square error loss function is: ; wherein, the weighted mean square error is, the total number of data points contained in the data set, the weight factor of the i th data point, the true interfacial tension of the i th data point, the predicted interfacial tension of the i th data point. In a possible implementation, the velocity of the particle is iteratively updated based on the predicted interfacial tension corresponding to each particle; wherein, the velocity of the particle in the j th iteration is,

[0009] In a possible implementation, the velocity of the particle is iteratively updated based on the predicted interfacial tension corresponding to each particle; wherein, the velocity of the particle in the j th iteration is, the velocity of the particle in the j th iteration is, the velocity of the particle in the j th iteration is, ​The velocity of each particle represents the step size and direction in which the surfactant configuration moves in the parameter space. For inertial weights, For the first During the nth iteration, the 1st The speed of each particle For the first Individual learning factor at each iteration and Let [the number] be a random number uniformly distributed in the interval [0,1]. For the first The historical best position of each particle For the first During the nth iteration, the 1st The position of each particle corresponds to the parameter value in the surfactant formulation. For the first Social learning factor at the next iteration The optimal position globally. As a weighting factor, For target interface tension, The predicted interfacial tension for each particle. For feedback weights; based on Iteratively update the particle's position; where, For the first During the nth iteration, the 1st The position of each particle; after reaching the preset maximum number of iterations, the globally optimal position is used as the optimal surfactant configuration to minimize interfacial tension.

[0010] In one possible implementation, based on Determine the first The individual learning factor at the next iteration; where... For the first The individual learning factor in each iteration determines the step size weight by which a particle moves towards its historical best position. This represents the maximum value of the individual learning factor. This represents the minimum value of the individual learning factor. The preset maximum number of iterations, This represents the current iteration number; based on Determine the first The social learning factor at the next iteration; where... For the first The social learning factor at each iteration determines the step size weight for a particle to move towards the group's historical best position. This represents the maximum value of the social learning factor. This represents the minimum value of the social learning factor.

[0011] In one possible implementation, the optimization effect of evaluating the configuration of the optimal surfactant based on simulated interfacial tension includes: obtaining an optimization effect evaluation index based on the target interfacial tension and the simulated interfacial tension; if the optimization effect evaluation index is less than or equal to a preset threshold, the configuration of the optimal surfactant is taken as the final configuration; if the optimization effect evaluation index is greater than the preset threshold, the velocity and position of the particles are iteratively updated again based on the predicted interfacial tension corresponding to each particle until the error is less than or equal to the preset threshold, and the final configuration is obtained.

[0012] In one possible implementation, based on Obtain evaluation metrics for optimization effectiveness; among which, To optimize the performance evaluation indicators, For target interface tension, To simulate interface tension.

[0013] Secondly, embodiments of this application provide an interfacial tension prediction device based on machine learning and molecular dynamics. The device includes: a simulation module for constructing a mixed system model comprising CO2, surfactant molecules, and crude oil, defining the main chain number, branch number, functional group type, and concentration of the surfactant as a variable set, setting different temperature and pressure conditions, simulating the mixed system model using molecular dynamics software, and acquiring simulation data and interfacial tension data under different temperature and pressure conditions; a preprocessing module for preprocessing the simulation data and interfacial tension data; and a training module for using temperature, pressure, and the variable set as input features, integrating the preprocessed simulation data and interfacial tension data into a dataset as training samples, using interfacial tension as the target variable, and training the Lig using a weighted mean square error loss function. The htGBM model is used to obtain a prediction model; a definition module is used to initialize the particle swarm, where each particle represents a surfactant configuration, maintaining the same conditions as the input features. The position of the particle corresponds to the parameter value in the surfactant configuration, and the velocity of the particle is the step size and direction of the surfactant configuration moving in the parameter space; an acquisition module is used to obtain the predicted interfacial tension corresponding to each particle using the prediction model, and iteratively updates the velocity and position of the particle based on the predicted interfacial tension of each particle until a preset maximum number of iterations is reached to obtain the optimal surfactant configuration that minimizes the interfacial tension; an evaluation module is used to perform molecular dynamics simulations using the optimal surfactant configuration, maintaining the same conditions as the input features, to obtain the simulated interfacial tension, and to evaluate the optimization effect of the optimal surfactant configuration based on the simulated interfacial tension.

[0014] Thirdly, embodiments of this application provide an interfacial tension prediction server based on machine learning and molecular dynamics, including a memory and a processor; the memory is used to store computer-executable instructions; the processor is used to execute the computer-executable instructions to implement the method described in the first aspect or any possible implementation of the first aspect.

[0015] Fourthly, embodiments of this application provide a computer-readable storage medium storing executable instructions, which, when executed by a computer, enable the method described in the first aspect or any possible implementation thereof.

[0016] The one or more technical solutions provided in this application embodiment have at least the following technical effects: This application embodiment provides an interfacial tension prediction method based on machine learning and molecular dynamics. A mixed system model including CO2, surfactant molecules, and crude oil is constructed. Surfactant-related parameters are defined as a variable set. Simulation is performed using molecular dynamics software under different temperature and pressure conditions to obtain simulation data and interfacial tension data, which are then preprocessed. Using temperature, pressure, and the variable set as input features, and interfacial tension as the target variable, a LightGBM model is trained using a weighted mean square error loss function to obtain a prediction model. A particle swarm is initialized, with each particle representing a surfactant configuration. The prediction model is used to obtain the predicted interfacial tension corresponding to each particle. Based on this, the particle velocity and position are iteratively updated to obtain the optimal surfactant configuration that minimizes interfacial tension. The optimal surfactant configuration is used for simulation again to obtain the simulated interfacial tension and evaluate the optimization effect. This application solves the technical problem of how to avoid multiple extraction operations due to inaccurate interfacial tension prediction and excessively high interfacial tension leading to poor oil displacement, thus resulting in low oil extraction efficiency. Attached Figure Description

[0017] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments of this application or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 A flowchart illustrating an interfacial tension prediction method based on machine learning and molecular dynamics, provided for embodiments of this application;

[0019] Figure 2 A schematic diagram of an interfacial tension prediction device based on machine learning and molecular dynamics provided in an embodiment of this application;

[0020] Figure 3 This is a schematic diagram of an interface tension prediction server based on machine learning and molecular dynamics, provided as an embodiment of this application. Detailed Implementation

[0021] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.

[0022] The following description of some technologies involved in the embodiments of this application is provided to aid understanding and should be considered merely exemplary. Therefore, those skilled in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this application. Similarly, for clarity and brevity, some descriptions of well-known functions and structures are omitted in the following description.

[0023] This application provides a method for predicting interfacial tension based on machine learning and molecular dynamics, such as... Figure 1 As shown, the method includes steps S101 to S106. Wherein, Figure 1 This is merely one execution order shown in the embodiments of this application and does not represent the only execution order for an interfacial tension prediction method based on machine learning and molecular dynamics. Where the final result can be achieved, Figure 1 The steps shown can be performed in parallel or in reverse order.

[0024] S101: Construct a mixed system model including CO2, surfactant molecules and crude oil. Define the number of main chains, number of branches, functional group types and concentrations of surfactants as a variable set. Set different temperature and pressure conditions, use molecular dynamics software to simulate the mixed system model, and obtain simulation data and interfacial tension data under different temperature and pressure conditions.

[0025] Specifically, in simulating CO2-enhanced oil recovery scenarios in deep oilfields, CO2 molecules, specific types of surfactant molecules, and representative crude oil molecules can be placed in a simulated space according to a certain proportion. The size and shape of the simulated space are set according to actual research needs, such as a cubic space with side lengths determined by the scale of the simulation system. The number of main chains determines the basic skeleton length of surfactant molecules, and different numbers of main chains affect their adsorption and arrangement at the oil-water interface; the number of branches affects the spatial structure and hydrophobicity of surfactant molecules; the type of functional groups (such as carboxyl, amino, alkyl, aromatic groups, etc.) endows surfactants with different chemical properties, thus affecting their interaction with CO2 and crude oil; the surfactant concentration is directly related to its aggregation degree at the interface and its effect on reducing interfacial tension. For example, the number of main chains can be set to 2-10 repeating units, the number of branches to 0-5, common functional groups such as carboxyl and amino groups can be selected, and the concentration range can be set between 0.1% and 5%.

[0026] Specifically, temperature is a crucial factor influencing the interaction between surfactants and the oil and water phases. Referring to the formation temperature range in actual oilfield production, which typically ranges from 50°C to 200°C, and even higher for supercritical CO2 enhanced oil recovery (EOR) processes, simulations usually select a temperature range between 80°C and 150°C. For example, simulations can be conducted at temperatures of 80°C, 100°C, 120°C, and 150°C to study the effect of temperature on interfacial tension. At higher temperatures, molecular kinetic energy increases, altering the interactions between surfactant molecules and affecting their adsorption capacity and stability at the oil-water interface, as well as the critical micelle concentration (CMC), thus impacting the reduction of interfacial tension. Pressure not only affects the solubility of CO2 but also determines its fluidity and changes in interfacial tension. Referring to the formation pressure range in actual oilfield production, especially in deep oilfields, formation pressure can be very high, typically ranging from 50 MPa to 200 MPa, with even higher pressures in ultra-deep oilfields. Therefore, simulation pressure conditions are usually set between 50 MPa and 150 MPa to reflect changes in the actual production environment. For example, simulations can be conducted with pressures set at 50 MPa, 80 MPa, 110 MPa, and 150 MPa respectively. Under high pressure conditions, the solubility of CO2 increases, and the interfacial tension decreases accordingly. Simultaneously, increased pressure can promote CO2 dissolution and enhance the activity of surfactants at the interface.

[0027] In actual oilfield development, temperature and pressure often affect the performance of surfactants simultaneously. In particular, during CO2 flooding, temperature and pressure jointly determine the state of CO2, the solubility of surfactants, and changes in interfacial tension.

[0028] The molecular dynamics software used in this application is LAMMPS. Classical force fields (such as CHARMM, OPLS, or UFF force fields) can be used to describe intermolecular interactions. Different force fields are suitable for different types of molecular systems, and have different computational accuracies and efficiencies.

[0029] Specifically, molecular dynamics simulations are used to collect interfacial tension data under different main chain numbers, functional group types, branch number, concentrations, temperatures, and pressures. Each data point will include the main chain number, functional group number, branch number, concentration, temperature, pressure, and the corresponding interfacial tension value. The simulation data in this application can include local density, molecular arrangement in the interfacial region, etc.

[0030] S102: Preprocess the simulation data and interface tension data.

[0031] Preprocessing includes the following.

[0032] The simulation data and interface tension data are standardized or normalized.

[0033] Specifically, after obtaining the simulation data and interfacial tension data, the first step is to standardize or normalize the data. This step aims to eliminate the influence of different units of measurement on data analysis, making different features numerically comparable, thereby improving the model's training efficiency and prediction accuracy. Z-score standardization can be used to standardize the data for each feature. If the numerical ranges of some features differ significantly, and the influence of these features on interfacial tension has a non-linear relationship, the Min-Max normalization method can be considered.

[0034] Obtain outliers or erroneous data from the simulation data and interface tension data, and use interpolation methods to supplement the missing data.

[0035] For example, if a temperature value is found to be missing in a dataset, the KNN interpolation method can be used to interpolate and supplement it using the temperature values ​​of similar samples (such as samples with similar main chain counts, branch counts, and functional group types).

[0036] S103: Using temperature, pressure, and variable sets as input features, the dataset formed by integrating preprocessed simulation data and interfacial tension data is used as training samples. With interfacial tension as the target variable, the LightGBM model is trained using a weighted mean square error loss function to obtain the prediction model.

[0037] The expression for the weighted mean squared error loss function is: .in, For weighted mean square error, The total number of data points contained in the dataset. For the first Weighting factors for each data point For the first The true interface tension of each data point For the first The predictive interface tension of each data point.

[0038] Specifically, the LightGBM model is a high-performance distributed gradient boosting decision tree model based on a gradient boosting framework, employing a histogram-based decision tree algorithm, and supporting efficient parallel training.

[0039] The input features specifically include temperature, pressure, and the number of main chains, branches, functional group types, and concentrations. The dataset formed by integrating the preprocessed simulated data and interfacial tension data serves as the training sample. Each data point in the dataset contains the input features and the corresponding target variable values: temperature, pressure, number of main chains, number of branches, functional group type, concentration, and interfacial tension value.

[0040] Specifically, weighting factors The design follows these principles: For data points with low interfacial tension (e.g., less than 10 mN / m), higher weights are assigned to reduce the impact of prediction errors on the optimization results. For data points with high interfacial tension (e.g., greater than 30 mN / m), lower weights are assigned to allow for larger prediction errors while ensuring the stability of the model over a large numerical range. .in, It is a small constant (e.g.) ), used to avoid division by zero errors.

[0041] Specifically, during training, the LightGBM model will automatically adjust the splitting strategy and node weights of the decision tree based on the relationship between the input features and the target variable in order to minimize the weighted mean square error.

[0042] Furthermore, this application also employs root mean square error (RMSE) and coefficient of determination (R²). 2 The model is evaluated using metrics such as _____. These metrics measure the difference between the model's predicted values ​​and the actual values, reflecting the model's prediction accuracy and good fit. K-fold cross-validation and other methods are used to validate the model. The dataset is divided into multiple subsets, with each subset used sequentially as the validation set and the remaining subsets as the training set. The RMSE and R-squared values ​​for each subset are calculated. 2 The RMSE is used to evaluate the model's performance on different subsets of data, ensuring the model's stability and generalization ability. If the model's RMSE is less than the threshold of 0.1 on all subsets and R0.1... 2 If all values ​​are greater than the set value of 0.8, the model is considered to have passed validation; otherwise, the model needs to be adjusted and optimized.

[0043] S104: Initialize the particle swarm. Each particle represents a surfactant configuration, maintaining the same conditions as the input features. The position of the particle corresponds to the parameter value in the surfactant configuration, and the velocity of the particle is the step size and direction in which the surfactant configuration moves in the parameter space.

[0044] Specifically, the parameter values ​​in the formulation of surfactants include the number of main chains, the number of branches, the type of functional groups, and the concentration of the surfactant.

[0045] Specifically, the number of main chains is set to range from 1 to 10, the number of branches to range from 0 to 5, and the functional group types include carboxyl, amino, alkyl, and aromatic groups, with the concentration ranged from 0.1 mol / L to 1 mol / L. During particle swarm initialization, the position of each particle corresponds to a combination of these parameter values. For example, the position of a certain particle could correspond to a surfactant configuration with a main chain number of 5, a branch number of 2, a functional group type of carboxyl and amino, and a concentration of 0.5 mol / L.

[0046] Specifically, taking the main chain number parameter as an example, if a particle has a positive and large velocity in this dimension, it means that in subsequent iterations, the surfactant configuration represented by this particle will rapidly move in the direction of increasing main chain number. Conversely, if the velocity is negative and small, it indicates that the parameter will slowly move in the direction of decreasing value. Similarly, velocity plays a similar guiding role for other parameters such as branch number, functional group type, and concentration, determining the particle's movement trend in the parameter space. This initialization setting lays the foundation for subsequent particle search and optimization in the solution space, enabling each particle to start from different initial states and comprehensively explore possible combinations of surfactant configurations.

[0047] S105: Use the prediction model to obtain the predicted interfacial tension for each particle, and iteratively update the particle's velocity and position based on the predicted interfacial tension for each particle until the preset maximum number of iterations is reached, and obtain the optimal surfactant configuration that minimizes the interfacial tension.

[0048] based on The particle velocity is iteratively updated. Among them, For the first During the nth iteration, the 1st The velocity of each particle represents the step size and direction in which the surfactant configuration moves in the parameter space. For inertial weights, For the first During the nth iteration, the 1st The speed of each particle For the first Individual learning factor at each iteration and Let [the number] be a random number uniformly distributed in the interval [0,1]. For the first The historical best position of each particle For the first During the nth iteration, the 1st The position of each particle corresponds to the parameter value in the surfactant formulation. For the first Social learning factor at the next iteration The optimal position globally. As a weighting factor, For target interface tension, The predicted interfacial tension for each particle. For feedback weights.

[0049] The first in this application The historical best position of each particle This can be understood as the configuration of the surfactant that minimizes interfacial tension found by the particle in all previous iterations.

[0050] ;in, It is a small constant (e.g.) ), used to avoid division by zero errors.

[0051] ;in, It is a small constant (e.g.) ), used to avoid division by zero errors.

[0052] based on Determine the first The individual learning factor at the next iteration. For the first The individual learning factor in each iteration determines the step size weight by which a particle moves towards its historical best position. This represents the maximum value of the individual learning factor. This represents the minimum value of the individual learning factor. The preset maximum number of iterations, This represents the current iteration number.

[0053] Specifically, as the number of iterations increases, the individual learning factor gradually decreases from its maximum value to its minimum value, allowing the particles to fully explore the solution space in the early stages of optimization, while in the later stages, more emphasis is placed on fine-tuning the local optimal solution.

[0054] based on Determine the first The social learning factor at the next iteration. For the first The social learning factor at each iteration determines the step size weight for a particle to move towards the group's historical best position. This represents the maximum value of the social learning factor. This represents the minimum value of the social learning factor.

[0055] based on Iteratively update the particle's position. Among them, For the first During the nth iteration, the 1st The position of each particle.

[0056] After reaching the preset maximum number of iterations of 500 rounds, the globally optimal position is used as the optimal surfactant configuration to minimize interfacial tension.

[0057] In this application, the global optimal position can be understood as the configuration of the surfactant that minimizes interfacial tension found by the entire particle swarm in all previous iterations.

[0058] S106: Perform molecular dynamics simulations using the optimal surfactant configuration, maintaining the same conditions as the input features, obtain the simulated interfacial tension, and evaluate the optimization effect of the optimal surfactant configuration based on the simulated interfacial tension.

[0059] The optimization effect of the optimal surfactant configuration is evaluated based on simulated interfacial tension, including the following:

[0060] Evaluation metrics for optimization effects are obtained based on target interface tension and simulated interface tension.

[0061] Specifically, the magnitude of the optimization effect evaluation index reflects how close the optimal surfactant configuration is to the target value, i.e., the target interfacial tension, in terms of reducing interfacial tension.

[0062] If the optimization effect evaluation index is less than or equal to the preset threshold of 0.01, the configuration of the optimal surfactant will be used as the final configuration.

[0063] If the optimization effect evaluation index is greater than the preset threshold, the velocity and position of the particles are iteratively updated based on the predicted interface tension corresponding to each particle until the error is less than or equal to the preset threshold, and the final configuration is obtained.

[0064] based on Obtain the evaluation metrics for the optimization effect. Among them, To optimize the performance evaluation indicators, For target interface tension, To simulate interface tension.

[0065] This application also provides an interfacial tension prediction device 200 based on machine learning and molecular dynamics, such as... Figure 2 As shown, the device includes: a simulation module 201, a preprocessing module 202, a training module 203, a definition module 204, an acquisition module 205, and an evaluation module 206.

[0066] The simulation module 201 is used to construct a mixed system model including CO2, surfactant molecules and crude oil. The number of main chains, number of branches, functional group types and concentrations of surfactants are defined as a set of variables. Different temperature and pressure conditions are set, and molecular dynamics software is used to simulate the mixed system model to obtain simulation data and interfacial tension data under different temperature and pressure conditions.

[0067] The preprocessing module 202 is used to preprocess the simulation data and interface tension data.

[0068] The training module 203 is used to train the LightGBM model with temperature, pressure and variable set as input features, and integrate the preprocessed simulation data and interface tension data into a dataset as training samples, with interface tension as the target variable, and using the weighted mean square error loss function to obtain the prediction model.

[0069] The definition module 204 is used to initialize the particle swarm. Each particle represents a surfactant configuration, maintaining the same conditions as the input features. The position of the particle corresponds to the parameter value in the surfactant configuration, and the velocity of the particle is the step size and direction in which the surfactant configuration moves in the parameter space.

[0070] The acquisition module 205 is used to acquire the predicted interfacial tension for each particle using the prediction model, and iteratively update the particle's velocity and position based on the predicted interfacial tension for each particle until the preset maximum number of iterations is reached, thereby acquiring the optimal surfactant configuration that minimizes the interfacial tension.

[0071] Evaluation module 206 is used to perform molecular dynamics simulations using the optimal surfactant configuration, maintaining the same conditions as the input features, to obtain the simulated interfacial tension, and to evaluate the optimization effect of the optimal surfactant configuration based on the simulated interfacial tension.

[0072] Some modules in the apparatus described in this application can be described in the general context of computer-executable instructions that are executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, classes, etc., that perform a specific task or implement a specific abstract data type. This application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.

[0073] The apparatus or module described in the above embodiments can be implemented by a computer chip or physical entity, or by a product with a certain function. For ease of description, the above apparatus is described by dividing it into various modules according to their functions. When implementing the embodiments of this application, the functions of each module can be implemented in one or more software and / or hardware. Of course, a module that implements a certain function can also be implemented by combining multiple sub-modules or sub-units.

[0074] The methods, apparatus, or modules described in this application can be implemented in a computer-readable program code manner. The controller can be implemented in any suitable manner, for example, as a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicon Labs C8051F320. A memory controller can also be implemented as part of the control logic of a memory. Those skilled in the art will also recognize that, in addition to implementing the controller in purely computer-readable program code manner, the same functionality can be achieved by logically programming the method steps to make the controller take the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers. Therefore, such a controller can be considered a hardware component, and the means included within it for implementing various functions can also be considered as structures within the hardware component. Alternatively, the device used to implement various functions can be viewed as either a software module that implements the method or a structure within a hardware component.

[0075] like Figure 3As shown in the figure, this application embodiment also provides an interface tension prediction server based on machine learning and molecular dynamics, including a memory 301 and a processor 302; the memory 301 is used to store computer-executable instructions; the processor 302 is used to execute the computer-executable instructions to realize the interface tension prediction method based on machine learning and molecular dynamics described above in this application embodiment.

[0076] This application also provides a computer-readable storage medium storing executable instructions, which, when executed by a computer, enable the implementation of the interfacial tension prediction method based on machine learning and molecular dynamics described above in this application.

[0077] As can be seen from the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary hardware. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product, or it can be embodied in the process of data migration. The computer software product can be stored in a storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, mobile terminal, server, or network device, etc.) to execute the methods described in the embodiments of this application.

[0078] The various embodiments described in this specification are presented in a progressive manner. Similar or identical parts between embodiments can be referred to interchangeably. Each embodiment focuses on its differences from other embodiments. All or part of this application can be used in numerous general-purpose or special-purpose computer system environments or configurations.

[0079] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit this application. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of this application.

Claims

1. A method for predicting interfacial tension based on machine learning and molecular dynamics, characterized in that, include: A mixed system model including CO2, surfactant molecules and crude oil was constructed. The number of main chains, number of branches, functional group type and concentration of surfactant were defined as the variable set. Different temperature and pressure conditions were set, and molecular dynamics software was used to simulate the mixed system model to obtain simulation data and interfacial tension data under different temperature and pressure conditions. Preprocess the simulation data and interface tension data; Using temperature, pressure, and variable set as input features, the dataset formed by integrating preprocessed simulation data and interfacial tension data is used as training samples. With interfacial tension as the target variable, the LightGBM model is trained using the weighted mean square error loss function to obtain the prediction model. Initialize the particle swarm, where each particle represents a surfactant configuration, maintaining the same conditions as the input features. The position of the particle corresponds to the parameter value in the surfactant configuration, and the velocity of the particle is the step size and direction in which the surfactant configuration moves in the parameter space. The predicted interfacial tension for each particle is obtained using a predictive model. The velocity and position of the particles are iteratively updated based on the predicted interfacial tension for each particle until the preset maximum number of iterations is reached, thereby obtaining the optimal surfactant configuration that minimizes the interfacial tension. Molecular dynamics simulations were performed using the optimal surfactant configuration, maintaining the same conditions as the input features, to obtain the simulated interfacial tension. The optimization effect of the optimal surfactant configuration was then evaluated based on the simulated interfacial tension.

2. The interfacial tension prediction method based on machine learning and molecular dynamics according to claim 1, characterized in that, The preprocessing includes: The simulation data and interfacial tension data are standardized or normalized. Obtain outliers or erroneous data from the simulation data and interface tension data, and use interpolation methods to supplement the missing data.

3. The interfacial tension prediction method based on machine learning and molecular dynamics according to claim 1, characterized in that, The expression for the weighted mean squared error loss function is: ;in, For weighted mean square error, The total number of data points contained in the dataset. For the first Weighting factors for each data point For the first The true interface tension of each data point For the first The predictive interface tension of each data point.

4. The interfacial tension prediction method based on machine learning and molecular dynamics according to claim 1, characterized in that, based on Iteratively update the particle velocity; where, For the first During the nth iteration, the 1st The velocity of each particle represents the step size and direction in which the surfactant configuration moves in the parameter space. For inertial weights, For the first During the nth iteration, the 1st The speed of each particle For the first Individual learning factor at each iteration and Let [the number] be a random number uniformly distributed in the interval [0,1]. For the first The historical best position of each particle For the first During the nth iteration, the 1st The position of each particle corresponds to the parameter value in the surfactant formulation. For the first Social learning factor at the next iteration The optimal position globally. As a weighting factor, For target interface tension, The predicted interfacial tension for each particle. For feedback weights; based on Iteratively update the particle's position; where, For the first During the nth iteration, the 1st The position of each particle; After reaching the preset maximum number of iterations, the globally optimal position is used as the optimal surfactant configuration to minimize interfacial tension.

5. The interfacial tension prediction method based on machine learning and molecular dynamics according to claim 4, characterized in that, based on Determine the first The individual learning factor at the next iteration; where... For the first The individual learning factor in each iteration determines the step size weight by which a particle moves towards its historical best position. This represents the maximum value of the individual learning factor. This represents the minimum value of the individual learning factor. The preset maximum number of iterations, This represents the current iteration number; based on Determine the first The social learning factor at the next iteration; where... For the first The social learning factor at each iteration determines the step size weight for a particle to move towards the group's historical best position. This represents the maximum value of the social learning factor. This represents the minimum value of the social learning factor.

6. The interfacial tension prediction method based on machine learning and molecular dynamics according to claim 1, characterized in that, The optimization effect of evaluating the optimal surfactant configuration based on simulated interfacial tension includes: Evaluation metrics for optimization effects are obtained based on target interface tension and simulated interface tension. If the optimization effect evaluation index is less than or equal to the preset threshold, the configuration of the optimal surfactant will be used as the final configuration. If the optimization effect evaluation index is greater than the preset threshold, the velocity and position of the particles are iteratively updated based on the predicted interface tension corresponding to each particle until the error is less than or equal to the preset threshold, and the final configuration is obtained.

7. The interfacial tension prediction method based on machine learning and molecular dynamics according to claim 6, characterized in that, based on Obtain evaluation metrics for optimization effectiveness; among which, To optimize the performance evaluation indicators, For target interface tension, To simulate interface tension.

8. A device for predicting interfacial tension based on machine learning and molecular dynamics, characterized in that, The device performs the method as described in any one of claims 1 to 7, including: The simulation module is used to construct a mixed system model including CO2, surfactant molecules and crude oil. The number of main chains, number of branches, functional group types and concentrations of surfactants are defined as a variable set. Different temperature and pressure conditions are set, and molecular dynamics software is used to simulate the mixed system model to obtain simulation data and interfacial tension data under different temperature and pressure conditions. The preprocessing module is used to preprocess the simulation data and interface tension data; The training module is used to train the LightGBM model with temperature, pressure and variable set as input features, and integrate the preprocessed simulation data and interface tension data into a dataset as training samples. With interface tension as the target variable, the weighted mean square error loss function is used to train the prediction model. Define a module to initialize the particle swarm. Each particle represents a surfactant configuration, maintaining the same conditions as the input features. The position of the particle corresponds to the parameter value in the surfactant configuration, and the velocity of the particle is the step size and direction in which the surfactant configuration moves in the parameter space. The acquisition module is used to acquire the predicted interfacial tension for each particle using the prediction model, and iteratively update the particle's velocity and position based on the predicted interfacial tension for each particle until the preset maximum number of iterations is reached, thereby acquiring the optimal surfactant configuration that minimizes the interfacial tension. The evaluation module is used to perform molecular dynamics simulations using the optimal surfactant configuration, maintaining the same conditions as the input features, to obtain the simulated interfacial tension, and to evaluate the optimization effect of the optimal surfactant configuration based on the simulated interfacial tension.

9. A server for predicting interfacial tension based on machine learning and molecular dynamics, characterized in that, Including memory and processor; The memory is used to store computer-executable instructions; The processor is configured to execute the computer-executable instructions to implement the method according to any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores executable instructions, which, when executed by a computer, enable the implementation of the method as described in any one of claims 1-7.

Citation Information

Patent Citations

  • Research method for surfactant-CO2-crude oil mixed-phase interface behavior

    CN115326647A

  • Methods and systems for nanobubble generation and use

    WO2024206445A2