Concurrent data processing method and system suitable for Tokamak integrated simulation
By using equal magnetic surfaces and geometric factors for data processing and annotation in tokamak integrated simulation, problems such as numerical inconsistency and accuracy loss are solved, unified data conversion and traceability are realized, and the reliability and interpretability of simulation results are improved.
Patent Information
- Application Number
- CN202411761873.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-03
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2044-12-03
AI Technical Summary
In tokamak integrated simulation, the prior art has numerical inconsistency, accuracy loss, numerical stability problems, conversion errors and difficulty in interpreting results, resulting in complex data processing and prone to accuracy loss.
By providing a concurrent data processing method suitable for tokamak integrated simulation, using isomagnetic surfaces and geometric factors to convert data formats and coordinate systems, the expansion and dimensionality reduction of high-dimensional data is achieved, and the accuracy and traceability of data are ensured through interpolation fitting and data annotation.
It realizes unified conversion, classification, annotation and traceability of the intermediate physical quantities and final output physical quantities of different calculation codes under the integrated simulation platform, improving the accuracy and stability of data processing and reducing the difficulty of interpreting results.
Smart Images

Figure CN119720711A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of concurrent data processing, and more specifically, to a concurrent data processing method and system suitable for tokamak integrated simulation. Background Art
[0002] Magnetic confinement fusion achieves nuclear fusion by confining high-energy plasma with a magnetic field. In the simulation research of magnetic confinement fusion, physical processes of multiple time and space scales are involved, and these physical processes influence each other and are highly coupled. How to self-consistently and accurately simulate these physical processes is crucial to the theoretical and engineering research of tokamak nuclear fusion. Integrated simulation can self-consistently couple separate numerical simulation programs suitable for different plasma regions at different time and space scales as sub-modules to simulate static equilibrium or time evolution. It is one of the best ways to combine actual simulation research on this type of multi-scale physics.
[0003] However, the integrated simulation research process also faces a series of problems and challenges, including: multi-space-time scales, multi-physics self-consistency, cross-regional integration, data format conversion, coordinate system conversion, etc. The computational simulation results of different physical codes are often output in different formats and coordinate systems, and there are also great differences in the input format of the data, which makes data processing in the integrated simulation complicated and prone to precision loss problems; at the same time, the annotation of the simulation results is also very critical, because it can provide researchers with more information and background to help them understand and interpret the simulation results, and at the same time provide intuitive and reliable data for the future construction of a magnetic confinement nuclear fusion big data platform and training agent model.
[0004] At present, the more common integrated simulation platforms include pTRANSP, COCONUT, BPSI, CRONOS, OMFIT, etc. The predecessor of OMFIT is IMFIT, which is an integrated simulation platform based on which Orso Meneghini, Lang Lao and others built a set of integrated simulation programs that integrate multiple plasma physics calculation programs; the current OMFIT integrated simulation platform integrates the EFIT program for calculating equilibrium configurations, the ONETWO program for calculating currents and source terms (and the corresponding auxiliary heating program), the TGYRO program for calculating the evolution of dynamic profiles, and the EPED program for calculating the base structure. The I / O format, coordinate system, unit, dimension and time and space scale of the existing integrated simulation platforms are different. The data conversion between them is completed by individual users. There is a lack of unified standards and format specifications, and there are the following problems:
[0005] Numerical inconsistency: The existing integrated simulation platform only provides a packaging interface, while the data units and format conversions between different programs are all written by the user. The numerical calculation results of different programs in different coordinate systems may be different, especially when there are different choices in numerical methods, boundary conditions, etc. If data is exchanged, a coordinate system consistency transformation is required, otherwise the consistency of the data may be affected during the simulation process, making it difficult to compare and verify reliable results.
[0006] Precision loss: Data conversion between coordinate systems may introduce precision loss. The compression and expansion of program dimensions output by different programs may also bring about precision loss and physical loss at the numerical and physical levels. For example, when coordinate transformation and interpolation operations are performed during the conversion process, numerical rounding errors and truncation errors may accumulate, resulting in reduced accuracy of simulation results. There is also physical information loss caused by operations such as spatial integration and temporal convolution when converting high-dimensional data to low-dimensional data, and physical information expansion errors caused by the use of assumptions such as ignored force balance and anisotropy when converting low-dimensional data to high-dimensional data.
[0007] Numerical stability issues: Using different coordinate systems and grids for numerical calculations may lead to numerical stability issues. In some coordinate systems, differential equations may become more complicated, resulting in problems such as numerical divergence or numerical oscillation in numerical calculations.
[0008] Conversion error: The process of converting data between different coordinate systems may introduce additional errors. Especially in complex nonlinear problems, the conversion between coordinate systems may cause nonlinear distortion of the data, making the data conversion process more complicated and difficult, such as the Runge phenomenon caused by excessive precision during interpolation.
[0009] Difficulty in interpreting results: The simulation results obtained by different programs may have different physical meanings and forms, which may make it more difficult for junior integrated simulation workers to interpret and understand the results of different programs, increasing the cost of integrated simulation work. Especially when comparison and verification with experimental results are required, users will not be able to carry out further work effectively unless they are very familiar with each program used in the integrated simulation.
[0010] Time-consuming issue: Most of the programs currently integrated by the integration platform are multi-threaded / concurrent programs, and the I / O control flows of different programs.
[0011] Therefore, in integrated simulation, it is very important to ensure the accuracy and stability of the data conversion process, which may require careful numerical testing and verification to ensure the reliability and accuracy of the simulation results. However, the current integrated simulation involves a high diversity of codes, and there is no unified standard for coordinate systems, dimensions, interpolation and fitting methods used for current data conversion. The output results face problems such as difficulty in verifying accuracy and difficulty in finding factors that lead to non-physical results. At the same time, the currently used integrated simulation platforms such as OMFIT are not open to the public and cannot be used for commercial purposes. Domestic users are not authorized to use them locally and must remotely log in to the GA server through the public network to run and transmit calculation data. The feasibility of applying for a General Atomics server account, the stability of public network connections, data upload and download, server task queue running time and national risks and many other issues have increased the cost of use for domestic users. Summary of the invention
[0012] The purpose of the present invention is to provide a concurrent data processing method and system suitable for tokamak integrated simulation, which can solve a series of problems caused by numerical inconsistency, precision loss, numerical stability problems, conversion errors and difficulty in interpreting results in concurrent data processing in the prior art, and realize the unified conversion, classification, annotation and traceability of calculation data codes of intermediate physical quantities and final output physical quantities such as plasma equilibrium, pressure, temperature, density, impurities, neutral particles, turbulence, turbulent transport, heat flux, etc. of different calculation codes under the integrated simulation platform.
[0013] The above technical objectives of the present invention are achieved through the following technical solutions:
[0014] In a first aspect, the present application provides a concurrent data processing method applicable to tokamak integrated simulation, the processing method comprising a format conversion method, and the format conversion method comprises the following specific steps:
[0015] According to the balance file gfile in the tokamak device, the magnetic flux data on the rectangular coordinate grid output by the simulation program is obtained, and the isomagnetic surface of the magnetic field in the tokamak device is calculated according to the magnetic flux data;
[0016] Using isomagnetic surfaces, we calculated the geometric factor information corresponding to different coordinate systems required by different simulation programs. The geometric factor information represents the geometric relationship between plasma and magnetic field in the tokamak device.
[0017] Based on isomagnetic surfaces and geometric factors, the one-dimensional data in the Tokamak device is expanded into high-dimensional data, and the first coordinate data corresponding to the one-dimensional data in different coordinate systems is obtained. The high-dimensional data includes two-dimensional data and three-dimensional data.
[0018] Based on isomagnetic surfaces and geometric factors, the second coordinate data corresponding to the high-dimensional data in different coordinate systems and the reduced-dimensional data after the high-dimensional data is subjected to the magnetic surface average dimensionality reduction operation are obtained;
[0019] The data format requirement is obtained, and the high-dimensional data, the first coordinate data, the second coordinate data, and the dimension reduction data are converted into target format data corresponding to the data format requirement.
[0020] Based on the above technical solution, the present invention can also be improved as follows.
[0021] Furthermore, before the above one-dimensional data and high-dimensional data are processed, the following steps are also included:
[0022] Interpolation fitting processing is performed on the one-dimensional data and the high-dimensional data, and data corresponding to the one-dimensional data and the high-dimensional data after the interpolation fitting processing is obtained.
[0023] Furthermore, the above method also includes a data labeling method, and the data labeling method includes:
[0024] The target format data is annotated with data attributes and data processing methods. The data attribute annotation includes unit annotation, dimension annotation and coordinate system annotation. The processing method annotation includes data processing function annotation.
[0025] Furthermore, the above-mentioned marking method also includes:
[0026] Mark the target format data with the data file source and data code storage.
[0027] In a second aspect, the present application provides a concurrent data processing system applicable to tokamak integrated simulation, which is applied to a concurrent data processing method applicable to tokamak integrated simulation in any one of the first aspects, wherein the processing system includes a format conversion system, and the format conversion system includes:
[0028] The first module is used to obtain magnetic flux data on a rectangular coordinate grid output by a simulation program according to a balance file gfile in the tokamak device, and calculate the isomagnetic surface of the magnetic field in the tokamak device according to the magnetic flux data;
[0029] The second module is used to calculate the geometric factor information corresponding to different coordinate systems required by different simulation programs using isomagnetic surfaces. The geometric factor information represents the geometric relationship between plasma and magnetic field in the tokamak device.
[0030] The third module is used to expand the one-dimensional data in the tokamak device into high-dimensional data based on the isomagnetic surface and the geometric factor, and obtain the first coordinate data corresponding to the one-dimensional data in different coordinate systems, and the high-dimensional data includes two-dimensional data and three-dimensional data;
[0031] The fourth module is used to obtain the second coordinate data corresponding to the high-dimensional data in different coordinate systems based on the isomagnetic surface and the geometric factor, as well as the reduced-dimensional data after the high-dimensional data is subjected to the magnetic surface average dimensionality reduction operation;
[0032] The fifth module is used to obtain data format requirements and convert the high-dimensional data, the first coordinate data, the second coordinate data and the dimensionality reduction data into target format data corresponding to the data format requirements.
[0033] Furthermore, the above system also includes:
[0034] The sixth module is used to perform interpolation fitting processing on the one-dimensional data and the high-dimensional data before performing relevant processing, and obtain data corresponding to the one-dimensional data and the high-dimensional data after the interpolation fitting processing.
[0035] Furthermore, the processing system further includes a data annotation system, and the data annotation system includes:
[0036] The seventh module is used to annotate the data attributes and data processing methods of the target format data. The data attribute annotation includes unit annotation, dimension annotation and coordinate system annotation, and the processing method annotation includes data processing function annotation.
[0037] Furthermore, the above data annotation system includes:
[0038] The eighth module is used to mark the source of the data file and the storage of the data code for the target format data.
[0039] In a third aspect, the present application provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements any one of the methods in the first aspect when executing the computer program.
[0040] In a fourth aspect, the present application provides a non-transitory computer-readable storage medium, which stores computer instructions, and the computer instructions enable a computer to execute any one of the methods in the first aspect.
[0041] Compared with the prior art, the present invention has at least the following beneficial effects:
[0042] In this application, by adopting reasonable and efficient numerical algorithms (such as using the ray method to find contour lines, Simpson integral to calculate the magnetic surface average, etc.), the coordinates and formats of the main programs in the tokamak integrated simulation are uniformly converted and processed, and the python decorator is used to generate graphs, system logs, and file annotations to annotate the calculation methods, original data sources, and original codes used in the output data, so as to achieve the purpose of data traceability; thereby, the unified conversion, classification, annotation, and traceability of calculation data codes of intermediate physical quantities and final output physical quantities such as plasma equilibrium, pressure, temperature, density, impurities, neutral particles, turbulence, turbulent transport, and heat flux of different calculation codes under the integrated simulation platform can be achieved; it provides a basis for establishing an accurate and reliable integrated simulation database, and at the same time provides a data framework guarantee for establishing a large-scale proxy model and thus developing a digital fusion reactor. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] The drawings described herein are used to provide a further understanding of the embodiments of the present invention, constitute a part of this application, and do not constitute a limitation of the embodiments of the present invention. In the drawings:
[0044] Figure 1 A method flow chart of a processing method in an embodiment of the present invention;
[0045] Figure 2 A connection diagram of a processing system in an embodiment of the present invention;
[0046] Figure 3 A schematic diagram of the connection of electronic equipment in an embodiment of the present invention;
[0047] Figure 4 Schematic diagram of the input structure of EFIT balance data in an embodiment of the present invention;
[0048] Figure 5 This is an example diagram of a log file of changes of the BOUT++ program used in the simulation in an embodiment of the present invention relative to the master branch of BOUT++. DETAILED DESCRIPTION
[0049] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.
[0050] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0051] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0052] In the description of the embodiments of the present invention, "plurality" means at least 2.
[0053] Embodiment 1:
[0054] In order to solve the problems of numerical inconsistency, precision loss, numerical stability, conversion error and difficulty in result interpretation caused by concurrent data processing in the prior art, and to achieve the unified conversion, classification, labeling and calculation data code traceability of intermediate physical quantities and final output physical quantities such as plasma equilibrium, pressure, temperature, density, impurities, neutral particles, turbulence, turbulent transport, heat flux and the like of different calculation codes under the integrated simulation platform, this embodiment provides a concurrent data processing method suitable for tokamak integrated simulation, and the processing method includes a format conversion method, such as Figure 1 As shown, the format conversion method includes the following specific steps:
[0055] S1, obtaining magnetic flux data on a rectangular coordinate grid output by a simulation program according to a balance file gfile in the tokamak device, and calculating the isomagnetic surface of the magnetic field in the tokamak device according to the magnetic flux data.
[0056] Among them, in the Tokamak device, the ray casting method can be used to find isomagnetic surfaces (isomagnetic potential surfaces); isomagnetic surfaces refer to the magnetic fields having the same magnetic potential value on these surfaces, which is an important tool for analyzing plasma confinement and behavior. The following are the steps to find isomagnetic surfaces using the ray casting method:
[0057] 1. High-precision cubic spline interpolation: First, after reading the magnetic surface information in the gfile, two-dimensional high-precision cubic spline interpolation is performed on the magnetic surface, and the interpolation results can be stored in a two-dimensional array magnetic_potential.
[0058] 2. Define isomagnetic potential values: Determine the isomagnetic surface values to be drawn. The isomagnetic potential values can be assumed to be psi_level.
[0059] 3. Calculation of the isomagnetic surface by the ray method: The basic idea of the ray method is to project rays from multiple directions on a two-dimensional grid and find the intersection points of the rays and the isomagnetic surface. The specific steps are as follows:
[0060] ①. Initialization: Define the starting point and direction of the ray. Usually, the ray can be projected from the boundary of the grid or from a reference point (such as the magnetic axis).
[0061] ②. Traverse the grid: Traverse the grid along the ray direction and check the magnetic potential values of each grid cell. If the magnetic potential values of two adjacent cells passed by the ray are on both sides of the isomagnetic potential value, the isomagnetic surface passes through this cell.
[0062] ③. Linear interpolation: After finding the cell through which the isomagnetic surface passes, use linear interpolation to determine the intersection point position. For example, for a grid cell (i, j) and (i + 1, j), assume that magnetic_potential[i][j] < psi_level and magnetic_potential[i + 1][j] > psi_level, then the intersection point x can be calculated by linear interpolation:
[0063] ④. Record the intersection points: Record all the intersection points of the rays and the isomagnetic surface, and connect these points to form the isomagnetic surface.
[0064] Specifically, in a tokamak device, the main purpose of calculating the magnetic surface is to understand and describe the magnetic confinement characteristics of the plasma. The magnetic surface is an isoflux surface, that is, the magnetic flux density is constant on these surfaces. Calculating the magnetic surface can help understand the behavior and stability of the plasma. The magnetic surface can represent the following important characteristics:
[0065] 1. Magnetic confinement quality: By analyzing the magnetic surface, the effect of magnetic confinement can be evaluated to determine whether the plasma is effectively confined in the magnetic field.
[0066] 2. Plasma shape and profile: The magnetic surface depicts the geometric shape of the plasma, including its outer shape and internal structure, helping to optimize the design of the tokamak.
[0067] 3. Magnetic islands and turbulence: The ruptures or distortions on the magnetic surface can reveal the existence of magnetic islands and turbulence, and these phenomena will affect the confinement performance of the plasma.
[0068] 4. Plasma stability: Through the magnetic surface, the stability of the plasma can be analyzed to understand the possible rupture and instability regions, which helps to prevent plasma rupture.
[0069] 5. Heat and particle transport: The isothermal and isodensity surfaces on the magnetic surface can show the transport paths of heat and particles, helping to optimize the heating and fuel supply strategies.
[0070] S2, using isomagnetic surfaces, calculates the geometric factor information corresponding to different coordinate systems required by different simulation programs. The geometric factor information characterizes the geometric relationship between the plasma and the magnetic field in the tokamak device; wherein, the geometric factor calculation includes the parallel magnetic surface averaging calculation of the geometric factor information in different coordinate systems required by different simulation programs under the MPI framework using double spline interpolation with constraints and the Simpson integral formula.
[0071] Among them, in the tokamak simulation, the purpose of calculating the geometric factor is to describe the geometric relationship between the plasma and the magnetic field, and use this information to perform more accurate physical calculations and simulations. The geometric factor can reflect the geometric characteristics and curvature of the magnetic field lines at different positions in the tokamak, which is crucial to understanding the behavior and confinement performance of the plasma; the purpose and characteristics of the geometric factor are as follows:
[0072] 1. Curvature and twist of magnetic field lines: The geometric factor describes the curvature and twist of magnetic field lines. This is very important for analyzing the stability of magnetic field lines and instabilities in plasma.
[0073] 2. Magnetic field structure: Geometric factors provide structural information about the magnetic field, helping researchers understand the arrangement and overall shape of the magnetic field lines.
[0074] 3. Plasma shape and boundary: The geometric factor can reflect the shape and boundary conditions of the plasma, which is crucial for optimizing the design of the tokamak.
[0075] 4. Particle trajectories: Geometric factors affect the trajectories and movement patterns of particles in plasma, thereby affecting the transport properties of plasma.
[0076] Specifically, the relationship between geometric factors and pressure, temperature, and density: There is a close relationship between geometric factors and the magnetic surface and the physical quantities of plasma pressure, temperature, density, etc.:
[0077] 1. Pressure gradient: Geometric factors and magnetic surface structure directly affect the pressure gradient of the plasma. The pressure gradient on the magnetic surface can drive various instabilities, such as MHD instability.
[0078] 2. Temperature distribution: The temperature distribution on the magnetic surface is affected by geometric factors. Changes in geometric factors will affect the heating method and heat transport path of the plasma, thereby affecting the temperature distribution.
[0079] 3. Density distribution: Magnetic surface and geometric factors also affect the density distribution of plasma. By analyzing the geometric factors, we can understand the particle transport and density change laws in plasma.
[0080] S3, based on isomagnetic surfaces and geometric factors, the one-dimensional data in the tokamak device is expanded into high-dimensional data, and the first coordinate data corresponding to the one-dimensional data in different coordinate systems is obtained, and the high-dimensional data includes two-dimensional data and three-dimensional data.
[0081] Specifically, the dimensionality enhancement of one-dimensional data includes expanding one-dimensional (along the radial direction of the tokamak) profiles such as plasma pressure, temperature, density, impurities, neutral particles, turbulence, turbulent transport, and heat flux to two-dimensional / three-dimensional ones through direct assignment or radial force balance equations; the coordinate transformation of one-dimensional data can be combined with the relevant results of magnetic surface information analysis and geometric factor calculation to transform the one-dimensional data.
[0082] S4, based on the isomagnetic surface and the geometric factor, obtain the second coordinate data corresponding to the high-dimensional data in different coordinate systems, and the reduced-dimensional data after the high-dimensional data is subjected to the magnetic surface average dimensionality reduction operation.
[0083] Among them, data integration dimensionality reduction can combine the relevant results of magnetic surface information analysis and geometric factor calculation, and perform dimensionality reduction operations such as magnetic surface averaging on two-dimensional / three-dimensional data in parallel.
[0084] S5, obtaining data format requirements, and converting the high-dimensional data, the first coordinate data, the second coordinate data, and the dimension reduction data into target format data corresponding to the data format requirements.
[0085] Specifically, the parallel input and output file format conversion reads experimental data / output data of the previous program from the file / memory, and outputs the data required for the next process / the final hdf5 format file. If the processing of more files is involved, the pool or mpi library is used to read and write the data in the file.
[0086] Optionally, before the one-dimensional data and high-dimensional data are processed, the following steps may be further included:
[0087] S31, performing interpolation fitting processing on the one-dimensional data and the high-dimensional data, and obtaining data corresponding to the one-dimensional data and the high-dimensional data after the interpolation fitting processing.
[0088] Among them, the one-dimensional profile data interpolation / fitting module includes interpolation / fitting operations on one-dimensional (along the tokamak radial direction) profiles such as plasma pressure, temperature, density, impurities, neutral particles, turbulence, turbulent transport, heat flux, etc., to provide input data for the simulation program; two-dimensional / three-dimensional data interpolation fitting refers to the use of bispline interpolation and interpolation operations based on polynomials, Gaussian functions, etc., in order to encrypt data and appropriately convert the output data of one program into the input of another program in the integrated simulation.
[0089] Optionally, the above method further includes a data labeling method, and the data labeling method includes:
[0090] S6, annotating the target format data with data attributes and data processing methods, wherein the data attribute annotation includes unit annotation, dimension annotation and coordinate system annotation, and the processing method annotation includes data processing function annotation.
[0091] S7, marking the source of the data file and the storage of the data code for the target format data.
[0092] Among them, data method annotation refers to the interpolation method, interpolation function, coordinate transformation method used for the input and output data in the integrated simulation, the basis function used for fitting and the fitting R-square value, etc., which are annotated in the data attributes of the hdf5 file.
[0093] Among them, the data file source annotation is to enter the storage location and file name of the parameters and data in the annotation; the data code storage annotation is that a single simulation code stores the source code of a Master branch in a read-only form in a fixed file location F. In the actual integrated simulation, all modifications to the code are in the form of log files. The differences between the code of the new branch and the code of the Master branch are saved in the log file G along with the data, and the path of G is saved in the attribute annotation of the corresponding output data.
[0094] Specifically, the concurrent data processing and annotation method provided in this embodiment realizes the normalization of data, and uniformly annotates all processes that may produce numerical errors by using Python decorators and log files, so that the whole process of generating integrated simulation can be intuitively tracked, which is convenient for combining experimental corrections and improving the accuracy of integrated simulation. At the same time, it also provides a basis for establishing an accurate and reliable integrated simulation database, and provides a data framework guarantee for establishing a large-scale proxy model and thus developing a digital fusion reactor.
[0095] Specifically, the following is an application example of the present invention:
[0096] The example mainly integrates the influence of the pressure of the magnetic confinement fusion device HL-3 on the edge local mode. For the convenience of the example, the data are virtual data. The main process involved is that the balance program EFIT reads the profile calculation parameters of the experiment to calculate the plasma balance, and then calculates the magnetic surface balance according to the balance calculated by EFIT, and then converts the balance data on the rectangular grid output by EFIT to the grid required by the parallel program BOUT++ for calculating the edge local mode, further calculates the relevant geometric factors, inputs the BOUT++ program for calculation, and stores the final results in the hdf5 file.
[0097] Specifically, the input structure of the EFIT balance data in the example is as follows Figure 4As shown, first, EFIT reads the original pressure data in the path ".. / .. / #30416", fits the data with a quadratic function, and saves the fitted pressure data in the hdf5 format file "equilibrium_#30416" under the created "EFIT_ELM_visualtest / EFITdata" folder. By marking the data in the file, such as Figure 4 As shown, the source link of the metadata is stored in the form of comments in the group directory of ["input"], and the fitted data is saved in the subdirectory of ["input"]["Pressure"]. The fitting interpolation information, basis functions, R values, etc. used in the fitting are also saved in the same subdirectory in the form of comments. According to the input data, EFIT calculates the balance information such as the two-dimensional magnetic surface function. The 011 module processes the balance data calculated by EFIT, transforms the magnetic surface information into coordinates, and transforms the balance data under the rectangular grid into the data under the magnetic surface coordinate system required by BOUT++, and stores it in the hdf5 format file of "ELM_#30416" in "EFIT_ELM_visualtest / ELMdata", and the data is annotated similarly to the above balance data. At the same time, by comparing the current version of the source code used with the original source code of the master branch, the difference between the two is saved in the form of a log file in the folder "EFIT_ELM_visualtest / ELMdata / code_log", and the path of the log file is saved in the form of a comment to "ELM_#30416.hdf5". Through this process, in the future digital fusion reactor database construction and artificial intelligence agent model development, data users can trace all key data sources and physical models based on the saved data files and log files, so as to determine the correctness of the data or discover new physical processes; among them, the log file example of the changes of the BOUT++ program used in the simulation relative to the master branch of BOUT++ is as follows Figure 5 shown.
[0098] Embodiment 2:
[0099] The embodiment of the present application provides a concurrent data processing system suitable for tokamak integrated simulation, which is applied to a concurrent data processing method suitable for tokamak integrated simulation in any one of the embodiments 1, such as Figure 2 As shown, the processing system includes a format conversion system, and the format conversion system includes:
[0100] The first module is used to obtain the magnetic flux data on the rectangular coordinate grid output by the simulation program according to the balance file gfile in the tokamak device, and calculate the isomagnetic surface of the magnetic field in the tokamak device according to the magnetic flux data.
[0101] The second module is used to use the isomagnetic surfaces to calculate the geometric factor information corresponding to the different coordinate systems required by different simulation programs. The geometric factor information characterizes the geometric relationship between the plasma and the magnetic field in the tokamak device.
[0102] The third module is used to expand the one-dimensional data in the tokamak device into high-dimensional data based on isomagnetic surfaces and geometric factors, and obtain the first coordinate data corresponding to the one-dimensional data in different coordinate systems. The high-dimensional data includes two-dimensional data and three-dimensional data.
[0103] The fourth module is used to obtain the second coordinate data corresponding to the high-dimensional data in different coordinate systems based on the isomagnetic surface and the geometric factor, as well as the reduced-dimensional data after the high-dimensional data is subjected to the magnetic surface average dimensionality reduction operation.
[0104] The fifth module is used to obtain data format requirements and convert the high-dimensional data, the first coordinate data, the second coordinate data and the dimensionality reduction data into target format data corresponding to the data format requirements.
[0105] Optionally, the processing system further includes:
[0106] The sixth module is used to perform interpolation fitting processing on the one-dimensional data and the high-dimensional data before performing relevant processing, and obtain data corresponding to the one-dimensional data and the high-dimensional data after the interpolation fitting processing.
[0107] Optionally, the processing system further includes a data annotation system, which may include:
[0108] The seventh module is used to annotate the data attributes and data processing methods of the target format data. The data attribute annotation includes unit annotation, dimension annotation and coordinate system annotation, and the processing method annotation includes data processing function annotation.
[0109] The eighth module is used to mark the source of the data file and the storage of the data code for the target format data.
[0110] Embodiment 3:
[0111] The present application embodiment provides an electronic device, such as Figure 3 As shown, it includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, any method in Embodiment 1 is implemented.
[0112] Embodiment 4:
[0113] An embodiment of the present application provides a non-transitory computer-readable storage medium, which stores computer instructions, and the computer instructions enable a computer to execute any method in Example 1.
[0114] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A concurrent data processing method suitable for tokamak integrated simulation, characterized in that: The processing method includes a format conversion method, and the format conversion method includes the following specific steps: According to the balance file gfile in the tokamak device, magnetic flux data on the rectangular coordinate grid output by the simulation program are obtained, and the isomagnetic surface of the magnetic field in the tokamak device is calculated according to the magnetic flux data; By using the isomagnetic surface, geometric factor information corresponding to different coordinate systems required by different simulation programs is calculated, and the geometric factor information represents the geometric relationship between the plasma and the magnetic field in the tokamak device; Based on the isomagnetic surface and the geometric factor, one-dimensional data in the tokamak device is expanded into high-dimensional data, and first coordinate data corresponding to the one-dimensional data in different coordinate systems is obtained, wherein the high-dimensional data includes two-dimensional data and three-dimensional data; Based on the isomagnetic surface and the geometric factor, second coordinate data corresponding to the high-dimensional data in different coordinate systems and dimension reduction data after the high-dimensional data is subjected to the magnetic surface average dimension reduction operation are obtained; A data format requirement is obtained, and the high-dimensional data, the first coordinate data, the second coordinate data, and the dimension reduction data are converted into target format data corresponding to the data format requirement.
2. A concurrent data processing method suitable for tokamak integrated simulation according to claim 1, characterized in that: Before the one-dimensional data and the high-dimensional data are processed, the following steps are further included: Interpolation fitting processing is performed on the one-dimensional data and the high-dimensional data, and data corresponding to the one-dimensional data and the high-dimensional data after the interpolation fitting processing is obtained.
3. A concurrent data processing method suitable for tokamak integrated simulation according to claim 1, characterized in that: The method further includes a data labeling method, and the data labeling method includes: The target format data is annotated with data attributes and data processing methods, wherein the data attribute annotation includes unit annotation, dimension annotation and coordinate system annotation, and the processing method annotation includes data processing function annotation.
4. A concurrent data processing method suitable for tokamak integrated simulation according to claim 3, characterized in that: The marking method further comprises: The target format data is marked with data file source and data code storage.
5. A concurrent data processing system suitable for tokamak integrated simulation, applied to a concurrent data processing method suitable for tokamak integrated simulation according to any one of claims 1 to 4, characterized in that: The processing system includes a format conversion system, and the format conversion system includes: The first module is used to obtain magnetic flux data on a rectangular coordinate grid output by a simulation program according to a balance file gfile in the tokamak device, and calculate the isomagnetic surface of the magnetic field in the tokamak device according to the magnetic flux data; The second module is used to calculate the geometric factor information corresponding to different coordinate systems required by different simulation programs using the isomagnetic surface, wherein the geometric factor information represents the geometric relationship between the plasma and the magnetic field in the tokamak device; A third module is used to expand the one-dimensional data in the tokamak device into high-dimensional data based on the isomagnetic surface and the geometric factor, and obtain first coordinate data corresponding to the one-dimensional data in different coordinate systems, wherein the high-dimensional data includes two-dimensional data and three-dimensional data; A fourth module is used to obtain, based on the isomagnetic surface and the geometric factor, second coordinate data corresponding to the high-dimensional data in different coordinate systems, and dimension reduction data after the high-dimensional data is subjected to a magnetic surface average dimension reduction operation; The fifth module is used to obtain data format requirements and convert the high-dimensional data, the first coordinate data, the second coordinate data and the reduced-dimensional data into target format data corresponding to the data format requirements.
6. A concurrent data processing system suitable for tokamak integrated simulation according to claim 5, characterized in that: The system further comprises: The sixth module is used to perform interpolation fitting processing on the one-dimensional data and the high-dimensional data before performing correlation processing on the one-dimensional data and the high-dimensional data, and obtain data corresponding to the one-dimensional data and the high-dimensional data after the interpolation fitting processing.
7. A concurrent data processing system suitable for tokamak integrated simulation according to claim 5, characterized in that: The processing system further includes a data annotation system, and the data annotation system includes: The seventh module is used to annotate the target format data with data attributes and data processing methods, wherein the data attribute annotation includes unit annotation, dimension annotation and coordinate system annotation, and the processing method annotation includes data processing function annotation.
8. A concurrent data processing system suitable for tokamak integrated simulation according to claim 7, characterized in that: The data annotation system comprises: The eighth module is used to mark the data file source and data code storage of the target format data.
9. An electronic device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the method according to any one of claims 1 to 4 is implemented when the processor executes the computer program.
10. A non-transitory computer-readable storage medium, characterized in that: The non-transitory computer-readable storage medium stores computer instructions, which enable a computer to execute the method of any one of claims 1-4.
Citation Information
Patent Citations
Test particle simulation method for analyzing constraint performance of high-energy particles in Tokamak
CN111259599A
Core and boundary integration simulation method for ion cyclotron wave heating of Tokamak device
CN116644629A
Edge local model and transport multi-process integrated simulation method suitable for magnetic confinement nuclear fusion
CN117592295A
Data warehouse architecture and data processing system for nuclear fusion data standardization
CN117743476A
Method for managing fusion experiment configuration parameters
CN118034764A
Cited By
Plasma vertical displacement control method, device, equipment, medium and product
CN121726108A
Plasma vertical displacement control method, apparatus, device, medium, and product
CN121726108B