SPH viscosity self-adaptive prediction method based on multi-view three-dimensional surface reconstruction technology

By using multi-view 3D surface reconstruction technology and gradient-free global optimization algorithm to adaptively predict particle viscosity in SPH fluid simulation, the problems of reliance on human experience and single-view limitations in existing technologies are solved, and efficient and accurate fluid simulation results are achieved.

CN121052087BActive Publication Date: 2026-02-10UNIV OF SCI & TECH BEIJING
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511027202.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-24
Publication Date
2026-02-10
Estimated Expiration
2045-07-24

AI Technical Summary

Technical Problem

In existing SPH fluid simulations, particle viscosity settings rely heavily on human experience, lack objective calibration methods, and have low parameter tuning efficiency. Furthermore, single-viewpoint methods cannot provide sufficient constraints in multi-viewpoint scenarios, resulting in unstable simulation results and slow convergence speed.

Method used

We employ a multi-view 3D surface reconstruction technique to reconstruct the fluid surface mesh by acquiring multi-view images of real fluids. Combined with SPH simulation technology and a gradient-free global optimization algorithm, we adaptively predict the optimal particle viscosity value and use AABB-tree and KD-Tree to construct a shape difference metric to optimize the fluid simulation results.

Benefits of technology

It achieves the automatic acquisition of particle viscosity consistent with real fluid behavior within a finite number of iterations, significantly improving parameter tuning efficiency and ensuring the accuracy and stability of simulation results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121052087B_ABST
    Figure CN121052087B_ABST
Patent Text Reader

Abstract

The application discloses a SPH viscosity self-adaptive prediction method and device based on a multi-view three-dimensional surface reconstruction technology, and relates to the technical field of fluid simulation. The method comprises the following steps: reconstructing a target frame sequence by using a three-dimensional surface reconstruction technology according to multi-view images to obtain a fluid surface grid; performing fluid simulation by using SPH simulation technology according to the fluid surface grid based on a preset initial particle viscosity value to obtain a fluid particle simulation result; constructing a shape difference metric based on an AABB-tree and a KD-Tree according to the fluid surface grid and the fluid particle simulation result; taking the shape difference metric as a target function, performing self-adaptive prediction by using a gradient-free global optimization algorithm to obtain an optimal particle viscosity value; and performing fluid simulation by using SPH simulation technology according to the fluid surface grid based on the optimal particle viscosity value to obtain an optimized fluid particle simulation result. The application is a high-efficiency and accurate SPH viscosity self-adaptive prediction method based on a multi-view three-dimensional surface reconstruction technology.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of fluid simulation technology, and in particular to an adaptive prediction method and device for SPH viscosity based on multi-view three-dimensional surface reconstruction technology. Background Technology

[0002] Fluid simulation methods based on smoothed particle hydrodynamics (SPH) have been widely used in fluid simulation, and parameters such as particle viscosity have a decisive impact on the simulation results. In existing simulation workflows, particle viscosity is usually set based on experience and manual trial and error: the operator first performs a subjective visual evaluation of the simulation results, and then iteratively adjusts the viscosity until the appearance barely meets the requirements. This process is inefficient, often only discovering the problem after generating a large number of invalid results, forcing a resimulation.

[0003] In addition, existing fluid simulation frameworks lack unified and quantitative evaluation criteria, making it difficult to guarantee the realism of simulation results. Operators generally rely on subjective observation to determine the quality of fluid simulation results, making it difficult to obtain reliable and reproducible fluid simulation results. Furthermore, due to the lack of real-world information for reference, operators tend to make somewhat arbitrary adjustments to parameters such as viscosity.

[0004] Current methods for predicting fluid simulation parameters based on real-world information generally rely on single-view, two-dimensional information, such as fluid silhouettes, edge or depth maps, and derive fluid viscosity parameters based on differences in two-dimensional shape. These methods iteratively solve for unknowns such as particle viscosity by minimizing the geometric error between the simulated profile and the actual profile. However, single-view data contains limited information and can only stably handle fluids that are approximately symmetrical along their central axis, such as cylindrical water columns, or scenes containing only a single complex surface, such as relatively gentle fluctuations in the water surface of a pool. Once multiple free surfaces, cavities, local splashes, or significant asymmetric flow occur, single-view methods struggle to provide sufficient constraints, leading to unstable inversion results and slow convergence.

[0005] In the existing technology, there is a lack of an efficient and accurate adaptive prediction method for SPH viscosity based on multi-view three-dimensional surface reconstruction technology. Summary of the Invention

[0006] To address the technical problems of existing SPH fluid simulations, such as heavy reliance on manual experience in particle viscosity setting, lack of objective calibration methods, and low parameter tuning efficiency, this invention provides an adaptive SPH viscosity prediction method and apparatus based on multi-view three-dimensional surface reconstruction technology. The technical solution is as follows:

[0007] On the one hand, a method for adaptive prediction of SPH viscosity based on multi-view three-dimensional surface reconstruction technology is provided. This method is implemented by an SPH viscosity adaptive prediction device and includes:

[0008] Acquire multi-view images of the real fluid; based on the multi-view images, use 3D surface reconstruction technology to reconstruct the target frame sequence and obtain the fluid surface mesh;

[0009] Based on the preset initial particle viscosity value, fluid simulation is performed using SPH simulation technology according to the fluid surface mesh to obtain fluid particle simulation results;

[0010] Based on AABB-tree and KD-Tree, a shape difference metric is constructed according to the fluid surface mesh and fluid particle simulation results.

[0011] Using shape difference measurement as the objective function, and based on the preset initial particle viscosity value and fluid surface mesh, a gradient-free global optimization algorithm is used to adaptively predict and obtain the optimal particle viscosity value.

[0012] Based on the optimal particle viscosity value, fluid simulation is performed using SPH simulation technology according to the fluid surface mesh to obtain optimized fluid particle simulation results.

[0013] On the other hand, a SPH viscosity adaptive prediction device based on multi-view three-dimensional surface reconstruction technology is provided. This device is applied to the SPH viscosity adaptive prediction method based on multi-view three-dimensional surface reconstruction technology. The device includes:

[0014] The fluid surface mesh reconstruction module is used to acquire multi-view images of the real fluid; based on the multi-view images, the target frame sequence is reconstructed using 3D surface reconstruction technology to obtain the fluid surface mesh.

[0015] The fluid particle simulation module is used to perform fluid simulation based on preset initial particle viscosity values ​​and fluid surface mesh using SPH simulation technology to obtain fluid particle simulation results.

[0016] The shape difference metric construction module is used to construct shape difference metrics based on AABB-tree and KD-Tree, according to fluid surface mesh and fluid particle simulation results.

[0017] The particle viscosity optimization module uses shape difference measurement as the objective function and adaptively predicts the optimal particle viscosity value using a gradient-free global optimization algorithm based on the preset initial particle viscosity value and the fluid surface mesh.

[0018] The fluid particle optimization simulation module is used to perform fluid simulation based on the optimal particle viscosity value and the fluid surface mesh using SPH simulation technology to obtain optimized fluid particle simulation results.

[0019] On the other hand, an SPH viscosity adaptive prediction device is provided, the SPH viscosity adaptive prediction device comprising: a processor; a memory storing computer-readable instructions, wherein when the computer-readable instructions are executed by the processor, any one of the SPH viscosity adaptive prediction methods based on multi-view three-dimensional surface reconstruction technology described above is implemented.

[0020] On the other hand, a computer-readable storage medium is provided, wherein at least one instruction is stored therein, the at least one instruction being loaded and executed by a processor to implement any of the above-described SPH viscosity adaptive prediction methods based on multi-view three-dimensional surface reconstruction technology.

[0021] The beneficial effects of the technical solutions provided in the embodiments of the present invention include at least the following:

[0022] This invention proposes an adaptive SPH viscosity prediction method based on multi-view 3D surface reconstruction technology. Based on multi-view real fluid videos, multiple frames of fluid surface meshes are reconstructed using 3D surface reconstruction technology for SPH fluid simulation, with the viscosity parameter to be corrected as the independent variable. According to the geometric difference between the fluid simulation results and the measured fluid mesh, the particle viscosity is updated based on a gradient-free global optimization solver. Finally, when the loss function converges to a threshold, the predicted viscosity and the result of the fluid re-simulation are output. This invention can automatically obtain particle viscosity consistent with real fluid behavior within a finite number of iterations, significantly improving parameter tuning efficiency. This invention is an efficient and accurate adaptive SPH viscosity prediction method based on multi-view 3D surface reconstruction technology. Attached Figure Description

[0023] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0024] Figure 1 This is a flowchart of an SPH viscosity adaptive prediction method based on multi-view three-dimensional surface reconstruction technology provided by an embodiment of the present invention;

[0025] Figure 2 This is a schematic diagram illustrating the effect of three-dimensional reconstructed fluid provided in an embodiment of the present invention;

[0026] Figure 3This is a schematic diagram of viscosity prediction results for a motoscene scene provided by an embodiment of the present invention;

[0027] Figure 4 This is a block diagram of an SPH viscosity adaptive prediction device based on multi-view three-dimensional surface reconstruction technology provided in an embodiment of the present invention;

[0028] Figure 5 This is a schematic diagram of the structure of an SPH viscosity adaptive prediction device provided in an embodiment of the present invention. Detailed Implementation

[0029] The technical solution of the present invention will now be described with reference to the accompanying drawings.

[0030] In embodiments of the present invention, words such as "exemplarily," "for example," etc., are used to indicate that something is an example, illustration, or description. Any embodiment or design described as "exemplary" in the present invention should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of the word "exemplary" is intended to present the concept in a concrete manner. Furthermore, in embodiments of the present invention, the meaning expressed by "and / or" can be both, or either one.

[0031] In the embodiments of this invention, the terms "image" and "picture" may sometimes be used interchangeably. It should be noted that, without emphasizing the distinction between them, they convey the same meaning. Similarly, the terms "of," "corresponding (relevant)," and "corresponding" may sometimes be used interchangeably. It should be noted that, without emphasizing the distinction between them, they convey the same meaning.

[0032] In this embodiment of the invention, sometimes a subscript such as W1 may be written in a non-subscript form such as W1. When the difference is not emphasized, the meaning they express is the same.

[0033] To make the technical problems, technical solutions and advantages of the present invention clearer, a detailed description will be given below in conjunction with the accompanying drawings and specific embodiments.

[0034] This invention provides a method for adaptive SPH viscosity prediction based on multi-view three-dimensional surface reconstruction technology. This method can be implemented using an adaptive SPH viscosity prediction device, which can be a terminal or a server. Figure 1 The flowchart shown is for an adaptive SPH viscosity prediction method based on multi-view 3D surface reconstruction technology. The processing flow of this method may include the following steps:

[0035] S1. Obtain multi-view images of the real fluid; based on the multi-view images, use 3D surface reconstruction technology to reconstruct the target frame sequence and obtain the fluid surface mesh.

[0036] Optionally, based on the multi-view images, a target frame sequence is reconstructed using 3D surface reconstruction techniques to obtain a fluid surface mesh, including:

[0037] Based on the multi-view image, the SAM-2 segmentation model is used to remove the background to obtain the processed multi-view image.

[0038] Based on the processed multi-view images, the Colmap method is used to calibrate the camera and obtain calibrated multi-view images.

[0039] Based on the calibrated multi-view images, the fluid surface mesh is reconstructed using three-dimensional surface reconstruction technology to obtain a preliminary fluid surface mesh.

[0040] The surface voids of the initial fluid surface mesh are optimized to obtain the fluid surface network.

[0041] In one feasible implementation, the present invention sparsely samples some video reconstructed frames at certain time intervals. The multi-view image corresponding to each reconstructed frame is then processed by a Segment Anything Model 2 (SAM-2) to remove the background, retaining only the fluid pixels. SAM-2 is an upgraded version released by Meta in 2024, primarily enhancing support for 3D image and video segmentation and introducing a memory module to improve temporal consistency.

[0042] The segmentation results are used to perform camera calibration using the Colmap method, which yields the camera's intrinsic and extrinsic parameters as well as the sparse initial particles reconstructed by this method. Colmap is one of the most commonly used open-source pipelines for image-based 3D reconstruction in academia and industry, and is often used to initialize the basic information required for 3D Gaussian reconstruction.

[0043] The Planar-based Gaussian Splatting for Efficient and High-Fidelity Surface Reconstruction (PGSR) method is adopted to randomly generate Gaussian primitives from the initial particles generated by Colmap. The projection angle and parameters are determined according to the calibrated camera intrinsic and extrinsic parameters to reconstruct the fluid surface.

[0044] The reconstructed mesh is optimized to remove surface voids and prevent errors in determining internal and external relationships when calculating the loss. A linear scan is performed on the input mesh to determine if any half-edges are missing relative triangles. All half-edges still located on the boundary are collected into a vector, and these half-edges are topologically divided into one or more closed loops. The vector is traversed sequentially, and the selected half-edges are confirmed to still be on the boundary to avoid previous operations filling them. Triangulation filling is performed on each loop. The algorithm constructs a local front edge according to the order of the loop vertices and iteratively selects the edge with the smallest concave angle to insert a sector triangle until the void is completely covered by a new facet with no self-intersection and consistent normal, thus maintaining the original geometric continuity.

[0045] Among them, three-dimensional surface reconstruction technology includes implicit neural field reconstruction technology or reconstruction technology based on Gaussian representation.

[0046] In one feasible implementation, the three-dimensional surface reconstruction technology employed in this invention can use implicit neural field reconstruction, Gaussian representation-based reconstruction, or other reconstruction techniques capable of generating closed continuous fluid meshes.

[0047] S2. Based on the preset initial particle viscosity value, fluid simulation is performed using SPH simulation technology according to the fluid surface mesh to obtain fluid particle simulation results.

[0048] In one feasible implementation, the processed mesh internal volume domain is divided according to a set particle spacing. Generate an initial set of fluid particles; generate rigid boundary particles for non-deformable objects such as container walls and obstacles in the fluid scene, and set their material properties. Assign an external field acceleration g and an initial particle viscosity value to all fluid particles.

[0049] S3. Based on AABB-tree and KD-Tree, a shape difference metric is constructed according to the fluid surface mesh and fluid particle simulation results.

[0050] Optionally, based on AABB-tree and KD-tree, a shape difference metric is constructed according to the fluid surface mesh and fluid particle simulation results, including:

[0051] Based on the fluid particle simulation results, obtain the set of fluid particle positions at the current time step;

[0052] Based on the fluid surface mesh, the set of fluid particle positions is traversed and filtered to obtain the set of external particle positions outside the fluid surface mesh;

[0053] Based on the fluid surface mesh, the first Euclidean distance set from the external particles to the fluid surface mesh is obtained by using an AABB-tree to perform nearest point lookup according to the set of external particle positions.

[0054] Based on the random sampling point method, within the fluid surface mesh, a nearest neighbor query is performed using KD-Tree according to the set of external particle positions to obtain the second Euclidean distance set from the sampling point to the nearest external particle position;

[0055] A shape difference metric is constructed based on the first set of Euclidean distances and the second set of Euclidean distances.

[0056] The mathematical expression for the shape difference measure is as follows (1):

[0057] (1);

[0058] in, Weights for the internal penalty terms; External particle penalty term; Fill in the internal penalty items;

[0059] The mathematical expression for the external particle penalty term is as follows (2):

[0060] (2);

[0061] in, For particles The first Euclidean distance to the nearest point on the fluid surface grid; As an indicator function, the particle The value is 1 if the particle is located outside the fluid surface grid, and 0 otherwise; N is the number of external particles.

[0062] The mathematical expression for the internal filling penalty term is as follows (3):

[0063] (3);

[0064] in, Sampling points The second Euclidean distance to the nearest external particle location; K is the number of sampling points.

[0065] In one feasible implementation, the set of positions of N fluid particles at the current time step is obtained at the simulation end. For closed fluid meshes reconstructed from multiple perspectives Perform a traversal, identifying all particles located outside the grid: for each A nearest-point query is performed using an axis-aligned bounding box tree (AABB-tree) to obtain the minimum distance from the point to the grid. If the query result falls outside the grid, then set the indicator. Otherwise, it is 0. This forms the external error term. This means that only particles that "leak out of the mesh" are penalized cumulatively based on the square of their distance from the mesh surface, with the penalty increasing the further away from the mesh surface.

[0066] AABB-tree is a spatially hierarchical data structure primarily used to accelerate geometric queries (such as collision detection, ray casting, and nearest neighbor search). It optimizes computation through spatial partitioning, indirectly supporting the reconstruction, rendering, or interactive processing of fluid meshes.

[0067] To detect whether cavities exist inside the mesh, in the mesh Evenly and randomly sprinkled inside One, obtain reference set Construct a three-dimensional binary space partitioning tree (K-dimensional tree, KD-Tree) for each... In particle set Perform a nearest neighbor query in the middle, and remember the distance is 1. The sum of the squares of these distances constitutes the internal error term. If there are unfilled pores inside, the corresponding sampling point will have a larger distance, thus significantly magnifying the image. .

[0068] KD-Trees are used to efficiently organize sets of points in k-dimensional space (typically for 3D data). Unlike AABB-trees, KD-Trees partition space directly based on data points, rather than bounding boxes. They are a core acceleration structure in computer graphics, physics simulations, and machine learning. KD-Trees are an efficient spatial indexing structure for point clouds, particularly adept at nearest neighbor search and range queries, and are widely used to accelerate computation in fluid simulations, point cloud processing, and neural field optimization.

[0069] The two are then added together according to their respective weights to obtain the total shape difference measure. .

[0070] S4. Using the shape difference metric as the objective function, and based on the preset initial particle viscosity value and the fluid surface mesh, an adaptive prediction is performed using a gradient-free global optimization algorithm to obtain the optimal particle viscosity value.

[0071] Optionally, the shape difference metric is used as the objective function. Based on a preset initial particle viscosity value and the fluid surface mesh, a gradient-free global optimization algorithm is used for adaptive prediction to obtain the optimal particle viscosity value, including:

[0072] Based on a preset candidate value range, the candidate particle viscosity value set is obtained by sampling and generating the sample using an analytical bounded mapping method according to the preset initial particle viscosity value.

[0073] The objective function is a shape difference metric. Simulation is performed based on the set of candidate particle viscosity values ​​and the fluid surface mesh, and the set of shape difference metric values ​​is calculated.

[0074] Based on the set of shape difference metrics, the particle viscosity value set is optimized according to the candidate particle viscosity value set to obtain an updated particle viscosity value set.

[0075] The objective function is a shape difference metric. The simulation is performed based on the updated set of particle viscosity values ​​and the fluid surface mesh, and the updated set of shape difference metric values ​​is calculated.

[0076] When the minimum value in the set of updated shape difference metrics is less than the preset metric threshold, the updated particle viscosity value corresponding to the minimum value is taken as the optimal particle viscosity value.

[0077] In one feasible implementation, this invention employs a gradient-free global optimization algorithm, specifically the Covariance Matrix Adaptation Evolution Strategy (CMA-ES), to update the particle viscosity parameters based on the aforementioned shape difference metric. CMA-ES is designed for high-dimensional / non-convex problems in continuous domains. It efficiently searches for optimal parameters even with unknown gradients by adaptively adjusting the mean, covariance matrix, and step size of a multivariate normal distribution. It explores the solution space using a pool of random samples, readjusts the search distribution based on elite samples, and gradually approaches the global optimum.

[0078] Using the current viscosity as the mean x0, and the initial step size Generate h candidate viscosity values ​​in a 1-dimensional gene space; perform analytic bounded mapping on the gene vectors to ensure that the candidate values ​​are in the interval [0, 100], and provide gene-phenotype conversion gp.pheno() to avoid gradient distortion caused by hard truncation.

[0079] For each candidate viscosity, the following steps are taken:

[0080] Roll back or initialize the simulation state; advance frame_interval time steps and calculate the shape difference metric; select the value based on h losses. For each elite individual, the weighted covariance of its centered vector is calculated to obtain a new mean. covariance matrix Simultaneously, adaptive scaling step size This allows the search to converge quickly without getting stuck in local minima.

[0081] The steps are repeated until the termination condition is met. The non-negative viscosity is obtained and written back to the simulator. Then, the particle state is restored to its state before prediction.

[0082] S5. Based on the optimal particle viscosity value, fluid simulation is performed using SPH simulation technology according to the fluid surface mesh to obtain optimized fluid particle simulation results.

[0083] In one feasible implementation, the motoscene reconstruction effect for fluid scenes is as follows: Figure 2 As shown, the reconstruction voxel_size used is 0.02. PGSR has a good reconstruction effect on transparent fluid surfaces, but it inevitably produces surface voids and depressions in reflective areas.

[0084] In Houdini, a transparent fluid sequence with rigorously defined physical parameters is rendered offline, and its 3D mesh and corresponding multi-view images are used together as the ground-truth dataset. Only the surface mesh reconstructed from each frame is exposed to the optimizer, while the true viscosity value is hidden. The self-calibration process of this invention is used to simulate the same initial geometry and predict the dynamic viscosity online. Throughout the solution process, 10 DFSPH time steps are automatically integrated between every two frames, and the shape difference metric is calculated. This drives the adaptive evolution strategy of the covariance matrix to iteratively update the parameters. Figure 3 The predicted viscosity values ​​as the number of iterations are presented, and they are in good agreement with the set actual viscosity, verifying the algorithm's ability to accurately lock the physical property parameters even in gradient-free and noisy environments.

[0085] This invention proposes an adaptive SPH viscosity prediction method based on multi-view 3D surface reconstruction technology. Based on multi-view real fluid videos, multiple frames of fluid surface meshes are reconstructed using 3D surface reconstruction technology for SPH fluid simulation, with the viscosity parameter to be corrected as the independent variable. According to the geometric difference between the fluid simulation results and the measured fluid mesh, the particle viscosity is updated based on a gradient-free global optimization solver. Finally, when the loss function converges to a threshold, the predicted viscosity and the result of the fluid re-simulation are output. This invention can automatically obtain particle viscosity consistent with real fluid behavior within a finite number of iterations, significantly improving parameter tuning efficiency. This invention is an efficient and accurate adaptive SPH viscosity prediction method based on multi-view 3D surface reconstruction technology.

[0086] Figure 4 This is a block diagram of an adaptive SPH viscosity prediction device based on multi-view three-dimensional surface reconstruction technology provided in an embodiment of the present invention. This device is used for the adaptive SPH viscosity prediction method based on multi-view three-dimensional surface reconstruction technology. (Refer to...) Figure 4 The device includes a fluid surface mesh reconstruction module 410, a fluid particle simulation module 420, a shape difference measurement construction module 430, a particle viscosity value optimization module 440, and a fluid particle optimization simulation module 450. Among them:

[0087] The fluid surface mesh reconstruction module 410 is used to acquire multi-view images of the real fluid; based on the multi-view images, the target frame sequence is reconstructed using three-dimensional surface reconstruction technology to obtain the fluid surface mesh;

[0088] The fluid particle simulation module 420 is used to perform fluid simulation based on a preset initial particle viscosity value and a fluid surface mesh using SPH simulation technology to obtain fluid particle simulation results.

[0089] Shape difference metric construction module 430 is used to construct shape difference metrics based on AABB-tree and KD-Tree, according to fluid surface mesh and fluid particle simulation results;

[0090] The particle viscosity value optimization module 440 is used to take the shape difference measurement as the objective function, and use a gradient-free global optimization algorithm to adaptively predict the optimal particle viscosity value based on the preset initial particle viscosity value and the fluid surface mesh.

[0091] The Fluid Particle Optimization Simulation Module 450 is used to perform fluid simulation based on the optimal particle viscosity value and the fluid surface mesh using SPH simulation technology to obtain optimized fluid particle simulation results.

[0092] Optionally, the fluid surface mesh reconstruction module 410 is further used for:

[0093] Based on the multi-view image, the SAM-2 segmentation model is used to remove the background to obtain the processed multi-view image.

[0094] Based on the processed multi-view images, the Colmap method is used to calibrate the camera and obtain calibrated multi-view images.

[0095] Based on the calibrated multi-view images, the fluid surface mesh is reconstructed using three-dimensional surface reconstruction technology to obtain a preliminary fluid surface mesh.

[0096] The surface voids of the initial fluid surface mesh are optimized to obtain the fluid surface network.

[0097] Among them, three-dimensional surface reconstruction technology includes implicit neural field reconstruction technology or reconstruction technology based on Gaussian representation.

[0098] Optionally, the shape difference measurement building module 430 is further used for:

[0099] Based on the fluid particle simulation results, obtain the set of fluid particle positions at the current time step;

[0100] Based on the fluid surface mesh, the set of fluid particle positions is traversed and filtered to obtain the set of external particle positions outside the fluid surface mesh;

[0101] Based on the fluid surface mesh, the first Euclidean distance set from the external particles to the fluid surface mesh is obtained by using an AABB-tree to perform nearest point lookup according to the set of external particle positions.

[0102] Based on the random sampling point method, within the fluid surface mesh, a nearest neighbor query is performed using KD-Tree according to the set of external particle positions to obtain the second Euclidean distance set from the sampling point to the nearest external particle position;

[0103] A shape difference metric is constructed based on the first set of Euclidean distances and the second set of Euclidean distances.

[0104] The mathematical expression for the shape difference measure is as follows (1):

[0105] (1);

[0106] in, Weights for the internal penalty terms; External particle penalty term; Fill in the internal penalty items;

[0107] The mathematical expression for the external particle penalty term is as follows (2):

[0108] (2);

[0109] in, For particles The first Euclidean distance to the nearest point on the fluid surface grid; As an indicator function, the particle The value is 1 if the particle is located outside the fluid surface grid, and 0 otherwise; N is the number of external particles.

[0110] The mathematical expression for the internal filling penalty term is as follows (3):

[0111] (3);

[0112] in, Sampling points The second Euclidean distance to the nearest external particle location; K is the number of sampling points.

[0113] Optionally, the particle viscosity value optimization module 440 is further used for:

[0114] Based on a preset candidate value range, the candidate particle viscosity value set is obtained by sampling and generating the sample using an analytical bounded mapping method according to the preset initial particle viscosity value.

[0115] The objective function is a shape difference metric. Simulation is performed based on the set of candidate particle viscosity values ​​and the fluid surface mesh, and the set of shape difference metric values ​​is calculated.

[0116] Based on the set of shape difference metrics, the particle viscosity value set is optimized according to the candidate particle viscosity value set to obtain an updated particle viscosity value set.

[0117] The objective function is a shape difference metric. The simulation is performed based on the updated set of particle viscosity values ​​and the fluid surface mesh, and the updated set of shape difference metric values ​​is calculated.

[0118] When the minimum value in the set of updated shape difference metrics is less than the preset metric threshold, the updated particle viscosity value corresponding to the minimum value is taken as the optimal particle viscosity value.

[0119] This invention proposes an adaptive SPH viscosity prediction method based on multi-view 3D surface reconstruction technology. Based on multi-view real fluid videos, multiple frames of fluid surface meshes are reconstructed using 3D surface reconstruction technology for SPH fluid simulation, with the viscosity parameter to be corrected as the independent variable. According to the geometric difference between the fluid simulation results and the measured fluid mesh, the particle viscosity is updated based on a gradient-free global optimization solver. Finally, when the loss function converges to a threshold, the predicted viscosity and the result of the fluid re-simulation are output. This invention can automatically obtain particle viscosity consistent with real fluid behavior within a finite number of iterations, significantly improving parameter tuning efficiency. This invention is an efficient and accurate adaptive SPH viscosity prediction method based on multi-view 3D surface reconstruction technology.

[0120] Figure 5 This is a schematic diagram of the structure of an SPH viscosity adaptive prediction device provided in an embodiment of the present invention, as shown below. Figure 5 As shown, the SPH viscosity adaptive prediction device may include the above-mentioned Figure 4 The illustrated SPH viscosity adaptive prediction device is based on multi-view three-dimensional surface reconstruction technology. Optionally, the SPH viscosity adaptive prediction device 510 may include a first processor 2001.

[0121] Optionally, the SPH viscosity adaptive prediction device 510 may also include a memory 2002 and a transceiver 2003.

[0122] The first processor 2001, memory 2002, and transceiver 2003 can be connected via a communication bus.

[0123] The following is combined with Figure 5 A detailed introduction to each component of the SPH viscosity adaptive prediction device 510:

[0124] The first processor 2001 is the control center of the SPH viscosity adaptive prediction device 510. It can be a single processor or a collective term for multiple processing elements. For example, the first processor 2001 can be one or more central processing units (CPUs), application-specific integrated circuits (ASICs), or one or more integrated circuits configured to implement embodiments of the present invention, such as one or more digital signal processors (DSPs), or one or more field-programmable gate arrays (FPGAs).

[0125] Optionally, the first processor 2001 can perform various functions of the SPH viscosity adaptive prediction device 510 by running or executing software programs stored in the memory 2002 and calling data stored in the memory 2002.

[0126] In a specific implementation, as one example, the first processor 2001 may include one or more CPUs, for example... Figure 5 CPU0 and CPU1 are shown in the diagram.

[0127] In a specific implementation, as one example, the SPH viscosity adaptive prediction device 510 may also include multiple processors, for example... Figure 5 The first processor 2001 and the second processor 2004 are shown in the diagram. Each of these processors can be a single-core processor or a multi-core processor. Here, a processor can refer to one or more devices, circuits, and / or processing cores used to process data (such as computer program instructions).

[0128] The memory 2002 is used to store the software program that executes the present invention, and is controlled by the first processor 2001 to execute it. The specific implementation method can be referred to the above method embodiment, and will not be repeated here.

[0129] Optionally, the memory 2002 may be a read-only memory (ROM) or other type of static storage device capable of storing static information and instructions, random access memory (RAM) or other type of dynamic storage device capable of storing information and instructions, or electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but not limited thereto. The memory 2002 may be integrated with the first processor 2001 or may exist independently, and may be connected via the interface circuit of the SPH viscosity adaptive prediction device 510. Figure 5 (Not shown in the image) is coupled to the first processor 2001, and this embodiment of the invention does not specifically limit this.

[0130] The transceiver 2003 is used to communicate with network devices or with terminal devices.

[0131] Alternatively, transceiver 2003 may include a receiver and a transmitter. Figure 5 (Not shown separately). The receiver is used to implement the receiving function, and the transmitter is used to implement the transmitting function.

[0132] Optionally, the transceiver 2003 can be integrated with the first processor 2001 or exist independently, and can be connected to the interface circuit of the SPH viscosity adaptive prediction device 510. Figure 5 (Not shown in the image) is coupled to the first processor 2001, and this embodiment of the invention does not specifically limit this.

[0133] It should be noted that, Figure 5 The structure of the SPH viscosity adaptive prediction device 510 shown does not constitute a limitation on the router. Actual SPH viscosity adaptive prediction devices may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0134] Furthermore, the technical effect of the SPH viscosity adaptive prediction device 510 can be referred to the technical effect of the SPH viscosity adaptive prediction method based on multi-view three-dimensional surface reconstruction technology described in the above method embodiments, and will not be repeated here.

[0135] It should be understood that the first processor 2001 in the embodiments of the present invention may be a central processing unit (CPU), or it may 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 may be a microprocessor, or it may be any conventional processor, etc.

[0136] It should also be understood that the memory in the embodiments of the present invention 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).

[0137] The above embodiments can be implemented, in whole or in part, by software, hardware (such as circuits), firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more sets of available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium. A semiconductor medium can be a solid-state drive.

[0138] It should be understood that the term "and / or" in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. A and B can be singular or plural. Additionally, the character " / " in this article generally indicates an "or" relationship between the preceding and following related objects, but it can also represent an "and / or" relationship. Please refer to the context for a more accurate understanding.

[0139] In this invention, "at least one" means one or more, and "more than one" means two or more. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of a single item or a plurality of items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, and c can be a single item or multiple items.

[0140] It should be understood that, in various embodiments of the present invention, the order of the above-mentioned process numbers does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0141] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.

[0142] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the devices, apparatuses, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0143] In the several embodiments provided by this invention, it should be understood that the disclosed devices, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units 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 device, 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 devices or units may be electrical, mechanical, or other forms.

[0144] The units described 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.

[0145] In addition, the functional units in the various embodiments of the present invention 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.

[0146] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a 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 several 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 described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0147] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for adaptive prediction of SPH viscosity based on multi-view three-dimensional surface reconstruction technology, characterized in that, The method includes: Acquire multi-view images of the real fluid; based on the multi-view images, use 3D surface reconstruction technology to reconstruct the target frame sequence and obtain the fluid surface mesh; Based on the preset initial particle viscosity value, fluid simulation is performed using SPH simulation technology according to the fluid surface mesh to obtain fluid particle simulation results; Based on AABB-tree and KD-tree, a shape difference metric is constructed according to the fluid surface mesh and fluid particle simulation results, including: Based on the fluid particle simulation results, obtain the set of fluid particle positions at the current time step; Based on the fluid surface mesh, the set of fluid particle positions is traversed and filtered to obtain the set of external particle positions outside the fluid surface mesh; Based on the fluid surface mesh, the first Euclidean distance set from the external particles to the fluid surface mesh is obtained by using an AABB-tree to perform nearest point lookup according to the set of external particle positions. Based on the random sampling point method, within the fluid surface mesh, a nearest neighbor query is performed using KD-Tree according to the set of external particle positions to obtain the second Euclidean distance set from the sampling point to the nearest external particle position; A shape difference metric is constructed based on the first set of Euclidean distances and the second set of Euclidean distances; The mathematical expression for the shape difference measure is as follows (1): (1); in, Weights for the internal penalty terms; External particle penalty term; Fill in the internal penalty items; The mathematical expression for the external particle penalty term is as follows (2): (2); in, For particles The first Euclidean distance to the nearest point on the fluid surface grid; As an indicator function, the particle The value is 1 if the particle is located outside the fluid surface grid, and 0 otherwise; N is the number of external particles. The mathematical expression for the internal filling penalty term is as follows (3): (3); in, Sampling points The second Euclidean distance to the nearest external particle position; K is the number of sampling points; Using shape difference measurement as the objective function, and based on the preset initial particle viscosity value and fluid surface mesh, a gradient-free global optimization algorithm is used to adaptively predict and obtain the optimal particle viscosity value. Based on the optimal particle viscosity value, fluid simulation is performed using SPH simulation technology according to the fluid surface mesh to obtain optimized fluid particle simulation results.

2. The SPH viscosity adaptive prediction method based on multi-view three-dimensional surface reconstruction technology according to claim 1, characterized in that, The step of reconstructing the target frame sequence using 3D surface reconstruction technology based on multi-view images to obtain a fluid surface mesh includes: Based on the multi-view image, the SAM-2 segmentation model is used to remove the background to obtain the processed multi-view image. Based on the processed multi-view images, the Colmap method is used to calibrate the camera and obtain calibrated multi-view images. Based on the calibrated multi-view images, the fluid surface mesh is reconstructed using three-dimensional surface reconstruction technology to obtain a preliminary fluid surface mesh. The surface voids of the initial fluid surface mesh are optimized to obtain the fluid surface network.

3. The SPH viscosity adaptive prediction method based on multi-view three-dimensional surface reconstruction technology according to claim 1, characterized in that, The three-dimensional surface reconstruction technology includes implicit neural field reconstruction technology or reconstruction technology based on Gaussian representation.

4. The SPH viscosity adaptive prediction method based on multi-view three-dimensional surface reconstruction technology according to claim 1, characterized in that, The step of using shape difference measurement as the objective function, and adaptively predicting the optimal particle viscosity value using a gradient-free global optimization algorithm based on a preset initial particle viscosity value and the fluid surface mesh, includes: Based on a preset candidate value range, the candidate particle viscosity value set is obtained by sampling and generating the sample using an analytical bounded mapping method according to the preset initial particle viscosity value. The objective function is a shape difference metric. Simulation is performed based on the set of candidate particle viscosity values ​​and the fluid surface mesh, and the set of shape difference metric values ​​is calculated. Based on the set of shape difference metrics, the particle viscosity value set is optimized according to the candidate particle viscosity value set to obtain an updated particle viscosity value set. The objective function is a shape difference metric. The simulation is performed based on the updated set of particle viscosity values ​​and the fluid surface mesh, and the updated set of shape difference metric values ​​is calculated. When the minimum value in the set of updated shape difference metrics is less than the preset metric threshold, the updated particle viscosity value corresponding to the minimum value is taken as the optimal particle viscosity value.

5. A SPH viscosity adaptive prediction device based on multi-view three-dimensional surface reconstruction technology, wherein the SPH viscosity adaptive prediction device based on multi-view three-dimensional surface reconstruction technology is used to implement the SPH viscosity adaptive prediction method based on multi-view three-dimensional surface reconstruction technology as described in any one of claims 1-4, characterized in that, The device includes: The fluid surface mesh reconstruction module is used to acquire multi-view images of the real fluid; based on the multi-view images, the target frame sequence is reconstructed using 3D surface reconstruction technology to obtain the fluid surface mesh. The fluid particle simulation module is used to perform fluid simulation based on preset initial particle viscosity values ​​and fluid surface mesh using SPH simulation technology to obtain fluid particle simulation results. The shape difference metric construction module is used to construct shape difference metrics based on AABB-tree and KD-Tree, according to fluid surface mesh and fluid particle simulation results. The shape difference measurement construction module is further used for: Based on the fluid particle simulation results, obtain the set of fluid particle positions at the current time step; Based on the fluid surface mesh, the set of fluid particle positions is traversed and filtered to obtain the set of external particle positions outside the fluid surface mesh; Based on the fluid surface mesh, the first Euclidean distance set from the external particles to the fluid surface mesh is obtained by using an AABB-tree to perform nearest point lookup according to the set of external particle positions. Based on the random sampling point method, within the fluid surface mesh, a nearest neighbor query is performed using KD-Tree according to the set of external particle positions to obtain the second Euclidean distance set from the sampling point to the nearest external particle position; A shape difference metric is constructed based on the first set of Euclidean distances and the second set of Euclidean distances; The mathematical expression for the shape difference measure is as follows (1): (1); in, Weights for the internal penalty terms; External particle penalty term; Fill in the internal penalty items; The mathematical expression for the external particle penalty term is as follows (2): (2); in, For particles The first Euclidean distance to the nearest point on the fluid surface grid; As an indicator function, the particle The value is 1 if the particle is located outside the fluid surface grid, and 0 otherwise; N is the number of external particles. The mathematical expression for the internal filling penalty term is as follows (3): (3); in, Sampling points The second Euclidean distance to the nearest external particle position; K is the number of sampling points; The particle viscosity optimization module uses shape difference measurement as the objective function and adaptively predicts the optimal particle viscosity value using a gradient-free global optimization algorithm based on the preset initial particle viscosity value and the fluid surface mesh. The fluid particle optimization simulation module is used to perform fluid simulation based on the optimal particle viscosity value and the fluid surface mesh using SPH simulation technology to obtain optimized fluid particle simulation results.

6. The SPH viscosity adaptive prediction device based on multi-view three-dimensional surface reconstruction technology according to claim 5, characterized in that, The fluid surface mesh reconstruction module is further used for: Based on the multi-view image, the SAM-2 segmentation model is used to remove the background to obtain the processed multi-view image. Based on the processed multi-view images, the Colmap method is used to calibrate the camera and obtain calibrated multi-view images. Based on the calibrated multi-view images, the fluid surface mesh is reconstructed using three-dimensional surface reconstruction technology to obtain a preliminary fluid surface mesh. The surface voids of the initial fluid surface mesh are optimized to obtain the fluid surface network.

7. An adaptive SPH viscosity prediction device, characterized in that, The SPH viscosity adaptive prediction device includes: processor; A memory storing computer-readable instructions that, when executed by the processor, implement the method as described in any one of claims 1 to 4.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium contains program code that can be invoked by a processor to execute the method as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Fluid mechanics solving method and system based on visual priori and physical constraint

    CN118607414A

  • Three-dimensional reconstruction method, apparatus and system, and storage medium

    WO2022179385A1