A controllable turbulence generation method and system based on LBM neural spectrum forcing
Patent Information
- Application Number
- CN202611091251.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-22
- Publication Date
- 2026-08-21
AI Technical Summary
[0005]传统随机强迫法一般直接在物理空间施加随机体力,而强迫项与目标均方根速度、目标输入功率之间缺少显式闭环关系,导致生成流场的统计量易发生能量漂移,难以满足精确控制需求
神经谱强迫器仅输出体力项而非速度场,使流场演化仍由LBM物理方程完成,在引入神经网络自适应能力的同时保持了质量守恒和动量守恒等物理一致性;通过低波数谱投影将能量注入限制在用户指定的波数范围以内,避免直接干扰小尺度结构;通过功率归一化在每个时间步将实际注入功率精确校正至目标值,解决了能量漂移问题;通过统计误差反馈更新神经谱强迫器参数,形成功率和速度的双闭环自适应调节,使生成流场在均方根速度和输入功率上同时满足目标约束。相比现有方法,本方案在保持物理一致性的前提下实现了湍流统计量的精确可控。
Smart Images

Figure CN122616425A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of fluid mechanics and fluid simulation technology, specifically a method and system for generating controllable turbulence based on LBM neural spectrum forcing. Background Technology
[0002] The statements in this section merely refer to the background art related to this invention and do not necessarily constitute prior art.
[0003] Turbulent background field is an important input condition for numerical simulation of particle motion, bubble motion and multiphase flow interaction. Its root mean square velocity, input power and energy spectrum distribution directly affect key dynamic behaviors such as particle trajectory and collision probability.
[0004] Traditional methods for generating turbulent background fields mainly include the traditional random forcing method, the fixed spectrum forcing method, and the direct prediction method based on neural networks.
[0005] Traditional random forced methods generally apply random body forces directly in the physical space. However, there is no explicit closed-loop relationship between the forced term and the target root mean square velocity and target input power, which makes the statistics of the generated flow field prone to energy drift and difficult to meet the requirements of precise control.
[0006] Although the fixed spectrum forcing method can limit energy injection to the low wavenumber range, its forcing amplitude is given by a preset rule, making it difficult to adaptively adjust according to the actual state of the flow field. In the long-term evolution, the statistics are prone to deviate from the target value.
[0007] Direct prediction rules based on neural networks directly use the velocity field as the network output. Although they have the ability to express parameters, they are prone to weakening the conservation of mass, momentum and mesoscopic dynamics, and errors are prone to continuous accumulation over long periods of evolution. Summary of the Invention
[0008] This invention provides a controllable turbulence generation method and system based on LBM neural spectrum forcing. Instead of directly replacing the flow field solver with a neural network, the system generates body force terms through a neural spectrum forcifier and then completes the mesoscopic evolution through the LBM equations. At the same time, through low wavenumber spectral projection, input power normalization, and target statistic feedback control, the generated turbulent field has better controllability and reproducibility in terms of root mean square velocity, input power, divergence-free constraints, and energy spectrum structure.
[0009] To achieve the above objectives, the present invention adopts the following technical solution: The first aspect of this invention discloses a method for generating controllable turbulence based on LBM neural spectrum forcing, comprising the following steps: Obtain the target statistical control parameters configured by the user. The target statistical control parameters include at least the target root mean square velocity, the target input power per unit mass, and the low wavenumber forced cutoff range. An initial velocity field satisfying the divergence-free condition is generated in the periodic computational domain and initialized as an LBM distribution function; At each time step, the macroscopic velocity and density are inversely calculated from the current LBM distribution function, and the inversely calculated current velocity field and the flow field features extracted from it are input into the neural spectrum forcifier, which outputs the physical force term. By performing zero-mean processing and low wavenumber spectrum projection on the physical force term, the energy injection is limited to the low wavenumber forced cutoff range. Calculate the actual input power between the current physical force term and the current velocity field, and normalize the physical force term according to the target unit mass input power; couple the corrected physical force term into the LBM collision step, perform collision and migration to complete the mesoscopic evolution, and update the LBM distribution function; The relative error between the current root mean square velocity and the target root mean square velocity, and the relative error between the current input power and the target unit mass input power are calculated based on the evolved flow field. The parameters of the neural spectrum forcifier are updated to form a closed-loop adaptive adjustment. The above time step evolution is repeated until the preset conditions are met, and the turbulent background field is output.
[0010] Furthermore, before inputting the current flow field features into the neural spectrum forcifier, the process includes: performing a Fourier transform on the current velocity field and applying a low wavenumber mask to extract the low wavenumber velocity components, and calculating the vorticity and the Laplace term of the low wavenumber velocity in the current flow field; the current flow field features include the current velocity field, the low wavenumber velocity components, the vorticity, and the Laplace term.
[0011] Furthermore, a low wavenumber mask is defined as... , ,as well as , ,in The low wavenumber forced cutoff range configured for the user, where |k| is the wavenumber modulus, in the two-dimensional case. In three dimensions .
[0012] Furthermore, the neural spectrum compulsor is presented in a parameterized form, as shown in the following equation: ; in For low wavenumber velocity components, For the Laplace term of low wavenumber velocity, vorticity, , , For trainable parameters; the neural spectrum compulsor only outputs the physical force term. The flow field evolution is then completed through the subsequent LBM equations.
[0013] Furthermore, the physical force term is subjected to zero-mean processing. Specifically, the spatial average value of the physical force field is calculated throughout the entire computational domain, and this average value is subtracted from the physical force value at each grid point to make the spatial average physical force of the entire physical force field zero, thus preventing overall momentum drift.
[0014] Furthermore, the physical force term is subjected to low wavenumber spectral projection. Specifically, the physical force term after zero-mean processing is transformed to the spectral space and filtered using the same low wavenumber mask used when extracting low wavenumber velocity components. Components with wavenumber modulus less than or equal to the low wavenumber forced cutoff range are retained and then transformed back to physical space.
[0015] Furthermore, the physical strength component is normalized and corrected according to the target input power. Specifically, the correction coefficient is calculated based on the target input power. Compared with the current actual input power The ratio is obtained by multiplying the physical strength term by the correction factor. ,in d To prevent small positive numbers with a denominator of zero, d The value of is related to the target input power It establishes a preset proportional relationship; at the same time, it sets an upper limit threshold to trim the corrected physical strength item to prevent excessive physical strength from causing the LBM value to diverge.
[0016] Furthermore, based on the statistical error of the evolved flow field, the parameters of the neural spectrum forcifier are updated. Specifically, the relative error between the root mean square velocity of the current flow field and the target root mean square velocity, the relative error between the current input power and the target input power, and the divergence norm error of the velocity field are calculated. The three are weighted and summed to construct a feedback loss function. Based on the feedback loss function, the trainable parameters of the neural spectrum forcifier are updated by gradient descent or heuristically adjusted so that the subsequently generated physical force terms continuously approach the target constraint.
[0017] Furthermore, the output turbulent background field satisfies the target statistical constraints. Specifically, when the preset evolution step number is reached or the statistical error is lower than the set threshold, the output turbulent background field file containing velocity field, vorticity field, and energy spectrum data is output, or it is directly transferred to the downstream simulation module for background flow field input for particle motion, bubble motion, particle-bubble collision, or multiphase flow simulation.
[0018] A second aspect of the present invention discloses a controllable turbulence generation system based on LBM neural spectrum forcing, comprising: The parameter receiving module is configured to: acquire user-configured target statistical control parameters, which include at least the target root mean square velocity, the target unit mass input power, and the low wavenumber forced cutoff range; The initialization module is configured to generate an initial velocity field that satisfies the divergence-free condition in the periodic computational domain and initialize it as an LBM distribution function. The neural spectrum forcing module is configured to: at each time step, back-calculate the macroscopic velocity and density from the current LBM distribution function, input the back-calculated current velocity field and the flow field features extracted from it into the neural spectrum forcing module, and output the physical force term; The constraint processing module is configured to perform zero-mean processing and low-wavenumber spectrum projection on the physical term to limit energy injection within the low-wavenumber forced cutoff range. The power normalization module is configured to: calculate the actual input power between the current physical strength term and the current velocity field, and normalize and correct the physical strength term according to the target unit mass input power; The LBM evolution module is configured to: couple the corrected body force terms into the LBM collision step, perform collisions and migrations to complete the mesoscopic evolution, and update the LBM distribution function; The feedback adjustment module is configured to: calculate the relative error between the current root mean square velocity and the target root mean square velocity, and the relative error between the current input power and the target unit mass input power based on the evolved flow field, update the parameters of the neural spectrum forcifier, and form a closed-loop adaptive adjustment; The iteration control module is configured to repeat the execution of the above modules until the preset conditions are met. The output module is configured to output the turbulent background field.
[0019] Compared with existing technologies, one or more of the above technical solutions have the following beneficial effects: The neural spectrum forcifier outputs only the body force term, not the velocity field, allowing the flow field evolution to still be driven by the LBM physical equations. This maintains physical consistency, such as mass and momentum conservation, while incorporating the adaptive capabilities of the neural network. Energy injection is limited to a user-specified wavenumber range through low-wavenumber spectral projection, avoiding direct interference with small-scale structures. Power normalization precisely corrects the actual injected power to the target value at each time step, resolving the energy drift problem. Statistical error feedback updates the neural spectrum forcifier parameters, forming a dual closed-loop adaptive adjustment of power and velocity, ensuring the generated flow field simultaneously satisfies the target constraints on both root-mean-square velocity and input power. Compared to existing methods, this scheme achieves precise controllability of turbulence statistics while maintaining physical consistency. Attached Figure Description
[0020] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.
[0021] Figure 1A schematic diagram of the overall process of a controllable turbulence generation method provided in one or more embodiments of the present invention; Figure 2 A schematic diagram illustrating the coupling relationship between LBM mesoscopic evolution and neural spectrum compulsor provided for one or more embodiments of the present invention; Figure 3 A schematic diagram illustrating the application relationship of the controllable turbulent background field provided in one or more embodiments of the present invention in particle-bubble collision simulation; Figure 4 Different forcing methods in a two-dimensional control experiment provided for one or more embodiments of the present invention Historical curve diagram; Figure 5 Different forcing methods in a three-dimensional control experiment provided for one or more embodiments of the present invention Historical curve diagram; Figure 6 A schematic diagram of the velocity modulus verification of a cross section in a three-dimensional D3Q19 periodic cell provided for one or more embodiments of the present invention. Detailed Implementation
[0022] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0023] It should be noted that the following detailed descriptions are exemplary and intended to provide further illustration of the invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.
[0024] As introduced in the background section, traditional methods for generating turbulent background fields mainly include traditional random forcing methods, fixed spectrum forcing methods, and direct prediction methods based on neural networks. These methods can generate velocity fields with turbulent characteristics under certain conditions, but they still have shortcomings in terms of controllability, reproducibility, and closed-loop adjustment of target statistics.
[0025] Specifically, both the stochastic forcing method and the fixed spectrum forcing method adopt an "open-loop" control mode, meaning that after applying body force according to preset rules, no further correction is made based on the actual state of the flow field. Because turbulent evolution itself has strong nonlinear and statistical fluctuation characteristics, the energy transfer relationship between the forcing term and the flow field cannot be monitored in real time under the open-loop mode, resulting in the root mean square velocity and input power deviating from the target values and failing to be automatically corrected.
[0026] To address the shortcomings of open-loop control, some existing technologies have attempted to introduce neural networks to directly predict the velocity field, forming a direct prediction method based on neural networks, hoping to achieve adaptive adjustment by utilizing its parameterized expression capabilities. However, this method directly outputs the macroscopic velocity field through the neural network, bypassing the constraints of the fundamental equations of fluid mechanics, violating physical laws such as the conservation of mass and momentum, and the prediction error accumulates continuously over long periods of iteration, leading to a decrease in statistical stability.
[0027] Therefore, this scheme provides a controllable turbulence generation method and system based on LBM neural spectrum forcing. Instead of directly replacing the flow field solver with a neural network, it uses the neural network as a generation module for the volumetric terms. At the same time, it introduces a power normalization mechanism and a statistical feedback loop to establish an explicit closed-loop relationship between the forcing terms and the target statistics. Under the premise of maintaining the consistency of LBM mesoscopic physics, it achieves accurate and controllable generation of the turbulence background field.
[0028] The relevant technical terms used in this solution are explained below.
[0029] LBM (Lattice Boltzmann Method) is a method that uses computers to simulate fluids, interpreting fluids as many tiny particles "colliding" and "moving" on a lattice, and obtaining the macroscopic motion of the fluid by statistically analyzing the behavior of these particles.
[0030] The D2Q9 / D3Q19 model is a lattice velocity model used in LBM. D2Q9 means that each cell in two-dimensional space considers 9 directions of motion, and D3Q19 means that each cell in three-dimensional space considers 19 directions of motion.
[0031] The equilibrium distribution function is a mathematical expression in LBM that describes how particles should be distributed in a perfectly steady state.
[0032] The distribution function, in LBM, is a set of values describing how many particles are in each cell and in each direction; it is the fundamental variable in LBM calculations.
[0033] The Guo forcing scheme is a standard method for correctly incorporating external forces (body forces) into the LBM equations, ensuring that fluid motion still conforms to physical laws after the forces are added.
[0034] The body force term is a virtual force acting on each particle within the fluid, rather than the force acting on the fluid boundary. In this scheme, the body force term is calculated and generated by a neural spectrum forcifier based on the current flow field state. It is used to continuously inject energy into the turbulent field to maintain or adjust statistical characteristics such as turbulence intensity and energy spectrum distribution. It is the core physical quantity connecting the neural network and the LBM flow field evolution equation.
[0035] The collision step, in LBM simulation, is the computational process that simulates the collisions between particles on a lattice and their approach to an equilibrium state.
[0036] The migration step, in LBM simulations, is the computational step where simulated particles move along their respective directions to adjacent lattice cells.
[0037] The divergence-free condition (zero divergence) means that the divergence of the velocity field is zero. For incompressible fluids (such as water), this means that the fluid can neither be created nor disappear out of thin air.
[0038] Spectral space / wavenumber is the velocity distribution obtained after performing a Fourier transform on the velocity field in physical space. The lower the wavenumber, the larger the vortex, and the higher the wavenumber, the smaller the vortex.
[0039] Low wavenumber mask, a mathematical filter that only allows low wavenumbers (large-scale components) to pass through.
[0040] Spectral projection is the process of transforming a physical quantity into spectral space, then using a mask to filter out unwanted wavenumber components, and finally transforming it back into physical space.
[0041] The anisotropy norm is an index that measures whether turbulence is statistically uniform in different directions. The closer the value is to 0, the more isotropic the turbulence is (the properties are the same in all directions).
[0042] Periodic boundary conditions are a common boundary handling method in computer simulations. If a particle goes out from the left, it returns from the right; if it goes out from the top, it returns from the bottom, simulating an infinitely large space.
[0043] The stream function is a mathematical function used to describe the flow state in a two-dimensional incompressible fluid. The velocity field obtained by differentiating the stream function automatically satisfies the divergence-free condition.
[0044] Helmholtz projection is a mathematical operation that removes divergent components from a velocity field in three dimensions, ensuring that the velocity field satisfies the incompressibility condition.
[0045] Small positive numbers are extremely small positive numbers introduced to prevent calculation crashes caused by a denominator of zero in the formula. Their values are much smaller than the normal calculation values, and their impact on the normal calculation results is negligible. They only serve to protect the numerical values.
[0046] Explanation of key formula symbols: (1) Basic parameters: N x , N y , N z They are respectively x , y , z Number of grid cells in the direction; r For density, t For relaxation time, n For kinematic viscosity, cs For the speed of sound in a grid.
[0047] (2) LBM variables: c i For the first i A discrete velocity, w i For the corresponding weights, f i The distribution function, f i eq For the equilibrium distribution function, F i This is the discrete term for physical forces.
[0048] (3) Spectral space and forcing variables: u It is a velocity vector. u low For low wavenumber velocity components, oh vorticity, k For wavenumber vectors, | k | represents the wavenumber modulus. k f This is the range for forced cutoff at low wavenumbers; F θ , F θ low , F θ corr These are the original physical fitness term, the low-wavenumber projected physical fitness term, and the power-normalized corrected physical fitness term, respectively. a 1. a 2. a 3 represents the trainable or feedback-updated parameters of the neural spectrum compulsor.
[0049] (4) Feedback control variables: P * Input power per unit mass, P ( t () represents the current actual input power. u rms * For the target root mean square velocity, u rms ( t ) represents the current root mean square velocity. E div For divergence error, J ( i ) is the feedback loss function. l u , l P , l d , lE These are the weighting coefficients. J E For energy spectrum constraint error, d To prevent small positive numbers with zero denominators in power normalization, d k To prevent | in Helmholtz projection k Small positive numbers whose |=0 α safe For protective normalized safety factor, F max The upper limit for physical strength reduction, or This is the learning rate.
[0050] This scheme receives user-specified control parameters such as the target root mean square velocity, target input power, and low wavenumber forced cutoff range through a computer program. It initializes the LBM distribution function in the periodic computation domain. Then, at each time step, the neural spectrum forcifier generates a body force term with the current flow field characteristics as input. After zero-mean processing, low wavenumber spectrum projection, and power normalization correction, it is coupled into the LBM collision-migration evolution through the Guo forcing scheme. The neural spectrum forcifier parameters are continuously updated through a statistical feedback loss function, and finally, the turbulent background field that satisfies the target statistical constraints is output.
[0051] A method for generating controllable turbulence based on LBM neural spectrum forcing includes the following steps: Step S1: The computer program receives the target statistical control parameters configured by the user; Specifically, the computer program reads the target root mean square velocity specified by the user in the simulation program. Target unit mass input power Low wavenumber forced cutoff range Number of computational domain grids LBM relaxation time Initial density Total number of evolutionary steps T and output interval The data is loaded into memory as a constraint for subsequent numerical iteration calculations. Step S2: The computer program constructs a periodic computation domain in memory; Specifically, the computer program calculates the number of grid cells received by S1. A three-dimensional array is allocated in memory to establish a computational domain with periodic boundary conditions. The periodic boundary is mapped back to the particle index through modulo operation to eliminate the interference of the wall boundary on the turbulent statistical properties. Step S3: The computer program selects and initializes the LBM discrete velocity model according to the computational domain dimension; Specifically: If Nz =1, then the computer program loads the two-dimensional D2Q9 model. N z If >1, load the 3D D3Q19 model and store each discrete velocity direction and corresponding weight coefficient in memory for later use; Step S4: The computer program generates an initial velocity field that satisfies the divergence-free condition using a spectral method; Specifically: In the two-dimensional case, the computer program generates a random stream function in the spectral space, derives the initial velocity components by calculating partial derivatives, and automatically satisfies the condition of zero divergence; in the three-dimensional case, after generating a random velocity field, the computer program removes the divergent components through Helmholtz projection; subsequently, the root mean square velocity of the initial velocity field is normalized to the target value set by S1. The results are stored in the velocity field array; Step S5: The computer program converts the initial macroscopic velocity field into the LBM mesoscopic distribution function; Specifically, the computer program traverses each cell and calculates the initial distribution function value for each cell and each discrete velocity direction using the equilibrium distribution function formula, based on the initial velocity field generated by S4 and the initial density set by S1, as the initial state for LBM collision and migration evolution. Step S6: At each time step, the computer program calculates the macroscopic velocity and density at the current moment from the distribution function; Specifically, the computer program sums the distribution functions of each velocity direction in each cell to obtain the macroscopic density, multiplies the distribution functions of each direction by the corresponding velocity, sums them, and adds half of the contribution of the body force term to obtain the macroscopic velocity. Step S7: The computer program extracts large-scale velocity components from the current velocity field; Specifically, the computer program performs a Fast Fourier Transform on the current velocity field and applies a low wavenumber mask function to retain only wavenumbers with a modulus less than or equal to 1. The large-scale components are then used to obtain the low-wavenumber velocity field through inverse Fourier transform. ; Step S8: The computer program calculates the vorticity field and the Laplace term of the low wavenumber velocity in the current flow field; Specifically, the computer program performs spatial differentiation on the current velocity field to obtain the vorticity field. Calculate the Laplace term for low wavenumber velocities in spectral space. ; Step S9: The computer program instantiates the neural spectrum compulsor module and generates the physical item; Specifically: The computer program instantiates a neural spectrum compulsor in memory, which operates at the current velocity field. u Low wavenumber velocity Laplace item vorticity As input, the output is the physical force applied to each grid point. The neural spectrum forcifier does not directly output the velocity field, but only the body force term; the flow field evolution is completed by the subsequent LBM equations. In one feasible implementation, the neural spectrum forcifier is in parameterized form. , , , These are trainable parameters; Step S10: The computer program performs zero-mean correction on the physical fitness item; Specifically, the computer program calculates the spatial average value of the force field across the entire computational domain, subtracts this average value from the force value at each grid point, and makes the spatial average force of the entire force field zero to prevent overall momentum drift. Step S11: The computer program performs low wavenumber spectrum projection on the physical activity item; Specifically, the computer program performs a Fourier transform on the zero-mean physical quantity term, and applies the same low wavenumber mask as S7 to retain only wavenumbers with a modulus less than or equal to 1. The component is then transformed back into physical space to ensure that the energy injection of the physical term is strictly limited to the large-scale mode. Step S12: The computer program calculates the actual power injected into the velocity field by the current physical force term; Specifically, the computer program traverses the entire computational domain, calculates the dot product of the velocity vector and the body force vector at each grid point, and then takes the spatial average to obtain the actual input power at the current moment. ; Step S13: The computer program normalizes and corrects the physical strength component based on the target unit mass input power; Specifically, the computer program calculates the input power per unit mass of the target. P * Compared with the current actual input power The ratio is used to multiply the entire force field by this ratio to obtain the corrected force term. This ensures that the actual injected power of the corrected physical strength component is exactly equal to the target value. At the same time, upper limit pruning is performed to prevent excessive stamina from causing LBM divergence; Step S14: The computer program constructs a feedback loss function based on the current statistical error; Specifically, the computer program calculates the root mean square velocity of the current flow field. With target value The relative error, current input power With target value P The relative error, the divergence norm error of the current velocity field, and the weighted sum of these three factors yield the loss function. ; Step S15: The computer program updates the trainable parameters of the neural spectrum compulsor according to the feedback loss function; Specifically, the computer program calculates the loss function relative to the parameters of the neural spectrum compulsor. , , The gradient is used to update the parameter values along the gradient descent direction, so that the physical terms generated by the neural spectrum forcible in subsequent time steps are more in line with the target constraints. Step S16: The computer program discretizes the corrected physical force terms into each velocity direction of the LBM using the Guo forcing scheme; Specifically, the computer program iterates through each discrete velocity direction on each grid cell, using the Guo forcing formula to convert the macroscopic physical force term... Discretely represented by the body force contribution in each direction. This ensures that physical energy is properly allocated at the mesoscopic level, maintaining the conservation of mass and momentum. Step S17: The computer program executes the LBM collision procedure; Specifically, the computer program calculates the relaxation process from the current distribution function to the equilibrium distribution function for each discrete velocity direction on each grid cell, and adds the physical force contribution term generated in S16 to obtain the intermediate distribution function after the collision. Step S18: The computer program executes the LBM migration steps; Specifically, the computer program propagates the intermediate distribution function obtained in S17 to adjacent cells along their respective discrete velocity directions, and maps cells that exceed the boundary of the computational domain back into the computational domain by taking the modulus of the periodic boundary conditions. Step S19: The computer program updates macroeconomic quantities and statistical indicators; Specifically, the computer program calculates the density and velocity from the updated distribution function, and then calculates the root mean square velocity of the current flow field. Turbulent kinetic energy Input power divergence error These statistical indicators are used for monitoring and updating feedback parameters for the next round. Step S20: The computer program outputs a controllable turbulent background field; Specifically: when the set total number of evolution steps is reached... T If the current statistical error is lower than the set threshold, the computer program will write the velocity field, vorticity field, and energy spectrum data to a file or pass them to the downstream simulation module as the background flow field input for particle motion, bubble motion, and multiphase flow simulation.
[0052] This scheme uses the target root mean square velocity, target input power, low wavenumber forced cutoff range, computational domain size, and LBM relaxation time as control parameters, the lattice Boltzmann equation as the flow field evolution equation, and the body force term output by the neural spectrum forcifier as the energy injection source. Through divergence-free initial field construction, low wavenumber spectrum projection, input power normalization, LBM body force coupling, and statistical feedback updates, a controllable and reproducible turbulent background field is generated.
[0053] The above steps S1-S20 can be summarized as follows: Corresponding step S1: Obtain the target statistical control parameters configured by the user. The target statistical control parameters include at least the target root mean square velocity, the target unit mass input power, and the low wavenumber forced cutoff range. Corresponding steps S2-S5: Generate an initial velocity field that satisfies the divergence-free condition in the periodic computation domain and initialize it as the LBM distribution function; Corresponding steps S6-S11: In each time step, the macroscopic velocity and density are calculated from the current LBM distribution function, and the calculated current velocity field and the flow field features extracted from it are input into the neural spectrum forcifier, which outputs the physical force term; by performing zero-mean processing and low wavenumber spectrum projection on the physical force term, the energy injection is limited to the low wavenumber forced cutoff range. Corresponding steps S12-S19: Calculate the actual input power between the current physical force term and the current velocity field, and normalize the physical force term according to the target unit mass input power; couple the corrected physical force term into the LBM collision step, perform collision and migration to complete the mesoscopic evolution, and update the LBM distribution function; Corresponding step S20: Calculate the relative error between the current root mean square velocity and the target root mean square velocity, and the relative error between the current input power and the target unit mass input power based on the evolved flow field, update the parameters of the neural spectrum forcifier, and form a closed-loop adaptive adjustment; repeat the above time step evolution until the preset conditions are met, and output the turbulent background field.
[0054] The following is combined with Figure 1 This section describes the specific process of this plan.
[0055] S1: Input target statistical control parameters The computer program receives the target statistical control parameters configured by the user. Specifically, the user specifies the parameters required to generate a controllable turbulent background field in the simulation program's configuration file or command-line interface. The computer program reads and loads these parameters into memory as constraints for subsequent numerical iterative calculations.
[0056] This step is equivalent to telling the simulation program "what kind of turbulence to generate". The user provides parameters such as grid size, target root mean square velocity, target input power, and low wavenumber range, and the program uses these parameters as control targets for subsequent calculations.
[0057] In this scheme, the target statistics and numerical calculation parameters required for generating the controllable turbulent background field are input as follows: ; in, This represents the number of grid cells in each direction of the computational domain. LBM relaxation time; The initial fluid density; The target is the root mean square velocity; Input power per unit mass; This is the range for forced cutoff at low wavenumbers; T This represents the total number of evolution steps. This defines the output interval. Two-dimensional calculations are performed using... =1, taken as 1 in three-dimensional calculations All are greater than 1.
[0058] Next, the computer program selects and initializes the LBM discrete velocity model according to the dimension. Specifically, the computer program selects the corresponding LBM velocity model according to the computational domain dimension set by S1.
[0059] S2: Constructing a periodic computation domain This step involves building a loopable computational box within a computer program. When a velocity or particle crosses the boundary from one side, it returns to the domain from the other side, simulating a locally uniform turbulent environment using periodic boundaries.
[0060] like N z =1 (two-dimensional), the program loads the D2Q9 model, which defines 9 discrete velocity directions and corresponding weighting coefficients; if N z >1 (3D): The program loads the D3Q19 model, which defines 19 discrete velocity directions and corresponding weight coefficients. These velocity directions and weights are repeatedly used in subsequent collision and migration calculations.
[0061] In this scheme, a two-dimensional or three-dimensional periodic computational domain is established. This periodic computational domain is used to avoid the interference of wall shear, near-wall damping and non-uniform boundary structures on the background flow field statistics, so that the generated flow field is mainly controlled by the target statistics and the neural spectrum forcing mechanism.
[0062] In the two-dimensional case, the computational domain is: ; In the three-dimensional case, the computational domain is: ; Δ can be taken in the grid unit. x =Δ y =Δ z=1, Δ t =1.
[0063] Periodic boundary conditions are applied in all directions: ; in, For the computational domain, Let x be the length of the computational domain in the x-direction. Let be the length of the computational domain in the y-direction. Let Δ be the length of the computational domain in the z-direction. x、 Δ y、 Δ z The physical dimensions of each cell in the x, y, and z directions, Δ t The time interval for each time step, It is a velocity vector. For the length of the computational domain in the corresponding direction (e.g.) , , ).
[0064] S3: Set up the LBM discrete velocity model This step selects the directions that LBM allows particle movement on the grid. Nine directions are used in 2D and 19 directions are used in 3D. Subsequent collisions and migrations are performed according to these directions.
[0065] S3.1: Two-dimensional D2Q9 model The two-dimensional implementation adopts the D2Q9 lattice velocity model (each lattice in two-dimensional space has 9 discrete velocity directions), and its discrete velocities are: ; ; ; The corresponding weights are: ; in, This is the 0th discrete velocity direction (the direction in which the particle remains stationary). These are the 1st to 4th discrete velocity directions (referring to the particle moving in the four directions of up, down, left, and right). These are the 5th to 8th discrete velocity directions (referring to the particle moving in the four diagonal directions).
[0066] S3.2: 3D D3Q19 Model The three-dimensional implementation uses a D3Q19 lattice velocity model (each lattice in three-dimensional space has 19 discrete velocity directions). These discrete velocities include a stationary velocity c0 = (0,0,0), six axial velocities (±1,0,0), (0,±1,0), and (0,0,±1), and twelve face angular velocities (±1,±1,0), (±1,0,±1), and (0,±1,±1). The corresponding weights are: ; Both of the above models have lattice speeds of sound: ; The kinematic viscosity is: ; in, The square of the speed of sound in a lattice For relaxation time, For time step.
[0067] S4: Generate an initial velocity field that satisfies the divergence-free condition. The computer program generates the initial velocity field using a spectral method and ensures that the divergence-free condition is met. Specifically, the computer program generates a random velocity field in the spectral space (Fourier space) and ensures that it meets the divergence-free condition of an incompressible fluid through specific mathematical operations. In the two-dimensional case, the program first generates a random stream function, and then obtains the velocity field by calculating the partial derivatives. This operation automatically ensures that the divergence is zero. In the three-dimensional case, after generating a random velocity field, the program removes divergent components using Helmholtz projection. The program then normalizes the root mean square velocity of the velocity field to the target value set by S1. The results are stored in the velocity field array as initial conditions for subsequent LBM evolution.
[0068] This step first generates an initial velocity field without artificial compression or expansion. For two dimensions, the stream function is differentiated; for three dimensions, Helmholtz projection is used to remove divergent components; and then the velocity intensity is adjusted to the target value.
[0069] S4.1: Two-dimensional divergence-free initial velocity field In the two-dimensional case, first construct a random stream function in the spectral space. ψ ( x,y Then, the initial velocity components are derived from the stream function: ; ; Therefore, the no-dispersion condition is automatically satisfied: ; The initial velocity was then subjected to zero-mean processing: ; The two-dimensional root mean square velocity is defined as: ; Normalize the initial velocity to the target intensity: ; in, The initial x-direction velocity component, The initial y-direction velocity component, Take the partial derivative of the stream function with respect to y. Find the partial derivative of the stream function with respect to x.
[0070] S4.2: Three-dimensional divergence-free initial velocity field In three dimensions, a random velocity field is generated in the spectral space. û(k)=(û, , ) And Helmholtz projection is used to remove scattered components: ; in, d k To prevent | k When |=0, it is a small positive number with a denominator of zero. This is used to prevent calculation crashes caused by a zero denominator in the formula. Its value is much smaller than the normal calculation value. In this embodiment, it can be taken as... d k =10 -6 ×| k |
[0071] After projection, the following conditions are met: ; The velocity field in physical space is obtained through inverse Fourier transform: ; The three-dimensional root mean square velocity is defined as: ; and according to The three-dimensional initial velocity field is normalized.
[0072] in, For the velocity field in spectral space, û, , Let be the velocity components in the spectral space corresponding to the x, y, and z directions, respectively. For wavenumber vectors, It is a divergence-free velocity field (spectral space). This is the inverse Fourier transform.
[0073] S5: Initialize the LBM mesoscopic distribution function The computer program converts the initial macroscopic velocity field into an LBM mesoscopic distribution function. Specifically, the computer program traverses every cell in the computational domain and calculates the initial velocity field generated by S4. u 0, S1 set initial density The velocity model selected by S3 is used to calculate the particle distribution value for each grid cell and each discrete velocity direction using the equilibrium distribution function formula. These distribution values form a four-dimensional array (three-dimensional space × number of velocity directions), which is stored in memory as the initial state for subsequent collision and migration calculations.
[0074] This step converts velocity and density, which are easily understood by humans, into the distribution function used by LBM, which is equivalent to assigning an initial number of particles to each grid point and each direction of motion.
[0075] This scheme is based on the initial density. and initial velocity field u Construct the equilibrium distribution function: ; In the grid unit cs 2 =1 / 3, the above formula can be written as: ; The initial distribution function is taken as: ; This step transforms the macroscopic initial velocity field into the LBM mesoscopic distribution function, which serves as the initial state for subsequent collision, forcing, and migration evolution.
[0076] S6: Calculate macroscopic quantities The computer program inversely calculates the macroscopic velocity and density from the distribution function. Specifically, at the beginning of each time step, the program sums the distribution functions for all velocity directions in each cell to obtain the macroscopic density; then, it multiplies the distribution functions for each direction by the corresponding velocity, sums them, and adds half of the contribution from the body force term to obtain the macroscopic velocity. This process reduces the mesoscopic variables of the LBM to physical quantities (velocity and density) that engineers can understand and use for subsequent steps.
[0077] This step first recalculates the LBM distribution function into macroscopic density and velocity at each time step, so that the subsequent forcible can determine the current flow field state.
[0078] At each time step, this scheme calculates the macroscopic density using the distribution function: ; If a physical force term F exists, the macroscopic momentum is calculated as follows: ; In two dimensions: ; In three dimensions: ; in, Let be the distribution function value for the i-th discrete velocity direction. , and Let x, y, and z be the components of the i-th discrete velocity in the x, y, and z directions, respectively. , and These are the x, y, and z components of the physical force, respectively.
[0079] S7: Extract low wavenumber velocity components The computer program extracts large-scale (low wavenumber) components from the current velocity field. Specifically, it performs a Fast Fourier Transform (FFT) on the current velocity field, transforming it from physical space to spectral space. A low wavenumber mask function is then applied to retain wavenumbers with moduli less than or equal to... The components (i.e., large-scale vortices) are filtered out, while the high-wavenumber small-scale components are removed. The results are then transformed back to physical space using an inverse Fourier transform (IFFT) to obtain a low-wavenumber velocity field containing only large-scale structures. This step ensures that subsequent body force injections only act on large-scale vortices and do not interfere with small-scale structures.
[0080] This step filters out large-scale vortex components from the current velocity field. The program uses Fourier transform to retain only low wavenumber modes, allowing the forcifier to apply energy primarily based on large-scale flow.
[0081] This scheme performs a Fourier transform on the current velocity field: ; Define a low wavenumber mask function: ; In the two-dimensional case In three dimensions , , and These are the wavenumber components in the x, y, and z directions, respectively.
[0082] The low wavenumber velocity component is: ; ; in, For low wavenumber velocity components (spectral space), For low wavenumber velocity components (physical space).
[0083] This step restricts subsequent energy input to large-scale modes, avoiding direct forcing at small scales with high wavenumbers.
[0084] S8: Calculate vorticity and low-wavenumber Laplace term This step calculates the rotational intensity and large-scale velocity variation trend of the fluid. Vorticity reflects local rotation, and the Laplace term reflects the curvature of the velocity field; both are used to determine the direction and magnitude of the body force terms.
[0085] The computer program calculates the vorticity field and the curvature distribution of the low-wavenumber velocities in the current flow field. Specifically, the program performs spatial differentiation on the current velocity field (using central difference in two dimensions and processing the three directions separately in three dimensions) to calculate the vorticity field. The vorticity field describes the intensity and direction of fluid rotation at each location. Simultaneously, the program calculates the Laplace term for the low-wavenumber velocities in spectral space. The Laplace term describes the curvature of the velocity field (i.e., the drastic change in the velocity gradient). The vorticity and Laplace term will serve as input features for a subsequent neural spectral forcibly applied processor to determine how to apply body forces.
[0086] ; ; in, It is a two-dimensional vorticity (z-direction component). It is the partial derivative of v with respect to x, that is, the rate of change of v velocity (velocity in the y-direction) along the x-direction; It is the partial derivative of u with respect to y, that is, the rate of change of the velocity u (velocity in the x-direction) along the y-direction; It is a three-dimensional vortex vector. Let w be the partial derivative of y. Let v be the partial derivative of z. Let be the partial derivative of u with respect to z. Let w be the partial derivative of x. Let v be the partial derivative of x. Let be the partial derivative of u with respect to y.
[0087] The Laplace term for low wavenumber velocities can be calculated in spectral space: ; ; in, For the Laplace term of low wavenumber velocity, For the Fourier transform of the Laplace term, It is the spectral space form for low wavenumber velocities.
[0088] S9: Constructing a neural spectrum compulsor This step involves a neural spectrum forcifier generating body force terms based on the current flow field characteristics. It does not directly rewrite the velocity field, but rather provides external forces to the LBM equations, allowing subsequent physical evolution to proceed automatically.
[0089] The computer program instantiates a neural spectrum compulsor module and generates a physical attribute. Specifically, the computer program instantiates a neural spectrum compulsor module in memory, which generates a physical attribute based on the current velocity field. u Low wavenumber velocity Laplace item vorticity The system takes the flow field characteristics as input and outputs a set of body force values. F x , F y , F z It applies to each cell.
[0090] Unlike existing technologies, this scheme does not directly output the velocity field in the neural network, but instead outputs the body force term. The evolution of the flow field is still completed by the subsequent LBM physical equations, thus ensuring physical consistency.
[0091] The neural spectrum forcifier in this scheme does not directly output the velocity field, but instead outputs the body force terms used in the LBM equations. The general form is: ; Where θ is a trainable parameter.
[0092] In a specific, workable implementation, a parameterized neural spectrum forcifier is used: ; in, For low wavenumber downstream energy injection term, For scaling adjustment, This is a vortex structure adjustment term. , , These are trainable or feed-backable parameters. In the two-dimensional case, the above expression is written as: ; ; The three terms on the right side of the formula for the parameterized neural spectrum compulsor have different physical effects: This is a low-wavenumber downstream energy injection term, used to replenish kinetic energy to large-scale velocity modes and regulate the overall turbulence intensity; It is a scale adjustment or smoothing term used to correct the energy distribution based on the curvature of the low wavenumber velocity field and suppress unreasonable large-scale drift. This is a vortex structure adjustment term, used to adjust the direction of body forces according to the vortex direction, maintaining or correcting the vortex structure. Among them, This represents the physical force term output by the neural spectrum compulsor. i Represents the set of parameters for the force converter. Represents the low wavenumber velocity component. The Laplace term represents the velocity field at low wavenumbers. Represents vorticity. This represents the cross product of the vorticity vector and the low wavenumber velocity vector. , , These are trainable or feedback-updable coefficients; in the two-dimensional implementation, they can be... The low wavenumber velocity component is written as , Two components.
[0093] S10: Zero-mean treatment of forced terms This step subtracts the overall average value of the physical force to prevent the entire calculation box from being pushed away by external forces, retaining only the relative forcing used to maintain turbulent pulsations.
[0094] The computer program performs zero-mean correction on the physical force term to prevent overall momentum drift. Specifically, the program calculates the spatial average of the current physical force field across the entire computational domain, and then subtracts this average from the physical force value at each grid point, making the spatial average physical force of the entire physical force field zero. This step ensures that the energy injected by the neural spectrum forcifier only generates turbulent pulsations and does not drive the fluid to translate as a whole, thus preventing the fluid within the computational domain from acquiring non-physical overall momentum.
[0095] To avoid the forced term introducing global momentum drift, this scheme applies zero-mean to the body force term. In the two-dimensional case: ← -< >, ← -< > ; In the three-dimensional case, it also includes: Fz←Fz- <fz>< / fz> ; Therefore: ; in, This represents the component of the physical force term in the x-direction (the value at each grid point). Let be the component of the physical force term in the y-direction. FzThis represents the component of the body force in the z-direction (only applicable in three dimensions). < > for Spatial average value over the entire computational domain (i.e., all grid points) (Add them up and divide by the total number of grid points) < > for Spatial average value over the entire computational domain (i.e., all grid points) (Add them up and divide by the total number of grid points) This represents the spatial average value of the entire body force field.
[0096] S11: Low wavenumber projection of the forced term This step again restricts the physical force to a low wavenumber range, ensuring that energy is injected from a large scale and then naturally transferred to a small scale through flow field evolution.
[0097] The computer program performs low-wavenumber filtering on the physical quantity term to ensure that energy is injected only at large scales. Specifically, the computer program performs a Fourier transform on the zero-mean physical quantity term and applies the same low-wavenumber mask as S7 (| k |≤ Only low wavenumber components are retained, and then the transformation is performed back to physical space. This step, together with S7, constitutes a double low wavenumber constraint. S7 ensures that the input features of the neural spectrum compulsor come only from large-scale structures, and S11 ensures that the output physical term also contains only large-scale components, thereby ensuring that the energy injection is strictly limited to the set wavenumber range.
[0098] This scheme transforms the physical strength term to spectral space: ; Spectral projection using a low wavenumber mask function: ; The inverse transform yields the low wavenumber body term: ; This step ensures that the physical fitness score is only 0 <| k |≤ Injecting energy within the low wavenumber range.
[0099] S12: Input Power Calculation This step calculates how much energy the current external force actually injects into the flow field. The program multiplies the velocity and body force point by point and averages the results to obtain the input power required for subsequent corrections.
[0100] The computer program calculates the actual power injected into the velocity field by the current physical force term. Specifically, the computer program traverses the entire computational domain and calculates the dot product of the velocity vector and the physical force vector at each grid point (i.e., u·Fx+v·Fy+w·Fz Then, the spatial average is taken over the entire computational domain to obtain the actual input power at the current moment. This value represents the rate at which the current physical force is injecting energy into the flow field, and will be used for the next step of power normalization correction.
[0101] This scheme calculates the input power between the current velocity field and the body force term: ; ; ; Where, <·> indicates that the volume average is performed over the entire periodic computational domain.
[0102] S13: Input power normalization This step automatically amplifies or reduces the magnitude of the external force based on the target unit mass input power. If the current injected power is too low, the force is increased; if it is too high, the force is decreased, while an upper limit is used to maintain numerical stability.
[0103] The computer program scales and corrects the physical strength component based on the target unit mass input power. Specifically, the computer program calculates the target unit mass input power. P * Compared with the current actual input power The ratio is used to multiply the entire physical field, ensuring that the actual injected power of the corrected physical force term is exactly equal to the target value. P * At the same time, the program detects if and If the sign is opposite or the value is too small, a protective normalization mechanism is activated, and upper limit pruning is used to prevent the physical force term from becoming too large and causing LBM calculation divergence. This part is one of the core innovations of this scheme, establishing an explicit closed-loop constraint relationship between the physical force term and the target input power.
[0104] This solution is based on the target input power. Normalize the physical fitness component: ; in, This represents the current actual input power. For low wavenumber projections of the physical term, δ is a small positive number to prevent the denominator from being zero.
[0105] The small positive number is an extremely small positive number greater than zero introduced to prevent calculation crashes caused by a denominator of zero in the formula. Its value is much smaller than the normal calculation value, and its impact on the normal calculation result is negligible, serving only as a numerical protection function. In this embodiment, δ=10 can be used. -6 × For example, when the input power (LBM lattice units, all physical quantities are dimensionless values) When δ = 2.0 × 10 -12 .
[0106] like and Opposite signs, or | If the value is below the set threshold, a protective normalization method will be used: ; in, To preset a safety factor, This is the physical force term after projection onto the low wavenumber spectrum (from the output of S11).
[0107] Furthermore, to prevent the LBM value from becoming unstable due to an excessively high stamina stat, the upper limit of the corrected stamina stat is pruned: ; in, This represents the upper limit threshold for physical strength.
[0108] S14: Constructing the feedback loss function This step combines the current turbulence intensity, input power, and divergence-free error into a single loss value, using a number to measure how far the current flow field is from the target state.
[0109] The computer program constructs a feedback loss function based on the current statistical error, specifically by calculating the root mean square velocity of the current flow field. With target value The relative error, current input power With target value P * The relative error, the divergence norm error of the current velocity field, and the weighted sum of these three factors are used to construct a scalar loss function. This loss function quantifies the deviation between the current flow field and the target state, and serves as the basis for subsequent parameter updates.
[0110] This approach involves constructing a feedback loss function to update the parameters of the neural spectrum compulsor. ; The first term is the root mean square velocity error, the second term is the input power error, the third term is the dispersion-free constraint error, and the fourth term is the energy spectrum constraint error. , , , These are the weighting coefficients.
[0111] The energy spectrum constraint term can be expressed as: ; in, For wavenumber set, This represents the energy spectrum value of the current flow field at wavenumber k. For the target energy spectrum value, To prevent small positive numbers with a denominator of zero, this scheme does not restrict the specific range of values; for example, it can take... =10 -6 × .
[0112] In a simplified implementation, it can be made l E =0, and closed-loop control is achieved using only speed, power, and divergence feedback.
[0113] S15: Update neural spectrum compulsor parameters This step adjusts the force parameters based on the loss value to make the physical force term generated in the next step closer to the target requirement; in a simplified implementation, heuristic adjustments can also be made according to the error direction.
[0114] The computer program updates the trainable parameters of the neural spectrum compulsor based on the feedback loss function. Specifically, the computer program calculates the loss relative to the neural spectrum compulsor parameters based on the feedback loss function constructed in S14. , , The gradient of the error is calculated, and then the parameter values are updated along the gradient descent direction. In a simplified implementation, the parameters can also be heuristically adjusted based on the sign and magnitude of each error (e.g., increase the value if the speed is too low). If the power is too high, then reduce. After the parameters are updated, the physical terms generated by the neural spectrum compulsor in the next step will better conform to the target constraints, forming a continuous closed-loop adaptive adjustment.
[0115] For parameterized neural spectrum forcifiers, this scheme uses gradient descent, Adam, least squares, or heuristic feedback methods to update parameters: ; Where θ=( , , ), or This is the learning rate.
[0116] In the simplified feedback form, the parameters can be adjusted separately based on the velocity error, power error, and divergence error: ; ; ; in, When it is the nth step The current value, When it is the nth step The current value, When it is the nth step The current value, The learning rate is the root mean square velocity error. The learning rate is the power error. The learning rate is the divergence error.
[0117] In this scheme, the power normalization in S12-S13 addresses the instantaneous power matching problem and cannot guarantee long-term statistical stability (the statistical characteristics of the velocity field continuously change during flow field evolution; power normalization can only guarantee the power of the current step, but cannot guarantee that the root mean square velocity of subsequent steps will not drift). The feedback adjustment in S14-S15 allows the intrinsic parameters of the neural spectrum forcifier to be adjusted. , , It continuously adapts to the flow field conditions, reducing the significant dependence on power normalization.
[0118] S16: Guo forcing coupling This step converts macroscopic physical forces into force contributions in each discrete direction of the LBM, ensuring that the mass and momentum conservation scheme of the LBM is still satisfied after the addition of external forces.
[0119] The computer program discretizes the corrected physical force terms into LBM velocity directions using the Guo forcing scheme. Specifically, the program iterates through each discrete velocity direction on each cell and uses the Guo forcing formula to convert the macroscopic physical force terms into LBM velocity directions. F θ corr Discretize the body force contribution in each direction. This format is a recognized standard external force coupling method in the LBM field, which can ensure that the body force terms are correctly distributed to each velocity direction at the mesoscopic level, thereby maintaining both mass conservation and momentum conservation in subsequent collision steps.
[0120] This scheme uses the Guo forcing scheme to couple the corrected body force terms into the LBM equations. The discrete body force terms are: ; In the grid unit cs 2 =1 / 3 can be written as: ; The coupling relationship between LBM mesoscopic evolution and neural spectrum compulsors is as follows: Figure 2 As shown, the current velocity field is input to the neural spectrum forcifier. The output parameters are normalized by low wavenumber spectrum projection power and coupled by Guo forcing. Then, they are updated by collision-migration-macroscopic quantity and returned to the neural spectrum forcifier.
[0121] S17: Perform LBM collision procedure This step performs LBM collision calculations, relaxes the distribution functions in each direction toward a local equilibrium state, and incorporates the external force contributions obtained in the previous step.
[0122] The computer program performs LBM collision calculations to simulate particle interactions. Specifically, for each discrete velocity direction on each grid cell, the program calculates the relaxation process of the current distribution function toward the equilibrium distribution function (the relaxation rate is controlled by the relaxation time τ), and adds the body force contribution term generated in S16 to obtain the intermediate distribution function after the collision. This step simulates the collision effect between fluid molecules, causing the distribution function to approach the equilibrium state, while the energy of the body force term is injected into the flow field.
[0123] This method calculates the intermediate distribution function after the collision: ; in, The distribution function after collision and physical force action. f i The distribution function, f i eq For the equilibrium distribution function, F i For discrete physical force terms, t Let Δ be the relaxation time. t The time interval for each time step.
[0124] S18: Perform LBM migration steps This step performs LBM migration calculations, transferring the distribution functions after collisions to adjacent grid points along their respective directions, and returning the out-of-bounds portions to the computational domain through periodic boundaries.
[0125] The computer program performs LBM migration calculations to simulate the motion of particles along their velocity directions. Specifically, the program propagates the intermediate distribution function obtained in S17 to adjacent cells along their respective discrete velocity directions. For cells that extend beyond the computational domain boundary, the program maps the distribution function back into the computational domain using periodic boundary conditions (modulo operations). After the migration is complete, the distribution function on each cell is updated to the value of the new time step, and the flow field completes the evolution of one full time step.
[0126] This scheme shifts the intermediate distribution function along the respective discrete velocity directions: ; Because the computation domain uses periodic boundary conditions, nodes that exceed the boundary of the computation domain are returned to the inside of the computation domain through periodic indexes.
[0127] S19: Update macroeconomic and statistical indicators This step involves recalculating velocity, energy, input power, and divergence error after each evolution cycle, both for monitoring the results and for the next round of feedback regulation.
[0128] The computer program updates macroscopic quantities and calculates current statistical indicators for monitoring and feedback. Specifically, the computer program again calculates density and velocity from the updated distribution function (the same operation as in S6), and then calculates the root mean square velocity of the current flow field. Turbulent kinetic energy Input power divergence error These are statistical metrics. These metrics are used both to provide output to users and as input to the S14 feedback loss function for the next round of parameter updates.
[0129] After the migration is completed, this scheme recalculates the density, velocity, turbulent kinetic energy, input power, and error parameters: ; ; ; ; ; ; in, For macroscopic density, For macroscopic momentum, Let be the turbulent kinetic energy at time t. Let be the root mean square velocity at time t. For the divergence relative error, Let L2 norm be the divergence of the velocity field. To prevent small positive numbers with a denominator of zero (this embodiment does not limit the range of values, for example, it can take...) =10 -6 × ), This is the relative error of power. The current input power, This represents the relative error of speed.
[0130] S20: Output controllable turbulent background field This step outputs the velocity field, vorticity field, energy spectrum, and statistical indicators after the target is achieved as a file or passes them to downstream programs as background flow fields for particle, bubble, or multiphase flow simulations.
[0131] When the computer program completes the set total number of evolution steps T, or when the current statistical error is lower than the user-defined threshold, the program writes the final velocity field, vorticity field, and energy spectrum data to a file (such as HDF5 or binary format) or directly transmits them to downstream simulation modules (such as particle-bubble collision simulation programs). The output turbulent background field already meets the user-defined target root-mean-square velocity and target input power constraints, and can be directly used for engineering applications such as flotation process simulation and multiphase flow transport research.
[0132] When the set number of steps is reached or the statistical error meets the threshold, the turbulent background field data is output, including the velocity field, vorticity field, turbulent kinetic energy, root mean square velocity, input power, divergence error, energy spectrum, and anisotropy evaluation index. The obtained turbulent background field can be used for particle-bubble collision simulation, multiphase flow background field construction, and flotation microprocess mechanism analysis. Application relationships are as follows... Figure 3 As shown.
[0133] Traditional neural network-based methods directly output the velocity field, which can lead to violations of fundamental physical laws such as mass and momentum conservation, and errors accumulate over long periods of evolution. This proposed scheme, however, introduces the adaptive capabilities of neural networks while maintaining mesoscopic physical consistency. The neural spectrum forcifier only outputs the volumetric force term, and the flow field evolution is still completed by the LBM equations through collision and migration steps. Specifically, the neural spectrum forcifier in S9 generates the volumetric force value acting on each grid point. In S16, this volumetric force is discretized to the velocity directions at the mesoscopic level using the Guo forcing scheme. S17-S18 then use the LBM equations to complete the collision and migration evolution. This design allows the neural network to handle its strengths in parameter fitting and adaptive adjustment, while the established physical conservation laws are ensured by the mature LBM method, allowing each to fulfill its specific role.
[0134] Existing stochastic forcing methods apply physical forces in space, but cannot control the scale range of energy injection, potentially leading to the direct destruction of small-scale structures. This scheme designs a dual low-wavenumber constraint mechanism, achieving precise constraints on the energy injection scale through dual low-wavenumber projection. First, in S7, the computer program performs a Fourier transform on the current velocity field and extracts the low-wavenumber components. u low The input features of the neural spectrum compulsor are used as input features. Subsequently, in S11, the physical force term output by the neural spectrum compulsor is subjected to another Fourier transform and spectral projection is performed using the same low wavenumber mask. This dual constraint ensures that the input signal of the neural spectrum compulsor comes only from large-scale structures, and its output physical force term also contains only large-scale components. The energy injection is strictly limited to 0 < | k |≤ Within the low wavenumber range, small-scale structures are generated naturally by the energy cascade process of turbulence, rather than being directly driven by external forces, thus making the generated turbulent field more consistent with the physical characteristics of real turbulence in terms of scale and structure.
[0135] Existing random and fixed-spectrum forcing methods, when applying body force, lack knowledge of the actual energy injected into the flow field, leading to uncontrollable turbulent kinetic energy levels and potential energy drift or statistical deviations from the target value. This proposed solution establishes an explicit closed-loop relationship between the body force term and the target input power through power normalization, and calculates the actual input power between the current body force term and the velocity field in S12. Then, in S13, the physical strength term is scaled and corrected based on the target unit mass input power P: The physical meaning of this operation is: if the power injected into the current physical attribute is too high, the physical attribute amplitude is automatically reduced; if the injected power is too low, the physical attribute amplitude is automatically increased. A correction is performed at each time step to ensure that the injected power always accurately tracks the target value. .
[0136] While single power normalization can ensure the accuracy of instantaneous power at each time step, it cannot solve the statistical drift problem during long-term flow field evolution. This scheme achieves a balance between short-term accuracy and long-term stability through a two-layer closed-loop control. The first layer is the power normalization closed loop (S12-S13), which performs instantaneous correction of the volumetric term at each time step to ensure that the instantaneous injected power is consistent with the target. The second layer is the statistical feedback closed loop (S14-S15), which constructs a feedback loss function based on the root mean square velocity error, power error, and divergence error every few steps (or every step), and updates the trainable parameters of the neural spectrum forcifier through gradient descent or heuristic methods. , , The two closed-loop systems work as follows: power normalization solves the problem of "instantaneous precise injection", and parameter feedback update solves the problem of "long-term statistical convergence".
[0137] This scheme employs a divergence-free initial field and Guo forcing coupling to jointly maintain the physical conservation laws. In the initialization phase, S4 generates an initial velocity field that strictly satisfies the divergence condition using either the stream function method (two-dimensional) or Helmholtz projection (three-dimensional), avoiding spurious divergences in the initial field that could cause non-physical pressure oscillations in subsequent evolution. In the body force coupling phase, S16 uses the Guo forcing scheme to discretize the body force terms to each velocity direction. This is a recognized standard scheme in the LBM field, ensuring that the LBM equations still satisfy mass and momentum conservation after incorporating body forces. S10 further applies zero-mean treatment to the body force terms to prevent overall momentum drift. These designs collectively guarantee the physical consistency of the generated flow field.
[0138] This scheme outputs not only the velocity field and vorticity field in S19, but also the root mean square velocity simultaneously. Input power P * Turbulent kinetic energy K divergence error E div Energy spectroscopy E ( k and anisotropy index B ( t These indicators serve as the basis for feedback control and also provide users with a complete basis for evaluating the flow field quality. For example, in particle-bubble collision simulations, users can directly use the output velocity field interpolation to obtain the local fluid velocity at the particle location, and at the same time, use anisotropic indicators to determine whether the statistical properties of the background turbulence meet the research requirements.
[0139] In summary, this scheme overcomes the problems of difficult intensity control, lack of closed-loop constraints in energy injection, insufficient long-term statistical stability, and weak physical consistency in existing random forcing, fixed spectrum forcing, and direct prediction methods of neural networks through a complete technical route of "generating physical terms by neural spectrum forcing → injecting scale by low wavenumber spectrum projection constraints → injecting energy by power normalization constraints → maintaining physical consistency through Guo forcing coupling → achieving long-term adaptive adjustment through statistical feedback closed loop". It achieves controllable, reproducible, and physically consistent turbulent background field generation.
[0140] In existing prototype examples, both the 2D D2Q9-BGK and 3D D3Q19-BGK models achieved closed-loop tracking of the target's root mean square velocity and input power. Relevant verification results are as follows: Figure 4-Figure 6 As shown, the verification indicators are shown in Table 1 and Table 2.
[0141] Table 1. Validation Indicators for Two-Dimensional and Three-Dimensional Prototypes
[0142] Based on Table 1 Figure 4 to Figure 6 It can be seen that both the two-dimensional and three-dimensional prototypes can control the root mean square velocity near the target value and keep the effective input power error within 0.1%. The three-dimensional velocity cross-section also shows that the output field has a non-zero spatial structure, which can be used as a reproducible background field for subsequent particle-bubble collision or multiphase flow simulations. The above results prove that the proposed scheme has at least the ability to perform closed-loop intensity control, power point tracking, and output a three-dimensional velocity field.
[0143] Table 2 Comparison results of different coercive methods
[0144] Based on Table 2 Figure 4 and Figure 5It can be seen that, compared with no forced attenuation and fixed low wavenumber spectral forced attenuation, LBM neural spectrum closed-loop forced attenuation can significantly reduce the target u rms Deviation is maintained while power tracking is preserved. Compared to traditional power normalization forcing, target intensity control is superior in 2D scenes, while in 3D scenes, improvements are mainly seen in the closed-loop interface and isotropic indices. These comparative results demonstrate that this scheme offers better controllability than simple open-loop forcing, but it should not be extrapolated to be superior to all mature DNS or industrial CFD solvers.
[0145] Taking the generation of forced turbulence using a two-dimensional D2Q9-BGK neural spectrum as an example, the steps include: S101: Set 2D calculation parameters Establish a two-dimensional periodic computational domain Ω=[0,64]×[0,64], and take... N x =N y =64, Δ x =Δ y =Δ t =1, initial density =1, relaxation time t =0.58. The corresponding kinematic viscosity is: ; Set the target root mean square velocity. Target input power Low wavenumber forced cutoff range .
[0146] S102: Set the D2Q9 discrete velocity and weights Using D2Q9 velocity set c 0 = (0,0), c 1=(1,0), c 2 = (0, 1), c 3 = (-1, 0) c 4 = (0, -1) c 5 = (1,1), c 6 = (-1, 1) c 7 = (-1, -1) c 8 = (1, -1).
[0147] Weight is w 0 = 4 / 9 w 1= w 2= w 3= w 4 = 1 / 9 w 5= w 6= w 7= w8 = 1 / 36.
[0148] S103: Generate a two-dimensional divergence-free velocity field Constructing random stream functions in spectral space ψ The physical space stream function is obtained by inverse Fourier transform. ψ ( x,y ), and by u = ψ / y , v =- ψ / x The velocity field is obtained. Then, zero-mean processing and target intensity normalization are performed: .
[0149] S104: Initialize the distribution function For each grid point and each discrete velocity direction, calculate e i =c i ·u and u ²= u ²+ v ², and construct the equilibrium distribution function: ; make f i (x,y,0)= f i eq (x,y,0), complete the initialization of the distribution function.
[0150] S105: Extract low wavenumber velocity components A two-dimensional Fourier transform of the velocity field yields û and Constructing a low wavenumber mask M ( k x ,k y ),when hour M =1, other positions M =0.
[0151] Obtaining low wavenumber velocity: .
[0152] S106: Calculation of Two-Dimensional Vorticity and Laplace Terms Calculate two-dimensional vorticity oh z = v / x - u / y Calculate the Laplace term for low wavenumber velocity. ² u low and ² v low The Laplace term can be calculated using central difference or spectral spatial relations. F [ ² u low ]=-| k |² û low calculate.
[0153] S107: Constructing a two-dimensional neural spectrum compulsion term Let the trainable parameter θ = ( , , Construct two-dimensional force terms: ; ; The physical fitness component was zero-mean processed and then subjected to low wavenumber spectral projection again. .
[0154] S108: Input power normalization Calculate the current input power .make Correction forced term according to target unit mass input power: ; ; If the correction force exceeds the preset upper limit F max If the velocity field explodes or the distribution function becomes non-physically negative, then a pruning process is performed to avoid the velocity field from exploding or the distribution function from becoming non-physically negative.
[0155] S109: Calculate the Guo forcing term For each discrete direction i, calculate the discrete term of body force: ; in F corr =( F x corr , F ycorr ).
[0156] S110: Perform collision and migration Calculate the post-collision distribution function: ; Perform the migration: ; Boundaries use periodic indexes, when x + c i x <0 time order x + c i x = N x -1; when x+c i x≥N x season x+c i x =0; the same applies to the y-direction.
[0157] S111: Update speed and statistics After the migration is complete, calculate the macroscopic density and velocity: ; ; Simultaneous calculation K EP and Eu are used for outputting and feeding back parameter updates.
[0158] S112: Output two-dimensional turbulent background field Every Step output u(x,y,t)、v(x,y,t)、ω z (x,y,t) ,as well as , , , E(k). The output results are used for the construction of the two-dimensional particle-bubble collision background field and algorithm verification.
[0159] Taking the generation of forced turbulence using the three-dimensional D3Q19-BGK neural spectrum as an example, the steps include: S201: Set 3D calculation parameters Establish a three-dimensional periodic computational domain Ω=[0, N x ]×[0, N y ]×[0, N z [This is acceptable] N x=N y =N z =32, or take the value based on your calculation ability. N x =N y =N z =64. Setting =1, t =0.58, , , .
[0160] S202: Set the discrete velocity and weights for D3Q19 The D3Q19 model includes 19 velocity directions: stationary velocity c 0 = (0,0,0), 6 axial velocities (±1,0,0), (0,±1,0), (0,0,±1), 12 face angular velocities (±1,±1,0), (±1,0,±1), (0,±1,±1). Weights are... w 0 = 1 / 3 w 1-6 =1 / 18, w 7-18 =1 / 36.
[0161] S203: Generate a three-dimensional divergence-free initial velocity field Generate random velocity fields in spectral space û ( k The divergence component is removed using Helmholtz projection: ; .
[0162] S204: Initialize the 3D LBM distribution function Calculate the equilibrium distribution function for each of the 19 discrete velocity directions: .
[0163] S205: Constructing a three-dimensional neural spectrum compulsion term Calculate low wavenumber velocity Calculate three-dimensional vorticity Constructing the forced terms: ; Subsequently, zero-mean processing and low wavenumber spectral projection were performed to obtain... F θ low .
[0164] S206: Three-dimensional input power normalization Calculate the input power: ; Normalized according to the target unit mass input power: .
[0165] S207: Perform 3D LBM evolution For each discrete direction of D3Q19, calculate the Guo forcing term, perform collisions and migrations: ; .
[0166] S208: Calculate three-dimensional statistics Calculate the three-dimensional root mean square velocity, turbulent kinetic energy, input power, Reynolds stress, and anisotropy norm: ; ; ; ; .
[0167] S209: Output three-dimensional turbulent background field Output u(x,y,z,t)、v(x,y,z,t)、w(x,y,z,t)、ω , , , , And B(t). The resulting three-dimensional flow field can be used as the background velocity field for simulations of particle-bubble three-dimensional motion, collision, near-field flow, and multiphase interaction.
[0168] The output field is used for the background flow field of particle-bubble collisions, and includes the following steps: In particle-bubble collision simulations, the velocity field u(x,t) output by this invention can be read as the background flow field, and interpolated according to the location of the particles or bubbles to obtain the local fluid velocity. u f ( x p The relative velocity of particles or bubbles can be expressed as: ; Based on this, the relative motion trajectory of particles and bubbles, approach velocity, local flow shear, flow structure, and collision probability can be further calculated. This implementation uses only the background flow field generated by this invention as input and does not require the flotation engineering parameters to be directly embedded into the turbulence generation algorithm.
[0169] Accordingly, a controllable turbulence generation system based on LBM neural spectrum forcing includes: The parameter receiving module is configured to: acquire user-configured target statistical control parameters, which include at least the target root mean square velocity, the target unit mass input power, and the low wavenumber forced cutoff range; The initialization module is configured to generate an initial velocity field that satisfies the divergence-free condition in the periodic computational domain and initialize it as an LBM distribution function. The neural spectrum forcing module is configured to: at each time step, back-calculate the macroscopic velocity and density from the current LBM distribution function, input the back-calculated current velocity field and the flow field features extracted from it into the neural spectrum forcing module, and output the physical force term; The constraint processing module is configured to perform zero-mean processing and low-wavenumber spectrum projection on the physical term to limit energy injection within the low-wavenumber forced cutoff range. The power normalization module is configured to: calculate the actual input power between the current physical strength term and the current velocity field, and normalize and correct the physical strength term according to the target unit mass input power; The LBM evolution module is configured to: couple the corrected body force terms into the LBM collision step, perform collisions and migrations to complete the mesoscopic evolution, and update the LBM distribution function; The feedback adjustment module is configured to: calculate the relative error between the current root mean square velocity and the target root mean square velocity, and the relative error between the current input power and the target unit mass input power based on the evolved flow field, update the parameters of the neural spectrum forcifier, and form a closed-loop adaptive adjustment; The iteration control module is configured to repeat the execution of the above modules until the preset conditions are met. The output module is configured to output the turbulent background field.
[0170] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for generating controllable turbulence based on LBM neural spectrum forcing, characterized in that, Includes the following steps: Obtain the target statistical control parameters configured by the user. The target statistical control parameters include at least the target root mean square velocity, the target input power per unit mass, and the low wavenumber forced cutoff range. An initial velocity field satisfying the divergence-free condition is generated in the periodic computational domain and initialized as an LBM distribution function; At each time step, the macroscopic velocity and density are inversely calculated from the current LBM distribution function, and the inversely calculated current velocity field and the flow field features extracted from it are input into the neural spectrum forcifier, which outputs the physical force term. By performing zero-mean processing and low wavenumber spectrum projection on the physical force term, the energy injection is limited to the low wavenumber forced cutoff range. Calculate the actual input power between the current physical force term and the current velocity field, and normalize the physical force term according to the target unit mass input power; couple the corrected physical force term into the LBM collision step, perform collision and migration to complete the mesoscopic evolution, and update the LBM distribution function; The relative error between the current root mean square velocity and the target root mean square velocity, and the relative error between the current input power and the target unit mass input power are calculated based on the evolved flow field. The parameters of the neural spectrum forcifier are updated to form a closed-loop adaptive adjustment. The above time step evolution is repeated until the preset conditions are met, and the turbulent background field is output.
2. The method for generating controllable turbulence based on LBM neural spectrum forcing as described in claim 1, characterized in that, Before inputting the current flow field features into the neural spectrum forcifier, the process also includes: performing a Fourier transform on the current velocity field and applying a low wavenumber mask to extract the low wavenumber velocity components, and calculating the vorticity and the Laplace term of the low wavenumber velocity in the current flow field; the current flow field features include the current velocity field, the low wavenumber velocity components, the vorticity, and the Laplace term.
3. The method for generating controllable turbulence based on LBM neural spectrum forcing as described in claim 2, characterized in that, Low wavenumber mask is defined as , ,as well as , ,in The low wavenumber forced cutoff range configured for the user, where |k| is the wavenumber modulus, in the two-dimensional case. In three dimensions , , and These are the wavenumber components in the x, y, and z directions, respectively.
4. The method for generating controllable turbulence based on LBM neural spectrum forcing as described in claim 1, characterized in that, The neural spectrum compulsor is parametric, as shown in the following equation: ; in For low wavenumber velocity components, For the Laplace term of low wavenumber velocity, vorticity, , , For trainable parameters; the neural spectrum compulsor only outputs the physical force term. The flow field evolution is then completed through the subsequent LBM equations.
5. The method for generating controllable turbulence based on LBM neural spectrum forcing as described in claim 1, characterized in that, The physical force term is subjected to zero-mean processing, which specifically includes: calculating the spatial average value of the physical force field across the entire computational domain, subtracting the average value from the physical force value at each grid point, so that the spatial average physical force of the entire physical force field is zero, thus preventing overall momentum drift.
6. The method for generating controllable turbulence based on LBM neural spectrum forcing as described in claim 1, characterized in that, The physical force term is projected into the low wavenumber spectrum. Specifically, the physical force term after zero-mean processing is transformed to the spectral space and filtered using the same low wavenumber mask used when extracting low wavenumber velocity components. Components with wavenumber modulus less than or equal to the low wavenumber forced cutoff range are retained and then transformed back to the physical space.
7. The method for generating controllable turbulence based on LBM neural spectrum forcing as described in claim 1, characterized in that, The physical fitness component is normalized and corrected based on the target input power. Specifically, the correction coefficient is calculated based on the target input power. Compared with the current actual input power The ratio is obtained by multiplying the physical strength term by the correction factor. ,in δ To prevent small positive numbers with a denominator of zero, δ The value of is related to the target input power The ratio is set to a preset ratio; at the same time, an upper limit threshold is set to trim the corrected physical strength item to prevent excessive physical strength from causing the LBM value to diverge.
8. The method for generating controllable turbulence based on LBM neural spectrum forcing as described in claim 1, characterized in that, Based on the statistical error of the evolved flow field, the parameters of the neural spectrum forcifier are updated. Specifically, the relative error between the root mean square velocity of the current flow field and the target root mean square velocity, the relative error between the current input power and the target input power, and the divergence norm error of the velocity field are calculated. The three are weighted and summed to construct a feedback loss function. Based on the feedback loss function, the trainable parameters of the neural spectrum forcifier are updated by gradient descent or heuristically adjusted so that the subsequently generated physical force terms continuously approach the target constraint.
9. The method for generating controllable turbulence based on LBM neural spectrum forcing as described in claim 1, characterized in that, By repeatedly evolving through time steps until the preset conditions are met, a turbulent background field is output. Specifically, when the preset number of evolution steps is reached or the statistical error is lower than the set threshold, a turbulent background field file containing velocity field, vorticity field, and energy spectrum data is output, or it is directly transferred to the downstream simulation module for background flow field input for particle motion, bubble motion, particle-bubble collision, or multiphase flow simulation.
10. A controllable turbulence generation system based on LBM neural spectrum forcing, characterized in that, include: The parameter receiving module is configured to: acquire user-configured target statistical control parameters, which include at least the target root mean square velocity, the target unit mass input power, and the low wavenumber forced cutoff range; The initialization module is configured to generate an initial velocity field that satisfies the divergence-free condition in the periodic computational domain and initialize it as an LBM distribution function. The neural spectrum forcing module is configured to: at each time step, back-calculate the macroscopic velocity and density from the current LBM distribution function, input the back-calculated current velocity field and the flow field features extracted from it into the neural spectrum forcing module, and output the physical force term; The constraint processing module is configured to perform zero-mean processing and low-wavenumber spectrum projection on the physical term to limit energy injection within the low-wavenumber forced cutoff range. The power normalization module is configured to: calculate the actual input power between the current physical strength term and the current velocity field, and normalize and correct the physical strength term according to the target unit mass input power; The LBM evolution module is configured to: couple the corrected body force terms into the LBM collision step, perform collisions and migrations to complete the mesoscopic evolution, and update the LBM distribution function; The feedback adjustment module is configured to: calculate the relative error between the current root mean square velocity and the target root mean square velocity, and the relative error between the current input power and the target unit mass input power based on the evolved flow field, update the parameters of the neural spectrum forcifier, and form a closed-loop adaptive adjustment; The iteration control module is configured to repeat the execution of the above modules until the preset conditions are met. The output module is configured to output the turbulent background field.