Density-based LU-SGS and Krylov subspace solvers in the MHT framework

By designing a unified matrix storage data structure and preprocessor in the MHT framework, combined with LU-SGS and Krylov subspace methods, the problem of low computational efficiency in the existing technology is solved, and an efficient and stable flow field in the aviation field is achieved. analyze.

CN117010288BActive Publication Date: 2024-08-23XIAN SHUFENG INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310665275.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-06
Publication Date
2024-08-23
Estimated Expiration
2043-06-06

AI Technical Summary

Technical Problem

In the existing technology, the LU-SGS and Krylov subspace solution methods have unreasonable data structure design in the aviation field, resulting in low calculation efficiency and unable to meet the needs of engineering applications. Especially in complex flow field analysis, it is difficult to Achieve efficient and stable operation under a unified architecture.

Method used

Adopts density-based LU-SGS and Krylov subspace solvers based on the MHT framework, provides a combination of LU-SGS and Krylov subspace methods through a unified matrix storage data structure, including automatic mapping of LDU and CSR formats, and uses a preprocessor Such as the stable biconjugate gradient method and the restart generalized minimum residual iteration method to improve calculation efficiency and stability.

Benefits of technology

It achieves the simultaneous provision of efficient LU-SGS and Krylov subspace methods in the aviation field, ensuring the efficient operation and stability of the two methods, meeting the needs of complex flow field analysis, and reducing application costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117010288B
    Figure CN117010288B
Patent Text Reader

Abstract

The present invention discloses a density-based LU-SGS and Krylov subspace solver based on an MHT framework, in which both LU-SGS and Krylov subspace solution methods are provided in the density-based solver, and both have high efficiency. Specifically, LU-SGS and Krylov subspace methods can be provided in an aircraft flow heat transfer analysis solver at the same time; by designing a matrix storage data structure, both methods can be guaranteed to run efficiently. Both methods are subjected to correction and optimization such as preprocessing to ensure that both methods have high convergence, stability and efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to a density-based LU-SGS and Krylov subspace solver based on the MHT framework. Background Art

[0002] Computational fluid dynamics (CFD) is a computer simulation technology involving flow, heat transfer and associated phenomena (such as combustion, solidification, etc.). It is commonly used in aviation, aerospace, nuclear energy, ships, automobiles, electronics and other fields. For compressible fluids commonly found in the aviation field, density-based solutions are often used. Density-based solvers need to solve linear systems during the time advancement process. In engineering applications, a lower-upper symmetric Gauss-Seidel (LU-SGS) implicit algorithm is usually used. The implicit algorithm is unconditionally stable when performing linear stability analysis on the model equation, and a larger time step can be taken to improve the overall efficiency. The LU-SGS implicit algorithm with spectral radius splitting is applied to avoid matrix inversion calculations and has good stability. The LU-SGS method has strong data dependence and the corresponding data structure needs to be designed. At the same time, the Krylov subspace matrix solution method can also be used to directly calculate the large matrix of the implicit algorithm. The Krylov subspace method with preprocessing has higher stability when used under certain working conditions. In actual engineering applications, the solver needs to provide two methods at the same time, and both have high computational efficiency.

[0003] In recent years, researchers have developed various open source and closed source codes for different design and application goals, such as COOLFluid, SU2, CFL3D, FUN3, VULCAN-CFD, and OpenFOAM. COOLFluid is a framework for solving various problems, such as aeroacoustics, turbulence, and space weather. SU2 is mainly used for computational fluid dynamics (CFD) and aerodynamic shape optimization. At the same time, it can also be extended to potential flow, chemical reaction flow, electrodynamics, and other problems. CFL3D and FUN3D are aerodynamic CFD programs developed by NASA. The main difference is that the former is a structured grid solver and the latter is an unstructured grid solver. VULCAN-CFD was originally designed as a structured grid solver. With the development of the module, an unstructured grid module was introduced. Compared with CFL3D and FUN3D, its special module is finite rate chemical reaction. The above codes are mainly applicable to the field of aerodynamics. They are mainly density-based solvers that require coupling density, momentum, and energy equations. However, most of the above-mentioned solvers (including commonly used commercial software) in the prior art do not provide LU-SGS and Krylov subspace solution methods at the same time. A small number of solvers unify the two methods, but due to unreasonable data structure design, the traversal calculation efficiency is relatively low and cannot meet engineering applications. In engineering applications in the aviation field, for example: in the design of hypersonic aircraft and the analysis of aircraft engine flow and heat transfer, due to the complexity of the flow field, the solver needs to cover the full speed domain of low, pressure, high and super flow fields. Because in these application scenarios, refined simulation analysis is often used, and the model grid volume is huge, this requires the analysis tool (density-based solver) to have the characteristics of stability and efficiency. The existing technical solutions often improve efficiency through the study of calculation methods. For example, the LU-SGS method is used as a preprocessor to reduce the rigidity of the linear system, thereby greatly improving the calculation efficiency of the internal iteration. The inventor of this patent found in engineering practice that the Krylov subspace method has high stability in analyzing low-speed flow of fluids and the LU-SGS method has high stability in analyzing high-speed flow. However, in order to ensure computational efficiency, the linear systems analyzed by the two methods need to be stored in different matrix storage formats. However, there is no existing public information that can fully describe how to unify the two methods into an efficient data structure and implement a relatively stable LU-SGS or Krylov subspace implicit method to ensure that both methods run efficiently under a unified architecture. Summary of the invention

[0004] In view of the above-mentioned deficiencies in the prior art, the object of the present invention is to provide a density-based LU-SGS and Krylov subspace solver based on an MHT (Multiple Hypothesis Tracking) framework.

[0005] To achieve the above objectives, the present invention adopts the following technical solutions:

[0006] Based on the density-based LU-SGS and Krylov subspace solvers in the MHT framework, the governing equations of the solvers can be expressed as:

[0007]

[0008] Where: W is the conserved variable; F is the convection term of the flow field where the aircraft is located; G is the viscosity term of the flow field where the aircraft is located; H is the source term of the flow field where the aircraft is located, including volume force, momentum source term and energy source term; S is the area of ​​the analysis region; t is the analysis time; Ω is the volume of the analysis region.

[0009] In the process of flow and heat transfer analysis in the aviation field, each item of the control equation of the analyzed system (Equation 1) will be discretized into a linear system, and a solver is required to solve this linear system;

[0010] Using the implicit time format for equation (1), the time and space discretization of the control equation of each unit can be expressed as:

[0011]

[0012] in:

[0013] i is the discrete unit number of the flow field; Ω i is the volume of the flow field discrete unit i; W i n is the conserved variable of the flow field discrete unit i at the nth moment; I is the flow field discrete unit matrix; is the residual of the spatial discrete term of the flow field discrete unit i at the nth moment; is the flux Jacobian,

[0014] Ⅰ.LU-SGS solution method

[0015] The implicit operator is divided into three parts: the main diagonal (D) matrix, the lower triangular (L) matrix and the upper triangular (U) matrix. Equation (2) can be written as:

[0016] (D+L)D -1 (D+U)ΔW n =-R n (3)

[0017] W n is the conserved variable at the nth moment; R n is the residual of the spatial discrete term at the nth moment; ΔW n =W n+1 -W n ;

[0018] The LU-SGS method in formula (3) can be decomposed into two steps: forward sweep and backward sweep, specifically:

[0019]

[0020] Forward sweep: Loop the cells from the first cell to the last cell and perform the following operation.

[0021] ΔW * =D -1 (-R n -LΔW * ) (5)

[0022] Back sweep: loop the cells from the last cell to the first cell and perform the operation of formula (6);

[0023] ΔW=ΔW * -D -1 (UΔW) (6)

[0024] Ⅱ. Krylov subspace solution method

[0025] Rewriting the implicit format formula (2) can be expressed as:

[0026] AΔW n =-R n (7)

[0027] Where A is the system matrix. In unstructured grids, A is usually a large sparse nonsymmetric matrix. Equation (7) can be further written as:

[0028] Ax=b (8)

[0029] x is the unknown variable and b is the term on the right hand side.

[0030] Furthermore, the linear system is solved by using a stable biconjugate gradient method and a restarted generalized minimum residual iteration method.

[0031] Furthermore, a preprocessing stable biconjugate gradient method is used, and a preprocessor is added to the used stable biconjugate gradient method. The pseudo code of the preprocessing stable biconjugate gradient method is expressed as Algorithm 1:

[0032]

[0033] In Algorithm 1, r0 is the initial residual of the linear equation system. In Algorithm 1, the residual is preprocessed;

[0034] p0 and are two process quantities in the algorithm flow, and their initial values ​​are set to be the same as r0;

[0035] ρ0, α0 and ω0 are three other process quantities in the algorithm flow, and their initial values ​​are all set to 1.

[0036] Furthermore, a preprocessor is added to the restarted generalized minimum residual iterative method used by the preprocessor restarted generalized minimum residual iterative method. The pseudo code of the preprocessed restarted generalized minimum residual iterative method is expressed as Algorithm 2:

[0037]

[0038] In Algorithm 2, r0 is the initial residual of the linear equation system, and the algorithm preprocesses the residual; the coefficient β is the bi-norm of the vector r0; v1 is a constant, which is the vector v i The initial value of the vector v1 starts at 1; the matrix H, whose elements are h ij , is a (j+1)×j order Hessenberg matrix. When constructing the H matrix, the vector y i Pre-processing; j is a unit vector, and the vector z is When taking the minimum value, The value of .

[0039] Furthermore, an incomplete LU decomposition preprocessor is used. The algorithm description is shown in Algorithm 3:

[0040]

[0041] In Algorithm 3, a ik is an element of the sparse matrix A, NZ(A) represents the set of pairs (i,j), 1≤i,j≤n:a i,j ≠0.

[0042] Furthermore, a unified data structure for storing system matrices is provided, in which the entities of the system matrices are stored in "matrix storage", and not only mapping numbers but also mapping relationships are stored in CSR and LDU, thereby ensuring that when the density-based solver selects different solution methods during the calculation process, the same matrix interface is called, but the program automatically maps it to LDU format or CSR format.

[0043] Furthermore, in the data structure, LDU and CSR are used to store the positions of corresponding elements, and the entities in the "matrix storage" will be rearranged according to different storage methods, specifically:

[0044] a) LDU format: As shown in equations (4)-(6), D and L need to be accessed during the LU-SGS forward scan, while D and U are used during the backward scan. The storage order of the block matrix is ​​written as D->L->U;

[0045] b) CSR format: The block matrix is ​​stored in rows from low to high indexes.

[0046] Compared with the prior art, the present invention has the following beneficial effects:

[0047] (1) The present invention provides both LU-SGS and Krylov subspace solution methods in a density-based solver, and both methods have high efficiency. Specifically, LU-SGS and Krylov subspace methods can be provided in one aircraft flow heat transfer analysis solver;

[0048] (2) By designing the matrix storage data structure, both methods can be taken into account and both methods can be guaranteed to run efficiently.

[0049] (3) By modifying the algorithm, the solver of the present invention can ensure that both methods have high convergence, stability and efficiency when applied in the aviation field. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] Other features, objects and advantages of the present invention will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:

[0051] Figure 1 is an unstructured grid and its corresponding matrix;

[0052] Figure 2 It is a mapping diagram between LDU and CSR formats and matrix storage;

[0053] Figure 3 The hybrid mesh used by Wedge;

[0054] Figure 4 Using LU-SGS, GMRES(ILU0) and BiCGStab(ILU0) for Wedge Examples

[0055] The residual convergence curve of the continuity equation;

[0056] Figure 5 is the pressure ratio (P / Pref) distribution along the bottom wall;

[0057] Figure 6 It is a schematic diagram of the geometry and mesh of DLR F6;

[0058] Figure 7 For DLR F6, the pressure coefficients at the positions y / b = 0.239 and y / b = 0.847 are compared with the experimental results;

[0059] Figure 8 Comparison between simulation results and experimental data of pressure coefficient Cp at section y / b = 0.239;

[0060] Fig. 9Comparison between simulation results and experimental data for the pressure coefficient Cp at section y / b=0.847. DETAILED DESCRIPTION

[0061] The present invention is described in detail below in conjunction with specific embodiments. The following embodiments will help those skilled in the art to further understand the present invention, but are not intended to limit the present invention in any form. It should be noted that, for those of ordinary skill in the art, several variations and improvements may be made without departing from the concept of the present invention. These all belong to the protection scope of the present invention.

[0062] Example 1

[0063] Density-based LU-SGS and Krylov subspace solvers based on the MHT (Multiple Hypothesis Tracking) framework provide both LU-SGS and Krylov subspace methods in one aircraft flow and heat transfer analysis solver, including:

[0064] The governing equation of the solver can be expressed as:

[0065]

[0066] in:

[0067] W is the conserved variable; F is the convection term of the flow field where the aircraft is located;

[0068] G is the viscosity term of the flow field where the aircraft is located;

[0069] H is the source term of the flow field where the aircraft is located, including volume force, momentum source term and energy source term; S is the area of ​​the analysis region; t is the analysis time; Ω is the volume of the analysis region.

[0070] In the actual flow and heat transfer analysis process in the aviation field, each item of the control equation of the analyzed system (Formula 1) will be discretized into a linear system, and a solver is required to solve this linear system.

[0071] Time format

[0072] For the implicit time format adopted in equation (1), the time and space discretization of the control equation of each unit can be expressed as:

[0073]

[0074] in:

[0075] i is the discrete unit number of the flow field;

[0076] Ω i is the volume of discrete unit i of the flow field;

[0077] is the conserved variable of the flow field discrete unit i at the nth moment;

[0078] I is the discrete unit matrix of the flow field;

[0079] is the residual of the spatial discrete term of the flow field discrete unit i at the nth moment;

[0080] is the flux Jacobian,

[0081] Ⅰ.LU-SGS solution method

[0082] According to the theory of LUSGS format algorithm, the implicit operator can be divided into three parts: main diagonal (D) matrix, lower triangular (L) matrix and upper triangular (U) matrix. Formula (2) can be written as:

[0083] (D+L)D -1 (D+U)ΔW n =-R n (3)

[0084] W n is the conserved variable at the nth moment; R n is the residual of the spatial discrete term at the nth moment; ΔW n =W n+1 -W n ;

[0085] The LU-SGS method in formula (3) can be decomposed into two steps: forward sweep and backward sweep, specifically:

[0086]

[0087] Forward sweep: Loop the cells from the first cell to the last cell and perform the following operation.

[0088] ΔW * =D -1 (-R n -LΔW * ) (5)

[0089] Back sweep: loop the cells from the last cell to the first cell and perform the following operation.

[0090] ΔW=ΔW * -D -1 (UΔW) (6)

[0091] Ⅱ. Krylov subspace solution method

[0092] Rewriting the implicit format formula (2) can be expressed as:

[0093] AΔWn =-R n (7)

[0094] Where A is the system matrix. In unstructured grids, A is usually a large sparse nonsymmetric matrix. The above formula can be further written as:

[0095] Ax=b (8)

[0096] x is the unknown variable and b is the term on the right hand side.

[0097] The matrix storage format used by the Krylov method solver is the Compressed SparseRow (CSR) format. Since the system matrix formed after the discretization of the compressible fluid is usually asymmetric, the stable biconjugate gradient and generalized minimum residual iteration method are used to solve the linear system.

[0098] 1) Preprocessed stable biconjugate gradient method (P-BiCGStab)

[0099] In order to increase the stability of the calculation, a preprocessor is added to the stable biconjugate gradient method used. Therefore, the pseudo code of the preprocessed stable biconjugate gradient method is shown in Algorithm 1.

[0100]

[0101] 1 in the algorithm, r0 is the initial residual of the linear equation system (the value of the first step in iterative calculation). In this algorithm, the residual is preprocessed (see line 3 of the algorithm);

[0102] p0 and are two process quantities in the algorithm flow, whose initial values ​​are set to be the same as r0 (see line 4 of the algorithm). During the iteration process, p i The calculation of is shown in line 9 of the algorithm;

[0103] ρ0, α0 and ω0 are the other three process quantities in the algorithm flow, and their initial values ​​are all set to 1 (see line 5 of the algorithm). During the iteration process, they are calculated in lines 7, 12, and 19 respectively;

[0104] The difference between Algorithm 1 of the present invention and the traditional BiCGStab method is that two calculation steps are added, namely, line 11 and line 13 of the algorithm, the main purpose of which is to preprocess the two quantities t and q.

[0105] 2) Pre-processing restart generalized minimum residual iteration method (P-Restart GMRES)

[0106] In order to increase the stability of the calculation, a preconditioner is added to the restarted generalized minimum residual iterative method used. Therefore, the pseudo code of the preconditioner restarted generalized minimum residual iterative method can be expressed as Algorithm 2.

[0107]

[0108] In the algorithm, 2, r0 is the initial residual of the linear equation system (the value of the first step in iterative calculation). In this algorithm, the residual is preprocessed (see line 4 of the algorithm);

[0109] The coefficient β is the two-norm of the vector r0;

[0110] v1 is a constant, which is the vector v i The initial value of , vector v1 starts at 1 and is constructed in lines 7 to 12 of the algorithm;

[0111] The matrix H, whose elements are h ij , is a (j+1)×j-order Hessenberg matrix, which is constructed in lines 7 to 12 of the algorithm. Different from the traditional construction method, the algorithm of the present invention constructs the vector y when constructing the H matrix. i Perform pre-processing;

[0112] e j is a unit vector, and the vector z is When taking the minimum value, The value of

[0113] In the engineering application of density-based solver, the traditional GMRES or GMRES with preprocessing cannot perform stable calculations. Through practice, the stability and convergence efficiency of the GMRES with preprocessing are greatly improved after restarting several times.

[0114] 3) Preprocessor for Krylov subspace solver

[0115] The Krylov subspace method converges very slowly, and sometimes even diverges. The reason is that the iterative method is highly dependent on the spectrum of the coefficient matrix. The preprocessor is a key component of the Krylov subspace method, which can significantly improve the convergence of the algorithm. The present invention uses an incomplete LU decomposition (i.e., ILU0) preprocessor to improve the convergence of methods 1 and 2. The algorithm description is shown in Algorithm 3.

[0116]

[0117] In Algorithm 3, a ik is an element of the sparse matrix A, NZ(A) represents the set of pairs (i,j), 1≤i,j≤n:a i,j ≠0.

[0118] III. Matrix storage mapping method

[0119] The corresponding relationship between the unstructured grid and the matrix is ​​as follows Figure 1 a, the non-zero block matrix is Figure 1 b. Combined with Table 1, the process of obtaining the matrix by discretizing the unstructured grid in the implicit format can be clearly understood. In the discretization process of unstructured grids, in order to improve the computational efficiency, the unstructured grid surface loop is usually used instead of the unit loop. As shown in Table 1, various discretization formats can be used to calculate the flux on both sides of the surface, and then the flux is added to the master unit and slave unit positions of the corresponding matrix according to the control equation. Figure 1 The elements in b are composed of the matrix EqsNum×EqsNum. Here, EqsNum is the number of governing equations of the problem. This application adopts EqsNum=5 (2D) and EqsNum=6 (3D).

[0120]

[0121] Since the efficiency of the linear equation solution method is highly correlated with the data storage format, for example, the LU-SGS solution requires the use of the upper and lower diagonal matrix storage format (Lower Upper Diagonal, LUD or LDU), while the Krylov subspace method requires the use of the CSR format.

[0122] like Figure 2 As shown, the present invention designs a data structure to unify the storage of system matrices, wherein the entities of the matrices are stored in "matrix storage" (the design of the present application is to store the matrices in matrices). CSR and LDU store not only mapping numbers but also mapping relationships. This ensures that when the density-based solver selects different solution methods during the calculation process, the same matrix interface is called, but the program automatically maps to LDU format or CSR format.

[0123] In this data structure, LDU and CSR are used to store the positions of corresponding elements, and the entities in "matrix storage" will be rearranged according to different storage methods. The two methods are described as follows:

[0124] a) LDU format: As shown in equations (4)-(6), D and L need to be accessed during the LU-SGS forward scan, while D and U are used during the backward scan. In order to fully utilize the storage performance, the storage order of the block matrix is ​​written as D->L->U;

[0125] b) CSR format: In the Krylov subspace method, a large number of matrix and vector multiplication operations are required. In order to improve the computational efficiency of these multiplications, the block matrix is ​​stored in rows from low to high indexes.

[0126] Example 2

[0127] Algorithm Implementation

[0128] The data structure and algorithm flow of this application are implemented on the MHT framework, a massively parallel computational fluid dynamics framework based on unstructured grids, and are tested using examples with experimental results.

[0129] Example: Wedge

[0130] The proposed method is verified by 2D wedge simulation for the oblique shock wave problem. A hybrid unstructured grid with 9625 hybrid elements and 5281 nodes is used. Figure 3 is a slanted hybrid grid. Table 2 lists the flow conditions used in this simulation.

[0131]

[0132] like Figure 4 As shown in the figure, the convergence history of the continuity equation residuals of GMRES (ILU0) and BiCGStab (ILU0) is almost the same. It can be clearly seen from the figure that the Krylov subspace solver used shows better convergence performance than the LUSGS method. However, the one-step time consumption of GMRES and BiCGStab is 34.6 times and 2.5 times that of LUSGS, respectively. This is because the Krylov subspace solver not only requires a calculation preconditioner, but also requires more loop calculations in a single-step calculation, especially in the GMRES solver.

[0133] like Figure 5 As shown in Figure 2, the pressure obtained by simulation increases rapidly after the shock wave, which is basically consistent with the analytical solution. Since the calculation results of the three solvers are the same, only the calculation results of LU-SGS are shown here.

[0134] Example 3

[0135] Aviation applications

[0136] Problem description: The full model of the DLR F6 aircraft with engine consists of three parts: fuselage, wing and engine. The half span of the wing is 0.5877m, the chord length is 0.1412m, and the number of grids is 7039928. Figure 6 shown.

[0137] The calculation parameters of the DLR F6 example are shown in Table 3.

[0138]

[0139] Working conditions and settings: Using LU-SGS, restarting GMRES implicit algorithm with preprocessing, SA turbulence model, the pressure distribution after 3w iterations is as follows Figure 7 shown.

[0140] Figure 8 Comparison between the simulation results and experimental data of the pressure coefficient Cp at the section y / b = 0.239, Fig. 9 The simulation results of the pressure coefficient Cp at the section y / b=0.847 are compared with the experimental data. It can be seen that the simulation results are in good agreement with the experimental results, which proves that the present invention can be applied in aerodynamic analysis in the aviation field.

[0141] The same solver of the present invention can meet the needs of users when performing complex flow field analysis. Under different flow conditions (Example 3 is subsonic, Example 2 is supersonic), the solver can provide efficient and stable algorithms, thereby reducing the use cost of application engineers.

[0142] The above describes the specific embodiments of the present invention. It should be understood that the present invention is not limited to the above specific embodiments, and those skilled in the art may make various modifications or variations within the scope of the claims, which do not affect the essence of the present invention.

Claims

1. Density-based LU-SGS and Krylov subspace solvers based on the MHT framework, characterized by: The governing equation of the solver can be expressed as: Where: W is the conserved variable; F is the convection term of the flow field where the aircraft is located; G is the viscosity term of the flow field where the aircraft is located; H is the source term of the flow field where the aircraft is located, including volume force, momentum source term and energy source term; S is the area of ​​the analysis region; t is the analysis time; Ω is the volume of the analysis region; In the process of flow and heat transfer analysis in the aviation field, each item of the control equation (1) of the analyzed system will be discretized into a linear system, and a solver is required to solve this linear system; Using the implicit time format for equation (1), the time and space discretization of the control equation of each unit can be expressed as: in: i is the discrete unit number of the flow field; Ω i is the volume of discrete unit i of the flow field; is the conserved variable of the flow field discrete unit i at the nth moment; I is the flow field discrete unit matrix; is the residual of the spatial discrete term of the flow field discrete unit i at the nth moment; is the flux Jacobian, Ⅰ.LU-SGS solution method The implicit operator is divided into three parts: the main diagonal (D) matrix, the lower triangular (L) matrix and the upper triangular (U) matrix. Equation (2) can be written as: (D+L)D -1 (D+U)ΔW n =-R n (3) W n is the conserved variable at the nth moment; R n is the residual of the spatial discrete term at the nth moment; ΔW n =W n+1 -W n ; The LU-SGS method in formula (3) can be decomposed into two steps: forward sweep and backward sweep, specifically: Forward sweep: loop the cells from the first cell to the last cell and perform the following operations; ΔW * =D -1 (-R n -LΔW * ) (5) Back sweep: loop the cells from the last cell to the first cell and perform the operation of formula (6); ΔW=ΔW * -D -1 (UΔW) (6) Ⅱ. Krylov subspace solution method Rewriting the implicit format formula (2) can be expressed as: AΔW n =-R n (7) Where A is the system matrix. In an unstructured grid, A is a large sparse nonsymmetric matrix. Equation (7) can be written as: Ax=b (8) x is the unknown variable and b is the term on the right hand side.

2. The density-based LU-SGS and Krylov subspace solver based on the MHT framework according to claim 1, characterized in that: The linear system is solved by using the stable biconjugate gradient method and the restarted generalized minimum residual iteration method.

3. The density-based LU-SGS and Krylov subspace solver based on the MHT framework according to claim 2, characterized in that: Preprocessing stable biconjugate gradient method, adding a preprocessor to the stable biconjugate gradient method used, the pseudo code of the preprocessing stable biconjugate gradient method is expressed as Algorithm 1: Algorithm 1: Preconditioned stable biconjugate gradient method First, explain the input and output variables. The input variables include: sparse matrix A, right-hand term vector b, initial value vector x0, and preprocessing matrix P; The output includes: result vector x; The first step is to calculate the initial residual vector r0, which is equal to (b-Ax0) divided by P, which is also equal to the inverse of P multiplied by (b-Ax0); The second step is to initialize the search direction vector p0 and the star residual r0 * , the initial value is set to r0 calculated in the previous step; The third step is to initialize a list of parameters, and the initial values ​​of ρ0, α0, and ω0 are all set to 1; The fourth step is to enter the loop. The current step is the i-th step, and the maximum number of rows and columns of the matrix is ​​the number of loops N. max ; Step 5: Calculate the ρ of the current cycle i , ρ i Equal to the initial residual vector r0 * and the residual vector r of step i-1 i-1 Perform a dot product; Step 6: Calculate the step length β of the current loop i ,β i Equal to the intermediate variable ρ in step i i , divided by the intermediate variable ρ in step i-1 i-1 The vector formed is the same as the intermediate variable α in step i-1 i-1 Divide by the intermediate variable ω in step i-1 i-1 The resulting vectors are cross-producted; Step 7: Update the search direction p i , p i Equal to r i-1 +β i (p i-1 -ω i-1 y i-1 ); Step 8: Calculate t, t = Ap i ; Step 9: Solve for the intermediate variable y i ,y i Equal to the inverse of the preconditioning matrix P -1 Multiply by t; Step 10: Calculate α i , α i Equal to ρ i Divide by r0 * With y i The vector formed by the dot product; Step 11: Update the vector residual s, s = r i-1 -αy i ; Step 12: If the second norm of s is less than or equal to the allowable residual tol, it is considered to have converged and the iteration ends; if it has not converged, continue the iteration; Step 13: After the iteration, calculate q, q = As; Step 14: Solve for the intermediate variable z, which is equal to the inverse of the preprocessing matrix P -1 Multiply by q; Step 15: Calculate ω i ,ω i It is equal to the dot product of z and s divided by the dot product of z and z; Step 16: Update the solution vector x, x i =x i-1 +α j p i +ω i s; Step 17: Update the residual vector r, r i =s-ω j z; Step 18, the algorithm ends; In Algorithm 1, r0 is the initial residual of the linear equation system. In Algorithm 1, the residual is preprocessed; p0 and are two process quantities in the algorithm flow, and their initial values ​​are set to be the same as r0; ρ0, α0 and ω0 are three other process quantities in the algorithm flow, and their initial values ​​are all set to 1.

4. The density-based LU-SGS and Krylov subspace solver based on the MHT framework according to claim 2, characterized in that: Preconditioned restart generalized minimum residual iterative method, a preprocessor is added to the restart generalized minimum residual iterative method used, and the pseudo code of the preconditioned restart generalized minimum residual iterative method is expressed as Algorithm 2: Algorithm 2: Preprocessing restart generalized minimum residual iterative method First, explain the input and output variables. The input variables include: sparse matrix A, right-hand term vector b, initial value vector x0, and preprocessing matrix P; The output includes: result vector x; The first step is to perform an outer loop from l = 1 to m, where m is the number of restarts; The second step is to calculate the initial residual r0 of the current cycle, r0 = P -1 (b-Ax0); The third step is to calculate the binary norm β of the residual vector, β is equal to the binary norm of r0; Step 4: Initialize the first search direction vector v1, which is equal to r0 divided by β; Step 5: loop through the columns from j=1 to k, where k is the total number of matrix columns. Step 6: Calculate the intermediate variable y j ,y j Equals A times v j ; Step 7: Calculate the intermediate variable ω j ,ω j Equal to the inverse of the preconditioning matrix P -1 Multiply by y j ; Step 8: Perform row loop, i=1 to j, and loop until the number of loops is the same as the current column loop number; Step 9: Calculate the H space vector h in the row loop ij , H space is the Hessenberg matrix, h ij is the Hessenberg matrix element, h ij Equal to ω j and v i The dot product of Step 10: Update ω in the row loop j ,ω j Equal to ω j Subtract h ij Multiply v i The product of Step 11: The row loop ends and the column loop continues; Step 12: Calculate h j+1,j ,h j+1,j Equal to ω j The second norm of ; Step 13: Update v j+1 , v j+1 Equal to ω j Divide by h j+1,j ; Step 14: End the column loop and continue the outer loop; Step 15, calculate z, when a series (βe j -Hz) When the second norm is the smallest, take the value of z, where e j are the standard basis vectors, and H is the Hessenberg matrix constructed during the current iteration; Step 16: Update the solution vector x, x is equal to x0 plus Means from 1 to m v i z i Addition; Step 17: If (βe j -Hz) if the second norm is less than or equal to the allowable residual tol, it is considered to have converged and the iteration ends; otherwise, the outer loop iteration continues; Step 18: Update x0 to the current solution x; Step 19, the algorithm ends; In Algorithm 2, r0 is the initial residual of the linear equation system, and the algorithm preprocesses the residual; the coefficient β is the bi-norm of the vector r0; v1 is a constant, which is the vector v i The initial value of the vector v1 starts at 1; the matrix H, whose elements are h ij , is a (j+1)×j order Hessenberg matrix. When constructing the H matrix, the vector y i Pre-processing; j is a unit vector, and the vector z is When taking the minimum value, The value of .

5. The density-based LU-SGS and Krylov subspace solver based on the MHT framework according to any one of claims 3 or 4, characterized in that: The incomplete LU decomposition preprocessor is used. The algorithm description is shown in Algorithm 3: Algorithm 3: Incomplete LU decomposition First, explain the input and output variables. The input variable is the sparse matrix A. The output variable is the preprocessing matrix P, where P is part of the lower triangular matrix L or the upper triangular matrix U; The first step is to perform an outer loop and traverse each row of matrix A, starting from the second row; The second step is to perform an inner loop, looping from the 1st column to the i-1th column for each row i, and starting the next step of calculation only when the matrix element belongs to the non-zero element set NZ(A) of matrix A; The third step is to calculate a ik , and update its value, a ik It is equal to itself divided by the diagonal element a of the corresponding row kk ; Step 4: Enter the inner loop and continue to traverse the remaining elements of the current row i, from j=k+1 to n, and start the next step of calculation only when the matrix element belongs to the non-zero element set NZ(A) of matrix A; Step 5: Calculate a ij And update its value, a ij Equal to a ij Subtract a ik with a kj The product of Step 6: End the inner loop; Step 7: End the inner loop; Step 8: End the outer loop and the algorithm ends; In Algorithm 3, a ik is an element of the sparse matrix A, NZ(A) represents the set of pairs (i,j), 1≤i,j≤n:a i,j ≠0.

6. The density-based LU-SGS and Krylov subspace solver based on the MHT framework according to claim 1, characterized in that: A data structure that unifies the storage of system matrices. The entity of the system matrix is ​​stored in the "matrix storage". CSR and LDU store not only the mapping number but also the mapping relationship, so as to ensure that when the density-based solver selects different solution methods during the calculation process, the same matrix interface is called, but the program automatically maps it to LDU format or CSR format.

7. The density-based LU-SGS and Krylov subspace solver based on the MHT framework according to claim 6, characterized in that: In the data structure, LDU and CSR are used to store the positions of corresponding elements, and the entities in "matrix storage" will be rearranged according to different storage methods, specifically: a) LDU format: As shown in equations (4)-(6), D and L need to be accessed during the LU-SGS forward scan, while D and U are used during the backward scan. The storage order of the block matrix is ​​written as D->L->U; b) CSR format: The block matrix is ​​stored in rows from low to high indexes.