Physical field solving method, device and equipment based on equipotential map generation and medium
By using a method based on equipotential diagram generation, the problem of solving complex nonlinear partial differential equations in existing technologies is solved, achieving efficient and accurate solutions for physical fields. This method is applicable to solving physical fields such as temperature fields, fluid fields, magnetic fields, electric fields, and gravitational fields.
Patent Information
- Application Number
- CN202411879606.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-19
- Publication Date
- 2025-12-30
- Estimated Expiration
- 2044-12-19
AI Technical Summary
Existing technologies are difficult to effectively solve complex nonlinear partial differential equations, especially when faced with complex boundary conditions. Traditional methods such as variational methods, finite difference methods and spectral methods are difficult to meet the needs of practical applications. Furthermore, physical information neural networks are time-consuming to train and are prone to getting stuck in local optima.
An equipotential graph generation method is adopted. By obtaining the partial differential equation, initial conditions and boundary conditions, and inputting a pre-trained equipotential graph generation model, an equipotential graph is generated. The correlation between the physical quantities to be solved in the partial differential equation and the equipotential graph is established, thereby solving for the physical quantities to be solved.
Transforming complex partial differential equation solving problems into visual equipotential lines or equipotential surfaces reduces the difficulty of solving the problem and improves the efficiency and accuracy of solving the problem. It is particularly suitable for handling calculations with complex boundary conditions.
Smart Images

Figure CN119848399B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of image generation, in particular to a physical field solving method, device, equipment and medium based on equipotential map generation. BACKGROUND
[0002] Nonlinear partial differential equations (PDEs) are mathematical tools for describing physical fields in the fields of physics, engineering, mathematics, etc. involving multiple independent variables and having nonlinear characteristics. They are very important in describing complex systems and dynamic processes in nature. However, for most nonlinear partial differential equations, solving is usually very complex. Traditional methods such as variational method, finite difference method, finite element method and spectral method are often difficult to effectively solve when facing complex boundary conditions, or there are difficulties in mesh division, which cannot meet the needs in 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 (PINNs) as a new data-driven method have gradually received widespread attention in the academic community. PINNs directly incorporate 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, PINNs still face many challenges in practical applications, such as the training process is very time-consuming and easy to fall into local optimal solution due to the involvement of complex optimization, especially for nonlinear strong partial differential equations, the training may not easily converge. SUMMARY
[0004] Therefore, it is necessary to propose a physical field solving method, device, equipment and medium based on equipotential map generation to solve the problem that existing nonlinear partial differential equations are difficult to effectively solve.
[0005] The first aspect of the present application provides a physical field solving method based on equipotential map 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 the variation law of the physical quantity of the physical field;
[0007] inputting 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, the equipotential map comprising a plurality of equipotential surfaces or a plurality of equipotential lines; wherein the numerical value of the physical quantity is equal on each equipotential surface or each equipotential line;
[0008] establishing a correlation between the to-be-solved physical quantity of the partial differential equation and the equipotential map;
[0009] solving the to-be-solved physical quantity from the equipotential map according to the correlation.
[0010] Further, the step of establishing the correlation between the to-be-solved physical quantity of the partial differential equation and the equipotential map comprises:
[0011] acquiring spatial information of the to-be-solved physical quantity;
[0012] determining coordinates of the to-be-solved physical quantity in the equipotential map according to the spatial information, and taking the coordinates as a target solving point.
[0013] Further, the step of solving the to-be-solved physical quantity from the equipotential map according to the correlation comprises:
[0014] generating a physical quantity change curve passing through the target solving point, the physical quantity change curve being a curve vertically passing through a plurality of equipotential surfaces with different values, or the physical quantity change curve being a curve vertically intersecting a plurality of equipotential lines with different values;
[0015] calculating a physical quantity value corresponding to the target solving point according to a position of the target solving point on the physical quantity change curve, the physical quantity value being a solution of the to-be-solved physical quantity.
[0016] Further, the step of calculating a physical quantity value corresponding to the target solving point according to a position of the target solving point on the physical quantity change curve comprises:
[0017] taking an intersection point of the physical quantity change curve and the equipotential surface or the equipotential line as a reference point, acquiring positions of two reference points closest to the target solving point on the equipotential map, taking the two reference points as a first reference point and a second reference point respectively, taking a physical quantity value corresponding to the first reference point as a first value, and taking a physical quantity value corresponding to the second reference point as a second value;
[0018] acquiring a first distance between the target solving point and the first reference point, and acquiring a second distance between the target solving point and the second reference point;
[0019] judging whether the target solving point is between the first reference point and the second reference point;
[0020] if yes, calculating a physical quantity value corresponding to the target solving point according to a distance ratio of the first distance and the second distance by interpolation between the first value and the second value.
[0021] Further, before the steps of obtaining the partial differential equation of the physical field, and the initial condition and the boundary condition of the partial differential equation, the method further comprises the steps of:
[0022] training the equipotential map generation model; the training step of the equipotential map generation model comprises:
[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 iterative iteration;
[0024] numerical solutions corresponding to a plurality of the partial differential equations are taken as sample data, and are added to a sample data set, and sample data in the sample data set are divided into a plurality of training data and a plurality of verification data according to a preset proportion;
[0025] the plurality of training data are input into a preset initial generation model, and a supervised learning manner is adopted for training processing, so as to obtain a temporary generation model, the temporary generation model is used for generating a sample equipotential map corresponding to the numerical solution; the sample equipotential map comprises a plurality of equipotential surfaces or a plurality of equipotential lines, and the numerical solution on each equipotential surface or each equipotential line is equal;
[0026] the plurality of verification data are used for verifying the temporary generation model, so as to obtain a verification result;
[0027] it is judged whether the verification result passes or not;
[0028] if the verification result passes, the temporary generation model is taken as the equipotential map generation model.
[0029] Further, for a two-dimensional physical field, the equipotential map comprises a plurality of equipotential lines; and for a three-dimensional physical field, the equipotential map comprises a plurality of equipotential surfaces.
[0030] Further, the physical field comprises at least one of a temperature field, a fluid field, a magnetic field, an electric field and a gravitational field.
[0031] The second aspect of the application provides a physical field solving device based on equipotential map generation, the device comprises:
[0032] a condition obtaining module, configured to obtain a partial differential equation of a physical field, and an initial condition and a boundary condition of the partial differential equation, wherein the partial differential equation is used to express the variation rule of the physical quantity of the physical field;
[0033] An equipotential map generation module is configured 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 a solution distribution of the partial differential equation, wherein the equipotential map includes a plurality of equipotential surfaces or a plurality of equipotential lines, and the physical quantity has the same value on each equipotential surface or each equipotential line.
[0034] An association module is configured to establish an association between the physical quantity to be solved and the equipotential map.
[0035] A solution module is configured to solve the physical quantity to be solved from the equipotential map according to the association.
[0036] A third aspect of the present application provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the computer program is executed by the processor to make the processor perform the following steps:
[0037] obtaining a partial differential equation of a physical field, and an initial condition and a boundary condition of the partial differential equation, wherein the partial differential equation is used to express a change rule 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 a solution distribution of the partial differential equation, wherein the equipotential map includes a plurality of equipotential surfaces or a plurality of equipotential lines, and the physical quantity has the same value on each equipotential surface or each equipotential line;
[0039] establishing an association between the physical quantity to be solved and the equipotential map;
[0040] solving the physical quantity to be solved from the equipotential map according to the association.
[0041] A fourth aspect of the present application provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to make the processor perform the following steps:
[0042] obtaining a partial differential equation of a physical field, and an initial condition and a boundary condition of the partial differential equation, wherein the partial differential equation is used to express a change rule 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 a solution distribution of the partial differential equation, wherein the equipotential map includes a plurality of equipotential surfaces or a plurality of equipotential lines, and the physical quantity has the same value on each equipotential surface or each equipotential line;
[0044] establish a correlation between the physical quantity to be solved of the partial differential equation and the equipotential map;
[0045] solving the physical quantity to be solved from the equipotential map according to the correlation.
[0046] The physical field solving based on the equipotential map generation, the device, the equipment and the medium provided by the application, by obtaining the partial differential equation of the physical field, and the initial condition and the boundary condition of the partial differential equation; then inputting the partial differential equation, the initial condition and the boundary condition into the pre-trained equipotential map generation model to generate the equipotential map of the solution distribution of the partial differential equation, the equipotential map including a plurality of equipotential surfaces or a plurality of equipotential lines; then establishing the correlation between the physical quantity to be solved of the partial differential equation and the equipotential map, and solving the physical quantity to be solved from the equipotential map according to the correlation; thereby converting the complex partial differential equation solving problem into the visualized equipotential line or equipotential surface, greatly reducing the solving difficulty of the partial differential equation, and improving the solving efficiency and accuracy. BRIEF DESCRIPTION OF DRAWINGS
[0047] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or the prior art description. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0048] Among them:
[0049] Figure 1 It is an application environment diagram of the physical field solving method based on the equipotential map generation in an embodiment;
[0050] Figure 2 It is a flowchart of the physical field solving method based on the equipotential map generation in an embodiment;
[0051] Figure 3 It is a structure block diagram of the physical field solving device based on the equipotential map generation in an embodiment;
[0052] Figure 4 It is a structure block diagram of the computer equipment in an embodiment. DETAILED DESCRIPTION
[0053] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.
[0054] Figure 1 An application environment diagram of a physical field solving method based on equipotential map in an embodiment. Referring to Figure 1 , the physical field solving method based on equipotential map is applied to a physical field solving system based on equipotential map. The physical field solving system based on equipotential map includes a terminal 110 and a server 120. The terminal 110 and the server 120 are connected through a network, and the terminal 110 can be a desktop terminal or a mobile terminal, and the mobile terminal can be at least one of a mobile phone, a tablet computer, a notebook computer, etc. The server 120 can be implemented by an independent server or a server cluster composed of multiple servers. The terminal 110 is used to execute the steps of the physical field solving method based on equipotential map, and the server 120 is used to store the equipotential map generation model and related data, etc.
[0055] As shown in Figure 2 , in an embodiment, a physical field solving method based on equipotential map is provided. The method can be applied to a terminal or a server, and the embodiment is exemplified by application to a terminal. The physical field solving method based on equipotential map specifically includes the following steps:
[0056] S1: 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 the variation law of a physical quantity of the physical field;
[0057] S2: inputting 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, the equipotential map including a plurality of equipotential surfaces or a plurality of equipotential lines; wherein the numerical value of the physical quantity is equal on each equipotential surface or each equipotential line;
[0058] S3: establishing a correlation between the physical quantity to be solved of the partial differential equation and the equipotential map;
[0059] S4: solving the physical quantity to be solved from the equipotential map according to the correlation.
[0060] In the step S1, 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 at least one of temperature, fluid velocity, magnetic field intensity, current density, and gravity. The partial differential equation is a mathematical expression describing the change of the physical quantity in the physical field with respect to space and time, and is one of the inputs of the generation model, i.e., the object of the model solving. The initial condition is the behavior of the partial differential equation at an initial time (e.g., t=0) or an initial state, and provides the starting information required for solving the partial differential equation, such as initial displacement, initial velocity, or initial temperature. The boundary condition is a condition that the solution of the differential equation satisfies on the boundary, and limits the possible value range of the physical quantity in the solving region, for example, in the temperature field, the boundary condition is to specify the temperature value on the boundary.
[0061] In the step S2, the equipotential map generation model is a pre-trained deep learning model, which receives the partial differential equation and its initial and boundary conditions as inputs, and outputs the equipotential map of the solution distribution of the partial differential equation. The equipotential map is used to visually show the distribution of points with equal values of the physical quantity in the physical field (i.e., equipotential surfaces or equipotential lines), and provides intuitive physical field distribution information. This step converts the complex partial differential equation solving problem into an image fitting generation problem, greatly reducing the solving difficulty of the subsequent steps. In one specific embodiment, for a two-dimensional physical field, the equipotential map includes a plurality of equipotential lines; for a three-dimensional physical field, the equipotential map includes a plurality of equipotential surfaces. The density of the equipotential lines or surfaces in the equipotential map can be adjusted according to the actual situation of the physical field to be solved, and the embodiments of the present application do not make special limitations thereon.
[0062] In the steps S3-S4, the physical quantity to be solved is the numerical value to be finally solved by the embodiments of the present application. By analyzing the equipotential map, the correlation between the physical quantity to be solved and the physical quantity distribution in the equipotential map is established, and the conversion between the physical quantity information and the image information is realized. After the correlation between the physical quantity to be solved and the equipotential map is established, the specific numerical value of the physical quantity to be solved can be extracted from the equipotential map by interpolation, fitting, or the like. Thus, the solving difficulty of the partial differential equation is greatly reduced, the solving efficiency and accuracy are improved, and it is particularly suitable for handling complex boundary conditions.
[0063] The embodiments of the present application can intuitively show the distribution characteristics of the physical field by generating the equipotential map, and solve the physical quantity to be solved accordingly, greatly reducing the complexity of solving the partial differential equation, and improving the solving efficiency and accuracy.
[0064] In one specific embodiment, the step S3 of establishing the correlation between the physical quantity to be solved of the partial differential equation and the equipotential map includes:
[0065] S301: Obtain spatial information of the physical quantity to be solved;
[0066] S302: According to the spatial information, determine the coordinates of the physical quantity to be solved in the equipotential map, and take the coordinates as the target solving point.
[0067] In one embodiment of the present embodiment, the spatial information in step S301 is the position of the physical quantity to be solved defined by the user, such as a point in one or more real scenes. In step S302, the spatial position can be directly mapped to the equipotential map by scaling or stretching the real scene map to the equipotential map, and the corresponding coordinates obtained are the target solving point in the equipotential map.
[0068] In another embodiment, the spatial information in step S301 is the independent variable value corresponding to the physical quantity, which can be, for example, spatial coordinates (such as x, y, z), time (such as t), etc., for describing the position and time in the physical field. For example, when solving the velocity field in fluid dynamics, the velocity value at a specific position (x, y, z) and time (t) needs to be known, and the spatial coordinates and time values are used as independent variable values for subsequent steps to solve the physical quantity to be solved. In step S302, the independent variable values are further converted into coordinate values in the coordinate system of the equipotential map, and the converted coordinate values are mapped to the equipotential map to generate the target solving point corresponding to the physical quantity to be solved. The target solving point may fall on an equipotential line or an equipotential surface, or between two equipotential lines or two equipotential surfaces.
[0069] In one specific embodiment, the step S4 of solving the physical quantity to be solved from the equipotential map according to the correlation comprises:
[0070] S401: Generate a physical quantity change curve passing through the target solving point, wherein the physical quantity change curve is a curve perpendicular to a plurality of equipotential surfaces with different values, or the physical quantity change curve is a curve perpendicular to a plurality of equipotential lines with different values;
[0071] S402: According to the position of the target solving point on the physical quantity change curve, calculate the physical quantity value corresponding to the target solving point, which is the solution of the physical quantity to be solved.
[0072] In this embodiment, in step S401, for a three-dimensional space, a plurality of equipotential surfaces of different values are selected, straight line segments perpendicular to each equipotential surface are generated, and the straight line segments are smoothly connected to form the physical quantity change curve, and the curve is ensured to pass through the position of the target solving point. For a two-dimensional plane, a plurality of equipotential lines of different values are selected, straight line segments perpendicular to each equipotential line are generated, and the straight line segments are smoothly connected to form the physical quantity change curve, and the curve is ensured to pass through the position of the target solving point. The physical quantity change curve is used to visually show the gradient change trend of the physical quantity in the equipotential map.
[0073] In step S402, the position of the target solving point on the physical quantity change curve is located by comparing the coordinates of the target solving 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 solving 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 higher order interpolation method. Further, the target solving point can also be solved by a plurality of known values on the physical quantity change curve, and then the solving result is obtained by averaging or selecting the median value, etc.
[0074] In one specific embodiment, the step S402 of calculating 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 comprises:
[0075] S4021: Taking the intersection point of the physical quantity change curve and the equipotential surface or the equipotential line as a reference point, obtaining the positions of the two reference points closest to the target solving point on the equipotential map, 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: 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;
[0077] S4023: Determining whether the target solving point is between the first reference point and the second reference point;
[0078] S4024: If yes, the physical quantity value corresponding to the target solving point corresponding to the distance ratio is obtained by interpolation between the first value and the second value according to the distance ratio of the first distance and the second distance.
[0079] In the embodiment, in steps S4021-S4022, the intersection of the physical quantity change curve and the equipotential surface (in three-dimensional space) or the equipotential line (in a two-dimensional plane) is taken as the reference point. Then, from all the intersection points, the two intersection points closest to the target solution point are selected as the first reference point and the second reference point. It can be understood 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 sets of reference points can be read for multiple calculations to improve accuracy or verify the solution result.
[0080] In 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 as follows: the distance ratio between the target solution point and the first reference point and the second reference point is calculated; the distance ratio is used 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 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 one specific embodiment, before step S1 of obtaining the partial differential equation of the physical field, and the initial condition and the boundary condition of the partial differential equation, the steps further comprise:
[0082] S01: training the equipotential map generation model; the training steps of the equipotential map generation model comprise:
[0083] S011: 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 iteration;
[0084] S012: adding the numerical solutions corresponding to a plurality of 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 proportion;
[0085] S013: inputting the plurality of training data into a preset initial generation model, and training and processing in a supervised learning manner to obtain a temporary generation model, the temporary generation model being used to generate a sample equipotential map corresponding to the numerical solution; the sample equipotential map comprises 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: verifying the temporarily generated model using the plurality of verification data to obtain a verification result;
[0087] S015: determining whether the verification result passes;
[0088] S016: if the verification result passes, taking the temporarily generated model as the equipotential map generation model.
[0089] In the embodiment, the step S011 is used to generate input data for training the equipotential map generation model.
[0090] Sample data. According to the type of partial differential equation and the characteristics of the solution domain, a suitable discretization method is selected. Finite difference method is suitable for simple geometric shape and uniform grid; finite element method is suitable for complex geometric shape and non-uniform grid; spectral method is suitable for periodic problems and problems with smooth solutions. Using the selected discretization method, the partial differential equation is converted into an algebraic equation system, and the numerical solution is obtained by iterative method (such as direct iteration method, relaxation iteration method, etc.).
[0091] In the step S013, the initial generation model can be, for example, diffusion model, generative adversarial network (GAN), variational autoencoder (VAE) and the like. These models use their powerful image generation ability to convert complex equation solving problems into image generation process, so as to realize efficient equation solving. Using supervised learning method (such as loss function, etc.), the model is trained and optimized, so as to learn the mapping relationship between numerical solution and equipotential map.
[0092] Referring to Figure 3 , a physical field solving device based on equipotential map generation is shown, which comprises:
[0093] A condition acquisition module 10 is configured 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 configured to 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 comprises a plurality of equipotential surfaces or a plurality of equipotential lines; wherein the numerical value of the physical quantity is equal on each equipotential surface or each equipotential line;
[0095] An association module 30 is configured to establish an association relationship between the to-be-solved physical quantity of the partial differential equation and the equipotential map;
[0096] A solving module 40 is configured to solve the to-be-solved physical quantity from the equipotential map according to the correlation.
[0097] In one embodiment, the correlation module 30 comprises:
[0098] An independent variable acquisition unit is configured to acquire spatial information of the to-be-solved physical quantity.
[0099] A mapping unit is configured to determine coordinates of the to-be-solved physical quantity in the equipotential map according to the spatial information, and take the coordinates as a target solving point.
[0100] In one embodiment, the solving module 40 comprises:
[0101] A change curve generation unit is configured to generate a physical quantity change curve passing through the target solving point, the physical quantity change curve being a curve vertically passing through a plurality of equipotential surfaces with different values, or the physical quantity change curve being a curve vertically intersecting a plurality of equipotential lines with different values.
[0102] A solving unit is configured to calculate a physical quantity value corresponding to the target solving point according to a position of the target solving point on the physical quantity change curve, so as to obtain a solution of the to-be-solved physical quantity.
[0103] In one embodiment, the solving unit comprises:
[0104] A reference point acquisition subunit is configured to take an intersection point of the physical quantity change curve and the equipotential surface or the equipotential line as a reference point, acquire positions of two reference points closest to the target solving point on the equipotential map, take the two reference points as a first reference point and a second reference point respectively, take a physical quantity value corresponding to the first reference point as a first value, and take a physical quantity value corresponding to the second reference point as a second value.
[0105] A distance solving subunit is configured to acquire a first distance between the target solving point and the first reference point, and acquire a second distance between the target solving point and the second reference point.
[0106] A judging subunit is configured to judge whether the target solving point is between the first reference point and the second reference point.
[0107] A solving subunit is configured to, if the target solving point is between the first reference point and the second reference point, solve a physical quantity value corresponding to the target solving point according to a distance ratio of the first distance and the second distance by interpolation between the first value and the second value.
[0108] In one specific embodiment, the device further comprises:
[0109] The model training module is configured to discretize partial differential equations of samples by finite difference, finite element or spectral method, to obtain numerical solutions of the partial differential equations by iterative solving, to add numerical solutions corresponding to the partial differential equations as sample data into a sample data set, to divide the sample data in the sample data set into a plurality of training data and a plurality of verification data according to a preset proportion, to input the plurality of training data into a preset initial generation model, to train and process the initial generation model in a supervised learning manner to obtain a temporary generation model, the temporary generation model being configured to generate sample equipotential maps corresponding to the numerical solutions, the sample equipotential maps including a plurality of equipotential surfaces or a plurality of equipotential lines, numerical solutions on each equipotential surface or each equipotential line being equal, to verify the temporary generation model by using the plurality of verification data to obtain a verification result, to determine whether the verification result is passed, and to take the temporary generation model as the equipotential map generation model if the verification result is passed.
[0110] In one specific embodiment, for a two-dimensional physical field, the equipotential map includes a plurality of equipotential lines, and for a three-dimensional physical field, the equipotential map includes a plurality of equipotential surfaces.
[0111] In one 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] The embodiment converts a complex partial differential equation solving problem into visualized equipotential lines or equipotential surfaces, greatly reduces the solving difficulty of the partial differential equation, and improves the solving efficiency and accuracy.
[0113] Figure 4 An internal structure diagram of a computer device in one embodiment is shown. The computer device can be a terminal or a server. As shown in Figure 4 The computer device includes a processor, a memory and a network interface connected by 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 can also store a computer program, which, when executed by the processor, can enable the processor to implement the physical field solving method based on equipotential map generation. The internal memory can also store a computer program, which, when executed by the processor, can enable the processor to execute the physical field solving method based on equipotential map generation. Those skilled in the art can understand that Figure 4The structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. A specific computer device can 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, the memory storing a computer program, the computer program being executed by the processor to cause the processor to perform 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 variation law of a physical quantity of the physical field;
[0116] inputting 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 a solution distribution of the partial differential equation, the equipotential map including 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 between a to-be-solved physical quantity of the partial differential equation and the equipotential map;
[0118] solving the to-be-solved physical quantity from the equipotential map according to the correlation.
[0119] The embodiment converts a complex partial differential equation solving problem into a visualized equipotential line or equipotential surface, greatly reducing the difficulty of solving the partial differential equation and improving the solving efficiency and accuracy.
[0120] In one embodiment, a computer readable storage medium is provided, storing a computer program, the computer program being executed by a processor to cause the processor to perform 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 variation law of a physical quantity of the physical field;
[0122] inputting 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 a solution distribution of the partial differential equation, the equipotential map including 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 between a to-be-solved physical quantity of the partial differential equation and the equipotential map;
[0124] According to the correlation, the physical quantity to be solved is solved from the equipotential map.
[0125] The embodiment converts the complex partial differential equation solving problem into the visualized equipotential line or equipotential surface, greatly reduces the solving difficulty of the partial differential equation, and improves the solving efficiency and accuracy.
[0126] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by a computer program instructing related hardware. 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 above-mentioned embodiments. Any reference to memory, storage, database or other medium used in the embodiments provided by the present application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration but not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synch link) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM) and memory bus dynamic RAM (RDRAM).
[0127] The technical features of the above embodiments can be combined in any way. To make the description concise, not all possible combinations of the technical features in the above embodiments are described, but as long as the combinations of the technical features do not exist contradictions, they should be considered as the scope of the present application.
[0128] The above embodiments only express several implementation manners of the present application, and the description is more specific and detailed, but it should not be understood as a limitation on the scope of the patent of the present application. It should be pointed out that for ordinary skilled in the art, without departing from the concept of the present application, some modifications and improvements can be made, which are all within the protection scope of the present application. Therefore, the protection scope of the patent of the present application should be subject to the appended claims.
Claims
1. A physical field solving method based on equipotential map 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 the variation law of a physical quantity of the physical field; the physical field is a fluid field, the physical quantity is fluid velocity, the initial conditions are initial velocity, and the boundary conditions are used to define a solution region of fluid velocity; inputting 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 a solution distribution of the partial differential equation, wherein the equipotential map comprises a plurality of equipotential surfaces or a plurality of equipotential lines; wherein the numerical value of the physical quantity is equal on each equipotential surface or each equipotential line; obtaining spatial information of a to-be-solved physical quantity; wherein the spatial information is spatial coordinates and corresponding time of the fluid field, and the to-be-solved physical quantity is a fluid velocity value at a specific spatial position and a specific time; determining the coordinates of the to-be-solved physical quantity in the equipotential map according to the spatial information, and taking the coordinates as a target solution point; generating a physical quantity variation curve passing through the target solution point, wherein the physical quantity variation curve is a curve vertically passing through a plurality of equipotential surfaces with different numerical values, or the physical quantity variation curve is a curve vertically intersecting a plurality of equipotential lines with different numerical values; calculating the numerical value of the physical quantity corresponding to the target solution point according to the position of the target solution point on the physical quantity variation curve, that is, the fluid velocity value at the specific spatial position and the specific time.
2. The physical field solving method based on equipotential map generation according to claim 1, wherein, The step of calculating the numerical value of the physical quantity corresponding to the target solution point according to the position of the target solution point on the physical quantity variation curve comprises: taking the intersection point of the physical quantity variation curve and the equipotential surface or the equipotential line as a reference point, obtaining the positions of the two reference points closest to the target solution point on the equipotential map, taking the two reference points as a first reference point and a second reference point respectively, taking the numerical value of the physical quantity corresponding to the first reference point as a first numerical value, and taking the numerical value of the physical quantity corresponding to the second reference point as a second numerical value; obtaining a first distance between the target solution point and the first reference point, and obtaining 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 yes, calculating the numerical value of the physical quantity corresponding to the target solution point corresponding to the distance ratio of the first distance and the second distance by interpolation between the first numerical value and the second numerical value.
3. The method of claim 1, wherein, Before the step of obtaining the partial differential equation of the physical field, and the initial conditions and the boundary conditions of the partial differential equation, the method further comprises: training the equipotential map generation model; the training steps of the equipotential map generation model comprise: 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 iteration. numerical solutions of the partial differential equations are taken as sample data, added to a sample data set, and sample data in the sample data set is divided into multiple training data and multiple verification data according to a preset proportion; the multiple training data are input into a preset initial generation model, and training processing is performed in a supervised learning manner to obtain a temporary generation model, the temporary generation model being used to generate a sample equipotential map corresponding to the numerical solutions; the sample equipotential map includes a plurality of equipotential surfaces or a plurality of equipotential lines, and numerical solutions on each equipotential surface or each equipotential line are equal; the multiple verification data are used to verify the temporary generation model to obtain a verification result; it is determined whether the verification result passes; if the verification result passes, the temporary generation model is taken as the equipotential map generation model.
4. The method of claim 1, wherein, For a two-dimensional physical field, the equipotential map includes a plurality of equipotential lines; for a three-dimensional physical field, the equipotential map includes a plurality of equipotential surfaces.
5. The method of claim 1, wherein, The physical field includes at least one of a temperature field, a fluid field, a magnetic field, an electric field, and a gravitational field.
6. An apparatus for solving a physical field based on an equipotential map generation, characterized by, The apparatus includes: a condition acquisition module configured 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 a variation law of a physical quantity of the physical field; the physical field is a fluid field, the physical quantity is a fluid velocity, the initial conditions are initial velocities, and the boundary conditions are used to define a solution region of the fluid velocity; an equipotential map generation module configured to 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 a solution distribution of the partial differential equation, the equipotential map including a plurality of equipotential surfaces or a plurality of equipotential lines; wherein on each equipotential surface or each equipotential line, numerical values of the physical quantity are equal; a self-variable acquisition unit configured to acquire spatial information of a to-be-solved physical quantity; wherein the spatial information is spatial coordinates and a corresponding time of the fluid field, and the to-be-solved physical quantity is a fluid velocity value at a specific spatial position and a specific time; a mapping unit configured to determine coordinates of the sought physical quantity in the equipotential map according to the spatial information, and take the coordinates as a target solution point; a variation curve generation unit configured to generate a physical quantity variation curve passing through the target solution point, the physical quantity variation curve being a curve vertically passing through a plurality of equipotential surfaces with different numerical values, or the physical quantity variation curve being a curve vertically intersecting a plurality of equipotential lines with different numerical values; a solution unit configured to calculate a physical quantity value corresponding to the target solution point according to a position of the target solution point on the physical quantity variation curve, the physical quantity value being a fluid velocity value at a specific spatial position and a specific time.
7. A computer readable storage medium characterized by A computer program is stored, and the computer program is executed by a processor to make the processor execute steps of a physical field solving method based on an equipotential map generation according to any one of claims 1 to 5.
8. A computer device, comprising: The device comprises a memory and a processor, the memory storing a computer program, the computer program being executed by the processor to make the processor execute the steps of the physical field solving method based on equipotential map generation according to any one of claims 1 to 5.
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