A fluid parameter processing method, device, electronic equipment and storage medium
By constructing solid particles and interpolating fluid properties, the problems of grid quality and numerical diffusion in grid-based methods are solved, flexible adaptability and stability to complex flows are achieved, and the accuracy and stability of fluid parameter calculations are improved. .
Patent Information
- Application Number
- CN202410620470.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-20
- Publication Date
- 2024-08-30
- Estimated Expiration
- 2044-05-20
AI Technical Summary
Existing grid-based numerical methods are difficult to ensure grid quality during complex boundary motions, resulting in increased computational complexity, numerical diffusion and instability, and the results depend on grid resolution and structure, making it difficult to accurately capture flow details and process local phenomenon.
By obtaining a solid geometric model composed of subdivided triangle patches and/or original triangle patches, solid particles are constructed, and fluid properties are interpolated based on the fluid parameter information of the liquid particles in the support domain of the solid particles to reduce numerical diffusion and improve calculation stability. and local adaptability.
It achieves flexible adaptability to fluid flow, reduces the influence of numerical diffusion, improves the stability and local adaptability of fluid parameter calculation, and avoids grid dependence and difficulties in processing local phenomena.
Smart Images

Figure CN118194776B
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of computer software application technology, and in particular, to a fluid parameter processing method, device, electronic device and storage medium. Background Art
[0002] In fluid dynamics simulation, it is necessary to accurately describe the interaction between the fluid and the solid surface, such as the flow characteristics at the solid surface, the fluid velocity and pressure distribution near the surface, etc. By interpolating the fluid property information to the solid surface, the interaction between the fluid and the solid can be simulated more accurately, thereby obtaining a more realistic fluid dynamics behavior.
[0003] At present, traditional mesh-based numerical methods such as FDM (Finite Difference Method) and FEM (Finite Element Method) have been widely used in various fields of computational fluid dynamics. For many simple flow problems, traditional mesh methods can generally give relatively accurate calculation results. In the process of geometric modeling, traditional mesh methods need to use computer-aided design (CAD) software to model the geometric shape of fluid flow, including the geometric shape of the wall and the rest of the flow area. In the process of generating meshes, a suitable mesh generation method is selected, such as structured mesh generation method or unstructured mesh generation method. Near the wall, particularly detailed mesh division is required to ensure that the flow characteristics near the wall can be accurately described. Common mesh types include orthogonal meshes, triangular meshes, and quadrilateral meshes. At the same time, appropriate boundary conditions need to be set on the mesh nodes, including wall boundary conditions, inlet conditions, and outlet conditions. For the wall, no-slip conditions (the tangential velocity of the wall is zero) and no-penetration conditions (the normal velocity of the wall is zero) are usually set, as well as the temperature and turbulence characteristics of the wall. The discretized fluid dynamics equations are further solved using numerical methods, such as the finite volume method, the finite element method, or the spectral method. These methods discretize the fluid dynamics equations into a set of algebraic equations, and obtain the numerical solution of the flow field through iterative solution. In turbulence simulation, the wall function model or the modified wall shear stress model is used to approximate the friction effect near the wall. These wall models are usually based on the relationship between the wall friction velocity and the wall shear stress, and are modified according to the turbulent characteristics of the flow field. In the iterative solution process, the discrete equations can be iteratively solved until the convergence criterion is met. Iterative solution methods, such as iterative relaxation method or conjugate gradient method, are usually used to obtain numerical solutions to the flow field.
[0004] In the process of implementing the present invention, the inventors found that the prior art has the following defects: With the gradual complexity of fluid mechanics research problems, it has always been a difficult problem for mesh-based numerical methods to ensure the quality of the mesh in the computational domain during complex boundary motion. Specifically, mesh-based numerical methods often show the following shortcomings: First, mesh-based methods require the mesh structure to be defined in advance, so they are subject to mesh restrictions. This means that in the case of deformation or complex flow, the mesh structure needs to be dynamically adjusted to adapt to fluid deformation, which may increase the computational complexity. Secondly, in mesh-based methods, since mesh units of limited size are used to approximate the fluid flow, if the resolution of the mesh is insufficient, that is, the size of the mesh unit is too large, it will lead to the inability to accurately capture the detailed information in the flow, resulting in the loss of gradient information, which in turn causes numerical diffusion. At the same time, the calculation of numerical solutions involves the calculation of approximate gradients, and the approximation of these gradients often introduces additional numerical diffusion. This means that numerical errors and instability may occur at the boundary (where the fluid contacts the solid wall) or in places of drastic changes, especially when dealing with high Reynolds number flows. Thirdly, the results of mesh-based methods may be affected by the mesh resolution and structure, that is, the results may depend on the fineness and shape of the mesh. This may lead to instability and errors in the results. Finally, in the grid-based method, since physical quantities (such as velocity, pressure, temperature, and density) are discretized within the grid cells, it may be difficult to deal with local phenomena. For example, a higher grid resolution may be required to deal with local intense turbulent structures or boundary layer phenomena. Summary of the invention
[0005] The embodiments of the present invention provide a fluid parameter processing method, device, electronic device and storage medium, which can flexibly adapt to the deformation and complexity of fluid flow, reduce the influence of numerical diffusion, and improve the stability and local adaptability of fluid parameter calculation.
[0006] According to one aspect of the present invention, there is provided a fluid parameter processing method, comprising:
[0007] Acquire a solid geometric model to be processed; wherein the solid geometric model to be processed is composed of triangular face patches; the triangular face patches include subdivided triangular face patches and / or original triangular face patches;
[0008] Constructing solid particles according to the triangular facets included in the solid geometric model to be processed;
[0009] interpolating fluid property parameters of the solid particles according to fluid parameter information of liquid particles in the support domain of the solid particles to obtain fluid property interpolation results of triangular facets;
[0010] When it is determined that the triangular patch includes a subdivided triangular patch, the fluid property interpolation result of the subdivided triangular patch is normalized to obtain a target fluid property interpolation result.
[0011] According to another aspect of the present invention, there is provided a fluid parameter processing device, comprising:
[0012] A solid geometric model acquisition module is used to acquire a solid geometric model to be processed; wherein the solid geometric model to be processed is composed of triangular face patches; the triangular face patches include subdivided triangular face patches and / or original triangular face patches;
[0013] A solid particle construction module, used for constructing solid particles according to the triangular facets included in the solid geometric model to be processed;
[0014] A fluid property interpolation result acquisition module is used to interpolate fluid property parameters of the solid particles according to fluid parameter information of liquid particles in the support domain of the solid particles to obtain fluid property interpolation results of triangular facets;
[0015] The target fluid property interpolation result acquisition module is used to normalize the fluid property interpolation result of the subdivided triangular facets when it is determined that the triangular facets include subdivided triangular facets to obtain the target fluid property interpolation result.
[0016] According to another aspect of the present invention, there is provided an electronic device, the electronic device comprising:
[0017] at least one processor; and
[0018] a memory communicatively connected to the at least one processor; wherein,
[0019] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the fluid parameter processing method described in any embodiment of the present invention.
[0020] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the fluid parameter processing method described in any embodiment of the present invention when executed.
[0021] The embodiment of the present invention obtains a solid geometric model to be processed composed of triangular patches such as subdivided triangular patches and / or original triangular patches, so as to construct solid particles according to the triangular patches included in the solid geometric model to be processed, and further interpolates fluid property parameters of the solid particles according to the fluid parameter information of the liquid particles in the support domain of the solid particles to obtain the fluid property interpolation results of the triangular patches, and when it is determined that the triangular patches include subdivided triangular patches, the fluid property interpolation results of the subdivided triangular patches are normalized to obtain the target fluid property interpolation results. The above technical scheme can solve the problems of grid limitation, numerical diffusion, grid dependence and local processing difficulties existing in the existing grid-based numerical methods, can flexibly adapt to the deformation and complexity of fluid flow, reduce the influence of numerical diffusion, and improve the stability and local adaptability of fluid parameter calculation.
[0022] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0024] Figure 1 is a flow chart of a fluid parameter processing method provided in Embodiment 1 of the present invention;
[0025] Figure 2 It is a schematic diagram of the approximate effect of SPH particles in a two-dimensional space provided by the first embodiment of the present invention;
[0026] Figure 3 is a flow chart of a fluid parameter processing method provided by Embodiment 2 of the present invention;
[0027] Figure 4 This is a schematic diagram of the effect of subdividing an original triangular facet provided by the second embodiment of the present invention;
[0028] Figure 5 It is a schematic diagram of the effect of subdividing an original triangular face patch to obtain subdivided triangular face patches provided by the second embodiment of the present invention;
[0029] Figure 6 A schematic diagram of a two-dimensional Morton coding table provided in Embodiment 2 of the present invention;
[0030] Figure 7 It is a schematic diagram of the effect of sorting "particle-grid pairs" using radix sorting according to the Morton code of the spatial grid coordinates provided by the second embodiment of the present invention;
[0031] Figure 8 This is a schematic diagram of the deployment relationship between particles and grids in a two-dimensional space provided by the second embodiment of the present invention;
[0032] Fig. 9 It is a schematic diagram of a flow chart of fluid parameter processing based on subdivided triangular facets provided in the second embodiment of the present invention;
[0033] Fig.10 This is a schematic diagram of the effect of an STL model of a car windshield wiper and engine hood provided by the second embodiment of the present invention;
[0034] Fig.11 It is a schematic diagram of the fluid velocity distribution effect in a front windshield wiper and an engine hood of an automobile provided by the second embodiment of the present invention;
[0035] Fig.12 This is a schematic diagram of the fluid velocity field distribution effect captured on the surface of an STL model of a car windshield wiper and engine hood provided in the second embodiment of the present invention;
[0036] Fig.13 This is a schematic diagram of the effect of an A-pillar overflow simulation of an automobile provided by the second embodiment of the present invention;
[0037] Fig.14 is a schematic diagram of a fluid parameter processing device provided in Embodiment 3 of the present invention;
[0038] Fig.15 A schematic diagram of the structure of an electronic device provided in Embodiment 4 of the present invention. DETAILED DESCRIPTION
[0039] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0040] It should be noted that the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or apparatus comprising 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 these processes, methods, products or apparatus.
[0041] Embodiment 1
[0042] Figure 1 This is a flow chart of a fluid parameter processing method provided by the first embodiment of the present invention. This embodiment is applicable to the case of calculating fluid parameter properties for a solid geometric model to be processed with triangular facets of any resolution. The method can be executed by a fluid parameter processing device, which can be implemented by software and / or hardware and can generally be integrated in an electronic device. The electronic device can be a terminal device or a server device. As long as it can execute the fluid parameter processing method, the embodiment of the present invention does not limit the specific device type of the electronic device. Accordingly, Figure 1 As shown, the method includes the following operations:
[0043] S110, obtaining a solid geometric model to be processed; wherein the solid geometric model to be processed is composed of triangular face patches; the triangular face patches include subdivided triangular face patches and / or original triangular face patches.
[0044] The solid geometric model to be processed may be a model including geometric information of the solid object to be processed. The solid object to be processed may be any solid object to be processed, for example, including but not limited to a car windshield wiper and / or a hood, etc. The original triangular facet may be the originally stored, unprocessed triangular facet in the solid geometric model to be processed. The subdivided triangular facet may be the triangular facet obtained by subdividing part or all of the original triangular facets.
[0045] In an embodiment of the present invention, optionally, a geometric model of the solid to be processed in STL (STereoLithography) format or OBJ (a 3D model file) format can be used as the solid geometric model to be processed. Among them, the STL file is a mesh model composed of many triangular facets, and each triangular facet is defined by three vertices and a normal vector. By reading the STL file of the solid object to be processed, the vertex coordinates of all triangular facets in the geometric model corresponding to the solid object to be processed and the connection method of the vertices can be obtained. As long as the model type has a polygonal surface mesh of the solid object to be processed, it can be used as the solid geometric model to be processed. The embodiment of the present invention does not limit the model file format of the solid geometric model to be processed. It can be understood that the more triangular facets are included in the solid geometric model to be processed, the finer its geometric surface, and the more accurate the final interpolation result of the fluid parameters obtained.
[0046] The unprocessed triangular patches in the solid geometric model to be processed can be called original triangular patches. The resolution of the triangular patches set by the solid geometric model to be processed is different, so the size of the original triangular patches is also different. At the same time, the sizes of the various original triangular patches that make up the solid geometric model to be processed are also different. However, when the side length of the original triangular patches is too long, that is, when the resolution of the triangular patches set by the solid geometric model to be processed is low, it is not conducive to the subsequent calculation of the grid coordinates of the particles, and the error of the interpolation calculation of the solid particles is also large. Therefore, for the original triangular patches that are too large, they can be subdivided to obtain the corresponding subdivided triangular patches, so that the obtained subdivided triangular patches can meet the relevant requirements of particle calculation.
[0047] If the original polygonal patch in the solid geometric model to be processed is not a triangular patch, such as a quadrilateral, pentagon, hexagon or even a polygonal patch with more sides, the original polygonal patch can be first divided into original triangular patches, and the original triangular patches can be analyzed and judged. For original triangular patches that are too large, they can be subdivided to obtain corresponding subdivided triangular patches, so that all the triangular patches finally obtained can meet the relevant requirements of particle calculation.
[0048] S120, constructing solid particles according to the triangular facets included in the solid geometric model to be processed.
[0049] The solid particles may be a type of particles calculated by converting the original triangular facets and / or subdivided triangular facets included in the solid geometric model to be processed, and may be an abstract particle.
[0050] Accordingly, after ensuring that each triangular facet in the solid geometric model to be processed meets the calculation requirements of the particles, the triangular facets included in the solid geometric model to be processed can be used as a data source, and solid particles corresponding to each triangular facet can be constructed according to the data source.
[0051] S130, interpolating fluid property parameters of the solid particles according to fluid parameter information of liquid particles in the support domain of the solid particles, to obtain fluid property interpolation results of triangular facets.
[0052] Among them, the support domain liquid particles can be liquid particles included in the support domain of solid particles. The so-called support domain can be defined as a neighborhood containing other particles around each solid particle, and this neighborhood can be spherical or irregular. The size of the support domain can be controlled by a parameter called smoothing length or influence radius. This parameter can define a spherical area or irregular area centered on the particle, which contains a sufficient number of adjacent particles for calculation. In an embodiment of the present invention, optionally, the support domain can be a spherical neighborhood. The fluid parameter information can be parameter information describing fluid-related properties. The fluid property interpolation result can be the interpolation result obtained after interpolating the fluid property parameters of the triangular facet.
[0053] Correspondingly, after the solid particles are constructed, the support domain liquid particles of the solid particles can be determined based on the support domain information of the solid particles, and the fluid parameter information included in the support domain liquid particles is used as a reference to interpolate the fluid property parameters of the solid particles to obtain the fluid property interpolation results of the triangular facets. The interpolated triangular facets can all obtain the interpolation results of the fluid, thereby giving the triangular facets fluid property information to more accurately simulate the interaction between the fluid and the solid, thereby obtaining more realistic fluid dynamics behavior.
[0054] In an embodiment of the present invention, optionally, a discrete particle method may be used to determine the motion and property information of liquid particles to simulate the fluid properties of liquid particles, thereby interpolating fluid property parameters of solid particles according to the fluid parameter information of liquid particles in the support domain of solid particles. Optionally, the type of discrete particle method may include but is not limited to SPH method (Smoothed Particle Hydrodynamics) or MPS (Moving Particle Semi-implicit) method, etc.
[0055] Among them, the SPH method in the discrete particle method is a meshless particle method based on the Lagrangian equation. It can discretize the fluid into a series of Lagrangian particles with mass and arbitrary distribution, and use the kernel approximation and particle approximation methods to approximate the macroscopic physical quantities and spatial derivatives with the physical quantities carried by the particles. The main idea of the SPH method is to express the continuous fluid domain with a series of discrete Lagrangian particles. These particles have physical quantities such as mass, momentum and energy. The mutual influence between particles is realized by the integration of the "kernel function"; the control equation is also discretized into particle form, and the force on the particles is calculated and the movement of the particles is tracked to simulate the entire flow problem.
[0056] Figure 2 Schematic diagram of the approximate effect of SPH particles in two-dimensional space provided by the first embodiment of the present invention. In a specific example, Figure 2 As shown in the figure, the SPH method is used as an example of discrete particle method. W represents the smooth kernel function, which plays a fundamental role. It determines the contribution of each parameter particle in the computational domain to the nuclear estimation of the physical quantity of the particle to be estimated. According to the special mission of the kernel function, it has the characteristics of normalization, compact support, non-negativity, attenuation, Diktral function properties, symmetry and smoothness. The support domain of the particle is kh, S is the surface of the computational region Ω, i and j represent unit vectors, and r ij represents a vector starting from the center of the particle. Assuming the field function is f, the kernel function is defined in the support domain of the interpolation kernel, and the calculation domain volume control parameter is h, the smooth kernel can be approximated as:
[0057]
[0058] When the SPH method is used to simulate the fluid properties of liquid particles, the following beneficial effects are achieved: The SPH method is suitable for processing complex geometric shapes and moving solids, because both fluids and solids can be represented by particles, and there is no need to generate complex grid structures. The fluid can be modeled directly, so it is easier to handle complex fluid-solid interfaces, which can flexibly adapt to the deformation and complexity of fluid flow. The SPH method can directly track fluid particles, so it can reduce the impact of numerical diffusion and is particularly suitable for high Reynolds number flows. The SPH method naturally uses Lagrangian descriptions and does not require additional coupling steps. The results are not affected by grid resolution and structure, and have good numerical stability and convergence. The SPH method can directly track the movement of fluid particles, so it is more direct when dealing with local phenomena, and can improve the stability and local adaptability of fluid parameter calculations.
[0059] S140. When it is determined that the triangular face patches include subdivided triangular face patches, normalize the fluid property interpolation results of the subdivided triangular face patches to obtain target fluid property interpolation results.
[0060] The target fluid property interpolation result may be an interpolation result obtained by normalizing the fluid property interpolation result of the subdivided triangle face.
[0061] If the triangular patches in the solid geometric model to be processed include subdivided triangular patches, it is necessary to determine the final fluid property interpolation result for the original triangular patches corresponding to the subdivided triangular patches. At this time, the fluid property interpolation result of the subdivided triangular patches can be normalized according to the mapping relationship between the subdivided triangular patches and the corresponding original triangular patches to obtain the final target fluid property interpolation result of the subdivided triangular patches corresponding to the original triangular patches.
[0062] It can be seen that the embodiments of the present invention can realize the interpolation processing of fluid property data of triangular patches of any resolution (i.e., any triangular patch size), and the interpolation processing of fluid property data is more flexible and accurate, thereby further improving the flexibility and accuracy of fluid parameter calculation.
[0063] The embodiment of the present invention obtains a solid geometric model to be processed composed of triangular patches such as subdivided triangular patches and / or original triangular patches, so as to construct solid particles according to the triangular patches included in the solid geometric model to be processed, and further interpolates fluid property parameters of the solid particles according to the fluid parameter information of the liquid particles in the support domain of the solid particles to obtain the fluid property interpolation results of the triangular patches, and when it is determined that the triangular patches include subdivided triangular patches, the fluid property interpolation results of the subdivided triangular patches are normalized to obtain the target fluid property interpolation results. The above technical scheme can solve the problems of grid limitation, numerical diffusion, grid dependence and local processing difficulties existing in the existing grid-based numerical methods, can flexibly adapt to the deformation and complexity of fluid flow, reduce the influence of numerical diffusion, and improve the stability and local adaptability of fluid parameter calculation.
[0064] Embodiment 2
[0065] Figure 3 is a flow chart of a fluid parameter processing method provided by the second embodiment of the present invention. This embodiment is specific based on the above embodiment. In this embodiment, multiple specific optional implementation methods are provided for constructing solid particles, subdividing triangular facets, interpolating fluid property parameters of solid particles, and normalizing the fluid property interpolation results of subdivided triangular facets. Figure 3 As shown, the method of this embodiment may include:
[0066] S210 , obtaining a solid geometric model to be processed, and selecting target triangular facets from original triangular facets of the solid geometric model to be processed according to the side length of the target background mesh.
[0067] The target background mesh side length may be a custom background mesh side length in the solid geometric model to be processed, and the target triangle patch may be an original triangle patch whose triangle side length is greater than the target background mesh side length.
[0068] In an optional embodiment of the present invention, before screening the target triangular patches from the original triangular patches of the solid geometric model to be processed according to the edge length of the target background mesh, it may also include: when it is determined that the original polygonal patches of the solid geometric model to be processed are non-triangular patches, dividing the original polygonal patches of the solid geometric model to be processed into original triangular patches.
[0069] Correspondingly, if the original polygonal patches constituting the solid geometric model to be processed are non-triangular patches, such as quadrilateral patches, the original polygonal patches of the solid geometric model to be processed may be firstly divided into original triangular patches.
[0070] S220 , recursively subdivide the target triangle patch according to a triangle subdivision algorithm to obtain the subdivided triangle patch.
[0071] Wherein, the side length of the bounding box of the subdivided triangular facet is smaller than the side length of the target background mesh.
[0072] It is understandable that the sizes of the original triangular patches included in the solid geometric model to be processed are different. If the original triangular patch is too large, the triangle vertices of the patch that are too large are directly used for interpolation. Since the triangle vertices are too far apart, there will be a large blank space in the middle of the triangle that does not receive the fluid interpolation, resulting in a very large interpolation error. In this case, the original triangular patches that do not meet the requirements must be subdivided before generating solid particles.
[0073] In an embodiment of the present invention, before subdividing the original triangular patches that do not meet the requirements, the target triangular patches that meet the subdivision requirements can be first screened out from the original triangular patches of the solid geometric model to be processed based on the side length of the target background mesh, and then the target triangular patches can be recursively subdivided using a subdivision triangle algorithm to obtain subdivided triangular patches, so that the side length of the enclosing box of the subdivided triangular patches obtained by the subdivision processing is smaller than the side length of the target background mesh, so that each triangular patch meets the requirements of the nearest neighbor search algorithm.
[0074] In a specific example, a triangle patch is used as an example to introduce the process of the subdivided triangle algorithm in detail. First, the lengths of the three sides of the target triangle patch are calculated, and the sides that are larger than the length of the target background mesh are selected from the three sides. Figure 4 FIG. 2 is a schematic diagram of the effect of subdividing the original triangular facets provided by the second embodiment of the present invention. Figure 4As shown, there are three cases for the target triangle patch. The first is that all three sides are greater than the side length of the target background mesh. The second is that two sides are greater than the side length of the target background mesh. The third is that only one side is greater than the side length of the target background mesh. For each target triangle patch, the subdivision triangle algorithm is recursively called to subdivide it until the size of all subdivided triangle patches obtained by subdivision meets the requirements, that is, the side length of the bounding box of the subdivided triangle patch is less than the side length of the target background mesh. Optionally, the bounding box of the subdivided triangle patch can be a cube or rectangle whose six faces are parallel to the coordinate axes, so its sides are aligned with the coordinate axes, that is, each face of the bounding box is perpendicular to the x, y, and z axes. The bounding box must be able to completely enclose the described triangle patch object, that is, all points of the triangle patch object must be located inside or on the boundary of the bounding box.
[0075] Figure 5 is a schematic diagram of the effect of subdividing the original triangular face to obtain subdivided triangular face provided by the second embodiment of the present invention. Figure 5 As shown in the figure, the left picture is the original triangle patch that spans several target background mesh sides, and the right picture is the triangle patch after the original triangle patch in the left picture is subdivided. It can be seen that the size of the subdivided triangle patch after refinement is determined by the size of the target background mesh side.
[0076] Optionally, after recursively subdividing the target triangle patches according to the subdivision triangle algorithm to obtain subdivided triangle patches, the mapping relationship between the refined subdivided triangle patches and the corresponding target triangle patches can also be recorded for use in subsequent normalization of the fluid property interpolation results of the subdivided triangle patches.
[0077] S230: Taking the centroid of the triangular face as the center of the solid particle, and taking the side length of the target background grid as the support region radius.
[0078] S240, constructing the solid particle according to the center of the solid particle and the radius of the support domain.
[0079] Correspondingly, after determining that the side lengths of all triangular facets meet the requirements, the coordinates of the center of gravity of each triangular facet can be solved according to the vertex coordinates of each triangular facet, and the center of gravity of each triangular facet is further used as the center of the solid particle, and the side length of the target background grid is used as the support domain radius, and a spherical area is constructed based on the center and the support domain radius to generate solid particles. Optionally, each triangular facet that can meet the relevant requirements of particle calculation can be calculated to obtain a corresponding solid particle.
[0080] Optionally, if the triangular patch includes subdivided triangular patches, the area of the subdivided triangular patches may be calculated as the weight of the solid particles, and the weight may be used to characterize the contribution of the property value of the solid particles to the property value of the entire corresponding target triangular patch.
[0081] S250, modeling the fluid particles and the solid particles according to the nearest neighbor search algorithm to obtain a data structure corresponding to the particles.
[0082] If the discrete particle method uses the SPH method, then according to the requirements of the SPH method, when calculating the field function for each solid particle, it is necessary to first search for all liquid particles in the support domain. The most direct method is to traverse all liquid particles and calculate the distance between solid particles and liquid particles. Assuming there are N particles in total, it is necessary to calculate The time complexity is ,This method consumes too much computing resources, so a new fast search algorithm is needed.
[0083] In order to solve the above problems, the entire simulation domain can be divided into uniform cube grids, that is, the Cartesian background grid is introduced to divide the simulation domain. All liquid particles are scattered in each grid. Accordingly, the process of modeling fluid particles according to the nearest neighbor search algorithm mainly includes the following steps:
[0084] Step 1: Calculate the grid coordinates (integer coordinates) of each particle (including solid particles and liquid particles) using the following formula, and register the solid particles into the grid where they are located.
[0085]
[0086] Among them, pos represents the grid coordinates of the particle, coord represents the coordinates of the particle, and coord min is the minimum coordinate of the computational domain, h max is the maximum support radius, h max Can be the side length of the coarsest mesh.
[0087] Step 2: Calculate the Morton code value for the grid coordinates where the particle is located. Use Morton coding to convert the grid coordinates in multidimensional space into one-dimensional values for representation. The bitwise interleave conversion method is shown in the following expression. The bitwise interleave conversion method can ensure that the values before and after the conversion are one-to-one corresponding.
[0088]
[0089] In the above expression, x i It represents the value of the ith bit of the x-coordinate after conversion to binary. The same is true for the y-coordinate and the z-coordinate. Figure 6A schematic diagram of a two-dimensional Morton coding table provided in Embodiment 2 of the present invention. In a specific example, Figure 6 As shown in , the Morton code value calculated by the grid coordinates where the particle is located is a one-dimensional value. Connecting the Morton code values in ascending order will produce a recursive Z-shaped curve, as shown in Figure 6 The gray curve in the background shows that the embodiment of the present invention sorts the memory storage order of the grids according to the Morton code value. This zigzag storage order ensures that the storage positions of spatially adjacent grids in the memory are close to each other to a certain extent, thereby improving the cache hit rate and the efficiency of program operation.
[0090] Step 3: Sort the "particle-grid pairs" using radix sorting according to the Morton code of the spatial grid coordinates to provide an ordered representation of the particles in the computational domain. This encoding method ensures that spatially adjacent particles have similar Morton codes, thereby achieving a certain degree of spatial locality. In particle simulation, using Morton codes to sort particles can improve the locality of memory access and reduce the randomness of memory access, thereby improving the efficiency of the simulation.
[0091] Figure 7 is a schematic diagram of the effect of sorting "particle-grid pairs" using radix sorting according to the Morton code of the spatial grid coordinates provided by the second embodiment of the present invention. In a specific example, Figure 7 As shown in the figure, Cell Index indicates the digital number after the three-dimensional coordinate Morton encoding. Particle Index indicates the number of the particle. The nth row in the CellbeginEnd table represents the storage location of the particle with the grid number n, which includes the start position and the end position, where the particles of the same grid are stored continuously. Figure 7 It can be seen that the relationship between grids and particles is one-to-many, so the data in the Cell Index column has repeated numbers. The -1 data in the CellBeginEnd table means that there are no particles in the grid. In order to save memory, the -1 data in the CellBeginEnd table can be deleted to make it compact. In order to quickly find the information in the compacted CellBeginEnd table, the following hash function can be introduced:
[0092]
[0093] in, represents a hash function, , and are three large prime numbers, illustratively, The value can be 73856093. The value can be 19349663. The possible value is 83492791. is the coordinate vector of the grid, is the component of the vector in the x-axis direction, is the component of the vector in the y-axis direction, is the component of the vector in the z-axis direction, is the length of the hash table. This hash function is used to convert the grid coordinates into hash values, and then the CellBeginEnd data is sorted according to the hash value, so that the memory location of the CellBeginEnd information can be found in constant time (on average).
[0094] S260. Allocate the supporting domain liquid particles to the solid particles according to the data structure corresponding to the particles.
[0095] Correspondingly, after the data structure corresponding to each particle is determined, the supporting domain liquid particles of the solid particles can be calculated and allocated based on the data structure corresponding to the particles.
[0096] In an optional embodiment of the present invention, the allocation of the support domain liquid particles to the solid particles according to the data structure corresponding to the particles may include: calculating the current grid coordinates of the current solid particle; determining adjacent grid coordinates according to the current grid coordinates; determining liquid particles within the adjacent grid coordinate range as adjacent liquid particles according to the data structure corresponding to the particles; and selecting liquid particles within the support domain range of the current solid particle from the adjacent liquid particles as the support domain liquid particles.
[0097] The current solid particle is the solid particle for which the support domain liquid particle needs to be calculated and allocated. The current grid coordinates may be the grid coordinates of the current solid particle. The adjacent grid coordinates may be the coordinates within a certain range adjacent to the current grid coordinates. The adjacent liquid particle may be the liquid particle whose grid coordinates are within the range of the adjacent grid coordinates.
[0098] Accordingly, after the data structure corresponding to each particle is established using the nearest neighbor search algorithm, in a specific example, the steps for searching for matching supporting domain liquid particles for the current solid particle are as follows:
[0099] The first step is to calculate the current grid coordinates of the current solid particle and the adjacent grid coordinates of the current grid coordinates. Figure 8 FIG. 1 is a schematic diagram of the deployment relationship between particles and grids in a two-dimensional space provided by the second embodiment of the present invention. In a specific example, Figure 8As shown, assuming that the current solid particle is an example corresponding to the center position of the circle, in two-dimensional space, the number of adjacent grids of the current solid particle can be 9. In three-dimensional space, the number of adjacent grids of the current solid particle can be 27.
[0100] The second step is to calculate the hash value of the current grid coordinates of the current solid particle. The hash value can be used as the index of the "numbering start and end information of all particles in the grid" in the CellBeginEnd table.
[0101] Step 3: According to the data structure corresponding to the particles obtained by the above operation, all liquid particles in the adjacent grid coordinate range of the current solid particle, such as 27 grids near the current grid coordinate, are determined as adjacent liquid particles.
[0102] The fourth step is to calculate the distance between each adjacent liquid particle and the current solid particle, and compare the calculated distance with the support domain radius h of the current solid particle, and determine the adjacent liquid particles whose distance to the current solid particle is less than the support domain radius h as the support domain liquid particles.
[0103] The above method of calculating the liquid particles in the support domain can effectively avoid the problem of accessing all particles in the simulation domain, and only needs to access particles in the neighboring grid, which greatly reduces the complexity of the algorithm and can reach O(Nm).
[0104] Optionally, any discrete particle method such as the SPH method or the MPS method may be used to calculate the position and property data of the liquid particles to obtain the fluid parameter information of the liquid particles.
[0105] It is understandable that each triangular facet that meets the requirements can create a corresponding solid particle, so the number of solid particles is multiple. In order to improve the efficiency of the algorithm, optionally, parallel computing technology can be used to screen out support domain liquid particles within the support domain range for each solid particle, and the process of interpolating fluid property parameters for each solid particle can be parallelized. Optionally, a corresponding GPU (Graphics Processing Unit) thread can be created for each solid particle, so that each GPU thread can screen out support domain liquid particles within the support domain range for each solid particle, and further parallelize the fluid property interpolation results of each triangular facet.
[0106] S270 , interpolating fluid property parameters of the solid particles according to fluid parameter information of liquid particles in the support domain of the solid particles, to obtain fluid property interpolation results of triangular facets.
[0107] In an optional embodiment of the present invention, interpolating the fluid property parameters of the solid particles according to the fluid parameter information of the liquid particles in the support domain of the solid particles to obtain the fluid property interpolation results of the triangular facet may include: calculating the initial fluid property parameters of the current solid particles according to the fluid parameter information of the liquid particles in the support domain; wherein the fluid parameter information may include fluid property values, positions, mass and density; performing standard normalization processing on the initial fluid property parameters of the current solid particles to obtain normalized fluid property interpolation parameters; and determining the fluid property interpolation results of the triangular facet according to the normalized fluid property interpolation parameters of each of the solid particles.
[0108] The initial fluid property parameters may be fluid property interpolation data preliminarily calculated based on the fluid parameter information of the liquid particles in the support domain. The fluid property values included in the fluid parameter information may include, for example, but are not limited to values of relevant physical properties of the fluid such as velocity or pressure. The normalized fluid property interpolation parameters may be interpolation parameters of the fluid properties obtained by performing standard normalization processing on the initial fluid property parameters of the current solid particles.
[0109] Optionally, the initial fluid property parameters of the current solid particles can be calculated based on the fluid parameter information of the liquid particles in the support domain based on the following formula:
[0110]
[0111] in, represents the initial fluid property parameters of the current solid particle i, represents the fluid parameter information of the support domain liquid particle j, for example, it may include but is not limited to parameters such as velocity and pressure, represents the current position of solid particle i, represents the position of liquid particle j in the support domain, m j represents the mass of the liquid particle j in the support domain, represents the density of liquid particle j in the support domain, W is the smooth kernel function, h represents the radius of the support domain, and its value can be the side length of the target background grid.
[0112] Optionally, the following scheme may be used to perform standard normalization processing on the initial fluid property parameters of the current solid particles to obtain normalized fluid property interpolation parameters:
[0113] First, the Norm of the fluid property interpolation result of the current solid particle i can be calculated according to the following formula. Norm can be represented by the kernel function normalization formula and can be regarded as the standardization of the initial fluid property parameters:
[0114]
[0115] Furthermore, the initial fluid property parameters are normalized using the Norm of the fluid property interpolation result to obtain the normalized fluid property interpolation parameters : .
[0116] After completing the standard normalization process to obtain the normalized fluid property interpolation parameters, the normalized fluid property interpolation parameters corresponding to each solid particle can be recorded.
[0117] S280: Determine the original triangle patch corresponding to the subdivided triangle patch.
[0118] S290. Perform weighted average calculation on the fluid property interpolation result of the subdivided triangular patch according to the area ratio of the subdivided triangular patch to the original triangular patch, so as to obtain the target fluid interpolation result of the subdivided triangular patch.
[0119] Since the subdivided triangle patch is obtained by subdividing the original triangle patch, if it is determined that there is a subdivided triangle patch, after the subdivided triangle patch is processed to obtain the fluid property interpolation result, the fluid property interpolation result of the subdivided triangle patch needs to be further normalized. Therefore, for the subdivided triangle patch, it is necessary to determine the original triangle patch that divides the subdivided triangle patch, so as to perform a weighted average calculation on the fluid property interpolation result of the subdivided triangle patch according to the area ratio of the subdivided triangle patch and the corresponding original triangle patch. The weighted average calculation result is the interpolation result of the liquid particles near the subdivided triangle patch, that is, the target fluid interpolation result of the subdivided triangle patch.
[0120] Optionally, a weighted average calculation may be performed on the interpolation results of the fluid properties of the subdivided triangle patches based on the following formula:
[0121]
[0122] in, Represents the target fluid interpolation result of the subdivided triangle patch, s i represents the area of the i-th subdivided triangle patch, s tri Represents the area of the original triangle patch corresponding to the i-th subdivided triangle patch.
[0123] Fig. 9 1 is a flow chart of a fluid parameter processing based on subdivided triangular facets provided in the second embodiment of the present invention. Fig. 9 The process shown specifically illustrates the fluid parameter processing method provided by the embodiment of the present invention:
[0124] First, the solid geometric model to be processed of the solid object to be processed is read as input. The solid geometric model to be processed can be composed of a number of triangular patches or polygonal patches. The more patches there are, the finer the geometric surface is, and the more accurate the final interpolation result is. If the solid geometric model to be processed includes polygonal patches, it needs to be divided into triangular patches.
[0125] Secondly, the original triangular facets whose side length is greater than the side length of the target background mesh are subdivided using a triangular subdivision algorithm, and the subdivision is performed recursively until solid particles smaller than the side length of the target background mesh can be generated based on the subdivided triangular facets.
[0126] Furthermore, the centroid of the subdivided triangle patch is taken as the center of the solid particle, and the side length h of the target background grid is taken as max As the support domain radius, solid particles are generated. At the same time, the area of the subdivided triangle patch is calculated as the weight of the solid particle, that is, the contribution of the attribute value of the solid particle to the attribute value of the entire original triangle patch.
[0127] Furthermore, the coordinates and property information of the liquid particles are obtained by the discrete particle method, and the fluid parameter information of the liquid particles is obtained.
[0128] Furthermore, a data structure is established for each particle according to the method given by the nearest neighbor search algorithm, so as to search for fluid particles in the support domain of the solid particles, and an interpolation method is used to add fluid property information, such as velocity and pressure, to the solid particles based on the searched fluid particles.
[0129] In order to improve the efficiency of the algorithm, a GPU thread can be created for each solid particle, and each GPU thread executes the following steps in parallel:
[0130] (1) Calculate the current grid coordinates of the current solid particle.
[0131] (2) Traverse all fluid particles in the 27 grids adjacent to the current grid and filter out all fluid particles within the support domain of the solid particles. Fig. 9 As shown in the figure, the solid dots represent fluid particles, and the hollow dots (i.e., the dots where the center of each dotted circle is located) represent solid particles. It can be seen that the support domain of each solid particle (i.e., each dotted circle) can include a certain number of fluid particles.
[0132] According to the relationship given by the following formula, the fluid property values of the liquid particles are interpolated for the solid particles, including but not limited to fluid property values such as velocity and pressure.
[0133]
[0134] Furthermore, according to the formula: Calculate the Norm of the solid particle interpolation result, and then use this value to normalize the interpolation result, that is, the final result . Record the interpolation information of solid particles.
[0135] Finally, according to the area of the subdivided triangle patch and the corresponding relationship between the subdivided triangle patch and the original large triangle patch, the formula is used: The weighted average calculation is performed on the subdivided triangular face, and the calculation result is the interpolation result of the liquid particles near the triangular face. Fig. 9 As shown in the figure, the weighted average calculation result of each subdivided small triangle is: (2*3.7+3*3.7+4*3.7+5*3.7) / 14.8=3.5. After the algorithm is executed, each triangle facet obtains the interpolation result of the fluid property.
[0136] Fig.10 This is a schematic diagram of the effect of an STL model of a car windshield wiper and engine hood provided by the second embodiment of the present invention. Fig.11 Schematic diagram of the fluid velocity distribution effect in a windshield wiper and a hood of an automobile provided by the second embodiment of the present invention. Fig.12 This is a schematic diagram of the fluid velocity field distribution effect captured on the surface of an STL model of a car windshield wiper and engine hood provided in the second embodiment of the present invention. Fig.13 Schematic diagram of the effect of an A-pillar overflow simulation of a car provided by the second embodiment of the present invention. Figure 10-13 As shown, the fluid parameter processing method described in the above embodiment is used to simulate the fluid velocity distribution in the front windshield wiper and the hood of the car and the overflow of the A-pillar of the car, which has a good fluid parameter simulation effect.
[0137] The above-mentioned fluid parameter processing method does not require the prior definition of the grid structure and has no grid restrictions, so it can flexibly adapt to the deformation and complexity of the fluid flow. At the same time, the particle method is used to directly track the fluid particles, so the influence of numerical diffusion can be reduced, which is particularly suitable for high Reynolds number flows. The results of the particle method are not affected by the grid resolution and structure, so the results are more stable. The particle method is more direct when dealing with local phenomena because it directly tracks the movement of fluid particles. It can be seen that the above-mentioned technical solution can flexibly adapt to the deformation and complexity of fluid flow, reduce the influence of numerical diffusion, and improve the stability and local adaptability of fluid parameter calculation.
[0138] At the same time, since the entire fluid parameter processing flow can be applied to the interpolation processing of fluid property data of any triangular patch resolution, it can solve the problem of information loss caused by too small triangular patch resolution when interpolating triangular patch vertices, thereby improving the accuracy of fluid parameter calculation.
[0139] It should be noted that any arrangement and combination of the technical features in the above embodiments also falls within the protection scope of the present invention.
[0140] Embodiment 3
[0141] Fig.14 is a schematic diagram of a fluid parameter processing device provided in Embodiment 3 of the present invention, such as Fig.14 As shown, the device includes: a solid geometric model acquisition module 310, a solid particle construction module 320, a fluid property interpolation result acquisition module 330 and a target fluid property interpolation result acquisition module 340, wherein:
[0142] The solid geometric model acquisition module 310 is used to acquire a solid geometric model to be processed; wherein the solid geometric model to be processed is composed of triangular face patches; the triangular face patches include subdivided triangular face patches and / or original triangular face patches;
[0143] A solid particle construction module 320 is used to construct solid particles according to the triangular facets included in the solid geometric model to be processed;
[0144] A fluid property interpolation result acquisition module 330 is used to interpolate fluid property parameters of the solid particles according to fluid parameter information of liquid particles in the support domain of the solid particles to obtain fluid property interpolation results of triangular facets;
[0145] The target fluid property interpolation result acquisition module 340 is used to normalize the fluid property interpolation result of the subdivided triangular facets to obtain the target fluid property interpolation result when it is determined that the triangular facets include subdivided triangular facets.
[0146] The embodiment of the present invention obtains a solid geometric model to be processed composed of triangular patches such as subdivided triangular patches and / or original triangular patches, so as to construct solid particles according to the triangular patches included in the solid geometric model to be processed, and further interpolates fluid property parameters of the solid particles according to the fluid parameter information of the liquid particles in the support domain of the solid particles to obtain the fluid property interpolation results of the triangular patches, and when it is determined that the triangular patches include subdivided triangular patches, the fluid property interpolation results of the subdivided triangular patches are normalized to obtain the target fluid property interpolation results. The above technical scheme can solve the problems of grid limitation, numerical diffusion, grid dependence and local processing difficulties existing in the existing grid-based numerical methods, can flexibly adapt to the deformation and complexity of fluid flow, reduce the influence of numerical diffusion, and improve the stability and local adaptability of fluid parameter calculation.
[0147] Optionally, the solid particle construction module 320 is further used to: use the centroid of the triangular face as the center of the solid particle, and use the side length of the target background grid as the support domain radius; and construct the solid particle according to the center of the solid particle and the support domain radius.
[0148] Optionally, the fluid parameter processing device further includes a subdivided triangle patch acquisition module, which is used to: when it is determined that the original polygonal patch of the solid geometric model to be processed is a non-triangular patch, divide the original polygonal patch of the solid geometric model to be processed into original triangle patches; filter target triangle patches from the original triangle patches of the solid geometric model to be processed according to the side length of the target background mesh; recursively subdivide the target triangle patches according to a subdivided triangle algorithm to obtain the subdivided triangle patches; wherein the side length of the enclosing box of the subdivided triangle patch is smaller than the side length of the target background mesh.
[0149] Optionally, the above-mentioned fluid parameter processing device also includes a support domain liquid particle allocation module, which is used to: model the fluid particles and solid particles according to the nearest neighbor search algorithm to obtain the data structure corresponding to the particles; and allocate the support domain liquid particles to the solid particles according to the data structure corresponding to the particles.
[0150] Optionally, the support domain liquid particle allocation module is also used to: calculate the current grid coordinates of the current solid particle; determine the adjacent grid coordinates based on the current grid coordinates; determine the liquid particles within the adjacent grid coordinate range as adjacent liquid particles based on the data structure corresponding to the particle; and filter out the liquid particles within the support domain range of the current solid particle from the adjacent liquid particles as the support domain liquid particles.
[0151] Optionally, the fluid property interpolation result acquisition module 330 is also used to: calculate the initial fluid property parameters of the current solid particles based on the fluid parameter information of the liquid particles in the support domain; wherein the fluid parameter information includes fluid property values, positions, masses and densities; perform standard normalization processing on the initial fluid property parameters of the current solid particles to obtain normalized fluid property interpolation parameters; and determine the fluid property interpolation results of the triangular facets based on the normalized fluid property interpolation parameters of each of the solid particles.
[0152] Optionally, the target fluid property interpolation result acquisition module 340 is also used to: determine the original triangular facet corresponding to the subdivided triangular facet; perform weighted average calculation on the fluid property interpolation result of the subdivided triangular facet according to the area ratio of the subdivided triangular facet and the original triangular facet, so as to obtain the target fluid interpolation result of the subdivided triangular facet.
[0153] The above fluid parameter processing device can execute the fluid parameter processing method provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method. For technical details not described in detail in this embodiment, please refer to the fluid parameter processing method provided by any embodiment of the present invention.
[0154] Since the fluid parameter processing device described above is a device that can execute the fluid parameter processing method in the embodiment of the present invention, based on the fluid parameter processing method described in the embodiment of the present invention, a person skilled in the art can understand the specific implementation of the fluid parameter processing device of the present embodiment and its various variations, so how the fluid parameter processing device implements the fluid parameter processing method in the embodiment of the present invention is not described in detail here. As long as a person skilled in the art implements the device used in the fluid parameter processing method in the embodiment of the present invention, it belongs to the scope of protection of this application.
[0155] Embodiment 4
[0156] Fig.15 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0157] like Fig.15 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. The input / output (I / O) interface 15 is also connected to the bus 14.
[0158] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0159] The processor 11 may be a variety of general and / or dedicated processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a fluid parameter processing method.
[0160] Optionally, the fluid parameter processing method may include: obtaining a solid geometric model to be processed; wherein the solid geometric model to be processed is composed of triangular patches; the triangular patches include subdivided triangular patches and / or original triangular patches; constructing solid particles according to the triangular patches included in the solid geometric model to be processed; interpolating fluid property parameters of the solid particles according to fluid parameter information of liquid particles in the support domain of the solid particles to obtain fluid property interpolation results of the triangular patches; when it is determined that the triangular patches include subdivided triangular patches, normalizing the fluid property interpolation results of the subdivided triangular patches to obtain target fluid property interpolation results.
[0161] In some embodiments, the fluid parameter processing method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the fluid parameter processing method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the fluid parameter processing method in any other appropriate manner (e.g., by means of firmware).
[0162] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0163] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0164] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, device, or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0165] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0166] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0167] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
Claims
1. A fluid parameter processing method, characterized in that: include: Acquire a solid geometric model to be processed; wherein the solid geometric model to be processed is composed of triangular face patches; the triangular face patches include subdivided triangular face patches and / or original triangular face patches; Constructing solid particles according to the triangular facets included in the solid geometric model to be processed; Model the fluid particles and solid particles according to the nearest neighbor search algorithm to obtain the data structure corresponding to the particles; Allocating supporting domain liquid particles to the solid particles according to the data structure corresponding to the particles; interpolating fluid property parameters of the solid particles according to fluid parameter information of liquid particles in the support domain of the solid particles to obtain fluid property interpolation results of triangular facets; In the case where it is determined that the triangular face patch includes a subdivided triangular face patch, normalizing the fluid property interpolation result of the subdivided triangular face patch to obtain a target fluid property interpolation result; The step of normalizing the fluid property interpolation result of the subdivided triangular facet to obtain the target fluid property interpolation result includes: Determine the original triangle patch corresponding to the subdivided triangle patch; According to the area ratio of the subdivided triangular patch and the original triangular patch, weighted average calculation is performed on the fluid property interpolation result of the subdivided triangular patch to obtain the target fluid interpolation result of the subdivided triangular patch; The modeling of fluid particles and solid particles according to the nearest neighbor search algorithm includes: By formula: Calculate the grid coordinates of the solid particles and liquid particles, and register the solid particles into the grid where they are located; where pos represents the grid coordinates of the particles, coord represents the coordinates of the particles, and coord min is the minimum coordinate of the computational domain, h max is the maximum support radius; Calculate the Morton code value for the grid coordinate where the particle is located; The particle-grid pairs are sorted using radix sorting according to the Morton code of the spatial grid coordinates.
2. The method according to claim 1, characterized in that: The step of constructing solid particles according to the triangular facets included in the solid geometric model to be processed comprises: The centroid of the triangular patch is used as the center of the solid particle, and the side length of the target background grid is used as the support domain radius; The solid particle is constructed according to the center of the solid particle and the support domain radius.
3. The method according to claim 2, characterized in that Before taking the centroid of the triangular face piece as the center of the solid particle, the method further comprises: In the case where it is determined that the original polygonal face patch of the solid geometric model to be processed is a non-triangular face patch, dividing the original polygonal face patch of the solid geometric model to be processed into original triangular face patches; Filter target triangular facets from the original triangular facets of the solid geometric model to be processed according to the side length of the target background mesh; Recursively subdividing the target triangle patch according to a triangle subdivision algorithm to obtain the subdivided triangle patch; Wherein, the side length of the bounding box of the subdivided triangular facet is smaller than the side length of the target background mesh.
4. The method according to claim 1, characterized in that: The allocating the supporting region liquid particles to the solid particles according to the data structure corresponding to the particles comprises: Calculate the current grid coordinates of the current solid particle; Determine adjacent grid coordinates according to the current grid coordinates; Determine, according to the data structure corresponding to the particles, liquid particles within the adjacent grid coordinate range as adjacent liquid particles; Liquid particles within the support domain of the current solid particle are selected from the adjacent liquid particles as the support domain liquid particles.
5. The method according to claim 1, characterized in that: The step of interpolating fluid property parameters of the solid particles according to the fluid parameter information of the liquid particles in the support region of the solid particles to obtain the fluid property interpolation result of the triangular facet includes: Calculating the initial fluid property parameters of the current solid particles according to the fluid parameter information of the liquid particles in the support domain; wherein the fluid parameter information includes fluid property value, position, mass and density; Performing standard normalization processing on the initial fluid property parameters of the current solid particles to obtain normalized fluid property interpolation parameters; The fluid property interpolation result of the triangular facet is determined according to the normalized fluid property interpolation parameter of each of the solid particles.
6. A fluid parameter processing device, characterized in that: include: A solid geometric model acquisition module is used to acquire a solid geometric model to be processed; wherein the solid geometric model to be processed is composed of triangular face patches; the triangular face patches include subdivided triangular face patches and / or original triangular face patches; A solid particle construction module, used for constructing solid particles according to the triangular facets included in the solid geometric model to be processed; A support domain liquid particle allocation module is used to model fluid particles and solid particles according to a nearest neighbor search algorithm to obtain a data structure corresponding to the particles; and allocate support domain liquid particles to the solid particles according to the data structure corresponding to the particles; A fluid property interpolation result acquisition module is used to interpolate fluid property parameters of the solid particles according to fluid parameter information of liquid particles in the support domain of the solid particles to obtain fluid property interpolation results of triangular facets; A target fluid property interpolation result acquisition module is used to normalize the fluid property interpolation result of the subdivided triangular face patch when it is determined that the triangular face patch includes a subdivided triangular face patch, so as to obtain a target fluid property interpolation result; The target fluid property interpolation result acquisition module is also used to: determine the original triangular facet corresponding to the subdivided triangular facet; perform weighted average calculation on the fluid property interpolation result of the subdivided triangular facet according to the area ratio of the subdivided triangular facet to the original triangular facet, so as to obtain the target fluid interpolation result of the subdivided triangular facet; Wherein, the support domain liquid particle allocation module is also used for: By formula: Calculate the grid coordinates of the solid particles and liquid particles, and register the solid particles into the grid where they are located; where pos represents the grid coordinates of the particles, coord represents the coordinates of the particles, and coord min is the minimum coordinate of the computational domain, h max is the maximum supported radius; calculate the Morton code value for the grid coordinates where the particle is located; sort the "particle-grid pairs" using radix sorting according to the Morton code of the spatial grid coordinates.
7. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the fluid parameter processing method according to any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the fluid parameter processing method described in any one of claims 1-5 when executed.
Citation Information
Patent Citations
SPH fluid surface reconstruction method based on second-layer regular grid
CN105760588A
Solid boundary extraction method for free surface flow
CN112163384A
