Distributed computing method for one-dimensional simulation of thermophysical properties based on BSP model
By using a distributed computing method based on the BSP model, the one-dimensional simulation model of thermophysical properties is equivalent to a directed graph, enabling parallel computation. This solves the problem of low simulation efficiency in existing technologies and improves simulation speed.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NANJING UNIV OF SCI & TECH
- Filing Date
- 2021-12-13
- Publication Date
- 2026-05-05
AI Technical Summary
In existing technologies, the one-dimensional simulation calculation efficiency of thermophysical properties is relatively low, and there is no effective method to improve its simulation efficiency.
A distributed computing method based on the BSP model is adopted. By establishing a computer cluster environment, the one-dimensional simulation model of thermophysical properties is equivalent to a directed graph. The computing tasks are divided and parallel computing is performed to make full use of the computing resources in the cluster.
It accelerates the one-dimensional simulation of thermophysical properties, improving simulation speed and computational efficiency.
Smart Images

Figure CN114297831B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of distributed computing, specifically to a distributed computing method for one-dimensional simulation of thermophysical properties based on the BSP model. Background Technology
[0002] One-dimensional simulation is a commonly used method for simulating thermophysical properties. It can be seen as a further development of zero-dimensional simulation models. Zero-dimensional simulation models, also known as single-zone models, are developed by statistically analyzing the working process of the simulated target, identifying patterns, and using empirical formulas or curve fitting to establish an empirical relationship between characteristic parameters. This simplifies the complex working process of the simulated target into a relationship between a few characteristic parameters. In a one-dimensional simulation model, the simulated target is simplified into a system composed of several zero-dimensional simulation models. The energy transfer of the entire system is characterized by the parameter flow between these zero-dimensional models, thus obtaining the working characteristics of the simulated target at a specific location.
[0003] One-dimensional simulation has been widely applied in the study of temperature distribution in objects. In 2015, Pathuri RB et al. established a one-dimensional / three-dimensional coupled simulation model of a vehicle's powertrain secondary cooling system and compared it with experimental results, successfully verifying the rationality of this one-dimensional / three-dimensional coupled simulation model. In 2017, Sheng Jiawen established a one-dimensional heat transfer model of a truck engine compartment based on STAR-CCM and RADTHERM software, obtaining the temperature distribution of the truck engine compartment under different operating conditions. In 2019, Zhang Hongtao conducted one-dimensional and three-dimensional simulations of an electric vehicle heat pump air conditioning system based on KULI and FLUENT software and improved the performance of the electric vehicle heat exchanger based on the simulation results, thereby enhancing the performance of the electric vehicle heat pump air conditioning system.
[0004] In summary, although one-dimensional simulation of thermophysical properties has been widely used both domestically and internationally, there is still no method to discuss how to improve the simulation efficiency of one-dimensional simulation models. Summary of the Invention
[0005] The purpose of this invention is to provide a distributed computing method for one-dimensional simulation of thermophysical properties based on the BSP model, thereby improving the efficiency of one-dimensional simulation of thermophysical properties.
[0006] The technical solution to achieve the purpose of this invention is: a distributed computing method for one-dimensional simulation of thermophysical properties based on the BSP model, the specific steps of which are as follows:
[0007] Step 1: Establish a computer cluster environment based on the BSP model;
[0008] Step 2: Establish a one-dimensional simulation model of thermophysical properties. The one-dimensional simulation model is composed of zero-dimensional models connected together. The connection is directional, and the connection represents the transfer of data from one zero-dimensional model to another. A zero-dimensional model can only perform calculations after receiving data. Set the duration of the simulation step and the total number of simulation steps. All zero-dimensional models can move to the next simulation step after completing the calculation of the current simulation step, until the simulation ends.
[0009] Step 3: Equivalent the one-dimensional simulation model of thermophysical properties to a directed graph, where the nodes represent zero-dimensional models and the edges represent data connections between zero-dimensional models.
[0010] Step 4: Divide the computational tasks based on the directed graph equivalent to the one-dimensional simulation model of thermophysical properties;
[0011] Step 5: Begin one-dimensional simulation of thermophysical properties, and during the simulation, distribute the computational tasks to other idle computing nodes in the cluster for parallel computation according to the partitioning.
[0012] Step 6: The simulation calculation of the one-dimensional simulation model of thermophysical properties is completed. Then, the parallel performance analysis of the distributed computing method is performed.
[0013] An electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the aforementioned distributed computing method for one-dimensional simulation of thermophysical properties based on the BSP model.
[0014] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the aforementioned distributed computing method for one-dimensional simulation of thermophysical properties based on the BSP model.
[0015] Compared with the prior art, the significant advantages of this invention are: (1) Implementing one-dimensional simulation of thermophysical properties in a distributed cluster allows each user in the cluster to share the computing power of other computing nodes in the cluster when performing simulation, making full use of the computing resources in the cluster; (2) Using distributed computing to implement one-dimensional simulation of thermophysical properties allows the model to be computed in parallel during the simulation process, accelerating the simulation speed of one-dimensional simulation of thermophysical properties. Attached Figure Description
[0016] Figure 1 This is a schematic diagram of the equivalent directed graph of the one-dimensional simulation model in Example 1.
[0017] Figure 2 This is a schematic diagram of the directed graph subgraph partitioning in Example 1.
[0018] Figure 3 This is a schematic diagram of the computational task assignment used in this invention.
[0019] Figure 4 This is a one-dimensional simulation model diagram of Example 2.
[0020] Figure 5 This is a time test curve for distributed parallel computing of the present invention. Detailed Implementation
[0021] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0022] This invention proposes a distributed computing method for one-dimensional simulation of thermophysical properties based on the BSP model. First, a one-dimensional thermophysical property simulation platform is implemented based on QT. The platform implements zero-dimensional models of helicopter components such as fuel tanks, pumps, engines, and rotors. The one-dimensional simulation calculation of the platform adopts the method of this invention, and a distributed cluster is built. The thermophysical property simulation platform is configured in the settlement nodes of the cluster. The specific simulation calculation steps are as follows:
[0023] Step 1: Establish a distributed computer cluster environment to achieve distributed computing for one-dimensional simulation of thermophysical properties; the BSP model mainly consists of three parts:
[0024] 1) Some components consisting of processors and memory, which do not interfere with each other;
[0025] 2) Router, which enables communication between various components and realizes point-to-point message transmission;
[0026] 3) Global clock, used to synchronize the operations of all components or a specific part of them.
[0027] The specific steps are as follows:
[0028] Step 1.1: Set up several computers in the same local area network. These computers are the components in the BSP model. Configure the IP addresses of other computers on each computer and configure the one-dimensional simulation platform using this method on each of these computers.
[0029] Step 1.2: Configure the cluster router. Computers in the cluster can detect other computers via IP addresses and communicate with each other based on the TCP / IP protocol.
[0030] Step 1.3: Set the global clock. During simulation calculations, the simulation step is used as the global clock, meaning all computation nodes are in the same simulation step.
[0031] Step 1.4: Divide the computers in the cluster into two categories: Master and Worker. The Master and Worker communicate with each other using the TCP / IP protocol. The Workers do not communicate with each other. The Master is responsible for assigning the calculation tasks in the one-dimensional simulation to each Worker for calculation. The Workers perform parallel calculations and return the calculation results to the Master.
[0032] In a further embodiment 1, when a user uses a computer in the cluster to perform a one-dimensional simulation of thermophysical properties, the system automatically designates the computer used by that user as the Master and other idle computers in the cluster as Workers.
[0033] Step 2: Establish a one-dimensional simulation model of thermophysical properties. The one-dimensional simulation model is composed of connected zero-dimensional models. The connection is directional, representing the transfer of data from one zero-dimensional model to another. A zero-dimensional model can only perform calculations after receiving data. Set the simulation step size and the total simulation time. Once all zero-dimensional models have completed the calculation for the current simulation step, the simulation can proceed to the next simulation step until the simulation ends.
[0034] Furthermore, this step treats a simulation step as a superstep in the BSP model. In a simulation step, a superstep is considered complete only after all the zero-dimensional models in the one-dimensional simulation model have completed the calculation of the current simulation step, and the simulation enters the next simulation step, that is, the BSP model enters the next superstep.
[0035] In Example 1, a one-dimensional simulation model of the thermophysical characteristics of the helicopter engine subsystem was established, including zero-dimensional models of the fuel tank, pump, engine, rotor and main reducer, and the simulation step size was set to 1 second, with a total simulation step size of 200 steps.
[0036] Step 3: Equivalent the one-dimensional simulation model of thermophysical properties to a directed graph, where the nodes represent zero-dimensional models and the edges represent data connections between zero-dimensional models.
[0037] In a further embodiment 1, the one-dimensional simulation model of the thermophysical characteristics of the helicopter engine subsystem is simplified into a directed graph, where the nodes represent the various zero-dimensional models and the directed edges represent the data transfer between the zero-dimensional models.
[0038] Step 4: Based on the directed graph equivalent to the one-dimensional simulation model of thermophysical properties, divide the computational tasks. The specific steps are as follows:
[0039] Step 4.1 First, the entire one-dimensional simulation model is divided into several independent subgraphs, which are equivalent to a directed graph. Simulation calculations can be performed in parallel between different subgraphs. For example... Figure 2 The directed graph corresponding to the one-dimensional model has five vertices and four edges, and the vertices are connected to each other, so the directed graph is divided into a subgraph.
[0040] Step 4.2 For nodes within the same subgraph, there are also nodes that can be computed in parallel; these nodes are also divided into tasks. Figure 2 In the subgraph, the vertices represent the rotor, main reducer, fuel tank, pump, and engine, respectively. The rotor and main reducer can be distributed and parallelized with the fuel tank and pump, and are divided into different tasks.
[0041] Step 4.3 At the start of each simulation step, one or more zero-dimensional models in each subgraph will begin computation first. These zero-dimensional models constitute the tasks initially defined. In the one-dimensional simulation model of Example 1, as shown... Figure 1 The zero-dimensional models that can be calculated first are the rotor and the fuel tank. These two models are assigned as calculation tasks at the beginning of each simulation step.
[0042] Step 4.4 After the simulation step begins, once a zero-dimensional model has completed its calculation, it transmits data to its successor node, enabling the successor node to also perform calculations. These data-driven zero-dimensional models constitute the computational tasks within a simulation step. In the one-dimensional simulation model of Example 1, as shown... Figure 1 The rotor and fuel tank begin calculations first. After these two tasks are completed, they transmit data to the main reducer and pump respectively, driving the main reducer and pump to perform calculations and form a new calculation task.
[0043] Step 5: Begin one-dimensional simulation of thermophysical properties, and during the simulation, distribute the computational tasks to other idle computing nodes in the cluster for parallel computation according to the partition.
[0044] Furthermore, in Example 1, the specific method for assigning the tasks divided during the calculation process is as follows:
[0045] Step 5.1 as follows Figure 3 The Master distributes computational tasks evenly across currently idle Workers. Once the computation is complete, the Worker returns the results to the Master. The Master then assigns the computational tasks assigned to the Worker, consisting of tasks related to fuel tanks, pumps, rotors, main reducers, or engines, to other idle Workers.
[0046] Step 5.2: After the Worker completes its calculation and returns the result to the Master, it can drive other zero-dimensional models to perform calculations, generating new calculation tasks. These new tasks are then assigned by the Master to the Workers. In this way, as many Workers as possible are constantly engaged in calculations, making full use of the Workers' computing power. After the Worker calculating the rotor completes its calculation task and returns the result to the Master, the main reducer becomes ready for calculation and is assigned a new calculation task. The Master then assigns this new task to an idle Worker in the cluster. Similarly, the completion of the fuel tank's calculation task will drive the pump to perform calculations; the completion of the pump and main reducer's calculations will drive the engine to perform calculations.
[0047] Step 6: After the one-dimensional simulation model of thermophysical properties is completed, the parallel performance analysis of the distributed computing method is performed. The specific formula for calculating the parallel efficiency of the distributed system is as follows:
[0048] Assuming each computation of a zero-dimensional model is denoted as one task, the total computation time can be expressed as follows:
[0049] T all =T calculate +T transfer
[0050] Where T all It is the simulation time, T, of the one-dimensional simulation model of the overall thermophysical properties. caculate T is the time used for zero-dimensional model calculation in the simulation. tranfer This refers to the data transmission time during the simulation.
[0051] Each task is dispatched to a Worker for computation via a distributed system. The time consumption for each task execution includes computation time and communication time, which can be further summarized in the following formula:
[0052] T all =(T sCal +T sTran )*N
[0053] Where T sCal It is the computation time of a single task, T sTran N is the time required for a single communication, and N is the total number of tasks in the simulation.
[0054] In distributed computing, increasing the number of computing nodes does not reduce the number of communication sessions or the communication time. However, increasing the number of computing nodes can increase the number of tasks that can be computed in parallel at the same time, which leads to the following formula:
[0055] T all =T sCal*N / n+T sTran *N
[0056] Where n is the number of Workers in the distributed cluster.
[0057] The parallel speedup and efficiency of distributed parallel computing are defined as follows:
[0058]
[0059] Where T0 is the simulation time of the one-dimensional simulation model of thermophysical properties in a single machine, T n S represents the simulation time of a one-dimensional simulation model of the thermophysical properties in a distributed system; S represents the parallel speedup ratio; and E represents the parallel efficiency.
[0060] To test the parallel and acceleration performance of the distributed computing method for one-dimensional simulation of thermophysical properties based on a distributed architecture in this invention, a method such as... was designed. Figure 4 Example 2 of the one-dimensional simulation model shows that each zero-dimensional model represents an oil tank. Every 15 oil tanks are connected in series to form a link, resulting in 13 links and a total of 195 zero-dimensional models of oil tanks. The simulation step size is set to 0.1s, and the total simulation time is 10s. One-dimensional simulation experiments of this distributed algorithm were conducted on distributed clusters with 2, 3, 4, 5, 6, 7, 8, 10, and 12 Workers, respectively. The simulation times are shown in the table below, and a curve graph is plotted on the table. Figure 5 The horizontal axis represents the number of workers, and the vertical axis represents the simulation time.
[0061]
[0062] Example 1 demonstrates the complete computation flow of the distributed computing method for one-dimensional simulation of thermophysical properties based on a distributed architecture, as described in this invention. Example 2 tests the acceleration performance of the method. Verification shows that this method accelerates the one-dimensional simulation of thermophysical properties.
[0063] The above embodiments are descriptions of specific implementations of the present invention, and not limitations thereof. Those skilled in the art can make various modifications and changes without departing from the spirit and scope of the present invention to obtain corresponding equivalent technical solutions. Therefore, all equivalent technical solutions should be included in the patent protection scope of the present invention.
Claims
1. A distributed computing method for one-dimensional simulation of thermophysical properties based on the BSP model, characterized in that, The method includes the following operations: Step 1: Establish a computer cluster environment based on the BSP model. The specific method is as follows: Step 1.1: Set up several computers in the same local area network. These computers are the components in the BSP model. Configure the IP addresses of other computers for each computer. Step 1.2: Configure the cluster router; Computers in the cluster can detect other computers via IP addresses and communicate with each other based on the TCP / IP protocol. Step 1.3: Set the global clock; during simulation calculations, the simulation step is used as the global clock, meaning all calculation nodes are in the same simulation step; Step 1.4: Divide the computers in the cluster into two categories: Master and Worker. The Master and Worker communicate with each other using the TCP / IP protocol, while the Workers do not communicate with each other. The Master is responsible for assigning the calculation tasks in the one-dimensional simulation to each Worker for calculation; the Workers perform parallel calculations and return the calculation results to the Master. The system automatically divides the computing nodes into Master and Worker types. The computer used by the user is regarded as the Master, that is, there is only one Master in the cluster, and the other nodes in the cluster are regarded as Workers. Step 2: Establish a one-dimensional simulation model of thermophysical properties. The one-dimensional simulation model is composed of zero-dimensional models connected together. The connection is directional, and the connection represents the transfer of data from one zero-dimensional model to another. A zero-dimensional model can only perform calculations after receiving data. Set the duration of the simulation step and the total number of simulation steps. All zero-dimensional models can move to the next simulation step after completing the calculation of the current simulation step, until the simulation ends. Based on the BSP model, the specific method for constructing a one-dimensional simulation model of thermophysical properties is as follows: a simulation step is regarded as a superstep in the BSP model. In a simulation step, all zero-dimensional models in the one-dimensional simulation model have completed the calculation of the current simulation step before the calculation of a superstep is completed, and the simulation enters the next simulation step, that is, the BSP model enters the next superstep. Step 3: Equivalent the one-dimensional simulation model of thermophysical properties to a directed graph, where the nodes represent zero-dimensional models and the edges represent data connections between zero-dimensional models. Step 4: Divide the computational tasks based on the directed graph equivalent to the one-dimensional simulation model of thermophysical properties; Step 4 involves dividing the computational tasks based on the directed graph equivalent to the one-dimensional simulation model of thermophysical properties. The specific method is as follows: Step 4.1: First, the entire one-dimensional simulation model is divided into several independent subgraphs. Simulation calculations can be performed in parallel between different subgraphs. Step 4.2: For nodes in the same subgraph, there are also nodes that can be computed in parallel. These nodes are also divided into tasks. Step 4.3: At the beginning of each simulation step, one or more zero-dimensional models in each subgraph will start calculation first. These zero-dimensional models constitute the tasks initially divided. Step 4.4: After the simulation step begins, once a zero-dimensional model finishes its calculation, it will transmit data to its successor node, enabling the successor node to perform calculations as well. These zero-dimensional models, which are driven by data calculations, constitute the computational tasks in a simulation step. Step 5: Begin one-dimensional simulation of thermophysical properties, and during the simulation, distribute the computational tasks to other idle computing nodes in the cluster for parallel computation according to the partitioning. The tasks that were divided during the calculation process are assigned in the following way: Step 5.1: The Master distributes the computation task evenly to each currently idle Worker for computation. After the computation is completed, the Worker returns the computation result to the Master. Step 5.2: After the Worker completes the calculation, it returns the calculation result to the Master, which can then drive other zero-dimensional models to perform calculations, generating new calculation tasks. These new calculation tasks are then assigned by the Master to the Worker. In this way, as many Workers as possible are kept calculating, making full use of the Worker's computing power. Step 6: The simulation calculation of the one-dimensional simulation model of thermophysical properties is completed, and the parallel performance analysis of the distributed computing method is performed. The parallel efficiency of a distributed system is calculated as follows: Assuming each computation of a zero-dimensional model is denoted as one task, the total computation time during the computation process can be expressed by the following formula: ; in This is the simulation time of the one-dimensional simulation model of the overall thermophysical properties. This refers to the time used for zero-dimensional model computation in the simulation. This refers to the data transmission time during the simulation. Each task is dispatched to a Worker for computation via a distributed system. The time consumption for each task execution includes computation time and communication time, resulting in the following formula: ; in This refers to the computation time of a single task. This is the time required for a single communication. This represents the total number of tasks in the simulation. In distributed computing, increasing the number of computing nodes does not reduce the number of communications or the communication time; however, it does increase the number of tasks that can be computed in parallel at the same time, leading to the following formula: ; in It represents the number of Workers in the distributed cluster; The parallel speedup and efficiency of distributed parallel computing are defined as follows: ; in The simulation time is for a one-dimensional simulation model of the thermophysical properties in a single machine. The simulation time is for a one-dimensional simulation model of the thermophysical properties in a distributed system. For parallel speedup ratio, For parallel efficiency.
2. The distributed computing method for one-dimensional simulation of thermophysical properties based on the BSP model according to claim 1, characterized in that, In step 1, the BSP model consists of three parts: (1) Some components consisting of processors and memory, which do not interfere with each other; (2) Router, which enables communication between various components and realizes point-to-point message transmission; (3) Global clock, which synchronizes the operation of all components or a part of them.
3. An electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the distributed computing method for one-dimensional simulation of thermophysical properties based on the BSP model as described in any one of claims 1-2.
4. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by the processor, the program implements the distributed computing method for one-dimensional simulation of thermophysical properties based on the BSP model as described in any of claims 1-2.
Citation Information
Patent Citations
Task processing method and task processing device
CN111221643A