A method and device for electric field simulation based on multi-grid
Patent Information
- Application Number
- CN202311315034.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-11
- Publication Date
- 2026-08-28
- Estimated Expiration
- 2043-10-11
AI Technical Summary
[0003]求解线性方程组的方法有很多,比如标准的共轭梯度法(CG)、不完全乔莱斯基分解预处理的共轭梯度法(ICCG)、几何多重网格算法(GMG-2)和基于aggregation(聚集)并采用FGC加速的代数多重网格算法(AGMG),但是这些方法计算时会存在迭代次数过多或者求解时间过长的问题,因而计算效率大打折扣
[0058]本发明的有益效果在于:获取电场仿真的泊松方程,并确定与其对应的边界条件,使用几何方法构造第一层粗网格,并使用代数方法构造最密网格,基于最密网格和第一层粗网格根据二次有限元的基函数和一次有限元的基函数之间的关系生成第一层粗网格上的代数方程,基于边界条件使用代数多重网格算法求解第一层粗网格上的代数方程,以此使用P型代数多重网格算法对泊松方程进行求解,不仅使用代数方程信息,还利用了额外的几何信息,能够挖掘包含在最初的物理问题中的所有有用信息,加快了代数多重网格算法的收敛,加快了求解速度,从而有效提高计算效率。
Smart Images

Figure CN117408104B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of electric field calculation technology, and in particular to a method and apparatus for electric field simulation calculation based on multigrids. Background Technology
[0002] Cable joints are weak points in cable insulation, so assessing the consequences of different defects in cable joints is crucial for construction management. Uneven electric field distribution is one of the main causes of cable joint failures. Generally, electric field simulation of cable joints often uses a quasi-static electric field; however, electrostatic fields can also be used for calculations when transient processes are not considered. In electrostatic field simulations, the potential in the model medium satisfies the Poisson equation. Because the computational domain often has complex geometry, the finite element method is commonly used to solve static or quasi-static electromagnetic problems in bounded or unbounded regions with different boundary conditions. This will generate a linear system of equations: Ax = b, where A ∈ R. n×n Let x ∈ R be the stiffness matrix. n Let b represent an unknown vector, where b ∈ R. n This represents the load vector. When solving electric field problems, the number of unknowns typically ranges from several thousand to millions. Therefore, one of the key challenges in calculating the Poisson equation is how to quickly and efficiently solve large systems of linear equations.
[0003] There are many methods for solving linear equation systems, such as the standard conjugate gradient method (CG), the conjugate gradient method with incomplete Jolesi decomposition preprocessing (ICCG), the geometric multigrid algorithm (GMG-2), and the algebraic multigrid algorithm (AGMG) based on aggregation and accelerated by FGC. However, these methods suffer from excessive iterations or long solution times, which greatly reduces computational efficiency. Summary of the Invention
[0004] The technical problem to be solved by the present invention is to provide a method and apparatus for electric field simulation calculation based on multigrids, which can effectively improve the calculation efficiency.
[0005] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows:
[0006] A method for electric field simulation calculation based on multigrids includes the following steps:
[0007] Obtain the Poisson equation for the electric field simulation and determine the boundary conditions corresponding to the Poisson equation for the electric field simulation.
[0008] The first coarse mesh is constructed using geometric methods, and the densest mesh is constructed using algebraic methods.
[0009] Based on the densest grid and the first coarse grid, algebraic equations on the first coarse grid are generated according to the relationship between the basis functions of the quadratic finite element and the basis functions of the first finite element.
[0010] Based on the boundary conditions, the algebraic multigrid algorithm is used to solve the algebraic equations on the first coarse grid to obtain the electric field simulation results.
[0011] Furthermore, the construction of the first coarse mesh using geometric methods includes:
[0012] Get the connection relationships between nodes;
[0013] The pairing relationship between the primary node and the secondary node is determined based on the connection relationship between the nodes.
[0014] The main node is determined as the first layer of coarse mesh based on the pairing relationship between the main node and the auxiliary node.
[0015] Furthermore, after constructing the first coarse mesh using geometric methods, the process further includes:
[0016] Use algebraic methods to construct coarse meshes for other layers.
[0017] Furthermore, the step of generating the algebraic equations on the first coarse mesh based on the densest mesh and the first coarse mesh according to the relationship between the basis functions of the quadratic finite element and the basis functions of the first finite element includes:
[0018] Generate the densest and coarse-grid linear systems based on Galerkin's principle;
[0019] Determine the relationship between the basis functions of the quadratic finite element method and the basis functions of the linear finite element method;
[0020] Based on the relationship between the basis functions of the quadratic finite element and the basis functions of the linear finite element, and the linear system of the densest mesh and the linear system of the coarse mesh, the algebraic equations on the first layer of coarse mesh are obtained.
[0021] Furthermore, determining the relationship between the basis functions of the quadratic finite element and the basis functions of the linear finite element includes:
[0022] φ c =[IB]φ f =P fc φ f ;
[0023] In the formula, φ c The basis functions of the quadratic finite element method are represented by I, the identity matrix, and B, which represents the matrix used to show the adjacency relationship between primary and secondary nodes. f Let P represent the basis functions of a linear finite element method.fc This represents the constraint matrix between the densest grid and the first layer of coarse grids;
[0024] The linear systems that generate the densest and coarse grids based on Galerkin's principle include:
[0025] <Lu f , φ fj >= <f,φ fj >, A f u f =b f ;
[0026] <Lu c , φ ci >= <f,φ ci >, A c u c =b c ;
[0027] In the formula, L represents the linear operator of the partial differential equation, u f u represents the vector to be solved for the densest grid. c φ represents the vector to be solved in the coarse mesh. fj Let φ represent the basis functions of the j-th quadratic finite element. ci Let represent the basis functions of the i-th linear finite element. <Lu c , φ ci > represents the inner product of the linear operator of the partial differential equation applied to the vector to be solved in the coarse mesh and the basis functions of the i-th first-order finite element, and f represents the right-hand side term of the partial differential equation. <f,φ ci > represents the inner product of the right-hand side term of the partial differential equation and the basis functions of the i-th linear finite element, A f Let A represent the stiffness matrix on the densest grid. c Let b represent the stiffness matrix on the coarse mesh. c Let b represent the first known vector. f Represents the second known vector;
[0028] The process of obtaining the algebraic equations on the first layer of coarse mesh based on the relationship between the basis functions of the quadratic finite element and the basis functions of the linear system of the densest mesh and the linear system of the coarse mesh includes:
[0029]
[0030] b c =P fc b f ;
[0031] In the formula, This represents the interpolation matrix between the densest grid and the first layer of coarse grid.
[0032] To solve the above-mentioned technical problems, another technical solution adopted by the present invention is as follows:
[0033] A multi-grid-based electric field simulation calculation device includes:
[0034] The boundary condition determination module is used to obtain the Poisson equation for the electric field simulation and determine the boundary conditions corresponding to the Poisson equation for the electric field simulation.
[0035] The mesh construction module is used to construct the first coarse mesh using geometric methods and the densest mesh using algebraic methods.
[0036] An algebraic equation generation module is used to generate algebraic equations on the first coarse mesh based on the densest mesh and the first coarse mesh, according to the relationship between the basis functions of the quadratic finite element and the basis functions of the first finite element.
[0037] The solver module is used to solve the algebraic equations on the first coarse grid layer based on the boundary conditions using an algebraic multigrid algorithm to obtain the electric field simulation results.
[0038] Furthermore, the mesh construction module is specifically used for:
[0039] Get the connection relationships between nodes;
[0040] The pairing relationship between the primary node and the secondary node is determined based on the connection relationship between the nodes.
[0041] The main node is determined as the first layer of coarse mesh based on the pairing relationship between the main node and the auxiliary node.
[0042] Furthermore, the mesh construction module is used to construct other layers of coarse meshes using algebraic methods.
[0043] Furthermore, the algebraic equation generation module is specifically used for:
[0044] Generate the densest and coarse-grid linear systems based on Galerkin's principle;
[0045] Determine the relationship between the basis functions of the quadratic finite element method and the basis functions of the linear finite element method;
[0046] Based on the relationship between the basis functions of the quadratic finite element and the basis functions of the linear finite element, and the linear system of the densest mesh and the linear system of the coarse mesh, the algebraic equations on the first layer of coarse mesh are obtained.
[0047] Furthermore, in the algebraic equation generation module, determining the relationship between the basis functions of the quadratic finite element and the basis functions of the linear finite element includes:
[0048] φ c =[IB]φ f =P fc φ f ;
[0049] In the formula, φ c The basis functions of the quadratic finite element method are represented by I, the identity matrix, and B, which represents the matrix used to show the adjacency relationship between primary and secondary nodes. f Let P represent the basis functions of a linear finite element method. fc This represents the constraint matrix between the densest grid and the first layer of coarse grids;
[0050] In the algebraic equation generation module, the generation of the densest-grid linear system and the coarse-grid linear system based on Galerkin's principle includes:
[0051] <Lu f φ fj >= <f,φ fj >, A f u f =b f ;
[0052] <Lu c φ ci >= <f,φ ci >, A c u c =b c ;
[0053] In the formula, L represents the linear operator of the partial differential equation, u f u represents the vector to be solved for the densest grid. c φ represents the vector to be solved in the coarse mesh. fj Let φ represent the basis function of the j-th quadratic finite element. ci Let represent the basis functions of the i-th linear finite element. <Lu c φ ci > represents the inner product of the linear operator of the partial differential equation applied to the vector to be solved in the coarse mesh and the basis functions of the i-th first-order finite element, and f represents the right-hand side term of the partial differential equation. <f,φ ci > represents the inner product of the right-hand side term of the partial differential equation and the basis functions of the i-th linear finite element, A f Let A represent the stiffness matrix on the densest grid. c b represents the stiffness matrix on the coarse mesh. c Let b represent the first known vector. f Represents the second known vector;
[0054] In the algebraic equation generation module, obtaining the algebraic equations on the first layer of coarse mesh based on the relationship between the basis functions of the quadratic finite element and the basis functions of the linear element, the linear system of the densest mesh, and the linear system of the coarse mesh includes:
[0055]
[0056] b c =P fc b f ;
[0057] In the formula, This represents the interpolation matrix between the densest grid and the first layer of coarse grid.
[0058] The beneficial effects of this invention are as follows: It obtains the Poisson equation for electric field simulation and determines its corresponding boundary conditions. A first coarse mesh is constructed using geometric methods, and a densest mesh is constructed using algebraic methods. Based on the densest mesh and the first coarse mesh, an algebraic equation on the first coarse mesh is generated according to the relationship between the basis functions of the quadratic finite element method and the first finite element method. Based on the boundary conditions, an algebraic multigrid algorithm is used to solve the algebraic equation on the first coarse mesh. Thus, a P-type algebraic multigrid algorithm is used to solve the Poisson equation. This not only utilizes algebraic equation information but also leverages additional geometric information, enabling the extraction of all useful information contained in the initial physical problem. This accelerates the convergence of the algebraic multigrid algorithm, speeds up the solution process, and effectively improves computational efficiency. Attached Figure Description
[0059] Figure 1 This is a flowchart illustrating the steps of an electric field simulation calculation method based on a multigrid according to an embodiment of the present invention.
[0060] Figure 2 This is a schematic diagram of the structure of an electric field simulation calculation device based on a multi-grid according to an embodiment of the present invention;
[0061] Figure 3 This is a schematic diagram of the first coarse mesh layer in the multi-mesh-based electric field simulation calculation method of this invention.
[0062] Figure 4 This is a schematic diagram of the first coarse mesh layer in the multi-mesh-based electric field simulation calculation method of this invention.
[0063] Figure 5 This is a schematic diagram of the Poisson problem for solving the simulated electric field in the multigrid-based electric field simulation calculation method of this invention. Detailed Implementation
[0064] To explain in detail the technical content, objectives, and effects of the present invention, the following description is provided in conjunction with the embodiments and accompanying drawings.
[0065] Please refer to Figure 1 A method for electric field simulation calculation based on multigrids, comprising the following steps:
[0066] Obtain the Poisson equation for the electric field simulation and determine the boundary conditions corresponding to the Poisson equation for the electric field simulation.
[0067] The first coarse mesh is constructed using geometric methods, and the densest mesh is constructed using algebraic methods.
[0068] Based on the densest grid and the first coarse grid, algebraic equations on the first coarse grid are generated according to the relationship between the basis functions of the quadratic finite element and the basis functions of the first finite element.
[0069] Based on the boundary conditions, the algebraic multigrid algorithm is used to solve the algebraic equations on the first coarse grid to obtain the electric field simulation results.
[0070] As can be seen from the above description, the beneficial effects of the present invention are as follows: The Poisson equation for electric field simulation is obtained, and its corresponding boundary conditions are determined. A first coarse mesh is constructed using geometric methods, and a densest mesh is constructed using algebraic methods. Based on the densest mesh and the first coarse mesh, an algebraic equation on the first coarse mesh is generated according to the relationship between the basis functions of the quadratic finite element method and the basis functions of the linear finite element method. Based on the boundary conditions, an algebraic multigrid algorithm is used to solve the algebraic equation on the first coarse mesh. Thus, the P-type algebraic multigrid algorithm is used to solve the Poisson equation. This not only utilizes algebraic equation information but also leverages additional geometric information, enabling the extraction of all useful information contained in the initial physical problem. This accelerates the convergence of the algebraic multigrid algorithm, speeds up the solution process, and effectively improves computational efficiency.
[0071] Furthermore, the construction of the first coarse mesh using geometric methods includes:
[0072] Get the connection relationships between nodes;
[0073] The pairing relationship between the primary node and the secondary node is determined based on the connection relationship between the nodes.
[0074] The main node is determined as the first layer of coarse mesh based on the pairing relationship between the main node and the auxiliary node.
[0075] As described above, when constructing the first coarse mesh, unlike the traditional algebraic multigrid algorithm which uses algebraic methods, this algorithm utilizes the correspondence between nodes and employs geometric methods. This makes the mesh more intuitive and easier to understand. Furthermore, it leverages the geometric characteristics of specific problems to accelerate convergence and thus improve the solution speed.
[0076] Furthermore, after constructing the first coarse mesh using geometric methods, the process further includes:
[0077] Use algebraic methods to construct coarse meshes for other layers.
[0078] As can be seen from the above description, coarse meshes in other layers can be constructed using algebraic methods, which is simpler and faster.
[0079] Furthermore, the step of generating the algebraic equations on the first coarse mesh based on the densest mesh and the first coarse mesh according to the relationship between the basis functions of the quadratic finite element and the basis functions of the first finite element includes:
[0080] Generate the densest and coarse-grid linear systems based on Galerkin's principle;
[0081] Determine the relationship between the basis functions of the quadratic finite element method and the basis functions of the linear finite element method;
[0082] Based on the relationship between the basis functions of the quadratic finite element and the basis functions of the linear finite element, and the linear system of the densest mesh and the linear system of the coarse mesh, the algebraic equations on the first layer of coarse mesh are obtained.
[0083] As described above, the relationship between the basis functions of the quadratic finite element method and the basis functions of the linear finite element method can better capture the local characteristics of the solution. Based on the relationship between the basis functions of the quadratic finite element method and the basis functions of the linear system with the densest mesh and the linear system with the coarse mesh, an approximate solution that is closer to the exact solution can be obtained, thus improving the reliability of the calculation results.
[0084] Furthermore, determining the relationship between the basis functions of the quadratic finite element and the basis functions of the linear finite element includes:
[0085] φ c =[IB]φ f =P fc φ f ;
[0086] In the formula, φ c The basis functions of the quadratic finite element method are represented by I, the identity matrix, and B, which represents the matrix used to show the adjacency relationship between primary and secondary nodes. f Let P represent the basis functions of a linear finite element method. fcThis represents the constraint matrix between the densest grid and the first layer of coarse grids;
[0087] The linear systems that generate the densest and coarse grids based on Galerkin's principle include:
[0088] <Lu f φ fj >= <f,φ fj >, A f u f =b f ;
[0089] <Lu c φ ci >= <f,φ ci >, A c u c =b c ;
[0090] In the formula, L represents the linear operator of the partial differential equation, u f u represents the vector to be solved for the densest grid. c φ represents the vector to be solved in the coarse mesh. fj Let φ represent the basis function of the j-th quadratic finite element. ci Let represent the basis functions of the i-th linear finite element. <Lu c φ ci > represents the inner product of the linear operator of the partial differential equation applied to the vector to be solved in the coarse mesh and the basis functions of the i-th first-order finite element, and f represents the right-hand side term of the partial differential equation. <f,φ ci > represents the inner product of the right-hand side term of the partial differential equation and the basis functions of the i-th linear finite element, A f Let A represent the stiffness matrix on the densest grid. c b represents the stiffness matrix on the coarse mesh. c Let b represent the first known vector. f Represents the second known vector;
[0091] The process of obtaining the algebraic equations on the first coarse mesh based on the relationship between the basis functions of the quadratic finite element and the basis functions of the first finite element, the linear system of the densest mesh, and the linear system of the coarse mesh includes:
[0092]
[0093] b c =P fc b f ;
[0094] In the formula, This represents the interpolation matrix between the densest grid and the first layer of coarse grid.
[0095] As described above, the algebraic equations on the first coarse grid usually have fewer unknowns and a simpler structure, so the computational cost required to solve them is relatively small. Subsequently, using the traditional algebraic multigrid algorithm to solve the algebraic equations on the first coarse grid instead of the original algebraic equations can significantly reduce the total computation time of the multigrid algorithm, thereby improving computational efficiency, reducing computational cost, and obtaining approximate solutions faster.
[0096] Please refer to Figure 2 Another embodiment of the present invention provides an electric field simulation calculation device based on multigrids, comprising:
[0097] The boundary condition determination module is used to obtain the Poisson equation for the electric field simulation and determine the boundary conditions corresponding to the Poisson equation for the electric field simulation.
[0098] The mesh construction module is used to construct the first coarse mesh using geometric methods and the densest mesh using algebraic methods.
[0099] An algebraic equation generation module is used to generate algebraic equations on the first coarse mesh based on the densest mesh and the first coarse mesh, according to the relationship between the basis functions of the quadratic finite element and the basis functions of the first finite element.
[0100] The solver module is used to solve the algebraic equations on the first coarse grid layer based on the boundary conditions using an algebraic multigrid algorithm to obtain the electric field simulation results.
[0101] As can be seen from the above description, the beneficial effects of the present invention are as follows: The Poisson equation for electric field simulation is obtained, and its corresponding boundary conditions are determined. A first coarse mesh is constructed using geometric methods, and a densest mesh is constructed using algebraic methods. Based on the densest mesh and the first coarse mesh, an algebraic equation on the first coarse mesh is generated according to the relationship between the basis functions of the quadratic finite element method and the basis functions of the linear finite element method. Based on the boundary conditions, an algebraic multigrid algorithm is used to solve the algebraic equation on the first coarse mesh. Thus, the P-type algebraic multigrid algorithm is used to solve the Poisson equation. This not only utilizes algebraic equation information but also leverages additional geometric information, enabling the extraction of all useful information contained in the initial physical problem. This accelerates the convergence of the algebraic multigrid algorithm, speeds up the solution process, and effectively improves computational efficiency.
[0102] Furthermore, the mesh construction module is specifically used for:
[0103] Get the connection relationships between nodes;
[0104] The pairing relationship between the primary node and the secondary node is determined based on the connection relationship between the nodes.
[0105] The main node is determined as the first layer of coarse mesh based on the pairing relationship between the main node and the auxiliary node.
[0106] As described above, when constructing the first coarse mesh, unlike the traditional algebraic multigrid algorithm which uses algebraic methods, this algorithm utilizes the correspondence between nodes and employs geometric methods. This makes the mesh more intuitive and easier to understand. Furthermore, it leverages the geometric characteristics of specific problems to accelerate convergence and thus improve the solution speed.
[0107] Furthermore, the mesh construction module is also used to construct other layers of coarse meshes using algebraic methods.
[0108] As can be seen from the above description, coarse meshes in other layers can be constructed using algebraic methods, which is simpler and faster.
[0109] Furthermore, the algebraic equation generation module is specifically used for:
[0110] Generate the densest and coarse-grid linear systems based on Galerkin's principle;
[0111] Determine the relationship between the basis functions of the quadratic finite element method and the basis functions of the linear finite element method;
[0112] Based on the relationship between the basis functions of the quadratic finite element and the basis functions of the linear finite element, and the linear system of the densest mesh and the linear system of the coarse mesh, the algebraic equations on the first layer of coarse mesh are obtained.
[0113] As described above, the relationship between the basis functions of the quadratic finite element method and the basis functions of the linear finite element method can better capture the local characteristics of the solution. Based on the relationship between the basis functions of the quadratic finite element method and the basis functions of the linear system with the densest mesh and the linear system with the coarse mesh, an approximate solution that is closer to the exact solution can be obtained, thus improving the reliability of the calculation results.
[0114] Furthermore, in the algebraic equation generation module, determining the relationship between the basis functions of the quadratic finite element and the basis functions of the linear finite element includes:
[0115] φ c =[IB]φ f =P fc φ f ;
[0116] In the formula, φ c The basis functions of the quadratic finite element method are represented by I, the identity matrix, and B, which represents the matrix used to show the adjacency relationship between primary and secondary nodes. f Let P represent the basis functions of a linear finite element method. fcThis represents the constraint matrix between the densest grid and the first layer of coarse grids;
[0117] In the algebraic equation generation module, the generation of the densest-grid linear system and the coarse-grid linear system based on Galerkin's principle includes:
[0118] <Lu f φ fj >= <f,φ fj >, A f u f =b f ;
[0119] <Lu c φ ci >= <f,φ ci >, A c u c =b c ;
[0120] In the formula, L represents the linear operator of the partial differential equation, u f u represents the vector to be solved for the densest grid. c φ represents the vector to be solved in the coarse mesh. fj Let φ represent the basis function of the j-th quadratic finite element. ci Let represent the basis functions of the i-th linear finite element. <Lu c ,φ ci > represents the inner product of the linear operator of the partial differential equation applied to the vector to be solved in the coarse mesh and the basis functions of the i-th first-order finite element, and f represents the right-hand side term of the partial differential equation. <f,φ ci > represents the inner product of the right-hand side term of the partial differential equation and the basis functions of the i-th linear finite element, A f Let A represent the stiffness matrix on the densest grid. c b represents the stiffness matrix on the coarse mesh. c Let b represent the first known vector. f Represents the second known vector;
[0121] In the algebraic equation generation module, obtaining the algebraic equations on the first coarse mesh based on the relationship between the basis functions of the quadratic finite element and the basis functions of the linear finite element, the linear system of the densest mesh, and the linear system of the coarse mesh includes:
[0122]
[0123] b c =P fc b f ;
[0124] In the formula, This represents the interpolation matrix between the densest grid and the first layer of coarse grid.
[0125] As described above, the algebraic equations on the first coarse grid usually have fewer unknowns and a simpler structure, so the computational cost required to solve them is relatively small. Subsequently, using the traditional algebraic multigrid algorithm to solve the algebraic equations on the first coarse grid instead of the original algebraic equations can significantly reduce the total computation time of the multigrid algorithm, thereby improving computational efficiency, reducing computational cost, and obtaining approximate solutions faster.
[0126] The electric field simulation calculation method and apparatus based on multigrid described above are applicable to electric field simulation scenarios of cable joints, Poisson problems in needle-plate discharge gaps, or electrostatic field simulation scenarios of coaxial cables, etc. The following detailed embodiments illustrate these methods:
[0127] Please refer to Figure 1 , Figures 3-5 Embodiment 1 of the present invention is as follows:
[0128] A method for electric field simulation calculation based on multigrids includes the following steps:
[0129] S1. Obtain the Poisson equation for the electric field simulation and determine the boundary conditions corresponding to the Poisson equation for the electric field simulation.
[0130] S2. Construct the first coarse mesh using geometric methods, and construct the densest mesh using algebraic methods, specifically including S21-S25:
[0131] S21. Obtain the connection relationships between nodes.
[0132] S22. Determine the pairing relationship between the primary node and the secondary node based on the connection relationship between the nodes.
[0133] S23. Based on the pairing relationship between the main node and the auxiliary node, the main node is determined as the first layer of coarse mesh, such as... Figure 3 As shown.
[0134] S24. Construct coarse meshes for other layers using algebraic methods.
[0135] S25. Construct the densest grid using algebraic methods.
[0136] From the perspective of finite element method, the densest mesh contains all the nodes of a quadratic finite element method, while the first layer of mesh contains the nodes of a linear finite element method. Figure 3 In this context, the vertices of a triangular unit are the master nodes, and the other nodes are auxiliary nodes. Dirichlet nodes on the boundary do not need to be considered. An auxiliary node directly adjacent to a master node is a neighbor node of the master node. For example, an auxiliary node inside the dashed line becomes a neighbor node of node O.
[0137] S3. Based on the densest grid and the first layer of coarse grid, generate algebraic equations on the first layer of coarse grid according to the relationship between the basis functions of the quadratic finite element and the basis functions of the linear finite element, i.e., the constraint and interpolation process, specifically including S31-S33:
[0138] Consider the problem Lu = f, and solve the numerical values on the coarse grid as u. c =Σ i a ci φ ci Write u on the fine mesh f =∑ j a fj φ fj a ci The element a represents the stiffness matrix on the coarse mesh. fj Let represent the elements of the stiffness matrix on the densest mesh. Then, according to Galerkin's principle, the linear system with a coarse mesh is generated as follows:
[0139] S31. Based on Galerkin's principle, generate the densest and coarseest linear mesh systems, specifically:
[0140] <Lu f φ fj >= <f,φ fj >, A f u f =b f ;
[0141] <Lu c φ ci >= <f,φ ci >, A c u c =b c ;
[0142] In the formula, L represents the linear operator of the partial differential equation, u f u represents the vector to be solved for the densest grid. c φ represents the vector to be solved in the coarse mesh. fj Let φ represent the basis function of the j-th quadratic finite element. ci Let represent the basis functions of the i-th linear finite element. <Lu c φ ci > represents the inner product of the linear operator of the partial differential equation applied to the vector to be solved in the coarse mesh and the basis functions of the i-th first-order finite element, and f represents the right-hand side term of the partial differential equation. <f,φ ci > represents the inner product of the right-hand side term of the partial differential equation and the basis functions of the i-th linear finite element, A f Let A represent the stiffness matrix on the densest grid. cb represents the stiffness matrix on the coarse mesh. c Let b represent the first known vector. f Represents the second known vector;
[0143] S32. Determine the relationship between the basis functions of the quadratic finite element method and the basis functions of the linear finite element method, specifically as follows:
[0144] φ c =[IB]φ f =P fc φ f ;
[0145] In the formula, φ c The basis functions of the quadratic finite element method are represented by I, the identity matrix, and B, which represents the matrix used to show the adjacency relationship between primary and secondary nodes. f Let P represent the basis functions of a linear finite element method. fc This represents the constraint matrix between the densest grid and the first layer of coarse grids;
[0146] Among them, the elements of matrix B
[0147] In one optional implementation, the generation process of the basis functions specifically includes the following (1)-(4):
[0148] (1) Determine the first basis function corresponding to each node in the local coordinate system within the first coarse mesh layer. The first basis function is a linear element, such as... Figure 4 As shown, Figure 4 Taking node A as an example, specifically:
[0149] N Ac =1-ξ-η;
[0150] In the formula, N Ac Let ξ represent the first basis function corresponding to node A in the local coordinate system within the first coarse mesh layer, where ξ represents the abscissa in the mesh coordinate system and η represents the ordinate in the mesh coordinate system.
[0151] (2) The second basis function corresponding to each node in the first coarse grid layer on the densest grid, wherein the second basis function is a two-dimensional function, specifically:
[0152] N Af = (1-ξ-η)(1-2ξ-2η);
[0153] In the formula, N Af This represents the second basis function corresponding to node A on the densest grid.
[0154] (3) Determine the neighboring nodes adjacent to each node in the first coarse mesh layer, and determine the third basis function corresponding to the neighboring nodes in the local coordinate system, specifically:
[0155] N Ef =4ξ(1-ξ-η);
[0156] N Gf =4η(1-ξ-η);
[0157] In the formula, N Ef N represents the third basis function corresponding to the neighboring node E in the local coordinate system within the first coarse mesh layer. Gf This represents the third basis function corresponding to the neighboring node G in the local coordinate system within the first coarse mesh layer.
[0158] (4) Integrate the first basis function, the second basis function, and the third basis function to obtain the fourth basis function corresponding to each node in the local coordinate system in the first coarse mesh layer, specifically:
[0159]
[0160] In the formula, N Ac ′ represents the fourth basis function corresponding to node A in the local coordinate system in the first coarse mesh layer.
[0161] S33. Based on the relationship between the basis functions of the quadratic finite element and the basis functions of the linear finite element, and the linear system of the densest mesh and the linear system of the coarse mesh, the algebraic equations on the first layer of coarse mesh are obtained, specifically:
[0162]
[0163] b c =P fc b f ;
[0164] In the formula, This represents the interpolation matrix between the densest grid and the first layer of coarse grids, i.e. Therefore, the algebraic equations on the first coarse mesh will be exactly the algebraic equations generated by the linear finite element method.
[0165] S4. Based on the boundary conditions, the algebraic multigrid algorithm is used to solve the algebraic equations on the first coarse grid to obtain the electric field simulation results.
[0166] The algebraic multigrid algorithm used for solving the problem is the existing algebraic multigrid algorithm.
[0167] The solution process specifically includes:
[0168] (1) The algebraic equations on the first coarse mesh are pre-smoothed using (symmetric) Gauss-Seidel iteration to obtain the corrected equation A. c e = P fc (bA f x k In the formula, x k Let e represent the estimated value of the numerical solution at the current iteration step, e represent the residual vector, and b represent the corrected value. c .
[0169] (2) Solve the modified equations using appropriate allowable residuals and traditional algebraic multigrid algorithms.
[0170] (3) Interpolation: x k+1 =x k +P cf e.
[0171] (4) Use (symmetric) Gauss-Seidel iteration to perform a post-smoothing process, solve the problem, and obtain the electric field simulation results.
[0172] In one optional implementation, the P-type multigrid algorithm of the present invention can be used as a standalone iterative algorithm, that is, it is iterated repeatedly until the solution achieves the required accuracy. In another optional implementation, the algebraic multigrid algorithm can also be used as a preprocessing step for the Krylov subspace algorithm. For positive definite matrices, the Flexible Conjugate Gradient (FCG) algorithm can be used as the outermost iterative algorithm, and for asymmetric matrices, algorithms such as GMRES can be tried.
[0173] The method described above in this invention will be applied to specific calculation examples below:
[0174] Poisson problems solved by simulating electric fields, such as Figure 5 As shown, due to the characteristics of this problem, the mesh also needs to vary drastically. In some places near the boundary of the computational domain, the mesh will be very fine, while in other places, the mesh will be very large. Therefore, the Poisson equation needs to be solved tens of thousands of times during the entire simulation process, and an efficient solver needs to be developed.
[0175] This simulation used different methods for efficiency comparison, including: the standard conjugate gradient method (CG), the conjugate gradient method with incomplete Jolesi decomposition preprocessing (ICCG), the geometric multigrid algorithm (GMG-2), the algebraic multigrid algorithm based on aggregation and accelerated by FGC (AGMG), and the method proposed in this invention (GAMG). Since it is difficult to construct multiple coarse meshes geometrically on unstructured meshes, only two-layer geometric multigrids were tested here. The solution time was calculated by averaging multiple solutions. The final simulation results are shown in Table 1 below. Due to the slow solution speed and long time of GMG-2, larger-scale problems were not tested.
[0176] Table 1. Average solution time (in seconds) for different methods
[0177] 3518 0.117 0.377 0.0306 0.0282 0.0204 14845 1.48 0.4 50.9 0.155 0.109 57862 18.2 3.72 ** 0.793 0.494 231407 254 45.5 ** 3.85 2.68
[0178] As shown in Table 1, GMG-2 not only lacks advantages on unstructured meshes but is also highly inefficient. The main reason for this inefficiency is that GMG-2 cannot effectively construct a sufficient number of coarse meshes using geometric methods. It must use direct algorithms to calculate large-scale algebraic equation systems. From a computational time perspective, algebraic multigrid algorithms are much faster than CG and ICCG, and the speed advantage of algebraic multigrid becomes more pronounced as the number of variables increases. Among these algorithms, the GAMG algorithm proposed in this invention is the fastest, requiring only about 60%-70% of the solution time of the AGMG algorithm. This is mainly due to two reasons: first, linear finite element method is a good preprocessing method for quadratic finite element method; second, compared with traditional algebraic multigrid algorithms, this invention uses interpolation and constraint operators between the first coarse mesh and the densest mesh to have more geometric features, better reflecting the physical characteristics of the problem, and thus is more accurate and faster.
[0179] Please refer to Figure 2 Embodiment two of the present invention is as follows:
[0180] A multi-grid-based electric field simulation calculation device includes:
[0181] The boundary condition determination module is used to obtain the Poisson equation for the electric field simulation and determine the boundary conditions corresponding to the Poisson equation for the electric field simulation.
[0182] The mesh construction module is used to construct the first coarse mesh using geometric methods and the densest mesh using algebraic methods.
[0183] An algebraic equation generation module is used to generate algebraic equations on the first coarse mesh based on the densest mesh and the first coarse mesh, according to the relationship between the basis functions of the quadratic finite element and the basis functions of the first finite element.
[0184] The solver module is used to solve the algebraic equations on the first coarse grid layer based on the boundary conditions using an algebraic multigrid algorithm to obtain the electric field simulation results.
[0185] Furthermore, the coarse mesh construction module is specifically used for:
[0186] Get the connection relationships between nodes;
[0187] The pairing relationship between the primary node and the secondary node is determined based on the connection relationship between the nodes.
[0188] The main node is determined as the first layer of coarse mesh based on the pairing relationship between the main node and the auxiliary node.
[0189] Furthermore, the mesh construction module is also used to construct other layers of coarse meshes using algebraic methods.
[0190] Furthermore, the algebraic equation generation module is specifically used for:
[0191] Generate the densest and coarse-grid linear systems based on Galerkin's principle;
[0192] Determine the relationship between the basis functions of the quadratic finite element method and the basis functions of the linear finite element method;
[0193] Based on the relationship between the basis functions of the quadratic finite element and the basis functions of the linear finite element, and the linear system of the densest mesh and the linear system of the coarse mesh, the algebraic equations on the first layer of coarse mesh are obtained.
[0194] Furthermore, in the algebraic equation generation module, determining the relationship between the basis functions of the quadratic finite element and the basis functions of the linear finite element includes:
[0195] φ c =[IB]φ f =P fc φ f ;
[0196] In the formula, φ c The basis functions of the quadratic finite element method are represented by I, the identity matrix, and B, which represents the matrix used to show the adjacency relationship between primary and secondary nodes. f Let P represent the basis functions of a linear finite element method. fc This represents the constraint matrix between the densest grid and the first layer of coarse grids;
[0197] In the algebraic equation generation module, the generation of the densest-grid linear system and the coarse-grid linear system based on Galerkin's principle includes:
[0198] <Lu f φfj >= <f,φ fj >, A f u f =b f ;
[0199] <Lu c φ ci >= <f,φ ci >, A c u c =b c ;
[0200] In the formula, L represents the linear operator of the partial differential equation, u f u represents the vector to be solved for the densest grid. c φ represents the vector to be solved in the coarse mesh. fj Let φ represent the basis function of the j-th quadratic finite element. ci Let represent the basis functions of the i-th linear finite element. <Lu c φ ci > represents the inner product of the linear operator of the partial differential equation applied to the vector to be solved in the coarse mesh and the basis functions of the i-th first-order finite element, and f represents the right-hand side term of the partial differential equation. <f,φ ci > represents the inner product of the right-hand side term of the partial differential equation and the basis functions of the i-th linear finite element, A f Let A represent the stiffness matrix on the densest grid. c b represents the stiffness matrix on the coarse mesh. c Let b represent the first known vector. f Represents the second known vector;
[0201] In the algebraic equation generation module, obtaining the algebraic equations on the first coarse mesh based on the relationship between the basis functions of the quadratic finite element and the basis functions of the linear finite element, the linear system of the densest mesh, and the linear system of the coarse mesh includes:
[0202]
[0203] b c =P fc b f ;
[0204] In the formula, This represents the interpolation matrix between the densest grid and the first layer of coarse grid.
[0205] In summary, the present invention provides a multigrid-based electric field simulation calculation method and apparatus. It obtains the Poisson equation for electric field simulation and determines its corresponding boundary conditions. A first coarse grid is constructed using geometric methods, and a densest grid is constructed using algebraic methods. Based on the densest grid and the first coarse grid, algebraic equations on the first coarse grid are generated according to the relationship between the basis functions of the quadratic finite element method and the first finite element method. Based on the boundary conditions, an algebraic multigrid algorithm is used to solve the algebraic equations on the first coarse grid. The P-type algebraic multigrid algorithm is then used to solve the Poisson equation. This approach not only utilizes algebraic equation information but also leverages additional geometric information, enabling the extraction of all useful information contained in the initial physical problem. This accelerates the convergence of the algebraic multigrid algorithm and the solution speed, thereby effectively improving computational efficiency. Furthermore, unlike traditional algebraic multigrid algorithms that use algebraic methods, the construction of the first coarse grid utilizes the correspondence between nodes and is accomplished through geometric methods. This makes the grid more intuitive and easier to understand, and it also leverages the geometric characteristics of specific problems, accelerating the convergence speed and thus improving the solution speed.
[0206] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. The solutions in the embodiments of this application can be implemented in various computer languages, such as the object-oriented programming language Java and the interpreted scripting language JavaScript.
[0207] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0208] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0209] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0210] Although preferred embodiments of this application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application.
[0211] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. A method for simulating electric fields based on multigrids, characterized in that, Including the following steps: Obtain the Poisson equation for the electric field simulation and determine the boundary conditions corresponding to the Poisson equation for the electric field simulation. The first coarse mesh is constructed using geometric methods, and the densest mesh is constructed using algebraic methods. Based on the densest grid and the first coarse grid, algebraic equations on the first coarse grid are generated according to the relationship between the basis functions of the quadratic finite element and the basis functions of the first finite element. Based on the boundary conditions, the algebraic multigrid algorithm is used to solve the algebraic equations on the first coarse grid to obtain the electric field simulation results. The generation of algebraic equations on the first coarse mesh based on the densest mesh and the first layer of coarse mesh, according to the relationship between the basis functions of the quadratic finite element and the basis functions of the first finite element, includes: Generate the densest and coarse-grid linear systems based on Galerkin's principle; Determine the relationship between the basis functions of the quadratic finite element method and the basis functions of the linear finite element method; Based on the relationship between the basis functions of the quadratic finite element and the basis functions of the linear finite element, the linear system of the densest mesh and the linear system of the coarse mesh, the algebraic equations on the first layer of coarse mesh are obtained. The determination of the relationship between the basis functions of the quadratic finite element and the basis functions of the linear finite element includes: ; In the formula, Let I represent the basis functions of a linear finite element method, I represent the identity matrix, and B represent the matrix used to show the adjacency relationship between primary and secondary nodes. Describes the basis functions of a quadratic finite element. This represents the constraint matrix between the densest grid and the first layer of coarse grids; The linear systems that generate the densest and coarse grids based on Galerkin's principle include: ; ; In the formula, L represents the linear operator of the partial differential equation, u f u represents the vector to be solved for the densest grid. c The vector to be solved for the coarse mesh. Let represent the basis functions of the j-th quadratic finite element. Let represent the basis functions of the i-th linear finite element. Let f represent the inner product of the linear operator of the partial differential equation applied to the vector to be solved in the coarse mesh and the basis functions of the i-th first-order finite element, and let f represent the right-hand side term of the partial differential equation. Let represent the inner product of the right-hand side term of the partial differential equation and the basis functions of the i-th linear finite element. Let A represent the stiffness matrix on the densest grid. c b represents the stiffness matrix on the coarse mesh. c Let b represent the first known vector. f Represents the second known vector; The process of obtaining the algebraic equations on the first coarse mesh based on the relationship between the basis functions of the quadratic finite element and the basis functions of the first finite element, the linear system of the densest mesh, and the linear system of the coarse mesh includes: ; ; In the formula, This represents the interpolation matrix between the densest grid and the first layer of coarse grid.
2. The electric field simulation calculation method based on multigrids according to claim 1, characterized in that, The construction of the first coarse mesh using geometric methods includes: Get the connection relationships between nodes; The pairing relationship between the primary node and the secondary node is determined based on the connection relationship between the nodes. The main node is determined as the first layer of coarse mesh based on the pairing relationship between the main node and the auxiliary node.
3. The electric field simulation calculation method based on multigrids according to claim 1, characterized in that, After constructing the first coarse mesh using geometric methods, the process also includes: Use algebraic methods to construct coarse meshes for other layers.
4. A multi-grid-based electric field simulation calculation device, characterized in that, include: The boundary condition determination module is used to obtain the Poisson equation for the electric field simulation and determine the boundary conditions corresponding to the Poisson equation for the electric field simulation. The mesh construction module is used to construct the first coarse mesh using geometric methods and the densest mesh using algebraic methods. An algebraic equation generation module is used to generate algebraic equations on the first coarse mesh based on the densest mesh and the first coarse mesh, according to the relationship between the basis functions of the quadratic finite element and the basis functions of the first finite element. The solver module is used to solve the algebraic equations on the first coarse grid layer based on the boundary conditions using an algebraic multigrid algorithm to obtain the electric field simulation results. The algebraic equation generation module is specifically used for: Generate the densest and coarse-grid linear systems based on Galerkin's principle; Determine the relationship between the basis functions of the quadratic finite element method and the basis functions of the linear finite element method; Based on the relationship between the basis functions of the quadratic finite element and the basis functions of the linear finite element, the linear system of the densest mesh and the linear system of the coarse mesh, the algebraic equations on the first layer of coarse mesh are obtained. In the algebraic equation generation module, determining the relationship between the basis functions of the quadratic finite element and the basis functions of the linear finite element includes: ; In the formula, Let I represent the basis functions of a linear finite element method, I represent the identity matrix, and B represent the matrix used to show the adjacency relationship between primary and secondary nodes. Describes the basis functions of a quadratic finite element. This represents the constraint matrix between the densest grid and the first layer of coarse grids; In the algebraic equation generation module, the generation of the densest-grid linear system and the coarse-grid linear system based on Galerkin's principle includes: ; ; In the formula, L represents the linear operator of the partial differential equation, u f u represents the vector to be solved for the densest grid. c The vector to be solved for the coarse mesh. Let represent the basis functions of the j-th quadratic finite element. Let represent the basis functions of the i-th linear finite element. Let f represent the inner product of the linear operator of the partial differential equation applied to the vector to be solved in the coarse mesh and the basis functions of the i-th first-order finite element, and let f represent the right-hand side term of the partial differential equation. Let represent the inner product of the right-hand side term of the partial differential equation and the basis functions of the i-th linear finite element. Let A represent the stiffness matrix on the densest grid. c b represents the stiffness matrix on the coarse mesh. c Let b represent the first known vector. f Represents the second known vector; In the algebraic equation generation module, obtaining the algebraic equations on the first coarse mesh based on the relationship between the basis functions of the quadratic finite element and the basis functions of the linear finite element, the linear system of the densest mesh, and the linear system of the coarse mesh includes: ; ; In the formula, This represents the interpolation matrix between the densest grid and the first layer of coarse grid.
5. The electric field simulation calculation device based on multigrids according to claim 4, characterized in that, The mesh construction module is specifically used for: Get the connection relationships between nodes; The pairing relationship between the primary node and the secondary node is determined based on the connection relationship between the nodes. The main node is determined as the first layer of coarse mesh based on the pairing relationship between the main node and the auxiliary node.
6. The electric field simulation calculation device based on multigrids according to claim 4, characterized in that, The mesh construction module is also used to construct other layers of coarse meshes using algebraic methods.
Citation Information
Patent Citations
Multi-grid precondition method for fast acquiring complex target radar echoes
CN103279612A
Semiconductor multi-physical effect simulation method based on hybrid discontinuous finite element
CN115017757A