Parallel numerical calculation method for gas phase combustion and explosion based on adaptive grid technology

Through adaptive grid technology and parallel computing methods, the grid structure and load balancing are dynamically adjusted to solve the problem of high consumption of computing resources during the gas-phase combustion and explosion process, and achieve efficient and accurate numerical simulation, which is suitable for large-scale combustion and explosion processes. .

CN118395903BActive Publication Date: 2024-08-23UNIV OF SCI & TECH OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410838216.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-26
Publication Date
2024-08-23
Estimated Expiration
2044-06-26

AI Technical Summary

Technical Problem

The gas-phase combustion and explosion process has the characteristics of multi-scale, non-linear and complex chemical reaction mechanism, which makes it difficult for traditional numerical simulation methods to achieve accurate and efficient calculations, especially in large-scale combustion and explosion processes, the cost of computing resources and time is high.

Method used

A gas-phase combustion explosion parallel numerical calculation method based on adaptive grid technology is used to establish a multi-dimensional, transient, compressible Navier-Stokes equation system of a coupled chemistry-diffusion simplified reaction model, and through the adaptive grid structure data The container dynamically adjusts the grid structure to achieve grid resolution optimization and parallel computing load balancing.

Benefits of technology

It significantly reduces the number of calculation grids, improves calculation efficiency and accuracy, and is suitable for efficient numerical simulation of large-scale gas phase combustion and explosion processes. It has the characteristics of high efficiency, accuracy, and wide application range.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118395903B
    Figure CN118395903B
Patent Text Reader

Abstract

The present invention discloses a gas phase combustion and explosion parallel numerical calculation method based on adaptive grid technology, which relates to the field of computational fluid dynamics, including: dividing the computational grid in the computational domain and establishing an adaptive grid structure data container for storing information such as grid structure, physical coordinates, grid values, variable names, and processing the communication between processes in parallel computing; establishing a compressible reactive Navier-Stokes equation group for describing the gas phase combustion process and numerically discretizing it on the computational grid; establishing a flow field characteristic parameter detector for searching for key flow field features such as flame fronts, shock wave surfaces, contact discontinuities, and dynamically adjusting the computational grid structure of the corresponding area; and establishing a load balancing mechanism between parallel processes. The present invention can reduce the total number of grids while ensuring that the grid resolution near the key features of the flow field is sufficient, and can realize efficient numerical simulation of large-scale gas phase combustion and explosion processes in engineering application scenarios.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of computational fluid dynamics (CFD), and in particular relates to a gas phase combustion and explosion parallel numerical calculation method based on an adaptive grid technology. Background Art

[0002] Gas phase combustion and explosion is an important combustion phenomenon, which is widely used in energy conversion, fire safety, explosive disposal and other fields. Gas phase combustion and explosion is a complex phenomenon involving multi-scale and multi-physical processes. Through experimental research, the development law of the combustion and explosion process can be intuitively observed, which is an important method for exploring the mechanism of combustion and explosion disasters and conducting safety protection research. However, such experimental research often involves dangerous conditions such as high temperature, high pressure, and open flame, and the experiment is very dangerous. In addition, the experiment often requires the design of complex and expensive experimental equipment and measurement systems, which makes it difficult to accurately control and observe key parameters and the experimental cost is high. In recent years, with the development of numerical calculation methods and the improvement of computer computing power, the use of numerical simulation methods to study gas phase combustion and explosion scenarios has received more and more attention. Numerical simulation can simulate complex physical processes and reveal the details of system behavior through appropriate numerical methods and physical models. It can provide precise control, safety, cost-effectiveness, multi-scale and multi-physical process simulation capabilities, which facilitates relevant researchers to deeply understand the physical mechanism of the combustion and explosion process and provide reliable numerical prediction and decision-making basis for related engineering and scientific problems.

[0003] Since the combustion and explosion process has the characteristics of multi-scale, nonlinear and complex chemical reaction mechanism, accurate and efficient numerical simulation of it is a challenging task. First of all, the gas phase combustion and explosion process involves multiple time scales and spatial scales. In terms of time scale, the gas phase combustion and explosion process usually involves fast reactions and slow transmission processes. The time scale of fast chemical reactions is often in the microsecond to millisecond level. The slow transmission process includes heat conduction, mass transfer and momentum transfer, and its time scale can be from milliseconds to seconds or even longer. In terms of spatial scale, the gas phase combustion and explosion process involves phenomena of different spatial scales. From a macroscopic perspective, the combustion and explosion scene involves a large range of spatial areas, such as combustion chambers, explosion waves, etc. From a microscopic perspective, the combustion and explosion process involves the movement and interaction of molecules and particles. In addition, there is a coupling effect between physical processes of different time scales and spatial scales in the gas phase combustion and explosion process. For example, fast chemical reactions will cause changes in temperature and pressure, thereby affecting slow transmission processes; changes in slow transmission processes will also affect the rate of chemical reactions. In order to accurately simulate the gas phase combustion and explosion process, it is often necessary to use an extremely small time step on an extremely fine computational grid for iterative solution, resulting in a large consumption of computing resources. Therefore, it is difficult to conduct numerical simulation research on large-scale combustion and explosion processes in actual engineering application scenarios using traditional technologies. Summary of the invention

[0004] In order to solve the above technical problems, the present invention provides a parallel numerical calculation method for gas phase combustion and explosion based on adaptive grid technology, establishes a multidimensional, transient, compressible Navier-Stokes equations for coupled chemical-diffusion simplified reaction model; uses adaptive grid technology to dynamically adjust the grid structure during the calculation process and complete the numerical discretization of the Navier-Stokes equations on grids of different sizes. Establish an adaptive grid structure data container to complete the storage and management of discrete data of the equation group, data exchange between different computing devices, parallel computing load balancing and other functions. Through the current calculation method, while ensuring that the grid resolution near the key features of the flow field is sufficient, the number of grids required for simulation can be greatly reduced, the computing resources required for calculation can be greatly reduced, and the parallel computing efficiency can be improved through the load balancing algorithm.

[0005] In order to achieve the above technical objectives, the technical solution adopted by the present invention includes the following steps:

[0006] A parallel numerical calculation method for gas phase combustion and explosion based on adaptive grid technology comprises the following steps:

[0007] Step 1: construct a computational domain and divide the computational grid according to the computational scenario, obtain grid information including grid unit center coordinates, grid unit interface coordinates, and grid unit size, and establish an adaptive grid structure data container to store the above grid information;

[0008] Step 2: Establish a multidimensional, transient, compressible Navier-Stokes equations system for the coupled chemical-diffusion simplified reaction model and perform numerical discretization on the computational grid to obtain an algebraic equation system including continuity equation, momentum equation, energy equation, and component transport equation; initialize the grid cells according to the temperature, pressure, velocity, reactant components, and boundary condition information determined by the computational scenario and store them in an adaptive grid structure data container;

[0009] Step 3: Establish a flow field characteristic parameter detector to search for flame fronts, shock wave surfaces, and contact discontinuities. The grid cells are refined or coarsened by creating or destroying grid levels in the computational domain where the flow field characteristics are located, thereby achieving dynamic adjustment of the computational grid. The data stored in the grid cells are updated by interpolation or weighted averaging between grid levels with different encryption levels.

[0010] Step 4: Divide the current grid levels into grid blocks according to the parallel type. Different grid blocks belong to different processes in the parallel computing process. Exchange data between different grid blocks to ensure the availability of data of grid units in the process of reconstructing the interface variables. Establish a load balancing algorithm between processes to balance the computing amount between different computing devices and improve the efficiency of parallel computing.

[0011] Step 5: Reconstruct interface variables and solve fluxes for the algebraic equations obtained in step 2 on the computational grid dynamically adjusted in step 3, and advance time through the time sub-loop method until the maximum number of iterations or the target time is reached, otherwise jump to step 3. Beneficial Effects

[0012] The present invention is a method based on adaptive grid technology and large-scale parallel computing, combined with the proposed adaptive grid structure data container, to achieve efficient numerical simulation program development and numerical calculation on different computing devices, with the following beneficial effects:

[0013] (1) Small number of computational grids: Through adaptive grid technology, the present invention can increase the grid resolution in key areas and reduce the grid resolution in other areas according to the needs of the physical process. This can reduce the number of computational grids and improve computational efficiency while maintaining an accurate description of the key areas;

[0014] (2) High parallel computing efficiency: The present invention adopts a large-scale parallel computing method to fully utilize the computing power of multiple computing devices (such as CPU and GPU). Through parallel computing, computing tasks can be distributed to different devices for parallel computing, thereby significantly improving computing speed and efficiency;

[0015] (3) High program development efficiency: The adaptive grid structure data container designed by the present invention can simplify the development process of numerical simulation programs. Researchers can use this container to manage and operate grid data, which improves the efficiency of program development. In addition, this container has good program portability. Researchers can choose the appropriate parallel type according to the specific computing device and achieve efficient numerical simulation;

[0016] (4) The present invention is applicable to the numerical calculation of gas phase combustion and explosion processes, and can be used for computational fluid dynamics simulation and theoretical analysis of phenomena such as deflagration, detonation, and deflagration-to-detonation transition. It can also be used for efficient numerical simulation of large-scale gas phase combustion and explosion processes in engineering application scenarios, and has the characteristics of high accuracy, wide application range, and high computational efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 A flow chart of a parallel numerical calculation method for gas phase combustion and explosion based on adaptive grid technology of the present invention;

[0018] Figure 2a , Figure 2b , Figure 2c It is a conceptual diagram of an adaptive grid structure data container; Figure 2a is a top view of the grid structure. Figure 2b A bird's eye view of the grid structure. Figure 2c Schematic diagram of grid block division;

[0019] Figure 3 It is a schematic diagram of flow field feature detection and mesh encryption process;

[0020] Figure 4 A schematic diagram of the grid cells involved in the grid interpolation and weighted average operations;

[0021] Figure 5a , Figure 5b Schematic diagram of grid block structure and grid block communication type; Figure 5a is the virtual grid structure in the grid block, Figure 5b The grid block communication in three cases;

[0022] Figure 6 It is a schematic diagram of the time sub-cycle method;

[0023] Figure 7 Calculate the grid structure diagram for a three-dimensional hydrogen-air premixed explosion;

[0024] Figure 8 This is a comparison chart of the numerical simulation results and experimental results of three-dimensional hydrogen-air premixed explosion at different times. DETAILED DESCRIPTION

[0025] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.

[0026] At present, due to the multi-scale, nonlinear and complex chemical reaction mechanism characteristics of the combustion and explosion process, accurate and efficient numerical simulation of it is a challenging task. The gas-phase combustion and explosion process involves multiple time scales and spatial scales, and there is a coupling effect between the physical processes of different time scales and spatial scales. Numerical simulation of such processes often requires accurate physical process modeling and detailed grid resolution, which will result in higher computing resources and time costs. Therefore, how to perform physical modeling on the gas-phase combustion and explosion process and complete efficient numerical solution is the key difficulty currently faced. In response to the above problems, the present invention proposes a parallel numerical calculation method for gas-phase combustion and explosion based on adaptive grid technology.

[0027] like Figure 1 As shown, a gas phase combustion explosion parallel numerical calculation method based on adaptive grid technology of the present invention comprises the following steps:

[0028] Step 1: construct a computational domain and divide the computational grid according to the computational scenario, obtain grid information including grid unit center coordinates, grid unit interface coordinates, and grid unit size, and establish an adaptive grid structure data container to store the above grid information;

[0029] Step 2: Establish a multidimensional, transient, compressible Navier-Stokes equations system for the coupled chemical-diffusion simplified reaction model and perform numerical discretization on the computational grid to obtain an algebraic equation system including continuity equation, momentum equation, energy equation, and component transport equation; initialize the grid cells according to the temperature, pressure, velocity, reactant components, and boundary condition information determined by the computational scenario and store them in an adaptive grid structure data container;

[0030] Step 3: Establish a flow field characteristic parameter detector to search for flame fronts, shock wave surfaces, and contact discontinuities. The grid cells are refined or coarsened by creating or destroying grid levels in the computational domain where the flow field characteristics are located, thereby dynamically adjusting the computational grid structure. The data stored in the grid cells is updated by interpolation or weighted averaging between grid levels with different encryption levels.

[0031] Step 4: Divide the current grid levels into grid blocks according to the parallel type. Different grid blocks belong to different processes in the parallel computing process. Exchange data between different grid blocks to ensure the availability of grid unit data during the execution interface variable reconstruction process. Establish a load balancing algorithm between each computing process to balance the computing amount between different computing devices and improve the parallel computing efficiency.

[0032] Step 5: Perform operations such as interface variable reconstruction and flux solution on the Navier-Stokes algebraic equations on the computational grid adjusted in step 3, and advance the time through the time sub-loop method until the maximum number of iterations or the target time is reached, otherwise jump to step 3.

[0033] Specifically, the step 1 includes:

[0034] The established adaptive grid structure data container can be used to store grid cell center coordinates, grid cell interface coordinates, grid cell values, variable names, parallel types, parallel queue information, etc. During the initialization process, the adaptive grid structure data container will apply for a large block of continuous memory from the operating system and establish a memory pool, and manage the self-built memory pool through the internal method of the adaptive grid structure data container. The memory pool can realize the storage of dynamically changing grid structures by providing data pointers pointing to memory space blocks. After completing the current computing task, the memory pool will be automatically destroyed and the memory will be reclaimed by the operating system. The present invention aims to reduce the performance loss caused by frequent application and release of memory in high-performance computing processes. In addition, the adaptive grid structure data container can also correctly track and process memory allocation and parallel queue communication between different computing devices according to different parallel types.

[0035] The adaptive grid structure data container defines the concepts of grid unit, grid level and grid block, which are used to store and manage the adaptive grid structure. Figure 2a , Figure 2b , Figure 2c As shown, Figure 2a is a top view of the grid structure. Figure 2b A bird's eye view of the grid structure. Figure 2c Schematic diagram of grid block division. Among them, the grid unit is the smallest unit in the current grid structure, and it is a discretized spatial unit. Each grid unit usually has the same shape and size. Depending on the calculation dimension, each grid unit is usually a quadrilateral grid or a hexahedral grid. The grid unit can be used to store the variable values ​​at each spatial discrete node in the calculation domain. The grid level refers to the division of all grids into different layers according to the grid unit size, and the grid units on each grid level have a uniform size. Usually, unified management of grid units of different sizes can be achieved by establishing multiple grid levels with different resolutions. In this hierarchical structure, the grid levels need to be numbered to facilitate the description and management of the grid levels. Figure 2a , Figure 2b , Figure 2cIt includes two grid levels, grid level l-1 and grid level l, where the grid level l-1 with a smaller number contains larger grid cells. The grid cell data on each grid level is independent, and grid cell data can only be exchanged between different grid levels through interpolation and weighted average operations. A grid block refers to a group of continuous grid cell areas divided into a grid level. The size of a grid block is determined by the maximum number of grid cells it contains, and can be defined according to the specific computing scenario. By dividing each grid level into multiple grid blocks, the grid blocks can be easily assigned to different computing processes for iterative calculations, thereby improving the locality of data access and the parallelism of calculations, thereby improving computing efficiency. The division of grid blocks can be based on spatial location, data attributes, or computing requirements.

[0036] Specifically, the step 2 includes:

[0037] The multidimensional, time-dependent, compressible Navier-Stokes equations for the coupled chemical-diffusion simplified reaction model are constructed as follows:

[0038] Continuity equation:

[0039] ;

[0040] Momentum equation:

[0041] ;

[0042] Energy equation:

[0043] ;

[0044] Component transport equation:

[0045] ;

[0046] in, represents density, represents the velocity vector, represents the vector differential operator, p represents the pressure, represents the viscous stress tensor, , E represents the total energy, , T represents temperature, t represents time, q represents the energy released by chemical reaction, represents the chemical reaction rate, and Y represents the mass fraction of the reactant; represents the kinematic viscosity coefficient, D represents the component diffusion coefficient, and K represents the thermal conductivity. The above coefficients can be expressed as a function of temperature and density through the chemical-diffusion simplified reaction model. , , ; The reference coefficient representing the kinematic viscosity coefficient, represents the reference coefficient of the component diffusion coefficient, represents the reference coefficient of thermal conductivity, represents specific heat capacity at constant pressure; γ represents the specific heat ratio; I represents the unit tensor; and the superscript Tr represents the matrix transpose operation.

[0047] The established equations are numerically discretized on the computational grid using the finite volume method to obtain an algebraic form of the equations. The grid cells are initialized according to the temperature, pressure, velocity, reactant components, and boundary condition information determined by the computational scenario and stored in an adaptive grid structure data container.

[0048] Specifically, the step 3 includes:

[0049] During the development of gas-phase combustion explosion, accurately capturing the position and characteristics of the shock surface is very important for simulating and predicting the propagation of explosion shock waves, the increase in pressure and temperature, and the evaluation of explosion effects. The flame front can provide information about the combustion area, thereby helping to predict key parameters such as combustion rate, combustion product generation, and energy release. The shock surface is the front interface during the explosion process, marking a sudden change in gas physical quantities. However, the thickness of the shock surface and the flame front is very small compared to the scale of the entire computational domain, and accurate numerical characterization of the shock surface and the flame front often requires an extremely small grid cell size. In the present invention, a characteristic parameter detector is established to search for flow field features such as flame fronts, shock surfaces, contact discontinuities, and targeted grid cells near the features are marked; the marked cells on the grid level l-1 are refined (the grid cell size becomes the previous , r represents the encryption ratio) and a new grid level l is established for storage. The grid cell values ​​on the newly established grid level l are obtained by interpolating the values ​​of the unrefined grid cells on the corresponding grid level l-1. On the contrary, if the relevant physical features cannot be found on the refined grid level l, the refined grid level needs to be destroyed and the data of the grid cells on the level are weighted averaged, and the weighted average value is used to overwrite the values ​​of the grid cells at the corresponding position of the unrefined grid level l-1. The process is as follows: Figure 3 Different detectors need to be established for different physical characteristics. For shock wave surface and contact discontinuity, detectors based on density gradient and velocity gradient are established. Here, the specific definition method is introduced by taking two dimensions as an example:

[0050] Density Gradient Detector ,in:

[0051] ;

[0052] ;

[0053] ;

[0054] ;

[0055] in, represents density gradient, and the subscripts x, y, xy, and yz represent the calculation direction of density gradient. It represents density, and the subscripts i and j represent the index of the grid cell.

[0056] Velocity gradient detector , where u represents the speed in the x direction, v represents the speed in the y direction, and the subscripts i and j represent the index of the grid unit. represents the grid size in the x direction, Indicates the grid size in the y direction. For the flame front characteristics in the flow field, a detector based on the chemical reaction rate is established ,in, represents the chemical reaction rate corresponding to the grid cell indexed by (i, j), Indicates the maximum chemical reaction rate in the entire computational domain. When the value calculated by the detector function exceeds the set threshold, the grid cell is marked and refined.

[0057] The grid cells between different grid levels realize data exchange through interpolation and weighted average operation. When the refined grid level l is generated, the grid cell values ​​of the corresponding area of ​​the unrefined grid level l-1 need to be interpolated to the grid cells of the refined grid level l. The interpolation calculation process is as follows: Figure 4 As shown:

[0058] ;

[0059] Among them, Q represents the variable value stored in the grid unit, f 1、 f2 represents the weight value in the interpolation process, , , x represents the physical coordinate in the x direction, and y represents the physical coordinate in the y direction. Δx represents the size of the grid cell in the x direction, and Δy represents the size of the grid cell in the y direction. In the above variables, the superscript l represents the number of the grid level, and the subscripts i, j, m, and n represent the index of the grid cell on the current level. Similarly, when the refined grid level l is destroyed, the grid cell values ​​of the grid level l need to be overwritten to the grid cells in the corresponding area of ​​the unrefined grid level l-1 through weighted averaging. The weighted average calculation method of this process is as follows:

[0060] ;

[0061] Specifically, step 4 includes:

[0062] The current grids of each level are divided into grid blocks according to the parallel type. When distributed memory parallel computing is used, a task queue is established for all grid blocks. When a process on a computing node is available, a group of grid blocks is allocated to the process and iterative calculation is carried out. The specific number of grid blocks allocated to the process depends on the ratio of the number of all processes and grid blocks in the current parallel computing. When the process completes the grid blocks currently allocated to it, another group of grid blocks is taken from the head of the task queue for the next group of iterative calculations. The adaptive grid structure data container is responsible for distributing grid blocks between different computing nodes and recording the process number of the current grid block. When heterogeneous computing is used, the CPU process is responsible for coordinating and managing the distribution and data transmission of computing tasks, and sending grid blocks to the GPU device to complete iterative calculations. After completing the iterative calculation, the GPU device returns the calculation results to the CPU process. This involves transferring the calculation results from the device memory back to the main memory. The CPU process receives the calculation results returned by the GPU device and merges them with the calculation results of other grid blocks. The above data transmission and merging process is also managed by the adaptive grid structure data container.

[0063] Since different grid blocks are managed by different processes during parallel computing, it is necessary to exchange data between different grid blocks to ensure the availability of grid cell data during the execution of interface variable reconstruction. In the present invention, virtual grid cells are added around the grid blocks to assist in completing the grid cell boundary data exchange. Among them, the virtual grid cells are only added to assist in completing the data exchange between different grid blocks, and there is no corresponding physical position in the calculation domain. The effective grid cells are obtained by dividing the calculation domain and have clear physical coordinates. The virtual grid cell position and structural diagram are shown in Figure 5a As shown in Figure 2. According to the grid level and boundary conditions of the grid block, the grid block data exchange process is mainly divided into three types. Among them, when a grid block is located at the physical boundary of the computational domain ( Figure 5b In the case of ①), the virtual grid value of the grid block does not need to be obtained from other grid blocks, but only needs to be determined by the boundary conditions; when the virtual grid of a grid block is located at the intersection of the same grid level ( Figure 5b In case ②), the virtual grid cells can be directly filled with grid cells on other grid blocks of the same grid level without additional interpolation processing; when the virtual grid cells of a grid block cannot be directly obtained from other grid blocks of the same grid level ( Figure 5b In case ③, these virtual grid cells need to be filled by interpolating the grid cells on the unrefined grid level.

[0064] In order to achieve load balancing between different processes, a Peano curve is established throughout the entire computational domain. The Peano curve is a space-filling curve with special properties. It maps two-dimensional or higher-dimensional space to one-dimensional space in a continuous manner, maintaining the proximity in space. According to the characteristics of the Peano curve, the computational domain is sequentially mapped to a one-dimensional space. Through this mapping, the grid cells in grid blocks of different dimensions are converted into a one-dimensional sequence for storage. According to the number of grid cells in each block computational domain on the curve, the curve can be divided into several curve segments with similar computational weights, and each curve segment is mapped to a different computational process, ultimately achieving the splitting of the computational domain and similar computational loads between processes.

[0065] Specifically, the step 5 includes:

[0066] On the encrypted computational grid, the Navier-Stokes equations are reconstructed with interface variables and flux solutions. Since the current time advancement adopts an explicit method, the time step in the advancement process is determined by the global Courant number. Determine. Among them, u represents the flow velocity, Δt represents the maximum time step, and Δx represents the size of the grid unit at this level in the x direction. Since the scales of grid units at different grid levels are quite different, if the global time step is calculated by small-scale grid units, the time step will be too small, which will lead to more iterations and increased computing resource consumption. In order to overcome the above problems, the present invention uses the time sub-cycle method to advance time. This method is a numerical method for solving problems with multiple time scales. The basic idea is to divide the time step into multiple sub-steps (the sub-steps between adjacent grid levels differ by 1 / 2). times, r represents the encryption ratio), and solves the physical process separately at each sub-step. Figure 6 The time sub-cycle method is introduced by taking two grid hierarchical structures as an example. The specific steps are as follows:

[0067] Step 5.1, complete spatial discretization at the grid level l and complete time advancement according to the sub-step size Δt at the grid level;

[0068] Step 5.2: On grid level l+1, use sub-step size After completing two pushes, the initial value of the grid cell at grid level l+1 is obtained by interpolation at grid level l;

[0069] Step 5.3, after completing the advancement of grid level l+1, the grid cell data of grid level l+1 are covered with the grid cells of the corresponding area of ​​grid level l by weighted averaging, thereby completing the data synchronization between grid levels;

[0070] Step 5.4: Repeat steps 5.1 to 5.3 until you reach the grid level. .exist Figure 6 In the grid structure shown, the grid level l+1 is After completing the advancement on the grid level l+1, you can jump out of the sub-loop and complete the advancement of this time step. Example

[0071] like Figure 1 As shown, a gas phase combustion and explosion parallel numerical calculation method based on adaptive grid technology of the present invention is used to simulate the combustion and explosion process of hydrogen-air premixed gas, which specifically includes the following steps:

[0072] Step 1. Construct the computational domain and divide the computational grid according to the requirements of the computational scenario to obtain the required grid information including the center coordinates of the grid unit, the interface coordinates of the grid unit, and the size of the grid unit. This embodiment calculates the combustion and explosion process of hydrogen-air premixed gas with appropriate ratio in an unconstrained space. In order to capture the temperature and pressure changes in the external area after the explosion, a computational domain space of 40 m×40 m×20 m is established. At the initial moment, the 3 m×3 m×3 m cubic space is filled with hydrogen-air premixed gas with an equivalent ratio of 1, an initial pressure of 0.1 MPa, and an initial temperature of 298 K. The ignition point is located at the center of the cubic space, and the ignition temperature is 2400 K. The grid area is divided by an adaptive grid encryption method, with 6 encryption layers and a finest grid unit size of 4.8 mm. A flame front feature detector is established to realize the encryption of the flame front area. The established computational grid is as follows: Figure 7 shown.

[0073] Step 2: Establish a multidimensional, transient, compressible Navier-Stokes equations system for the coupled chemical-diffusion simplified reaction model. Use the finite volume method for spatial discretization and transform the equations into algebraic form on the grid; initialize the physical parameters such as temperature, pressure, velocity, reactant composition, etc. in the computational domain according to the parameters determined in step 1. Set the ground as a reflection boundary condition, and set the pressure outlet boundary condition for other surfaces.

[0074] Step 3: During the calculation process, the grid is only encrypted near the flame front. For this purpose, a detector based on the chemical reaction rate is established. ;

[0075] There are currently 6 grid levels, and the thresholds of the corresponding chemical reaction rate detectors at each level are 0.05, 0.1, 0.2, 0.4, 0.8, and 0.9. The grid cells near the flame peak are marked according to the currently determined thresholds, the marked grid cells are refined, and a new grid level is established to store the refined grid cells.

[0076] Step 4: Divide each current grid level into grid blocks according to the parallel type. In this embodiment, the calculation is carried out by a distributed memory parallel computer, and 128 CPU cores are used for parallel calculation. The number of grid cells contained in a single grid block is set to 32×32×32, and the grid blocks are distributed to the process of each computing node for iterative solution.

[0077] Step 5: Reconstruct interface variables and solve flux for the Navier-Stokes algebraic equations on the encrypted computational grid. In this embodiment, the fifth-order WENO format is used for interface variable reconstruction, and the HLLC Riemann solver is used for flux solution. Time advancement is performed by the time sub-cycle method, and the current calculation is stopped when the calculation time reaches T=75 ms. Figure 8 The comparison results of the numerical simulation results and experimental images of the flame contour at different times are shown. The selected times are T=29.19 ms, T=39.05 ms, T=48.72 ms, T=59.37 ms, and T=70.16 ms. The flame contour is represented by a temperature cloud map in the numerical simulation results, and the experimental image is obtained by superimposing a bandpass filter with a high-speed camera. The results show that the flame contour calculated by the current method is highly consistent with the experimental results, and the change of the fireball radius over time is basically consistent, indicating the effectiveness and accuracy of the current calculation method.

[0078] Although the above describes the illustrative specific embodiments of the present invention to facilitate those skilled in the art to understand the present invention, it should be clear that the present invention is not limited to the scope of the specific embodiments. For those of ordinary skill in the art, as long as various changes are within the spirit and scope of the present invention as defined and determined by the attached claims, these changes are obvious, and all inventions and creations using the concept of the present invention are protected.

Claims

1. A parallel numerical calculation method for gas phase combustion and explosion based on adaptive grid technology. It is characterized in that The steps include: Step 1: construct a computational domain and divide the computational grid according to the computational scenario, obtain grid information including grid unit center coordinates, grid unit interface coordinates, and grid unit size, and establish an adaptive grid structure data container to store the above grid information, including: The established adaptive grid structure data container is also used to store grid unit values, variable names, parallel types, and parallel queue information; during the initialization process, the adaptive grid structure data container applies to the operating system for a large block of continuous memory and establishes a memory pool to manage the memory pool; the memory pool provides a data pointer to the memory space block to store the structure of the dynamically changing computing grid. The memory pool is automatically destroyed after completing the current computing task, and the memory is reclaimed by the operating system; the adaptive grid structure data container correctly tracks and processes the data allocation between different computing devices and the communication between processes in the parallel queue according to the different parallel types; Step 2: Establish a multidimensional, transient, compressible Navier-Stokes equations system for the coupled chemical-diffusion simplified reaction model and perform numerical discretization on the computational grid to obtain an algebraic equation system including continuity equation, momentum equation, energy equation, and component transport equation; initialize the grid cells according to the temperature, pressure, velocity, reactant components, and boundary condition information determined by the computational scenario and store them in an adaptive grid structure data container; Step 3: Establish a flow field characteristic parameter detector to search for flame fronts, shock wave surfaces, and contact discontinuities. The grid cells are refined or coarsened by creating or destroying grid levels in the computational domain where the flow field characteristics are located, thereby achieving dynamic adjustment of the computational grid. The data stored in the grid cells is updated by interpolation or weighted averaging between grid levels with different encryption levels, including: Establish a characteristic parameter detector to search for flame front, shock wave surface, contact discontinuity, and mark the grid cells where flame front, shock wave surface, and contact discontinuity are located; refine the marked grid cells, that is, change the grid cell size to the previous , r represents the encryption ratio, and a new refined grid level is established for storage, and the values ​​of the grid cells on the newly established refined grid level are obtained by interpolating the values ​​of the grid cells on the corresponding positions of the unrefined grid level; on the contrary, if the flame front, shock wave surface, and contact discontinuity cannot be found on the refined grid level, the refined grid level is destroyed and the data of the grid cells on the refined grid level are weighted averaged, and the weighted average value is used to overwrite the values ​​of the grid cells at the corresponding positions of the unrefined grid level; Different detectors are established for different physical features. When the value calculated by the detector function exceeds the set threshold, the grid cell is marked and refined. Among them, for the shock surface and contact discontinuity, detectors based on density gradient and velocity gradient are established, and the specific definitions are as follows: Density Gradient Detector ,in, ; ; ; ; in, represents density gradient, and its subscripts x, y, xy, and yx represent the calculation direction of density gradient. It represents density, and its subscripts i and j represent the index of the grid cell; Velocity Gradient Detector , where u represents the speed in the x direction, v represents the speed in the y direction, and the subscripts i and j represent the index of the grid unit. represents the grid size in the x direction, Indicates the grid size in the y direction; Building a chemical reaction rate based detector for the flame front ,in, represents the chemical reaction rate corresponding to the grid cell indexed by (i, j), Represents the maximum chemical reaction rate in the entire computational domain; Step 4: Divide the current grid levels into grid blocks according to the parallel type. Different grid blocks belong to different processes in the parallel computing process. Exchange data between different grid blocks to ensure the availability of data of grid units in the process of reconstructing the interface variables. Establish a load balancing algorithm between processes to balance the computing amount between different computing devices and improve the efficiency of parallel computing. Step 5: Reconstruct interface variables and solve fluxes for the algebraic equations obtained in step 2 on the computational grid dynamically adjusted in step 3, and advance time through the time sub-loop method until the maximum number of iterations or the target time is reached, otherwise jump to step 3.

2. According to the parallel numerical calculation method of gas phase combustion and explosion based on adaptive grid technology as described in claim 1, It is characterized in that The adaptive grid structure data container defines the concepts of grid unit, grid level and grid block, which is used to store and manage the adaptive grid structure; the grid unit is the smallest structure in the adaptive grid structure and is a discretized spatial unit; all grid units are divided into different layers to form a grid level according to the size of the grid unit, and the grid units on each grid level have a uniform size; unified management of grid units of different sizes is achieved by establishing multiple grid levels with different resolutions, and in the grid level structure, the grid level is numbered using l, and the number of numbers increases from 0 to l max ; The data of grid cells on each grid level are independent, and the data of grid cells on different grid levels are only exchanged through interpolation and weighted average operations; The grid level is divided into a group of continuous grid cell areas to form grid blocks. In parallel computing, each grid level is divided into multiple grid blocks, and each grid block is assigned to a different process to be responsible for iterative calculations. The basis for grid block division is based on spatial location, data attributes or computing requirements.

3. According to the parallel numerical calculation method of gas phase combustion and explosion based on adaptive grid technology as described in claim 1, It is characterized in that The step 2 comprises: The multidimensional, transient, compressible Navier-Stokes equations for the coupled chemical-diffusion simplified reaction model are established as follows: The continuity equation is: ; The momentum equation is: ; The energy equation is: ; The component transport equation is: ; in, represents density, represents the velocity vector, represents the vector differential operator, p represents the pressure, represents the viscous stress tensor, , E represents the total energy, , T represents temperature, t represents time, q represents the energy released by chemical reaction, represents the chemical reaction rate, and Y represents the mass fraction of the reactant; represents the kinematic viscosity coefficient, D represents the component diffusion coefficient, K represents the thermal conductivity, and the kinematic viscosity coefficient , component diffusion coefficient D, thermal conductivity K are expressed as functions of temperature and density through the simplified chemical-diffusion reaction model, that is: , , ; The reference coefficient representing the kinematic viscosity coefficient, represents the reference coefficient of the component diffusion coefficient, Indicates the reference coefficient of thermal conductivity; represents the specific heat capacity at constant pressure; γ represents the specific heat ratio, I represents the unit tensor; the superscript Tr represents the matrix transpose operation; The established Navier-Stokes equations are numerically discretized on the computational grid using the finite volume method to obtain an algebraic equation system.

4. According to claim 1, a gas phase combustion and explosion parallel numerical calculation method based on adaptive grid technology, It is characterized in that When a refined grid level l is generated, the values ​​of the grid cells in the corresponding area of ​​the unrefined grid level l-1 are interpolated to the grid cells of the refined grid level. The specific interpolation method is as follows: ; Among them, Q represents the variable value stored in the grid unit, f 1 , f 2 represents the weight value in the interpolation process, , x represents the physical coordinate in the x direction, y represents the physical coordinate in the y direction; Δx represents the size of the grid cell in the x direction, Δy represents the size of the grid cell in the y direction, the superscript l represents the number of the grid level, and the subscripts i, j, m, and n represent the index of the grid cell on the current level; when the refined grid level l is destroyed, the values ​​of the grid cells of the refined grid level l are overwritten to the grid cells in the corresponding area of ​​the unrefined grid level l-1 by weighted averaging. The weighted average calculation method is as follows: 。 5. According to claim 4, a gas phase combustion and explosion parallel numerical calculation method based on adaptive grid technology, It is characterized in that The step 4 comprises: The parallel type includes using a shared memory computer, a distributed memory computer using CPU parallel computing or using heterogeneous GPU computing; when using a shared memory computer or a distributed memory computer using CPU parallel computing, firstly establish a parallel task queue for all grid blocks, when a process on a computing node is available, a group of grid blocks is allocated to the process and iterative computing is carried out, and the number of grid blocks allocated to the process depends on the ratio of the number of all processes and grid blocks in the current parallel computing; when the process completes the grid blocks currently allocated to it, another group of grid blocks is taken from the head of the task queue for the next group of iterative computing; When using heterogeneous GPU parallel computing, the CPU process is responsible for coordinating and managing the distribution of computing tasks and data transmission, and sending grid blocks to the GPU for iterative calculations; after completing the iterative calculations, the GPU transmits the calculation results back to the CPU process, and the calculation results are transferred from the GPU video memory back to the main memory. The CPU process receives the calculation results returned by the GPU and merges them with the calculation results of other grid blocks.

6. According to claim 5, a gas phase combustion and explosion parallel numerical calculation method based on adaptive grid technology, It is characterized in that A virtual grid cell layer is added around the grid block to assist in completing the data exchange at the grid cell boundary. According to the grid level and boundary conditions of the grid block, the data exchange process of the grid block is divided into three types: when a grid block is located at the physical boundary of the computational domain, the virtual grid value of the grid block is determined by the boundary conditions; when the virtual grid of a grid block is located at the intersection of the same grid level, the virtual grid cells are directly filled with grid cells on other grid blocks of the same grid level; when the virtual grid cells of a grid block cannot be directly obtained from other grid blocks of the same grid level, the virtual grid cells are filled by interpolation of grid cells of adjacent grid levels.

7. According to claim 6, a gas phase combustion and explosion parallel numerical calculation method based on adaptive grid technology, It is characterized in that Establish a Peano curve throughout the entire computational domain and sequentially map the grid blocks in the computational domain into one-dimensional space; According to the number of grid cells in the computational domain of each block on the Peano curve, the Peano curve is divided into several curve segments with similar computational weights, and each curve segment is mapped to a different process, ultimately achieving the splitting of the computational domain and similar computational loads between processes.

8. According to claim 1, a gas phase combustion and explosion parallel numerical calculation method based on adaptive grid technology, It is characterized in that The time advancement by the time sub-cycle method in step 5 comprises the following steps: Step 5.1: Complete spatial discretization at grid level l and complete time advancement according to the sub-step size Δt at the grid level. If l > 0, obtain the value in the virtual grid cell of grid level l by interpolation from grid level l-1; Step 5.2: If l < l max , then continue to advance the time r times with a sub-step size of Δt / r on the grid level l+1, and the initial value of the grid cell on the grid level l+1 is obtained by interpolation of the grid level l; Step 5.3, after completing the advancement of grid level l+1, the data of the grid cells of grid level l+1 are weighted averaged through the grid weighting operation and covered with the grid cells of the corresponding area of ​​grid level l to complete the data synchronization between grid levels; Step 5.4: Repeat steps 5.1 to 5.3 until grid level l is reached. max .