A distributed simulation method for a digital tokamak

By using a distributed simulation coordination mechanism and a unified model interaction interface, the problem of collaborative simulation of tokamak devices and subsystem models is solved, enabling efficient modeling and computation of complex systems, adapting to data synchronization at different frequencies and periods, and improving the scalability of simulation models.

CN118842715BActive Publication Date: 2025-12-19INST OF ENERGY HEFEI COMPREHENSIVE NAT SCI CENT (ANHUI ENERGY LAB)
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411032057.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-30
Publication Date
2025-12-19
Estimated Expiration
2044-07-30

AI Technical Summary

Technical Problem

Existing plasma simulation platforms cannot effectively support the separate modeling and collaborative simulation of the main body and various subsystems of a tokamak device, resulting in overly simplified models that cannot meet the simulation requirements of complex operating conditions.

Method used

The design incorporates a distributed simulation coordination mechanism and a unified distributed model interaction interface. The master node coordinates the connections of each slave node, and an asynchronous data transmission strategy is adopted to adapt to model simulations of different frequencies and periods, thereby achieving data synchronization and communication.

Benefits of technology

It achieves efficient modeling and computation of tokamak system models, supports joint simulation of different frequencies and periods, and improves the scalability and accuracy of simulation models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118842715B_ABST
    Figure CN118842715B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of nuclear fusion simulation, and particularly relates to a distributed simulation method for a digital tokamak. The technical scheme comprises the following steps: a distributed simulation coordination mechanism is designed, in a distributed simulation model cluster, a public IP and port are agreed by a master node, a slave node contacts the master node through the public IP and port and sends its own IP, model name, description and data port information, the master node aggregates the information and synchronizes the aggregated table and simulation start and end time to each slave node to assist each model to find a subsystem model to be connected in the network and establish a connection. The simulation method provided by the present application realizes the communication connection, data synchronization and interaction of each model in a complex system through a distributed simulation coordination mechanism and a unified distributed model interaction interface, is suitable for joint simulation of different frequencies and periods, optimizes a data transmission strategy, and has wide scalability.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of nuclear fusion simulation, and particularly relates to a distributed simulation method for a digital tokamak. BACKGROUND

[0002] The tokamak device is one of the key technologies for realizing controlled nuclear fusion. With the continuous improvement of the operation parameters of the tokamak, the control method is becoming increasingly diversified and complex. The traditional physical model for independent problems cannot meet the control requirements of future fusion reactors. The digital tokamak can simulate different operation conditions by coupling various complex plasma physical processes, test the control effect of the control system under normal and abnormal plasma discharge conditions, and then optimize the control algorithm and parameters, perfect the control system and control scheme, and ensure the efficiency and safety of the experiment.

[0003] The digital tokamak is a super large simulation model including a controller, device subsystem model and plasma response model. Building such a complex super model requires a carrier for model construction, operation and debugging - a digital tokamak simulation platform. It not only provides a convenient virtual experiment environment to build, test and verify theoretical models, but also provides simulation modules and simulation kits necessary for tokamak modeling and pre-computation, and orderly manages models and modules to greatly improve the construction efficiency of the large simulation system such as the digital tokamak, so that the simulation model has good usability and scalability. It can be seen that the digital tokamak simulation platform plays an indispensable role in future energy research. It not only provides a powerful tool for the iterative upgrade of the plasma control system, but also provides technical and engineering feasibility verification for the construction and operation of future fusion reactors.

[0004] The tokamak device is complex in structure and has many subsystems, each of which is responsible for different functions to achieve the best discharge effect. Current plasma simulation is mainly established by the plasma simulation group to build device models and subsystem models, and most models are simplified for specific problems. However, for the digital tokamak that needs to simulate plasma discharge experiments, overly simplified models often cannot meet the requirements of simulation experiments. To obtain accurate tokamak models and subsystem models, the efforts of device and subsystem researchers are needed, and each system department needs to build models for the corresponding subsystems to restore the response of the device and its subsystems to the maximum extent without affecting the operation speed, while supporting various complex discharge conditions. This puts forward requirements for the plasma simulation platform, which needs a distributed simulation scheme that supports the modeling and collaborative simulation of the device host and each subsystem. Therefore, the present application provides a distributed simulation method for a digital tokamak. SUMMARY

[0005] The application aims at the problem of the background art that there is no distributed simulation method capable of supporting the modeling of the device host and each subsystem respectively and the cooperative simulation.

[0006] The technical scheme of the application is a distributed simulation method for a digital tokamak, comprising the following steps:

[0007] A distributed simulation coordination mechanism is designed, in the distributed simulation model cluster, the master node agrees on a public IP and port, the slave node contacts the master node through the public IP and port and sends its own IP, model name, description and data port information, the master node aggregates the information and synchronizes the aggregated table and simulation start and stop time to each slave node, to assist each model to find the subsystem model to be connected in the network and establish the connection;

[0008] A unified distributed model interaction interface is designed, for establishing the data communication of the plasma response model and its subsystem model in the distributed calculation, and ensuring the synchronization of the simulation calculation of each model, the interaction interface is divided into a data sending end and a data receiving end, data alignment is performed through the data with time stamp, and the method of asynchronous data transmission is adopted for data interaction, and data filling and discarding operations are performed according to the time relationship of the data receiving end and the data sending end and the different data frequencies during the data interaction.

[0009] Optionally, in the distributed simulation coordination mechanism, the master node agrees on a public IP and port before simulation, the IP is the IP of the host where the master node is located, and the port is the agreed port.

[0010] Optionally, in the distributed simulation coordination mechanism, each subsystem constructs the related model on the respective modeling simulation host node, and writes the model name, model information and model port information, and establishes the coordination connection with the master node by clicking the connection button, the model in the master node is constructed, and the listening button is clicked to listen to the connection information of all slave nodes and establish the connection.

[0011] Optionally, in the distributed simulation coordination mechanism, after the connection is established, the master node collects the model information of each slave node, packs the model information of all nodes, simultaneously with the start and stop time of the simulation, and sends it to all participating slave nodes, each subsystem connects with the model port of other nodes according to the data dependency relationship of the model, and the master node verifies the state of all nodes and starts the simulation.

[0012] Optionally, in the unified distributed model interaction interface, all node model ports exposed with connection information are data sending ends, and the data sending ends are responsible for listening to port connection information, establishing a data connection queue, and saving all connection information.

[0013] Optionally, in the unified distributed model interaction interface, the data receiving end is responsible for initiating connection, and only needs to save a communication connection information and a time packet.

[0014] Optionally, in the communication strategy of the distributed model, when the data receiving end time is ahead of the data sending end time, the data receiving end must wait for the data sending end to output the data corresponding to the time stamp before continuing to perform simulation calculation; when the data receiving end time is behind the data sending end time, the data sending end uses a cache list to save its own output, and when the data receiving end reads the information, the data before the read time is deleted, and the cache area is cleaned up after the last data receiving end reads the data.

[0015] Optionally, during the data interaction, when the simulation step length of the data receiving end is less than the simulation step length of the data sending end, the data is supplemented, and the last time input is used for supplementation until the data sending end generates new input; when the simulation step length of the data receiving end is greater than the simulation step length of the data sending end, the data at the nearest time point of the data receiving end is taken, and other data is discarded.

[0016] In summary, the present application includes at least one of the following beneficial technical effects:

[0017] The present application can support the modeling and operation of the simulation model of a large system such as a digital tokamak, which has complex working conditions. Through a distributed simulation coordination mechanism, each model can find the subsystem model to be connected in the network and establish a connection, solving the problem that the device model and each subsystem model cannot directly establish a communication connection when running on different node hosts.

[0018] A unified distributed model interaction interface is designed to establish data communication of the plasma response model and its subsystem model during distributed computing, and to ensure the synchronization of simulation calculation of each model.

[0019] The distributed digital tokamak provides conditions for joint simulation of different frequencies and periods, and the interaction interface of the distributed model allows joint simulation of models with different periods, making the simulation as consistent as possible with the real experiment.

[0020] An asynchronous data transmission method is adopted, and according to the leading or lagging of the data receiving end and the data sending end time, the corresponding data processing strategy is adopted, and at the same time, the data is supplemented and discarded during data interaction, so as to adapt to different response periods and data frequencies of models on different nodes.

[0021] The distributed simulation method for the digital tokamak provided by the application realizes the communication connection, data synchronization and interaction of each model in a complex system through a distributed simulation coordination mechanism and a unified distributed model interaction interface, adapts to joint simulation of different frequencies and periods, optimizes data transmission strategies, and has wide scalability. BRIEF DESCRIPTION OF DRAWINGS

[0022] Figure 1 A coordination mechanism principle diagram for port connection information between distributed models;

[0023] Figure 2 A flowchart for connection establishment between distributed models;

[0024] Figure 3 A distributed model interaction interface principle for a data sending end Figure 1 ;

[0025] Figure 4 A distributed model interaction interface principle for a data sending end Figure 2 . DETAILED DESCRIPTION

[0026] The technical solutions of the present application will be described clearly and completely below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the accompanying drawings can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the claimed present application, but only represents selected embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.

[0027] EMBODIMENT

[0028] The distributed simulation method for the digital tokamak provided by the application supports modeling and operation of simulation models of the digital tokamak, which is a system with huge size and complex working conditions. In order to support communication connection and data synchronization between subsystem models in a distributed cluster, the application mainly involves design of a distributed simulation coordination mechanism and a data interaction interface:

[0029] 1. Distributed simulation coordination mechanism

[0030] In the distributed simulation model cluster, the device model and each subsystem model run on the plasma simulation verification platform of each node host, and they cannot directly establish communication connection with each other, so a simulation coordination mechanism is needed to help each model find the subsystem model to be connected in the network and establish connection.

[0031] First, a master node needs to agree on a public IP and port before simulation, and the master node itself is on the host IP and a agreed port. Second, the device model or subsystem model that wants to establish a network connection sets up a slave node to contact the master node through the public IP and port, and sends the slave node IP, model name, description and data port information of the model on the slave node to the master node, as shown in Figure 1 After the master-slave node connection is established, the master node aggregates the information of each slave node and synchronizes the aggregated table and simulation start and end time to each slave node, so that each device model or subsystem model that needs to participate in simulation can obtain the connection information of all other models that can be simulated jointly, and then the connection between each node in the distributed cluster is established through the distributed interactive interface.

[0032] The process of each node using the coordination mechanism of the master node to establish connection and prepare simulation is shown in Figure 2

[0033] First, each subsystem builds relevant models on its own modeling and simulation host node, and writes in the model name, model information and model port information for easy identification by other system personnel. Then, the connection button is clicked to establish a coordination connection with the master node, and the model in the master node also needs to click the listening button after being built, to listen to the connection information of all slave nodes and establish connection with them. After the connection is established, the master node will start collecting the model information of each slave node, and then package all the node model information, along with the simulation start and stop time, and send it to all participating slave nodes. With the model information in all nodes, each subsystem can connect with the model port of other nodes according to the data dependency relationship of the model. After all the connections are established, each node will be in a simulation ready state, and the master node can start simulation after verifying the status of all nodes.

[0034] 2. Unified distributed model interactive interface

[0035] As shown in Figure 3 ​As shown by the above distributed simulation coordination mechanism, the models of each node can obtain connection information from each other. The interaction interface of the distributed model is used to establish data communication of the plasma response model and its subsystem model in distributed computing, and to ensure the synchronization of simulation calculation of each model. The distributed model interaction interface is divided into data sending end and data receiving end. All the node model ports exposed to the connection information are data sending ends, so the data sending end is responsible for listening to the port connection information when establishing the connection, while the data receiving end is responsible for initiating the connection. However, considering that each model may have more than one model connected to it, the data sending end will establish a data connection queue to save all connection information. As shown in Figure 4 The data receiving end only needs to save a communication connection information and a time data packet.

[0036] In addition, the collection frequency and response period of the real tokamak discharge device and each subsystem are different, but when the model is simulated daily, it is on the same node. In order to ensure the correct calculation of all models, the model with the smallest response period is often used as the unified calculation step, which also brings errors to the simulation. At present, the distributed digital tokamak provides conditions for the joint simulation of different frequencies and different periods. In order to ensure that the simulation is as consistent as possible with the real experiment, the interaction interface of the distributed model will allow different period models to be simulated jointly.

[0037] The communication of the interactive interface of the distributed model is mainly through time-stamped data for data alignment. However, in order to support the simulation of models with different response periods, the commonly used blocking data interaction method cannot meet the interaction requirements of different frequencies, so it is far from enough for each model port to output only one time slice of data per period. Since the calculation complexity of each model is different, the time they take to calculate one same simulation period is also different, so an asynchronous data transmission method is needed. Overall, the communication strategy of the distributed model can be summarized as two cases: the data receiving end time leading the data sending end time and the data receiving end time falling behind the data sending end time.

[0038] When the data receiving end time leads the data sending end time, since the data between models is strongly correlated, the data receiving end must wait for the data sending end to output the corresponding timestamp data before continuing to perform simulation calculation. When the data receiving end time lags behind the data sending end, it means that the data receiving end needs to read the historical information of the data sending end, so the data sending end needs to use a cache list to save its own output, and when the data receiving end reads the information, the data before the read time is deleted to avoid buffer overflow. In addition, considering that a data sending end may be connected to multiple data receiving ends, the cache area needs to be cleaned up after the last data receiving end reads the data. Therefore, the data port design of the data sending end is as shown in Figure 3 In addition to the communication connection queue, a data cache queue is designed to record the data read flag and all unread data packets, and the number of data read flags is consistent with the number of communication connections, that is, each communication connection has a flag to save the data read position.

[0039] Unlike asynchronous data transmission in ordinary computer networks, models on different nodes have different response cycles, which means that the data frequency of the data receiving end and the data sending end is different, and data will be supplemented and discarded when data is interacted. When the simulation step of the data receiving end is less than that of the data sending end, that is, the data processing frequency of the model of the data receiving end is higher than that of the data sending end, at this time, the data needs to be supplemented. In order to better restore the effect of real-time communication of hardware, the input of the last time will be used to supplement, until the data sending end generates new input. When the simulation step of the data receiving end is greater than that of the data sending end, it means that the data receiving end does not need so much data input, then the data of the nearest time point can be taken and other data can be discarded.

[0040] The above specific embodiments are only several optional embodiments of the present application, and based on the technical solutions of the present application and the related inspiration of the above embodiments, those skilled in the art can make various alternative improvements and combinations on the above specific embodiments.

Claims

1. A distributed simulation method for a digital tokamak, characterized in that, The method comprises the following steps: A distributed simulation coordination mechanism is designed, in which a master node agrees on an open IP and port, a slave node contacts the master node through the open IP and port and sends its IP, model name, description and data port information, the master node aggregates the information and synchronizes the aggregated table and simulation start and end time to each slave node to help each model find a subsystem model in the network and establish a connection; A unified distributed model interaction interface is designed to establish data communication of a plasma response model and its subsystem models in distributed computing and ensure synchronization of simulation calculation of each model, the interaction interface comprises a data sending end and a data receiving end, data alignment is performed through data with time stamps, and data interaction is performed through an asynchronous data transmission method, when the time of the data receiving end is ahead of the time of the data sending end, the data receiving end must wait for the data sending end to output data corresponding to the time stamp before continuing simulation calculation; When the time of the data receiving end is behind the time of the data sending end, the data sending end saves its output in a buffer list; After the data receiving end reads information, the data read before the time is deleted, and the buffer area is cleaned up after the last data receiving end reads data; During data interaction, data is supplemented and discarded according to the time relationship and different data frequencies of the data receiving end and the data sending end, when the simulation step length of the data receiving end is smaller than the simulation step length of the data sending end, the data is supplemented, the last input is used for supplementation until a new input is generated by the data sending end, when the simulation step length of the data receiving end is greater than the simulation step length of the data sending end, the data at the nearest time point of the data receiving end is taken and other data is discarded; In the distributed simulation coordination mechanism, each subsystem constructs a related model on a respective modeling and simulation host node, writes the model name, model information and model port information, establishes a coordination connection with the master node by clicking a connection button, and clicks a listening button after the model in the master node is constructed to listen to the connection information of all slave nodes and establish a connection; In the distributed simulation coordination mechanism, after the connection is established, the master node collects model information of each slave node, packs the model information of all nodes, simultaneously attaches start and stop time of simulation, and sends the model information to all participating slave nodes, each subsystem connects with the model port of other nodes according to the data dependency relationship of the model, and the master node verifies the state of all nodes and starts simulation.

2. The distributed simulation method for a digital tokamak according to claim 1, characterized in that, In the distributed simulation coordination mechanism, the master node agrees on an open IP and port before simulation, the IP is the IP of the host where the master node is located, and the port is the agreed port.

3. The distributed simulation method for a digital tokamak of claim 1, wherein, In the unified distributed model interaction interface, all node model ports exposed to connection information are data sending ends, the data sending end is responsible for listening to port connection information and establishing a data connection queue to save all connection information.

4. The distributed simulation method for a digital tokamak of claim 1, wherein, In the unified distributed model interaction interface, the data receiving end is responsible for initiating connection and only needs to save a communication connection information and a time data packet.

Citation Information

Patent Citations

  • Distributed simulation system and method

    CN114490643A

  • Joint simulation method and system supporting simulation software and distributed simulation nodes

    CN117312016A