A method for solving an incompressible fluid elliptic partial differential equation wavelet transform convolution neural network multi-grid numerical solution
Patent Information
- Application Number
- CN202511433627.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-09
- Publication Date
- 2026-10-16
- Estimated Expiration
- 2045-10-09
AI Technical Summary
[0005]针对广泛应用的传统MG方法收敛性因受限于迭代矩阵谱性质、初始猜测误差以及人工调优依赖导致的收敛性差、效率低下问题,本发明提出了一种不可压缩流体椭圆偏微分方程小波变换卷积神经网络多重网格数值求解方法,突破传统MG的性能瓶颈
本发明提出了一种不可压缩流体椭圆偏微分方程小波变换卷积神经网络多重网格(WTCNN-MG)数值求解方法。融合小波变换、卷积神经网络与多重网格;采用参数待优化的卷积操作来模化MG中的平滑离散、限制和延拓操作,同时采用WTCNN 对每一粗网格层级的平滑误差进行额外校正;本发明在求解精度、收敛效率及泛化能力上相较于现有技术具有显著进步;
Smart Images

Figure CN121434546B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of numerical computation in incompressible fluid mechanics, specifically, it relates to a numerical solution method for elliptic partial differential equations of incompressible fluids using wavelet transform convolutional neural networks and multigrids. Background Technology
[0002] Numerical methods that embed neural network models into numerical solution frameworks can, based on the accuracy of the neural network output, choose to completely or partially replace traditional iterative solvers. While neural network models have not yet completely replaced traditional iterative solvers, they provide more accurate initial guesses, thus significantly reducing the number of iterations and improving the overall solution speed. However, when machine learning models are combined with traditional solvers, their independence prevents the machine learning model from substantially affecting the spectral properties of the traditional solver, limiting the improvement in computational efficiency. Furthermore, when machine learning models aim to optimize the spectral properties of traditional iterative solvers, even if they achieve better spectral properties, they are still limited by the performance ceiling of the traditional iterative solver.
[0003] The multigrid (MG) method is currently the most widely used nonstationary iterative algorithm for solving large-scale elliptic partial differential equations. However, its convergence is limited by the spectral properties of the iteration matrix (such as spectral radius or spectral condition number), initial guess error, and dependence on manual tuning. As a result, the MG method suffers from poor convergence, low computational efficiency, and high resource consumption when dealing with large-scale high-fidelity problems.
[0004] Existing methods for solving elliptic partial differential equations using machine learning (ML) have the following shortcomings: the actual accuracy and efficiency of data-driven ML models are significantly lower than those of traditional numerical methods; existing spliced hybrid simulation methods have not yet achieved a complete replacement of traditional MG methods with ML models, and due to the independence between ML models and traditional iterative methods, the efficiency improvement cannot be guaranteed; although hybrid simulation methods that use ML to assist in optimizing the spectral properties of MG can improve convergence performance to some extent, they are still limited by the inherent performance limits of traditional MG methods. Summary of the Invention
[0005] To address the poor convergence and low efficiency of the widely used traditional MG method due to limitations in the spectral properties of the iteration matrix, initial guessing errors, and reliance on manual tuning, this invention proposes a wavelet transform convolutional neural network multigrid numerical solution method for incompressible fluid elliptic partial differential equations, breaking through the performance bottleneck of traditional MG.
[0006] This invention is achieved through the following technical solution: an improved multigrid solution method using wavelet transform convolutional neural networks for partial differential equations of incompressible fluids. The method specifically includes the following steps: S1. Discretize the partial differential equations corresponding to the motion of incompressible fluids. The partial differential equations include the pressure Poisson equation (PPE) obtained by splitting the incompressible Navier-Stokes equations and the non-homogeneous Helmholtz equations describing wave propagation. S2. The core operation of convolutional modeling of multi-mesh MG; S3. Construct a wavelet transform convolutional neural network (WTCNN) for coarse-grid level smoothing error correction, sequentially performing discrete wavelet transform (DWT) frequency decomposition and convolutional neural network (CNN) feature extraction; after reaching the coarsest spatial scale, repeatedly use inverse discrete wavelet transform (IDWT) frequency reconstruction and CNN for feature extraction until returning to the current level grid scale, and output the smoothing error correction amount. ; S4. Perform a V-loop iterative solution: First, perform pre-smoothing operations on each grid level from fine to coarse to eliminate high-frequency errors. Then, use constraint operations to coarseen low-frequency smoothing errors to a coarser grid level. Finally, at the coarsest grid level, invert the solution by convolutional modularization. Then, the coarse mesh is de-extended and interpolated to a finer mesh level, while simultaneously combining the WTCNN output. Correct the smoothing error, and finally perform a post-smoothing operation to optimize the fine mesh solution; S5. Perform convergence verification. Use a loss function driven by both spectral characteristics and physical constraints to perform two-stage accuracy training on WTCNN-MG. If the preset accuracy threshold is not reached, return to S4 and repeat the V-loop iteration. If the accuracy threshold is reached, stop the iteration. S6. Output incompressible fluid physical quantity results that meet accuracy requirements, including pressure field distribution of Kolmogorov flow or three-dimensional isotropic turbulence, and wave distribution described by non-homogeneous Helmholtz equations.
[0007] Furthermore, in S1, Discretizing the partial differential equations corresponding to the motion of incompressible fluids yields a system of linear algebraic equations: Ax = b in A It is a discrete matrix. N represents the discrete degrees of freedom; x For unknown solution vectors, ; b The vector of terms on the right-hand side. .
[0008] Furthermore, S1 includes: S1.1 When the partial differential equation is the Poisson equation (PPE): S1.1.1 For a two-dimensional Kolmogorov flow, a finite difference scheme with staggered grid configuration is used for spatial discretization, and a second-order explicit-implicit scheme is used for time discretization. The discretization matrix satisfies:
[0009] in For Kronecker products, A x , A y These are one-dimensional discrete matrices in the x and y directions, respectively. , ; I x , I y These are the identity matrices in the x and y directions, respectively. , ; S1.1.2 For three-dimensional isotropic turbulence, the discrete matrix satisfies:
[0010] A z Let be a one-dimensional discrete matrix in the z-direction. I z Let be the identity matrix in the z-direction; S1.2 When the partial differential equation is a non-homogeneous Helmholtz equation:
[0011] u ( x Let be the scalar field to be solved; Wave number; f ( x () is a source term or driving term; Discretized using a second-order central difference scheme, the discrete matrix satisfies: .
[0012] Furthermore, in S2, it includes: S2.1 Determine the maximum grid level L The maximum grid level is set for solving the PPE equations for 2D Kolmogorov flow, solving the PPE equations for 3D isotropic turbulence, and solving the nonhomogeneous Helmholtz equations. L ; S2.2, Set the number of smooth iterations K Set smooth convolution kernels for each grid level. M l Discrete convolution kernel A l Restricted convolution kernel R l Extended convolution kernel P l Dimensions; S2.3 Initialize convolution kernel parameters: The initial values of all convolution kernels to be optimized are sampled from the uniform distribution in the interval [0,1], and then scaled by the product of the convolution kernel size.
[0013] Furthermore, in S3, it includes: S3.1 Discrete Wavelet Transform (DWT) and Inverse Discrete Wavelet Transform (IDWT) employ the Daubechies wavelet db4 with 4th-order vanishing moments; S3.2 Design the WTCNN structure: including two DWT frequency decompositions, three CNN nonlinear feature extractions, and two IDWT frequency reconstructions, with CNN feature extraction alternating between DWT and IDWT; S3.3 Frequency component processing: After DWT decomposition, low-frequency components and high-frequency components are concatenated in the channel dimension; before IDWT reconstruction, the input features are equally divided in the channel dimension; after frequency decomposition or reconstruction of the input features, CNN is used for feature extraction. CNN feature extraction uses a non-linear activation function to perform non-linear transformation.
[0014] Furthermore, in S4, it includes: S4.1 Eliminate high-frequency errors by smoothing from fine to coarse meshes: This is done by adjusting the mesh hierarchy. l =1 to l = L 1. Perform smooth iterations; S4.2, Limiting coarsening operation: Coarsening low-frequency smoothing errors to a coarser mesh. S4.3 For the coarsest grid level, use convolutional modularization to invert the operation; S4.4, Extension Interpolation and Error Correction: The coarse mesh is de-extended and interpolated to a finer mesh, and the error correction amount from the WTCNN output is added. Then perform a smooth iteration; S4.5. Eliminate low-frequency errors by smoothing from coarse to fine mesh: This applies to the mesh hierarchy. l = L 1 to l=1, repeat step S4.4, update the fine mesh solution. .
[0015] Furthermore, in S5, S5.1 Setting the accuracy threshold: Select the corresponding threshold according to the accuracy requirements of the incompressible fluid problem; S5.2, Loss function driven by both design spectrum characteristics and physical constraints; S5.3. Two-stage training using single-precision and double-precision: First, use single-precision training to quickly converge to relatively optimal network parameters, and then switch to double-precision to further fine-tune the network parameters to meet high-precision requirements; S5.4 Iteration Termination Judgment: If the relative residual r of the current iterative solution reaches the preset threshold, then stop the V-loop iteration; if it does not reach the threshold, then use the current iterative solution as the initial guess for the next V-loop, return to step S4 to repeat the iteration, until the convergence condition is met.
[0016] A wavelet transform convolutional neural network multigrid numerical solution system for incompressible fluid elliptic partial differential equations: The system includes a discretization module, an MG convolution module, a WTCNN construction module, a V-loop module, a verification module, and an output module; The discretization module discretizes the partial differential equations corresponding to the motion of incompressible fluids. The partial differential equations include the pressure Poisson equation (PPE) obtained by splitting the incompressible Navier-Stokes equations and the non-homogeneous Helmholtz equations describing wave propagation. The MG convolutional modeling module uses convolution operations to initialize the core operations of the multi-grid MG; The WTCNN construction module builds a wavelet transform convolutional neural network (WTCNN) for coarse-grid level smoothing error correction. It sequentially performs discrete wavelet transform (DWT) frequency decomposition and convolutional neural network (CNN) feature extraction. After reaching the coarsest spatial scale, it repeatedly uses inverse discrete wavelet transform (IDWT) frequency reconstruction and CNN for feature extraction until it returns to the current level grid scale, outputting the smoothing error correction amount. ; The V-loop module performs a V-loop iterative solution: First, perform pre-smoothing operations on each grid level from fine to coarse to eliminate high-frequency errors. Then, use constraint operations to coarseen low-frequency smoothing errors to a coarser grid level. Finally, solve directly at the coarsest grid level or obtain the coarsest grid solution by inverting the convolutional model. Then, the coarse mesh is deextended and interpolated to a finer mesh level, while simultaneously combining the WTCNN output. Correct the smoothing error, and finally perform a post-smoothing operation to optimize the fine mesh solution; The verification module performs convergence verification, employing a loss function driven by both spectral characteristics and physical constraints to perform two-stage accuracy training on WTCNN-MG. If the preset accuracy threshold is not reached, the process returns to S4 and repeats the V-loop iteration; if the accuracy threshold is reached, the iteration stops. The output module outputs incompressible fluid physical quantity results that meet the accuracy requirements, including the pressure field distribution of Kolmogorov flow or three-dimensional isotropic turbulence, and the wave distribution described by the non-homogeneous Helmholtz equation.
[0017] An electronic device includes a memory and a processor, the memory storing a computer program, the processor executing the computer program to implement the steps of the above method.
[0018] A computer-readable storage medium for storing computer instructions that, when executed by a processor, implement the steps of the above-described method.
[0019] Beneficial effects of the invention This invention proposes a numerical solution method for incompressible fluid elliptic partial differential equations using wavelet transform convolutional neural network multigrid (WTCNN-MG). It integrates wavelet transform, convolutional neural network, and multigrid; employs convolution operations with unoptimized parameters to model the smoothing, discretization, constraint, and extension operations in MG; and uses WTCNN to additionally correct the smoothing error at each coarse grid level. This invention represents a significant improvement over existing technologies in terms of solution accuracy, convergence efficiency, and generalization ability. (1) The smoothing, discretization, constraint and extension operations in the MG method are modeled by the parameter-optimizable convolution operation. The smoothing error of each coarse grid level is additionally corrected by the wavelet transform convolutional neural network. This not only optimizes the spectral properties of the iteration matrix, but also achieves accurate correction of the smoothing error, thus breaking through the performance bottleneck of the traditional MG method. (2) WTCNN-MG has an excellent convergence rate and can achieve a significant reduction in residuals in the early stage of iteration. The residual reduction in a single iteration is much higher than that of traditional MG, which greatly reduces the total number of iterations and has a short total execution time. It can also significantly improve the overfitting problem and can stably converge to the high accuracy requirement in various situations. It exhibits strong robustness and generalization.
[0020] (3) When dealing with parametric PDEs, such as non-homogeneous Helmholtz equations and other parametric partial differential equations, the convolution kernels of WTCNN-MG do not need to be redesigned or optimized according to specific cases after training. In contrast, traditional MG requires the reconstruction of discrete matrices, restrictions and extensions for different parameters. This characteristic makes WTCNN-MG more flexible in multi-condition and multi-parameter problems, greatly reducing the secondary or even multiple development costs in engineering applications, and making it more universal. Attached Figure Description
[0021] Figure 1 This is a schematic diagram of the V-loop WTCNN-MG framework of the present invention; Figure 2 This is a schematic diagram of the WTCNN of the present invention; Figure 3 This is a comparison of the number of iterations between the WTCNN-MG solver and the traditional MG solver in this embodiment of the invention. Detailed Implementation
[0022] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0023] Unless otherwise specified, the experimental methods used in the following examples are conventional methods. Unless otherwise specified, the materials, reagents, methods, and instruments used are all conventional materials, reagents, methods, and instruments in the art, and can be obtained commercially by those skilled in the art.
[0024] Combination Figures 1 to 3 This invention proposes a wavelet transform convolutional neural network multigrid numerical solution method for incompressible fluid elliptic partial differential equations. The method specifically includes the following steps: S1. Discretize the partial differential equations corresponding to the motion of incompressible fluids, including the pressure Poisson equation (PPE) obtained by splitting the incompressible Navier-Stokes equations and the non-homogeneous Helmholtz equations describing wave propagation. Discretizing the partial differential equations corresponding to the motion of incompressible fluids yields a system of linear algebraic equations: Ax = b in A It is a discrete matrix. N represents the discrete degrees of freedom; x For unknown solution vectors, ; b This is the vector of the right-hand side (including boundary conditions). ; S1.1 When the partial differential equation is the Poisson equation (PPE): S1.1.1 For a two-dimensional Kolmogorov flow, a finite difference scheme with staggered grid configuration is used for spatial discretization, and a second-order explicit-implicit scheme is used for time discretization. The discretization matrix satisfies:
[0025] in For Kronecker products, A x , A y These are one-dimensional discrete matrices in the x and y directions, respectively. , ; I x , I y These are the identity matrices in the x and y directions, respectively. , ; S1.1.2 For three-dimensional isotropic turbulence, a second-order central difference scheme is used for spatial discretization, and the discretization matrix satisfies:
[0026] A z Let be a one-dimensional discrete matrix in the z-direction. I z Let be the identity matrix in the z-direction; S1.2 When the partial differential equation is a non-homogeneous Helmholtz equation:
[0027] u ( x Let be the scalar field to be solved, and represent the wave function or amplitude; The wave number is related to the frequency of the wave and the properties of the medium. f ( x () represents the source or driving term, indicating the external excitation that causes fluctuations in the medium; Discretized using a second-order central difference scheme, the discrete matrix satisfies: .
[0028] S2. The core operation of convolutional modeling of multi-mesh MG; S2.1 Determine the maximum grid level L The maximum grid level is set for solving the PPE equations for 2D Kolmogorov flow, solving the PPE equations for 3D isotropic turbulence, and solving the nonhomogeneous Helmholtz equations. L ; In the embodiment, for the PPE solution of a two-dimensional Kolmogorov flow, let... L =9; For the PPE solution of three-dimensional isotropic turbulence, let... L =7; For solving the non-homogeneous Helmholtz equation, let... L =8; S2.2, In the embodiment, the number of smoothing iterations of WTCNN-MG is set. K =5, setting the smooth convolution kernel for each grid level. M l Discrete convolution kernel A l Restricted convolution kernel R l Extended convolution kernel P l Dimensions; S2.3 Initialize convolution kernel parameters: The initial values of all convolution kernels to be optimized are sampled from the uniform distribution in the interval [0,1], and then scaled by the product of the convolution kernel size.
[0029] S3. WTCNN combines wavelet multi-resolution analysis and CCN feature extraction to effectively extract low and high frequency features, achieving fast and accurate approximation of low-frequency smoothing errors: A wavelet transform convolutional neural network (WTCNN) is constructed for coarse-grid level smoothing error correction. The process sequentially performs discrete wavelet transform (DWT) frequency decomposition and CNN feature extraction. After reaching the coarsest spatial scale, inverse discrete wavelet transform (IDWT) frequency reconstruction and CNN feature extraction are repeated until the current grid level is returned to its original scale. The smoothing error correction is then output. ; S3.1 Discrete Wavelet Transform (DWT) decomposes data into components in different frequency ranges and uses the changes of wavelet basis functions at different scales to capture the local features of the signal; while Inverse Discrete Wavelet Transform (IDWT) is the inverse process of DWT, which uses the corresponding wavelet transform coefficients to reconstruct the data. In this embodiment, DWT and IDWT employ Daubechies wavelet (db4) with 4th order vanishing moments, and their low-pass coefficients... High-pass coefficient ; S3.2 Design the WTCNN structure: including two DWT frequency decompositions, three CNN nonlinear feature extractions, and two IDWT frequency reconstructions, with CNN feature extraction alternating between DWT and IDWT; For CNN convolution kernel parameters in two-dimensional problems, the first feature extraction uses 64×4×3×3 (number of output channels × number of input channels × kernel size × kernel size), the second uses 256×256×3×3, and the third uses 4×64×3×3. For CNN convolution kernel parameters in 3D problems, the first feature extraction uses 32×8×3×3×3, the second uses 512×512×3×3×3, and the third uses 8×32×3×3×3. S3.3 Frequency Component Processing: After DWT decomposition, low-frequency components and high-frequency components are concatenated along the channel dimension (the number of channels is increased by 2 times in one-dimensional problems, 4 times in two-dimensional problems, and 8 times in three-dimensional problems); before IDWT reconstruction, the input features are divided equally along the channel dimension (divided into 2, 4, or 8 equal parts); after frequency decomposition or reconstruction of the input features, CNN is used for feature extraction, and CNN feature extraction uses a non-linear activation function for non-linear transformation.
[0030] The WTCNN model includes: by As input, Discrete Wavelet Transform (DWT) is used for frequency decomposition and spatial scale reduction, and CNN is used for nonlinear feature extraction of different frequency components. This process is repeated for deeper frequency decomposition and feature extraction. Then, frequency reconstruction and feature extraction are performed stepwise through Inverse Discrete Wavelet Transform (IDWT) and CNN, outputting a low-frequency smoothing error correction amount. ; in, and These represent DWT and IDWT operations, respectively. Represents the CNN convolution kernel. This represents a non-linear activation function.
[0031] S4. Perform a V-loop iterative solution: First, perform pre-smoothing operations on each grid level from fine to coarse to eliminate high-frequency errors. Then, use constraint operations to coarseen low-frequency smoothing errors to a coarser grid level. Finally, at the coarsest grid level, invert the solution by convolutional modularization. Then, the coarse mesh is deextended and interpolated to a finer mesh level, while simultaneously combining the WTCNN output. Correct the smoothing error, and finally perform a post-smoothing operation to optimize the fine mesh solution; This recursive process repeats until a certain coarse mesh level is reached, at which the cost of directly performing the inversion operation is negligible compared to the cost of a smooth iteration on a fine mesh. This nested structure connects all levels through restriction and prolongation operators.
[0032] Convolution-based smoothing, differentiation, constraint, and continuation operations include: S4.1, Pre-smoothing operation (from fine mesh to coarse mesh, eliminating high-frequency errors): For mesh levels... l =1 to l = L 1. Perform smooth iterations; At the level Above, a smooth convolution operation is used. and differential convolution operations They respectively replace the traditional smooth iteration and differentiation operations, and perform... The next iteration eliminates high-frequency errors:
[0033] in, Indicates the convolution operation; S4.2, Limiting coarsening operation (transferring errors to a coarser mesh): Coarses low-frequency smoothing errors to a coarser mesh. Convolution operations are restricted by stride > 1. Coarsen the residuals to a coarser grid:
[0034] S4.3 Solving for the coarsest mesh: For the coarsest mesh level, use convolutional modularization inversion or direct inversion; smooth and coarseen the mesh level by level from fine to coarse until the coarsest mesh level is reached. Convolution operation Approximate inversion operation:
[0035] S4.4, Extension Interpolation and Error Correction (Coarse Mesh to Fine Mesh, Error Correction): The coarse mesh is de-extended and interpolated to a finer mesh, and the error correction amount from the WTCNN output is added. Then perform a smooth iteration; From coarse to fine mesh, use convolution stride > 1 for extended convolution operations. The process involves progressive extension and adaptive correction of low-frequency smoothing errors using WTCNN.
[0036] in, This is the amount of low-frequency smoothing error correction for the WTCNN output.
[0037] S4.5. A post-smoothing operation is performed from coarse to fine mesh to eliminate low-frequency errors and improve mesh hierarchy. l = L 1 to l =1, repeat step S4.4, update the fine mesh solution. .
[0038] S5. Perform convergence verification. Use a loss function driven by both spectral characteristics and physical constraints to perform two-stage accuracy training on WTCNN-MG. If the preset accuracy threshold is not reached, return to S4 and repeat the V-loop iteration. If the accuracy threshold is reached, stop the iteration. Training WTCNN-MG: A complete WTCNN-MG solver consists of multiple sequentially connected V-loop WTCNN-MG functions until a specified convergence condition is met. Except for the first V-loop which uses the given initial guess, all subsequent V-loops use the output of the previous V-loop as the initial guess. S5.1 Setting the accuracy threshold: Select the corresponding threshold according to the accuracy requirements of the incompressible fluid problem; S5.2 Design Loss Function: Loss function driven by both spectral characteristics and physical constraints:
[0039] in, and The total iteration matrix of WTCNN-MG is shown below. The spectral radius loss and the relative residual loss of the algebraic equation, For the first A random vector of samples, For batch size, It is the Euclidean norm. ( ) is the first The output of each V-loop; S5.3. Two-stage training using single-precision and double-precision: First, use single-precision training to quickly converge to relatively optimal network parameters, and then switch to double-precision to further fine-tune the network parameters to meet high-precision requirements; S5.4 Iteration Termination Judgment: If the relative residual r of the current iterative solution reaches the preset threshold, then stop the V-loop iteration; if it does not reach the threshold, then use the current iterative solution as the initial guess for the next V-loop, return to step S4 and repeat the iteration until the convergence condition is met.
[0040] S6. Output incompressible fluid physical quantity results that meet accuracy requirements, including pressure field distribution of Kolmogorov flow or three-dimensional isotropic turbulence, and wave distribution described by non-homogeneous Helmholtz equations.
[0041] A wavelet transform convolutional neural network multigrid numerical solution system for incompressible fluid elliptic partial differential equations: The system includes a discretization module, an MG convolution module, a WTCNN construction module, a V-loop module, a verification module, and an output module; The discretization module discretizes the partial differential equations corresponding to the motion of incompressible fluids. The partial differential equations include the pressure Poisson equation (PPE) obtained by splitting the incompressible Navier-Stokes equations and the non-homogeneous Helmholtz equations describing wave propagation. The MG convolutional modeling module uses convolution operations to initialize the core operations of the multi-grid MG; The WTCNN construction module builds a wavelet transform convolutional neural network (WTCNN) for coarse-grid level smoothing error correction. It sequentially performs discrete wavelet transform (DWT) frequency decomposition and convolutional neural network (CNN) feature extraction. After reaching the coarsest spatial scale, it repeatedly uses inverse discrete wavelet transform (IDWT) frequency reconstruction and CNN for feature extraction until it returns to the current level grid scale, outputting the smoothing error correction amount. ; The V-loop module performs a V-loop iterative solution: First, perform pre-smoothing operations on each grid level from fine to coarse to eliminate high-frequency errors. Then, use constraint operations to coarseen low-frequency smoothing errors to a coarser grid level. Finally, solve directly at the coarsest grid level or obtain the coarsest grid solution by inverting the convolutional model. Then, the coarse mesh is deextended and interpolated to a finer mesh level, while simultaneously combining the WTCNN output. Correct the smoothing error, and finally perform a post-smoothing operation to optimize the fine mesh solution; The verification module performs convergence verification, employing a loss function driven by both spectral characteristics and physical constraints to perform two-stage accuracy training on WTCNN-MG. If the preset accuracy threshold is not reached, the process returns to S4 and repeats the V-loop iteration; if the accuracy threshold is reached, the iteration stops. The output module outputs incompressible fluid physical quantity results that meet the accuracy requirements, including the pressure field distribution of Kolmogorov flow or three-dimensional isotropic turbulence, and the wave distribution described by the non-homogeneous Helmholtz equation.
[0042] Example 1 This embodiment uses the nonhomogeneous Helmholtz equation as an example to demonstrate the implementation process and technical effects of the method of the present invention, and to verify its efficiency in solving parametric elliptic partial differential equations.
[0043] 1. Parameterize the nonhomogeneous Helmholtz equation and the training dataset, including the following steps: The parameterized nonhomogeneous Helmholtz equations are parameterized partial differential equations describing vibrations or wave propagation in a medium. ,in, For the scalar field to be solved, For wave number, It can be a source item or a driving item; The solution domain is Dirichlet boundary conditions are applied using a second-order central difference scheme on a 512×512 grid, with the discrete matrix being... ; Wavenumber of the training dataset And it adopts dual-point source drive. ,in , .
[0044] 2. Parameter settings for WTCNN-MG, including the following steps: The maximum grid level is ,smooth ,differential ,limit and extension The kernel size of the operation is ; The alternating CNN convolutional kernel sizes are 64×4×3×3, 256×256×3×3 and 4×64×3×3; The wavelet basis function uses the Daubechies wavelet (db4) with second-order vanishing moments, whose low-pass coefficients High-pass coefficient .
[0045] 3. Two-stage accuracy training, including the following steps: Training parameters: Batch size Initial learning rate The learning rate is halved every 100 rounds, and the weight decay coefficient is... ; Single-precision stage: 500 training iterations using FP32 floating-point numbers; Double precision stage: Switch to FP64 floating-point numbers and fine-tune 300 times.
[0046] 4. Solve the performance verification, including the following steps: Test set source items: including single-point sources Dual point source and four-point source ( The driving force has an amplitude several times greater than that of the point sources in the training dataset; Test set wave count: including , , and Four wave numbers; Case combinations: Under the above three point source terms, changing the test wavenumber is divided into four main categories of operating conditions: Case I Case II Case III Case IV , Figure 3 The first, second, and third rows correspond to single-point source drivers, respectively. Dual-point source drive and four-point source drive ; Acceleration effect: When the relative residual reaches as well as At that time, the solution speed of WTCNN-MG was 84.14, 88.08, 90.23 and 89.05 times faster than that of traditional MG, respectively, significantly improving the solution performance.
[0047] An electronic device includes a memory and a processor, the memory storing a computer program, the processor executing the computer program to implement the steps of the above method.
[0048] A computer-readable storage medium for storing computer instructions that, when executed by a processor, implement the steps of the above-described method.
[0049] The memory in the embodiments of this application can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. Non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate synchronous DRAM (DDR SDRAM), enhanced synchronous DRAM (ESDRAM), synchronous linked DRAM (SLDRAM), and direct rambus RAM (DR RAM). It should be noted that the memory of the methods described in this invention is intended to include, but is not limited to, these and any other suitable types of memory.
[0050] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired means such as coaxial cable, optical fiber, digital subscriber line, DSL, or wireless means such as infrared, wireless, microwave, etc. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium such as a floppy disk, hard disk, magnetic tape; an optical medium such as a high-density digital video disc, DVD; or a semiconductor medium such as a solid-state disk, SSD, etc.
[0051] In implementation, each step of the above method can be completed by integrated logic circuits in the processor's hardware or by instructions in software. The steps of the method disclosed in the embodiments of this application can be directly implemented by a hardware processor, or by a combination of hardware and software modules in the processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory, and the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method. To avoid repetition, detailed descriptions are omitted here.
[0052] It should be noted that the processor in the embodiments of this application can be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method embodiments can be completed by the integrated logic circuits in the processor's hardware or by instructions in software form. The processor can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied as execution by a hardware decoding processor, or as execution by a combination of hardware and software modules in the decoding processor. The software modules can be located in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory; the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above methods.
[0053] The foregoing has provided a detailed description of the wavelet transform convolutional neural network multigrid numerical solution method for incompressible fluid elliptic partial differential equations proposed in this invention. The principles and implementation methods of this invention have been explained. The above description of the embodiments is only for the purpose of helping to understand the method and core ideas of this invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this invention. Therefore, the content of this specification should not be construed as a limitation of this invention.
Claims
1. A numerical solution method for elliptic partial differential equations of incompressible fluids using wavelet transform convolutional neural networks and multigrids, characterized in that: The method specifically includes the following steps: S1. Discretize the partial differential equations corresponding to the motion of incompressible fluids. The partial differential equations include the pressure Poisson equation (PPE) obtained by splitting the incompressible Navier-Stokes equations and the non-homogeneous Helmholtz equations describing wave propagation. S2. The core operation of initializing the multi-grid MG using convolution operations; S2 includes: S2.1 Determine the maximum grid level L The maximum grid level is set for solving the PPE equations for 2D Kolmogorov flow, solving the PPE equations for 3D isotropic turbulence, and solving the nonhomogeneous Helmholtz equations. L ; S2.2, Set the number of smooth iterations K Set smooth convolution kernels for each grid level. M l Discrete convolution kernel A l Restricted convolution kernel R l Extended convolution kernel P l Dimensions; S2.3 Initialize convolution kernel parameters: The initial values of all convolution kernels to be optimized are sampled from the uniform distribution in the interval [0,1], and then scaled by the product of the convolution kernel size; S3. Construct a wavelet transform convolutional neural network (WTCNN) for coarse-grid level smoothing error correction, sequentially performing discrete wavelet transform (DWT) frequency decomposition and convolutional neural network (CNN) feature extraction; after reaching the coarsest spatial scale, repeatedly use inverse discrete wavelet transform (IDWT) frequency reconstruction and CNN for feature extraction until returning to the current level grid scale, and output the smoothing error correction amount. ; S3 includes: S3.1 Discrete Wavelet Transform (DWT) and Inverse Discrete Wavelet Transform (IDWT) employ the Daubechies wavelet db4 with 4th-order vanishing moments; S3.2 Design the WTCNN structure: including two DWT frequency decompositions, three CNN nonlinear feature extractions, and two IDWT frequency reconstructions, with CNN feature extraction alternating between DWT and IDWT; S3.3 Frequency component processing: After DWT decomposition, low-frequency components and high-frequency components are concatenated in the channel dimension; before IDWT reconstruction, the input features are equally divided in the channel dimension; after frequency decomposition or reconstruction of the input features, CNN is used for feature extraction. CNN feature extraction uses a non-linear activation function to perform non-linear transformation. S4. Perform a V-loop iterative solution: First, perform pre-smoothing operations on each grid level from fine to coarse to eliminate high-frequency errors. Then, use constraint operations to coarseen low-frequency smoothing errors to a coarser grid level. Finally, at the coarsest grid level, invert the solution by convolutional modularization. Then, the coarse mesh is de-extended and interpolated to a finer mesh level, while simultaneously combining the WTCNN output. Correct the smoothing error, and finally perform a post-smoothing operation to optimize the fine mesh solution; S5. Perform convergence verification. Use a loss function driven by both spectral characteristics and physical constraints to perform two-stage accuracy training on WTCNN-MG. If the preset accuracy threshold is not reached, return to S4 and repeat the V-loop iteration. If the accuracy threshold is reached, stop the iteration. S6. Output incompressible fluid physical quantity results that meet accuracy requirements, including pressure field distribution of Kolmogorov flow or three-dimensional isotropic turbulence, and wave distribution described by non-homogeneous Helmholtz equations.
2. The method according to claim 1, characterized in that: In S1, Discretizing the partial differential equations corresponding to the motion of incompressible fluids yields a system of linear algebraic equations: Ax = b in A It is a discrete matrix. N represents the discrete degrees of freedom; x For unknown solution vectors, ; b The vector of terms on the right-hand side. .
3. The method according to claim 2, characterized in that: S1 includes: S1.1 When the partial differential equation is the Poisson equation for pressure (PPE): S1.1.1 For a two-dimensional Kolmogorov flow, a finite difference scheme with staggered grid configuration is used for spatial discretization, and a second-order explicit-implicit scheme is used for time discretization. The discretization matrix satisfies: in For Kronecker products, A x , A y These are one-dimensional discrete matrices in the x and y directions, respectively. , ; I x , I y These are the identity matrices in the x and y directions, respectively. , ; S1.1.2 For three-dimensional isotropic turbulence, the discrete matrix satisfies: A z Let be a one-dimensional discrete matrix in the z-direction. I z Let be the identity matrix in the z-direction; S1.2 When the partial differential equation is a non-homogeneous Helmholtz equation: u ( x Let be the scalar field to be solved; Wave number; f ( x () is a source term or driving term; Discretized using a second-order central difference scheme, the discrete matrix satisfies: 。 4. The method according to claim 3, characterized in that: In S4, it includes: S4.1 Eliminate high-frequency errors by smoothing from fine to coarse meshes: This is done by adjusting the mesh hierarchy. l =1 to l = L 1. Perform smooth iterations; S4.2, Limiting coarsening operation: Coarsening low-frequency smoothing errors to a coarser mesh. S4.3 For the coarsest grid level, use convolutional modularization to invert the operation; S4.4, Extension Interpolation and Error Correction: The coarse mesh is de-extended and interpolated to a finer mesh, and the error correction amount from the WTCNN output is added. Then perform a smooth iteration; S4.
5. Eliminate low-frequency errors by smoothing from coarse to fine mesh: This applies to the mesh hierarchy. l = L 1 to l =1, repeat step S4.4, update the fine mesh solution. .
5. The method according to claim 4, characterized in that: In S5, S5.1 Setting the accuracy threshold: Select the corresponding threshold according to the accuracy requirements of the incompressible fluid problem; S5.2, Loss function driven by both design spectrum characteristics and physical constraints; S5.
3. Two-stage training using single-precision and double-precision: First, use single-precision training to quickly converge to relatively optimal network parameters, and then switch to double-precision to further fine-tune the network parameters to meet high-precision requirements; S5.4 Iteration Termination Judgment: If the relative residual r of the current iterative solution reaches the preset threshold, then stop the V-loop iteration; if it does not reach the threshold, then use the current iterative solution as the initial guess for the next V-loop, return to step S4 and repeat the iteration until the convergence condition is met.
6. A numerical solution system for elliptic partial differential equations of incompressible fluids using wavelet transform convolutional neural networks and multigrids, characterized in that: The system is used to execute the wavelet transform convolutional neural network multigrid numerical solution method for incompressible fluid elliptic partial differential equations as described in any one of claims 1 to 5: The system includes a discretization module, an MG convolution module, a WTCNN construction module, a V-loop module, a verification module, and an output module; The discretization module discretizes the partial differential equations corresponding to the motion of incompressible fluids. The partial differential equations include the pressure Poisson equation (PPE) obtained by splitting the incompressible Navier-Stokes equations and the non-homogeneous Helmholtz equations describing wave propagation. The MG convolutional modeling module uses convolution operations to initialize the core operations of the multi-grid MG; Determine the maximum grid level L The maximum grid level is set for solving the PPE equations for 2D Kolmogorov flow, solving the PPE equations for 3D isotropic turbulence, and solving the nonhomogeneous Helmholtz equations. L ; Set the number of smooth iterations K Set smooth convolution kernels for each grid level. M l Discrete convolution kernel A l Restricted convolution kernel R l Extended convolution kernel P l Dimensions; Initialize convolution kernel parameters: The initial values of all convolution kernels to be optimized are sampled from a uniform distribution in the interval [0,1], and then scaled by dividing by the product of the convolution kernel size. The WTCNN construction module builds a wavelet transform convolutional neural network (WTCNN) for coarse-grid level smoothing error correction. It sequentially performs discrete wavelet transform (DWT) frequency decomposition and convolutional neural network (CNN) feature extraction. After reaching the coarsest spatial scale, it repeatedly uses inverse discrete wavelet transform (IDWT) frequency reconstruction and CNN for feature extraction until it returns to the current level grid scale, outputting the smoothing error correction amount. ; Discrete wavelet transform (DWT) and inverse discrete wavelet transform (IDWT) employ the Daubechies wavelet db4 with 4th order vanishing moments. The WTCNN architecture is designed to include two DWT frequency decompositions, three CNN nonlinear feature extractions, and two IDWT frequency reconstructions, with CNN feature extraction alternating between DWT and IDWT. Frequency component processing: After DWT decomposition, low-frequency components and high-frequency components are concatenated along the channel dimension; before IDWT reconstruction, the input features are equally divided along the channel dimension; after frequency decomposition or reconstruction of the input features, CNN is used for feature extraction, and CNN feature extraction uses a non-linear activation function to perform non-linear transformation. The V-loop module performs a V-loop iterative solution: First, perform pre-smoothing operations on each grid level from fine to coarse to eliminate high-frequency errors. Then, use constraint operations to coarseen low-frequency smoothing errors to a coarser grid level. Finally, at the coarsest grid level, invert the solution by convolutional modularization. Then, the coarse mesh is de-extended and interpolated to a finer mesh level, while simultaneously combining the WTCNN output. Correct the smoothing error, and finally perform a post-smoothing operation to optimize the fine mesh solution; The verification module performs convergence verification, employing a loss function driven by both spectral characteristics and physical constraints to perform two-stage accuracy training on WTCNN-MG. If the preset accuracy threshold is not reached, the process returns to S4 and repeats the V-loop iteration; if the accuracy threshold is reached, the iteration stops. The output module outputs incompressible fluid physical quantity results that meet the accuracy requirements, including the pressure field distribution of Kolmogorov flow or three-dimensional isotropic turbulence, and the wave distribution described by the non-homogeneous Helmholtz equation.
7. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 5.
8. A computer-readable storage medium for storing computer instructions, characterized in that, When the computer instructions are executed by the processor, they implement the steps of the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Incompressible NS equation solving method based on data fusion and operator enhancement
CN117892043A
Multiwavelet-based operator learning for differential equations
WO2023091230A2