A SPH neighborhood updating method based on neighborhood buffer layer and cumulative displacement triggering and related equipment

CN122965246APending Publication Date: 2026-10-23CHENGDU DAJIA HYDRAULIC MASCH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610871487.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-16
Publication Date
2026-10-23

AI Technical Summary

Technical Problem

然而,当粒子数量较大时,邻域搜索过程往往成为SPH计算中的主要计算瓶颈之一,尤其在GPU并行计算、大规模三维工程模拟以及高分辨率粒子计算场景中,该问题更为突出

Benefits of technology

[0017]本申请实施例至少包括以下有益效果:本申请提供一种基于邻域缓冲层与累计位移触发的SPH邻域更新方法及相关设备,该方案通过在支持域半径之外设置邻域缓冲层,并根据候选邻域半径构建当前候选邻域集合,使候选邻域集合能够在后续时间步中被复用,减少重复邻域搜索,提高计算效率;根据粒子当前位置和参考位置确定全局最大累计位移,并根据全局最大累计位移判断是否触发邻域更新,使邻域更新时机与粒子实际运动状态相关联,防止固定邻域搜索频率过高或过低导致的更新频繁或更新滞后的问题;根据粒子当前位置从当前候选邻域集合中确定支持域范围内的相互作用粒子,从而保证相互作用粒子的准确性,提高计算精度。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122965246A_ABST
    Figure CN122965246A_ABST
Patent Text Reader

Abstract

The application discloses a SPH neighborhood updating method based on a neighborhood buffer layer and accumulated displacement triggering and related equipment, and the method comprises the following steps: determining a support domain radius and a neighborhood buffer layer thickness according to the smooth length and the estimated motion range of each particle, and then determining a candidate neighborhood radius; performing neighborhood search on each particle to obtain a candidate neighborhood set of each particle; determining a global maximum accumulated displacement according to the position and the reference position of each particle, and then combining the neighborhood buffer layer thickness to determine whether the neighborhood updating triggering condition is met, and when the condition is met, the candidate neighborhood set is reconstructed; and determining the interaction particles of each particle in the candidate neighborhood set according to the particle position and the support domain radius, so that the physical state is updated. Through the construction of the reusable candidate neighborhood set and the dynamic judgment of the neighborhood updating time according to the accumulated displacement of the particle, the frequency of the neighborhood search is reduced, and the calculation efficiency is improved. The application can be widely applied in the technical field of computer numerical simulation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer numerical simulation technology, and in particular to an SPH neighborhood update method and related equipment based on a neighborhood buffer layer and cumulative displacement triggering. Background Technology

[0002] Smoothed Particle Hydrodynamics (SPH) is a meshless Lagrangian particle numerical method that achieves discrete solutions for continuous media through the kernel function interactions between particles. It is widely used in free surface flow, multiphase flow, fluid-structure interaction, impact load analysis, complex engineering flow simulation, and related numerical simulation fields.

[0003] In the SPH method, the update of physical quantities for each particle typically depends on the interactions of its neighboring particles within its support domain. Current SPH computations usually perform a neighborhood search for all particles at each time step and update the neighborhood set to ensure the accuracy of particle interactions. However, when the number of particles is large, the neighborhood search process often becomes one of the main computational bottlenecks in SPH computations, especially in GPU parallel computing, large-scale 3D engineering simulations, and high-resolution particle computing scenarios.

[0004] In summary, the technical problems existing in the relevant technologies need to be improved. Summary of the Invention

[0005] The main objective of this application is to propose a neighborhood update method and related device for SPH based on a neighborhood buffer layer and cumulative displacement triggering. By transforming the traditional fixed-time-step driven neighborhood update method into a triggering update method based on the actual geometric motion state of particles, the neighborhood search frequency is significantly reduced and the SPH computation efficiency is improved while ensuring the integrity of the neighborhood. This method is suitable for large-scale SPH numerical simulation and parallel computing scenarios.

[0006] To achieve the above objectives, one aspect of this application proposes an SPH neighborhood update method based on a neighborhood buffer layer and cumulative displacement triggering, the method comprising: The position of each particle in the computational domain at the current time step is taken as the first position, and the support domain radius of each particle is determined according to the smooth length of each particle. The thickness of the neighborhood buffer layer is determined based on the estimated motion range of each particle, and the candidate neighborhood radius of each particle is determined based on the support domain radius and the neighborhood buffer layer thickness. Based on the first position and the candidate neighborhood radius, a neighborhood search is performed on each particle to obtain a first candidate neighborhood set for each particle. The first position is used as a reference position, and the first candidate neighborhood set is used as the current candidate neighborhood set. The position of each particle in the next time step is taken as the second position, and the global maximum cumulative displacement of each particle is determined based on the second position of each particle and the reference position. Determine whether the preset neighborhood update triggering condition is met based on the global maximum cumulative displacement and the neighborhood buffer layer thickness; When the neighborhood update triggering condition is met, a neighborhood search is performed on each particle according to the second position and the candidate neighborhood radius to obtain the second candidate neighborhood set of each particle. The second position is used as the reference position and the second candidate neighborhood set is used as the current candidate neighborhood set. Based on the second position and the support domain radius, the interacting particles of each particle are determined in the current candidate neighborhood set. The physical state of each particle is updated based on the interacting particles of each particle. The position of each particle in the next time step is returned as the second position until the next time step is the final time step.

[0007] In some embodiments, determining the neighborhood buffer layer thickness based on the estimated motion range of each particle includes: Obtain the expected number of neighborhood reuse time steps and the expected maximum achievable motion velocity of each particle; The thickness of the neighborhood buffer layer is determined based on the neighborhood reuse time step number, the maximum movement speed, the time step length, and the preset safety factor.

[0008] In some embodiments, determining the neighborhood buffer layer thickness based on the estimated motion range of each particle further includes: A reference smooth length is determined based on the smooth length of each particle; The thickness of the neighborhood buffer layer is determined based on the reference smooth length and a preset scaling factor.

[0009] In some embodiments, determining the candidate neighborhood radius of each particle based on the support domain radius and the neighborhood buffer layer thickness includes: The sum of the support domain radius and the neighborhood buffer layer thickness is used as the candidate neighborhood radius for each particle.

[0010] In some embodiments, determining the global maximum cumulative displacement of each particle based on the second position of each particle and the reference position includes: The cumulative displacement of each particle is determined based on the second position of each particle and the reference position; The maximum value among the cumulative displacements of each particle is selected as the global maximum cumulative displacement.

[0011] In some embodiments, determining whether a preset neighborhood update triggering condition is met based on the global maximum cumulative displacement and the neighborhood buffer layer thickness includes: Determine whether the global maximum cumulative displacement is greater than half the thickness of the neighborhood buffer layer; When the global maximum cumulative displacement is greater than half the thickness of the neighborhood buffer layer, it is determined that the neighborhood update trigger condition is met. If the global maximum cumulative displacement is not greater than half the thickness of the neighborhood buffer layer, it is determined that the neighborhood update triggering condition is not met.

[0012] In some embodiments, determining the interacting particles of each particle in the current candidate neighborhood set based on the second position and the support domain radius includes: Among the aforementioned particles, select the particle whose interaction with other particles is not determined as the current particle; All particles in the current candidate neighborhood set of the current particle are taken as candidate particles; Based on the second position, calculate the distance between each candidate particle and the current particle, and select the candidate particle whose distance from the current particle is not greater than the radius of the support domain as the interacting particle of the current particle; Returning to the previous step, select the particle with undetermined interaction particles as the current particle, until all the particles are particles with determined interaction particles.

[0013] To achieve the above objectives, another aspect of this application proposes an SPH neighborhood update device based on a neighborhood buffer layer and cumulative displacement triggering, the device comprising: The support domain radius calculation module is used to take the position of each particle in the computational domain at the current time step as the first position, and determine the support domain radius of each particle according to the smooth length of each particle. The candidate neighborhood radius calculation module is used to determine the neighborhood buffer layer thickness based on the estimated motion range of each particle, and to determine the candidate neighborhood radius of each particle based on the support domain radius and the neighborhood buffer layer thickness. The candidate neighborhood set determination module is used to perform a neighborhood search on each particle according to the first position and the candidate neighborhood radius to obtain a first candidate neighborhood set for each particle, using the first position as a reference position and the first candidate neighborhood set as the current candidate neighborhood set. The global maximum cumulative displacement determination module is used to take the position of each particle in the next time step as the second position, and determine the global maximum cumulative displacement of each particle based on the second position of each particle and the reference position. The neighborhood update judgment module is used to determine whether the preset neighborhood update triggering condition is met based on the global maximum cumulative displacement and the neighborhood buffer layer thickness. The neighborhood update module is used to perform a neighborhood search on each particle according to the second position and the candidate neighborhood radius when the neighborhood update trigger condition is met, to obtain a second candidate neighborhood set for each particle, and to use the second position as the reference position and the second candidate neighborhood set as the current candidate neighborhood set. The physical state update module is used to determine the interacting particles of each particle in the current candidate neighborhood set according to the second position and the support domain radius, update the physical state of each particle according to the interacting particles, and return the position of each particle in the next time step as the second position until the next time step is the final time step.

[0014] To achieve the above objectives, another aspect of this application provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the methods described above.

[0015] To achieve the above objectives, another aspect of the embodiments of this application proposes a computer-readable storage medium storing a computer program that, when executed by a processor, implements the methods described above.

[0016] To achieve the above objectives, another aspect of the embodiments of this application proposes a computer program product, including a computer program that, when executed by a processor, implements the methods described above.

[0017] The embodiments of this application include at least the following beneficial effects: This application provides a SPH neighborhood update method and related device based on a neighborhood buffer layer and cumulative displacement triggering. This scheme sets a neighborhood buffer layer outside the support domain radius and constructs a current candidate neighborhood set based on the candidate neighborhood radius, so that the candidate neighborhood set can be reused in subsequent time steps, reducing repeated neighborhood searches and improving computational efficiency; it determines the global maximum cumulative displacement based on the particle's current position and reference position, and determines whether to trigger neighborhood update based on the global maximum cumulative displacement, so that the neighborhood update timing is related to the actual motion state of the particle, preventing the problem of frequent or delayed updates caused by the fixed neighborhood search frequency being too high or too low; it determines the interacting particles within the support domain range from the current candidate neighborhood set based on the particle's current position, thereby ensuring the accuracy of the interacting particles and improving computational accuracy. Attached Figure Description

[0018] Figure 1 This is a flowchart illustrating the steps of an SPH neighborhood update method based on a neighborhood buffer layer and cumulative displacement triggered by an embodiment of this application. Figure 2 This is a schematic diagram of the structure of an SPH neighborhood update device based on a neighborhood buffer layer and cumulative displacement triggered by an embodiment of this application; Figure 3 This is a schematic diagram of the hardware structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0019] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit it. In the following description, when referring to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with those of this application; they are merely examples of apparatuses and methods consistent with some aspects of the embodiments of this application as detailed in the appended claims.

[0020] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.

[0021] The concept of the present invention will now be explained in conjunction with the background art.

[0022] Smoothed Particle Hydrodynamics (SPH) is a meshless Lagrangian particle numerical method that achieves discrete solutions for continuous media through the kernel function interactions between particles. It is widely used in free surface flow, multiphase flow, fluid-structure interaction, impact load analysis, complex engineering flow simulation, and related numerical simulation fields.

[0023] In the SPH method, the update of physical quantities for each particle typically depends on the interactions of its neighboring particles within its support domain. For particle i, its support domain neighborhood is typically defined as the set of particles that satisfy the following conditions: |x i -x j |≤

[0024] Where: x i x represents the position vector of particle i; j This represents the position vector of particle j; Let represent the support domain radius of particle i. Typically, the support domain radius is defined as: =k·h i Where: h i represents the smooth length of particle i; k represents the kernel function's support radius coefficient, the value of which is determined by the type of kernel function used. For example, for the cubicspline kernel function, k is usually 2; for the quinticspline kernel function, k is usually 3.

[0025] In existing SPH calculations, a neighborhood search is typically performed on all particles at each time step, and the neighborhood set is updated to ensure the accuracy of the interaction relationships between particles. However, when the number of particles is large, the neighborhood search process often becomes one of the main computational bottlenecks in SPH calculations, especially in GPU parallel computing, large-scale 3D engineering simulations, and high-resolution particle computing scenarios, where this problem is even more prominent.

[0026] Further analysis reveals that in many numerical simulations, especially in steady flow, quasi-steady-state processes, or under conditions of small time steps, the cumulative displacement of a particle over multiple consecutive time steps is typically small, and its neighborhood structure remains stable for a short period. In such cases, performing a complete neighborhood search at each time step would result in a large amount of redundant computation, wasting computational resources.

[0027] Some existing optimization methods attempt to reduce the neighborhood search frequency by updating the neighborhood at fixed time intervals. However, these methods typically only set the update period based on experience and lack a direct correlation with the actual motion state of the particles. When the particle's motion state changes, the fixed time interval strategy may lead to overly frequent neighborhood updates, reducing optimization performance; or it may update too late, resulting in missed neighborhoods and affecting the accuracy and stability of numerical calculations.

[0028] Therefore, there is an urgent need for an SPH neighborhood update method that can dynamically determine the timing of neighborhood updates based on the actual motion state of particles, while ensuring the integrity of the neighborhood, so as to reduce the neighborhood search frequency and improve the overall computational efficiency.

[0029] To this end, this application provides a SPH neighborhood update method and related device based on a neighborhood buffer layer and cumulative displacement triggering. By introducing a neighborhood buffer layer outside the support domain to construct a candidate neighborhood set, and setting the neighborhood update triggering condition based on the cumulative displacement of particles, the neighborhood update is transformed from the traditional fixed time step driven mode to a triggering mode based on the actual geometric motion state of particles. This reduces the neighborhood search frequency and improves the SPH calculation efficiency while ensuring the integrity of the neighborhood and the accuracy of the calculation.

[0030] This application provides an SPH neighborhood update method based on a neighborhood buffer layer and cumulative displacement triggering, relating to the field of information technology. This SPH neighborhood update method can be applied to terminals, servers, or software running on either a terminal or a server. In some embodiments, the terminal can be a smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, or in-vehicle terminal, but is not limited to these. The server can be configured as an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The server can also be a node server in a blockchain network. The software can be an application implementing an SPH neighborhood update method based on a neighborhood buffer layer and cumulative displacement triggering, but is not limited to the above forms.

[0031] This application can be used in a wide variety of general-purpose or special-purpose computer system environments or configurations. Examples include: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, and distributed computing environments including any of the above systems or devices. This application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform specific tasks or implement specific abstract data types. 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.

[0032] Figure 1 This is an optional flowchart of an SPH neighborhood update method based on a neighborhood buffer layer and cumulative displacement triggered by an embodiment of this application. Figure 1 The method may include, but is not limited to, steps S101 to S107.

[0033] S101. Take the position of each particle in the computational domain at the current time step as the first position, and determine the support domain radius of each particle according to the smooth length of each particle. S102. Determine the thickness of the neighborhood buffer layer based on the estimated motion range of each particle, and determine the candidate neighborhood radius of each particle based on the support domain radius and the neighborhood buffer layer thickness. In some embodiments, determining the neighborhood buffer layer thickness based on the estimated motion range of each particle includes: S201. Obtain the expected number of neighborhood reuse time steps and the expected maximum achievable motion speed of each particle; S202. Determine the thickness of the neighborhood buffer layer based on the neighborhood reuse time step, maximum movement speed, time step length, and preset safety factor.

[0034] In some embodiments, determining the neighborhood buffer layer thickness based on the estimated motion range of each particle further includes: S301. Determine the reference smooth length based on the smooth length of each particle; S302. Determine the thickness of the neighborhood buffer layer based on the reference smooth length and the preset scaling factor.

[0035] In some embodiments, determining the candidate neighborhood radius of each particle based on the support domain radius and the neighborhood buffer layer thickness includes: S401. The sum of the support domain radius and the neighborhood buffer layer thickness is used as the candidate neighborhood radius for each particle.

[0036] Specifically, for ease of explaining the technical solutions of the embodiments of the present invention, the following symbols are defined: x i : The position vector of particle i at the current moment; x j : The position vector of particle j at the current moment; : The reference position of particle i at the most recent neighborhood update time; : The reference position of particle j at the time of the most recent neighborhood update; h i : The smooth length of particle i; k: Kernel function supports radius coefficients; The support domain radius of particle i is defined as follows: =k·h i ; δ: Neighborhood buffer layer thickness; The candidate neighborhood radius of particle i is defined as: = +δ; N i The candidate neighborhood set of particle i is defined as the set of particles that satisfy the following conditions: |x i -x j |≤ ; d i The cumulative displacement of particle i since the most recent neighborhood update is defined as: d_i = |x i - |; D: The global maximum cumulative displacement of all particles, defined as: D = max(d i ); β: Safety factor; v max : The maximum velocity of all particles in the current calculation phase; Δt: Time step; N: Preset time steps for allowing neighborhood reuse; γ: proportionality coefficient; h ref Representative smooth length.

[0037] This embodiment uses a neighborhood update triggering condition based on cumulative displacement. The neighborhood integrity theory involved in this embodiment is explained below, and its theoretical basis is as follows: Let the positions of particle i and particle j at the most recent neighborhood update time be respectively: and ; The current positions are: x i With x j ; The change in their relative positions can then be expressed as: (x i -x j )-( - ); According to the triangle inequality, we have: |(x i -x j )-( - )|≤|x i - |+|x j - |; According to the definition of cumulative displacement: d i =|x i - |;d j =|x j - |; Therefore: |(x i -x j )-( -x_j^0)|≤d i +d j ; Furthermore, since: D = max(d) i ); Therefore, we have: d i ≤D;d j ≤D; Therefore: d i +d j ≤2D; Thus we obtain: |(x i -x j )-( - )|≤2D; If the current condition is satisfied: D≤δ / 2; Then we have: 2D≤δ; Therefore: |(x i -x j )-( - )|≤δ; This indicates that since the most recent neighborhood update, the relative position change of any two particles will not exceed the thickness of the neighborhood buffer layer.

[0038] Furthermore, if particle j has already entered the support domain of particle i at the current moment, then: |x i -x j |≤ ; From the triangle inequality, we can obtain: | - |≤|x i -x j |+|(x i -x j )- - )|; Combining the aforementioned relationships: |x i -x j |≤ ; And: |(x i -x j )-( - )|≤δ; We can obtain: | - |≤ +δ; That is: | - |≤ ; That is, if the current particle j has entered the support domain, then at the time of the most recent neighborhood update, the particle must already be within the radius of the candidate neighborhood, and therefore has been included in the candidate neighborhood set.

[0039] Therefore, when D≤δ / 2 is satisfied, there will be no situation where a new particle enters the support domain without triggering a neighborhood update and is not included in the candidate neighborhood set, thus ensuring neighborhood integrity.

[0040] In this embodiment, for particle i, the support domain radius is calculated based on its smooth length h_i: =k·h i ; Where: k is the kernel function support radius coefficient; h i Let be the smooth length of particle i. The smooth length typically remains constant during neighborhood reuse. The support domain radius is used to determine the neighborhood range that actually participates in the SPH physics calculations.

[0041] Then, in this embodiment, a neighborhood buffer layer is set outside the supporting domain radius to define the candidate neighborhood radius: = +δ; Where δ is the thickness of the neighborhood buffer layer.

[0042] Specifically, in this embodiment, the neighborhood buffer layer thickness δ can be determined in the following way: Method 1: Determined based on particle velocity: δ=β·v max ·Δt·N; Where β is a preset safety factor, which can be adjusted according to actual conditions, and v max Δt represents the maximum velocity of all particles in the current calculation phase, i.e., the maximum achievable velocity of each particle; Δt is the length of a single time step; and N is the preset number of time steps allowed for neighborhood reuse, i.e., the expected number of neighborhood reuse time steps, as described in this embodiment. This method is suitable for calculation scenarios where changes in particle velocity are predictable.

[0043] Method 2: Determined based on the smooth length ratio: δ=γ·h ref ; Where: γ is a preset proportionality coefficient, which can be selected according to actual conditions; h ref The representative smooth length can be selected as the globally uniform smooth length, the average of the smooth lengths of all current particles, or the maximum of the smooth lengths of all current particles. This method is suitable for scenarios with a fixed smooth length or an approximately uniform particle distribution.

[0044] S103. Perform a neighborhood search on each particle based on the first position and the candidate neighborhood radius to obtain the first candidate neighborhood set of each particle. Use the first position as the reference position and the first candidate neighborhood set as the current candidate neighborhood set. Specifically, in this embodiment, a neighborhood search is performed on particle i based on the candidate neighborhood radius to construct a candidate neighborhood set N. i : N i ={j||x i -x j |≤ }; That is, all particles that satisfy the following conditions are included in the candidate neighborhood set: |x i -x j |≤ ; After constructing the candidate neighborhood set, the current particle position is recorded as the reference position at the most recent neighborhood update time: =x i ; This reference position is used for subsequent cumulative displacement calculations.

[0045] S104. Take the position of each particle in the next time step as the second position, and determine the global maximum cumulative displacement of each particle based on the second position and the reference position. In some embodiments, determining the global maximum cumulative displacement of each particle based on its second position and reference position includes: S501. Determine the cumulative displacement of each particle based on its second position and reference position. S502. Select the maximum value among the cumulative displacements of each particle as the global maximum cumulative displacement.

[0046] Specifically, in this embodiment, during subsequent calculations, for particle i, its cumulative displacement since the most recent neighborhood update is calculated: d i =|x i - | Where, d i This represents the cumulative displacement of particle i.

[0047] Take the maximum value of the cumulative displacement of all particles: D=max(d i ) Where D represents the global maximum cumulative displacement of all particles.

[0048] S105. Determine whether the preset neighborhood update triggering condition is met based on the global maximum cumulative displacement and the neighborhood buffer layer thickness. In some embodiments, determining whether a preset neighborhood update triggering condition is met based on the global maximum cumulative displacement and the neighborhood buffer layer thickness includes: S601. Determine whether the global maximum cumulative displacement is greater than half the thickness of the neighboring buffer layer; S602. When the global maximum cumulative displacement is greater than half of the thickness of the neighborhood buffer layer, it is determined that the neighborhood update trigger condition is met. S603. If the global maximum cumulative displacement is not greater than half the thickness of the neighborhood buffer layer, it is determined that the neighborhood update trigger condition is not met.

[0049] Specifically, in this embodiment, it is determined whether the cumulative displacement triggering condition is met.

[0050] If D > δ / 2, perform a neighborhood update; otherwise, continue to reuse the current candidate neighborhood set.

[0051] When performing a neighborhood update: Repeat the steps for constructing the candidate neighborhood set and update the reference position: xi^0=xi.

[0052] S106. When the neighborhood update triggering condition is met, perform a neighborhood search on each particle according to the second position and the candidate neighborhood radius to obtain the second candidate neighborhood set of each particle. Use the second position as the reference position and the second candidate neighborhood set as the current candidate neighborhood set. S107. Determine the interacting particles of each particle in the current candidate neighborhood set based on the second position and the support domain radius. Update the physical state of each particle based on the interacting particles of each particle. Return the position of each particle in the next time step as the second position until the next time step is the final time step.

[0053] In some embodiments, determining the interacting particles of each particle in the current candidate neighborhood set based on the second position and the support domain radius includes: S701. Select the particle whose interaction with the undetermined particle is among the particles as the current particle. S702. Select all particles in the current candidate neighborhood set of the current particle as candidate particles; S703. Based on the second position, calculate the distance between each candidate particle and the current particle, and select the candidate particle whose distance from the current particle is not greater than the radius of the support domain as the interacting particle of the current particle. S704. Return to the current particle by selecting the particle with undetermined interaction particles from among the particles, until all particles are particles with determined interaction particles.

[0054] Specifically, in this embodiment, during the actual SPH physics calculation, only particles within the support domain are used to participate in the interaction calculation; that is, SPH physics calculations are only performed on particles that meet the following conditions: |x i -x j |≤ ; SPH physics calculations include kernel function interaction calculations, density updates, momentum equation solving, pressure calculations, viscous term calculations, and boundary interaction calculations. The candidate neighborhood set is used only for neighborhood management and reuse.

[0055] This embodiment first determines the support domain radius based on the smooth length of the particles, constructs a candidate neighborhood set by setting a neighborhood buffer layer outside the support domain, and records the particle reference position at the time of the most recent neighborhood update. In subsequent calculations, the cumulative displacement of the particles is continuously calculated, and the global maximum cumulative displacement of all particles is used to determine whether the neighborhood update triggering condition is met. When the global maximum cumulative displacement exceeds half the thickness of the neighborhood buffer layer, a neighborhood update is performed; otherwise, the current candidate neighborhood set is reused. In actual SPH physics calculations, only particles within the support domain participate in the calculation. This embodiment transforms the traditional fixed-time-step driven neighborhood update method into a trigger update method based on the actual geometric motion state of the particles, significantly reducing the neighborhood search frequency and improving SPH computational efficiency while ensuring the integrity of the neighborhood. It is suitable for large-scale SPH numerical simulations and parallel computing scenarios.

[0056] It can be recognized that traditional SPH methods typically perform neighborhood search at every time step, while this embodiment, through a cumulative displacement triggering mechanism, performs neighborhood update only when the global maximum cumulative displacement reaches the triggering condition, thereby significantly reducing the number of neighborhood searches. Neighborhood search is usually one of the main computational bottlenecks in SPH computation, while this embodiment reduces repeated neighborhood searches through a candidate neighborhood reuse mechanism, which can effectively reduce the overall computational complexity. For large-scale 3D SPH simulations, GPU parallel computing, and high-resolution engineering simulation scenarios, the overhead of neighborhood search is particularly significant, and this embodiment can significantly improve the overall computational efficiency and parallel computing performance. At the same time, this embodiment only changes the neighborhood update strategy and does not depend on a specific SPH physics model, so it can be easily integrated into existing SPH solvers. In summary, this embodiment has broad applicability and is suitable for WCSPH (Weakly Compressible Smoothed Particle Hydrodynamics), ISPH (Incompressible Smoothed Particle Hydrodynamics), and EDAC-SPH (Entropically Damped Artificial Compressibility Smoothed Particle Hydrodynamics). Particle Hydrodynamics (PPH), entropy-damped artificially compressed smooth particle hydrodynamics, multiphase SPH, fluid-structure interaction SPH, GPU-accelerated SPH, and other scenarios have good engineering application value.

[0057] Please see Figure 2 This application also provides an SPH neighborhood update device based on a neighborhood buffer layer and cumulative displacement triggering, which can implement the above method. The device includes: The module supports the calculation of the support domain radius, which uses the position of each particle in the computational domain at the current time step as the first position and determines the support domain radius of each particle based on the smooth length of each particle. The candidate neighborhood radius calculation module is used to determine the thickness of the neighborhood buffer layer based on the estimated motion range of each particle, and to determine the candidate neighborhood radius of each particle based on the support domain radius and the neighborhood buffer layer thickness. The candidate neighborhood set determination module is used to perform a neighborhood search on each particle based on the first position and the candidate neighborhood radius to obtain the first candidate neighborhood set of each particle, using the first position as the reference position and the first candidate neighborhood set as the current candidate neighborhood set. The global maximum cumulative displacement determination module is used to take the position of each particle in the next time step as the second position, and determine the global maximum cumulative displacement of each particle based on the second position and the reference position. The neighborhood update judgment module is used to determine whether the preset neighborhood update triggering conditions are met based on the global maximum cumulative displacement and the thickness of the neighborhood buffer layer. The neighborhood update module is used to perform a neighborhood search on each particle based on the second position and the candidate neighborhood radius when the neighborhood update trigger condition is met, to obtain the second candidate neighborhood set of each particle, and to use the second position as the reference position and the second candidate neighborhood set as the current candidate neighborhood set. The physical state update module is used to determine the interacting particles of each particle in the current candidate neighborhood set based on the second position and the support domain radius, update the physical state of each particle based on the interacting particles, and return the position of each particle in the next time step as the second position, until the next time step is the final time step.

[0058] It is understood that the content of the above method embodiments is applicable to the present device embodiments. The specific functions implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0059] This application also provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the above-described method. This electronic device can be any smart terminal, including tablet computers, in-vehicle computers, etc.

[0060] It is understood that the content of the above method embodiments is applicable to this device embodiment. The specific functions implemented by this device embodiment are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0061] Please see Figure 3 , Figure 3The hardware structure of an electronic device according to another embodiment is illustrated. The electronic device includes: The processor 901 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this application. The memory 902 can be implemented as a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 902 can store the operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 902 and is called and executed by the processor 901 using the methods described in the embodiments of this application. The input / output interface 903 is used to implement information input and output; The communication interface 904 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.). Bus 905 transmits information between various components of the device (e.g., processor 901, memory 902, input / output interface 903, and communication interface 904); The processor 901, memory 902, input / output interface 903, and communication interface 904 are connected to each other within the device via bus 905.

[0062] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method.

[0063] It is understood that the content of the above method embodiments is applicable to this storage medium embodiment. The specific functions implemented in this storage medium embodiment are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those achieved in the above method embodiments.

[0064] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.

[0065] It is understood that the content of the above method embodiments is applicable to the embodiments of this program product. The specific functions implemented by the embodiments of this program product are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0066] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0067] This application provides an SPH neighborhood update method and related device based on a neighborhood buffer layer and cumulative displacement triggering. The method involves setting a neighborhood buffer layer outside the support domain radius and constructing a current candidate neighborhood set based on the candidate neighborhood radius. This allows the candidate neighborhood set to be reused in subsequent time steps, reducing redundant neighborhood searches and improving computational efficiency. The method determines the global maximum cumulative displacement based on the particle's current position and reference position, and then uses this global maximum cumulative displacement to determine whether to trigger a neighborhood update. This links the neighborhood update timing to the particle's actual motion state, preventing frequent or delayed updates caused by excessively high or low fixed neighborhood search frequencies. Finally, the method determines interacting particles within the support domain from the current candidate neighborhood set based on the particle's current position, ensuring the accuracy of interacting particles and improving computational precision.

[0068] The embodiments described in this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.

[0069] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of this application, and may include more or fewer steps than shown, or combine certain steps, or different steps.

[0070] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0071] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.

[0072] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0073] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.

[0074] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of the units described above is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0075] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0076] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0077] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes multiple instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing programs, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0078] The preferred embodiments of the present application have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of the present application. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and substance of the embodiments of the present application shall be within the scope of the claims of the present application.

Claims

1. A neighborhood update method based on a neighborhood buffer layer and cumulative displacement triggering, characterized in that, include: The position of each particle in the computational domain at the current time step is taken as the first position, and the support domain radius of each particle is determined according to the smooth length of each particle. The thickness of the neighborhood buffer layer is determined based on the estimated motion range of each particle, and the candidate neighborhood radius of each particle is determined based on the support domain radius and the neighborhood buffer layer thickness. Based on the first position and the candidate neighborhood radius, a neighborhood search is performed on each particle to obtain a first candidate neighborhood set for each particle. The first position is used as a reference position, and the first candidate neighborhood set is used as the current candidate neighborhood set. The position of each particle in the next time step is taken as the second position, and the global maximum cumulative displacement of each particle is determined based on the second position of each particle and the reference position. Determine whether the preset neighborhood update triggering condition is met based on the global maximum cumulative displacement and the neighborhood buffer layer thickness; When the neighborhood update triggering condition is met, a neighborhood search is performed on each particle according to the second position and the candidate neighborhood radius to obtain the second candidate neighborhood set of each particle. The second position is used as the reference position and the second candidate neighborhood set is used as the current candidate neighborhood set. Based on the second position and the support domain radius, the interacting particles of each particle are determined in the current candidate neighborhood set. The physical state of each particle is updated based on the interacting particles of each particle. The position of each particle in the next time step is returned as the second position until the next time step is the final time step.

2. The SPH neighborhood update method based on a neighborhood buffer layer and cumulative displacement triggering according to claim 1, characterized in that, Determining the neighborhood buffer layer thickness based on the estimated motion range of each particle includes: Obtain the expected number of neighborhood reuse time steps and the expected maximum achievable motion velocity of each particle; The thickness of the neighborhood buffer layer is determined based on the neighborhood reuse time step number, the maximum movement speed, the time step length, and the preset safety factor.

3. The SPH neighborhood update method based on a neighborhood buffer layer and cumulative displacement triggering according to claim 1, characterized in that, The step of determining the neighborhood buffer layer thickness based on the estimated motion range of each particle further includes: A reference smooth length is determined based on the smooth length of each particle; The thickness of the neighborhood buffer layer is determined based on the reference smooth length and a preset scaling factor.

4. The SPH neighborhood update method based on a neighborhood buffer layer and cumulative displacement triggering according to claim 1, characterized in that, The step of determining the candidate neighborhood radius of each particle based on the support domain radius and the neighborhood buffer layer thickness includes: The sum of the support domain radius and the neighborhood buffer layer thickness is used as the candidate neighborhood radius for each particle.

5. The SPH neighborhood update method based on a neighborhood buffer layer and cumulative displacement triggering according to claim 1, characterized in that, Determining the global maximum cumulative displacement of each particle based on its second position and the reference position includes: The cumulative displacement of each particle is determined based on the second position of each particle and the reference position; The maximum value among the cumulative displacements of each particle is selected as the global maximum cumulative displacement.

6. The SPH neighborhood update method based on a neighborhood buffer layer and cumulative displacement triggering according to claim 1, characterized in that, The step of determining whether the preset neighborhood update triggering condition is met based on the global maximum cumulative displacement and the neighborhood buffer layer thickness includes: Determine whether the global maximum cumulative displacement is greater than half the thickness of the neighborhood buffer layer; When the global maximum cumulative displacement is greater than half the thickness of the neighborhood buffer layer, it is determined that the neighborhood update trigger condition is met. If the global maximum cumulative displacement is not greater than half the thickness of the neighborhood buffer layer, it is determined that the neighborhood update triggering condition is not met.

7. The SPH neighborhood update method based on a neighborhood buffer layer and cumulative displacement triggering according to claim 1, characterized in that, The step of determining the interacting particles of each particle in the current candidate neighborhood set based on the second position and the support domain radius includes: Among the aforementioned particles, select the particle whose interaction with other particles is not determined as the current particle; All particles in the current candidate neighborhood set of the current particle are taken as candidate particles; Based on the second position, calculate the distance between each candidate particle and the current particle, and select the candidate particle whose distance from the current particle is not greater than the radius of the support domain as the interacting particle of the current particle; Returning to the previous step, select the particle with undetermined interaction particles as the current particle, until all the particles are particles with determined interaction particles.

8. A neighborhood update device based on a neighborhood buffer layer and cumulative displacement triggering, characterized in that, The device includes: The support domain radius calculation module is used to take the position of each particle in the computational domain at the current time step as the first position, and determine the support domain radius of each particle according to the smooth length of each particle. The candidate neighborhood radius calculation module is used to determine the neighborhood buffer layer thickness based on the estimated motion range of each particle, and to determine the candidate neighborhood radius of each particle based on the support domain radius and the neighborhood buffer layer thickness. The candidate neighborhood set determination module is used to perform a neighborhood search on each particle according to the first position and the candidate neighborhood radius to obtain a first candidate neighborhood set for each particle, using the first position as a reference position and the first candidate neighborhood set as the current candidate neighborhood set. The global maximum cumulative displacement determination module is used to take the position of each particle in the next time step as the second position, and determine the global maximum cumulative displacement of each particle based on the second position of each particle and the reference position. The neighborhood update judgment module is used to determine whether the preset neighborhood update triggering condition is met based on the global maximum cumulative displacement and the neighborhood buffer layer thickness. The neighborhood update module is used to perform a neighborhood search on each particle according to the second position and the candidate neighborhood radius when the neighborhood update trigger condition is met, to obtain a second candidate neighborhood set for each particle, and to use the second position as the reference position and the second candidate neighborhood set as the current candidate neighborhood set. The physical state update module is used to determine the interacting particles of each particle in the current candidate neighborhood set according to the second position and the support domain radius, update the physical state of each particle according to the interacting particles, and return the position of each particle in the next time step as the second position until the next time step is the final time step.

9. An electronic device, characterized in that, The electronic device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the method according to any one of claims 1 to 7.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 7.