Data-driven five-order multi-resolution WCNS format construction method
Through the data-driven fifth-order multi-resolution WCNS format construction method, the neural network optimizes the shock wave capture capability, and solves the problems of shock wave capture instability and increased numerical dissipation in the high-order finite difference method, achieving more efficient shock Wave capture and lower dispersion properties enhance the accuracy and resolution of flow simulation.
Patent Information
- Application Number
- CN202411484487.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-23
- Publication Date
- 2025-02-18
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing high-order finite difference method has non-physical oscillation, increased numerical dissipation and negative density or negative pressure problems when constructing a nonlinear format with robust shock capture capabilities, which affects the accuracy of the simulation results.
Using the data-driven fifth-order multi-resolution WCNS format construction method, the neural network optimization method is used to improve format performance, and by building training verification networks and training models, the second nonlinear weight of the interpolated solution of the multi-resolution sub-template is output to replace the original non- Linear interpolation steps to build a data-driven optimized hybrid format.
It improves shock wave capture capability, reduces dissipation properties, avoids negative weight problems, has high resolution and comparable calculation costs, and enhances the efficiency of research on complex flow phenomena and vehicle design optimization.
Smart Images

Figure BDA0005098374310000031 
Figure BDA0005098374310000033 
Figure BDA0005098374310000038
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of shock wave capture in computational fluid dynamics, and in particular to a data-driven fifth-order multi-resolution WCNS format construction method. Background Art
[0002] Computational fluid dynamics (CFD) is a discipline that numerically solves the basic equations of fluid and gas dynamics represented by the Euler / NS equations on computers. Its development is closely related to computational mathematics and computer technology. The rapid development of CFD in recent decades has fundamentally changed the aerospace design process, effectively reducing the number of wind tunnel experiments in the design process, and reducing energy consumption and design costs while overcoming the limitations of experimental technology. Among many numerical methods, the high-order finite difference method has attracted widespread attention due to its advantages such as high accuracy, high computational efficiency, and easy implementation.
[0003] However, a major problem that has long plagued the high-order finite difference method is how to construct a nonlinear format with robust shock wave capture capabilities. During high-speed flight, supersonic vehicles will inevitably encounter shock wave discontinuities and the various complex flow phenomena caused by them, which have a significant impact on the aerodynamic performance, structural integrity and flight safety of the aircraft. In order to accurately simulate flow phenomena under high-speed flight conditions and optimize aircraft design, numerical methods must not only be able to accurately capture shock waves at flow field discontinuities, but also maintain high-resolution characteristics in smooth areas of the flow field. To this end, researchers have developed a series of high-precision, high-resolution numerical formats under the framework of the high-order finite difference method.
[0004] Among them, the Weighted Compact Nonlinear Schemes (WCNS) have been widely used due to their powerful shock wave capture capabilities in discontinuous areas of the flow field. The WCNS format effectively improves the accuracy of shock wave capture through a nonlinear weighting strategy, while maintaining the high resolution of the numerical solution in the flow area. In order to obtain better performance, some optimization schemes such as the Multi-Resolution Weighted Compact Nonlinear Schemes (WCNS-MR) have been proposed. The WCNS-MR format constructs a unique class of multi-resolution templates and nonlinear weighting strategies, which enables the numerical format to directly switch between precise high-order accuracy and stable low-order accuracy according to demand, thereby achieving better performance.
[0005] Although the WCNS-MR format performs well in supersonic flow simulation, there are still some challenges. When capturing shock waves, some non-physical oscillation phenomena may still occur, affecting the accuracy of the simulation results; in addition, in the case of high wave numbers, the nonlinear weighting scheme designed only based on derivative information may lead to increased numerical dissipation, reduced resolution, and affect the capture of flow details; in some special cases, negative density or negative pressure that violates physical phenomena may even occur, resulting in calculation failure. Summary of the invention
[0006] The purpose of the present invention is to provide a data-driven fifth-order multi-resolution WCNS format construction method, which improves the performance of the fifth-order multi-resolution WCNS format by using a neural network optimization method, provides better shock wave capture capability, lower dispersion dissipation properties, and can avoid the problem of negative weights.
[0007] In order to solve the above technical problems, the present invention is implemented in the following ways:
[0008] A data-driven fifth-order multi-resolution WCNS format construction method comprises the following steps:
[0009] S1. Based on smooth functions and discontinuous functions with analytical expressions, a sample data set in a fifth-order multi-resolution WCNS format is constructed and optimized, wherein the sample data set includes a five-point template node value, a half-node reference solution, and a first nonlinear weight of a multi-resolution sub-template interpolation solution;
[0010] S2. Based on the MLP neural network, a training verification network suitable for multi-resolution sub-templates is constructed and a training model is trained. The model takes the five-point template node values as input, passes through the difference layer, feature extraction layer, output layer and targeting layer in sequence, and finally outputs the second nonlinear weight of the multi-resolution sub-template interpolation solution, and constructs a loss function for constraint training;
[0011] S3. Use the trained model to replace the interpolation process of the fifth-order multi-resolution WCNS, build a hybrid format for data-driven optimization and use it.
[0012] Furthermore, the sample data set in step S1 specifically includes:
[0013] S11, using equally spaced discrete grids on one-dimensional smooth functions and one-dimensional discontinuous functions to obtain five-point template node values in a fifth-order multi-resolution WCNS format;
[0014] S12, constructing a half-node reference solution corresponding to the obtained five-point template node value, and the obtained reference solution will be used as the true value label of the subsequent constrained neural network model;
[0015] S13. Constructing a first nonlinear weight of a multi-resolution sub-template interpolation solution corresponding to a five-point template node using multi-resolution features.
[0016] Preferably, the one-dimensional smooth function in step S11 includes a polynomial function, a Gaussian function, a hyperbolic tangent function, a trigonometric function, an exponential function and a combination thereof, and the one-dimensional discontinuous function includes a step function and a Relu function.
[0017] Furthermore, when the five-point template node values in step S12 are constructed using a smooth function, the five-point Lagrange polynomial interpolation method is used to obtain the interpolation solution of the template at the half node. As a semi-node reference solution;
[0018] When using discontinuous function construction, a reference solution with upwind properties is constructed according to the discontinuous position. The specific method is: if the discontinuous position is between the first node and the second node or between the fourth node and the fifth node, then the function value u is obtained at the half node between the third node and the fourth node. j+1 / 2 =f(x j+1 / 2 ) is used as the reference solution. If the discontinuity is between the second and fourth nodes, the value u of the third node is j+1 / 2 =u j As a reference solution;
[0019] Among them, u j-2 ,u j-1 ,u j ,u j+1 ,u j+2 Respectively represent the first, second, third, fourth, and fifth node values of the five-point template, u j+1 / 2 is the reference solution of the five-point template at the half node, x j+1 / 2 represents the half-node coordinates, and f(x) represents the constructed one-dimensional function.
[0020] In step S13, the multi-resolution sub-template is composed of S1={u j},S2={u j-1 ,u j ,u j+1}, S3={u j-2 ,u j-1 ,u j ,u j+1 ,u j+2 The multi-resolution sub-template interpolation solution is the interpolation solution of the three multi-resolution sub-templates at the half-nodes, and its specific expression is as follows:
[0021]
[0022] Among them, q1, q2, q3 represent the interpolation solutions of multi-resolution sub-templates S1, S2, S3 respectively;
[0023] The first nonlinear weight is composed of a nonlinear weight coefficient The calculation steps are as follows:
[0024] S131, calculating three smoothness indicators and a global smoothness indicator using derivative information;
[0025] S132, calculating a first transition nonlinear weight of the combined polynomial using a smoothness indicator and a global smoothness indicator;
[0026] S133: Calculate a first nonlinear weight using the first transition nonlinear weight.
[0027] Furthermore, in step S131, the smoothness indicators are β1, β2, β3, and the global smoothness indicator is τ;
[0028] The expression of the smoothness indicator β1 is as follows:
[0029]
[0030] in, σ=σ0+σ1,ζ0=(u j -u j-1 ) 2 γ 1,1 =1-γ 0,1 , σ, σ0, σ1, ζ0, ζ1, γ 0,1 , γ 1,1 , They are all intermediate variables in the calculation process, and ε0 is a small amount to avoid the denominator being 0;
[0031] The expressions of the smoothness indicators β2 and β3 are as follows:
[0032]
[0033] in, represents the n-th order derivative value of the second sub-template S2 at the middle node, It represents the n-th order derivative value of the third sub-template S3 at the middle node. The specific expression is as follows:
[0034]
[0035] The expression of the global smoothness indicator τ is as follows:
[0036]
[0037] Furthermore, in step S132, the first transition nonlinear weight is composed of nonlinear weight coefficients ω1, ω2, ω3, and the expression thereof is as follows:
[0038]
[0039] Among them, ω k represents the normalized first transition nonlinear weight coefficient, is the nonlinear weight coefficient of the combination polynomial before normalization, and ε1 is a small amount to avoid the denominator being zero.
[0040] Furthermore, the expression of the first nonlinear weight in step S133 is as follows:
[0041]
[0042] in, is the first nonlinear weight coefficient, ω1, ω2, ω3 are the first transition nonlinear weight coefficients.
[0043] Furthermore, the process of step S2 includes the following:
[0044] S21, the difference layer accepts the five-point template node value as the input feature value, standardizes the input feature, and obtains the multi-resolution derivative feature value of the standardized input feature value. The difference layer process is as follows:
[0045] Given the input feature value x0 of the five-point template = [u j-2 ,u j-1 ,u j ,u j+1 ,u j+2 ] T , and standardize it. The expression is as follows:
[0046] x0′=Norm(x0)
[0047] Then use the fully connected layer with unbiased fixed weights and the absolute value activation function to obtain its multi-resolution derivative eigenvalues. The expression is as follows:
[0048]
[0049] Among them, W d represents the fixed weight of the difference layer, x1 represents the multi-resolution derivative eigenvalue, and x0′ represents the standardized input eigenvalue;
[0050] S22, the hidden layer includes a fully connected layer for increasing feature dimensions and a plurality of residual connection layers for feature extraction; the fully connected layer accepts the multi-resolution derivative features as input, the residual connection layer performs layer normalization on the input features, and then uses the fully connected layer for nonlinear transformation, and finally uses a jump connection to add the input features of the residual connection layer and the nonlinear transformation results to form the output of the residual connection layer;
[0051] S23, the output layer is a fully connected layer using a Softmax activation function, and its output feature dimension is 3-dimensional, which is used to convert high-dimensional features into second transition nonlinear weights;
[0052] S24, the targeting layer truncates the second transition nonlinear weight and renormalizes it to obtain the second nonlinear weight. The targeting layer process is as follows:
[0053]
[0054] in, Represents the second nonlinear weight coefficient of the neural network model output, Represents the second transition nonlinear weight coefficient of the neural network model output, ψ k represents the first cutoff function, C T1 represents the first cutoff threshold;
[0055] S25, the loss function includes label constraints, multi-resolution sub-template linear weight constraints and regularization terms, and its expression is as follows:
[0056]
[0057]
[0058]
[0059]
[0060] in, represents the total loss function, represents the label constraint loss function, represents the multi-resolution sub-template linear weight constraint loss function, represents the L2 norm weight decay regularization term, β d and β W represents the weight parameter, N u Indicates the number of samples that the current batch needs to constrain with half-node labels. represents the half-node prediction solution of the s-th sample in the current batch, represents the half-node reference solution of the s-th sample in the current batch, represents the kth second nonlinear weight of the sth sample in the current batch, represents the interpolation solution of the k-th multi-resolution sub-template of the s-th sample in the current batch, N d Indicates the number of samples that the current batch needs to constrain with multi-resolution sub-template linear weights. represents the kth first nonlinear weight of the sth sample in the current batch, represents the second cutoff function, C T2 Represents the second cutoff threshold, and N represents the total number of samples in the current batch.
[0061] Furthermore, the specific steps of step S3 are as follows:
[0062] S31, saving the trained model to replace the original nonlinear interpolation step in the hybrid format of data-driven optimization;
[0063] S32. Use hybrid format to verify accuracy after data-driven optimization, analyze approximate dispersion relations, and simulate flow fields.
[0064] Compared with the prior art, the present invention has the following beneficial effects:
[0065] The present invention utilizes a neural network optimization method to improve the performance of the fifth-order multi-resolution WCNS format, while ensuring the error convergence accuracy, providing better shock wave capture capability and lower dispersion dissipation properties, with higher resolution and comparable computational cost, and can avoid the problem of negative weights, which helps to provide a more efficient tool for the study of complex flow phenomena and aircraft design optimization. BRIEF DESCRIPTION OF THE DRAWINGS
[0066] Figure 1 It is a technical roadmap for one embodiment of the present invention;
[0067] Figure 2 is a sinx function interpolation error convergence curve diagram of an embodiment of the present invention;
[0068] Figure 3 is a dispersion curve comparison diagram of an embodiment of the present invention;
[0069] Figure 4 is a dissipation curve comparison diagram of an embodiment of the present invention;
[0070] Figure 5 is a Lax shock tube density distribution curve diagram with a grid point number of 50 according to an embodiment of the present invention;
[0071] Figure 6 is a Lax shock tube density distribution curve diagram with a grid point number of 400 according to an embodiment of the present invention;
[0072] Figure 7 is a Sod shock tube density distribution curve diagram with a grid point number of 100 according to an embodiment of the present invention;
[0073] Figure 8is a Sod shock tube density distribution curve diagram with a grid point number of 200 according to an embodiment of the present invention;
[0074] Fig. 9 is a Shu-Osher density distribution curve diagram with 200 grid points according to an embodiment of the present invention;
[0075] Fig.10 is a Shu-Osher density distribution curve diagram with 400 grid points according to an embodiment of the present invention;
[0076] Fig.11 is a Titarev-Toro density distribution curve diagram with a grid point number of 800 according to an embodiment of the present invention;
[0077] Fig.12 is a Titarev-Toro density distribution curve diagram with a grid point number of 1200 according to an embodiment of the present invention;
[0078] Fig.13 is a Woodward–Colella density distribution curve diagram with a grid point number of 400 according to an embodiment of the present invention;
[0079] Fig.14 It is a Woodward–Colella density distribution curve diagram with 800 grid points according to an embodiment of the present invention. DETAILED DESCRIPTION
[0080] Embodiments of the present invention are described in detail below. The embodiments are exemplary and intended to be used to explain the present invention, but should not be construed as limiting the present invention.
[0081] In a data-driven fifth-order multi-resolution WCNS format construction method of the present invention, a neural network optimization method is used to improve the performance of the fifth-order multi-resolution WCNS format, while ensuring the error convergence accuracy, providing better shock wave capture capability and lower dispersion dissipation properties, having higher resolution and comparable computational cost, and avoiding the problem of negative weights.
[0082] like Figure 1 As shown in FIG. 1 , a data-driven five-order multi-resolution WCNS format construction method is divided into three stages, specifically including the following steps:
[0083] S1. constructing and optimizing a sample data set related to a fifth-order multi-resolution WCNS format interpolation process based on a smooth function and a discontinuous function with an analytical expression, wherein the sample data set includes a five-point template node value, a half-node reference solution, and a first nonlinear weight of a multi-resolution sub-template interpolation solution;
[0084] S2. Based on the MLP neural network, a training verification network suitable for multi-resolution sub-templates is constructed and a training model is trained. The model takes the five-point template node values of the sample data set as input, passes through a difference layer, a feature extraction layer, an output layer and a targeting layer in sequence, and finally outputs a second nonlinear weight of the multi-resolution sub-template interpolation solution. The half-node reference solution corresponding to the template node value and the first nonlinear weight are used to construct a loss function for constraint training;
[0085] S3. Use the trained model to replace the interpolation process of the fifth-order multi-resolution WCNS, build a hybrid format for data-driven optimization and use it.
[0086] According to an embodiment of the present invention, the step S1 constructs and optimizes a sample data set related to a fifth-order multi-resolution WCNS format interpolation process based on a smooth function and a discontinuous function with an analytical expression, specifically including:
[0087] S11, using equally spaced discrete grids on one-dimensional smooth functions and one-dimensional discontinuous functions to obtain five-point template node values in a fifth-order multi-resolution WCNS format, and the obtained template node values will be used as input features of the subsequent neural network model;
[0088] S12, constructing a half-node reference solution corresponding to the obtained five-point template node value, and the obtained reference solution will be used as the true value label of the subsequent constrained neural network model;
[0089] S13. Use the multi-resolution features to construct the nonlinear weight of the multi-resolution sub-template interpolation solution corresponding to the five-point template. This nonlinear weight is the first nonlinear weight. The obtained first nonlinear weight is used to assist in constraining the neural network model.
[0090] The one-dimensional smooth function in step S11 includes a polynomial function, a Gaussian function, a hyperbolic tangent function, a trigonometric function, an exponential function and a combination thereof, and the one-dimensional discontinuous function includes a step function and a Relu function.
[0091] In this embodiment, the one-dimensional smooth function and the discontinuous function are shown in Table 1, and there is no need to use a simple sine function:
[0092] Table 1
[0093]
[0094] B represents Bernoulli distribution, select the equidistant template node coordinate group Calculate the template node value and use the half-node coordinate 1 / 4 to assist in calculating the half-node reference value.
[0095] In this embodiment, when the five-point template node values in step S12 are constructed using a smooth function, the five-point Lagrangian polynomial interpolation method is used to obtain the interpolation solution of the template at the half node. As a semi-node reference solution;
[0096] When using discontinuous function construction, a reference solution with upwind properties is constructed according to the discontinuous position. The specific method is: if the discontinuous position is between the first node and the second node or between the fourth node and the fifth node, then the function value u is obtained at the half node between the third node and the fourth node. j+1 / 2 =f(x j+1 / 2 ) is used as the reference solution. If the discontinuity is between the second and fourth nodes, the value u of the third node is j+1 / 2 =u j As a reference solution;
[0097] Among them, u j-2 ,u j-1 ,u j ,u j+1 ,u j+2 Respectively represent the first, second, third, fourth, and fifth node values of the five-point template, u j+1 / 2 is the reference solution of the five-point template at the half node, x j+1 / 2 represents the half-node coordinates, and f(x) represents the constructed one-dimensional function.
[0098] Preferably, the constructed smooth data and discontinuous data are combined to construct more complex data with discontinuous properties, that is, the template node value constructed by any smooth function is added to the template node value constructed by any discontinuous function, and their corresponding half-node reference solutions are also added.
[0099] In step S13, the multi-resolution sub-template is composed of S1={u j},S2={u j-1 ,u j ,u j+1}, S3={u j-2 ,u j-1 ,u j ,u j+1 ,u j+2} consists of three sub-templates, S1, S2, S3 represent three sub-templates composed of different template nodes, and the multi-resolution sub-template interpolation solution is the interpolation solution of the three multi-resolution sub-templates at the half-nodes, and its specific expression is as follows:
[0100]
[0101] Among them, q1, q2, q3 represent the interpolation solutions of multi-resolution sub-templates S1, S2, S3 respectively;
[0102] The first nonlinear weight is composed of a nonlinear weight coefficient The calculation steps are as follows:
[0103] S131, calculating three smoothness indicators and a global smoothness indicator using derivative information;
[0104] S132, using the smoothness indicator and the global smoothness indicator to calculate the nonlinear weight of the combined polynomial, where the nonlinear weight is the first transition nonlinear weight;
[0105] S133: Calculate a first nonlinear weight using the first transition nonlinear weight.
[0106] Furthermore, in step S131, the smoothness indicators are β1, β2, β3, and the global smoothness indicator is τ;
[0107] The expression of the smoothness indicator β1 is as follows:
[0108]
[0109] in, σ=σ0+σ1,ζ0=(u j -u j-1 ) 2 γ 1,1 =1-γ 0,1 ,
[0110] σ,σ0,σ1,ζ0,ζ1,γ 0,1 ,γ 1,1 , They are all intermediate variables in the calculation process, and ε0 is a small amount to avoid the denominator being 0;
[0111] The expressions of the smoothness indicators β2 and β3 are as follows:
[0112]
[0113] in, represents the n-th order derivative value of the second sub-template S2 at the middle node, It represents the n-th order derivative value of the third sub-template S3 at the middle node. The specific expression is as follows:
[0114]
[0115] The expression of the global smoothness indicator τ is as follows:
[0116]
[0117] Furthermore, in step S132, the first transition nonlinear weight is composed of nonlinear weight coefficients ω1, ω2, ω3, and the expression thereof is as follows:
[0118]
[0119] Among them, ω k represents the normalized first transition nonlinear weight coefficient, is the nonlinear weight coefficient of the combination polynomial before normalization, and ε1 is a small amount to avoid the denominator being zero.
[0120] Furthermore, the expression of the first nonlinear weight in step S133 is as follows:
[0121]
[0122] in, is the first nonlinear weight coefficient, ω1, ω2, ω3 are the first transition nonlinear weight coefficients.
[0123] Furthermore, the process of step S2 includes the following:
[0124] S21, the difference layer accepts the template node value of the five-point template as an input feature, standardizes the input feature to eliminate scale dependence, and obtains the multi-resolution derivative feature of the standardized input feature. The difference layer process is as follows:
[0125] Given the input feature value x0=u of the five-point template j-2 ,u j-1 ,u j ,u j+1 ,u j+2 T , and standardize it. The expression is as follows:
[0126] x0′=Norm(x0)
[0127] Then use the fully connected layer with unbiased fixed weights and the absolute value activation function to obtain its multi-resolution derivative eigenvalues. The expression is as follows:
[0128] x1=|W d x0′|,
[0129] Among them, W d represents the fixed weight of the difference layer, x1 represents the multi-resolution derivative eigenvalue, which is the output result of the difference layer, and x0′ represents the standardized input feature;
[0130] S22, the hidden layer includes a fully connected layer for increasing feature dimensions, and the number of residual connection layers for feature extraction is 3 layers; the input and output feature dimensions of the residual connection layer are both 64 dimensions, and the activation function used is ReLU. The fully connected layer accepts the multi-resolution derivative features as input, the residual connection layer performs layer normalization on the input features, and then uses the fully connected layer nonlinear transformation, and finally uses the jump connection to add the input features of the residual connection layer and the nonlinear transformation results to form the output of the residual connection layer;
[0131] The specific normalization expression is as follows:
[0132]
[0133] Among them, y represents the output of the LayerNorm layer, x represents the input of the LayerNorm layer, μ represents the mean of x, σ 2 represents the variance of x, ε3 represents a very small positive number to ensure that the denominator will not be zero, γ represents a learnable scaling parameter, and β represents a learnable offset parameter;
[0134] S23, the output layer is a fully connected layer using a Softmax activation function, and its output feature dimension is 3-dimensional, which is used to convert high-dimensional features into second transition nonlinear weights;
[0135] S24, the targeting layer appropriately truncates the second transition nonlinear weight and renormalizes it to obtain the second nonlinear weight, so as to enhance the shock wave capture capability and ensure the error convergence characteristic. The targeting layer process is specifically as follows:
[0136]
[0137] in, Represents the second nonlinear weight coefficient of the neural network model output, Represents the second transition nonlinear weight coefficient of the neural network model output, ψ k represents the first cutoff function, C T1 represents the first cutoff threshold. In this embodiment, the first cutoff threshold used is C T1 =10 -3 .
[0138] S25, the loss function includes label constraints, multi-resolution sub-template linear weight constraints and regularization terms, and its expression is as follows:
[0139]
[0140]
[0141]
[0142]
[0143] in, represents the total loss function, represents the label constraint loss function, represents the multi-resolution sub-template linear weight constraint loss function, represents the L2 norm weight decay regularization term, β d and β W represents the weight parameter, N u Indicates the number of samples that the current batch needs to constrain with half-node labels. represents the half-node prediction solution of the s-th sample in the current batch, represents the half-node reference solution of the s-th sample in the current batch, represents the kth second nonlinear weight of the sth sample in the current batch, represents the interpolation solution of the k-th multi-resolution sub-template of the s-th sample in the current batch, N d Indicates the number of samples that the current batch needs to constrain with multi-resolution sub-template linear weights. represents the kth first nonlinear weight of the sth sample in the current batch, represents the second cutoff function, C T2 represents the second cutoff threshold, and N represents the total number of samples in the current batch. In this embodiment, the value of the weight parameter is β d =1,β W =10 -4 The second cutoff threshold is C T2 =10 -3 , the batch size is 512, using the Adam optimizer and the learning rate lr = 10 -4 Training is performed until the loss function converges.
[0144] According to an embodiment of the present invention, the specific steps of step S3 are as follows:
[0145] S31. Save the trained model to replace the original nonlinear interpolation step in the data-driven optimized hybrid format; in this implementation, a fifth-order multi-resolution WCNS hybrid format is used, which consists of interpolation, flux, difference and time advancement methods. The interpolation step is completed using the neural network model trained in this implementation method, and the remaining steps are completed using traditional numerical methods.
[0146] S32. Use a hybrid format to perform accuracy verification, approximate dispersion relation analysis and flow field simulation after data-driven optimization, and execute the solver to obtain local flow field solutions, call the model for prediction, and perform nonlinear weighting and subsequent solver flow field updates.
[0147] In order to further illustrate the beneficial effects of the present invention, further description is given in conjunction with specific embodiments and drawings.
[0148] Example 1
[0149] Verification of interpolation accuracy: The interpolation accuracy of the hybrid format WCNS5-MR-NN is verified using the sin(x) function, and compared with the linear format WCNS5-Linear, the classic nonlinear format WCNS5-Z, and the multi-resolution format WCNS5-MR. The infinite norm error convergence curve is shown in Figure 2 As shown, it can be seen that although sin(x) is not used for model training, WCNS5-MR-NN still has stable fifth-order interpolation accuracy on sin(x).
[0150] Example 2
[0151] Verification of dispersion properties: The approximate dispersion relation is used to analyze and compare the hybrid format WCNS5-MR-NN, the linear format WCNS5-Linear, the classic nonlinear format WCNS5-Z and the multi-resolution format WCNS5-MR. The dispersion curves are shown in the figure below. Figure 3 As shown, the dissipation curve is as follows Figure 4 As shown, it can be seen that WCNS5-MR-NN has the dispersion-dissipative property that approximates the linear format.
[0152] Example 3
[0153] The results of the hybrid format WCNS5-MR-NN and the multi-resolution format WCNS5-MR in solving the Lax shock tube problem are compared. The reference solution is obtained by WCNS5-Z with a grid number of 10,000.
[0154] Solve the Lax shock tube problem at the end time t = 0.15 with the following initial conditions
[0155]
[0156] The density distribution curves of the calculation results with 50 and 400 grid points are shown in the figure below. Figures 5-6 As shown, it can be seen that under coarser and finer grids, WCNS5-MR-NN has higher resolution for solving Lax problems and can suppress the non-physical oscillation problem that occurs when solving the WCNS5-MR format.
[0157] Example 4
[0158] The results of the hybrid format WCNS5-MR-NN and the multi-resolution format WCNS5-MR in solving the Sod shock tube problem are compared, where the reference solution is obtained by WCNS5-Z with a grid number of 1000.
[0159] The Sod shock tube problem to be solved ends at time t = 0.2 with the following initial conditions
[0160]
[0161] The density distribution curves of the calculation results with 100 and 200 grid points are shown in the figure below. Figures 7-8 As shown, it can be seen that under coarser and finer grids, WCNS5-MR-NN has higher resolution for solving the Sod problem and can suppress the non-physical oscillation problem that occurs when solving the WCNS5-MR format.
[0162] Example 5
[0163] The results of the hybrid format WCNS5-MR-NN and the multi-resolution format WCNS5-MR in solving the Shu-Osher problem are compared, where the reference solution is calculated by WCNS5-Z with a grid number of 10,000.
[0164] The Shu-Osher problem solved ends at time t = 1.8. This problem involves the interaction between shock waves and density waves and has the following initial conditions:
[0165]
[0166] The density distribution curves of the calculation results with 200 and 400 grid points are shown in the figure below. Figures 9-10 As shown, it can be seen that under both grids, WCNS5-MR-NN can better capture high-frequency waves when solving the Shu-Osher problem.
[0167] Example 6
[0168] The results of the hybrid format WCNS5-MR-NN and the multi-resolution format WCNS5-MR in solving the Titarev-Toro problem are compared, where the reference solution is calculated by WCNS5-MR with a grid number of 10,000.
[0169] The Titarev-Toro problem solved ends at time t = 4.0. This problem has both shock waves and extremely high-frequency physical oscillations, with the following initial conditions:
[0170]
[0171] The density distribution curves of the calculation results with 800 and 1200 grid points are shown in Figures 11-12 As shown, it can be seen that under both grids, WCNS5-MR-NN can better capture high-frequency waves when solving the Titarev-Toro problem.
[0172] Example 7
[0173] Comparison of the results of the hybrid format WCNS5-MR-NN and the multi-resolution format WCNS5-MR in solving the Woodward–Colella problem, where the reference solution is calculated by WCNS5-MR with a grid number of 10,000.
[0174] Solve the Woodward–Colella blast wave problem for the time t = 0.038, which involves the time-dependent interaction between two shock waves caused by an initial pressure gradient, with the following initial conditions:
[0175]
[0176] The density distribution curves of the calculation results with 400 and 800 grid points are shown in Figures 13-14 As shown, it can be seen that under both grids, WCNS5-MR-NN has a higher resolution for solving the Woodward–Colella problem.
[0177] Those skilled in the art will appreciate that the embodiments described herein are intended to help readers understand the principles of the present invention, and should be understood that the protection scope of the present invention is not limited to such specific statements and embodiments. Those skilled in the art can make various other specific variations and combinations that do not deviate from the essence of the present invention based on the technical revelations disclosed by the present invention, and these variations and combinations are still within the protection scope of the present invention.
Claims
1. A data-driven fifth-order multi-resolution WCNS format construction method, characterized by: The following steps are involved: S1. Based on smooth functions and discontinuous functions with analytical expressions, a sample data set in a fifth-order multi-resolution WCNS format is constructed and optimized, wherein the sample data set includes a five-point template node value, a half-node reference solution, and a first nonlinear weight of a multi-resolution sub-template interpolation solution; S2. Based on the MLP neural network, a training verification network suitable for multi-resolution sub-templates is constructed and a training model is trained. The model takes the five-point template node values as input, passes through the difference layer, feature extraction layer, output layer and targeting layer in sequence, and finally outputs the second nonlinear weight of the multi-resolution sub-template interpolation solution, and constructs a loss function for constraint training; S3. Use the trained model to replace the interpolation process of the fifth-order multi-resolution WCNS, build a hybrid format for data-driven optimization and use it.
2. According to claim 1, a data-driven fifth-order multi-resolution WCNS format construction method is characterized by: The sample data set in step S1 specifically includes: S11, using equally spaced discrete grids on one-dimensional smooth functions and one-dimensional discontinuous functions to obtain five-point template node values in a fifth-order multi-resolution WCNS format; S12, constructing a half-node reference solution corresponding to the obtained five-point template node value; S13. Constructing a first nonlinear weight of a multi-resolution sub-template interpolation solution corresponding to the five-point template using the multi-resolution feature.
3. The data-driven fifth-order multi-resolution WCNS format construction method according to claim 2, characterized in that: When the five-point template node values in step S12 are constructed using a smooth function, the five-point Lagrangian polynomial interpolation method is used to obtain the interpolation solution of the template at the half node. As a semi-node reference solution; When using discontinuous function construction, a reference solution with upwind properties is constructed according to the discontinuous position. The specific method is: if the discontinuous position is between the first node and the second node or between the fourth node and the fifth node, then the function value u is obtained at the half node between the third node and the fourth node. j+1 / 2 =f(x j+1 / 2 ) as the reference solution. If the discontinuity is between the second and fourth nodes, then the value u of the third node is j+1 / 2 =u j As a reference solution; Among them, u j-2 ,u j-1 ,u j ,u j+1 ,u j+2 Respectively represent the first, second, third, fourth, and fifth node values of the five-point template, u j+1 / 2 is the reference solution of the five-point template at the half node, x j+1 / 2 represents the half-node coordinates, and f(x) represents the constructed one-dimensional function.
4. The data-driven fifth-order multi-resolution WCNS format construction method according to claim 2, characterized in that: In step S13, the multi-resolution sub-template is composed of S1={u j },S2={u j-1 ,u j ,u j+1 }, S3={u j-2 ,u j-1 ,u j ,u j+1 ,u j+2 The multi-resolution sub-template interpolation solution is the interpolation solution of the three sub-templates at the half-nodes. The first nonlinear weight is composed of the nonlinear weight coefficient The calculation steps are as follows: S131, using derivative information to calculate three smoothness indicators and a global smoothness indicator, the smoothness indicators are β1, β2, β3, and the global smoothness indicator is τ; The smoothness indicator β1 is expressed as follows: Among them, σ=σ0+σ1,ζ0=(u j -u j-1 ) 2 ζ1=(u j+1 -u j ) 2 , They are all intermediate variables in the calculation process; The expressions of the smoothness indicators β2 and β3 are as follows: in, represents the n-th order derivative value of the second sub-template S2 at the middle node, represents the n-th order derivative value of the third sub-template S3 at the middle node; The expression of the global smoothness indicator τ is as follows: S132, using a smoothness indicator and a global smoothness indicator to calculate a first transition nonlinear weight of the combined polynomial, wherein the first transition nonlinear weight is composed of nonlinear weight coefficients ω1, ω2, ω3, and the expression thereof is as follows: Among them, ω k represents the normalized first transition nonlinear weight coefficient, is the nonlinear weight coefficient of the combined polynomial before normalization; S133: Calculate a first nonlinear weight using the first transition nonlinear weight.
5. The data-driven fifth-order multi-resolution WCNS format construction method according to claim 4, characterized in that: The expression of the first nonlinear weight in step S133 is as follows: in, is the first nonlinear weight coefficient, ω1, ω2, ω3 are the first transition nonlinear weight coefficients.
6. The data-driven fifth-order multi-resolution WCNS format construction method according to claim 1, characterized in that: The process of step S2 includes the following: S21, the difference layer accepts the five-point template node value as the input feature value, standardizes the input feature, and obtains the multi-resolution derivative feature value of the standardized input feature value. The difference layer process is as follows: Given the input feature value x0 of the five-point template = [u j-2 ,u j-1 ,u j ,u j+1 ,u j+2 ] T , and standardize it. The expression is as follows: x0′=Norm(x0) Then use the fully connected layer with unbiased fixed weights and the absolute value activation function to obtain its multi-resolution derivative eigenvalues. The expression is as follows: Among them, W d represents the fixed weight of the difference layer, x1 represents the multi-resolution derivative eigenvalue, and x0′ represents the standardized input eigenvalue; S22, the hidden layer includes a fully connected layer for increasing feature dimensions and a plurality of residual connection layers for feature extraction; the fully connected layer accepts the multi-resolution derivative features as input, the residual connection layer performs layer normalization on the input features, and then uses the fully connected layer for nonlinear transformation, and finally uses a jump connection to add the input features of the residual connection layer and the nonlinear transformation results to form the output of the residual connection layer; S23, the output layer is a fully connected layer using a Softmax activation function, and its output feature dimension is 3-dimensional, which is used to convert high-dimensional features into second transition nonlinear weights; S24, the targeting layer truncates the second transition nonlinear weight and renormalizes it to obtain the second nonlinear weight. The targeting layer process is as follows: in, Represents the second nonlinear weight coefficient of the neural network model output, Represents the second transition nonlinear weight coefficient of the neural network model output, ψ k represents the first cutoff function, C T1 represents the first cutoff threshold; S25, the loss function includes label constraints, multi-resolution sub-template linear weight constraints and regularization terms, and its expression is as follows: in, represents the total loss function, represents the label constraint loss function, represents the multi-resolution sub-template linear weight constraint loss function, represents the L2 norm weight decay regularization term, β d and β W represents the weight parameter, N u Indicates the number of samples that the current batch needs to constrain with half-node labels. represents the half-node prediction solution of the s-th sample in the current batch, represents the half-node reference solution of the s-th sample in the current batch, represents the kth second nonlinear weight of the sth sample in the current batch, represents the interpolation solution of the k-th multi-resolution sub-template of the s-th sample in the current batch, N d Indicates the number of samples that the current batch needs to constrain with multi-resolution sub-template linear weights. represents the kth first nonlinear weight of the sth sample in the current batch, represents the second cutoff function, C T2 Represents the second cutoff threshold, and N represents the total number of samples in the current batch.