Method, device and equipment for solving stable numerical value of plasma dispersion relation
Through the optimized semi-pure function solver and parallel solution method, the problem of insufficient convergence speed and accuracy of semi-pure function solver in plasma dispersion relationship solution is solved, and high efficiency and accuracy are achieved, avoiding the problem of high efficiency and accuracy. Missing or multiple solutions.
Patent Information
- Application Number
- CN202411021030.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-29
- Publication Date
- 2024-11-22
AI Technical Summary
The existing semi-pure function solvers lack convergence speed and accuracy when solving plasma dispersion relationships, and are prone to problems of missing solutions or multiple solutions, especially when processing complex functions, the calculation time is too long and the Hankel matrix may occur. Incorrect rank judgment.
An optimized semi-pure function solver is used to solve the domain division and grid allocation methods in parallel, and the singular value of the Hankel matrix is judged based on the numerical error of the surrounding channel integral, and whether the solution of the generalized eigenvalue problem exists and falls out of the search domain. Correct the Hankel matrix rank judgment in the external situation and reduce the probability of missing solutions or multiple solutions.
It greatly shortens the calculation time, improves the efficiency of solving complex plasma dispersion relationships, reduces the situation of missing solutions or multiple solutions, and ensures the accuracy and stability of the solution process.
Smart Images

Figure CN119003956A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of plasma dispersion relation calculation, and more specifically, to a stable numerical method, device and apparatus for solving plasma dispersion relation. Background Art
[0002] Electromagnetic disturbances play a key role in plasma, affecting the stability, transmission properties and energy transport of plasma. Studying the characteristics of plasma electromagnetic disturbances can reveal the complex behavioral characteristics of plasma and help optimize plasma control and application. Solving the linear dispersion relation of plasma is an important means to study the characteristics of electromagnetic disturbances in plasma. At present, there are two types of traditional solutions for plasma dispersion relations: the first type of program is based on the difference iteration method, such as WHAMP and NHDS. Such programs require given initial values and cannot find all zero points of the dispersion relation; the second type of program is represented by BO, which converts the solution of the zero point of the dispersion relation into a matrix eigenvalue problem, but the limitation is that the Pade approximation of the plasma dispersion function is used: Such programs can only solve dispersion relations that have fractional polynomial form.
[0003] Mathematically, solving the dispersion relation belongs to solving the problem of zeros and poles of semipure functions. Solving the zeros of semipure complex functions is a common basic problem in mathematics, physics and engineering. At present, there are two main methods for solving such problems in the field of computational mathematics: differential iteration method and integral method based on generalized amplitude principle.
[0004] The first type of method is the difference iteration method, which has been widely used in various commercial scientific computing software such as MATLAB, Mathematica, etc. Iterative algorithms have the advantage of fast convergence speed, but they need to be given initial values, and one initial value can only find one zero at most. More seriously, this type of algorithm may also encounter the problem of repellers, that is, no matter how the initial value is selected, the algorithm cannot converge to the desired zero position. Therefore, the iterative method cannot guarantee that all zeros of the function will be found.
[0005] The second type of method is the integration method based on the generalized amplitude principle. This type of algorithm can find all the zeros and poles of a semi-pure complex function in a given area, but the disadvantage is that the algorithm is ill-conditioned and the computational cost is high. For example, the existing literature (Chen, H. (2022) "On locating the zeros and poles of a meromorphic function." Journal of Computational and Applied Mathematics 402: 113796) gives the condition number expression of the generalized eigenvalue problem of the Hankel matrix, and based on this, it is proposed to use the coordinate transformation method to transform the rectangular solution domain to the vicinity of the unit circle, thereby making the problem a well-conditioned problem. However, the above algorithm still has the following two problems: First, the algorithm does not adopt an efficient parallelization scheme, so the calculation time is too long when dealing with complex functions in practical problems, and the practicality is poor. Secondly, the judgment of the Hankel matrix rank may be wrong, which leads to the wrong judgment of the total number of zeros and poles, triggering a series of chain errors, causing the algorithm to encounter problems such as wrong solutions, missed solutions or multiple solutions. Summary of the invention
[0006] The purpose of this application is to provide a stable numerical method, device and equipment for solving plasma dispersion relations. By providing an optimized semipure function solver, the problems of insufficient convergence speed and accuracy of existing semipure function solvers are solved, so as to be applied to solving plasma dispersion relations.
[0007] In a first aspect of the present application, a stable numerical method for solving a plasma dispersion relation is provided, the method comprising:
[0008] Obtaining dispersion relations for characterizing plasma linear eigenmodes;
[0009] Call the semipure function solver to solve all zeros and poles in the specified area of the dispersion relationship, and calculate the error estimate of the zeros and poles;
[0010] Based on all zeros and poles, the distribution results of the plasma linear eigenmode modes are determined.
[0011] In one implementation, the process of calling the semipure function solver to solve all zeros and poles of the dispersion relation in the specified region is as follows:
[0012] Step A, setting the parameters required for the semipure function solver to solve; wherein the parameters include the first parameter and the second parameter, the first parameter includes the number of cores m required for the semipure function, the rectangular solution area boundary, the number of discrete points on the long side of a single rectangular area n1, the number of discrete points on the short side of a single rectangular area n2, and the total number of discrete points N in the rectangular area totaland the number of parallel cores for the semipure function solver mN p The second parameters include the coordinate transformation parameter ε0 and the upper limit of the numerical error of the contour integral ε i , condition number bound and zero-pole error bounds ε a ; Among them, N total =2n1+2n2, N p N total Factors of
[0013] Step B, dividing the solution area, obtaining a rectangular search domain, and calculating the function value of the rectangular search domain at the discrete points on the boundary;
[0014] Step C, calculating a reference value of the contour integral according to the function value of the rectangular search domain at the discrete points on the boundary, and determining the total number of zeros and poles in the rectangular search domain;
[0015] Step D, solving the generalized eigenvalue problem, and calculating the condition number and the error estimate of the zero poles, and determining the zero pole positions of the rectangular search domain based on the condition number and the error estimate.
[0016] In one implementation, step B includes:
[0017] Step B1, dividing the solution area into a rectangular search domain along the imaginary axis direction;
[0018] Step B2, evenly discretize the edge of the real axis direction of the rectangular search domain into n1 boundary discrete points, and evenly discretize the edge of the imaginary axis direction into n2 boundary discrete points, number each boundary discrete point in counterclockwise order from the lower left corner, determine the position of each boundary discrete point, and store the position of each boundary discrete point in the array z_edge, allocate the function value calculation task of the boundary discrete point, and divide the process numbered from m(i-1) to mi-1 into the i-th sub-communication domain, and call function f in the i-th sub-communication domain to calculate the process numbered from (i-1)N total / N p +1 to iN total / N p The function value of the boundary discrete point is obtained to obtain the calculation result of the process from m(i-1) to mi-1, and the calculation result is stored in N total dimensional array f_integral; where i = 1, 2, ... N p .
[0019] In one implementation, step C includes:
[0020] Step C1, calculate the complex angle of the array f_integral, store the complex angle into the array angle_f_integral, and set angle_f_integral(N total+1) = angle_finegral(1), create N total +1-dimensional integer array m, initialize all elements of integer array m to 0, perform logical processing on array angle_inegral and integer array m, and obtain angle_f_integral(k)=angle_f_integral(k)+2m(k)π;
[0021] Step C2, according to the coordinate transformation Calculate the position ζ_edge of the array z_edge in the new coordinate system and set ζ_edge(N total +1)=ζ_edge(1), where L = right_edge - left_edge; calculate ln|f_integral(i)|, store the calculation result in the array ln_f_integral, and use the cubic spline curve interpolation method to make the array ln_f_integral and the array angle_f_integral continuous; where i = 1, 2…N total ;
[0022] Step C3, using Gauss integration method to calculate four numerical integrals, and determining the contour integral G from the four numerical integrals k ; Use the trapezoidal integration method to calculate the contour integral G k Reference value G k,ref Among them, G k =ζ_integral(1) k (m(N total +1)-m(1))+(S1+S2+S3+S4) / (2πi), S1, S2, S3, S4 are four numerical integrals respectively;
[0023] Step C4, according to the reference value G k,ref Calculate the contour integral G k The error value ε svd ;
[0024] Step C5: when k is an even number, construct a k / 2+1 order Hankel matrix H based on the error values of the first k contour integrals. 0,k / 2+1 , for the Hankel matrix H 0,k / 2+1 Perform singular value decomposition, obtain the singular values, and store the singular values in array s from large to small;
[0025] Step C6, determine the continuous third-order Hankel matrix H 0,k / 2+1 Whether the rank of satisfies the condition C1, if it satisfies the condition C1, then the total number of zeros and poles in the rectangular search domain N = rank (H 0,k / 2+1); if condition C1 is not satisfied, set k = k + 1 and return to step C3; where condition C1 is rank (H 0,k / 2+1 )=rank(H 0,k / 2 )=rank(H 0,k / 2-1 ).
[0026] In one implementation, the numerical error of the Hankel matrix elements is expressed as an error value ε svd To judge, specifically: if the array s(i)>ε svd , then the array s(i) is a non-zero singular value.
[0027] In one implementation, step D includes:
[0028] Step D1, construct the N-order Hankel matrix H 0,N With H 1,N , Use the QZ algorithm to calculate the generalized eigenvalue problem H 1,N -λH 0,N The solution is stored in the array ζ_solve, and the array ζ_solve is judged whether it satisfies the condition D1; if the array ζ_solve satisfies the condition D1, then the step D2 is executed, otherwise, the condition number Execute step E; wherein condition D1 includes r min <|ζ_solve(i)|<1 and
[0029] Step D2, calculate the condition number κ based on the elements of the array ζ_solve 2 ;
[0030] Step D3, construct the N+1 order Hankel matrix H 0,N+1 and H 1,N+1 , use the QZ algorithm to calculate the generalized eigenvalue problem H 1,N+1 -λH 0,N+1 The solution is stored in the array ζ_solve_ref;
[0031] Step D4, find the error estimate ε of the solution to the generalized eigenvalue problem error ,in,
[0032] Among them, r + =max(|ζ_solve|),r-=min(|ζ_solve|),
[0033] Step D5, if the condition number and error estimate meet condition D2, the rectangular search domain solution is completed, the array ζ_solve is inversely transformed to obtain the zero and pole positions, the result is stored in the array z_solve, and the boundary up_edge_0 is set to down_edge, and step B is executed to solve the next rectangular search domain; otherwise, the array f_integral is copied to the array f0_integral, and step E is executed; where condition D2 is and ε error <ε a .
[0034] In one implementation, step E includes:
[0035] Step E1, divide the rectangular search domain into 4 sub-areas in the shape of a field, so that the long side of the rectangular search domain has 2n1 boundary discrete points, and the short side of the rectangular search domain has 2n2 boundary discrete points, number each boundary discrete point from the lower left corner in counterclockwise order, determine the first position of each boundary discrete point, and store the first position in the array z_sub_edge, allocate the function value calculation task of the boundary discrete point, and the processes numbered from m(i-1) to mi-1 are divided into the i-th sub-communication domain, and call the function f in the i-th sub-communication domain to calculate the sequence numbered 2(i-1)N in the array z_sub_edge. total / N p +1 to 2iN total / N p The function value of the boundary discrete point is obtained, and the new calculation result of the process from m(i-1) to mi-1 is stored in 2N total dimensional array f_sub_integral; the function values of the boundary discrete points with odd numbers are inherited from the array f_integral, and the function values of the boundary discrete points with even numbers are recalculated by calling function f;
[0036] For the horizontal lines and vertical lines inside the divided rectangular search domain, there are 2n1 boundary discrete points and 2n2 boundary discrete points respectively. The boundary discrete points are numbered from left to right and from bottom to top, the second position of each boundary discrete point is determined, and the second position is stored in the array z_center_line. The function value calculation task of the boundary discrete point is allocated, and the processes numbered from m(i-1) to mi-1 are divided into the i-th sub-communication domain. The function f is called to calculate the process numbered at (i-1)N in the array z_center_line in the i-th sub-communication domain. total / N p +1 to iN total / N p The function value of the boundary discrete point is stored in N totaldimensional array f_center_integral.
[0037] In one implementation, step E further includes:
[0038] Step E2: for sub-region i, assign the function values of the four boundary discrete points corresponding to the sub-region i in the array f_sub_integral and the array f_center_integral to the array f_integral, and perform steps C and D based on the array f_integral to obtain the condition number and error estimate of the sub-region i;
[0039] Step E3, determine whether the condition number and error estimate of the sub-region i meet the condition D2. If the condition number and error estimate of the sub-region do not meet the condition D2, copy the array f_integral to the array f0_integral and execute step E1. Otherwise, perform an inverse transformation on the array ζ_solve to obtain the zero and pole positions; let i=i+1 and repeat step E2 until all sub-regions are solved.
[0040] In a second aspect of the present application, a stable numerical device for solving a plasma dispersion relation is provided, which is used to execute a stable numerical method for solving a plasma dispersion relation as provided in the first aspect of the present application, and the device comprises:
[0041] A function acquisition module, used for acquiring a dispersion relation for characterizing a plasma linear eigenmode;
[0042] A solving module is used to call a semipure function solver to solve all zeros and poles in a specified area of the dispersion relationship and calculate error estimates of the zeros and poles;
[0043] The processing module is used for determining the distribution result of the plasma linear eigenmode mode based on all zero poles.
[0044] The third aspect of the present application provides a computer device, which includes a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, the steps of a stable numerical method for solving plasma dispersion relations as provided in the present application are implemented.
[0045] Compared with the prior art, this application has the following beneficial effects:
[0046] In a stable numerical method for solving plasma dispersion relations provided in the present application, an efficient parallel method for domain partition and grid point allocation is proposed, which greatly shortens the calculation time and has the ability to solve complex plasma dispersion relations; secondly, the present application proposes a new Hankel matrix rank judgment scheme, which uses the contour integral numerical error as the numerical criterion for the Hankel matrix singular value being greater than 0, and uses whether the solution of the Hankel matrix generalized eigenvalue problem falls out of the search domain and whether the error estimate of the solution meets the accuracy requirements to correct the Hankel matrix rank judgment error, thereby greatly reducing the probability of missed solutions or multiple solutions in such algorithms, thereby avoiding missed solutions or multiple solutions of zero poles in the process of solving the dispersion relation. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] The drawings described herein are used to provide a further understanding of the embodiments of the present application, constitute a part of the present application, and do not constitute a limitation on the embodiments of the present application. In the drawings:
[0048] Figure 1 A schematic flow chart of a stable numerical method for solving the plasma dispersion relation provided in an embodiment of the present application;
[0049] Figure 2 A schematic diagram of dividing the solution area provided in the embodiment of the present application into multiple rectangular search domains;
[0050] Figure 3 A schematic diagram of dividing a rectangular search domain into multiple sub-regions provided in an embodiment of the present application;
[0051] Figure 4 A flowchart of the argument_solve subroutine provided in an embodiment of the present application;
[0052] Figure 5 A flowchart of the subdivison subroutine provided in an embodiment of the present application;
[0053] Figure 6 A flowchart of the zero_pole_location subroutine provided in an embodiment of the present application;
[0054] Figure 7 A zero-point distribution diagram of the plasma dispersion relation provided in an embodiment of the present application;
[0055] Figure 8 A distribution diagram of the parallel wave frequency of a uniformly magnetized plasma provided in an embodiment of the present application;
[0056] Fig. 9 A graph showing the relationship between the frequency and wave number of the parallel wave of a uniformly magnetized plasma provided in an embodiment of the present application;
[0057] Fig.10 A schematic diagram of a flow chart of a stable numerical device for solving plasma dispersion relations provided in an embodiment of the present application;
[0058] Fig.11 A schematic diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0059] In order to make the objectives, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with examples and drawings. The illustrative implementation scheme of the present application and its description are only used to explain the present application and are not intended to limit the present application.
[0060] It should be noted that the terms "include" or "may include" used in various embodiments of the present application indicate the presence of the function, operation or element applied for, and do not limit the addition of one or more functions, operations or elements. In addition, as used in various embodiments of the present application, the terms "include", "have" and their cognates are only intended to indicate specific features, numbers, steps, operations, elements, components or a combination of the foregoing items, and should not be understood as first excluding the presence of one or more other features, numbers, steps, operations, elements, components or a combination of the foregoing items or the possibility of adding one or more features, numbers, steps, operations, elements, components or a combination of the foregoing items.
[0061] In the description of the present application, “plurality” means two or more than two, unless otherwise clearly and specifically defined.
[0062] Please refer to Figure 1 , Figure 1 A schematic flow chart of a stable numerical method for solving the plasma dispersion relation provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, the method includes:
[0063] 101, obtaining a dispersion relation for characterizing a plasma linear eigenmode.
[0064] In this embodiment, the plasma dispersion relation can be derived from the plasma fluid conservation equation or the kinetic equation using small perturbation linearization and Fourier transform and other technical means. In this field, the method of theoretically deriving the plasma dispersion relation has developed into a set of standardized processes, so this embodiment will not be redundantly described.
[0065] 102, calling the semipure function solver to solve all zeros and poles in the specified region of the dispersion relation, and calculating the error estimates of the zeros and poles.
[0066] In this embodiment, for those skilled in the art, calling a function solver to solve the distribution positions of all zeros and poles of a dispersion function in a solution region is a conventional technical means for those skilled in the art. The core of this embodiment is how to optimize the solution process / solution steps of a semipure function solver so as to reduce the solution time and the probability of misunderstanding during the solution process. Specifically, the semipure function solver includes the following steps:
[0067] Step A, step A, setting the parameters required for the semipure function solver to solve; wherein the parameters include the first parameter and the second parameter, the first parameter includes the number of cores m required for the semipure function, the rectangular solution area boundary, the number of discrete points on the long side of a single rectangular area n1, the number of discrete points on the short side of a single rectangular area n2, and the total number of discrete points N in the rectangular area total and the number of parallel cores for the semipure function solver mN p The second parameters include the coordinate transformation parameter ε0 and the upper limit of the numerical error of the contour integral ε i , condition number bound and zero-pole error bounds ε a ; Among them, N total =2n1+2n2, N p N total factor.
[0068] For step A, the parameters required for the solver to run are set, including the function f to be calculated input by the user, which is used to solve the function value of the discrete points on the boundary. Specifically, the boundaries of the rectangular area are left_edge_0, right_edge_0, down_edge_0, and up_edge_0. It can be understood that left, right, up, and down are the left boundary, right boundary, upper boundary, and lower boundary, respectively. In general, users can choose to freely adjust the second parameter, such as the coordinate transformation parameter ε0 (default is 0.1), the numerical error upper limit ε of the contour integral i (Default is 10 -7 ), condition number bound (default is 128), zero-pole error limit ε a (Default is 10 -6 ).
[0069] Step B, divide the solution area, obtain a rectangular search domain, and calculate the function value of the rectangular search domain at the discrete points on the boundary.
[0070] In this embodiment, step B includes step B1 and step B2. Figure 2 As shown,
[0071] Step B1: divide the solution area into a rectangular search domain along the imaginary axis direction, and its boundary satisfies the following conditions:
[0072]
[0073] Step B2, evenly discretize the edge of the real axis direction of the rectangular search domain into n1 boundary discrete points, and evenly discretize the edge of the imaginary axis direction into n2 boundary discrete points, number each boundary discrete point in counterclockwise order from the lower left corner, determine the position of each boundary discrete point, and store the position of each boundary discrete point in the array z_edge, allocate the function value calculation task of the boundary discrete point, and divide the process numbered from m(i-1) to mi-1 into the i-th sub-communication domain, and call function f in the i-th sub-communication domain to calculate the process numbered from (i-1)N total / N p +1 to iN total / N p The function value of the boundary discrete point is obtained to obtain the calculation result of the process from m(i-1) to mi-1, and the calculation result is stored in N total dimensional array f_integral; where i = 1, 2, ... N p .
[0074] Step C, calculating the reference value of the contour integral according to the function value of the rectangular search domain at the discrete points on the boundary, and determining the total number of zeros and poles in the rectangular search domain.
[0075] like Figure 4 As shown, in this embodiment, step C includes steps C1 to C6, which are specifically as follows:
[0076] Step C1, calculate the complex angle of the array f_integral, store the complex angle into the array angle_f_integral, and set angle_f_integral(N total +1) = angle_finegral(1), create N total +1-dimensional integer array m, initialize all elements of integer array m to 0, perform logical processing on array angle_inegral and integer array m, and obtain angle_f_integral(k)=angle_f_integral(k)+2m(k)π.
[0077] Specifically, the logic processing process is as follows:
[0078] Do k=1,N total ;
[0079] If angle_f_integral(k+1)-angle_f_integral(k)>π;
[0080] m(k+1)=m(k)-1;
[0081] else if angle_f_integral(k+1)-angle_f_integral(k)<-π;
[0082] m(k+1)=m(k)+1;
[0083] Else;
[0084] m(k+1)=m(k);
[0085] End if;
[0086] End do;
[0087] Do k=1,N total +1;
[0088] angle_f_integral(k)=angle_f_integral(k)+2m(k)π;
[0089] End do.
[0090] Step C2, according to the coordinate transformation Calculate the position ζ_edge of the array z_edge in the new coordinate system and set ζ_edge(N total +1)=ζ_edge(1), where up_edge), L = right_edge - left_edge; calculate ln|f_integral(i)|, store the calculation result in the array ln_f_integral, and use the cubic spline curve interpolation method to make the array ln_f_integral and the array angle_f_integral continuous; where i = 1, 2...N total .
[0091] In this embodiment, after executing step C2, it is necessary to set G0=m(N total +1)-m(1).
[0092] Next, do the following cycle (including steps C3 to C6):
[0093] Step C3, using Gauss integration method to calculate four numerical integrals, and determining the contour integral G from the four numerical integrals k ; Use the trapezoidal integration method to calculate the contour integral G k Reference value G k,ref Among them, G k =ζ_integral(1) k (m(N total+1)-m(1))+(S1+S2+S3+S4) / (2πi), S1, S2, S3, S4 are four numerical integrals respectively.
[0094] In this embodiment, the calculation formulas of the four numerical integrals are as follows:
[0095]
[0096]
[0097] in,
[0098]
[0099] Step C4, according to the reference value G k,ref Calculate the contour integral G k The error value ε svd .
[0100] In this embodiment,
[0101] Step C5: when k is an even number, construct a k / 2+1 order Hankel matrix H based on the error values of the first k contour integrals. 0,k / 2+1 , for the Hankel matrix H 0,k / 2+1 Perform singular value decomposition, obtain the singular values, and store the singular values in array s from large to small.
[0102] In this embodiment, the numerical error of the Hankel matrix element, i.e., the contour integral error, is expressed as ε svd To characterize, the criterion used by this algorithm is that the singular value is greater than 0, that is, if s(i)>ε svd , then s(i) is a non-zero singular value. Therefore H 0,k / 2+1 The rank of a matrix is equal to the number of elements in the array s that are greater than ε. svd The number of elements.
[0103] Step C6, determine the continuous third-order Hankel matrix H 0,k / 2+1 Whether the rank of satisfies the condition C1, if it satisfies the condition C1, then the total number of zeros and poles in the rectangular search domain N = rank (H 0,k / 2+1 ); if condition C1 is not satisfied, set k = k + 1 and return to step C3; where condition C1 is rank (H 0,k / 2+1 )=rank(H 0,k / 2 )=rank(H 0,k / 2-1 ).
[0104] Step D, solving the generalized eigenvalue problem, and calculating the condition number and the error estimate of the zero poles, and determining the zero pole positions of the rectangular search domain based on the condition number and the error estimate.
[0105] It should be noted that the generalized eigenvalue can be obtained by solving the generalized eigenvalue problem. The calculated condition number refers to the condition number of the generalized eigenvalue problem of the Hankel matrix, which characterizes the degree of pathology of the algorithm. The larger the condition number, the less accurate the generalized eigenvalue. The error estimate of the calculation of zeros and poles does not require the condition number. The error estimate of the calculation of zeros and poles is obtained by using the generalized eigenvalue of the N+1-order Hankel matrix and the generalized eigenvalue of the N-order Hankel matrix. See step D4 provided below for details.
[0106] like Figure 4 As shown, in this embodiment, step D includes steps D1 to D5, which are specifically as follows:
[0107] Step D1, construct the N-order Hankel matrix H 0,N With H 1,N , Use the QZ algorithm to calculate the generalized eigenvalue problem H 1,N -λH 0,N The solution is stored in the array ζ_solve, and the array ζ_solve is judged whether it satisfies the condition D1; if the array ζ_solve satisfies the condition D1, then the step D2 is executed, otherwise, the condition number Execute step E; wherein condition D1 includes r min <|ζ_solve(i)|<1 and
[0108] Step D2, calculate the condition number κ based on the elements of the array ζ_solve 2 .
[0109] In this embodiment, the condition number Among them, r + =max(|ζ_solve|),r - =min(|ζ_solve|),
[0110] Step D3, construct the N+1 order Hankel matrix H 0,N+1 and H 1,N+1 , use the QZ algorithm to calculate the generalized eigenvalue problem H 1,N+1 -λH 0,N+1 The solution is stored in the array ζ_solve_ref;
[0111] Step D4, find the error estimate ε of the solution to the generalized eigenvalue problem error ,in,
[0112] Step D5, if the condition number and error estimate meet condition D2, the rectangular search domain solution is completed, the array ζ_solve is inversely transformed to obtain the zero and pole positions, the result is stored in the array z_solve, and the boundary up_edge_0 is set to down_edge, and step B is executed to solve the next rectangular search domain; otherwise, the array f_integral is copied to the array f0_integral, and step E is executed; where condition D2 is and ε error <ε a .
[0113] For conditions D1 and D2 in step D1 and step D5, if the condition number and the error of the solution meet condition D2, ζ_solve performs the inverse transformation Get the zero-pole position, store it in z_solve, set up_edge_0 = down_edge, and execute step B to solve the next search domain. Otherwise, copy f_integral to array f0_integral, execute step E1, and subdivide the current search domain once.
[0114] Conditions D1 and D2 are used to correct possible errors in determining the Hankel matrix rank in step C5. If the matrix rank is determined incorrectly in step C5, then there is a high probability that there is a solution outside the search domain or an error in the array ζ_solve. The search domain will be subdivided. For the subdivided sub-regions, since the number of discrete points on the boundary is doubled, the numerical error of calculating the contour integral is smaller, and the probability of error in judging the Hankel matrix rank in step C5 becomes smaller. Step C5 and conditions D1 and D2 constitute a set of accurate judgment schemes for the Hankel matrix rank. In this way, the situation of incorrect judgment of the Hankel matrix rank is corrected, thereby greatly reducing the probability of missing solutions or multiple solutions in such algorithms.
[0115] In some embodiments, step E comprises:
[0116] Step E1, divide the rectangular search domain into 4 sub-areas in the shape of a field, so that the long side of the rectangular search domain has 2n1 boundary discrete points, and the short side of the rectangular search domain has 2n2 boundary discrete points, number each boundary discrete point from the lower left corner in counterclockwise order, determine the first position of each boundary discrete point, and store the first position in the array z_sub_edge, allocate the function value calculation task of the boundary discrete point, and the processes numbered from m(i-1) to mi-1 are divided into the i-th sub-communication domain, and call the function f in the i-th sub-communication domain to calculate the sequence numbered 2(i-1)N in the array z_sub_edge. total / N p +1 to 2iN total / Np The function value of the boundary discrete point is obtained, and the new calculation result of the process from m(i-1) to mi-1 is stored in 2N total dimensional array f_sub_integral; the function values of the boundary discrete points with odd numbers are inherited from the array f_integral, and the function values of the boundary discrete points with even numbers are recalculated by calling function f;
[0117] For the horizontal lines and vertical lines inside the divided rectangular search domain, there are 2n1 boundary discrete points and 2n2 boundary discrete points respectively. The boundary discrete points are numbered from left to right and from bottom to top, the second position of each boundary discrete point is determined, and the second position is stored in the array z_center_line. The function value calculation task of the boundary discrete point is allocated, and the processes numbered from m(i-1) to mi-1 are divided into the i-th sub-communication domain. The function f is called to calculate the process numbered at (i-1)N in the array z_center_line in the i-th sub-communication domain. total / N p +1 to iN total / N p The function value of the boundary discrete point is stored in N total dimensional array f_center_integral.
[0118] Specifically, if Figure 3 As shown, the long side of the rectangular search domain is AB, and the short side is BC, that is, 2n1 points are discretized on the AB side, and 2n2 points are discretized on the BC side. The two center lines EF and GH are discretized into 2n1 points and 2n2 points respectively, and these discrete points are numbered in the order of E→F→G→H. Step E provided in this embodiment is a parallelization scheme, which takes into account the problem of repeated calculation of the function values of the boundary discrete points, and reasonably distributes the calculation tasks of each process, realizes high-efficiency parallelization, and reduces the time consumption of the traditional algorithm.
[0119] In some further embodiments, step E further includes:
[0120] Step E2: for sub-region i, assign the function values of the four boundary discrete points corresponding to the sub-region i in the array f_sub_integral and the array f_center_integral to the array f_integral, and perform steps C and D based on the array f_integral to obtain the condition number and error estimate of the sub-region i;
[0121] Step E3, determine whether the condition number and error estimate of the sub-region i meet the condition D2. If the condition number and error estimate of the sub-region do not meet the condition D2, copy the array f_integral to the array f0_integral and execute step E1. Otherwise, perform an inverse transformation on the array ζ_solve to obtain the zero and pole positions; let i=i+1 and repeat step E2 until all sub-regions are solved.
[0122] It should be noted that the solution algorithm formed by the solution steps ABCDE described in the above embodiment is abbreviated as ZPL (full name Zero_Pole_Location). The ZPL program mainly includes three core subroutines: argument_solve, subdivision and zero_pole_location. The argument_solve subroutine implements steps C to D, the subdivision subroutine implements step E, and zero_pole_location systematically calls argument_solve and subdivision to implement the entire process of the solution algorithm. The flowcharts of these three subroutines are detailed in Figure 4 , Figure 5 and Figure 6 .
[0123] In addition, it should be noted that the zero-pole positions calculated based on the solution process provided in the embodiment of the present application can be used as the initial value of the Newton iteration method to verify the zero-pole positions given by this algorithm.
[0124] 103. Based on all zeros and poles, the distribution results of the plasma linear eigenmode modes are determined.
[0125] In this embodiment, when all the zeros and poles of the dispersion function are solved, the distribution result of the plasma linear eigenmode can be determined naturally. This is a conventional technical means in the art and will not be elaborated here.
[0126] In addition, with respect to the application scenarios of the function solving method, this embodiment provides detailed descriptions by solving the zero-point distribution of the plasma dispersion relation and the propagation mode of the uniformly magnetized plasma parallel to the magnetic field.
[0127] For the zero point distribution of plasma dispersion relation, plasma dispersion function It is widely used in the study of the kinetic theory of plasma wave-particle interaction. In the past, most programs could only calculate the zero point with the largest imaginary part of the function. This example aims to calculate all the zeros and poles of the function in the region of Re(z)∈[0,5],Im(z)∈[-5,0]. The remaining optional parameters use the default parameters of the program. The calculation results are shown in the following table:
[0128] The number of zeros and poles 7 Zeros and poles of a function Multiplicity error The corresponding function value 1.9914669-1.3548101i 1 1.86E-08 -1.729321e-07-9.1958846e-10i 2.691149-2.1770449i 1 1.93E-08 4.1052857e-08+1.1925702e-08i 3.2353312-2.7843882i 1 3.89E-08 -7.3994399e-07+1.2421607e-06i 3.6973095-3.2874106i 1 1.83E-08 4.3575071e-07-3.6301998e-07i 4.1061169-3.7259491i 1 3.60E-08 -1.9171383e-05+8.1467823e-07i 4.4768157-4.1196352i 1 7.72E-09 1.4332402e-08+8.9184149e-09i 4.8184883-4.4798328i 1 1.92E-08 -1.4065892e-08+4.053586e-08i
[0129] Combine the calculation results in the table to determine the zero point position distribution diagram, such as Figure 7 shown.
[0130] For the propagation mode of uniformly magnetized plasma parallel to the magnetic field: The propagation characteristics of waves in uniformly magnetized plasma have important applications in the fields of magnetic confinement fusion plasma wave heating and diagnosis, among which the dispersion relation of cold plasma has been fully studied, but the dispersion relation considering kinetic effects has not been fully studied due to its more complex form and the limitations of numerical tools. This example aims to give the distribution of the frequency of the mode propagating parallel to the magnetic field in the complex plane considering the kinetic effect. When considering the kinetic effect, the waves propagating parallel to the magnetic field can be divided into three types of waves, and the dispersion relations are as follows:
[0131] Right-handed wave:
[0132] Left-handed wave:
[0133] Electrostatic waves (Langmuir waves):
[0134]
[0135] Take plasma parameters: B = 1T, T e =T i =1keV,n i =n e =10 19 m -3 ,k ∥ ρ ti = 0.01, the distribution of the above dispersion relation solutions is calculated using the ZPL program, see Figure 8 The two zeros on the real axis are basically the same as the zeros of the cold plasma dispersion relation, but the ZPL program can additionally calculate the frequency distribution of the ion sound waves and the The symmetric distribution is similar to the left-handed wave solution at the zero point of the plasma dispersion relation.
[0136] By adjusting k ∥ ρ ti , calculate the real and imaginary part change trends of the zero point with the smallest damping rate in the above three waves, see Fig. 9 , Fig. 9 The color of the midpoint reflects the size of the imaginary part.
[0137] Please refer to Fig.10 , Fig.10 A schematic diagram of a stable numerical device for solving the plasma dispersion relation provided in an embodiment of the present application, wherein the device is used to perform the following steps: Figure 1 A stable numerical method for solving the plasma dispersion relation is shown in Fig.10 As shown, the device comprises:
[0138] A function acquisition module 1010 is used to acquire a dispersion relation for characterizing a plasma linear eigenmode;
[0139] A solving module 1020 is used to call a semipure function solver to solve all zeros and poles in a specified region of the dispersion relationship and calculate error estimates of the zeros and poles;
[0140] The processing module 1030 is used to determine the distribution result of the plasma linear eigenmode mode based on all zeros and poles.
[0141] Please refer to Fig.11 , Fig.11 A schematic diagram of the structure of a computer device provided in an embodiment of the present application. The computer device 1100 includes a processor 1110, a memory 1120, a communication interface 1130, and at least one communication bus for connecting the processor 1110, the memory 1120, and the communication interface 1130. The memory 1120 includes, but is not limited to, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (PROM), or a portable CD-ROM, and the memory 1120 is used for related instructions and data.
[0142] The communication interface 1130 is used to receive and send data. The processor 1110 may be one or more CPUs. When the processor 1110 is a CPU, the CPU may be a single-core CPU or a multi-core CPU. The processor 1110 in the computer device 1100 is used to read one or more programs 1121 stored in the memory 1120, and perform the following operations: obtain the dispersion relation for characterizing the linear eigenmode of the plasma; call the semi-pure function solver to solve all zeros and poles in the specified region of the dispersion relation, and calculate the error estimate of the zeros and poles; based on all zeros and poles, determine the distribution result of the plasma linear eigenmode mode.
[0143] It should be noted that the specific implementation of each operation can be Figure 1 The corresponding description of the method embodiment shown, the computer device 1100 can be used to execute a stable numerical method for solving the plasma dispersion relation of the above method embodiment of the present application, which will not be described in detail here.
[0144] In the embodiment of the present application, a computer-readable storage medium is also provided, and the computer-readable storage medium is a memory device in a computer device for storing programs and data. It is understandable that the computer-readable storage medium here can include both the built-in storage medium in the computer device and the extended storage medium supported by the computer device. The computer-readable storage medium provides a storage space, which stores the operating system of the terminal. In addition, one or more instructions suitable for being loaded and executed by the processor are also stored in the storage space, and these instructions can be one or more computer programs (including program codes). It should be noted that the computer-readable storage medium here can be a high-speed RAM memory or a non-volatile memory (non-volatile memory), such as at least one disk memory. The processor can load and execute one or more instructions stored in the computer-readable storage medium to implement the corresponding steps of a stable numerical method for solving the plasma dispersion relation in the above embodiment. It should be understood by those skilled in the art that the embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can be in the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0145] The specific implementation methods described above further illustrate the purpose, technical solutions and beneficial effects of the present application in detail. It should be understood that the above description is only the specific implementation method of the present application and is not intended to limit the scope of protection of the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the scope of protection of the present application.
Claims
1. A stable numerical method for solving the plasma dispersion relation, characterized in that the method include: Obtaining dispersion relations for characterizing plasma linear eigenmodes; Call the semipure function solver to solve all zeros and poles in the specified area of the dispersion relationship, and calculate the error estimate of the zeros and poles; Based on all zeros and poles, the distribution results of the plasma linear eigenmode modes are determined.
2. A stable numerical method for solving plasma dispersion relations according to claim 1, characterized in that: The process of calling the semipure function solver to solve all zeros and poles in the specified region of the dispersion relation is as follows: Step A, setting the parameters required for the semipure function solver to solve; wherein the parameters include the first parameter and the second parameter, the first parameter includes the number of cores m required for the semipure function, the rectangular solution area boundary, the number of discrete points on the long side of a single rectangular area n1, the number of discrete points on the short side of a single rectangular area n2, and the total number of discrete points N in the rectangular area total and the number of parallel cores for the semipure function solver mN p The second parameters include the coordinate transformation parameter ε0 and the upper limit of the numerical error of the contour integral ε i , condition number bound and zero-pole error bounds ε a ; Among them, N total =2n1+2n2, N p N total Factors of Step B, dividing the solution area, obtaining a rectangular search domain, and calculating the function value of the rectangular search domain at the discrete points on the boundary; Step C, calculating a reference value of the contour integral according to the function value of the rectangular search domain at the discrete points on the boundary, and determining the total number of zeros and poles in the rectangular search domain; Step D, solving the generalized eigenvalue problem, and calculating the condition number and the error estimate of the zero poles, and determining the zero pole positions of the rectangular search domain according to the condition number and the error estimate.
3. A stable numerical method for solving plasma dispersion relations according to claim 2, characterized in that: Step B comprises: Step B1, dividing the solution area into a rectangular search domain along the imaginary axis direction; Step B2, evenly discretize the edge of the real axis direction of the rectangular search domain into n1 boundary discrete points, and evenly discretize the edge of the imaginary axis direction into n2 boundary discrete points, number each boundary discrete point in counterclockwise order from the lower left corner, determine the position of each boundary discrete point, and store the position of each boundary discrete point in the array z_edge, allocate the function value calculation task of the boundary discrete point, and divide the process numbered from m(i-1) to mi-1 into the i-th sub-communication domain, and call function f in the i-th sub-communication domain to calculate the process numbered from (i-1)N total / N p +1 to iN total / N p The function value of the boundary discrete point is obtained to obtain the calculation result of the process from m(i-1) to mi-1, and the calculation result is stored in N total dimensional array f_integral; where i = 1, 2, ... N p .
4. A stable numerical method for solving plasma dispersion relations according to claim 3, characterized in that: Step C comprises: Step C1, calculate the complex angle of the array f_integral, store the complex angle into the array angle_f_integral, and set angle_f_integral(N total +1) = angle_finegral(1), create N total +1-dimensional integer array m, initialize all elements of integer array m to 0, perform logical processing on array angle_inegral and integer array m, and obtain angle_f_integral(k)=angle_f_integral(k)+2m(k)π; Step C2, according to the coordinate transformation Calculate the position ζ_edge of the array z_edge in the new coordinate system and set ζ_edge(N total +1)=ζ_edge(1), where L = right_edge - left_edge; calculate ln|f_integral(i)|, store the calculation result in the array ln_f_integral, and use the cubic spline curve interpolation method to make the array ln_f_integral and the array angle_f_integral continuous; where i = 1, 2…N total ; Step C3, using Gauss integration method to calculate four numerical integrals, and determining the contour integral G from the four numerical integrals k ; Use the trapezoidal integration method to calculate the contour integral G k Reference value G k,ref Among them, G k =ζ_integral(1) k (m(N total +1)-m(1))+(S1+S2+S3+S4) / (2πi), S1, S2, S3, S4 are four numerical integrals respectively; Step C4, according to the reference value G k,ref Calculate the contour integral G k The error value ε svd ; Step C5: when k is an even number, construct a k / 2+1 order Hankel matrix H based on the error values of the first k contour integrals. 0,k / 2+1 , for the Hankel matrix H 0,k / 2+1 Perform singular value decomposition, obtain the singular values, and store the singular values in array s from large to small; Step C6, determine the continuous third-order Hankel matrix H 0,k / 2+1 Whether the rank of satisfies the condition C1, if it satisfies the condition C1, then the total number of zeros and poles in the rectangular search domain N = rank (H 0,k / 2+1 ); if condition C1 is not satisfied, set k = k + 1 and return to step C3; where condition C1 is rank (H 0,k / 2+1 )=rank(H 0,k / 2 )=rank(H 0,k / 2-1 ).
5. A stable numerical method for solving plasma dispersion relations according to claim 4, characterized in that: The numerical error of the Hankel matrix elements is expressed as the error value ε svd To judge, specifically: if the array s(i)>ε svd , then the array s(i) is a non-zero singular value.
6. A stable numerical method for solving plasma dispersion relations according to claim 4, characterized in that: Step D comprises: Step D1, construct the N-order Hankel matrix H 0,N With H 1,N , Use the QZ algorithm to calculate the generalized eigenvalue problem H 1,N -λH 0,N The solution is stored in the array ζ_solve, and the array ζ_solve is judged whether it satisfies the condition D1; if the array ζ_solve satisfies the condition D1, then the step D2 is executed, otherwise, the condition number Execute step E; wherein condition D1 includes as well as Step D2, calculate the condition number κ based on the elements of the array ζ_solve 2 ; Step D3, construct the N+1 order Hankel matrix H 0,N+1 and H 1,N+1 , use the QZ algorithm to calculate the generalized eigenvalue problem H 1,N+1 -λH 0,N+1 The solution is stored in the array ζ_solve_ref; Step D4, find the error estimate ε of the solution to the generalized eigenvalue problem error ,in, among them,r + =max(|ζ_solve|),r - =min(|ζ_solve|), Step D5, if the condition number and error estimate meet condition D2, the rectangular search domain solution is completed, the array ζ_solve is inversely transformed to obtain the zero and pole positions, the result is stored in the array z_solve, and the boundary up_edge_0 is set to down_edge, and step B is executed to solve the next rectangular search domain; otherwise, the array f_integral is copied to the array f0_integral, and step E is executed; where condition D2 is and ε error <ε a .
7. A stable numerical method for solving plasma dispersion relations according to claim 6, characterized in that: Step E comprises: Step E1, divide the rectangular search domain into 4 sub-areas in the shape of a field, so that the long side of the rectangular search domain has 2n1 boundary discrete points, and the short side of the rectangular search domain has 2n2 boundary discrete points, number each boundary discrete point from the lower left corner in counterclockwise order, determine the first position of each boundary discrete point, and store the first position in the array z_sub_edge, allocate the function value calculation task of the boundary discrete point, and the processes numbered from m(i-1) to mi-1 are divided into the i-th sub-communication domain, and call the function f in the i-th sub-communication domain to calculate the sequence numbered 2(i-1)N in the array z_sub_edge. total / N p +1 to 2iN total / N p The function value of the boundary discrete point is obtained, and the new calculation result of the process from m(i-1) to mi-1 is stored in 2N total dimensional array f_sub_integral; the function values of the boundary discrete points with odd numbers are inherited from the array f_integral, and the function values of the boundary discrete points with even numbers are recalculated by calling function f; For the horizontal lines and vertical lines inside the divided rectangular search domain, there are 2n1 boundary discrete points and 2n2 boundary discrete points respectively. The boundary discrete points are numbered from left to right and from bottom to top, the second position of each boundary discrete point is determined, and the second position is stored in the array z_center_line. The function value calculation task of the boundary discrete point is allocated, and the processes numbered from m(i-1) to mi-1 are divided into the i-th sub-communication domain. The function f is called to calculate the process numbered at (i-1)N in the array z_center_line in the i-th sub-communication domain. total / N p +1 to iN total / N p The function value of the boundary discrete point is stored in N total dimensional array f_center_integral.
8. A stable numerical method for solving plasma dispersion relations according to claim 7, characterized in that: Step E also includes: Step E2: for sub-region i, assign the function values of the four boundary discrete points corresponding to the sub-region i in the array f_sub_integral and the array f_center_integral to the array f_integral, and perform steps C and D based on the array f_integral to obtain the condition number and error estimate of the sub-region i; Step E3, determine whether the condition number and error estimate of the sub-region i meet the condition D2. If the condition number and error estimate of the sub-region do not meet the condition D2, copy the array f_integral to the array f0_integral and execute step E1. Otherwise, perform an inverse transformation on the array ζ_solve to obtain the zero and pole positions; let i=i+1 and repeat step E2 until all sub-regions are solved.
9. A stable numerical device for solving the dispersion relation of plasma, characterized in that: A device for executing a stable numerical method for solving a plasma dispersion relation as claimed in any one of claims 1 to 8, comprising: A function acquisition module, used for acquiring a dispersion relation for characterizing a plasma linear eigenmode; A solving module is used to call a semipure function solver to solve all zeros and poles in a specified area of the dispersion relationship and calculate error estimates of the zeros and poles; The processing module is used for determining the distribution result of the plasma linear eigenmode mode based on all zero poles.
10. A computer device, characterized in that: The computer device includes a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, the steps of a stable numerical method for solving plasma dispersion relations as described in any one of claims 1 to 8 are implemented.
