A CFD calculation method and system based on neural network and adaptive parameter optimization

CN121809350BActive Publication Date: 2026-10-27SHENZHEN Y& D ELECTRONICS CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202610291795.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-03-11
Publication Date
2026-10-27
Estimated Expiration
2046-03-11

AI Technical Summary

Technical Problem

在强梯度、多尺度并存的复杂流动(如激波-边界层干扰)中,现有模型常因简化假设而导致预测偏差;且计算精度本质上受限于网格分辨率和数值格式的截断误差,缺乏智能化手段对离散误差进行在线识别与补偿

Benefits of technology

[0021]由上可知,本申请提供的一种基于神经网络与自适应参数优化的CFD计算方法及系统,通过构建深度融入物理约束的神经网络模块和实时感知求解状态并动态调整关键参数的自适应优化模块,对传统CFD求解器输出的中间流场进行物理一致性修正并对求解参数进行智能调控,解决了传统CFD方法在复杂流动模拟中预测精度不足、收敛困难及过度依赖人工调参的问题,具有能够显著提升流场预测的物理一致性与计算收敛效率,实现求解过程智能自适应的优点。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121809350B_ABST
    Figure CN121809350B_ABST
Patent Text Reader

Abstract

The application discloses a CFD calculation method and system based on a neural network and adaptive parameter optimization, and belongs to the technical field of computational fluid dynamics. A flow field is initialized by reading calculation parameters and a grid file; N-S equations are solved, solving parameters are recorded, and an intermediate flow field is output; the intermediate flow field is input into a pre-trained physically constrained neural network, boundary condition hard constraints and soft constraints based on control equation residuals are sequentially applied, and a corrected flow field is output; based on convergence dynamic characteristics and solving parameters, a parameter adjustment amount is output by a strategy network trained through reinforcement learning, and the solving parameters are dynamically optimized; the corrected flow field is taken as an initial flow field of a next iteration step, and the solving parameters are updated and circularly executed until convergence. The application embeds physical priori in a neural network, and realizes intelligent adaptive regulation and control of solving parameters through reinforcement learning, so that the prediction precision and convergence efficiency of complex flow simulation are significantly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computational fluid dynamics, and more specifically, to a CFD calculation method and system based on neural networks and adaptive parameter optimization. Background Technology

[0002] Computational fluid dynamics (CFD) is a core numerical tool for studying fluid flow, heat transfer, and related physical phenomena. Its prediction accuracy and computational efficiency directly affect the design cycle and performance limits of equipment such as aircraft and automobiles. As engineering problems become increasingly complex, traditional CFD computational frameworks face severe challenges due to insufficient model accuracy and difficulties in computational convergence. For example, for complex physical processes such as turbulence and rarefied flow, traditional constitutive models based on experience and simplification (such as the RANS turbulence model) struggle to accurately capture multi-scale, non-equilibrium flow details, leading to significant deviations between predictions and experiments. Furthermore, strong nonlinearity and multi-physics coupling often cause oscillations, divergences, or stagnation in the numerical solution process. This reliance on expert experience to manually adjust dozens of solution parameters, such as time step, relaxation factor, and numerical dissipation, severely impacts convergence stability.

[0003] In recent years, artificial intelligence (AI) has brought a new research paradigm to CFD. Data-driven methods (such as deep learning) can mine complex mapping relationships from massive amounts of high-fidelity simulation data and build alternative models to accelerate flow field prediction. However, purely data-driven models generally suffer from inherent defects such as lack of physical consistency, weak extrapolation and generalization ability, and huge training data requirements. Prediction results may violate fundamental physical laws such as mass or energy conservation, and performance drops sharply outside the training data distribution (such as under new flow conditions or geometries). At the same time, most existing AI-assisted solution methods are limited to a static "preprocessing-training-prediction" model, failing to deeply embed AI into the solver iteration loop to achieve dynamic, online intelligent solution processes, and unable to adaptively adjust strategies based on real-time solution status to overcome convergence difficulties. Existing parameter tuning CFD calculations based on classical optimization algorithms use trial-and-error methods (such as genetic algorithms and simplex methods) to adjust parameters such as relaxation factors and time steps to improve convergence. Although this achieves some degree of automated parameter adjustment, it still has the following limitations: (1) Low computational accuracy and weak generalization ability. The accuracy of traditional CFD calculations is heavily dependent on the selected physical model (such as turbulence model, chemical reaction mechanism) and numerical scheme. In complex flows with strong gradients and multiple scales (such as shock wave-boundary layer disturbance), existing models often lead to prediction bias due to simplification assumptions; and the computational accuracy is essentially limited by the truncation error of the grid resolution and numerical scheme, lacking intelligent means to identify and compensate for discrete errors online. In addition, traditional methods rely heavily on expert experience to set model parameters. For new working conditions not covered by training data (such as new configurations and extreme inflow conditions), their prediction generalization ability drops significantly, making it difficult to guarantee the reliability of physical results.

[0004] (2) Low optimization efficiency. Existing automatic parameter tuning methods are mostly offline-evaluation optimizations, meaning that after each parameter adjustment, a complete CFD simulation must be run again to evaluate the convergence effect, resulting in extremely high computational costs and long time consumption in the tuning process. At the same time, optimization decisions are usually based on global statistical indicators (such as the final residual) and cannot perceive the instantaneous dynamic behavior of the solver during the iteration process (such as local residual oscillation modes and physical quantity evolution trends), thus failing to achieve timely intervention at the iteration step level. In addition, when multiple parameters need to be adjusted in a coordinated manner (such as time step, relaxation factors of each equation, and numerical dissipation coefficients), the parameter space dimension increases dramatically, causing the search efficiency of classical optimization algorithms to decrease sharply, and even making it difficult to find feasible solutions.

[0005] (3) Poor perception-feedback capability. Traditional CFD solvers lack embedded intelligent perception and diagnostic modules, making it impossible to perform in-depth state monitoring and understanding of the solution process. The optimizer can only obtain limited output information (such as residual norm) and cannot analyze changes in the physical mechanisms inside the flow in real time (such as shock wave position movement and changes in multi-physics coupling intensity). This results in parameter adjustment strategies that are often blind and lagging, unable to accurately suppress numerical instability in its early stages, and unable to adaptively switch optimization targets according to the evolution of flow characteristics. As a result, it is difficult to achieve stable and efficient near real-time simulation, which seriously restricts its application in rapid iteration scenarios such as digital design and virtual sea trials.

[0006] To address the aforementioned issues, existing technologies urgently need improvement. Summary of the Invention

[0007] The purpose of this application is to provide a CFD calculation method and system based on neural networks and adaptive parameter optimization. By constructing a neural network that is deeply integrated with physical constraints and an adaptive optimization that can sense the solution status in real time and dynamically adjust key parameters, the physical rationality of the prediction and the convergence stability are guaranteed, providing support for subsequent analysis.

[0008] Firstly, this application provides a CFD calculation method based on neural networks and adaptive parameter optimization, the technical solution of which includes: Initialization steps: Read the calculation parameters and mesh file of the current calculation task, determine whether a restart file exists, if it exists, load the flow field data; otherwise, initialize the flow field based on the incoming flow conditions. CFD solution steps: Solve the NS equations based on the finite volume method, record the solution parameters of the current iteration step and output the intermediate flow field; the solution parameters include time step, relaxation factor and numerical dissipation coefficient; Physical constraint correction step: Input the intermediate flow field and grid coordinates into the pre-trained physical constraint neural network, apply hard boundary condition constraints and soft constraints based on the residuals of the control equations in sequence, and output a corrected flow field; Adaptive parameter optimization steps: Based on the convergence dynamic features of the current and historical iteration steps and the solution parameters, the policy network trained by reinforcement learning outputs the parameter adjustment amount for the next iteration step to dynamically optimize the time step, relaxation factor and numerical dissipation coefficient. Feedback and loop steps: The modified flow field is used as the initial flow field for the next iteration of the CFD solution step, and the solution parameters are updated by applying the parameter adjustment amount. Then, the CFD solution step is returned to be executed until the flow field calculation results meet the preset convergence conditions.

[0009] Furthermore, the calculation parameters include flight altitude, flight speed, and chemical reaction model; The flow field initialization includes: adaptively selecting the NS equation type based on the flight altitude and flight speed, and matching the corresponding chemical reaction model.

[0010] Furthermore, the application of hard boundary condition constraints includes: The intermediate flow field and grid coordinates are input into a pre-trained physical constraint neural network, and a preliminary predicted flow field is obtained through forward propagation of the network. In the output layer of the neural network, hard boundary conditions are applied to the initially predicted flow field to obtain the flow field U after hard constraint correction. AI,hard n ; The hard constraints of the boundary conditions include: for the identified wall boundary nodes, setting their velocity vector to zero to satisfy the no-slip condition; for the symmetry plane boundary nodes, making the physical quantities of the corresponding nodes on both sides of the symmetry plane equal.

[0011] Furthermore, the soft constraint based on the residuals of the governing equations includes: For the flow field U after the hard constraint correction AI,hard n The residual operator for the Navier-Stokes equations is defined as follows: ;where, U=[ρ,ρu,ρv,ρw,ρE] T It is a conserved variable; For convection terms, For diffusion terms; The flow field U is calculated by automatic differentiation on a discrete grid. AI,hard n At each sampling point The residuals on the surface are calculated, and the physical loss is calculated. Let the norm of the residual be: ;in, This represents the total number of sampling points; To minimize the physical loss For the target, the flow field U AI,hard n Fine-tuning was performed to obtain the final corrected flow field U. AI n .

[0012] Furthermore, the convergence dynamic characteristics include the current residual norm, residual descent rate, residual oscillation frequency, and amplitude.

[0013] Preferably, the policy network trained through reinforcement learning outputs the parameter adjustment for the next iteration, including: The convergence dynamic features are combined with the current solution parameters to construct a multidimensional state feature vector; The multidimensional state feature vector is input into the policy network pre-trained by reinforcement learning; the policy network outputs the parameter adjustments for the time step, relaxation factor, and numerical dissipation coefficient.

[0014] Furthermore, the reinforcement learning pre-trained policy network is trained using a deep deterministic policy gradient algorithm, and its reward function during training includes: Convergence Rewards:

[0015] Stability penalty: Among them, osc level This is an oscillation index calculated based on the residual history; Step penalty items: ; And parameter adjustment penalty items: ; Among them, R t Let represent the global residual norm at step t. , , , , Preset weighting coefficients; This is an oscillation index calculated based on the residual history; Adjust the vector for the parameters.

[0016] Furthermore, updating the solution parameters by applying the parameter adjustment amount includes: For time step Indirect updates are achieved by adjusting the number of CFLs:

[0017]

[0018] Where, η CFL It is the learning rate of the CFL number; For the relaxation factor, the pressure equation and the equations for each velocity component are updated respectively, and the updated relaxation factor is limited to a preset range. For numerical dissipation coefficients, their update values ​​are restricted to a range that is non-negative and does not exceed a preset upper limit.

[0019] Furthermore, the preset convergence conditions include: Calculate the global residual norm based on the modified flow field and monitor the rate of change of key physical quantities. When the global residual norm drops below a preset threshold and the rate of change of the key physical quantities in multiple consecutive iterations is less than a specific tolerance, it is determined that the convergence condition is met. The key physical quantities include the lift coefficient and the drag coefficient.

[0020] Secondly, this application also proposes a CFD computing system based on neural networks and adaptive parameter optimization, comprising: The initialization module is used to read the calculation parameters and mesh file of the current calculation task, determine whether a restart file exists, and if so, load the flow field data; otherwise, it performs flow field initialization based on the incoming flow conditions. The CFD solution module is used to solve the Navier-Stokes equations based on the finite volume method, record the solution parameters of the current iteration step, and output the intermediate flow field; the solution parameters include the time step, relaxation factor, and numerical dissipation coefficient. The physical constraint correction module is used to input the intermediate flow field and grid coordinates into a pre-trained physical constraint neural network, and sequentially apply hard boundary condition constraints and soft constraints based on the residuals of the control equations, and output a corrected flow field. An adaptive parameter optimization module is used to dynamically optimize the time step, relaxation factor, and numerical dissipation coefficient by outputting the parameter adjustment amount for the next iteration step through a policy network trained by reinforcement learning, based on the convergence dynamic features of the current and historical iteration steps and the solution parameters. The feedback and loop module is used to take the modified flow field as the initial flow field for the next iteration of the CFD solution step, update the solution parameters by applying the parameter adjustment amount, and then return to execute the CFD solution step until the flow field calculation result meets the preset convergence condition.

[0021] As can be seen from the above, the CFD calculation method and system based on neural networks and adaptive parameter optimization provided in this application, by constructing a neural network module deeply integrated with physical constraints and an adaptive optimization module that senses the solution status in real time and dynamically adjusts key parameters, performs physical consistency correction on the intermediate flow field output by the traditional CFD solver and intelligently controls the solution parameters. This solves the problems of insufficient prediction accuracy, difficulty in convergence, and excessive reliance on manual parameter tuning in traditional CFD methods in complex flow simulations. It has the advantages of significantly improving the physical consistency and computational convergence efficiency of flow field prediction and achieving intelligent adaptive solution process. Attached Figure Description

[0022] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0023] Figure 1 This is a flowchart illustrating the steps of the CFD calculation method based on neural networks and adaptive parameter optimization disclosed in an embodiment of the present invention. Figure 2 This is a schematic diagram of the CFD computing system structure based on neural networks and adaptive parameter optimization disclosed in an embodiment of the present invention; Figure 3 This is a functional framework structure diagram of another CFD computing system based on neural networks and adaptive parameter optimization disclosed in an embodiment of the present invention; Figure 4 This is another CFD computing system operation flowchart based on neural networks and adaptive parameter optimization disclosed in an embodiment of the present invention; Figure 5 This is a flowchart illustrating the specific implementation steps disclosed in the embodiments of the present invention. Detailed Implementation

[0024] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which these embodiments belong; the terminology used herein and in the specification of the application is for the purpose of describing particular embodiments only and is not intended to limit these embodiments; the terms "comprising" and "having," and any variations thereof, in the specification of these embodiments and the foregoing drawings, are intended to cover non-exclusive inclusion. The terms "first," "second," etc., in the specification of these embodiments and the foregoing drawings are used to distinguish different objects, not to describe a particular order.

[0025] The implementation details of the technical solution in this embodiment are described in detail below: In the field of computational fluid dynamics (CFD), high-precision and high-efficiency flow field simulation has always been a core requirement in industrial design, such as aerospace and automotive engineering. As engineering problems become increasingly complex, traditional CFD methods, when faced with complex flow phenomena involving multiple scales and strong coupling, such as strong shock waves, boundary layer separation, and non-equilibrium chemical reactions, suffer from prediction accuracy heavily reliant on the simplification assumptions of the physical model and the truncation error of the numerical scheme. Simultaneously, the numerical stability and convergence speed of the solution process are highly dependent on expert experience in manually adjusting dozens of solution parameters, such as the time step and relaxation factor. Improper parameter settings can easily lead to oscillations, divergence, or convergence stalls, severely limiting simulation efficiency and design iteration cycles. Therefore, how to achieve high-precision prediction of complex flow fields and intelligent adaptive control of the solution process has become a key technical challenge urgently needing to be solved in this field.

[0026] This application proposes a CFD computation method based on neural networks and adaptive parameter optimization, such as... Figure 1 As shown, the method includes: S101, Initialization steps: Read the calculation parameters and mesh file of the current calculation task, determine whether there is a restart file, if there is, load the flow field data, otherwise perform flow field initialization based on the incoming flow conditions.

[0027] Furthermore, in the S101 initialization step, the calculation parameters include flight altitude, flight speed, and chemical reaction model; the flow field initialization includes: adaptively selecting the NS equation type based on the flight altitude and flight speed, and matching the corresponding chemical reaction model.

[0028] Specifically, in this embodiment, system initialization is a preprocessing step performed by a classic CFD solver. It involves reading, judging, and assigning values ​​to the input parameters, and is fundamental to data processing. Specifically, it includes the following sub-steps: 1.1 Parameter Reading The solver reads engineering input files, including mesh files, boundary files, and calculation conditions, and analyzes parameters such as atmospheric environmental parameters, flight altitude, flight speed, and chemical reaction models. It then evaluates the completeness and rationality of the parameters and, based on the evaluation results, intelligently selects the appropriate NS equation from a pre-built rule base. The selection process comprehensively considers the flow state and thermodynamic processes to achieve adaptive matching of equation types, thereby improving computational efficiency and accuracy.

[0029] 1.2 Determine whether to continue the calculation The system checks if a "restart file" from a previously interrupted calculation exists. If it exists and the file is valid, the complete flow field data and convergence history are loaded directly from the file to resume the calculation process, thus significantly saving the time required to start the calculation from scratch. If it does not exist or the file is invalid, step 1.3 is executed to perform a complete flow field initialization.

[0030] 1.3 Flow field initialization Based on the parameters read in step 1.1, initial flow field variable values ​​are assigned to all grid cells or nodes within the computational domain. For steady-state problems, uniform initialization is typically performed based on free-flow conditions; for unsteady-state problems or complex flows, potential flow solutions, coarse-grid pre-calculated solutions, or user-provided specific initial fields can be used for initialization, providing a reasonable physical starting point for subsequent iterations.

[0031] S102, CFD solution steps: Solve the NS equations based on the finite volume method, record the solution parameters of the current iteration step and output the intermediate flow field; the solution parameters include time step, relaxation factor and numerical dissipation coefficient.

[0032] Specifically, in this embodiment, the flow field environment is handled by the flow field calculation module, which mainly obtains the flow field data by solving the selected Navier-Stokes equations. The specific sub-steps are as follows: 2.1 Calculation of physical processes The flow field calculation module uses the finite element method to discretize and solve the Navier-Stokes equations on a spatial grid, calculating physical quantities such as temperature and pressure in the flow field. In three-dimensional Cartesian coordinates, the three-dimensional conserved form of the compressible Navier-Stokes equations can be expressed as:

[0033] in, Q For conservation of quantity, E, F, G for x, y, z Diffusion term in direction, E V 、F V 、G V For convection terms in three directions, S The source vector is expressed as follows:

[0034] In the above formula, u, v, w They are respectively x, y, z velocity in the direction, p ρ , ρ S These represent the gas pressure, density, density of component S, and mass fraction, respectively. N S 、n S These represent the density of component s and the total number of components, respectively. N A is Avogadro's constant. E, E V 、e vs These represent the total energy of the gas per unit volume, the total vibrational energy component s, and the vibrational energy per unit mass, respectively. D S 、H S These are the component diffusion coefficient and enthalpy per unit mass, respectively. W S The density generation rate of components caused by chemical reactions. W v This is a vibration energy item.

[0035] During the calculation process, the calculation module iteratively solves the problem based on the parameter conditions. This step reveals the flow characteristics on the surface of the aircraft, such as the location of the shock wave and the distribution of the boundary layer, providing a qualitative distribution reference for the subsequent flow field output.

[0036] 2.2 Chemical Process Calculations Depending on the flight altitude and speed, if the input parameters satisfy the chemical reaction conditions, the flow field calculation module additionally solves the chemical reaction transport equations and reaction kinetic equations, calculating chemical variables such as electron density and reaction rate. The module is compatible with various chemical reaction models, such as Gupta_7 / 11, Park97, and Dunn Kang models. During the calculation process, the module iteratively solves according to the chemical reaction conditions until the chemical variables converge. This step reveals the chemical reaction characteristics of the aircraft surface, such as the concentration distribution of substances, providing a quantitative reference for subsequent flow field output.

[0037] 2.3 Solving Parameter Records Solving for parameter records is the core iterative loop in CFD solving. Each computational process independently advances the solution of the CFD governing equations, mainly including the time step, relaxation factor, and numerical dissipation coefficient. In explicit or implicit CFD methods, the time step Δt is determined by the CFL (Courant-Friedrichs-Lewy) condition to ensure numerical stability. For compressible flows, the time step is calculated by the following formula:

[0038] Where Δx is the characteristic length of the mesh cell (e.g., the cube root of the cell volume or the minimum side length); u is the local flow velocity; c is the local speed of sound; min cells This indicates taking the minimum value across all grid cells.

[0039] In CFD solvers, it is often necessary to solve large systems of linear equations Ax=b. To improve convergence, relaxation factors are commonly used, such as algebraic equation relaxation, to control the magnitude of variable updates.

[0040] in: Represents the variable to be solved (such as pressure or velocity components); Δ ω is the change in variables calculated in the current iteration step (i.e., the solution obtained by solving the linear equation system); ω is the relaxation factor, usually between 0 and 1 (under-relaxed) or greater than 1 (over-relaxed, rarely used).

[0041] In high Reynolds number flows or in the presence of discontinuities such as shock waves, numerical dissipation is often introduced to suppress numerical oscillations in order to achieve stable solutions. For example, an artificial viscosity term can be added to the spatial discretization scheme.

[0042] in, d Ψ is the numerical dissipation coefficient, and Ψ is a switching function that adaptively adjusts according to the local solution gradient.

[0043] 2.4 Output the intermediate flow field and solution parameters within the iteration step The parameters in the nth iteration step, including the time step size, relaxation factor, and numerical dissipation coefficient, are packaged into a set and sent to the adaptive parameter tuning module.

[0044] Where Δt is the time step, ω is the relaxation factor, d This represents the numerical dissipation coefficient. Simultaneously, the intermediate flow field state is sent to the neural network module for non-physical judgment and correction.

[0045] S103, Physical constraint correction step: Input the intermediate flow field and grid coordinates into the pre-trained physical constraint neural network, apply hard boundary condition constraints and soft constraints based on the residuals of the control equations in sequence, and output a corrected flow field.

[0046] Furthermore, in the S103 physical constraint correction step, the application of hard boundary conditions includes: inputting the intermediate flow field and grid coordinates into a pre-trained physical constraint neural network, obtaining a preliminary predicted flow field through forward propagation of the network; and applying hard boundary conditions to the preliminary predicted flow field at the output layer of the neural network to obtain the flow field U after hard constraint correction. AI,hard n The hard constraints of the boundary conditions include: for the identified wall boundary nodes, setting their velocity vectors to zero to satisfy the no-slip condition; for the boundary nodes of the symmetry plane, making the physical quantities of the corresponding nodes on both sides of the symmetry plane equal.

[0047] Furthermore, in the S103 physical constraint correction step, the soft constraint based on the residual of the governing equation includes: for the flow field U after the hard constraint correction... AI,hard n The residual operator for the Navier-Stokes equations is defined as follows: ;where, U=[ρ,ρu,ρv,ρw,ρE] T It is a conserved variable; For convection terms, The diffusion term is used; the flow field U is calculated on a discrete grid by automatic differentiation. AI,hard n At each sampling point The residuals on the surface are calculated, and the physical loss is calculated. Let the norm of the residual be: ;in, The total number of sampling points; to minimize the physical loss. For the target, the flow field U AI,hard n Fine-tuning was performed to obtain the final corrected flow field U. AI n .

[0048] Specifically, in this embodiment, this step is crucial for ensuring the physical accuracy of the flow field prediction. The goal of the Physically Constrained Neural Network (PCNN) module is to correct the intermediate flow field output by the traditional CFD solver, making it more consistent with physical laws. Let the flow field output by the traditional solver in step n be U~ n The neural network of the PCNN module is denoted as f. θ Where θ represents the network parameters (fixed during the online phase). The network input consists of grid coordinates and the current flow field variables, and the output is the corrected flow field U. AI n =f θ (U~ n Specifically, it includes the following sub-steps: 3.1 Neural Network Input and Feature Extraction The intermediate flow field variables of the current iteration step (such as density ρ, velocity u in the X direction, velocity v in the Y direction, and velocity w in the Z direction), the spatial coordinates (x, y, z) of all grid nodes, and the parameter vector p representing the physical state (such as the local Mach number and Reynolds number) are concatenated to form the input tensor of the PCNN. This design ensures that the network can perceive the spatial distribution of the flow field and the global physical environment. The input feature tensor X n The structure is as follows:

[0049] Wherein, for grid node or cell center i, U~ n i For the flow field variables output in step 1.4 (e.g., [ρ,u,v,w]i), x i For its spatial coordinates, p i For local physical parameter vectors (such as [Ma i Re i , p i ]).

[0050] 3.2 Application of physical hard constraints The input data is forward-propagated through a pre-trained, multi-layered neural network. At the network's output layer, hard constraints are directly applied using a designed transformation function. (1) Hard constraints on boundary conditions: For wall boundary nodes, after the network output, their velocity is directly forced to zero (without slip condition), and pressure or density is handled by extrapolation conditions.

[0051] (2) Symmetry hard constraint: If the flow is symmetrical, the outputs of corresponding nodes on both sides of the symmetry plane are averaged or forced to be equal. 3.3 Calculation of physical loss (based on soft constraints of governing equation residuals) When applying hard constraints (such as boundary conditions), U is obtained. AI,hard n Subsequently, to ensure the local approximate conservation of mass, momentum, and energy, this embodiment calculates physical losses for a further fine-tuning of the initially corrected flow field. The physical losses are based on the residuals of the Navier-Stokes equations (or other user-specified governing equations). For compressible flow, this embodiment considers the Navier-Stokes equations in the following form:

[0052] Among them, U=[ρ,ρu,ρv,ρw,ρE] T It is a conserved variable. The residual operator R is defined as:

[0053] On a discrete grid, this embodiment can use an automatic differential calculation network to output the field U. AI,hard n The residual at each sampling point. Physical loss is defined as the norm of the residual:

[0054] Here, η is a small learning rate (e.g., 0.001). This step can be seen as bringing the flow field closer to satisfying the governing equations, thereby further improving its physical consistency.

[0055] 3.4 Output Corrected Flow Field The flow field U with higher physical consistency after applying hard constraints and fine-tuning soft constraints AI n The output serves as an intermediate result U~ from the traditional solver. n An enhanced version, used for subsequent steps.

[0056] S104, Adaptive parameter optimization step: Based on the convergence dynamic features of the current and historical iteration steps and the solution parameters, the policy network trained by reinforcement learning outputs the parameter adjustment amount for the next iteration step to dynamically optimize the time step, relaxation factor and numerical dissipation coefficient. Furthermore, in the S104 adaptive parameter optimization step, the convergence dynamic features include the current residual norm, residual descent rate, residual oscillation frequency, and amplitude.

[0057] Preferably, the policy network trained by reinforcement learning outputs the parameter adjustment amount for the next iteration step, including: combining the convergent dynamic features with the current solution parameters to construct a multidimensional state feature vector; inputting the multidimensional state feature vector into the policy network pre-trained by reinforcement learning; and the policy network outputting the parameter adjustment amount for the time step, relaxation factor, and numerical dissipation coefficient.

[0058] Furthermore, in the S104 adaptive parameter optimization step, the policy network pre-trained by reinforcement learning is trained using a deep deterministic policy gradient algorithm, and its reward function during training includes: a convergence reward term, a stability penalty term, a step penalty term, and a parameter adjustment penalty term.

[0059] Convergence Rewards: Stability penalty: Among them, osc level The oscillation index is calculated based on the residual history; step penalty term: ; and parameter adjustment penalty items: Among them, R t Let represent the global residual norm at step t. , , , , Preset weighting coefficients; This is an oscillation index calculated based on the residual history; Adjust the vector for the parameters.

[0060] Specifically, in this embodiment, the S104 adaptive parameter optimization step is the core of intelligent accelerated convergence. The adaptive parameter optimization module (APO) analyzes the solution state in real time and predicts the optimal parameters for the next iteration. It specifically includes the following sub-steps: 4.1 State Feature Extraction During the computation, the adaptive parameter optimization module continuously monitors the solution process and extracts a multi-dimensional state feature vector from the current and recent iteration history. This vector mainly includes: (1) Convergence dynamic characteristics: current residual norm, residual decrease rate, residual oscillation frequency and amplitude.

[0061] (2) Characteristics of flow field changes: the maximum change of flow field variables and the gradient of key physical quantities (such as maximum pressure).

[0062] (3) Solver state characteristics: current time step (CFL number), relaxation factor of each equation, and number of iteration steps.

[0063] (4) Historical performance characteristics: Records of the effects of recent parameter adjustments 4.2 Model Training The training of this automatic parameter tuning model is a phased, data-driven process that interacts with the simulation environment, aiming to enable the APO to make optimal parameter tuning decisions under complex and ever-changing CFD solution conditions. It mainly includes the following sub-steps: (1) Training Environment Construction: The training environment is a simulator that encapsulates a traditional CFD solver. This simulator can perform an iterative calculation based on the current flow field state and solution parameters, and return the new flow field state and convergence index. The design of the training environment includes the following elements: A. State Space: The state space consists of the state feature vector extracted in Section 4.1, including convergence dynamics features, flow field change features, solver state features, and historical performance features. Specifically, we combine the residual history of the most recent k steps, residual descent rate, oscillation frequency and amplitude, maximum change in flow field variables, gradients of key physical quantities, current time step size (CFL number), relaxation factors of each equation, iteration steps, and recent parameter adjustment effect records into a fixed-length vector, which serves as the state input of the agent.

[0064] B. Action Space: The action space corresponds to the parameter adjustments output by the APO module, including the adjustment of the CFL number ΔCFL, the adjustment of each relaxation factor Δω (vector), and the adjustment of the numerical dissipation coefficient Δω. d Each action component is restricted to a certain continuous range, for example, ΔCFL ∈ [-0.1, 0.1], Δω ∈ [-0.05, 0.05], Δ d ∈ [-0.01, 0.01]. These ranges are set based on engineering experience to avoid excessive adjustments that could lead to unstable solutions.

[0065] (2) Reward Function Design: The reward function is used to guide the agent to learn optimization strategies. The reward function of this invention comprehensively considers convergence speed, numerical stability and computational efficiency, and specifically includes the following components: A. Convergence Reward Term: Encourages residual decrease, and defines a reward term based on the residual decrease rate:

[0066] Among them, R t Let λ1 and λ2 represent the global residual norm at step t, where λ1 and λ2 are positive coefficients.

[0067] B. Stability Penalty: Prevents numerical oscillations or divergences. A negative penalty is applied when excessive residual oscillation amplitude or non-physical values ​​appear in the flow field variables.

[0068] Among them, osc level This is an oscillation index calculated based on the residual history.

[0069] C. Step Penalty: This encourages rapid convergence by providing a small negative reward for each step, preventing the agent from adopting overly conservative strategies that delay convergence.

[0070] D. Parameter Adjustment Penalty: To avoid frequent and significant parameter adjustments, a penalty is imposed on the magnitude of parameter adjustments.

[0071] Among them, osc level This is an oscillation index calculated based on the residual history.

[0072] The total reward is the sum of the above items: The coefficients λ1 to λ5 are adjustment coefficients, set based on prior experience to balance various rewards.

[0073] (3) Training process: The APO module is trained using the DDPG algorithm. The specific training process is as follows: Multiple typical CFD examples (e.g., different geometries and flow conditions) are collected as a training set. For each training example, the flow field and solution parameters are initialized, and then the agent interacts with the environment to generate a large number of transition samples. The DDPG algorithm is used to update the action and policy network until the policy converges. Through the above training, the APO module can learn an adaptive parameter adjustment policy that can make reasonable parameter adjustment decisions at different solution stages and flow states, thereby accelerating convergence and maintaining numerical stability.

[0074] S105, Feedback and Looping Steps: The modified flow field is used as the initial flow field for the next iteration of the CFD solution step, and the solution parameters are updated by applying the parameter adjustment amount. Then, the CFD solution step is returned to be executed until the flow field calculation results meet the preset convergence conditions.

[0075] In the S105 feedback and loop step, updating the solution parameters by applying the parameter adjustment amount includes: for the time step... Indirect updates are achieved by adjusting the number of CFLs:

[0076]

[0077] Where, η CFL It is the learning rate of the CFL number; For the relaxation factor, the pressure equation and the equations for each velocity component are updated respectively, and the updated relaxation factor is limited to a preset range. For numerical dissipation coefficients, their update values ​​are restricted to a range that is non-negative and does not exceed a preset upper limit.

[0078] In this embodiment, specifically, the policy network trained offline is deployed to the actual CFD solving system, and the output parameter adjustment amount ΔP is adjusted according to the current solving state. n The state includes the residual history of the last k steps, the changes in the flow field, and the current parameters. Parameters are updated as follows:

[0079] (1) For the time step, the adjustment module does not directly calculate Δt, but adjusts the CFL number. That is, the APO outputs the adjustment amount ΔCFL of the CFL number. Then, the solver recalculates the time step based on the new CFL number:

[0080]

[0081] Where, η CFL This is the learning rate for the number of CFLs (can be set to 0.05 or less to avoid drastic changes).

[0082] (2) For relaxation factors, the APO module outputs the adjustment amount of the relaxation factor for different types of equations (such as pressure equations and equations for each velocity component). For example:

[0083] Similarly, the adjusted relaxation factor needs to be limited to a reasonable range, for example, ω∈[0.1,1.0].

[0084] (3) For the dissipation coefficient, the APO module outputs the adjustment amount Δ of the numerical dissipation coefficient. d Then update the numerical dissipation coefficient:

[0085] Numerical dissipation coefficients are typically constrained to be non-negative, and may have an upper limit to avoid over-smoothing physical characteristics. d ∈[0, max ].

[0086] After the above adjustments, the controller parameters will be returned to the traditional CFD solver for the next round of iterative calculation.

[0087] Furthermore, in the S105 feedback and loop step, the preset convergence condition includes: calculating the global residual norm based on the modified flow field and monitoring the rate of change of key physical quantities. When the global residual norm drops below a preset threshold and the rate of change of the key physical quantities in multiple consecutive iterations is less than a specific tolerance, it is determined that the convergence condition is met. The key physical quantities include the lift coefficient and the drag coefficient.

[0088] Specifically, in this implementation, after completing the calculation for the current time step, a convergence judgment is performed. The calculation convergence is determined based on the degree of decrease in the global residual and the rate of change of physical quantities. If the convergence criterion is not met, the convergence residual threshold and controller parameters are reset until the optimal flow field result is output. This includes the following sub-steps: (1) Convergence determination: After each time step or several iterations, the system calculates the norm of the global flow field residuals and monitors the rate of change of key physical quantities (such as lift and drag coefficients). When the residuals drop below a preset threshold (such as 10⁻⁶) and the physical quantities change less than a specific tolerance in multiple consecutive time steps, the calculation is determined to be converged.

[0089] (2) Adaptive Cyclic Control: If convergence is not achieved, the system returns to stage two with the updated flow field and the controller information adjusted by adaptive parameters to continue the iteration of the next time step. Since the controller information has been dynamically adjusted, the progress of each process is more synchronized, and the computational efficiency and stability of subsequent iterations will be significantly improved.

[0090] (3) Results output and performance analysis: After the calculation converges, each process writes the final results of its local subdomain to the parallel file system and aggregates them to generate complete flow field data (such as ACS II format). The system also outputs the performance data of this calculation, such as the number of parameter adjustments, physical corrections, and overall speedup, to provide data support for parameter tuning in subsequent calculations.

[0091] Based on this, compared with the prior art, the technical solution provided by the present invention has the following significant advantages: (1) It achieves physically reliable high-precision prediction: By combining hard constraints with soft constraints, physical laws are deeply embedded in the AI ​​model, ensuring that the prediction results strictly satisfy the boundary conditions and locally approximate the control equations under any circumstances. This solves the problems of inconsistent physical properties and poor extrapolation ability of the data-driven model, and improves the prediction reliability under complex and non-design conditions. (2) It achieves intelligent adaptation and accelerated convergence in the solution process: Through the APO module that senses the solution status in real time and dynamically optimizes key parameters, the system can automatically and timely deal with problems such as numerical oscillation and convergence stagnation, just like a built-in automatic CFD expert system. This greatly reduces the dependence on manual parameter tuning and compresses the optimal parameter path that traditionally requires hundreds of trial and error iterations to find into a single intelligent adaptive solution process, thereby significantly shortening the total time to obtain a converged solution. (3) An efficient hybrid intelligent solution paradigm has been constructed: This invention does not simply replace traditional CFD with AI, but creatively integrates the two deeply to form a collaborative paradigm in which traditional solution provides a robust foundation and AI enhances accuracy and provides intelligent control. This paradigm fully leverages the advantages of traditional methods in terms of universality and stability, as well as the advantages of AI in fitting complex functions and making rapid decisions, providing a feasible technical architecture for the next generation of intelligent CFD software.

[0092] Secondly, this embodiment also proposes a CFD computing system based on neural networks and adaptive parameter optimization, such as... Figure 2 As shown, the system includes: The initialization module 201 is used to read the calculation parameters and mesh file of the current calculation task, determine whether there is a restart file, and if so, load the flow field data; otherwise, perform flow field initialization based on the incoming flow conditions. CFD solver module 202 is used to solve the Navier-Stokes equations based on the finite volume method, record the solution parameters of the current iteration step and output the intermediate flow field; the solution parameters include time step, relaxation factor and numerical dissipation coefficient; The physical constraint correction module 203 is used to input the intermediate flow field and grid coordinates into a pre-trained physical constraint neural network, apply hard boundary condition constraints and soft constraints based on the residuals of the control equations in sequence, and output a corrected flow field. The adaptive parameter optimization module 204 is used to dynamically optimize the time step, relaxation factor and numerical dissipation coefficient by outputting the parameter adjustment amount for the next iteration step through a policy network trained by reinforcement learning, based on the convergence dynamic features of the current and historical iteration steps and the solution parameters. The feedback and loop module 205 is used to take the corrected flow field as the initial flow field for the next iteration of the CFD solution step, and apply the parameter adjustment amount to update the solution parameters, and then return to execute the CFD solution step until the flow field calculation result meets the preset convergence condition.

[0093] Each module of the system can be used to execute the CFD calculation method based on neural networks and adaptive parameter optimization described in the first aspect, which will not be elaborated further here.

[0094] Furthermore, this embodiment also proposes another implementation method for a CFD computing system based on physically constrained neural networks and adaptive parameter optimization. Its functional framework is as follows: Figure 3 As shown, this system, supported by a fully interactive parallel framework, based on classical computing, and enhanced by AI, constructs a highly efficient, dynamically adaptive computing system for flow field calculation. It solves the problems of low efficiency in adjusting control parameters and low accuracy in calculating flow fields for hypersonic vehicles. The system relies on a parallel computing cluster in terms of hardware. In terms of software, the system mainly consists of a user interface layer, an application layer, and a hardware resource layer.

[0095] 1. User Interface Layer The user interface layer serves as the window through which users interact with the intelligent simulation system. It is responsible for initiating tasks, configuring them, and providing insights into the results. Specifically, it includes: (1) Geometry / Mesh Import Module: Supports the import, parsing, and lightweight preview of complex geometric models and computational meshes in various industry standard formats (such as STL, STEP, CGNS, ANSYSMSH). It has basic mesh quality checking functions and can indicate mesh defects that may affect computational stability.

[0096] (2) Physical Condition Setting Module: Provides a graphical interface for defining the physical scene of the simulation. This includes, but is not limited to: inflow conditions (Mach number, Reynolds number, angle of attack), fluid medium properties, turbulence model selection, chemical reaction mechanism (such as finite rate chemical reaction), and detailed parameter settings for various boundary conditions (walls, planes of symmetry, pressure outlets, etc.).

[0097] (3) Controller parameter setting module: Allows users to provide high-level guidance and constraints on the intelligent behavior of the system. Users can set the overall solution objective (such as accuracy priority or speed priority), start and stop the AI ​​enhancement module, define the adjustment range of key parameters (such as the upper and lower limits of CFL number), and select preset expert optimization strategy templates.

[0098] (4) Visualization and Post-processing Module: Connects to the simulation result data stream and provides real-time and post-processing visualization functions. This includes streamline diagrams, isosurface cloud maps, vector maps, convergence history curve plotting, etc., and supports automatic extraction and report generation of key aerodynamic / thermal parameters to help users quickly gain physical insights.

[0099] 2. Application Layer The application layer is the core of intelligent simulation, consisting of a traditional CFD computing domain, an AI enhancement domain, and a data exchange bus connecting the two.

[0100] (1) Traditional CFD computation domain This domain encapsulates an industrially proven, high-fidelity CFD solver kernel, responsible for performing fundamental numerical calculations in fluid dynamics and ensuring the physical basis of the solution. Its core modules include: The physics calculation module is the core flow solver, using numerical methods such as the finite volume method to solve the Navier-Stokes equations (NS equations). It is responsible for the time progression and spatial discretization of flow variables.

[0101] Chemical Calculation Module: This module is activated when the simulation involves effects such as combustion and high-temperature non-equilibrium. It is responsible for solving the species transport equation and chemical reaction source terms and is strongly coupled with the physics calculation module.

[0102] The controller parameter control module acts as the execution mechanism between the traditional solver and the AI-enhanced domain. It receives optimization instructions from the adaptive parameter tuning module, dynamically adjusts the underlying parameters within the solver, such as the time step (CFL number), relaxation factors for each equation system, and dissipation coefficients of the numerical scheme, and feeds back the adjusted solver state through the data exchange bus.

[0103] (2) AI Enhancement Domain This domain is the intelligent hub of the system, injecting AI intelligence into the traditional CFD solution process. It contains two core modules that work together: the physical constraint neural network module and the adaptive parameter adjustment module.

[0104] The physical constraint neural network module integrates a pre-trained deep neural network, employing a dual-channel architecture and a physical constraint embedding mechanism. (a) Hard constraint processing submodule: In the output layer of the neural network, boundary conditions are enforced and satisfied without error. For example, for wall boundary nodes, their velocity vectors are directly set to zero; for symmetry surfaces, the corresponding physical quantities are forced to be equal. This process does not rely on network training and is a direct encoding of physical laws. (b) Soft constraint processing submodule: By constructing a physical loss function containing the residuals of the control equations, the network output is fine-tuned during online inference. This submodule uses automatic differentiation technology to calculate the deviation between the current flow field prediction and physical laws such as the Navier-Stokes equations, and uses a fast gradient descent algorithm to pull the prediction results back to a direction that better conforms to physical laws, thereby improving the physical consistency of the flow field.

[0105] The adaptive parameter tuning module acts as an intelligent parameter tuner, achieving closed-loop optimization of the solution process.

[0106] (a) State Monitoring Submodule: Real-time acquisition of solution state information from the traditional CFD computation domain, including residual evolution history, flow field variable oscillation spectrum, local gradient information, etc., and encoding it into a high-dimensional state feature vector. (b) Online Parameter Adjustment Submodule: Built-in lightweight policy network trained by reinforcement learning. This network receives the state feature vector and outputs optimal adjustment suggestions for the control parameters of the traditional CFD solver (such as increasing / decreasing the CFL number, adjusting the relaxation factor). (c) Feedback Execution Submodule: Sends the parameter adjustment instructions generated by the decision to the controller parameter control module of the traditional CFD computation domain through the data exchange bus to complete the real-time control of the solver, thereby suppressing oscillations and accelerating convergence.

[0107] (3) Data exchange bus In this embodiment, the data exchange bus serves as a high-speed information channel connecting the traditional CFD computation domain and the AI ​​enhancement domain, responsible for efficient and low-latency data exchange and synchronization. Its key technical features include: (a) Standardized data interface: defining a unified flow field data representation format (e.g., based on HDF5), encapsulating mesh information, physical field variables, time step information, etc., to ensure lossless and accurate data parsing between the two domains. (b) Asynchronous communication mechanism: supporting the overlap of computation and communication; when the traditional CFD domain is performing internal sub-iterations, the AI ​​enhancement domain can process the data from the previous frame in parallel, maximizing the overall system throughput. (c) Shared memory management: for tightly coupled cooperative iterations, a shared memory area is used to reduce data copy overhead, enabling rapid exchange of flow field data between CPU and GPU memory, particularly suitable for GPU-accelerated derivation of the PCNN module.

[0108] 3. Hardware support layer The hardware support layer provides heterogeneous computing resources and basic system services for upper-layer applications, ensuring the efficient and stable operation of the entire intelligent simulation system.

[0109] (1) Heterogeneous computing clusters: (a) CPU cluster: composed of multi-core high-performance CPUs (such as AMD EPYC or Intel Xeon series), mainly responsible for grid partitioning computation based on MPI parallelism, linear algebra solving, and system task scheduling and management in the traditional CFD computing domain. (b) GPU cluster: composed of high-performance GPUs (such as NVIDIA H100, A100), providing powerful parallel inference computing power for the physical constraint neural network module in the AI ​​enhancement domain, and also serving as a coprocessor to accelerate certain parallelizable CFD computing links (such as throughput computing).

[0110] (2) High-speed interconnection network: Low latency and high bandwidth network technology (such as InfiniBand) are used to ensure communication efficiency when large-scale data exchange occurs within the CPU cluster and between the CPU and GPU clusters, thus eliminating performance bottlenecks.

[0111] (3) Task Management and Scheduling Unit: As the "operating system" of the system, it is responsible for job queuing, resource allocation and recycling. It can intelligently schedule computing tasks (such as CFD iteration, AI inference) to the most suitable hardware resources (CPU or GPU) for execution, and monitor the health status of the entire cluster.

[0112] (4) Storage system: Configure a high-performance parallel file system (such as NVMe SSD) to meet the high-speed read and write requirements of large-scale flow field snapshot data, training datasets and model parameters generated during the simulation.

[0113] The system described in this embodiment, through user-friendly interaction at the user interface layer, deep collaboration between traditional high-fidelity CFD solutions and AI intelligent enhancement technologies at the application layer, and powerful heterogeneous computing support at the hardware support layer, constructs a complete, efficient, and adaptive next-generation intelligent fluid simulation platform. This system not only significantly improves the accuracy and efficiency of complex flow simulations but also ensures good scalability through modular design.

[0114] To enable those skilled in the art to better understand and implement this invention, a detailed description is provided below with reference to a specific embodiment. This embodiment takes the calculation of the non-equilibrium flow field of the classic hypersonic target—the RAMC-II aircraft—under the conditions of a flight altitude of 60 km, a flight speed of Mach 20, and an angle of attack of 0 degrees as an example, to fully demonstrate how this system achieves high-precision and high-efficiency simulation through intelligent enhancement. The software program of this system is deployed on a fully interactive parallel computing cluster server, which is equipped with a multi-core central processing unit, a large-capacity memory, a high-speed solid-state drive, and a professional graphics processing unit.

[0115] like Figure 4 The diagram shown is an operation flowchart of the CFD computing system based on neural networks and adaptive parameter optimization in this embodiment. Figure 4As shown, user input first enters the task management unit, which is responsible for parsing the user-defined computational tasks, splitting and prioritizing them to prepare for subsequent resource scheduling. The resource scheduling unit dynamically allocates the computational load to the underlying CPU and GPU clusters based on the task requirements assigned by the task management unit, achieving full utilization of heterogeneous computing resources. Above the CPU and GPU clusters, the system constructs two core computational domains: a traditional CFD computational domain and an AI-based enhancement domain. The CFD computational domain is responsible for performing conventional numerical solutions and generating preliminary flow field data; the AI ​​enhancement domain optimizes the intermediate flow field through neural networks, and the two work together to improve simulation accuracy. The core of the AI ​​enhancement domain is the physical constraint neural network module, which includes hard constraint processing submodules and soft constraint processing submodules. The hard constraint processing submodule ensures that the neural network output strictly satisfies inviolable physical laws such as boundary conditions; the soft constraint processing submodule guides the network to approximate governing equations such as the Navier-Stokes equations through a loss function, thereby improving solution accuracy while ensuring physical realism. The system also integrates a parameter adaptive control module for dynamically optimizing the computation process. This module includes a status monitoring submodule, which monitors the convergence status and residual changes of the current calculation in real time; an online parameter adjustment submodule, which automatically adjusts the hyperparameters of the CFD solver or neural network based on the monitoring status; and a feedback execution submodule, which sends the adjusted controller parameter control commands back to the CFD computation domain and the AI ​​enhancement domain, forming a closed-loop optimization. All flow field data generated by the calculation and optimization are ultimately aggregated in the storage system. Subsequently, the convergence judgment module reads the data from the storage system to verify whether the calculation has converged; if it has not converged, it feeds back to the computation domain to continue iterating; if it has converged, it proceeds to the next stage. The converged data is sent to the visualization post-processing module, which transforms the numerical results into intuitive graphical information for output, specifically including cloud maps to display the flow field distribution, vector maps to represent the flow direction, and data curves reflecting quantitative changes, for user analysis and use.

[0116] The specific implementation steps are as follows: Figure 5 As shown, the details are as follows: S501: System initialization and task parameter loading.

[0117] System initialization and task parameter loading are the preparatory stages for intelligent simulation execution, aiming to establish the hardware and software environment and physical model foundation for subsequent hybrid iterative computation. First, the system hardware and software environment is initialized. (a) Hardware resource detection and allocation: The cluster task scheduler automatically allocates 4 CPU computing nodes (128 cores per node for traditional CFD parallel computing) and 2 GPU nodes (for AI-enhanced domain inference) based on the user-submitted job request. (b) Environment configuration: The parallel environment starts, and MPI is loaded for CPU domain inter-process communication. The traditional CFD solver and its dependent numerical libraries are loaded. Simultaneously, the AI-enhanced domain software stack is initialized on the GPU nodes. The middleware service of the data exchange bus starts, and the shared memory area and network communication port are configured. (c) System module wake-up: After the configuration information of the user interface layer is parsed, the modules of the traditional CFD computing domain and the AI-enhanced domain in the application layer are woken up and complete self-checks, ready to receive data.

[0118] Secondly, physical task parameter analysis and model construction. (a) Mesh and physical condition loading: The geometry / mesh import module of the user interface layer reads the structured mesh file (approximately 8 million elements) of the RAMC-II aircraft. The physical condition setting module analyzes the input flight conditions (H=60km, Ma=20, α=0°), automatically matches the chemical non-equilibrium model with air components of 5 elements (N2, O2, NO, N, O), and sets the corresponding wall catalytic boundary conditions. (b) Initial flow field setting: The flow field is uniformly initialized according to the incoming flow conditions. The system automatically selects the control equations suitable for hypersonic non-equilibrium flow (i.e., the complete NS equations containing component transport and vibrational energy relaxation) from the pre-made rule library according to the task complexity. (c) Intelligent controller parameter preset: The user selects the "high-precision convergence" mode through the controller parameter setting module. Based on this, the system sets the initial strategy for the adaptive parameter optimization module: the initial value of the CFL number is 0.5, the initial value of the relaxation factor is 0.3, and all constraint functions of the physical constraint neural network module are enabled.

[0119] S502: Traditional CFD computational domain – iterative solution of basic flow field.

[0120] This step is executed by the traditional CFD computation domain of the application layer, completing one (or several) high-fidelity flow field advancements based on physical laws. First, parallel flow field computations are performed. Each CPU process executes core calculations in parallel based on its assigned grid subdomain: (a) Solving the governing equations: The physics module solves the complete Navier-Stokes equations, while the chemistry module simultaneously solves the component transport and chemical reaction source terms; spatial discretization is performed using the AUSM scheme, and implicit time advancement is performed using the LU-SGS method. (b) Implementing boundary conditions: No-slip, isothermal (wall temperature set at 1500K), and finite catalysis conditions are implemented at the wall boundaries, and characteristic line boundary conditions are implemented at the far-field boundaries. (c) Outputting intermediate results: After several internal sub-iterations, the intermediate flow field data (including density, velocity, pressure, temperature, and mass fraction of each component) and the current solver parameter P are output at the current time step. n (Such as the actual number of CFLs used, residuals) and the grid coordinate information of the entire computational domain are packaged into standard data blocks.

[0121] S503: Data exchange bus – cross-domain data synchronization.

[0122] This step is a crucial bridge connecting traditional computing and AI enhancement, and is executed by the data exchange bus. (a) Data push: The traditional CFD computing domain asynchronously pushes the standard data blocks generated in S2.1 to the shared memory area of ​​the data exchange bus via a high-speed network. (b) Data distribution: The bus distributes the flow field data and mesh information to the physical constraint neural network module of the AI ​​enhancement domain, while simultaneously distributing the solution state information (residuals, oscillation indices) to the adaptive parameter optimization module.

[0123] S504: AI Enhanced Domain – Intelligent Correction and Optimization.

[0124] This step is executed in parallel by the AI ​​enhancement domain of the application layer to enhance the traditional computation results. First, Physically Constrained Neural Network (PCNN) correction is performed. The PCNN module performs high-precision correction on the received intermediate flow field on the GPU: (a) Feature extraction and inference: The module loads a pre-trained neural network model for hypersonic flow. This model uses the aforementioned dual-channel architecture to perform high-precision correction on U~ n Feature extraction is performed, and a preliminary flow field correction ΔU is output. pren (b) Hard constraint application: The hard constraint processing submodule intervenes, forcing the velocity vector of all identified wall boundary elements to be set to zero, and strictly ensuring that the mass fraction of wall components meets the set catalytic conditions. (c) Soft constraint fine-tuning: The soft constraint processing submodule starts, calculating the pre-corrected flow field U. pren =U~ n +ΔU pren The residuals of the local conservation equations. The fine-tuning variable δU is obtained through a fast gradient descent. This ensures that the flow field is more locally conserved in terms of mass, momentum, energy, and component mass. (d) Output corrected flow field: Generates a final corrected flow field U with significantly enhanced physical consistency. AI n =U pren +δU U AI n This step effectively sharpens the bow shock and corrects for component concentration errors near the boundary layer caused by numerical dissipation.

[0125] Secondly, Adaptive Parameter Optimization (APO) decision-making. Simultaneously, the APO module performs intelligent parameter tuning decisions on another GPU: (a) State feature extraction: The state monitoring submodule analyzes the received residual sequence and calculates the current decay rate r. decay n =0.05 and oscillation indicator o osc n =0.15, indicating slow convergence and slight oscillations. (b) Policy network inference: The policy network in the policy decision submodule, based on the current state feature vector s n Reasoning is performed. The network determines that the current CFL number (0.5) is too conservative, and the pressure relaxation factor (0.3) may cause oscillations in the strong shock wave region. (c) Generate optimization instructions: The strategy network output adjustment suggestions are: ΔCFL=+0.2, Δωp= 0.05 (slightly tighten the pressure to stabilize the oscillation), other parameters are fine-tuned. The feedback execution submodule will then execute this optimization instruction ΔP. n Encapsulation.

[0126] S505: Data exchange bus – intelligent result feedback.

[0127] The data exchange bus receives two outputs from the AI-enhanced domain: (a) the corrected high-precision flow field U from the PCNN module. AI n (b) Parameter optimization instruction ΔP from the APO module n .

[0128] The bus efficiently and with low latency sends these two data packets back to the designated interface in the traditional CFD computing domain.

[0129] S506: Traditional CFD Computational Domain – Receiving Feedback and Updating. The traditional CFD computational domain receives feedback data and completes the closed loop of the iterative cycle: (a) Flow field update: The received U... AI n The initial flow field U for the next iteration (n+1 steps) n+1(b) Parameter update: The controller parameter control module updates the received ΔP value, replacing the intermediate value originally calculated by the traditional solver. n The internal parameters were updated: the CFL number was adjusted from 0.5 to 0.7, and the pressure relaxation factor was adjusted from 0.3 to 0.25. This allows the next iteration to proceed more quickly while maintaining stability.

[0130] S507: Hybrid Iteration and Convergence Judgment. The system repeatedly executes S2→S3→S4→S5→S6, forming an intelligent enhancement closed loop. (a) Convergence Monitoring: After each hybrid iteration step, the system calculates the global residual of the flow field after PCNN correction. The intelligent controller finds that after about 150 hybrid iterations, the residual norm has increased from the initial 1e -2 Decrease and stabilize at 1e -6 The following conditions are met, and the rate of change of key monitoring points (such as shock wave detachment distance and wall heat flux) is relatively small. (b) Convergence judgment and output: The convergence criteria are met. The system terminates the calculation and outputs the final high-precision flow field results through the visualization and post-processing module of the user interface layer. At the same time, the system automatically generates a performance report, recording the parameter adjustment history of the APO module and the degree of correction contribution of the PCNN module.

[0131] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.

Claims

1. A CFD calculation method for aircraft flow field simulation, characterized in that, The method is performed by a computer system, the computer system including a processor and a memory, and the method includes: Initialization steps: Read the calculation parameters and mesh file of the current calculation task, determine whether a restart file exists, if it exists, load the flow field data; otherwise, perform flow field initialization based on the incoming flow conditions; the calculation parameters include flight altitude, flight speed, and chemical reaction model; the flow field initialization includes: adaptively selecting the NS equation type based on the flight altitude and flight speed, and matching the corresponding chemical reaction model; CFD solution steps: Solve the Navier-Stokes equations based on the finite volume method, record the solution parameters for the current iteration step, and output the intermediate flow field; the solution parameters include the time step, relaxation factor, and numerical dissipation coefficient; for compressible flow, the time step is calculated by the following formula: Where Δx is the characteristic length of the grid cell; u is the local flow velocity; and c is the local speed of sound. This indicates taking the minimum value across all grid cells; Physical constraint correction steps: Input the intermediate flow field and grid coordinates into a pre-trained physical constraint neural network, and sequentially apply hard boundary condition constraints and soft constraints based on the residuals of the governing equations to output a corrected flow field; wherein, applying hard boundary condition constraints includes: inputting the intermediate flow field and grid coordinates into the pre-trained physical constraint neural network, obtaining a preliminary predicted flow field through network forward propagation; applying hard boundary condition constraints to the preliminary predicted flow field at the output layer of the physical constraint neural network to obtain a flow field corrected by hard constraints; the hard boundary condition constraints include: setting the velocity vector of the identified wall boundary nodes to zero to satisfy the no-slip condition; for symmetry plane boundary nodes, making the physical quantities of corresponding nodes on both sides of the symmetry plane equal; Adaptive parameter optimization steps: Based on the convergence dynamic features of the current and historical iteration steps and the solution parameters, the policy network trained by reinforcement learning outputs the parameter adjustment amount for the next iteration step to dynamically optimize the time step, relaxation factor and numerical dissipation coefficient. Feedback and loop steps: The modified flow field is used as the initial flow field for the next iteration of the CFD solution step, and the solution parameters are updated by applying the parameter adjustment amount. Then, the CFD solution step is returned to be executed until the flow field calculation results meet the preset convergence conditions.

2. The CFD calculation method for aircraft flow field simulation according to claim 1, characterized in that, The soft constraints based on the residuals of the governing equations include: For the flow field U after the hard constraint correction AI,hard n The residual operator for the Navier-Stokes equations is defined as follows: ;where, U=[ρ,ρu,ρv,ρw,ρE] T It is a conserved variable; For convection terms, For diffusion terms; The flow field U is calculated by automatic differentiation on a discrete grid. AI,hard n At each sampling point The residuals on the surface are calculated, and the physical loss is calculated. Let the norm of the residual be: ;in, This represents the total number of sampling points; To minimize the physical loss For the target, the flow field U AI,hard n Fine-tuning was performed to obtain the final corrected flow field U. AI n .

3. The CFD calculation method for aircraft flow field simulation according to claim 1, characterized in that, The convergence dynamics features include the current residual norm, residual descent rate, residual oscillation frequency, and amplitude.

4. The CFD calculation method for aircraft flow field simulation according to claim 3, characterized in that, The policy network trained through reinforcement learning outputs parameter adjustments for the next iteration, including: The convergence dynamic features are combined with the current solution parameters to construct a multidimensional state feature vector; The multidimensional state feature vector is input into the policy network pre-trained by reinforcement learning; the policy network outputs the parameter adjustments for the time step, relaxation factor, and numerical dissipation coefficient.

5. The CFD calculation method for aircraft flow field simulation according to claim 4, characterized in that, The reinforcement learning pre-trained policy network is trained using a deep deterministic policy gradient algorithm, and its reward function during training includes: Convergence Rewards: Stability penalty: Among them, osc level This is an oscillation index calculated based on the residual history; Step penalty items: ; And parameter adjustment penalty items: ; Among them, R t Let represent the global residual norm at step t. , , , , Preset weighting coefficients; Adjust the vector for the parameters.

6. The CFD calculation method for aircraft flow field simulation according to claim 1, characterized in that, The application of the parameter adjustment amount to update the solution parameters includes: For time step Indirect updates are achieved by adjusting the number of CFLs: Where, η CFL It is the learning rate of the CFL number; For the relaxation factor, the pressure equation and the equations for each velocity component are updated respectively, and the updated relaxation factor is limited to a preset range. For numerical dissipation coefficients, their update values ​​are restricted to a range that is non-negative and does not exceed a preset upper limit.

7. The CFD calculation method for aircraft flow field simulation according to claim 1, characterized in that, The preset convergence conditions include: Calculate the global residual norm based on the modified flow field and monitor the rate of change of key physical quantities. When the global residual norm drops below a preset threshold and the rate of change of the key physical quantities in multiple consecutive iterations is less than a specific tolerance, it is determined that the convergence condition is met. The key physical quantities include the lift coefficient and the drag coefficient.

Citation Information

Patent Citations

  • Flow field data correction method and device, data processing equipment and storage medium

    CN115690392A

  • Time step adaptive adjustment method for fluid unsteady calculation

    CN118194758A

  • Fluid mechanics calculation method and system based on CFD simulation optimization

    CN120654591A

  • Rapid heat transfer simulation method and device based on neural network

    CN121480306A