Aircraft aerodynamic configuration optimization acceleration method and device based on discrete accompanying
By dividing the flow field grid into traversal space in the aircraft aerodynamic shape optimization and performing automatic differential calculations using traversal sequence, the problem of high calculation cost of accompanying equation coefficient matrix is solved, and the optimization efficiency is improved.
Patent Information
- Application Number
- CN202411655627.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-18
- Publication Date
- 2025-03-11
- Estimated Expiration
- 2044-11-18
AI Technical Summary
In the prior art, when calculating the accompanying equation coefficient matrix, the number of times the automatic differential program is called is proportional to the amount of the flow field grid, resulting in excessive calculation cost and low efficiency.
The target flow field of the aircraft is calculated by a numerical simulation solver, and the interference range of the flow field variable is determined according to the calculation format. The flow field grid is divided into multiple connected but not interfering with each other. The preset grid traversal order is used for automatic differential calculation, and multiple target column vectors in the target coefficient matrix are obtained.
The construction efficiency of the accompanying equation coefficient matrix is improved, the calculation cost is reduced, and the efficiency of aircraft aerodynamic shape optimization is improved.
Smart Images

Figure CN119598604A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of aircraft design, and in particular to a method and device for optimizing and accelerating the aerodynamic shape of an aircraft based on discrete adjoints. Background Art
[0002] The optimization design of aircraft aerodynamic shape aims to solve engineering design problems by using the idea of mathematical optimization. With the support of numerical simulation calculation of flow field, the optimization design method with aerodynamic shape parameterization method, proxy model technology and optimization search strategy as the main content provides a broad design space for aircraft aerodynamic shape design. The optimization design technology of aircraft aerodynamic shape effectively shortens the design cycle, makes the design more refined, and improves the performance indicators of aircraft.
[0003] Faced with the huge number of design variables in aircraft shape optimization, the calculation of gradients will bring unacceptable computational costs to the optimization process. The adjoint method can solve the above computational cost problem. The aerodynamic optimization design method based on adjoint theory (control theory, conjugate method) has made great progress in taking into account the accuracy and rapid solution of gradients and the amount of calculation. Its characteristic that the amount of gradient calculation is independent of the number of design variables makes it, to a certain extent, the only feasible method for dealing with large-scale design variables aerodynamic shape optimization of aircraft.
[0004] For the establishment of the adjoint equation, the core is the calculation of the coefficient matrix. The specific formation of the coefficient matrix is the partial derivative of the residual vector of each grid with respect to the flow field variable vector on all grids. At present, the automatic differentiation technology is usually used to calculate the coefficient matrix. Automatic differentiation can decompose a complex mathematical operation process into a series of simple basic operations, each of which can be obtained by looking up the table. However, when the coefficient matrix is obtained by automatic differentiation technology, the number of times the differentiation program is called will be proportional to the amount of grids. Each time the automatic differentiation program is called, only one column in the coefficient matrix can be displayed and solved. The number of columns of the coefficient matrix is the product of the number of flow field grids and the number of flow field variables. In other words, the number of automatic differentiation calculations is positively correlated with the amount of flow field grids. As the flow field grids increase, the amount of calculation will also increase. When the amount of grids is large, it is easy to cause excessively high calculation costs and low efficiency, which leads to low efficiency in determining the aerodynamic shape of the aircraft. Summary of the invention
[0005] In view of this, the present disclosure provides an aircraft aerodynamic shape optimization acceleration method and device based on discrete adjoint, which can effectively improve the efficiency of establishing the adjoint equation coefficient matrix, thereby improving the efficiency of determining the aerodynamic shape of the aircraft.
[0006] According to a first aspect of an embodiment of the present disclosure, there is provided an aircraft aerodynamic shape optimization acceleration based on discrete adjoint, the method comprising:
[0007] According to the aerodynamic shape parameters of the aircraft to be aerodynamically optimized, a target flow field of the aircraft is calculated by a numerical simulation solver, and an interference range of flow field variables in the target flow field is determined according to a calculation format adopted by the numerical simulation solver;
[0008] According to the interference range of the flow field variables, the flow field grid of the target flow field is divided into a plurality of traversal spaces that are connected but do not interfere with each other; there are a plurality of flow field grids in the traversal space, and the flow field grids include a plurality of flow field variables;
[0009] According to the preset grid traversal order, automatic differentiation calculation is performed on the flow field grids in multiple traversal spaces at the same time to obtain multiple target column vectors in the target coefficient matrix;
[0010] Arranging the multiple target column vectors to obtain the target coefficient matrix;
[0011] According to the target coefficient matrix, the adjoint vector in the optimization of the aerodynamic shape of the aircraft based on the adjoint method is calculated and determined, and the aerodynamic shape of the aircraft is optimized based on the adjoint vector.
[0012] In one embodiment, determining the interference range of the flow field variables in the target flow field according to the calculation format adopted by the numerical simulation solver includes:
[0013] Determining the interference radius of the flow field variables according to the calculation format of the initial aerodynamic shape parameters calculated by the solver;
[0014] Based on the interference radius, the interference range is determined.
[0015] In one embodiment, according to the interference range of the flow field variables, the flow field grid of the target flow field is divided into a plurality of connected but non-interfering traversal spaces, including:
[0016] Determine the vertex of the target flow field as a division starting point;
[0017] According to the interference range, the grid is divided at the division starting point to obtain a plurality of traversal spaces; the plurality of traversal spaces are connected in sequence and do not interfere with each other.
[0018] In one embodiment, the automatic differentiation calculation is performed on the flow field grids in multiple traversal spaces simultaneously according to a preset grid traversal order to obtain multiple target column vectors in the target coefficient matrix, including:
[0019] According to the grid traversal order, determining the first flow field grid in each traversal space; the first flow field grid is the flow field grid corresponding to the current round of automatic differentiation calculation;
[0020] By using an automatic differentiation program, automatically differentiating a plurality of first flow field grids in the target flow field at the same time to obtain a plurality of first grid column vectors;
[0021] Determining a plurality of second flow field grids corresponding to the next round of automatic differentiation calculation according to the grid traversal order;
[0022] Simultaneously, automatic differentiation calculation is performed on the plurality of second flow field grids to obtain a plurality of second grid column vectors;
[0023] Repeat the step of determining a plurality of second flow field grids corresponding to the next round of automatic differentiation calculation according to the grid traversal order until all flow field grids in each traversal space are calculated;
[0024] Based on the first grid column vector and the second grid column vector, a plurality of target column vectors in the target coefficient matrix are determined.
[0025] In one embodiment, each flow field grid includes a plurality of flow field variables in the target flow field, each round of automatic differential calculation includes a plurality of automatic differential calculations, and each automatic differential calculation corresponds to a flow field variable;
[0026] The automatic differentiation program is used to simultaneously perform automatic differentiation calculations on a plurality of first flow field grids in the target flow field to obtain a plurality of first grid column vectors, including:
[0027] According to a preset variable traversal order, determine the first flow field variable in each first flow field grid; the first flow field variable is the flow field variable corresponding to this automatic differentiation calculation;
[0028] By using the automatic differentiation program, the first flow field variables in the plurality of first flow field grids are automatically differentiated to obtain a plurality of first column vectors; the first column vector is a column vector corresponding to the first flow field variable in each first flow field grid;
[0029] Determining a plurality of second flow field variables corresponding to the next automatic differentiation calculation according to the variable traversal order;
[0030] Simultaneously, automatic differentiation calculation is performed on the plurality of second flow field variables to obtain a plurality of second column vectors;
[0031] Repeat the step of determining a plurality of second flow field variables corresponding to the next automatic differential calculation according to the variable traversal order until the plurality of flow field variables in the first flow field grid are all calculated;
[0032] The plurality of first grid column vectors are determined according to the first column vector and the second column vector.
[0033] In one embodiment, the automatic differentiation program is used to simultaneously perform automatic differentiation calculations on the first flow field variables in the plurality of first flow field grids to obtain a plurality of first column vectors, including:
[0034] Setting a target differential seed to a target value; the target differential seed is used to instruct the automatic differential program to perform automatic differential calculations on first flow field variables in a plurality of first flow field grids;
[0035] The automatic differentiation program is used to simultaneously perform automatic differentiation calculations on the column vectors corresponding to the target differential seeds to obtain the multiple first column vectors.
[0036] In one embodiment, the arranging the multiple target column vectors to obtain the target coefficient matrix includes:
[0037] Determine the position of each target column vector in the target coefficient matrix according to the flow field grid and flow field variables corresponding to each target column vector;
[0038] The multiple target column vectors are arranged according to the position of each target column vector to obtain the target coefficient matrix.
[0039] According to a second aspect of an embodiment of the present disclosure, there is provided an aircraft aerodynamic shape optimization acceleration device based on discrete adjoint, the device comprising:
[0040] a determination unit, configured to calculate a target flow field of the aircraft through a numerical simulation solver according to aerodynamic shape parameters of the aircraft to be aerodynamically optimized, and determine an interference range of flow field variables in the target flow field according to a calculation format adopted by the numerical simulation solver;
[0041] A division unit is used to divide the flow field grid of the target flow field into a plurality of traversal spaces that are connected but do not interfere with each other according to the interference range of the flow field variables; the flow field grid is obtained based on the division of the target flow field, there are a plurality of flow field grids in the traversal space, and the flow field grid includes a plurality of flow field variables;
[0042] A traversal unit is used to perform automatic differentiation calculations on flow field grids in multiple traversal spaces simultaneously according to a preset grid traversal order to obtain multiple target column vectors in a target coefficient matrix;
[0043] an arrangement unit, used for arranging the multiple target column vectors to obtain the target coefficient matrix;
[0044] The calculation unit is used to calculate and determine the adjoint vector in the optimization of the aerodynamic shape of the aircraft based on the adjoint method according to the target coefficient matrix, and optimize the aerodynamic shape of the aircraft based on the adjoint vector.
[0045] In one embodiment, the determining unit is used to:
[0046] Determining the interference radius of the flow field variable according to the calculation format of the flow field parameter calculated by the solver;
[0047] Based on the interference radius, the interference range is determined.
[0048] In one embodiment, the dividing unit is used to:
[0049] Determine the vertex of the target flow field as a division starting point;
[0050] According to the interference range, the grid is divided at the division starting point to obtain a plurality of traversal spaces; the plurality of traversal spaces are connected in sequence and do not interfere with each other.
[0051] In one embodiment, the traversed unit is used to:
[0052] According to the grid traversal order, determining the first flow field grid in each traversal space; the first flow field grid is the flow field grid corresponding to the current round of automatic differentiation calculation;
[0053] By using an automatic differentiation program, automatically differentiating a plurality of first flow field grids in the target flow field at the same time to obtain a plurality of first grid column vectors;
[0054] Determining a plurality of second flow field grids corresponding to the next round of automatic differentiation calculation according to the grid traversal order;
[0055] Simultaneously, automatic differentiation calculation is performed on the plurality of second flow field grids to obtain a plurality of second grid column vectors;
[0056] Repeat the step of determining a plurality of second flow field grids corresponding to the next round of automatic differentiation calculation according to the grid traversal order until all flow field grids in each traversal space are calculated;
[0057] Based on the first grid column vector and the second grid column vector, a plurality of target column vectors in the target coefficient matrix are determined.
[0058] In one embodiment, each flow field grid includes a plurality of flow field variables in the target flow field, each round of automatic differential calculation includes a plurality of automatic differential calculations, and each automatic differential calculation corresponds to a flow field variable;
[0059] The traversal unit is used to:
[0060] According to a preset variable traversal order, determine the first flow field variable in each first flow field grid; the first flow field variable is the flow field variable corresponding to this automatic differentiation calculation;
[0061] By using the automatic differentiation program, the first flow field variables in the plurality of first flow field grids are automatically differentiated to obtain a plurality of first column vectors; the first column vector is a column vector corresponding to the first flow field variable in each first flow field grid;
[0062] Determining a plurality of second flow field variables corresponding to the next automatic differentiation calculation according to the variable traversal order;
[0063] Simultaneously, automatic differentiation calculation is performed on the plurality of second flow field variables to obtain a plurality of second column vectors;
[0064] Repeat the step of determining a plurality of second flow field variables corresponding to the next automatic differential calculation according to the variable traversal order until the plurality of flow field variables in the first flow field grid are all calculated;
[0065] The plurality of first grid column vectors are determined according to the first column vector and the second column vector.
[0066] In one embodiment, the traversal unit is used to:
[0067] Setting a target differential seed to a target value; the target differential seed is used to instruct the automatic differential program to perform automatic differential calculations on first flow field variables in a plurality of first flow field grids;
[0068] The automatic differentiation program is used to simultaneously perform automatic differentiation calculations on the column vectors corresponding to the target differential seeds to obtain the multiple first column vectors.
[0069] In one embodiment, the arrangement unit is used to:
[0070] Determine the position of each target column vector in the target coefficient matrix according to the flow field grid and flow field variables corresponding to each target column vector;
[0071] The multiple target column vectors are arranged according to the position of each target column vector to obtain the target coefficient matrix.
[0072] In one embodiment, the computing unit is used to:
[0073] constructing an adjoint equation according to the target coefficient matrix;
[0074] Based on the adjoint equation, the target aerodynamic shape parameters of the aircraft are calculated and determined.
[0075] According to a third aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, any method described in the first aspect is implemented.
[0076] According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, any method described in the first aspect is implemented.
[0077] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:
[0078] By calculating the calculation format of the aircraft flow field parameters according to the solver, determining the interference range of the flow field variables, and dividing the grid of the target flow field according to the interference range, multiple column vectors in the coefficient matrix can be solved at the same time, which improves the efficiency of building the coefficient matrix and reduces the calculation cost. Furthermore, when the adjoint vector in the aircraft aerodynamic shape optimization based on the adjoint method is determined according to the coefficient matrix, and the aerodynamic shape of the aircraft is optimized based on the adjoint vector, the efficiency of calculating and optimizing the aerodynamic shape of the aircraft is improved, thereby improving the design efficiency of the aircraft. BRIEF DESCRIPTION OF THE DRAWINGS
[0079] Figure 1 is a flow chart of an aircraft aerodynamic shape optimization acceleration method based on discrete adjoints, shown in an exemplary embodiment of the present disclosure;
[0080] Figure 2 is a flow chart showing a method of determining an interference range of a flow field variable according to an exemplary embodiment of the present disclosure;
[0081] Figure 3 is a schematic diagram of an interference range of a flow field variable shown in an exemplary embodiment of the present disclosure;
[0082] Figure 4 is a schematic diagram of traversing space shown in an exemplary embodiment of the present disclosure;
[0083] Figure 5 is a flow chart showing a method of dividing a flow field grid according to an exemplary embodiment of the present disclosure;
[0084] Figure 6 is a flow chart of a method for calculating a target coefficient matrix shown in an exemplary embodiment of the present disclosure;
[0085] Figure 7 is a schematic diagram of dividing a flow field grid shown in an exemplary embodiment of the present disclosure;
[0086] Figure 8 is a flow chart showing an exemplary embodiment of the present disclosure for performing automatic differentiation calculation on a first flow field grid;
[0087] Fig. 9 is a flow chart showing an exemplary embodiment of the present disclosure for performing automatic differentiation calculations through an automatic differentiation program;
[0088] Fig.10 is a flow chart of a method for calculating a target coefficient matrix shown in an exemplary embodiment of the present disclosure;
[0089] Fig.11 is a schematic diagram of a flow field grid shown in an exemplary embodiment of the present disclosure;
[0090] Fig.12 is a partial enlarged view of a ball head flow field shown in an exemplary embodiment of the present disclosure;
[0091] Fig.13 is a partial schematic diagram of a divided ball head flow field shown in an exemplary embodiment of the present disclosure;
[0092] Fig.14 is an overall schematic diagram of a divided ball head flow field shown in an exemplary embodiment of the present disclosure;
[0093] Fig.15 is a labeled schematic diagram of a flow field grid shown in an exemplary embodiment of the present disclosure;
[0094] Fig.16 is a partially labeled schematic diagram of a ball head flow field shown in an exemplary embodiment of the present disclosure;
[0095] Fig.17 is an overall labeled schematic diagram of a ball head flow field shown in an exemplary embodiment of the present disclosure;
[0096] Fig.18 It is a block diagram of an aircraft aerodynamic shape optimization acceleration device based on discrete adjoints shown in an exemplary embodiment of the present disclosure;
[0097] Fig.19 It is a hardware structure diagram of an electronic device shown in an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION
[0098] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0099] The terms used in this disclosure are for the purpose of describing specific embodiments only and are not intended to limit the disclosure. The singular forms of "a", "said" and "the" used in this disclosure and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0100] It should be understood that although the terms first, second, third, etc. may be used in the present disclosure to describe various information, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present disclosure, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0101] In the process of aircraft design, in order to improve the overall performance, safety and economy of the aircraft during the take-off phase. Scientific design and simulation are needed to optimize and determine the aerodynamic shape of the aircraft. When optimizing the aerodynamic shape of the aircraft, facing the huge design variables of aircraft shape optimization, the calculation of the gradient will bring unacceptable computational costs to the optimization process. Therefore, the adjoint method can be used to optimize the aerodynamic shape of the aircraft. Before establishing the adjoint equation, it is necessary to first determine the target that the aircraft needs to optimize and determine the objective function, such as minimizing drag, maximizing lift, and improving aerodynamic efficiency. Then, according to the optimization target, design constraints, such as structural strength, weight limit, manufacturing feasibility, etc. Then use CFD (Computational Fluid Dynamics, computational fluid dynamics) software to establish a numerical model of the aerodynamic shape of the aircraft and perform flow field calculations. Specifically, analysis methods such as the finite volume method and the finite element method can be used. When calculating the target flow field of the aircraft, the target flow field of the aircraft can be gridded to obtain multiple flow field grids. By meshing the flow field, the continuous flow field area can be divided into discrete units so that the flow field data of the aircraft can be calculated and solved in these units. Based on the CFD calculation results of the flow field grid, the flow field parameters of the aircraft, such as velocity field, pressure field, etc., can be obtained. Then, according to the flow field parameters of the aircraft, the adjoint equation is derived, and according to the solution of the adjoint equation, the sensitivity information of the objective function with respect to the aerodynamic shape parameters of the aircraft can be obtained. Finally, the aerodynamic shape parameters are updated according to the sensitivity information through the optimization algorithm (such as gradient descent, Newton method or other global optimization methods), so as to optimize and determine the aerodynamic shape of the aircraft.
[0102] At present, automatic differentiation technology is usually used to calculate the coefficient matrix of the adjoint equation. However, when the coefficient matrix is obtained by automatic differentiation technology, the number of times the differentiation program is called will be proportional to the amount of grids. When the coefficient matrix is displayed and solved by the automatic differentiation program, only one differential seed is set to 1 each time, and the rest of the differential seeds are 0. In this case, calling the automatic differentiation program can only display and solve one column in the coefficient matrix. The number of columns of the coefficient matrix is the product of the number of flow field grids and the number of flow field variables. In other words, the number of automatic differentiation calculations is positively correlated with the amount of process grids. As the number of flow field grids increases, the amount of calculation will also increase. When the amount of grids is large, it is easy to cause the calculation cost of the coefficient matrix of the adjoint equation to be too high, which leads to the high cost and low efficiency of optimizing the aerodynamic shape of the aircraft based on the adjoint equation.
[0103] Based on this, the present disclosure proposes an accelerated method for optimizing the aerodynamic shape of an aircraft based on discrete adjoints. The method can be applied to electronic devices with computing functions, and can effectively improve the efficiency of establishing the adjoint equations, thereby improving the efficiency of determining the aerodynamic shape of the aircraft.
[0104] Figure 1 The flowchart of the aircraft aerodynamic shape optimization acceleration method based on discrete adjoint of the present disclosure is shown in FIG. Figure 1 As shown, the method includes:
[0105] S101, based on the aerodynamic shape parameters of the aircraft to be aerodynamically optimized, a target flow field of the aircraft is calculated by a numerical simulation solver, and an interference range of flow field variables in the target flow field is determined according to a calculation format adopted by the numerical simulation solver.
[0106] The discrete adjoint is a numerical method used to solve aerodynamic optimization problems. It is derived from the continuous adjoint method, but applied to discrete numerical solutions, and is usually used to solve optimization problems involving flow equations and objective functions. The discrete adjoint method helps to perform efficient aerodynamic shape optimization during the design process by calculating the sensitivity of the objective function to the design variables in the aerodynamic shape of the aircraft.
[0107] The numerical simulation solver may be a CFD solver, which can be used to simulate fluid flow and process complex flow fields, thereby realizing aerodynamic analysis of an aircraft.
[0108] In some embodiments, the aerodynamic shape parameters are obtained based on the external geometric shape of the aircraft. The aerodynamic shape parameters of the aircraft directly affect the flow characteristics of the aircraft. The aerodynamic shape parameters of the aircraft can be obtained by modeling the geometric shape of the aircraft through computer-aided design software to obtain a numerical model of the aircraft, and the numerical model can be used to represent the aerodynamic shape parameters of the aircraft.
[0109] After obtaining the initial aerodynamic shape parameters of the aircraft, CFD software can be used to analyze the flow characteristics of the aircraft based on the numerical model and calculate the flow field parameters around the aircraft. The flow field parameters may include velocity, pressure, temperature, density, viscosity and other flow field parameters.
[0110] In the process of analyzing and calculating the target flow field of the aircraft using a solver (e.g., CFD software), the target flow field of the aircraft can be gridded to generate a flow field grid. The flow field grid can be a grid based on two-dimensional space division or a grid based on three-dimensional space division.
[0111] Based on the flow field parameters, the preset flow equations and the objective function for optimizing the aerodynamic shape of the aircraft, an adjoint equation is constructed to calculate the sensitivity of the objective function to the aerodynamic shape parameters of the aircraft. The objective function is constructed based on the target to be optimized for the aircraft, and the target to be optimized may be minimizing drag, maximizing lift, improving aerodynamic efficiency, etc. The calculated sensitivity indicates the degree of influence of a certain variable in the aerodynamic shape parameters of the aircraft on the objective function, and the aerodynamic shape parameters of the aircraft can be optimized according to the sensitivity.
[0112] The core of constructing the adjoint equation is the calculation of the coefficient matrix. Each element in the coefficient matrix is the partial derivative of the residual vector of each grid with respect to the flow field variable vector on all grids, which is a huge sparse matrix. In one embodiment, the coefficient matrix is as shown in formula (1):
[0113]
[0114] Among them, the matrix is a sparse matrix, the number of rows of the matrix is equal to the number of columns, which are the product of the number of flow field grids and the number of flow field variables on each flow field grid, that is, n = the number of flow field grids * the number of flow field variables. f represents the residual vector of a grid, and x represents a flow field variable vector.
[0115] Each element in the coefficient matrix is the derivative of a flow field variable on a flow field grid to a flow field variable of other grids within the interference range. The interference range is the range of surrounding flow field grids affected by the disturbance of the flow field variable of the current grid determined when the solver calculates the target flow field according to the aerodynamic shape parameters. The specific interference range is related to the calculation format in the solver. Therefore, the interference range of the flow field variable of the aircraft can be determined according to the calculation format of the solver.
[0116] Figure 2 A flow chart for determining the interference range of flow field variables is shown, the flow chart comprising the following steps:
[0117] S201, determining the interference radius of the flow field variable according to the calculation format adopted by the numerical simulation solver.
[0118] S202: Determine the interference range based on the interference radius.
[0119] When determining the interference range of flow field variables in the flow field grid, first determine the interference radius of the flow field variables according to the calculation format when the solver calculates the target flow field. The calculation format may include calculation formats including variable reconstruction, flux splitting and limiters. Specifically, the interference radius of the flow field variables can be determined according to the order adopted by the solver when performing high-order calculations. For example, if the solver adopts third-order calculations when performing high-order calculations, it means that when calculating the flow field disturbance of a flow field grid, three layers of flow field grids around it will be involved. Therefore, the interference radius of the flow field variable is three.
[0120] It should be noted that when the flow field grid is obtained based on a two-dimensional target flow field division, the interference radius is the interference radius in the horizontal and vertical directions; when the flow field grid is obtained based on a three-dimensional target flow field division, the interference radius is the interference radius in the horizontal, vertical and vertical directions.
[0121] After determining the interference radius, the interference range can be determined with the flow field grid where the flow field variables are disturbed as the center. The specific calculation method of the interference radius is shown in formula (2):
[0122] S=2r+1 (2)
[0123] Where S represents the interference range and r represents the interference radius. For example, when the flow field variable interference radius is 2, its interference range is 5. This is because the flow field grid that has variable disturbance itself is also within the interference range of the flow field variable, that is, 1 in formula (2) represents the flow field grid that has variable disturbance itself. Figure 3 The figure shows a schematic diagram of the interference range of the flow field variable when the interference radius is 2. With the flow field disturbance unit (x, y) as the center, the grid units within the interference range include the two layers of flow field grids around it.
[0124] S102, dividing the flow field grid of the target flow field into a plurality of traversal spaces that do not interfere with each other according to the interference range of the flow field variables.
[0125] The flow field grid is obtained based on the target flow field. When using CFD software to analyze the flow field of an aircraft, it is necessary to grid the flow field according to the numerical model to generate a calculation grid. Each flow field grid includes multiple flow field variables in the target flow field. For example, there are four flow field variables in the target flow field: density, pressure, lateral velocity, and longitudinal velocity. Then, each flow field grid will also store these four flow field variables.
[0126] After determining the interference range of each flow field variable, it is necessary to divide the flow field grid into multiple complementary interference traversal spaces based on the interference range. Taking the two-dimensional flow field grid as an example, when the interference range is 5, 5 is used as the number of boundary grid units to determine a square traversal space with a side length of 5. The number of flow field grids in this traversal space is 25. Then the flow field grid of the entire aircraft is divided according to the traversal space. The schematic diagram of each traversal space is shown in the figure. Figure 4 As shown, the space enclosed by the dotted line is an ergodic space. Figure 4 The arrangement of four traversal spaces is schematically shown. In this way, the aircraft grid can be divided. It should be noted that the flow field grid of the aircraft may not be an integer multiple of the traversal space, so the boundary of the aircraft flow field grid may not be a complete traversal space.
[0127] Figure 5 A flow chart for dividing a flow field grid is shown. The flow chart includes the following steps:
[0128] S501: Determine the vertex of the target flow field as a division starting point.
[0129] S502, dividing the grid at the division starting point according to the interference range to obtain a plurality of traversal spaces; the plurality of traversal spaces are sequentially connected and do not interfere with each other.
[0130] First, determine the grid boundary of the target flow field and the vertices on the boundary. Then use a vertex of the target flow field as the starting point for dividing the traversal space. At the starting point, start arranging in sequence according to the size of the traversal space, and divide the space of the flow field grid into multiple traversal spaces that are connected in sequence and do not overlap or interfere with each other.
[0131] By dividing the flow field grid of the target flow field into multiple non-interfering traversal spaces, it becomes possible to simultaneously solve the partial derivatives of the residual vector of each grid in multiple traversal spaces with respect to the flow field variable vectors in all flow field grids, thereby improving the efficiency of calculating partial derivatives.
[0132] S103, according to a preset grid traversal order, automatically differentiate the flow field grids in multiple traversal spaces at the same time to obtain multiple target column vectors in the target coefficient matrix.
[0133] After the traversal space is divided, the flow field grid can be automatically differentiated according to the divided traversal space to obtain the column vectors in the coefficient matrix of the adjoint equation for optimizing the aerodynamic shape parameters of the aircraft. The grid traversal order is used to determine the calculation order of multiple flow field grids in each traversal space. After the flow field grid for this round of calculation is determined according to the grid traversal order, the first flow field grid in each traversal space can be calculated at the same time. The column vector of each first flow field grid is obtained, thereby obtaining multiple target column vectors in the target coefficient matrix.
[0134] For example, the target flow field of the aircraft is divided into 150 flow field grids, one traversal space includes 25 flow field grids, and there is only one flow field variable in each flow field grid. In other words, there are 6 traversal spaces in the target flow field of the aircraft. Then when calculating the flow field grids, the first flow field grid in the 6 traversal spaces can be calculated at the same time, and the target column vectors corresponding to the 6 flow field grids can be obtained at one time. Then the second flow field grid in the 6 traversal spaces is calculated at the same time, and so on, until the calculation of the 25th flow field grid in the 6 traversal spaces is completed, that is, the calculation of all flow field grids in the target flow field of the aircraft is completed. Compared with calculating 150 flow field grids separately, the method provided by the present disclosure can greatly improve the calculation efficiency of the flow field grids, especially when the amount of grids is large, the effect of improving efficiency is more obvious.
[0135] Figure 6 A flow chart of a method for calculating a target coefficient matrix is shown, the flow chart comprising the following steps:
[0136] S601, determining the first flow field grid in each traversal space according to the grid traversal order.
[0137] S602, performing automatic differentiation calculations on a plurality of first flow field grids in the target flow field simultaneously through an automatic differentiation program to obtain a plurality of first grid column vectors.
[0138] S603, determining a plurality of second flow field grids corresponding to the next round of automatic differentiation calculation according to the grid traversal order.
[0139] S604, simultaneously performing automatic differentiation calculations on the plurality of second flow field grids to obtain a plurality of second grid column vectors.
[0140] S605, repeatedly executing the step of determining a plurality of second flow field grids corresponding to the next round of automatic differentiation calculation according to the grid traversal order, until the calculation of the flow field grids in each traversal space is completed.
[0141] S606: Determine a plurality of target column vectors in the target coefficient matrix based on the first grid column vector and the second grid column vector.
[0142] The grid traversal order refers to the traversal order of multiple flow field grids in a traversal space. For example, if there are 25 flow field grids in a traversal space, the grid traversal order is the traversal order of these 25 flow field grids. The traversal order can be from left to right, first traversing each row of flow field grids, and after the traversal of a row of flow field grids is completed, the flow field grids in the next row are traversed in order from bottom to top, and when traversing the flow field grids in the next row, the traversal is performed in order from left to right.
[0143] According to the grid traversal order, the first flow field grid in each traversal space corresponding to the current round of automatic differentiation calculation is determined. Figure 7 A schematic diagram of the division of a flow field grid is shown schematically, where the dotted line represents an area as a traversal space, and the grid with shadow information is the first flow field grid. In other words, in the process of this round of automatic differentiation calculation, automatic differentiation calculation can be performed on the first flow field grids in multiple traversal spaces at the same time.
[0144] When performing automatic differentiation calculation on the first flow field grid, the flow field variables in the first flow field grid can be calculated by calling the automatic differentiation program, and the partial derivatives of the residual vector of the flow field variables in the first flow field grid with respect to all flow field variable vectors on all flow field grids in the target flow field are solved to obtain multiple first grid vectors. The first grid vectors include column vectors in the target coefficient matrix. The automatic differentiation program can calculate the derivatives of the residual vectors of different flow field variables on different flow field grids with high precision.
[0145] After the automatic differentiation calculation of the first flow field grid is completed by the automatic differentiation program, multiple second flow field grids corresponding to the next round of automatic differentiation calculation in each traversal space can be determined according to the grid traversal order. Then, the automatic differentiation calculation of multiple second flow field grids is continued to be performed simultaneously through the automatic differentiation program to obtain multiple second grid vectors. After the automatic differentiation calculation of the second flow field grid is completed, the next second flow field grid is determined according to the grid traversal order until all flow field grids in each traversal space are traversed and the automatic differentiation calculation is completed. Finally, multiple target column vectors in the target coefficient matrix can be determined by assembling the multiple grid vectors corresponding to each flow field grid.
[0146] Because there are multiple flow field variables in each flow field grid, and the column vector in the target coefficient matrix is the partial derivative of the residual vector of a flow field variable with respect to all flow field variable vectors on all flow field grids in the target flow field, when a round of automatic differentiation calculation is performed on each flow field grid, one round of automatic differentiation calculation includes multiple automatic differentiation calculations, and one automatic differentiation calculation corresponds to one flow field variable.
[0147] The following will take a round of numerical solution process for the first flow field grid as an example to illustrate the calculation process of each flow field grid. Figure 8 A flowchart for performing automatic differential calculation on a first flow field grid is schematically shown, and the flowchart includes the following steps:
[0148] S801, determining the first flow field variable in each first flow field grid according to a preset variable traversal order; the first flow field variable is the flow field variable corresponding to this automatic differentiation calculation.
[0149] S802, performing automatic differentiation calculations on first flow field variables in a plurality of first flow field grids simultaneously through the automatic differentiation program to obtain a plurality of first column vectors.
[0150] S803, determining a plurality of second flow field variables corresponding to the next automatic differentiation calculation according to the variable traversal order.
[0151] S804, simultaneously performing automatic differentiation calculation on the plurality of second flow field variables to obtain a plurality of second column vectors.
[0152] S805, repeatedly executing the step of determining a plurality of second flow field variables corresponding to the next automatic differential calculation according to the variable traversal order, until the plurality of flow field variables in the first flow field grid are calculated.
[0153] S806: Determine the plurality of first grid column vectors according to the first column vector and the second column vector.
[0154] The first column vector is a column vector corresponding to the first flow field variable in each first flow field grid. By calling the automatic differentiation program once, the derivative of the residual vector of a flow field variable in a flow field grid can be solved, that is, a column vector in formula (1).
[0155] Therefore, when solving multiple flow field variables in the first flow field grid, the automatic differentiation program can be called multiple times according to the preset variable traversal order, and automatic differentiation calculations can be performed on each flow field variable in the first flow field grid respectively. Specifically, the first flow field variable can be determined first according to the variable traversal order, and the first flow field variable can be calculated by the automatic differentiation program to obtain the first column vector corresponding to the first flow field variable in each first flow field grid. After the automatic differentiation calculation of the first flow field variable is completed, the second flow field variable for the next calculation is determined according to the variable traversal order, and the automatic differentiation calculation is performed on the second flow field variable in each first flow field grid at the same time through the automatic differentiation program to obtain the second column vector. Then continue to determine the flow field variable for the next calculation according to the flow traversal order, and calculate until all flow field variables in the first flow field grid have completed the automatic differentiation calculation. Finally, according to the column vector corresponding to each flow field variable, the first grid vector corresponding to the first flow field grid can be determined.
[0156] For example, the first flow field grid includes three flow field variables: density, pressure and temperature. The variable traversal order is pressure-temperature-density. According to the variable traversal order, first determine that the first flow field variable in the first flow field grid is pressure, and then use the automatic differentiation program to simultaneously differentiate the residual vector of the pressure parameter of the first flow field grid in each traversal space. You can get the first column vector corresponding to the pressure variable in each first flow field grid. Then, differentiate the residual vector of the temperature parameter of the first flow field grid in each traversal space to get the second column vector corresponding to the temperature variable in each first flow field grid. Finally, differentiate the residual vector of the density parameter of the first flow field grid in each traversal space to get the third column vector corresponding to the density variable in each first flow field grid. The first grid vector can be determined based on the first column vector, the second column vector and the third column vector.
[0157] When an automatic differentiation calculation is performed on a flow field variable through an automatic differentiation program, it is necessary to set the differential seed of the automatic differentiation, which is used to guide the calculation content of the automatic differentiation program. Formula (3) exemplarily shows a calculation formula for the degree of automatic differentiation, and formula (3) is as follows:
[0158]
[0159] Among them, the square matrix on the right side of the equal sign is the target coefficient matrix to be constructed, the column vector where a is located is the differential seed, and the column vector where b is located on the left side of the equal sign is the derivative vector of a flow field variable solved by calling automatic differentiation once. n represents the number of differential seeds, and the number of differential seeds is equal to the number of column vectors in the target coefficient matrix, that is, the number of differential seeds is equal to the product of the number of grids in the target flow field and the number of flow field variables.
[0160] Fig. 9 A flow chart of performing automatic differentiation calculation by an automatic differentiation program is shown, and the flow chart includes the following steps:
[0161] S901, setting the target differential seed to a target value.
[0162] S902, performing automatic differentiation calculations on the column vectors corresponding to the target differential seeds simultaneously through the automatic differentiation program to obtain the multiple first column vectors.
[0163] When performing automatic differentiation calculations through the automatic differentiation program, first determine the corresponding differential seed based on the flow field variables calculated by this automatic differentiation. Because the differential seed corresponds one-to-one to the column vector in the target coefficient matrix, one differential seed corresponds to a column vector in the target coefficient matrix, and a column vector in the target coefficient matrix corresponds to a flow field variable in a flow field grid. Therefore, one differential seed corresponds to a flow field variable in a flow field grid. When performing automatic differentiation calculations on the first flow field variable, the differential seed corresponding to the first flow field variable in each first flow field grid can be determined as the target differential seed. Then set the target differential seed to the target value 1, and the remaining differential seeds are set to the invalid value 0. Then, based on the set target differential seed, call the automatic differentiation program to calculate the first column vector corresponding to the first flow field variable.
[0164] S104, arranging the multiple target column vectors to obtain the target coefficient matrix.
[0165] After calculating multiple target column vectors, you only need to combine the target column vectors to solve the target coefficient matrix. Since the column vector in the target coefficient matrix corresponds to a flow field variable of a flow field grid, the arrangement positions of multiple target column vectors in the target coefficient matrix can be determined according to the positional relationship between the flow field grid and the flow field variable in the target flow field.
[0166] After determining the position of each target column vector, the target column vectors can be arranged according to their positions so that the position of each target column vector corresponds to the position of the flow field variable in the target flow field, thereby obtaining the final target coefficient matrix.
[0167] S105, calculating and determining the adjoint vector for optimizing the aerodynamic shape of the aircraft based on the adjoint method according to the target coefficient matrix, and optimizing the aerodynamic shape of the aircraft based on the adjoint vector.
[0168] When the aerodynamic shape optimization of the aircraft is performed based on the adjoint method, after the target coefficient matrix of the adjoint equation is obtained, the adjoint vector can be calculated according to the target coefficient matrix. The influence degree of the aerodynamic shape parameters on the target function to be optimized is determined. Then, based on the adjoint equation, the update direction of the aerodynamic shape parameters is determined, and the target aerodynamic shape parameters are determined by an optimization algorithm (such as gradient descent, Newton's method, etc.). It should be noted that constructing a target coefficient matrix and an adjoint equation may not determine the final target aerodynamic shape parameters. After calculating the new target aerodynamic shape parameters according to the target coefficient matrix each time, the next target coefficient matrix can be constructed based on the new target aerodynamic shape parameters, and the aerodynamic shape parameters can be iteratively calculated to determine the final aerodynamic shape parameters of the aircraft, thereby optimizing the aerodynamic shape of the aircraft.
[0169] By calculating the calculation format of the aircraft flow field parameters according to the solver, determining the interference range of the flow field variables, and dividing the grid of the target flow field according to the interference range, multiple column vectors in the coefficient matrix can be solved at the same time, which improves the efficiency of building the coefficient matrix and reduces the calculation cost. Furthermore, when calculating the aerodynamic shape parameters of the aircraft according to the coefficient matrix, the efficiency of calculating the aerodynamic shape parameters is improved, thereby improving the design efficiency of the aircraft.
[0170] In one embodiment, Fig.10 A flow chart of a method for calculating a target coefficient matrix is shown.
[0171] S1001, determining the calculation format in the numerical simulation solver, and determining the maximum interference radius of the flow field variable disturbance according to the calculation format. That is, after the flow field variable in the target flow field is disturbed, a flow field simulation solution will affect the flow field variable values on the flow field grids of several layers around the disturbance unit.
[0172] S1002, determining the traversal space of each differential seed in the automatic differentiation program according to the maximum interference radius. The number of boundary flow field grids of the traversal space is twice the maximum interference radius plus one.
[0173] S1003, according to the size of the traversal space, the flow field grid is divided into a number of traversal spaces of completely identical size and connected once without interfering with each other, and it is ensured that the flow field is completely divided.
[0174] S1004, determining the grid traversal order of the differential seed in the traversal space, to ensure that the differential seed traverses each flow field grid in the traversal space once.
[0175] S1005, marking the flow field grids according to the grid traversal order determined in S1004. Mark the first flow field grid in each traversal space as activated, and mark the remaining flow field grids in the traversal space as inactivated, and ensure that the activated and inactivated states of the grids in each traversal space are consistent.
[0176] S1006, each flow field grid stores a consistent number of flow field variables, and determines the variable traversal order of the differential seed in these flow field variables to ensure that the differential seed can traverse all flow field variables in each flow field grid once according to this order.
[0177] S1007, marking the flow field variables according to the variable traversal order determined in S1006. The first traversed flow field variable is marked as an activated state, and the remaining flow field variables are marked as inactive states.
[0178] S1008, setting the value of the differential seed according to the state of the grid and flow field variable mark. The differential seed values corresponding to the flow field variables marked as activated on all grids marked as activated in the flow field grid are set to 1, and the remaining differential seed values are set to 0.
[0179] S1009, calling the automatic differentiation program once to perform automatic differentiation calculation, and obtaining all non-zero elements in the corresponding column of the coefficient matrix corresponding to the differential seed 1.
[0180] S1010, assembling the values of the non-zero elements obtained in S1009 into the coefficient matrix according to corresponding positions.
[0181] S1011, according to the flow field variable traversal order determined in S1006, select the next new flow field variable for marking, mark this new flow field variable as activated, mark the remaining flow field variables as inactivated, and repeat S1008 to S1010.
[0182] S1012, repeat S1011 until all flow field variables in the current flow field grid are traversed once.
[0183] S1013, according to the grid traversal order determined in S1004, a new grid mark is selected for marking, and the new flow field grid is marked as activated, and the remaining grids are marked as inactive, and S1005 to S1012 are repeated.
[0184] S1014, repeat S1013 until all grids are traversed once;
[0185] S1015, setting all unassembled elements of the coefficient matrix to 0, indicating that the coefficient matrix has been obtained.
[0186] In one embodiment, the solution process is illustrated by displaying a coefficient matrix corresponding to a two-dimensional hypersonic spherical head flow field.
[0187] When solving the two-dimensional hypersonic spherical head flow field, the second-order finite volume method can be used. In the process of solving the target flow field by the numerical simulation solver, the grid surface flow field value reconstruction can use the MUSCL format with the Van-Albaba limiter, and the flux vector splitting can use the Van Leer flux splitting. Among them, the calculation format used for variable reconstruction, flux splitting and limiter is the second-order format, so the interference radius is 2.
[0188] The differential seed traversal space is determined according to the maximum interference radius. According to the number of boundary grids of the traversal space being twice the maximum interference radius plus one, it can be determined that the number of boundary grid units of the traversal space is 5.
[0189] The flow field grid of the two-dimensional hypersonic spherical head flow field is as follows: Fig.11 As shown in the figure, the enlarged local grid at the upper edge of the ball head is as follows Fig.12 As shown. According to the size of the traversed space, the flow field grid can be divided. The enlarged view of the upper mesh of the ball head after division is shown in Fig.13 As shown in the figure, the dotted lines represent the division of the traversal space. The full-field grid after division is as follows Fig.14 As shown in the figure, the dotted lines are used to represent the traversal space division. However, due to the small size of the grid near the wall, Fig.14 Only the partitioning of the traversal space away from the walls is shown.
[0190] It can be determined that the grid traversal order of the differential seed in each traversal space is to traverse the wall direction first and then the wall normal direction. The specific order of traversing the wall direction is counterclockwise, and the specific order of traversing the wall normal direction is from close to the wall to away from the wall.
[0191] According to the determined differential seed traversal order, the first flow field grid at the beginning of the traversal is marked as active, and the remaining grids in the traversal space are marked as inactive, such as Fig.15 As shown in the figure, the grid with a large square dot in the center is in the activated state, and the grid with a small dot in the center is in the inactivated state.
[0192] According to the activation and inactivation status of the grid in the traversal space where the differential seed is located, the activation and inactivation status of the grids in all other traversal spaces are set to ensure that the activation and inactivation status of the grids in each traversal space are consistent. Fig.16 As shown, the ball head overall mesh activation and inactivation states are as follows Fig.17 shown. Fig.16 and Fig.17In the grid, the grid with a large square dot in the center is in the active state, and the grid with a small dot in the center is in the inactive state.
[0193] Since the embodiment adopts a two-dimensional shape, each grid stores four flow field variables: density, pressure, lateral velocity, and longitudinal velocity. Therefore, it can be determined that the traversal order of the differential seed in these flow field variables is density, pressure, lateral velocity, and longitudinal velocity.
[0194] According to the determined flow field variable traversal order, the initial flow field variable density is selected to be marked as active, and the remaining flow field variables pressure, lateral velocity, and longitudinal velocity are marked as inactive. The differential seed values corresponding to the flow field variables marked as active on all grids in the flow field grid are set to 1, and the remaining differential seed values are set to 0;
[0195] By calling the automatic differentiation program once, all non-zero elements of the corresponding column of the coefficient matrix corresponding to the differential seed of 1 can be obtained, and the obtained non-zero elements can be assembled into the coefficient matrix according to the corresponding positions.
[0196] According to the traversal order of flow field variables, a new flow field variable is selected in turn to be marked as active, and the remaining flow field variables are marked as inactive, and the automatic differentiation program and non-zero element assembly operation are repeatedly called until all flow field variables are used.
[0197] According to the determined grid traversal order, a new grid is selected and marked as active, and the remaining grids are marked as inactive. The differential seed flow field variable traversal, automatic differentiation program call, and non-zero element assembly operations are repeated until all grids are traversed once. All unassembled elements of the coefficient matrix are set to 0, indicating that the coefficient matrix has been obtained.
[0198] Based on the coefficient matrix solving method in the embodiment of the present disclosure, multiple coefficient matrix columns can be displayed and solved at one time. The number of times the automatic differentiation program is called is only the number of flow field grids in the space traversed by the differential seed, and its calculation amount is a very small fixed value, which no longer increases with the increase of the number of grids, thereby improving the calculation efficiency of the coefficient matrix of the adjoint equation, and further improving the efficiency of determining the aerodynamic shape parameters of the aircraft according to the adjoint equation.
[0199] Corresponding to the previous embodiment of the aircraft aerodynamic shape optimization acceleration method based on discrete adjoint, the present disclosure also provides an embodiment of the aircraft aerodynamic shape optimization acceleration device based on discrete adjoint.
[0200] Fig.18 The following is an exemplary block diagram of an aircraft aerodynamic shape optimization acceleration device based on discrete adjoint, wherein the device comprises:
[0201] The determination unit 1801 is used to calculate the target flow field of the aircraft through a numerical simulation solver according to the aerodynamic shape parameters of the aircraft to be aerodynamically optimized, and determine the interference range of the flow field variables in the target flow field according to the calculation format adopted by the numerical simulation solver;
[0202] A division unit 1802 is used to divide the flow field grid of the target flow field into a plurality of traversal spaces that are connected but do not interfere with each other according to the interference range of the flow field variables; the flow field grid is obtained based on the division of the target flow field, there are a plurality of flow field grids in the traversal space, and the flow field grid includes a plurality of flow field variables;
[0203] A traversal unit 1803 is used to perform automatic differentiation calculations on flow field grids in multiple traversal spaces simultaneously according to a preset grid traversal order to obtain multiple target column vectors in a target coefficient matrix;
[0204] An arrangement unit 1804 is used to arrange the multiple target column vectors to obtain the target coefficient matrix;
[0205] The calculation unit 1805 is used to calculate and determine the adjoint vector in the optimization of the aerodynamic shape of the aircraft based on the adjoint method according to the target coefficient matrix, and optimize the aerodynamic shape of the aircraft based on the adjoint vector.
[0206] In one embodiment, the determining unit 1801 is configured to:
[0207] Determining the interference radius of the flow field variable according to the calculation format of the flow field parameter calculated by the solver;
[0208] Based on the interference radius, the interference range is determined.
[0209] In one embodiment, the dividing unit 1802 is used to:
[0210] Determine the vertex of the target flow field as a division starting point;
[0211] According to the interference range, the grid is divided at the division starting point to obtain a plurality of traversal spaces; the plurality of traversal spaces are connected in sequence and do not interfere with each other.
[0212] In one embodiment, the traversal unit 1803 is used to:
[0213] According to the grid traversal order, determining the first flow field grid in each traversal space; the first flow field grid is the flow field grid corresponding to the current round of automatic differentiation calculation;
[0214] By using an automatic differentiation program, automatically differentiating a plurality of first flow field grids in the target flow field at the same time to obtain a plurality of first grid column vectors;
[0215] Determining a plurality of second flow field grids corresponding to the next round of automatic differentiation calculation according to the grid traversal order;
[0216] Simultaneously, automatic differentiation calculation is performed on the plurality of second flow field grids to obtain a plurality of second grid column vectors;
[0217] Repeat the step of determining a plurality of second flow field grids corresponding to the next round of automatic differentiation calculation according to the grid traversal order until all flow field grids in each traversal space are calculated;
[0218] Based on the first grid column vector and the second grid column vector, a plurality of target column vectors in the target coefficient matrix are determined.
[0219] In one embodiment, each flow field grid includes a plurality of flow field variables in the target flow field, each round of automatic differential calculation includes a plurality of automatic differential calculations, and each automatic differential calculation corresponds to a flow field variable;
[0220] The traversal unit 1803 is used to:
[0221] According to a preset variable traversal order, determine the first flow field variable in each first flow field grid; the first flow field variable is the flow field variable corresponding to this automatic differentiation calculation;
[0222] By using the automatic differentiation program, the first flow field variables in the plurality of first flow field grids are automatically differentiated to obtain a plurality of first column vectors; the first column vector is a column vector corresponding to the first flow field variable in each first flow field grid;
[0223] Determining a plurality of second flow field variables corresponding to the next automatic differentiation calculation according to the variable traversal order;
[0224] Simultaneously, automatic differentiation calculation is performed on the plurality of second flow field variables to obtain a plurality of second column vectors;
[0225] Repeat the step of determining a plurality of second flow field variables corresponding to the next automatic differential calculation according to the variable traversal order until the plurality of flow field variables in the first flow field grid are all calculated;
[0226] The plurality of first grid column vectors are determined according to the first column vector and the second column vector.
[0227] In one embodiment, the traversal unit 1803 is used to:
[0228] Setting a target differential seed to a target value; the target differential seed is used to instruct the automatic differential program to perform automatic differential calculations on first flow field variables in a plurality of first flow field grids;
[0229] The automatic differentiation program is used to simultaneously perform automatic differentiation calculations on the column vectors corresponding to the target differential seeds to obtain the multiple first column vectors.
[0230] In one embodiment, the arranging unit 1804 is used to:
[0231] Determine the position of each target column vector in the target coefficient matrix according to the flow field grid and flow field variables corresponding to each target column vector;
[0232] The multiple target column vectors are arranged according to the position of each target column vector to obtain the target coefficient matrix.
[0233] In one embodiment, the computing unit 1805 is used to:
[0234] constructing an adjoint equation according to the target coefficient matrix;
[0235] Based on the adjoint equation, the target aerodynamic shape parameters of the aircraft are calculated and determined.
[0236] The embodiments of the aircraft aerodynamic shape optimization acceleration method based on discrete adjoints disclosed in the present invention can be applied to electronic devices such as computers. The device embodiments can be implemented by software, or by hardware or a combination of software and hardware. Taking software implementation as an example, as a device in a logical sense, it is formed by the processor of the electronic device in which it is located reading the corresponding computer program instructions in the non-volatile memory into the memory and running them. From the hardware level, if Fig.19 As shown, it is a hardware structure diagram of the electronic device where the aircraft aerodynamic shape optimization acceleration method based on discrete adjoint is located. Fig.19 In addition to the processor, memory, network interface, and non-volatile memory shown, the electronic device in which the device in the embodiment is located may also include other hardware according to the actual function of the electronic device, which will not be described in detail.
[0237] The implementation process of the functions and effects of each unit in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, and will not be repeated here.
[0238] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can refer to the partial description of the method embodiments. The device embodiments described above are only schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the disclosed solution. A person of ordinary skill in the art can understand and implement it without paying any creative work.
[0239] Although this specification includes many specific implementation details, these should not be interpreted as limiting the scope of any invention or the scope of protection claimed, but are mainly used to describe the features of the specific embodiments of specific inventions. Certain features described in multiple embodiments in this specification may also be implemented in combination in a single embodiment. On the other hand, the various features described in a single embodiment may also be implemented separately in multiple embodiments or in any suitable sub-combination. In addition, although features may work in certain combinations as described above and even initially claim protection, one or more features from the claimed combination may be removed from the combination in some cases, and the claimed combination may point to a sub-combination or a variation of a sub-combination.
[0240] Similarly, although operations are depicted in a particular order in the accompanying drawings, this should not be understood as requiring that these operations be performed in the particular order shown or performed sequentially, or requiring that all illustrated operations be performed to achieve the desired results. In some cases, multitasking and parallel processing may be advantageous. In addition, the separation of various system modules and components in the above-described embodiments should not be understood as requiring such separation in all embodiments, and it should be understood that the described program components and systems can generally be integrated together in a single software product, or packaged into multiple software products.
[0241] Thus, specific embodiments of the subject matter have been described. Other embodiments are within the scope of the appended claims. In some cases, the actions recited in the claims can be performed in a different order and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the particular order or sequential order shown to achieve the desired results. In some implementations, multitasking and parallel processing may be advantageous.
[0242] The above description is only a preferred embodiment of the present disclosure and is not intended to limit the present disclosure. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present disclosure shall be included in the scope of protection of the present disclosure.
Claims
1. An accelerated method for optimizing aerodynamic shape of an aircraft based on discrete adjoint, characterized in that: The method comprises: According to the aerodynamic shape parameters of the aircraft to be aerodynamically optimized, a target flow field of the aircraft is calculated by a numerical simulation solver, and according to the calculation format adopted by the numerical simulation solver, an interference range of flow field variables in the target flow field is determined; According to the interference range of the flow field variables, the flow field grid of the target flow field is divided into a plurality of traversal spaces that are connected but do not interfere with each other; there are a plurality of flow field grids in the traversal space, and the flow field grids include a plurality of flow field variables; According to the preset grid traversal order, automatic differentiation calculation is performed on the flow field grids in multiple traversal spaces at the same time to obtain multiple target column vectors in the target coefficient matrix; Arranging the multiple target column vectors to obtain the target coefficient matrix; the target coefficient matrix is a coefficient matrix of the adjoint equation when the aerodynamic shape of the aircraft is optimized based on the adjoint method; According to the target coefficient matrix, the adjoint vector is calculated and determined, and the aerodynamic shape of the aircraft is optimized based on the adjoint vector.
2. The method according to claim 1, characterized in that Determining the interference range of the flow field variables in the target flow field according to the calculation format adopted by the numerical simulation solver includes: Determining the interference radius of the flow field variable according to the calculation format adopted by the numerical simulation solver; Based on the interference radius, the interference range is determined.
3. The method according to claim 1, characterized in that According to the interference range of the flow field variables, the flow field grid of the target flow field is divided into a plurality of traversal spaces that are connected but do not interfere with each other, including: Determine the vertex of the target flow field as a division starting point; According to the interference range, the grid is divided at the division starting point to obtain a plurality of traversal spaces; the plurality of traversal spaces are connected in sequence and do not interfere with each other.
4. The method according to claim 1, characterized in that: According to the preset grid traversal order, automatic differentiation calculation is performed on the flow field grids in multiple traversal spaces at the same time to obtain multiple target column vectors in the target coefficient matrix, including: According to the grid traversal order, determining the first flow field grid in each traversal space; the first flow field grid is the flow field grid corresponding to the current round of automatic differentiation calculation; By using an automatic differentiation program, automatically differentiating multiple first flow field grids in the target flow field at the same time to obtain multiple first grid column vectors; Determining a plurality of second flow field grids corresponding to the next round of automatic differentiation calculation according to the grid traversal order; Simultaneously, automatic differentiation calculation is performed on the plurality of second flow field grids to obtain a plurality of second grid column vectors; Repeat the step of determining a plurality of second flow field grids corresponding to the next round of automatic differentiation calculation according to the grid traversal order until all flow field grids in each traversal space are calculated; Based on the first grid column vector and the second grid column vector, multiple target column vectors in the target coefficient matrix are determined.
5. The method according to claim 4, characterized in that Each flow field grid includes a plurality of flow field variables in the target flow field, each round of automatic differential calculation includes a plurality of automatic differential calculations, and each automatic differential calculation corresponds to a flow field variable; The automatic differentiation program is used to simultaneously perform automatic differentiation calculations on a plurality of first flow field grids in the target flow field to obtain a plurality of first grid column vectors, including: According to a preset variable traversal order, determine the first flow field variable in each first flow field grid; the first flow field variable is the flow field variable corresponding to this automatic differential calculation; By using the automatic differentiation program, the first flow field variables in the plurality of first flow field grids are automatically differentiated to obtain a plurality of first column vectors; the first column vector is a column vector corresponding to the first flow field variable in each first flow field grid; Determining a plurality of second flow field variables corresponding to the next automatic differentiation calculation according to the variable traversal order; Simultaneously, automatic differentiation calculation is performed on the plurality of second flow field variables to obtain a plurality of second column vectors; Repeat the step of determining a plurality of second flow field variables corresponding to the next automatic differential calculation according to the variable traversal order until the plurality of flow field variables in the first flow field grid are calculated; The plurality of first grid column vectors are determined according to the first column vector and the second column vector.
6. The method according to claim 5, characterized in that The automatic differentiation program is used to simultaneously perform automatic differentiation calculations on the first flow field variables in the plurality of first flow field grids to obtain a plurality of first column vectors, including: Setting a target differential seed to a target value; the target differential seed is used to instruct the automatic differential program to perform automatic differential calculations on first flow field variables in a plurality of first flow field grids; The automatic differentiation program is used to simultaneously perform automatic differentiation calculations on the column vectors corresponding to the target differential seeds to obtain the multiple first column vectors.
7. The method according to claim 1, characterized in that The step of arranging the plurality of target column vectors to obtain the target coefficient matrix includes: Determine the position of each target column vector in the target coefficient matrix according to the flow field grid and flow field variables corresponding to each target column vector; The multiple target column vectors are arranged according to the position of each target column vector to obtain the target coefficient matrix.
8. An aircraft aerodynamic shape optimization acceleration device based on discrete adjoint, characterized in that: The device comprises: a determination unit, configured to calculate a target flow field of the aircraft through a numerical simulation solver according to aerodynamic shape parameters of the aircraft to be aerodynamically optimized, and determine an interference range of flow field variables in the target flow field according to a calculation format adopted by the numerical simulation solver; A division unit is used to divide the flow field grid of the target flow field into a plurality of traversal spaces that are connected but do not interfere with each other according to the interference range of the flow field variables; the flow field grid is obtained based on the division of the target flow field, there are a plurality of flow field grids in the traversal space, and the flow field grid includes a plurality of flow field variables; A traversal unit is used to perform automatic differentiation calculations on flow field grids in multiple traversal spaces simultaneously according to a preset grid traversal order to obtain multiple target column vectors in a target coefficient matrix; an arrangement unit, used for arranging the multiple target column vectors to obtain the target coefficient matrix; The calculation unit is used to calculate and determine the adjoint vector in the optimization of the aerodynamic shape of the aircraft based on the adjoint method according to the target coefficient matrix, and optimize the aerodynamic shape of the aircraft based on the adjoint vector.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.
10. A computer 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 program, the method according to any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Flow field numerical simulation method and device, computer equipment and storage medium
CN115016951A
Deleted vortex simulation method for high-speed jet flow disturbing flow field
CN115374534A
Variable camber aerodynamic optimization design method of multi-trailing edge control surface aircraft wing
CN118504144A
Time parallel perturbation domain updating method for aircraft dynamic characteristic simulation
WO2023168772A1