A method for constructing a corrosion solver based on boundary element-finite element coupling algorithm
Through the boundary element-finite element coupling algorithm, the interface electric field and internal material reaction of the corrosion problem are separated and processed, which solves the problems of high computational complexity and low efficiency in traditional methods and realizes efficient and accurate corrosion analysis and visualization support.
Patent Information
- Application Number
- CN202510370392.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-27
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2045-03-27
AI Technical Summary
Traditional corrosion analysis methods are difficult to efficiently evaluate corrosion behavior under different environmental conditions and structural forms. The boundary element method cannot handle the electrochemical reactions inside the material, and the finite element method has high computational cost and low efficiency.
The boundary element-finite element coupling algorithm is used to divide the computational domain of the corrosion problem into a boundary element subdomain and a finite element subdomain, respectively dealing with the interface electric field distribution and the electrochemical reaction inside the material. The interface coordination conditions are used for coupling, and the potential is iteratively solved until convergence.
It achieves efficient and accurate corrosion analysis, reduces computational complexity and cost, and provides reliable corrosion assessment and visualization analysis support.
Smart Images

Figure CN119989822B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of corrosion science and engineering, and in particular relates to a corrosion solver construction method based on a boundary element-finite element coupling algorithm. Background Art
[0002] Corrosion is an electrochemical reaction between a material and its surrounding environment. Corrosion not only causes the performance of metal materials to deteriorate, but in severe cases can even cause structural failure. Therefore, in-depth research and effective prediction of the corrosion process are of great significance.
[0003] Traditional corrosion analysis methods rely primarily on experimental studies, but due to limitations in experimental conditions and cycles, it is difficult to efficiently and comprehensively evaluate corrosion behavior under different environmental conditions and structural forms. In recent years, the application of numerical simulation technology in corrosion research has received widespread attention.
[0004] In the numerical simulation of corrosion, the boundary element method (BEM) and the finite element method (FEM) are two commonly used numerical methods, among which:
[0005] The boundary element method (BEM) solves for the electric potential distribution only at the boundary, effectively avoiding the large-scale global meshing and storage issues, making it suitable for corrosion simulations under complex boundary conditions. However, the BEM is only suitable for solving the external electric field distribution and cannot directly address the electrochemical reaction processes within the material.
[0006] The finite element method (FEM) can accurately simulate electrochemical processes such as potential distribution and reaction kinetics inside the material by discretizing the computational domain into a finite element mesh. However, the computational cost of the finite element method is high, and the efficiency and accuracy of the solution process will be affected, especially when dealing with large-scale structures. Summary of the Invention
[0007] Purpose of the invention: In order to solve the respective limitations of the boundary element method and the finite element method, the present invention proposes a corrosion solver construction method based on the boundary element-finite element coupling algorithm.
[0008] Technical solution: A method for constructing a corrosion solver based on a boundary element-finite element coupling algorithm, comprising the following steps:
[0009] Step 1: Divide the computational domain of the corrosion problem into boundary element subdomains Ψ B and the finite element subdomain Ψ F Two parts, including:
[0010] The boundary element subdomain Ψ B Used to calculate the electric field distribution of the interface corrosion medium;
[0011] The finite element subdomain Ψ F For electrochemical reactions in the treatment area, the boundary element subdomain ΨB and the finite element subdomain Ψ F At the interface Γ I Coupling is performed on
[0012] Step 2: Establish the boundary element region subdomain equation and the finite element region subdomain equation, where:
[0013] (21) Establish the boundary element regional subdomain equation and calculate the potential distribution of the external corrosive medium based on the Laplace equation and boundary integral equation:
[0014] H.U B =G·t B Formula (1), where:
[0015] H and G are both boundary element coefficient matrices, U B is the potential in the medium, t B is the current density;
[0016] (22) Establish the finite element regional subdomain equation and calculate the finite element equilibrium equation of the corrosion process based on the electrochemical reaction kinetics:
[0017] K.U F =f F, Formula (2), where:
[0018] K is the stiffness matrix, U F is the potential on the surface of the structure, f F is the equivalent current density;
[0019] Step 3: At the interface Γ I The interface coordination condition current continuity is satisfied, giving f I F +M·t I B =0, where: M is the current conversion matrix, f I F is the equivalent current density of the finite element interface; t I B is the current density in the boundary element region;
[0020] At the interface Γ I The interface coordination condition is satisfied, and the potential continuity is given by U I B =U I F , U I B is the interface Γ I Boundary element interface potential; U I F is the interface Γ I Finite element node potentials;
[0021] Step 4: Initial assumption interface Γ I The potential distribution U of the boundary element I B In each iteration, the boundary integral equation is used to solve the current density t in the boundary element region. I B , through the coordination relationship, t I B Converted into the equivalent current density f of the finite element interface I F ;
[0022] Based on the corrosion electrochemical kinetics, the finite element equilibrium equation is solved to obtain the potential U of the finite element interface node. I F According to the potential continuity condition, the potential U of the finite element interface node I F Converted into boundary element interface potential U I B , iterate the above process N times and update the interface potential using the relaxation factor: in:
[0023] N is a positive integer, and its value range is 10≤N≤1000;
[0024] ω is the dynamic relaxation factor;
[0025] is the boundary element interface potential after the n+1th iteration;
[0026] is the boundary element interface potential after the nth iteration;
[0027] is the finite element node potential after the nth iteration;
[0028] Step 5: Convergence determination, check whether the change of interface potential meets the convergence conditions: If the convergence condition is met, the iteration is terminated and the final result is output; if the convergence condition is not met, a calculation divergence prompt is given, where:
[0029] ∈ is the error tolerance;
[0030] is the boundary element interface potential after the n+1th iteration;
[0031] is the boundary element interface potential after the nth iteration.
[0032] Furthermore, if the convergence condition is met, the method further includes step 6: performing post-processing on the corrosion results of the converged calculation results to generate a corrosion distribution cloud map.
[0033] Preferably, in step 1, the boundary element subdomain Ψ B and the finite element subdomain Ψ F At the interface Γ I Coupling is performed through interface coordination conditions to ensure the continuity of boundary conditions and the consistency of calculation results, where:
[0034] The interface coordination condition refers to the interface Γ I In terms of continuity and conditions, the potential and current density need to meet.
[0035] Preferably, the specific steps of the post-processing in step six are as follows:
[0036] (61) extracting corrosion-related data from the converged calculation results, wherein the corrosion-related data includes potential distribution and error tolerance;
[0037] (62) Use visualization software to draw a cloud map of corrosion-related data.
[0038] Furthermore, the visualization software in step (62) is one of MATLAB, Python, and Paraview.
[0039] Beneficial effects: The corrosion solver construction method based on the boundary element-finite element coupling algorithm disclosed in the present invention has the following beneficial effects:
[0040] The present invention combines the advantages of the boundary element method and the finite element method by rationally dividing the computational domains of the two, solving the surface electric field in the boundary element subdomain and simulating the internal node potential of the material domain in the finite element subdomain. By coupling the boundary element and the finite element, the electrochemical field distribution in the corrosion problem can be efficiently solved, while avoiding the problems of meshing, computational complexity and numerical stability in traditional methods. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 The present invention discloses a flowchart of a method for constructing a corrosion solver based on a boundary element-finite element coupling algorithm.
[0042] Figure 2 Schematic diagram of the coupling surface between the boundary element domain and the finite element domain.
[0043] Figure 3 This is a schematic diagram of the distribution of ∈ after 77 iterations of the model calculation of the embodiment of the present invention.
[0044] Figure 4 This is a schematic diagram of the potential distribution results of an embodiment of the present invention. DETAILED DESCRIPTION
[0045] The specific embodiments of the present invention are described in detail below.
[0046] The "ranges" disclosed herein are defined in the form of lower and upper limits. A given range is defined by selecting a lower limit and an upper limit, and the selected lower and upper limits define the boundaries of the particular range. Ranges defined in this manner can be inclusive or exclusive and can be combined arbitrarily, i.e., any lower limit can be combined with any upper limit to form a range. For example, if a range of 10 to 50 is listed for a particular parameter, it is understood that ranges of 10 to 40 and 20 to 50 are also contemplated. Furthermore, if the minimum range values listed are 1 and 2, and if the maximum range values listed are 3, 4, and 5, then the following ranges are all contemplated: 1 to 3, 1 to 4, 1 to 5, 2 to 3, 2 to 4, and 2 to 5. In this application, unless otherwise specified, the numerical range "a to b" is an abbreviation for any combination of real numbers between a and b, where a and b are real numbers. For example, the numerical range "0 to 5" means that all real numbers between "0 to 5" are listed herein, and "0 to 5" is simply an abbreviation for these numerical combinations.
[0047] Unless otherwise specified, all embodiments and optional embodiments of the present application can be combined with each other to form a new technical solution.
[0048] Unless otherwise specified, all technical features and optional technical features of this application can be combined with each other to form a new technical solution.
[0049] Unless otherwise specified, all steps of the present application may be performed sequentially or randomly, preferably sequentially. For example, the method includes steps (a) and (b), indicating that the method may include steps (a) and (b) performed sequentially, or may include steps (b) and (a) performed sequentially. For example, the method may further include step (c), indicating that step (c) may be added to the method in any order, for example, the method may include steps (a), (b) and (c), or may include steps (a), (c) and (b), or may include steps (c), (a) and (b), etc.
[0050] Unless otherwise specified, the terms "include" and "comprising" used in this application may be open-ended or closed-ended. For example, "include" and "comprising" may mean that other components not listed may also be included or that only the listed components are included.
[0051] Unless otherwise specified, the reaction is carried out at room temperature and pressure.
[0052] Unless otherwise specified, all parts or percentages are by weight.
[0053] In the present invention, all substances used are known substances and can be purchased or synthesized by known methods.
[0054] In the present invention, the devices or equipment used are all conventional devices or equipment known in the art and are commercially available.
[0055] A corrosion solver construction method based on a boundary element-finite element coupling algorithm is used to calculate the corrosion of a ship hull immersed in seawater, comprising the following steps:
[0056] Step 1: Divide the computational domain of the corrosion problem into boundary element subdomains Ψ B (i.e., hull shell) and the finite element subdomain Ψ F (Seawater represented by a 60*10m cuboid) Two parts, of which:
[0057] The boundary element subdomain Ψ B Used to calculate the electric field distribution of the interface corrosion medium;
[0058] The finite element subdomain Ψ F For electrochemical reactions in the treatment area, the boundary element subdomain Ψ B and the finite element subdomain Ψ F At the interface Γ I Coupling (such as Figure 2 shown);
[0059] Step 2: Establish the boundary element region subdomain equation and the finite element region subdomain equation, where:
[0060] (21) Establish the boundary element regional subdomain equation (i.e., the hull shell subdomain equation) and calculate the potential distribution of the external corrosive medium based on Laplace's equation and boundary integral equation:
[0061] H.U B =G·t B Formula (1), where:
[0062] H and G are both boundary element coefficient matrices, U B is the potential in the medium, t B is the current density;
[0063] (22) Establish the finite element regional subdomain equation (i.e., the seawater subdomain equation) and calculate the finite element equilibrium equation of the corrosion process based on the electrochemical reaction kinetics:
[0064] K.U F =f F,Formula (2), where:
[0065] K is the stiffness matrix, U F is the potential on the surface of the structure, f F is the equivalent current density;
[0066] Step 3: At the interface Γ I The interface coordination condition current continuity is satisfied, giving f I F +M·t I B =0, where: M is the current conversion matrix, f I F is the equivalent current density of the finite element interface; t I B is the current density in the boundary element region;
[0067] At the interface Γ I On the other hand, since the interface coordination condition is satisfied, the potential continuity gives U I B =U I F , U I B is the interface Γ I Boundary element interface potential; U I F is the interface Γ I Finite element node potentials;
[0068] Step 4: Initial assumption interface Γ I The potential distribution U of the boundary element I B In each iteration, the boundary integral equation is used to solve the current density t in the boundary element region (i.e., the hull shell) I B , through the coordination relationship, t I B Converted into the equivalent current density f of the finite element interface I F ;
[0069] Based on the corrosion electrochemical kinetics, the finite element equilibrium equation is solved to obtain the potential U of the interface node of the finite element (i.e., sea water area). I F According to the potential continuity condition, the potential U of the finite element interface node I F Converted into boundary element interface potential U I B , iterate the above process N times and update the interface potential using the relaxation factor: in:
[0070] N is a positive integer, and its value is 100, which is determined according to the convergence and computational accuracy requirements of a specific problem; in another embodiment, N is 10; in another embodiment, N is 1000;
[0071] ω is the dynamic relaxation factor, in this embodiment, ∈ is 0.001;
[0072] is the boundary element interface potential after the n+1th iteration;
[0073] is the boundary element interface potential after the nth iteration;
[0074] is the finite element node potential after the nth iteration;
[0075] The code for the process of updating the potential is as follows:
[0076]
[0077] Step 5: Convergence determination, check whether the change of the interface (i.e., the hull shell) potential meets the convergence conditions: If the convergence condition is met, the iteration is terminated and the final result is output; if the convergence condition is not met, a calculation divergence prompt is given, where:
[0078] ∈ is the error tolerance;
[0079] is the boundary element interface potential after the n+1th iteration;
[0080] is the boundary element interface potential after the nth iteration.
[0081] After 77 iterations of this calculation, the maximum ∈ is 0.00039, as shown in Figure 3 As shown, the calculation is considered to converge.
[0082] Furthermore, if the convergence conditions are met, the process also includes step 6: performing post-processing on the corrosion results of the converged calculation results to generate a corrosion distribution cloud map (such as Figure 4 shown).
[0083] By constructing a corrosion solver based on the boundary element-finite element coupling algorithm, the computational complexity of large-scale finite element grids is reduced, thereby significantly reducing the computational cost, achieving more accurate and efficient corrosion analysis, and making hull corrosion assessment more reliable and comprehensive.
[0084] Preferably, in step 1, the boundary element subdomain Ψ B and the finite element subdomain Ψ F At the interface Γ ICoupling is performed through interface coordination conditions to ensure the continuity of boundary conditions and the consistency of calculation results, where:
[0085] The interface coordination condition refers to the interface Γ I In terms of continuity and conditions, the potential and current density need to meet.
[0086] In step 2, the boundary element subdomain equation and the finite element subdomain equation are established to respectively describe and calculate the potential distribution of the corrosive medium and the potential distribution of the material node based on the Laplace equation and the electrochemical reaction kinetics; wherein:
[0087] The finite element subdomain equation describes the relationship between potential and current density through boundary integral form;
[0088] The finite element equation constructs the stiffness matrix and equilibrium equation based on the surface reaction dynamics of the material, ensuring accurate solution and efficient simulation of the corrosion process under complex boundary conditions.
[0089] In step 3: by I Applying interface coordination conditions to realize the boundary element subdomain Ψ B With the finite element subdomain Ψ F The coupling includes current continuity and potential continuity, specifically:
[0090] Current continuity ensures that the current density of the boundary element subdomain and the finite element subdomain are consistent through the conversion matrix, while potential continuity ensures that the potential of the two subdomains is consistent at the interface.
[0091] Step 4: Initial assumption interface Γ I The potential distribution U of the boundary element I B In each iteration, the boundary integral equation is used to solve the current density t I B and transform it into the equivalent current density f of the finite element subdomain through the interface coordination relationship I F Then, based on the electrochemical kinetics, the finite element equilibrium equation is solved to obtain the potential U of the finite element interface node. I F , and convert it into the potential U of the boundary element subdomain I B , the interface potential is updated by the dynamic relaxation factor ω, and the iteration is performed until the potential converges, thereby improving the solution stability and efficiency.
[0092] In step 5, the convergence criteria are used to check whether the change in the interface potential after each iteration meets the preset error tolerance, specifically:
[0093] By calculating the relative error of the interface potential change, if the error is less than or equal to the set tolerance ∈, the calculation is judged to have converged. If the convergence condition is not met, the calculation is prompted to diverge.
[0094] Preferably, in step 6, the converged calculation results are post-processed to generate a corrosion distribution cloud map to achieve visual analysis of corrosion behavior, thereby providing intuitive data support for engineering applications, helping to predict corrosion development and optimize protection strategies. The specific steps of the post-processing in step 6 are as follows:
[0095] (61) Extracting corrosion-related data from the converged calculation results, including potential distribution and error tolerance;
[0096] (62) Use visualization software (such as MATLAB, Python, Paraview, etc.) to draw a cloud diagram of corrosion-related data.
[0097] Furthermore, the visualization software in step (62) is MATLAB. In another embodiment, the visualization software in step (62) is Python. In another embodiment, the visualization software in step (62) is Paraview.
[0098] The embodiments of the present invention have been described in detail above, but the present invention is not limited to the above embodiments, and various modifications can be made within the scope of knowledge possessed by those skilled in the art without departing from the spirit of the present invention.
Claims
1. A method for constructing a corrosion solver based on a boundary element-finite element coupling algorithm, characterized in that: The following steps are involved: Step 1: Divide the computational domain of the corrosion problem into boundary element subdomains Ψ B and the finite element subdomain Ψ F Two parts, including: The boundary element subdomain Ψ B Used to calculate the electric field distribution of the interface corrosion medium; The finite element subdomain Ψ F For electrochemical reactions in the treatment area, the boundary element subdomain Ψ B and the finite element subdomain Ψ F At the interface Γ I Coupling is performed on Step 2: Establish the boundary element region subdomain equation and the finite element region subdomain equation, where: (21) Establish the boundary element regional subdomain equation and calculate the potential distribution of the external corrosive medium based on the Laplace equation and boundary integral equation: H.U B =G·t B Formula (1), where: H and G are both boundary element coefficient matrices, U B is the potential in the medium, t B is the current density; (22) Establish the finite element regional subdomain equation and calculate the finite element equilibrium equation of the corrosion process based on the electrochemical reaction kinetics: K.U F =f F, Formula (2), where: K is the stiffness matrix, U F is the potential on the surface of the structure, f F is the equivalent current density; Step 3: At the interface Γ I The interface coordination condition current continuity is satisfied, giving f I F +M·t I B =0, where: M is the current conversion matrix, f I F is the equivalent current density of the finite element interface; t I B is the current density in the boundary element region; At the interface Γ I The interface coordination condition is satisfied, and the potential continuity is given by U I B =U I F , U I B is the interface Γ I Boundary element interface potential; U I F is the interface Γ I Finite element node potentials; Step 4: Initial assumption interface Γ I The potential distribution U of the boundary element I B In each iteration, the boundary integral equation is used to solve the current density t in the boundary element region. I B , through the coordination relationship, t I B Converted into the equivalent current density f of the finite element interface I F ; Based on the corrosion electrochemical kinetics, the finite element equilibrium equation is solved to obtain the potential U of the finite element interface node. I F According to the potential continuity condition, the potential U of the finite element interface node I F Converted into boundary element interface potential U I B , iterate the above process N times and update the interface potential using the relaxation factor: in: N is a positive integer, and its value range is 10≤N≤1000; ω is the dynamic relaxation factor; is the boundary element interface potential after the n+1th iteration; is the boundary element interface potential after the nth iteration; is the finite element node potential after the nth iteration; Step 5: Convergence determination, check whether the change of interface potential meets the convergence conditions: If the convergence condition is met, the iteration is terminated and the final result is output; if the convergence condition is not met, a calculation divergence prompt is given, where: ∈ is the error tolerance; is the boundary element interface potential after the n+1th iteration; is the boundary element interface potential after the nth iteration.
2. The method for constructing a corrosion solver based on a boundary element-finite element coupling algorithm according to claim 1, wherein: If the convergence condition is met in step 5, step 6 is also included: post-processing the corrosion results for the converged calculation results to generate a corrosion distribution cloud map.
3. The method for constructing a corrosion solver based on a boundary element-finite element coupling algorithm according to claim 1, wherein: In step 1, the boundary element subdomain Ψ B and the finite element subdomain Ψ F At the interface Γ I Coupling is performed through interface coordination conditions to ensure the continuity of boundary conditions and the consistency of calculation results, where: The interface coordination condition refers to the interface Γ I In terms of continuity and conditions, the potential and current density need to meet.
4. The method for constructing a corrosion solver based on a boundary element-finite element coupling algorithm according to claim 2, wherein: The specific steps of the post-processing in step six are as follows: (61) extracting corrosion-related data from the converged calculation results, wherein the corrosion-related data includes potential distribution and error tolerance; (62) Use visualization software to draw a cloud map of corrosion-related data.
5. The method for constructing a corrosion solver based on a boundary element-finite element coupling algorithm according to claim 4, wherein: The visualization software in step (62) is one of MATLAB, Python, and Paraview.
Citation Information
Patent Citations
Temperature distribution finite element analysis method based on cladding material under electromagnetic induction heating condition
CN111460713A
Method and apparatus for simulation analysis for electric anticorrosion field
JP1999160271A