Search

CN-121997819-A - Method and device for adjusting calculation grid of gas compressor and storage medium

CN121997819ACN 121997819 ACN121997819 ACN 121997819ACN-121997819-A

Abstract

The embodiment of the application discloses a method, a device and a storage medium for adjusting calculation grids of a gas compressor, wherein the method acquires reference geometry and reference calculation grids in a reference working condition, extracts quality parameters and sets preset conditions, builds and trains a neural network based on a transformation matrix from the reference geometry to a target working condition, inputs reference calculation grid data under the reference working condition, outputs two-dimensional grids of the target working condition, keeps the number of topology and nodes unchanged, performs quality check on the output grids, updates the neural network parameters according to a check result to be iteratively output, stacks the two-dimensional grids under the target working condition after iteration completion into three-dimensional grids along the preset direction, reduces repeated grid division on the premise of keeping the grid topology and the number of nodes unchanged, improves the generating efficiency and stability of multiple working condition grids, supports cross-working condition comparison and boundary condition multiplexing, reduces the risk of the negative grids, and is convenient to integrate with the existing simulation flow.

Inventors

  • ZHANG HAO
  • XIAO JUNFENG
  • GAO SONG
  • LI YUANYUAN
  • YU FEILONG
  • DUAN JINGYAO
  • HE WEI
  • WU YAOZU
  • WU HE

Assignees

  • 西安热工研究院有限公司

Dates

Publication Date
20260508
Application Date
20260113

Claims (10)

  1. 1. A method for adjusting a computational grid of a compressor, comprising: Acquiring reference geometry of the compressor under a reference working condition and a corresponding reference calculation grid of the compressor, wherein the reference calculation grid is formed by overlapping two-dimensional grids under a plurality of reference working conditions along a preset direction; Acquiring quality parameters of the reference calculation grid, and carrying out quality constraint on the reference calculation grid based on the quality parameters and preset conditions; Constructing and training a neural network model based on the reference calculation grid meeting preset conditions and a transformation matrix for adjusting the reference geometry to a target working condition so as to acquire a mapping of the two-dimensional grid from the reference working condition to the target working condition; Inputting the two-dimensional grids under the mapping and reference working conditions into the trained neural network model to output the two-dimensional grids under the target working conditions, and keeping the topological structure and the number of grid nodes unchanged; performing quality check on the two-dimensional grid under the target working condition based on the preset condition, and adjusting parameters of the neural network model according to a check result until the two-dimensional grid under the target working condition meets the preset condition; and superposing the two-dimensional grids under the target working condition output by the neural network model along the preset direction to form a three-dimensional grid under the target working condition.
  2. 2. The method of adjusting a computational grid of a compressor of claim 1, wherein the compressor is a multi-stage compressor, the reference geometry of which includes at least one adjustable vane, the reference computational grid being generated by structured partitioning to ensure no negative grid, the preset direction being a leaf height direction, the target operating condition being achieved by adjusting an angle of the at least one adjustable vane.
  3. 3. The compressor computing grid adjustment method of claim 1, wherein the quality parameters of the reference computing grid at least include grid orthogonality, grid aspect ratio, and grid expansion ratio, the preset condition is that each item value of the quality parameters satisfies a preset threshold, or each item value of the quality parameters is an optimal value when the number of grid nodes does not exceed a preset limit value; When the values of the quality parameters do not meet a preset threshold, adjusting a grid division strategy to iterate the quality parameters so that the values of the quality parameters are close to the preset threshold, stopping iteration when the number of grid nodes exceeds a preset limit value, and taking the values of the current quality parameters as the optimal value.
  4. 4. The compressor computing grid adjustment method of claim 1, wherein the neural network model is a fully connected neural network model; the input layer of the fully-connected neural network comprises two-dimensional leaf patterns with different section heights, a two-dimensional calculation domain range under a reference working condition, two-dimensional grid node coordinates under the reference working condition and the transformation matrix, and the output layer outputs the two-dimensional grid node coordinates or grid node displacement under the target working condition corresponding to different sections and corresponds to grid nodes under the reference working condition one by one.
  5. 5. The compressor computing grid adjustment method of claim 4, wherein the hidden layer of the fully connected neural network employs a ReLU as an activation function; The basic loss during model training is a mean square error function, the input of the mean square error function is the grid node coordinates predicted by the model and the grid node coordinates under the target working condition, and the output is the square average value of the input quantity difference.
  6. 6. The compressor computing grid adjustment method of claim 1, wherein the quality check and the adjusting parameters of the neural network model according to the check result comprise: acquiring quality parameters of the two-dimensional grid under the target working condition, wherein the quality parameters at least comprise grid orthogonality, grid length-width ratio and grid expansion ratio; Comparing the quality parameters of the two-dimensional grid under the target working condition with the preset conditions; When all the values of the quality parameters of the two-dimensional grid under the target working condition meet the preset conditions, determining that the verification result passes, and outputting the current two-dimensional grid; When the quality parameter of any two-dimensional grid does not meet the preset condition, recording the amount of default excess of the quality parameter which does not meet the preset condition relative to the preset condition and the grid position corresponding to the maximum amount of default excess; constructing a quality penalty term based on the recorded information, adding the quality penalty term into the training process of the neural network model to iteratively update the two-dimensional grid under the target working condition, and carrying out quality check again; Repeating the steps until the quality parameters of all the two-dimensional grids meet the preset conditions or the iteration times reach the preset upper limit, and outputting the current two-dimensional grids.
  7. 7. The method for adjusting the computational grid of a compressor as set forth in claim 1, further comprising performing boundary projection on grid nodes located at a fixed wall boundary to fit a geometric boundary under a target condition when outputting a two-dimensional grid under the target condition; After the three-dimensional grid under the target working condition is formed, the three-dimensional grid with adjustable geometry in the reference geometry and the three-dimensional grid with fixed geometry are combined in a butt joint mode at a predefined interface boundary to obtain a complete three-dimensional calculation grid of the gas compressor.
  8. 8. A compressor computing grid adjustment apparatus, comprising: the reference grid acquisition module is used for acquiring the reference geometry and the corresponding reference calculation grid under the reference working condition and acquiring the quality parameters of the reference calculation grid so as to carry out quality constraint; The mapping model training module is used for constructing and training a neural network model based on the reference calculation grid meeting preset conditions and a transformation matrix used for adjusting the reference geometry to a target working condition so as to acquire the mapping of the two-dimensional grid from the reference working condition to the target working condition; the grid quality constraint unit is used for carrying out quality check on the two-dimensional grid under the target working condition, and recording the amount of the default excess and the grid position corresponding to the maximum amount of the default excess when the preset condition is not met; the closed-loop updating control unit is used for adding a quality penalty term into the model training process to form updating loss, updating parameters of the neural network model and re-outputting a two-dimensional grid under a target working condition until a preset condition is met or the iteration number reaches a preset upper limit; The target grid generation module is used for outputting two-dimensional grids under the target working condition on the premise of keeping the topological structure and the grid node number unchanged, and overlapping the two-dimensional grids along the preset direction to form a three-dimensional grid.
  9. 9. The compressor computing grid adjustment device of claim 8, wherein the neural network model is a fully connected neural network; The input layer of the fully-connected neural network comprises two-dimensional leaf patterns with different section heights, a two-dimensional calculation domain range under a reference working condition, two-dimensional grid node coordinates under the reference working condition and the transformation matrix, and the output layer outputs two-dimensional grid node coordinates or grid node displacement under a target working condition corresponding to different sections and corresponds to grid nodes under the reference working condition one by one; and the hidden layer of the fully-connected neural network adopts a ReLU as an activation function, the basic loss during model training is a mean square error function, and the basic loss and the quality penalty term provided by the grid quality constraint unit are weighted and summed to form an update loss.
  10. 10. A computer readable storage medium having stored thereon a computer program for implementing the compressor calculation grid adjustment method of any one of claims 1 to 7 when executed by a processor.

Description

Method and device for adjusting calculation grid of gas compressor and storage medium Technical Field The present application relates to the field of simulation computing, and in particular, to a method and apparatus for adjusting a computing grid of a compressor, and a storage medium. Background The CFD (Computational Fluid Dynamics ) technology is used as a simulation calculation tool, so that the research cost in the field of fluid dynamics can be greatly reduced, the method is suitable for a large number of fluid dynamics mechanism researches, and a great deal of convenience is brought to the fluid dynamics researches. Generally, CFD computation mainly comprises the processes of model establishment, grid division, boundary condition and initial condition setting, solution computation and the like, wherein the grid division is a critical ring in CFD, and the number and quality of the grid division are key factors influencing the solving speed and the solving accuracy of CFD. For the structured grid, when the three-dimensional CFD grid is divided, two-dimensional grid division is adopted, and then a three-dimensional grid is generated in a mode of overlapping multiple layers of two-dimensional grids. In engineering practice, the geometry of the simulation model is not kept unchanged, the model is often required to be changed again and re-meshed during each calculation, the whole simulation period is increased, for example, when a multistage compressor with adjustable guide vanes and static vanes is subjected to dynamic simulation, the angles of the adjustable guide vanes under different working conditions are different, and the model and the grid are required to be changed accordingly, so that the simulation period is increased. At present, the geometric reconstruction and grid repartitioning are performed working condition by working condition, but the high local quality can be obtained, the efficiency is low, the calculation time is long, the automation is difficult, interfaces and node numbers of different working conditions are difficult to be completely consistent, the comparison of the working conditions is influenced, a complex channel and a narrow-gap area often depend on a large amount of manual intervention and quality repair, and in addition, different software and parameter settings can cause fluctuation of the quality and convergence characteristic of the grid. Therefore, there is a need for a meshing adjustment method that improves simulation efficiency. Disclosure of Invention The embodiment of the application provides a method and a device for adjusting a calculation grid of a gas compressor and a storage medium, so as to reduce the grid division period during dynamic simulation of an adjustable model. In order to solve the technical problems, the embodiment of the application discloses the following technical scheme: According to a first aspect, a method for adjusting a calculation grid of a gas compressor is provided, the method comprises the steps of obtaining reference geometry of the gas compressor under a reference working condition and reference calculation grids corresponding to the reference geometry, wherein the reference calculation grids comprise three-dimensional grids formed by overlapping two-dimensional grids under a plurality of reference working conditions along a preset direction, obtaining quality parameters of the reference calculation grids, carrying out quality constraint on the reference calculation grids based on the quality parameters and preset conditions, constructing and training a neural network model based on the reference calculation grids meeting the preset conditions and a transformation matrix for adjusting the reference geometry to a target working condition, so as to obtain a mapping of the two-dimensional grids from the reference working condition to the target working condition, inputting the two-dimensional grids under the mapping and the reference working condition into the trained neural network model, so as to output the two-dimensional grids under the target working condition, keeping the topological structure and the number of grid nodes unchanged, carrying out quality verification on the two-dimensional grids under the target working condition based on the preset conditions, adjusting parameters of the neural network model until the two-dimensional grids under the target working condition meet the preset conditions, and outputting the neural network model along the preset direction, so as to form the two-dimensional grid under the target working condition. Further, the compressor is a multi-stage compressor, the reference geometry of the compressor comprises at least one adjustable guide vane, the reference calculation grid is generated through structural division to ensure no negative grid, the preset direction is the blade height direction, and the target working condition is achieved by adjusting the angle of the at least one adjustable guid