A numerical simulation method, system, device and medium using a telescoping function
By using the non-uniform division of the grid expansion function and the finite difference method, combined with the Crank-Nicolson and Swarztrauber-Sweet methods, the problem of large errors in the numerical simulation of parabolic differential equations is solved, and an efficient and accurate numerical solution is achieved, which is suitable for robin boundary conditions. The parabolic differential equation is of great significance especially in the fields of heat conduction and semiconductors.
Patent Information
- Application Number
- CN202410144344.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-01
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2044-02-01
AI Technical Summary
When the existing technology numerically simulates parabolic differential equations, especially in the domain with robin boundary conditions, it is difficult to achieve numerical solutions efficiently and accurately, and there is a problem of large errors.
The non-uniformly divided lattice point expansion function combined with the finite difference method is used to perform error analysis on the parabolic equation, and a linear equation system in matrix form is constructed. The Crank-Nicolson second-order central difference method and the Swarztrauber-Sweet method are used to improve the accuracy of the numerical simulation. and convergence trends.
It significantly reduces the error of numerical simulation results, improves the accuracy and efficiency of numerical simulation, is suitable for numerical simulation in fields such as heat conduction and semiconductors, and is highly innovative and practical.
Smart Images

Figure CN118133604B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of numerical simulation, and in particular to a numerical simulation method, system, equipment and medium applying a telescoping function. Background Art
[0002] Parabolic differential equations are of great significance in science and engineering. The heat conduction equation is an important example of a parabolic differential equation. It describes the evolution of the temperature distribution inside an object over time. By numerically solving the heat conduction equation, the temperature distribution of an object can be predicted and optimized, helping to design and improve thermal systems, heat conduction materials, and energy conversion devices.
[0003] Parabolic differential equations are also used to describe diffusion processes and material transport phenomena. For example, the diffusion equation can be used to describe the change of the concentration of solutes in liquids or gases over time and space. This is of great significance for studying chemical reactions, material transport in organisms, and pollution diffusion.
[0004] Parabolic differential equations are also widely used in financial engineering, especially in option pricing models. The famous Black-Scholes model is based on parabolic partial differential equations to describe the changes in option prices.
[0005] Parabolic differential equations also play an important role in image processing and computer vision. For example, diffusion equations can be used in tasks such as image denoising, image enhancement, and image segmentation.
[0006] As a typical mathematical model, parabolic differential equations are widely used in the research of functional analysis and mathematical physics. They not only expand the scope of mathematical theory, but also help to model and analyze practical problems.
[0007] In summary, the numerical solution of parabolic differential equations has important scientific and engineering applications and can be used to simulate and predict a variety of phenomena and processes, thus helping to gain a deeper understanding of natural phenomena and optimize engineering design. Numerical methods provide a powerful tool for dealing with complex problems that cannot be solved analytically.
[0008] The early 20th century was the beginning of the development of computational science. Computer technology was not yet mature during this period, so numerical solutions to parabolic and differential equations mainly relied on manual calculations and approximate methods. The first electronic computer was born in 1946, but before and during this period, mathematicians faced huge challenges and had to rely on tedious manual calculations.
[0009] In the 1950s and 1960s, major breakthroughs were made in the field of numerical solutions of parabolic and differential equations. During this period, several outstanding mathematicians made profound contributions to the field. Among them, Richard Courant, Kurt Friedrichs, and Hellmuth Erich Hopf collaborated to establish the modern theory of partial differential equations and laid the foundation for the research direction of analytical and numerical methods. Their work pushed the field of numerical solutions of parabolic and differential equations forward and provided a solid theoretical foundation for numerical computing.
[0010] At the same time, James H. Wilkinson and Hermann Weyl also made important contributions to the field of numerical uniform algebra. Their research provided important mathematical tools and ideas for solving the numerical solution problems of parabolic and differential equations.
[0011] The 1970s and 1980s were a period of rapid development in the field of numerical solution of parabolic and differential equations. During this period, researchers expanded the scope of application of finite element method and difference method, and improved solution efficiency and numerical stability. They also introduced more high-precision and high-efficiency numerical techniques, such as fast Fourier transform (FFT) and multigrid method, to better solve complex numerical problems.
[0012] Improvements in relaxation techniques and iterative algorithms also became an important research direction during this period. Researchers improved and optimized these methods to increase convergence speed and solution accuracy. These advances made it possible to more effectively solve parabolic and differential equations numerically for more complex and abstract problems.
[0013] Since the 1990s, with the rapid development of computer technology, research on numerical solutions of parabolic and differential equations has made greater breakthroughs. The emergence of high-performance computers has provided the ability to solve larger and more complex problems. Advances in parallel computing and distributed computing have enabled numerical solutions to be completed faster and more accurately.
[0014] In addition, the introduction of data-driven methods has also had a profound impact on the field of numerical solutions of parabolic and differential equations. Technologies such as machine learning and deep learning provide new ideas for solving non-uniform and high-dimensional problems. More open source numerical computing software and tools have emerged, such as MATLAB, NumPy and SciPy libraries in Python, making numerical solutions more convenient and reliable. Therefore, how to efficiently and accurately implement numerical simulation solutions is crucial. Summary of the invention
[0015] The purpose of the present invention is to provide a numerical simulation method, system, device and medium using a telescoping function, which can realize numerical simulation efficiently and accurately.
[0016] To achieve the above object, the present invention provides the following solutions:
[0017] A numerical simulation method using a telescoping function, the method comprising:
[0018] Constructing a mathematical model of the disk to be tested based on physical quantities; the mathematical model is a parabolic equation constructed on the disk to be tested based on the definition domain of the Robin boundary condition; the physical quantities include: internal temperature, air concentration and biomass density;
[0019] The mathematical model is analyzed by using a finite difference method to obtain an analysis result;
[0020] Constructing a linear equation system in matrix form according to the analysis results, and determining a first analysis error;
[0021] Using a non-uniform grid point scaling function combined with the finite difference method to perform error analysis on the mathematical model to obtain a second analysis error;
[0022] The mathematical model simulation result is determined based on the first analysis error and the second analysis error; the simulation result represents the convergence trend of the numerical solution of the mathematical model.
[0023] Optionally, the mathematical model specifically includes:
[0024]
[0025] Among them, u is the function to be solved of the parabolic equation about the physical quantity; r is the disk radius variable; θ is the angle variable; t is the time variable; c(r,θ) is the function about r,θ; f(t,r,θ) is the function about t,r,θ; u(t,r,θ) is the function to be solved about the physical quantity under variables t,r,θ; g(t,θ) is the function corresponding to the boundary conditions; u(0,r,θ) is the function to be solved about the physical quantity at the initial moment; u0(r,θ) is the initial value of the function to be solved of the parabolic equation; Ω is the domain of definition; Ψ is a real number in the real number domain.
[0026] Optionally, the mathematical model is analyzed using a finite difference method to obtain analysis results, specifically including:
[0027] When the definition domain is at the origin of the disk to be tested, the mathematical model is analyzed using the Swarztrauber-Sweet method to obtain the origin analysis result;
[0028] When the definition domain is outside the origin, the mathematical model is analyzed in a discrete format by using a uniformly divided grid point scaling function and a second-order central difference method, and a robin boundary condition and a first-order forward difference method to obtain a discrete analysis result;
[0029] The analysis result is determined according to the origin analysis result and the discrete analysis result.
[0030] Optionally, the expression of the linear equation system is specifically:
[0031]
[0032] Among them, a 0,0 , α0, α1, α2, α n-2 , α n-1 , β0, β n-2 , β n-1 ,β1,A0,C0,B0,B1,A1,C1,C n-1 , B n-2 , A n-2 , C n-2 , B n-1 , A n-1 All are coefficients; is the value of the function to be solved at the grid point of the i-th partition r, the grid point of the j-th partition θ, and the grid point of the k-th partition t; is the value of the function to be solved at the grid point of the i-th partition r, the grid point of the j-th partition θ, and the grid point of the k+1-th partition t; i∈[0,m], m is the total number of grid points of partition r; j∈[0,n-1], n is the total number of grid points of partition θ; and They are all components of the linear equation system; r is the disk radius variable; θ is the angle variable; t is the time variable.
[0033] Optionally, the expression of the non-uniform grid point scaling function is:
[0034]
[0035] p>0;
[0036] in, is the non-uniform grid point scaling function; t1 is the scaling variable; and p is a real number used to control and adjust the scaling of the scaling function.
[0037] A numerical simulation system using a telescoping function, the system comprising:
[0038] A model building module is used to build a mathematical model of the disk to be tested based on physical quantities; the mathematical model is a parabolic equation built on the disk to be tested based on the definition domain of the Robin boundary condition; the physical quantities include: internal temperature, air concentration and biomass density;
[0039] An analysis module, used to analyze the mathematical model using a finite difference method to obtain an analysis result;
[0040] A first error analysis module, used for constructing a linear equation system in matrix form according to the analysis result, and determining a first analysis error;
[0041] A second error analysis module, used to perform error analysis on the mathematical model by using a non-uniform grid point scaling function combined with the finite difference method to obtain a second analysis error;
[0042] A determination module is used to determine a simulation result of the mathematical model based on the first analysis error and the second analysis error; the simulation result represents a convergence trend of a numerical solution of the mathematical model.
[0043] An electronic device includes a memory and a processor, wherein the memory is used to store a computer program, and the processor runs the computer program to enable the electronic device to execute the numerical simulation method of applying a scaling function as described above.
[0044] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the numerical simulation method of applying a telescoping function as described above.
[0045] According to the specific embodiments provided by the present invention, the present invention discloses the following technical effects:
[0046] The present invention provides a numerical simulation method, system, device and medium using a telescoping function, wherein a mathematical model based on physical quantities of a disk to be tested is constructed; the mathematical model is a parabolic equation constructed on the disk to be tested based on the definition domain of a Robin boundary condition; the mathematical model is analyzed using a finite difference method to obtain an analysis result; a linear equation group in matrix form is constructed according to the analysis result, and a first analysis error is determined; an error analysis of the mathematical model is performed using a non-uniform grid point telescoping function combined with a finite difference method to obtain a second analysis error; a mathematical model simulation result is determined based on the first analysis error and the second analysis error to characterize the convergence trend of a numerical solution of the mathematical model; and a numerical value of the parabolic differential equation using a telescoping function is obtained. The simulation method provides a numerical solution method for a parabolic differential equation with a domain on a disk and robin boundary conditions. Since the Crank-Nicolson second-order central difference method is used, the numerical simulation method has high accuracy. Since the parabolic differential equation is widely used in the fields of heat conduction and semiconductors, it has great significance for chip development. The application of the scaling function can reduce the error of the numerical simulation result in the numerical simulation method, and it can be applied to the numerical simulation of other differential equations, which has high innovation and practical significance. Since the scaling function of the non-uniform grid division is used, the numerical simulation method has high accuracy, thereby realizing numerical simulation efficiently and accurately. 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 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 labor.
[0048] Figure 1 A flowchart of a numerical simulation method for applying a telescoping function provided by an embodiment of the present invention;
[0049] Figure 2 An operation flow chart of the numerical simulation method of the application scaling function provided by the embodiment of the present invention in practical application;
[0050] Figure 3 This is a diagram showing the effect of partitioning based on a non-uniform grid point scaling function;
[0051] Figure 4 is a schematic diagram of the simulation graph of the exact solution when m = 99, t = 0.1, Δt = 0.01;
[0052] Figure 5It is a diagrammatic representation of the simulation results of the numerical simulation method when m = 99, t = 0.1, Δt = 0.01 under the uniform grid function;
[0053] Figure 6 For numerical simulation methods The following is a graphical diagram of the simulation results when m = 99, t = 0.1, Δt = 0.01, and p = 1;
[0054] Figure 7 Schematic diagram of the results of numerical simulation in a computer program. DETAILED DESCRIPTION
[0055] 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.
[0056] The significance of non-uniform grid division in the finite difference method is to improve the accuracy of numerical calculations and reduce numerical errors. By non-uniformly dividing the solution area according to the characteristics of the problem, the solution of the partial differential equation can be better approximated.
[0057] In non-uniform problems, the variation of the solution is usually more significant in some local areas. By increasing the density of grid points in areas where the solution varies greatly, the details of the solution can be better captured. Non-uniform partitioning can use more grid points in areas where higher accuracy is required, thereby improving the accuracy of the numerical solution.
[0058] In the discrete approximation of partial differential equations, numerical errors are often caused by the discretized approximation. In non-uniform partitioning, the numerical errors caused by the discretization method can be reduced by adjusting the position and density of the grid points according to the characteristics of the problem. This method can better approximate the true solution and provide a more accurate numerical approximation.
[0059] Non-uniform partitioning can avoid unnecessary calculations in areas where the solution changes little. By using more grid points in areas where higher accuracy is required and fewer grid points in areas where the solution changes little, the amount of calculation can be reduced and the solution efficiency can be improved. Non-uniform partitioning can automatically adjust the density of grid points according to the characteristics of the problem to balance accuracy and computational efficiency.
[0060] The purpose of the present invention is to provide a numerical simulation method, system, device and medium using a telescoping function, which can realize numerical simulation efficiently and accurately.
[0061] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0062] Example 1
[0063] like Figure 1 As shown, an embodiment of the present invention provides a numerical simulation method for applying a telescoping function, the method comprising:
[0064] Step 100: Construct a mathematical model of the disk to be tested based on physical quantities. The mathematical model is a parabolic equation constructed on the disk to be tested based on the definition domain of the Robin boundary condition; the physical quantities include: internal temperature, air concentration and biomass density.
[0065] Mathematical models, including:
[0066]
[0067] Among them, u is the function to be solved of the parabolic equation about the physical quantity; r is the disk radius variable; θ is the angle variable; t is the time variable; c(r,θ) is the function about r,θ; f(t,r,θ) is the function about t,r,θ; u(t,r,θ) is the function to be solved about the physical quantity under variables t,r,θ; g(t,θ) is the function corresponding to the boundary conditions; u(0,r,θ) is the function to be solved about the physical quantity at the initial moment; u0(r,θ) is the initial value of the function to be solved of the parabolic equation; Ω is the domain of definition; Ψ is a real number in the real number domain.
[0068] Step 200: Analyze the mathematical model using a finite difference method to obtain analysis results.
[0069] Among them, the finite difference method is used to analyze the mathematical model and obtain the analysis results, including:
[0070] When the definition domain is at the origin of the disk to be tested, the Swarztrauber-Sweet method is used to analyze the mathematical model to obtain the origin analysis result; when the definition domain is outside the origin, the mathematical model is analyzed in discrete format using the uniformly divided grid scaling function and the second-order central difference method, and the robin boundary condition and the first-order forward difference method are used to obtain the discrete analysis result; the analysis result is determined based on the origin analysis result and the discrete analysis result.
[0071] The Swarztrauber-Sweet method means that when r0 = 0, the general discrete format on the grid point is no longer applicable because r0 is in the denominator. The origin grid point must be considered separately. The Swarztrauber-Sweet method was proposed in 1973 and the paper was published in SIAM Journal on Numerical Analysis.
[0072] Step 300: construct a linear equation system in matrix form according to the analysis results, and determine a first analysis error.
[0073] The specific expression of the linear equation system is:
[0074]
[0075] Among them, a 0,0 , α0, α1, α2, α n-2 , α n-1 , β0, β n-2 , β n-1 ,β1,A0,C0,B0,B1,A1,C1,C n-1 , B n-2 , A n-2 , C n-2 , B n-1 , A n-1 All are coefficients; is the value of the function to be solved at the grid point of the i-th partition r, the grid point of the j-th partition θ, and the grid point of the k-th partition t; is the value of the function to be solved at the grid point of the i-th partition r, the grid point of the j-th partition θ, and the grid point of the k+1-th partition t; i∈[0,m], m is the total number of grid points of partition r; j∈[0,n-1], n is the total number of grid points of partition θ; and They are all components of the linear equations; r is the disk radius variable; θ is the angle variable; t is the time variable.
[0076] Step 400: Use a non-uniform grid point scaling function combined with a finite difference method to perform error analysis on the mathematical model to obtain a second analysis error.
[0077] The expression of the non-uniform grid scaling function is:
[0078]
[0079] p>0;
[0080] in, is the non-uniform grid point scaling function; t1 is the scaling variable; and p is a real number used to control and adjust the scaling of the scaling function.
[0081] Step 500: Determine a mathematical model simulation result based on the first analysis error and the second analysis error. The simulation result represents a convergence trend of a numerical solution of the mathematical model.
[0082] In practical applications, see Figure 2 The numerical simulation method of applying the telescoping function provided by the present invention specifically includes:
[0083] Step 101: Define the specific form of a system of parabolic differential equations with a domain on a disk and Robin boundary conditions.
[0084] 1.1 The specific form of the parabolic differential equation system with Robin boundary conditions and the domain on the disk is:
[0085]
[0086] Among them, equation (1) represents the evolution of the distribution of the desired physical quantity (such as the internal temperature of the semiconductor, air concentration, biological density, etc.) in space over time, equation (2) represents the Robin boundary condition of the desired physical quantity on the definition domain, that is, it represents the linear combination of the exact value of the desired physical quantity at the boundary and the change rate, and equation (3) represents the initial value of the desired physical quantity at time 0.
[0087] In the equation:
[0088] Ω={(r,θ)|0<r<1,0≤θ<2π}, c(r,θ)≥0.
[0089] Ω is the domain of definition; the definition of Ω means that the space of the required physical quantity is defined as a circular area with a radius of 1.
[0090] And there are:
[0091] That is, Ψ is a real number in the field of real numbers.
[0092] And let:
[0093]
[0094] Defines a function that evenly divides the grid.
[0095] 1.2 Set the following notation to simplify the operation of the equation to be solved:
[0096]
[0097] h i =r i -ri-1 i=1,2,…,m+1.
[0098]
[0099] h is the uniform step size for partitioning r, To calculate r for different values of i i Function of value, r i is the r value of the space grid, is the r value of the center grid point, h i is the step size of partitioning r, μ is the step size of partitioning θ, θ j is the value of the grid point of the jth partition θ.
[0100] Step 102: According to the equation form, a uniform grid function and a Crank-Nicolson second-order central difference method are used, and the boundary conditions and the first-order forward difference method are used to analyze the discrete format of the boundary points. Since the general discrete format is no longer applicable when r=0, the Swarztrauber-Sweet method is used to approximate the origin, which specifically includes:
[0101] 2.1 Using the Crank-Nicolson second-order central difference method for t and for the boundary points (i.e., when r = 1, The discrete format is analyzed by using boundary conditions and the first-order forward difference method, and we get:
[0102]
[0103] is the value of the function to be solved at the grid point of the i-th partition r, the grid point of the j-th partition θ, and the grid point of the k-th partition t, Similarly, the values of the functions to be solved for the grid points of the i-th partition r, the j-th partition θ, and the k+1-th partition t, Δt is the step size of the partition t, To simplify the notation for analysis, is the value of f(t,r,θ) at the grid point of the i-th partition r, the grid point of the j-th partition θ, and the grid point of the k-th partition t.
[0104] (4) is obtained by discretizing (1) using the Crank-Nicolson second-order central difference method.
[0105]
[0106] L h U 0,0 The origin is approximated by the Swarztrauber-Sweet method.
[0107] ci,j is the value of c(r,θ) at the grid point of the i-th partition r and the grid point of the j-th partition θ.
[0108] From the initial conditions and boundary conditions, we can get:
[0109]
[0110]
[0111] is the value of g(t,θ) at the grid point of the jth partition θ and the grid point g(t,θ) at the k+1th partition t.
[0112] Combining equations (6)-(8), equation (5) can be expressed as:
[0113]
[0114] Step 103: Construct a linear equation system in matrix form according to the results of the finite difference method analysis, and then directly use the obtained equation system to write a MATLAB program, which specifically includes:
[0115] Combining equations (4)-(9), the matrix form of the linear equation system is:
[0116]
[0117] In the matrix:
[0118]
[0119]
[0120]
[0121]
[0122] The above letters have no special meaning and are just the values of the corresponding elements in the corresponding matrix.
[0123] In A j There are:
[0124]
[0125]
[0126]
[0127] And in the matrix, we have:
[0128]
[0129]
[0130]
[0131]
[0132] The indices of the coefficient matrix are, in order:
[0133]
[0134] These numbers are the non-zero elements of the matrix, so we get 5mn+1 non-zero elements.
[0135] The following is U ij The relationship between an mn+1-dimensional array u:
[0136] U 0,0 u(1)
[0137] U 1,0 u(2)
[0138] U 2,0 u(3)
[0139]
[0140] U m,0 u(m+1)
[0141] U 1,1 u(m+2)
[0142] U 2,1 u(m+3)
[0143]
[0144] U m,1 u(2m+1)
[0145]
[0146] U 1,j u(j*m+2)
[0147] U 2,j u(j*m+3)
[0148]
[0149] U m,j u(j*m+m+1)
[0150]
[0151] U 1,n-1 u((n-1)*m+2)
[0152] U 2,n-1 u((n-1)*m+3)
[0153]
[0154] U m,n-1 u((n-1)*m+m+1)
[0155] According to the form of the equation group, a matlab program can be written to perform numerical simulation on the numerical solution of the desired equation.
[0156] Step 104: Analyze the error size of the finite difference method according to the numerical simulation results, specifically including:
[0157] Based on the following examples, the error of the numerical simulation method under the uniform grid division function is analyzed.
[0158] Given:
[0159] u(t, r, θ) = e -t r 2 +r 2 (1-r) 1 / 2 .
[0160] The above equation is the exact form of the solution to the equation being sought. The conditions for obtaining this exact result are:
[0161] u0(r,θ)=r 2 +r 2 (1-r) 1 / 2 ,
[0162] g(t,θ)=e -t ,
[0163]
[0164] Ψ=0
[0165] c(t, r, θ)=0.
[0166] According to the conditions for obtaining the exact solution, different grid numbers m are set for the numerical simulation method in the MATLAB program, and the numerical simulation method is implemented. The numerical solution under the condition of uniform grid division is calculated, and the maximum error is calculated based on the numerical solution obtained by the implementation calculation and the exact solution to evaluate whether the numerical simulation results of the numerical solution are close to the exact solution and whether the error is small enough. The results in Table 1 are obtained.
[0167] The scaling function specifically includes: an innovative non-uniform grid-dividing scaling function. Its form is:
[0168]
[0169] p>0.
[0170] in, is the non-uniform grid point scaling function; t1 is the scaling variable; and p is a real number used to control and adjust the scaling of the scaling function.
[0171] The effect of the division is shown in Figure 3 . Figure 3 Γ b is the symbolic representation of the area.
[0172] Step 105: Using an innovative non-uniform grid point scaling function combined with a finite difference method, an error analysis is performed on the parabolic equation with a domain on a disk with Robin boundary conditions, specifically including:
[0173] The linear grid function in finite difference analysis Changing to a non-uniform grid scaling function In order to obtain the numerical simulation method of non-uniform grid division.
[0174] Step 105: comparing the errors of the uniform grid partition function and two innovative non-uniform grid partition scaling functions in the numerical simulation of the parabolic equation with the domain on the disk with Robin boundary conditions (the smaller the maximum error of the numerical simulation result using a certain scaling function, the better the scaling function is, and the closer the calculated numerical solution is to the exact solution), specifically including:
[0175] For the numerical simulation method of non-uniform grid division, different grid division numbers m are set, and the maximum error of the numerical solution of the numerical simulation results with different grid division numbers is calculated, and the results in Table 1 are obtained.
[0176] Table 1 and Error result comparison table
[0177]
[0178]
[0179] From the error results, the maximum error of the numerical simulation results using the numerical simulation method shows a decreasing trend, getting closer and closer to the accurate results, and the simulation results errors are all within 2×10 -1 Within the range of 1.1 to 1.0, the numerical simulation method has a high accuracy.
[0180] Depend on Figure 4 and Figure 5The results show that there is little difference between the simulation result graph and the accurate result graph, and the numerical simulation method has a high degree of accuracy.
[0181] From the error results in Table 1, it can be seen that when the scaling function is applied, the maximum error of the numerical simulation results shows a decreasing trend, and the distance to the accurate result is getting closer and closer. In addition, the error of the simulation result is smaller than the error of the numerical simulation scheme under the uniform grid division. The numerical simulation method has improved accuracy and has higher precision.
[0182] Depend on Figure 6 It can be seen from the results that there is little difference between the simulation result graph and the accurate result graph. The numerical simulation method has high accuracy under the scaling function.
[0183] Table 2 Numerical simulation methods The error results table below is when t=0.1,Δt=0.01,m=39
[0184]
[0185] From the error results in Table 2, it can be seen that as p increases, the numerical simulation method The error of the numerical simulation results under the above condition has a tendency to increase.
[0186] In the present invention, firstly, a parabolic equation with a domain on a disk and having robin boundary conditions is analyzed by a finite difference method; then, according to the form of the equation, a uniformly divided grid point scaling function and a Crank-Nicolson second-order central difference method are used, and the boundary points are analyzed in a discrete format using boundary conditions and a first-order forward difference method. Since the general discrete format is no longer applicable when r=0, the origin is approximated by a Swarztrauber-Sweet method; according to the results of the finite difference method analysis, a linear equation group in a matrix form is constructed, and a matlab program is written in the form of the obtained equation group; then, according to the numerical simulation results, the error size of the finite difference method is analyzed, and the results show that the error is small and the accuracy is high; then, the scaling function is used in combination with the finite difference method to perform numerical simulation on the parabolic equation with a domain on a disk and having robin boundary conditions, and the error results show that the application of the scaling function can effectively reduce the error of the numerical simulation results compared with the uniform grid point division method.
[0187] Example 2
[0188] An embodiment of the present invention provides a numerical simulation system using a telescoping function, the system comprising: a model building module, an analysis module, a first error analysis module, a second error analysis module and a determination module.
[0189] The model building module is used to build a mathematical model of the disk to be tested based on physical quantities; the mathematical model is a parabolic equation built on the disk to be tested based on the definition domain of the Robin boundary conditions; the physical quantities include: internal temperature, air concentration and biological density.
[0190] The analysis module is used to analyze the mathematical model using the finite difference method to obtain the analysis results.
[0191] The first error analysis module is used to construct a linear equation group in matrix form according to the analysis results and determine the first analysis error.
[0192] The second error analysis module is used to perform error analysis on the mathematical model by using a non-uniform grid point scaling function combined with a finite difference method to obtain a second analysis error.
[0193] The determination module is used to determine the simulation result of the mathematical model based on the first analysis error and the second analysis error; the simulation result represents the convergence trend of the numerical solution of the mathematical model.
[0194] Example 3
[0195] An embodiment of the present invention provides an electronic device, including a memory and a processor, wherein the memory is used to store a computer program, and the processor runs the computer program to enable the electronic device to execute the numerical simulation method of applying a scaling function in Embodiment 1.
[0196] As an optional implementation, the present invention further provides a computer-readable storage medium storing a computer program, which implements the numerical simulation method of applying a scaling function in Example 1 when the computer program is executed by a processor.
[0197] Example 4
[0198] The present embodiment provides a computer device, which may be a database, and the computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Wherein, the processor, the memory and the input / output interface are connected via a system bus, and the communication interface is connected to the system bus via the input / output interface. Wherein, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store pending transactions. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, the numerical simulation method of the application scaling function in Example 1 is implemented.
[0199] In a computer program:
[0200] cfun=inline('0','r','theta'); (represents the form of function c(t,r,θ))
[0201] gfun = inline('exp(-t)','t','theta'); (represents the form of function g(t,θ))
[0202] ffun=inline('-exp(-t)*(r*r+4)-4*sqrt(1-r)+(5 / 2)*r / sqrt(1-r)+r^2 / 4 / ((1-r)*sqrt(1-r))','t','r','theta'); (represents the form of function f(t,r,θ))
[0203] u0fun=inline('r^2*(1+sqrt(1-r))','r','theta'); (represents the form of function u0(r,θ))
[0204] pgfun = inline('0','t','theta'); (represents the value of the number Ψ) u0(r,θ) = r 2 ,g(t,θ)=e -t ,f(t,r,θ)=-e -t r 2 -4e -t ,Ψ=0,c(t,r,θ)=0,u(t,r,θ)
[0205] Change to:
[0206] cfun=inline('0','r','theta');
[0207] gfun=inline('exp(-t)','t','theta');
[0208] ffun=inline('-exp(-t)*(r*r)-4*exp(-t)','t','r','theta');
[0209] u0fun=inline('r^2','r','theta');
[0210] pgfun=inline('0','t','theta');
[0211] The conditions can be obtained as follows:
[0212] u0(r,θ)=r 2 ,g(t,θ)=e -t ,f(t,r,θ)=-e -t r 2 -4e -t ,Ψ=0,c(t,r,θ)=0,the numerical simulation results of u(t,r,θ) are as follows: Figure 7 shown.
[0213] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the system disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0214] The principles and implementation methods of the present invention are described in this article using specific examples. The description of the above embodiments is only used to help understand the method and core idea of the present invention. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting the present invention.
Claims
1. A numerical simulation method using a telescoping function, characterized in that: The method comprises: Constructing a mathematical model of the disk to be tested based on physical quantities; the mathematical model is a parabolic equation constructed on the disk to be tested based on the definition domain of the Robin boundary condition; the physical quantities include: internal temperature, air concentration and biomass density; The mathematical model is analyzed by using a finite difference method to obtain an analysis result; Constructing a linear equation system in matrix form according to the analysis results, and determining a first analysis error; Using a non-uniform grid point scaling function combined with the finite difference method to perform error analysis on the mathematical model to obtain a second analysis error; Determining a simulation result of the mathematical model based on the first analysis error and the second analysis error; the simulation result represents a convergence trend of a numerical solution of the mathematical model; The mathematical model specifically includes: Among them, u is the function to be solved of the parabolic equation about the physical quantity; r is the disk radius variable; θ is the angle variable; t is the time variable; c(r,θ) is the function about r,θ; f(t,r,θ) is the function about t,r,θ; u(t,r,θ) is the function to be solved about the physical quantity under the variables t,r,θ; g(t,θ) is the function corresponding to the boundary conditions; u(0,r,θ) is the function to be solved about the physical quantity at the initial moment; u0(r,θ) is the initial value of the function to be solved of the parabolic equation; Ω is the domain of definition; Ψ is a real number in the real number domain; The expression of the linear equation system is specifically: Among them, a 0,0 , α0, α1, α2, α n-2 , α n-1 , β0, β n-2 , β n-1 ,β1,A0,C0,B0,B1,A1,C1,C n-1 , B n-2 , A n-2 , C n-2 , B n-1 , A n-1 All are coefficients; is the value of the function to be solved at the grid point of the i-th partition r, the grid point of the j-th partition θ, and the grid point of the k-th partition t; is the value of the function to be solved at the grid point of the i-th partition r, the grid point of the j-th partition θ, and the grid point of the k+1-th partition t; i∈[0,m], m is the total number of grid points of partition r; j∈[0,n-1], n is the total number of grid points of partition θ; and are all components of the linear equation system; r is the disc radius variable; θ is the angle variable; t is the time variable; The expression of the non-uniform grid point scaling function is: p>0; in, is the non-uniform grid point scaling function; t1 is the scaling variable; and p is a real number used to control and adjust the scaling of the scaling function.
2. The numerical simulation method using a telescoping function according to claim 1, characterized in that: The mathematical model is analyzed using the finite difference method to obtain analysis results, which specifically include: When the definition domain is at the origin of the disk to be tested, the mathematical model is analyzed using the Swarztrauber-Sweet method to obtain the origin analysis result; When the definition domain is outside the origin, the mathematical model is analyzed in a discrete format by using a uniformly divided grid point scaling function and a second-order central difference method, and a robin boundary condition and a first-order forward difference method to obtain a discrete analysis result; The analysis result is determined according to the origin analysis result and the discrete analysis result.
3. A numerical simulation system using a telescoping function, characterized in that: The system is implemented by the numerical simulation method of applying a scaling function as described in any one of claims 1 to 2, and the system comprises: A model building module is used to build a mathematical model of the disk to be tested based on physical quantities; the mathematical model is a parabolic equation built on the disk to be tested based on the definition domain of the Robin boundary condition; the physical quantities include: internal temperature, air concentration and biomass density; An analysis module, used to analyze the mathematical model using a finite difference method to obtain an analysis result; A first error analysis module, used for constructing a linear equation system in matrix form according to the analysis result, and determining a first analysis error; A second error analysis module, used to perform error analysis on the mathematical model by using a non-uniform grid point scaling function combined with the finite difference method to obtain a second analysis error; A determination module is used to determine a simulation result of the mathematical model based on the first analysis error and the second analysis error; the simulation result represents a convergence trend of a numerical solution of the mathematical model.
4. An electronic device, characterized in that: It comprises a memory and a processor, wherein the memory is used to store a computer program, and the processor runs the computer program so that the electronic device executes the numerical simulation method for applying a telescoping function as described in any one of claims 1 to 2.
5. A computer-readable storage medium, characterized in that: The computer program is stored therein, and when the computer program is executed by a processor, the numerical simulation method for applying a telescoping function as claimed in any one of claims 1 to 2 is implemented.
