Search

CN-114297831-B - Distributed computing method for one-dimensional simulation of thermophysical characteristics based on BSP model

CN114297831BCN 114297831 BCN114297831 BCN 114297831BCN-114297831-B

Abstract

The invention discloses a distributed computing method of one-dimensional simulation of thermophysical characteristics based on a BSP model, which comprises the steps of utilizing the condition of sharing computing resources of a distributed cluster, carrying out distributed computation on complex products when carrying out one-dimensional simulation of the thermophysical characteristics, according to the predecessor relation of a zero-dimensional model in the one-dimensional simulation model, equating the one-dimensional simulation model of the products into a directed graph, dividing the simplified directed graph into independent subgraphs, enabling the zero-dimensional models in different subgraphs to have the condition of parallel computation, and distributing the zero-dimensional models with the condition of parallel computation to different computing nodes in the distributed cluster for distributed parallel computation. The invention realizes one-dimensional simulation of the thermal physical characteristics based on the distributed architecture, and improves the simulation speed of the one-dimensional simulation of the thermal physical characteristics.

Inventors

  • LI WEIQING
  • LUO JIAJUN

Assignees

  • 南京理工大学

Dates

Publication Date
20260505
Application Date
20211213

Claims (4)

  1. 1. A distributed computing method for one-dimensional simulation of thermophysical characteristics based on a BSP model, the method comprising the operations of: Step 1, establishing a computer cluster environment based on a BSP model, wherein the specific method comprises the following steps: step 1.1, constructing a plurality of computers in the same local area network, wherein the computers are components in a BSP model, and configuring IP addresses of other computers for each computer; step 1.2, setting a cluster router, wherein computers in the cluster sense other computers through IP and communicate with each other based on TCP/IP protocol; Step 1.3, setting a global clock, wherein when simulation calculation is performed, a simulation step is used as the global clock, namely all calculation nodes are in the same simulation step; step 1.4, dividing computers in the cluster into two types, namely a Master and a workbench, wherein the Master and the workbench are communicated by adopting a TCP/IP protocol, the workbench are not communicated with each other, and the Master is responsible for distributing calculation tasks in one-dimensional simulation to each workbench for calculation; The two computing nodes of the Master and the workbench are automatically divided by the system, a computer used by a user is regarded as the Master, namely, only one Master exists in the cluster, and other nodes in the cluster are regarded as the workbench; Step 2, establishing a one-dimensional simulation model with thermal physical characteristics, wherein the one-dimensional simulation model is formed by connecting zero-dimensional models, the connection has directivity, the connection represents that data can be transmitted from one zero-dimensional model to another zero-dimensional model, and the calculation can be performed after the data is received by one zero-dimensional model; Taking a simulation step as an superstep in the BSP model, wherein in the simulation step, after all zero-dimensional models in the one-dimensional simulation model complete the calculation of the current simulation step, the calculation of the superstep is completed, and the simulation enters the next simulation step, namely the BSP model enters the next superstep; Step 3, the one-dimensional simulation model of the thermophysical characteristic is equivalent to a directed graph, nodes in the graph represent zero-dimensional models, and edges in the graph represent data connection between the zero-dimensional models; In the step 4, the calculation tasks are divided based on the equivalent directed graph of the one-dimensional simulation model of the thermophysical property, and the specific method is as follows: Step 4.1, firstly dividing an equivalent directed graph of the whole one-dimensional simulation model into a plurality of sub-graphs which are not related to each other, and carrying out simulation calculation on each sub-graph in parallel among different sub-graphs; step 4.2, for the nodes in the same sub-graph, there are also nodes which can be calculated in parallel, and the nodes are also divided into tasks; Step 4.3, when each simulation step of the simulation is started, one or more zero-dimensional models in each sub-graph are calculated at first, and the zero-dimensional models form tasks which are divided at first; Step 4.4, after the simulation step length starts, transmitting data to a subsequent node after the calculation of a zero-dimensional model is finished, so that the subsequent node can also calculate, and the zero-dimensional model which is calculated by data driving forms a calculation task in the simulation step process; Step 5, starting one-dimensional simulation of the thermophysical characteristics, and distributing calculation tasks to other idle calculation nodes in the cluster according to division in the simulation process to perform parallel calculation; The method for assigning the divided tasks in the calculation process comprises the following specific steps: Step 5.1, uniformly distributing the calculation tasks to each currently idle workbench through a Master for calculation, and returning calculation results to the Master by the workbench after the calculation is completed; Step 5.2, woker, after finishing the calculation, returning the calculation result to the Master and pushing other zero-dimensional models to calculate, so as to generate a new calculation task, and assigning the new calculation task to the Worker by the Master, wherein in such a way, as much as possible Woker is always calculated, and the calculation capability of the Worker is fully utilized; Step 6, performing parallel performance analysis of the distributed computing method after the simulation computation of the one-dimensional simulation model of the thermal physical characteristics is finished; Calculating the parallel efficiency of the distributed system, which is specifically as follows: assuming that one calculation per zero-dimensional model is written as a task, the total calculation time is expressed in the calculation process as: ; Wherein the method comprises the steps of Is the simulation time of the one-dimensional simulation model of the total thermophysical characteristic, Is the time in the simulation for the zero-dimensional model calculation, Is the data transmission time in the simulation; Each task is calculated by assigning the distributed system to the Worker, and the time generated by each execution of the task consumes the calculation time and the communication time, so that the following formula is obtained: ; Wherein the method comprises the steps of Is the computation time of a single task, Is the time required for a single communication, Is the total amount of tasks in the simulation; when distributed computation is performed, the number of communication times and communication time cannot be reduced due to the increase of computation nodes, and the number of tasks of parallel computation at the same time can be increased due to the increase of the computation nodes, so that the following formula is obtained: ; Wherein the method comprises the steps of Is the number of workers in the distributed cluster; The parallel speed-up ratio and the efficiency of the distributed parallel computing are defined as follows: ; Wherein the method comprises the steps of The simulation time of the one-dimensional simulation model of the thermophysical property in the single machine, The simulation time of the one-dimensional simulation model for the thermophysical characteristics in the distributed system; For a parallel speed-up ratio, Is parallel efficiency.
  2. 2. The distributed computing method of one-dimensional simulation of thermophysical characteristics based on a BSP model according to claim 1, wherein in step 1, the BSP model is composed of three parts: (1) Some components composed of a processor and a memory, the components are not interfered with each other; (2) The router completes the mutual communication of each component and realizes the point-to-point message transmission; (3) And the global clock is used for carrying out operation synchronization on all components or a certain part of the components.
  3. 3. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements a distributed computing method for one-dimensional simulation of thermophysical properties based on a BSP model as claimed in any of claims 1-2 when executing the program.
  4. 4. A computer readable storage medium having stored thereon a computer program, which when executed by a processor implements a distributed computing method of one-dimensional simulation of thermophysical properties based on a BSP model as claimed in any of claims 1-2.

Description

Distributed computing method for one-dimensional simulation of thermophysical characteristics based on BSP model Technical Field The invention relates to the field of distribution, in particular to a distributed computing method for one-dimensional simulation of thermophysical characteristics based on a BSP model. Background The one-dimensional simulation method is one of common methods for thermal physical property simulation, and can be regarded as a simulation model based on further development of a zero-dimensional simulation model. The zero-dimensional simulation Model is also called a Single-Zone Model (Single-Zone Model). The method is characterized in that regularity is found out through statistical analysis of a working process of a simulation target, an empirical relation formula for expressing characteristic parameters is established by using an empirical formula or curve fitting method, and the complex working process of the simulation target is simplified and expressed into a relation among a plurality of characteristic parameters. In the one-dimensional simulation model, the simulation target is simplified into a system consisting of a plurality of zero-dimensional simulation models, and the energy transmission condition of the whole system is carved through parameter flow among the zero-dimensional models, so that the working characteristics of the simulation target at a specific position are obtained. One-dimensional simulation is widely applied to the research of object temperature distribution. In 2015, pathuri RB et al established a one-dimensional/three-dimensional coupling simulation model of the automobile power sub-cooling system, and compared the experimental results to test the model, successfully verified the rationality of the one-dimensional/three-dimensional coupling simulation model. In 2017, cheng Jiawen established a one-dimensional heat transfer model of the truck engine compartment based on STAR-CCM and RADTHERM software to obtain the temperature distribution of the truck engine compartment under different working conditions. In 2019, zhang Hongtao performs one-dimensional and three-dimensional simulation on the heat pump air conditioning system of the electric automobile based on KULI and FLUENT software, improves the performance of the heat exchanger of the electric automobile according to simulation results, and improves the performance of the heat pump air conditioning system of the electric automobile. In summary, although the one-dimensional simulation of the thermophysical characteristics at home and abroad has been widely applied, no method has been discussed so far for improving the simulation efficiency of the calculation of the one-dimensional simulation model. Disclosure of Invention The invention aims to provide a distributed computing method for one-dimensional simulation of thermal physical characteristics based on a BSP model, which improves the efficiency of the one-dimensional simulation of the thermal physical characteristics. The technical scheme for realizing the purpose of the invention is that the distributed computing method for one-dimensional simulation of the thermophysical characteristics based on the BSP model comprises the following specific steps: Step 1, establishing a computer cluster environment based on a BSP model; Step 2, establishing a one-dimensional simulation model with thermal physical characteristics, wherein the one-dimensional simulation model is formed by connecting zero-dimensional models, the connection has directivity, the connection represents that data can be transmitted from one zero-dimensional model to another zero-dimensional model, and the calculation can be performed after the data is received by one zero-dimensional model; Step 3, the one-dimensional simulation model of the thermophysical characteristic is equivalent to a directed graph, nodes in the graph represent zero-dimensional models, and edges in the graph represent data connection between the zero-dimensional models; step 4, dividing calculation tasks based on the equivalent directed graph of the one-dimensional simulation model with the thermophysical characteristics; Step 5, starting one-dimensional simulation of the thermophysical characteristics, and distributing calculation tasks to other idle calculation nodes in the cluster according to division in the simulation process to perform parallel calculation; And 6, finishing the simulation calculation of the one-dimensional simulation model of the thermal physical characteristics, and performing parallel performance analysis of the distributed calculation method. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the above-described distributed computing method based on one-dimensional simulation of the thermophysical properties of the BSP model when executing the program. A computer readable storage m