Acceleration Method and Device for Aerodynamic Shape Optimization of Aircraft Based on Discrete Adjoint
Through the discrete accompanying method, the flow field grid is divided and automatic differential calculation is performed, the problem of high calculation cost of the accompanying equation coefficient matrix is solved, the efficiency of aircraft aerodynamic appearance optimization is improved, and a more efficient design process is achieved.
Patent Information
- Application Number
- CN202411655627.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-18
- Publication Date
- 2025-07-22
- Estimated Expiration
- 2044-11-18
AI Technical Summary
In the optimization of the aerodynamic shape of the aircraft, the calculation cost of the equation coefficient matrix is high and the efficiency is low, resulting in too much calculation of the optimization process, making it difficult to efficiently determine the aerodynamic shape of the aircraft.
By determining the interference range of the flow field variable based on discrete accompaniment, the flow field grid is divided into multiple connected but non-interference traversal spaces, and automatically differential calculations are performed in the preset order to build a target coefficient matrix, reduce the number of calculations, and improve efficiency.
The construction efficiency of the accompanying equation coefficient matrix is improved, the calculation cost is reduced, the optimization efficiency of the aerodynamic shape of the aircraft is improved, and the design cycle is shortened.
Smart Images

Figure CN119598604B_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 optimized in aerodynamic shape, calculate the target flow field of the aircraft through a numerical simulation solver, and determine the interference range of flow field variables in the target flow field according to the calculation format adopted by the numerical simulation solver;
[0008] According to the interference range of the flow field variables, divide the flow field grid of the target flow field into multiple connected but non-interfering traversal spaces; there are multiple flow field grids in the traversal spaces, and the flow field grids include multiple flow field variables;
[0009] According to the preset grid traversal order, perform automatic differentiation calculations on the flow field grids in multiple traversal spaces simultaneously to obtain multiple target column vectors in the target coefficient matrix;
[0010] Arrange the multiple target column vectors to obtain the target coefficient matrix;
[0011] According to the target coefficient matrix, calculate and determine the adjoint vector in the aerodynamic shape optimization of the aircraft based on the adjoint method, and optimize the aerodynamic shape of the aircraft based on the adjoint vector.
[0012] In one embodiment, the determining the interference range of flow field variables in the target flow field according to the calculation format adopted by the numerical simulation solver includes:
[0013] Determine the interference radius of the flow field variables according to the calculation format of the solver for calculating the initial aerodynamic shape parameters;
[0014] Based on the interference radius, determine the interference range.
[0015] In one embodiment, according to the interference range of the flow field variables, dividing the flow field grid of the target flow field into multiple connected but non-interfering traversal spaces includes:
[0016] Determine the vertex of the target flow field as the starting point of division;
[0017] According to the interference range, start dividing the grid at the starting point of division to obtain multiple traversal spaces; the multiple traversal spaces are connected in sequence and do not interfere with each other.
[0018] In one embodiment, the performing automatic differentiation calculations on the flow field grids in multiple traversal spaces simultaneously according to the preset grid traversal order to obtain multiple target column vectors in the target coefficient matrix includes:
[0019] According to the grid traversal order, determine 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] Through an automatic differentiation program, perform automatic differentiation calculations on multiple first flow field grids in the target flow field simultaneously to obtain multiple first grid column vectors;
[0021] According to the grid traversal order, determine multiple second flow field grids corresponding to the next round of automatic differentiation calculations;
[0022] Perform automatic differentiation calculations on the multiple second flow field grids simultaneously to obtain multiple second grid column vectors;
[0023] Repeat the step of determining multiple second flow field grids corresponding to the next round of automatic differentiation calculations according to the grid traversal order until the flow field grids in each traversal space are all calculated;
[0024] According to the first grid column vectors and the second grid column vectors, determine multiple target column vectors in the target coefficient matrix.
[0025] In one embodiment, each flow field grid includes multiple flow field variables in the target flow field, each round of automatic differentiation calculation includes multiple automatic differentiation calculations, and each automatic differentiation calculation corresponds to a flow field variable;
[0026] The step of performing automatic differentiation calculations on multiple first flow field grids in the target flow field simultaneously through the automatic differentiation program to obtain multiple first grid column vectors includes:
[0027] According to the preset variable traversal order, determine the first flow field variables in each first flow field grid; the first flow field variables are the flow field variables corresponding to the current automatic differentiation calculation;
[0028] Through the automatic differentiation program, perform automatic differentiation calculations on the first flow field variables in multiple first flow field grids simultaneously to obtain multiple first column vectors; the first column vectors are the column vectors corresponding to the first flow field variables in each first flow field grid;
[0029] According to the variable traversal order, determine multiple second flow field variables corresponding to the next automatic differentiation calculation;
[0030] Perform automatic differentiation calculations on the multiple second flow field variables simultaneously to obtain multiple second column vectors;
[0031] Repeat the step of determining multiple second flow field variables corresponding to the next automatic differentiation calculation according to the variable traversal order until all the flow field variables in the first flow field grids are calculated;
[0032] According to the first column vectors and the second column vectors, determine the multiple first grid column vectors.
[0033] In one embodiment, through the automatic differentiation program, automatic differentiation calculations are simultaneously performed on first flow field variables in a plurality of first flow field meshes to obtain a plurality of first column vectors, including:
[0034] Set a target differentiation seed to a target value; the target differentiation seed is used to instruct the automatic differentiation program to perform automatic differentiation calculations on first flow field variables in a plurality of first flow field meshes;
[0035] Through the automatic differentiation program, automatic differentiation calculations are simultaneously performed on the column vectors corresponding to the target differentiation seed to obtain the plurality of first column vectors.
[0036] In one embodiment, arranging the plurality of 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 mesh and flow field variable corresponding to each target column vector;
[0038] Arrange the plurality of target column vectors according to the positions of each target column vector to obtain the target coefficient matrix.
[0039] According to a second aspect of the embodiments of the present disclosure, there is provided an acceleration device for aircraft aerodynamic shape optimization based on discrete adjoint, the device includes:
[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 optimized for aerodynamic shape, and determine an interference range of flow field variables in the target flow field according to the calculation format adopted by the numerical simulation solver;
[0041] A division unit, configured to divide the flow field meshes of the target flow field into a plurality of connected but non-interfering traversal spaces according to the interference range of the flow field variables; the flow field meshes are obtained by dividing the target flow field, there are a plurality of flow field meshes in the traversal space, and the flow field meshes include a plurality of flow field variables;
[0042] A traversal unit, configured to simultaneously perform automatic differentiation calculations on the flow field meshes in a plurality of traversal spaces according to a preset grid traversal order to obtain a plurality of target column vectors in the target coefficient matrix;
[0043] An arrangement unit, configured to arrange the plurality of target column vectors to obtain the target coefficient matrix;
[0044] A calculation unit, configured to calculate and determine an adjoint vector in aircraft aerodynamic shape optimization 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 configured to:
[0046] Determine the interference radius of the flow field variables according to the calculation format for calculating the flow field parameters by the solver;
[0047] Determine the interference range based on the interference radius.
[0048] In one embodiment, the dividing unit is configured to:
[0049] Determine the vertices of the target flow field as the starting points for division;
[0050] According to the interference range, start dividing the grid at the starting points for division 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 traversing unit is configured to:
[0052] Determine the first flow field grids in each traversal space according to the grid traversal order; the first flow field grids are the flow field grids corresponding to the current round of automatic differentiation calculation;
[0053] Through an automatic differentiation program, 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;
[0054] Determine a plurality of second flow field grids corresponding to the next round of automatic differentiation calculation according to the grid traversal order;
[0055] Simultaneously perform automatic differentiation calculations 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 the flow field grids in each traversal space are all calculated;
[0057] Determine a plurality of target column vectors in the target coefficient matrix according to the first grid column vectors and the second grid column vectors.
[0058] In one embodiment, each flow field grid includes a plurality of flow field variables in the target flow field, each round of automatic differentiation calculation includes multiple automatic differentiation calculations, and each automatic differentiation calculation corresponds to a flow field variable;
[0059] The traversing unit is configured to:
[0060] Determine the first flow field variables in each first flow field grid according to a preset variable traversal order; the first flow field variables are the flow field variables corresponding to the current automatic differentiation calculation;
[0061] Through the automatic differentiation program, automatic differentiation calculations are simultaneously performed on first flow field variables in multiple first flow field meshes to obtain multiple first column vectors; the first column vectors are column vectors corresponding to the first flow field variables in each first flow field mesh.
[0062] According to the variable traversal order, multiple second flow field variables corresponding to the next automatic differentiation calculation are determined.
[0063] Automatic differentiation calculations are simultaneously performed on the multiple second flow field variables to obtain multiple second column vectors.
[0064] The step of determining multiple second flow field variables corresponding to the next automatic differentiation calculation according to the variable traversal order is repeatedly executed until the multiple flow field variables in the first flow field mesh are all calculated.
[0065] According to the first column vectors and the second column vectors, the multiple first grid column vectors are determined.
[0066] In one embodiment, the traversal unit is configured to:
[0067] Set a target differentiation seed to a target value; the target differentiation seed is used to instruct the automatic differentiation program to perform automatic differentiation calculations on first flow field variables in multiple first flow field meshes.
[0068] Through the automatic differentiation program, automatic differentiation calculations are simultaneously performed on the column vectors corresponding to the target differentiation seed to obtain the multiple first column vectors.
[0069] In one embodiment, the arrangement unit is configured to:
[0070] According to the flow field meshes and flow field variables corresponding to each target column vector, the positions of each target column vector in the target coefficient matrix are determined.
[0071] According to the positions of each target column vector, the multiple target column vectors are arranged to obtain the target coefficient matrix.
[0072] In one embodiment, the calculation unit is configured to:
[0073] According to the target coefficient matrix, an adjoint equation is constructed.
[0074] According to the adjoint equation, the target aerodynamic shape parameters of the aircraft are calculated and determined.
[0075] According to the third aspect of the embodiments 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, the method described in any one of the first aspects above is implemented.
[0076] According to a third aspect of the embodiments of the present disclosure, an electronic device is provided, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, the method described in any one of the above first aspects is implemented.
[0077] The technical solutions provided by the embodiments of the present disclosure may include the following beneficial effects:
[0078] By determining the interference range of flow field variables according to the calculation format for solving the flow field parameters of the aircraft by the solver, and dividing the grid of the target flow field according to the interference range, multiple column vectors in the coefficient matrix can be solved simultaneously, improving the construction efficiency of the coefficient matrix and reducing the calculation cost. Furthermore, when calculating and determining the adjoint vector in the aircraft aerodynamic shape optimization based on the adjoint method according to the coefficient matrix, and optimizing the aerodynamic shape of the aircraft 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 flowchart of a method for accelerating the aerodynamic shape optimization of an aircraft based on discrete adjoint shown in an exemplary embodiment of the present disclosure;
[0080] Figure 2 is a flowchart of a method for determining the interference range of flow field variables shown in an exemplary embodiment of the present disclosure;
[0081] Figure 3 is a schematic diagram of the interference range of flow field variables 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 flowchart of a method for dividing a flow field grid shown in an exemplary embodiment of the present disclosure;
[0084] Figure 6 is a flowchart 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 the division of a flow field grid shown in an exemplary embodiment of the present disclosure;
[0086] Figure 8 is a flowchart of a method for performing automatic differentiation calculation on a first flow field grid shown in an exemplary embodiment of the present disclosure;
[0087] Figure 9 is a flowchart of a method for performing automatic differentiation calculation through an automatic differentiation program shown in an exemplary embodiment of the present disclosure;
[0088] Figure 10 is a flowchart of a method for calculating a target coefficient matrix shown in an exemplary embodiment of the present disclosure;
[0089] Figure 11 is a schematic diagram of a flow field grid shown in an exemplary embodiment of the present disclosure;
[0090] Figure 12 is a partially enlarged view of a spherical head flow field shown in an exemplary embodiment of the present disclosure;
[0091] Figure 13 is a partial schematic diagram of a divided spherical head flow field shown in an exemplary embodiment of the present disclosure;
[0092] Figure 14 is an overall schematic diagram of a divided spherical head flow field shown in an exemplary embodiment of the present disclosure;
[0093] Figure 15 is a labeled schematic diagram of a flow field grid shown in an exemplary embodiment of the present disclosure;
[0094] Figure 16 is a partial labeled schematic diagram of a spherical head flow field shown in an exemplary embodiment of the present disclosure;
[0095] Figure 17 is an overall labeled schematic diagram of a spherical head flow field shown in an exemplary embodiment of the present disclosure;
[0096] Figure 18 is a block diagram of an aircraft aerodynamic shape optimization acceleration device based on discrete adjoint shown in an exemplary embodiment of the present disclosure;
[0097] Figure 19 is a hardware structure diagram of an electronic device shown in an exemplary embodiment of the present disclosure. Detailed Implementation Manner
[0098] Here, the exemplary embodiments will be described in detail, and the examples are shown in the drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementation manners described in the following exemplary embodiments do not represent all implementation manners consistent with the present disclosure. On the contrary, 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 particular embodiments only and are not intended to limit the disclosure. The singular forms "a", "the", and "that" used in this disclosure and the appended claims are also intended to include the plural forms unless the context clearly dictates otherwise. It should also be understood that the term "and / or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
[0100] It should be understood that although the terms first, second, third, etc. may be used in this disclosure to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from each other. For example, without departing from the scope of this 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 "when" or "while" or "in response to determining".
[0101] During the aircraft design process, in order to improve the overall performance, safety, and economy of the aircraft during the takeoff phase, scientific design and simulation are required to achieve the optimization and determination of the aircraft's aerodynamic shape. When optimizing the aerodynamic shape of the aircraft, in the face of the huge design variables of the 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 objectives to be optimized for the aircraft, determine the objective function, such as minimizing drag, maximizing lift, improving aerodynamic efficiency, etc. Then, design constraint conditions are determined according to the optimization objectives, such as structural strength, weight limit, manufacturing feasibility, etc. Then, a numerical model of the aircraft's aerodynamic shape is established using CFD (Computational Fluid Dynamics) software for flow field calculation. 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 meshed to obtain multiple flow field meshes. By meshing the flow field, the continuous flow field region can be divided into discrete elements so that the flow field data of the aircraft can be calculated and solved in these elements. Based on the CFD calculation results of the flow field mesh, the flow field parameters of the aircraft can be obtained, such as the velocity field, pressure field, etc. Furthermore, according to the flow field parameters of the aircraft, the adjoint equation is derived, and based on 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, through an optimization algorithm (such as gradient descent, Newton's method, or other global optimization methods), the aerodynamic shape parameters are updated according to this sensitivity information to achieve the optimization and determination of the aircraft's aerodynamic shape.
[0102] Currently, the automatic differentiation technique is usually used to calculate the coefficient matrix of the adjoint equation. However, when obtaining the coefficient matrix through the automatic differentiation technique, the number of calls to the differentiation program is proportional to the grid quantity. When explicitly solving the coefficient matrix through the automatic differentiation program, only 1 differentiation seed is set to 1 each time, and the rest of the differentiation seeds are set to 0. In this case, only 1 column of the coefficient matrix can be explicitly solved by calling the automatic differentiation program. 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. That is to say, the calculation times of automatic differentiation are positively correlated with the flow field grid quantity. As the flow field grid increases, the calculation amount also increases. When the grid quantity is large, it is easy to lead to too high a calculation cost of the adjoint equation coefficient matrix, resulting in too high a cost and low efficiency in optimizing the aerodynamic shape of the aircraft based on the adjoint equation.
[0103] Based on this, the present disclosure proposes an acceleration method for optimizing the aerodynamic shape of an aircraft based on discrete adjoint. The method can be applied to an electronic device with computing functions, which can effectively improve the establishment efficiency of the adjoint equation and thus improve the determination efficiency of the aerodynamic shape of the aircraft.
[0104] Figure 1 The flowchart of the acceleration method for optimizing the aerodynamic shape of an aircraft based on discrete adjoint of the present disclosure is shown. Please refer to Figure 1 As shown, the method includes:
[0105] S101, according to the aerodynamic shape parameters of the aircraft to be optimized for the aerodynamic shape, calculate the target flow field of the aircraft through a numerical simulation solver, 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.
[0106] Discrete adjoint is a kind of numerical method used when solving 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 in 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 can be a CFD solver, which can simulate fluid flow through the solver and handle complex flow fields, thereby realizing the aerodynamic analysis of the aircraft.
[0108] In some embodiments, the aerodynamic shape parameters are obtained based on the geometric shape outside the aircraft. The aerodynamic shape parameters of the aircraft directly affect the flow characteristics of the aircraft. Obtaining the aerodynamic shape parameters of the aircraft can be achieved by modeling the geometric shape of the aircraft through computer-aided design software to obtain a numerical model of the aircraft, and this 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, a 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 flow field parameters such as velocity, pressure, temperature, density, and viscosity.
[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 meshed to generate a flow field mesh. The flow field mesh can be a mesh divided based on a two-dimensional space or a mesh divided based on a three-dimensional space.
[0111] Based on the flow field parameters, a preset flow equation, and an objective function for optimizing the aerodynamic shape of the aircraft, an adjoint equation is constructed to calculate the sensitivity of the objective function with respect to the aerodynamic shape parameters of the aircraft. The objective function is constructed based on the objectives that need to be optimized for the aircraft. The objectives that need to be optimized can be minimizing drag, maximizing lift, improving aerodynamic efficiency, etc. The calculated sensitivity represents the degree of influence of a certain variable in the aerodynamic shape parameters of the aircraft on the objective function. Based on this sensitivity, the aerodynamic shape parameters of the aircraft can be optimized.
[0112] For constructing the adjoint equation, its core 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 and columns of the matrix are equal, and both are the product of the number of flow field meshes and the number of flow field variables on each flow field mesh. That is to say, n = the number of flow field meshes * 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 mesh with respect to a flow field variable on other meshes within the interference range. The interference range is the range of the surrounding flow field meshes affected after the flow field variables of the current grid are perturbed 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 variables of the aircraft can be determined according to the calculation format of the solver.
[0116] Figure 2 A flowchart showing a method for determining the interference range of flow field variables is shown. The flowchart includes the following steps:
[0117] S201. Determine the interference radius of the flow field variables 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 the 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 such as variable reconstruction, flux splitting, and limiter. Specifically, the interference radius of the flow field variables can be determined according to the order adopted when the solver performs high-order calculations. For example, if the third-order calculation is adopted when the solver performs high-order calculations, it means that when calculating the flow field perturbation of a flow field grid, the three layers of flow field grids around it will be involved. Therefore, the interference radius of the flow field variables is three.
[0120] It should be noted that when the flow field grid is obtained by dividing the target flow field based on two dimensions, the interference radius is the interference radii in the two directions of the horizontal axis and the vertical axis; when the flow field grid is obtained by dividing the target flow field based on three dimensions, the interference radius is the interference radii in the three directions of the horizontal axis, the vertical axis, and the vertical axis.
[0121] After determining the interference radius, taking the flow field grid where the flow field variables are perturbed as the center, the interference range can be determined. 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 interference radius of the flow field variables is 2, its interference range is 5. This is because the flow field grid where the variable perturbation itself occurs is also within the interference range of the flow field variables, that is, 1 in formula (2) represents the flow field grid where the variable perturbation itself occurs. Figure 3 Shows a schematic diagram of the interference range of the flow field variables when the interference radius is 2. Taking the flow field perturbation unit (x, y) as the center, the grid cells within its interference range include the two layers of flow field grids around it.
[0124] S102. Divide the flow field grid of the target flow field into multiple non-interfering traversal spaces according to the interference range of the flow field variables.
[0125] The flow field grid is obtained by dividing the target flow field. When using CFD software to analyze the flow field of an aircraft, it is necessary to perform grid division on the flow field according to the numerical model to generate a computational grid. Each flow field grid includes multiple flow field variables in the target flow field. For example, if there are four flow field variables of density, pressure, lateral velocity, and longitudinal velocity in the target flow field, then these four flow field variables will also be stored in each flow field grid.
[0126] After determining the interference range of each flow field variable, based on this interference range, the flow field grid needs to be divided into multiple traversal spaces with complementary interference. Taking a two-dimensional flow field grid as an example, when the interference range is 5, using 5 as the number of boundary grid cells, a traversal space in the shape of a square with a side length of 5 is determined, and the number of flow field grid cells in this traversal space is 25. Then, the flow field grid of the entire aircraft is divided according to this traversal space. The schematic diagram of each traversal space is as Figure 4 shown, where the space enclosed by the dashed line is a traversal space. Figure 4 Schematically shows the arrangement of four traversal spaces. 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 exact multiple of the traversal space, so the boundary of the aircraft flow field grid may not be a complete traversal space.
[0127] Figure 5 Shows a flowchart for dividing the flow field grid. This flowchart includes the following steps:
[0128] S501, determine the vertex of the target flow field as the starting point for division.
[0129] S502, based on the interference range, start dividing the grid at the starting point for division to obtain multiple traversal spaces; the multiple traversal spaces are connected in sequence 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, take a vertex of the target flow field as the starting point for dividing the traversal space. At the starting point for division, start arranging them 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 vectors 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 the preset grid traversal order, simultaneously perform automatic differentiation calculations on the flow field grids in multiple traversal spaces to obtain multiple target column vectors in the target coefficient matrix.
[0133] After the traversal space division is completed, the flow field grid can be automatically differentiated according to the divided traversal space, and each column vector in the coefficient matrix of the adjoint equation used to optimize the aerodynamic shape parameters of the aircraft can be obtained. The grid traversal order is used to determine the calculation order of multiple flow field grids in each traversal space. After determining the flow field grid for this round of calculation according to the grid traversal order, the first flow field grids in each traversal space can be calculated simultaneously. The column vectors of each first flow field grid are 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, and there are 25 flow field grids in one traversal space, and there is only one flow field variable in each flow field grid. That is to say, there are 6 traversal spaces in the target flow field of the aircraft. Then when calculating the flow field grid, the first flow field grids in 6 traversal spaces can be calculated simultaneously, and 6 target column vectors corresponding to the flow field grids can be obtained at one time. Then the second flow field grids in 6 traversal spaces are calculated simultaneously, and so on, until the twenty-fifth flow field grids in 6 traversal spaces are calculated, 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 grid, especially when the number of grids is large, the effect of improving the efficiency is more obvious.
[0135] Figure 6 A method flow chart for calculating the target coefficient matrix is shown, and the flow chart includes the following steps:
[0136] S601, determine the first flow field grids in each traversal space according to the grid traversal order.
[0137] S602, through an automatic differentiation program, simultaneously perform automatic differentiation calculations on multiple first flow field grids in the target flow field to obtain multiple first grid column vectors.
[0138] S603, determine multiple second flow field grids corresponding to the next round of automatic differentiation calculation according to the grid traversal order.
[0139] S604, simultaneously perform automatic differentiation calculations on the multiple second flow field grids to obtain multiple second grid column vectors.
[0140] S605, repeat the step of determining multiple second flow field grids corresponding to the next round of automatic differentiation calculation according to the grid traversal order until the flow field grids in each traversal space are all calculated.
[0141] S606, determine multiple target column vectors in the target coefficient matrix according to the first grid column vectors and the second grid column vectors.
[0142] The grid traversal order refers to the order of traversing 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 the flow field grids in each row. After the traversal of the flow field grids in a row is completed, then traverse the flow field grids in the next row in the order from bottom to top. When traversing the flow field grids in the next row, traverse them in the order from left to right.
[0143] According to the grid traversal order, determine the first flow field grid in each traversal space corresponding to the current round of automatic differentiation calculation. Figure 7 Schematically shows a schematic diagram of the division of flow field grids. Among them, the dotted line indicates that the area is a traversal space, and the grid with shaded information is the first flow field grid. That is to say, during the process of the current round of automatic differentiation calculation, the automatic differentiation calculation can be performed on the first flow field grids in multiple traversal spaces simultaneously.
[0144] When performing automatic differentiation calculation on the first flow field grid, the automatic differentiation program can be called to calculate the flow field variables in the first flow field grid, and solve the partial derivatives of the residual vector of the flow field variables in the first flow field grid with respect to all the flow field variable vectors on all the flow field grids in the target flow field, obtaining multiple first grid vectors. The first grid vectors include the 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 through the automatic differentiation program, the 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 continue to perform automatic differentiation calculation on the multiple second flow field grids 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, continue to determine the next second flow field grid according to the grid traversal order until all the flow field grids in each traversal space are traversed and the automatic differentiation calculation is completed. Finally, by assembling the multiple grid vectors corresponding to each flow field grid, the multiple target column vectors in the target coefficient matrix can be determined.
[0146] Since 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 one flow field variable with respect to all the flow field variable vectors on all the flow field grids in the target flow field, therefore, when performing a round of automatic differentiation calculation on each flow field grid, a 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 Schematically shown is a flowchart for automatic differentiation calculation of the first flow field grid, and the flowchart includes the following steps:
[0148] S801, determine the first flow field variables in each first flow field grid according to a preset variable traversal order; the first flow field variables are the flow field variables corresponding to the current automatic differentiation calculation.
[0149] S802, through the automatic differentiation program, simultaneously perform automatic differentiation calculation on the first flow field variables in multiple first flow field grids to obtain multiple first column vectors.
[0150] S803, determine multiple second flow field variables corresponding to the next automatic differentiation calculation according to the variable traversal order.
[0151] S804, simultaneously perform automatic differentiation calculation on the multiple second flow field variables to obtain multiple second column vectors.
[0152] S805, repeat the step of determining multiple second flow field variables corresponding to the next automatic differentiation calculation according to the variable traversal order until the calculation of multiple flow field variables in the first flow field grid is completed.
[0153] S806, determine the multiple first grid column vectors according to the first column vectors and the second column vectors.
[0154] The first column vectors are the column vectors corresponding to the first flow field variables in each first flow field grid. Since calling the automatic differentiation program once can solve the derivative of the residual vector of a flow field variable in a flow field grid, that is, one 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 a preset variable traversal order to perform automatic differentiation calculations on each flow field variable in the first flow field grid respectively. Specifically, the first flow field variable in the first flow field grid can be determined according to the variable traversal order, and the first flow field variable can be calculated through 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 program is used to perform automatic differentiation calculations on the second flow field variables in each first flow field grid simultaneously to obtain the second column vector. Then, continue to determine the flow field variable for the next calculation according to the flow rate traversal order and perform the calculation until the automatic differentiation calculations of all flow field variables in the first flow field grid are completed. Finally, according to the column vectors 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, the first flow field variable in the first flow field grid is determined to be pressure first, and then the automatic differentiation program is used to simultaneously take the derivative of the residual vector of the pressure parameter in the first flow field grid in each traversal space. Thus, the first column vector corresponding to the pressure variable in each first flow field grid can be obtained. Then, take the derivative of the residual vector of the temperature parameter in the first flow field grid in each traversal space to obtain the second column vector corresponding to the temperature variable in each first flow field grid. Finally, take the derivative of the residual vector of the density parameter in the first flow field grid in each traversal space to obtain the third column vector corresponding to the density variable in each first flow field grid. The first grid vector can be determined according to the first column vector, the second column vector, and the third column vector.
[0157] When performing an automatic differentiation calculation on a flow field variable once through the automatic differentiation program, it is necessary to set the differentiation seed for automatic differentiation, and the differentiation seed is used to guide the calculation content of the automatic differentiation program. Formula (3) exemplarily shows a calculation formula for implementing an automatic differentiation process, 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 differentiation 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 differentiation seeds, and the number of differentiation seeds is equal to the number of column vectors in the target coefficient matrix, that is, the number of differentiation seeds is equal to the product of the number of grids in the target flow field and the number of flow field variables.
[0160] Figure 9 A flowchart of automatic differentiation calculation by an automatic differentiation program is shown. The flowchart includes the following steps:
[0161] S901, set the target differentiation seed to the target value.
[0162] S902, through the automatic differentiation program, simultaneously perform automatic differentiation calculation on the column vectors corresponding to the target differentiation seed to obtain the multiple first column vectors.
[0163] When performing automatic differentiation calculation through the automatic differentiation program, first determine the corresponding differentiation seed according to the flow field variables of the current automatic differentiation calculation. Since the differentiation seed and the column vectors in the target coefficient matrix are in one-to-one correspondence, one differentiation seed corresponds to one column vector in the target coefficient matrix, and one column vector in the target coefficient matrix corresponds to one flow field variable of one flow field grid. Therefore, one differentiation seed corresponds to one flow field variable in one flow field grid. When performing automatic differentiation calculation on the first flow field variable, the differentiation seed corresponding to the first flow field variable in each first flow field grid can be determined as the target differentiation seed. Then set the target differentiation seed to the target value 1, and set the remaining differentiation seeds to the invalid value 0. Then call the automatic differentiation program based on the set target differentiation seed, and the first column vector corresponding to the first flow field variable can be calculated.
[0164] S104, arrange the multiple target column vectors to obtain the target coefficient matrix.
[0165] After calculating the multiple target column vectors, only need to combine the target column vectors to solve and display the target coefficient matrix. Since the column vectors in the target coefficient matrix correspond to one flow field variable of one flow field grid, the arrangement positions of the multiple target column vectors in the target coefficient matrix can be determined according to the position relationship between the flow field grid and the flow field variables in the target flow field.
[0166] After determining the position of each target column vector, it can be arranged according to the position of the target column vector so that the position of each target column vector corresponds to the position of the flow field variable in the target flow field. Thus, the final target coefficient matrix is obtained.
[0167] S105, based on the target coefficient matrix, calculate and determine the adjoint vector in the optimization of the aircraft aerodynamic shape based on the adjoint method, and optimize the aerodynamic shape of the aircraft based on the adjoint vector.
[0168] When the target coefficient matrix of the adjoint equation is obtained in the optimization of the aerodynamic shape of the aircraft based on the adjoint method, the adjoint vector can be calculated according to the target coefficient matrix. Determine the influence degree of the aerodynamic shape parameters on the objective function to be optimized. Then, based on the adjoint equation, determine the update direction of the aerodynamic shape parameters, and determine the target aerodynamic shape parameters through optimization algorithms (such as gradient descent, Newton's method, etc.). It should be noted that constructing a target coefficient matrix and an adjoint equation may not be able to determine the final target aerodynamic shape parameters. After calculating the new target aerodynamic shape parameters based on 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 and achieve the optimization of the aerodynamic shape of the aircraft.
[0169] By determining the computational format for calculating the flow field parameters of the aircraft 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 simultaneously, improving the construction efficiency of the coefficient matrix and reducing the computational cost. Furthermore, when calculating the aerodynamic shape parameters of the aircraft based on 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, Figure 10 A method flow chart for calculating the target coefficient matrix is shown.
[0171] S1001, determine the computational format in the numerical simulation solver, and determine the maximum interference radius of the perturbation of the flow field variables according to the computational format. That is, after the flow field variables in the target flow field are perturbed, through a single flow field simulation solution, it will affect the values of the flow field variables on the flow field grids of several layers around the perturbed cells.
[0172] S1002, according to the maximum interference radius, determine the traversal space of each differential seed in the automatic differentiation program. The number of boundary flow field grids of this traversal space is twice the maximum interference radius plus one.
[0173] S1003, divide the flow field grid into several traversal spaces that are exactly the same size and are connected in series without interference according to the size of the traversal space, and ensure that the entire flow field is completely divided.
[0174] S1004, determine the grid traversal order of the differential seeds in the traversal space to ensure that the differential seeds traverse each flow field grid in the traversal space once.
[0175] S1005, label the flow field grids according to the grid traversal order determined in S1004. Label the first flow field grid in each traversed space as the active state, and label the remaining flow field grids in the traversed space as the inactive state, and ensure that the active and inactive states of the grids in each traversed space are consistent.
[0176] S1006, each flow field grid stores the same number of flow field variables. Determine the variable traversal order of the differential seeds among these flow field variables to ensure that the differential seeds can traverse all the flow field variables in each flow field grid in this order.
[0177] S1007, label the flow field variables according to the variable traversal order determined in S1006. Select the first flow field variable to be traversed and label it as the active state, and label the remaining flow field variables as the inactive state.
[0178] S1008, set the values of the differential seeds according to the states of the grid and flow field variable labels. Set the differential seed values corresponding to the flow field variables that are marked as active on all the grids marked as active in the flow field grid to 1, and set the remaining differential seed values to 0.
[0179] S1009, call an automatic differentiation program once to perform automatic differentiation calculation to obtain all the non-zero elements in the corresponding column of the coefficient matrix corresponding to the differential seed with a value of 1.
[0180] S1010, assemble the values of the non-zero elements obtained in S1009 into the coefficient matrix according to the corresponding positions.
[0181] S1011, according to the flow field variable traversal order determined in S1006, select the next new flow field variable for labeling, label this new flow field variable as the active state, and label the remaining flow field variables as the inactive state, and repeat S1008 to S1010.
[0182] S1012, repeat S1011 until all the flow field variables in the current flow field grid are traversed once.
[0183] S1013, according to the grid traversal order determined in S1004, select a new grid for labeling, and label the new flow field grid as the active state, and label the remaining grids as the inactive state, and repeat S1005 to S1012.
[0184] S1014, repeat S1013 until all the grids are traversed once;
[0185] S1015, set all the unassembled elements of the coefficient matrix to 0, that is, the coefficient matrix is obtained.
[0186] In one embodiment, the solution process is described by showing the coefficient matrix corresponding to the 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. During the process of the numerical simulation solver solving the target flow field, the MUSCL format with the Van-Albaba limiter can be used for the reconstruction of the flow field values on the grid surface, and the Van Leer flux splitting can be used for the flux vector splitting. Among them, the computational formats used for variable reconstruction, flux splitting, and limiter are all second-order formats, so the interference radius is 2.
[0188] According to the maximum interference radius, the differential seed traversal space is determined. According to the fact that the number of boundary grids in the traversal space is twice the maximum interference radius plus one, it can be determined that the number of boundary grid cells in this traversal space is 5.
[0189] The flow field grid of the two-dimensional hypersonic spherical head flow field is as Figure 11 shown, and the enlarged local grid of the position along the upper edge of the spherical head is as Figure 12 shown. According to the size of the traversal space, the flow field grid can be divided. The enlarged local grid of the upper edge grid of the spherical head after division is as Figure 13 shown, where the dashed line represents the division of the traversal space. The full-field grid after division is as Figure 14 shown, and the dashed line also represents the division of the traversal space. However, due to the too small grid size near the wall, Figure 14 only the division of the traversal space far from the wall 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. Among them, the specific order of traversing the wall direction is counterclockwise, and the specific order of traversing the wall normal direction is from near the wall to far from the wall.
[0191] According to the determined differential seed traversal order, the first flow field grid selected for traversal is marked as the active state, and the remaining grids in the traversal space are marked as the non-active state, as Figure 15 shown. In the figure, the grids with large square dots at the grid centers are in the active state, and the grids with small round dots at the grid centers are in the non-active state.
[0192] According to the active and non-active states of the grids in the traversal space where the differential seed is located, the active and non-active states of the grids in all other traversal spaces are set to ensure that the active and non-active states of the grids in each traversal space are consistent. The active and non-active states of the grids at the upper edge position of the spherical head are as Figure 16 shown, and the active and non-active states of the overall grid of the spherical head are as Figure 17 shown. Figure 16 and Figure 17Among them, the grids with large dots at the grid centers are in the active state, and the grids with small dots at the grid centers are in the inactive state.
[0193] Since a two-dimensional shape is adopted in this embodiment, four flow field variables, namely density, pressure, transverse velocity, and longitudinal velocity, are stored on each grid. Therefore, it can be determined that the traversal order of the differential seeds in these flow field variables is density, pressure, transverse velocity, and longitudinal velocity.
[0194] According to the determined traversal order of the flow field variables, the initial flow field variable density selected for traversal is marked as the active state, and the remaining flow field variables, pressure, transverse velocity, and longitudinal velocity, are all marked as the inactive state. The differential seed values corresponding to the flow field variables marked as the active state on all the grids marked as the active state in the flow field grid are set to 1, and the remaining differential seed values are all set to 0;
[0195] By calling the automatic differentiation program once, all non-zero elements of the column corresponding to the differential seed with a value of 1 can be obtained, and the obtained non-zero elements are assembled into the coefficient matrix according to the corresponding positions.
[0196] According to the traversal order of the flow field variables, a new flow field variable is successively selected and marked as the active state, and the remaining flow field variables are all marked as the inactive state, and the operations of repeatedly calling the automatic differentiation program and assembling non-zero elements are performed until all flow field variables are processed.
[0197] According to the determined grid traversal order, a new grid is selected and marked as the active state, and the remaining grids are all marked as the inactive state, and the operations of traversing the differential seed flow field variables, calling the automatic differentiation program, and assembling non-zero elements are repeated until all grids are traversed once. All the unassembled elements of the coefficient matrix are set to 0, that is, the coefficient matrix is obtained.
[0198] Based on the method for solving the coefficient matrix in the embodiment of the present disclosure, multiple columns of the coefficient matrix can be solved and displayed at one time. The number of times of calling the automatic differentiation program is only the number of flow field grids in the differential seed traversal space, and its computational amount is a very small fixed value and does not increase with the increase of the number of grids, which improves the computational efficiency of the adjoint equation coefficient matrix, and further improves the efficiency of determining the aerodynamic shape parameters of the aircraft according to the adjoint equation.
[0199] Corresponding to the embodiment of the method for accelerating the aerodynamic shape optimization of an aircraft based on discrete adjoint, the present disclosure also provides an embodiment of a device for accelerating the aerodynamic shape optimization of an aircraft based on discrete adjoint.
[0200] Figure 18 An exemplary block diagram of a device for accelerating the aerodynamic shape optimization of an aircraft based on discrete adjoint is shown, and the device includes:
[0201] A determination unit 1801, configured to calculate a target flow field of the aircraft to be optimized for the aerodynamic shape according to the aerodynamic shape parameters of the aircraft, and determine an interference range of flow field variables in the target flow field according to the calculation format adopted by the numerical simulation solver;
[0202] A division unit 1802, configured to divide the flow field grid of the target flow field into a plurality of connected but non-interfering traversal spaces according to the interference range of the flow field variables; the flow field grid is obtained by dividing 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, configured to perform automatic differentiation calculation on the flow field grids in a plurality of traversal spaces simultaneously according to a preset grid traversal order to obtain a plurality of target column vectors in a target coefficient matrix;
[0204] An arrangement unit 1804, configured to arrange the plurality of target column vectors to obtain the target coefficient matrix;
[0205] A calculation unit 1805, configured to calculate and determine an adjoint vector in the aerodynamic shape optimization 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 determination unit 1801 is configured to:
[0207] Determine an interference radius of the flow field variables according to the calculation format for calculating the flow field parameters by the solver;
[0208] Determine the interference range based on the interference radius.
[0209] In one embodiment, the division unit 1802 is configured to:
[0210] Determine the vertex of the target flow field as the division starting point;
[0211] Divide 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 connected in sequence and do not interfere with each other.
[0212] In one embodiment, the traversal unit 1803 is configured to:
[0213] Determine a first flow field grid in each traversal space according to the grid traversal order; the first flow field grid is the flow field grid corresponding to the current round of automatic differentiation calculation;
[0214] Perform automatic differentiation calculation 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;
[0215] Determine multiple second flow field grids corresponding to the next round of automatic differentiation calculation according to the grid traversal order;
[0216] Simultaneously perform automatic differentiation calculation on the multiple second flow field grids to obtain multiple second grid column vectors;
[0217] Repeat the step of determining multiple second flow field grids corresponding to the next round of automatic differentiation calculation according to the grid traversal order until the flow field grids in each traversal space are all calculated;
[0218] Determine multiple target column vectors in the target coefficient matrix according to the first grid column vector and the second grid column vector.
[0219] In one embodiment, each flow field grid includes multiple flow field variables in the target flow field, each round of automatic differentiation calculation includes multiple automatic differentiation calculations, and each automatic differentiation calculation corresponds to a flow field variable;
[0220] The traversal unit 1803 is configured to:
[0221] Determine 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 the current automatic differentiation calculation;
[0222] Simultaneously perform automatic differentiation calculation on the first flow field variables in multiple first flow field grids through the automatic differentiation program to obtain multiple first column vectors; the first column vector is the column vector corresponding to the first flow field variable in each first flow field grid;
[0223] Determine multiple second flow field variables corresponding to the next automatic differentiation calculation according to the variable traversal order;
[0224] Simultaneously perform automatic differentiation calculation on the multiple second flow field variables to obtain multiple second column vectors;
[0225] Repeat the step of determining multiple second flow field variables corresponding to the next automatic differentiation calculation according to the variable traversal order until all the flow field variables in the first flow field grid are calculated;
[0226] Determine the multiple first grid column vectors according to the first column vector and the second column vector.
[0227] In one embodiment, the traversal unit 1803 is configured to:
[0228] Set the target differentiation seed to a target value; the target differentiation seed is used to instruct the automatic differentiation program to perform automatic differentiation calculation on the first flow field variables in multiple first flow field grids;
[0229] Through the automatic differentiation program, automatic differentiation calculations are simultaneously performed on the column vectors corresponding to the target differentiation seeds to obtain the multiple first column vectors.
[0230] In one embodiment, the permutation unit 1804 is configured to:
[0231] Determine the positions 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] Permute the multiple target column vectors according to the positions of each target column vector to obtain the target coefficient matrix.
[0233] In one embodiment, the calculation unit 1805 is configured to:
[0234] Construct an adjoint equation according to the target coefficient matrix;
[0235] Calculate and determine the target aerodynamic shape parameters of the aircraft according to the adjoint equation.
[0236] Embodiments of the method and apparatus for accelerating the aerodynamic shape optimization of an aircraft based on discrete adjoint of the present disclosure can be applied to electronic devices such as computers. The apparatus embodiments can be implemented by software, or by hardware, or by a combination of software and hardware. Taking software implementation as an example, as a logically meaningful apparatus, it is formed by the processor of the electronic device where it is located reading the corresponding computer program instructions in the non-volatile memory into the memory and running. From the hardware level, as Figure 19 shown, is a hardware structure diagram of the electronic device where the apparatus for accelerating the aerodynamic shape optimization of an aircraft based on discrete adjoint of the present disclosure is located. In addition to Figure 19 the shown processor, memory, network interface, and non-volatile memory, the electronic device where the apparatus is located in the embodiment usually further includes other hardware according to the actual functions of the electronic device, which will not be elaborated here.
[0237] The implementation processes of the functions and actions of each unit in the above apparatus are specifically detailed in the implementation processes of the corresponding steps in the above method, which will not be elaborated here.
[0238] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to the partial descriptions of the method embodiments. The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of the present disclosure. A person of ordinary skill in the art can understand and implement it without creative work.
[0239] Although this specification contains many specific implementation details, these should not be construed as limiting the scope of any invention or the scope claimed, but are mainly used to describe the features of specific embodiments of a particular invention. Certain features described in multiple embodiments in this specification can also be combined and implemented in a single embodiment. On the other hand, the various features described in a single embodiment can also be separately implemented in multiple embodiments or implemented in any suitable sub-combination. In addition, although features may function in certain combinations as described above and are even initially claimed as such, one or more features from the claimed combination can in some cases be removed from the combination, and the claimed combination can be directed to a sub-combination or a variant of the sub-combination.
[0240] Similarly, although the operations are depicted in a specific order in the drawings, this should not be construed as requiring these operations to be performed in the specific order shown or sequentially, or requiring all the illustrated operations to be performed to achieve the desired result. In some cases, multitasking and parallel processing may be advantageous. In addition, the separation of the various system modules and components in the above embodiments should not be construed as required 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 acts recited in the claims can be performed in a different order and still achieve the desired result. In addition, the processes depicted in the drawings are not necessarily in the specific order or sequential order shown to achieve the desired result. In some implementations, multitasking and parallel processing may be advantageous.
[0242] The above is only a preferred embodiment of the present disclosure and is not intended to limit the present disclosure. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present disclosure shall be included within the scope of protection of the present disclosure.
Claims
1. An acceleration method for aircraft aerodynamic shape optimization based on discrete adjoint, characterized in that, The method includes: According to the aerodynamic shape parameters of the aircraft to be optimized for aerodynamic shape, calculate the target flow field of the aircraft through a numerical simulation solver, 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; According to the interference range of the flow field variables, divide the flow field grid of the target flow field into multiple connected but non-interfering traversal spaces; there are multiple flow field grids in the traversal space, and the flow field grids include multiple flow field variables; According to the preset grid traversal order, perform automatic differentiation calculations on the flow field grids in multiple traversal spaces simultaneously to obtain multiple target column vectors in the target coefficient matrix; Arrange the multiple target column vectors to obtain the target coefficient matrix; the target coefficient matrix is the coefficient matrix of the adjoint equation when optimizing the aerodynamic shape of the aircraft based on the adjoint method; According to the target coefficient matrix, calculate and determine the adjoint vector, and optimize the aerodynamic shape of the aircraft based on the adjoint vector; The step of performing automatic differentiation calculations on the flow field grids in multiple traversal spaces simultaneously according to the preset grid traversal order to obtain multiple target column vectors in the target coefficient matrix includes: According to the grid traversal order, determine 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; Through an automatic differentiation program, perform automatic differentiation calculations on multiple first flow field grids in the target flow field simultaneously to obtain multiple first grid column vectors; According to the grid traversal order, determine multiple second flow field grids corresponding to the next round of automatic differentiation calculation; Perform automatic differentiation calculations on the multiple second flow field grids simultaneously to obtain multiple second grid column vectors; Repeat the step of determining multiple second flow field grids corresponding to the next round of automatic differentiation calculation according to the grid traversal order until the flow field grids in each traversal space are all calculated; According to the first grid column vectors and the second grid column vectors, determine multiple target column vectors in the target coefficient matrix.
2. The method according to claim 1, wherein The step of 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: According to the calculation format adopted by the numerical simulation solver, determine the interference radius of the flow field variables; Based on the interference radius, determine the interference range.
3. The method according to claim 1, wherein The step of dividing the flow field grid of the target flow field into multiple connected but non-interfering traversal spaces according to the interference range of the flow field variables includes: Determine the vertices of the target flow field as the starting point of division; According to the interference range, start dividing the grid at the starting point of division to obtain multiple traversal spaces; the multiple traversal spaces are connected in sequence and do not interfere with each other.
4. The method according to claim 1, wherein Each flow field grid includes multiple flow field variables in the target flow field. Each round of automatic differentiation calculation includes multiple automatic differentiation calculations, and each automatic differentiation calculation corresponds to a flow field variable; The step of performing automatic differentiation calculations on multiple first flow field grids in the target flow field simultaneously through an automatic differentiation program to obtain multiple first grid column vectors includes: Determine the first flow field variables in each first flow field grid according to the preset variable traversal order; the first flow field variables are the flow field variables corresponding to the current automatic differentiation calculation. Through the automatic differentiation program, simultaneously perform automatic differentiation calculations on the first flow field variables in multiple first flow field grids to obtain multiple first column vectors; the first column vectors are the column vectors corresponding to the first flow field variables in each first flow field grid. According to the variable traversal order, determine multiple second flow field variables corresponding to the next automatic differentiation calculation. Simultaneously perform automatic differentiation calculations on the multiple second flow field variables to obtain multiple second column vectors. Repeat the step of determining multiple second flow field variables corresponding to the next automatic differentiation calculation according to the variable traversal order until all the flow field variables in the first flow field grid are calculated. Determine the multiple first grid column vectors according to the first column vectors and the second column vectors.
5. The method according to claim 4, characterized in that, The step of, through the automatic differentiation program, simultaneously performing automatic differentiation calculations on the first flow field variables in multiple first flow field grids to obtain multiple first column vectors includes: Set the target differentiation seed to a target value; the target differentiation seed is used to instruct the automatic differentiation program to perform automatic differentiation calculations on the first flow field variables in multiple first flow field grids. Through the automatic differentiation program, simultaneously perform automatic differentiation calculations on the column vectors corresponding to the target differentiation seed to obtain the multiple first column vectors.
6. The method according to claim 1, characterized in that The step of arranging the multiple 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 variable corresponding to each target column vector. Arrange the multiple target column vectors according to the positions of each target column vector to obtain the target coefficient matrix.
7. An aircraft aerodynamic shape optimization acceleration device based on discrete adjoint, characterized in that, The device includes: A determination unit, configured to calculate the target flow field of the aircraft to be optimized for the aerodynamic shape through a numerical simulation solver according to the aerodynamic shape parameters of the aircraft, 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. A division unit, configured to divide the flow field grid of the target flow field into multiple connected but non-interfering traversal spaces according to the interference range of the flow field variables; the flow field grid is obtained by dividing the target flow field, there are multiple flow field grids in the traversal space, and the flow field grid includes multiple flow field variables. A traversal unit, configured to simultaneously perform automatic differentiation calculations on the flow field grids in multiple traversal spaces according to a preset grid traversal order to obtain multiple target column vectors in the target coefficient matrix. An arrangement unit, configured to arrange the multiple target column vectors to obtain the target coefficient matrix. A calculation unit, configured to calculate and determine the adjoint vector in the aerodynamic shape optimization 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. The traversal unit is configured to: Determine the first flow field grid in each traversal space according to the grid traversal order; the first flow field grid is the flow field grid corresponding to the current automatic differentiation calculation. Through an automatic differentiation program, simultaneously perform automatic differentiation calculations on multiple first flow field grids in the target flow field to obtain multiple first grid column vectors; According to the grid traversal order, determine multiple second flow field grids corresponding to the next round of automatic differentiation calculations; Simultaneously perform automatic differentiation calculations on the multiple second flow field grids to obtain multiple second grid column vectors; Repeat the step of determining multiple second flow field grids corresponding to the next round of automatic differentiation calculations according to the grid traversal order until the flow field grids in each traversal space are all calculated; According to the first grid column vectors and the second grid column vectors, determine multiple target column vectors in the target coefficient matrix.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by a processor, it implements the method according to any one of claims 1 to 6.
9. A computer device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the method according to any one of claims 1 to 6.