Compressible flow simulation method and device, computer equipment and storage medium

By arranging multi-core structures in the chip architecture and dividing data blocks for parallel computing, the resource waste and inefficiency problems of compressible flow fluid simulation calculation in the prior art are solved, and more efficient calculation rate and resource utilization are achieved.

CN119670622APending Publication Date: 2025-03-21SHANGHAI SMARTLOGIC TECHNOLOGY LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411750428.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-29
Publication Date
2025-03-21

AI Technical Summary

Technical Problem

The prior art is difficult to effectively simulate compressible flow fluids, resulting in heavy computing tasks, huge data volume and complex computing process, and the inability to fully utilize the resources of the chip system structure, resulting in waste of resources and inefficiency.

Method used

By arranging the multi-core structure of the target chip architecture into a preset two-dimensional structure, dividing compressible flow fluid data into multiple data blocks, and performing parallel simulation calculations in multiple operation cores, data transmission is used to transmit data between operation cores, reducing the complexity of intermediate transmission.

Benefits of technology

Parallel simulation calculations in multiple operation cores are realized, the calculation process is accelerated, the calculation rate and efficiency are improved, and the resources of the chip system structure are fully utilized.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119670622A_ABST
    Figure CN119670622A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a compressible flow simulation method and device, computer equipment and a storage medium, and the method comprises the steps: arranging a multi-core structure of a target chip architecture into a preset two-dimensional structure, and obtaining a plurality of operation cores of the target chip architecture; dividing preset compressible flowing fluid data into a plurality of data blocks, and inputting the divided data blocks into each operation core; in each operation core, fluid parameters at the moment n + 1 in the data with the number k are determined according to the fluid parameters at the moment n in the data with the number k, n is an iteration time step, and the value ranges from 0 to a preset value; an analog calculation result of the target chip architecture on the preset compressible flow is determined according to the fluid parameters at the n + 1 moment under the condition that n is a preset value in all the operation cores, parallel calculation of the multiple operation cores and data transmission among the operation cores are achieved through the multiple operation cores of the target chip architecture, the complexity of intermediate transmission is reduced, and the data transmission efficiency is improved. And the calculation efficiency 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 flow simulation, and in particular, to a method, apparatus, computer device and storage medium for simulating compressible flow. Background Art

[0002] Compressible flow is a flow of gas in which the density varies significantly. Although all gas flows are compressible, when the Mach number (the ratio of the flow velocity to the speed of sound) is less than 0.3, the density variation due to velocity is usually less than 5%, and the flow is considered incompressible.

[0003] The central object of the lattice Boltzmann method is the particle distribution function f(x, t, e), which corresponds to the probability of finding a particle at a given position x with a given velocity e. In the two-dimensional case, the lattice arrangements commonly used in the lattice Boltzmann method are D2Q5 (D2Q5 is a lattice Boltzmann model. The D2Q5 model indicates that in two-dimensional space, fluid particles have five discrete velocity directions) and D2Q9 (D2Q9 is a lattice Boltzmann model. The basic principle of the D2Q9 model is to discretize the fluid into a lattice, place a certain number of molecules on each lattice, and calculate the macroscopic physical quantities (such as velocity, temperature, etc.) and microscopic physical quantities (such as molecular velocity distribution function) of the fluid by tracking the movement and collision process of the molecules. The schematic diagram of the discrete velocity e of the D2Q9 lattice Boltzmann model is shown in the figure below. Figure 1 As shown. The magnitude of the discrete velocity e of the D2Q9 lattice Boltzmann model is:

[0004]

[0005] At present, the simulation calculation of compressible flow fluid is a serious challenge in the industry because of its heavy computational tasks, huge data volume and complex calculation process.

[0006] In the related art, microprocessors and x86 architecture processor systems have been used to accelerate the calculation of the simulation of compressible flow fluids, but this method cannot be well applied to the chip system structure, so that the simulation calculation process of the compressible flow fluid cannot fully utilize the resources of the chip system structure, resulting in resource waste and inefficiency. Summary of the invention

[0007] The embodiments of the present application provide a compressible flow simulation method, apparatus, device and storage medium.

[0008] A first aspect of an embodiment of the present application provides a compressible flow simulation method, comprising:

[0009] Arranging a multi-core structure of a target chip architecture into a preset two-dimensional structure to obtain a plurality of computing cores of the target chip architecture;

[0010] According to the number of computing cores of the target chip architecture, the preset compressible flow fluid data is divided into a plurality of data blocks, and the divided data blocks are input into each computing core, wherein the preset compressible flow fluid data includes a fluid flow simulation model;

[0011] In each operation core, the fluid density, fluid velocity vector, pressure, dimensionless temperature and entropy value at time n+1 in the data numbered k are determined according to the fluid density, fluid velocity vector, pressure, dimensionless temperature and entropy value at time n in the data numbered k, where n is the iteration time step, and the value ranges from 0 to a preset value;

[0012] The simulation calculation results of the target chip architecture for the preset compressible flow are determined based on the fluid density, fluid velocity vector, pressure, dimensionless temperature and entropy value at time n+1 when n is the preset value in all computing cores.

[0013] In an optional embodiment of the present application, the fluid flow simulation model is a lattice Boltzmann model, and the multi-core structure of the target chip architecture is arranged into a preset two-dimensional structure to obtain multiple computing cores of the target chip architecture, including:

[0014] When the target chip architecture is a single-chip architecture, the single chip is divided into a plurality of computing cores, and the computing cores are arranged into a preset two-dimensional structure;

[0015] When the target chip architecture is a multiple chip architecture, the multiple chips are arranged into a preset two-dimensional structure, and the computing cores of each chip in the multiple chips are arranged into a preset two-dimensional structure, wherein the preset two-dimensional structure is a two-dimensional structure corresponding to the velocity direction in the two-dimensional space of the lattice Boltzmann model.

[0016] In an optional embodiment of the present application, according to the number of computing cores of the target chip architecture, the preset compressible flow fluid data is divided into a plurality of data blocks, and the divided data blocks are input into each computing core, including:

[0017] Evenly distribute the preset compressible flow fluid data to each chip in the target chip architecture;

[0018] For the preset compressible flow fluid data in each chip, the preset compressible flow fluid data in the current chip is evenly distributed to each computing core of the current chip, wherein the preset compressible flow fluid data distributed in each computing core is regarded as a data block.

[0019] In an optional embodiment of the present application, each computing core includes a first area and a second area, and the method further includes:

[0020] For the data blocks in each operation core, the number of operations required to process the data blocks of the current operation core is determined according to the amount of operations of the current operation core each time;

[0021] Dividing the data block of the current operation core according to the number of operations, and numbering the divided data, wherein the numbers are 0 to m, and m is a value less than the number of operations by 1;

[0022] For the numbered data in the current operation core, when the data numbered k is calculated in the first area, the data numbered k+1 is read into the second area; when the calculation result of the data numbered k is transmitted in the first area, the data numbered k+1 is calculated in the second area; when the calculation result of the data numbered k+1 is transmitted in the second area, the data numbered k+2 is read into the first area, where k takes a value from 0 to m-2.

[0023] In an optional embodiment of the present application, the data numbered k is calculated, including:

[0024] Based on the first preset algorithm, the fluid density and fluid velocity vector at time n+1 in the data numbered k are determined according to the fluid density, fluid velocity vector, pressure, dimensionless temperature and entropy value at time n in the data numbered k; based on the second preset algorithm, the dimensionless temperature, entropy value and pressure at time n+1 in the data numbered k are determined according to the fluid density, fluid velocity vector, pressure, dimensionless temperature and entropy value at time n in the data numbered k, wherein n is the iteration time step, ranging from 0 to a preset value, and the first preset algorithm is different from the second preset algorithm.

[0025] In an optional embodiment of the present application, the first preset algorithm is a lattice Boltzmann method, which determines the fluid density and fluid velocity vector at time n+1 in the data numbered k according to the fluid density, fluid velocity vector, pressure, dimensionless temperature and entropy value at time n in the data numbered k, including:

[0026] Determine the equilibrium distribution function and correction term of the data numbered k and the mixed recursive regularized non-equilibrium moment according to the fluid density, fluid velocity vector, pressure and dimensionless temperature at time n in the data numbered k;

[0027] Determine the distribution function of the data numbered k at time n+1 according to the equilibrium distribution function and correction term of the data numbered k and the mixed recursive regularized non-equilibrium moment;

[0028] The density and fluid velocity vector at the time n+1 in the data numbered k are determined according to the distribution function at the time n+1 in the data numbered k.

[0029] In an optional embodiment of the present application, the second preset algorithm is a finite volume method, which determines the dimensionless temperature, entropy value and pressure at time n+1 in the data numbered k according to the fluid density, fluid velocity vector, pressure, dimensionless temperature and entropy value at time n in the data numbered k, including:

[0030] Determine the entropy value of the data numbered k at time n according to the fluid density and fluid velocity vector at time n in the data numbered k;

[0031] Determine the dimensionless temperature and entropy value at time n+1 according to the fluid density at time n+1 in the data numbered k;

[0032] The pressure at time n+1 is determined based on the fluid density and dimensionless temperature at time n+1 in the data numbered k.

[0033] A second aspect of the embodiments of the present application provides a compressible flow simulation device, comprising:

[0034] An arrangement module, used to arrange the multi-core structure of the target chip architecture into a preset two-dimensional structure to obtain multiple computing cores of the target chip architecture;

[0035] a partitioning module, for partitioning the preset compressible flow fluid data into a plurality of data blocks according to the number of computing cores of the target chip architecture, and inputting the partitioned data blocks into each computing core, wherein the preset compressible flow fluid data includes a fluid flow simulation model;

[0036] A calculation module, used for determining, in each calculation core, the fluid density, fluid velocity vector, pressure, dimensionless temperature and entropy value at time n+1 in the data numbered k according to the fluid density, fluid velocity vector, pressure, dimensionless temperature and entropy value at time n in the data numbered k, wherein n is an iteration time step, and the value ranges from 0 to a preset value;

[0037] The determination module is used to determine the simulation calculation results of the target chip architecture for the preset compressible flow according to the fluid density, fluid velocity vector, pressure, dimensionless temperature and entropy value at the n+1 moment when n is the preset value in all computing cores.

[0038] According to a third aspect of an embodiment of the present application, a computer device is provided, including: a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of any of the above compressible flow simulation methods are implemented.

[0039] A fourth aspect of an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of any of the above methods for simulating compressible flow.

[0040] The above technical solution provided by the embodiment of the present application has at least some or all of the following advantages compared with the prior art:

[0041] The compressible flow simulation method described in the embodiment of the present application arranges the multi-core structure of the target chip architecture into a preset two-dimensional structure to obtain multiple computing cores of the target chip architecture; divides the preset compressible flow fluid data into multiple data blocks according to the number of computing cores of the target chip architecture, and inputs the divided data blocks into each computing core, wherein the preset compressible flow fluid data includes a fluid flow simulation model; in each computing core, the fluid density, fluid velocity vector, pressure, dimensionless temperature and entropy value at the time n in the data numbered k are determined; quantity, pressure, dimensionless temperature and entropy value, wherein n is the iteration time step, ranging from 0 to a preset value; according to the fluid density, fluid velocity vector, pressure, dimensionless temperature and entropy value at the n+1 moment when n is the preset value in all computing cores, the simulation calculation result of the target chip architecture for the preset compressible flow can be determined, and the multi-core structure of the chip architecture can be arranged, and the preset compressible flow fluid data can be divided and the divided data blocks can be input into each computing core, so as to realize parallel simulation calculation in multiple computing cores, accelerate the calculation process, transmit data between computing cores, reduce the complexity of intermediate transmission, and improve the calculation rate and efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0043] Figure 1 A schematic diagram of discrete velocity of a lattice Boltzmann D2Q9 model provided for one embodiment of the present application;

[0044] Figure 2 A flow chart of a method for simulating compressible flow provided by one embodiment of the present application;

[0045] Figure 3 A schematic diagram of the logic distribution of a single-chip computing core provided by an embodiment of the present application;

[0046] Figure 4 A schematic diagram of the logic distribution of a multi-chip computing core provided by an embodiment of the present application;

[0047] Figure 5 A schematic diagram of solving the D2Q9 model in a single-chip architecture provided in one embodiment of the present application;

[0048] Figure 6 A schematic diagram of solving the D2Q9 model in a multi-chip architecture provided in one embodiment of the present application;

[0049] Figure 7 A flow chart of solving a hybrid recursive regularized D2Q9 model provided in one embodiment of the present application;

[0050] Figure 8 A schematic diagram of a device structure provided for an embodiment of the present application;

[0051] Fig. 9 A schematic diagram of the computer device structure provided for one embodiment of the present application. DETAILED DESCRIPTION

[0052] In the process of implementing the present application, the inventors found that the current compressible flow fluid simulation calculation has heavy computational tasks, huge amounts of data and complex computational processes.

[0053] In response to the above problems, an embodiment of the present application provides a compressible flow simulation method, apparatus, computer device and storage medium. By arranging the multi-core structure of the chip architecture, the preset compressible flow fluid data is divided and the divided data blocks are input into each computing core, so as to realize parallel simulation calculation on multiple computing cores, accelerate the calculation process, and transmit data between computing cores, thereby reducing the complexity of intermediate transmission and improving the calculation rate and efficiency.

[0054] The solutions in the embodiments of the present application can be implemented using various computer languages, for example, the object-oriented programming language Java and the interpreted scripting language JavaScript.

[0055] In order to make the technical solutions and advantages in the embodiments of the present application more clearly understood, the exemplary embodiments of the present application are further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than an exhaustive list of all the embodiments. It should be noted that the embodiments in the present application and the features in the embodiments can be combined with each other without conflict.

[0056] See also Figure 2 A compressible flow simulation method provided in an embodiment of the present application includes the following steps 100 to 400:

[0057] Step 100: Arrange the multi-core structure of the target chip architecture into a preset two-dimensional structure to obtain multiple computing cores of the target chip architecture;

[0058] Step 200: Divide the preset compressible flow fluid data into a plurality of data blocks according to the number of computing cores of the target chip architecture, and input the divided data blocks into each computing core, wherein the preset compressible flow fluid data includes a fluid flow simulation model;

[0059] Step 300, in each operation core, determine the fluid density, fluid velocity vector, pressure, dimensionless temperature and entropy value at time n+1 in the data numbered k according to the fluid density, fluid velocity vector, pressure, dimensionless temperature and entropy value at time n in the data numbered k, where n is the iteration time step, and the value ranges from 0 to a preset value;

[0060] Step 400, determining the simulation calculation result of the target chip architecture for the preset compressible flow according to the fluid density, fluid velocity vector, pressure, dimensionless temperature and entropy value at time n+1 when n is the preset value in all computing cores.

[0061] In an optional embodiment of the present application, in step 200, the fluid flow simulation model may be a D2Q5 or D2Q9 lattice Boltzmann model.

[0062] In an optional embodiment of the present application, the fluid flow simulation model is a D2Q9 lattice Boltzmann model, and the preset two-dimensional structure is 3×3. The preset compressible flow fluid data is divided into 3×3×N data blocks, N is the number of chips, 3×3×N is the number of data blocks, and also the number of computing cores, and one data block is input into each computing core.

[0063] The compressible flow simulation method of the present application arranges the multi-core structure of the chip architecture, divides the preset compressible flow fluid data and inputs the divided data blocks into each computing core, realizes parallel simulation calculations on multiple computing cores, accelerates the calculation process, and transmits data between computing cores, thereby reducing the complexity of intermediate transmission and improving the calculation rate and efficiency.

[0064] In an optional embodiment of the present application, the fluid flow simulation model is a lattice Boltzmann model. In step 100, the multi-core structure of the target chip architecture is arranged into a preset two-dimensional structure to obtain multiple computing cores of the target chip architecture, including:

[0065] When the target chip architecture is a single-chip architecture, the single chip is divided into a plurality of computing cores, and the computing cores are arranged into a preset two-dimensional structure;

[0066] When the target chip architecture is a multiple chip architecture, the multiple chips are arranged into a preset two-dimensional structure, and the computing cores of each chip in the multiple chips are arranged into a preset two-dimensional structure, wherein the preset two-dimensional structure is a two-dimensional structure corresponding to the velocity direction in the two-dimensional space of the lattice Boltzmann model.

[0067] See also Figure 3 , when the fluid flow simulation model is the D2Q9 lattice Boltzmann model and the preset two-dimensional structure is 3×3, the computing cores of the single-chip architecture are arranged in a 3×3 structure, see Figure 4 , multiple chips in multiple chip architectures are arranged in a 3×3 structure, and the computing cores of each chip architecture are arranged in a 3×3 structure.

[0068] The compressible flow simulation method of the present application arranges the computing cores of the single-chip architecture into a 3×3 structure, which can adapt to Q9 in the D2Q9 model. Q9 is a 3x3 structure. Multiple chips and the computing cores of each chip are arranged in a 3x3 logical space. During data transmission, each computing core can achieve a relatively similar data transmission relationship, and try to make the transmission time of each computing core the same, which is convenient for the drainage of the entire structure.

[0069] In the simulation method of compressible flow of the present application, multiple chips in the multiple chip architectures are arranged in a 3×3 structure, and the computing cores of each chip architecture are arranged in a 3×3 structure, which can ensure that the computing and transmission amounts of each chip are approximately equal, so as to achieve the purpose of the entire architecture advancing and retreating together, so that all the computing cores can run together better, and there will not be too many computing / transmission vacancy periods within a certain time period.

[0070] In an optional embodiment of the present application, in step 200, the preset compressible flow fluid data is divided into a plurality of data blocks according to the number of computing cores of the target chip architecture, and the divided data blocks are input into each computing core, including:

[0071] Evenly distribute the preset compressible flow fluid data to each chip in the target chip architecture;

[0072] For the preset compressible flow fluid data in each chip, the preset compressible flow fluid data in the current chip is evenly distributed to each computing core of the current chip, wherein the preset compressible flow fluid data distributed in each computing core is regarded as a data block.

[0073] The compressible flow simulation method of the present application evenly distributes the preset compressible flow fluid data to each chip of the target chip architecture, and evenly distributes the preset compressible flow fluid data in the current chip to each computing core of the current chip, which can evenly distribute the transmission bandwidth and data volume.

[0074] In an optional embodiment of the present application, each computing core includes a first area and a second area, and the method further includes:

[0075] For the data blocks in each operation core, the number of operations required to process the data blocks of the current operation core is determined according to the amount of operations of the current operation core each time;

[0076] Dividing the data block of the current operation core according to the number of operations, and numbering the divided data, wherein the numbers are 0 to m, and m is a value less than the number of operations by 1;

[0077] For the numbered data in the current operation core, when the data numbered k is calculated in the first area, the data numbered k+1 is read into the second area; when the calculation result of the data numbered k is transmitted in the first area, the data numbered k+1 is calculated in the second area; when the calculation result of the data numbered k+1 is transmitted in the second area, the data numbered k+2 is read into the first area, where k takes a value from 0 to m-2.

[0078] In an optional embodiment of the present application, the first area and the second area may be Ping / Pang areas (Ping / Pang areas are buffer areas in the chip for temporarily storing data), which are referred to as first-in-first-out queues with a depth of 2 in computer software systems. The Ping / Pang areas are both independent spaces for storing input and output data. The two areas are independent of each other and do not affect each other. In order to achieve parallelism of transmission and calculation, when calculating the data in the ping area, the data to be calculated can be written to the pang area at the same time; when calculating the data in the pang area, the data to be calculated can be written to the ping area at the same time, and so on. The two cache areas are used in sequence to mask the volatility of calculation and the volatility of transmission.

[0079] See also Figure 5 ,For the single-chip architecture, communication is performed between different ,computing cores after processing the data of each data block of the current ,computing core.

[0080] See also Figure 6 ,For multiple chip architectures, after processing the data of each data block of the current ,computing core, in addition to communicating between different ,computing cores, communication is also performed between different chips.

[0081] See also Figure 4If the number of grid points of the D2Q9 model of a system is 180*180, then according to the number of Socs (chips) calculated here, each SOC needs to calculate 60*60 grid points on average, and each computing core needs to calculate 20*20 grid points. Assuming that each computing core can only calculate 5*5 grid points at a time, for each computing core, 4*4=16 calculations are required to process 20*20 grid points. These 16 calculations are numbered 0~15. For each computing core, the first step is to read the data numbered 0 from the memory to the ping area. The second step is to calculate the data numbered 0. When calculating the data numbered 0, the data numbered 1 can be read from the memory to the pang area at the same time. The third step is to transmit the calculation result of numbered 0, and at the same time calculate the data numbered 1 and read the data numbered 2 from the memory. By analogy, a parallel pipeline operation is formed, which can fully parallelize the three steps of reading data, calculating data, and transmitting data, so as to achieve the purpose of fully utilizing resources.

[0082] The compressible flow simulation method of the present application uses Ping / Pang areas in sequence. After the computing core calculates the data of one area, it can immediately start calculating the data of the next area. In this way, during the entire calculation process, the computing core always has data to be calculated, and the resources of the computing core can be fully utilized.

[0083] In an optional embodiment of the present application, the data numbered k is calculated, including:

[0084] Based on the first preset algorithm, the fluid density and fluid velocity vector at time n+1 in the data numbered k are determined according to the fluid density, fluid velocity vector, pressure, dimensionless temperature and entropy value at time n in the data numbered k; based on the second preset algorithm, the dimensionless temperature, entropy value and pressure at time n+1 in the data numbered k are determined according to the fluid density, fluid velocity vector, pressure, dimensionless temperature and entropy value at time n in the data numbered k, wherein n is the iteration time step, ranging from 0 to a preset value, and the first preset algorithm is different from the second preset algorithm.

[0085] In an optional embodiment of the present application, the first preset algorithm is the lattice Boltzmann method, and the second preset algorithm is the finite volume method, which is based on the compressible Navier-Stokes equations of conservation of mass and momentum (the compressible Navier-Stokes equations are a set of differential equations describing the motion of viscous, compressible fluids) and the non-conservative form of the entropy equation to solve the fluid density, fluid velocity vector, pressure, dimensionless temperature and entropy value of the data numbered k in the D2Q9 model at time n+1.

[0086] The compressible flow simulation method of the present application, through the coupling between the lattice Boltzmann method and the finite volume method of compressible flow, solves the fluid density, fluid velocity vector, pressure, dimensionless temperature and entropy value at time n+1 according to the fluid density, fluid velocity vector, pressure, dimensionless temperature and entropy value of the data numbered k in the D2Q9 model at time n, and can accurately calculate the fluid parameters corresponding to each numbered data.

[0087] In an optional embodiment of the present application, the compressible Navier-Stokes equation for mass conservation is as follows:

[0088]

[0089] The compressible Navier-Stokes equations for conservation of momentum are given by:

[0090]

[0091] The non-conservative form of the entropy equation is as follows:

[0092]

[0093] Among them, ρ is gas density, p is pressure, u is velocity, s is entropy, T is temperature, x is position, t is time, λ is thermal conductivity, α and β are both Einstein summation symbols, α and β can take x, y, z coordinates respectively, is the viscous dissipation term, and the viscous stress Π αβ The expression is as follows:

[0094]

[0095] where μ is the fluid dynamic viscosity; in two dimensions, γ is the specific heat ratio, in the case of ideal gas, γ = 1.4; δ αβ is the Krone product symbol.

[0096] Among them, the thermodynamic closed equation is as follows:

[0097]

[0098] Among them, c v is the constant volume specific heat capacity, γ is the specific heat ratio, under ideal gas conditions R is the ideal gas constant; θ is the dimensionless temperature, T0 is the reference temperature.

[0099] See also Figure 7The first preset algorithm is the lattice Boltzmann method, which determines the fluid density and fluid velocity vector at time n+1 in the data numbered k according to the fluid density, fluid velocity vector, pressure, dimensionless temperature and entropy value at time n in the data numbered k, including:

[0100] Determine the equilibrium distribution function and correction term of the data numbered k and the mixed recursive regularized non-equilibrium moment according to the fluid density, fluid velocity vector, pressure and dimensionless temperature at time n in the data numbered k;

[0101] Determine the distribution function of the data numbered k at time n+1 according to the equilibrium distribution function and correction term of the data numbered k and the mixed recursive regularized non-equilibrium moment;

[0102] The density and fluid velocity vector at the time n+1 in the data numbered k are determined according to the distribution function at the time n+1 in the data numbered k.

[0103] In an optional embodiment of the present application, the expression of the equilibrium distribution function is as follows:

[0104]

[0105] Among them, f i eq,9 is the equilibrium distribution function, ω i is the weight coefficient, i ranges from 0 to 8, and the second-order Hermite polynomial Second-order coefficients of the Hermite polynomial Dimensionless temperature satisfy Given the ideal gas state equation, c s is the lattice sound speed, Among them, T is the real temperature, T0 is the reference temperature, and the time step and grid spacing formula are:

[0106] The thermodynamic closed equation under the grid unit is:

[0107]

[0108] By Mayer's relation Get the dimensionless specific heat capacity at constant volume and specific heat capacity at constant pressure in grid units:

[0109]

[0110] In the mixed recursive model of compressible flow, the regularization term of the D2Q9 model is:

[0111]

[0112] in, is the regularization term of the D2Q9 model,

[0113]

[0114]

[0115] γ is the specific heat ratio, is the dimensionless relaxation time, and are all third-order Hermite polynomials, and are the coefficients of the third-order Hermite polynomial, is a second-order Hermite polynomial.

[0116] There are three methods for calculating the numerical gradient operator, namely the second-order isotropic central difference scheme, the classical central difference scheme and the upwind scheme, which are expressed as follows:

[0117]

[0118]

[0119]

[0120] in, is the numerical gradient, for, for, for, for, for, for, for, for. is the discrete velocity of the particle, where i = 0 to 8, a total of 9 directions, is the variable for differentiating the velocity u, is the entropy value at the grid center i, is the entropy value of the grid center i-1 to the left of the grid center i, is the entropy value of the right boundary of the grid center i, is the entropy value of the second grid center i-1 to the left of grid center i.

[0121] Correction term Ψ of D2Q9 model i The expression is as follows:

[0122]

[0123] in, is the value of x in both spatial directions in the second-order Hermite polynomial, The second-order Hermite polynomial takes the value of y in both spatial directions. x is the macroscopic velocity in the x direction, u y is the macroscopic velocity in the y direction.

[0124] The collision process expression is as follows:

[0125]

[0126] The migration process expression is as follows:

[0127] f i (x α +c iα , t+δ t )=f i ′(x α , t)

[0128] Among them, f i ′ is the distribution function after collision, is the dimensionless relaxation time, μ is the dynamic viscosity, p is the pressure, δ t is the time step, represents the mixed recursive regularization term, where the non-equilibrium distribution function Ψ i For correction items.

[0129] The expressions for macroscopic density and velocity are as follows:

[0130] ρ=∑ i f i

[0131]

[0132] Among them, f i is the density distribution function of different discrete velocity directions, c ia is the value of the x and y directions of the discrete speed in different directions (there are 9 discrete speed directions in total, and the discrete speed in each direction has two components, x and y. i takes values ​​from 0 to 8, and a represents the two directions of x and y.

[0133] The compressible flow simulation method of the present application simulates the collision and migration process of the fluid in the D2Q9 model through the lattice Boltzmann method to obtain the density and fluid velocity vector at the next moment after the fluid collision and migration at the current moment.

[0134] See also Figure 7 The second preset algorithm is the finite volume method, which determines the dimensionless temperature, entropy value and pressure at time n+1 in the data numbered k according to the fluid density, fluid velocity vector, pressure, dimensionless temperature and entropy value at time n in the data numbered k, including:

[0135] Determine the entropy value of the data numbered k at time n according to the fluid density and fluid velocity vector at time n in the data numbered k;

[0136] Determine the dimensionless temperature and entropy value at time n+1 according to the fluid density at time n+1 in the data numbered k;

[0137] The pressure at time n+1 is determined based on the fluid density and dimensionless temperature at time n+1 in the data numbered k.

[0138] In an optional embodiment of the present application, in the hybrid recursive regularized D2Q9 lattice Boltzmann method, the entropy-based energy conservation equation is solved separately using the finite volume technique. The time integral of the entropy equation containing the viscous dissipation term can be solved using the explicit Euler method or the Runge-Kutta method, and the first-order explicit Euler method is used as an example for illustration. Discretize and get the following expression:

[0139] s n+1 =s n +δ t [RHS c (s n )+RHS D (s n )+Φ n ]

[0140] Among them, s n+1 is the entropy at time n+1, s n is the entropy at time n, RHS C is the convection term, RHS D is the diffusion term, Φ n is the source term related to the heat generated by the viscous dissipation term, and the convective flux RHS C (s n ) adopts the MUSCL format, and the diffusion term and viscous dissipation term adopt the classical second-order central difference format. The expression of MUSCL format is as follows:

[0141]

[0142] by For example,

[0143]

[0144]

[0145]

[0146] Among them, u iis the velocity magnitude in the x or y direction of a grid center, is the entropy value s of the left boundary of the grid center i, is the scalar for explaining the MUSCL algorithm, is the entropy value s, is the entropy value at the grid center i, is the entropy value of the grid center i-1 to the left of the grid center i, is the entropy value of the right boundary of the grid center i, When x = -1, it is a second-order upwind format, and when κ = 1, it is a central difference format. When it is a third-order headwind format, the calculation is generally For the VanAlbada limiter, ε is a small value, usually ε=10 -6 .

[0147] The compressible flow simulation method of the present application solves the dimensionless temperature, entropy value and pressure of the fluid in the D2Q9 model from the current moment to the next moment through the finite volume method and the lattice Boltzmann method, and comprehensively obtains the parameters of the fluid in the D2Q9 model.

[0148] In an optional embodiment of the present application, the method further includes:

[0149] For discontinuous compressible flows, the hybrid recursive regularized lattice Boltzmann D2Q9 model uses the shock sensor and the associated artificial viscosity used in the JST (Jameson-Schmidt Turkel) format to handle shock waves. In this case, the effective relaxation time is Where μ is the dynamic viscosity of the fluid, Among them, ε α In order to reflect the pressure change trend through the numerator, the denominator of the expression gives a reference pressure level. After dividing the two and taking the absolute value, the result is a measure of the relative change of pressure between several adjacent grid points. α Close to 0, it means that the pressure changes very slowly near these grid points, which is a relatively smooth pressure distribution state; if ε α The value is large, such as close to 1 or larger. Of course, it is usually not too large in practice. It should be considered in combination with the specific flow field conditions and numerical accuracy. This means that the pressure has a relatively drastic change in the area of ​​these grid points, and there may be shock waves, pressure mutations, etc., p i-1 and p i+1 represents the pressure at different grid centers. ε α The α in the equation represents the Einstein summation symbol, which is a general representation of the x, y, and z directions, and gives the dimensionless relaxation time Used for studies with shock waves.

[0150] For the multi-core structure of the target chip architecture, the core data is generally large and occupies a large storage space. In order to prevent the core data in the multi-core structure from occupying the storage space of other components and causing data trampling, in an optional embodiment of the present application, a core data information processing step is provided, which specifically includes the following:

[0151] Obtaining coordinate information of a reference core structure; wherein the coordinate information of the reference core structure includes: lx / (a*b*c*n), ly / (a*b*c*n), lz / (a*b*c*n); lx, ly, lz are respectively the dimensions of a box for holding a crystal in a first direction, a second direction, and a third direction, and the first direction, the second direction, and the third direction are perpendicular to each other; a, b, and c are respectively constants; n is the cube root of the number of core structures in a core structure block, and a core structure block is the smallest unit occupied by a core structure in a box for holding a crystal;

[0152] Determine the coordinate change of the target core structure in each direction; wherein the coordinate change is the coordinate difference of the target core structure relative to the reference core structure in the corresponding direction;

[0153] Based on the coordinate information of the reference core structure and the coordinate changes of the target core structure in each direction, the coordinate information of the target core structure is determined.

[0154] In an optional embodiment of the present application, determining the coordinate changes of the target nuclear structure in each direction includes:

[0155] Determining the relative position change of the target nuclear structure in each direction according to the placement position of the nuclear structure block in the box for holding the crystal;

[0156] The product of the relative position change of the target nuclear structure in each direction and the basic coordinate difference of the nuclear structure in the corresponding direction is used as the coordinate change of the target nuclear structure in each direction.

[0157] In an optional embodiment of the present application, the coordinate change amount of the target core structure in the first direction is: (ix-1)*lx / (a*b*n); wherein ix indicates that the current target core structure is the ixth core structure along the first direction;

[0158] The coordinate change of the target core structure in the second direction is: (iy-1)*ly / (a*b*n); wherein iy indicates that the current target core structure is the iyth core structure along the second direction;

[0159] The coordinate change of the target nuclear structure in the third direction is: (iz-1)*lz / (a*b*n); wherein iz indicates that the current target nuclear structure is the iz-th nuclear structure along the third direction.

[0160] In an optional embodiment of the present application, determining the coordinate information of the target core structure based on the coordinate information of the reference core structure and the coordinate changes of the target core structure in each direction includes:

[0161] The coordinate change of the selected target nuclear structure in the first direction is summed with the coordinate value of the reference nuclear structure in the first direction to obtain the coordinate value of the target nuclear structure in the first direction;

[0162] The coordinate change of the selected target nuclear structure in the second direction is summed with the coordinate value of the reference nuclear structure in the second direction to obtain the coordinate value of the target nuclear structure in the second direction;

[0163] The coordinate change amount of the selected target nuclear structure in the third direction is summed with the coordinate value of the reference nuclear structure in the third direction to obtain the coordinate value of the target nuclear structure in the third direction;

[0164] Coordinate information of the target core structure is determined based on the coordinate value of the target core structure in the first direction, the coordinate value of the target core structure in the second direction, and the coordinate value of the target core structure in the third direction.

[0165] In an optional embodiment of the present application, the coordinate information of the target nuclear structure includes: lx / (a*b*c*n)+(ix-1)ix*lx / (a*b*n), (iy-1)*ly / (a*b*n), lz / (a*b*c*n)+(iz-1)*lz / (a*b*n),0;

[0166] Among them, ix indicates that the current target core structure is the ixth core structure along the first direction; iy indicates that the current target core structure is the iyth core structure along the second direction; iz indicates that the current target core structure is the izth core structure along the third direction.

[0167] In an optional embodiment of the present application, after determining the coordinate information of the target nuclear structure, the method further includes:

[0168] Filtering out a target word from the coordinate information of the target core structure, and generating a processing result based on the target word; wherein the coordinate value of each direction in the coordinate information includes at least two words;

[0169] And / or, after determining the coordinate information of the target nuclear structure, the method further includes:

[0170] The coordinate information of the target nuclear structure is stored.

[0171] In an optional embodiment of the present application, it also includes:

[0172] The nuclear structure information of at least two groups of the target nuclear structures is processed in parallel.

[0173] It should be understood that, although the various steps in the flow chart are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear description in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the figure may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub-steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.

[0174] See also Figure 8 One embodiment of the present application provides a compressible flow simulation device 800, comprising:

[0175] An arrangement module 810 is used to arrange the multi-core structure of the target chip architecture into a preset two-dimensional structure to obtain multiple computing cores of the target chip architecture;

[0176] A partitioning module 820 is used to partition the preset compressible flow fluid data into a plurality of data blocks according to the number of computing cores of the target chip architecture, and input the partitioned data blocks into each computing core, wherein the preset compressible flow fluid data includes a fluid flow simulation model;

[0177] A calculation module 830 is used to determine, in each calculation core, the fluid density, fluid velocity vector, pressure, dimensionless temperature and entropy value at time n+1 in the data numbered k according to the fluid density, fluid velocity vector, pressure, dimensionless temperature and entropy value at time n in the data numbered k, where n is an iteration time step, and the value ranges from 0 to a preset value;

[0178] The determination module 840 is used to determine the simulation calculation results of the target chip architecture for the preset compressible flow according to the fluid density, fluid velocity vector, pressure, dimensionless temperature and entropy value at the n+1 moment when n is the preset value in all computing cores.

[0179] For the specific definition of the above-mentioned device 800, please refer to the definition of the simulation method of compressible flow in the above text, which will not be repeated here. Each module in the above-mentioned device 800 can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0180] In one embodiment, a computer device is provided, the internal structure diagram of which can be as follows: Fig. 9 As shown. The computer device includes a processor, a memory, a network interface and a database connected via a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a method for simulating a compressible flow as described above is implemented. It includes: a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, any step in the method for simulating a compressible flow as described above is implemented.

[0181] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, any step in the above compressible flow simulation method can be implemented.

[0182] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0183] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0184] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0185] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0186] Although the preferred embodiments of the present application have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.

[0187] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A method for simulating compressible flow, characterized in that: include: Arranging a multi-core structure of a target chip architecture into a preset two-dimensional structure to obtain a plurality of computing cores of the target chip architecture; According to the number of computing cores of the target chip architecture, the preset compressible flow fluid data is divided into a plurality of data blocks, and the divided data blocks are input into each computing core, wherein the preset compressible flow fluid data includes a fluid flow simulation model; In each operation core, the fluid density, fluid velocity vector, pressure, dimensionless temperature and entropy value at time n+1 in the data numbered k are determined according to the fluid density, fluid velocity vector, pressure, dimensionless temperature and entropy value at time n in the data numbered k, where n is the iteration time step, and the value ranges from 0 to a preset value; The simulation calculation results of the target chip architecture for the preset compressible flow are determined based on the fluid density, fluid velocity vector, pressure, dimensionless temperature and entropy value at time n+1 when n is the preset value in all computing cores.

2. The method according to claim 1, characterized in that The fluid flow simulation model is a lattice Boltzmann model, which arranges the multi-core structure of the target chip architecture into a preset two-dimensional structure to obtain multiple computing cores of the target chip architecture, including: When the target chip architecture is a single-chip architecture, the single chip is divided into a plurality of computing cores, and the computing cores are arranged into a preset two-dimensional structure; When the target chip architecture is a multiple chip architecture, the multiple chips are arranged into a preset two-dimensional structure, and the computing cores of each chip in the multiple chips are arranged into a preset two-dimensional structure, wherein the preset two-dimensional structure is a two-dimensional structure corresponding to the velocity direction in the two-dimensional space of the lattice Boltzmann model.

3. The method according to claim 2, characterized in that According to the number of computing cores of the target chip architecture, the preset compressible flow fluid data is divided into a plurality of data blocks, and the divided data blocks are input into each computing core, including: Evenly distribute the preset compressible flow fluid data to each chip in the target chip architecture; For the preset compressible flow fluid data in each chip, the preset compressible flow fluid data in the current chip is evenly distributed to each computing core of the current chip, wherein the preset compressible flow fluid data distributed in each computing core is regarded as a data block.

4. The method according to claim 3, characterized in that Each computing core includes a first area and a second area, and the method further includes: For the data blocks in each operation core, the number of operations required to process the data blocks of the current operation core is determined according to the amount of operations of the current operation core each time; Dividing the data block of the current operation core according to the number of operations, and numbering the divided data, wherein the numbers are 0 to m, and m is a value less than the number of operations by 1; For the numbered data in the current operation core, when the data numbered k is calculated in the first area, the data numbered k+1 is read into the second area; when the calculation result of the data numbered k is transmitted in the first area, the data numbered k+1 is calculated in the second area; when the calculation result of the data numbered k+1 is transmitted in the second area, the data numbered k+2 is read into the first area, where k takes a value from 0 to m-2.

5. The method according to claim 4, characterized in that Calculate the data numbered k, including: Based on the first preset algorithm, the fluid density and fluid velocity vector at time n+1 in the data numbered k are determined according to the fluid density, fluid velocity vector, pressure, dimensionless temperature and entropy value at time n in the data numbered k; based on the second preset algorithm, the dimensionless temperature, entropy value and pressure at time n+1 in the data numbered k are determined according to the fluid density, fluid velocity vector, pressure, dimensionless temperature and entropy value at time n in the data numbered k, wherein n is the iteration time step, ranging from 0 to a preset value, and the first preset algorithm is different from the second preset algorithm.

6. The method according to claim 5, characterized in that The first preset algorithm is the lattice Boltzmann method, which determines the fluid density and fluid velocity vector at time n+1 in the data numbered k according to the fluid density, fluid velocity vector, pressure, dimensionless temperature and entropy value at time n in the data numbered k, including: Determine the equilibrium distribution function and correction term of the data numbered k and the mixed recursive regularized non-equilibrium moment according to the fluid density, fluid velocity vector, pressure and dimensionless temperature at time n in the data numbered k; Determine the distribution function of the data numbered k at time n+1 according to the equilibrium distribution function and correction term of the data numbered k and the mixed recursive regularized non-equilibrium moment; The density and fluid velocity vector at the time n+1 in the data numbered k are determined according to the distribution function at the time n+1 in the data numbered k.

7. The method according to claim 5, characterized in that The second preset algorithm is a finite volume method, which determines the dimensionless temperature, entropy value and pressure at time n+1 in the data numbered k according to the fluid density, fluid velocity vector, pressure, dimensionless temperature and entropy value at time n in the data numbered k, including: Determine the entropy value of the data numbered k at time n according to the fluid density and fluid velocity vector at time n in the data numbered k; Determine the dimensionless temperature and entropy value at time n+1 according to the fluid density at time n+1 in the data numbered k; The pressure at time n+1 is determined based on the fluid density and dimensionless temperature at time n+1 in the data numbered k.

8. A compressible flow simulation device, characterized in that: include: An arrangement module, used to arrange the multi-core structure of the target chip architecture into a preset two-dimensional structure to obtain multiple computing cores of the target chip architecture; a partitioning module, for partitioning the preset compressible flow fluid data into a plurality of data blocks according to the number of computing cores of the target chip architecture, and inputting the partitioned data blocks into each computing core, wherein the preset compressible flow fluid data includes a fluid flow simulation model; A calculation module, used for determining, in each calculation core, the fluid density, fluid velocity vector, pressure, dimensionless temperature and entropy value at time n+1 in the data numbered k according to the fluid density, fluid velocity vector, pressure, dimensionless temperature and entropy value at time n in the data numbered k, wherein n is an iteration time step, and the value ranges from 0 to a preset value; The determination module is used to determine the simulation calculation results of the target chip architecture for the preset compressible flow according to the fluid density, fluid velocity vector, pressure, dimensionless temperature and entropy value at the n+1 moment when n is the preset value in all computing cores.

9. A computer device comprising: A memory and a processor, wherein the memory stores a computer program, and wherein the processor implements the steps of the compressible flow simulation method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the compressible flow simulation method according to any one of claims 1 to 7 are implemented.