Structural grid based unstructured mesh partitioning method and electronic device

By using an unstructured mesh generation method based on structured meshes, the problems of insufficient accuracy of structured meshes in complex geometries and low efficiency of unstructured meshes at high precision are solved, achieving efficient and accurate combustion and detonation simulation, which is suitable for large-scale parallel computing.

CN120726262BActive Publication Date: 2025-11-21国家超级计算天津中心 +1
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202511158710.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-19
Publication Date
2025-11-21
Estimated Expiration
2045-08-19

AI Technical Summary

Technical Problem

In existing technologies, structured meshes struggle to meet high-precision requirements in complex geometries, while unstructured meshes struggle to balance computational efficiency at high precision, especially in dynamic adaptive processes where computational costs are high and communication overhead is significant.

Method used

By using an unstructured mesh generation method based on structured meshes, the computational domain and geometric model are first determined to generate surface meshes, and then structured meshes are generated and simulated. Based on the simulation results, mesh refinement parameters are determined to generate unstructured meshes, thus avoiding the dynamic adaptive process and improving generation efficiency and quality.

Benefits of technology

It achieves high-precision simulation on complex geometric models, balances computational efficiency, reduces the computational overhead caused by dynamically adjusting the mesh, and is suitable for large-scale parallel environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120726262B_ABST
    Figure CN120726262B_ABST
Patent Text Reader

Abstract

The application provides a structure grid-based unstructured grid division method and an electronic device. The method determines a calculation domain range of a combustion detonation simulation task, performs surface grid division on a geometric model to obtain a geometric surface representation grid, generates a structure grid according to the geometric surface representation grid and the calculation domain range, performs simulation calculation on the structure grid, determines a grid encryption parameter according to a simulation calculation result of the structure grid, generates an unstructured grid through the grid encryption parameter, the calculation domain range and the geometric surface representation grid, realizes the structure grid-based unstructured grid division, can replace a trial-and-error iterative optimization or a complex dynamic self-adaptive process of the unstructured grid, improves the generation efficiency of the unstructured grid and guarantees the generation quality of the unstructured grid, balances the calculation efficiency while meeting the high-precision requirement, and is suitable for a large-scale parallel environment.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of numerical simulation, in particular to a structured grid based unstructured grid partitioning method and electronic device. BACKGROUND

[0002] Combustion and detonation processes of combustible materials such as gas and dust involve extremely complex physical processes of chemical reactions, fluid mechanics and thermodynamics coupling, and widely exist in key fields such as aerospace power systems and industrial safety assessment. Numerical simulation is an important means to study such problems. In numerical simulation, the selection of calculation grid is crucial to the simulation efficiency and accuracy.

[0003] Currently, two types of technologies, structured grid and unstructured grid, are mainly used. It is difficult to meet the high-precision requirements in complex geometry and flexibility by using structured grid; and it is difficult to balance the calculation efficiency under high-precision requirements by using unstructured grid, especially the additional consumption of dynamic self-adaptive process and the time cost of grid partitioning. SUMMARY

[0004] In view of the above defects or deficiencies in the prior art, the present application aims to provide a structured grid based unstructured grid partitioning method and electronic device to solve the problems of insufficient numerical simulation accuracy, low efficiency and high time cost in the related art.

[0005] The embodiment of the present application provides a structured grid based unstructured grid partitioning method, which comprises:

[0006] determining a calculation domain range of a combustion and detonation simulation task, and performing surface grid partitioning on a geometric model of the combustion and detonation simulation task to obtain a geometric representation surface grid;

[0007] generating a structured grid based on the geometric representation surface grid and the calculation domain range, and performing simulation calculation on the structured grid according to the boundary conditions corresponding to the calculation domain range and the structured grid;

[0008] determining a grid encryption parameter based on the simulation calculation result of the structured grid, and generating an unstructured grid according to the grid encryption parameter, the calculation domain range and the geometric representation surface grid.

[0009] Optionally, after generating the structured grid based on the geometric representation surface grid and the calculation domain range, the method further comprises:

[0010] for each structured grid, determining a signed distance function value of the structured grid to the geometric representation surface grid, wherein the signed distance function value reflects the position of the structured grid relative to the geometric representation surface grid;

[0011] determine an isosurface of the geometric surface mesh in the calculation domain range according to the signed distance function values corresponding to the structure meshes;

[0012] For each structure mesh, a ray is emitted from the center of the structure mesh to the isosurface, the number of intersection points between the ray and the isosurface is determined, and whether the structure mesh is located inside the closed geometric body is determined according to the number of intersection points;

[0013] From all the structure meshes, the structure meshes located inside the closed geometric body are removed.

[0014] Optionally, before the simulation calculation on the structure meshes according to the boundary conditions corresponding to the structure meshes in the calculation domain range, the method further comprises:

[0015] determining the boundary conditions corresponding to the structure meshes;

[0016] The determination of the boundary conditions corresponding to the structure meshes comprises:

[0017] determining fixed wall boundaries, outflow boundaries and inflow boundaries based on the geometric model;

[0018] configuring corresponding velocity inflow boundary conditions for the inflow boundaries and configuring corresponding free boundary conditions or non-reflecting boundary conditions for the outflow boundaries.

[0019] Optionally, the grid refinement parameters comprise a grid refinement range and corresponding grid refinement sizes, and the determination of the grid refinement parameters based on the simulation calculation results of the structure meshes comprises:

[0020] determining convergence curves of key physical quantities corresponding to structure meshes of different sizes according to simulation calculation results of the structure meshes of different sizes;

[0021] determining the grid refinement sizes according to the convergence curves of the key physical quantities corresponding to the structure meshes of different sizes;

[0022] determining physical quantity distribution information of different times and different regions according to simulation calculation results of the structure meshes of the grid refinement sizes;

[0023] determining the grid refinement range based on the physical quantity distribution information of different times and different regions.

[0024] Optionally, the grid refinement parameters comprise a grid refinement range and corresponding grid refinement sizes, and the determination of the grid refinement parameters based on the simulation calculation results of the structure meshes comprises:

[0025] determining the grid refinement range and the corresponding grid refinement sizes according to the minimum grid sizes in each region recorded in the simulation calculation results;

[0026] The minimum grid size of each region recorded in the simulation calculation result is determined by the gradient of the key physical quantity in the calculation domain range in the simulation calculation process.

[0027] Optionally, the grid refinement parameter includes a grid refinement range and a corresponding grid refinement size, and the unstructured grid is generated according to the grid refinement parameter, the calculation domain range and the geometric surface mesh, including:

[0028] The volume mesh is generated based on the geometric surface mesh and the calculation domain range.

[0029] For each grid refinement range, the volume mesh located in the grid refinement range is locally refined according to the corresponding grid refinement size, to obtain the unstructured grid.

[0030] Optionally, after the unstructured grid is generated according to the grid refinement parameter, the calculation domain range and the geometric surface mesh, the method further includes:

[0031] The calculation domain range is divided into multiple parallel sub-domains based on the position and quantity of the unstructured grid.

[0032] The unstructured grid in each parallel sub-domain is respectively distributed to different nodes for parallel simulation calculation.

[0033] Optionally, the calculation domain range is divided into multiple parallel sub-domains based on the position and quantity of the unstructured grid, including:

[0034] The geometric center coordinates of each unstructured grid are determined based on the position of each unstructured grid, and each geometric center coordinate is normalized.

[0035] The position code corresponding to each normalized geometric center coordinate is determined, and all position codes are sorted.

[0036] The average grid quantity and the remaining grid quantity are determined based on the quantity of the unstructured grid and a preset sub-domain quantity.

[0037] Each code in the code sorting list is segmented to determine the unstructured grid contained in each parallel sub-domain according to the average grid quantity and the remaining grid quantity.

[0038] Optionally, the calculation domain range of the combustion and detonation simulation task is determined, including:

[0039] The calculation condition information and the geometric model of the combustion and detonation simulation task are obtained.

[0040] determine a leakage simulation range and a combustion simulation range of the combustion and detonation simulation task according to the calculation condition information and the geometric model;

[0041] determine a calculation domain range of the combustion and detonation simulation task according to the leakage simulation range and the combustion simulation range.

[0042] The embodiment of the present application further provides an electronic device, which comprises:

[0043] a processor and a memory;

[0044] The processor is configured to execute the steps of the method for non-structural grid partitioning based on a structural grid by invoking programs or instructions stored in the memory.

[0045] The embodiment of the present application further provides a computer readable storage medium, which stores programs or instructions, and the programs or instructions enable a computer to execute the steps of the method for non-structural grid partitioning based on a structural grid.

[0046] In summary, the present application provides a method for non-structural grid partitioning based on a structural grid. The method determines a calculation domain range of a combustion and detonation simulation task, performs surface grid partitioning on a geometric model of the combustion and detonation simulation task to obtain a geometric surface grid, generates a structural grid according to the geometric surface grid and the calculation domain range, performs simulation calculation on the structural grid according to boundary conditions corresponding to the calculation domain range and the structural grid, determines grid encryption parameters according to simulation calculation results of the structural grid, generates a non-structural grid according to the grid encryption parameters, the calculation domain range and the geometric surface grid, and realizes non-structural grid partitioning based on a structural grid. The method guides the grid encryption range and the grid encryption size of the non-structural grid by using the fast simulation results of the structural grid, can replace the trial-and-error iterative optimization or the complex dynamic self-adaptive process of the non-structural grid, improves the generation efficiency of the non-structural grid and guarantees the generation quality of the non-structural grid, and the divided non-structural grid can be used for subsequent numerical simulation, can improve the simulation accuracy, especially for complex geometric models, and can balance the calculation efficiency while meeting the high-precision requirement. In addition, the method can generate the non-structural grid, so that the grid does not need to be dynamically adjusted in the subsequent simulation calculation process, avoids the huge reconstruction and cross-process communication overhead caused by the non-structural adaptive grid, and is suitable for large-scale parallel environment. BRIEF DESCRIPTION OF DRAWINGS

[0047] In order to more clearly illustrate the technical solutions in the specific embodiments of the present application or the prior art, the drawings needed to be used in the specific embodiments or prior art description will be briefly introduced. Obviously, the drawings in the following description are some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0048] Figure 1 is a flow chart of a non-structural grid partitioning method based on a structural grid provided by an embodiment of the present application;

[0049] Figure 2 is a local encryption schematic diagram provided by an embodiment of the present application;

[0050] Figure 3 is an encryption area schematic diagram provided by an embodiment of the present application;

[0051] Figure 4 is a simulation result schematic diagram provided by an embodiment of the present application;

[0052] Figure 5 is a structural schematic diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0053] The present application will be further described in detail below with reference to the drawings and embodiments. It can be understood that the specific embodiments described herein are only used to explain the related application, and not to limit the application. In addition, it should be noted that only the parts related to the application are shown in the drawings for ease of description.

[0054] It should be noted that the embodiments in the present application and the features in the embodiments can be combined with each other without conflict. The present application will be described in detail below with reference to the drawings and embodiments.

[0055] Before the non-structural grid partitioning method based on a structural grid provided by an embodiment of the present application is described in detail, the technical problems solved by the method are described.

[0056] In the related art, numerical simulation usually adopts two types of structured and unstructured grids. Among them, structured grid, especially Cartesian grid, has the advantages of simple grid generation, high computational efficiency, regular data structure and convenient parallelism. However, it has obvious defects in dealing with combustion and detonation environment with complex geometric shape, and it is difficult to accurately fit the complex boundary, resulting in insufficient geometric representation accuracy. At the same time, its inherent topological regularity makes it extremely difficult to perform flexible and efficient local grid refinement. Although the resolution can be improved by local nested grid technology or adaptive grid refinement, this method has complex hierarchical encryption logic, and is limited by the topological structure of the grid, making the encryption flexibility insufficient and difficult to dynamically respond to the rapid parameter gradient changes caused by chemical reaction heat release, phase change and other factors in the combustion and detonation process.

[0057] Unstructured grid can accurately represent various complex geometric shapes through tetrahedron, pentahedron, hexahedron, polyhedron and their mixed cells, and can freely refine the local grid in the specific area of interest, so that it can better adapt to the characteristics of the rapid change of combustion and detonation physical quantities in theory. However, its core disadvantage is that the computational efficiency is generally lower than that of the same scale structured grid, mainly due to the irregularity of the data structure and the dispersion of the memory access mode, and the communication overhead is also significantly increased in large-scale parallel computing. Moreover, the division of high-quality unstructured grid depends heavily on human operation, which can take a lot of time, up to several weeks or even months.

[0058] The quality of the computational grid directly determines the accuracy and efficiency of the simulation. For strong transient problems such as combustion and detonation, the change gradient of physical quantities in the space-time dimension is extremely large and quickly migrates, which means that the dynamic demand for grid resolution is wide and changes quickly. The traditional static unstructured grid scheme faces challenges. Global encryption grid will lead to a sharp increase in computational load and huge resource consumption. While using unstructured adaptive grid can dynamically track the change of physical quantities for regional encryption, adaptive grid needs to dynamically adjust the grid density during the simulation calculation of unstructured grid, which involves dynamic grid reconstruction, data interpolation, load rebalancing and complex inter-process communication processes. Especially when solving large-scale engineering problems, it will introduce considerable computational time and communication overhead, which may reduce the computational efficiency by several times, offset the accuracy benefits of encryption, and become a bottleneck restricting the efficiency of practical applications.

[0059] Therefore, the embodiment of the present application provides a structured grid based unstructured grid division method, which can solve the problems that the structured grid is difficult to meet the high-precision requirement in complex geometry and flexibility, and the unstructured grid is difficult to balance the calculation efficiency under the high-precision requirement. The construction of the unstructured grid is guided by the trial calculation of the structured grid, which can avoid the huge calculation overhead of dynamic self-adaption and the huge time cost of repeated division and optimization of the unstructured grid, and realize high-precision and high-efficiency simulation of the leakage, combustion and detonation process.

[0060] As mentioned in the background, in order to solve the problems in the prior art, the present application provides a structured grid based unstructured grid division method. Figure 1 FIG. 1 is a flowchart of a structured grid based unstructured grid division method provided by an embodiment of the present application. Referring to FIG. 1, Figure 1 The structured grid based unstructured grid division method specifically includes the following steps.

[0061] S110, determining a calculation domain range of a combustion and detonation simulation task, and performing surface grid division on a geometric model of the combustion and detonation simulation task to obtain a geometric surface grid.

[0062] The combustion and detonation can be a complex physical and chemical process involving high temperature, high pressure, rapid chemical reaction, etc. in computational fluid dynamics and thermodynamics. The combustion and detonation simulation task can refer to simulation of the combustion and detonation process of combustible materials such as gas and dust.

[0063] The calculation domain range can refer to the geometric boundary of the simulation physical space of the combustion and detonation simulation task, i.e. the space region covered by the combustion and detonation simulation. For example, the calculation domain range can include explosion sources and propagation regions, and the calculation domain range can be defined by a three-dimensional coordinate range. In the embodiment of the present application, the calculation domain range can be determined in combination with the geometric model and the calculation condition of the combustion and detonation simulation task.

[0064] In some embodiments, determining the calculation domain range of the combustion and detonation simulation task includes the following steps.

[0065] Step 11, obtaining calculation condition information and a geometric model of the combustion and detonation simulation task;

[0066] Step 12, determining a leakage simulation range and a combustion simulation range of the combustion and detonation simulation task according to the calculation condition information and the geometric model;

[0067] Step 13, determining the calculation domain range of the combustion and detonation simulation task according to the leakage simulation range and the combustion simulation range.

[0068] The calculation working condition information refers to a physical process and a parameter set in the simulation task, and is used to determine the range of the simulation region. For example, the explosion working condition involves shock wave propagation, and a large calculation domain is required. The steady combustion or diffusion process has a limited range of change, and a smaller simulation region can be used. Therefore, the calculation working condition is an important basis for determining the calculation domain.

[0069] The geometric model can refer to a scene physical model of the combustion and explosion simulation task, and the geometric model defines the shape, size and structural features of each component involved in the combustion and explosion simulation task.

[0070] In step 11, the calculation working condition information set in advance for the combustion and explosion simulation task can be obtained, and a geometric file (such as STP, IGES, etc.) corresponding to the geometric model can be obtained. The geometric file is imported into a pre-processing software (such as Hypermesh, cfmesh, gmsh, etc.) to load the geometric model.

[0071] For example, taking a chemical plant as an object, the geometric model includes buildings, gas tank and pipeline structures, which are used to support numerical simulation of physical processes such as gas leakage, combustion and explosion. The spatial range of the geometric model is a cube with a length (X-axis direction) of 1850m, a width (Y-axis direction) of 1600m and a height (Z-axis direction) of 300m.

[0072] Further, in step 12, the leakage simulation range of the combustion and explosion simulation task can be determined according to the calculation working condition information and the geometric model. The leakage simulation range can include a leakage source area and a diffusion area, so that the leakage simulation range can cover the leakage source and the diffusion area. Furthermore, the combustion simulation range of the combustion and explosion simulation task can be determined according to the calculation working condition information and the geometric model. The combustion simulation range can include a flame area, a turbulent flow influence area and a high pressure gradient area.

[0073] Further, in step 13, the calculation domain range of the combustion and explosion simulation task can be determined according to the leakage simulation range and the combustion simulation range, so that the calculation domain range can cover the leakage simulation range and the combustion simulation range.

[0074] Through the above steps 11-13, the calculation domain of the combustion and explosion simulation can be determined, which facilitates subsequent accurate simulation of the leakage, combustion and other processes of the combustion and explosion simulation.

[0075] In the embodiments of the present application, in addition to determining the calculation domain range, the geometric model of the combustion and explosion simulation task can also be pre-processed, that is, the surface mesh is divided to obtain the geometric surface mesh.

[0076] Specifically, the surface mesh can be divided according to a preselected mesh type (such as a triangular surface mesh or a quadrilateral surface mesh), and a preconfigured mesh base size, a minimum surface size and other parameters.

[0077] For example, the mesh type can be selected as a triangular surface mesh, and the base size of the mesh can be set as 1 m and the minimum mesh size can be set as 0.25 m according to the size of the geometric model, so as to display the model details with high precision at the surface mesh level.

[0078] After the surface mesh is divided, the surface mesh can be checked by using a mesh quality checking tool to check whether the surface mesh includes a penetrating surface, a free edge, a T-shaped edge, and a disconnected mesh point, and finally the overall surface mesh is divided into a connected domain, which is recorded as a geometric representation surface mesh.

[0079] S120, generating a structure mesh based on the geometric representation surface mesh and the calculation domain range, and performing simulation calculation on the structure mesh according to the boundary condition corresponding to the calculation domain range and the structure mesh.

[0080] After obtaining the geometric representation surface mesh, the structure mesh can be divided according to a specific mesh size according to the length, width and height of the geometric representation surface mesh and the calculation domain range. The structure mesh can be understood as a regularly arranged structure unit, such as a rectangle or a hexahedron.

[0081] After the structure mesh is divided, it is considered that there is no fluid inside the closed geometric body, and the fluid simulation is not involved inside the closed geometric body. Therefore, the structure mesh located inside the closed geometric body can be removed to ensure the simulation accuracy of the structure mesh.

[0082] In some embodiments, after the structure mesh is generated based on the geometric representation surface mesh and the calculation domain range, the following steps are further included:

[0083] Step 21, determining a signed distance function value of the structure mesh to the geometric representation surface mesh for each structure mesh, wherein the signed distance function value reflects the position of the structure mesh relative to the geometric representation surface mesh;

[0084] Step 22, determining an isosurface of the geometric representation surface mesh in the calculation domain range according to the signed distance function value corresponding to each structure mesh.

[0085] Step 23, for each structure mesh, emitting a ray from the center of the structure mesh to the isosurface, determining the number of intersection points between the ray and the isosurface, and determining whether the structure mesh is located inside the closed geometric body according to the number of intersection points.

[0086] Step 24, removing the structure mesh located inside the closed geometric body from all the structure meshes.

[0087] In step 21, the signed distance function method can be used to calculate the signed distance function value of each structure grid in the calculation domain range according to the geometric surface mesh, that is, the signed distance from the structure grid to the geometric surface mesh. The signed distance function value can describe whether the structure grid is located inside the geometric surface mesh.

[0088] For example, if the signed distance function value is negative, it means that the structure grid is located inside the geometric surface mesh, if the signed distance function value is positive, it means that the structure grid is located outside the geometric surface mesh, and if the signed distance function value is zero, it means that the structure grid is located on the geometric surface mesh.

[0089] Therefore, in step 22, the isosurface of the geometric surface mesh in the calculation domain range can be determined according to the structure grids with a signed distance function value of zero, and the isosurface is the high-precision fitting of the geometric surface mesh in the calculation domain range.

[0090] Further, in step 23, for each structure grid, a ray can be emitted from the center of the structure grid to the isosurface, and the number of emitted rays can be one or more. After emitting the ray, the number of intersection points between each ray and the isosurface is determined.

[0091] Specifically, if the number of intersection points corresponding to a single ray is odd, it can be determined that the structure grid is inside the closed geometric body, and if the number of intersection points corresponding to a single ray is even, it can be determined that the structure grid is outside the closed geometric body. Further, in step 24, the structure grid located inside the closed geometric body can be removed.

[0092] Through the above steps 21-24, the structure grid located inside the closed geometric body can be removed to avoid fluid simulation calculation inside the closed geometric body, further improving the simulation efficiency and accuracy of the structure grid.

[0093] In addition to dividing the structure grid, the boundary condition corresponding to the structure grid can also be determined. The boundary condition is used to define the behavior of the physical quantity on the boundary in the calculation domain range. For example, the type of boundary can include an inlet boundary, an outlet boundary, a wall boundary, a special boundary, etc., and the boundary condition can refer to the physical quantity condition on the boundary.

[0094] In some embodiments, before performing simulation calculation on the structure grid according to the boundary condition corresponding to the structure grid in the calculation domain range, the method further comprises: determining the boundary condition corresponding to the structure grid;

[0095] The determination of the boundary condition corresponding to the structural grid includes: determining a fixed wall boundary, an outflow boundary and an inflow boundary based on the geometric model; configuring a corresponding velocity inflow boundary condition for the inflow boundary, and configuring a corresponding free boundary condition or non-reflecting boundary condition for the outflow boundary.

[0096] Specifically, the ground of the geometric model can be set as the fixed wall boundary, and the fixed wall boundary is the interface fixed with the fluid; one of the four sides of the geometric model is set as the inflow boundary, and the inflow boundary is the interface through which the fluid enters the calculation domain; and the remaining three sides and the top of the geometric model are set as the outflow boundary, and the outflow boundary is the interface through which the fluid leaves the calculation domain.

[0097] Further, the corresponding boundary condition can be configured for each boundary. For example, the leakage parameters of the leakage port can be set according to the actual situation of the leakage source, including but not limited to flow rate, pressure and other parameters, the inflow boundary is set as the velocity inflow boundary condition for defining the velocity and direction of the external gas entering the system, and the free boundary condition or non-reflecting boundary condition can be set for the outflow boundary to simulate the state of the fluid flowing out freely.

[0098] In the above example, the inflow boundary can be set as the velocity inlet, and the inflow velocity is 10 m / s, and the outflow boundary uses the free condition. This setting can be used to simulate the leakage of high-pressure methane and the combustion and detonation process under actual accident conditions.

[0099] Through the above implementation, the setting of the boundary condition corresponding to the structural grid can be realized, and the authenticity of the simulation calculation is ensured.

[0100] After the structural grid is divided and the corresponding boundary condition is determined, further, the simulation calculation can be performed on the structural grid according to the calculation domain range and the boundary condition corresponding to the structural grid, to realize the simulation trial calculation of the structural grid, so as to guide the generation of the subsequent unstructured grid.

[0101] S130, determining a grid encryption parameter based on the simulation calculation result of the structural grid, and generating an unstructured grid according to the grid encryption parameter, the calculation domain range and the geometric surface grid.

[0102] The grid encryption can be understood as dividing finer grids. The grid encryption parameter can include a grid encryption range and a corresponding grid encryption size. The grid encryption range can be a spatial region that needs to be encrypted, and the grid encryption size can be a scale that needs to be encrypted, i.e. the grid size after encryption.

[0103] In the embodiments of the present application, simulation calculations can be performed on structural grids of different sizes according to the calculation domain range and boundary conditions, simulation calculation results of the structural grids of different sizes are counted, and then the simulation calculation results obtained under the structural grids of different sizes are used to select a grid refinement size from the different sizes, and the grid refinement range is determined according to the physical quantity distribution in different time and different regions.

[0104] In a specific embodiment, the grid refinement parameter includes a grid refinement range and a corresponding grid refinement size, and the grid refinement parameter is determined based on the simulation calculation results of the structural grid, including the following steps:

[0105] Step 31, determining the convergence curves of the key physical quantities under the structural grids of different sizes according to the simulation calculation results under the structural grids of different sizes;

[0106] Step 32, determining the grid refinement size according to the convergence curves of the key physical quantities under the structural grids of different sizes;

[0107] Step 33, determining the physical quantity distribution information in different time and different regions according to the simulation calculation results under the structural grid of the grid refinement size;

[0108] Step 34, determining the grid refinement range based on the physical quantity distribution information in different time and different regions.

[0109] In step 31, simulation calculations can be performed on structural grids of different sizes, and then the convergence curves of the key physical quantities under the structural grids of different sizes are determined according to the simulation calculation results obtained under the structural grids of different sizes. The key physical quantities can be temperature, pressure, density, and other physical quantities related to simulation analysis.

[0110] Further, in step 32, the grid refinement size can be selected from the different sizes according to the convergence curves of the key physical quantities under the different sizes.

[0111] After obtaining the grid refinement size, in step 33, the physical quantity distribution information in different time and the physical quantity distribution information in different regions can be determined according to the simulation calculation results of the structural grid under the grid refinement size, wherein the physical quantity distribution information can describe the distribution of the physical quantity in each region within the calculation domain range.

[0112] Further, in step 34, the grid refinement range can be determined according to the physical quantity distribution information in different time and different regions, for example, the high gradient regions of the density, pressure, temperature, and composition physical quantities can be captured from the physical quantity distribution information, and then the grid refinement range is determined according to the high gradient regions.

[0113] Through the above embodiments, simulation calculation can be carried out on structural grids of different sizes, simulation calculation results of structural grids of different sizes are counted, and then appropriate grid refinement size and grid refinement range are determined, which facilitates subsequent generation of non-structural grids and can ensure the rationality of the generation of non-structural grids.

[0114] In addition to using structural grids of different sizes to carry out simulation calculation respectively, the grid size can be dynamically adjusted according to the gradient of the physical quantity of each region in the calculation domain range during the simulation process, and the minimum grid size of different regions is recorded, so as to obtain the grid refinement range and the grid refinement size.

[0115] In another specific embodiment, the grid refinement parameter includes a grid refinement range and a corresponding grid refinement size, and the grid refinement parameter is determined based on the simulation calculation result of the structural grid, including:

[0116] The grid refinement range and the corresponding grid refinement size are determined according to the minimum grid size of each region recorded in the simulation calculation result, wherein the minimum grid size of each region recorded in the simulation calculation result is determined by the gradient of the key physical quantity in the calculation domain range during the simulation calculation process.

[0117] The gradient of the key physical quantity can be the mass concentration gradient during leakage, the temperature gradient during combustion, the pressure gradient during detonation propagation, etc.

[0118] Specifically, during the simulation calculation process, the grid size of each region can be dynamically adjusted by calculating the gradient of the key physical quantity in each region in the calculation domain range, for example, if the gradient is greater than a preset gradient threshold, the grid size is reduced, and the minimum grid size of each region is recorded in this process.

[0119] Taking the component gradient as an example, the component gradient represents the rate of change of the mass fraction of different components in space, with the unit of % / m. When the concentration gradient in the leakage region is greater than a critical value (threshold value), it indicates that there is an obvious diffusion boundary or interface in the region. In order to accurately analyze the diffusion trajectory and boundary evolution, local grid refinement is needed to improve the spatial resolution of the concentration field. As a preferred, the critical value can be taken as 5% / m.

[0120] Taking the pressure gradient as an example, the pressure gradient represents the rate of change of pressure in space, with the unit of Pa / m. When the pressure gradient in the calculation region is greater than a critical value (threshold value), it indicates that there is a sharp pressure change in the region, and high-resolution grid is needed to capture turbulent motion. In order to accurately capture turbulent motion, local grid refinement is needed. As a preferred, the critical value (threshold value) can be taken as 10 6 Pa / m.

[0121] Further, the minimum grid size of each recorded area can be determined as the grid encryption size corresponding to each grid encryption range, to realize dynamic encryption of local grids.

[0122] For example, the initial basic grid unit size is 8 m, and finer local grids are arranged around key areas such as tank areas, pipeline dense areas, and reaction devices, with an initial unit size of 1 m. By calculating the gradients of key physical quantities in the calculation domain range, such as the mass concentration gradient when leaking, the temperature gradient when burning, the pressure gradient when detonation propagates, and the like, higher resolution grids are used in related areas to realize automatic dynamic encryption of local grids, and the minimum unit size after encryption can reach 0.25 m, while recording the minimum grid size of different areas.

[0123] Figure 2 is a local encryption schematic diagram provided by an embodiment of the present application, as shown in Figure 2 In the grid area, the leakage diffusion area (M1 area) near the leakage source, the combustion flame and the high-intensity turbulence area (M2 area) need to be locally encrypted to different degrees to form multi-level grid division.

[0124] Figure 3 is a local encryption schematic diagram provided by an embodiment of the present application, as shown in Figure 3 As used in the above chemical plant example, encryption area 1 and encryption area 2 are two grid encryption ranges, and encryption area 1 and encryption area 2 can use different grid encryption sizes. In order to capture the simulation details of leakage, combustion, and detonation in detail, the range of the encryption area is determined according to the calculation results of the structural grid: the spatial range of encryption area 1 is a cube with a length (X-axis direction), a width (Y-axis direction), and a height (Z-axis direction) of 340 m, 270 m, and 65 m, and the grid size in encryption area 1 is 0.25 m. The spatial range of encryption area 2 is a cube with a length (X-axis direction), a width (Y-axis direction), and a height (Z-axis direction) of 590 m, 380 m, and 210 m, and the grid size in encryption area 2 is 2 m.

[0125] Through the above embodiments, automatic dynamic encryption of local grids can be realized, and the method can record the minimum grid size of different areas during simulation, thereby improving the determination efficiency of grid encryption parameters.

[0126] After obtaining the grid encryption parameters, the non-structural grid can be divided by the grid encryption parameters, the calculation domain range, and the grid of the geometric surface representation. The non-structural grid includes but is not limited to tetrahedron, pentahedron, hexahedron, and polyhedron, and the non-structural grid can accurately represent the details of the geometric model.

[0127] In some embodiments, the grid encryption parameters include grid encryption ranges and corresponding grid encryption sizes, and the unstructured grid is generated according to the grid encryption parameters, the calculation domain range and the geometric representation surface grid, including:

[0128] Based on the geometric representation surface grid and the calculation domain range, a volume grid is generated; for each grid encryption range, the volume grid located in the grid encryption range is locally grid-encrypted according to the corresponding grid encryption size, to obtain the unstructured grid.

[0129] Specifically, the volume grid can be first divided according to the geometric representation surface grid and the calculation domain range, and then for each grid encryption range in the calculation domain range, the volume grid is locally grid-encrypted by using the corresponding grid encryption size, to obtain the unstructured grid.

[0130] After obtaining the unstructured grid, the boundary conditions corresponding to the unstructured grid can also be constructed. For example, after the local encryption grid is completed, the corresponding boundary conditions are set according to the physical problem characteristics, the ground in the geometric model is set as a solid wall boundary, the top is set as an outflow boundary, one side of the four sides is set as an inflow boundary, and the remaining three sides are set as outflow boundaries. The inflow boundary is set as a velocity inlet, and the incoming flow velocity is 10 m / s; the outflow boundary uses a free condition.

[0131] Compared with the real-time grid reconstruction, encryption and decryption and data interpolation of the Cartesian adaptive grid or the non-structured adaptive grid in the prior art in the solving process, the prior art introduces huge calculation and communication overhead, which seriously restricts the computing efficiency, especially in large-scale parallel computing. In the embodiments of the present application, the key physical regions are estimated by one-time, low-cost structured grid trial calculation, which replaces the high-cost dynamic adaptive process, so that the topology of the final unstructured grid remains unchanged in the whole main calculation process, avoids the performance bottleneck caused by dynamic adjustment, and thus greatly shortens the calculation period and reduces the demand for computing resources.

[0132] Moreover, the local encryption of the traditional unstructured grid often depends on experience, which may lead to insufficient encryption or over-encryption. In the embodiments of the present application, the advantage of fast calculation of the structured grid is used for pre-trial calculation, which can quickly capture the key regions of physical quantities such as combustion or detonation wave fronts, shock waves and high-gradient flow fields. Based on the trial calculation results, the accurate spatial range and necessary grid size required for subsequent unstructured grid encryption can be quantitatively determined, to realize "encryption on demand". This not only avoids the waste of resources caused by blind global encryption, but also ensures sufficient resolution in the key physical phenomenon region, so as to obtain a high-fidelity simulation result.

[0133] In addition, the traditional adaptive mesh refinement causes load imbalance in parallel computing due to dynamic reconstruction of the mesh, and especially the unstructured adaptive mesh refinement needs frequent repartitioning, which aggravates the communication delay. In the embodiments of the present application, the encryption area is predicted through the structured mesh, and a hierarchical encrypted unstructured static mesh is constructed in advance to ensure that the optimized partitioning can be completed before the calculation. This "a priori encryption" makes the calculation amount of each process evenly distributed, reduces the parallel communication time, and is especially suitable for parallel computing scenarios of ten-kernel level or even larger scale, solving the problem of sudden drop in parallel efficiency of the combustion detonation problem. The unstructured mesh generation method provided in the embodiments of the present application does not need to rely on complex data structures or repartitioning algorithms, and can be implemented only by using a regular mesh generation tool, is compatible with the mainstream CFD solver architecture, and the technical principle can be extended to three-dimensional multi-physical field coupling problems (such as thermal radiation coupling, fluid-solid coupling detonation propagation), and provides a general technical path for fine simulation of engineering scenarios such as aircraft engine combustion chambers and complex charge structures, reduces the hardware requirements of large-scale simulation under the premise of ensuring engineering reliability, and has a wide application prospect.

[0134] The unstructured mesh partitioning method based on the structured mesh provided in the embodiments of the present application determines the calculation domain range of the combustion detonation simulation task, performs surface mesh partitioning on the geometric model of the combustion detonation simulation task to obtain a geometric characterization surface mesh, then generates a structured mesh according to the geometric characterization surface mesh and the calculation domain range, performs simulation calculation on the structured mesh according to the boundary conditions corresponding to the calculation domain range and the structured mesh, determines the mesh refinement parameters through the simulation calculation result of the structured mesh, and generates an unstructured mesh through the mesh refinement parameters, the calculation domain range and the geometric characterization surface mesh, so as to realize the unstructured mesh partitioning based on the structured mesh. The method guides the mesh refinement range and the mesh refinement size of the unstructured mesh through the rapid simulation result of the structured mesh, can replace the trial-and-error iterative optimization or the complex dynamic adaptive process of the unstructured mesh, improves the generation efficiency of the unstructured mesh and guarantees the generation quality of the unstructured mesh, the partitioned unstructured mesh can be used for subsequent numerical simulation, can improve the simulation accuracy, especially for complex geometric models, and can balance the calculation efficiency while meeting the high-precision requirement. In addition, the method can partition the unstructured mesh, so that the subsequent simulation calculation process does not need to dynamically adjust the mesh, avoids the huge reconstruction and cross-process communication overhead caused by the unstructured adaptive mesh, and is suitable for large-scale parallel environment.

[0135] In the embodiments of the present application, the obtained unstructured grid is used for final formal simulation calculation, and the unstructured grid is static and unchangeable, the number of cells, grid size and spatial distribution of which are known. Before subsequent numerical simulation calculation, the static unstructured grid can be divided by an efficient region segmentation algorithm once and optimally to realize accurate initial load balancing. Compared with the dynamic load rebalancing in the dynamic adaptive method which is costly and runs through the whole calculation process, the static optimization strategy of the present application can greatly improve the efficiency and scalability of parallel calculation.

[0136] The region segmentation algorithm can adopt a graph segmentation method, a Z-sequence curve method, a Hilbert curve method, etc. to divide a plurality of parallel subdomains for parallel calculation.

[0137] In some embodiments, after generating the unstructured grid according to the grid encryption parameters, the calculation domain range and the geometric surface grid, the following steps are further included:

[0138] Step 41: dividing the calculation domain range into a plurality of parallel subdomains based on the position and number of the unstructured grid;

[0139] Step 42: distributing the unstructured grid in each parallel subdomain to different nodes for parallel simulation calculation.

[0140] In step 41, the calculation domain range can be divided into a plurality of parallel subdomains according to the position and number of the unstructured grid.

[0141] Further, in step 42, the unstructured grid in each parallel subdomain can be distributed to different nodes, and then each node performs simulation calculation on the distributed unstructured grid in the parallel subdomain, realizing parallel simulation of multiple nodes. The node can be a CPU core.

[0142] By constructing a hierarchical encryption static unstructured grid, it is ensured that the optimization partitioning can be completed before calculation, and by dividing the parallel subdomains of the unstructured grid, the calculation amount of each process can be evenly distributed, the parallel communication time consumption is reduced, and it is especially suitable for parallel computing scenarios of ten-kernel level or even larger scale, solving the problem of sudden drop of parallel efficiency of combustion detonation.

[0143] In the above process, the Morton curve (also known as Z-sequence curve) method can be used to divide each parallel subdomain. The Morton curve method can interleave the binary representation of the coordinates of each point (Interleave Bits) to generate a unique single Morton code with spatial locality.

[0144] In a specific embodiment, the computational domain range is divided into a plurality of parallel sub-domains based on the positions and the number of unstructured meshes, comprising the following steps:

[0145] Step 411, determining the geometric center coordinates of each unstructured mesh based on the position of each unstructured mesh, and normalizing each geometric center coordinate;

[0146] Step 412, determining the position code corresponding to each normalized geometric center coordinate, and sorting all position codes;

[0147] Step 413, determining the average mesh number and the remaining mesh number based on the number of unstructured meshes and the preset sub-domain number;

[0148] Step 414, dividing each code in the code sorting list according to the average mesh number and the remaining mesh number to determine the unstructured meshes contained in each parallel sub-domain.

[0149] In step 411, the coordinates of the geometric centers of the unstructured meshes can be used to convert the problem from "cells" to "points" according to the positions of the unstructured meshes in the computational domain range. And all geometric center coordinates are normalized to standardize the range of geometric center coordinates, facilitating unified code calculation.

[0150] For example, all floating-point coordinates of the geometric center coordinates can be mapped to a sufficiently large three-dimensional integer grid to achieve normalization. For example, first, all geometric center coordinates can be traversed to find the maximum coordinate and the minimum coordinate in all geometric center coordinates of the unstructured meshes, and the variation scales in each direction (X direction, Y direction, Z direction) are determined by the maximum coordinate, the minimum coordinate, and a predetermined maximum integer value, as shown in the following formula:

[0151] ;

[0152] ;

[0153] ;

[0154] In the formula, is a predetermined maximum integer value used to normalize each geometric center coordinate to the [0, (2 L -1)] integer interval; is the maximum coordinate, is the minimum coordinate, , , are the variation scales in the X direction, the Y direction, and the Z direction, respectively;

[0155] After obtaining the variation scales in each direction, for each geometric center coordinate, the geometric center coordinate can be converted according to the variation scales in each direction to obtain a normalized geometric center coordinate. The following formula is shown as follows:

[0156] ;

[0157] ;

[0158] ;

[0159] In the formula, is the geometric center coordinate before normalization, is the normalized geometric center coordinate, represents the floor operation.

[0160] After normalizing all the geometric center coordinates of the unstructured grid, further, in step 412, the position code corresponding to each normalized geometric center coordinate can be calculated. For example, if the normalized geometric center coordinate is an integer coordinate, the normalized geometric center coordinate can be encoded into a one-dimensional Morton code (usually a 64-bit unsigned integer) through bit interleaving.

[0161] After encoding all the geometric center coordinates, all the position codes can be sorted. For example, quicksort, merge sort or radix sort can be used for sorting, and the sorting rule can be ascending or descending.

[0162] Further, in step 413, the average grid size and the remaining grid size can be calculated according to the number of unstructured grids and the preset number of subdomains. The preset number of subdomains is the number of parallel subdomains, i.e. the number of corresponding nodes; the average grid size is the number of unstructured grids divided by each parallel region; and the remaining grid size is the number of unstructured grids that are in excess of the average grid size.

[0163] For example, if the number of unstructured grids is N and the preset number of subdomains is P, then the average grid size base_size = N / P and the remaining grid size remainder = N % P.

[0164] Further, in step 414, each coding in the coding ordering list can be divided into different parallel sub-domains (i.e., partitions) according to the average grid number and the remaining grid number. For example, in the first remainder partitions, each partition obtains base_size+1 unstructured grids, and in the last P - remainder partitions, each partition obtains base_size unstructured grids.

[0165] Through the above embodiment, the number of unstructured grids in each parallel sub-domain can be similar (at most 1 difference), precise load balancing is achieved, the change of calculation density caused by local encryption of grids is effectively adapted, and thus the overall simulation efficiency and parallel scalability can be improved.

[0166] After dividing the parallel sub-domains, the simulation implementation phase of the unstructured grid can be entered, in which numerical simulation of the whole process of leakage, combustion and detonation is carried out, high-quality grid division and optimized allocation of computing resources are relied on, and efficient and accurate simulation results are achieved.

[0167] Using the above chemical plant example, the Morton curve region division algorithm can be used, based on the number and distribution of unstructured grids, the entire calculation domain range is divided into 10,000 parallel sub-domains, which are allocated to 10,000 CPU cores for high-performance parallel computing to achieve load balancing. Moreover, the simulation time can be set to 55s, and the time advancement is about 6.92 million steps. Figure 4 A simulation result diagram provided by the embodiment of the present application is shown in Figure 4 As shown, the simulation results of the unstructured grid are shown.

[0168] The unstructured grid division method based on the structured grid provided by the embodiment of the present application mainly includes the following technical effects:

[0169] 1. The structured grid pre-verification guides the unstructured grid division, and improves the unstructured quality

[0170] The fast generated and calculated structured grid trial results (such as critical physical feature gradient distribution, pressure / temperature change region) are used to quantitatively determine the spatial scale characteristics and propagation range of the key physical region, and accordingly accurately guide the subsequent local encryption range and size target of the unstructured grid in different geometric sub-regions. This step combines the calculation efficiency of the structured grid and the design flexibility of the unstructured grid, replacing the trial-and-error iterative optimization or expensive dynamic adaptive process of the unstructured grid.

[0171] 2. Grid differential encryption based on combustion and detonation physical requirements

[0172] A multi-scale modeling method is used, a larger grid size is used in a non-core area, and a smaller high-resolution grid size is used in a detail area, to realize multi-scale simulation. According to the characteristics of different physical phenomena, the grid size is optimized to ensure the accuracy and efficiency of the simulation calculation. The traditional method of "global unified encryption" or "run-time adaptive" is abandoned, and based on the quantitative guidance provided by the pre-validation, only in the physical process of the structure grid pre-judgment of the intense area, the pre-set and partitioned local encryption is implemented. This on-demand encryption strategy greatly reduces the number of invalid grid cells, significantly alleviates the inherent computational efficiency disadvantage of unstructured grid, and optimizes the allocation of computing resources. For example, the leakage process encrypts the grid in the high concentration gradient area to ensure the accuracy of the combustible gas diffusion trajectory, and uses a coarser grid in the area away from the leakage source to optimize the computing resources. The combustion process combines the turbulent kinetic energy and the turbulent intensity to locally encrypt the high-turbulence area.

[0173] 3. Avoiding dynamic adaptive communication load, realizing pre-load balancing of multi-scale grid

[0174] Since all encryption areas, sizes and rules are pre-defined based on the pre-validation results before calculation, the entire calculation process does not require any run-time grid dynamic adjustment operation (such as cell cutting or merging, parent-child relationship reconstruction, data interpolation migration), avoiding the huge reconstruction and cross-process data communication overhead generated by the unstructured adaptive grid (which is the main efficiency bottleneck of dynamic adaptation in the supercomputer scene), and is particularly suitable for large-scale parallel environment.

[0175] In the parallel partitioning stage, according to the pre-accurately planned encryption intensity difference of each partition (the grid density difference of different areas is significant), the partition load weight can be accurately adjusted (for example, more processes are allocated to the high-density grid area), to avoid the parallel load imbalance problem caused by uneven density in advance, and to fully exert the efficiency of the computing resources.

[0176] Figure 5 FIG. 1 is a structural schematic diagram of an electronic device provided by an embodiment of the present application. As shown in FIG. 1, the electronic device 400 includes one or more processors 401 and a memory 402. Figure 5

[0177] The processor 401 can be a central processing unit (CPU) or other forms of processing units with data processing and / or instruction execution capabilities, and can control other components in the electronic device 400 to perform desired functions.

[0178] ​The memory 402 can include one or more computer program products that can include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory, for example, can include random access memory (RAM), and / or a cache, and / or the like. The non-volatile memory, for example, can include read-only memory (ROM), hard disk, flash memory, and / or the like. The computer-readable storage media can store one or more computer program instructions executable by the processor 401 to implement the method of partitioning a non-structured grid based on a structured grid according to any embodiments of the present application and / or other desired functions. Various contents such as initial extrinsic parameters, threshold values, and / or the like can also be stored in the computer-readable storage media.

[0179] In one example, the electronic device 400 can further include an input device 403 and an output device 404, which are interconnected through a bus system and / or other forms of connection mechanisms (not shown). The input device 403 can include, for example, a keyboard, a mouse, and / or the like. The output device 404 can output various information to the outside, including pre-warning prompt information, braking force, and / or the like. The output device 404 can include, for example, a display, a speaker, a printer, a communication network and a remote output device connected thereto, and / or the like.

[0180] Of course, in order to simplify, Figure 5 Only some of the components of the electronic device 400 related to the present application are shown in the figure, and components such as buses, input / output interfaces, and / or the like are omitted. In addition, the electronic device 400 can include any other appropriate components according to specific application cases.

[0181] In addition to the above-mentioned methods and devices, embodiments of the present application can also be computer program products including computer program instructions that, when executed by a processor, cause the processor to perform the steps of the method of partitioning a non-structured grid based on a structured grid according to any embodiments of the present application.

[0182] The computer program product can be written in any combination of one or more programming languages, including an object-oriented programming language such as Java, C++, and / or the like, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device or entirely on the remote computing device or server.

[0183] In addition, an embodiment of the present application can also be a computer readable storage medium, having stored thereon computer program instructions which, when executed by a processor, enable the processor to carry out the steps of the method for structured grid based unstructured grid partitioning according to any of the embodiments of the present application.

[0184] The computer readable storage medium can be any combination of one or more computer readable media. The computer readable medium can be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the above. More specific examples (a non-exhaustive list) of the computer readable storage medium include an electrical connection having one or more wires, a portable disc, 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 above.

[0185] It should be noted that the terms used in the present application are only for describing specific embodiments and are not intended to limit the scope of the present application. As shown in the specification and claims of the present application, unless the context clearly indicates otherwise, the terms "one", "a", "an", and / or "the" do not specifically refer to the singular, but can also include the plural. The terms "include", "contain" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method or device. Without more limitations, the element defined by the statement "including a" does not exclude the presence of additional identical elements in the process, method or device including the element.

[0186] It should also be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", and the like indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the devices or elements referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as limiting the present application. Unless otherwise explicitly specified and limited, the terms "mount", "connect", "connect" and the like should be broadly understood, for example, it can be a fixed connection, or a detachable connection, or an integral connection; it can be a mechanical connection, or an electrical connection; it can be a direct connection, or an indirect connection through an intermediate medium, or a communication between two elements. For those skilled in the art, the specific meaning of the above terms in the present application can be understood according to the specific circumstances.

[0187] The principles and implementation manners of the present application are described herein by using specific examples, and the above example descriptions are only used to help understand the method of the present application and its core idea. The above descriptions are only preferred embodiments of the present application, and it should be pointed out that, due to the limited nature of the language expression, there are objectively infinite specific structures, and for ordinary skilled persons in the technical field, some improvements, refinements or changes can be made without departing from the principles of the present application, or the above technical features can be combined in an appropriate manner; these improvements, refinements, changes or combinations, or the application of the inventive concept and technical solution to other occasions without improvement, shall be regarded as the protection scope of the present application.

Claims

1. A method for unstructured mesh generation based on structured meshes, characterized in that, include: The computational domain of the combustion-detonation simulation task is determined, and the geometric model of the combustion-detonation simulation task is meshed to obtain the geometric representation mesh. A structural mesh is generated based on the geometric representation surface mesh and the computational domain range; For each structural mesh, a signed distance function value is determined from the structural mesh to the geometric representation surface mesh, wherein the signed distance function value reflects the position of the structural mesh relative to the geometric representation surface mesh; Based on the symbolic distance function value corresponding to each of the structural meshes, determine the isosurface of the geometric representation surface mesh within the computational domain; For each structural mesh, a ray is emitted from the center of the structural mesh toward the isosurface. The number of intersections between the ray and the isosurface is determined, and the number of intersections is used to determine whether the structural mesh is located inside a closed geometry. Remove the structural meshes located inside closed geometries from all structural meshes; The structural mesh is simulated based on the boundary conditions corresponding to the computational domain range and the structural mesh. Based on the simulation results of the structured mesh, the mesh refinement parameters are determined, and an unstructured mesh is generated according to the mesh refinement parameters, the computational domain range, and the geometric representation surface mesh.

2. The method according to claim 1, characterized in that, Before performing simulation calculations on the structural mesh based on the computational domain range and the boundary conditions corresponding to the structural mesh, the process further includes: Determine the boundary conditions corresponding to the structure mesh; Determining the boundary conditions corresponding to the structural mesh includes: Based on the geometric model, the fixed wall boundary, outflow boundary, and inflow boundary are determined. Configure corresponding velocity inflow boundary conditions for the inflow boundary, and configure corresponding free boundary conditions or non-reflection boundary conditions for the outflow boundary.

3. The method according to claim 1, characterized in that, The mesh encryption parameters include the mesh encryption range and the corresponding mesh encryption size. The mesh encryption parameters are determined based on the simulation calculation results of the structured mesh, including: Based on the simulation results under structural meshes of different sizes, the convergence curves corresponding to the key physical quantities under structural meshes of each size are determined. The mesh refinement size is determined based on the convergence curves corresponding to the key physical quantities under each size of the structural mesh. Based on the simulation results under the structured grid with the specified grid density, the distribution information of physical quantities at different times and in different regions is determined; The grid densification range is determined based on the distribution information of physical quantities at different times and in different regions.

4. The method according to claim 1, characterized in that, The mesh encryption parameters include the mesh encryption range and the corresponding mesh encryption size. The mesh encryption parameters are determined based on the simulation calculation results of the structured mesh, including: Based on the minimum mesh size recorded in the simulation calculation results for each region, determine the mesh refinement range and the corresponding mesh refinement size; The minimum grid size recorded in the simulation results for each region is determined by the gradient of key physical quantities within the computational domain during the simulation process.

5. The method according to claim 1, characterized in that, The mesh refinement parameters include the mesh refinement range and the corresponding mesh refinement size. Generating an unstructured mesh based on the mesh refinement parameters, the computational domain range, and the geometric representation surface mesh includes: A volume mesh is generated based on the geometric representation surface mesh and the computational domain range; For each of the aforementioned mesh encryption ranges, local mesh encryption is performed on the volume mesh located within the mesh encryption range according to the corresponding mesh encryption size to obtain an unstructured mesh.

6. The method according to claim 1, characterized in that, After generating an unstructured mesh based on the mesh refinement parameters, the computational domain range, and the geometric representation surface mesh, the process further includes: Based on the location and quantity of the unstructured mesh, the computational domain is divided into multiple parallel subdomains; The unstructured meshes in each parallel subdomain are assigned to different nodes for parallel simulation calculations.

7. The method according to claim 6, characterized in that, Based on the location and quantity of the unstructured mesh, the computational domain is divided into multiple parallel subdomains, including: The geometric center coordinates of each unstructured grid are determined based on the location of each unstructured grid, and the geometric center coordinates are normalized. Determine the position codes corresponding to the normalized coordinates of each geometric center, and sort all position codes; Based on the number of unstructured grids and the number of preset subdomains, determine the average number of grids and the number of remaining grids; Based on the average number of grids and the remaining number of grids, each code in the coding sorting list is segmented to determine the unstructured grids contained in each parallel subdomain.

8. The method according to claim 1, characterized in that, Determine the computational domain of the combustion-detonation simulation task, including: Obtain the computational operating conditions and geometric model of the combustion detonation simulation task; Based on the calculated operating conditions and geometric model, the leakage simulation range and combustion simulation range of the combustion detonation simulation task are determined. The computational domain of the combustion detonation simulation task is determined based on the leakage simulation range and the combustion simulation range.

9. An electronic device, characterized in that, The electronic device includes: Processor and memory; The processor executes the steps of the unstructured mesh generation method based on structured mesh as described in any one of claims 1 to 8 by calling the program or instructions stored in the memory.

Citation Information

Patent Citations

  • Simulation analysis method and device for launching pad flow guide model and computing equipment

    CN116611370A

  • Gas-phase combustion explosion parallel numerical calculation method based on adaptive grid technology

    CN118395903A

  • Probe card simulation method and system based on counter-acting force analysis

    CN119647209A

  • Super-large-scale high-expandability grid generation method and device and storage medium

    CN119885694A