Physical field solving method and device based on equipotential graph generation, equipment and medium
Through the physical field solution method generated based on the equipotential graph, the problem of solving complex nonlinear partial differential equations is solved, and a more efficient and accurate solution process is achieved.
Patent Information
- Application Number
- CN202411879606.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-19
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2044-12-19
AI Technical Summary
The prior art faces the problem that it is difficult to effectively solve and train the process time-consuming and easy to fall into local optimal solutions when solving complex nonlinear partial differential equations.
A physical field solution method based on equipotential graph generation is proposed. By obtaining partial differential equations, initial conditions and boundary conditions, inputting them into a pre-trained equipotential graph generation model, generating an equipotential graph of solution distribution, and establishing the association relationship between the physical quantity to be solved and the equipotential graph, thereby solving the physical quantity to be solved.
By transforming complex partial differential equations to visual equipotential lines or equipotential surfaces, the solution difficulty is greatly reduced and the solution efficiency and accuracy are improved.
Smart Images

Figure CN119848399A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image generation, and in particular to a physical field solution, device, equipment and medium based on equipotential map generation. Background Art
[0002] Nonlinear partial differential equations (PDEs) are mathematical tools for describing physical fields in physics, engineering, mathematics and other fields involving multiple independent variables and with nonlinear characteristics. They are very important in describing complex systems and dynamic processes in nature. However, for most nonlinear partial differential equations, solving them is usually very complicated. Traditional methods such as variational method, finite difference method, finite element method and spectral method are often difficult to solve effectively when faced with complex boundary conditions, or have difficulties in meshing, and cannot meet the needs of practical applications.
[0003] In order to overcome the limitations of traditional mathematical methods in solving nonlinear partial differential equations, in recent years, physical information neural networks (PI NNs) have gradually attracted widespread attention from the academic community as an emerging data-driven method. PI NNs directly integrate physical laws (including partial differential equations and boundary conditions) into the training process of neural networks, and use the powerful function approximation ability of neural networks to solve complex PDEs. However, PI NNs still face many challenges in practical applications. For example, due to the complex optimization involved, the training process is very time-consuming and easy to fall into local optimal solutions. Especially for partial differential equations with strong nonlinearity, the training may not be easy to converge. Summary of the invention
[0004] Based on this, it is necessary to propose a physical field solution, device, equipment and medium method based on equipotential diagram generation in order to solve the problem that the existing nonlinear partial differential equations are difficult to solve effectively.
[0005] A first aspect of the present invention provides a physical field solution method based on equipotential diagram generation, the method comprising:
[0006] Obtaining a partial differential equation of a physical field, and initial conditions and boundary conditions of the partial differential equation, wherein the partial differential equation is used to express a change law of a physical quantity of the physical field;
[0007] Inputting the partial differential equation, the initial condition and the boundary condition into a pre-trained equipotential map generation model to generate an equipotential map of the solution distribution of the partial differential equation, wherein the equipotential map includes a plurality of equipotential surfaces or a plurality of equipotential lines; wherein on each equipotential surface or each equipotential line, the numerical value of the physical quantity is equal;
[0008] Establishing a correlation relationship between the physical quantity to be solved of the partial differential equation and the equipotential diagram;
[0009] The physical quantity to be solved is solved from the equipotential diagram according to the association relationship.
[0010] Furthermore, the step of establishing the correlation relationship between the physical quantity to be solved of the partial differential equation and the equipotential diagram comprises:
[0011] Acquiring spatial information of the physical quantity to be solved;
[0012] According to the spatial information, the coordinates of the desired physical quantity in the equipotential diagram are determined, and the coordinates are used as target solution points.
[0013] Furthermore, the step of solving the physical quantity to be solved from the equipotential diagram according to the association relationship includes:
[0014] Generate a physical quantity change curve passing through the target solution point, wherein the physical quantity change curve is a curve vertically passing through a plurality of equipotential surfaces with different values, or the physical quantity change curve is a curve vertically intersecting a plurality of equipotential lines with different values;
[0015] According to the position of the target solution point on the physical quantity variation curve, the physical quantity value corresponding to the target solution point is calculated, which is the solution of the physical quantity to be solved.
[0016] Furthermore, the step of calculating the physical quantity value corresponding to the target solution point according to the position of the target solution point on the physical quantity change curve includes:
[0017] Taking the intersection of the physical quantity variation curve and the equipotential surface or the equipotential line as a reference point, obtaining the positions of two reference points closest to the target solution point on the equipotential diagram, taking the two reference points as a first reference point and a second reference point, respectively, taking the value of the physical quantity corresponding to the first reference point as a first value, and taking the value of the physical quantity corresponding to the second reference point as a second value;
[0018] Acquire a first distance between the target solution point and the first reference point, and acquire a second distance between the target solution point and the second reference point;
[0019] Determining whether the target solution point is between the first reference point and the second reference point;
[0020] If so, based on the distance ratio between the first distance and the second distance, an interpolation method is used between the first value and the second value to obtain a physical quantity value corresponding to the target solution point corresponding to the distance ratio.
[0021] Furthermore, before the step of obtaining the partial differential equation of the physical field, and the initial conditions and boundary conditions of the partial differential equation, the step further includes:
[0022] Training the contour map generation model; the training steps of the contour map generation model include:
[0023] Discretizing the partial differential equation of the sample by finite difference, finite element or spectral method, and obtaining the numerical solution of the partial differential equation by repeated iterative solution;
[0024] Numerical solutions corresponding to the partial differential equations are added as sample data to a sample data set, and the sample data in the sample data set is divided into a plurality of training data and a plurality of verification data according to a preset ratio;
[0025] The plurality of training data are input into a preset initial generation model, and training is performed in a supervised learning manner to obtain a temporary generation model, wherein the temporary generation model is used to generate a sample equipotential map corresponding to the numerical solution; the sample equipotential map includes a plurality of equipotential surfaces or a plurality of equipotential lines, and the numerical solutions on each equipotential surface or each equipotential line are equal;
[0026] Using the plurality of verification data to perform verification processing on the temporary generated model to obtain a verification result;
[0027] Determine whether the verification result is passed;
[0028] If the verification result is passed, the temporary generated model is used as the equipotential map generation model.
[0029] Furthermore, for a two-dimensional physical field, the equipotential map includes a number of equipotential lines; for a three-dimensional physical field, the equipotential map includes a number of equipotential surfaces.
[0030] Furthermore, the physical field includes at least one of a temperature field, a fluid field, a magnetic field, an electric field, and a gravitational field.
[0031] A second aspect of the present invention provides a physical field solving device based on equipotential diagram generation, the device comprising:
[0032] A condition acquisition module, used to acquire a partial differential equation of a physical field, and initial conditions and boundary conditions of the partial differential equation, wherein the partial differential equation is used to express the variation law of the physical quantity of the physical field;
[0033] An equipotential map generation module is used to input the partial differential equation, the initial condition and the boundary condition into a pre-trained equipotential map generation model to generate an equipotential map of the solution distribution of the partial differential equation, wherein the equipotential map includes a plurality of equipotential surfaces or a plurality of equipotential lines; wherein on each equipotential surface or each equipotential line, the numerical value of the physical quantity is equal;
[0034] An association module, used for establishing an association relationship between the physical quantity to be solved of the partial differential equation and the equipotential diagram;
[0035] A solution module is used to solve the physical quantity to be solved from the equipotential diagram according to the association relationship.
[0036] A third aspect of the present invention provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the following steps:
[0037] Obtaining a partial differential equation of a physical field, and initial conditions and boundary conditions of the partial differential equation, wherein the partial differential equation is used to express a change law of a physical quantity of the physical field;
[0038] Inputting the partial differential equation, the initial condition and the boundary condition into a pre-trained equipotential map generation model to generate an equipotential map of the solution distribution of the partial differential equation, wherein the equipotential map includes a plurality of equipotential surfaces or a plurality of equipotential lines; wherein on each equipotential surface or each equipotential line, the numerical value of the physical quantity is equal;
[0039] Establishing a correlation relationship between the physical quantity to be solved of the partial differential equation and the equipotential diagram;
[0040] The physical quantity to be solved is solved from the equipotential diagram according to the association relationship.
[0041] A fourth aspect of the present invention provides a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the processor performs the following steps:
[0042] Obtaining a partial differential equation of a physical field, and initial conditions and boundary conditions of the partial differential equation, wherein the partial differential equation is used to express a change law of a physical quantity of the physical field;
[0043] Inputting the partial differential equation, the initial condition and the boundary condition into a pre-trained equipotential map generation model to generate an equipotential map of the solution distribution of the partial differential equation, wherein the equipotential map includes a plurality of equipotential surfaces or a plurality of equipotential lines; wherein on each equipotential surface or each equipotential line, the numerical value of the physical quantity is equal;
[0044] Establishing a correlation relationship between the physical quantity to be solved of the partial differential equation and the equipotential diagram;
[0045] The physical quantity to be solved is solved from the equipotential diagram according to the association relationship.
[0046] The physical field solution, device, equipment and medium based on equipotential map generation of the present invention obtain the partial differential equation of the physical field, as well as the initial conditions and boundary conditions of the partial differential equation; then input the partial differential equation, the initial conditions and the boundary conditions into a pre-trained equipotential map generation model to generate an equipotential map of the solution distribution of the partial differential equation, wherein the equipotential map includes a plurality of equipotential surfaces or a plurality of equipotential lines; then establish a correlation between the physical quantity to be solved of the partial differential equation and the equipotential map, and solve the physical quantity to be solved from the equipotential map according to the correlation; thereby converting the complex partial differential equation solving problem into visualized equipotential lines or equipotential surfaces, greatly reducing the difficulty of solving the partial differential equation and improving the solving efficiency and accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0048] in:
[0049] Figure 1 An application environment diagram of a physical field solution method based on equipotential diagram generation in one embodiment;
[0050] Figure 2 A flowchart of a physical field solving method based on equipotential diagram generation in one embodiment;
[0051] Figure 3 It is a structural block diagram of a physical field solving device based on equipotential diagram generation in one embodiment;
[0052] Figure 4 FIG. 4 is a structural block diagram of a computer device in one embodiment. DETAILED DESCRIPTION
[0053] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0054] Figure 1 FIG. 1 is an application environment diagram of a physical field solution method based on equipotential diagram generation in an embodiment. Figure 1 , the physical field solution method based on equipotential map generation is applied to the physical field solution system based on equipotential map generation. The physical field solution system based on equipotential map generation includes a terminal 110 and a server 120. The terminal 110 and the server 120 are connected via a network, and the terminal 110 can specifically be a desktop terminal or a mobile terminal, and the mobile terminal can specifically be at least one of a mobile phone, a tablet computer, a laptop computer, etc. The server 120 can be implemented with an independent server or a server cluster composed of multiple servers. The terminal 110 is used to execute the steps of the physical field solution method based on equipotential map generation, and the server 120 is used to store the equipotential map generation model and related data, etc.
[0055] like Figure 2 As shown, in one embodiment, a physical field solution method based on equipotential map generation is provided. The method can be applied to both a terminal and a server. This embodiment is illustrated by applying to a terminal. The physical field solution method based on equipotential map generation specifically includes the following steps:
[0056] S1: Obtaining a partial differential equation of a physical field, as well as initial conditions and boundary conditions of the partial differential equation, wherein the partial differential equation is used to express a change law of a physical quantity of the physical field;
[0057] S2: inputting the partial differential equation, the initial condition and the boundary condition into a pre-trained equipotential map generation model to generate an equipotential map of the solution distribution of the partial differential equation, wherein the equipotential map includes a plurality of equipotential surfaces or a plurality of equipotential lines; wherein on each equipotential surface or each equipotential line, the numerical value of the physical quantity is equal;
[0058] S3: establishing a correlation relationship between the physical quantity to be solved of the partial differential equation and the equipotential diagram;
[0059] S4: Solving the physical quantity to be solved from the equipotential diagram according to the association relationship.
[0060] In this embodiment, in the above step S1, specifically, the physical field includes at least one of a temperature field, a fluid field, a magnetic field, an electric field, and a gravitational field. The physical quantity includes, for example, at least one of temperature, fluid velocity, magnetic field strength, current density, gravity, etc. A partial differential equation is a mathematical expression that describes the changes of physical quantities in a physical field with space and time, etc., and is used as one of the inputs of the generated model, i.e., the object of the model solution. The above initial conditions are the behavior of the partial differential equation at a certain initial time (such as t=0) or initial state, and provide the starting information required to solve the partial differential equation, such as initial displacement, initial velocity or initial temperature. The above boundary conditions refer to the conditions that the solution of the differential equation satisfies on the boundary, which limits the possible value range of the physical quantity in the solution area. For example, in the temperature field, the boundary condition is the temperature value on the specified boundary.
[0061] In the above step S2, the above equipotential map generation model is a pre-trained deep learning model, which receives the partial differential equation and its initial and boundary conditions as input, and outputs the equipotential map of the solution distribution of the partial differential equation. The equipotential map is used to visually display the distribution of points (i.e., equipotential surfaces or equipotential lines) with equal numerical values of physical quantities in the physical field, and provides intuitive physical field distribution information. This step greatly reduces the difficulty of solving the subsequent steps by converting the complex partial differential equation solving problem into an image fitting generation problem. In a specific embodiment, for a two-dimensional physical field, the equipotential map includes a number of equipotential lines; for a three-dimensional physical field, the equipotential map includes a number of equipotential surfaces. The density of equipotential lines or equipotential surfaces in the equipotential map can be adjusted according to the actual situation of the physical field to be solved, and the embodiment of the present invention does not make any special restrictions on this.
[0062] In the above steps S3-S4, the above physical quantity to be solved is the value to be finally solved in the embodiment of the present invention. By analyzing the equipotential map, the correlation between the physical quantity to be solved and the distribution of the physical quantity in the equipotential map is established to realize the conversion of physical quantity information and image information. After the correlation between the physical quantity to be solved and the equipotential map is established, the specific value of the physical quantity to be solved can be extracted from the equipotential map by interpolation, fitting and other methods. Thereby, the difficulty of solving partial differential equations is greatly reduced, the efficiency and accuracy of solving are improved, and it is particularly suitable for processing calculations with complex boundary conditions.
[0063] This embodiment generates equipotential diagrams to intuitively display the distribution characteristics of the physical field, and solves the physical quantities to be solved based on them, which greatly reduces the complexity of solving partial differential equations and improves the solution efficiency and accuracy.
[0064] In a specific embodiment, the step S3 of establishing the association relationship between the physical quantity to be solved of the partial differential equation and the equipotential diagram includes:
[0065] S301: Acquire spatial information of the physical quantity to be solved;
[0066] S302: Determine the coordinates of the desired physical quantity in the equipotential diagram according to the spatial information, and use the coordinates as target solution points.
[0067] In this embodiment, in one implementation, the spatial information in the above step S301 is the user-defined position of the physical quantity to be solved, such as a point in one or more physical scenes. Then in step S302, the physical scene diagram can be directly scaled and stretched to fit the isopotential map, and then the above spatial position can be mapped to the isopotential map, and the corresponding coordinates obtained are the target solution point in the isopotential map.
[0068] In another embodiment, in the above-mentioned step S301, the above-mentioned spatial information is the independent variable value corresponding to the physical quantity, which can be exemplarily a spatial coordinate (such as x, y, z), a time (such as t), etc., for describing the position and moment in the physical field, etc. For example, when solving the velocity field in fluid dynamics, it is necessary to know the velocity value of a specific position (x, y, z) and a certain moment (t), then the spatial coordinate and the moment are used as the independent variable value, and the subsequent steps are used to solve the physical quantity to be solved. Then in step S302, the independent variable value is further converted to the coordinate value in the equipotential map coordinate system, and the converted coordinate value is mapped to the equipotential map to generate the target solution point corresponding to the physical quantity to be solved. The above-mentioned target solution point may fall on an equipotential line or an equipotential surface, or it may be between two equipotential lines or two equipotential surfaces.
[0069] In a specific embodiment, the step S4 of solving the physical quantity to be solved from the equipotential diagram according to the association relationship includes:
[0070] S401: generating a physical quantity change curve passing through the target solution point, wherein the physical quantity change curve is a curve vertically passing through a plurality of equipotential surfaces with different values, or the physical quantity change curve is a curve vertically intersecting a plurality of equipotential lines with different values;
[0071] S402: According to the position of the target solution point on the physical quantity variation curve, a physical quantity value corresponding to the target solution point is calculated, which is a solution of the physical quantity to be solved.
[0072] In this embodiment, in step S401, for a three-dimensional space, multiple equipotential surfaces of different values are selected, straight line segments perpendicular to each equipotential surface are generated, and each straight line segment is smoothly connected to form the above-mentioned physical quantity change curve, and it is ensured that the curve passes through the position of the above-mentioned target solution point. For a two-dimensional plane, multiple equipotential lines of different values are selected, straight line segments perpendicular to each equipotential line are generated, and each straight line segment is smoothly connected to form the above-mentioned physical quantity change curve, and it is ensured that the curve passes through the position of the above-mentioned target solution point. The above-mentioned physical quantity change curve is used to visually display the gradient change trend of the physical quantity in the equipotential diagram.
[0073] In step S402, the position of the target solution point is located on the physical quantity change curve by comparing the coordinates of the target solution point with the coordinates of each point on the curve. Then, an interpolation method can be used to calculate the physical quantity value at the target solution point. The interpolation method can be selected according to the shape of the curve and the distribution of the data points, such as linear interpolation, quadratic interpolation or a higher-order interpolation method. Furthermore, the target solution point can be solved by multiple groups of known values on the physical quantity change curve, and then averaged or selected The median is used to obtain a more accurate solution result.
[0074] In a specific embodiment, the step S402 of calculating the physical quantity value corresponding to the target solution point according to the position of the target solution point on the physical quantity change curve includes:
[0075] S4021: taking the intersection of the physical quantity variation curve and the equipotential surface or the equipotential line as a reference point, obtaining the positions of two reference points closest to the target solution point on the equipotential diagram, taking the two reference points as a first reference point and a second reference point, respectively, taking the value of the physical quantity corresponding to the first reference point as a first value, and taking the value of the physical quantity corresponding to the second reference point as a second value;
[0076] S4022: Acquire a first distance between the target solution point and the first reference point, and acquire a second distance between the target solution point and the second reference point;
[0077] S4023: Determine whether the target solution point is between the first reference point and the second reference point;
[0078] S4024: If yes, then according to the distance ratio between the first distance and the second distance, an interpolation method is used between the first value and the second value to obtain a physical quantity value corresponding to the target solution point corresponding to the distance ratio.
[0079] In the present embodiment, in the above steps S4021-S4022, the intersection of the physical quantity change curve and the equipotential surface (in three-dimensional space) or the equipotential line (on a two-dimensional plane) is used as a reference point. Then, the two intersections closest to the target solution point are selected from all the intersections as the first reference point and the second reference point. It is understandable that the target solution point can be between the first reference point and the second reference point, or outside the first reference point and the second reference point. In another specific embodiment, multiple groups of reference points can be read for multiple calculations to improve accuracy, or to verify the solution result.
[0080] In the above steps S4023-S4024, the relative position relationship between the target solution point and the two reference points is compared. If the coordinate value of the target solution point is between the coordinate values of the two reference points, the solution is calculated in the following manner: calculate the distance ratio between the target solution point and the first reference point and the second reference point; use the distance ratio to interpolate between the first value and the second value, and the interpolation formula can be expressed as: the physical quantity value of the target solution point = the first value + (the second value - the first value) * the distance ratio; the calculated physical quantity value is output as the solution of the target solution point. For the case where it is not between the first reference point and the second reference point, the following formula can be used for calculation: the physical quantity value of the target solution point = the first value + (the second value - the first value) * (the distance from the target solution point to the first reference point / the distance from the first reference point to the second reference point).
[0081] In a specific embodiment, before the step S1 of obtaining the partial differential equation of the physical field, and the initial conditions and boundary conditions of the partial differential equation, the step further includes:
[0082] S01: training the contour map generation model; the training steps of the contour map generation model include:
[0083] S011: discretize the partial differential equation of the sample by finite difference, finite element or spectral method, and obtain the numerical solution of the partial differential equation by repeated iterative solution;
[0084] S012: adding a number of numerical solutions corresponding to the partial differential equations as sample data to a sample data set, and dividing the sample data in the sample data set into a plurality of training data and a plurality of verification data according to a preset ratio;
[0085] S013: inputting the plurality of training data into a preset initial generation model, and performing training processing in a supervised learning manner to obtain a temporary generation model, wherein the temporary generation model is used to generate a sample equipotential map corresponding to the numerical solution; the sample equipotential map includes a plurality of equipotential surfaces or a plurality of equipotential lines, and the numerical solutions on each equipotential surface or each equipotential line are equal;
[0086] S014: using the plurality of verification data to perform verification processing on the temporary generated model to obtain a verification result;
[0087] S015: Determine whether the verification result is passed;
[0088] S016: If the verification result is passed, the temporary generated model is used as the equipotential map generation model.
[0089] In this embodiment, the above step S011 is used to generate input data for training the contour map generation model.
[0090] Sample data. Select an appropriate discretization method based on the type of partial differential equation and the characteristics of the solution domain. The finite difference method is suitable for simple geometric shapes and uniform grids; the finite element method is suitable for complex geometric shapes and non-uniform grids; the spectral method is suitable for periodic problems and problems with smooth solutions. Using the selected discretization method, the partial differential equation is transformed into a system of algebraic equations, and the numerical solution is obtained by solving iterative methods (such as direct iteration method, relaxation iteration method, etc.).
[0091] In the above step S013, the above initial generation model can be, for example, a diffusion model, a generative adversarial network (GAN), a variational autoencoder (VAE), etc. These models use their powerful image generation capabilities to transform complex equation solving problems into image generation processes, thereby achieving efficient equation solving. The model is trained and optimized using a supervised learning method (such as a loss function, etc.) so that it can learn the mapping relationship between the numerical solution and the equipotential map.
[0092] Reference Figure 3 , shows a physical field solving device based on equipotential diagram generation, the device comprising:
[0093] A condition acquisition module 10, used to acquire a partial differential equation of a physical field, and initial conditions and boundary conditions of the partial differential equation, wherein the partial differential equation is used to express the variation law of the physical quantity of the physical field;
[0094] An equipotential map generation module 20 is used to input the partial differential equation, the initial condition and the boundary condition into a pre-trained equipotential map generation model to generate an equipotential map of the solution distribution of the partial differential equation, wherein the equipotential map includes a plurality of equipotential surfaces or a plurality of equipotential lines; wherein on each equipotential surface or each equipotential line, the numerical value of the physical quantity is equal;
[0095] An association module 30, used to establish an association relationship between the physical quantity to be solved of the partial differential equation and the equipotential diagram;
[0096] The solving module 40 is used to solve the physical quantity to be solved from the equipotential diagram according to the association relationship.
[0097] In a specific implementation, the association module 30 includes:
[0098] An independent variable acquisition unit, used to acquire the spatial information of the physical quantity to be solved;
[0099] A mapping unit is used to determine the coordinates of the desired physical quantity in the equipotential diagram according to the spatial information, and use the coordinates as target solution points.
[0100] In a specific implementation, the solution module 40 includes:
[0101] A change curve generating unit, used for generating a physical quantity change curve passing through the target solution point, wherein the physical quantity change curve is a curve vertically passing through a plurality of equipotential surfaces with different values, or the physical quantity change curve is a curve vertically intersecting a plurality of equipotential lines with different values;
[0102] The solving unit is used to calculate the physical quantity value corresponding to the target solving point according to the position of the target solving point on the physical quantity change curve, that is, the solution of the physical quantity to be solved.
[0103] In a specific implementation, the solving unit includes:
[0104] A reference point acquisition subunit, used for taking the intersection of the physical quantity change curve and the equipotential surface or the equipotential line as a reference point, obtaining the positions of two reference points closest to the target solution point on the equipotential diagram, taking the two reference points as a first reference point and a second reference point, respectively, taking the value of the physical quantity corresponding to the first reference point as a first value, and taking the value of the physical quantity corresponding to the second reference point as a second value;
[0105] A distance solving subunit, used for obtaining a first distance between the target solving point and the first reference point, and obtaining a second distance between the target solving point and the second reference point;
[0106] A judging subunit, used for judging whether the target solution point is between the first reference point and the second reference point;
[0107] A solving subunit is used to solve the physical quantity value corresponding to the target solution point corresponding to the distance ratio by interpolation between the first value and the second value according to the distance ratio between the first distance and the second distance if it is between the first reference point and the second reference point.
[0108] In a specific embodiment, the device further comprises:
[0109] A model training module is used to train the equipotential map generation model; the model training module is used to discretize the partial differential equation of the sample through finite difference, finite element or spectral method, and obtain the numerical solution of the partial differential equation through repeated iterative solution; the numerical solutions corresponding to several partial differential equations are used as sample data, added to a sample data set, and the sample data in the sample data set is divided into multiple training data and multiple verification data according to a preset ratio; the multiple training data are input into a preset initial generation model, and trained in a supervised learning manner to obtain a temporary generation model, and the temporary generation model is used to generate a sample equipotential map corresponding to the numerical solution; the sample equipotential map includes several equipotential surfaces or several equipotential lines, and the numerical solutions on each equipotential surface or each equipotential line are equal; the temporary generation model is verified using the multiple verification data to obtain a verification result; it is determined whether the verification result is passed; if the verification result is passed, the temporary generation model is used as the equipotential map generation model.
[0110] In a specific embodiment, for a two-dimensional physical field, the equipotential map includes a number of equipotential lines; for a three-dimensional physical field, the equipotential map includes a number of equipotential surfaces.
[0111] In a specific embodiment, the physical field includes at least one of a temperature field, a fluid field, a magnetic field, an electric field, and a gravitational field.
[0112] This embodiment converts the complex partial differential equation solution problem into visualized equipotential lines or equipotential surfaces, which greatly reduces the difficulty of solving the partial differential equation and improves the solution efficiency and accuracy.
[0113] Figure 4 FIG. 1 shows an internal structure diagram of a computer device in an embodiment. The computer device may be a terminal or a server. Figure 4 As shown, the computer device includes a processor, a memory and a network interface connected via a system bus. The memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system and may also store a computer program. When the computer program is executed by the processor, the processor may implement a physical field solution method based on equipotential map generation. The internal memory may also store a computer program. When the computer program is executed by the processor, the processor may implement a physical field solution method based on equipotential map generation. Those skilled in the art will understand that Figure 4The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0114] In one embodiment, a computer device is provided, comprising a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the following steps:
[0115] Obtaining a partial differential equation of a physical field, and initial conditions and boundary conditions of the partial differential equation, wherein the partial differential equation is used to express a change law of a physical quantity of the physical field;
[0116] Inputting the partial differential equation, the initial condition and the boundary condition into a pre-trained equipotential map generation model to generate an equipotential map of the solution distribution of the partial differential equation, wherein the equipotential map includes a plurality of equipotential surfaces or a plurality of equipotential lines; wherein on each equipotential surface or each equipotential line, the numerical value of the physical quantity is equal;
[0117] Establishing a correlation relationship between the physical quantity to be solved of the partial differential equation and the equipotential diagram;
[0118] The physical quantity to be solved is solved from the equipotential diagram according to the association relationship.
[0119] This embodiment converts the complex partial differential equation solution problem into visualized equipotential lines or equipotential surfaces, which greatly reduces the difficulty of solving the partial differential equation and improves the solution efficiency and accuracy.
[0120] In one embodiment, a computer-readable storage medium is provided, storing a computer program, wherein when the computer program is executed by a processor, the processor performs the following steps:
[0121] Obtaining a partial differential equation of a physical field, and initial conditions and boundary conditions of the partial differential equation, wherein the partial differential equation is used to express a change law of a physical quantity of the physical field;
[0122] Inputting the partial differential equation, the initial condition and the boundary condition into a pre-trained equipotential map generation model to generate an equipotential map of the solution distribution of the partial differential equation, wherein the equipotential map includes a plurality of equipotential surfaces or a plurality of equipotential lines; wherein on each equipotential surface or each equipotential line, the numerical value of the physical quantity is equal;
[0123] Establishing a correlation relationship between the physical quantity to be solved of the partial differential equation and the equipotential diagram;
[0124] The physical quantity to be solved is solved from the equipotential diagram according to the association relationship.
[0125] This embodiment converts the complex partial differential equation solution problem into visualized equipotential lines or equipotential surfaces, which greatly reduces the difficulty of solving the partial differential equation and improves the solution efficiency and accuracy.
[0126] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing related hardware through a computer program, and the program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct RAMbus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM), etc.
[0127] The technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0128] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A physical field solving method based on equipotential diagram generation, characterized in that: The method comprises: Obtaining a partial differential equation of a physical field, and initial conditions and boundary conditions of the partial differential equation, wherein the partial differential equation is used to express a change law of a physical quantity of the physical field; Inputting the partial differential equation, the initial condition and the boundary condition into a pre-trained equipotential map generation model to generate an equipotential map of the solution distribution of the partial differential equation, wherein the equipotential map includes a plurality of equipotential surfaces or a plurality of equipotential lines; wherein on each equipotential surface or each equipotential line, the numerical value of the physical quantity is equal; Establishing a correlation relationship between the physical quantity to be solved of the partial differential equation and the equipotential diagram; The physical quantity to be solved is solved from the equipotential diagram according to the association relationship.
2. The physical field solving method based on equipotential diagram generation according to claim 1 is characterized in that: The step of establishing the association relationship between the physical quantity to be solved of the partial differential equation and the equipotential diagram comprises: Acquiring spatial information of the physical quantity to be solved; According to the spatial information, the coordinates of the desired physical quantity in the equipotential diagram are determined, and the coordinates are used as target solution points.
3. The physical field solving method based on equipotential diagram generation according to claim 2 is characterized in that: The step of solving the physical quantity to be solved from the equipotential diagram according to the association relationship comprises: Generate a physical quantity change curve passing through the target solution point, wherein the physical quantity change curve is a curve vertically passing through a plurality of equipotential surfaces with different values, or the physical quantity change curve is a curve vertically intersecting a plurality of equipotential lines with different values; According to the position of the target solution point on the physical quantity variation curve, the physical quantity value corresponding to the target solution point is calculated, which is the solution of the physical quantity to be solved.
4. The physical field solving method based on equipotential diagram generation according to claim 3 is characterized in that: The step of calculating the physical quantity value corresponding to the target solution point according to the position of the target solution point on the physical quantity change curve comprises: Taking the intersection of the physical quantity variation curve and the equipotential surface or the equipotential line as a reference point, obtaining the positions of two reference points closest to the target solution point on the equipotential diagram, taking the two reference points as a first reference point and a second reference point, respectively, taking the value of the physical quantity corresponding to the first reference point as a first value, and taking the value of the physical quantity corresponding to the second reference point as a second value; Acquire a first distance between the target solution point and the first reference point, and acquire a second distance between the target solution point and the second reference point; Determining whether the target solution point is between the first reference point and the second reference point; If so, based on the distance ratio between the first distance and the second distance, an interpolation method is used between the first value and the second value to obtain a physical quantity value corresponding to the target solution point corresponding to the distance ratio.
5. The physical field solving method based on equipotential diagram generation according to claim 1 is characterized in that: Before the step of obtaining the partial differential equation of the physical field and the initial conditions and boundary conditions of the partial differential equation, the method further includes: Training the contour map generation model; the training steps of the contour map generation model include: Discretizing the partial differential equation of the sample by finite difference, finite element or spectral method, and obtaining the numerical solution of the partial differential equation by repeated iterative solution; Numerical solutions corresponding to the partial differential equations are added as sample data to a sample data set, and the sample data in the sample data set is divided into a plurality of training data and a plurality of verification data according to a preset ratio; The plurality of training data are input into a preset initial generation model, and training is performed in a supervised learning manner to obtain a temporary generation model, wherein the temporary generation model is used to generate a sample equipotential map corresponding to the numerical solution; the sample equipotential map includes a plurality of equipotential surfaces or a plurality of equipotential lines, and the numerical solutions on each equipotential surface or each equipotential line are equal; Using the plurality of verification data to perform verification processing on the temporary generated model to obtain a verification result; Determine whether the verification result is passed; If the verification result is passed, the temporary generated model is used as the equipotential map generation model.
6. The physical field solving method based on equipotential diagram generation according to claim 1 is characterized in that: For a two-dimensional physical field, the equipotential map includes a number of equipotential lines; for a three-dimensional physical field, the equipotential map includes a number of equipotential surfaces.
7. The physical field solving method based on equipotential diagram generation according to claim 1 is characterized in that: The physical field includes at least one of a temperature field, a fluid field, a magnetic field, an electric field, and a gravitational field.
8. A physical field solving device based on equipotential diagram generation, characterized in that: The device comprises: A condition acquisition module, used to acquire a partial differential equation of a physical field, and initial conditions and boundary conditions of the partial differential equation, wherein the partial differential equation is used to express the variation law of the physical quantity of the physical field; An equipotential map generation module is used to input the partial differential equation, the initial condition and the boundary condition into a pre-trained equipotential map generation model to generate an equipotential map of the solution distribution of the partial differential equation, wherein the equipotential map includes a plurality of equipotential surfaces or a plurality of equipotential lines; wherein on each equipotential surface or each equipotential line, the numerical value of the physical quantity is equal; An association module, used for establishing an association relationship between the physical quantity to be solved of the partial differential equation and the equipotential diagram; A solution module is used to solve the physical quantity to be solved from the equipotential diagram according to the association relationship.
9. A computer-readable storage medium, characterized in that: A computer program is stored, and when the computer program is executed by a processor, the processor executes the steps of the physical field solution method based on equipotential map generation as described in any one of claims 1 to 7.
10. A computer device, characterized in that: The device includes a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the physical field solution method based on equipotential map generation as described in any one of claims 1 to 7.
Citation Information
Patent Citations
A 3D point cloud path planning method based on a spatial quadtree
CN109840937A
Novel dynamic grid algorithm for chemical flooding numerical reservoir simulation
CN117436296A
Hydromechanics partial differential equation solving device based on autoregressive neural network
CN118586311A
System and method for fast solution of partial differential equations, based on an eigenpermittivity modal approach
US20240354365A1
Discretized physics-based models and simulations of subterranean regions, and methods for creating and using the same
WO2011043862A1