A heat exchanger-oriented coolant acceleration simulation method
By combining unstructured 3D mesh discretization and an overcompression scheme with an efficient selected algebraic multigrid method, the solution process for the coolant flow field is optimized, solving the problem of low computational efficiency in existing technologies and achieving more efficient coolant flow field calculation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NAT UNIV OF DEFENSE TECH
- Filing Date
- 2023-07-13
- Publication Date
- 2026-06-19
AI Technical Summary
Existing methods suffer from low computational efficiency and high mesh complexity when solving the coolant flow field in heat exchangers. Furthermore, improper selection of the traditional RS0 coarsening algorithm leads to wasted computational resources and low iteration efficiency.
The coolant flow field is discretized using an unstructured three-dimensional mesh. Combined with an overcompression scheme and an efficient selective algebraic multigrid method, the coarsening process is optimized using the PMIS coarsening algorithm to reduce memory consumption and computational load, thereby improving solution efficiency.
It reduces the complexity and computational cost of the algebraic multigrid preparation stage, improves the solution efficiency of the coolant flow field, reduces memory consumption, and increases the solution speed.
Smart Images

Figure CN116882318B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of simulation technology, and in particular to a method for accelerating the simulation of coolant for heat exchangers. Background Technology
[0002] In the research and development and design of heat exchangers, it is necessary to simulate the flow of coolant inside the heat exchanger, establish the Navier-Stokes equations for incompressible fluids in the coolant flow domain and solve them to obtain the velocity field, pressure field and temperature field, accurately describe the flow of coolant inside the heat exchanger, and analyze the impact of different heat exchanger model designs on heat exchange efficiency.
[0003] The coupling relationship between velocity and pressure in the Navier-Stokes equations for incompressible fluids is a core issue in the solution process. Because the momentum equation in the Navier-Stokes equations involves both a velocity vector field and a pressure scalar field to be solved, while the continuity equations only involve the velocity field, directly solving the Navier-Stokes equations simultaneously leads to a saddle point problem. The saddle point problem is difficult to solve directly using direct methods (such as Gaussian elimination, LU decomposition, etc.) or iterative methods (such as the commonly used Krylov subspace method) for linear equations. Therefore, a common approach is the decoupling method, which provides guesses for the velocity and pressure fields and solves them independently. The velocity vector field is then solved using the pressure guesses, and this solution is used to correct the pressure field. This process is iterated until the velocity and pressure fields converge. This is the SIMPLE algorithm (Semi-Implicit Method for Pressure-Linked Equations) and its derivatives. Such methods require under-relaxation of the pressure equation to mitigate the impact of drastic changes in the velocity field during the iteration process on the stability of the pressure equation. However, under-relaxation also slows down the overall velocity-pressure field iteration efficiency.
[0004] Current algebraic multigrid methods are preconditioning methods for solving partial differential equations and are widely used in solving accelerated fluid equations. The basic principle of the Selective Algebraic Multigrid (SAMG) method is to select equations with high "influence" from the discretized equation set to form a coarse set. This coarse set forms a smaller linear equation set, and errors that are difficult to eliminate in the original linear equation set are eliminated in the coarser-level linear equation set. These coarse-level errors are then returned to the original set to correct the solution. This process of separating the coarse and fine equation sets from the original equation set is called coarsening. Therefore, how to select coarse-level equations during coarsening is crucial to the computational efficiency of SAMG.
[0005] Existing SAMG methods for fully coupled systems employ the traditional RS0 coarsening algorithm. Taking the coolant flow field within a heat exchanger as an example, when spatially discretizing the flow domain by mesh generation, the mesh size can vary due to the narrowness or width of the space, causing fluctuations in the numerical value of the coefficient matrix of the equations. The existing RS0 coarsening algorithm, after selecting coarse-level equations and fine equations that will disappear in the next coarse level, increases the selection weight of equations with a strong influence on these eliminated fine equations. This leads to the RS0 coarsening algorithm selecting more coarse equations during the coarsening operation, increasing the size of the coarse-level matrix, resulting in high mesh complexity and reduced computational efficiency. Secondly, existing methods simply ignore the impact of coarsening results from each process on adjacent processes, leading to the appearance of adjacent coarse levels at the boundaries between processes, increasing unnecessary coarse-level equations, further increasing mesh complexity and reducing computational efficiency. Summary of the Invention
[0006] Therefore, it is necessary to provide a method for accelerating coolant simulation for heat exchangers that can improve the efficiency of solving the coolant flow field, in order to address the above-mentioned technical problems.
[0007] A method for accelerating coolant simulation of heat exchangers, the method comprising:
[0008] Obtain the material parameters of the coolant and the geometric parameters of the heat exchanger; the material parameters include density and effective viscosity coefficient;
[0009] The geometric spatial parameters are discretized into an unstructured three-dimensional mesh to obtain the heat exchanger spatial mesh. The heat exchanger spatial mesh is composed of multiple three-dimensional polyhedral mesh elements. Each mesh element and its neighboring mesh elements with a common surface form a set of spatial relationships. At this time, the mesh element located at the center of the spatial relationship is the master mesh element.
[0010] Based on the spatial relationship and material parameters between the master grid cell and neighboring grid cells, a set of coupled linear equations for the coolant flow field is established within the finite volume method discretization framework.
[0011] The coefficient matrix of the global equations of the coupled linear equations of the coolant flow field is stored in an overcompressed format to construct the linear system; the linear system includes the global coefficient matrix.
[0012] The global coefficient matrix is solved using the efficient selective algebraic multigrid method. A representative matrix of the global coefficient matrix is constructed, and an algebraic multigrid coarsening operation is performed to obtain a blocky coarse-level matrix.
[0013] By substituting the bulk coarse-level matrix into the linear system, the flow field of the coolant is solved, yielding the velocity vector field and pressure field of the coolant.
[0014] In one embodiment, within the finite volume method discretization framework, a set of coupled linear equations for the coolant flow field is established based on the spatial relationships and material parameters between the master grid cell and neighboring grid cells, including:
[0015] Within the finite volume method discretization framework, based on the spatial relationships and material parameters between the master mesh element and neighboring mesh elements, a set of coupled linear equations for the coolant flow field is established as follows:
[0016]
[0017] Where C represents the primary grid cell and F represents the neighboring grid cell. The velocity unknown u in the momentum equation of the x-direction in the main grid cell represents the coolant flow field. C coefficient, The unknown velocity v in the y-direction of the coolant flow field in the momentum equation in the x-direction of the main grid cell represents this. C coefficient, The unknown velocity w in the z-direction of the coolant flow field in the momentum equation in the x-direction of the main grid cell represents the velocity unknown. C coefficient, p represents the pressure unknown in the coolant flow field of the momentum equation in the x-direction of the main grid cell. C coefficient, The unknown velocity u in the x-direction of the coolant flow field in the momentum equation in the y-direction of the main grid cell represents the velocity of the coolant flow field. C coefficient, The velocity unknown v of the coolant flow field in the momentum equation along the y-direction in the main grid cell represents this. C coefficient, The unknown velocity w in the z-direction of the coolant flow field in the momentum equation in the y-direction of the main grid cell represents this. C coefficient, p represents the pressure unknown in the coolant flow field of the momentum equation in the y-direction of the main grid cell. C coefficient, The unknown velocity u in the x-direction of the coolant flow field in the momentum equation in the z-direction of the main grid cell represents the velocity unknown in the main grid cell. C coefficient, The unknown velocity v in the y-direction of the coolant flow field in the momentum equation in the z-direction of the main grid cell represents this. C coefficient, The velocity unknown w in the momentum equation of the z-direction in the main grid cell represents the velocity unknown of the coolant flow field. C coefficient, p represents the pressure unknown in the coolant flow field of the momentum equation in the z-direction of the main grid cell. C coefficient, The velocity unknown u in the x-direction continuity equation of the main grid cell represents the coolant flow field in the unknown. Ccoefficient, The velocity unknown v of the coolant flow field in the continuity equation in the y-direction of the main mesh element represents this. C coefficient, The velocity unknown w in the z-direction continuity equation of the main grid cell represents the coolant flow field in the main grid cell. C coefficient, p represents the pressure unknown in the coolant flow field of the continuity equation in the main grid cell. C coefficient, μ represents the coefficient of velocity unknowns in the coolant flow field in different directions. eff S is the effective viscosity coefficient of the coolant. f Let d be the area vector of the interface f. CF To point from the center of unit C to the center of unit F, p represents the pressure unknown in the coolant flow field of the momentum equation in the x-direction of the neighboring grid cell. F coefficient, p represents the pressure unknown in the coolant flow field of the momentum equation in the y-direction of the neighboring mesh element. F coefficient, p represents the pressure unknown in the coolant flow field of the momentum equation in the z-direction of the neighboring mesh element. F coefficient, The velocity unknown u in the continuity equation of the coolant flow field in the x-direction of the neighboring grid cell represents the unknown quantity u. F coefficient, The velocity unknown v of the coolant flow field in the continuity equation in the y-direction of the neighboring mesh element represents this. F coefficient, The velocity unknown w in the z-direction continuity equation of the neighboring mesh element represents the coolant flow field in the unknown quantity w. F coefficient, p represents the pressure unknown in the coolant flow field of the continuity equation in the neighboring grid cell. F The coefficient, ρ is the density of the coolant, D f Let f be the diffusion coefficient vector at the mesh interface f of the heat exchanger spatial mesh. This represents the right-hand side term of the momentum equation in the x-direction. This represents the right-hand side term of the momentum equation in the y-direction. This represents the right-hand side term of the momentum equation in the z-direction. This represents the right-hand side term of a continuous equation.
[0018] In one embodiment, the global equation coefficient matrix of the coupled linear equations of the coolant flow field is stored in an ultra-compressed format to construct the linear system, including:
[0019] The global coefficient matrix of the coupled linear equations for the coolant flow field is stored in an ultra-compressed format, using four contiguous arrays: a row pointer array, a column index array, a diagonal block value array, and an off-diagonal block value array.
[0020] In one embodiment, the global equation coefficient matrix of the coupled linear equations of the coolant flow field is stored in an ultra-compressed format to construct the linear system, including:
[0021] The coefficient matrix of the global equation system of coupled linear equations of the coolant flow field is stored in an overcompressed format to construct a linear system as Ax = b, where A is the compressed global coefficient matrix and b represents a constant.
[0022] In one embodiment, the global coefficient matrix is solved using an efficient selective algebraic multigrid method. A representative matrix of the global coefficient matrix is constructed, and an algebraic multigrid coarsening operation is performed to obtain a blocky coarse-level matrix, including:
[0023] Extract the elements in the 4th row and 4th column of each submatrix of the overall coefficient matrix to form a representative matrix, and construct the connection strength matrix based on the representative matrix;
[0024] The influence set and dependency set of each equation are constructed using the connection strength matrix, and the selection weight of the representative matrix is defined according to the dependency set. The PMIS coarsening algorithm, influence set, dependency set and selection weight of representative matrix are used for coarsening to obtain block fine-level matrix.
[0025] The interpolation operator is constructed and calculated using a long-range interpolation method on the representative matrix to obtain the interpolation operator;
[0026] Transpose the interpolation operator to obtain the constraint operator;
[0027] The block coarse-level matrix is obtained by multiplying the elements in the interpolation operator and the constraint operator with each element in the submatrix block corresponding to the block fine-level matrix.
[0028] In one embodiment, constructing a connection strength matrix based on a representative matrix includes:
[0029] The connection strength matrix is constructed based on the representative matrix.
[0030]
[0031] Among them, a ik Let a represent the off-diagonal element of the i-th row of the matrix. ij This represents the element in the i-th row and j-th column of the matrix.
[0032] In one embodiment, the influence set and dependency set of each equation are constructed using the connection strength matrix, and the method further includes:
[0033] The influence set and dependency set of each equation are constructed using the connection strength matrix.
[0034] S i ={j:j≠i,M ij =1}
[0035]
[0036] Among them, S i Indicates the influence set. Represents a dependency set.
[0037] In one embodiment, coarsening is performed using the PMIS coarsening algorithm, influence set, dependency set, and selection weights of the representative matrix to obtain a block-like fine-level matrix, including:
[0038] Step 1: Select isolated equations in the equation set V of the representative matrix A' whose dependency set is empty and add them to the fine-level equation set F;
[0039] Step 2: Remove the set of finer-level equations F from the set of equations V;
[0040] Step 3: Assign all equations i that satisfy M ij The weight ω of equation j with relation = 1 j The weight ω of equation i i In comparison, if ω is satisfied i If the weight of equation i is greater than the weight of all equations strongly connected to it, i.e., ω(i) > ω(j), then equation i is added to the maximally independent set I; where, That is, the size of the dependency set of equation i plus any random number in the range from 0 to 1;
[0041] Step 4: Add the equations in the maximally independent set I to the coarse-order equation set C;
[0042] Step 5: Add all equations in the influence set S of the equations within the maximally independent set to the finer-order equation set F;
[0043] Step 6: Remove the equations newly added to the coarse-level equation set C and the fine-level equation set F in Steps 5 and 6 from the remaining equation set V;
[0044] Step 7: Exchange the function numbers of the newly added coarse-level equation set and fine-level equation set at the process boundary between processes;
[0045] Step 8: Check if the remaining equation set still contains equations, i.e., whether all equations in matrix A' have been divided into the fine-level equation set F or the coarse-level equation set C. If not, return to step 3 until the entire coarsening process is completed, resulting in a block-shaped fine-level matrix A. F .
[0046] The aforementioned accelerated simulation method for coolants in heat exchangers first obtains the material parameters of the coolant and the geometric parameters of the heat exchanger. The material parameters include density and effective viscosity coefficient. The geometric parameters are discretized into an unstructured three-dimensional mesh to obtain the heat exchanger spatial mesh. The heat exchanger spatial mesh consists of multiple three-dimensional polyhedral mesh elements. Each mesh element and its neighboring mesh elements sharing a common surface form a set of spatial relationships. The mesh element at the center of these spatial relationships is the master mesh element. Under the finite volume discretization framework, based on the spatial relationships between the master mesh element and its neighboring mesh elements and the material parameters, a set of coupled linear equations for the coolant flow field is established. The global equation coefficient matrix of the coupled linear equations for the coolant flow field is stored in an overcompressed format to construct a linear system. The linear system includes a global coefficient matrix. By separating diagonal blocks from off-diagonal element blocks and compressing the non-zero elements within the off-diagonal blocks, the overcompressed format reduces the storage size of the row pointer array and column index array compared to existing row-compressed sparse formats. Compared to existing block-row compressed sparse formats, this method reduces the storage size of numerical arrays, alleviating memory consumption and access frequency pressure in solving coupled linear equation systems. Then, it solves the global coefficient matrix using an efficient selective algebraic multigrid method, constructs a representative matrix of the global coefficient matrix, and performs algebraic multigrid coarsening operations to obtain a block-like coarse-level matrix. This block-like coarse-level matrix is then substituted into the linear system to solve for the coolant flow field, yielding the coolant velocity vector field and pressure field. This application establishes a representative matrix instead of the global block matrix for coarsening operations and interpolation operator construction in the algebraic multigrid preparation stage. Compared to existing methods that directly prepare the global matrix for algebraic multigrid, this reduces the complexity of the algebraic multigrid preparation stage and decreases the linear system solution time. Furthermore, by using the PMIS coarsening algorithm on the representative matrix, compared to existing techniques using the traditional RS coarsening algorithm, it reduces the computational and memory consumption of algebraic multigrid, improving the solution efficiency of the coolant flow field. Attached Figure Description
[0047] Figure 1 This is a flowchart illustrating a method for accelerating coolant simulation of a heat exchanger in one embodiment.
[0048] Figure 2 This is a schematic diagram of a block-shaped sparse matrix storage format in one embodiment;
[0049] Figure 3This is a schematic diagram of spatial mesh discretization based on the finite volume method in one embodiment;
[0050] Figure 4 This is a schematic diagram of the preparation stage for a selective algebraic multigrid in another embodiment. Detailed Implementation
[0051] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0052] In one embodiment, such as Figure 1 As shown, a method for accelerating coolant simulation of heat exchangers is provided, including the following steps:
[0053] Step 102: Obtain the material parameters of the coolant and the geometric parameters of the heat exchanger; the material parameters include density and effective viscosity coefficient; discretize the geometric parameters into an unstructured three-dimensional mesh to obtain the heat exchanger spatial mesh; the heat exchanger spatial mesh is composed of multiple three-dimensional polyhedral mesh elements, and each mesh element and its neighboring mesh elements with a common surface form a set of spatial relationships, at which point the mesh element located at the center of the spatial relationship is the master mesh element.
[0054] The geometric parameters include the heat exchanger length, hot-end tube diameter, and the body-center coordinates, surface area, and surface normal vectors perpendicular to the surface and pointing outwards from the element. Discretizing the geometric parameters into an unstructured 3D mesh is existing technology and will not be elaborated upon in this application. Coolant material parameters, including density and viscosity, are read in. Boundary conditions from the simulation scenario, such as the heat exchanger hot-end temperature and ambient pressure, are also read in. The flow field is then initialized according to these settings.
[0055] Step 104: Under the finite volume method discretization framework, establish a set of coupled linear equations for the coolant flow field based on the spatial relationship and material parameters between the main grid cell and neighboring grid cells.
[0056] A fully coupled linear system of coolant fluid within a heat exchanger is constructed based on a discrete framework using the finite volume method. Taking one grid cell C and its adjacent grid cell F as an example, the spatial relationship between cell C and cell F establishes a set of coupled linear equations for the coolant flow field. The spatial relationship is as follows: Figure 3 As shown, grayscale represents the interface between two grid cells.
[0057] Step 106: The coefficient matrix of the global equation system of the coupled linear equation system of the coolant flow field is stored in an overcompressed format to construct a linear system; the linear system includes the global coefficient matrix.
[0058] The coupled linear equations are stored in an ultra-compressed format to construct a linear system, Ax = b. Here, A is a block-type matrix arranged macroscopically by geometric units and microscopically by physical quantity relationships; that is, the entire coefficient matrix A consists of N×N sub-matrix blocks, each with a dimension of 4×4, and N represents the number of geometric grid units, such as... Figure 2 As shown. The characteristics of the fully coupled equations for incompressible fluids result in the diagonal matrix blocks being dense 4×4 matrices, while the off-diagonal 4×4 sub-matrix blocks are "arrow-shaped", and the cross-term coefficients of the velocity components in the upper and lower triangular parts are often 0.
[0059] This application proposes storing the overall coefficient matrix in a highly compressed format, using four contiguous arrays to store all matrix information: a row pointer array (Row_Ptr), a column index array (Col_Idx), a diagonal block value array (Dia_Values), and an off-diagonal block value array (Off_Values). Figure 2 As shown, Row_Ptr is an integer array of length (N+1), storing the starting position of the row containing each off-diagonal sub-block in the Col_Idx and Off_Values arrays; Col_Idx is an integer array of length (nnzb-N), where nnzb is the number of non-zero sub-blocks, storing the column number of each off-diagonal sub-block; Off_Values is a double-precision floating-point number of length (nnzb-N)×10, storing 10 values for each off-diagonal sub-matrix block; Dia_Values is a double-precision floating-point number of length (N×16), storing 16 values for each diagonal sub-matrix block.
[0060] By separating diagonal blocks from off-diagonal element blocks and compressing non-zero elements within off-diagonal blocks, the supercompression format reduces the storage size of the row pointer array (Row_Ptr) and column index array (Col_Idx) compared to the existing row compression sparse format (CSR), and reduces the storage size of the value array (Value) compared to the existing block row compression sparse format (BCSR), thus alleviating the memory usage and memory access frequency pressure of solving coupled linear equation systems.
[0061] Step 108: Solve the global coefficient matrix using the efficient selection algebraic multigrid method, construct a representative matrix of the global coefficient matrix, and perform algebraic multigrid coarsening operation to obtain a blocky coarse-level matrix.
[0062] A representative matrix of the global block matrix is constructed to perform algebraic multigrid coarsening operations, and interpolation and constraint operators are constructed.
[0063] The coefficient in the 4th row and 4th column of each sub-matrix block in the overall matrix is taken as the representative element of the sub-matrix block. For the overall coefficient matrix A, the sub-matrix block A in the i-th row and j-th column is... ijIt consists of the following coefficients:
[0064]
[0065] The representative matrix A' is then represented as:
[0066]
[0067] Replacing the original (4N×4N) equation with an (N×N) dimensional representative matrix A', a coarsening operation is performed using the Parallel Independent Sets (PMIS) algorithm to select a coarse-level equation with lower complexity, namely the block-like fine-level matrix A. F .
[0068] Based on the representative matrix A', an interpolation operator P is constructed using the long-range interpolation method, and the interpolation operator is transposed to obtain the constraint operator R, where R = P. T .
[0069] The interpolation operator of the characteristic matrix is applied to the entire block matrix to obtain the coarse-level matrix of the block matrix. The coarse-level equation system is constructed from the fine-level equation system according to equation (3):
[0070] A C =RA F P (3)
[0071] Among them, A C Represents the coarse-order system of equations; A F represents the block-like fine-level matrix; P represents the interpolation operator obtained in the previous steps.
[0072] Since both the coarsening algorithm and the interpolation operator are based on A F The representative matrix is A'. Therefore, the constructed interpolation operator P and constraint operator R are also (N×N) dimensional scalar sparse matrices. In constructing the block-like coarse-level matrix A... C At that time, the elements in the interpolation operator and the constraint operator and the block-like fine-level matrix A are combined. F The block-shaped coarse-level matrix A is obtained by multiplying each element in the corresponding sub-matrix block one by one. C .
[0073] By establishing a representative matrix instead of the global block matrix for coarsening operations and interpolation operator construction in the algebraic multigrid preparation stage, compared with existing methods that directly prepare the global matrix for algebraic multigrid, the complexity of the algebraic multigrid preparation stage is reduced, and the solution time of linear systems is decreased. At the same time, by using a parallel independent set algorithm for coarsening operations on the representative matrix, compared with existing techniques that use the traditional RS coarsening algorithm, the computational and memory consumption of algebraic multigrid is reduced, and the solution efficiency of coolant flow field is improved.
[0074] Step 110: Substitute the blocky coarse-level matrix into the linear system to solve for the flow field of the coolant, and obtain the velocity vector field and pressure field of the coolant.
[0075] Substituting the block coarse-level matrix into the linear system A, we use A C Replace the solution for x, and the solution obtained is the velocity vector field and pressure field of the flow field. Determine whether the flow field has converged at this time. If it has not converged, substitute the flow field of this step back to the coupled linear equation system and continue to assemble the linear equation system of the next iteration step until the flow field converges and the entire solution process ends.
[0076] In the aforementioned accelerated simulation method for coolants in heat exchangers, the material parameters of the coolant and the geometric parameters of the heat exchanger are first obtained. The material parameters include density and effective viscosity coefficient. The geometric parameters are discretized into an unstructured three-dimensional mesh to obtain the heat exchanger spatial mesh. The heat exchanger spatial mesh consists of multiple three-dimensional polyhedral mesh elements. Each mesh element and its neighboring mesh elements with common faces form a set of spatial relationships. The mesh element at the center of these spatial relationships is the master mesh element. Under the finite volume discretization framework, based on the spatial relationships between the master mesh element and its neighboring mesh elements and the material parameters, a coupled linear equation system for the coolant flow field is established. The global equation system coefficient matrix of the coupled linear equation system for the coolant flow field is stored in an overcompressed format to construct a linear system. The linear system includes a global coefficient matrix. By separating diagonal blocks from off-diagonal element blocks and compressing the non-zero elements within the off-diagonal blocks, the overcompressed format reduces the storage size of the row pointer array and column index array compared to existing row-compressed sparse formats. Compared to existing block-row compressed sparse formats, this method reduces the storage size of numerical arrays, alleviating memory consumption and access frequency pressure in solving coupled linear equation systems. Then, it solves the global coefficient matrix using an efficient selective algebraic multigrid method, constructs a representative matrix of the global coefficient matrix, and performs algebraic multigrid coarsening operations to obtain a block-like coarse-level matrix. This block-like coarse-level matrix is then substituted into the linear system to solve for the coolant flow field, yielding the coolant velocity vector field and pressure field. This application reduces the complexity of the algebraic multigrid preparation stage and decreases the linear system solution time by establishing a representative matrix instead of the global block matrix for coarsening operations and interpolation operator construction during the algebraic multigrid preparation stage, compared to existing methods that directly prepare the global matrix for algebraic multigrid. Furthermore, by using the PMIS coarsening algorithm on the representative matrix, compared to existing techniques using the traditional RS coarsening algorithm, it reduces the computational and memory consumption of algebraic multigrid, improving the solution efficiency of the coolant flow field.
[0077] In one embodiment, within the finite volume method discretization framework, a set of coupled linear equations for the coolant flow field is established based on the spatial relationships and material parameters between the master grid cell and neighboring grid cells, including:
[0078] Within the finite volume method discretization framework, based on the spatial relationships and material parameters between the master mesh element and neighboring mesh elements, a set of coupled linear equations for the coolant flow field is established as follows:
[0079]
[0080] Where C represents the primary grid cell and F represents the neighboring grid cell. The velocity unknown u in the momentum equation of the x-direction in the main grid cell represents the coolant flow field. C coefficient, The unknown velocity v in the y-direction of the coolant flow field in the momentum equation in the x-direction of the main grid cell represents this. C coefficient, The unknown velocity w in the z-direction of the coolant flow field in the momentum equation in the x-direction of the main grid cell represents the velocity unknown. C coefficient, p represents the pressure unknown in the coolant flow field of the momentum equation in the x-direction of the main grid cell. C coefficient, This represents the unknown velocity in the x-direction of the coolant flow field in the momentum equation in the y-direction of the main mesh element. C coefficient, The velocity unknown v of the coolant flow field in the momentum equation along the y-direction in the main grid cell represents this. C coefficient, The unknown velocity w in the z-direction of the coolant flow field in the momentum equation in the y-direction of the main grid cell represents this. C coefficient, p represents the pressure unknown in the coolant flow field of the momentum equation in the y-direction of the main grid cell. C coefficient, The unknown velocity u in the x-direction of the coolant flow field in the momentum equation in the z-direction of the main grid cell represents the velocity unknown in the main grid cell. C coefficient, The unknown velocity v in the y-direction of the coolant flow field in the momentum equation in the z-direction of the main grid cell represents this. C coefficient, The velocity unknown w in the momentum equation of the z-direction in the main grid cell represents the velocity unknown of the coolant flow field. C coefficient, p represents the pressure unknown in the coolant flow field of the momentum equation in the z-direction of the main grid cell. C coefficient, The velocity unknown u in the x-direction continuity equation of the main grid cell represents the coolant flow field in the unknown. C coefficient, The velocity unknown v of the coolant flow field in the continuity equation in the y-direction of the main mesh element represents this. C coefficient, The velocity unknown w in the z-direction continuity equation of the main grid cell represents the coolant flow field in the main grid cell. C coefficient, p represents the pressure unknown in the coolant flow field of the continuity equation in the main grid cell. C coefficient, μ represents the coefficient of velocity unknowns in the coolant flow field in different directions. eff S is the effective viscosity coefficient of the coolant. f Let d be the area vector of the interface f. CF To point from the center of unit C to the center of unit F, p represents the pressure unknown in the coolant flow field of the momentum equation in the x-direction of the neighboring grid cell. F coefficient, p represents the pressure unknown in the coolant flow field of the momentum equation in the y-direction of the neighboring mesh element. F coefficient, p represents the pressure unknown in the coolant flow field of the momentum equation in the z-direction of the neighboring mesh element. F coefficient, The velocity unknown u in the continuity equation of the coolant flow field in the x-direction of the neighboring grid cell represents the unknown quantity u. F coefficient, The velocity unknown v of the coolant flow field in the continuity equation in the y-direction of the neighboring mesh element represents this. F coefficient, The velocity unknown w in the z-direction continuity equation of the neighboring mesh element represents the coolant flow field in the unknown quantity w. F coefficient, p represents the pressure unknown in the coolant flow field of the continuity equation in the neighboring grid cell. F The coefficient, ρ is the density of the coolant, D f Let f be the diffusion coefficient vector at the mesh interface f of the heat exchanger spatial mesh. This represents the right-hand side term of the momentum equation in the x-direction. This represents the right-hand side term of the momentum equation in the y-direction. This represents the right-hand side term of the momentum equation in the z-direction. This represents the right-hand side term of a continuous equation.
[0081] In a specific embodiment, the matrix coefficients of the neighboring grid cells F of the main grid cell of the heat exchanger space grid in the momentum equation (first 3 lines) of the coolant flow field are respectively: the velocity unknown coefficients of the coolant flow field. The pressure unknown p in the coolant flow field of the momentum equation in the x-direction F coefficient In the momentum equation in the y-direction, p F coefficient In the momentum equation in the z-direction, p F coefficient
[0082] The matrix coefficients of the principal grid element C of the heat exchanger space grid in the momentum equation of the coolant flow field are as follows: The velocity unknown u of the coolant flow field in the momentum equation in the x-direction. C coefficient Unknown pressure p in coolant flow field C coefficient The velocity unknown v of the coolant flow field in the momentum equation in the y-direction C coefficient Unknown pressure p in the coolant flow field C coefficient The velocity unknown w of the coolant flow field in the momentum equation in the z-direction C coefficient Unknown pressure p in the coolant flow field C coefficient
[0083] The right-hand side of the momentum equation in the x-direction The right-hand side of the momentum equation in the y-direction The right-hand side of the momentum equation in the z-direction
[0084] In the continuity equation (line 4) for the coolant flow field, the matrix coefficients of the neighboring grid cells F of the main grid cell in the heat exchanger space grid are as follows: x-direction velocity unknown u F coefficient Unknown velocity v in the y direction F coefficient Unknown velocity w in the z direction F coefficient Unknown pressure p F coefficient
[0085] The matrix coefficients of the principal grid element C of the heat exchanger space grid in the continuity equation of the coolant flow field are as follows: The unknown velocity u in the x-direction. C coefficient Unknown velocity v in the y direction C coefficient Unknown velocity w in the z direction C coefficient Unknown pressure p C coefficient
[0086] The right-hand side of the continuity equation for the coolant flow field is:
[0087]
[0088] The physical quantities in the coefficients of the above equation system are as follows: ρ is the density of the coolant; μ eff μ is the effective viscosity coefficient of the coolant. eff =μ+μ t μ is the viscosity of the coolant material. t The calculated turbulent viscosity; D f S is the diffusion coefficient vector at the mesh interface f of the heat exchanger spatial mesh; f Let f be the area vector of the interface, such as Figure 1 As shown, the direction is from cell C to cell F, perpendicular to surface f, and the size is equal to the area of surface f; For S f Projected in the x-direction, For S f Projected in the y-direction, For S f Projected in the z-direction; d CF The distance between the body centers is the distance from the body center of unit C to the body center of unit F. g is the velocity surface flux; f For surface weighting factors; The gradient operator represents the gradient of the coolant velocity or pressure physical quantity within a mesh cell, such as the velocity gradient in the x-direction in an orthogonal mesh. The coefficient matrix of the global equation system is as follows Figure 2 The Chinese Super League is stored in a compressed format.
[0089] In one embodiment, the global equation coefficient matrix of the coupled linear equations of the coolant flow field is stored in an ultra-compressed format to construct the linear system, including:
[0090] The global coefficient matrix of the coupled linear equations for the coolant flow field is stored in an ultra-compressed format, using four contiguous arrays: a row pointer array, a column index array, a diagonal block value array, and an off-diagonal block value array.
[0091] In one embodiment, the global equation coefficient matrix of the coupled linear equations of the coolant flow field is stored in an ultra-compressed format to construct the linear system, including:
[0092] The coefficient matrix of the global equation system of coupled linear equations of the coolant flow field is stored in an overcompressed format to construct a linear system as Ax = b, where A is the compressed global coefficient matrix and b represents a constant.
[0093] In one embodiment, the global coefficient matrix is solved using an efficient selective algebraic multigrid method. A representative matrix of the global coefficient matrix is constructed, and an algebraic multigrid coarsening operation is performed to obtain a blocky coarse-level matrix, including:
[0094] Extract the elements in the 4th row and 4th column of each submatrix of the overall coefficient matrix to form a representative matrix, and construct the connection strength matrix based on the representative matrix;
[0095] The influence set and dependency set of each equation are constructed using the connection strength matrix, and the selection weight of the representative matrix is defined according to the dependency set. The PMIS coarsening algorithm, influence set, dependency set and selection weight of representative matrix are used for coarsening to obtain block fine-level matrix.
[0096] The interpolation operator is constructed and calculated using a long-range interpolation method on the representative matrix to obtain the interpolation operator;
[0097] Transpose the interpolation operator to obtain the constraint operator;
[0098] The block coarse-level matrix is obtained by multiplying the elements in the interpolation operator and the constraint operator with each element in the submatrix block corresponding to the block fine-level matrix.
[0099] In one embodiment, constructing a connection strength matrix based on a representative matrix includes:
[0100] The connection strength matrix is constructed based on the representative matrix.
[0101]
[0102] Among them, a ik Let a represent the off-diagonal element of the i-th row of the matrix. ij This represents the element in the i-th row and j-th column of the matrix.
[0103] In one embodiment, the influence set and dependency set of each equation are constructed using the connection strength matrix, and the method further includes:
[0104] The influence set and dependency set of each equation are constructed using the connection strength matrix.
[0105] S i ={j:j≠i,M ij =1}
[0106]
[0107] Among them, S i Indicates the influence set. Represents a dependency set.
[0108] In a specific embodiment, such as Figure 4 As shown, Figure 4This is a schematic diagram of the preparation stage of the selective algebraic multigrid in this application. First, a smoothing is constructed for the input blocky linear equation system. In this method, an incomplete LU decomposition without injection (ILU0) is used as a smoothing in the algebraic multigrid solution process to perform fixed-point iteration on each coarse-order linear system. That is, in the smoothing construction, the blocky matrix is decomposed into ILU0 and the corresponding lower triangular matrix L and upper triangular matrix U are stored.
[0109] The elements in the 4th row and 4th column of each (4×4) submatrix of the block matrix are extracted to form a representative matrix. The coarsening and interpolation operators in the subsequent SAMG preparation process are constructed based on this representative matrix.
[0110] Construct a connection strength matrix M based on the representative matrix A'. The connection strength M between equation i and its adjacent equation j is... ij Defined as:
[0111]
[0112] Among them, a ik Let represent the off-diagonal elements of the i-th row of matrix A'.
[0113] Construct the influence set S and dependency set S of each equation based on the connection strength matrix M. T Taking equation i as an example:
[0114] S i ={j:j≠i,M ij =1} (5)
[0115]
[0116] Define the selection weights ω representing matrix A', and perform PMIS coarsening based on these weights. Equation i is selected into the coarsening level by the weights ω. i Defined as:
[0117]
[0118] in, The number of equations contained in the strongly dependent set of equation i is represented by , and rand[0,1] represents a random number in the range of 0 to 1.
[0119] The PMIS coarsening algorithm is used to determine the size of the next level of coarse linear system (i.e., the order of the equation system) until the order of the coarse matrix is less than the predetermined minimum size of the coarse matrix or the number of coarse layers constructed is greater than the predetermined upper limit of the coarse size, at which point the coarse construction ends.
[0120] In one embodiment, coarsening is performed using the PMIS coarsening algorithm, influence set, dependency set, and selection weights of the representative matrix to obtain a block-like fine-level matrix, including:
[0121] Step 1: Select isolated equations in the equation set V of the representative matrix A' whose dependency set is empty and add them to the fine-level equation set F;
[0122] Step 2: Remove the set of finer-level equations F from the set of equations V;
[0123] Step 3: Assign all equations i that satisfy M ij The weight ω of equation j with relation = 1 j The weight ω of equation i i In comparison, if ω is satisfied i If the weight of equation i is greater than the weight of all equations strongly connected to it, i.e., ω(i) > ω(j), then equation i is added to the maximally independent set I; where, That is, the size of the dependency set of equation i plus any random number in the range from 0 to 1;
[0124] Step 4: Add the equations in the maximally independent set I to the coarse-order equation set C;
[0125] Step 5: Add all equations in the influence set S of the equations within the maximally independent set to the finer-order equation set F;
[0126] Step 6: Remove the equations newly added to the coarse-level equation set C and the fine-level equation set F in Steps 5 and 6 from the remaining equation set V;
[0127] Step 7: Exchange the function numbers of the newly added coarse-level equation set and fine-level equation set at the process boundary between processes;
[0128] Step 8: Check if the remaining equation set still contains equations, i.e., whether all equations in matrix A' have been divided into the fine-level equation set F or the coarse-level equation set C. If not, return to step 3 until the entire coarsening process is completed, resulting in a block-shaped fine-level matrix A. F .
[0129] It should be understood that, although Figure 1 The steps in the flowchart are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order in which these steps are executed, and they can be performed in other orders. Figure 1 At least some of the steps in the process may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least some of the sub-steps or stages of other steps.
[0130] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0131] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. A method for accelerating coolant simulation in heat exchangers, characterized in that, The method includes: Obtain the material parameters of the coolant and the geometric parameters of the heat exchanger; the material parameters include density and effective viscosity coefficient; The geometric spatial parameters are discretized into an unstructured three-dimensional mesh to obtain the heat exchanger spatial mesh. The heat exchanger spatial mesh is composed of multiple three-dimensional polyhedral mesh elements. Each mesh element and its neighboring mesh elements with a common surface form a set of spatial relationships. At this time, the mesh element located at the center of the spatial relationship is the master mesh element. Based on the spatial relationship between the main grid cell and neighboring grid cells and the material parameters, a set of coupled linear equations for the coolant flow field is established within the finite volume method discretization framework. The coefficient matrix of the global equation set of the coupled linear equation set of the coolant flow field is stored in an overcompressed format to construct a linear system; the linear system includes the global coefficient matrix. The global coefficient matrix is solved using an efficient selective algebraic multigrid method. A representative matrix of the global coefficient matrix is constructed, and an algebraic multigrid coarsening operation is performed to obtain a blocky coarse-level matrix. Substituting the blocky coarse-level matrix into the linear system, the flow field of the coolant is solved to obtain the velocity vector field and pressure field of the coolant.
2. The method according to claim 1, characterized in that, Within the finite volume method discretization framework, based on the spatial relationship between the main mesh element and neighboring mesh elements and the material parameters, a set of coupled linear equations for the coolant flow field is established, including: Within the finite volume method discretization framework, based on the spatial relationship between the main mesh element and neighboring mesh elements and the material parameters, a set of coupled linear equations for the coolant flow field is established as follows: Where C represents the primary grid cell and F represents the neighboring grid cell. The velocity unknown u in the momentum equation of the x-direction in the main grid cell represents the coolant flow field. C coefficient, The unknown velocity v in the y-direction of the coolant flow field in the momentum equation in the x-direction of the main grid cell represents this. C coefficient, The unknown velocity w in the z-direction of the coolant flow field in the momentum equation in the x-direction of the main grid cell represents the velocity unknown. C coefficient, p represents the pressure unknown in the coolant flow field of the momentum equation in the x-direction of the main grid cell. C coefficient, The unknown velocity u in the x-direction of the coolant flow field in the momentum equation in the y-direction of the main grid cell represents the velocity of the coolant flow field. C coefficient, The velocity unknown v of the coolant flow field in the momentum equation along the y-direction in the main grid cell represents this. C coefficient, The unknown velocity w in the z-direction of the coolant flow field in the momentum equation in the y-direction of the main grid cell represents this. C coefficient, p represents the pressure unknown in the coolant flow field of the momentum equation in the y-direction of the main grid cell. C coefficient, The unknown velocity u in the x-direction of the coolant flow field in the momentum equation in the z-direction of the main grid cell represents the velocity unknown in the main grid cell. C coefficient, The unknown velocity v in the y-direction of the coolant flow field in the momentum equation in the z-direction of the main grid cell represents this. C coefficient, The velocity unknown w in the momentum equation of the z-direction in the main grid cell represents the velocity unknown of the coolant flow field. C coefficient, p represents the pressure unknown in the coolant flow field of the momentum equation in the z-direction of the main grid cell. C coefficient, The velocity unknown u in the x-direction continuity equation of the main grid cell represents the coolant flow field in the unknown. C coefficient, The velocity unknown v of the coolant flow field in the continuity equation in the y-direction of the main mesh element represents this. C coefficient, The velocity unknown w in the z-direction continuity equation of the main grid cell represents the coolant flow field in the main grid cell. C coefficient, p represents the pressure unknown in the coolant flow field of the continuity equation in the main grid cell. C coefficient, μ represents the coefficient of velocity unknowns in the coolant flow field in different directions. eff S is the effective viscosity coefficient of the coolant. f Let d be the area vector of the interface f. CF To point from the center of unit C to the center of unit F, p represents the pressure unknown in the coolant flow field of the momentum equation in the x-direction of the neighboring grid cell. F coefficient, p represents the pressure unknown in the coolant flow field of the momentum equation in the y-direction of the neighboring grid cell. F coefficient, p represents the pressure unknown in the coolant flow field of the momentum equation in the z-direction of the neighboring mesh element. F coefficient, The velocity unknown u in the continuity equation of the coolant flow field in the x-direction of the neighboring grid cell represents the unknown quantity u. F coefficient, The velocity unknown v of the coolant flow field in the continuity equation in the y-direction of the neighboring mesh element represents this. F coefficient, The velocity unknown w in the z-direction continuity equation of the neighboring mesh element represents the coolant flow field in the unknown quantity w. F coefficient, This represents the coefficient of the pressure unknown pF in the coolant flow field of the continuity equation in the neighboring grid cell, where ρ is the coolant density and D is the coefficient of the pressure unknown pF in the continuity equation. f Let f be the diffusion coefficient vector at the mesh interface f of the heat exchanger spatial mesh. This represents the right-hand side term of the momentum equation in the x-direction. This represents the right-hand side term of the momentum equation in the y-direction. This represents the right-hand side term of the momentum equation in the z-direction. This represents the right-hand side term of a continuous equation.
3. The method according to claim 1, characterized in that, The linear system is constructed by storing the global equation coefficient matrix of the coupled linear equation system of the coolant flow field in an ultra-compressed format, including: The global coefficient matrix of the coupled linear equations of the coolant flow field is stored in an ultra-compressed format, using four consecutive arrays: row pointer array, column index array, diagonal block value array, and off-diagonal block value array.
4. The method according to any one of claims 1 to 3, characterized in that, The linear system is constructed by storing the global equation coefficient matrix of the coupled linear equation system of the coolant flow field in an ultra-compressed format, including: The coefficient matrix of the global equation set of the coupled linear equation set of the coolant flow field is stored in an overcompressed format to construct a linear system Ax = b, where A is the compressed global coefficient matrix and b represents a constant.
5. The method according to claim 1, characterized in that, The global coefficient matrix is solved using an efficient selective algebraic multigrid method. A representative matrix of the global coefficient matrix is constructed, and an algebraic multigrid coarsening operation is performed to obtain a blocky coarse-level matrix, including: Extract the elements of the 4th row and 4th column of each submatrix of the overall coefficient matrix to form a representative matrix, and construct the connection strength matrix based on the representative matrix; The influence set and dependency set of each equation are constructed using the connection strength matrix, and the selection weight of the representative matrix is defined according to the dependency set. The PMIS coarsening algorithm, influence set, dependency set and selection weight of representative matrix are used for coarsening to obtain block fine-level matrix. The interpolation operator is constructed and calculated using a long-range interpolation method on the representative matrix to obtain the interpolation operator; The interpolation operator is transposed to obtain the constraint operator; The block coarse-level matrix is obtained by multiplying the elements in the interpolation operator and the constraint operator with each element in the submatrix block corresponding to the block fine-level matrix.
6. The method according to claim 5, characterized in that, Construct a connection strength matrix based on the representative matrix, including: The connection strength matrix is constructed based on the representative matrix. Among them, a ik Let a represent the off-diagonal element of the i-th row of the matrix. ij This represents the element in the i-th row and j-th column of the matrix.
7. The method according to claim 6, characterized in that, Constructing the influence set and dependency set of each equation using the connection strength matrix also includes: The influence set and dependency set of each equation are constructed using the connection strength matrix. S i ={j:j≠i,M ij =1} Among them, S i Indicates the influence set. Represents a dependency set.
8. The method according to claim 5, characterized in that, Using the PMIS coarsening algorithm, influence set, dependency set, and selection weights of the representative matrix, coarsening is performed to obtain a block-like fine-level matrix, including: Step 1: Select isolated equations in the equation set V of the representative matrix A' whose dependency set is empty and add them to the fine-level equation set F; Step 2: Remove the set of finer-level equations F from the set of equations V; Step 3: Assign all equations i that satisfy M ij The weight ω of equation j with relation = 1 j The weight ω of equation i i In comparison, if ω is satisfied i If the weight of equation i is greater than the weight of all equations strongly connected to it, i.e., ω(i) > ω(j), then equation i is added to the maximally independent set I; where, That is, the size of the dependency set of equation i plus any random number in the range from 0 to 1; Step 4: Add the equations in the maximally independent set I to the coarse-order equation set C; Step 5: Add all equations in the influence set S of the equations within the maximally independent set to the finer-order equation set F; Step 6: Remove the equations newly added to the coarse-level equation set C and the fine-level equation set F in Steps 5 and 6 from the remaining equation set V; Step 7: Exchange the function numbers of the newly added coarse-level equation set and fine-level equation set at the process boundary between processes; Step 8: Check if the remaining equation set still contains equations, i.e., whether all equations in matrix A' have been divided into the fine-level equation set F or the coarse-level equation set C. If not, return to step 3 until the entire coarsening process is completed, resulting in a block-shaped fine-level matrix A. F .