A method for calculating a new classical transport coefficient of a toroidal plasma based on a heterogeneous computing platform

By partitioning and optimizing the neoclassical transport coefficient calculation program for toroidal plasmas on a heterogeneous computing platform, and utilizing GPU computing and compressed storage of non-zero elements, the high-cost computing problem was solved, and efficient neoclassical transport coefficient calculation was achieved, meeting the needs of physics research.

CN120929705BActive Publication Date: 2026-02-10ANHUI UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511463890.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-14
Publication Date
2026-02-10
Estimated Expiration
2045-10-14

AI Technical Summary

Technical Problem

Existing technologies suffer from high computational costs and long iteration cycles for neoclassical transport coefficients when dealing with low-collision-rate plasma parameters, complex three-dimensional magnetic field configurations, and high-precision phase space grids, which cannot meet the needs of physics research.

Method used

A heterogeneous computing platform-based approach was adopted to divide the neoclassical transport coefficient calculation program for toroidal plasma into several sub-units, mark high-consumption units, and optimize high-consumption units through GPU computing. By utilizing three-level non-zero element compressed storage and multi-threaded solution, a solution equation suitable for GPU computing was constructed, and the polar-to-circular mode coupling order was dynamically adjusted to improve computational efficiency.

Benefits of technology

It significantly improves the efficiency of neoclassical transport coefficient calculation, reduces the cost of high-precision calculation, and provides an efficient tool for physical research.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120929705B_ABST
    Figure CN120929705B_ABST
Patent Text Reader

Abstract

The application provides a toroidal plasma new-classical transport coefficient calculation method based on a heterogeneous computing platform, relates to the fusion plasma numerical simulation technical field, and constructs a solving equation suitable for GPU calculation according to input data of a high-consumption unit, realizes new-classical transport coefficient calculation based on the heterogeneous computing platform, meanwhile, performs three-level non-zero element compression storage on data in the solving equation, breaks through the performance bottleneck of a traditional calculation program, greatly improves toroidal plasma new-classical transport coefficient calculation efficiency, effectively solves the high-cost problem of the traditional physical simulation method in high-precision calculation, and provides an effective tool for efficient development of toroidal plasma new-classical transport physical research.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of fusion plasma numerical simulation technology, specifically to a neoclassical method for calculating the transport coefficient of toroidal plasma based on a heterogeneous computing platform. Background Technology

[0002] Neoclassical transport coefficients are crucial physical quantities describing the transport characteristics of toroidal plasmas, playing a decisive role in macroscopic physical features such as particle flux, heat flux, and current density in tokamak and stellarator fusion plasmas. Based on first-principles physics, i.e., drift physics, numerical simulation methods are used to solve the phase space drift physics equations and then calculate the neoclassical transport coefficients. This is of paramount importance for predicting, evaluating, and optimizing the parameter performance of fusion devices.

[0003] The DKES (Drift Kinetic Equation Solver) program decomposes the plasma perturbation distribution function using Fourier space and Legendre polynomial space series expansions. It then uses variational principles to solve for the upper and lower bounds of the neoclassical transport coefficients. By increasing the order of the poloidal-toroidal mode coupling of the perturbation distribution function, convergence of the upper and lower bounds is achieved, ultimately yielding the neoclassical transport coefficients. This program can handle complex three-dimensional toroidal magnetic field configurations, and its numerical convergence is rigorously supported by mathematical theorems. It is the mainstream technique for calculating neoclassical transport coefficients in three-dimensional toroidal plasmas.

[0004] However, existing technologies have the following shortcomings: mainstream neoclassical transport coefficient calculation techniques are based on CPU isomorphic serial architectures. When dealing with low-collision-rate plasma parameters, complex three-dimensional magnetic field configurations, and high-precision phase space meshes, the computational cost increases exponentially, and the iteration cycle becomes significantly longer, failing to meet the needs of smooth physics research. There is a need in this field for neoclassical transport coefficient calculation methods that balance computational accuracy and efficiency to meet the demands of efficient related physics research. Summary of the Invention

[0005] The purpose of this invention is to provide a neoclassical transport coefficient calculation method for toroidal plasmas based on a heterogeneous computing platform, so as to solve the problems mentioned in the background art.

[0006] To achieve the above objectives, the present invention provides the following technical solution:

[0007] A neoclassical method for calculating the transport coefficient of toroidal plasmas based on a heterogeneous computing platform includes the following steps:

[0008] Step 1: Divide the original neoclassical transport coefficient calculation program for toroidal plasma into several sub-units. Obtain the comprehensive resource consumption index based on the calculation time, CPU utilization, and memory utilization of each unit, and mark the sub-unit with the maximum value of the comprehensive resource consumption index as a high-consumption unit.

[0009] Step 2: Obtain the input data of the high-consumption unit, and construct the solution equation for GPU computing by normalizing the plasma perturbation distribution function, Legendre polynomial expansion order, and poloidal-circular mode coupling order. At the same time, perform three-level non-zero element compression storage on the data in the solution equation, and obtain the solution vector of the solution equation through GPU multi-threading.

[0010] Step 3: Return the solution vector to the CPU to calculate and obtain the neoclassical transport coefficients, and calculate the convergence error of the neoclassical transport coefficients based on the upper and lower bounds of the neoclassical transport coefficients.

[0011] Step 4: Set a convergence error threshold. When the convergence error is less than the convergence error threshold, the new classical transport coefficients are obtained. When the convergence error is not less than the convergence error threshold, the polar-circular mode coupling order is adjusted according to the convergence error, and the process returns to Step 2 to obtain the new classical transport coefficients again.

[0012] Furthermore, the total calculation time of the original neoclassical transport coefficient calculation program for toroidal plasma was obtained. The program was divided into units including parameter input unit, series decomposition unit, matrix construction unit, matrix solving unit, neoclassical transport coefficient calculation unit, and result output unit. Each unit was numbered, and the calculation time of each unit was obtained. The percentage of time consumed by each subunit in the calculation process was also obtained, based on the following formula:

[0013] ;

[0014] in, Indicates the first The percentage of time spent per unit, Indicates the first The time taken during the calculation of each unit, This represents the total time taken by the neoclassical transport coefficient calculation program for primitive toroidal plasmas. Retrieve variables for unit number. , ;

[0015] The CPU and memory usage rates of each unit during the calculation process are obtained at equal time intervals, and the average CPU and memory usage rates are obtained. The plasma collision rate and the number of Fourier components of the magnetic field are also obtained. A comprehensive resource consumption index for each unit is constructed based on the following formula:

[0016] ;

[0017] in, Indicates the first The comprehensive resource consumption index of each unit. Plasma collision rate, Magnetic field Fourier component number Indicates exponentiation. Indicates the first Average CPU utilization of each unit Indicates the first Average memory usage of each unit;

[0018] The unit with the highest comprehensive resource consumption index value is marked as a high-consumption unit.

[0019] Furthermore, the input data of the high-consumption unit is obtained, and the equations for GPU computation are constructed based on the input data, as follows:

[0020] The plasma perturbation distribution function and Maxwell's distribution function are obtained, and the normalized plasma perturbation distribution function is calculated using the following formula:

[0021] ;

[0022] in, This represents the normalized plasma perturbation distribution function. This represents the plasma perturbation distribution function. Describes the Maxwell distribution function. The independent variable is the normalized plasma perturbation distribution function. Specifically, it refers to the particle velocity parallel to the direction of the magnetic field.

[0023] By inverting the independent variable, we obtain the equivalent normalized plasma perturbation distribution function, based on the following formula:

[0024] ;

[0025] in, This represents the equivalent normalized plasma perturbation distribution function;

[0026] The even-symmetric and odd-symmetric components of the perturbation distribution function are obtained using the following formula:

[0027] ;

[0028] ;

[0029] in, For even-symmetric components, It is an odd symmetric component;

[0030] The thermodynamic driving term in the neoclassical transport coefficient calculation program for the original toroidal plasma is obtained. A system of equations is constructed based on the even-symmetric and odd-symmetric components of the perturbation distribution function. The formulas used are as follows:

[0031] ;

[0032] ;

[0033] in, For the partial differential operator governing the motion of collisionless particles, It is a thermodynamic driving term. This is the partial differential operator for plasma collision effects.

[0034] Furthermore, the polar-circular mode coupling order and the highest order of the Legendre expansion are obtained. Using thermodynamic driving force, Legendre polynomials, and Fourier basis functions as bases, a series expansion is performed on the solution system of equations, transforming it into matrix form. The formulas used are as follows:

[0035] ;

[0036] in, The matrix form representing the expansion coefficients of the thermodynamic driving term. Specifically, the length is column vectors, Indicates the order of polar-circular mode coupling. To develop Legendre to its highest order, Denotes the vector to be solved. The partial differential operators representing the motion of collisionless particles and the partial differential operators representing plasma collision effects, after being expanded into matrix form, are labeled as quindiagonal matrices.

[0037] The partial differential operators for the motion of collisionless particles and the partial differential operators for plasma collision effects, after expansion into matrix forms, are based on the following formulas:

[0038] ;

[0039] In this case, the row and column dimensions of the pentagonal matrix are both 1. , Indicates the first Line number The basic matrix of columns, and The row and column lengths are both ,in, The retrieval variable for the row. Represents the retrieval variables for the column. , , , .

[0040] Furthermore, the five-diagonal matrix is ​​compressed and stored using a three-level non-zero element compression method, as follows:

[0041] The pentagonal matrix is ​​no longer stored in matrix form; only the non-zero elements are stored. Each non-zero element is assigned its position index within the pentagonal matrix. This position index is a three-level index: the first level indicates which diagonal the element is located on; the second level indicates which fundamental matrix the element is located on; and the third level indicates the specific row and column position of the element within the fundamental matrix. The formula used is as follows:

[0042] ;

[0043] in, Represents the numerical value of non-zero elements. This represents a third-level index value. This indicates a first-level index. , , This indicates a second-level index. , , This indicates a third-level index. This indicates the row value of the non-zero element in the fundamental matrix. This represents the column value of the non-zero element in the fundamental matrix. , , , ;

[0044] The five-diagonal matrix with compressed storage of three-level non-zero elements and the solution equation in matrix form are input into the GPU shared memory. Multithreading is then used to calculate the vector to be solved and obtain the solution vector.

[0045] Furthermore, the solution vector is returned to the CPU for series summation to obtain the new classical transport coefficients, and the convergence of the solution result is determined, as follows:

[0046] The solution vector is returned to the CPU for series summation to obtain the odd symmetric component matrix and even symmetric component matrix of the perturbation distribution function. Then, the velocity space integral is performed on the odd symmetric component matrix and even symmetric component matrix of the perturbation distribution function to obtain the new classical transport coefficient.

[0047] The particle velocity vector and velocity direction function are obtained through the original toroidal plasma neoclassical transport coefficient calculation program, and the upper bound of the neoclassical transport coefficient is obtained based on the following formula:

[0048] ;

[0049] in, This is the upper bound of the neoclassical transport coefficient. For particle velocity vectors, For velocity space integration operations, It is a function of velocity direction. The matrix representing the odd symmetric components of the perturbation distribution function;

[0050] The formula used to obtain the lower bound of the neoclassical transport coefficient is as follows:

[0051] ;

[0052] in, lower bound of the neoclassical transport coefficient The matrix representing the even-symmetric component of the perturbation distribution function;

[0053] The convergence error is obtained using the following formula:

[0054] ;

[0055] in, This represents the convergence error.

[0056] Furthermore, a convergence error threshold is set. When the convergence error is less than the threshold, the solution vector after series summation is considered the final calculation result of the neoclassical transport coefficients, and this is calibrated as obtaining the neoclassical transport coefficients. When the convergence error is not less than the threshold, the polar-circular mode coupling order is adjusted according to the convergence error, based on the following formula:

[0057] ;

[0058] in, This is the adjusted polar-circular mode coupling order. The order of the polar-circular mode coupling before adjustment. To adjust the step size, ;

[0059] Based on the adjusted polar-circular mode coupling order, return to step 2 to reconstruct and solve the system of equations until the convergence error is less than the convergence error threshold, and obtain the new classical transport coefficients.

[0060] Compared with the prior art, the beneficial effects of the present invention are:

[0061] This invention constructs solution equations suitable for GPU computing based on input data from high-consumption units, realizing the calculation of neoclassical transport coefficients on a heterogeneous computing platform. Simultaneously, it performs three-level non-zero element compression storage on the data in the solution equations, breaking through the performance bottleneck of traditional computing programs and greatly improving the calculation efficiency of neoclassical transport coefficients in toroidal plasmas. This effectively solves the high cost problem of traditional physical simulation methods in high-precision calculations, providing an effective tool for the efficient development of neoclassical transport physics research in toroidal plasmas. Attached Figure Description

[0062] Figure 1 This is a schematic diagram of the overall method flow of the present invention;

[0063] Figure 2 This is a graph showing the variation of the neoclassical transport coefficient according to an embodiment of the present invention;

[0064] Figure 3 The graph shows the variation of the neoclassical transport coefficient obtained by the original program under the same physical parameters. Detailed Implementation

[0065] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to specific embodiments.

[0066] It should be noted that, unless otherwise defined, the technical or scientific terms used in this invention should have the ordinary meaning understood by one of ordinary skill in the art to which this invention pertains. The terms "first," "second," and similar terms used in this invention do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Terms such as "comprising" or "including" mean that the element or object preceding the word encompasses the elements or objects listed following the word and their equivalents, without excluding other elements or objects. Terms such as "connected" or "linked" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. Terms such as "upper," "lower," "left," and "right" are used only to indicate relative positional relationships; when the absolute position of the described object changes, the relative positional relationship may also change accordingly.

[0067] Example:

[0068] Please see Figure 1 The present invention provides a technical solution:

[0069] A neoclassical method for calculating the transport coefficient of toroidal plasmas based on a heterogeneous computing platform includes the following steps:

[0070] Step 1: Divide the original neoclassical transport coefficient calculation program for toroidal plasma into several sub-units. Obtain the comprehensive resource consumption index based on the calculation time, CPU utilization, and memory utilization of each unit, and mark the sub-unit with the maximum value of the comprehensive resource consumption index as a high-consumption unit.

[0071] Step 1 includes the following:

[0072] The total calculation time of the original neoclassical transport coefficient calculation program for toroidal plasma was obtained. The program was divided into units including parameter input unit, series decomposition unit, matrix construction unit, matrix solving unit, neoclassical transport coefficient calculation unit, and result output unit. Each unit was numbered, and the calculation time of each unit was obtained. The percentage of time consumed by each sub-unit in the calculation process was also obtained, based on the following formula:

[0073] ;

[0074] in, Indicates the first The percentage of time spent per unit, Indicates the first The time taken during the calculation of each unit, This represents the total time taken by the neoclassical transport coefficient calculation program for primitive toroidal plasmas. Retrieve variables for unit number. , ;

[0075] The CPU and memory usage rates of each unit during the calculation process are obtained at equal time intervals, and the average CPU and memory usage rates are obtained. The plasma collision rate and the number of Fourier components of the magnetic field are also obtained. A comprehensive resource consumption index for each unit is constructed based on the following formula:

[0076] ;

[0077] in, Indicates the first The comprehensive resource consumption index of each unit. Plasma collision rate, Magnetic field Fourier component number Indicates exponentiation. Indicates the first Average CPU utilization of each unit Indicates the first Average memory usage of each unit;

[0078] Indicates the first The comprehensive resource consumption index of each cell reflects the degree of resource consumption of that cell in the calculation of the neoclassical transport coefficient of toroidal plasma, and is used to identify high-consumption cells. In a real-world environment, It helps identify computational bottlenecks and optimize resource allocation. Independent variables include... This represents the percentage of time spent, reflecting the importance of the sub-unit's computation time; This represents the average CPU utilization, reflecting the processor resource requirements. This represents the average memory usage, reflecting memory consumption. , representing the plasma collision rate, characterizing the complexity of the physical environment; , representing the number of Fourier components of the magnetic field, reflecting the influence of the magnetic field on the calculation.

[0079] when When increasing, the exponential term It exhibits non-linear growth, leading to A significant increase indicates that this sub-unit consumes a larger proportion of resources in the overall system, making it more likely to be identified as a high-consumption unit. The increase is directly proportional to This reflects the additional computational resource requirements imposed by a high collision rate; and The increase of will make Reduce, thereby lower This indicates that increased magnetic field complexity may dilute the resource consumption ratio of a single subunit. Normalizing the denominator ensures... The value is always in the range [0, 1], and when a certain sub-unit's When it is much larger than other sub-units, its The value is close to 1, highlighting its high resource consumption characteristics. This design allows the formula to sensitively capture differences in resource consumption, providing precise guidance for subsequent targeted optimization.

[0080] The unit with the highest comprehensive resource consumption index value is marked as a high-consumption unit.

[0081] The original neoclassical transport coefficient calculation program for toroidal plasmas was divided into several sub-units. A comprehensive resource consumption index was calculated based on computation time, CPU utilization, and memory utilization, identifying high-consuming units. This process enabled precise quantification and analysis of the program's resource consumption. Its main practical significance lies in accurately identifying the bottleneck units with the highest resource consumption during computation through a comprehensive evaluation of time consumption percentage, average CPU utilization, and average memory utilization, providing a clear direction for subsequent targeted optimization. This step lays the foundation for optimization based on heterogeneous computing platforms, ensuring that subsequent steps can focus on high-consuming units for efficient improvement. Step 1, by identifying high-consuming units, provides direct input data processing and GPU computation optimization for those units in Step 2, thereby improving overall computational efficiency and resource utilization.

[0082] Step 2: Obtain the input data of the high-consumption unit, and construct the solution equation for GPU computing by using the normalized plasma perturbation distribution function, Legendre polynomial expansion order, and poloidal-circular mode coupling order. At the same time, perform three-level non-zero element compression storage on the data in the solution equation, and obtain the solution vector of the solution equation through GPU multi-threading.

[0083] Step 2 includes the following:

[0084] Step 201: Obtain the input data from the high-consumption unit, and construct the equations for GPU computation based on the input data, as follows:

[0085] The plasma perturbation distribution function and Maxwell's distribution function are obtained, and the normalized plasma perturbation distribution function is calculated using the following formula:

[0086] ;

[0087] in, This represents the normalized plasma perturbation distribution function. This represents the plasma perturbation distribution function. Describes the Maxwell distribution function. The independent variable is the normalized plasma perturbation distribution function. Specifically, it refers to the particle velocity parallel to the direction of the magnetic field.

[0088] By inverting the independent variable, we obtain the equivalent normalized plasma perturbation distribution function, based on the following formula:

[0089] ;

[0090] in, This represents the equivalent normalized plasma perturbation distribution function;

[0091] The even-symmetric and odd-symmetric components of the perturbation distribution function are obtained using the following formula:

[0092] ;

[0093] ;

[0094] in, For even-symmetric components, It is an odd symmetric component;

[0095] Plasma perturbation distribution function It contains symmetrical and asymmetrical motion information, by introducing The distribution function is decomposed into even-symmetric components based on the symmetry of the velocity direction. And odd symmetry It consists of two parts. This decomposition facilitates the subsequent construction and solution of the system of equations because the even-symmetric and odd-symmetric components correspond to different physical effects (such as collision and non-collision motion). and The difference and sum directly determine and The magnitude of the value reflects the degree of symmetry in the perturbation distribution.

[0096] The thermodynamic driving term in the neoclassical transport coefficient calculation program for the original toroidal plasma is obtained. A system of equations is constructed based on the even-symmetric and odd-symmetric components of the perturbation distribution function. The formulas used are as follows:

[0097] ;

[0098] ;

[0099] in, For the partial differential operator governing the motion of collisionless particles, It is a thermodynamic driving term. This is the partial differential operator for plasma collision effects.

[0100] Collision-free operators Acting on and The collision operator describes the free motion of particles in a magnetic field. Acting on the symmetry component, it introduces a particle scattering effect. Thermodynamic driving term. As an external force source, it pushes the system away from its equilibrium state, driving the transport process. This indicates that the odd-symmetric component is affected by the combined effects of collision-free motion and collision effects of the even-symmetric component, and is equal to the driving term; This indicates that the even-symmetric component is balanced by the collisionless motion and the collision effect of the odd-symmetric component, reflecting the symmetry constraint of the system. This coupling design facilitates the decomposition of complex plasma behavior into a computable set of equations, making it suitable for GPU parallel computing.

[0101] The process of acquiring input data from high-consumption cells, constructing a normalized plasma perturbation distribution function and its even-symmetric and odd-symmetric components, and building a set of solution equations for GPU computation based on thermodynamic driving terms achieves efficient mathematical modeling of complex plasma perturbation distributions. Through normalization and symmetry decomposition, complex plasma physics problems are transformed into a mathematical form suitable for GPU parallel computing, significantly reducing computational complexity while preserving the accuracy of the physical model. This step provides standardized input data for subsequent matrix-based solutions, ensuring the accuracy and consistency of the computation process. Step 201, by generating the set of solution equations, provides a direct input basis for the series expansion and matrix construction in step 202, and also provides a physical basis for the calculation of the solution vector in step 3.

[0102] Step 202: Obtain the polar-circular mode coupling order and the highest order of the Legendre expansion. Using thermodynamic driving force, Legendre polynomial, and Fourier basis functions as the basis, perform a series expansion on the system of equations to convert the system of equations into matrix form. The formulas used are as follows:

[0103] ;

[0104] in, The matrix form representing the expansion coefficients of the thermodynamic driving term. Specifically, the length is column vectors, Indicates the order of polar-circular mode coupling. To develop Legendre to its highest order, Denotes the vector to be solved. The partial differential operators representing the motion of collisionless particles and the partial differential operators representing plasma collision effects, after being expanded into matrix form, are labeled as quindiagonal matrices.

[0105] The partial differential operators for the motion of collisionless particles and the partial differential operators for plasma collision effects, after expansion into matrix forms, are based on the following formulas:

[0106] ;

[0107] In this case, the row and column dimensions of the pentagonal matrix are both 1. , Indicates the first Line number The basic matrix of columns, and The row and column lengths are both ,in, The retrieval variable for the row. Represents the retrieval variables for the column. , , , .

[0108] Obtaining the polar-circular mode coupling order and the highest order of the Legendre expansion, the system of equations is expanded into a pentagonal matrix form. This process achieves an efficient conversion from continuous physical equations to discrete matrix operations. The matrix form of the system of equations can fully utilize the parallel computing power of the GPU, significantly improving the computation speed. At the same time, the structure of the pentagonal matrix simplifies the subsequent compression storage of non-zero elements. This step lays the foundation for efficient matrix solving, ensuring the numerical stability and efficiency of the computation process. Step 202 follows the system of equations solved in step 201, generating a matrix form suitable for GPU computation, and providing direct input data for the compression storage of non-zero elements in step 203, thereby optimizing storage and computation efficiency.

[0109] Step 203: Perform three-level non-zero element compression storage on the pentagonal matrix, as follows:

[0110] The pentagonal matrix is ​​no longer stored in matrix form; only the non-zero elements are stored. Each non-zero element is assigned its position index within the pentagonal matrix. This position index is a three-level index: the first level indicates which diagonal the element is located on; the second level indicates which fundamental matrix the element is located on; and the third level indicates the specific row and column position of the element within the fundamental matrix. The formula used is as follows:

[0111] ;

[0112] in, Represents the numerical value of non-zero elements. This represents a third-level index value. This indicates a first-level index. , , This indicates a second-level index. , , This indicates a third-level index. This indicates the row value of the non-zero element in the fundamental matrix. This represents the column value of the non-zero element in the fundamental matrix. , , , ;

[0113] The five-diagonal matrix with compressed storage of three-level non-zero elements and the solution equation in matrix form are input into the GPU shared memory. Multithreading is then used to calculate the vector to be solved and obtain the solution vector.

[0114] The process of compressing and storing the five-diagonal matrix using three levels of non-zero elements and then using GPU multi-threaded computation to calculate the solution vector achieves efficient storage and fast solution of matrix data. Three-level non-zero element compression significantly reduces storage space requirements and lowers the usage of GPU shared memory, while multi-threaded parallel computation fully utilizes the GPU's computing power, significantly improving the solution speed. This step, by optimizing storage and computation methods, solves the computational bottleneck problem of high-consumption units and improves overall computational efficiency. Step 203 uses the five-diagonal matrix generated in step 202 to generate the solution vector through compressed storage and parallel computation, providing an efficient intermediate result for returning the neoclassical transport coefficients to the CPU in step 3.

[0115] Step 3: Return the solution vector to the CPU to calculate and obtain the neoclassical transport coefficients, and calculate the convergence error of the neoclassical transport coefficients based on the upper and lower bounds of the neoclassical transport coefficients;

[0116] Step 3 includes the following:

[0117] The solution vector is returned to the CPU for series summation to obtain the new classical transport coefficients, and the convergence of the solution result is determined. The logic is as follows:

[0118] The solution vector is returned to the CPU for series summation to obtain the odd symmetric component matrix and even symmetric component matrix of the perturbation distribution function. Then, the velocity space integral is performed on the odd symmetric component matrix and even symmetric component matrix of the perturbation distribution function to obtain the new classical transport coefficient.

[0119] The particle velocity vector and velocity direction function are obtained through the original toroidal plasma neoclassical transport coefficient calculation program, and the upper bound of the neoclassical transport coefficient is obtained based on the following formula:

[0120] ;

[0121] in, This is the upper bound of the neoclassical transport coefficient. For particle velocity vectors, For velocity space integration operations, It is a function of velocity direction. The matrix representing the odd symmetric components of the perturbation distribution function;

[0122] The formula used to obtain the lower bound of the neoclassical transport coefficient is as follows:

[0123] ;

[0124] in, lower bound of the neoclassical transport coefficient The matrix representing the even-symmetric component of the perturbation distribution function;

[0125] The convergence error is obtained using the following formula:

[0126] ;

[0127] in, This represents the convergence error.

[0128] and Transport coefficients are calculated from both even-symmetric and odd-symmetric components. Theoretically, they should converge to the same value, with the difference being... The denominator represents the deviation from the calculation result. Provide a normalized benchmark, enabling Dimensionless, making comparisons easier. Smaller. A close upper and lower bound indicates high precision; a larger denominator... This ensures that the relativity of the error reflects the overall scale of the transport coefficient. This design quantifies the convergence of the numerical calculation by comparing upper and lower bounds, providing a basis for subsequent error adjustment.

[0129] The solution vector is returned to the CPU for series summation to calculate the neoclassical transport coefficients. The convergence error is evaluated based on upper and lower bounds, enabling precise verification and convergence analysis of the calculation results. By introducing upper and lower bounds to calculate the convergence error, the high accuracy and reliability of the neoclassical transport coefficient calculation results are ensured, meeting the requirements for accurate transport coefficients in plasma physics research. This step, through convergence error evaluation, guarantees the reliability of the final result and provides a quantitative basis for subsequent error adjustment. Step 3 uses the solution vector generated in Step 2 to complete the transport coefficient calculation, and the convergence error evaluation provides a direct basis for error threshold judgment and parameter adjustment in Step 4.

[0130] Step 4: Set a convergence error threshold. When the convergence error is less than the convergence error threshold, the new classical transport coefficients are obtained. When the convergence error is not less than the convergence error threshold, the polar-circular mode coupling order is adjusted according to the convergence error, and the process returns to Step 2 to obtain the new classical transport coefficients again.

[0131] Step 4 includes the following:

[0132] A convergence error threshold is set. When the convergence error is less than the threshold, the solution vector after series summation is considered the final calculation result of the neoclassical transport coefficients, and this is calibrated as obtaining the neoclassical transport coefficients. When the convergence error is not less than the threshold, the polar-circular mode coupling order is adjusted according to the convergence error, based on the following formula:

[0133] ;

[0134] in, This is the adjusted polar-circular mode coupling order. The order of the polar-circular mode coupling before adjustment. To adjust the step size, ;

[0135] Convergence error This reflects the deviation in the calculation of the transport coefficient; the larger the error, the higher the mode order is required to improve the accuracy. As the denominator, the impact of plasma collisions on computational complexity is taken into account; high collision rates typically require higher resolutions. Control the adjustment range to ensure a smooth optimization process; This serves as a baseline value, ensuring adjustments are based on the current computational state. This design, through a combination of error and physical characteristics, dynamically optimizes the mode order, improving computational efficiency and accuracy.

[0136] Based on the adjusted polar-circular mode coupling order, return to step 2 to reconstruct and solve the system of equations until the convergence error is less than the convergence error threshold, and obtain the new classical transport coefficients.

[0137] By setting a convergence error threshold and adjusting the poloidal-circular mode coupling order based on the error, and iteratively optimizing until the convergence requirement is met, this process achieves dynamic optimization and result convergence in the calculation of neoclassical transport coefficients. Through an adaptive parameter adjustment mechanism, the calculation process can be dynamically optimized while ensuring computational accuracy, adapting to different plasma physics scenarios and improving the method's versatility and robustness. This step ensures the accuracy of the final transport coefficients through iterative optimization, completing the entire process from high-consumption cell optimization to final result output. Step 4 uses the convergence error result from step 3 to determine the threshold, and returns to step 2 with adjusted parameters to reconstruct and solve the equation system, forming a closed-loop optimization process, ultimately obtaining high-precision neoclassical transport coefficients.

[0138] This application also includes another specific embodiment:

[0139] As a preferred embodiment, the computing platform hardware device is an Intel i7-11800H + NVIDIA RTX3070 laptop, and the software environment is Ubuntu 22.04, HPC SDK version 2024.11.

[0140] In this embodiment, the input parameters (Representing the plasma collision rate) takes the following values: Input parameters (Representing radial electric field strength) values ​​are taken respectively. The Legendre polynomial expansion order is 150; the polar-circular mode coupling order is 20.

[0141] In a preferred embodiment, the neoclassical transport coefficient obtained by the method of the present invention varies with... and The relationship of change is as follows Figure 2 As shown in the figure. The horizontal axis represents... Different colored curves represent different The value is given, and the vertical axis in the graph is... The corresponding neoclassical transport coefficient, i.e., the particle diffusion coefficient.

[0142] In a preferred embodiment, the neoclassical transport coefficient obtained by the original neoclassical transport coefficient calculation program under the same physical parameter conditions varies with... and The relationship of change is as follows Figure 3 As shown in the figure, the meanings of the horizontal and vertical axes and the curve colors are... Figure 2 same.

[0143] By comparison, it can be found that... Figures 2-3 The values ​​and variation patterns of the curves are completely consistent. Furthermore, Table 1 details the output data of this invention and the original program, as shown below:

[0144] Table 1 Comparison of output data between the present invention and the original program.

[0145]

[0146] cmuls represents the collision rate parameter value, efields represents the radial electric field parameter value, up_nv represents the upper bound of the neoclassical transport coefficient obtained by this invention, down_nv represents the lower bound of the neoclassical transport coefficient obtained by this invention, up_gf represents the upper bound of the neoclassical transport coefficient obtained by the original calculation program, down_gf represents the lower bound of the neoclassical transport coefficient obtained by the original calculation program, "upper bound relative error" represents the relative error between up_nv and up_gf, and "lower bound relative error" represents the relative error between down_nv and down_gf. A relative error of zero indicates that, under the data precision conditions shown in this embodiment, the calculation results of this invention are completely consistent with the calculation results of the original program, proving the calculation accuracy of this invention.

[0147] In a preferred embodiment, the computation time of this invention is 857.33 seconds, while the computation time of the original program is 22802.24 seconds. Because... Therefore, this embodiment demonstrates a program optimization speedup of more than 20 times, proving that the present invention has achieved the performance improvement target for the calculation of neoclassical transport coefficients in toroidal plasmas.

[0148] The above formulas are all dimensionless calculations. The formulas are derived from software simulations based on a large amount of collected data to obtain the most recent real-world results. The preset parameters in the formulas are set by those skilled in the art according to the actual situation.

[0149] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any other combination thereof. When implemented in software, the above embodiments can be implemented, in whole or in part, as a computer program product. Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution.

[0150] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.

[0151] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.

Claims

1. A neoclassical method for calculating the transport coefficient of toroidal plasma based on a heterogeneous computing platform, characterized in that, The specific steps include: Step 1: Divide the original neoclassical transport coefficient calculation program for toroidal plasma into several sub-units. Obtain the comprehensive resource consumption index based on the calculation time, CPU utilization, and memory utilization of each unit, and mark the sub-unit with the maximum value of the comprehensive resource consumption index as a high-consumption unit. Step 2: Obtain the input data of the high-consumption unit, and construct the solution equation for GPU computing by normalizing the plasma perturbation distribution function, Legendre polynomial expansion order, and poloidal-circular mode coupling order. At the same time, perform three-level non-zero element compression storage on the data in the solution equation, and obtain the solution vector of the solution equation through GPU multi-threading. Step 3: Return the solution vector to the CPU to calculate and obtain the neoclassical transport coefficients, and calculate the convergence error of the neoclassical transport coefficients based on the upper and lower bounds of the neoclassical transport coefficients; Step 4: Set a convergence error threshold. When the convergence error is less than the convergence error threshold, the new classical transport coefficients are obtained. When the convergence error is not less than the convergence error threshold, the polar-circular mode coupling order is adjusted according to the convergence error, and the process returns to Step 2 to obtain the new classical transport coefficients again.

2. The method for calculating the neoclassical transport coefficient of toroidal plasma based on a heterogeneous computing platform according to claim 1, characterized in that: The total calculation time of the original neoclassical transport coefficient calculation program for toroidal plasma was obtained. The program was divided into units including parameter input unit, series decomposition unit, matrix construction unit, matrix solving unit, neoclassical transport coefficient calculation unit, and result output unit. Each unit was numbered, and the calculation time of each unit was obtained. The percentage of time consumed by each sub-unit in the calculation process was also obtained, based on the following formula: ; in, Indicates the first The percentage of time spent per unit, Indicates the first The time taken during the calculation of each unit, This represents the total time taken by the neoclassical transport coefficient calculation program for primitive toroidal plasmas. Retrieve variables for unit number. , ; The CPU and memory usage rates of each unit during the calculation process are obtained at equal time intervals, and the average CPU and memory usage rates are obtained. The plasma collision rate and the number of Fourier components of the magnetic field are also obtained. A comprehensive resource consumption index for each unit is constructed based on the following formula: ; in, Indicates the first The comprehensive resource consumption index of each unit. Plasma collision rate, Magnetic field Fourier component number This indicates exponentiation. Indicates the first Average CPU utilization of each unit Indicates the first Average memory usage of each unit; The unit with the highest comprehensive resource consumption index value is marked as a high-consumption unit.

3. The method for calculating the neoclassical transport coefficient of toroidal plasma based on a heterogeneous computing platform according to claim 2, characterized in that: Obtain the input data from the high-consumption unit, and construct the equations for GPU computation based on the input data, as follows: The plasma perturbation distribution function and Maxwell's distribution function are obtained, and the normalized plasma perturbation distribution function is calculated using the following formula: ; in, This represents the normalized plasma perturbation distribution function. This represents the plasma perturbation distribution function. Describes the Maxwell distribution function. The independent variable is the normalized plasma perturbation distribution function. Specifically, it refers to the particle velocity parallel to the direction of the magnetic field. By inverting the independent variable, we obtain the equivalent normalized plasma perturbation distribution function, based on the following formula: ; in, This represents the equivalent normalized plasma perturbation distribution function; The even-symmetric and odd-symmetric components of the perturbation distribution function are obtained using the following formula: ; ; in, For even-symmetric components, It is an odd symmetric component; The thermodynamic driving term in the neoclassical transport coefficient calculation program for the original toroidal plasma is obtained. A system of equations is constructed based on the even-symmetric and odd-symmetric components of the perturbation distribution function. The formulas used are as follows: ; ; in, For the partial differential operator governing the motion of collisionless particles, It is a thermodynamic driving term. This is the partial differential operator for plasma collision effects.

4. The method for calculating the neoclassical transport coefficient of toroidal plasma based on a heterogeneous computing platform according to claim 3, characterized in that: The polar-circular mode coupling order and the highest order of the Legendre expansion are obtained. The system of equations is then expanded using thermodynamic driving forces, Legendre polynomials, and Fourier basis functions to convert the system into matrix form. The formulas used are as follows: ; in, The matrix form representing the expansion coefficients of the thermodynamic driving term. Specifically, the length is column vectors, Indicates the order of polar-circular mode coupling. To develop Legendre to its highest order, Denotes the vector to be solved. The partial differential operators representing the motion of collisionless particles and the partial differential operators representing plasma collision effects, after being expanded into matrix form, are labeled as quindiagonal matrices. The partial differential operators for the motion of collisionless particles and the partial differential operators for plasma collision effects, after expansion into matrix forms, are based on the following formulas: ; In this case, the row and column dimensions of the pentagonal matrix are both 1. , Indicates the first Line number The basic matrix of columns, and The row and column lengths are both ,in, Represents the retrieval variables for rows. Represents the retrieval variables for the column. , , , .

5. The method for calculating the neoclassical transport coefficient of toroidal plasma based on a heterogeneous computing platform according to claim 4, characterized in that: The logic for performing three-level non-zero element compression storage on a pentagonal matrix is ​​as follows: The pentagonal matrix is ​​no longer stored in matrix form; only the non-zero elements are stored. Each non-zero element is assigned its position index within the pentagonal matrix. This position index is a three-level index: the first level indicates which diagonal the element is located on; the second level indicates which fundamental matrix the element is located on; and the third level indicates the specific row and column position of the element within the fundamental matrix. The formula used is as follows: ; in, Represents the numerical value of non-zero elements. This represents a third-level index value. This indicates a first-level index. , , This indicates a second-level index. , , This indicates a third-level index. This indicates the row value of the non-zero element in the fundamental matrix. This represents the column value of the non-zero element in the fundamental matrix. , , , ; The five-diagonal matrix with compressed storage of three-level non-zero elements and the solution equation in matrix form are input into the GPU shared memory. Multithreading is then used to calculate the vector to be solved and obtain the solution vector.

6. The method for calculating the neoclassical transport coefficient of toroidal plasma based on a heterogeneous computing platform according to claim 5, characterized in that: The solution vector is returned to the CPU for series summation to obtain the new classical transport coefficients, and the convergence of the solution result is determined. The logic is as follows: The solution vector is returned to the CPU for series summation to obtain the odd symmetric component matrix and even symmetric component matrix of the perturbation distribution function. Then, the velocity space integral is performed on the odd symmetric component matrix and even symmetric component matrix of the perturbation distribution function to obtain the new classical transport coefficient. The particle velocity vector and velocity direction function are obtained through the original toroidal plasma neoclassical transport coefficient calculation program, and the upper bound of the neoclassical transport coefficient is obtained based on the following formula: ; in, This is the upper bound of the neoclassical transport coefficient. For particle velocity vectors, For velocity space integration operations, It is a function of velocity direction. The matrix representing the odd symmetric components of the perturbation distribution function; The formula used to obtain the lower bound of the neoclassical transport coefficient is as follows: ; in, lower bound of the neoclassical transport coefficient The matrix representing the even-symmetric components of the perturbation distribution function; The convergence error is obtained using the following formula: ; in, This represents the convergence error.

7. The method for calculating the neoclassical transport coefficient of toroidal plasma based on a heterogeneous computing platform according to claim 6, characterized in that: A convergence error threshold is set. When the convergence error is less than the threshold, the solution vector after series summation is considered the final calculation result of the neoclassical transport coefficients, and this is calibrated as obtaining the neoclassical transport coefficients. When the convergence error is not less than the threshold, the polar-circular mode coupling order is adjusted according to the convergence error, based on the following formula: ; in, This is the adjusted polar-circular mode coupling order. The order of the polar-circular mode coupling before adjustment. To adjust the step size, ; Based on the adjusted polar-circular mode coupling order, return to step 2 to reconstruct and solve the system of equations until the convergence error is less than the convergence error threshold, and obtain the new classical transport coefficients.

Citation Information

Patent Citations

  • Machine learning method for Tokamak new classical circumferential viscous torque

    CN117371299A

  • Tokamak new classical circumferential viscous torque CUDA simulation implementation method

    CN118502964A