Vehicle aerodynamic performance optimization method and device, computer equipment and medium
By decomposing the coefficient matrix of the linear equations into the sum of a first matrix dominated by the principal diagonal and a set of second matrices with rank 1, and using the Sherman-Morrison formula to recursively correct the estimated solution, the problem of solution stability caused by the complex geometry of the vehicle in CAE simulation is solved, and the efficiency and effectiveness of the vehicle aerodynamic performance optimization are improved.
Patent Information
- Application Number
- CN202510909694.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-02
- Publication Date
- 2025-10-10
AI Technical Summary
In CAE simulation, the complex geometric shape of the vehicle leads to the deterioration of the coefficient matrix condition number of the linear equations obtained by discretizing the control equations, which increases the difficulty and workload of pre-processing and affects the efficiency of CAE engineering simulation.
The coefficient matrix of the linear equation system is decomposed into the sum of a first matrix dominated by the principal diagonal and a set of second matrices with rank 1. The first matrix is solved iteratively, and the estimated solution is recursively corrected using the Sherman-Morrison formula to obtain the corrected solution of the grid point pressure or velocity.
It improves CAE simulation efficiency, avoids the problem of solution divergence, optimizes the aerodynamic performance of the entire vehicle, ensures the optimization effect and improves the optimization efficiency.
Smart Images

Figure CN120764433A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of computer-aided engineering simulation, and in particular to a method, device, computer equipment and medium for optimizing the aerodynamic performance of a whole vehicle. Background Art
[0002] Solving large-scale linear equations is an important component of modern Computer-Aided Engineering (CAE) simulation and is usually also the most computationally intensive part. The performance of the linear equation solver has a direct and significant impact on the performance of CAE simulation.
[0003] Numerical simulation of the complex flow field around a vehicle using CAE simulation is a common approach for aerodynamic optimization to reduce drag coefficients. However, computational divergence often arises in engineering practice. This is due to the complex geometry of the vehicle. When meshing the flow field, it is difficult to ensure high quality across all meshes. A small number of low-quality mesh points degrades the condition number of the coefficient matrix of the linear system of equations obtained by discretizing the governing equations. This issue significantly increases the difficulty and workload of pre-processing, severely impacting the efficiency of CAE engineering simulations and, consequently, the progress of vehicle aerodynamic optimization. Summary of the Invention
[0004] In view of this, the present invention provides a method, device, computer equipment and medium for optimizing the aerodynamic performance of a whole vehicle to solve the problem in the related art that when using CAE simulation to perform numerical simulation of the complex flow field around the whole vehicle to optimize the aerodynamic performance of the whole vehicle, the condition number of the coefficient matrix of the linear equation group obtained by discretizing the control equation is deteriorated due to the very complex geometric shape of the whole vehicle, which greatly increases the difficulty and workload of pre-processing and affects the efficiency of CAE engineering simulation.
[0005] In a first aspect, the present invention provides a method for optimizing the aerodynamic performance of a vehicle, the method comprising:
[0006] Based on aerodynamic theory, the governing equations of the flow field around the vehicle are established, and the finite volume method is used to convert the governing equations into a system of linear equations with grid point pressure or velocity as variables;
[0007] Get the coefficient matrix of the linear equation system;
[0008] Decomposing the coefficient matrix into a sum of a first matrix dominated on the principal diagonal and a set of second matrices of rank 1;
[0009] Replacing the coefficient matrix of the linear equations with the first matrix and then performing iterative solution to obtain an estimated solution of the grid point pressure or velocity;
[0010] Based on the first matrix and the second matrix, recursively correct the estimated solution using the Sherman-Morrison formula to obtain a corrected solution for grid point pressure or velocity;
[0011] The aerodynamic performance of the entire vehicle is optimized based on the correction solution of the grid point pressure or velocity.
[0012] The present invention decomposes the coefficient matrix of the linear equation system into the sum of a first matrix dominated by the principal diagonal and a set of second matrices with rank 1, then converts the linear equation system into a well-conditioned linear equation system by replacing the coefficient matrix with the first matrix, and stably solves the well-conditioned linear equation system problem through an iterative method to obtain an estimated solution of the grid point pressure or velocity, and then recursively corrects the estimated solution by using the Sherman-Morrison formula, and the recursive process does not generate new numerical errors, and the corrected solution of the grid point pressure or velocity is obtained again, thereby ensuring the stability of the solution of the linear equation system at the cost of slightly increasing memory consumption, avoiding the problem of solution divergence, reducing the solver's requirements on grid quality, and optimizing the performance of numerical simulation of complex flow fields around the entire vehicle, thereby significantly improving the efficiency of CAE engineering simulation, and then using the solved grid point pressure or velocity to optimize the aerodynamic performance of the entire vehicle, ensuring the optimization effect of the entire vehicle while improving the optimization efficiency.
[0013] In an optional implementation, decomposing the coefficient matrix into a sum of a first matrix dominated on the principal diagonal and a set of second matrices of rank 1 includes:
[0014] For each non-dominant main diagonal row in the coefficient matrix, calculate the sum of the absolute values of the off-diagonal elements in the current row, and select the coefficient value of the current row whose sum of the coefficient value and the diagonal elements in the current row is greater than the sum of the absolute values of the off-diagonal elements in the current row;
[0015] Multiplying the first unit column vector by negating the coefficient value to obtain a second unit column vector, wherein the number of rows of the first unit column vector is the same as the number of rows of the coefficient matrix, and the element corresponding to the current row in the first unit column vector is 1;
[0016] The second matrix is obtained by multiplying the first unit column vector of the diagonal element in each main diagonal non-dominant row by the transpose of the corresponding second unit column vector and adding them together.
[0017] The coefficient matrix is subtracted from the second matrix to obtain the first matrix.
[0018] The present invention selects the coefficient value corresponding to each row by calculating the sum of the absolute values of the off-diagonal elements in each non-dominant row of the main diagonal in the coefficient matrix, and then uses the selected coefficient value to determine the element value corresponding to the diagonal element of the row in the second matrix to ensure that the first matrix is diagonally dominant in the row, thereby realizing the conversion of the ill-conditioned linear equation system into a well-conditioned linear equation system, thereby achieving a stable solution.
[0019] In an optional implementation, recursively correcting the estimated solution using the Sherman-Morrison formula based on the first matrix and the second matrix includes:
[0020] definition And use the Sherman-Morrison formula to construct the following formula:
[0021]
[0022] Let y l,k Satisfy A l y l,k =u k , then we have the following formula:
[0023]
[0024] Let x l Satisfy A l x l =b, then we have the following formula:
[0025]
[0026] Among them, A l is the coefficient matrix of the linear equations, b is the constant term of the linear equations, A0 is the first matrix, u j and v j are the first column vector and the second column vector corresponding to the jth row, is the second matrix, l is the number of non-dominant rows on the main diagonal of the coefficient matrix;
[0027] The estimated solution is recursively corrected using the above formula until a set number of corrections is reached to obtain a corrected solution for the grid point pressure or velocity.
[0028] The present invention uses the Sherman-Morrison formula to express the relationship between the inverse matrix of an arbitrary matrix and the inverse matrix of the sum of the matrix and a matrix of rank 1, so that difficult problems can be converted into easy problems, thereby reducing the difficulty of solving the linear equations, improving the solution efficiency, and further enhancing the efficiency of CAE simulation.
[0029] In an optional implementation, the set number of corrections is the number of non-dominant rows on the main diagonal in the coefficient matrix.
[0030] The present invention performs multiple recursive corrections according to the number of non-dominant rows on the main diagonal in the coefficient matrix of the linear equation group, thereby ensuring the consistency of the corrected solution after recursive correction with the true solution of the original linear equation group and improving the accuracy of solving the original linear equation group.
[0031] In an optional embodiment, the method further includes:
[0032] Calculating the sum of the absolute values of the off-diagonal elements in each row of the coefficient matrix;
[0033] Determine whether the diagonal elements in each row are greater than the sum of the absolute values of the off-diagonal elements in that row;
[0034] If the diagonal elements of the current row are not greater than the sum of the absolute values of the off-diagonal elements of the row, the current row is determined as a main diagonal non-dominant row in the coefficient matrix.
[0035] In an optional embodiment, the method further includes:
[0036] If the diagonal elements of the current row are greater than the sum of the absolute values of the off-diagonal elements of the row, the current row is determined to be a main diagonal dominant row in the coefficient matrix.
[0037] The present invention calculates the sum of the absolute values of the off-diagonal elements in each row of the coefficient matrix of the linear equation system, and identifies the non-dominant rows on the main diagonal in the coefficient matrix by comparing the diagonal elements of each row with the sum of the absolute values of the off-diagonal elements of the row, thereby achieving accurate identification of the non-dominant rows on the main diagonal in the coefficient matrix, providing an accurate data basis for the subsequent conversion of the linear equation system into a well-conditioned linear equation system, ensuring the stability of the solution, and avoiding the divergence problem caused by iterative solution.
[0038] In a second aspect, the present invention provides a device for optimizing the aerodynamic performance of a vehicle using a linear equation system, the device comprising:
[0039] A conversion module, configured to establish the governing equations of the flow field around the vehicle based on aerodynamic theory and convert the governing equations into a set of linear equations with grid point pressure or velocity as variables using the finite volume method;
[0040] An acquisition module is used to obtain the coefficient matrix of the linear equation system;
[0041] A first processing module is used to decompose the coefficient matrix into a sum of a first matrix with a dominant principal diagonal and a set of second matrices with a rank of 1;
[0042] a second processing module, configured to replace the coefficient matrix of the linear equations with the first matrix and then perform iterative solution to obtain an estimated solution of grid point pressure or velocity;
[0043] a third processing module, configured to recursively correct the estimated solution using a Sherman-Morrison formula based on the first matrix and the second matrix to obtain a corrected solution for grid point pressure or velocity;
[0044] The fourth processing module is used to optimize the aerodynamic performance of the entire vehicle based on the correction solution of the grid point pressure or velocity.
[0045] In a third aspect, the present invention provides a computer device, comprising:
[0046] The memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the method described in the first aspect and any one of its optional embodiments by executing the computer instructions.
[0047] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the method provided in the first aspect or any corresponding embodiment thereof.
[0048] In a fifth aspect, the present invention provides a computer program product comprising computer instructions for causing a computer to execute the method provided in the first aspect or any corresponding embodiment thereof.
[0049] Beneficial effects of the present invention:
[0050] The present invention decomposes the coefficient matrix of the linear equation system into the sum of a first matrix dominated by the principal diagonal and a set of second matrices with rank 1, and then converts the linear equation system into a well-conditioned linear equation system by replacing the coefficient matrix with the first matrix. The well-conditioned linear equation system is stably solved by an iterative method to obtain an estimated solution of the grid point pressure or velocity. The estimated solution is then recursively corrected by using the Sherman-Morrison formula, and the recursive process does not generate new numerical errors, and the corrected solution of the grid point pressure or velocity is obtained again. Therefore, the stability of the solution of the linear equation system is guaranteed at the cost of slightly increasing memory consumption, thereby improving the CAE simulation efficiency. The grid point pressure or velocity obtained by the solution is then used to optimize the aerodynamic performance of the entire vehicle, ensuring the optimization effect of the entire vehicle while improving the optimization efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the specific embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0052] Figure 1 is a flow chart of a method for optimizing aerodynamic performance of a vehicle according to an embodiment of the present invention;
[0053] Figure 2 is a flow chart of another method for optimizing the aerodynamic performance of a vehicle according to an embodiment of the present invention;
[0054] Figure 3 is a flow chart of a solution algorithm according to an embodiment of the present invention;
[0055] Figure 4 2. It is a schematic diagram of the correction step flow in the solution algorithm according to an embodiment of the present invention;
[0056] Figure 5 2 is a schematic structural diagram of a vehicle aerodynamic performance optimization device according to an embodiment of the present invention;
[0057] Figure 6 2 is a schematic structural diagram of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0058] To make the purpose, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative efforts shall fall within the scope of protection of the present invention.
[0059] Finite volume methods or finite element methods used in engineering simulation analysis typically transform the problem of solving partial differential equations into the problem of solving a system of linear equations with large sparse coefficient matrices by discretizing the governing equations. Solving large systems of linear equations is a crucial component of modern CAE simulation and is often the most computationally intensive. The performance of the linear equation solver has a direct and significant impact on the performance of CAE simulation software.
[0060] There are two types of algorithms for solving systems of linear equations: direct and iterative. Direct methods typically require performing LU decomposition on the coefficient matrix. Even if the coefficient matrix is sparse, the resulting L and U matrices are typically no longer sparse. As the matrix dimension increases, the storage and computational complexity of non-sparse matrices increases dramatically. For most practical engineering problems, the computational resources required for direct solutions still exceed the hardware capabilities of currently available high-performance computer systems. Iterative methods circumvent the high computational resource requirements of direct methods by gradually approximating the true solution to the linear system, making them the mainstream algorithm for CAE analysis of most practical engineering problems. However, because the coefficient matrix condition number of the discretized linear system is typically large, iterative methods often diverge during the solution process. To ensure the stability of the iterative method, the linear system must be well-conditioned, which poses a significant challenge to both the mesh generation algorithm and the finite element / finite volume discretization algorithm.
[0061] To address these issues, an embodiment of the present invention proposes a vehicle aerodynamic performance optimization solution. This solution transforms a general ill-conditioned linear system into a well-conditioned linear system, then uses an iterative method to stably solve this well-conditioned linear system to obtain an estimated solution. The estimated solution is then corrected to recover the original linear system. This embodiment of the present invention ensures the stability of vehicle aerodynamic performance optimization using this linear system at the expense of slightly increasing memory consumption, and has significant engineering significance for improving CAE simulation efficiency.
[0062] According to an embodiment of the present invention, an embodiment of a method for optimizing the aerodynamic performance of a whole vehicle based on a system of linear equations is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0063] In this embodiment, a method for optimizing the aerodynamic performance of a vehicle is provided, which can be applied to computer equipment such as single-chip microcomputers, computers, etc. Figure 1 FIG. 1 is a flow chart of a method for optimizing aerodynamic performance of a vehicle according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:
[0064] In step S100 , a control equation of the flow field around the entire vehicle is established based on aerodynamic theory, and the control equation is converted into a linear equation system with grid point pressure or velocity as a variable using the finite volume method.
[0065] Specifically, the governing equation for the flow field around the vehicle is an elliptical partial differential equation. Discretizing it on the flow field grid using the finite volume method yields a system of linear equations whose variables are the pressure at the grid points. Similarly, a system of linear equations whose variables are the velocity at the grid points can also be derived. The specific implementation process of step S100 is conventional and will not be further described here.
[0066] Step S101, obtaining the coefficient matrix of the linear equation system.
[0067] For example, the linear equations can be expressed as:
[0068] Ax=b (1)
[0069] Among them, A represents the coefficient matrix of the linear equation system, which is a large-scale N×N non-singular sparse matrix, and b is the right-hand side term. Both are known. The condition number of A is:
[0070] k p (A)=‖A‖ p ‖A -1 ‖ p (2)
[0071] Among them, k p (A) represents the condition number of A, which may be very large, ‖A‖ p is the p-order norm; x is the unknown quantity to be solved. In practice, x can be the pressure or velocity at a grid point, and both are solved in the same way.
[0072] Step S102: decompose the coefficient matrix into the sum of a first matrix with a dominant principal diagonal and a set of second matrices with a rank of 1.
[0073] For example, the coefficient matrix A is written as the sum of a first matrix A0 dominated by the main diagonal and a set of second matrices of rank 1:
[0074]
[0075] Among them, u j ,v j is an N-dimensional vector, where the superscript t denotes the transpose. M is the number of rows in A that do not satisfy the main diagonal dominant condition. A0 is a well-conditioned matrix that is main diagonally dominant.
[0076] Step S103 , replacing the coefficient matrix of the linear equations with the first matrix and then performing an iterative solution to obtain an estimated solution of the pressure or velocity at the grid point.
[0077] Specifically, because the matrix A0 has the advantageous property of being diagonally dominant, it is easy to solve the following equation using an iterative method such as the generalized minimum residual method (GMRES) or the biconjugate gradient stabilization method (BiCG), yielding an estimated approximate solution, or estimated solution x0. The specific solution algorithm and process are known from the prior art and will not be further elaborated here.
[0078] A0x0=b (4)
[0079] Step S104 : Based on the first matrix and the second matrix, the estimated solution is recursively corrected using the Sherman-Morrison formula to obtain a corrected solution of the grid point pressure or velocity.
[0080] Specifically, according to the Sherman-Morrison formula, there is a relationship between the inverse matrix of any non-singular matrix B and the inverse matrix of the sum of B and a rank-1 matrix, that is, the latter can be expressed analytically by the former, thereby converting a difficult problem into an easy one.
[0081]
[0082] Among them, the vectors u,v are consistent with the B dimension.
[0083] Step S105 : optimizing the aerodynamic performance of the entire vehicle based on the correction solution of the grid point pressure or velocity.
[0084] Specifically, CAE simulation can be used to use the grid point pressure and velocity obtained by solution to determine the distribution characteristics of pressure and velocity around the entire vehicle, and the aerodynamic performance of the entire vehicle can be simulated and optimized based on the distribution characteristics. The specific simulation optimization method is existing technology and will not be described in detail here.
[0085] The embodiment of the present invention decomposes the coefficient matrix of the linear equation system into the sum of a first matrix with dominant principal diagonal and a set of second matrices with rank 1, then converts the linear equation system into a well-conditioned linear equation system by replacing the coefficient matrix with the first matrix, and stably solves the well-conditioned linear equation system problem through an iterative method to obtain an estimated solution of the grid point pressure or velocity. The estimated solution is then recursively corrected by using the Sherman-Morrison formula, and the recursive process does not generate new numerical errors, and the corrected solution of the grid point pressure or velocity is obtained again. Therefore, at the cost of slightly increasing memory consumption, the stability of the aerodynamic performance optimization of the linear equation system for the entire vehicle is ensured, the problem of solution divergence is avoided, and the solver's requirements for grid quality are reduced, thereby significantly improving the efficiency of CAE engineering simulation. The grid point pressure or velocity obtained by the solution is then used to optimize the aerodynamic performance of the entire vehicle, ensuring the optimization effect of the entire vehicle while improving the optimization efficiency.
[0086] In this embodiment, a method for optimizing the aerodynamic performance of a vehicle is also provided, which can be applied to computer equipment such as single-chip microcomputers, computers, etc. Figure 2 FIG. 1 is a flow chart of a method for optimizing aerodynamic performance of a vehicle according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:
[0087] Step S200: Based on aerodynamic theory, the control equations of the flow field around the vehicle are established, and the finite volume method is used to convert the control equations into a set of linear equations with grid point pressure or velocity as variables. Figure 1 The description of step S100 will not be repeated here.
[0088] Step S201, obtain the coefficient matrix of the linear equation system. Figure 1 The description of step S101 is omitted here.
[0089] Step S202: Calculate the sum of the absolute values of the off-diagonal elements in each row of the coefficient matrix.
[0090] Step S203 , determining whether the diagonal elements in each row are greater than the sum of the absolute values of the off-diagonal elements in the row.
[0091] Step S204: If the diagonal elements of the current row are not greater than the sum of the absolute values of the off-diagonal elements of the row, the current row is determined as a main diagonal non-dominant row in the coefficient matrix.
[0092] Step S205: If the diagonal elements of the current row are greater than the sum of the absolute values of the off-diagonal elements of the row, the current row is determined as a main diagonal dominant row in the coefficient matrix.
[0093] For example, assume the coefficient matrix is: The sum of the off-diagonal elements in the first row of the matrix is 3, and the diagonal element is 1, so the main diagonal of the first row is not dominant; similarly, the sum of the off-diagonal elements in the second row is 0, and the diagonal element is 2, so the main diagonal of the second row is dominant; similarly, the sum of the off-diagonal elements in the third row is 3, and the diagonal element is 1, so the main diagonal of the third row is not dominant.
[0094] The embodiment of the present invention calculates the sum of the absolute values of the off-diagonal elements in each row of the coefficient matrix of the linear equation system, and identifies the non-dominant rows on the main diagonal in the coefficient matrix by comparing the diagonal elements of each row with the sum of the absolute values of the off-diagonal elements of the row, thereby achieving accurate identification of the non-dominant rows on the main diagonal in the coefficient matrix, providing an accurate data basis for the subsequent conversion of the linear equation system into a well-conditioned linear equation system, ensuring the stability of the solution, and avoiding the divergence problem caused by iterative solution.
[0095] Step S206: decompose the coefficient matrix into the sum of a first matrix with a dominant principal diagonal and a set of second matrices with a rank of 1.
[0096] Specifically, the above step S206 includes:
[0097] Step S2061: For each non-dominant main diagonal row in the coefficient matrix, calculate the sum of the absolute values of the non-diagonal elements in the current row and select the coefficient value of the current row.
[0098] The sum of the coefficient value and the diagonal elements in the current row is greater than the sum of the absolute values of the off-diagonal elements in the current row.
[0099] For example, the above coefficient matrix is: For example, the main diagonals of the 1st and 3rd rows are not dominant, the sum of the absolute values of the non-diagonal elements in the 1st row is 3, and the coefficient value c1 corresponding to the 1st row is 3. Similarly, the coefficient value c3 corresponding to the 3rd row is 3.
[0100] Step S2062 , multiplying the first unit column vector by negating the coefficient value to obtain a second unit column vector.
[0101] The number of rows of the first unit column vector is the same as the number of rows of the coefficient matrix, and the element corresponding to the current row in the first unit column vector is 1.
[0102] Specifically, if the nth row main diagonal in the coefficient matrix A is not dominant, then take the N-dimensional vector As the first unit column vector, that is, except for the nth component which is 1, all other components are 0. j =-c j u j , c j is a sufficiently large positive number, then the nth row of the matrix A0 is guaranteed to be diagonally dominant.
[0103] For example, the above coefficient matrix is continued as: For example, the first unit column vector corresponding to the first row can be expressed as The first unit column vector corresponding to the third row can be expressed as The second unit column vector v1 corresponding to the 1st row is -c1u1, and the second unit column vector v2 corresponding to the 3rd row is -c2u2.
[0104] Step S2063 , multiplying the first unit column vector of the diagonal element in each main diagonal non-dominant row by the transpose of the corresponding second unit column vector and performing accumulation to obtain a second matrix.
[0105] Specifically, the calculation process of multiplying a column vector by the transpose of a column vector and then accumulating the results is a prior art and will not be described in detail here.
[0106] Step S2064: Subtract the coefficient matrix from the second matrix to obtain a first matrix.
[0107] Specifically, by repeating the above process M times, the resulting modified matrix A0 has a dominant main diagonal, making it suitable for iterative solutions without divergence. Since ill-conditioned linear systems in general engineering problems often arise from poor-quality meshes, which only account for a small fraction of the total mesh size, it is reasonable to expect M<<N.
[0108] For example, the above coefficient matrix is continued as: For example, the first matrix It can be seen that the first matrix A0 is a principal diagonally dominant matrix.
[0109] In an embodiment of the present invention, the coefficient value corresponding to each non-diagonal row in the coefficient matrix is selected by calculating the sum of the absolute values of the off-diagonal elements of the row, and the element value corresponding to the diagonal element of the row in the second matrix is determined using the selected coefficient value to ensure that the first matrix is diagonally dominant in the row, thereby converting the linear equation system into a well-conditioned linear equation system, thereby achieving a stable solution.
[0110] Step S207 , replacing the coefficient matrix of the linear equations with the first matrix and then performing an iterative solution to obtain an estimated solution of the grid point pressure or velocity.
[0111] Specifically, the linear equation system obtained by replacing the coefficient matrix of the linear equation system with the first matrix is as shown in the above formula (4). For example, For example, by solving it by the existing iterative method, we can get the estimated solution
[0112] Step S208 : Based on the first matrix and the second matrix, the estimated solution is recursively corrected using the Sherman-Morrison formula to obtain a corrected solution for the grid point pressure or velocity.
[0113] Specifically, the above step S208 includes:
[0114] definition And use the Sherman-Morrison formula to construct the following formula:
[0115]
[0116] Let y l,k Satisfy A l y l,k =u k , then we have the following formula:
[0117]
[0118] Let x l Satisfy A l x l =b, then we have the following formula:
[0119]
[0120] Among them, A l is the coefficient matrix of the linear equations, b is the constant term of the linear equations, A0 is the first matrix, u k and v j are the first column vector and the second column vector corresponding to the jth row, is the second matrix, and l is the number of non-dominant rows in the coefficient matrix.
[0121] The above formula is used to recursively correct the estimated solution of the grid point pressure or velocity until the set number of corrections is reached to obtain the corrected solution of the grid point pressure or velocity.
[0122] From the above formulas (7) and (8), it can be seen that through M-step correction, the solution of the original equation formula (1) can be obtained from the estimated solution x0.
[0123] Specifically, since formula (6) is obtained from the Sherman-Morrison formula, when l = M, the left side of formula (6) is the solution of the original formula (1); when l = 0, the left side of formula (6) is the solution of formula (4), which can be easily obtained by iteration. By the recursive process of l = 0, 1, ..., M, the solution of the equation group of formula (1) can be obtained by solving the equation group of formula (4).
[0124] From the right side of formula (6), we can see that the recursive process needs to calculate A l-1 -1 b and A l-1 -1 u l Therefore, we define two recursive processes (7) and (8) obtained from the Sherman-Morrison formula. According to formula (7), we can gradually obtain all A in the recursive process from small to large. l-1 -1 u l (Take k = l + 1); Similarly, according to formula (8), we can recursively derive A l-1 -1 b. This completes the recursive process, and by solving the equations of formula (4), we can obtain the solution of the equations of formula (1).
[0125] The solving method is different from the traditional iterative algorithm in that the method avoids processing the ill-conditioned coefficient matrix, only needs to solve a set of linear equations with diagonally dominant coefficient matrix, and recursively obtains the solution of the linear equations, and the recursive process does not produce new numerical errors.
[0126] Exemplarily, the complete solving process is as follows:
[0127] Step 1: for k=1,2,…,M, solve A0y=u k , to obtain y 0,k .
[0128] Step 2: for l=1,2,…,M-1, calculate y by formula (8), wherein k=l+1,l+2,…,M. When l=1, y l,k can be calculated by y 0,k ; when l>1, y l-1,k obtained in the previous step needs to be stored to calculate y l,k .
[0129] At the same time, y
[0130] Step 3: calculating formula (9) is the solution of the original equation set represented by formula (1).
[0131]
[0132] The embodiment of the application can transform the difficult-to-solve problem into an easy-to-solve problem by using the Sherman-Morrison formula to express the relationship between the inverse matrix of any matrix and the inverse matrix of the sum of the matrix and the rank-1 matrix, thereby reducing the difficulty of solving the linear equations, improving the solving efficiency, and further improving the CAE simulation efficiency.
[0133] Further, the number of correction times is set as the number of rows in the coefficient matrix in which the main diagonal is not dominant.
[0134] The embodiment of the application can guarantee the consistency of the corrected solution after recursive correction and the true solution of the original linear equations by recursively correcting the number of rows in the coefficient matrix of the linear equations in which the main diagonal is not dominant, and improve the accuracy of solving the original linear equations.
[0135] Exemplarily, taking the above-mentioned estimated solution as an example, formula (6) to formula (8) are used to solve A0y 0,1 =u1, to obtain So we get the first corrected solution Continue to solve A0y 0,2 =u2, we get So there is Substituting into the following formula, we get the second corrected solution It has been verified that the solution of the original equation Ax=b, namely the above-mentioned corrected solution, can be obtained after the second correction.
[0136] The vehicle aerodynamic performance optimization method provided by the embodiment of the present invention is used to establish a solution algorithm program. For example, the implementation process of the solution algorithm is as follows: Figure 3 As shown, the specific process of the correction step in the solution algorithm is as follows Figure 4 shown.
[0137] Step S209: Optimize the aerodynamic performance of the vehicle based on the grid point pressure or velocity correction solution. Figure 1 The description of step S105 is omitted here.
[0138] In practical applications, when the above-mentioned solution algorithm is applied, the input is the coefficient matrix A and the right-hand side vector b of the linear equation system. The specific program operation includes the following steps:
[0139] S1. For the coefficient matrix A, calculate the sum of the absolute values of the off-diagonal elements in each row and compare it with the diagonal elements to determine whether the diagonal elements are dominant.
[0140] S2. For the rows where the main diagonal is not dominant, calculate u j and v j =-c j u j , where c j is a positive number, and c j The sum of the diagonal elements is greater than the sum of the absolute values of the off-diagonal elements in the row;
[0141] S3. Represent A as the sum of a matrix A0 dominated by the main diagonal and a set of matrices of rank 1;
[0142] S4. Solve A0x0=b using an iterative method to obtain an estimated solution x0;
[0143] S5. Solve A0y using iterative method 0,k =u k , k=1,2,…,M;
[0144] S6. For l = 1, 2, ..., M-1, calculate y using formula (6) and formula (7) l,k and x l ;
[0145] S7. Obtain the corrected solution x from formula (9) MThis embodiment also provides a vehicle aerodynamic performance optimization device for implementing the aforementioned embodiments and preferred implementations. Details already described will not be repeated. As used below, the term "module" may refer to a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
[0146] The embodiment of the present invention provides a vehicle aerodynamic performance optimization device, such as Figure 5 As shown, the device includes:
[0147] A conversion module 500 is used to establish the control equations of the flow field around the entire vehicle based on aerodynamic theory and convert the control equations into a set of linear equations with grid point pressure or velocity as variables using the finite volume method;
[0148] An acquisition module 501 is used to obtain a coefficient matrix of a linear equation system;
[0149] A first processing module 502 is configured to decompose the coefficient matrix into a sum of a first matrix with a dominant principal diagonal and a set of second matrices with a rank of 1;
[0150] The second processing module 503 is used to replace the coefficient matrix of the linear equations with the first matrix and then perform iterative solution to obtain an estimated solution of the grid point pressure or velocity;
[0151] The third processing module 504 is configured to recursively correct the estimated solution using the Sherman-Morrison formula based on the first matrix and the second matrix to obtain a corrected solution for the grid point pressure or velocity;
[0152] The fourth processing module 505 is configured to optimize the aerodynamic performance of the entire vehicle based on the correction solution of the grid point pressure or velocity.
[0153] In some optional implementations, the first processing module 502 includes:
[0154] a first processing unit configured to calculate, for each non-dominant main diagonal row in the coefficient matrix, a sum of the absolute values of the off-diagonal elements in the current row, and select a coefficient value for the current row such that the sum of the coefficient value and the diagonal elements in the current row is greater than the sum of the absolute values of the off-diagonal elements in the current row;
[0155] a second processing unit, configured to multiply the first unit column vector by the negation of the coefficient value to obtain a second unit column vector, wherein the number of rows of the first unit column vector is the same as the number of rows of the coefficient matrix, and an element corresponding to a current row in the first unit column vector is 1;
[0156] a third processing unit, configured to multiply the first unit column vector of the diagonal element in each main diagonal non-dominant row by the transpose of the corresponding second unit column vector and then accumulate the multiplications to obtain a second matrix;
[0157] The fourth processing unit is configured to subtract the coefficient matrix from the second matrix to obtain a first matrix.
[0158] In some optional implementations, the third processing module 504 includes:
[0159] The fifth processing unit is used to define And use the Sherman-Morrison formula to construct the following formula:
[0160]
[0161] Let y l,k Satisfy A l y l,k =u k , then we have the following formula:
[0162]
[0163] Let x l Satisfy A l x l =b, then we have the following formula:
[0164]
[0165] Among them, A l is the coefficient matrix of the linear equations, b is the constant term of the linear equations, A0 is the first matrix, u j and v j are the first column vector and the second column vector corresponding to the jth row, is the second matrix, l is the number of non-dominant rows on the main diagonal of the coefficient matrix;
[0166] The sixth processing unit is used to recursively correct the estimated solution using the above formula until a set number of corrections is reached to obtain a corrected solution for the pressure or velocity at the grid point.
[0167] In some optional implementations, the number of corrections is set to the number of non-dominant rows in the main diagonal of the coefficient matrix.
[0168] In some optional embodiments, the above-mentioned vehicle aerodynamic performance optimization device further includes:
[0169] A fourth processing module is used to calculate the sum of the absolute values of the off-diagonal elements in each row of the coefficient matrix;
[0170] a fifth processing module, configured to determine whether the diagonal elements in each row are greater than the sum of the absolute values of the off-diagonal elements in the row;
[0171] The sixth processing module is used to determine the current row as a main diagonal non-dominant row in the coefficient matrix if the diagonal elements of the current row are not greater than the sum of the absolute values of the off-diagonal elements of the row.
[0172] In some optional embodiments, the above-mentioned vehicle aerodynamic performance optimization device further includes:
[0173] The seventh processing module is used to determine the current row as a main diagonal dominant row in the coefficient matrix if the diagonal elements of the current row are greater than the sum of the absolute values of the off-diagonal elements of the row.
[0174] The further functional description of each of the above modules and units is the same as that of the above corresponding method embodiments and will not be repeated here.
[0175] The embodiment of the present invention also provides a computer device, such as Figure 6 As shown, the computer device includes: one or more processors 10, memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components utilize different buses to communicate with each other and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in the memory or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Equally, multiple computer devices can be connected, and each device provides part of the necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 6 A processor 10 is taken as an example.
[0176] The processor 10 may be a central processing unit, a network processor, or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit, a programmable logic device, or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic, or any combination thereof.
[0177] The memory 20 stores instructions that can be executed by at least one processor 10, so as to enable at least one processor 10 to execute the method shown in the above embodiment.
[0178] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created based on the use of a computer device for displaying a small program landing page, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely located relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.
[0179] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid-state drive; the memory 20 may also include a combination of the above types of memory.
[0180] The computer device further comprises a communication interface 30 for the vehicle to communicate with other devices or a communication network.
[0181] The embodiment of the present invention also provides a computer-readable storage medium. The above-mentioned method according to the embodiment of the present invention can be implemented in hardware, firmware, or implemented as a computer code that can be recorded in a storage medium, or implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and downloaded through a network and will be stored in a local storage medium, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state drive, etc.; further, the storage medium can also include a combination of the above-mentioned types of memory. It can be understood that a computer, a processor, a microprocessor controller or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor or hardware, the method shown in the above embodiment is implemented.
[0182] A portion of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the form in which the computer program instruction exists in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc. Accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium that can be accessed by the computer.
[0183] Although the embodiments of the present invention have been described with reference to the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention. Such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A method for optimizing the aerodynamic performance of a vehicle, characterized in that: The method comprises: Based on aerodynamic theory, the governing equations of the flow field around the vehicle are established, and the finite volume method is used to convert the governing equations into a system of linear equations with grid point pressure or velocity as variables; Get the coefficient matrix of the linear equation system; Decomposing the coefficient matrix into a sum of a first matrix dominated on the principal diagonal and a set of second matrices of rank 1; Replacing the coefficient matrix of the linear equations with the first matrix and then performing iterative solution to obtain an estimated solution of the grid point pressure or velocity; Based on the first matrix and the second matrix, recursively correct the estimated solution using the Sherman-Morrison formula to obtain a corrected solution for grid point pressure or velocity; The aerodynamic performance of the entire vehicle is optimized based on the correction solution of the grid point pressure or velocity.
2. The method according to claim 1, characterized in that Decomposing the coefficient matrix into a sum of a first matrix dominated in the principal diagonal and a set of second matrices of rank 1 comprises: For each non-dominant main diagonal row in the coefficient matrix, calculate the sum of the absolute values of the off-diagonal elements in the current row, and select the coefficient value of the current row whose sum of the coefficient value and the diagonal elements in the current row is greater than the sum of the absolute values of the off-diagonal elements in the current row; Multiplying the first unit column vector by negating the coefficient value to obtain a second unit column vector, wherein the number of rows of the first unit column vector is the same as the number of rows of the coefficient matrix, and the element corresponding to the current row in the first unit column vector is 1; The second matrix is obtained by multiplying the first unit column vector of the diagonal element in each main diagonal non-dominant row by the transpose of the corresponding second unit column vector and adding them together. The coefficient matrix is subtracted from the second matrix to obtain the first matrix.
3. The method according to claim 1, characterized in that Based on the first matrix and the second matrix, recursively correcting the estimated solution using the Sherman-Morrison formula includes: definition And use the Sherman-Morrison formula to construct the following formula: Let y l,k Satisfy A l y l,k =u k , then we have the following formula: Let x l Satisfy A l x l =b, then we have the following formula: Among them, A l is the coefficient matrix of the linear equations, b is the constant term of the linear equations, A0 is the first matrix, u j and v j are the first column vector and the second column vector corresponding to the jth row, is the second matrix, l is the number of non-dominant rows on the main diagonal of the coefficient matrix; The estimated solution is recursively corrected using the above formula until a set number of corrections is reached to obtain a corrected solution for the grid point pressure or velocity.
4. The method according to claim 3, characterized in that The set number of corrections is the number of non-dominant rows on the main diagonal of the coefficient matrix.
5. The method according to claim 1, wherein The method further comprises: Calculating the sum of the absolute values of the off-diagonal elements in each row of the coefficient matrix; Determine whether the diagonal elements in each row are greater than the sum of the absolute values of the off-diagonal elements in that row; If the diagonal elements of the current row are not greater than the sum of the absolute values of the off-diagonal elements of the row, the current row is determined as a main diagonal non-dominant row in the coefficient matrix.
6. The method according to claim 5, characterized in that The method further comprises: If the diagonal elements of the current row are greater than the sum of the absolute values of the off-diagonal elements of the row, the current row is determined to be a main diagonal dominant row in the coefficient matrix.
7. A vehicle aerodynamic performance optimization device, characterized in that: The device comprises: A conversion module, configured to establish the governing equations of the flow field around the vehicle based on aerodynamic theory and convert the governing equations into a set of linear equations with grid point pressure or velocity as variables using the finite volume method; An acquisition module is used to obtain the coefficient matrix of the linear equation system; A first processing module is used to decompose the coefficient matrix into a sum of a first matrix with a dominant principal diagonal and a set of second matrices with a rank of 1; a second processing module, configured to replace the coefficient matrix of the linear equations with the first matrix and then perform iterative solution to obtain an estimated solution of grid point pressure or velocity; a third processing module, configured to recursively correct the estimated solution using a Sherman-Morrison formula based on the first matrix and the second matrix to obtain a corrected solution for grid point pressure or velocity; The fourth processing module is used to optimize the aerodynamic performance of the entire vehicle based on the correction solution of the grid point pressure or velocity.
8. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the method according to any one of claims 1 to 6 by executing the computer instructions.
9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the method according to any one of claims 1 to 6.
10. A computer program product, characterized in that The method comprises computer instructions for causing a computer to execute the method according to any one of claims 1 to 6.