Adaptive Cartesian grid finite difference discretization method, system, device and medium
Through the adaptive Cartesian grid finite difference discrete method, the problems of high-order accuracy expansion and suspension grid processing of finite volume method are solved, and efficient and accurate results of aircraft aerodynamic shape optimization are achieved.
Patent Information
- Application Number
- CN202411783087.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-06
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2044-12-06
AI Technical Summary
In the optimization of aircraft aerodynamic shape, it is difficult to implement high-order accuracy expansion of finite volume method, and suspended mesh in the adaptive Cartesian grid calculation domain requires special processing, resulting in high calculation costs and low accuracy.
The finite difference discrete method of adaptive Cartesian grid is adopted. By constructing a Cartesian grid and performing adaptive encryption, numerical format discrete is performed on the uniform grid, and the uniform grid nodes of the suspended grid are constructed through high-precision interpolation to achieve finite difference discreteness.
The calculation cost of numerical simulation based on Cartesian grid is reduced, the accuracy of the simulation results is improved, and accurate aircraft aerodynamic shape optimization results are obtained.
Smart Images

Figure CN119249833B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of numerical simulation, and in particular to an adaptive Cartesian grid finite difference discretization method, system, device and medium. Background Art
[0002] Computational Fluid Dynamics (CFD) often needs to simulate some flows of interest in engineering, such as aircraft aerodynamic shape optimization, automotive aerodynamics, etc. In these flows, high Reynolds numbers or wall flows are often involved. In numerical simulations based on Cartesian grids, if uniform grids are used, the grid size will be huge and the calculation time will be greatly increased. Therefore, adaptive Cartesian grid encryption technology is usually used to reduce the grid density in areas with smoother flow fields and appropriately encrypt in complex areas to improve the solution accuracy. This can greatly reduce the computational cost of the entire simulation.
[0003] At present, the commonly used methods for adaptive Cartesian grids are: overlapping Cartesian grid method, block Cartesian grid method and whole block Cartesian grid method. 1) In the overlapping Cartesian grid method, the connection between different grids is usually achieved by interpolating the required variables between overlapping domains, which increases the complexity of the algorithm. 2) In the block Cartesian grid method, the computational domain is decomposed into multiple blocks, and Cartesian grids of uniform size are used in each block. Overlapping is not allowed between blocks, and inconsistent grid interfaces need to be processed. 3) The whole block Cartesian grid method has the advantage of the grid generation flexibility of the Cartesian fork tree data structure, which is suitable for processing complex geometric problems.
[0004] In an adaptively refined grid, a large grid with a small grid may appear, which is called a hanging grid. It refers to a grid topology feature in which the nodes (or boundaries) of the hanging grid cells are not aligned with the standard grid in the local structure of the grid. Figure 1 As shown, this brings certain challenges to the calculation. The whole Cartesian grid method uses an unstructured finite volume method to discretize, and treats the large / small grid interface at the hanging grid as two edges (or faces) to solve the hanging node problem. However, the finite volume method has difficulties in expanding to higher-order accuracy. At the same time, in the computational domain of the adaptive Cartesian grid, most areas are grids of the same level with uniform size. This grid form is very convenient for finite difference discretization to achieve high-order accuracy. However, the selection of discrete template points in the hanging grid area should be modified accordingly according to the specific situation. Summary of the invention
[0005] The purpose of the present invention is to solve the problems of difficulty in implementing high-order precision expansion of the finite volume method and special processing of suspended grids in the adaptive Cartesian grid calculation domain in the optimization of aircraft aerodynamic shape. The present invention has the advantages of being simple, reliable and efficient, and can be applied to the research on optimization of aircraft aerodynamic shape in CFD engineering numerical simulation.
[0006] To achieve the above-mentioned object of the invention, the present invention provides an adaptive Cartesian grid finite difference discretization method, the method comprising:
[0007] Step 1: Construct a Cartesian grid based on the aircraft parameters, perform adaptive encryption on the Cartesian grid, and obtain the computational domain of the adaptive Cartesian grid discretization;
[0008] Step 2: Discretize the uniform grid in the computational domain in a numerical format to obtain the first discrete result;
[0009] Step 3: For the hanging grid in the computational domain, obtain the target point for constructing the hanging grid into a uniform grid; calculate the flow field information of the target point based on the flow field information of the grid around the target point;
[0010] Step 4: Based on the flow field information of all target points, the suspension grid is constructed as a uniform grid, and the constructed uniform grid is discretized in a numerical format to obtain a second discrete result;
[0011] Step 5: Integrate the first discrete result and the second discrete result to obtain the discrete result under the current iteration step;
[0012] Repeat steps 2 to 5 to perform iterative solution until convergence to obtain the final discrete result, and obtain the aerodynamic shape optimization result of the aircraft based on the final discrete result. Among them, this method can reduce the computational cost in numerical simulation based on Cartesian grids, and improve the accuracy of simulation results, and obtain accurate aerodynamic shape optimization results of aircraft based on high-precision simulation results. This method constructs an equidistant difference template at a non-uniform grid to make it suitable for a suspension grid, and matches the commonly used finite difference format to achieve finite difference discretization, which can be used for CFD numerical simulation based on an adaptive Cartesian grid.
[0013] Among them, this method constructs equidistant node information at the hanging grid to enable finite difference discretization at the hanging grid. The five-point difference template constructed at the hanging grid (that is, the five-point template contains information about the current grid and two adjacent nodes in the positive and negative directions in a certain dimension) can match the commonly used finite difference format and achieve higher-order accuracy on the adaptive Cartesian grid.
[0014] Wherein, the step 3 specifically includes:
[0015] The hanging grids are divided into the first type of hanging grids and the second type of hanging grids; the first type of hanging grids are: the neighboring grids of the discretized grids have subgrids with a higher level than the discretized grid; the second type of hanging grids are: the neighboring grids of the discretized grids have parent grids with a lower level than the discretized grid;
[0016] For the first type of hanging grid, a target point corresponding to the uniform grid constructed by constructing the first type of hanging grid is obtained, a target grid is obtained based on the target point, four subgrids corresponding to the target grid are obtained, and flow field information of the target point is obtained by interpolation based on flow field information of the four subgrids;
[0017] For the second type of hanging grid, the second type of hanging grid is divided into Tp type and Tpp type. The Tp type is that the distance between the target point and the parent grid corresponding to the discretized grid is equal to the side length of the parent grid, and the Tpp type is that the distance between the target point and the parent grid corresponding to the discretized grid is equal to twice the side length of the parent grid;
[0018] For the Tp type second type hanging grid, the flow field information of the target point is obtained by: determining the parent grid c1 that is closest to the target point, determining the right neighbor grid c2 of the parent grid c1, the upper neighbor grid c3 of the parent grid c1, and the lower neighbor grid c4 of the parent grid c1 based on the parent grid c1, and obtaining the flow field information of the target point based on the interpolation calculation of the parent grid c1, grid c2, grid c3, and grid c4;
[0019] For the Tpp type second type hanging grid, the flow field information of the target point is obtained by: determining the parent grid c5 that is closest to the target point, determining the right neighbor grid c6 of the parent grid c5, the upper neighbor grid c7 of the grid c6, and the lower neighbor grid c8 of the grid c6 based on the parent grid c5, and obtaining the flow field information of the target point based on the interpolation calculation of the parent grid c5, grid c6, grid c7, and grid c8.
[0020] For the second type of hanging grid, the flow field information of the target point is calculated as follows:
[0021] ;
[0022] ;
[0023] in, is the flow field information of the target point, x R is the position vector of the target point, p T is the interpolation basis vector, linear basis , quadratic basis , x and y is the spatial coordinate component, a is the coefficient vector, P T WP is Dimension m× m The matrix of m is the number of bases in the basis function, T is the transpose of the matrix, is the position matrix of the selected grid, p(x n ) represents the grid x n The corresponding basis vectors are, is the diagonal expansion matrix of the distance from the grid to the target point, w n Represents the grid x n The distance to the target point.
[0024] Among them, the objective function is obtained by combining basis functions, specifically:
[0025] ;
[0026] in, represents the required variable and is related to the position vector x by minimizing the objective function J Determine the coefficient vector a, the objective function J for:
[0027] ;
[0028] in, n is the number of grids, subscript R represents the corresponding target point, is the flow field value vector of the selected grid, x i For point i The corresponding position vector, is the position vector x i The corresponding flow field value vector, For point i The corresponding flow field value vector, For point i The distance weight to the target point.
[0029] Among them, for the first type of hanging grid, the flow field information of the target point is calculated as follows:
[0030] ;
[0031] in, is the flow field information of the target point, to They are the flow field information of 4 sub-grids respectively.
[0032] The present invention also provides an adaptive Cartesian grid finite difference discretization system, the system comprising:
[0033] An encryption unit is used to construct a Cartesian grid based on aircraft parameters, adaptively encrypt the Cartesian grid, and obtain a computational domain of adaptive Cartesian grid discretization;
[0034] A first discrete unit is used to perform numerical discretization on a uniform grid in a computational domain to obtain a first discrete result;
[0035] A calculation unit is used to obtain a target point for constructing the suspended grid into a uniform grid for the suspended grid in the calculation domain; and to obtain flow field information of the target point based on flow field information of the grid around the target point;
[0036] A second discrete unit is used to construct the suspension grid into a uniform grid based on the flow field information of all target points, and to perform numerical format discretization on the constructed uniform grid to obtain a second discrete result;
[0037] An integration unit, used for integrating the first discrete result and the second discrete result to obtain a final discrete result;
[0038] The calculation unit is used for iteratively solving based on the first discrete unit, the second discrete unit and the integrated unit until convergence to obtain a final discrete result, and obtaining an optimization result of the aerodynamic shape of the aircraft based on the final discrete result.
[0039] The present invention also provides an adaptive Cartesian grid finite difference discretization device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the adaptive Cartesian grid finite difference discretization method when executing the computer program.
[0040] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the adaptive Cartesian grid finite difference discretization method are implemented.
[0041] One or more technical solutions provided by the present invention have at least the following technical effects or advantages:
[0042] The present invention solves the problem of high-order precision expansion and hanging grid in adaptive Cartesian grid computational domain, which are difficult in finite volume method. Compared with the traditional unstructured finite volume discretization method, the adaptive Cartesian grid finite difference discretization method designed by the present invention has the following advantages:
[0043] In the uniform grid area, high-order finite difference formats can be easily implemented, such as the third-order MUSCL format and the third-order WENO format, etc. The complex high-order extension of the finite volume method is avoided, and at the same time, there is no need to perform complex coordinate change calculations between the physical space and the computational space under the Cartesian grid.
[0044] The present invention can realize finite difference discretization of adaptive Cartesian grids in the computational domain, effectively reduce the number of overall grids through adaptive encryption technology, and encrypt the flow relationship area to improve the overall accuracy.
[0045] The present invention is simple to implement, and the interpolation template is directly located by the neighbors of the adjacent grids; it is flexible and scalable, and can perform corresponding least squares basis function expansion according to the required accuracy order. It is a technical idea to obtain flow field information of equidistant node positions by selecting surrounding neighbor templates for least squares interpolation. At the same time, the present invention provides two DWSL interpolation point selection methods, which can meet different simulation accuracy requirements and improve the accuracy of aircraft aerodynamic shape optimization results. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] The drawings described herein are used to provide a further understanding of the embodiments of the present invention, constitute a part of the present invention, and do not constitute a limitation on the embodiments of the present invention;
[0047] Figure 1 It is a schematic diagram of the hanging grid in the present invention;
[0048] Figure 2 It is a flowchart of the adaptive Cartesian grid finite difference discretization method;
[0049] Figure 3 Schematic diagram for generating uniform grid;
[0050] Figure 4 A schematic diagram for identifying and encrypting the mesh intersecting with the object surface;
[0051] Figure 5 A schematic diagram for identifying the mesh intersecting with the object surface and encrypting it to a specified number of times;
[0052] Figure 6 This is a schematic diagram for smoothing the entire mesh;
[0053] Figure 7 It is a schematic diagram of a 2D uniform Cartesian grid 5-point difference template;
[0054] Figure 8 This is a schematic diagram of the first type of hanging grid;
[0055] Fig. 9 This is a schematic diagram of the second type of hanging grid;
[0056] Fig.10 is a schematic diagram of discrete directions of a two-dimensional Cartesian grid in the present invention;
[0057] Fig.11 It is a schematic diagram of the Tp type second type suspension grid in the present invention;
[0058] Fig.12It is a schematic diagram of the Tpp type second type suspension grid in the present invention;
[0059] Fig.13 It is a schematic diagram of the DWSL1 interpolation template corresponding to the Tp type second type suspension grid in the present invention;
[0060] Fig.14 It is a schematic diagram of the DWSL1 interpolation template corresponding to the Tpp type second type suspension grid in the present invention;
[0061] Fig.15 It is a schematic diagram of the DWSL2 interpolation template in the present invention;
[0062] Fig.16 It is a schematic diagram of the grid of the cylindrical example in the present invention;
[0063] Fig.17 It is a grid cloud map based on inverse distance weighted interpolation in the present invention;
[0064] Fig.18 It is a grid cloud image based on the DWSL1 interpolation of the present invention;
[0065] Fig.19 It is a grid cloud image based on the DWSL2 interpolation of the present invention;
[0066] Fig. 20 It is a contour cloud map based on inverse distance weighted interpolation in the present invention;
[0067] Fig.21 It is a contour line cloud map based on the DWSL1 interpolation of the present invention;
[0068] Fig. 22 It is a contour line cloud map based on the DWSL2 interpolation of the present invention;
[0069] Fig.23 Schematic diagram of the composition of the adaptive Cartesian grid finite difference discrete system. DETAILED DESCRIPTION
[0070] In order to more clearly understand the above-mentioned purpose, features and advantages of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present invention and the features in the embodiments can be combined with each other without conflict.
[0071] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those within the scope of this description. Therefore, the protection scope of the present invention is not limited to the specific embodiments disclosed below.
[0072] Embodiment 1;
[0073] Please refer to Figure 2 , Figure 2 The present invention provides an adaptive Cartesian grid finite difference discretization method, which includes:
[0074] Step 1: Construct a Cartesian grid based on the aircraft parameters, perform adaptive encryption on the Cartesian grid, and obtain the computational domain of the adaptive Cartesian grid discretization;
[0075] Step 2: Discretize the uniform grid in the computational domain in a numerical format to obtain the first discrete result;
[0076] Step 3: For the hanging grid in the computational domain, obtain the target point for constructing the hanging grid into a uniform grid; calculate the flow field information of the target point based on the flow field information of the grid around the target point;
[0077] Step 4: Based on the flow field information of all target points, the suspension grid is constructed as a uniform grid, and the constructed uniform grid is discretized in a numerical format to obtain a second discrete result;
[0078] Step 5: Integrate the first discrete result and the second discrete result to obtain the discrete result under the current iteration step;
[0079] Repeat steps 2 to 5 to perform iterative solution until convergence to obtain the final discrete result, and obtain the aerodynamic shape optimization result of the aircraft based on the final discrete result. The specific process is:
[0080] First, based on the characteristics of the adaptive Cartesian grid fork tree data structure, the Cartesian grid is adaptively encrypted in the fluid domain according to the object geometry information / flow characteristics, etc. Figure 3 As shown in Figure 2, the Cartesian grid discretization of the computational domain is achieved.
[0081] Figure 3-Figure 6 This is a schematic diagram of the adaptive Cartesian grid encryption process. Figure 3 Schematic diagram for generating uniform grid; Figure 4 A schematic diagram for identifying and encrypting the mesh intersecting with the object surface; Figure 5 A schematic diagram for identifying the mesh intersecting with the object surface and encrypting it to a specified number of times; Figure 6 Schematic diagram of smoothing the entire mesh.
[0082] The Cartesian grid is adaptively encrypted to ensure the accuracy of the solution in the flow area of interest, while reducing the grid density in the far-field smooth area to reduce the overall number of grids. For the robustness of the program and the versatility of the hanging grid, the adaptive Cartesian grid generation and neighbor search will follow the following conventions:
[0083] a) Each time the grid is encrypted, 4 (8 in three dimensions) sub-units are generated. At this time, the side length of the sub-unit will be halved and the grid level will increase by 1, that is, the side length is halved and the level is increased by 1 compared with before encryption.
[0084] b) During the encryption process, the level difference between adjacent grids must not be greater than 1, that is, the ratio of the coarse / fine grid side lengths at the hanging grid must not exceed 2.
[0085] c) The neighbor search of a grid only locates grids at the same level or at a level smaller than itself to ensure the uniqueness of the neighbor search result.
[0086] The computational domain discretized by spatial grid is discretized using the finite difference method to discretize the flow control equations, and the classic five-point difference format is used for numerical discretization (such as the second-order NND format, the second-order / third-order MUSCL format, the third-order WENO format, etc., hereinafter referred to as the five-point difference format). Consider the two-dimensional case, for a grid with sufficient template, such as Figure 7 As shown. Discretizing the current (i, j) grid requires 8 Cartesian grid information of the same level in the positive and negative directions of x and y. At this time, the corresponding grid center node positions are uniform in each dimension. For the discretization of these grids, it is very convenient to directly perform finite difference discretization according to the different numerical formats selected by the solver, and there is no need to perform coordinate change operations such as those under structured grids.
[0087] For the suspended grid in the transition area of the grid size, when there is no uniform and equidistant template in the adjacent direction or there is a lack of it, the suspended grid processing method of the present invention will be adopted. The main idea is to select the surrounding available Cartesian grid cells and construct the required flow field variable information at the corresponding uniform grid node position through high-precision interpolation.
[0088] First, according to the possible situations of hanging grid, such as Figure 8-Figure 9 As shown in the figure, the hanging grids are divided into the following two categories: a) The first type of hanging grid, that is, the discretized grid is a large grid, and its neighbors are small grids with a higher level than itself. b) The second type of hanging grid, that is, the discretized grid is a small grid, and its neighbors are large grids with a lower level than itself. Fig. 9 1-4, A and B represent grids, and r1 to r4 represent corresponding distances.
[0089] For the first type of hanging grid points, such as Figure 8 , Figure 8In the figure, 1-4 correspond to four sub-grids respectively. When the five-point difference format discretizes grid A, two grids are required in the positive and negative directions of x and y based on the grid A level. According to the previous grid generation and neighbor search conventions, the left neighbor of grid T is grid B, and grid B has four encrypted sub-grids (1~4). At this time, the flow field information of the solver is stored in the grid centers of the four sub-units, rather than the center of the required grid B. In this case, the four sub-units of grid B are directly interpolated to obtain the flow field information at the center of grid B. Because in the fork tree Cartesian grid, the distance from the child unit to the parent unit node is equal. Therefore, whether bilinear interpolation or inverse distance weighted interpolation is used, the final result can be simplified to:
[0090] ;
[0091] The subscripts B, 1, 2, 3 and 4 represent Figure 8 The flow field information at the center (node) of the corresponding grid. The above interpolation has second-order accuracy, where represents the required flow field variables, which can be primitive variables ( , namely density, velocity in the x and y directions, temperature and pressure), or they can be conserved variables, etc.
[0092] The second type of hanging grid is more complicated, such as Fig.10 As shown, since the Cartesian grid has a good symmetry relationship, without loss of generality, we will take the discretization of direction 1 as an example to explain it below, and the solutions for other directions are similar.
[0093] According to the possible situations in direction 1, it can be further divided into two subtypes: Tp type and Tpp type, where TP type represents the isometric template nodes and grid nodes that need to be constructed. i The difference is one grid side length (i.e. Fig.11 Nodes in i and nodes i +1); TPP type indicates the isometric template nodes and grid nodes that need to be constructed i The difference is two grid side lengths (i.e. Fig.12 Nodes in i and nodes i +2).
[0094] Figure 11-Figure 12The hollow circle position (target point) indicates the flow field information that needs to be constructed, and the solid circle (template point) indicates the grid center of the potential available template unit that is closer to the hollow circle position (where positions 1 and 2 may have two upper neighbors of grid i depending on the mesh encryption). For the second type of hanging grid, we use distance-weighted least squares interpolation (DWLS) to interpolate the required flow field information at the target point position. It uses a combination of basis functions to obtain the objective function:
[0095] ;
[0096] In the formula, represents the required flow field variable and is related to the position vector x, p is the interpolation basis vector, such as in two dimensions (with x and y as two orthogonal direction components), there is a linear basis , quadratic basis , the corresponding coefficient vector a is obtained by minimizing the following objective function J OK, there are:
[0097] ;
[0098] in, n is the number of template units and also the number of grids. R represents the corresponding target point, is the flow field value vector of the selected template unit, is the position matrix of the selected template unit, where p(x n ) represents the position basis vector of each template, is the diagonal expansion matrix of the distance from the template point to the interpolation point, w n Indicates the distance from each template to the target point. have:
[0099] ;
[0100] And the coefficient vector a is obtained by solving:
[0101] ;
[0102] Finally, substitute the coordinates of the target point to get its value:
[0103] ;
[0104] Among them, the matrix P T WP is Dimension m × m The matrix of mis the number of bases in the basis function, so the inversion of the matrix is relatively simple. In order to prevent the coefficient matrix from being singular, there should be n ≥ m In practice, the interpolation basis function and interpolation template can be expanded according to the required accuracy. Here we consider two interpolation templates with different accuracy. First, the linear basis With second-order interpolation accuracy, the number of basis functions is 3. We consider the DWSL interpolation of 4 points and name it DWSL1. The specific interpolation template is as follows Figure 13-14 shown.
[0105] The specific implementation steps here are: when the discrete grid c1 is of Tp type, first determine the current grid c1 and its right neighbor c2, and then locate c1's upper and lower neighbors c3 and c4. Take its four template units as input, and solve the above DWSL interpolation steps to obtain the flow field information of the interpolation point; when the discrete grid i is of Tpp type, select the current grid c1 and its right neighbor c2 as well as c2's right neighbor and upper neighbor. Since neighbors are generally stored, neighbor positioning takes little time and does not affect the solution efficiency.
[0106] The second interpolation model DWSL2 is a quadratic basis , with third-order interpolation accuracy, the number of basis functions is 6, considering 8-point DWSL interpolation, the specific interpolation template is as follows Fig.15 As shown:
[0107] The template of DWSL2 is the same for Tp type and Tpp type. First, the current grid c1 and its right neighbor c2 are located, and then the remaining six grids c3~c8 surrounding the respective grids are selected.
[0108] After constructing the grid variables at the required uniform template points, they can be discretized normally as uniform grids to solve flow field gradients or flux calculations.
[0109] This method analyzes the possible grid distribution near the adaptive Cartesian grid and selects available grid units that are convenient for positioning and retrieval. It constructs the required interpolation accuracy based on distance-weighted least squares interpolation, which is flexible and convenient. Finally, an equidistant finite difference template is constructed to achieve finite difference discretization of the adaptive Cartesian grid.
[0110] Verification example: This example is tested in the adaptive Cartesian grid program. A typical example of flow around a cylinder is selected. The incoming flow Ma=0.2, the Reynolds number Re=50 based on the cylinder diameter, the Roe approximate Riemann solution is selected with the third-order MUSCL format for discretization of the convection term, and the time advancement considers the third-order Runge-Kutta format. The initial geometric adaptive grid is shown in Fig.16 .
[0111] At a certain moment after the calculation, grid adaptation is turned on, and the results of grid cloud images with different interpolation methods are compared. Figure 17~Figure 19 As shown, the contour line diagram of the flow field is as follows Figure 20-Figure 22 As shown in the figure, X and Y are horizontal and vertical coordinates respectively. It can be seen that according to the method proposed in the present invention, the finite difference method discretization of the adaptive Cartesian grid can be realized, and the flow field has a high accuracy, and the flow field of the simulation result is smooth. However, the commonly used inverse distance weighted interpolation will cause flow field distortion and affect the simulation accuracy.
[0112] Among them, the adaptive Cartesian grid finite difference discretization method of the present invention is suitable for complex fluid dynamics simulations such as high Reynolds number flow and wall flow in computational fluid dynamics, and is widely used in the optimization of aircraft aerodynamic shape. The grid density in non-critical areas is reduced by adaptively encrypting the grid, and the grid accuracy is improved in complex flow areas to ensure high-order precision numerical solution. For the suspended grid, by correcting the discrete template points, the calculation error problem of the finite difference method on the uneven grid is solved, the solution accuracy and efficiency are improved, and the calculation cost is reduced. The focus of the present invention is to obtain the final discrete result. The optimization method and process of the aircraft aerodynamic shape after obtaining the final discrete result are existing, and reference can be made to CN118070426A, CN114676639A and CN103440377A, etc. The embodiments of the present invention are not specifically limited.
[0113] Embodiment 2:
[0114] Please refer to Fig.23 , Fig.23 Schematic diagram of the composition of an adaptive Cartesian grid finite difference discretization system. Embodiment 2 of the present invention further provides an adaptive Cartesian grid finite difference discretization system, the system comprising:
[0115] An encryption unit, used for adaptively encrypting the Cartesian grid to obtain a computational domain of adaptive Cartesian grid discretization;
[0116] A first discrete unit is used to construct a Cartesian grid based on the aircraft parameters, to discretize the uniform grid in the computational domain in a numerical format, and to obtain a first discrete result;
[0117] A calculation unit is used to obtain a target point for constructing the suspended grid into a uniform grid for the suspended grid in the calculation domain; and to obtain flow field information of the target point based on flow field information of the grid around the target point;
[0118] A second discrete unit is used to construct the suspension grid into a uniform grid based on the flow field information of all target points, and to perform numerical format discretization on the constructed uniform grid to obtain a second discrete result;
[0119] An integration unit, used for integrating the first discrete result and the second discrete result to obtain a final discrete result;
[0120] The calculation unit is used for iteratively solving based on the first discrete unit, the second discrete unit and the integrated unit until convergence to obtain a final discrete result, and obtaining an optimization result of the aerodynamic shape of the aircraft based on the final discrete result.
[0121] Embodiment three;
[0122] Based on the first embodiment, the third embodiment of the present invention provides an adaptive Cartesian grid finite difference discretization device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the adaptive Cartesian grid finite difference discretization method as described in the first embodiment when executing the computer program.
[0123] The adaptive Cartesian grid finite difference discretization device can be a computing device such as a desktop computer, a notebook, a PDA, and a cloud server. The adaptive Cartesian grid finite difference discretization device may include, but is not limited to, a processor and a memory. Those skilled in the art can understand that the adaptive Cartesian grid finite difference discretization device may include more or fewer components than shown in the figure, or combine certain components, or different components, for example, the adaptive Cartesian grid finite difference discretization device may also include input and output devices, network access devices, buses, etc.
[0124] The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors, application-specific integrated circuits, field programmable gate arrays, or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the adaptive Cartesian grid finite difference dispersion device, and uses various interfaces and lines to connect various parts of the entire adaptive Cartesian grid finite difference dispersion device.
[0125] The memory can be used to store the computer program and / or module, and the processor realizes various functions of the adaptive Cartesian grid finite difference discretization device by running or executing the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.). In addition, the memory can include a high-speed random access memory and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card, a secure digital card, a flash memory card, at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0126] Embodiment 4:
[0127] Based on the first embodiment, the fourth embodiment of the present invention provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps of the adaptive Cartesian grid finite difference discretization method as described in the first embodiment are implemented.
[0128] If the module / unit integrated in the adaptive Cartesian grid finite difference discretization device is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be stored in a computer-readable storage medium through a computer program. When the computer program is executed by the processor, the steps of the above-mentioned various method embodiments can be implemented. Among them, the computer program includes computer program code, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory, random access memory, point carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction.
[0129] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.
[0130] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. Adaptive Cartesian grid finite difference discretization method, characterized in that: The method comprises: Step 1: Construct a Cartesian grid based on the aircraft parameters, perform adaptive encryption on the Cartesian grid, and obtain the computational domain of the adaptive Cartesian grid discretization; Step 2: Discretize the uniform grid in the computational domain in a numerical format to obtain the first discrete result; Step 3: For the hanging grid in the computational domain, obtain the target point for constructing the hanging grid into a uniform grid; calculate the flow field information of the target point based on the flow field information of the grid around the target point; Step 4: Based on the flow field information of all target points, the suspension grid is constructed as a uniform grid, and the constructed uniform grid is discretized in a numerical format to obtain a second discrete result; Step 5: Integrate the first discrete result and the second discrete result to obtain the discrete result under the current iteration step; Repeat steps 2 to 5 to perform iterative solution until convergence to obtain the final discrete result, and obtain the aerodynamic shape optimization result of the aircraft based on the final discrete result; The step 3 specifically includes: The hanging grids are divided into the first type of hanging grids and the second type of hanging grids; the first type of hanging grids are: the neighboring grids of the discretized grids have subgrids with a higher level than the discretized grid; the second type of hanging grids are: the neighboring grids of the discretized grids have parent grids with a lower level than the discretized grid; For the first type of hanging grid, a target point corresponding to the uniform grid constructed by constructing the first type of hanging grid is obtained, a target grid is obtained based on the target point, four subgrids corresponding to the target grid are obtained, and flow field information of the target point is obtained by interpolation based on flow field information of the four subgrids; For the second type of hanging grid, the second type of hanging grid is divided into Tp type and Tpp type. The Tp type is that the distance between the target point and the parent grid corresponding to the discretized grid is equal to the side length of the parent grid, and the Tpp type is that the distance between the target point and the parent grid corresponding to the discretized grid is equal to twice the side length of the parent grid; For the Tp type second type hanging grid, the flow field information of the target point is obtained by: determining the parent grid c1 that is closest to the target point, determining the right neighbor grid c2 of the parent grid c1, the upper neighbor grid c3 of the parent grid c1, and the lower neighbor grid c4 of the parent grid c1 based on the parent grid c1, and obtaining the flow field information of the target point based on the interpolation calculation of the parent grid c1, grid c2, grid c3, and grid c4; For the Tpp type second type hanging grid, the flow field information of the target point is obtained by: determining the parent grid c5 that is closest to the target point, determining the right neighbor grid c6 of the parent grid c5, the upper neighbor grid c7 of the grid c6, and the lower neighbor grid c8 of the grid c6 based on the parent grid c5, and obtaining the flow field information of the target point through interpolation calculation based on the parent grid c5, the grid c6, the grid c7, and the grid c8; For the second type of hanging grid, the flow field information of the target point is calculated as follows: ; ; in, is the flow field information of the target point, x R is the position vector of the target point, p T is the interpolation basis vector, linear basis , quadratic basis , x and y is the spatial coordinate component, a is the coefficient vector, P T WP is Dimension m × m The matrix of m is the number of bases in the basis function, T is the transpose of the matrix, is the position matrix of the selected grid, p(x n ) represents the grid x n The corresponding basis vectors are, is the diagonal expansion matrix of the distance from the grid to the target point, w n Represents the grid x n The distance to the target point; The objective function is obtained by combining basis functions, specifically: ; in, represents the required variable and is related to the position vector x by minimizing the objective function J Determine the coefficient vector a, the objective function J for: ; in, n is the number of grids, subscript R represents the corresponding target point, is the flow field value vector of the selected grid, x i For point i The corresponding position vector, is the position vector x i The corresponding flow field value vector, For point i The corresponding flow field value vector, For point i The distance weight to the target point; For the first type of suspended grid, the flow field information of the target point is calculated as follows: ; in, is the flow field information of the target point, to They are the flow field information of 4 sub-grids respectively.
2. Adaptive Cartesian grid finite difference discretization system, characterized in that, The system comprises: An encryption unit is used to construct a Cartesian grid based on aircraft parameters, adaptively encrypt the Cartesian grid, and obtain a computational domain of adaptive Cartesian grid discretization; A first discrete unit is used to perform numerical discretization on a uniform grid in a computational domain to obtain a first discrete result; A calculation unit is used to obtain a target point for constructing the suspended grid into a uniform grid for the suspended grid in the calculation domain; and to obtain flow field information of the target point based on flow field information of the grid around the target point; The second discrete unit is used to construct the suspension grid into a uniform grid based on the flow field information of all target points, and to perform numerical format discretization on the constructed uniform grid to obtain a second discrete result; An integration unit, used for integrating the first discrete result and the second discrete result to obtain a final discrete result; A calculation unit, used for iteratively solving the first discrete unit, the second discrete unit and the integrated unit until convergence to obtain a final discrete result, and obtaining an optimization result of the aerodynamic shape of the aircraft based on the final discrete result; The computing unit is specifically used for: The hanging grids are divided into the first type of hanging grids and the second type of hanging grids; the first type of hanging grids are: the neighboring grids of the discretized grids have subgrids with a higher level than the discretized grid; the second type of hanging grids are: the neighboring grids of the discretized grids have parent grids with a lower level than the discretized grid; For the first type of hanging grid, a target point corresponding to the uniform grid constructed by constructing the first type of hanging grid is obtained, a target grid is obtained based on the target point, four subgrids corresponding to the target grid are obtained, and flow field information of the target point is obtained by interpolation based on flow field information of the four subgrids; For the second type of hanging grid, the second type of hanging grid is divided into Tp type and Tpp type. The Tp type is that the distance between the target point and the parent grid corresponding to the discretized grid is equal to the side length of the parent grid, and the Tpp type is that the distance between the target point and the parent grid corresponding to the discretized grid is equal to twice the side length of the parent grid; For the Tp type second type hanging grid, the flow field information of the target point is obtained by: determining the parent grid c1 that is closest to the target point, determining the right neighbor grid c2 of the parent grid c1, the upper neighbor grid c3 of the parent grid c1, and the lower neighbor grid c4 of the parent grid c1 based on the parent grid c1, and obtaining the flow field information of the target point based on the interpolation calculation of the parent grid c1, grid c2, grid c3, and grid c4; For the Tpp type second type hanging grid, the flow field information of the target point is obtained by: determining the parent grid c5 that is closest to the target point, determining the right neighbor grid c6 of the parent grid c5, the upper neighbor grid c7 of the grid c6, and the lower neighbor grid c8 of the grid c6 based on the parent grid c5, and obtaining the flow field information of the target point through interpolation calculation based on the parent grid c5, the grid c6, the grid c7, and the grid c8; For the second type of hanging grid, the flow field information of the target point is calculated as follows: ; ; in, is the flow field information of the target point, x R is the position vector of the target point, p T is the interpolation basis vector, linear basis , quadratic basis , x and y is the spatial coordinate component, a is the coefficient vector, P T WP is Dimension m × m The matrix of m is the number of bases in the basis function, T is the transpose of the matrix, is the position matrix of the selected grid, p(x n ) represents the grid x n The corresponding basis vectors are, is the diagonal expansion matrix of the distance from the grid to the target point, w n Represents the grid x n The distance to the target point; The objective function is obtained by combining basis functions, specifically: ; in, represents the required variable and is related to the position vector x by minimizing the objective function J Determine the coefficient vector a, the objective function J for: ; in, n is the number of grids, subscript R represents the corresponding target point, is the flow field value vector of the selected grid, x i For point i The corresponding position vector, is the position vector x i The corresponding flow field value vector, For point i The corresponding flow field value vector, For point i The distance weight to the target point; For the first type of suspended grid, the flow field information of the target point is calculated as follows: ; in, is the flow field information of the target point, to They are the flow field information of 4 sub-grids respectively.
3. An adaptive Cartesian grid finite difference discretization device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the adaptive Cartesian grid finite difference discretization method according to claim 1 are implemented.
4. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the adaptive Cartesian grid finite difference discretization method according to claim 1 are implemented.
Citation Information
Patent Citations
Aircraft aerodynamic configuration optimum design method based on improved parallel DE algorithm
CN103440377A
Aircraft aerodynamic configuration optimization method and device based on neural network, and medium
CN114676639A
Three-dimensional pneumatic optimization design method based on discontinuous finite elements
CN118070426A
System and Method for Determining Heat and Fluid Flow in or Around Objects
US20150347651A1