A physical information neural network electromagnetic field calculation method based on polar coordinate mapping
By adopting the physical information neural network method based on polar coordinate mapping in electromagnetic multi-physics modeling, dynamically adjusting the convolution kernel and specific design loss function, the aliasing error and computational cost of the finite difference method in circular area processing are solved. problems, achieving higher computational adaptability and prediction accuracy.
Patent Information
- Application Number
- CN202410736433.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-07
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2044-06-07
AI Technical Summary
In electromagnetic multi-physics modeling, the physical information neural network based on the finite difference method has problems of aliasing error and high computational cost when processing circular areas. Especially at medium and low resolutions, traditional rasterization/volume Primerization methods are limited in geometric optimization and design applications due to the non-differentiability of the input design parameters.
The physical information neural network method based on polar coordinate mapping is adopted. By introducing polar coordinate mapping to simplify the problem, the five-point difference method is used to approximately solve the two-dimensional Poisson equation, and the convolution kernel is dynamically adjusted to adapt to the non-uniformity in polar coordinates. Combined with Fully connected neural network and specifically designed loss function and boundary conditions, weight matrix optimization is introduced to improve the prediction accuracy of the model.
It improves the calculation adaptability and accuracy of electromagnetic fields in the polar coordinate system, enhances the model's prediction accuracy of electromagnetic fields, solves the problems of boundary step-like and jagged errors in traditional methods, and improves flexibility and accuracy.
Smart Images

Figure CN118332877B
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of electromagnetic multi-physics field modeling, and in particular to a physical information neural network electromagnetic field calculation method based on polar coordinate mapping. Background Art
[0002] In electromagnetic multi-physics modeling, physical information neural networks combine deep learning with partial differential equations, and impose constraints on neural networks by introducing physical laws, thereby improving the accuracy and reliability of the model. One of the core technologies of PINN is automatic differentiation, which can calculate the partial derivatives of the network and realize efficient back propagation of partial differential equations. However, when a small number of collocation points are used, PINN based on automatic differentiation has limitations in prediction accuracy, computational efficiency and theoretical convergence. In contrast, PINN based on finite difference method has significant advantages in computational cost and efficiency. However, at present, PINN based on finite difference method is mainly used in regular domains of uniform grids, but has limited effect when dealing with circular areas commonly seen in electromagnetic fields. When rasterizing circular areas, especially at medium and low resolutions, the stepped and jagged boundaries will introduce significant aliasing errors, and small boundary errors may also lead to large deviations in the learning solution. In addition, traditional rasterization / voxelization methods are limited in geometric optimization and design applications due to the non-differentiability of input design parameters. Summary of the invention
[0003] The purpose of this section is to summarize some aspects of embodiments of the present invention and briefly introduce some preferred embodiments. Some simplifications or omissions may be made in this section and the specification abstract and the invention title of this application to avoid blurring the purpose of this section, the specification abstract and the invention title, and such simplifications or omissions cannot be used to limit the scope of the present invention.
[0004] To achieve the above object, the present invention provides the following technical solutions:
[0005] A physical information neural network electromagnetic field calculation method based on polar coordinate mapping, the operation steps are as follows:
[0006] S1. Establishment of physical model and finite element solution: Establish a physical model based on the problem, including determining electromagnetic parameters and boundary conditions, and discretizing the electromagnetic field using the finite element method. Meshing is a key step, so that the magnetic vector position distribution of each node can be solved under various working conditions;
[0007] S2. Convert the problem to polar coordinate system: By introducing polar coordinate mapping, the problem is simplified and converted into a regularized area, the relevant Poisson equation is solved, and the five-point difference method is used to approximate the two-dimensional Poisson equation;
[0008] S3. Construct a neural network structure: Use a fully connected neural network, select the activation function as Tanh, and the optimizer as Adam. Grid the mapped area to obtain grid point coordinates, input the grid point coordinate data to the neural network, and use the trained model to output the predicted value.
[0009] S4. Dynamically adjust the convolution kernel strategy to cope with the characteristics of the polar coordinate system: In polar coordinates, the finite difference equation contains the polar radius r, which means that the influence of r must be considered when constructing the convolution kernel. Therefore, the convolution kernel is dynamically adjusted to adapt to the changes, so that the adjusted convolution kernel can accurately reflect the changes in the radial position of the data and be applied to the corresponding data;
[0010] S5. Optimize loss function and boundary conditions: The construction of loss function is based on the discrete Poisson equation on the region, and takes into account the problem of error propagation. The weight matrix is used for optimization, and the boundary conditions are designed specifically, including Dirichlet, Neumann and periodic boundary conditions. For Neumann and periodic conditions, the numerical dependencies around specific grid points are analyzed and calculated, and the loss function is updated accordingly.
[0011] S6. Train the neural network: set the loss function and use the Adam optimizer to optimize the neural network parameters;
[0012] S7, acquisition of test data: deriving the grid point coordinates on each finite element grid point and the corresponding magnetic vector position, and using the derived data as the test data of the model;
[0013] S8. Model accuracy evaluation: Use the normalized mean absolute error (NMAE) to evaluate the training completion of the neural network model. NMAE evaluates the average deviation between the model's predicted value and the true value, thereby quantifying the model's prediction accuracy.
[0014] As a further solution of the present invention: in step S1, a finite element model of the object is established, boundary conditions and structural parameters are determined, and the finite element method is used to solve the magnetic field under various working conditions after meshing. The formulas for solving the equations and boundary conditions are as follows:
[0015] ;
[0016] in is the conductor area, is the non-conductor region, A is the vector magnetic potential (Wb / m), is the magnetic permeability of the conductor region (H / m), is the magnetic permeability of the non-conductor region (H / m); J s is the current density (A / m2);
[0017] ;
[0018] Where C is a constant, For the border.
[0019] As a further solution of the present invention: in step S2, when the solution area is circular or sector-shaped, by introducing polar coordinate mapping, the coordinate transformation from the solution area to the regularized reference area can be effectively realized, and the grid division can be performed like processing a rectangular area. The Poisson equation in the two-dimensional polar coordinate system is as follows:
[0020] ;
[0021] in is the magnetic vector potential, indicating that any point in the polar coordinate system The magnetic vector potential value of is the radial distance in the polar coordinate system; is the angle in polar coordinates; is the source function, which means that the midpoint The source distribution.
[0022] As a further solution of the present invention: in step S2, the radial distance of the solution area is set to The range is ,angle The range is , divide the rectangular domain obtained after polar coordinate mapping, that is, Direction The step length is The isometric division is divided into Get nodes, , n, where , also in Direction The step length is The isometric division is divided into Get Nodes , m, where Then use two clusters of parallel lines , The area Divide A small rectangle, thus getting the node , the boundary conditions of the solution region are Dirichlet boundary conditions;
[0023] The finite difference equation for the five-point difference method in polar coordinates to approximate the two-dimensional Poisson equation is as follows:
[0024] ;
[0025] in, Represents polar grid points The magnetic vector potential on and Respectively The magnetic vector potential values of the previous and next grid points in the direction, and Respectively The magnetic vector potential values at the previous and next grid points in the direction, and The grid is and The step length in the direction, is a grid point The source item at .
[0026] As a further solution of the present invention: in step S3, the neural network adopts a fully connected neural network structure, the linear layer activation function selects Tanh, and the optimizer selects Adam. In each round of iteration, the above-mentioned node is input , and get the output of the neural network .
[0027] As a further solution of the present invention: in step S4, a dynamic convolution kernel adjustment strategy based on position is adopted, and for each point in the input data, the radial position According to formula 4, a The convolution kernel is as follows:
[0028] ;
[0029] During the training of the neural network, the output of the neural network A data column with a width of three is intercepted along the fourth dimension, and a specific convolution kernel matching its position is applied for processing. After completing a convolution, the window slides forward one column, intercepts the next group of data at a new position, and repeats the above convolution process.
[0030] As a further solution of the present invention: in step S4, after performing convolution operation on each column, substitute
[0031]
[0032] In the loss function matrix Since the points in the loss function are connected by differential equations, the errors in these areas will propagate to other areas. In order to solve the problem of uneven optimization difficulty in different areas during the optimization process, the weight matrix is introduced To dynamically adjust the weight optimization loss function, the formula is as follows:
[0033] ;
[0034] in, and are the displacement factor and the scale factor, so the loss function of the partial differential equation is Expressed as ;
[0035] Where n is the number of grids along the r direction, and m is the number of grids along the The number of grids in the direction.
[0036] As a further solution of the present invention: in step S5, the area mapped by polar coordinates is analyzed.
[0037]
[0038] And perform the central difference method on the left endpoint and apply the Neumann boundary condition. As shown in the Neumann boundary condition diagram, the values of the left endpoints are completely equal, and the loss function of the left boundary is constructed. The formula is as follows:
[0039] ;
[0040] Analyze the upper boundary and combine
[0041]
[0042] And applying periodic boundary conditions we can get:
[0043] .
[0044] As a further solution of the present invention: in step S5, it is known that the value of the boundary point depends on its adjacent left and right points and the adjacent row of the corresponding boundary. For each boundary point, a dynamic change based on the position is designed. The matrix is used as a convolution kernel, and its specific form is:
[0045] ;
[0046] For each boundary point, we obtain the data of the boundary point and its left and right sides and adjacent rows from the grid, perform point multiplication with the corresponding dynamic convolution kernel, and obtain the estimated value of each upper boundary point.
[0047]
[0048] The residual , construct the loss function of the upper boundary , the formula is as follows:
[0049] ;
[0050] Similarly, the residual of each lower boundary point is obtained , and the loss function of the lower boundary ,as follows:
[0051] ;
[0052] Due to the periodic boundary conditions, the upper and lower boundaries are obviously equal. In order to increase the convergence of the network, the constraint condition is added , the formula is as follows:
[0053] ;
[0054] The right endpoint is the Dirichlet condition, as shown in the Dirichlet boundary condition diagram, constructing the right boundary loss function , the formula is as follows:
[0055] ;
[0056] Where C is the Dirichlet boundary condition of the model.
[0057] As a further solution of the present invention: in step S6, the loss function formula is as follows:
[0058] .
[0059] As a further solution of the present invention: in step S7, the grid coordinates of each finite element grid point in S1 need to be derived , and the corresponding magnetic vector potential as well as The constant C and current density J in s , and use the above exported data as test data.
[0060] As a further solution of the present invention: the accuracy of the model trained in step S8 is evaluated by the normalized mean absolute error (NMAE) of the test data, and the formula is as follows:
[0061] .
[0062] Compared with the prior art, the present invention has the following beneficial effects:
[0063] This method combines the traditional physical information neural network based on finite differences with the polar coordinate mapping method, which improves the flexibility and accuracy of problem solving. In view of the fact that the finite difference equation contains the polar radius r in polar coordinates, the value inside the convolution kernel is dynamically adjusted to more accurately handle the non-uniformity of the electromagnetic field in the polar coordinate system, improving the adaptability and accuracy of the calculation. By specifically designing the loss function and boundary conditions, introducing weight matrix optimization and accurately controlling Dirichlet, Neumann and periodic boundary conditions, the prediction accuracy of the model for the electromagnetic field can be effectively enhanced. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] Figure 1 A schematic diagram of the method steps of a physical information neural network electromagnetic calculation method based on polar coordinate mapping;
[0065] Figure 2 A schematic diagram of grid division after mapping in a physical information neural network electromagnetic calculation method based on polar coordinate mapping;
[0066] Figure 3 A schematic diagram of Neumann boundary conditions in a physical information neural network electromagnetic calculation method based on polar coordinate mapping;
[0067] Figure 4 A schematic diagram of Dirichlet boundary conditions in a physical information neural network electromagnetic calculation method based on polar coordinate mapping;
[0068] Figure 5 It is a schematic diagram of FEM model in a physical information neural network electromagnetic calculation method based on polar coordinate mapping;
[0069] Figure 6 Schematic diagram of the magnetic vector potential, neural network solution and point-by-point error solved by the finite element method in a physical information neural network electromagnetic calculation method based on polar coordinate mapping. DETAILED DESCRIPTION
[0070] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and understandable, the specific implementation modes of the present invention are described in detail below in conjunction with the accompanying drawings.
[0071] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0072] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The term "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive with other embodiments.
[0073] Example
[0074] See also Figure 1-6 , which is the first embodiment of the present invention, and provides a physical information neural network electromagnetic calculation method based on polar coordinate mapping, and its specific steps are as follows:
[0075] Step 1: Prepare the geometry model and physics equations
[0076] Set the geometric model: a powered circular area with a radius of 0.3m and an air area with a radius of 1m around it. The formulas for solving the equations and boundary conditions are as follows:
[0077] ;
[0078] in is the conductor area, is the non-conductor region, A is the vector magnetic potential (Wb / m), is the magnetic permeability of the conductor region (H / m), is the magnetic permeability of the non-conductor region (H / m); J s is the current density (A / m2);
[0079] ;
[0080] Where C is a constant, for the border;
[0081] Step 2: Meshing
[0082] The center of the conductor area is fixed at (0,0), the radius is 0.3m, and the relative magnetic permeability is set 1, a current with a current density of 10A / m2 is passed, and an air area with a radius of 1m is set outside. The relative magnetic permeability is set to 1, the outer boundary vector magnetic potential C is set to 0, and the FEM model is as follows Figure 5 As shown in the figure, from the problem setting, we can see that the radius range of the geometric model is (0,1) and the angle range is (0,2 ), the rectangle after polar coordinate mapping is processed as follows Figure 2 The grid division shown here is and Divide them equally into 50 parts, so we have , , forming a grid to obtain 51×51 input points, which are used as coordinate data input for the neural network;
[0083] Step 3: Design the Neural Network
[0084] Build a fully connected neural network structure, the network input is the coordinate data of the grid, use Tanh as the activation function, and select Adam optimizer;
[0085] Step 4: Construct a loss function
[0086] Construct a loss function to add physical equations to the learning process of the neural network to ensure that the output of the network satisfies the constraints of the physical equations;
[0087] Step 5: Train the network
[0088] Use the loss function defined in the previous step to train the neural network. The number of iterations is determined as needed.
[0089] Step 6: Construct the finite element model
[0090] Using the finite element method (FEM) as a benchmark, the same physical model is established, meshing is performed, boundary conditions and material properties are set, finite element analysis is performed, the reference solution of the magnetic vector potential is obtained, and the grid coordinates of each finite element grid point are derived. , and the corresponding magnetic vector potential ;
[0091] Step 7: Compare and evaluate results
[0092] The trained neural network model is used to calculate the same test set, obtain the magnetic vector potential value predicted by the neural network, calculate the point-by-point error between the finite element solution and the neural network solution, and use the normalized mean absolute error (NMAE) of 0.795% to evaluate the prediction accuracy. The magnetic vector potential value, neural network solution, and point-by-point error obtained by the finite element method are shown in Figure 2. Figure 6 shown.
[0093] When using it, first establish a finite element model of the research object, define the geometric boundary conditions and structural parameters of the model, and properly mesh the model to ensure that the magnetic field can be effectively and accurately solved under various working conditions. This process requires appropriate physical property calibration of the conductor area and the non-conductor area, such as magnetic permeability. The magnetic field calculation adopts the finite element method, which involves the processing of Maxwell equations and related boundary conditions. For circular or fan-shaped solution areas, coordinate transformation is achieved through polar coordinate mapping, and the solution area is mapped to a regularized reference area, which is similar to the meshing of rectangular areas. A fully connected layer is used, Tanh is selected as the activation function, and the Adam optimizer is used for training. The input of the neural network is the above-mentioned node data, and the magnetic field distribution is predicted through an iterative process. Since the finite difference equation contains the polar radius r in polar coordinates, the value inside the convolution kernel is dynamically adjusted according to the radial position of the node, so as to process information more accurately. The output through the neural network is subjected to specific convolution processing, which helps to treat the spatial characteristics of the data more carefully. Neumann and Dirichlet conditions are applied to different boundaries of the model respectively. Especially for the upper and lower boundaries, due to their periodic characteristics, the boundary values are guaranteed to be equal through specific processing to enhance the stability of the model. The overall loss function is constructed by combining the output of the neural network with the result of the two-dimensional Poisson equation approximated by the five-point difference method. The conditions and actual residuals of each boundary in the loss function are further refined, and the weight matrix is introduced to adjust the optimization difficulty of different regions to achieve overall better optimization effect and model convergence.
[0094] In summary, this method combines the traditional finite difference-based physical information neural network with the polar coordinate mapping method, improving the flexibility and accuracy of problem solving. In view of the fact that the finite difference equation contains the polar radius r in polar coordinates, the value inside the convolution kernel is dynamically adjusted to more accurately handle the non-uniformity of the electromagnetic field in the polar coordinate system, improving the adaptability and accuracy of the calculation. By specifically designing the loss function and boundary conditions, introducing weight matrix optimization and accurately controlling Dirichlet, Neumann and periodic boundary conditions, the prediction accuracy of the model for the electromagnetic field can be effectively enhanced.
[0095] Importantly, it should be noted that the construction and arrangement of the present application shown in a number of different exemplary embodiments are only exemplary. Although only a few embodiments are described in detail in this disclosure, it should be readily understood by those who refer to this disclosure that many modifications are possible (e.g., the size, scale, structure, shape and proportion of various elements, and parameter values (e.g., temperature, pressure, etc.), mounting arrangements, use of materials, color, changes in orientation, etc.) without substantially departing from the novel teachings and advantages of the subject matter described in the application. For example, an element shown as integrally formed may be composed of multiple parts or elements, the position of the element may be inverted or otherwise changed, and the nature or number or position of the discrete element may be altered or changed. Therefore, all such modifications are intended to be included within the scope of the present invention. The order or sequence of any process or method steps may be changed or reordered according to an alternative embodiment. In the claims, any "device plus function" clause is intended to cover the structure described herein that performs the function, and is not only structurally equivalent but also equivalent structure. Other substitutions, modifications, changes and omissions may be made in the design, operating conditions and arrangement of the exemplary embodiments without departing from the scope of the present invention. Therefore, the invention is not limited to a specific embodiment, but extends to numerous modifications still falling within the scope of the appended claims.
[0096] Additionally, in order to provide a concise description of exemplary embodiments, all features of an actual embodiment may not be described (ie, those features that are not relevant to the best mode presently contemplated for carrying out the invention or those features that are not relevant to implementing the invention).
[0097] It will be appreciated that in the development of any actual implementation, as in any engineering or design project, numerous implementation-specific decisions may be made. Such a development effort may be complex and time-consuming, but will be a routine task of design, fabrication, and production for those of ordinary skill having the benefit of this disclosure without undue experimentation.
[0098] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.
Claims
1. A physical information neural network electromagnetic field calculation method based on polar coordinate mapping, characterized in that: The operation steps are as follows: S1. Establishment of physical model and finite element solution: Establish a physical model based on the problem, including determining electromagnetic parameters and boundary conditions, and discretizing the electromagnetic field using the finite element method. Meshing is a key step, so that the magnetic vector position distribution of each node can be solved under various working conditions; S2. Convert the problem to polar coordinate system: By introducing polar coordinate mapping, the problem is simplified and converted into a regularized area, the relevant Poisson equation is solved, and the five-point difference method is used to approximate the two-dimensional Poisson equation; S3. Construct a neural network structure: Use a fully connected neural network, select the activation function as Tanh, and the optimizer as Adam. Grid the mapped area to obtain grid point coordinates, input the grid point coordinate data to the neural network, and use the trained model to output the predicted value. S4. Dynamically adjust the convolution kernel strategy to cope with the characteristics of the polar coordinate system: In polar coordinates, the finite difference equation contains the polar radius r, which means that the influence of r must be considered when constructing the convolution kernel. Therefore, the convolution kernel is dynamically adjusted to adapt to the changes, so that the adjusted convolution kernel can accurately reflect the changes in the radial position of the data and be applied to the corresponding data; S5. Optimize loss function and boundary conditions: The loss function is constructed based on the discrete Poisson equation on the region, and the error propagation problem is taken into account. The weight matrix is used for optimization, and the boundary conditions are designed specifically, including Dirichlet, Neumann and periodic boundary conditions. For Neumann and periodic conditions, the numerical dependencies around specific grid points are analyzed and calculated, and the loss function is updated accordingly. S6. Train the neural network: set the loss function and use the Adam optimizer to optimize the neural network parameters; S7, acquisition of test data: deriving the grid point coordinates on each finite element grid point and the corresponding magnetic vector position, and using the derived data as the test data of the model; S8. Model accuracy evaluation: Use the normalized mean absolute error (NMAE) to evaluate the training completion of the neural network model. NMAE evaluates the average deviation between the model's predicted value and the true value, thereby quantifying the model's prediction accuracy. In step S1, a finite element model of the object is established, boundary conditions and structural parameters are determined, and the finite element method is used to solve the magnetic field under various working conditions after meshing. The formulas for solving the equations and boundary conditions are as follows: ; in is the conductor area, is the non-conductor region, A is the vector magnetic potential (Wb / m), is the magnetic permeability of the conductor region (H / m), is the magnetic permeability of the non-conductor region (H / m); J s is the current density (A / m2); ; Where C is a constant, for the border; In step S4, a position-based dynamic convolution kernel adjustment strategy is adopted to adjust the kernel size of each point in the input data according to its radial position. Dynamically generate a The convolution kernel is as follows: ; is the step size for equally spaced division of the angle range, is the step size for equidistant division of radial distance. During the training process of neural network, the output of neural network is A data column with a width of three is intercepted along the fourth dimension, and a specific convolution kernel matching its position is applied for processing. After completing a convolution, the window slides forward one column, intercepts the next group of data at a new position, and repeats the above convolution process.
2. The method for calculating electromagnetic fields using a physical information neural network based on polar coordinate mapping according to claim 1, characterized in that: In step S2, when the solution area is circular or sector-shaped, the coordinate transformation from the solution area to the regularized reference area can be effectively realized by introducing polar coordinate mapping, and the grid division can be performed like processing a rectangular area. The Poisson equation in the two-dimensional polar coordinate system is as follows: ; in is the magnetic vector potential, indicating that any point in the polar coordinate system The magnetic vector potential value of is the radial distance in the polar coordinate system; is the angle in polar coordinates; is the source function, which means that the midpoint The source distribution.
3. The method for calculating electromagnetic fields using a physical information neural network based on polar coordinate mapping according to claim 2 is characterized in that: In step S2, the radial distance of the solution area is set The range is ,angle The range is , divide the rectangular domain obtained after polar coordinate mapping, that is, Direction The step length is The isometric division is divided into Get nodes, , n, where , also in Direction The step length is The isometric division is divided into Get Nodes , m, where Then use two clusters of parallel lines , The area Divide A small rectangle, thus getting the node , the boundary conditions of the solution region are Dirichlet boundary conditions; The finite difference equation for the five-point difference method in polar coordinates to approximate the two-dimensional Poisson equation is as follows: ; in, Represents polar grid points The magnetic vector potential on and Respectively The magnetic vector potential values of the previous and next grid points in the direction, and Respectively The magnetic vector potential values at the previous and next grid points in the direction, and The grid is and The step length in the direction, is a grid point The source item at .
4. The method for calculating electromagnetic fields using a physical information neural network based on polar coordinate mapping according to claim 3 is characterized in that: In step S3, the neural network adopts a fully connected neural network structure, the linear layer activation function selects Tanh, and the optimizer selects Adam. In each round of iteration, the above nodes are input , and get the output of the neural network .
5. The method for calculating electromagnetic field based on physical information neural network and polar coordinate mapping according to claim 4 is characterized in that: In step S4, after performing convolution operation on each column, substitute In the loss function matrix Since the points in the loss function are connected by differential equations, the errors in these areas will propagate to other areas. In order to solve the problem of uneven optimization difficulty in different areas during the optimization process, the weight matrix is introduced To dynamically adjust the weight optimization loss function, the formula is as follows: ; in, and are the displacement factor and the scale factor, so the loss function of the partial differential equation is Expressed as ; Where n is the number of grids along the r direction, and m is the number of grids along the The number of grids in the direction.
6. The method for calculating electromagnetic field based on physical information neural network and polar coordinate mapping according to claim 5, characterized in that: In step S5, the region mapped by polar coordinates is analyzed. And perform the central difference method on the left endpoint and apply the Neumann boundary condition to construct the loss function of the left boundary The formula is as follows: ; Analyze the upper boundary and combine And applying periodic boundary conditions yields: 。 7. The method for calculating electromagnetic field based on physical information neural network and polar coordinate mapping according to claim 6, characterized in that: In step S5, it can be seen that the value of the boundary point depends on its adjacent left and right points and the adjacent row of the corresponding boundary. For each boundary point, a dynamic change based on the position is designed. The matrix is used as the convolution kernel, and its specific form is: ; For each boundary point, we obtain the data of the boundary point and its left and right sides and adjacent rows from the grid, perform point multiplication with the corresponding dynamic convolution kernel, and obtain the estimated value of each upper boundary point. The residual , construct the loss function of the upper boundary , the formula is as follows: ; Similarly, the residual of each lower boundary point is obtained , and the loss function of the lower boundary ,as follows: ; Due to the periodic boundary conditions, the upper and lower boundaries are equal. In order to increase the convergence of the network, the constraints are added. , the formula is as follows: ; The right endpoint is the Dirichlet condition, as shown in the Dirichlet boundary condition diagram, constructing the right boundary loss function , the formula is as follows: ; Where C is the Dirichlet boundary condition of the model.
8. The method for calculating electromagnetic fields using a physical information neural network based on polar coordinate mapping according to claim 7 is characterized in that: In step S6, the loss function formula is as follows: 。 9. The method for calculating electromagnetic fields using a physical information neural network based on polar coordinate mapping according to claim 8, characterized in that: In step S7, the grid coordinates of each finite element grid point in S1 need to be derived , and the corresponding magnetic vector potential as well as The constant C and current density J in s , and use the above exported data as test data.
10. The method for calculating electromagnetic field based on physical information neural network and polar coordinate mapping according to claim 9, characterized in that: In step S8, the trained model is evaluated for accuracy by the normalized mean absolute error (NMAE) of the test data, as follows: 。
Citation Information
Cited By
Digital modeling method and system for physical field of complex shape component die forging forming process
CN121354747B
