Numerical solution method, device and equipment for engineering practical problem and medium
By decoupling independent variables and blocking solutions of Jacobian matrix, the problem of high complexity of independent variables in computer-aided engineering mechanics simulation software is solved, and the calculation speed and performance are improved.
Patent Information
- Application Number
- CN202510434340.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-08
- Publication Date
- 2025-07-22
AI Technical Summary
When solving nonlinear algebraic equations, existing computer-aided engineering mechanics simulation software has high complexity and low efficiency in calculation, especially in high dimensional cases, which is limited in calculation speed.
By decoupling independent variables, a directed graph of dependency between independent variables is generated, a strongly connected domain analysis is performed, coupling terms are generated, and a Jacobian matrix is generated based on the coupling terms for blocking solutions.
It significantly improves the computing speed and solver performance, especially in complex engineering models, reduces the computational complexity and improves numerical stability.
Smart Images

Figure CN120354597A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of computer-aided engineering, and particularly relates to a numerical solution method, device, equipment and medium for engineering practical problems. Background Art
[0002] Computer-aided engineering mechanics simulation software, as one of the cornerstones of modern industry, is widely used in many fields such as vehicle design and manufacturing, robotics, aerospace, etc. Its functions include design verification, virtual simulation, parameter optimization, working condition analysis, etc. The core function of computer-aided engineering mechanics simulation software is to solve ordinary differential equations, partial differential equations, differential-algebraic equations, non-linear algebraic equations, etc. obtained by modeling various engineering practical problems. After numerical discretization, these equations are ultimately transformed into non-linear algebraic equations and solved using iterative methods.
[0003] The process of solving non-linear algebraic equations by the iterative method includes two main parts that account for the main computational effort: generating the Jacobian matrix and solving the system of linear algebraic equations. The computational complexity of these processes grows cubically with the number of coupled independent variables. The independent variables include physical variables and mathematical variables. The former is related to the engineering problem to be solved itself and is generally fully coupled. The latter is related to functions such as control and analysis, and there are complex dependencies between the former and itself but is generally not fully coupled. In actual calculations, the dimension of the latter is often very high. If the matrix generation and operation are carried out without optimization, the calculation speed of the solver will be greatly reduced.
[0004] At present, there are few numerical solvers developed in China for general mechanics simulation. Generally, they are mostly small-scale specialized programs developed by universities and research institutes for research purposes or specific projects, etc., so the optimization problem is rarely considered. The existing optimization methods generally have two main routes: preprocessing and computational technology. The former relies on reducing the degrees of freedom / modal reduction at the modeling level. If handled properly, it can significantly reduce the computational complexity. The disadvantage is that it can only solve specific problems specifically, without universality, and the reduction process inevitably brings the problem of accuracy degradation, making it difficult to be used in commercial computer-aided engineering mechanics software. The latter generally uses iterative methods such as conjugate gradient, generalized minimal residual, etc. to reduce the computational cost, or uses methods such as parallel computing to improve the efficiency, but there are also problems such as decreased numerical stability and lack of universality. Summary of the Invention
[0005] The purpose of the present invention is to provide a numerical solution method, device, equipment and medium for engineering practical problems. By decoupling the independent variables involved in the calculation and dividing them into independent subsets for processing, the technical problems of high computational complexity and low efficiency in solving independent variables in the prior art are solved.
[0006] To solve the above technical problems, the present invention is implemented through the following technical solutions:
[0007] The present invention provides a numerical solution method for engineering practical problems, which includes:
[0008] According to the physical characteristics of the engineering practical problem and the applied control, to obtain the independent variables to be solved;
[0009] Analyze the dependency relationships among the independent variables to be solved to generate a directed graph of the dependency relationships among the independent variables;
[0010] Perform a strongly connected component analysis on the directed graph to generate the coupling terms of the independent variables in the directed graph;
[0011] Generate a Jacobian matrix according to the coupling terms and block the Jacobian matrix to solve the numerical values of the independent variables.
[0012] In an embodiment of the present invention, the step of obtaining the independent variables to be solved according to the physical characteristics of the engineering practical problem and the applied control includes:
[0013] According to the physical characteristics of the engineering practical problem and the applied control, generate the algebraic equation of the engineering practical problem;
[0014] According to the algebraic equation, obtain the independent variables to be solved.
[0015] In an embodiment of the present invention, the step of performing a strongly connected component analysis on the directed graph to generate the coupling terms of the independent variables in the directed graph includes:
[0016] Perform a strongly connected component analysis on the directed graph to generate the strongly connected components of the directed graph;
[0017] According to the strongly connected components, determine the coupling terms of the independent variables in the directed graph.
[0018] In an embodiment of the present invention, the step of performing a strongly connected component analysis on the directed graph to generate the strongly connected components of the directed graph includes:
[0019] Initialize the independent variable nodes in the directed graph and the timestamp of the depth-first search;
[0020] Select any unvisited independent variable node in the directed graph to start the depth-first search until all the independent variable nodes in the directed graph are traversed;
[0021] Judge and output the strongly connected components of the directed graph.
[0022] In one embodiment of the present invention, the process of starting a depth-first search from any unvisited independent variable node in the directed graph until all the independent variable nodes in the directed graph are traversed includes:
[0023] Select any unvisited independent variable node in the directed graph and start a depth-first search using pre-order traversal until all the independent variable nodes in the directed graph are traversed;
[0024] Among them, the pre-order traversal is to visit the current independent variable node first and then recursively visit the adjacent independent variable nodes.
[0025] In one embodiment of the present invention, the process of generating a Jacobian matrix based on the coupling terms and partitioning the Jacobian matrix to solve for the values of the independent variables includes:
[0026] Generate corresponding local Jacobian matrices according to each of the coupling terms;
[0027] Combine the local Jacobian matrices according to the interactions between the coupling terms to generate a global Jacobian matrix;
[0028] Partition the global Jacobian matrix and solve for the values of the independent variables according to the partitioned Jacobian matrix.
[0029] In one embodiment of the present invention, the process of partitioning the global Jacobian matrix and solving for the values of the independent variables according to the partitioned Jacobian matrix includes:
[0030] Partition the global Jacobian matrix and solve for the values of the independent variables using a direct method or an iterative method according to the partitioned Jacobian matrix.
[0031] Based on the same inventive concept, another embodiment of the present invention further provides a numerical solution device for engineering practical problems, characterized in that the device includes:
[0032] An acquisition module, configured to obtain the independent variables to be solved according to the physical characteristics of the engineering practical problem and the applied control;
[0033] An analysis module, configured to analyze the dependency relationships between the independent variables to be solved, generate a directed graph of the dependency relationships between the independent variables, perform a strongly connected component analysis on the directed graph to generate the coupling terms of the independent variables in the directed graph;
[0034] A processing module, configured to generate a Jacobian matrix according to the coupling terms and partition the Jacobian matrix to solve for the values of the independent variables.
[0035] Based on the same inventive concept, another embodiment of the present invention further provides an electronic device, which includes:
[0036] One or more processors;
[0037] A storage device for storing one or more programs, which when executed by the one or more processors, cause the electronic device to implement the numerical solution method for engineering practical problems described in any one of the above.
[0038] Based on the same inventive concept, another embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, which when executed by a processor of a computer, causes the computer to execute the numerical solution method for engineering practical problems described in any one of the above.
[0039] As described above, the present invention provides a numerical solution method for engineering practical problems, which has the following beneficial effects: By performing strongly connected component analysis on a directed graph to generate the coupling terms of independent variables in the directed graph, decoupling the independent variables participating in the calculation, and generating a Jacobian matrix according to the coupling terms and partitioning the Jacobian matrix, so as to divide the independent variables participating in the calculation into multiple independent subsets for processing to solve the values of the independent variables. The numerical solution method for engineering practical problems can greatly improve the calculation speed, optimize the performance of the solver, and is particularly effective under the calculation load with a high degree of engineering models to be solved and complex control and analysis problems. Of course, any product implementing the present invention does not necessarily need to achieve all the above advantages simultaneously. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for describing the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention, and those of ordinary skill in the art can obtain other drawings based on these drawings without creative efforts.
[0041] Figure 1 It is a schematic flowchart of the numerical solution method for engineering practical problems provided by an exemplary embodiment of the present application.
[0042] Figure 2 It is a directed graph of the dependency relationship of independent variables provided by an exemplary embodiment of the present application.
[0043] Figures 3 to 5 It is a schematic diagram of analyzing strongly connected components according to a directed graph provided by an exemplary embodiment of the present application.
[0044] Figure 6Schematic diagram of the sparse structure of the Jacobian matrix of a typical multi-body dynamics system provided by an exemplary embodiment of the present application.
[0045] Figure 7 Schematic diagram of the model of the KC suspension driving simulation condition provided by an exemplary embodiment of the present application.
[0046] Figure 8 Schematic diagram of the model of the KC suspension steering simulation condition provided by an exemplary embodiment of the present application.
[0047] Figure 9 Schematic diagram of the structure of a numerical solution device for engineering practical problems provided by another exemplary embodiment of the present application.
[0048] Figure 10 Schematic diagram of the structure of an electronic device provided by another exemplary embodiment of the present application. Detailed implementation manners
[0049] The following uses specific specific examples to illustrate the implementation manners of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific implementation manners. Various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that, without conflict, the following embodiments and the features in the embodiments can be combined with each other.
[0050] It should be noted that the diagrams provided in the following embodiments only illustrate the basic concept of the present invention in a schematic manner. Therefore, only the components related to the present invention are shown in the diagrams, rather than being drawn according to the number, shape, and size of the components in actual implementation. The type, quantity, and ratio of each component in actual implementation can be an arbitrary change, and the component layout type may also be more complex.
[0051] In the following description, a large number of details are explored to provide a more thorough explanation of the embodiments of the present invention. However, it is obvious to those skilled in the art that the embodiments of the present invention can be implemented without these specific details. In other embodiments, well-known structures and devices are shown in the form of block diagrams rather than in detail to avoid making the embodiments of the present invention difficult to understand.
[0052] To solve the technical problems of high computational complexity and low efficiency in solving independent variables in the prior art, the present invention provides a numerical solution method for engineering practical problems. By decoupling the independent variables involved in the calculation and dividing them into multiple independent subsets for processing, the calculation speed can be significantly improved and the performance of the solver can be optimized. Please refer to Figure 1As shown, the numerical solution method for the actual engineering problem includes the following steps:
[0053] S100: According to the physical characteristics of the actual engineering problem and the applied control, obtain the independent variables to be solved;
[0054] S200: Analyze the dependency relationships among the independent variables to be solved to generate a directed graph of the dependency relationships among the independent variables;
[0055] S300: Perform a strongly connected component analysis on the directed graph to generate the coupling terms of the independent variables in the directed graph;
[0056] S400: Generate a Jacobian matrix based on the coupling terms and partition the Jacobian matrix to solve for the numerical values of the independent variables.
[0057] The steps of the numerical solution method for the actual engineering problem will be elaborated in detail below.
[0058] First, execute step S100, that is, according to the physical characteristics of the actual engineering problem and the applied control, obtain the independent variables to be solved.
[0059] In an exemplary embodiment of the present application, in step S100, according to the physical characteristics of the actual engineering problem and the applied control, obtaining the independent variables to be solved further includes the following steps:
[0060] S101: According to the physical characteristics of the actual engineering problem and the applied control, generate the algebraic equation of the actual engineering problem;
[0061] S102: According to the algebraic equation, obtain the independent variables to be solved.
[0062] Specifically, in the actual engineering problem, it is first necessary to determine the physical characteristics of the actual engineering problem. The physical characteristics include but are not limited to physical quantities, physical laws, system states, and boundary conditions. For example, for the actual engineering problem of vehicle design and manufacturing, the physical characteristics involved include but are not limited to the mass and weight of vehicle components, dynamic characteristics, energy conversion and transfer, and noise and vibration control. In order to achieve a specific goal, it is usually necessary to apply a certain control to the actual engineering problem. The implementation methods of the control include but are not limited to changing the input, adjusting parameters, and feedback control. In this embodiment, according to the physical characteristics of the actual engineering problem and the applied control, the algebraic equation of the actual engineering problem is generated, that is, based on physical laws and principles, the relevant variables involved in the actual engineering problem are transformed into the form of an algebraic equation, and according to the algebraic equation, the independent variables to be solved are obtained. The independent variables include but are not limited to generalized coordinates, Lagrange multipliers, control variables, and mathematical quantities.
[0063] Next, step S200 is executed, that is, the dependency relationship between the independent variables to be solved is analyzed to generate a directed graph of the dependency relationship between the independent variables.
[0064] Specifically, please refer to Figure 2 As shown, the independent variables to be solved are numbered, that is, a unique identification symbol is assigned to each independent variable to be solved, and each independent variable to be solved is drawn as an independent variable node in the directed graph. In this embodiment, the number of the independent variables to be solved is set as X, where X = 1, 2, 3... n, and n is a positive integer. Figure 2 As shown in , each circle represents an independent variable node, and the number in the circle represents the number of the corresponding independent variable. Then, based on physical laws and algebraic equations, the dependency relationship between each independent variable to be solved is determined. If one independent variable can affect another independent variable, there is a dependency relationship between the two independent variables. According to the determined dependency and being-dependent relationships between the independent variables, directed edges are added between the independent variable nodes in the directed graph, and the arrow points to the affected variable. In other words, the arrow points to the variable representing being-dependent. For example, please refer to Figure 2 As shown, the independent variable node 1 in the directed graph points to the independent variable node 2 through a directed edge, indicating that the independent variable node 2 depends on the independent variable node 1. It should be noted that, for the convenience of analyzing and understanding the technical solution of the present application, in this embodiment, the number of independent variable nodes in the directed graph is set to 8. Of course, in other embodiments, the number of independent variable nodes in the directed graph can be other numbers. In addition, the directed graph is stored using an adjacency list.
[0065] Immediately afterwards, step S300 is executed, that is, the strongly connected domain analysis is performed on the directed graph to generate the coupling terms of the independent variables in the directed graph.
[0066] In an exemplary embodiment of the present application, in step S300, the strongly connected domain analysis is performed on the directed graph to generate the coupling terms of the independent variables in the directed graph, which further includes the following steps:
[0067] S310: Perform the strongly connected domain analysis on the directed graph to generate the strongly connected components of the directed graph;
[0068] S320: Determine the coupling terms of the independent variables in the directed graph according to the strongly connected components.
[0069] It should be noted that a graph theory algorithm can be used to perform the strongly connected domain analysis on the directed graph to generate the strongly connected components of the directed graph. The graph theory algorithms include but are not limited to the Kosaraju algorithm and the Tarjan algorithm. The strongly connected component refers to a maximal strongly connected subgraph in the directed graph. Please refer to Figures 3 to 5As shown, for example, the independent variables 7, 8, and 6 in the directed graph form a cycle through the directed edges, that is, a strongly connected component is formed. In this embodiment, the Tarjan algorithm is used to perform strongly connected domain analysis on the directed graph to generate the strongly connected components of the directed graph. Of course, in other embodiments, other equivalent algorithms can also be used to implement the analysis of the strongly connected domain of the directed graph.
[0070] In an exemplary embodiment of the present application, in step S310, performing strongly connected domain analysis on the directed graph to generate the strongly connected components of the directed graph further includes the following steps:
[0071] S311: Initialize the independent variable nodes in the directed graph and the timestamp of the depth-first search;
[0072] S312: Select any unvisited independent variable node in the directed graph to start the depth-first search until all the independent variable nodes in the directed graph are traversed;
[0073] S313: Judge and output the strongly connected components of the directed graph.
[0074] It should be noted that, in an exemplary embodiment of the present application, in step S312, selecting any unvisited independent variable node in the directed graph to start the depth-first search using pre-order traversal until all the independent variable nodes in the directed graph are traversed, where the pre-order traversal is to visit the current independent variable node first and then recursively visit the adjacent independent variable nodes. Of course, in other embodiments, post-order traversal can also be used for depth-first search, and the post-order traversal is to recursively visit the adjacent independent variable nodes first and then visit the current independent variable node.
[0075] Specifically, please refer to Figures 3 to 5 as shown Figures 3 to 5 shows the process of performing strongly connected domain analysis on the directed graph using the Tarjan algorithm.
[0076] Please refer to Figure 3 as shown, initializing the independent variable nodes in the directed graph includes setting the access status of each independent variable node in the directed graph to unvisited. Initializing the timestamp of the depth-first search, establishing a counter C and initializing the counter C = 0. Establish three stacks, including the independent variable superscript stack H, the independent variable subscript stack L, and the temporary storage stack P. It should be noted that the independent variable superscript represents the time point when the current independent variable node is visited in the depth-first search, and the independent variable subscript represents the earliest time point that the current independent variable node can backtrack through the directed edge.
[0077] Select any unvisited independent variable node in the directed graph to start the depth-first search. In this embodiment, select the independent variable node 1 in the directed graph as the starting node (root node) to start the depth-first search using pre-order traversal.
[0078] When traversing to the \(i\)-th independent variable node recorded by the counter, first assign the superscript stack \(H\) of the independent variable i and the subscript stack \(L\) of the independent variable i both with the value of \(i\), and push the number of the currently visited independent variable node onto the temporary storage stack \(P\). i If the currently visited independent variable node still has child nodes and this node has not been traversed, then recursively visit the child nodes until all independent variable nodes in the directed graph have been traversed.
[0079] Please refer to Figure 4 As shown, if there are no unreachable unvisited nodes for the \(i\)-th independent variable node, then update the value of the subscript stack \(L\) of the independent variable i , that is, set the value of the smallest superscript stack \(H\) of the independent variable that this independent variable node can access i as the value of the subscript stack \(L\) of the independent variable i . In other words, set the earliest time point that this independent variable node can trace back through the directed edge as the value of the subscript stack \(L\) of the independent variable i . Taking independent variable node 3 as an example, the earliest time point that independent variable node 3 can trace back through the directed edge is the time point when visiting independent variable node 2. Therefore, update the subscript value of independent variable node 3 to the superscript value of independent variable node 2.
[0080] Please refer to Figure 5 As shown, pop the numbers of the independent variable nodes from the temporary storage stack \(P\) in the last-in, first-out order until the superscript and subscript of the independent variable node corresponding to the popped number of the independent variable node are equal, that is, \(H\) i = \(L\) i . The numbers of these popped independent variable nodes form a strongly connected component. Loop and execute this step until all the numbers of the independent variable nodes in the temporary storage stack \(P\) have been popped, so as to output all the strongly connected components in the directed graph. It should be noted that each strongly connected component constitutes a coupling term of the independent variable. The independent variable nodes in the directed graph are divided into four coupling terms according to the strongly connected components. Among them, independent variable node 1 constitutes coupling term 1, independent variable nodes 3, 4, and 2 constitute coupling term 2, independent variable node 5 constitutes coupling term 3, and independent variable nodes 7, 8, and 6 constitute coupling term 4. Therefore, all the independent variables participating in the calculation are decoupled through the strongly connected domain analysis and are divided into four relatively independent coupling terms.
[0081] Finally, execute step S400, generate the Jacobian matrix according to the coupling terms and block the Jacobian matrix to solve the numerical values of the independent variables.
[0082] In an exemplary embodiment of the present application, in step S400, generating the Jacobian matrix according to the coupling terms and blocking the Jacobian matrix to solve the numerical values of the independent variables further includes the following steps:
[0083] S401: Generate corresponding local Jacobian matrices respectively according to each coupling term;
[0084] S402: Combine the local Jacobian matrices according to the interactions between the coupling terms to generate a global Jacobian matrix;
[0085] S403: Partition the global Jacobian matrix and solve for the numerical values of the independent variables according to the partitioned Jacobian matrix.
[0086] It should be noted that in an exemplary embodiment of the present application, in step S403, the global Jacobian matrix is partitioned, and the numerical values of the independent variables are solved by using a direct method or an iterative method according to the partitioned Jacobian matrix. In this embodiment, according to the coupling situation, the independent variables participating in the calculation are divided into four relatively independent subsets for partitioned solution.
[0087] Specifically, for each coupling term, determine all the independent variables included in this coupling term, write the equation of the coupling term according to these independent variables, take the partial derivative of each independent variable in the coupling term equation with respect to other independent variables, and construct a local Jacobian matrix based on the calculated partial derivatives as the elements of the matrix. Combine the local Jacobian matrices according to the interactions between the coupling terms to generate a global Jacobian matrix. For example, for any differential equation containing control variables and algebraic variables:
[0088]
[0089] where Φ, C, and H are vector functions, t is the time variable, and q = (q d q c q h ) represent differential independent variables, control independent variables, and algebraic independent variables respectively.
[0090] Construct the Jacobian matrix of the differential-algebraic equation:
[0091]
[0092] It should be noted that this Jacobian matrix is only a theoretical expression, and it is often difficult to obtain the analytical forms of the terms in this expression in actual calculations. The common practice of commercial computer-aided engineering mechanics software is to perturb each equation of the differential-algebraic equation system and each element in q, and then use finite differences to calculate the numerical Jacobian. Since the dimension of this matrix is relatively high, the direct full calculation has a large cost. It should be noted that not every element in the vector function C and the vector function H is coupled with every element in q. For example, if it is known that the i-th equation of the vector function C is only related to q j ,q k ,q lFor variable coupling, only the coupled terms need to be calculated in the row calculation of the corresponding Jacobian matrix:
[0093]
[0094] The uncoupled terms can be directly set to 0, which greatly reduces the computational amount.
[0095] When solving a system of linear algebraic equations, the global Jacobian matrix is block-partitioned, and the direct method or iterative method is used to solve the numerical values of the independent variables according to the block-partitioned Jacobian matrix. In this embodiment, the sparse matrix algorithm and the block LU decomposition algorithm are used to solve the numerical values of the independent variables. It should be noted that there may be different implementation manners in the specific generation of the Jacobian matrix and the block-partitioned solution. For example, the iterative method can be used instead of the block LU decomposition algorithm during the block-partitioned solution, etc.
[0096] After generating the Jacobian matrix, if
[0097]
[0098] Then the iterative process makes
[0099] Δq = -J -1 R
[0100] q ← q + Δq
[0101] This process ends until the modulus of R is less than the preset value. Please refer to Figure 6 as shown, Figure 6 shows the sparse structure of a typical multi-body dynamics Jacobian matrix. It can be seen that it can be solved using algorithms such as ILU + GMRES and block matrix algorithms such as BlockLU, BlockILU + PCG, etc.
[0102] Please refer to Figure 7 as shown, Figure 7 shows the model schematic diagram of the KC suspension driving simulation condition. When using the solver in the prior art to solve this condition, the average solution time after running 3 times is 2.346 seconds. After using the numerical solution method of the present application, the average solution time after running 3 times is 1.758 seconds, and the average calculation speed improvement rate is 33.4%. Please refer to Figure 8 as shown, Figure 8 shows the model schematic diagram of the KC suspension steering simulation condition. When using the solver in the prior art and running 3 times, the average solution time is 1.047 seconds. After using the numerical solution method of the present application, the average solution time after running 3 times is 0.826 seconds, and the average calculation speed improvement rate is 26.7%.
[0103] Based on the same inventive concept, please refer to Figure 9As shown, another embodiment of the present invention further provides a numerical solution device 11 for engineering practical problems, and the device includes:
[0104] An acquisition module 111, configured to obtain independent variables to be solved according to the physical characteristics of engineering practical problems and the applied controls;
[0105] An analysis module 112, configured to analyze the dependency relationships between the independent variables to be solved, generate a directed graph of the dependency relationships between the independent variables, and perform strongly connected component analysis on the directed graph to generate coupling terms of the independent variables in the directed graph;
[0106] A processing module 113, configured to generate a Jacobian matrix according to the coupling terms and partition the Jacobian matrix to solve the numerical values of the independent variables.
[0107] Based on the same inventive concept, please refer to Figure 10 As shown, another embodiment of the present invention further provides an electronic device 1. The electronic device 1 may include a memory 12, a processor 13, and a bus, and may further include a computer program stored in the memory 12 and executable on the processor 13, such as a numerical solution program for engineering practical problems.
[0108] Among them, the memory 12 includes at least one type of readable storage medium. The readable storage medium includes flash memory, mobile hard disk, multimedia card, card-type memory (such as: SD or DX memory, etc.), magnetic memory, magnetic disk, optical disk, etc. The memory 12 may be an internal storage unit of the electronic device 1 in some embodiments, such as the mobile hard disk of the electronic device 1. The memory 12 may also be an external storage device of the electronic device 1 in other embodiments, such as a plug-in mobile hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, etc. equipped on the electronic device 1. Further, the memory 12 may include both an internal storage unit and an external storage device of the electronic device 1. The memory 12 can be used not only to store application software installed on the electronic device 1 and various types of data, such as the code for numerical solution of engineering practical problems, but also to temporarily store data that has been output or will be output.
[0109] In some embodiments, the processor 13 may be composed of an integrated circuit. For example, it may be composed of a single packaged integrated circuit, or may be composed of multiple packaged integrated circuits with the same or different functions, including a combination of one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and various control chips. The processor 13 is the control core of the electronic device 1, connecting various components of the entire electronic device 1 through various interfaces and circuits. By running or executing programs or modules stored in the memory 12 (such as numerical solution programs for engineering practical problems), and by calling the data stored in the memory 12, it performs various functions of the electronic device 1 and processes data.
[0110] The processor 13 executes the operating system of the electronic device 1 and various installed application programs. The processor 13 executes the application programs to implement the steps in the numerical solution method for engineering practical problems described above.
[0111] Exemplarily, a computer program can be divided into one or more modules. One or more modules are stored in the memory 12 and executed by the processor 13 to complete the present application. One or more modules can be a series of computer program instruction segments capable of performing specific functions, and these instruction segments are used to describe the execution process of the computer program in the electronic device 1. For example, the computer program can be divided into an acquisition module 111, an analysis module 112, and a processing module 113.
[0112] The above-mentioned integrated unit implemented in the form of software function modules can be stored in a computer-readable storage medium. The computer-readable storage medium can be non-volatile or volatile. The above-mentioned software function modules are stored in a storage medium and include several instructions for causing a computer device (which can be a personal computer, a computer device, or a network device, etc.) or a processor to execute part of the functions of the numerical solution method for engineering practical problems in various embodiments of the present application.
[0113] In summary, a numerical solution method for engineering practical problems provided by the present invention includes: obtaining the independent variables to be solved according to the physical characteristics and applied controls of the engineering practical problems, analyzing the dependency relationships between the independent variables to be solved to generate a directed graph of the dependency relationships between the independent variables, performing strongly connected component analysis on the directed graph to generate the coupling terms of the independent variables in the directed graph, that is, decoupling the independent variables participating in the calculation through strongly connected component analysis, generating a Jacobian matrix according to the coupling terms and partitioning the Jacobian matrix, dividing the independent variables participating in the calculation into multiple independent subsets for processing according to the coupling situation to solve the numerical values of the independent variables. The numerical solution method for engineering practical problems provided by the present invention can greatly improve the calculation speed and optimize the performance of the solver by decoupling the independent variables participating in the calculation and dividing them into multiple independent subsets for processing, and this numerical solution method is particularly effective under the calculation load of a high-degree engineering model to be solved with complex control and analysis problems. In addition, there is no need for prior knowledge of the model to be solved and corresponding preprocessing procedures, it has good versatility, does not introduce additional equations or perform additional simplifications, has good numerical stability, and can effectively improve the calculation speed.
[0114] The above embodiments are only illustrative of the principles and effects of the present invention, and are not used to limit the present invention. Any person familiar with this technology can modify or change the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or changes completed by those with ordinary knowledge in the technical field without departing from the spirit and technical ideas disclosed by the present invention should still be covered by the claims of the present invention.
Claims
1. A numerical solution method for engineering practical problems, characterized in that, including: According to the physical characteristics of the actual engineering problem and the applied control, obtain the independent variables to be solved; Analyze the dependency relationships among the independent variables to be solved to generate a directed graph of the dependency relationships among the independent variables; Perform strongly connected component analysis on the directed graph to generate the coupling terms of the independent variables in the directed graph; Generate a Jacobian matrix based on the coupling terms and partition the Jacobian matrix to solve the numerical values of the independent variables.
2. The numerical solution method for engineering practical problems according to claim 1, characterized in that The obtaining the independent variables to be solved according to the physical characteristics of the actual engineering problem and the applied control includes: Generate the algebraic equations of the actual engineering problem according to the physical characteristics of the actual engineering problem and the applied control; Obtain the independent variables to be solved according to the algebraic equations.
3. The numerical solution method for engineering practical problems according to claim 1, wherein The performing strongly connected component analysis on the directed graph to generate the coupling terms of the independent variables in the directed graph includes: Perform strongly connected component analysis on the directed graph to generate the strongly connected components of the directed graph; Determine the coupling terms of the independent variables in the directed graph according to the strongly connected components.
4. The numerical solution method for engineering practical problems according to claim 3, characterized in that, The performing strongly connected component analysis on the directed graph to generate the strongly connected components of the directed graph includes: Initialize the independent variable nodes in the directed graph and the timestamps of depth-first search; Select any unvisited independent variable node in the directed graph to start depth-first search until all independent variable nodes in the directed graph are traversed; Judge and output the strongly connected components of the directed graph.
5. The numerical solution method for engineering practical problems according to claim 4, characterized in that The selecting any unvisited independent variable node in the directed graph to start depth-first search until all independent variable nodes in the directed graph are traversed includes: Select any unvisited independent variable node in the directed graph to start depth-first search using preorder traversal until all independent variable nodes in the directed graph are traversed; Wherein, the preorder traversal is to visit the current independent variable node first and then recursively visit the adjacent independent variable nodes.
6. The numerical solution method for engineering practical problems according to claim 1, characterized in that, The generating a Jacobian matrix based on the coupling terms and partitioning the Jacobian matrix to solve the numerical values of the independent variables includes: Generate corresponding local Jacobian matrices according to each of the coupling terms; Combine the local Jacobian matrices according to the interactions among the coupling terms to generate a global Jacobian matrix; Partition the global Jacobian matrix and solve the numerical values of the independent variables according to the partitioned Jacobian matrix.
7. The numerical solution method for engineering practical problems according to claim 6, characterized in that, The partitioning the global Jacobian matrix and solving the numerical values of the independent variables according to the partitioned Jacobian matrix includes: Partition the global Jacobian matrix and solve the numerical values of the independent variables using the direct method or the iterative method according to the partitioned Jacobian matrix.
8. A numerical solution device for an actual engineering problem, characterized in that, The device includes: An acquisition module for obtaining the independent variables to be solved according to the physical characteristics of the actual engineering problem and the applied control; An analysis module for analyzing the dependency relationships among the independent variables to be solved to generate a directed graph of the dependency relationships among the independent variables, performing strongly connected component analysis on the directed graph to generate the coupling terms of the independent variables in the directed graph; A processing module for generating a Jacobian matrix based on the coupling terms and partitioning the Jacobian matrix to solve for the numerical values of the independent variables.
9. An electronic device, characterized in that, The electronic device includes: One or more processors; A storage device for storing one or more programs, which when executed by the one or more processors, cause the electronic device to implement the numerical solution method for the engineering practical problems described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, A computer program is stored thereon, which when executed by a processor of a computer, causes the computer to execute the numerical solution method for the engineering practical problems described in any one of claims 1 to 7.