Unstructured grid division method based on structured grid and electronic equipment
Through the unstructured grid division method based on structured grid, the problem of insufficient accuracy of structured grid on complex geometry is solved, and efficient and accurate unstructured grid generation is achieved. It is suitable for combustion and detonation simulation of complex geometric models and improves calculation efficiency and accuracy.
Patent Information
- Application Number
- CN202511158710.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-19
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2045-08-19
AI Technical Summary
In the existing technology, structured grids are difficult to meet high-precision requirements on complex geometries, while unstructured grids are difficult to balance computational efficiency under high-precision requirements, especially consuming time and resources during the dynamic adaptation process.
Through the unstructured grid division method based on structured grid, the calculation domain range and geometric model are first determined to perform surface grid division and generate structured grid. The grid encryption parameters are determined through simulation calculation results to generate unstructured grid, avoiding the dynamic adaptive process and improving the generation efficiency and quality.
It achieves high-precision simulation on complex geometric models, balances computational efficiency, reduces computational overhead caused by dynamic mesh adjustment, and is suitable for large-scale parallel environments.
Smart Images

Figure CN120726262A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of numerical simulation technology, and in particular to a structured grid-based unstructured grid division method and electronic equipment. Background Art
[0002] The combustion and detonation processes of combustible materials such as gases and dust involve extremely complex physical processes that couple chemical reactions, fluid dynamics, and thermodynamics. These processes are widely encountered in key fields such as aerospace propulsion systems and industrial safety assessments. Numerical simulation is an important tool for studying these problems. In numerical simulations, the choice of computational grid is crucial to simulation efficiency and accuracy.
[0003] Currently, two main types of grid technologies are used: structured grids and unstructured grids. Structured grids struggle to meet high-precision requirements with complex geometries and flexibility, while unstructured grids struggle to balance computational efficiency with high-precision requirements, especially due to the additional overhead of the dynamic adaptive process and the time cost of grid division. Summary of the Invention
[0004] In view of the above-mentioned defects or deficiencies in the prior art, the present application aims to provide an unstructured grid division method and electronic device based on a structured grid to solve the problems of insufficient numerical simulation accuracy, low efficiency and high time cost in the related technology.
[0005] The present invention provides a method for partitioning an unstructured grid based on a structured grid, the method comprising:
[0006] Determining a computational domain range of a combustion and detonation simulation task, and performing surface meshing on a geometric model of the combustion and detonation simulation task to obtain a geometric representation surface mesh;
[0007] generating a structural grid based on the geometric representation surface grid and the computational domain, and performing simulation calculations on the structural grid according to boundary conditions corresponding to the computational domain and the structural grid;
[0008] A mesh encryption parameter is determined based on the simulation calculation result of the structured mesh, and an unstructured mesh is generated according to the mesh encryption parameter, the calculation domain range and the geometric representation surface mesh.
[0009] Optionally, after generating a structural grid based on the geometric representation surface grid and the computational domain range, the method further includes:
[0010] For each structural grid, determining a signed distance function value from the structural grid to the geometric representation surface grid, wherein the signed distance function value reflects a position of the structural grid relative to the geometric representation surface grid;
[0011] Determining the isosurface of the geometric representation surface grid within the calculation domain according to the signed distance function value corresponding to each of the structural grids;
[0012] For each structured grid, emitting a ray from the center of the structured grid to the isosurface, determining the number of intersections between the ray and the isosurface, and judging whether the structured grid is located inside a closed geometric body according to the number of intersections;
[0013] From all structured meshes, remove those located inside closed geometry.
[0014] Optionally, before performing simulation calculation on the structured grid according to the boundary conditions corresponding to the calculation domain range and the structured grid, the method further includes:
[0015] Determining boundary conditions corresponding to the structural grid;
[0016] Determining the boundary conditions corresponding to the structural grid includes:
[0017] determining a fixed wall boundary, an outflow boundary, and an inflow boundary based on the geometric model;
[0018] A corresponding velocity inflow boundary condition is configured for the inflow boundary, and a corresponding free boundary condition or a non-reflection boundary condition is configured for the outflow boundary.
[0019] Optionally, the mesh encryption parameters include a mesh encryption range and a corresponding mesh encryption size, and determining the mesh encryption parameters based on the simulation calculation results of the structural mesh includes:
[0020] According to the simulation results under structural grids of different sizes, the convergence curves corresponding to the key physical quantities under structural grids of different sizes are determined;
[0021] Determine the mesh refinement size based on the convergence curves corresponding to key physical quantities under structural meshes of various sizes;
[0022] Determining physical quantity distribution information at different times and in different regions based on simulation calculation results under the structural grid of the grid refinement size;
[0023] The grid refinement range is determined based on the physical quantity distribution information at different times and in different regions.
[0024] Optionally, the mesh encryption parameters include a mesh encryption range and a corresponding mesh encryption size, and determining the mesh encryption parameters based on the simulation calculation results of the structural mesh includes:
[0025] Determining a mesh refinement range and a corresponding mesh refinement size based on the minimum mesh size in each region recorded in the simulation calculation results;
[0026] The minimum grid size in each region recorded in the simulation calculation results is determined by the gradient of key physical quantities within the calculation domain during the simulation calculation process.
[0027] Optionally, the mesh refinement parameters include a mesh refinement range and a corresponding mesh refinement size, and generating an unstructured mesh according to the mesh refinement parameters, the computational domain range, and the geometric representation surface mesh includes:
[0028] Generating a volume mesh based on the geometric representation surface mesh and the computational domain range;
[0029] For each mesh encryption range, local mesh encryption is performed on the volume mesh within the mesh encryption range according to the corresponding mesh encryption size to obtain an unstructured mesh.
[0030] Optionally, after generating an unstructured grid according to the grid refinement parameter, the computational domain range, and the geometric representation surface grid, the method further includes:
[0031] Based on the position and number of the unstructured grids, the computational domain is divided into a plurality of parallel subdomains;
[0032] The unstructured grids in each parallel subdomain are assigned to different nodes for parallel simulation calculations.
[0033] Optionally, based on the position and number of the unstructured grids, the computational domain is divided into multiple parallel subdomains, including:
[0034] Determine the geometric center coordinates of each unstructured grid based on the position of each unstructured grid, and normalize each geometric center coordinate;
[0035] Determine the position codes corresponding to the normalized geometric center coordinates and sort all the position codes;
[0036] Determining an average number of grids and a remaining number of grids based on the number of unstructured grids and the number of preset subdomains;
[0037] Each code in the code sorting list is segmented according to the average number of grids and the remaining number of grids to determine the unstructured grids included in each parallel sub-domain.
[0038] Optionally, determine the computational domain scope for the combustion and detonation simulation task, including:
[0039] Obtaining calculation condition information and geometric model of the combustion and detonation simulation task;
[0040] determining a leakage simulation range and a combustion simulation range of the combustion and detonation simulation task according to the calculation operating condition information and the geometric model;
[0041] The calculation domain range of the combustion and detonation simulation task is determined according to the leakage simulation range and the combustion simulation range.
[0042] An embodiment of the present application further provides an electronic device, comprising:
[0043] processor and memory;
[0044] The processor is configured to execute the steps of the structured grid-based unstructured grid division method provided in any embodiment of the present application by calling the program or instruction stored in the memory.
[0045] An embodiment of the present application also provides a computer-readable storage medium, which stores a program or instruction, and the program or instruction enables a computer to execute the steps of the unstructured grid division method based on the structured grid provided in any embodiment of the present application.
[0046] In summary, the present application proposes a non-structured grid division method based on structured grid, which determines the calculation domain range of the combustion and detonation simulation task, and performs surface grid division on the geometric model of the combustion and detonation simulation task to obtain a geometric representation surface grid, and then generates a structured grid according to the geometric representation surface grid and the calculation domain range, and performs simulation calculation on the structured grid according to the boundary conditions corresponding to the calculation domain range and the structured grid, and determines the grid encryption parameters through the simulation calculation results of the structured grid, thereby generating a non-structured grid through the grid encryption parameters, the calculation domain range and the geometric representation surface grid, and realizing non-structured grid division based on structured grid. The fast simulation results guide the mesh encryption range and mesh encryption size of the unstructured grid, which can replace the trial-and-error iterative optimization or complex dynamic adaptive process of the unstructured grid, improve the generation efficiency of the unstructured grid and ensure the generation quality of the unstructured grid. The divided unstructured grid can be used for subsequent numerical simulations, which can improve the simulation accuracy, especially for complex geometric models, and can also balance the computational efficiency while meeting high-precision requirements. In addition, by dividing the unstructured grid, this method can eliminate the need to dynamically adjust the grid during subsequent simulation calculations, avoiding the huge reconstruction and cross-process communication overhead caused by the unstructured adaptive grid, and is suitable for large-scale parallel environments. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the specific implementation methods of the present application or the technical solutions in the prior art, the following is a brief introduction to the drawings required for use in the specific implementation methods or the description of the prior art. Obviously, the drawings described below are some implementation methods of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0048] Figure 1 This is a flow chart of a method for partitioning an unstructured grid based on a structured grid provided in an embodiment of the present application;
[0049] Figure 2 This is a schematic diagram of local encryption provided by an embodiment of the present application;
[0050] Figure 3 This is a schematic diagram of an encryption area provided in an embodiment of the present application;
[0051] Figure 4 A schematic diagram of a simulation result provided in an embodiment of the present application;
[0052] Figure 5 This is a structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0053] The present application will be further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are merely for the purpose of explaining the relevant invention and are not intended to limit the invention. It should also be noted that, for ease of description, only portions relevant to the invention are shown in the accompanying drawings.
[0054] It should be noted that, in the absence of conflict, the embodiments and features of the embodiments in this application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0055] Before introducing in detail the unstructured grid division method based on the structured grid provided in the embodiment of the present application, the technical problem solved by the method is first explained.
[0056] In related technologies, numerical simulations usually use two types of grids: structured grids and unstructured grids. Among them, structured grids, especially Cartesian grids, have the advantages of simple grid generation, high computational efficiency, and regular data structure that facilitates parallel processing. However, they have obvious defects when dealing with combustion and detonation environments with complex geometric shapes. It is difficult to accurately fit complex boundaries, resulting in insufficient geometric representation accuracy. At the same time, their inherent topological regularity makes it extremely difficult to perform flexible and efficient local grid encryption. Although the resolution can be improved through local nested grid technology or adaptive grid encryption, the hierarchical encryption logic of this method is complex and is limited by the topological structure of the grid, making the encryption insufficiently flexible and difficult to dynamically respond to drastic parameter gradient changes caused by chemical reaction heat release, phase change, etc. during the combustion and detonation process.
[0057] Unstructured grids, using a variety of unit cell types—tetrahedrons, pentahedrons, hexahedrons, polyhedrons, and hybrids—can flexibly and accurately represent a wide range of complex geometries. They can also freely perform localized encryption in specific areas of interest, theoretically better adapting to the drastic variations in combustion and detonation quantities. However, their core disadvantage is that computational efficiency is generally lower than that of structured grids of the same scale, primarily due to the irregularity of the data structure and the distributed nature of memory access patterns. Communication overhead also increases significantly when performing large-scale parallel computations. Furthermore, the generation of high-quality unstructured grids relies heavily on manual labor, which is time-consuming and can take weeks or even months.
[0058] The quality of the computational grid directly determines the accuracy and efficiency of the simulation. For highly transient problems such as combustion and detonation, the gradients of physical quantities in the time and space dimensions are extremely large and migrate rapidly, which means that the dynamic requirements for grid resolution are wide and change rapidly. Traditional static unstructured grid solutions face challenges. Globally refining the grid will lead to a sharp increase in computational workload and huge resource consumption. While the use of unstructured adaptive grids can dynamically track changes in physical quantities and perform regional refining, the adaptive grid requires dynamic adjustment of the grid density during the simulation calculation of the unstructured grid. This involves dynamic grid reconstruction, data interpolation, load rebalancing, and complex inter-process communication. Especially when solving large-scale engineering problems, it will introduce extremely considerable computing time and communication overhead, which may reduce computational efficiency by several times, offsetting the accuracy gains brought by encryption, and becoming a bottleneck restricting the effectiveness of practical applications.
[0059] Therefore, the embodiment of the present application provides an unstructured grid division method based on structured grid, which can solve the problem that structured networks are difficult to meet high-precision requirements in complex geometry and flexibility, and that unstructured grids are difficult to balance computational efficiency under high-precision requirements. By guiding the construction of unstructured grids through trial calculations of structured grids, the huge computational overhead of dynamic adaptation and the huge time cost of repeated division and optimization of unstructured grids can be avoided, thereby achieving high-precision and high-efficiency simulation of leakage, combustion and detonation processes.
[0060] As mentioned in the background art, in order to solve the problems in the prior art, this application proposes an unstructured grid partitioning method based on a structured grid. Figure 1 This is a flow chart of a method for partitioning an unstructured grid based on a structured grid provided by an embodiment of the present application. Figure 1 , the unstructured grid division method based on structured grid specifically includes:
[0061] S110 , determining a computational domain range of the combustion and detonation simulation task, and performing surface meshing on a geometric model of the combustion and detonation simulation task to obtain a geometric representation surface mesh.
[0062] Combustion and detonation can be complex physical and chemical processes in computational fluid dynamics and thermodynamics, involving high temperature, high pressure, rapid chemical reactions, etc. Combustion and detonation simulation tasks can refer to simulating the combustion and detonation processes of combustible materials such as gas and dust.
[0063] The computational domain range can refer to the geometric boundaries of the physical space simulated for the combustion and detonation simulation task, i.e., the spatial region covered by the combustion and detonation simulation. For example, the computational domain range can include the explosion source, propagation area, etc., and can be defined by a three-dimensional coordinate range. In embodiments of the present application, the computational domain range can be determined by combining the geometric model of the combustion and detonation simulation task with the computational conditions.
[0064] In some implementations, determining the computational domain range of a combustion and detonation simulation task includes the following steps:
[0065] Step 11: Obtain calculation condition information and geometric model of the combustion and detonation simulation task;
[0066] Step 12: Determine the leakage simulation range and the combustion simulation range of the combustion and detonation simulation task based on the calculation condition information and the geometric model;
[0067] Step 13: Determine the calculation domain range of the combustion and detonation simulation task according to the leakage simulation range and the combustion simulation range.
[0068] Computational conditions refer to the physical processes and parameters defined in the simulation task, which determine the scope of the simulation domain. For example, explosion conditions involve shock wave propagation, requiring a larger computational domain; whereas steady-state combustion or diffusion processes, with their limited range of variation, can utilize a smaller simulation domain. Therefore, computational conditions are an important basis for delineating the computational domain.
[0069] The geometric model may refer to a physical model of a combustion and detonation simulation task. The geometric model defines the shape, size, and structural characteristics of each component involved in the combustion and detonation simulation task.
[0070] In step 11, the calculation condition information preset for the combustion and detonation simulation task can be obtained, and the geometry file corresponding to the geometric model (such as STP, IGES, etc. format) can be obtained. The geometry file can be imported into the pre-processing software (such as Hypermesh, cfmesh, gmsh, etc.) to load the geometric model.
[0071] For example, in a chemical plant, the geometric model includes buildings, gas tanks, and piping structures to support the numerical simulation of physical processes such as gas leaks, combustion, and explosions. The spatial extent of the geometric model is a cube with a length (X-axis), a width (Y-axis), and a height (Z-axis) of 1850 m, 1600 m, and 300 m, respectively.
[0072] Furthermore, in step 12, the leakage simulation range of the combustion and detonation simulation task can be determined based on the computational operating condition information and the geometric model. The leakage simulation range can include the leakage source region and the diffusion region, so that the leakage simulation range covers the leakage source and the diffusion region. Furthermore, the combustion simulation range of the combustion and detonation simulation task can be determined based on the computational operating condition information and the geometric model. The combustion simulation range can include the flame region, the turbulence-affected region, and the high pressure gradient region.
[0073] Furthermore, in step 13, the calculation domain range of the combustion and detonation 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 to 13, the calculation domain of the combustion and detonation simulation can be determined, which facilitates the subsequent accurate simulation of leakage, combustion and other processes of the combustion and detonation simulation.
[0075] In the embodiment of the present application, in addition to determining the calculation domain range, the geometric model of the combustion and detonation simulation task can also be preprocessed, that is, surface mesh division is performed to obtain a geometric representation surface mesh.
[0076] Specifically, the surface meshing can be performed based on a pre-selected mesh type (such as a triangular surface mesh or a quadrilateral surface mesh) and pre-set parameters such as a mesh base size and a minimum surface size.
[0077] For example, following the above example, you can select the mesh type as triangular surface mesh. According to the size of the geometric model, in order to display the model details with high precision at the surface mesh level, you can set the basic mesh size to 1m and the minimum mesh size to 0.25m for surface mesh division.
[0078] After dividing the surface mesh, you can also use the mesh quality check tool to check whether the surface mesh includes puncture surfaces, free edges, T-edges, disconnected mesh points and other problems. Finally, the entire surface mesh is divided into a connected domain, which is recorded as the geometric representation surface mesh.
[0079] S120 , generating a structural grid based on the geometric representation surface grid and the computational domain range, and performing simulation calculations on the structural grid according to boundary conditions corresponding to the computational domain range and the structural grid.
[0080] After obtaining the geometric representation surface mesh, you can divide the structured mesh into specific mesh sizes based on the geometric representation surface mesh and the length, width, and height of the computational domain. A structured mesh can be understood as a regularly arranged structural unit, such as rectangles or hexahedrons.
[0081] After dividing the structural mesh, considering that there is no fluid inside the closed geometric body, the closed geometric body does not involve fluid simulation. Therefore, the structural mesh inside the closed geometric body can also be removed to ensure the simulation accuracy of the structural mesh.
[0082] In some embodiments, after generating a structural mesh based on the geometric representation surface mesh and the computational domain range, the following steps are further included:
[0083] Step 21: for each structural grid, determine a signed distance function value from the structural grid to the geometric representation surface grid, wherein the signed distance function value reflects the position of the structural grid relative to the geometric representation surface grid;
[0084] Step 22: Determine the isosurface of the geometric representation surface grid within the computational domain based on the signed distance function value corresponding to each structural grid;
[0085] Step 23: For each structural grid, radiate a ray from the center of the structural grid to the isosurface, determine the number of intersections between the ray and the isosurface, and determine whether the structural grid is located inside the closed geometric body based on the number of intersections.
[0086] Step 24: Remove the structural meshes located inside the closed geometric body from all structural meshes.
[0087] In step 21, a signed distance function method can be used to calculate the signed distance function value of each structural grid within the computational domain based on the geometric representation surface grid, that is, the signed distance from the structural grid to the geometric representation surface grid. The signed distance function value can describe whether the structural grid is located within the geometric representation surface grid.
[0088] For example, if the signed distance function value is negative, it means that the structural grid is located within the geometric representation surface grid; if the signed distance function value is positive, it means that the structural grid is located outside the geometric representation surface grid; if the signed distance function value is zero, it means that the structural grid is located on the geometric representation surface grid.
[0089] Therefore, in step 22, the isosurface of the geometric representation surface grid within the calculation domain can be determined based on each structural grid with a signed distance function value of zero. The isosurface is a high-precision fitting of the geometric representation surface grid within the calculation domain.
[0090] Furthermore, in step 23, for each structural grid, a ray may be emitted from the center of the structural grid to the isosurface. The number of emitted rays may 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 an odd number, it can be determined that the structured mesh is inside the closed geometric body. If the number of intersection points corresponding to a single ray is an even number, it can be determined that the structured mesh is outside the closed geometric body. Furthermore, in step 24, the structured mesh located inside the closed geometric body can be removed.
[0092] Through the above steps 21 to 24, the structural grid located inside the closed geometric body can be eliminated to avoid fluid simulation calculation inside the closed geometric body, thereby further improving the simulation efficiency and accuracy of the structural grid.
[0093] In addition to creating a structured mesh, you can also define boundary conditions for the structured mesh. Boundary conditions define the behavior of physical quantities at the boundaries within the computational domain. For example, boundary types can include inlet boundaries, outlet boundaries, wall boundaries, and special boundaries. Boundary conditions can refer to the physical quantity conditions at these boundaries.
[0094] In some embodiments, before performing simulation calculation on the structured grid according to the boundary conditions corresponding to the computational domain range and the structured grid, the method further includes: determining the boundary conditions corresponding to the structured grid;
[0095] Determining the boundary conditions corresponding to the structural grid includes: determining the fixed wall boundary, the outflow boundary, and the inflow boundary based on the geometric model; configuring the corresponding velocity inflow boundary condition for the inflow boundary, and configuring the corresponding free boundary condition or non-reflection boundary condition for the outflow boundary.
[0096] Specifically, the ground of the geometric model can be set as a fixed wall boundary, which is the fixed interface with the fluid; and one of the four side surfaces of the geometric model can be set as an inflow boundary, which is the interface where the fluid enters the calculation domain; and the remaining three side surfaces of the four side surfaces and the top of the geometric model can be set as outflow boundaries, which are the interfaces where the fluid leaves the calculation domain.
[0097] Furthermore, you can configure corresponding boundary conditions for each boundary. For example, you can set the leakage parameters of the leak port based on the actual leak source, including but not limited to flow rate, pressure, and other parameters. For the inflow boundary, set the velocity inflow boundary condition to define the speed and direction of external gas entering the system. For the outflow boundary, you can set the free boundary condition or non-reflecting boundary condition to simulate the state of free fluid outflow.
[0098] Continuing with the previous example, we can set the inflow boundary to a velocity inlet with an incoming velocity of 10 m / s and a free condition for the outflow boundary. This setting can be used to simulate high-pressure methane leaks and their combustion and detonation processes under actual accident conditions.
[0099] Through the above implementation, the boundary conditions corresponding to the structural grid can be set to ensure the authenticity of the simulation calculation.
[0100] After dividing the structured grid and determining the corresponding boundary conditions, the structured grid can be further simulated based on the boundary conditions corresponding to the computational domain range and the structured grid to achieve simulation trial calculations of the structured grid, so as to guide the subsequent generation of unstructured grids.
[0101] S130. Determine mesh refinement parameters based on simulation calculation results of the structured mesh, and generate an unstructured mesh according to the mesh refinement parameters, the calculation domain range, and the geometric representation surface mesh.
[0102] Mesh refinement can be understood as creating a finer mesh. Mesh refinement parameters include a mesh refinement range and a corresponding mesh refinement size. The mesh refinement range is the spatial region where mesh refinement is required, and the mesh refinement size is the scale at which mesh refinement is required, i.e., the size of the mesh after refinement.
[0103] In an embodiment of the present application, simulation calculations can be performed on structural grids of different sizes based on the calculation domain range and boundary conditions, and the simulation calculation results of structural grids of different sizes can be counted. Then, based on the simulation calculation results obtained under structural grids of different sizes, the grid encryption size can be selected from different sizes, and the grid encryption range can be determined based on the distribution of physical quantities at different times and in different regions.
[0104] In a specific embodiment, the mesh refinement parameters include a mesh refinement range and a corresponding mesh refinement size. Determining the mesh refinement parameters based on simulation calculation results of the structural mesh includes the following steps:
[0105] Step 31: Determine the convergence curve corresponding to the key physical quantity under the structural grid of each size based on the simulation calculation results under the structural grid of different sizes;
[0106] Step 32: Determine the mesh refinement size based on the convergence curves corresponding to the key physical quantities under the structural meshes of each size;
[0107] Step 33: Determine the distribution information of physical quantities at different times and in different regions based on the simulation calculation results under the structural grid with the grid refinement size;
[0108] Step 34: Determine the grid refinement range based on the physical quantity distribution information at different times and in different regions.
[0109] In step 31, simulation calculations can be performed on structural grids of different sizes, and then, based on the simulation calculation results obtained for the structural grids of different sizes, convergence curves corresponding to key physical quantities for the structural grids of each size can be determined. Key physical quantities can be physical quantities related to the simulation analysis, such as temperature, pressure, and density.
[0110] Furthermore, in step 32 , a mesh refinement size may be selected from each size based on a convergence curve corresponding to a key physical quantity at each size.
[0111] After obtaining the mesh refinement size, in step 33, the physical quantity distribution information at different times and the physical quantity distribution information in different regions can be determined based on the simulation calculation results of the structural mesh under the mesh refinement size, wherein the physical quantity distribution information can describe the distribution of the physical quantity in each region within the calculation domain.
[0112] Furthermore, in step 34, the grid encryption range can be determined based on the physical quantity distribution information at different times and in different regions. For example, high gradient areas of physical quantities such as density, pressure, temperature, and composition can be captured from the physical quantity distribution information, and then the grid encryption range can be determined based on the high gradient areas.
[0113] Through the above implementation, simulation calculations can be carried out on structured grids of different sizes, and the simulation calculation results of structured grids of different sizes can be counted, so as to determine the appropriate grid encryption size and grid encryption range, which is convenient for the subsequent generation of unstructured grids and can ensure the rationality of the unstructured grid generation.
[0114] In addition to using structural grids of different sizes for simulation calculations, the grid size can also be dynamically adjusted according to the gradient of physical quantities in each area within the calculation domain during the simulation process, and the minimum grid size of different areas can be recorded to obtain the grid encryption range and grid encryption size.
[0115] In another specific embodiment, the mesh refinement parameters include a mesh refinement range and a corresponding mesh refinement size. The mesh refinement parameters are determined based on simulation calculation results of the structural mesh, including:
[0116] The mesh refinement range and the corresponding mesh refinement size are determined based on the minimum mesh size in each region recorded in the simulation calculation results. The minimum mesh size in each region recorded in the simulation calculation results is determined by the gradient of key physical quantities within the calculation domain during the simulation calculation process.
[0117] Among them, the gradient of key physical quantities 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 area can be dynamically adjusted by calculating the gradient of the key physical quantity in each area within the calculation domain. For example, if the gradient is greater than the preset gradient threshold, the grid size is reduced. During this process, the minimum grid size of each area is recorded.
[0119] Taking the composition gradient as an example, it represents the rate of change of the mass fraction of different components in space, expressed in % / m. When the concentration gradient in the leakage region exceeds a critical value (threshold), it indicates the presence of a clear diffusion boundary or interface. To accurately analyze the diffusion trajectory and boundary evolution, local mesh refinement is required to improve the spatial resolution of concentration field changes. A preferred critical value is 5% / m.
[0120] Taking the pressure gradient as an example, the pressure gradient represents the rate of change of pressure in space, and the unit is Pa / m. When the pressure gradient in the calculation area is greater than the critical value (threshold), it indicates that there is a drastic pressure change in the area, and a high-resolution grid is required to capture turbulent motion. In order to accurately capture turbulent motion, local grid refinement is required. As a preferred option, the critical value (threshold) can be taken as 10 6 Pa / m.
[0121] Furthermore, the minimum grid size recorded in each area can be determined as the grid encryption size corresponding to each grid encryption range to achieve dynamic encryption of the local grid.
[0122] For example, the initial base grid cell size is 8m. Finer local grids with an initial cell size of 1m are deployed in key areas such as storage tanks, densely populated piping areas, and around reactors. By calculating the gradients of key physical quantities within the domain, such as mass concentration gradients during leakage, temperature gradients during combustion, and pressure gradients during detonation propagation, higher-resolution grids are used in relevant areas to achieve automated dynamic refinement of the local grid. After refinement, the minimum cell size can reach 0.25m. The minimum grid size for each area is also recorded.
[0123] Figure 2 This is a schematic diagram of local encryption provided by an embodiment of the present application, such as Figure 2 As shown in the figure, in the grid area, the leakage diffusion area (M1 area) close to the leakage source, the combustion flame and the turbulence high intensity area (M2 area) need to be locally encrypted to different degrees to form a multi-level grid division.
[0124] Figure 3 This is a schematic diagram of an encryption area provided in an embodiment of the present application. Figure 3 As shown, using the chemical plant example above, Encryption Zone 1 and Encryption Zone 2 are two mesh refinement ranges, each with a different mesh refinement size. To capture the simulation details of leakage, combustion, and detonation, the range of the Encryption Zone is determined based on the calculation results of the structural mesh: Encryption Zone 1 is a cube with a length (X-axis), width (Y-axis), and height (Z-axis) of 340m, 270m, and 65m, respectively. The mesh size within Encryption Zone 1 is 0.25m. Encryption Zone 2 is a cube with a length (X-axis), width (Y-axis), and height (Z-axis) of 590m, 380m, and 210m, respectively. The mesh size within Encryption Zone 2 is 2m.
[0125] Through the above implementation, automatic dynamic encryption of local grids can be achieved. This method can record the minimum grid sizes of different regions during the simulation process, and can improve the efficiency of determining grid encryption parameters.
[0126] After obtaining the mesh refinement parameters, you can create an unstructured mesh using the mesh refinement parameters, the computational domain, and the geometric representation surface mesh. Unstructured meshes include, but are not limited to, tetrahedrons, pentahedrons, hexahedrons, and polyhedrons. Unstructured meshes can accurately represent the details of the geometric model.
[0127] In some embodiments, the mesh refinement parameters include a mesh refinement range and a corresponding mesh refinement size. Generating an unstructured mesh according to the mesh refinement parameters, the computational domain range, and the geometric representation surface mesh includes:
[0128] Based on the geometric representation surface mesh and the computational domain range, a volume mesh is generated. For each mesh encryption range, the volume mesh within the mesh encryption range is locally encrypted according to the corresponding mesh encryption size to obtain an unstructured mesh.
[0129] Specifically, the volume grid can be divided first according to the geometric representation surface grid and the calculation domain range, and then, within the calculation domain range, the volume grid within each grid encryption range can be locally encrypted using the corresponding grid encryption size to obtain an unstructured grid.
[0130] After obtaining an unstructured mesh, you can also construct the corresponding boundary conditions for the unstructured mesh. For example, after completing a locally refined mesh, set the corresponding boundary conditions based on the characteristics of the physical problem. In the geometric model, set the ground as a solid wall boundary, the top as an outflow boundary, one of the four sides as an inflow boundary, and the remaining three as outflow boundaries. Set the inflow boundary as a velocity inlet with an incoming flow velocity of 10 m / s; use free conditions for the outflow boundary.
[0131] Compared to the existing technologies of Cartesian adaptive grids or unstructured adaptive grids that require real-time grid reconstruction, encryption and decryption, and data interpolation during the solution process, the existing technologies introduce huge computing and communication overhead, which seriously restricts computing efficiency, especially in large-scale parallel computing. In the embodiments of the present application, a one-time, low-cost structured grid trial calculation is used to estimate the key physical areas, replacing the high-cost dynamic adaptive process. This allows the final unstructured grid to maintain its topological structure throughout the main calculation process, avoiding performance bottlenecks caused by dynamic adjustments, thereby significantly shortening the calculation cycle and reducing the demand for computing resources.
[0132] Moreover, the local encryption of traditional unstructured grids often relies on experience, which may lead to insufficient or excessive encryption. In the embodiment of the present application, the advantage of the fast calculation speed of the structured grid is used for preliminary trial calculations, which can quickly capture key areas where physical quantities such as combustion or detonation wave fronts, shock waves, and high-gradient flow fields change dramatically. Based on the results of the trial calculation, the precise spatial range and necessary grid size required for subsequent encryption of the unstructured grid can be quantitatively determined, realizing "on-demand encryption". This not only avoids the waste of resources caused by blind global encryption, but also ensures sufficient resolution in the area of key physical phenomena, thereby obtaining high-fidelity simulation results.
[0133] Furthermore, traditional adaptive mesh encryption can lead to load imbalance in parallel computing due to dynamic mesh reconstruction. In particular, unstructured adaptive mesh encryption requires frequent repartitioning, exacerbating communication latency. In the present embodiment, a structured mesh is used to predict the encryption area and pre-construct a hierarchically encrypted unstructured static mesh, ensuring optimized partitioning before computation. This "a priori encryption" evenly distributes the computational load across processes, reducing parallel communication time. It is particularly suitable for parallel computing scenarios with tens of thousands of cores or even larger, addressing the issue of plummeting parallel efficiency in combustion and detonation problems. The unstructured mesh generation method provided in the present embodiment requires no complex data structures or repartitioning algorithms and can be implemented using conventional mesh generation tools. It is compatible with mainstream CFD solver architectures and its technical principles can be extended to three-dimensional multi-physics coupling problems (such as thermal radiation coupling, fluid-structure coupling, and detonation propagation). It also provides a generalized technical approach for refined simulation of engineering scenarios such as aircraft engine combustion chambers and complex charge structures. While ensuring engineering credibility, it reduces the hardware requirements for large-scale simulations and has broad application prospects.
[0134] The unstructured meshing method based on structured meshes provided in an embodiment of the present application determines the computational domain range of a combustion and detonation simulation task and performs surface meshing on the geometric model of the combustion and detonation simulation task to obtain a geometric representation surface mesh. A structured mesh is then generated based on the geometric representation surface mesh and the computational domain range. Simulation calculations are performed on the structured mesh based on the boundary conditions corresponding to the computational domain range and the structured mesh. Mesh refinement parameters are determined based on the simulation calculation results of the structured mesh, and an unstructured mesh is generated based on the mesh refinement parameters, the computational domain range, and the geometric representation surface mesh, thereby achieving unstructured meshing based on structured meshes. This method uses the rapid simulation results of the structured mesh to guide the mesh refinement range and mesh refinement size of the unstructured mesh. This method can replace the trial-and-error iterative optimization or complex dynamic adaptive process of the unstructured mesh, improve the generation efficiency of the unstructured mesh, and ensure the generation quality of the unstructured mesh. The divided unstructured mesh can be used for subsequent numerical simulations, which can improve simulation accuracy, especially for complex geometric models. It can also balance computational efficiency while meeting high-precision requirements. In addition, by dividing the unstructured mesh, this method can eliminate the need for dynamic mesh adjustment in subsequent simulation calculations, avoiding the huge reconstruction and cross-process communication overhead generated by the unstructured adaptive mesh, and is suitable for large-scale parallel environments.
[0135] In an embodiment of the present application, the obtained unstructured grid is used for the final formal simulation calculation, and the unstructured grid is static and unchanged, and its number of units, grid size and spatial distribution are all known. Before subsequent numerical simulation calculations, an efficient region segmentation algorithm can be used to perform a one-time and optimized partitioning of the static unstructured grid to achieve accurate initial load balancing. Compared with the costly dynamic load rebalancing throughout the entire calculation process in the dynamic adaptive method, the static optimization strategy of the embodiment of the present application can greatly improve the efficiency and scalability of parallel computing.
[0136] Among them, the region segmentation algorithm can adopt the graph segmentation method, the Z-order curve method, the Hilbert curve method, etc., to divide multiple parallel subdomains for parallel computing.
[0137] In some embodiments, after generating an unstructured grid according to the grid refinement parameters, the computational domain range, and the geometric representation surface grid, the following steps are further included:
[0138] Step 41: Divide the computational domain into multiple parallel subdomains based on the location and number of the unstructured grids.
[0139] Step 42: Allocate the unstructured grids in each parallel subdomain to different nodes for parallel simulation calculations.
[0140] In step 41, the computational domain may be divided into multiple parallel subdomains according to the location and number of the unstructured grids.
[0141] Furthermore, in step 42, the unstructured grids in each parallel subdomain can be assigned to different nodes, and each node can then perform simulation calculations on the unstructured grid in the assigned parallel subdomain, thereby achieving parallel simulation of multiple nodes. The nodes can be CPU cores.
[0142] By constructing a hierarchically encrypted static unstructured grid, we ensure that the optimized partitioning can be completed before calculation. By dividing the unstructured grid into parallel subdomains, the computing power of each process can be evenly distributed, reducing the time consumption of parallel communication. This is especially suitable for parallel computing scenarios at the 10,000-core level or even larger, and solves the problem of a sudden drop in parallel efficiency in the combustion and detonation problem.
[0143] In the above process, the parallel subdomains can be divided using the Morton curve (also known as the Z-order curve). The Morton curve method can interleave bits in the binary representation of the coordinates of each point to generate a unique, spatially localized Morton code.
[0144] In a specific embodiment, based on the location and number of unstructured grids, the computational domain is divided into multiple parallel subdomains, including the following steps:
[0145] Step 411: determining the geometric center coordinates of each unstructured grid based on the position of each unstructured grid, and normalizing each geometric center coordinate;
[0146] Step 412: Determine the position codes corresponding to the normalized geometric center coordinates, and sort all the position codes;
[0147] Step 413: Determine the average number of grids and the number of remaining grids based on the number of unstructured grids and the number of preset subdomains;
[0148] Step 414: Segment each code in the code sorting list according to the average number of grids and the number of remaining grids to determine the unstructured grids included in each parallel subdomain.
[0149] In step 411, the coordinates of the geometric center of the unstructured grid can be calculated based on the position of the unstructured grid within the computational domain to transform the problem from "cell" to "point". In addition, all geometric center coordinates are normalized to standardize the range of the geometric center coordinates to facilitate unified coding calculation.
[0150] For example, the floating-point coordinates of all 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 and minimum coordinates of the geometric center coordinates of all unstructured grids. The scale of change in each direction (X, Y, and Z) can be determined using the maximum and minimum coordinates and a predetermined maximum integer value, as shown in the following formula:
[0151] ;
[0152] ;
[0153] ;
[0154] Where, is a predetermined maximum integer value used to normalize each geometric center coordinate to [0, (2 L -1)] integer interval; is the maximum coordinate, is the minimum coordinate, 、 、 are the scales of change in the X, Y, and Z directions respectively;
[0155] After obtaining the change scale in each direction, for each geometric center coordinate, the geometric center coordinate can be transformed according to the change scale in each direction to obtain the normalized geometric center coordinate. As shown in the following formula:
[0156] ;
[0157] ;
[0158] ;
[0159] Where, is the geometric center coordinate before normalization, is the normalized geometric center coordinate, Represents round down.
[0160] After normalizing the geometric center coordinates of all unstructured grids, further, in step 412, the position codes corresponding to the normalized geometric center coordinates can be calculated. For example, if the normalized geometric center coordinates are integer coordinates, the normalized geometric center coordinates can be encoded into a one-dimensional Morton code (typically a 64-bit unsigned integer) using a bit interleaving method.
[0161] After encoding all geometric center coordinates, all position codes may be sorted, for example, by using quick sort, merge sort, or radix sort, and the sorting rule may be ascending or descending order.
[0162] Furthermore, in step 413, the average number of grids and the remaining number of grids can be calculated based on the number of unstructured grids and the number of preset subdomains. The preset number of subdomains is the number of pre-set parallel subdomains, i.e., the number of corresponding nodes; the average number of grids is the average number of unstructured grids divided under each parallel region; and the remaining number of grids is the number of unstructured grids that are redundant after division according to the average number of grids.
[0163] For example, if the number of unstructured grids is N and the number of preset subdomains is P, then the average number of grids base_size = N / P, and the remaining number of grids remainder = N%P.
[0164] Furthermore, in step 414, each code in the sorted code list can be divided into different parallel subdomains (i.e., partitions) based on the average number of grids and the number of remaining grids. For example, in the first remainder partitions, each partition obtains base_size + 1 unstructured grids, and in the next P - remainder partitions, each partition obtains base_size unstructured grids.
[0165] Through the above implementation, the number of unstructured grids in each parallel subdomain can be made similar (with a maximum difference of 1), achieving accurate load balancing and effectively adapting to the changes in computing density caused by local mesh encryption, thereby improving the overall simulation efficiency and parallel scalability.
[0166] After dividing the parallel subdomains, we can enter the unstructured grid simulation implementation stage. In this stage, we will carry out numerical simulation of the entire leakage, combustion and detonation process. Relying on high-quality grid division and optimized computing resource allocation, we can achieve efficient and accurate simulation results.
[0167] Continuing with the chemical plant example above, we can use the Morton curve region partitioning algorithm. Based on the number and distribution of unstructured grids, we can divide the entire computational domain into 10,000 parallel subdomains. These subdomains can then be allocated to 10,000 CPU cores for high-performance parallel computing, achieving load balancing. Furthermore, we can set the simulation time to 55 seconds, resulting in approximately 6.92 million time steps. Figure 4 A schematic diagram of a simulation result provided in an embodiment of the present application is shown in FIG. Figure 4 As shown, the simulation results of unstructured grid are presented.
[0168] The unstructured grid division method based on structured grid provided in the embodiment of the present application mainly includes the following technical effects:
[0169] 1. Structural mesh pre-verification guides unstructured mesh division and improves unstructured mesh quality
[0170] Using the rapidly generated and calculated results of structured mesh trials (such as the gradient distribution of critical physical characteristics and areas of intense pressure / temperature variation), we quantitatively determine the spatial scale characteristics and propagation range of key physical regions. This provides precise guidance for the required local refinement range and size targets for subsequent unstructured meshing in different geometric subregions. This step combines the computational efficiency of structured meshes with the design flexibility of unstructured meshes, replacing the trial-and-error iterative optimization or expensive dynamic adaptive processes of unstructured meshes.
[0171] 2. Differentiated mesh refinement based on combustion and detonation physics requirements
[0172] Using a multi-scale modeling approach, larger meshes are used in non-core areas, and smaller, high-resolution meshes are used in detail areas to achieve multi-scale simulation. Based on the characteristics of different physical phenomena, the mesh size is optimized to ensure the accuracy and efficiency of the simulation calculation. Abandoning the traditional methods of "global unified encryption" or "runtime adaptation", based on the quantitative guidance provided by pre-verification, preset, partitioned local encryption is only implemented in areas where the physical process is intense as predicted by the structured grid. This on-demand encryption strategy greatly reduces the number of invalid grid cells, significantly alleviates the inherent computational efficiency disadvantages of unstructured grids, and optimizes the allocation of computing resources. For example, during the leakage process, the mesh is encrypted in areas with high concentration gradients to ensure the accuracy of the diffusion trajectory of the combustible gas, and a coarser mesh is used in areas far away from the leakage source to optimize computing resources. During the combustion process, local encryption is performed in high turbulence areas by combining turbulent kinetic energy and turbulence intensity.
[0173] 3. Avoid dynamic adaptive communication load and achieve pre-balancing of multi-scale grid load
[0174] Since all encrypted areas, sizes, and rules are statically defined based on pre-verification results before calculation, the entire calculation process does not require any runtime dynamic mesh adjustment operations (such as cell cutting or merging, parent-child relationship reconstruction, and data interpolation and migration). This avoids the huge reconstruction and cross-process data communication overhead caused by unstructured adaptive meshes (which is the main efficiency bottleneck of dynamic adaptation in supercomputing scenarios), and is particularly suitable for large-scale parallel environments.
[0175] During the parallel partitioning stage, the partition load weight can be accurately adjusted (for example, more processes can be allocated to high-density grid areas) based on the pre-planned encryption strength differences of each partition (the grid density in different areas varies significantly), thereby avoiding the parallel load imbalance problem caused by uneven density in advance and giving full play to the efficiency of computing resources.
[0176] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 5 As shown, the electronic device 400 includes one or more processors 401 and a memory 402 .
[0177] The processor 401 may be a central processing unit (CPU) or other forms of processing units having data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device 400 to perform desired functions.
[0178] The memory 402 may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory. The non-volatile memory may include, for example, read-only memory (ROM), a hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 401 may execute the program instructions to implement the unstructured grid division method based on the structured grid of any embodiment of the present application described above and / or other desired functions. Various contents such as initial external parameters, thresholds, etc. may also be stored in the computer-readable storage medium.
[0179] In one example, electronic device 400 may further include an input device 403 and an output device 404, which are interconnected via a bus system and / or other connection mechanisms (not shown). Input device 403 may include, for example, a keyboard, a mouse, etc. Output device 404 may output various information to the outside, including warning information, braking force, etc. Output device 404 may include, for example, a display, a speaker, a printer, a communication network, and remote output devices connected thereto.
[0180] Of course, to simplify, Figure 5 Only some of the components related to the present application in the electronic device 400 are shown, and components such as buses, input / output interfaces, etc. are omitted. In addition, the electronic device 400 may further include any other appropriate components according to specific application scenarios.
[0181] In addition to the above-mentioned methods and devices, an embodiment of the present application may also be a computer program product, which includes computer program instructions, which, when executed by a processor, enable the processor to execute the steps of the structured grid-based unstructured grid division method provided in any embodiment of the present application.
[0182] The computer program product may be written in any combination of one or more programming languages to implement the program code for performing the operations of the embodiments of the present application, including object-oriented programming languages such as Java, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0183] In addition, an embodiment of the present application may also be a computer-readable storage medium having computer program instructions stored thereon, which, when executed by a processor, enables the processor to execute the steps of the structured grid-based unstructured grid division method provided in any embodiment of the present application.
[0184] The computer-readable storage medium may be any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may include, for example, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any combination thereof. More specific examples (a non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.
[0185] It should be noted that the terms used in this application are only for describing specific embodiments and are not intended to limit the scope of this application. As shown in the specification and claims of this application, unless the context clearly indicates an exception, the words "one", "an", "a kind of" and / or "the" do not specifically refer to the singular and may also include the plural. The terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method or device. In the absence of further restrictions, the elements defined by the sentence "comprise a..." do not exclude the presence of other identical elements in the process, method or device comprising the elements.
[0186] It should also be noted that the terms "center", "up", "down", "left", "right", "vertical", "horizontal", "inside", "outside", etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on this application. Unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", etc. should be understood in a broad sense, for example, it can be a fixed connection, 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 it can be a communication between the internal parts of two elements. For those of ordinary skill in the art, the specific meanings of the above terms in this application can be understood according to specific circumstances.
[0187] This article uses specific examples to illustrate the principles and implementation methods of this application. The description of the above embodiments is only used to help understand the method and core ideas of this application. The above is only the preferred implementation method of this application. It should be pointed out that due to the limitations of textual expression, there are objectively infinite specific structures. For ordinary technicians in this technical field, without departing from the principles of this application, they can also make several improvements, modifications or changes, and can also combine the above technical features in an appropriate manner; these improvements, modifications, changes or combinations, or the direct application of the inventive concept and technical solution to other occasions without improvement, should be regarded as the scope of protection of this application.
Claims
1. A method for unstructured grid division based on structured grid, characterized in that: include: Determining a computational domain range of a combustion and detonation simulation task, and performing surface meshing on a geometric model of the combustion and detonation simulation task to obtain a geometric representation surface mesh; generating a structural grid based on the geometric representation surface grid and the computational domain, and performing simulation calculations on the structural grid according to boundary conditions corresponding to the computational domain and the structural grid; A mesh encryption parameter is determined based on the simulation calculation result of the structured mesh, and an unstructured mesh is generated according to the mesh encryption parameter, the calculation domain range and the geometric representation surface mesh.
2. The method according to claim 1, characterized in that After generating a structural grid based on the geometric representation surface grid and the computational domain range, the method further includes: For each structural grid, determining a signed distance function value from the structural grid to the geometric representation surface grid, wherein the signed distance function value reflects a position of the structural grid relative to the geometric representation surface grid; Determining the isosurface of the geometric representation surface grid within the calculation domain according to the signed distance function value corresponding to each of the structural grids; For each structured grid, emitting a ray from the center of the structured grid to the isosurface, determining the number of intersections between the ray and the isosurface, and judging whether the structured grid is located inside a closed geometric body according to the number of intersections; From all structured meshes, remove those located inside closed geometry.
3. The method according to claim 1, characterized in that Before performing simulation calculation on the structured grid according to the boundary conditions corresponding to the calculation domain range and the structured grid, the method further includes: Determining boundary conditions corresponding to the structural grid; Determining the boundary conditions corresponding to the structural grid includes: determining a fixed wall boundary, an outflow boundary, and an inflow boundary based on the geometric model; A corresponding velocity inflow boundary condition is configured for the inflow boundary, and a corresponding free boundary condition or a non-reflection boundary condition is configured for the outflow boundary.
4. The method according to claim 1, wherein The mesh encryption parameters include a mesh encryption range and a corresponding mesh encryption size. The mesh encryption parameters are determined based on the simulation calculation results of the structural mesh, including: According to the simulation results under structural grids of different sizes, the convergence curves corresponding to the key physical quantities under structural grids of different sizes are determined; Determine the mesh refinement size based on the convergence curves corresponding to key physical quantities under structural meshes of various sizes; Determining physical quantity distribution information at different times and in different regions based on simulation calculation results under the structural grid of the grid refinement size; The grid refinement range is determined based on the physical quantity distribution information at different times and in different regions.
5. The method according to claim 1, wherein The mesh encryption parameters include a mesh encryption range and a corresponding mesh encryption size. The mesh encryption parameters are determined based on the simulation calculation results of the structural mesh, including: Determining a mesh refinement range and a corresponding mesh refinement size based on the minimum mesh size in each region recorded in the simulation calculation results; The minimum grid size in each region recorded in the simulation calculation results is determined by the gradient of key physical quantities within the calculation domain during the simulation calculation process.
6. The method according to claim 1, characterized in that The mesh encryption parameters include a mesh encryption range and a corresponding mesh encryption size. Generating an unstructured mesh according to the mesh encryption parameters, the computational domain range, and the geometric representation surface mesh includes: Generating a volume mesh based on the geometric representation surface mesh and the computational domain range; For each mesh encryption range, local mesh encryption is performed on the volume mesh within the mesh encryption range according to the corresponding mesh encryption size to obtain an unstructured mesh.
7. The method according to claim 1, characterized in that After generating an unstructured grid according to the grid refinement parameters, the computational domain range, and the geometric representation surface grid, the method further includes: Based on the position and number of the unstructured grids, the computational domain is divided into a plurality of parallel subdomains; The unstructured grids in each parallel subdomain are assigned to different nodes for parallel simulation calculations.
8. The method according to claim 7, characterized in that Based on the location and number of the unstructured grids, the computational domain is divided into multiple parallel subdomains, including: determining the geometric center coordinates of each unstructured grid based on the position of each unstructured grid, and normalizing each geometric center coordinate; Determine the position codes corresponding to the normalized geometric center coordinates and sort all the position codes; Determining an average number of grids and a remaining number of grids based on the number of unstructured grids and the number of preset subdomains; Each code in the code sorting list is segmented according to the average number of grids and the remaining number of grids to determine the unstructured grids included in each parallel sub-domain.
9. The method according to claim 1, characterized in that Determine the computational domain scope for the combustion and detonation simulation task, including: Obtaining calculation condition information and geometric model of the combustion and detonation simulation task; Determining a leakage simulation range and a combustion simulation range of the combustion and detonation simulation task according to the calculation operating condition information and the geometric model; The calculation domain range of the combustion and detonation simulation task is determined according to the leakage simulation range and the combustion simulation range.
10. An electronic device, characterized in that: The electronic device comprises: processor and memory; The processor is configured to execute the steps of the structured grid-based unstructured grid division method according to any one of claims 1 to 9 by calling the program or instruction stored in the memory.
Citation Information
Patent Citations
Carotid ultrasound image intima media thickness measurement method and system thereof
CN106485203A
Numerical simulation method for adaptively expanding computational domain of large-scale parallel computing
CN110852005A
Simulation method for alkali metal migration in Shell gasifier
CN114373515A
Numerical simulation method for multi-element gas explosion discharge characteristics under full field domain scale
CN116011357A
Indoor three-dimensional reconstruction method and device based on symbol distance field
CN116402943A
Cited By
Gate discharge simulation system based on parameterization and adaptive grid
CN122021477A