Parallel Random Solving Method and System for Overdetermined Equations for Aircraft Structural Grids
Through the greedy random hybrid Kaczmarz algorithm, the solution problem in the grid generation of large-scale aircraft structures is solved, efficient and accurate grid generation and heat flow analysis are achieved, and the calculation performance of the aircraft thermal protection system is improved.
Patent Information
- Application Number
- CN202510637212.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-19
- Publication Date
- 2025-07-18
- Estimated Expiration
- 2045-05-19
AI Technical Summary
Traditional methods are difficult to efficiently solve the super-fixed linear equation system in the grid generation of large-scale aircraft structures, resulting in a long grid generation time and high computational complexity, which cannot meet the precise heat flow simulation requirements of the thermal protection system of hypersonic aircraft.
The greedy random mixed Kaczmarz algorithm is used to solve the hyper-determined linear equation system after dimensionality reduction, and combined with low-rank approximation processing and Monte Carlo error estimation method, the solution process is accelerated through parallel calculation to generate a high-quality hybrid mesh.
It significantly shortens the generation time of high-quality grids, improves the efficiency and accuracy of heat flow analysis, enhances the rapid response ability to changes in the flight environment, reduces computing resource consumption, and expands the application range of heat flow simulation.
Smart Images

Figure CN120162986B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of grid generation, and particularly to an overdetermined equation parallel stochastic solution method and system for aircraft structure grids. Background Technique
[0002] The statements in this part only provide background technical information related to the present disclosure, and do not necessarily constitute prior art.
[0003] The thermal protection system of hypersonic aircraft poses extremely high requirements for heat flux simulation, and it is necessary to accurately capture heat flux details with wavelengths in the centimeter to millimeter range, while the overall size of the aircraft usually reaches dozens of meters. To meet the needs of fine heat flux analysis, the scale of the simulation grid can be extended to tens of billions, hundreds of billions, or even trillions. Facing the processing requirements of such large-scale and high-quality simulations, traditional serial grid generation methods are no longer sufficient. Considering the characteristics of structured grids required in aerospace aircraft design, it is very important to efficiently generate high-quality structured grids with good orthogonality, regular shape, and smooth transition.
[0004] The Variational Harmonic Partial Differential Equation (VH-PDE) is a method that transforms a PDE into a functional extremum problem through the variational method. VH-PDE has the ability of adaptive grid refinement, and can dynamically adjust the grid density according to the gradient change of the physical field or the requirements of specific regions, so as to generate high-quality grids, especially showing superiority at complex geometric boundaries. Therefore, the VH-PDE method is particularly suitable for scenarios that require accurate capture of physical phenomena and environments with complex heat flux distributions.
[0005] In the process of generating grids in VH-PDE, first, it is necessary to map the physical domain to the computational domain through a mapping function, and then use numerical methods to discretize the PDE into a system of equations. This system of equations is usually overdetermined, that is, the number of equations is much larger than the number of unknowns. Then, the least squares method or other methods need to be used to solve this overdetermined system of equations. Finally, structured grids are generated according to the solution results. This problem ultimately boils down to the solution of a large-scale linear system. Therefore, the solution of the overdetermined linear system is a key step in the VH-PDE method, because it directly relates to the quality, stability, and computational efficiency of grid generation. However, the solution of the overdetermined linear system consumes a large amount of time in the VH-PDE process, accounting for more than 70% of the total time. Therefore, how to effectively and quickly solve the overdetermined linear system becomes very important.
[0006] Because an overdetermined linear equation system has the characteristic that the number of equations is greater than the number of unknowns, an exact solution will not be produced. In actual use, the optimal approximate solution of the overdetermined linear equation system is usually used as the solution of the overdetermined linear equation system. The most common form of the optimal solution is the least squares solution, which finds the optimal solution by minimizing the Euclidean norm of the residuals.
[0007] Traditional methods for solving overdetermined linear equation systems include the least squares method, QR decomposition method, etc. However, when the data scale increases day by day, continuing to use the least squares method to solve overdetermined linear equation systems will face problems such as high computational complexity and memory limitations. Therefore, the least squares method is no longer applicable to the solution of large-scale overdetermined equation systems. Adding a randomization method to the process of solving overdetermined linear equation systems can improve the algorithm stability, reduce the computational complexity, and explore a wider solution space. Therefore, the Randomized Kaczmarz algorithm (RK) is a simple and effective iterative method for solving overdetermined linear equation systems. It accelerates the iterative process by randomly selecting hyperplanes, improves the convergence rate, and is applicable to the solution of large-scale sparse matrices. However, in the Randomized Kaczmarz algorithm, if the selection probability is not adjusted according to the row norm, its convergence rate will be affected, and only single-row information is used in each iteration process, resulting in the convergence speed not reaching the ideal effect. Summary of the Invention
[0008] To overcome the deficiencies of the above-mentioned prior art, the present invention provides an overdetermined equation parallel random solution method and system for aircraft structural grids, which performs parallel optimization on the solution of the overdetermined equation system for grid generation, and realizes the rapid solution of the overdetermined linear equation system through the greedy randomized Kaczmarz algorithm, so as to achieve the purpose of improving the grid quality and enhancing the efficiency and accuracy of aircraft heat flux analysis and calculation.
[0009] To achieve the above object, one or more embodiments of the present invention provide the following technical solutions:
[0010] In the first aspect, the present invention provides an overdetermined equation parallel random solution method for aircraft structural grids, including:
[0011] Obtain a numerical aircraft parameter model;
[0012] Based on the aircraft parameter model, generate a grid using the variational harmonic partial differential equation, and discretize the variational harmonic partial differential equation. After discretization, establish an overdetermined linear equation system with the grid vertex coordinate values as unknowns;
[0013] Perform low-rank approximation processing on the overdetermined linear equation system to obtain a reduced-dimensional overdetermined linear equation system;
[0014] The overdetermined linear equations after dimensionality reduction are solved in parallel using the greedy random hybrid Kaczmarz algorithm to obtain the optimal solution;
[0015] The optimal solution is mapped to the physical space to generate a hybrid grid, and the hybrid grid is imported into the aircraft simulation platform for heat flux analysis.
[0016] In a further technical solution, a random rangefinder is used to perform low-rank approximation processing on the overdetermined linear equations.
[0017] In a further technical solution, the parallel optimization of the solution process of the overdetermined linear equations after dimensionality reduction is specifically as follows: The overdetermined linear equations are divided into multiple blocks by rows and distributed to multiple processors for joint execution. Each processor separately executes the greedy random hybrid Kaczmarz algorithm for iterative solution.
[0018] In a further technical solution, the steps of using the greedy random hybrid Kaczmarz algorithm to solve the overdetermined linear equations after dimensionality reduction to obtain the optimal solution are as follows:
[0019] The total processor process collects the local solution vectors from each processor process to obtain the global solution vector;
[0020] Each processor process selects a hyperplane using the greedy random hybrid model and uses the caching method to update the local solution vector to obtain a new local solution vector;
[0021] The total processor process collects the new local solution vectors from each processor process to obtain a new global solution vector;
[0022] The Monte Carlo error estimation method is used for error estimation to obtain the error estimation value of the solution vector;
[0023] It is judged whether the error estimation value reaches the threshold. If so, the true error value is calculated. If not, the new global solution vector is broadcast to each processor process for continued iteration;
[0024] It is judged whether the true error value reaches the threshold. If so, the optimal solution is obtained. If not, the new global solution vector is broadcast to each processor process for continued iteration.
[0025] In a further technical solution, the specific method of using the greedy random hybrid model to select a hyperplane is as follows:
[0026] Set the proportional value of the greedy method;
[0027] Randomly generate a positive number less than or equal to 1;
[0028] If the positive number is less than or equal to the set value, the greedy method is used to select the hyperplane. If the positive number is greater than the set value, the random method is used to select the hyperplane.
[0029] A further technical solution is to use the cache method to update the local solution vector, specifically: without repeated calculation of the product, directly use the values in the cache. After the solution vector is updated, only multiply the data of the current row by the solution vector, and update the cache of the current row. After every set number of iterations, perform a full cache update.
[0030] A further technical solution is to use the Monte Carlo error estimation method for error estimation to obtain the error estimation value of the solution vector, specifically: randomly select multiple sample rows, calculate the residual of each sample, and accumulate the squares of the residuals. By finding the mean of the sum of the squared residuals and taking the square root, the error estimation value of the solution vector is obtained.
[0031] In a second aspect, the present invention provides an overdetermined equation parallel random solution system for an aircraft structure grid, including:
[0032] A model acquisition module, which is configured to: acquire a numerical aircraft parameter model;
[0033] An equation system establishment module, which is configured to: generate a grid based on the aircraft parameter model by using a variational harmonic partial differential equation, and discretize the variational harmonic partial differential equation. After discretization, establish an overdetermined linear equation system with the grid vertex coordinate values as unknowns;
[0034] An equation system dimension reduction module, which is configured to: perform a low-rank approximation process on the overdetermined linear equation system to obtain a reduced-dimension overdetermined linear equation system;
[0035] An equation system random solution module, which is configured to: use the greedy random hybrid Kaczmarz algorithm to perform parallel solution on the reduced-dimension overdetermined linear equation system to obtain an optimal solution;
[0036] A grid generation module, which is configured to: map the optimal solution to the physical space to generate a hybrid grid, and import the hybrid grid into the aircraft simulation platform for heat flow analysis.
[0037] In a third aspect, the present invention provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, it implements the steps in the overdetermined equation parallel random solution method for an aircraft structure grid as described in the first aspect.
[0038] Fourthly, the present invention provides a computer device, 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 steps in the overdetermined equation parallel random solution method for aircraft structural grids as described in the first aspect are implemented.
[0039] The above one or more technical solutions have the following beneficial effects:
[0040] The present invention proposes a parallel optimization method based on the greedy random Kaczmarz algorithm with low-rank approximation. By improving the VH-PDE grid generation technology, the efficiency and accuracy of aircraft heat flux analysis are effectively improved. This method accelerates the solution process through parallel computing, significantly shortens the generation time of high-quality grids, and enhances the ability to quickly respond to changes in the flight environment; the generated grids are smoother and can accurately fit the complex aerodynamic shape of the aircraft, ensuring accurate modeling of key structural boundaries in heat flux analysis; at the same time, this method reduces the consumption of computing resources, makes it possible to generate high-precision grids on embedded platforms, and thus expands the application scope of aircraft heat flux simulation.
[0041] The present invention provides a parallel optimization method based on the greedy random Kaczmarz algorithm with low-rank approximation. This method aims to improve the computational efficiency of the randomized Kaczmarz algorithm and the convergence rate of the randomized Kaczmarz algorithm. This method uses methods such as data reuse and error estimation to accelerate the convergence rate, and adopts a way of combining processes and threads to effectively parallelize the randomized Kaczmarz method based on low-rank approximation, thereby improving the performance of the RK algorithm, exerting its high efficiency, and providing strong support for the efficient operation of the VH-PDE method.
[0042] When calculating the error in the present invention, the true value of the error is not directly calculated, but the Monte Carlo error estimation method is used to replace part of the error calculation, effectively reducing the calculation time. First, the error estimate value is calculated. When the error estimate value reaches the threshold, the true value of the error is calculated. The effective combination of the Monte Carlo error estimation method and the Kaczmarz method significantly reduces its calculation time and calculation amount, and further improves the algorithm efficiency.
[0043] The present invention effectively combines the greedy method and the randomized method by setting a flexible parameter, combines the advantages of both, and applies the combination to the Kaczmarz algorithm, improving the algorithm efficiency and laying a good foundation for generating high-quality grids. And the present invention proposes a caching method, which can effectively reduce the calculation time during residual calculation and solution vector update, achieve the purpose of data reuse, reduce the calculation amount for the hybrid Kaczmarz algorithm, and improve its convergence rate. Description of the Drawings
[0044] The accompanying drawings forming a part of this invention are used to provide a further understanding of the invention. The schematic embodiments and descriptions thereof of the invention are used to explain the invention and do not unduly limit the invention.
[0045] Figure 1 It is a flowchart of a parallel stochastic solution method for overdetermined equations for an aircraft structural grid in an embodiment of the present invention;
[0046] Figure 2 It is a flowchart of a greedy stochastic hybrid Kaczmarz parallel method in an embodiment of the present invention;
[0047] Figure 3 It is a flowchart of Algorithm 1 in an embodiment of the present invention;
[0048] Figure 4 It is a graph of experimental results in an embodiment of the present invention. Detailed implementation manners
[0049] It should be noted that the following detailed descriptions are all exemplary and are intended to provide further explanations of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which the present invention belongs.
[0050] It should be noted that the terms used herein are only for describing specific implementation manners and are not intended to limit the exemplary implementation manners according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular forms are also intended to include the plural forms. In addition, it should be understood that when the terms "comprise" and / or "include" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.
[0051] In the case of no conflict, the embodiments in the present invention and the features in the embodiments can be combined with each other.
[0052] Embodiment 1
[0053] As Figure 1 shown, this embodiment discloses a parallel stochastic solution method for overdetermined equations for an aircraft structural grid. The method includes the following steps:
[0054] S1: Obtain a numerical aircraft parameter model;
[0055] In this embodiment, a heat flux analysis is performed on the thermal protection system of a hypersonic aircraft to predict the temperature distribution and heat flux density on the aircraft surface at high Mach numbers and evaluate the performance of thermal protection materials. A parametric model of the aircraft is established, including components such as the fuselage, wings, and control surfaces.
[0056] Model the target aircraft, define its geometric shape, covering key components such as the fuselage, wings, and control surfaces, to obtain a complete aircraft parameter model; at the same time, model the external environment in which the aircraft is located, construct an environmental parameter model including terrain, obstacles, atmospheric disturbances, etc., and obtain an environmental parameter model for heat flux analysis.
[0057] S2: Generate a grid based on the aircraft parameter model using variational harmonic partial differential equations, and discretize the variational harmonic partial differential equations. After discretization, establish an overdetermined linear system of equations with the grid vertex coordinate values as unknowns.
[0058] In this embodiment, based on the mapped PDE model, the orthogonality and uniformity metrics of grid cells are introduced into the harmonic mapping PDE. By combining the harmonic mapping term with the energy function, a new mathematical model of the objective function for structured grid generation is constructed, so that the grid generation problem can ultimately be transformed into the solution of a large-scale overdetermined linear system of equations.
[0059] Generate a grid with an adaptive density distribution by solving the harmonic partial differential equation (PDE) to fit the complex aircraft boundary with high precision. Specifically, use the variational harmonic partial differential equation (VH-PDE) method to generate a high-quality adaptive grid that can closely fit the complex aircraft boundary (such as the wing boundary). By introducing the harmonic mapping theory, perform a coordinate transformation on the entire aircraft operation space, construct an elliptic partial differential equation, and use numerical methods to solve this PDE, so as to automatically generate a continuous and smooth grid distribution in the parametric space. By flexibly setting the boundary conditions and control functions of the PDE, the density and directionality of the grid can be significantly adjusted - achieving a high-density division in key areas such as the aircraft edge and control surfaces to optimize the overall computing resources.
[0060] In the VH-PDE method, grid generation is a dynamic adaptive optimization process. The whole process starts with the initialization of a coarse grid in the computational domain, usually using uniform rectangular or triangular grids, and setting boundary conditions to ensure geometric matching. Subsequently, identify high-error regions through error estimation, locally refine these regions, and appropriately coarsen the grid in low-error regions, thereby optimizing the allocation of computing resources. Next, use high-order interpolation methods to smooth the grid data to reduce numerical errors that may be caused by irregular grids.
[0061] The harmonic PDE is discretized using the collocation method; the continuous PDE model is transformed into a linear algebraic system for facilitating the solution of the grid node distribution within the computational domain. Taking the surface heat flux density of the aircraft as the unknown variable, the "heat flux needs to satisfy the physical boundary conditions and avoid the material limit constraints" is represented by linear constraints, and at the same time, the dynamic restrictions (such as the change in heat flux brought about by the flight speed and angle of attack changes) are embedded to form a complex linear constraint system for modeling the heat flux distribution of the aircraft. After the variational harmonic partial differential equation is discretized, there are usually far more constraint equations than free variables, resulting in an overdetermined linear system of equations.
[0062] In the VH-PDE method, grid generation is first transformed into solving a set of partial differential equations that describe the distribution of grid points within the specified region, usually considering constraints such as the relative positions, densities, and boundary conditions between grid points. Then, by discretizing these partial differential equations, the continuous grid generation problem is transformed into a discrete system of linear equations. During this process, the introduced boundary conditions and geometric constraints usually make the number of equations exceed the number of grid points, thus forming an overdetermined linear system of equations. , where, represents the matrix, represents the solution vector, represents the vector, that is, the number of equations is greater than the number of unknowns. Through the matrix and the vector the unknown solution is obtained.
[0063] The partial differential equation is transformed into the weak form through weighted integration, and the physical quantities are approximated at the grid nodes using basis functions. Then, through discretization and integration operations, the continuous partial differential equation is transformed into an algebraic equation. Since the number of equations is usually more than the number of unknowns, an overdetermined linear system of equations is finally formed.
[0064] S3: Perform low-rank approximation processing on the overdetermined linear system of equations to obtain a reduced-dimensional overdetermined linear system of equations.
[0065] In this embodiment, the low-rank approximation method is effectively combined with the mixed Kaczmarz parallel algorithm. The low-rank approximation method is used to effectively reduce the dimension of the system of equations, providing a good basis for solving the overdetermined linear system of equations and laying a solid foundation for the effective execution of the mixed Kaczmarz parallel algorithm.
[0066] Since the number of iteration steps of the random Kaczmarz algorithm is highly related to the number of equations in the system, in order to accelerate the convergence rate of the algorithm, the present invention uses a random rangefinder to perform low-rank approximation on the original system of equations, reducing the dimension of the overdetermined linear system of equations and achieving effective dimensional reduction of the overdetermined linear system of equations, thereby improving the algorithm convergence rate.
[0067] The specific steps are as follows:
[0068] Randomly generate a matrix , denoted as:
[0069]
[0070] where the dimension of matrix A is rows columns, and is much larger than ; represents the rank.
[0071] Multiply matrix with matrix to obtain matrix , denoted as:
[0072]
[0073] Orthogonalize the columns of matrix to obtain matrix , denoted as:
[0074]
[0075] Multiply matrix with matrix to obtain the low-rank approximation matrix , denoted as:
[0076]
[0077] Perform the same operation on vector to obtain:
[0078] .
[0079] S4: Use the greedy randomized Kaczmarz algorithm to solve the overdetermined linear equations after dimensionality reduction in parallel to obtain the optimal solution;
[0080] Since the randomized Kaczmarz algorithm depends on the previous solution result when solving overdetermined linear equations, there are difficulties in effectively parallelizing the randomized Kaczmarz algorithm. The present invention adopts a method combining threads and processes to effectively parallelize it, and adopts methods such as the greedy random hybrid selection of hyperplanes, data reuse method, Monte Carlo error estimation, etc. to effectively improve the performance of the randomized Kaczmarz method. When solving partial differential equations, the error is re-evaluated in each calculation step to determine whether further adjustment of the grid is required. If necessary, the grid is dynamically updated to ensure the accuracy and stability of the calculation. Finally, when the calculation reaches the convergence criterion, the grid is optimized, including merging redundant grid points, adjusting the grid distribution, etc., to reduce the calculation cost and improve the numerical stability. The whole process is a cyclic iterative optimization process, and the grid is continuously adjusted as the PDE solution progresses to adapt to the local characteristics of the problem, thereby improving the calculation efficiency and accuracy. The local characteristics refer to the specific requirements for grid generation. In some regions, the solution changes violently or the error is large, and a finer grid is required; while in other regions, the solution is relatively smooth or the error is very small, and a coarser grid can be used. These regions with violent changes are called local characteristic regions.
[0081] At the same time, the greedy random hybrid Kaczmarz method based on low-rank approximation is processed in two-level parallelism. Instead of simply using processes for parallelization, the present invention divides the equations into blocks, and process-level parallel processing is adopted between each block, while thread-level parallel optimization is carried out within each block. The threads are mainly in the initialization cache, calculating the residual, updating the solution vector within the block, comprehensively updating the cache, and calculating the true value of the global error, etc., for parallel optimization. Through the optimization of the process level combined with the thread level, the solution speed is further improved.
[0082] Furthermore, parallel optimization means that after dividing the equations into blocks, parallel calculations are carried out between each block using processes, and then parallel calculations are also carried out during the processes of initializing the cache, calculating the residual, updating the solution vector within the block, comprehensively updating the cache, and calculating the true value of the global error within each block. That is to say, parallel processing is carried out both between and within the blocks.
[0083] In this embodiment, as Figure 2 shown, the overdetermined linear equations are divided into multiple blocks by rows and distributed to multiple processors for joint execution. Each processor respectively executes the greedy random hybrid Kaczmarz algorithm for iterative solution.
[0084] The entire system of equations is divided into blocks, and by A number of processors execute jointly, with each processor processing one of the chunks. During the chunking process, the present invention performs a remainder operation on the rows that cannot be evenly distributed to each process, so as to achieve the purpose of load balancing. Each process initially receives the same number of rows, and then compares the remainder with the process number. If the remainder is greater than this process number, then this process needs to process one more row of data. By this method, the number of data rows processed among each process can be made uniform, avoiding the situation where the workload of a single process is too large, thereby effectively achieving load balancing.
[0085] In this embodiment, during the parallel iterative calculation, the optimal update direction and step size of the current approximate solution (greedy random hybrid selection of hyperplanes) are dynamically searched for each iteration, and a new approximate solution is calculated accordingly. The calculation will continue until the set termination condition is met or the maximum number of iterations is reached. Subsequently, all calculation results are merged to the main processor through the reduction interface, and finally the optimal solution is selected as the grid vertex coordinate value of the overdetermined system of equations, thereby constructing a structured grid.
[0086] Specifically, the overdetermined linear equations after dimensionality reduction are solved by using the greedy random hybrid Kaczmarz algorithm. The specific steps to obtain the optimal solution are as follows:
[0087] The master processor process collects the local solution vectors from each processor process to obtain the global solution vector;
[0088] Each processor process selects a hyperplane using the greedy random hybrid model and updates the local solution vector using the caching method to obtain a new local solution vector;
[0089] The master processor process collects the new local solution vectors from each processor process to obtain a new global solution vector;
[0090] The Monte Carlo error estimation method is used for error estimation to obtain the error estimation value of the new global solution vector;
[0091] Judge whether the error estimation value reaches the threshold. If so, calculate the true error value. If not, broadcast the new global solution vector to each processor process to continue the iteration;
[0092] Judge whether the true error value reaches the threshold. If so, obtain the optimal solution. If not, broadcast the new global solution vector to each processor process to continue the iteration.
[0093] On the basis of the randomized Kaczmarz algorithm, a method of greedy random hybrid selection of hyperplanes is added, avoiding the drawback that some important hyperplanes are not selected when only using the randomized method, thus slowing down the convergence rate. And because the residual needs to be calculated every time the greedy method is used, and each residual calculation will multiply the matrix and Multiply, and during iterative update, it is also necessary to repeatedly calculate the matrix and product, which results in serious waste of resources. Therefore, the present invention proposes a caching method. Each time the residual is calculated, only the product of the corresponding row needs to be taken out, without the need to recalculate the matrix and product, thereby improving the calculation efficiency. When the vector is updated, only the value of the selected row this time needs to be locally updated. To avoid errors caused by untimely cache updates, which affect the convergence rate of the algorithm, the present invention adopts a fixed time period for comprehensive cache updates, so as to avoid the drawback of slow convergence speed caused by untimely cache updates.
[0094] The solution steps are specifically as follows:
[0095] (1) After each processor process obtains the corresponding data, a greedy random hybrid model is used to select a hyperplane to project and update the solution vector ( ), and a flexible parameter is introduced into this model. This parameter allows the relative proportion of the greedy algorithm and the random algorithm to be dynamically adjusted according to the actual matrix . When the rows of the matrix show significant differences, the weight of the greedy method can be increased. On the contrary, when the row differences are small, increasing the weight of the randomization method can produce better results. First, the present invention sets the proportion of the greedy method to 40%, and then randomly generates a positive number less than or equal to 1. If the randomly generated value is less than or equal to the parameter (set to 0.4 in this embodiment), the greedy method is used to select the hyperplane projection. On the contrary, the random method is used to select the hyperplane projection for solution update.
[0096] The parameter needs to be judged according to the conditions of the matrix . If the row differences of the matrix are large, the weight of greed is increased, that is, increasing the value can achieve an acceleration effect. If the row differences are not large or there is noise, the random weight is increased, that is, reducing the value can achieve an acceleration effect. The specific process is as shown in Figure 3 Algorithm 1.
[0097] (2) After the step of selecting the hyperplane is completed, the update of the solution vector starts. At this time, when updating the solution vector , there is no need to repeat the calculation of the product. The present invention can directly use the value in the cache. The expression for updating the solution vector is:
[0098]
[0099] Among them, represents the current approximate solution, represents the -th element of the vector , represents the column vector corresponding to the -th row of the matrix , represents the product of the column vector corresponding to the -th row of the matrix and the current approximate solution.
[0100] (3) After the solution vector is updated, only multiply the data of this row by the vector to update the corresponding row of the cache. Since the difference between multiple solution vectors is too small, and the calculation amount of frequently updating all caches is too large, so a full cache update is performed after a certain number of iterations (set the number of iterations). That is to say, after dividing the equations into blocks, each process only processes its own small piece of data, and the update within the block is the local solution vector update. After a certain number of iterations, it is necessary to recycle the local solution vectors within each block, add them up to get the average, and obtain the global solution vector.
[0101] In parallel computing, since the communication overhead is large and the significance of frequent global projection is small, the present invention adopts global communication after each process reaches a certain number of iterations to reduce the additional overhead brought by communication. Since the cache needs to be fully updated every certain period of time, the step of fully updating the cache is placed after global communication. It is found in the experiment that the error calculation takes a lot of time and causes a performance bottleneck, so the Monte Carlo error estimation method is adopted to reduce the overhead caused by calculation errors, thereby further improving the performance.
[0102] The specific implementation steps for calculating the error are:
[0103] (1) Multicore is used for parallel computing. After the number of iterations in each core reaches the specified number, global communication is carried out. MPI_Allreduce is used to retrieve the local vectors of each process to the main process, add the updated local solution vectors of each process, and then take their average to obtain the global solution vector.
[0104] (2) After obtaining the latest global solution vector, the present invention does not directly calculate its true error, but first uses the Monte Carlo error estimation method for error estimation. The Monte Carlo error estimation method randomly selects multiple sample rows, calculates the residual of each sample, and accumulates the squares of the residuals. Finally, by taking the mean of the sum of the squared residuals and taking the square root, the error estimation value of the solution vector is obtained. Using the Monte Carlo error estimation method can efficiently estimate the error and is especially suitable for large-scale problems.
[0105] The error estimation process is specifically as follows:
[0106] First, the error of the overdetermined linear equation system is:
[0107]
[0108] Among them, represents the error, represents the number of rows of matrix (i.e., the number of equations), represents the number of columns of matrix (i.e., the number of unknowns), represents the row, represents the column, represents matrix the row and column element in represents the -th element in the unknown vector, represents the constant vector the -th element in
[0109] Using the Monte Carlo method, randomly select rows, calculate the square of the residual of each row, and then take their average to estimate the overall estimated value error:
[0110]
[0111] Among them, represents the overall estimated value error, represents the sample index, represents the -th group and in an equation the coefficient of represents the th group and the observed value of the th equation.
[0112] To estimate this value (error estimate), the Monte Carlo method relies on randomly selecting rows. Each row is selected with equal probability, and the expected value of the sum of squared residuals of randomly selecting a row is:
[0113]
[0114] where represents the residual of the th row (i.e., the th equation) in the system of linear equations. The mean squared residual is used to measure the th row (i.e., the th equation) in the system of linear equations. The mean squared residual is used to measure the error in the linear system. error of
[0115] In this way, we can obtain:
[0116]
[0117] where represents the index number of the selected row in the th iteration. represents the index number of the selected row in the th iteration.
[0118] Since the expectations of the sum of squared residuals of all rows are the same, we can obtain:
[0119] .
[0120] Thus, the effectiveness of the Monte Carlo method can be proved, and the Monte Carlo error estimate can effectively represent the error value. And using this method can further improve the calculation efficiency. The present invention adopts the Monte Carlo error estimation method, which can greatly reduce the calculation amount and greatly shorten the error calculation time.
[0121] If the error estimate is less than the threshold, the true error is calculated. If the true error value is less than the threshold at this time, the program execution is completed, and the optimal result has been obtained at this time. If the error is greater than the threshold at this time, it turns to step (3). If the error estimate is greater than the threshold, the true error calculation is not required, and it directly turns to step (3) to continue.
[0122] (3) If the error value does not meet the predetermined requirements, use MPI_Bcast to broadcast the latest global solution vector to each process, and each process continues to iterate based on the latest global solution vector. Broadcasting the latest global solution vector to each process makes the update directions of all processes remain generally consistent, avoiding the solution vector obtained finally having too large an error.
[0123] Efficient solution of overdetermined systems of linear equations It plays an important role in the mesh generation of VH-PDE. First, through fast solving and error analysis, local error sources can be identified to guide adaptive mesh refinement, thus refining the mesh in necessary regions and reducing the computational cost. Second, regularization or optimization iteration methods can improve the condition number of matrix A, enhance numerical stability, and optimize the mesh distribution. In addition, the analysis of the properties of the solution during the solving process can detect redundant information, reduce unnecessary mesh points, and optimize storage and computational efficiency. At the same time, by analyzing numerical instability, the mesh can be smoothed and adjusted, the mesh structure can be optimized, the discretization error can be reduced, and the PDE calculation accuracy can be improved. Therefore, efficiently solving the overdetermined system can not only improve the numerical stability and computational efficiency of the VH-PDE method, but also inversely optimize the mesh generation to make it more adaptable to the problem requirements, thereby enhancing the overall computational performance.
[0124] S5: Map the optimal solution to the physical space to generate a hybrid mesh, and import the hybrid mesh into the aircraft simulation platform for heat flux analysis.
[0125] Map the obtained optimal solution to the physical space to generate a hexahedron-dominated hybrid mesh, taking into account both computational efficiency and accuracy, and dynamically update the mesh to adapt to environmental changes (such as moving obstacles); import the mesh into the aircraft simulation platform for heat flux analysis, use a sparse solver or GPU-accelerated algorithm to calculate the trajectory in real time, and evaluate the heat flux distribution and temperature distribution on the surface of the aircraft at different flight stages. For example, import the mesh into ANSYS·Mechanical, define the material properties, and call the sparse direct solver to calculate the temperature field. Through the VH-PDE mesh generation technology, a high-precision environmental representation is constructed to ensure that the aircraft structure and systems can operate normally and are not damaged under extreme heat loads.
[0126] In this embodiment, in the process from solving the overdetermined linear equations to mesh generation, first, after solving the overdetermined linear equations, error analysis and optimization of the solution are required to ensure the accuracy of the solution. Next, post-processing operations are performed to calculate physical quantities and visualize the solution, such as drawing contour lines, cloud diagrams, etc., in order to understand the results from a physical perspective. In the verification stage, the numerical solution needs to be compared with the theoretical solution or experimental data to verify the accuracy of the solution. After that, if further analysis of the problem is required, multi-scale methods or adaptive mesh techniques need to be introduced to provide more refined calculations in local regions. Finally, based on the above processing and analysis results, mesh generation and adjustment can be performed to improve the accuracy and adapt to the complexity of the problem in subsequent calculations. The entire process ensures the efficiency and accuracy from the solution of the overdetermined equations to the final mesh generation.
[0127] Experimental description and results
[0128] Experimental environment: SHANHE supercomputer.
[0129] Experimental parameters: A set of data generated after discretizing the partial differential equation by grid generation: 80000×8000 dimensions.
[0130] A set of tests were conducted using an overdetermined system of equations with dimensions of 80000×8000. The test scale of the present invention ranges from 1 processor to 64 processors. The solution time and computational acceleration ratio were recorded respectively. The experimental results are as Figure 4 shown. It can be seen from Figure 4 that the performance of the algorithm of the present invention when using 1 to 64 cores. When using 64 cores, a computational acceleration ratio of 21.9 times can be achieved. And when using 64 cores, the algorithm of the present invention can achieve an acceleration of more than 582 times compared with the randomized Kaczmarz algorithm.
[0131] The present invention uses the low-rank approximation method to effectively reduce the dimension of the system of equations, improve the convergence rate of the randomized Kaczmarz. And experiments prove that the randomized Kaczmarz method can never obtain the optimal solution with an error less than 1, while the randomized Kaczmarz based on low-rank approximation can reach the optimal solution of the error bound, thus proving that the low-rank approximation can not only improve the convergence rate, but also provide a higher-quality approximate solution.
[0132] The present invention uses the Monte Carlo error estimation method to replace part of the error calculation, effectively reducing the calculation time. When using 32 cores, the time using the error estimation method can be shortened by more than 19.4 times compared with not using this method. When using 64 cores, the time can be shortened by more than 21.9 times, thus proving the high efficiency of this method.
[0133] Compared with the randomized Kaczmarz method, the greedy randomized hybrid Kaczmarz algorithm based on low-rank approximation proposed by the present invention can achieve an acceleration ratio of more than 582 times. This result shows that the Kaczmarz method implemented by the present invention has excellent performance advantages, and can greatly shorten the calculation time compared with the original randomized Kaczmarz method, demonstrating its superiority and high efficiency.
[0134] Example Two
[0135] This example discloses an overdetermined equation parallel random solution system for aircraft structural grids, including:
[0136] A model acquisition module, which is configured to: acquire a numerical aircraft parameter model;
[0137] An equation system establishment module, which is configured to: generate a grid based on the aircraft parameter model by using the variational harmonic partial differential equation, and discretize the variational harmonic partial differential equation, and establish an overdetermined linear equation system with the grid vertex coordinate values as unknowns;
[0138] The overdetermined linear equation system dimensionality reduction module is configured to perform low-rank approximation processing on the overdetermined linear equation system to obtain a reduced-dimensional overdetermined linear equation system;
[0139] The equation system random solution module is configured to perform parallel solution on the reduced-dimensional overdetermined linear equation system by using the greedy randomized Kaczmarz algorithm to obtain an optimal solution;
[0140] The grid generation module is configured to map the optimal solution to the physical space to generate a hybrid grid, and import the hybrid grid into an aircraft simulation platform for heat flux analysis.
[0141] Embodiment III
[0142] The purpose of this embodiment is to provide a computing device, 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 steps of the method in Embodiment I are implemented.
[0143] Embodiment IV
[0144] The purpose of this embodiment is to provide a computer-readable storage medium. A computer-readable storage medium stores a computer program, and when the program is executed by a processor, the steps of the method in Embodiment I are executed.
[0145] The steps involved in the devices in the above Embodiments III and IV correspond to those in Method Embodiment I. For specific implementation manners, reference may be made to the relevant description part of Embodiment I. The term "computer-readable storage medium" should be understood to include a single medium or multiple media including one or more instruction sets; it should also be understood to include any medium that can store, encode, or carry an instruction set for execution by a processor and enable the processor to execute any method in the present invention.
[0146] Those skilled in the art should understand that the above-mentioned modules or steps of the present invention can be implemented by a general-purpose computer device. Optionally, they can be implemented by program codes executable by a computing device, so that they can be stored in a storage device and executed by the computing device, or they can be separately fabricated into individual integrated circuit modules, or multiple modules or steps among them can be fabricated into a single integrated circuit module to implement. The present invention is not limited to any specific combination of hardware and software.
[0147] The above are only the preferred embodiments of the present invention and are not used to limit the present invention. For those skilled in the art, the present invention can have various changes and modifications. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
[0148] Although the specific embodiments of the present invention have been described above in conjunction with the accompanying drawings, they are not limitations on the protection scope of the present invention. Those skilled in the art should understand that various modifications or deformations that can be made without creative efforts on the basis of the technical solutions of the present invention are still within the protection scope of the present invention.
Claims
1. An overdetermined equation parallel stochastic solution method for aircraft structural grids, characterized in that including: Obtain a numerical aircraft parameter model; Based on the aircraft parameter model, generate a grid using variational harmonic partial differential equations, and discretize the variational harmonic partial differential equations. After discretization, establish an overdetermined linear equation system with the grid vertex coordinate values as unknowns; Perform low-rank approximation processing on the overdetermined linear equation system to obtain a reduced-dimension overdetermined linear equation system; Use the greedy random hybrid Kaczmarz algorithm to parallelly solve the reduced-dimension overdetermined linear equation system to obtain an optimal solution; Map the optimal solution to the physical space to generate a hybrid grid, and import the hybrid grid into the aircraft simulation platform for heat flux analysis; Adopt a method combining threads and processes to effectively parallelize it, and use the greedy random hybrid hyperplane selection method, data reuse method, and Monte Carlo error estimation method to effectively improve the performance of the randomized Kaczmarz method; The parallel optimization of the solution process of the reduced-dimension overdetermined linear equation system is specifically as follows: Divide the overdetermined linear equation system into multiple blocks by rows and distribute them to multiple processors for joint execution. Each processor respectively performs the greedy random hybrid Kaczmarz algorithm for iterative solution; The specific steps for using the greedy random hybrid Kaczmarz algorithm to solve the reduced-dimension overdetermined linear equation system to obtain an optimal solution are as follows: The total processor process collects local solution vectors from each processor process to obtain a global solution vector; Each processor process selects a hyperplane using a greedy random hybrid model and updates the local solution vector using the cache method to obtain a new local solution vector; The total processor process collects new local solution vectors from each processor process to obtain a new global solution vector; Use the Monte Carlo error estimation method to perform error estimation to obtain an error estimation value of the solution vector; Judge whether the error estimation value reaches the threshold. If so, calculate the true error value. If not, broadcast the new global solution vector to each processor process for continued iteration; Judge whether the true error value reaches the threshold. If so, obtain the optimal solution. If not, broadcast the new global solution vector to each processor process for continued iteration.
2. The overdetermined equation parallel stochastic solution method for aircraft structure grids according to claim 1, characterized in that Use a random range finder to perform low-rank approximation processing on the overdetermined linear equation system.
3. The overdetermined equation parallel stochastic solution method for aircraft structure grids according to claim 1, characterized in that The specific method for using the greedy random hybrid model to select a hyperplane is as follows: Set the proportional value of the greedy method; Randomly generate a positive number less than or equal to 1; If the positive number is less than or equal to the set value, use the greedy method to select a hyperplane. If the positive number is greater than the set value, use the random method to select a hyperplane.
4. The overdetermined equation parallel random solution method for the aircraft structure grid according to claim 1, wherein Adopt The cache method is used to update the local solution vector specifically as follows: without repeated calculation product, directly use the values in the cache. After the solution vector is updated, only multiply the data of the current row by the solution vector and update the cache of the current row. A full cache update is performed every set number of iterations.
5. The overdetermined equation parallel random solution method for the aircraft structure grid according to claim 1, characterized in that The specific method for using the Monte Carlo error estimation method to perform error estimation to obtain an error estimation value of the solution vector is as follows: Randomly select multiple sample rows, calculate the residual of each sample, and accumulate the squares of the residuals. By finding the mean of the sum of the squared residuals and taking the square root, obtain the error estimation value of the solution vector.
6. An overdetermined equation parallel random solution system for an aircraft structural grid, characterized in that, including: A model acquisition module, which is configured to: obtain a numerical aircraft parameter model; An equation system establishment module, which is configured to: based on the aircraft parameter model, generate a grid using variational harmonic partial differential equations, and discretize the variational harmonic partial differential equations. After discretization, establish an overdetermined linear equation system with the grid vertex coordinate values as unknowns; An equation system dimension reduction module, which is configured to: perform low-rank approximation processing on the overdetermined linear equation system to obtain a reduced-dimension overdetermined linear equation system; The random solution module of the equation system is configured to: parallelly solve the overdetermined linear equation system after dimensionality reduction by using the greedy random hybrid Kaczmarz algorithm to obtain the optimal solution; The grid generation module is configured to: map the optimal solution to the physical space to generate a hybrid grid, and import the hybrid grid into the aircraft simulation platform for heat flux analysis; Adopt the method of combining threads and processes to effectively parallelize it, and adopt the methods of greedily randomly selecting hyperplanes, data reuse, and Monte Carlo error estimation to effectively improve the performance of the randomized Kaczmarz method; The parallel optimization of the solution process of the overdetermined linear equation system after dimensionality reduction is specifically as follows: divide the overdetermined linear equation system into multiple blocks by rows and distribute them to multiple processors for joint execution. Each processor respectively executes the greedy random hybrid Kaczmarz algorithm for iterative solution; The specific steps of using the greedy random hybrid Kaczmarz algorithm to solve the overdetermined linear equation system after dimensionality reduction to obtain the optimal solution are as follows: The total processor process collects the local solution vectors from each processor process to obtain the global solution vector; Each processor process selects a hyperplane using the greedy random hybrid model and updates the local solution vector using the cache method to obtain a new local solution vector; The total processor process collects the new local solution vectors from each processor process to obtain the new global solution vector; Use the Monte Carlo error estimation method to estimate the error to obtain the error estimation value of the solution vector; Judge whether the error estimation value reaches the threshold. If so, calculate the true error value. If not, broadcast the new global solution vector to each processor process to continue the iteration; Judge whether the true error value reaches the threshold. If so, obtain the optimal solution. If not, broadcast the new global solution vector to each processor process to continue the iteration.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps in the overdetermined equation parallel random solution method for aircraft structural grids described in any one of claims 1-5.
8. 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 steps in the overdetermined equation parallel random solution method for aircraft structural grids described in any one of claims 1-5.
Citation Information
Patent Citations
Overdetermined matrix equation parallel method and system for fluid mechanics grid generation
CN117436370A
Three-dimensional high-order grid generation method based on partial differential equation solution
CN118015185A