A method and system for electro-mechanical-electromagnetic transient hybrid simulation calculation

By optimizing the allocation of computing resources through the Kubernetes cluster management system and Redis database queue management, the problem of low computing efficiency in electromechanical-electromagnetic transient hybrid simulation was solved, and efficient computing for large-scale power grid simulation was achieved.

CN115906510BActive Publication Date: 2026-03-27CHINA SOUTHERN POWER GRID COMPANY +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-16
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

Existing electromechanical-electromagnetic transient hybrid simulation methods and systems are inefficient when dealing with large-scale power systems, and single fault simulations are time-consuming, making it difficult to meet the accuracy and efficiency requirements of power electronic equipment in new power systems that exhibit rapid changes.

Method used

The system employs a Kubernetes cluster management system, manages computing tasks through a Redis database queue, and combines OSS storage and Tomcat services to optimize computing resource allocation. It also utilizes the Pod creation module to perform parallel computing on each worker node, thereby improving the efficiency of task parallelism and network-based parallelism.

Benefits of technology

It effectively reduces the time consumption of electromechanical-electromagnetic transient hybrid simulation, improves the simulation efficiency of multiple calculation cases, and realizes efficient calculation of large-scale power grid simulation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115906510B_ABST
    Figure CN115906510B_ABST
Patent Text Reader

Abstract

The application discloses a kind of electromechanical-electromagnetic transient hybrid simulation calculation method and system, combine Kubernetes management cluster and the actual calculation demand of electromechanical-electromagnetic transient hybrid simulation, the computing task of containing numerous computing cases is distributed to each work node, the computing task of each work node can be effectively balanced, while the computing task of single case is allocated to the same CPU, from the two angles of task parallel and sub-network parallel, efficiency is improved, the electromechanical-electromagnetic transient hybrid simulation time consumption is reduced as a whole, and the electromechanical-electromagnetic transient hybrid simulation efficiency of multiple computing cases is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of power system simulation, in particular to a method and system for electromechanical-electromagnetic hybrid simulation. BACKGROUND

[0002] The construction of new power systems will introduce large-scale wind, light, storage and other power electronic devices, and the power electronic characteristics of power systems will become more and more obvious. In the current power system analysis system, the checking of system safety and stability is mainly based on electromechanical transient simulation, and large-scale fault scanning calculation is carried out, and electromagnetic transient and electromechanical-electromagnetic transient hybrid simulation is auxiliary, and the checking of key faults is carried out. The former has obvious speed advantage, but with the development of power grid, the disadvantage is becoming more and more prominent. Electromechanical transient simulation cannot accurately reflect the rapid change characteristics of mainstream, STATCOM, wind, light and storage and other power electronic devices, and its accuracy cannot be guaranteed for highly power electronic new power system. While the electromagnetic transient simulation can solve the problem of accuracy, but at present its efficiency has not made a breakthrough, and it cannot be simulated for large-scale power grid.

[0003] Electromechanical-electromagnetic transient hybrid simulation needs to divide the large power grid into an electromechanical transient simulation system and several electromagnetic transient simulation systems, wherein the electromechanical transient simulation system is calculated by an electromechanical transient simulation program, and N electromagnetic transient simulation systems can be calculated in parallel by N electromagnetic transient simulation programs. At each exchange step, N electromagnetic transient programs exchange data with the electromechanical transient program. The existing single-person single-machine version of the simulation system generally takes more than 20 minutes for single fault simulation, and nearly 9 days for 600 faults, which is low in efficiency. The current parallelization research focuses on how to improve the simulation efficiency of a single calculation case, that is, to distribute the 1+N programs to multiple computing cores. However, the future trend is that a single computing task contains multiple computing cases, for example, 600-700 computing cases. From the perspective of efficiency improvement, it is not only necessary to consider how to speed up the calculation speed of a single computing case, but more importantly, how to reduce the calculation time of the entire task. SUMMARY

[0004] The present application provides a method and system for electromechanical-electromagnetic transient hybrid simulation, which is used to reduce the time consumption of electromechanical-electromagnetic transient hybrid simulation and improve the efficiency of electromechanical-electromagnetic transient hybrid simulation of multiple computing cases.

[0005] Therefore, the present application provides a method for electromechanical-electromagnetic transient hybrid simulation, comprising:

[0006] Receiving the original calculation data uploaded by the client and the calculation request of the electromechanical-electromagnetic transient hybrid simulation, and storing the original calculation data in the OSS storage area;

[0007] According to the original calculation data and the calculation request, the task list in the calculation request and the case number m contained in the calculation task are analyzed, and the numerical values [1, 2, …, m] are inserted into the corresponding task list in the Redis database in the form of a queue;

[0008] Calculate the computing resources required for each case;

[0009] Query the current remaining CPU computing power of each worker node in the Kubernetes cluster, calculate the number of cases that can be simultaneously performed by each worker node, and calculate the CPU computing power occupied by the calculation cases;

[0010] Based on the Kubernetes cluster, a work task is created, which contains m application Pods, and the Pods are created in each worker node. A single Pod requires the minimum CPU computing power of all worker nodes;

[0011] For each Pod in each worker node, download the original calculation data from the OSS storage area, and pop a calculation case from the task queue in Redis for calculation;

[0012] After each calculation case is completed, the calculation result data is stored in the OSS storage area, and another calculation case is popped from the task queue in Redis for calculation until the task queue is empty.

[0013] Optionally, the computing resources required for each case are calculated, including:

[0014] The number of electromagnetic subsystems required for each case is read from the configuration file, and the computing resources required for each case are calculated, and the calculation formula is:

[0015] z = aN + 0.2

[0016] Where z is the computing resources required for each case, a is the weight coefficient, and N is the number of electromagnetic subsystems required for each case.

[0017] Optionally, the current remaining CPU computing power of each worker node in the Kubernetes cluster is queried, the number of cases that can be simultaneously performed by each worker node is calculated, and the CPU computing power occupied by the calculation cases is calculated, including:

[0018] Query the current remaining CPU computing power of each worker node in the Kubernetes cluster;

[0019] Calculate the number of cases that can be simultaneously performed by each worker node, and the calculation formula is:

[0020] mx = Floor(z mx / z)

[0021] wherein mx is the number of cases that the xth worker node can simultaneously perform, x = 1, 2, …, k, k is the number of worker nodes, Floor() is a rounding function, and z mx is the residual CPU computing power of the xth worker node.

[0022] The sum of the number of cases that all worker nodes can simultaneously perform is calculated, and the calculation formula is:

[0023] m = m1 + m2 + … + mk

[0024] wherein m is the sum of the number of cases that all worker nodes can simultaneously perform, and mk is the number of cases that the kth worker node can simultaneously perform.

[0025] The CPU computing power occupied by each worker node for calculating a case is calculated, and the calculation formula is:

[0026] zx = z mx / mx

[0027] wherein zx is the CPU computing power occupied by the xth worker node for calculating a case.

[0028] Optionally, after each calculation case is completed, the data is stored in the OSS storage area, and a calculation case is continuously popped out from the task queue of Redis for calculation until the task queue is empty, and the method further comprises:

[0029] After all the calculation cases are completed, the client Tomcat service provides the user with the results of the electro-mechanical and electromagnetic transient hybrid simulation calculation.

[0030] The second aspect of the application provides an electro-mechanical and electromagnetic transient hybrid simulation calculation system, comprising:

[0031] A request service module is configured to receive original calculation data uploaded by a client and a calculation request of electro-mechanical and electromagnetic transient hybrid simulation, and store the original calculation data in an OSS storage area.

[0032] A case number analysis module is configured to analyze a task list in the calculation request and a number m of cases contained in a calculation task according to the original calculation data and the calculation request, and insert the numerical [1, 2, …, m] in the form of a queue into the corresponding task list in a Redis database.

[0033] A resource calculation module is configured to calculate the calculation resources required by each case.

[0034] A node case number calculation module is configured to query the residual CPU computing power of each worker node in a Kubernetes cluster, calculate the number of cases that all worker nodes can simultaneously perform, and calculate the CPU computing power occupied by the calculation cases.

[0035] a pod creation module, configured to create a work task based on the Kubernetes cluster, the work task containing m application pods, and create the pods in respective worker nodes, a single pod requiring a minimum CPU computing power of all CPU computing powers of all the worker nodes;

[0036] a case calculation module, configured to, for each pod in each worker node, download original calculation data from an OSS storage area, and pop a calculation case from a task queue of Redis for calculation;

[0037] a data storage module, configured to, after completion of each calculation case, store calculation result data in the OSS storage area, and continue to pop a calculation case from the task queue of Redis for calculation until the task queue is empty.

[0038] Optionally, the resource calculation module is specifically configured to:

[0039] read, from a configuration file, a number of electromagnetic subsystems to be formed for each case, and calculate calculation resources required by each case, a calculation formula being:

[0040] z = aN + 0.2

[0041] wherein z is the calculation resources required by each case, a is a weight coefficient, and N is the number of electromagnetic subsystems to be formed for each case.

[0042] Optionally, the node case number calculation module is specifically configured to:

[0043] query a residual CPU computing power of each worker node of a Kubernetes cluster in which the node case number calculation module is located;

[0044] calculate a number of cases that can be simultaneously performed by each worker node, a calculation formula being:

[0045] mx = Floor(z mx / z)

[0046] wherein mx is the number of cases that can be simultaneously performed by an xth worker node, x = 1, 2, …, k, k is a number of worker nodes, Floor() is a rounding function, and z mx is the residual CPU computing power of the xth worker node;

[0047] calculate a total number of cases that can be simultaneously performed by all the worker nodes, a calculation formula being:

[0048] m = m1 + m2 + … + mk

[0049] Wherein, m is the total number of cases that all working nodes can simultaneously carry out, and mk is the number of cases that the kth working node can simultaneously carry out;

[0050] The CPU computing power occupied by each working node to calculate a case is calculated, and the calculation formula is:

[0051] Zx = z mx / mx

[0052] Wherein, zx is the CPU computing power occupied by the xth working node to calculate a case.

[0053] Optionally, the result output module is further included, and the result output module is used for:

[0054] After all the calculation cases are completed, the client Tomcat service provides the mechanical-electromagnetic transient hybrid simulation calculation result for the user.

[0055] Compared with the prior art, the mechanical-electromagnetic transient hybrid simulation calculation method and system provided by the application have the following advantages:

[0056] The mechanical-electromagnetic transient hybrid simulation calculation method provided by the application combines the Kubernetes management cluster and the actual calculation demand of the mechanical-electromagnetic transient hybrid simulation, distributes the calculation task containing numerous calculation cases to each working node, can effectively balance the calculation task of each working node, simultaneously allocates the calculation task of a single case to the same CPU, realizes efficiency improvement from the two aspects of task parallelism and network parallelism, reduces the mechanical-electromagnetic transient hybrid simulation time from the whole, and improves the mechanical-electromagnetic transient hybrid simulation efficiency of multiple calculation cases.

[0057] The mechanical-electromagnetic transient hybrid simulation calculation system provided by the application is used for executing the mechanical-electromagnetic transient hybrid simulation calculation method provided by the application, and the principle and the technical effects obtained are the same as those of the mechanical-electromagnetic transient hybrid simulation calculation method provided by the application, and will not be repeated here. BRIEF DESCRIPTION OF DRAWINGS

[0058] In order to more clearly illustrate the technical solutions in the embodiments of the application or the prior art, the drawings needed to be used in the embodiments or the prior art description will be briefly introduced below. Obviously, the drawings in the following description only some embodiments of the application, and for those skilled in the art, other related drawings can also be obtained without creative labor on the basis of these drawings.

[0059] Figure 1 The flowchart of the mechanical-electromagnetic transient hybrid simulation calculation method provided in the application is shown in the figure;

[0060] Figure 2It is a structural schematic diagram of an electromechanical-electromagnetic transient hybrid simulation calculation system provided in the application. DETAILED DESCRIPTION

[0061] In order for those skilled in the art to better understand the application scheme, the technical solutions in the embodiments of the application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the application. Obviously, the described embodiments are only some of the embodiments of the application, not all. Based on the embodiments in the application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the application.

[0062] Pod: Pod is translated as "application" in Chinese (usually not translated), which is the smallest unit that can be created and managed in the k8s system, is the smallest resource object model created or deployed by the user in the resource object model, and is also the resource object running the containerized application on k8s. Other resource objects are used to support or extend the functions of the Pod object. Each Pod will be deployed to a suitable computing node by Kubernetes according to the resource situation.

[0063] Container: There are multiple containers in a Pod. Each Pod has a special Pause container called "root container". In addition to the Pause container, each Pod also contains one or more closely related user business containers for running user programs.

[0064] OSS: Object Storage Service, object storage service. Used for storing data.

[0065] SLB: Server Load Balancing, server load balancing. Used for reverse proxy for servers, horizontal expansion to increase server processing capacity.

[0066] WAF: Web Application Firewall, website application-level intrusion prevention system. A product that provides protection for web applications by executing a series of security policies for HTTP / HTTPS.

[0067] Redis: Remote Dictionary Server, a memory-based database product.

[0068] Tomcat: Tomcat server is a free and open source web application server, which is a lightweight application server and is widely used in small and medium-sized systems and scenarios with few concurrent access users.

[0069] For ease of understanding, please refer to Figure 1 In the present application, an embodiment of a method for electromechanical-electromagnetic transient hybrid simulation calculation is provided, comprising:

[0070] Step 101, receiving the original calculation data uploaded by the client and the calculation request of the electromechanical-electromagnetic transient hybrid simulation, and storing the original calculation data in the OSS storage area.

[0071] It should be noted that in the embodiment of the present application, the server first receives the original calculation data uploaded by the user through the client and the calculation request of the electromechanical-electromagnetic transient hybrid simulation, and stores the original calculation data in the OSS storage area. Among them, the user client uploads the original calculation data and the calculation request of the electromechanical-electromagnetic transient hybrid simulation to the server through SLB load balancing, WAF network protection and Tomcat service.

[0072] Step 102, according to the original calculation data and the calculation request, analyzing the task list in the calculation request and the case number m contained in the calculation task, and inserting the numerical value [1, 2,..., m] in the form of a queue into the corresponding task list in the Redis database.

[0073] It should be noted that after the server receives the calculation request, it analyzes the task list in the calculation request, calculates the number of cases m contained in the calculation task, and inserts the numerical value [1, 2,..., m] in the form of a queue into the corresponding task list in the Redis database according to the number of cases m.

[0074] Step 103, calculating the computing resources required for each case.

[0075] It should be noted that after obtaining the number of cases m, the computing resources required for each case are calculated, wherein the number N of electromagnetic subsystems to be formed can be read from the configuration file, and the computing resources required for each case are determined according to the calculation formula, the calculation formula is:

[0076] z=αN+0.2

[0077] Wherein, z is the computing resources required for each case, alpha is the weight coefficient, the value range is 0.5-1.0, N is the number of electromagnetic subsystems required for each case, the electromechanical program occupies a small amount of CPU computing power, and according to experience, it occupies about 0.2 CPU computing power, so a task needs to occupy CPU computing power of alphaN+0.2.

[0078] Step 104, querying the current remaining CPU computing power of each worker node in the Kubernetes cluster, calculating the number of cases that can be performed simultaneously by all worker nodes and the CPU computing power occupied by the calculation cases.

[0079] It should be noted that the current residual CPU computing power of each worker node (Worker) in the queried Kubernetes cluster is queried, the number of cases that can be simultaneously performed by each worker node is calculated according to the current residual CPU computing power of each worker node, and the CPU computing power occupied by the cases is calculated.

[0080] Specifically, the calculation formula of the number of cases that can be simultaneously performed by each worker node is:

[0081] mx=Floor(z mx / z)

[0082] Wherein, mx is the number of cases that can be simultaneously performed by the xth worker node, Floor() is the integer function, that is, the maximum integer not greater than the integer in the parentheses is taken, x = 1, 2, …, k, k is the number of worker nodes, z mx is the residual CPU computing power of the xth worker node.

[0083] The calculation formula for calculating the total number of cases that can be simultaneously performed by all worker nodes is:

[0084] m=m1+m2+…+mk

[0085] Wherein, m is the total number of cases that can be simultaneously performed by all worker nodes, mk is the number of cases that can be simultaneously performed by the kth worker node;

[0086] The calculation formula for calculating the CPU computing power occupied by each worker node for calculating cases is:

[0087] zx=z mx / mx

[0088] Wherein, zx is the CPU computing power occupied by the xth worker node for calculating cases.

[0089] For a single case, occupying 1+N CPUs is the most optimal solution for efficiency improvement, which can maximize the speed of a single case, but local optimization does not mean overall optimization. In the embodiment of the present application, by introducing a weight coefficient a to slightly limit the CPU occupation, more tasks can be allowed to run in parallel on the same execution machine, so that more cases can be allowed to run simultaneously as a whole. For example, if the power grid needs to perform parallel calculation on 13 DCs, plus the mechanical and electrical transient side, a total of 14 calculation threads are needed. If each server has 32 cores, and each Pod occupies 14 cores, then a single server can only perform calculation on 2 cases simultaneously. But if the occupation is limited to 10.5 cores, then a single server can perform calculation on 3 cases simultaneously. If the occupation is limited to 8 cores, then a single server can perform calculation on 4 cases simultaneously.

[0090] Step 105, create a work task based on the Kubernetes cluster, the work task contains m application Pods, and create Pods in each worker node, and the single Pod requires the minimum CPU power of all CPU powers occupied by all worker nodes.

[0091] It should be noted that a work task Job is created based on the Kubernetes cluster, and the work task contains m application Pods, and the single Pod requires the minimum CPU power z of all CPU powers occupied by all worker nodes min , z min = min(z1, z2, …, zk). The work task is scheduled by the Kubernetes cluster.

[0092] Step 106, for each Pod in each worker node, download the original calculation data from the OSS storage area, and pop a calculation case from the task queue of Redis for calculation.

[0093] It should be noted that for each Pod scheduled to each worker node, the original calculation data will be downloaded from the OSS, a calculation case will be popped from the task queue of Redis for calculation, and the calculation engine image can be downloaded from the Registry calculation engine warehouse. 2+N containers Containers will be created in the Pod. One PAUSE container is necessary but does not do substantive content, and the other 1+N calculation containers correspond to 1 electromechanical transient program and N electromagnetic transient simulation programs respectively.

[0094] The same case is executed in the same Pod, which can ensure that the entire program can be restarted immediately once one of the containers Container has an accident / error, without the need for cooperation of the Pods on other nodes. In addition, distributing all containers of the same case to the same computing node can use internal local communication to avoid mutual interference between different cases.

[0095] The K8s cluster management system can monitor the state of the Pod, and if it cannot normally execute due to an accident, it can be restarted immediately (not necessarily the same computing node, can be transferred to other nodes) to ensure that a sufficient number of Pods are calculated. For a Pod, all its containers will be calculated in a computing node, and can directly communicate with each other, and the containers between different Pods are not disturbed.

[0096] Step 107, after each calculation case is completed, the calculation result data is stored in the OSS storage area, and a calculation case is continuously popped from the task queue of Redis for calculation until the task queue is empty.

[0097] It should be noted that each Pod will independently complete a calculation case, and the calculation result data will be stored in the OSS storage area after the calculation is completed. After each Pod independently completes a calculation case, the calculation case is continued to be popped out from the task queue of Redis, and the calculation task is completed until the task queue is empty.

[0098] Generally speaking, the number of calculation cases will be M times the number of parallelisms. Let each Pod take the task from the Redis queue during calculation, which can ensure the balance of different Pod calculation tasks and guarantee the efficiency of the task.

[0099] For example, according to the computer cluster calculation, M=10, and the total number of cases is 600. Then, each Pod may not calculate 60 cases, but each Pod takes 1 case first, and then takes the next one after the calculation is completed, so that each Pod will be idle for at most one case calculation time, and some Pods will not be idle for a long time.

[0100] After all the calculation cases are completed, the client Tomcat service provides the user with the electro-mechanical electromagnetic transient hybrid simulation calculation result for downloading and checking.

[0101] The electro-mechanical electromagnetic transient hybrid simulation calculation method provided by the application combines the Kubernetes management cluster and the actual calculation requirement of the electro-mechanical electromagnetic transient hybrid simulation, distributes the calculation task containing a plurality of calculation cases to each working node, can effectively balance the calculation task of each working node, and allocates the calculation task of a single case to the same CPU, realizes efficiency improvement from the aspects of task parallelism and network parallelism, reduces the electro-mechanical electromagnetic transient hybrid simulation time from the whole, and improves the electro-mechanical electromagnetic transient hybrid simulation efficiency of multiple calculation cases.

[0102] An embodiment of an electro-mechanical electromagnetic transient hybrid simulation calculation system is also provided in the application, which comprises:

[0103] The request service module is used for receiving the original calculation data uploaded by the client and the calculation request of the electro-mechanical electromagnetic transient hybrid simulation, and storing the original calculation data in the OSS storage area;

[0104] The case number analysis module is used for analyzing the task list in the calculation request and the case number m contained in the calculation task according to the original calculation data and the calculation request, and inserting the numerical value [1, 2,..., m] into the corresponding task list in the Redis database in the form of a queue;

[0105] The resource calculation module is used for calculating the calculation resource required by each case;

[0106] A node case number calculation module is configured to query the residual CPU computing power of each worker node in the Kubernetes cluster, calculate the number of cases that can be simultaneously performed by all worker nodes, and calculate the CPU computing power occupied by the cases.

[0107] A pod creation module is configured to create a work task based on the Kubernetes cluster, the work task including m application pods, and create the pods in each worker node, and each pod requires to occupy the minimum CPU computing power of all worker nodes.

[0108] A case calculation module is configured to, for each pod in each worker node, download original calculation data from an OSS storage area, and pop a calculation case from a task queue of Redis for calculation.

[0109] A data storage module is configured to, after each calculation case is completed, store the calculation result data in the OSS storage area, and continue to pop a calculation case from the task queue of Redis for calculation until the task queue is empty.

[0110] The resource calculation module is specifically configured to:

[0111] read the number of electromagnetic subsystems required to be formed by each case from a configuration file, calculate the calculation resource required by each case, and the calculation formula is:

[0112] z = aN + 0.2

[0113] wherein z is the calculation resource required by each case, a is a weight coefficient, and N is the number of electromagnetic subsystems required to be formed by each case.

[0114] The node case number calculation module is specifically configured to:

[0115] query the residual CPU computing power of each worker node in the Kubernetes cluster;

[0116] calculate the number of cases that can be simultaneously performed by each worker node, and the calculation formula is:

[0117] mx = Floor(z mx / z)

[0118] wherein mx is the number of cases that can be simultaneously performed by the xth worker node, x = 1, 2, …, k, k is the number of worker nodes, Floor() is a rounding function, and z mx is the residual CPU computing power of the xth worker node.

[0119] calculate the total number of cases that can be simultaneously performed by all worker nodes, and the calculation formula is:

[0120] m = m1 + m2 + … + mk

[0121] Wherein, m is the total number of cases that all working nodes can simultaneously carry out, and mk is the number of cases that the kth working node can simultaneously carry out.

[0122] The CPU computing power occupied by each working node to calculate a case is calculated, and the calculation formula is:

[0123] zx = z mx / mx

[0124] Wherein, zx is the CPU computing power occupied by the xth working node to calculate a case.

[0125] The result output module is further used for:

[0126] After all the calculation cases are completed, the client Tomcat service is used to provide the user with the electro-mechanical electromagnetic transient hybrid simulation calculation result.

[0127] The Pod creation module is further used for:

[0128] After the Pod is created, it is judged whether the Pod has a response within 30s, and if not, the Pod is deleted and the value of the case number m is correspondingly reduced.

[0129] The electro-mechanical-electromagnetic transient hybrid simulation calculation system provided by the application is used to execute the electro-mechanical-electromagnetic transient hybrid simulation calculation method provided by the application, and the principle and the technical effects obtained are the same as those of the electro-mechanical-electromagnetic transient hybrid simulation calculation method provided by the application, which will not be repeated here.

[0130] The above-described embodiments are only used to illustrate the technical solutions of the application, rather than limit them; although the application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for some technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the application.

Claims

1. A hybrid electromechanical-electromagnetic transient simulation calculation method, characterized in that, include: Receive raw calculation data and calculation requests for electromechanical electromagnetic transient hybrid simulation uploaded by the client, and store the raw calculation data in the OSS storage area; Based on the original computation data and computation request, analyze the task list in the computation request and the number of cases m contained in the computation task, and insert the values ​​[1,2,...,m] into the corresponding task list in the Redis database in the form of a queue; Calculate the computational resources required for each case; Query the remaining CPU computing power of each worker node in the Kubernetes cluster, calculate the number of cases that can be processed simultaneously on all worker nodes, and the CPU computing power used to process the cases. Create a worker task based on a Kubernetes cluster. The worker task contains m application Pods. Create Pods on each worker node. The minimum CPU computing power required by a single Pod to consume the CPU computing power of all worker nodes. For each Pod in each worker node, download the raw computation data from the OSS storage area and pop a computation case from the Redis task queue for computation; After each computation case is completed, the computation result data is stored in the OSS storage area, and a new computation case is popped from the Redis task queue for computation until the task queue is empty.

2. The electromechanical-electromagnetic transient hybrid simulation calculation method according to claim 1, characterized in that, Calculate the computational resources required for each case, including: The number of electromagnetic subsystems required for each case is read from the configuration file, and the computational resources required for each case are calculated using the following formula: z = αN + 0.2 Where z is the computational resources required for each case, α is the weighting coefficient, and N is the number of electromagnetic subsystems that need to be formed for each case.

3. The electromechanical-electromagnetic transient hybrid simulation calculation method according to claim 2, characterized in that, Query the remaining CPU computing power of each worker node in the Kubernetes cluster, calculate the number of test cases that each worker node can run simultaneously, and the CPU computing power used to compute each test case, including: Query the remaining CPU computing power of each worker node in the Kubernetes cluster. The formula for calculating the number of cases that can be processed simultaneously at each work node is as follows: mx=Floor(z mx / z) Where mx is the number of cases that can be processed simultaneously at the x-th worker node, x = 1, 2, ..., k, Floor() is the floor function, k is the number of worker nodes, and z mx This represents the remaining CPU computing power of the x-th working node; The total number of cases that can be processed simultaneously across all work nodes is calculated using the following formula: m = m1 + m2 + ... + mk Where m is the total number of cases that can be processed simultaneously by all working nodes, and mk is the number of cases that can be processed simultaneously by the kth working node; The CPU computing power used by each worker node for a computing case is calculated using the following formula: zx=z mx / mx Where zx represents the CPU computing power used by the xth working node in the computation case.

4. The electromechanical-electromagnetic transient hybrid simulation calculation method according to claim 1, characterized in that, After each computation case is completed, the data is stored in the OSS storage area, and another computation case is popped from the Redis task queue for computation until the task queue is empty. This process then includes: After all calculation cases are completed, the electromechanical-electromagnetic transient hybrid simulation results are provided to users through the Tomcat client service.

5. A hybrid electromechanical-electromagnetic transient simulation calculation system, characterized in that, include: The request service module is used to receive raw calculation data and calculation requests for electromechanical electromagnetic transient hybrid simulation uploaded by the client, and store the raw calculation data in the OSS storage area. The case count analysis module is used to analyze the task list in the calculation request and the number of cases m contained in the calculation task based on the original calculation data and calculation request, and insert the values ​​[1,2,...,m] into the corresponding task list in the Redis database in the form of a queue; The resource calculation module is used to calculate the computing resources required for each case. The node case count calculation module is used to query the remaining CPU computing power of each worker node in the Kubernetes cluster, calculate the number of cases that can be processed simultaneously on all worker nodes, and the CPU computing power used to calculate the cases. The Pod creation module is used to create a worker task based on a Kubernetes cluster. The worker task contains m application Pods and creates Pods on each worker node. The minimum CPU computing power required by a single Pod to consume the total CPU computing power of all worker nodes is required. The case calculation module is used to download raw calculation data from the OSS storage area for each Pod in each worker node and pop a calculation case from the Redis task queue for calculation. The data storage module is used to store the calculation results in the OSS storage area after each calculation case is completed, and then pop a new calculation case from the Redis task queue for calculation until the task queue is empty.

6. The electromechanical-electromagnetic transient hybrid simulation calculation system according to claim 5, characterized in that, The resource computing module is specifically used for: The number of electromagnetic subsystems required for each case is read from the configuration file, and the computational resources required for each case are calculated using the following formula: z = αN + 0.2 Where z is the computational resources required for each case, α is the weighting coefficient, and N is the number of electromagnetic subsystems that need to be formed for each case.

7. The electromechanical-electromagnetic transient hybrid simulation calculation system according to claim 6, characterized in that, The node case count calculation module is specifically used for: Query the remaining CPU computing power of each worker node in the Kubernetes cluster. The formula for calculating the number of cases that can be processed simultaneously at each work node is as follows: mx=Floor(z mx / z) Where mx is the number of cases that can be processed simultaneously at the x-th worker node, x = 1, 2, ..., k, k is the number of worker nodes, Floor() is the floor function, and z mx This represents the remaining CPU computing power of the x-th working node; The total number of cases that can be processed simultaneously across all work nodes is calculated using the following formula: m = m1 + m2 + ... + mk Where m is the total number of cases that can be processed simultaneously by all working nodes, and mk is the number of cases that can be processed simultaneously by the kth working node; The CPU computing power used by each worker node for a computing case is calculated using the following formula: zx=z mx / mx Where zx represents the CPU computing power used by the xth working node in the computation case.

8. The electromechanical-electromagnetic transient hybrid simulation calculation system according to claim 7, characterized in that, It also includes a results output module, which is used for: After all calculation cases are completed, the electromechanical-electromagnetic transient hybrid simulation results are provided to users through the Tomcat client service.

Citation Information

Patent Citations

  • Parallel computing task scheduling method and system based on Kubernetes

    CN113672391A

  • Simulation task deployment method, system and related device

    CN113722091A