CN118194776A - Fluid parameter processing method and device, electronic equipment and storage medium - Google Patents

Fluid parameter processing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN118194776A
CN118194776A CN202410620470.1A CN202410620470A CN118194776A CN 118194776 A CN118194776 A CN 118194776A CN 202410620470 A CN202410620470 A CN 202410620470A CN 118194776 A CN118194776 A CN 118194776A
Authority
CN
China
Prior art keywords
fluid
solid
triangular
particles
patch
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202410620470.1A
Other languages
Chinese (zh)
Other versions
CN118194776B (en
Inventor
季哲
戴宇昕
聂祯祥
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Institute of Northwestern Polytechnical University
Taicang Yangtze River Delta Research Institute of Northwestern Polytechnical University
Original Assignee
Shenzhen Institute of Northwestern Polytechnical University
Taicang Yangtze River Delta Research Institute of Northwestern Polytechnical University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Institute of Northwestern Polytechnical University, Taicang Yangtze River Delta Research Institute of Northwestern Polytechnical University filed Critical Shenzhen Institute of Northwestern Polytechnical University
Priority to CN202410620470.1A priority Critical patent/CN118194776B/en
Publication of CN118194776A publication Critical patent/CN118194776A/en
Application granted granted Critical
Publication of CN118194776B publication Critical patent/CN118194776B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation
    • G06F30/28Design optimisation, verification or simulation using fluid dynamics, e.g. using Navier-Stokes equations or computational fluid dynamics [CFD]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation
    • G06F30/25Design optimisation, verification or simulation using particle-based methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • G06T17/20Finite element generation, e.g. wire-frame surface description, tesselation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2113/00Details relating to the application field
    • G06F2113/08Fluids
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2119/00Details relating to the type or aim of the analysis or the optimisation
    • G06F2119/14Force analysis or force optimisation, e.g. static or dynamic forces
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T90/00Enabling technologies or technologies with a potential or indirect contribution to GHG emissions mitigation

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Geometry (AREA)
  • Evolutionary Computation (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Computer Graphics (AREA)
  • Algebra (AREA)
  • Computing Systems (AREA)
  • Fluid Mechanics (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Mathematical Physics (AREA)
  • Pure & Applied Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The embodiment of the invention discloses a fluid parameter processing method, a device, electronic equipment and a storage medium, wherein the method comprises the following steps: obtaining a solid geometric model to be treated; wherein the solid geometric model to be treated consists of triangular patches; the triangular patches comprise subdivided triangular patches and/or original triangular patches; constructing solid particles according to triangular patches included in the solid geometric model to be treated; interpolating fluid attribute parameters of the solid particles according to fluid parameter information of the liquid particles in the support domain of the solid particles to obtain a fluid attribute interpolation result of the triangular patch; and under the condition that the triangular patches are determined to comprise the subdivided triangular patches, carrying out normalization processing on the fluid attribute interpolation results of the subdivided triangular patches to obtain target fluid attribute interpolation results. The technical scheme of the embodiment of the invention 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.

Description

Fluid parameter processing method and device, electronic equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of computer software application, in particular to a fluid parameter processing method, a device, electronic equipment and a storage medium.
Background
In hydrodynamic simulation, it is necessary to accurately describe the interactions of a fluid with a solid surface, such as flow characteristics at the solid surface, fluid velocity and pressure distribution near the surface, and the like. By interpolating the fluid property information to the solid surface, the interaction of the fluid with the solid can be more accurately simulated, resulting in a more realistic hydrodynamic behavior.
Currently, conventional grid-based numerical methods such as FDM (FINITE DIFFERENCE Method ) and FEM (FINITE ELEMENT Method, finite element Method) have been widely used in various fields of computational fluid dynamics. For many simple flow problems, conventional grid-like methods generally give more accurate computation results. Conventional mesh-like methods require modeling of the geometry of the fluid flow, including the geometry of the walls and the rest of the flow area, using Computer aided design (Computer AIDED DESIGN, CAD) software during geometric modeling. In the process of generating the grid, a suitable grid generation method, such as a structured grid generation method or an unstructured grid generation method, is selected. In the vicinity of the wall surface, a particularly careful meshing is required to ensure that the flow characteristics in the vicinity of the wall surface can be accurately described. Common mesh types include orthogonal meshes, triangular meshes, quadrilateral meshes, and the like. At the same time, proper boundary conditions including wall boundary conditions, entrance conditions, exit conditions and the like need to be set on the grid nodes. For the wall, a slip-free condition (zero tangential wall velocity) and a penetration-free condition (zero normal wall velocity), as well as the temperature and turbulence characteristics of the wall, are typically set. Further solving a discretized fluid dynamics equation by using a numerical method, such as a finite volume method, a finite element method or a spectrum method. These methods discretize the hydrodynamic equations into a set of algebraic equations and obtain a numerical solution to the flow field by iterative solution. In the turbulence simulation, a wall function model or a modified wall shear stress model is used to approximately describe the friction effect near the wall. These wall modes are typically based on the relationship of wall friction velocity and wall shear stress and are modified according to the turbulence characteristics of the flow field. In the iterative solution process, the discrete equation set may be iteratively solved until a convergence criterion is satisfied. An iterative solution method, such as an iterative relaxation method or a conjugate gradient method, is generally adopted to obtain a numerical solution of the flow field.
The inventors have found that the following drawbacks exist in the prior art in the process of implementing the present invention: with the progressive complexity of the hydrodynamic study problem, the numerical method of the grid class has been a difficult problem in how to guarantee the quality of the grid in the computation domain during the complex boundary motion. In particular, the numerical approach of grid classes often suffers from the following disadvantages: first, the mesh-like method requires a mesh structure to be defined in advance, and thus is limited by the mesh. This means that in deformed or complex flow situations, the mesh structure needs to be dynamically adjusted to accommodate the fluid deformation, which may increase computational complexity. Secondly, in the grid-like method, since a grid cell of a limited size is used to approximately describe the fluid flow, if the resolution of the grid is insufficient, that is, the size of the grid cell is too large, it may result in failure to accurately capture detailed information in the flow, so that gradient information is lost, and numerical diffusion is caused. Meanwhile, the computation of the numerical solution involves the computation of approximate gradients, and approximation of these gradients tends to introduce additional numerical diffusion. This means that numerical errors and instabilities can occur at boundaries (where the fluid contacts the solid wall) or where there is a drastic change, especially when dealing with high reynolds number flows. Again, the result of the grid-like method may be affected by the grid resolution and structure, i.e. the result may depend on the fineness and shape of the grid. This may lead to instability and errors in the results. Finally, in the grid-like method, since physical quantities (such as speed, pressure, temperature, density, etc.) are discretized inside the grid cells, difficulties may be encountered in dealing with local phenomena. For example, a higher mesh resolution may be required when dealing with locally intense turbulence structures or boundary layer phenomena.
Disclosure of Invention
The embodiment of the invention provides a fluid parameter processing method, a device, electronic equipment and a 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.
According to an aspect of the present invention, there is provided a fluid parameter processing method including:
obtaining a solid geometric model to be treated; wherein the solid geometric model to be treated consists of triangular patches; the triangular patches comprise subdivided triangular patches and/or original triangular patches;
constructing solid particles according to triangular patches included in the solid geometric model to be treated;
interpolating fluid attribute parameters of the solid particles according to fluid parameter information of the liquid particles in the supporting domain of the solid particles to obtain a fluid attribute interpolation result of the triangular patch;
and under the condition that the triangular patches are determined to comprise the subdivided triangular patches, carrying out normalization processing on the fluid attribute interpolation results of the subdivided triangular patches to obtain target fluid attribute interpolation results.
According to another aspect of the present invention, there is provided a fluid parameter processing apparatus comprising:
the solid geometric model acquisition module is used for acquiring a solid geometric model to be processed; wherein the solid geometric model to be treated consists of triangular patches; the triangular patches comprise subdivided triangular patches and/or original triangular patches;
The solid particle construction module is used for constructing solid particles according to the triangular patches included in the solid geometric model to be processed;
The fluid attribute interpolation result acquisition module is used for interpolating the fluid attribute 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 a fluid attribute interpolation result of the triangular patch;
And the target fluid attribute interpolation result acquisition module is used for carrying out normalization processing on the fluid attribute interpolation result of the subdivision triangle patch under the condition that the triangle patch is determined to comprise the subdivision triangle patch, so as to obtain the target fluid attribute interpolation result.
According to another aspect of the present invention, there is provided an electronic apparatus including:
At least one processor; and
A memory communicatively coupled to the at least one processor; wherein,
The memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the fluid parameter processing method of any one of the embodiments of the present invention.
According to another aspect of the present invention, there is provided a computer readable storage medium storing computer instructions for causing a processor to execute a fluid parameter processing method according to any one of the embodiments of the present invention.
According to the embodiment of the invention, the solid geometric model to be processed which consists of triangular patches such as the subdivided triangular patches and/or the original triangular patches is obtained, so that solid particles are constructed according to the triangular patches included in the solid geometric model to be processed, further, the fluid attribute parameters of the solid particles are interpolated according to the fluid parameter information of the liquid particles in the support domain of the solid particles, the fluid attribute interpolation result of the triangular patches is obtained, and under the condition that the triangular patches are determined to include the subdivided triangular patches, the fluid attribute interpolation result of the subdivided triangular patches is normalized, so that the target fluid attribute interpolation result is obtained. The technical scheme can solve the problems of grid limitation, numerical diffusion, grid dependence, difficult localized treatment and the like of the existing grid numerical method, can flexibly adapt to the deformation and complexity of fluid flow, reduces the influence of numerical diffusion, and improves the stability and the local adaptability of fluid parameter calculation.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the invention or to delineate the scope of the invention. Other features of the present invention will become apparent from the description that follows.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a fluid parameter processing method according to a first embodiment of the present invention;
FIG. 2 is a schematic diagram showing the approximate effect of SPH particles in two dimensions according to an embodiment of the present invention;
FIG. 3 is a flow chart of a fluid parameter processing method according to a second embodiment of the present invention;
FIG. 4 is a schematic diagram showing the effect of subdivision of an original triangular patch according to a second embodiment of the present invention;
Fig. 5 is a schematic diagram of an effect of subdividing an original triangular patch to obtain subdivided triangular patches according to a second embodiment of the present invention;
FIG. 6 is a schematic diagram of a two-dimensional Morton encoding table according to a second embodiment of the present invention;
FIG. 7 is a schematic diagram showing the effect of using radix ordering to order "particle-grid pairs" according to Morton codes of space grid coordinates according to a second embodiment of the present invention;
FIG. 8 is a schematic diagram of a deployment relationship effect between particles and grids in a two-dimensional space according to a second embodiment of the present invention;
FIG. 9 is a schematic flow chart of a fluid parameter processing based on a subdivided triangular patch according to a second embodiment of the present invention;
Fig. 10 is a schematic view illustrating the effect of an STL model of a front windshield wiper and a bonnet of an automobile according to a second embodiment of the present invention;
fig. 11 is a schematic view of a fluid velocity distribution effect in a front windshield wiper and a bonnet of an automobile according to a second embodiment of the present invention;
Fig. 12 is a schematic view showing a fluid velocity field distribution effect captured on the surface of an STL model of a front windshield wiper and a bonnet of an automobile according to a second embodiment of the present invention;
Fig. 13 is a schematic diagram showing an effect of a simulation of overflow of an a pillar of an automobile according to a second embodiment of the present invention;
FIG. 14 is a schematic view of a fluid parameter processing device according to a third embodiment of the present invention;
Fig. 15 is a schematic structural diagram of an electronic device according to a fourth embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "comprises" and "comprising," along with any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed or inherent to such process, method, article, or apparatus.
Example 1
Fig. 1 is a flowchart of a fluid parameter processing method provided in an embodiment of the present invention, where the embodiment is applicable to a case of calculating a fluid parameter attribute for a geometric model of a solid to be processed of a triangle patch with arbitrary resolution, and the method may be performed by a fluid parameter processing device, where the device may be implemented by software and/or hardware, and may be generally integrated in an electronic device, where the electronic device may be a terminal device or a server device, so long as the fluid parameter processing method can be performed, and the embodiment of the present invention does not limit a specific device type of the electronic device. Accordingly, as shown in fig. 1, the method includes the following operations:
S110, acquiring a solid geometric model to be processed; wherein the solid geometric model to be treated consists of triangular patches; the triangular patches include subdivided triangular patches and/or original triangular patches.
Wherein the solid geometric model to be processed may be a model comprising geometric information of the solid object to be processed. The solid object to be treated may be any solid object to be treated, and may include, for example, but not limited to, a front windshield wiper and/or a hood, etc. The raw triangular patches may be raw stored, untreated triangular patches in a geometric model of the solid to be treated. The subdivision triangle patch may be a triangle patch obtained by performing subdivision processing on part or all of the original triangle patch.
In the embodiment of the present invention, optionally, a geometric model in STL (STereoLithography ) format or OBJ (a 3D model file) format of the solid to be processed may be used as the solid geometric model to be processed. Wherein the STL file is a mesh model made up of a number of triangular patches, each defined by three vertices and normal vectors. And reading the STL file of the solid object to be processed, so that the vertex coordinates and the connection mode of the vertices of all the triangular patches in the geometric model corresponding to the solid object to be processed can be obtained. The embodiment of the invention does not limit the model file format of the solid geometric model to be processed as long as the model type of the polygonal surface grid with the solid object to be processed can be used as the solid geometric model to be processed. It will be appreciated that the greater the number of triangular patches included in the geometric model of the solid to be processed, the finer the surface of its geometry, and the more accurate the resulting interpolation of the fluid parameters.
The untreated triangular patches in the solid geometry model to be treated may be referred to as raw triangular patches. The solid geometric model to be processed has different resolutions on the triangular patches, and the sizes of the original triangular patches are different. Meanwhile, the sizes of the original triangular patches forming the geometric model of the solid to be treated are different. However, when the side length of the original triangular patch is too long, that is, when the resolution of the solid geometric model to be processed on the triangular patch is low, the subsequent calculation of the grid coordinates of the particles is not facilitated, and meanwhile, the error of interpolation calculation of the solid particles is also large. Therefore, for an original triangular patch with a too large patch, the original triangular patch can be subjected to subdivision processing to obtain a corresponding subdivision triangular patch, so that the obtained subdivision triangular patch can meet the related requirements of particle calculation.
If the original polygonal surface patch in the solid geometric model to be processed is not a triangular surface patch, for example, polygonal surface patches with quadrilateral, pentagonal, hexagonal or even more sides, the original polygonal surface patch can be firstly divided into original triangular surface patches, and analysis and judgment can be carried out on the original triangular surface patches. For an original triangular patch with a too large patch, the original triangular patch can be subjected to subdivision treatment to obtain a corresponding subdivision triangular patch, so that all the finally obtained triangular patches can meet the related requirements of particle calculation.
S120, constructing solid particles according to the triangular patches included in the solid geometric model to be processed.
The solid particles can be of a particle type calculated according to the transformation of the original triangular surface patches and/or the subdivided triangular surface patches included in the geometric model of the solid to be processed, and can be abstract particles.
Correspondingly, after ensuring that each triangular patch in the solid geometric model to be processed meets the calculation requirement of particles, the triangular patches included in the solid geometric model to be processed can be used as a data source, and solid particles corresponding to each triangular patch can be constructed according to the data source.
S130, interpolating fluid attribute parameters of the solid particles according to fluid parameter information of the liquid particles in the support domain of the solid particles to obtain a fluid attribute interpolation result of the triangular patch.
Wherein the support domain liquid particles may be liquid particles comprised within a solid particle support domain. The support domain may be defined as a neighborhood around each solid particle containing other particles, which neighborhood may be spherical or irregular. The size of the supporting domain may be controlled by a parameter called the smooth length or the influencing radius. The parameter may define a particle-centered spherical or irregular region containing a sufficient number of adjacent particles for calculation. In an embodiment of the present invention, the supporting domain may alternatively be a spherical neighborhood. The fluid parameter information may be parameter information describing a fluid related property. The fluid property interpolation result may be an interpolation result obtained by interpolating the fluid property parameters to the triangular patches.
Correspondingly, after the construction of the solid particles is completed, the supporting domain liquid particles of the solid particles can be determined according to the information of the supporting domain of the solid particles, and the fluid attribute parameters are interpolated for the solid particles by taking the fluid parameter information included in the supporting domain liquid particles as a reference, so that the fluid attribute interpolation result of the triangular patch is obtained. The interpolated triangular patches can obtain the fluid interpolation result, so that the triangular patches are endowed with fluid attribute information to more accurately simulate the interaction of the fluid and the solid, and more real fluid dynamic behaviors are obtained.
In the embodiment of the invention, optionally, a discrete particle method can be used to determine the motion and attribute information of the liquid particles so as to simulate the fluid attribute of the liquid particles, thereby interpolating the fluid attribute parameters for the solid particles according to the fluid parameter information of the liquid particles in the supporting domain of the solid particles. Alternatively, the types of discrete particle methods may include, but are not limited to, the SPH method (Smoothed Particle Hydrodynamics, smooth particle fluid mechanics) or MPS (Moving PARTICLE SEMI-im plicit, moving particle semi-implicit method) methods, and the like.
The SPH method in the discrete particle method is a gridless particle method based on a Lagrange equation, fluid can be dispersed into a series of Lagrange particles with mass and random distribution, and macroscopic physical quantity and spatial derivative are approximated by physical quantity carried by the particles by using a method of nuclear approximation and particle approximation. The main ideas of the SPH method are: the continuous fluid domain is expressed by a series of discrete Lagrangian particles, the particles have physical quantities of mass, momentum and energy, and the interaction among the particles is realized by integration of a 'kernel function'; the control equation is also discretized into a particle form, and the entire flow problem can be modeled by calculating the force of the particles and tracking the movement of the particles.
Fig. 2 is a schematic diagram showing an approximate effect of SPH particles in a two-dimensional space according to an embodiment of the present invention. In a specific example, as shown in fig. 2, taking the SPH method as an example of the discrete particle method, W represents a smooth kernel function, which plays a fundamental role, and determines the contribution of each parameter particle in the calculation domain to the nuclear estimation of the physical quantity of the particle to be estimated. According to the special mission of the kernel function, the kernel function has the characteristics of normalization, compactness, non-negativity, attenuation, dike function property, symmetry, smoothness and the like. The support domain of the particle is kh, S is the surface of the calculation region Ω, i, j represent unit vectors, and r ij represents a certain vector from the center of the particle. Assuming that the field function is f, and in the case that the kernel function is defined in the support domain of the interpolation kernel, the calculated domain volume control parameter is h, it can be deduced that the smooth kernel is approximated as:
The following beneficial effects are achieved when the fluid characteristics of the liquid particles are simulated by adopting the SPH method: the SPH method is suitable for handling complex geometries and moving solids, because both fluid and solids can be represented by particles, and the fluid can be modeled directly without creating a complex grid structure, thus complex fluid-solid interfaces can be handled more easily, and thus the deformation and complexity of fluid flow can be flexibly accommodated. The SPH method can directly track fluid particles, so that the influence of numerical diffusion can be reduced, and the SPH method is particularly suitable for high-reynolds-number flow. The SPH method naturally adopts Lagrange description, does not need an additional coupling step, is not influenced by the resolution and structure of the grid, and has good numerical stability and convergence. The SPH method can directly track the movement of fluid particles, so that the SPH method is more direct in treating local phenomena, and can improve the stability and local adaptability of fluid parameter calculation.
And S140, under the condition that the triangular patches comprise the subdivided triangular patches, carrying out normalization processing on the fluid attribute interpolation results of the subdivided triangular patches to obtain target fluid attribute interpolation results.
The target fluid attribute interpolation result may be an interpolation result obtained by normalizing the fluid attribute interpolation result of the subdivided triangle patch.
If the triangular patches in the solid geometry model to be processed comprise subdivided triangular patches, the final fluid property interpolation result needs to be determined for the original triangular patches corresponding to the subdivided triangular patches. At this time, the fluid attribute interpolation result of the subdivided triangular patch can be normalized according to the mapping relationship between the subdivided triangular patch and the corresponding original triangular patch, so as to obtain the final target fluid attribute interpolation result of the subdivided triangular patch corresponding to the original triangular patch.
Therefore, the embodiment of the invention can realize interpolation processing of the fluid attribute data of the triangular patch with any resolution (namely, any triangular patch size), and the flexibility and accuracy of the interpolation processing of the fluid attribute data are higher, so that the flexibility and accuracy of fluid parameter calculation are further improved.
According to the embodiment of the invention, the solid geometric model to be processed which consists of triangular patches such as the subdivided triangular patches and/or the original triangular patches is obtained, so that solid particles are constructed according to the triangular patches included in the solid geometric model to be processed, further, the fluid attribute parameters of the solid particles are interpolated according to the fluid parameter information of the liquid particles in the support domain of the solid particles, the fluid attribute interpolation result of the triangular patches is obtained, and under the condition that the triangular patches are determined to include the subdivided triangular patches, the fluid attribute interpolation result of the subdivided triangular patches is normalized, so that the target fluid attribute interpolation result is obtained. The technical scheme can solve the problems of grid limitation, numerical diffusion, grid dependence, difficult localized treatment and the like of the existing grid numerical method, can flexibly adapt to the deformation and complexity of fluid flow, reduces the influence of numerical diffusion, and improves the stability and the local adaptability of fluid parameter calculation.
Example two
Fig. 3 is a flowchart of a fluid parameter processing method according to a second embodiment of the present invention, which is implemented based on the foregoing embodiment, and in this embodiment, various specific alternative implementations of constructing solid particles, subdividing triangular patches, interpolating fluid attribute parameters for the solid particles, and normalizing the fluid attribute interpolation results for the subdivided triangular patches are given. Accordingly, as shown in fig. 3, the method of this embodiment may include:
S210, acquiring a solid geometric model to be processed, and screening a target triangle patch from the original triangle patches of the solid geometric model to be processed according to the target background grid side length.
The target background grid side length can be a self-defined background grid side length in a solid geometric model to be processed. The target triangular patches may be original triangular patches with triangle sides longer than the target background mesh sides.
In an alternative embodiment of the present invention, before the target triangle patch is screened from the original triangle patches of the solid geometric model to be processed according to the target background mesh side length, the method may further include: and dividing the original polygonal surface patch of the solid geometric model to be processed into original triangular surface patches under the condition that the original polygonal surface patch of the solid geometric model to be processed is determined to be a non-triangular surface patch.
Accordingly, if the original polygonal patches constituting the solid geometric model to be processed are non-triangular patches, for example, quadrangular patches, the original polygonal patches of the solid geometric model to be processed may be first divided into the original triangular patches.
S220, recursively subdividing the target triangle patches according to a subdivision triangle algorithm to obtain the subdivision triangle patches.
The side length of the surrounding frame of the subdivision triangle patch is smaller than the side length of the target background grid.
It will be appreciated that the sizes of the individual raw triangular patches included in the geometric model of the solid to be processed are not the same. If the original triangle patch is too large, the triangle vertexes with oversized patch are directly used for interpolation, and as the triangle vertexes are too far apart, a large blank in the middle of the triangle does not receive the interpolation of the fluid, so that the interpolation error is very large. In this case, the undesirable original triangular patches have to be subdivided before the solid particles are generated.
In the embodiment of the invention, before the subdivision processing is performed on the original triangular patches which do not meet the requirements, the target triangular patches which meet the subdivision requirements can be screened out of the original triangular patches of the solid geometric model to be processed according to the target background grid side length, and then the target triangular patches are subjected to recursion subdivision by adopting a subdivision triangle algorithm to obtain the subdivision triangle patches, so that the surrounding frame side length of the subdivision triangle patches obtained by the subdivision processing is smaller than the target background grid side length, and each triangle patch meets the requirements of a neighbor search algorithm.
In a specific example, a triangle patch is taken as an example to describe the flow of the subdivision triangle algorithm in detail. Firstly, three side lengths of a target triangle patch are calculated, and sides larger than the target background grid side length are screened out of the three side lengths. Fig. 4 is a schematic diagram of an effect of subdividing an original triangular patch according to a second embodiment of the present invention. As shown in fig. 4, the target triangle patch has three cases, the first is that three sides are larger than the target background grid side length, the second is that two sides are larger than the target background grid side length, and the third is that only one side is larger than the target background grid side length. And recursively calling a subdivision triangle algorithm for subdividing each target triangle patch until the size of all subdivision triangle patches obtained by subdivision meets the requirement, namely the side length of a surrounding frame of the subdivision triangle patch is smaller than the side length of a target background grid. Alternatively, the bounding box of the subdivided triangular patch may be a cube or rectangle with six faces parallel to the coordinate axes so that its sides are aligned with the coordinate axes, i.e., 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 triangular patch object, i.e. all points of the triangular patch object must be located on the interior or boundary of the bounding box.
Fig. 5 is a schematic diagram of an effect of subdividing an original triangular patch to obtain subdivided triangular patches according to a second embodiment of the present invention. In one specific example, as shown in fig. 5, the left plot is an original triangular patch spanning several target background mesh side lengths, and the right plot is a triangular patch after subdivision of the original triangular patch of the left plot. It can be seen that the size of the thinned subdivision triangle patch is determined according to the size of the target background grid side length.
Optionally, after recursively subdividing the target triangle patches according to the subdivision triangle algorithm to obtain subdivision triangle patches, a mapping relationship between the subdivided subdivision triangle patches and the corresponding target triangle patches can be recorded for subsequent normalization processing of fluid attribute interpolation results of the subdivision triangle patches.
S230, taking the gravity center of the triangular surface patch as the center of the solid particle, and taking the side length of the target background grid as the radius of the supporting domain.
S240, constructing the solid particles according to the centers of the solid particles and the radius of the supporting domain.
Correspondingly, after the side lengths of all the triangular patches are determined to meet the requirements, the barycentric coordinates of each triangular patch can be solved according to the vertex coordinates of each triangular patch, the barycenter of each triangular patch is further taken as the center of the solid particle, the side length of the target background grid is taken as the radius of the supporting domain, and the sphere area is constructed based on the center and the radius of the supporting domain, so that the solid particle is generated. Alternatively, each triangular patch capable of meeting the relevant requirements of particle computing may be correspondingly computed to obtain a solid particle.
Alternatively, if a subdivided triangular patch is included in the triangular patch, the area may also be calculated for the subdivided triangular patch as a weight for the solid particle, which weight may be used to characterize the contribution of the attribute value of the solid particle to the overall corresponding target triangular patch attribute value.
And S250, modeling the fluid particles and the solid particles according to a neighbor search algorithm to obtain a data structure corresponding to the particles.
If the discrete particle method adopts the SPH method, all liquid particles in the support domain need to be searched out first when calculating the field function for each solid particle according to the requirements of the SPH method. The most straightforward method is to traverse all liquid particles and calculate the distance between solid particles and liquid particles. Assuming a total of N particles, calculation is requiredSecondary distance, i.e. temporal complexity isThis approach is overly computationally expensive and therefore requires a new fast search algorithm.
In order to solve the above problem, the entire analog domain may be divided into uniform cube grids, i.e., the analog domain may be divided by introducing a cartesian background grid. All liquid particles are dispersed in the respective grids. Accordingly, the process of modeling fluid particles according to the neighbor search algorithm mainly comprises the following steps:
The first step: the grid coordinates (integer coordinates) where each particle (including solid particles and liquid particles) is located are calculated by the following formula, and the solid particles are registered into the grid where they are located.
Where pos represents the grid coordinates where the particle is located, chord represents the coordinates of the particle, chord min is the minimum coordinates of the calculation domain, h max is the maximum support radius, and h max may be the side length of the coarsest layer grid.
And a second step of: the morton code value is calculated for the grid coordinates where the particles are located. The Morton code is used for converting the grid coordinates of the multidimensional space into one-dimensional values for representation, the conversion mode of the bit iterative crossover (interleave) is shown in the following expression, and the conversion mode of the bit iterative crossover can ensure that the values before and after conversion are in one-to-one correspondence.
In the above expression, x i represents the value of the ith bit after the x coordinate is converted into binary, and the y coordinate is the same as the z coordinate. Fig. 6 is a schematic diagram of a two-dimensional morton code table according to a second embodiment of the invention. In a specific example, as shown in fig. 6, the morton code value calculated by the grid coordinates where the particles are located is a one-dimensional value, and concatenating the morton code values in order of the numbers from small to large results in a recursive Z-shaped curve, as shown by the gray curve in the background of fig. 6. According to the embodiment of the invention, the memory storage sequence of the grids is ordered according to the Morton code value, and the Z-shaped storage sequence ensures the close storage positions of the space adjacent grids in the memory to a certain extent, so that the cache hit rate is improved, and the program running efficiency is improved.
And a third step of: the Morton code according to the spatial grid coordinates uses radix ordering to order the "particle-grid pairs" to provide an ordered representation of the particles in the computational domain. This coding ensures that spatially adjacent particles have similar morton codes, thus achieving a degree of spatial locality. In the particle simulation, the Morton code is utilized to sort the particles, so that the locality of memory access can be improved, the randomness of the memory access is reduced, and the simulation efficiency is improved.
Fig. 7 is a schematic diagram of the effect of using radix ordering to order "particle-grid pairs" according to the morton code of the space grid coordinates provided in the second embodiment of the invention. In a specific example, as shown in fig. 7, cell Index represents the number after three-dimensional coordinate morton encoding. Particle Index indicates the number of the Particle. The nth row in the CellbeginEnd table represents the storage locations of the particles having a grid number n, including the start and end locations, where the particles of the same grid are all stored consecutively. As can be seen from fig. 7, the grid and particles are in one-to-many relationship, so the data in the column of Cell Index is repeatedly numbered. The-1 data of CellBeginEnd table represents no particles in the grid, and in order to save memory, the-1 data of CellBeginEnd table can be deleted and tightly stored. To quickly find the information of the compact CellBeginEnd table, the following hash function can be introduced:
Wherein, Representing a hash function,AndIs three large prime numbers, exemplary,Can take the value 73856093,Can take the value 19349663,The value can be 83492791. /(I)Is the coordinate vector of the grid,Is the component of the vector in the direction of the x coordinate axis,Is the component of the vector in the y-axis direction,Is the component of the vector in the direction of the z coordinate axis,Is the length of the hash table. The grid coordinates are converted into hash values by utilizing the hash function, and then CellBeginEnd data are ordered according to the hash values, so that the memory position of CellBeginEnd information is searched in constant time (under average condition).
And S260, distributing the support domain liquid particles to the solid particles according to the data structure corresponding to the particles.
Accordingly, after determining the data structure corresponding to each particle, the supporting domain liquid particles can be calculated and allocated to the solid particles according to the data structure corresponding to the particle.
In an alternative embodiment of the present invention, the assigning the supporting 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 particles; determining adjacent grid coordinates according to the current grid coordinates; determining liquid particles in the coordinate range of the adjacent grids as adjacent liquid particles according to the data structure corresponding to the particles; and screening liquid particles in the supporting domain range belonging to the current solid particles from the adjacent liquid particles as the supporting domain liquid particles.
Wherein the current solid particles, i.e. the solid particles that currently require the computational distribution of the supporting domain liquid particles. The current grid coordinates may be grid coordinates of the current solid particles. The neighboring grid coordinates may be coordinates within a certain range adjacent to the current grid coordinates. The adjacent liquid particles may be liquid particles whose grid coordinates lie within the range of adjacent grid coordinates.
Accordingly, after the data structure corresponding to each particle is established by adopting the neighbor search algorithm, in a specific example, the step of searching the matched supporting domain liquid particle for the current solid particle is as follows:
And a first step of calculating the current grid coordinates of the current solid particles and adjacent grid coordinates of the current grid coordinates. Fig. 8 is a schematic diagram of an effect of deployment relationship between particles and grids in a two-dimensional space according to a second embodiment of the present invention, in a specific example, as shown in fig. 8, it is assumed that the current solid particles are examples corresponding to the center positions of circles, and in the two-dimensional space, the number of adjacent grids of the current solid particles may be 9. In three-dimensional space, the number of adjacent grids of the current solid particles may then be 27.
And secondly, calculating a hash value of the current grid coordinate of the current solid particle, wherein the hash value can be used as an index of 'the number start-stop information of all particles recorded in the grid' in a CellBeginEnd table.
And thirdly, determining all liquid particles in 27 grids in the adjacent grid coordinate range of the current solid particle, such as the vicinity of the current grid coordinate, according to the data structure corresponding to the particles obtained by the operation, and taking the liquid particles as the adjacent liquid particles.
And fourthly, calculating the distance between each adjacent liquid particle and the current solid particle, comparing the calculated distance with the radius h of the supporting domain of the current solid particle, and determining the adjacent liquid particle with the distance smaller than the radius h of the supporting domain as the liquid particle of the supporting domain.
The method for calculating the liquid particles in the support domain can effectively avoid the problem of accessing all particles in the simulation domain, but only the particles in the neighbor grid are required to be accessed, so that the complexity of an algorithm is greatly reduced, and O (N.m) can be achieved.
Optionally, any discrete particle method such as SPH method or MPS method may be used to calculate the position and attribute of the liquid particle, so as to obtain the fluid parameter information of the liquid particle.
It will be appreciated that each triangular patch meeting the requirements may be associated with the creation of one solid particle, and therefore a plurality of solid particles. In order to improve algorithm efficiency, optionally, a parallel computing technology may be used to screen out supporting domain liquid particles in a supporting domain range from each solid particle, and parallelize the process of interpolating fluid attribute parameters from each solid particle. Optionally, a corresponding GPU (Graphics Processing Unit, graphics processor) thread may be created for each solid particle, so that each GPU thread screens out supporting domain liquid particles within the supporting domain range for each solid particle, and further calculates the fluid attribute interpolation result of each triangle patch in parallel.
S270, interpolating fluid attribute 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 a fluid attribute interpolation result of the triangular patch.
In an optional embodiment of the present invention, the interpolating a fluid attribute parameter for the solid particle according to fluid parameter information of the solid particle supporting domain liquid particle to obtain a fluid attribute interpolation result of a triangular patch may include: calculating initial fluid attribute parameters of the current solid particles according to the fluid parameter information of the support domain liquid particles; wherein the fluid parameter information may include fluid property values, locations, masses, and densities; carrying out standard normalization processing on the initial fluid attribute parameters of the current solid particles to obtain normalized fluid attribute interpolation parameters; and determining a fluid property interpolation result of the triangular patch according to the normalized fluid property interpolation parameters of the solid particles.
Wherein the initial fluid property parameter may be fluid property interpolation data preliminarily calculated based on fluid parameter information of the support domain liquid particles. The fluid parameter information may include values of a fluid property such as, but not limited to, values of a related physical property of the fluid such as velocity or pressure. The normalized fluid property interpolation parameter may be an interpolation parameter of a fluid property obtained after standard normalization processing is performed on an initial fluid property parameter of the current solid particle.
Alternatively, the initial fluid property parameter of the current solid particle may be calculated from the fluid parameter information of the supporting domain liquid particle based on the following formula:
Wherein, Initial fluid property parameter representing current solid particle i,Fluid parameter information representing the supporting domain liquid particles j may include, for example, but not limited to, parameters such as velocity and pressure,Representing the current position of solid particle i,Represents the position of the supporting domain liquid particle j, m j represents the mass of the supporting domain liquid particle j,The density of the liquid particles j in the support domain is represented, W is a smooth kernel function, h is represented by the radius of the support domain, and the value can be the side length of the target background grid.
Optionally, the following scheme may be used to perform standard normalization processing on the initial fluid attribute parameters of the current solid particles, to obtain normalized fluid attribute interpolation parameters:
First, the Norm of the fluid attribute interpolation result of the current solid particle i can be calculated according to the following formula, where Norm can be represented by a kernel function normalization formula, and can be regarded as a normalization process for the initial fluid attribute parameter:
Further, the Norm of the fluid attribute interpolation result is used for normalizing the initial fluid attribute parameter to obtain a normalized fluid attribute interpolation parameter
After standard normalization processing is completed to obtain normalized fluid attribute interpolation parameters, the normalized fluid attribute interpolation parameters corresponding to each solid particle can be recorded.
S280, determining the original triangular patches corresponding to the subdivided triangular patches.
And S290, carrying out weighted average calculation on the fluid property interpolation result of the subdivision triangle patch according to the area ratio of the subdivision triangle patch to the original triangle patch to obtain the target fluid interpolation result of the subdivision triangle patch.
Since the subdivision triangle patch is obtained by subdivision processing of the original triangle patch, if it is determined that the subdivision triangle patch exists, after the fluid attribute interpolation result is obtained by processing the subdivision triangle patch, further normalization processing is required to be performed on the fluid attribute interpolation result of the subdivision triangle patch. Therefore, for the subdivision triangle patch, the original triangle patch for dividing the subdivision triangle patch needs to be determined, so that the weighted average calculation is performed on the fluid property interpolation result of the subdivision triangle patch according to the area ratio of the subdivision triangle patch to the corresponding original triangle patch, and the weighted average calculation result is the interpolation result of the liquid particles nearby the subdivision triangle patch, namely the target fluid interpolation result of the subdivision triangle patch.
Alternatively, the fluid property interpolation results for the subdivided triangular patches may be weighted averaged based on the following formula:
Wherein, The target fluid interpolation result for the subdivision triangle patch is shown, s i is the area of the ith subdivision triangle patch, and s tri is the area of the original triangle patch corresponding to the ith subdivision triangle patch.
Fig. 9 is a schematic flow chart of fluid parameter processing based on a subdivided triangular patch according to a second embodiment of the present invention. In order to more clearly describe the technical solution provided by the embodiment of the present invention, in a specific example, the fluid parameter processing method provided by the embodiment of the present invention is specifically described with reference to the flow shown in fig. 9:
First, a geometric model of the solid object to be treated is read as input. The solid geometric model to be processed can consist of a plurality of triangular patches or polygonal patches, and the more the number of patches is, the finer the geometric surface is, and the more accurate the obtained final interpolation result is. If the solid geometric model to be treated comprises polygonal patches, it needs to be divided into triangular patches.
And secondly, subdividing the original triangular surface patches with the side length larger than the side length of the target background grid by utilizing a subdivision triangle algorithm, and recursively subdividing until solid particles with the side length smaller than the side length of the target background grid can be generated according to the subdivided triangular surface patches.
Further, the center of gravity of the subdivided triangular surface patches is taken as the center of the solid particles, and the side length h max of the target background grid is taken as the radius of the supporting domain, so that the solid particles are generated. And meanwhile, calculating the area of the subdivided triangular patch as the weight of the solid particles, namely the contribution of the attribute value of the solid particles to the attribute value of the whole original triangular patch.
Further, the coordinates and attribute information of the liquid particles are obtained through a discrete particle method, and the fluid parameter information of the liquid particles is obtained.
Further, a data structure is built for each particle according to a method given by a neighbor searching algorithm, so that fluid particles in a supporting domain of the solid particle are searched, and fluid attribute information such as speed, pressure and the like is added to the solid particle according to the searched fluid particles by adopting an interpolation method.
To improve the algorithm efficiency, a GPU thread may be created for each solid particle, and the GPU threads execute the following steps in parallel:
(1) And calculating the current grid coordinates of the current solid particles.
(2) All fluid particles of 27 grids adjacent to the current grid are traversed and all fluid particles within the solid particle support domain are screened out. As shown in fig. 9, wherein solid dots represent fluid particles, and hollow dots (i.e., the dots where the center point of each dashed circle is located) represent solid particles. It can be seen that the support region of each solid particle (i.e. each dashed circle) can comprise a certain number of fluid particles.
Fluid property values of liquid particles, including but not limited to fluid property values of velocity and pressure, are interpolated for solid particles according to the relationship given by the following formula.
Further, according to the formula: calculating the Norm of the interpolation result of the solid particles, and normalizing the interpolation result by using the value to obtain a final result/> . Interpolation information of the solid particles is recorded.
Finally, according to the area of the subdivided triangular surface patches and the corresponding relation between the subdivided triangular surface patches and the original large triangular surface patches, adopting the formula: And carrying out weighted average calculation on the subdivided triangular surface patches, wherein the calculation result is the interpolation result of liquid particles nearby the triangular surface patches. As shown in fig. 9, the result of weighted average calculation of each subdivided small triangle is specifically: (2×3.7+3×3.7+4×3.7+5×3.7)/14.8=3.5. After the algorithm is executed, each triangle patch obtains an interpolation result of the fluid attribute.
Fig. 10 is a schematic view of the effect of an STL model of a front windshield wiper and a bonnet of an automobile according to a second embodiment of the invention, fig. 11 is a schematic view of the effect of fluid velocity distribution in the front windshield wiper and the bonnet of the automobile according to the second embodiment of the invention, fig. 12 is a schematic view of the effect of fluid velocity field distribution captured on the surface of the STL model of the front windshield wiper and the bonnet of the automobile according to the second embodiment of the invention, and fig. 13 is a schematic view of the effect of overflow simulation of a pillar a of the automobile according to the second embodiment of the invention. In a specific example, as shown in fig. 10 to 13, the fluid parameter processing method according to the above embodiment is used to simulate the fluid velocity distribution in the front windshield wiper and the bonnet of the automobile and the overflow of the a pillar of the automobile, so that the fluid parameter simulation effect is good.
The fluid parameter processing method does not need to define a grid structure in advance and has no grid limitation, so that the method can flexibly adapt to the deformation and complexity of fluid flow. Meanwhile, the particle method is adopted to directly track the fluid particles, so that the influence of numerical diffusion can be reduced, and the method is particularly suitable for high-Reynolds-number flow. The result of the particle method is not affected by the resolution and structure of the grid, so the result is more stable. Particle methods are more straightforward in dealing with localized phenomena because they directly track the movement of fluid particles. Therefore, the technical scheme 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.
Meanwhile, the whole fluid parameter processing flow can be suitable for interpolation processing of fluid attribute data with any triangle patch resolution, so that the problem of information loss caused by too small triangle patch resolution when interpolation processing is performed on triangle patch vertexes can be solved, and the accuracy of fluid parameter calculation is further improved.
It should be noted that any permutation and combination of the technical features in the above embodiments also belong to the protection scope of the present invention.
Example III
Fig. 14 is a schematic view of a fluid parameter processing device according to a third embodiment of the present invention, as shown in fig. 14, where the device includes: a solid geometry 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:
A solid geometric model acquisition module 310, configured to acquire a solid geometric model to be processed; wherein the solid geometric model to be treated consists of triangular patches; the triangular patches comprise subdivided triangular patches and/or original triangular patches;
a solid particle construction module 320, configured to construct solid particles according to triangular patches included in the solid geometric model to be processed;
A fluid attribute interpolation result obtaining module 330, configured to interpolate a fluid attribute parameter for the solid particle according to fluid parameter information of the solid particle supporting domain liquid particle, so as to obtain a fluid attribute interpolation result of the triangular patch;
And the target fluid attribute interpolation result obtaining module 340 is configured to normalize the fluid attribute interpolation result of the subdivided triangular patch to obtain a target fluid attribute interpolation result when it is determined that the triangular patch includes the subdivided triangular patch.
According to the embodiment of the invention, the solid geometric model to be processed which consists of triangular patches such as the subdivided triangular patches and/or the original triangular patches is obtained, so that solid particles are constructed according to the triangular patches included in the solid geometric model to be processed, further, the fluid attribute parameters of the solid particles are interpolated according to the fluid parameter information of the liquid particles in the support domain of the solid particles, the fluid attribute interpolation result of the triangular patches is obtained, and under the condition that the triangular patches are determined to include the subdivided triangular patches, the fluid attribute interpolation result of the subdivided triangular patches is normalized, so that the target fluid attribute interpolation result is obtained. The technical scheme can solve the problems of grid limitation, numerical diffusion, grid dependence, difficult localized treatment and the like of the existing grid numerical method, can flexibly adapt to the deformation and complexity of fluid flow, reduces the influence of numerical diffusion, and improves the stability and the local adaptability of fluid parameter calculation.
Optionally, the solid particle construction module 320 is further configured to: taking the gravity center of the triangular surface patch as the center of the solid particles and taking the side length of the target background grid as the radius of the supporting domain; the solid particles are constructed from the center of the solid particles and the radius of the support domain.
Optionally, the fluid parameter processing device further includes a subdivision triangle patch obtaining module, configured to: dividing the original polygonal surface patch of the solid geometric model to be processed into original triangular surface patches under the condition that the original polygonal surface patch of the solid geometric model to be processed is determined to be a non-triangular surface patch; screening a target triangular surface patch from the original triangular surface patches of the solid geometric model to be processed according to the target background grid side length; recursively subdividing the target triangle patches according to a subdivision triangle algorithm to obtain subdivision triangle patches; the side length of the surrounding frame of the subdivision triangle patch is smaller than the side length of the target background grid.
Optionally, the fluid parameter processing device further includes a supporting domain liquid particle distribution module for: modeling the fluid particles and the solid particles according to a neighbor search algorithm to obtain a data structure corresponding to the particles; and distributing the supporting domain liquid particles to the solid particles according to the data structure corresponding to the particles.
Optionally, the supporting domain liquid particle distribution module is further configured to: calculating the current grid coordinates of the current solid particles; determining adjacent grid coordinates according to the current grid coordinates; determining liquid particles in the coordinate range of the adjacent grids as adjacent liquid particles according to the data structure corresponding to the particles; and screening liquid particles in the supporting domain range belonging to the current solid particles from the adjacent liquid particles as the supporting domain liquid particles.
Optionally, the fluid attribute interpolation result obtaining module 330 is further configured to: calculating initial fluid attribute parameters of the current solid particles according to the fluid parameter information of the support domain liquid particles; wherein the fluid parameter information comprises fluid attribute values, positions, quality and density; carrying out standard normalization processing on the initial fluid attribute parameters of the current solid particles to obtain normalized fluid attribute interpolation parameters; and determining a fluid property interpolation result of the triangular patch according to the normalized fluid property interpolation parameters of the solid particles.
Optionally, the target fluid property interpolation result obtaining module 340 is further configured to: determining an original triangular patch corresponding to the subdivided triangular patch; and carrying out weighted average calculation on the fluid property interpolation result of the subdivision triangle patch according to the area ratio of the subdivision triangle patch to the original triangle patch to obtain the target fluid interpolation result of the subdivision triangle patch.
The fluid parameter processing device can execute the fluid parameter processing method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method. Technical details not described in detail in this embodiment may be referred to the fluid parameter processing method provided in any embodiment of the present invention.
Since the fluid parameter processing apparatus described above is an apparatus capable of executing the fluid parameter processing method according to the embodiment of the present application, those skilled in the art will be able to understand the specific implementation of the fluid parameter processing apparatus according to the embodiment of the present application and various modifications thereof based on the fluid parameter processing method described in the embodiment of the present application, so how the fluid parameter processing apparatus implements the fluid parameter processing method according to the embodiment of the present application will not be described in detail herein. The apparatus used by those skilled in the art to implement the fluid parameter processing method in the embodiments of the present application is within the scope of the present application.
Example IV
Fig. 15 shows a schematic diagram of the structure of an electronic device 10 that may be used to implement an embodiment of the present invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. Electronic equipment may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 15, the electronic device 10 includes at least one processor 11, and a memory, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, etc., communicatively connected to the at least one processor 11, in which the memory stores a computer program executable by the 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 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 may also be stored. The processor 11, the ROM 12 and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
Various 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, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, digital Signal Processors (DSPs), and any suitable processor, controller, microcontroller, etc. The processor 11 performs the various methods and processes described above, such as fluid parameter processing methods.
Optionally, the fluid parameter processing method may include: obtaining a solid geometric model to be treated; wherein the solid geometric model to be treated consists of triangular patches; the triangular patches comprise subdivided triangular patches and/or original triangular patches; constructing solid particles according to triangular patches included in the solid geometric model to be treated; interpolating fluid attribute parameters of the solid particles according to fluid parameter information of the liquid particles in the supporting domain of the solid particles to obtain a fluid attribute interpolation result of the triangular patch; and under the condition that the triangular patches are determined to comprise the subdivided triangular patches, carrying out normalization processing on the fluid attribute interpolation results of the subdivided triangular patches to obtain target fluid attribute interpolation results.
In some embodiments, the fluid parameter processing method may be implemented as a computer program tangibly embodied on a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM 12 and/or the communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the fluid parameter processing method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the fluid parameter processing method in any other suitable manner (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for carrying out 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, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be implemented. The computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can 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 a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, 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, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service are overcome.

Claims (10)

1. A method of processing a fluid parameter, comprising:
obtaining a solid geometric model to be treated; wherein the solid geometric model to be treated consists of triangular patches; the triangular patches comprise subdivided triangular patches and/or original triangular patches;
constructing solid particles according to triangular patches included in the solid geometric model to be treated;
interpolating fluid attribute parameters of the solid particles according to fluid parameter information of the liquid particles in the supporting domain of the solid particles to obtain a fluid attribute interpolation result of the triangular patch;
and under the condition that the triangular patches are determined to comprise the subdivided triangular patches, carrying out normalization processing on the fluid attribute interpolation results of the subdivided triangular patches to obtain target fluid attribute interpolation results.
2. The method according to claim 1, wherein said constructing solid particles from triangular patches comprised by said geometric model of the solid to be treated comprises:
taking the gravity center of the triangular surface patch as the center of the solid particles and taking the side length of the target background grid as the radius of the supporting domain;
the solid particles are constructed from the center of the solid particles and the radius of the support domain.
3. The method of claim 2, further comprising, prior to said centering the center of gravity of the triangular patch as the center of the solid particle:
dividing the original polygonal surface patch of the solid geometric model to be processed into original triangular surface patches under the condition that the original polygonal surface patch of the solid geometric model to be processed is determined to be a non-triangular surface patch;
Screening a target triangular surface patch from the original triangular surface patches of the solid geometric model to be processed according to the target background grid side length;
recursively subdividing the target triangle patches according to a subdivision triangle algorithm to obtain subdivision triangle patches;
The side length of the surrounding frame of the subdivision triangle patch is smaller than the side length of the target background grid.
4. The method of claim 1, further comprising, prior to interpolating the fluid property parameters for the solid particles from the fluid parameter information for the solid particles supporting domain liquid particles:
modeling the fluid particles and the solid particles according to a neighbor search algorithm to obtain a data structure corresponding to the particles;
and distributing the supporting domain liquid particles to the solid particles according to the data structure corresponding to the particles.
5. The method of claim 4, wherein the assigning the supporting domain liquid particles to the solid particles according to the particle-to-particle data structure comprises:
calculating the current grid coordinates of the current solid particles;
Determining adjacent grid coordinates according to the current grid coordinates;
determining liquid particles in the coordinate range of the adjacent grids as adjacent liquid particles according to the data structure corresponding to the particles;
and screening liquid particles in the supporting domain range belonging to the current solid particles from the adjacent liquid particles as the supporting domain liquid particles.
6. The method according to claim 1, wherein interpolating the fluid property parameters for the solid particles based on the fluid parameter information for the solid particles supporting domain liquid particles to obtain the fluid property interpolation result for the triangular patches comprises:
Calculating initial fluid attribute parameters of the current solid particles according to the fluid parameter information of the support domain liquid particles; wherein the fluid parameter information comprises fluid attribute values, positions, quality and density;
Carrying out standard normalization processing on the initial fluid attribute parameters of the current solid particles to obtain normalized fluid attribute interpolation parameters;
And determining a fluid property interpolation result of the triangular patch according to the normalized fluid property interpolation parameters of the solid particles.
7. The method according to claim 1, wherein normalizing the fluid property interpolation results of the subdivided triangular patches to obtain target fluid property interpolation results comprises:
determining an original triangular patch corresponding to the subdivided triangular patch;
And carrying out weighted average calculation on the fluid property interpolation result of the subdivision triangle patch according to the area ratio of the subdivision triangle patch to the original triangle patch to obtain the target fluid interpolation result of the subdivision triangle patch.
8. A fluid parameter processing apparatus, comprising:
the solid geometric model acquisition module is used for acquiring a solid geometric model to be processed; wherein the solid geometric model to be treated consists of triangular patches; the triangular patches comprise subdivided triangular patches and/or original triangular patches;
The solid particle construction module is used for constructing solid particles according to the triangular patches included in the solid geometric model to be processed;
The fluid attribute interpolation result acquisition module is used for interpolating the fluid attribute 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 a fluid attribute interpolation result of the triangular patch;
And the target fluid attribute interpolation result acquisition module is used for carrying out normalization processing on the fluid attribute interpolation result of the subdivision triangle patch under the condition that the triangle patch is determined to comprise the subdivision triangle patch, so as to obtain the target fluid attribute interpolation result.
9. An electronic device, the electronic device comprising:
At least one processor; and
A memory communicatively coupled to the at least one processor; wherein,
The memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the fluid parameter processing method of any one of claims 1-7.
10. A computer readable storage medium storing computer instructions for causing a processor to perform the fluid parameter processing method of any one of claims 1-7.
CN202410620470.1A 2024-05-20 2024-05-20 Fluid parameter processing method and device, electronic equipment and storage medium Active CN118194776B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410620470.1A CN118194776B (en) 2024-05-20 2024-05-20 Fluid parameter processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410620470.1A CN118194776B (en) 2024-05-20 2024-05-20 Fluid parameter processing method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN118194776A true CN118194776A (en) 2024-06-14
CN118194776B CN118194776B (en) 2024-08-30

Family

ID=91404699

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410620470.1A Active CN118194776B (en) 2024-05-20 2024-05-20 Fluid parameter processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN118194776B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105760588A (en) * 2016-02-04 2016-07-13 国家海洋局第海洋研究所 SPH fluid surface reconstruction method based on second-layer regular grid
CN112163384A (en) * 2020-08-18 2021-01-01 北京大学 Solid boundary extraction method for free surface flow

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105760588A (en) * 2016-02-04 2016-07-13 国家海洋局第海洋研究所 SPH fluid surface reconstruction method based on second-layer regular grid
CN112163384A (en) * 2020-08-18 2021-01-01 北京大学 Solid boundary extraction method for free surface flow

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
李世军;潘君华;倪明玖: "快速计算浸没边界水动力的映射方法", 力学学报(英文版), vol. 38, no. 008, 31 December 2022 (2022-12-31), pages 721491 *
陈曦;王章野;何戬;延诃;彭群生;: "GPU中的流体场景实时模拟算法", 计算机辅助设计与图形学学报, no. 03, 15 March 2010 (2010-03-15), pages 396 - 405 *

Also Published As

Publication number Publication date
CN118194776B (en) 2024-08-30

Similar Documents

Publication Publication Date Title
WO2022007398A1 (en) Unstructured grid flood simulation system based on gpu acceleration thechnology
Chen et al. Automatic sizing functions for unstructured surface mesh generation
CN114818224B (en) Structural grid generation method, device, equipment and storage medium
Yang et al. A Point Cloud Simplification Method Based on Modified Fuzzy C‐Means Clustering Algorithm with Feature Information Reserved
CN111127637A (en) Data processing method and device of three-dimensional model and electronic equipment
Sharp et al. Spelunking the deep: Guaranteed queries on general neural implicit surfaces via range analysis
CN105469446A (en) Point cloud mesh simplification system and method
CN106960470B (en) Three-dimensional point cloud curved surface reconstruction method and device
Hel-Or et al. Relaxed parametric design with probabilistic constraints
CN115115773B (en) Collision detection method, device, equipment and storage medium
CN112819962A (en) Non-uniform grid division and local grid density method in digital image correlation
US10943037B2 (en) Generating a CAD model from a finite element mesh
CN110008387B (en) Flow field visualization implementation method and device and electronic equipment
CN113673186A (en) Cartesian grid rapid generation method based on STL file
Park et al. Hybrid grid generation for viscous flow analysis
Rivara Lepp-bisection algorithms, applications and mathematical properties
CN116484744B (en) Object simulation method, model training method, device, equipment and storage medium
CN118194776B (en) Fluid parameter processing method and device, electronic equipment and storage medium
CN117172181A (en) Multi-scale body-attached grid generation method for multi-physical-field simulation
CN114529643A (en) Method for optimizing and displaying massive GIM (graphic information model)
CN114492249A (en) Method, system, client and server for generating unstructured grid
da Silva et al. Neural implicit mapping via nested neighborhoods
CN113591208A (en) Oversized model lightweight method based on ship feature extraction and electronic equipment
Fayolle et al. Rounding, filleting and smoothing of implicit surfaces
CN118485025B (en) Flow field prediction method and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant