Fast prediction method, system, device and medium for two-dimensional viscous compressible flow field of compressor

By constructing a hybrid neural network model that combines a fully convolutional subnetwork and a Transformer subnetwork, local and global flow field features are extracted. Gradient and physical consistency loss terms are introduced to solve the problems of slow prediction speed and low accuracy of two-dimensional airfoil flow field in compressors, and achieve efficient and accurate flow field reconstruction and engineering applications.

CN121835521BActive Publication Date: 2026-05-15TAIHANG NATIONAL LABORATORY
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
TAIHANG NATIONAL LABORATORY
Filing Date
2026-03-13
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

Existing technologies suffer from slow prediction speed, low accuracy, physical inconsistencies, and local structural distortions in the two-dimensional airfoil flow field prediction of compressors, making it difficult to support rapid iteration in multi-parameter optimization design of compressors.

Method used

A hybrid neural network model is constructed, combining a fully convolutional sub-network and a Transformer sub-network. Local and global flow field features are extracted through an attention mechanism, and gradient loss terms and physical consistency loss terms are introduced to optimize the flow field prediction model.

Benefits of technology

It achieves millisecond-level flow field prediction velocity and high-precision flow field reconstruction, satisfies the laws of fluid mechanics, and is applicable to various compressor blade types and operating conditions, significantly improving engineering reliability and generalization ability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121835521B_ABST
    Figure CN121835521B_ABST
Patent Text Reader

Abstract

The application belongs to the field of aero-engines and turbomachinery, and provides a compressor two-dimensional viscous compressible flow field fast prediction method, system, equipment and medium, the method comprising: obtaining CFD simulation data of compressor two-dimensional blade profile under multiple working conditions, and preprocessing to obtain standardized training data set; based on the data set, a hybrid neural network model is constructed with blade profile geometric parameters and operating condition parameters as input and two-dimensional viscous compressible flow field as output; a total loss function is constructed by combining mean square error, gradient loss and physical consistency loss based on RANS equation residual, and the model is trained end to end; during inference, the to-be-predicted parameters are input into the trained model in the same preprocessing manner, and the flow field prediction result can be quickly output. The application can solve the problems of long time consumption, low precision and poor consistency of traditional CFD simulation, realize millisecond-level flow field prediction, have high precision and strong physical consistency, and is suitable for efficient optimization design of compressor blade profile.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of aero-engines and turbomachinery, and relates to compressor design and flow field simulation technology. Specifically, it relates to a method, system, equipment and medium for rapid prediction of two-dimensional viscous compressible flow field of compressor based on deep learning and fluid dynamics physical constraints. It is applicable to scenarios such as airfoil optimization, aerodynamic performance evaluation, multi-condition flow field reconstruction and intelligent design. Background Technology

[0002] As a core component of aero-engines, the compressor's blade aerodynamic performance directly determines the engine's thrust, efficiency, and stability. Two-dimensional blade flow field simulation (such as CFD methods based on Reynolds-averaged Navier-Stokes (RANS) equations) is a crucial step in compressor design, requiring accurate capture of complex flow phenomena such as boundary layer separation, shock wave formation and propagation, and shear layer development.

[0003] However, existing technologies still have the following limitations:

[0004] 1. Traditional CFD simulation is inefficient: numerical solutions based on RANS equations usually require thousands of iterations, and a single simulation can take several hours or even tens of hours, which is difficult to support the rapid iteration required in the multi-parameter optimization design of compressors (which often involves thousands of flow field assessments).

[0005] 2. Purely data-driven models lack physical consistency: Current flow field prediction methods based on single convolutional neural networks (CNNs) or Transformers rely solely on data fitting and lack physical constraints. CNNs struggle to model cross-regional global flow field correlations (such as the interaction between shock waves and downstream boundary layers), while Transformers are insufficient in characterizing local fine structures (such as boundary layer velocity gradients and abrupt changes in leading-edge pressure). More importantly, the prediction results of such models may violate fundamental conservation laws such as mass and momentum, limiting their engineering reliability.

[0006] 3. Inadequate loss function design: Most models only use mean squared error (MSE) as the loss function, focusing only on the numerical approximation of flow field variables and ignoring spatial gradient structures (such as the gradient characteristics of shock waves and shear layers) and physical equation constraints, resulting in a significant decrease in prediction accuracy in complex flow regions.

[0007] Therefore, there is an urgent need for a fast prediction method for two-dimensional viscous compressible flow fields in compressors that combines millisecond-level inference speed, engineering-usable accuracy, and physical consistency, in order to overcome the dual bottlenecks of high computational cost of traditional CFD and physical unreliability of existing data-driven models. Summary of the Invention

[0008] To address the technical problems of slow prediction speed, low accuracy, physical inconsistencies, and local structural distortion in existing two-dimensional airfoil flow field prediction technologies, and to achieve high-precision, high-efficiency, and high-reliability flow field reconstruction, this invention discloses a rapid prediction method for two-dimensional viscous compressible flow fields in compressors. The method includes the following steps:

[0009] S1: Obtain CFD simulation data of the compressor's two-dimensional blade profile under multiple operating conditions, and preprocess the CFD simulation data to obtain a standardized training dataset.

[0010] S2: Based on the standardized training dataset, a hybrid neural network model is constructed with airfoil geometry parameters and operating condition parameters as inputs and a two-dimensional viscous compressible flow field as output; wherein, the hybrid neural network model extracts local flow field features through a convolutional structure and extracts global flow field features through an attention mechanism, and fuses the local flow field features and the global flow field features to generate a high-fidelity two-dimensional viscous compressible flow field prediction result;

[0011] S3: Based on the standardized training dataset, construct the gradient loss term and the physical consistency loss term;

[0012] S4: The mean squared error loss, the gradient loss term, and the physical consistency loss term are weighted and fused to construct the total loss function, and the hybrid neural network model is trained end-to-end using the standardized training dataset until convergence, to obtain the trained flow field prediction model.

[0013] S5: Preprocess the geometric parameters and operating condition parameters of the blade profile to be predicted, and input them into the flow field prediction model to output the two-dimensional viscous compressible flow field prediction results.

[0014] Further, in step S1, the CFD simulation data includes flow field variables, airfoil geometric parameters, and operating condition parameters. The flow field variables include density, static pressure, static temperature, x-direction velocity, and y-direction velocity. The airfoil geometric parameters include at least three of the following: chord length, maximum thickness, maximum thickness location, leading edge radius, and bend angle. The operating condition parameters include the incoming Mach number, angle of attack, and Reynolds number.

[0015] Furthermore, in step S1, the CFD simulation data is preprocessed, including:

[0016] S11: The flow field data in the CFD simulation data is mapped to a fixed-size two-dimensional structured mesh using bilinear interpolation;

[0017] S12: The blade geometry parameters, operating condition parameters, and flow field variables are independently normalized using min-max normalization to obtain a standardized training dataset.

[0018] Further, in step S2, the hybrid neural network model includes a fully convolutional sub-network, an aggregation module, and a convolutional decoder connected in sequence, as well as a Transformer sub-network connected to the fully convolutional sub-network and the aggregation module.

[0019] Among them, the fully convolutional sub-network is built based on an advanced fully convolutional network to extract local flow field features at multiple scales, and embeds local enhanced attention modules in some convolutional blocks;

[0020] The Transformer subnetwork receives the intermediate features output by the fully convolutional subnetwork in the deep encoding stage, and uses the pyramid visual Transformer or SSFormer architecture to model global spatial dependencies and generate global flow field features.

[0021] The aggregation module receives the local flow field features and the global flow field features, and fuses them at multiple scales;

[0022] The convolutional decoder receives the fused features and restores the spatial resolution of the flow field through progressive upsampling and residual convolution, outputting a high-fidelity two-dimensional viscous compressible flow field prediction result with the same size as the input grid.

[0023] Furthermore, in step S3, the gradient loss term is used to enhance the fidelity of the flow field spatial structure, and its construction method includes:

[0024] S301: For each physical variable in the flow field, an anisotropic differential convolution kernel is used to calculate its numerical gradient in the x and y directions respectively. The anisotropic differential convolution kernel has an asymmetric weight distribution in the horizontal and vertical directions.

[0025] S302: Based on the real flow field in the standardized training dataset and the predicted flow field output by the hybrid neural network model, obtain the corresponding real gradient and predicted gradient respectively, and calculate the L1 norm distance between them as the gradient loss term;

[0026] The physical variables include at least two of the following: density, velocity component, pressure, and temperature.

[0027] Further, in step S3, the physical consistency loss term is based on the Reynolds-averaged Navier-Stokes equation residuals to constrain the conservation of mass, momentum, and energy. Its construction method includes:

[0028] S311: Perform spatial differentiation on the physical variables in the predicted flow field output by the hybrid neural network model to obtain the velocity gradient, pressure gradient and temperature gradient, wherein the spatial differentiation is implemented by the central difference approximation.

[0029] S312: Substitute the velocity gradient, the pressure gradient, and the temperature gradient into the continuity equation, the momentum equation in the x-direction, the momentum equation in the y-direction, and the energy equation, and calculate the residuals of each equation;

[0030] S313: Take the weighted sum of squares of the residuals of all equations to obtain the physical consistency loss term.

[0031] Further, in step S4, the total loss function is expressed as:

[0032] ;

[0033] in, For the total loss function, , , These are the mean squared error loss, gradient loss term, and physical consistency loss term, respectively. , , These are the weights of the variance loss, gradient loss, and physical consistency loss, respectively.

[0034] This invention also provides a rapid prediction system for two-dimensional viscous compressible flow fields in compressors, including a data preprocessing unit, a hybrid modeling unit, a dual-constraint loss unit, a joint training unit, and a rapid inference unit.

[0035] The data preprocessing unit is used to acquire CFD simulation data of the compressor's two-dimensional blade profile under multiple operating conditions, and to preprocess the CFD simulation data to obtain a standardized training dataset.

[0036] The hybrid modeling unit is used to construct a hybrid neural network model based on the standardized training dataset, taking airfoil geometry parameters and operating condition parameters as inputs and a two-dimensional viscous compressible flow field as output. The hybrid neural network model extracts local flow field features through a convolutional structure and extracts global flow field features through an attention mechanism. The local flow field features and the global flow field features are fused to generate high-fidelity two-dimensional viscous compressible flow field prediction results.

[0037] The dual-constraint loss unit is used to construct a gradient loss term and a physical consistency loss term based on the standardized training dataset;

[0038] The joint training unit is used to construct a total loss function by weighted fusion of the mean squared error loss, the gradient loss term, and the physical consistency loss term, and to perform end-to-end training of the hybrid neural network model using the standardized training dataset until convergence, thereby obtaining the trained flow field prediction model.

[0039] The fast inference unit is used to preprocess the geometric parameters and operating condition parameters of the airfoil to be predicted, and input them into the flow field prediction model to output the two-dimensional viscous compressible flow field prediction results.

[0040] This invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the above-mentioned method for rapid prediction of two-dimensional viscous compressible flow fields of compressors, thereby solving the technical problems in the prior art such as slow prediction speed, low accuracy, physical inconsistency, and local structural distortion of two-dimensional airfoil flow fields.

[0041] This invention also provides a computer-readable storage medium storing a computer program that executes any of the above-described methods for rapid prediction of two-dimensional viscous compressible flow fields in compressors, in order to solve the technical problems in the prior art such as slow prediction speed, low accuracy, physical inconsistency, and local structural distortion of two-dimensional airfoil flow fields.

[0042] This invention presents a rapid prediction method for two-dimensional viscous compressible flow fields in compressors. It constructs a hybrid neural network architecture integrating convolution and attention mechanisms, and introduces dual supervision signals: gradient structure constraints and physical equation residuals, to achieve synergistic optimization based on data-driven approaches and physical laws. Specifically, the method first extracts the fine local structure of the flow field (such as boundary layer gradients and leading-edge pressure abrupt changes) through a fully convolutional sub-network, while simultaneously using a Transformer sub-network to model cross-regional global dependencies (such as the impact of shock wave propagation on downstream wakes). Based on this, a step-by-step feature aggregation and progressive decoding mechanism is designed to fuse multi-scale local and global information to reconstruct a high-fidelity flow field. Furthermore, by jointly optimizing three losses—mean squared error (data fitting), gradient L1 loss (spatial structure fidelity), and RANS equation residual loss (mass, momentum, and energy conservation)—the model strictly satisfies the laws of fluid dynamics while maintaining high accuracy.

[0043] Compared with the prior art, the beneficial effects that at least one technical solution adopted in the embodiments of this specification can achieve include at least:

[0044] 1. Extremely fast inference speed, supporting rapid iteration at the engineering level: The model takes ≤10 milliseconds for a single inference, which is more than 1000 times faster than traditional CFD simulation based on RANS equations (which usually takes several hours). It can efficiently support scenarios that require thousands to tens of thousands of flow field assessments, such as compressor blade multi-parameter optimization and uncertainty quantification.

[0045] 2. High prediction accuracy: By using the CNN-Transformer hybrid architecture to collaboratively model local details and global relationships, and by using gradient loss to constrain the spatial continuity of high gradient regions such as shear layers and shock waves, this method achieves a mean absolute error (MAE) of ≤3% for each flow field variable on the test set, which is significantly better than a single CNN (ignoring global interactions) or a single Transformer (weakening local gradients) model.

[0046] 3. Good physical consistency and high engineering reliability: By introducing the residuals of the continuity equation, momentum equation, and energy equation as physical consistency loss terms, the network output is forced to satisfy basic conservation laws. Experiments show that the continuity residual of the predicted flow field is ≤1×10⁻⁶. -4 Momentum residual ≤ 5 × 10 -4 This effectively avoids non-physical issues such as mass non-conservation and energy anomalies that may occur in purely data-driven models, and greatly improves engineering practicality.

[0047] 4. Strong generalization ability and wide applicability: This invention utilizes standardized grid mapping and independent parameter normalization preprocessing to enable the prediction model to be adapted to various compressor two-dimensional blade profiles (such as NACA series and C4 series) and a wide operating range (incoming Mach number 0.3–0.8, angle of attack...). 5° to 10°, Reynolds number 10 5 -10 6 This eliminates the need for retraining for new leaf types or operating conditions, significantly reducing deployment costs. Attached Figure Description

[0048] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0049] Figure 1 This is a flowchart of the rapid prediction method for two-dimensional viscous compressible flow field of a compressor according to the present invention;

[0050] Figure 2 This is an architecture diagram of a hybrid neural network model;

[0051] Figure 3 This is an architectural diagram of the rapid prediction system for two-dimensional viscous compressible flow fields in a compressor according to the present invention.

[0052] Among them, 301 is the data preprocessing unit; 302 is the hybrid modeling unit; 303 is the dual-constraint loss unit; 304 is the joint training unit; and 305 is the fast inference unit. Detailed Implementation

[0053] The embodiments of this application will now be described in detail with reference to the accompanying drawings.

[0054] The following specific examples illustrate the implementation of this application. Those skilled in the art can easily understand other advantages and effects of this application from the content disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. This application can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of this application. It should be noted that, in the absence of conflict, the following embodiments and features of the embodiments can be combined with each other. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0055] This invention discloses a method for rapid prediction of two-dimensional viscous compressible flow fields in compressors. (See also...) Figure 1 As shown, the method includes the following steps:

[0056] S1: Obtain CFD simulation data of the compressor's two-dimensional blade profile under multiple operating conditions, and preprocess the CFD simulation data to obtain a standardized training dataset.

[0057] S2: Based on the standardized training dataset, a hybrid neural network model is constructed with airfoil geometry parameters and operating condition parameters as inputs and a two-dimensional viscous compressible flow field as output; wherein, the hybrid neural network model extracts local flow field features through a convolutional structure and extracts global flow field features through an attention mechanism, and fuses the local flow field features and the global flow field features to generate a high-fidelity two-dimensional viscous compressible flow field prediction result;

[0058] S3: Based on the standardized training dataset, construct the gradient loss term and the physical consistency loss term;

[0059] S4: The mean squared error loss, the gradient loss term, and the physical consistency loss term are weighted and fused to construct the total loss function, and the hybrid neural network model is trained end-to-end using the standardized training dataset until convergence, to obtain the trained flow field prediction model.

[0060] S5: Preprocess the geometric parameters and operating condition parameters of the blade profile to be predicted, and input them into the flow field prediction model to output the two-dimensional viscous compressible flow field prediction results.

[0061] In some embodiments of step S1, the CFD simulation data includes flow field variables, airfoil geometric parameters, and operating condition parameters. The flow field variables include density ρ, static pressure p, static temperature T, x-direction velocity u, and y-direction velocity v. The airfoil geometric parameters include at least three of the following: chord length c, maximum thickness t, maximum thickness location, leading edge radius, and bend angle. The operating condition parameters include incoming Mach number Ma, angle of attack α, and Reynolds number Re.

[0062] The preprocessing of the CFD simulation data includes:

[0063] S11: The flow field data in the CFD simulation data is mapped to a two-dimensional structured grid of fixed size H×W by bilinear interpolation, where H and W are integers between 128 and 512 to ensure the consistency of the input data dimensions.

[0064] S12: The blade geometry parameters, operating condition parameters, and flow field variables are independently normalized using min-max normalization to obtain a standardized training dataset.

[0065] In practice, the formula for normalization can be uniformly described as follows:

[0066] ;

[0067] in, The normalized value. This is the original data (grid coordinates corresponding to the geometric parameters). , These are the minimum and maximum values ​​of the dataset (the maximum and minimum values ​​of the grid coordinates in the grid).

[0068] Furthermore, in step S2, the hybrid neural network model adopts a "fully convolutional encoding-Transformer global fusion-convolutional decoding" architecture, such as... Figure 2 As shown, it includes a fully convolutional sub-network, an aggregation module, and a convolutional decoder connected in sequence, as well as a Transformer sub-network connected to the fully convolutional sub-network and the aggregation module.

[0069] The Fully Convolutional Subnetwork (FCB) is built upon an advanced Fully Convolutional Network (FCN) to extract multi-scale local flow field features and embeds Local Enhancement Attention (LE) modules in some convolutional blocks. Specifically, the FCB includes improved residual blocks (RBs) with band group normalization, SiLU activation function, and residual connections, and incorporates skip connections similar to DenseU-Net. The FCB directly generates feature maps of the same resolution (h×w) from the input h×w size image.

[0070] The Transformer subnetwork (TB) receives the intermediate features output by the fully convolutional subnetwork in the deep encoding stage, and uses the Pyramid Visual Transformer (PVTv2) or SSFormer architecture to model global spatial dependencies and generate global flow field features.

[0071] The aggregation module receives the local flow field features and the global flow field features, and fuses them at multiple scales.

[0072] Specifically, the TB encoder is based on the ImageNet pre-trained Pyramid Visual Transformer v2 (PVTv2) to extract key segmentation features. The TB architecture is based on the state-of-the-art (SOTA) model SSFormer and introduces an improved convolutional decoder (PLD). This module optimizes the high-level semantic information extracted by the Transformer encoder through enhanced local attention (LE) and split feature aggregation (SFA). TB outputs a downsampled low-resolution feature map (h / 4×w / 4). The output tensor of TB is upsampled to full size and concatenated with the feature map of FCB along the channel dimension. TB contains 2-4 encoder layers, each consisting of a multi-head attention mechanism and a feed-forward network. The local features output by the convolutional encoder are flattened into sequential features, and the self-attention mechanism captures cross-regional global flow field correlations (such as the interaction between shock waves and downstream flow). The multi-head self-attention calculation formula is as follows:

[0073] ;

[0074] ;

[0075] Where Q, K, and V are the query vector, key vector, and value vector, respectively. , , Let be the projection matrix. To output the projection matrix, Let be the number of attention heads for the i-th attention.

[0076] The convolutional decoder receives the fused features and restores the spatial resolution of the flow field through progressive upsampling and residual convolution, outputting a high-fidelity two-dimensional viscous compressible flow field prediction result with the same size as the input grid. In specific implementation, the convolutional decoder processes the fused features into a complete segmentation map of the input image through the prediction head (PH), that is, restores the two-dimensional flow field distribution, and the output dimension is consistent with the input grid size. The PH consists of a pixel-level prediction layer composed of residual blocks and 1×1 convolutions.

[0077] In one embodiment of step S3, the gradient loss term is used to enhance the fidelity of the flow field spatial structure, and its construction method includes:

[0078] S301: For each physical variable in the flow field, an anisotropic differential convolution kernel is used to calculate its numerical gradient in the x and y directions, respectively. The anisotropic differential convolution kernel has an asymmetric weight distribution in the horizontal and vertical directions. The physical variables include at least two of density, velocity components, pressure, and temperature. Specifically, the Sobel operator can be used to calculate the predicted flow field. With real flow field ( This represents the gradient of ρ, p, T, u, v in the x and y directions.

[0079] S302: Based on the real flow field in the standardized training dataset and the predicted flow field output by the hybrid neural network model, obtain the corresponding real gradient and predicted gradient respectively, and calculate the L1 norm distance between them as the gradient loss term.

[0080] Gradient loss term The expression is:

[0081] ;

[0082] Where N is the total number of grid nodes, , The gradients in the x and y directions (calculated by convolution using the Sobel operator) are used to constrain the spatial variation of the flow field and improve the prediction accuracy of regions such as the shear layer and leading-edge pressure gradient.

[0083] In another embodiment of step S3, the physical consistency loss term is based on the Reynolds-averaged Navier-Stokes (RANS) equation residuals to constrain the conservation of mass, momentum, and energy, and its construction method includes:

[0084] S311: Perform spatial differentiation on the physical variables in the predicted flow field output by the hybrid neural network model to obtain the velocity gradient, pressure gradient and temperature gradient, wherein the spatial differentiation is implemented by the central difference approximation.

[0085] S312: Substitute the velocity gradient, the pressure gradient, and the temperature gradient into the continuity equation, the momentum equation in the x-direction, the momentum equation in the y-direction, and the energy equation, and calculate the residuals of each equation;

[0086] S313: Take the weighted sum of squares of the residuals of all equations to obtain the physical consistency loss term.

[0087] Specifically, the process of establishing the physical consistency loss term is as follows:

[0088] (1) Using the density, x-direction velocity u, y-direction velocity v, and time t in the flow field parameters, the residual of the continuity equation :

[0089] ;

[0090] In steady-state flow .

[0091] (2) Residual of momentum equation in the x-direction :

[0092] ;

[0093] (3) Residual of momentum equation in the y-direction :

[0094] ;

[0095] in, , where is the viscous stress tensor component in the xx direction. For the viscous stress tensor components in the xy direction, Let y be the viscous stress tensor component in the yy direction. , , , Let x be the strain rate tensor component in the x direction. The strain rate tensor components are in the xy direction. The strain rate tensor components are in the yy direction. For volumetric strain rate, The dynamic viscosity is calculated using the Sutherland formula.

[0096] (4) Energy equation residuals :

[0097] ;

[0098] in, For total enthalpy, For static enthalpy, For isobaric specific heat capacity, is the thermal conductivity.

[0099] (5) Physical loss The calculation formula is:

[0100] .

[0101] In some embodiments of step S4, the total loss function is expressed as:

[0102] ;

[0103] in, For the total loss function, , , These are the mean squared error loss, gradient loss term, and physical consistency loss term, respectively. , , These are the weights of the variance loss, gradient loss term, and physical consistency loss term, respectively, where, satisfying... The range of values ​​is , , .

[0104] Among them, the mean square error loss between the predicted flow field and the actual flow field It can be represented as:

[0105] ;

[0106] in, , , , , These are the predicted flow fields for the i-th operating condition, respectively. , , , , These represent the actual flow fields under the i-th operating condition.

[0107] When training a hybrid neural network model end-to-end, the Adam optimizer can be used to train the network, with a learning rate set to [value missing]. The number of iterations is Training continues until the total loss function converges. The training stops when the total loss value of the validation set (...) The decrease was less than 10 times in 10 consecutive iterations. ,Right now k is the number of training iterations.

[0108] This invention presents a rapid prediction method for two-dimensional viscous compressible flow fields in compressors. It constructs a hybrid neural network architecture integrating convolution and attention mechanisms, and introduces dual supervision signals: gradient structure constraints and physical equation residuals, to achieve synergistic optimization based on data-driven approaches and physical laws. Specifically, the method first extracts the fine local structure of the flow field (such as boundary layer gradients and leading-edge pressure abrupt changes) through a fully convolutional sub-network, while simultaneously using a Transformer sub-network to model cross-regional global dependencies (such as the impact of shock wave propagation on downstream wakes). Based on this, a step-by-step feature aggregation and progressive decoding mechanism is designed to fuse multi-scale local and global information to reconstruct a high-fidelity flow field. Furthermore, by jointly optimizing three losses—mean squared error (data fitting), gradient L1 loss (spatial structure fidelity), and RANS equation residual loss (mass, momentum, and energy conservation)—the model strictly satisfies the laws of fluid dynamics while maintaining high accuracy.

[0109] Based on the same inventive concept, this invention also provides a rapid prediction system for a two-dimensional viscous compressible flow field of a compressor, as described in the following embodiments. Since the principle of the rapid prediction system for a two-dimensional viscous compressible flow field of a compressor is similar to that of the rapid prediction method for a two-dimensional viscous compressible flow field of a compressor, the implementation of the rapid prediction system for a two-dimensional viscous compressible flow field of a compressor can refer to the implementation of the rapid prediction method for a two-dimensional viscous compressible flow field of a compressor disclosed in the above embodiments, and will not be repeated. As used below, the terms "unit" or "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0110] Figure 3 This is a structural block diagram of a rapid prediction system for a two-dimensional viscous compressible flow field of a compressor disclosed in an embodiment of the present invention, as shown below. Figure 3 As shown, the system includes a data preprocessing unit 301, a hybrid modeling unit 302, a dual-constraint loss unit 303, a joint training unit 304, and a fast inference unit 305. The structure is described below.

[0111] Specifically, the data preprocessing unit 301 is used to acquire CFD simulation data of the compressor's two-dimensional blade profile under multiple operating conditions, and to preprocess the CFD simulation data to obtain a standardized training dataset.

[0112] The hybrid modeling unit 302 is used to construct a hybrid neural network model based on the standardized training dataset, taking airfoil geometry parameters and operating condition parameters as inputs and a two-dimensional viscous compressible flow field as output. The hybrid neural network model extracts local flow field features through a convolutional structure and extracts global flow field features through an attention mechanism. The local flow field features and the global flow field features are fused to generate a high-fidelity two-dimensional viscous compressible flow field prediction result.

[0113] The dual-constraint loss unit 303 is used to construct a gradient loss term and a physical consistency loss term based on the standardized training dataset;

[0114] The joint training unit 304 is used to construct a total loss function by weighted fusion of the mean squared error loss, the gradient loss term and the physical consistency loss term, and to perform end-to-end training on the hybrid neural network model using the standardized training dataset until convergence, thereby obtaining the trained flow field prediction model.

[0115] The fast inference unit 305 is used to preprocess the geometric parameters and operating condition parameters of the airfoil to be predicted, and input them into the flow field prediction model to output the two-dimensional viscous compressible flow field prediction results.

[0116] This invention uses the NACA 65 K48 airfoil as the research object to verify the effectiveness of the method of this invention.

[0117] Step 1: Set parameters

[0118] Blade profile and operating conditions: The commonly used NACA 65 K48 blade profile for compressors is selected, with a chord length c=100mm and a maximum thickness t / c=0.12; operating range: incoming Mach number Ma=0.4~0.7, angle of attack α=0°~8°, Reynolds number Re=5e 5 ~1e 6 (Based on chord length);

[0119] CFD data generation: The two-dimensional compressible RANS equations were solved using STAR-CCM+ software, and the SST k-ω model was selected as the turbulence model. The computational grid was a 256×128 structured grid, and the computational domain ranged from -0.5c to 1.5c in the x-direction and from -1.0c to 1.0c in the y-direction. A total of 5000 sets of CFD flow field data were generated (4000 sets for training, 500 sets for validation, and 500 sets for testing).

[0120] Data preprocessing: min-max normalization was used to normalize the airfoil geometric parameters (chord length, maximum thickness), operating parameters (Ma, α, Re), and flow field parameters (ρ, p, T, u, v), with a normalization range of [0,1].

[0121] Network structure parameters: The convolutional encoder uses 4 convolutional layers with kernel sizes of 3×3, and the number of kernels is 64, 128, 256, and 512 respectively. The activation function is ReLU. Each layer is followed by a BN layer and a max pooling layer (stride 2). The Transformer module uses a 2-layer encoder with 8 attention heads h, 1024 hidden layer dimensions, and a dropout rate of 0.1. The convolutional decoder uses 4 transposed convolutional layers with kernel sizes of 3×3, and the number of kernels is 512, 256, 128, and 64 respectively. The final output layer has 5 channels (corresponding to 5 flow parameters).

[0122] Loss weight settings: (MSE loss) (Gradient loss) (Physical loss);

[0123] Training parameters: Optimizer is Adam, initial learning rate is 1e -4 Number of iterations: 3e 4 Batch size = 32.

[0124] Step 2: Make a prediction

[0125] Generate a CFD flow field dataset for the NACA 65 K48 blade according to the above parameters, and complete the grid standardization and normalization process.

[0126] Build a CNN-Transformer hybrid network and write code to calculate gradient loss, physical loss, and total loss function (based on the PyTorch framework).

[0127] Train the network by inputting the training set data, and monitor the total loss value of the training set and validation set in real time. When the loss of the validation set does not decrease for 500 consecutive iterations, stop training (final convergence loss value ≤ 1e-5).

[0128] The model performance was validated using test set data: input airfoil geometry parameters + operating parameters (e.g., Ma=0.6, α=4°, Re=8e). 5 The network outputs the predicted flow field.

[0129] The predicted flow field is compared with the actual CFD flow field, the error indices (MAE, RMSE) are calculated, and the prediction accuracy of key flow characteristics such as shock wave location and boundary layer thickness is analyzed.

[0130] Step 3: Implementation Results

[0131] Prediction speed: A single flow field prediction takes about 5ms, which is 1080 times faster than the CFD simulation of STAR-CCM+ (about 5 hours), meeting the requirement of millisecond-level fast prediction;

[0132] Prediction accuracy: Mean absolute error (MAE) of each flow field parameter: ρ≤2.1%, p≤2.8%, T≤2.5%, u≤3.0%, v≤3.2%; Shock wave location prediction deviation ≤0.5mm, boundary layer thickness prediction deviation ≤3%;

[0133] Physical consistency: The residuals of the continuity equations for the predicted flow field are ≤1e -4 The residual of the momentum equation is ≤5e -4 The residual of the energy equation is ≤8e -4 All of them meet the engineering precision requirements and there are no flow phenomena that violate the laws of physics;

[0134] Generalization ability: For the flow field prediction of NACA 65 K48 blade under untrained conditions (such as Ma=0.55, α=6°), the error index is consistent with that of the training conditions, and the generalization performance is excellent.

[0135] The embodiments of the present invention achieve the following technical effects:

[0136] 1. Extremely fast inference speed, supporting rapid iteration at the engineering level: The model takes ≤10 milliseconds for a single inference, which is more than 1000 times faster than traditional CFD simulation based on RANS equations (which usually takes several hours). It can efficiently support scenarios that require thousands to tens of thousands of flow field assessments, such as compressor blade multi-parameter optimization and uncertainty quantification.

[0137] 2. High prediction accuracy: By using the CNN-Transformer hybrid architecture to collaboratively model local details and global relationships, and by using gradient loss to constrain the spatial continuity of high gradient regions such as shear layers and shock waves, this method achieves a mean absolute error (MAE) of ≤3% for each flow field variable on the test set, which is significantly better than a single CNN (ignoring global interactions) or a single Transformer (weakening local gradients) model.

[0138] 3. Good physical consistency and high engineering reliability: By introducing the residuals of the continuity equation, momentum equation, and energy equation as physical consistency loss terms, the network output is forced to satisfy the basic conservation laws. Experiments show that the continuity residual of the predicted flow field is ≤1×10⁻⁴, and the momentum residual is ≤5×10⁻⁴, effectively avoiding non-physical problems such as mass non-conservation and energy anomalies that may occur in purely data-driven models, and greatly improving engineering practicality.

[0139] 4. Strong generalization ability and wide applicability: This invention utilizes standardized grid mapping and independent parameter normalization preprocessing to enable the prediction model to be adapted to various compressor two-dimensional blade profiles (such as NACA series and C4 series) and a wide operating range (incoming Mach number 0.3–0.8, angle of attack...). (5° to 10°, Reynolds number 105–106), no need for retraining for new blade shapes or operating conditions, significantly reducing deployment costs.

[0140] In this embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the above-described method for rapid prediction of two-dimensional viscous compressible flow fields in a compressor.

[0141] Specifically, the computer device can be a computer terminal, a server, or a similar computing device.

[0142] In this embodiment, a computer-readable storage medium is provided, which stores a computer program that executes any of the above-described methods for rapid prediction of two-dimensional viscous compressible flow fields in a compressor.

[0143] Specifically, computer-readable storage media, including both permanent and non-permanent, removable and non-removable media, can store information using any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer-readable storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable storage media does not include transient media, such as modulated data signals and carrier waves.

[0144] Obviously, those skilled in the art should understand that the modules or steps of the above-described embodiments of the present invention can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. Optionally, they can be implemented using computer-executable program code, thereby storing them in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those presented here, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the embodiments of the present invention are not limited to any particular hardware and software combination.

[0145] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, various modifications and variations can be made to the embodiments of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for rapid prediction of two-dimensional viscous compressible flow field in a compressor, characterized in that, include: CFD simulation data of two-dimensional compressor blades under multiple operating conditions are obtained, and the CFD simulation data is preprocessed to obtain a standardized training dataset. Based on the standardized training dataset, a hybrid neural network model is constructed with airfoil geometry parameters and operating condition parameters as inputs and a two-dimensional viscous compressible flow field as output. The hybrid neural network model extracts local flow field features through a convolutional structure and extracts global flow field features through an attention mechanism. The local flow field features and the global flow field features are fused to generate high-fidelity two-dimensional viscous compressible flow field prediction results. Based on the standardized training dataset, a gradient loss term and a physical consistency loss term are constructed; The mean squared error loss, the gradient loss term, and the physical consistency loss term are weighted and fused to construct a total loss function. The hybrid neural network model is then trained end-to-end using the standardized training dataset until convergence, thus obtaining the trained flow field prediction model. The geometric parameters and operating condition parameters of the blade profile to be predicted are preprocessed and input into the flow field prediction model to output the two-dimensional viscous compressible flow field prediction results. The hybrid neural network model includes: The fully convolutional subnetwork, built on an advanced fully convolutional network, is used to extract multi-scale local flow field features and embeds local enhanced attention modules in some convolutional blocks; The Transformer subnetwork receives the intermediate features output by the fully convolutional subnetwork in the deep encoding stage, and uses the pyramid visual Transformer or SSFormer architecture to model global spatial dependencies and generate global flow field features. The aggregation module receives the local flow field features and the global flow field features, and fuses them at multiple scales; The convolutional decoder receives fused features and restores the spatial resolution of the flow field through progressive upsampling and residual convolution, outputting a high-fidelity two-dimensional viscous compressible flow field prediction result with the same size as the input grid.

2. The method for rapid prediction of two-dimensional viscous compressible flow field in a compressor according to claim 1, characterized in that, The CFD simulation data includes flow field variables, airfoil geometry parameters, and operating condition parameters. The flow field variables include density, static pressure, static temperature, x-direction velocity, and y-direction velocity. The airfoil geometry parameters include at least three of the following: chord length, maximum thickness, maximum thickness location, leading edge radius, and bend angle. The operating condition parameters include incoming Mach number, angle of attack, and Reynolds number.

3. The method for rapid prediction of two-dimensional viscous compressible flow field in a compressor according to claim 1 or 2, characterized in that, The CFD simulation data is preprocessed, including: The flow field data in the CFD simulation data is mapped to a fixed-size two-dimensional structured mesh using bilinear interpolation. The blade geometry parameters, operating condition parameters, and flow field variables are independently normalized using min-max normalization to obtain a standardized training dataset.

4. The method for rapid prediction of two-dimensional viscous compressible flow field in a compressor according to claim 1, characterized in that, The gradient loss term is used to enhance the fidelity of the spatial structure of the flow field, and its construction method includes: For each physical variable in the flow field, an anisotropic differential convolution kernel is used to calculate its numerical gradient in the x and y directions respectively. The anisotropic differential convolution kernel has an asymmetric weight distribution in the horizontal and vertical directions. Based on the real flow field in the standardized training dataset and the predicted flow field output by the hybrid neural network model, the corresponding real gradient and predicted gradient are obtained respectively, and the L1 norm distance between them is calculated as the gradient loss term. The physical variables include at least two of the following: density, velocity component, pressure, and temperature.

5. The method for rapid prediction of two-dimensional viscous compressible flow field in a compressor according to claim 1, characterized in that, The physical consistency loss term is based on the Reynolds-averaged Navier-Stokes (RANS) equation residuals to constrain the conservation of mass, momentum, and energy. Its construction method includes: Spatial differentiation is performed on the physical variables in the predicted flow field output by the hybrid neural network model to obtain the velocity gradient, pressure gradient and temperature gradient, wherein the spatial differentiation is implemented by the central difference approximation. Substitute the velocity gradient, pressure gradient, and temperature gradient into the continuity equation, the momentum equation in the x-direction, the momentum equation in the y-direction, and the energy equation, and calculate the residuals of each equation. The physical consistency loss term is obtained by weighted sum of squares of the residuals of all equations.

6. The method for rapid prediction of two-dimensional viscous compressible flow field in a compressor according to claim 1, characterized in that, The total loss function is expressed as: ; in, For the total loss function, , , These are the mean squared error loss, gradient loss term, and physical consistency loss term, respectively. , , These are the weights of the variance loss, gradient loss, and physical consistency loss, respectively.

7. A rapid prediction system for two-dimensional viscous compressible flow fields in a compressor, characterized in that, include: The data preprocessing unit is used to acquire CFD simulation data of the compressor's two-dimensional blade profile under multiple operating conditions, and to preprocess the CFD simulation data to obtain a standardized training dataset. A hybrid modeling unit is used to construct a hybrid neural network model based on the standardized training dataset, taking airfoil geometry parameters and operating condition parameters as inputs and a two-dimensional viscous compressible flow field as output. The hybrid neural network model extracts local flow field features through a convolutional structure and extracts global flow field features through an attention mechanism. The local flow field features and the global flow field features are fused to generate a high-fidelity two-dimensional viscous compressible flow field prediction result. The hybrid neural network model includes: The fully convolutional subnetwork, built on an advanced fully convolutional network, is used to extract multi-scale local flow field features and embeds local enhanced attention modules in some convolutional blocks; The Transformer subnetwork receives the intermediate features output by the fully convolutional subnetwork in the deep encoding stage, and uses the pyramid visual Transformer or SSFormer architecture to model global spatial dependencies and generate global flow field features. The aggregation module receives the local flow field features and the global flow field features, and fuses them at multiple scales; The convolutional decoder receives fused features and restores the spatial resolution of the flow field through progressive upsampling and residual convolution, outputting a high-fidelity two-dimensional viscous compressible flow field prediction result with the same size as the input grid. A dual-constraint loss unit is used to construct a gradient loss term and a physical consistency loss term based on the standardized training dataset; The joint training unit is used to construct a total loss function by weighting and fusing the mean squared error loss, the gradient loss term, and the physical consistency loss term, and to perform end-to-end training on the hybrid neural network model using the standardized training dataset until convergence, thereby obtaining the trained flow field prediction model. The fast inference unit is used to preprocess the geometric parameters and operating condition parameters of the airfoil to be predicted, and input them into the flow field prediction model to output the two-dimensional viscous compressible flow field prediction results.

8. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method for rapid prediction of two-dimensional viscous compressible flow field of a compressor as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that executes the rapid prediction method for a two-dimensional viscous compressible flow field of a compressor according to any one of claims 1 to 6.