Method and device for automatically generating geometric self-adaptive unstructured grid

Automatically generate geometrically adaptive non-structural mesh through deep learning methods, solving the serious problems of manual intervention in the existing technology, and achieving efficient automation of flow field analysis experiments.

CN119397934APending Publication Date: 2025-02-07NANJING UNIV OF AERONAUTICS & ASTRONAUTICS
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411248406.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2023-09-08
Filing Date
2024-09-06
Publication Date
2025-02-07

AI Technical Summary

Technical Problem

The prior art requires a lot of manual priors and interactive operations when generating non-structural grids, which makes flow field analysis experiments time-consuming and labor-intensive and reduces scientific research efficiency.

Method used

Using deep learning methods, by building training sample databases and deep network models, geometrically adaptable non-structural mesh is automatically generated to reduce manual intervention.

Benefits of technology

Automatic non-structural grid generation is realized, saving time and human resources in flow field analysis experiments, and improving scientific research efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119397934A_ABST
    Figure CN119397934A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a method and a device for generating geometric self-adaptive unstructured grids by using a deep learning method, relates to an unstructured grid automatic generation technology in the field of data analysis, and can generate geometric self-adaptive unstructured grids which are reasonably graded by using the deep learning method. And the analysis efficiency of the flow field in the computational fluid mechanics is improved. The method comprises the following steps: constructing a partial differential equation by utilizing a geometric shape, and calculating the equation to form a training sample database; constructing a deep learning network model by using the geometric shape and the equation numerical solution, and training the deep learning network model; generating a grid size distribution function by using the trained deep learning model and the new geometric shape of the to-be-divided domain, and further constructing a non-structural computational grid; carrying out DG solving on flow field distribution by using the non-structural computational grid; and performing post-processing on scalar, vector and tensor numerical solutions on the unstructured grid by utilizing the flow field distribution on the unstructured grid, and then performing flow field distribution visualization.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to an automatic generation technology of unstructured grids in the field of data analysis, and in particular to a method for generating geometrically adaptive unstructured grids using a deep learning method. Background Art

[0002] Computational modeling and simulation is a key aspect of modern scientific research, ranging from computer graphics to complex numerical simulations of physical phenomena, especially computational fluid dynamics. These numerical computational modeling techniques are based on a discretized representation of the underlying geometry, where the domain of interest is divided into a grid composed of simple elements. The grid is divided into structured grids and unstructured grids based on the underlying topology. Unlike structured grids, which are usually limited to specifying problems on simple geometric domains, unstructured grids provide greater geometric flexibility.

[0003] Unstructured mesh generation technology mainly involves the development of efficient and automatic algorithms to construct high-quality meshes for complex objects and fields. Unstructured mesh generation technology can be divided into three categories: 1. Mesh covering method, based on the underlying structured mesh, trims and distorts the elements of the structured covering mesh to conform to the geometric shape of the partitioned domain, usually using a quad / octree to construct the covering mesh; 2. Frontier advancement method, initialized on the boundary of the domain to be divided, adding grid units layer by layer by adding nodes adjacent to the frontier, and gradually advancing until the domain to be divided is divided; 3. Delaunay subdivision method, constructing an initial constrained Delaunay mesh that conforms to the geometric shape, and gradually adding new vertices to the interior of the domain through a refinement strategy until a suitable triangulation is formed.

[0004] Grid size distribution is a key factor in controlling the generated grid to conform to the geometric characteristics of the partitioned domain. However, the combination of grid size distribution and the above-mentioned unstructured grid generation method often requires a lot of manual priors or manual interaction. Therefore, in actual flow field analysis experiments, it is often necessary to spend a lot of time and manpower to generate unstructured grids first, which will seriously occupy the laboratory's human resources and increase the time of flow field analysis, ultimately reducing scientific research efficiency. Summary of the invention

[0005] The embodiments of the present invention provide a method and device for automatically generating geometrically adaptive unstructured grids. By dividing the geometric shape of the computational domain, a geometrically adaptive unstructured computational grid can be automatically generated, and then flow field distribution calculations in computational fluid dynamics can be performed, thereby saving time and manpower in flow field analysis experiments, alleviating the human resource occupancy of the laboratory and reducing the time of flow field analysis experiments, ultimately improving scientific research efficiency.

[0006] To achieve the above object, the embodiments of the present invention adopt the following technical solutions:

[0007] In a first aspect, an embodiment of the present invention provides a method comprising:

[0008] S1. The server receives the geometric shape of the computational domain to be divided initialized by the client, wherein the geometric shape of the computational domain to be divided corresponds to the flow field to be analyzed;

[0009] S2, the server constructs a training sample database according to the geometric shape of the computational domain to be divided;

[0010] S3. The server establishes a deep network model, wherein the deep network model includes two condition generators and two multi-scale condition discriminators;

[0011] S4, the server trains the deep learning network model using the training sample database;

[0012] S5. The server generates a grid size distribution corresponding to the geometric shape of the computational domain to be divided using the trained deep learning model;

[0013] S6. The server generates an unstructured computational grid for the computational domain to be divided using the grid size distribution, and then uses the unstructured computational grid to analyze the flow field distribution, wherein the obtained flow field distribution result is returned to the client for display.

[0014] Wherein, the use of unstructured computational grids to analyze flow field distribution includes:

[0015] S7, using the unstructured computational grid to perform flow field distribution analysis;

[0016] S8, performing post-processing of numerical solutions of scalars, vectors and tensors on the unstructured grid according to the flow field distribution on the unstructured grid;

[0017] S9. Sending flow field quantitative indicators for flow field distribution visualization to the client according to the result of numerical solution post-processing, wherein the flow field quantitative indicators of the flow field to be analyzed include: flow field contour lines, streamlines, tensor components, residual field distribution and residual convergence curve.

[0018] In a second aspect, an embodiment of the present invention provides a device, comprising:

[0019] The parameter specification module is used to specify different local parameters for different basic partition domain geometric shapes according to user operations in the client; that is, different spacings, weights, etc. are specified for different basic partition domain geometric shapes for constructing the training sample database, and the point source Poisson equation is solved with different geometric shapes, spacings, and weights to construct the training data set;

[0020] A receiving module is used to receive the request information sent by the client, and initialize the geometric shape of the computational domain to be divided according to the request information, wherein the setting parameters in the request information include: the geometric shape of the basic division domain, the spacing, the weight local parameter, the geometric shape of the domain to be divided, and the maximum / minimum grid unit size value;

[0021] Sample processing module: used to construct a training sample database according to the geometric shape of the computational domain to be divided;

[0022] Network training module: used to establish a deep network model and train the deep learning network model using the training sample database, wherein the deep network model includes two condition generators and two multi-scale condition discriminators;

[0023] A network prediction module is used to generate a grid size distribution corresponding to the geometric shape of the computational domain to be divided using the trained deep learning model;

[0024] A grid partitioning module: used for constructing an unstructured grid of the computational domain to be partitioned by using the grid size distribution and the maximum / minimum grid unit size values;

[0025] Output module: used to feed back the unstructured grid data to the client; Solution module: used to use the unstructured computational grid to perform flow field distribution analysis, wherein the unstructured grid data output by the output module is used to solve the Navier-Stokes equations under the large eddy simulation model on the unstructured grid using DG, thereby obtaining the flow field distribution;

[0026] A grid post-processing module is used to perform numerical solution post-processing of scalars, vectors and tensors on the unstructured grid according to the flow field distribution on the unstructured grid, wherein the flow field distribution on the unstructured grid is subjected to numerical solution post-processing of scalars, vectors and tensors stored in different nodes, and residual global error calculation and analysis is performed;

[0027] Physical distribution visualization module: according to the result of post-processing of the numerical solution, the flow field quantitative indicators for flow field distribution visualization are sent to the client, wherein the flow field quantitative indicators of the flow field to be analyzed include: flow field contour lines, streamlines, tensor components, residual field distribution and residual convergence curve.

[0028] The method and device for automatic generation of geometrically adaptive unstructured grids provided by the embodiment of the present invention use basic geometric shapes to construct equations and calculate to form training sample data, use the training sample data to train the constructed deep network model, calculate the Eikonal equation for the new geometric shape to obtain the corresponding signed distance function, and use the corresponding grid size distribution function as the input of the deep network model. According to the generated grid size distribution function, the Frontal-Delaunay method is used to perform grid division of the domain corresponding to the geometric shape. After constructing the unstructured computing grid, the unstructured computing grid is used to perform DG solution of flow field distribution; the flow field distribution on the unstructured grid is used to perform post-processing of scalar, vector, and tensor numerical solutions on the unstructured grid, and residual calculation and global error analysis are performed; for the post-processing of the numerical solution, the flow field distribution including flow field contour lines, streamlines, tensor components, residual field distribution, residual convergence curve, etc. is visualized. This method can use the deep network model to generate a grid size distribution function that conforms to the characteristics of the geometric domain, and use simple maximum / minimum grid unit size parameters to generate unstructured grids of different sizes, and then solve the flow field distribution on the unstructured grid, reducing the intervention of artificial priori and improving efficiency. The generated grid symbol geometric domain characteristics achieve the automatic generation of geometrically adaptive unstructured grids. By dividing the geometric shape of the computational domain, a geometrically adaptive unstructured computational grid can be automatically generated, and then the flow field distribution calculation in computational fluid dynamics can be performed, thereby saving time and manpower in flow field analysis experiments, alleviating the occupation of laboratory human resources and reducing the time of flow field analysis experiments, and ultimately improving scientific research efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0030] Figure 1a , Figure 1b A schematic diagram of a system architecture provided by an embodiment of the present invention;

[0031] Figure 2a , Figure 2b A schematic diagram of a method flow chart provided by an embodiment of the present invention;

[0032] Figure 3 A schematic diagram of the deep network model structure provided by an embodiment of the present invention;

[0033] Figure 4A schematic diagram of a method framework for geometrically adaptive unstructured grid generation provided by an embodiment of the present invention;

[0034] Figure 5 A schematic diagram of a grid division structure provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0035] In order to enable those skilled in the art to better understand the technical solution of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. The embodiments of the present invention will be described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements with the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be interpreted as limiting the present invention. It can be understood by those skilled in the art that, unless specifically stated, the singular forms "one", "one", "said" and "the" used herein may also include plural forms. It should be further understood that the term "including" used in the specification of the present invention refers to the presence of the features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or their groups. It should be understood that when we say that an element is "connected" or "coupled" to another element, it can be directly connected or coupled to other elements, or there may also be intermediate elements. In addition, the "connection" or "coupling" used here may include wireless connection or coupling. The term "and / or" used herein includes any unit and all combinations of one or more associated listed items. It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical terms and scientific terms) used herein have the same meaning as generally understood by those of ordinary skill in the art to which the present invention belongs. It should also be understood that terms such as those defined in general dictionaries should be understood to have meanings consistent with the meanings in the context of the prior art, and will not be interpreted with idealized or overly formal meanings unless defined as herein.

[0036] The embodiment of the present invention provides a method for automatically generating a geometrically adaptive unstructured grid, which can be applied to the system shown in FIG1. Figure 2a As shown, including:

[0037] S1. Initialize the geometric shape of the computational domain to be divided, thereby obtaining the basic geometric shape of the computational domain to be divided.

[0038] In this embodiment, in the system architecture diagram shown in Figure 1, it includes: the client provides a basic geometric shape of the partitioned domain, the server uses the information provided by the client to construct equations and calculate to complete the construction of the training sample database, and uses the training sample database to complete the training of the deep network model; combined with the geometric shape of the domain to be divided provided by the client, the server generates the input of the deep network model, and uses the trained deep network model to predict the corresponding grid size distribution; the server uses the maximum / minimum unit size value provided by the client and the predicted grid size distribution to divide the geometric domain, and returns the unstructured grid to the client.

[0039] S2, constructing a training sample database according to the geometric shape of the computational domain to be divided;

[0040] Among them, the Eikonal equation is constructed and the signed distance function is calculated as an implicit representation, the point source Poisson equation is constructed and the grid size distribution function is calculated, and the signed distance function and the grid size distribution function constitute a pair of training samples. Specifically, the geometric shape of the computational domain to be divided includes: the basic geometric shape of simple polygons, such as triangles, pentagons, hexagons, etc. The parameters used to represent the difference in shape include size, shape, direction and position. Thus, the basic geometric shapes of simple polygons such as triangles, pentagons, hexagons, etc. are different in size, shape, direction and position.

[0041] In this embodiment, the basic partition domain geometry provided by the client is used to construct the eikonal equation and the point source Poisson equation in the server and calculate to form training sample pairs, wherein the basic partition domain geometry refers to the basic geometry of simple polygons such as triangles, pentagons, hexagons, etc. that are different in size, shape, direction and position. The basic geometry is easy to generate and can efficiently and accurately establish training samples.

[0042] S3. Establish a deep network model, wherein the deep network model includes two condition generators and two multi-scale condition discriminators;

[0043] In this embodiment, a deep learning network model is constructed, including: a conditional generator and a conditional discriminator in an adversarial generative neural network; the conditional generator is composed of a global generator and a local generator, which respectively aggregate the global and local information in the calculation domain; the conditional discriminator is a multi-scale discriminator structure, which is composed of two discriminators of different scales, and the discriminators discriminate between real data and generated data at different scales.

[0044] S4. Use the training sample database to train the deep learning network model.

[0045] In the training process, the signed distance and grid size distribution can be used as conditional input and supervision information of the model.

[0046] S5. Using the trained deep learning model, generate a grid size distribution corresponding to the geometric shape of the computational domain to be divided;

[0047] S6, using the grid size distribution to generate an unstructured computational grid for the computational domain to be divided, wherein the undivided geometric domain is meshed using the Frontal-Delaunay method and the grid size distribution function.

[0048] Further, such as Figure 2b As shown, it also includes:

[0049] S7, using the unstructured computational grid to perform DG to solve the flow field distribution. The DG method is used to solve the flow field distribution, the DG method performs spatial discretization on the units of the unstructured grid, uses high-order discontinuous elements, so that the error convergence rate reaches a high order; and uses an implicit time advance method to improve the stability of time discretization.

[0050] S8, using the flow field distribution on the unstructured grid, performing post-processing of the numerical solution of scalar, vector and tensor on the unstructured grid and performing residual and global error calculation and analysis. The flow field distribution on the unstructured grid is stored in the grid nodes, and the node numerical solution is post-processed.

[0051] S9, after processing the numerical solution, flow field distribution visualization including multiple quantitative indicators is performed, including visualization of contour maps, streamline maps, vorticity fields, lift coefficients, drag coefficients, and residual convergence distribution curves.

[0052] In this embodiment, in S2, it includes: obtaining the signed distance through the Eikonal equation, using the signed distance as an implicit representation of the geometric shape, constructing the point source Poisson equation and calculating the grid size distribution, and forming a pair of training samples with the obtained signed distance and the grid size distribution, and storing them in the training sample database.

[0053] Specifically, the geometric shape of the computational domain to be divided contains key point sources, such as various polygon vertices; the Eikonal equation is constructed with the point source, and the equation is numerically calculated to obtain an implicit representation of the geometric shape of the computational domain, namely, the signed distance; the point source Poisson equation is constructed with the point source, and the point source Poisson equation is calculated to obtain the grid size distribution of the computational domain; the signed distance of the computational domain and the grid size distribution constitute a pair of training samples. For example: the grid size distribution corresponding to the geometric shape can be constructed according to the basic geometric shape described in S1, and the grid size distribution is the solution of the point source Poisson equation. That is, the Eikonal equation is constructed and the signed distance is calculated as an implicit representation, the point source Poisson equation is constructed and the grid size distribution is calculated, and the signed distance and the grid size distribution constitute a pair of training samples and are stored in the training sample database.

[0054] In this embodiment, the construction and calculation of the Eikonal equation refers to: the signed distance function is an implicit representation of the geometric shape, describing the distance from each point in the space to the geometric shape; the signed distance function is negative inside the geometric shape, the signed distance function is positive outside the geometric shape, and the signed distance function on the geometric shape is 0. The signed distance obtained by the Eikonal equation is defined as follows:

[0055] pass Calculate the signed distance function and use the result as the signed distance, where Ω represents the geometric domain, Γ represents the geometric domain boundary, and d Ω represents the signed distance (also called "Euclidean distance"), and v represents the evolution speed of the boundary along the local normal direction, and u is the evolution function of the closed curve. The equation describes the evolution of the closed curve as a function of the time u that evolves at the boundary point x with the normal velocity v. When v=1, the solution u of the Eikonal equation is the signed distance function, and calculating the Eikaonal equation is to calculate the signed distance function as an implicit representation of the geometric shape of the partition domain represented by Ω. As shown in Figure 1, the server provides an Eikoanl equation calculator, which uses the Fast Marching Method to calculate the equation. The Fast Marching Method simulates the propagation of the front and divides the nodes into three categories: accept, active, and away. It iterates until all point states are accepted, and the node value is the distance to the geometric boundary.

[0056] Specifically, the construction and calculation of the point source Poisson equation means that in the process of meshing, it is very important to generate a reasonable hierarchical grid that conforms to the geometric characteristics of the partition domain. The grid size distribution function is a key factor in generating an efficient and reasonable grid, and largely determines the element distribution of the generated grid. As shown in Figure 1, the server gives the calculation of the point source Poisson equation. The point source Poisson equation in this embodiment is designed as follows, including:

[0057] pass Get the grid size distribution S, where S is the solution of the point source equation, i.e., the grid size distribution, (x n ,y n ) represents the position of the nth point source, n is a positive integer, represents the differential operator, N represents the number of point sources, i represents the node index on the background grid, ψ n represents the weight factor of each point source, J n Indicates that the size of the background grid is inversely proportional to the Euclidean distance to the nth point source, I n It is inversely proportional to the Euclidean distance to the nth point source, r nrepresents the Euclidean distance to the nth point source, S n Indicates the grid size value at the nth point source, x i Represents the x-coordinate and y-coordinate of the i-th node on the background grid i Represents the y coordinate of the i-th node on the background grid. Specifically, in this embodiment, the key points in the geometric shape of the partition domain provided by the client are used as point sources in the Poisson equation to construct the point source Poisson equation. A uniform rectangular background grid is constructed in the unit rectangular domain, and the point source Poisson equation is converted into a variational form, and the equation is discretized on the background grid. The point source Poisson equation is calculated using the finite element method of the P1 Lagrangian unit to obtain the grid size function discretized on the background grid, and the grid size function of the corresponding geometric partition domain is obtained by interpolation calculation on the background grid.

[0058] In this embodiment, in S3, the deep network model is composed of a global generator, a local generator and two multi-scale conditional discriminators. The conditional generator is composed of convolution and transposed convolution, wherein the convolution kernel in the first and last convolution layers is 7, the step length is 1, and the convolution kernel in other convolutions or transposed convolutions is 3, the step length is 2; the conditional discriminator is composed of convolution, wherein the output layer convolution kernel is 4, the step length is 1, and the convolution kernel in other convolution layers is 4, the step length is 2.

[0059] For example: The deep learning network model is mainly composed of two generators and two discriminators, such as Figure 3 As shown in the deep learning network model, the two generators are the local generator G1 and the global generator G2, and the two discriminators are the multi-scale discriminators D1 and D2. The composition of the generator means that the generator is composed of two generators, G1 and G2, where Figure 3 As shown in , G11 is the front part of the G1 generator, and G12 is the back part of the G1 generator. The output of the G2 generator is added to G11 and then sent to G12; the first and last layers in G1 are input and output layers, the downsampling module is composed of two convolutions, the upsampling module is composed of one transposed convolution and one convolution, and the residual module is composed of two convolution layers and two normalization layers; the first and last layers in G2 are input and output layers, the downsampling module is composed of three layers of convolution, the upsampling module is composed of three layers of transposed convolution, and the residual module is composed of two convolution layers and two normalization layers. In the preferred embodiment, the convolution kernel in the input layer and output layer convolution of G1 and G2 is 7, and the step size is 1, and the convolution kernel in other convolutions or transposed convolutions is 3, and the step size is 2. The composition of the multi-scale discriminator refers to: the discriminator is composed of two multi-scale discriminators D1 and D2, such as Figure 3As shown in the deep network model, D1 distinguishes the predicted grid size distribution from the real grid size distribution at a low scale, so D1 has a higher receptive field and can guide the generator to generate a globally consistent grid size distribution; D2 distinguishes the predicted grid size distribution from the real grid size distribution at a high scale, so D1 has a smaller receptive field and can guide the generator to generate a hierarchical and gradient-restricted grid size distribution. In the preferred embodiment, D1 and D2 have the same neural network structure, but perform convolution at different scales. The convolution kernels of the output layers of D1 and D2 are 4 and the step size is 1, and the convolution kernels of other convolution layers are 4 and the step size is 2.

[0060] In this embodiment, in S4, it includes: training to obtain the optimal model parameters of the condition generator and the condition discriminator in the deep learning model, wherein the signed distance and the grid size distribution of the training samples are extracted from the training sample database and used as the input conditions and supervision information for training the deep learning model respectively; the condition generator outputs the corresponding grid size distribution; and the condition discriminator is used to discriminate between the grid size distribution of the calculated point source Poisson equation and the grid size distribution generated by the condition generator.

[0061] In the process of training the deep learning network model, it is necessary to use the training sample database, where the signed distance function and the grid size distribution function are used as the input and supervision information of the network model. The signed distance function is sent to the network model to predict the grid size distribution, and compared with the real grid size distribution function through the discriminator, and the network model parameters are updated using the adversarial loss function. Among them, the input, output and data flow of the deep learning network model refer to: the signed distance function is used as the conditional input of the generator, such as Figure 3 As shown in the generation stage, the input is sent to the front part G11 of the G1 generator, and the input is sent to G2 after downsampling. The output of G11 is added to the output of G2 and sent to the back part of the G1 generator. The output of G2 is the predicted grid size distribution function; the signed distance function is also used as the conditional input of the discriminator, as shown in Figure 3 As shown in the discrimination stage, the multi-scale discriminators D1 and D2 respectively judge the predicted grid size distribution and the actual size distribution to obtain D1 loss and D2 loss, which constitute the adversarial loss of the entire network model.

[0062] The deep network model mainly adopts the adversarial generation architecture. In the process of training to obtain the optimal model parameters of the conditional generator and conditional discriminator in the deep learning model, the network can be back-propagated according to the loss function of the deep network model to update the model parameters. Specifically, the loss function used for supervised training includes: Among them, G={G1,G2}, G represents the condition generator, G1 and G2 represent the first and second condition generators respectively, and D1 and D2 represent the first and second condition discriminators respectively.

[0063] Represents the adversarial loss of the anti-generation network:

[0064] Where x and y represent a pair of training data in the training sample, x specifically represents the sample label, and y specifically represents the real sample. represents the expected value associated with x, y, represents the expected value associated with x, G() represents the output of the generator, and D() represents the output of the discriminator.

[0065] In this embodiment, in S5, the trained deep learning model can be used to construct the Eikonal equation for the new undivided computational domain geometry and calculate the equation to obtain the signed distance, which is used as the conditional input of the conditional generator to obtain the grid size distribution corresponding to the geometry.

[0066] Among them, for the new undivided computational domain geometry, the Eikonal equation is constructed according to its key point source, and the equation is calculated to obtain the implicit representation of the geometry, the signed distance; the signed distance is used as the conditional input of the trained conditional generator to obtain the grid size distribution corresponding to the geometry. For example: Figure 1a or Figure 1b In these two possible server-client system frameworks, the server uses the geometric shape of the domain to be divided provided by the client to calculate the signed distance function as the input of the deep learning network model, and uses the trained deep learning network model to predict the grid size distribution function corresponding to the geometric shape of the domain to be divided. Constructing the input of the network model and predicting the grid size distribution function means: Figure 4 As shown in the construction of the deep model input, the geometric shape of the domain to be divided provided by the client is used to obtain the corresponding signed distance function using the fast marching method; the trained deep learning network model only loads the generator parameters in the prediction stage, and the signed distance function is used as the input of the generator to output the grid size distribution corresponding to the geometric shape of the domain to be divided.

[0067] In this embodiment, in S6, it includes: using off-center points as Steiner vertices in Delaunay triangulation to mesh the computational domain to be divided. Among them, the undivided computational domain is meshed using the Frontal-Delaunay method, which combines the high-quality mesh units in the front advancement method with the good topological structure in the Delaunay triangulation; using off-center points as Steiner vertices in the Delaunay triangulation, the off-center is a point along the edge in the relevant Voronoi diagram; for a given unit to be refined, the determination of the off-center position is based on the isosceles triangle formed by the shortest side of the unit to be refined, and the off-center point has three local optimal positions, namely the unit circumcenter, the local size optimal point, and the local shape optimal point.

[0068] For example, as shown in Figure 1, the server receives the maximum and minimum grid cell size values ​​provided by the client, uses the predicted grid size distribution function to gradually divide the computational domain to be divided using the off-center as the Steiner vertex in the Frontal-Delaunay method until the grid division satisfies the grid size distribution, and returns the unstructured grid to the client. Specifically, the cell size value in the Frontal-Delaunay method and the grid size distribution function refer to: Figure 5 As shown in the schematic diagram of the mesh division structure, the mesh division process uses the Frontal-Delaunay method, which combines the high-quality mesh units in the front advancement method with the good topological structure in the Delaunay triangulation. The parameters required by the Frontal-Delaunay method are the mesh size distribution predicted by the deep network model, the geometric shape of the domain to be divided, and the size of the maximum / minimum mesh unit; among them, the geometric shape describes the computational domain to be divided, the mesh size distribution describes the expected unit size distribution that is adaptive to the geometric characteristics of the division domain, and the maximum / minimum unit size value is used to control the mesh scale. For example, if the maximum / minimum unit value is set to 0.1 / 0.001, the divided mesh will have 3000-4000 mesh units, or if it is set to 0.2 / 0.0001, the divided mesh will have 10000-15000 mesh units. The specific unit size value is determined according to the accuracy required for numerical calculation.

[0069] Off-center as a Steiner vertex refers to: Figure 5As shown in the figure, the Frontal-Delaunay method uses off-center as Steiner vertex to add mesh units layer by layer to divide the computational domain. For a given unit to be refined, the position of the off-center point is determined based on the isosceles triangle formed by the shortest side of the unit to be refined. To ensure that the mesh meets the local shape and size constraints, the placement strategy of the off-center point position is divided into c 1 ,c 2 ,c 3 , three cases, vertex c 1 Equivalent to the traditional element circumference center, used to satisfy the element radius edge ratio constraint; c 2 is the size optimum, designed to satisfy the element size constraints in a local optimal way; c 3 Point design is to reduce the number of Steiner vertices required to satisfy the required element radius edge ratio; the final off-center point c is selected as the point c that satisfies the worst-case local constraint i ,i=1,2,3.

[0070] Meshing to meet the mesh size distribution means: Figure 5 As shown in the figure, the Frontal-Delaunay method adds mesh units layer by layer in the meshing process and iterates until the computational domain mesh is completely divided. The mesh size function combines the size constraints imposed by the user and the geometry of the domain to be divided. Whether the divided mesh satisfies the geometric adaptation of the divided domain is controlled by the mesh size function. Therefore, judging whether the mesh divided by the Frontal-Delaunay method meets the requirements of mesh size distribution is to judge whether the current divided domain is completely divided.

[0071] In this embodiment, in S7, it includes: using the DG method through high-order discontinuous elements, including 3rd-order, 5th-order, 7th-order and other high-order discontinuous elements, to achieve high-precision spatial discretization on the unstructured grid. Each discrete unit is represented by a local polynomial, where the polynomial in the unit is represented as U k is the solution in the cell, k is the grid cell number, φ i is the polynomial basis function, U i is the basis function coefficient, and N is a positive integer. Due to the unit discontinuity of the DG method, coupling is performed through numerical flux, and the following flux is used here:

[0072]

[0073] in, and is the basic solution of the left and right units, F(U) is the flux, and α is the flux stability parameter. For the time discretization, the implicit time advance method is used here, and the specific time discretization method is as follows: where k i is an intermediate quantity, defined as

[0074]

[0075] {a ij} is a matrix of order s, b i and c i are weights and node coefficients, Δt is the time step, y n is the current state, k j is the intermediate variable, t n is the current time point, and n is the current time step number.

[0076] In this embodiment, in S8, it includes: on the flow field distribution of the unstructured grid, the scalar, vector, and tensor numerical solutions are all stored in the grid nodes, and the curl, divergence, and gradient derivative terms are calculated on the unstructured grid using high-order interpolation, wherein the gradient is calculated by constructing a local interpolation polynomial through the node, the flow field curl is calculated by interpolating the node velocity, and the divergence is obtained by differentiating the reconstruction result of the velocity field. For residual calculation, select node i, and calculate the local residual of the point according to the numerical solution at node i into the discrete equation f, as follows

[0077]

[0078] Among them, R i represents the local residual, U i is the node numerical solution, w ij is the weight, j is the neighborhood node, and the local residuals in all nodes are summarized to obtain the overall residual distribution of the flow field distribution. To calculate the global error, the continuous distribution of the flow field between nodes is obtained by interpolation, and then the numerical solution obtained by interpolation is compared with the high-precision reference solution to obtain the global error.

[0079] In this embodiment, in S9, it includes: the flow field distribution on the unstructured grid is visualized after post-processing of the scalar, vector, and tensor numerical solutions. Among them, the pressure value is extracted from the node data of the unstructured grid to connect the nodes with the same pressure value to construct a pressure distribution contour map; the U, V, and W velocity components are extracted from the velocity numerical solution of the unstructured grid node, and the velocity field is interpolated to obtain a continuous distribution of the velocity field; the vorticity of each grid node is calculated based on the velocity field and the vorticity field is interpolated; according to the pressure distribution and wall shear stress distribution in the flow field, the force acting on the surface of the object is calculated, and then the lift coefficient and the drag coefficient are obtained by standardization.

[0080] This embodiment also provides a device for automatically generating a geometrically adaptive unstructured grid, comprising:

[0081] The parameter specification module specifies different local parameters for the basic partition domain geometry in the client. That is, different spacings and weights need to be specified for different basic partition domain geometry for constructing the training sample database. The point source Poisson equation is solved with different geometry, spacing, and weights to construct the training data set.

[0082] A receiving module is used to receive the request information sent by the client, and initialize the geometric shape of the computational domain to be divided according to the request information, wherein the setting parameters in the request information include: the geometric shape of the basic division domain, the spacing, the weight local parameters, the geometric shape of the domain to be divided, and the maximum / minimum grid unit size value;

[0083] Sample processing module: used to construct a training sample database according to the geometric shape of the computational domain to be divided; wherein, the geometric shape of the basic division domain can be used to construct equations and obtain numerical solutions to construct the training sample database.

[0084] Network training module: used to establish a deep network model and train the deep learning network model using the training sample database, wherein the deep network model includes two condition generators and two multi-scale condition discriminators;

[0085] A network prediction module is used to generate a grid size distribution corresponding to the geometric shape of the computational domain to be divided using the trained deep learning model;

[0086] A grid partitioning module: used for constructing an unstructured grid of the computational domain to be partitioned by using the grid size distribution and the maximum / minimum grid unit size values;

[0087] Output module: used for feeding back the unstructured grid data to the client;

[0088] Solving module: used to utilize the unstructured grid data output by the output module, and use DG to solve the Navier-Stokes equations under the large eddy simulation model on the unstructured grid, so as to obtain the flow field distribution.

[0089] Grid post-processing module: used to perform post-processing of scalar, vector and tensor numerical solutions stored in different nodes of flow field distribution on unstructured grids, and perform residual global error calculation and analysis;

[0090] Physical distribution visualization module: for post-processing of the numerical solution, flow field distribution visualization including flow field contour lines, streamlines, tensor components, residual field distribution, residual convergence curve, etc. is performed.

[0091] The embodiment of the present invention uses the simple basic geometric shape provided by the client, constructs the corresponding differential equation and calculates on the server, constructs the corresponding training sample database, uses the training sample database to train the deep network model, and then constructs the geometric adaptive unstructured grid and returns it to the client according to the new geometric shape and size parameters of the domain to be divided provided by the client. The advantages of the implementation of the present invention are: only the simple and easy-to-obtain basic division domain geometric shape is used to construct the database, and the deep learning network model is used to learn the relationship between the grid size distribution and the division domain geometry. For the more complex geometric shape of the domain to be divided, the deep network model can predict the corresponding geometric adaptive grid size distribution, and then the grid size distribution and size parameters can be used to obtain a hierarchical and reasonable geometric adaptive unstructured grid. Using the simple and easy-to-obtain basic division domain geometric shape to construct the training sample database will greatly reduce the time and economic cost of modeling due to the method required to obtain a large amount of data; at the same time, the deep learning network model in the embodiment of the present invention is easy to implement. Once the model is trained with the training sample database, only a small amount of information on the geometric shape and two size parameters is required to obtain a hierarchical and reasonable, adaptive to the geometric shape, and conforming to the geometric characteristics of the division domain. The artificial prior and artificial interaction in the grid generation process are greatly reduced, thereby greatly reducing the time and economic cost required for generating unstructured grids.

[0092] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. The above is only a specific implementation method of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or replacements that can be easily thought of by any technician familiar with the technical field within the technical scope disclosed by the present invention should be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. A method for automatic generation of geometrically adaptive unstructured grids, characterized in that: include: S1. The server receives the geometric shape of the computational domain to be divided initialized by the client, wherein the geometric shape of the computational domain to be divided corresponds to the flow field to be analyzed; S2, the server constructs a training sample database according to the geometric shape of the computational domain to be divided; S3. The server establishes a deep network model, wherein the deep network model includes two condition generators and two multi-scale condition discriminators; S4, the server trains the deep learning network model using the training sample database; S5. The server generates a grid size distribution corresponding to the geometric shape of the computational domain to be divided using the trained deep learning model; S6. The server generates an unstructured computational grid for the computational domain to be divided using the grid size distribution, and then uses the unstructured computational grid to analyze the flow field distribution, wherein the obtained flow field distribution result is returned to the client for display.

2. The method according to claim 1, characterized in that The method of analyzing the flow field distribution by using an unstructured computational grid includes: S7, using the unstructured computational grid to perform flow field distribution analysis; S8, performing post-processing of numerical solutions of scalars, vectors and tensors on the unstructured grid according to the flow field distribution on the unstructured grid; S9. Sending flow field quantitative indicators for flow field distribution visualization to the client according to the result of numerical solution post-processing, wherein the flow field quantitative indicators of the flow field to be analyzed include: flow field contour lines, streamlines, tensor components, residual field distribution and residual convergence curve.

3. The method according to claim 2, characterized in that In S7, these include: The DG (Discontinuous Garlekin) method is used to spatially discretize the cells of the unstructured grid, and then the high-order discontinuous element is used to make the error convergence rate after discretization reach a high order.

4. The method according to claim 2, characterized in that In the flow field distribution divided by unstructured grid, the scalar, vector and tensor numerical solutions are stored in the grid nodes; In S8, it includes: after performing data interpolation processing on the numerical solution of the grid node, selecting a grid node for the calculation residual on the grid and calculating the numerical solution of the point; For the global error, the overall error is calculated using the interpolated numerical solution and the reference solution; the local residual R is obtained by substituting the numerical solution into the discrete equation. i , i is the grid node number, and the residual field R is obtained by summing up the local residuals of all nodes.

5. The method according to claim 2, characterized in that In S9, the features are: After the flow field distribution on the unstructured grid is processed by scalar, vector and tensor numerical solutions, the pressure distribution isovalue schematic diagram, velocity distribution streamline schematic diagram and vortex field schematic diagram to be analyzed are generated, and the lift coefficient curve, drag coefficient curve and residual convergence distribution curve are generated. The generated schematic diagrams and curves are visualized through the client.

6. The method according to claim 1, characterized in that The geometrical shape of the computational domain to be divided includes: a basic geometrical shape of a simple polygonal class, and the parameters used to represent the difference in shape include size, shape, direction and position; In S2, it includes: The signed distance is obtained by the Eikonal equation, wherein the signed distance is used as an implicit representation of the geometric shape; The point source Poisson equation is constructed and the grid size distribution is calculated. The obtained signed distance and the grid size distribution constitute a pair of training samples and are stored in the training sample database.

7. The method according to claim 6, characterized in that The signed distance is obtained by the Eikonal equation, including: pass Calculate the signed distance function and use the result as the signed distance, where Ω represents the geometric partition domain, Γ represents the geometric partition domain boundary, d Ω represents the signed distance, and v represents the evolution speed of the boundary along the local normal direction, and u is the evolution function of the closed curve; The step of constructing a point source Poisson equation and calculating the grid size distribution includes: Poisson's equation via a point source: Get the grid size distribution S, where (x n ,y n ) represents the position of the nth point source, n is a positive integer, represents the differential operator, N represents the number of point sources, i represents the node index on the background grid, ψ n represents the weight factor of each point source, J n Indicates that the size of the background grid is inversely proportional to the Euclidean distance to the nth point source, I n It is inversely proportional to the Euclidean distance to the nth point source, r n represents the Euclidean distance to the nth point source, S n Indicates the grid size value at the nth point source, x i Represents the x-coordinate and y-coordinate of the i-th node on the background grid i Represents the y coordinate of the i-th node on the background grid.

8. The method according to claim 1, characterized in that The conditional generator is composed of convolution and transposed convolution. The convolution kernel in the first and last convolution layers is 7 and the stride is 1. The convolution kernel in other convolution or transposed convolution layers is 3 and the stride is 2. The conditional discriminator is composed of convolutions, where the output layer has a convolution kernel of 4 and a stride of 1, and the other convolution layers have a convolution kernel of 4 and a stride of 2.

9. The method according to claim 1, characterized in that: In S4, it includes: Training to obtain optimal model parameters of a conditional generator and a conditional discriminator in the deep learning model, wherein the signed distance and grid size distribution of training samples are extracted from the training sample database and used as input conditions and supervision information for training the deep learning model, respectively; The condition generator outputs the corresponding grid size distribution; the condition discriminator is used to discriminate the grid size distribution of the calculated point source Poisson equation and the grid size distribution generated by the condition generator; In the process of training to obtain the optimal model parameters of the conditional generator and the conditional discriminator in the deep learning model, the loss function used for supervised training includes: Where G = {G1, G2}, G represents the condition generator, G1 and G2 represent the first and second condition generators respectively, D1 and D2 represent the first and second condition discriminators respectively, represents the adversarial loss of the anti-generative network; Where x and y represent a pair of training data in the training sample, x specifically represents the sample label, and y specifically represents the real sample. represents the expected value associated with x, y, represents the expected value associated with x, G() represents the output of the generator, and D() represents the output of the discriminator.

10. A device for automatic generation of geometrically adaptive unstructured grids, characterized in that: include: A parameter specifying module, used for specifying different local parameters for different basic partition domain geometric shapes according to user operations in the client; A receiving module is used to receive the request information sent by the client, and initialize the geometric shape of the computational domain to be divided according to the request information, wherein the setting parameters in the request information include: the geometric shape of the basic division domain, the spacing, the weight local parameter, the geometric shape of the domain to be divided, and the maximum / minimum grid unit size value; Sample processing module: used to construct a training sample database according to the geometric shape of the computational domain to be divided; Network training module: used to establish a deep network model and train the deep learning network model using the training sample database, wherein the deep network model includes two condition generators and two multi-scale condition discriminators; A network prediction module is used to generate a grid size distribution corresponding to the geometric shape of the computational domain to be divided using the trained deep learning model; A grid partitioning module: used for constructing an unstructured grid of the computational domain to be partitioned by using the grid size distribution and the maximum / minimum grid unit size values; Output module: used to feed back the unstructured grid data to the client; Solution module: used to perform flow field distribution analysis using the unstructured computational grid; A grid post-processing module is used for performing numerical solution post-processing of scalars, vectors and tensors on the unstructured grid according to the flow field distribution on the unstructured grid; Physical distribution visualization module: according to the result of post-processing of the numerical solution, the flow field quantitative indicators for flow field distribution visualization are sent to the client, wherein the flow field quantitative indicators of the flow field to be analyzed include: flow field contour lines, streamlines, tensor components, residual field distribution and residual convergence curve.

Citation Information

Cited By

  • GAN-based high-speed aerodynamic heat flow field reconstruction method and system

    CN120163073A

  • Physical field prediction method and related device

    CN122471883A