A method for accelerating molecular dynamics simulation of nanopore high pressure displacement
By optimizing the equivalent mass of atomic walls, molecular differential constraints, and local damping treatment, the problems of low computational efficiency and easy collapse in the simulation of pressure difference displacement in nanopores under high pressure are solved, and stable and efficient simulation under high pressure is achieved, which is applicable to displacement processes such as CO2-EOR.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA UNIV OF PETROLEUM (EAST CHINA)
- Filing Date
- 2026-05-07
- Publication Date
- 2026-06-26
AI Technical Summary
Existing technologies suffer from low computational efficiency and are prone to crashing when simulating pressure displacement of multi-component fluids within nanopores under high pressure conditions, making it impossible to achieve stable and efficient simulations. Traditional methods struggle to obtain efficient solutions suitable for long-term production simulations under high pressure conditions.
By optimizing the equivalent mass of atomic walls, molecular differential constraint treatment, and local damping settings, a process combining stable establishment and long-term displacement simulation is formed. This includes constructing a pressure differential displacement simulation system, optimizing the equivalent mass of atomic walls, applying differential constraint treatment and local damping, and achieving stable and efficient simulation of the pressure differential displacement process.
Without altering the physical model, it significantly improves the simulation reliability and computational efficiency under high pressure, reduces the risk of energy surges and simulation collapse, and enhances overall computational efficiency and stability. It is applicable to displacement processes such as CO2-EOR under high pressure.
Smart Images

Figure CN122290740A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of molecular dynamics simulation technology, and in particular to a method for accelerating molecular dynamics simulations using high-pressure displacement within nanopores. Background Technology
[0002] In various fields such as petroleum engineering, geological engineering, materials science, and chemical engineering, the pressure differential displacement process of multi-component fluids within nanopores is a core research focus. Taking petroleum engineering as an example, CO2-EOR (enhanced carbon dioxide recovery) displacement processes typically occur under high-pressure environments, which are a key characteristic of the displacement process. Furthermore, applications such as shale gas extraction in geological engineering, permeability studies of porous materials in materials science, and supercritical fluid processing in chemical engineering also require pressure differential displacement simulations under high-pressure conditions. Molecular dynamics simulations are powerful tools for studying the flow and displacement processes of multi-component fluids within nanopores, but their effectiveness and accuracy highly depend on a simulation model that can realistically reflect actual displacement conditions. An ideal displacement simulation model must not only be able to apply different pressures at both ends of the pore to form a driving force, but also achieve stable and efficient simulations under high-pressure conditions. These characteristics directly determine the reliability of the simulation results and the computational efficiency.
[0003] Existing pressure control methods have significant limitations. On the one hand, traditional pressure control methods cannot achieve differential pressure displacement. For example, the NPT ensemble can only achieve overall isobaric pressure, failing to distinguish between upstream and downstream areas; fix wall / reflect only provides boundary reflection without applying pressure; fix press acts on the entire box; and the pressure difference generated by the Müller-Plathe method is uncontrollable and non-uniform. While using atomic wall structures can achieve controllable differential pressure displacement, on the other hand, under high-pressure conditions, the system is highly unstable, prone to energy explosions, bond breakage, and simulation collapse, forcing the time step to remain at a very small level for extended periods, resulting in extremely high computational time. The difficulty in "stable establishment and scaling of time steps" under high-pressure environments is a core challenge facing existing technologies. Traditional methods may operate stably under normal or low-pressure conditions, but under high-pressure environments, it is often difficult to obtain efficient solutions suitable for long-term production simulations.
[0004] To address the instability and inefficiency issues in the simulation of atomic wall displacement under high pressure, existing conventional solutions have significant drawbacks: continuously reducing the time step (e.g., 0.1~0.5fs) can lead to a 5~10-fold decrease in computational efficiency; increasing the energy minimization frequency can disrupt the continuity of dynamics; using soft potential energy functions can alter the physical model, resulting in distorted results; and using stronger constraint algorithms can increase computational overhead.
[0005] Therefore, there is an urgent need for an accelerated method that can achieve stable and efficient simulation of differential pressure displacement in high-pressure environments without sacrificing computational efficiency or changing the physical model. Summary of the Invention
[0006] To address the technical problems of low computational efficiency and susceptibility to crashes in high-pressure nanopore pressure displacement simulations, this invention discloses an accelerated molecular dynamics simulation method for high-pressure displacement within nanopores. This method, through key technical steps such as atomic wall equivalent mass optimization, molecular differential constraint processing, and local damping settings, is specifically optimized for high-pressure environments. It aims to establish a workflow that combines stable setup with long-term displacement simulation, thereby achieving stable and efficient pressure displacement molecular dynamics simulations without altering the physical model. This provides a high-quality and efficient simulation scheme for molecular dynamics studies of high-pressure displacement processes such as CO2-EOR, and significantly improves the reliability and computational efficiency of simulations under high-pressure environments. This invention is particularly suitable for high-pressure environments.
[0007] To achieve the above objectives, the present invention adopts the following technical solution: The first aspect of the present invention proposes a molecular dynamics simulation acceleration method for high-pressure displacement within nanopores, comprising the following steps: S1, constructing a pressure displacement simulation system: constructing an upstream atomic wall and a downstream atomic wall at both ends of the nanopore, respectively. The atomic walls are composed of fictitious atoms, whose atomic masses are optimizable parameters, used to apply different pressures at both ends of the pore; S2, performing comprehensive optimization of the equivalent atomic mass of the atomic walls based on energy analysis and motion coordination: setting an initial range [m] for the equivalent atomic mass of the atomic wall atoms. min ,m max Bayesian optimization was used for iterative optimization; each iteration involved a short pre-simulation, in which a pressure difference was applied to drive the process, and the maximum interaction energy between the atomic wall and fluid molecules was calculated. And the motion coordination index between the atomic wall and the fluid within a predetermined range near the wall; wherein, the motion coordination index includes at least the consistency of velocity direction. and speed difference ;according to , and The evaluation results determine the next candidate mass value until the preset convergence condition is met, thus obtaining the optimal atomic wall equivalent mass for pressure displacement simulation. S3. Differentiated constraint treatment of molecules in the system: Identify small and large molecules in the system; for small molecules that cannot be treated with the SHAKE algorithm (including but not limited to molecules with tetrahedral configuration), rigid body constraints are applied to maintain molecular geometry and improve numerical stability margin; for large molecules (such as C... 2+For alkanes and other macromolecules containing CH bonds, only CH bonds are subject to SHAKE constraints to preserve the flexibility of the molecular skeleton and improve numerical stability margin. The constraint treatment does not affect the correctness of the system or change the physicochemical properties of the molecules. It only improves the numerical stability margin by constraining bond lengths and bond angles. Rigid body constraints are implemented using the rigid / nvt / small command in LAMMPS, and SHAKE constraints are implemented using the fix shake command, which only constrains the CH bond type. S4, Apply pressure difference drive and perform accelerated simulation: Apply different constant forces to the upstream and downstream atomic walls to form a pressure difference and realize the pressure difference displacement process of the fluid. Since the motion coordination problem has been solved in the optimization stage in step S2, the pressure difference displacement process in this step includes a stability establishment stage and a production simulation stage. In the stability establishment stage, the first time step is used for pre-running to complete the steady state establishment, so that the system energy converges and the structure is complete. In the production simulation stage, a time step larger than the first time step is used to perform long-term pressure difference displacement simulation. Higher computational efficiency can be obtained without real-time monitoring and adjustment, while improving computational efficiency while keeping the physical model unchanged.
[0008] Optionally, in step S1, the crystal structure of the atomic wall is a face-centered cubic (fcc) structure.
[0009] Optionally, in step S2, according to , and The evaluation results determine the next candidate quality value until the preset convergence conditions are met, specifically including: consistency of velocity direction. Defined as the atomic wall velocity vector The average velocity vector of the fluid within a preset range near the wall scalar product: ;in, Used to characterize whether the atomic wall moves in the same direction as the fluid. >0 indicates that the atomic wall is in the same direction as the fluid motion. <0 indicates opposite directions of motion; speed difference The velocity vector of the atomic wall With the fluid average velocity vector The modulus of the difference is used to characterize the degree of velocity matching between the atomic wall and the fluid. A smaller value indicates a better speed match: .
[0010] Optionally, in step S2, the preset convergence condition includes: the maximum interaction energy between the atomic wall and the fluid molecules. Minimize, consistent velocity direction Greater than zero and speed difference Less than the preset threshold. The comprehensive objective function considers multiple objectives simultaneously ( minimize, maximize, (Minimization), the Gaussian process model continuously updates its understanding of the objective function based on historical evaluation results, intelligently selecting the next evaluation point by collecting and utilizing function balance exploration. Iterative optimization continues until energy fluctuations are minimized and motion coordination is optimal (e.g., >0 and <threshold), to obtain the optimal atomic wall equivalent mass .
[0011] Optionally, in step S2, the optimal atomic wall equivalent mass is 0.0001~0.01 g / mol.
[0012] Optionally, in step S3, small molecules are molecules that cannot be processed using the SHAKE algorithm, including but not limited to molecules with a tetrahedral configuration, which are subjected to rigid body constraints to suppress numerical divergence and abnormal energy fluctuations under high pressure conditions; large molecules include C 2+ For alkanes and other molecules containing CH bonds, only the CH bonds are shake-constrained to improve the numerical stability margin without changing the flexibility of the molecular skeleton.
[0013] Optionally, a molecular dynamics simulation acceleration method for high-pressure displacement within nanopores further includes the step of applying local viscous damping, defining an atomic wall and a region within a predetermined range nearby, applying viscous damping to the atoms in the atomic wall and the atoms in the region to suppress high-frequency oscillations and absorb excess energy, preventing energy transfer to the fluid region, thereby suppressing high-frequency oscillations and absorbing excess energy.
[0014] Alternatively, the mathematical form of viscous damping is: ;in, For damping force, The damping coefficient is... The atomic velocity is the velocity of the atomic wall at equilibrium, when the system reaches a steady state. tending to a constant value At this time, the damping force is: According to the force equilibrium condition, in the equilibrium state we have: ;in, The force generated by applying constant pressure, For pressure, Let the area be the atomic wall area; substituting into the above formula, we get: Therefore, when local viscous damping is applied in the boundary region and the system reaches a steady state, the damping only affects the velocity at which equilibrium is reached. However, it does not change the final equilibrium pressure. Therefore, it will not affect the actual pressure control.
[0015] Optionally, the viscous damping coefficient The value is 0.05~0.1, achieved through the LAMMPS fix viscous command.
[0016] The second aspect of this invention proposes a molecular dynamics simulation acceleration system for high-pressure displacement within nanopores, used to execute the steps of the method described in the first aspect of this invention. The system includes: a system construction module for constructing upstream and downstream atomic walls at both ends of the nanopores; an equivalent mass optimization module for performing comprehensive optimization of the equivalent atomic mass of the atomic walls based on energy analysis and motion coordination using Bayesian optimization; a constraint processing module for applying rigid body constraints to small molecules in the system and applying SHAKE constraints only to CH bonds of macromolecules; and a pressure difference driving module for applying different constant forces to the upstream and downstream atomic walls to form a pressure difference, and performing accelerated simulation using a phased time step.
[0017] A third aspect of the present invention provides a terminal configured with a memory and a processor, wherein the memory is adapted to store multiple instructions and the processor is adapted to call the instructions in the memory to execute the steps of implementing the method described in the first aspect of the present invention.
[0018] The beneficial effects of this invention are: (1) This invention addresses the problem of inertial mismatch between atomic walls and fluids during high-pressure nanoporous pressure differential displacement, which can lead to abnormal energy fluctuations and numerical instability. It proposes a joint evaluation and optimization scheme for the equivalent mass of atomic walls, using both the atomic wall-fluid interaction energy and motion coordination as the basis for mass determination, thereby obtaining atomic wall parameter settings more suitable for high-pressure pressure differential displacement simulation. Compared with existing methods that mainly rely on experience to set atomic wall mass, this invention can effectively reduce the risks of energy surges, reverse motion, and simulation collapse, and improve system stability. High-pressure environments are the core application scenario and advantage of this invention.
[0019] (2) By using molecular differential constraint processing, the numerical stability margin is improved while ensuring reasonable flexibility of the molecular skeleton, thereby improving the stability and overall computational efficiency of high pressure differential displacement simulation; the constraint processing will not affect the correctness of the system, will not change the physicochemical properties of the molecules, will not affect the academic accuracy, and avoids the problem of physical model distortion caused by the use of soft potential energy function.
[0020] (3) By setting local viscous damping in the atomic wall and its adjacent area, the present invention can locally dissipate the high-frequency oscillations and excess energy generated in the boundary region during the high-pressure displacement process, suppress the propagation of unstable disturbances to the main fluid region, thereby further improving the stability of the pressure difference displacement simulation and reducing the risk of bond breakage and simulation collapse caused by severe boundary oscillations.
[0021] (4) This invention achieves stable acceleration of the high-pressure nanopore pressure difference displacement simulation process without changing the physical model through the synergistic effect of atomic wall equivalent mass optimization, molecular differential constraint processing, and local damping control. Compared with the traditional method of maintaining simulation stability by using ultra-small time steps for a long time, this invention can support larger time steps and improve overall computational efficiency, while reducing repetitive calculations and manual intervention caused by frequent crashes, thus improving the automation level and engineering applicability of high-pressure simulation. Attached Figure Description
[0022] Figure 1 This is a schematic diagram of the molecular dynamics simulation acceleration method for high-pressure displacement within nanopores according to the present invention.
[0023] Figure 2 This is a schematic diagram of the simulated system architecture in an embodiment of the present invention, showing the relative positions of upstream and downstream atomic walls, pores, and fluid.
[0024] Figure 3 The target result for atomic wall quality optimization in this embodiment of the invention is shown, wherein (a) is and The result of indicator optimization, (b) is and Results of indicator optimization. Detailed Implementation
[0025] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention. Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to represent selected embodiments of the invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0026] Example 1: A molecular dynamics simulation acceleration method for high-pressure displacement within nanopores, such as... Figure 1As shown, the process includes the following steps: S1. Constructing a pressure displacement simulation system: In the computer system, an initial simulation system containing nanopores and fluid is first constructed. For example, in a CO2-EOR displacement simulation, a system containing silicate pores, CO2, and alkane fluid is constructed. Upstream and downstream atomic walls are constructed at the upstream and downstream ends of the pores, respectively. The atom types can be silicon atoms or carbon atoms, etc., and the crystal structure of the atomic walls is preferably a face-centered cubic (fcc) structure. The system will acquire the geometric parameters of the pores (such as length, width, and height) and determine the position and initial configuration of the atomic walls, providing a basis for subsequent steps. Figure 2 As shown, the upstream atomic wall and the downstream atomic wall are located at the two ends of the pore, respectively.
[0027] S2. Comprehensive optimization of the equivalent atomic mass of the atomic wall based on energy analysis and motion coordination: Based on the atomic wall settings obtained in step S1, the equivalent atomic mass of the atomic wall atoms is comprehensively optimized. The key innovation of this step is that motion coordination and energy spikes are considered in the acceleration preparation stage, which is the key bottleneck that limits the subsequent increase of time step. This step specifically includes: S2.1 Setting the initial mass search interval: Setting the initial range of the equivalent atomic mass of the atomic wall atoms [0.0001 g / mol, 1.0 g / mol], which covers the possible optimal mass range; S2.2 Selecting the optimization algorithm: Bayesian optimization is used for iterative optimization. Bayesian optimization uses a Gaussian process model to predict the objective function and intelligently selects the next evaluation point by collecting the function (such as the desired improvement of EI) to reduce the number of evaluations of candidate mass values; S2.3 Iterative optimization process: Bayesian optimization is used for iterative optimization. Each iteration includes: (1) Selecting candidate mass values according to the current model prediction results. (2) Use candidate masses to perform short-term pre-simulations with 10,000 to 50,000 simulation steps. Apply pressure difference driving (e.g., 50 MPa upstream and 5 MPa downstream) in the pre-simulation to simulate the displacement process; (3) Calculate the maximum interaction energy between the atomic wall and fluid molecules. , To determine the maximum interaction energy between atomic wall atoms and fluid molecules, the maximum value is taken by calculating the interaction energy between all atomic wall atoms and all fluid molecules; (4) Simultaneously calculate the motion coordination index: identify fluid molecules within a 10 Å range near the wall and monitor the motion velocity vector of the atomic wall. and the average velocity vector of the fluid in this region Consistency in the direction of calculation speed and speed difference (5) Comprehensive evaluation: The Pareto optimization strategy is used to optimize multiple objectives simultaneously: minimize, Maximize (maximize the consistency of velocity direction) Minimize (minimize velocity difference), add the evaluation results to the historical dataset; (6) Update the Gaussian process model: update the Gaussian process model based on the historical evaluation results. The model continuously learns the characteristics of the objective function, predicts the objective function value and uncertainty of unevaluated points, and provides information for the next iteration; S2.4, Convergence judgment: repeat step (3) until the maximum interaction energy between the atomic wall and the fluid molecules. Minimize and optimize motion coordination (e.g.) Threshold, >0 and The optimal atomic wall equivalent quality is obtained when the threshold is reached, or when the convergence condition is met (such as reaching the maximum number of iterations or the change in the comprehensive objective function is less than the preset threshold). .
[0028] Typically, for an atomic wall composed of approximately 4032 atoms, conventional masses (1–10 g / mol) can cause simulation failures, particularly due to the tendency for the atomic wall to move in the opposite direction to the fluid motion within a 10 Å radius of the wall. Through comprehensive optimization, the optimal equivalent mass can be found to be on the order of 0.0001 g / mol, while maintaining good motion coordination at this mass. The maximum interaction energy between the optimized atomic wall and fluid molecules is... The pressure drop was significantly reduced, and the motion coordination index reached a better level, allowing the system to reach a stable state more quickly and providing conditions for subsequent long-term differential pressure displacement simulations. By addressing the motion coordination issue during the accelerated preparation phase, subsequent long-term simulations do not require real-time adjustments, reducing the risk of simulation failure.
[0029] S3. Differentiated Constraint Treatment of Molecules in the System: This step aims to ensure simulation stability while preserving reasonable flexibility of the molecules. The core purpose of constraint treatment is to improve system stability without affecting the accuracy of the system or changing the physicochemical properties of the molecules. Numerical stability is improved solely by constraining bond lengths and bond angles, thereby avoiding simulation collapse under high pressure. For each molecule in the system, an appropriate constraint method is selected based on its structural characteristics.
[0030] (1) Identifying small molecules: Identify small molecules in the system. Small molecules are defined as molecules that cannot be used with the SHAKE algorithm, including but not limited to molecules with a tetrahedral configuration. For these small molecules that cannot be used with the SHAKE algorithm, rigid body constraints are used, which are implemented by the rigid / nvt / small command of LAMMPS to keep the molecular geometry unchanged. This rigid body constraint aims to improve the stability of the system and will not affect the correctness of the system. It only improves the numerical stability by fixing the internal geometry of the molecules; (2) Identifying macromolecules: Identify macromolecules in the system, such as C 2+Alkanes and other macromolecules containing CH bonds. For macromolecules, only CH bonds are constrained to preserve the flexibility of the molecular skeleton, thereby improving numerical stability while taking into account the molecular structural characteristics; (3) Applying constraints: Using the fix shake command of LAMMPS, only CH bond types are subject to SHAKE constraints, with a constraint tolerance of 1.0e-4 and a maximum number of iterations of 100.
[0031] After traversing all molecules, a system with differentiated constraints is formed, making it easier to reach a stable state and support long-term differential pressure displacement simulations. To improve the processing efficiency of large-scale systems, the entire constraint identification process is preferably completed using parallel computing.
[0032] S4. Apply pressure differential and perform accelerated simulation: The system formed in step S3 has atomic walls with suitable equivalent mass and constraints, and the motion coordination problem was solved in the optimization stage in step S2. Therefore, this step applies different constant forces to the upstream and downstream atomic walls to form a pressure difference and realize the pressure differential displacement process of the fluid. This step uses the LAMMPS fix addforce command to apply the constant force.
[0033] Calculate the required constant force based on the target pressure (e.g., 50 MPa upstream, 5 MPa downstream) and the atomic wall area. ,in, For pressure, The area represents the atomic wall area. Molecular dynamics simulations are initiated under pressure differential drive, first performing a stability establishment phase with a first time step (e.g., 0.2–0.5 fs, depending on the system) for pre-running until energy convergence, no anomalies in key bond lengths or angles, and structural integrity. Subsequently, the production simulation phase begins, using a larger second time step (e.g., 1.0 fs or higher, depending on constraint settings and system stability margin) for long-term pressure differential displacement simulations.
[0034] After optimization, a displacement simulation system with controllable pressure difference, high stability and good motion coordination was obtained. This system can effectively avoid the problem of opposite motion caused by the inertia mismatch between the fluid and the atomic wall within 10 Å of the wall, and significantly improve the simulation stability under high pressure.
[0035] S5. Applying Local Viscous Damping: To simulate a more stable displacement process, local viscous damping can be applied to the system optimized in step S4. This step first identifies the atomic walls and their surrounding regions. For each identified region, the system defines the region's extent (e.g., 10 Å at each end in the z-direction); then, a larger viscous damping (coefficient 0.1) is applied to the atomic wall atoms, and a smaller viscous damping (coefficient 0.05) is applied to the atoms in the surrounding regions, achieved using the LAMMPS `fix viscous` command.
[0036] The mathematical form of viscous damping is: ;in, For damping force, The damping coefficient is... The atomic velocity is the velocity of the atomic wall at equilibrium, when the system reaches a steady state. tending to a constant value At this time, the damping force is: According to the force equilibrium condition, in the equilibrium state we have: ;in, The force generated by applying constant pressure, For pressure, Let the area be the atomic wall area; substituting into the above formula, we get: At equilibrium, damping only affects the velocity at which equilibrium is reached. without changing the constant force applied The corresponding equilibrium pressure is independent of the damping coefficient. Therefore, local viscous damping, when in steady state and acting only in the boundary region, does not affect actual pressure control and can improve numerical stability by suppressing high-frequency oscillations and absorbing excess energy.
[0037] To avoid affecting the fluid in the mainstream region, the system also checks the extent of the damping region to ensure that it only acts on the boundary areas. Ultimately, this results in a stable displacement system with local damping, bringing it closer to the ideal state.
[0038] After completing all the above steps, a high-pressure nanopore pressure differential displacement simulation system with controllable pressure difference, high stability and high computational efficiency is obtained. This system can be directly used for molecular dynamics studies of displacement processes such as CO2-EOR.
[0039] Example 2: A molecular dynamics simulation acceleration system for high-pressure displacement within nanopores, used to execute the steps of the method described in Example 1. The system includes: a system construction module for constructing upstream and downstream atomic walls at both ends of the nanopores; an equivalent mass optimization module for performing comprehensive optimization of the equivalent atomic mass of the atomic walls based on energy analysis and motion coordination using Bayesian optimization; a constraint processing module for applying rigid body constraints to small molecules in the system and applying SHAKE constraints only to CH bonds of macromolecules; and a pressure difference driving module for applying different constant forces to the upstream and downstream atomic walls to form a pressure difference, and performing accelerated simulation using a phased time step.
[0040] Example 3: A terminal is configured with a memory and a processor. The memory is adapted to store multiple instructions, and the processor is adapted to call the instructions in the memory to execute the steps of the method described in Example 1. The terminal includes, but is not limited to, terminal devices such as servers, mobile phones, computers, and tablet computers.
[0041] Specifically, in this embodiment of the invention, the processor can be a central processing unit (CPU), or it can be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.
[0042] It should also be understood that the memory in the embodiments of this application can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate synchronous DRAM (DDR SDRAM), enhanced synchronous DRAM (ESDRAM), synchronous linked DRAM (SLDRAM), and direct rambus RAM (DR RAM).
[0043] Application Example: This application example uses the CO2 displacement process under 50MPa high pressure as the simulation object. The displacement process is simulated by molecular dynamics to systematically verify the stability and effectiveness of the method of the present invention under high pressure environment.
[0044] S1. Construct a pressure differential displacement simulation system: Target parameters: pore size is 10nm×10nm×20nm, upstream target pressure is 50MPa, and downstream target pressure is 5MPa.
[0045] The simulation system consists of four main components: quartz pores, oil phase, CO2, and atomic walls. Figure 2 As shown, the quartz pores are composed of silicon-oxygen tetrahedral structures, forming nanoscale pore channels; the oil phase contains various alkane molecules (C2H6, C3H8, etc.); CO2 is carbon dioxide molecules; and the atomic walls are composed of silicon atoms, used to apply pressure differentials.
[0046] Initial model preparation: An upstream atomic wall and a downstream atomic wall, each containing 4032 silicon atoms, were constructed. The atomic walls were 2 nm thick and located at both ends of the pore. The atomic wall atoms adopted a face-centered cubic (fcc) crystal structure.
[0047] S2. Comprehensive optimization of atomic mass of the atomic wall based on energy analysis and motion coordination: The initial mass search interval is set to [0.0001 g / mol, 1.0 g / mol], and Bayesian optimization is used for optimization. Bayesian optimization uses a Gaussian process model to predict the objective function and intelligently selects the next evaluation point through the expected improvement (EI) acquisition function. Initial stage: First, initial random sampling is performed (0.153522 g / mol, 0.000542 g / mol, 0.131451 g / mol, etc.). 50,000 pre-simulation steps are performed for each sampling point. Pressure difference drive (50 MPa upstream, 5 MPa downstream) is applied in the pre-simulation to identify fluid molecules within a 10 Å range near the wall and calculate the maximum interaction energy between the atomic wall and fluid molecules. And motion coordination indicators (speed and direction consistency) and speed difference ,in (The average velocity vector of the fluid within a 10 Å radius of the wall) is used to calculate the comprehensive objective function value. Optimization iteration phase: Based on the initial evaluation results, the Gaussian process model learns the characteristics of the objective function and intelligently selects the next most promising evaluation point by expecting to improve the acquisition function. For each selected mass value, 50,000 pre-simulation steps are performed, with pressure differential applied to identify fluid molecules within a 10 Å radius of the wall, and the maximum interaction energy between the atomic wall and fluid molecules is calculated. and motor coordination indicators ( and The Gaussian process model was updated. Iteration continued, with the Gaussian process model continuously learning the characteristics of the objective function and intelligently selecting evaluation points. After 50 evaluations (47 successful and 3 failed), the mass converged to 0.004818 g / mol. A confirmatory pre-simulation was performed, confirming that the maximum interaction energy between the atomic wall and fluid molecules was minimized and the motion coordination was optimal. >0.9, <0.05Å / ps), to obtain the optimal equivalent mass, such as Figure 3 As shown in (a) and (b), by considering motion coordination during the acceleration preparation phase, conditions are provided for subsequent steady-state establishment and time step amplification, reducing the risk of collapse during the displacement process. Compared to random search, Bayesian optimization can find the optimal quality with fewer evaluations, significantly improving optimization efficiency.
[0048] S3. Differentiated Constraints on Molecules in the System: Identify CH4 molecules (small molecules that cannot be used with the SHAKE algorithm) in the system and apply rigid / nvt / small commands for rigid body constraints. This constraint aims to improve system stability without affecting the system's correctness. Identify large molecules such as C2H6 and C3H8 in the system and apply the fix shake command to constrain only the CH bond type. This constraint aims to improve system stability without affecting the system's correctness or changing the physicochemical properties of the molecules.
[0049] S4. Apply pressure differential: Based on the atomic wall area and target pressure, calculate the constant force required for the upstream atomic wall. =50×111×114×0.0014393=910.645Kcal / (mol·Å), the constant force required for the downstream atomic wall is =5×111×114×0.0014393=91.065Kcal / (mol·Å). A constant force pointing inwards towards the pores is applied to the upstream atomic wall, and a constant force pointing outwards towards the pores is applied to the downstream atomic wall. Molecular dynamics simulation is started, with the temperature controlled at 330K and the time step at 1.0fs.
[0050] Since the motion coordination problem was solved in step S2 during the optimization phase, the motion direction of the atomic wall and the fluid within a 10 Å radius of the wall is consistent during the actual simulation, and the velocity difference is within a reasonable range. The displacement process proceeds stably (<0.05 Å / ps), requiring no real-time monitoring or adjustment. This fully validates the effectiveness of addressing motion coordination issues in advance during the optimization phase, avoiding the risk of collapse during actual simulations.
[0051] S5. Apply local viscous damping: Define the region near the upstream atomic wall (from z-direction). Å to ) and the region near the downstream atomic wall (z direction from arrive (Å). Viscous damping with a coefficient of 0.1 is applied to the atoms in the atomic wall; viscous damping with a coefficient of 0.05 is applied to the atoms in the surrounding region. According to the above mathematical derivation, in equilibrium, this local viscous damping does not affect the actual pressure control, but only improves numerical stability by suppressing high-frequency oscillations.
[0052] The final stable displacement simulation system was saved as a LAMMPS input file. This simulation system features controllable pressure differential, high stability, and high computational efficiency, and can operate stably for 10 hours under upstream pressure of 50 MPa and downstream pressure of 5 MPa. 7 The above steps fully verify the excellent performance of this invention under high pressure. Compared with conventional simulations using a time step of 0.1 ps, the speed is increased by 10 times. This system can be directly used for molecular dynamics studies of high-pressure displacement processes such as CO2-EOR. The stability and reliability under high pressure are the core advantages of this invention.
[0053] Of course, the above description is not intended to limit the present invention, and the present invention is not limited to the examples given above. Any changes, modifications, additions or substitutions made by those skilled in the art within the scope of the present invention should also fall within the protection scope of the present invention.
Claims
1. A molecular dynamics simulation acceleration method for high-pressure displacement within nanopores, characterized in that, Includes the following steps: S1. Construct a pressure displacement simulation system: Construct an upstream atomic wall and a downstream atomic wall at both ends of the nanopores. The atomic walls are composed of fictitious atoms with optimizable atomic mass parameters, which are used to apply different pressures at both ends of the pores. S2. Comprehensive optimization of the equivalent atomic mass of the atomic wall based on energy analysis and motion coordination: An initial range of equivalent atomic masses for the atomic wall atoms is set, and Bayesian optimization is used for iterative optimization; a pre-simulation is performed for each iteration, applying a pressure difference to drive the process, and calculating the maximum interaction energy between the atomic wall and fluid molecules. And the motion coordination index between the atomic wall and the fluid within a predetermined range near the wall; wherein, the motion coordination index includes at least the consistency of velocity direction. and speed difference ;according to , and The evaluation results determine the next candidate mass value until the preset convergence condition is met, and the optimal atomic wall equivalent mass for pressure displacement simulation is obtained. S3. Differentiated constraint treatment for molecules in the system: Identify small and large molecules in the system; rigid body constraint treatment is used for small molecules that cannot be treated by the SHAKE algorithm, and SHAKE constraint is applied only to CH bonds for large molecules to improve the numerical stability of high pressure displacement molecular dynamics simulation. S4. Apply pressure difference drive and perform accelerated simulation: Apply different constant forces to the upstream and downstream atomic walls to form a pressure difference, realize the pressure difference displacement process of the fluid; the pressure difference displacement process includes a stable establishment stage and a production simulation stage. In the stable establishment stage, a first time step is used for pre-running to make the system energy converge and the structure complete. In the production simulation stage, a time step larger than the first time step is used to simulate the pressure difference displacement, thereby improving the computational efficiency while keeping the physical model unchanged.
2. The molecular dynamics simulation acceleration method for high-pressure displacement within nanopores as described in claim 1, characterized in that, In step S2, according to , and The evaluation results determine the next candidate quality value until the preset convergence conditions are met, specifically including: Consistency of velocity direction Defined as the atomic wall velocity vector The average velocity vector of the fluid within a preset range near the wall scalar product: ; in, Used to characterize whether the atomic wall moves in the same direction as the fluid. >0 indicates that the atomic wall is in the same direction as the fluid motion. <0 indicates the opposite direction of motion; Speed difference The velocity vector of the atomic wall With the fluid average velocity vector The modulus of the difference is used to characterize the degree of velocity matching between the atomic wall and the fluid. A smaller value indicates a better speed match: 。 3. The molecular dynamics simulation acceleration method for high-pressure displacement within nanopores as described in claim 1, characterized in that, In step S2, the preset convergence conditions include: the maximum interaction energy between the atomic wall and the fluid molecules. Minimize, consistent velocity direction Greater than zero and speed difference Less than the preset threshold.
4. The molecular dynamics simulation acceleration method for high-pressure displacement within nanopores as described in claim 1, characterized in that, In step S2, the optimal atomic wall equivalent mass is 0.0001~0.01 g / mol.
5. The molecular dynamics simulation acceleration method for high-pressure displacement within nanopores as described in claim 1, characterized in that, In step S3, small molecules are those that cannot be processed using the SHAKE algorithm, including but not limited to molecules with a tetrahedral configuration. Rigid body constraints are applied to suppress numerical divergence and anomalous energy fluctuations under high pressure conditions. Large molecules include C... 2+ For alkanes and other molecules containing CH bonds, only the CH bonds are shake-constrained to improve the numerical stability margin without changing the flexibility of the molecular skeleton.
6. The molecular dynamics simulation acceleration method for high-pressure displacement within nanopores as described in claim 1, characterized in that, It also includes the step of applying local viscous damping, defining an atomic wall and a region within a predetermined range nearby, and applying viscous damping to the atoms in the atomic wall and the atoms in the region to suppress high-frequency oscillations and absorb excess energy.
7. The molecular dynamics simulation acceleration method for high-pressure displacement within nanopores as described in claim 6, characterized in that, The mathematical form of viscous damping is: ; in, For damping force, The damping coefficient is... The atomic velocity is the velocity of the atomic wall at equilibrium, when the system reaches a steady state. tending to a constant value At this time, the damping force is: ; According to the force equilibrium condition, in the equilibrium state we have: ; in, The force generated by applying constant pressure, For pressure, Let the area be the atomic wall area; substituting into the above formula, we get: ; In equilibrium, local viscous damping does not affect actual pressure control.
8. A molecular dynamics simulation acceleration system for high-pressure displacement within nanopores, characterized in that, The system is used to perform the steps of the method according to any one of claims 1 to 7, the system comprising: The system construction module is used to construct upstream and downstream atomic walls at both ends of the nanopores, respectively; The equivalent mass optimization module is used to perform comprehensive optimization of the equivalent atomic mass of the atomic wall based on energy analysis and motion coordination using Bayesian optimization. The constraint processing module is used to apply rigid body constraints to small molecules in the system, and to apply SHAKE constraints only to CH bonds of macromolecules. The differential pressure drive module is used to apply different constant forces to the upstream and downstream atomic walls to form a pressure difference, and uses a phased time step for accelerated simulation.
9. A terminal, characterized in that, The device is equipped with a memory and a processor, the memory being adapted to store multiple instructions, and the processor being adapted to invoke the instructions in the memory to perform the steps of implementing the method as described in any one of claims 1 to 7.