Compressible flow simulation method based on variable-length template WENO format and related equipment
By adopting the WENO format based on variable-length template in numerical simulation, the problem of insufficient numerical stability when multiple shock waves are approaching each other is solved, and high-precision and efficient compressible flow simulation is achieved, which improves the safety and reliability of the design.
Patent Information
- Application Number
- CN202411509215.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-28
- Publication Date
- 2025-03-25
AI Technical Summary
The prior art cannot achieve good numerical stability when multiple shock waves are approaching each other, resulting in the inability to accurately perform numerical simulation of compressible multi-media flow.
Using the WENO format based on the variable-length template, the geometric model is finely meshed, the appropriate time step is determined, and the spatial discretization and time integration methods are simulated until a predetermined number of iterations is reached to obtain the target flow field information.
The accuracy and efficiency of numerical simulation of compressible flow problems are improved, and the accuracy of numerical simulation is achieved, which is conducive to predicting the performance of physical structures with compressible flow problems and ensuring the safety and reliability of the design.
Smart Images

Figure CN119691828A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of fluid mechanics, and in particular to a compressible flow simulation method based on a variable-length template WENO format and related equipment. Background Art
[0002] In the field of aerospace, accurate simulation of compressible multi-media flow problems is crucial for predicting the performance of physical structures such as aircraft and engines. Numerical simulation methods need to pay special attention to numerical dissipation and non-physical oscillation problems at the interface. The researchers have successfully applied it to the numerical simulation of large deformation flows of compressible multi-media and turbulent mixing induced by interface instability.
[0003] At present, the compressible multi-media flow problem is mainly dealt with by constructing a high-precision Euler numerical method with low dissipation and basically no numerical oscillation. However, this method cannot achieve good numerical stability when multiple shock waves are close to each other, there are high density ratio discontinuities and strong shock waves, and thus cannot accurately perform numerical simulations. Summary of the invention
[0004] The present application proposes a compressible flow simulation method and related equipment based on a variable-length template WENO format to improve the accuracy of numerical simulation of compressible flow problems.
[0005] In a first aspect, a compressible flow simulation method based on a variable length template WENO format is provided, comprising:
[0006] Meshing the geometric model of the compressible flow simulation object to obtain the computational domain;
[0007] Calculating an initial time step of the computational domain based on initial flow field information;
[0008] Performing spatial discretization on the control equation corresponding to the computational domain;
[0009] Performing time advancement based on a time integration method, wherein the time advancement represents a process in which the initial flow field information changes based on a change in the initial time step;
[0010] In the process of advancing the time, when the number of time iterations meets a preset condition, the target flow field information is determined;
[0011] The target flow field information is analyzed, and a design optimization strategy for the geometric model is generated based on the analysis result.
[0012] In a second aspect, a compressible flow simulation device based on a variable length template WENO format is provided, comprising:
[0013] A partitioning module is used to perform mesh partitioning on the geometric model of the compressible flow simulation object to obtain a calculation domain;
[0014] A first calculation module, used for calculating an initial time step of the calculation domain based on initial flow field information;
[0015] A discretization module, used for spatially discretizing the control equation corresponding to the computational domain;
[0016] An advancement module, configured to perform time advancement based on a time integration method, wherein the time advancement represents a process in which the initial flow field information changes based on a change in the initial time step;
[0017] A determination module, used for determining target flow field information when the number of time iterations meets a preset condition during the time advancement process;
[0018] A generation module is used to analyze the target flow field information and generate a design optimization strategy for the geometric model based on the analysis results.
[0019] Optionally, in some embodiments of the present application, the discretization module includes:
[0020] A first calculation submodule, used for calculating the smoothing factor based on the Jacobian matrix of the feature space and the initial flow field information corresponding to the current initial time step;
[0021] A first discretization submodule, configured to perform spatial discretization on the numerical flux of the control equation in the feature space based on a linear upwind format if the smoothness factor is less than and equal to a smoothness threshold;
[0022] The second discretization submodule is used for spatially discretizing the numerical flux of the control equation in the feature space based on the shock wave capture format if the smoothness factor is greater than the smoothness threshold.
[0023] Optionally, in some embodiments of the present application, the second discretization submodule includes:
[0024] A splitting unit, used for splitting the numerical flux of the control equation in the feature space based on a preset format candidate template to obtain a numerical flux corresponding to each format candidate template;
[0025] A discretization unit is used to perform spatial discretization based on the numerical flux corresponding to each of the format candidate templates and the right eigenvector of the Jacobian matrix corresponding to the feature space.
[0026] Optionally, in some embodiments of the present application, the device further includes:
[0027] The second calculation module is used to calculate the smoothness threshold based on the spatial length of the calculation domain and the characteristic length of the geometric model.
[0028] Optionally, in some embodiments of the present application, the propulsion module includes:
[0029] A construction submodule, used to construct conservation variable update equations based on the semi-discrete form of the control equations;
[0030] The advancement submodule is used to perform time advancement based on the time integration method and the conservation variable update equation.
[0031] Optionally, in some embodiments of the present application, the initial flow field information includes the maximum flow field velocity, spatial step length and sound speed of the calculation domain, and the first calculation module includes:
[0032] The second calculation submodule is used to calculate the initial time step based on the maximum velocity of the flow field, the space step and the sound speed.
[0033] Optionally, in some embodiments of the present application, the control equation includes physical variables and conservation variables; and the discretization module includes:
[0034] A mapping submodule, used for mapping the physical variables and the conserved variables to a feature space;
[0035] The third discretization submodule is used to spatially discretize the numerical flux of the control equation in the characteristic space.
[0036] In a third aspect, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned compressible flow simulation method based on the variable-length template WENO format when executing the computer program.
[0037] In a fourth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned compressible flow simulation method based on the variable-length template WENO format are implemented.
[0038] The present application provides a compressible flow simulation method and related equipment based on a variable length template WENO format, by meshing the geometric model of the compressible flow simulation object to obtain a computational domain; calculating the initial time step of the computational domain based on the initial flow field information; spatially discretizing the control equation corresponding to the computational domain; advancing time based on a time integration method, wherein the time advancement represents the process in which the initial flow field information changes based on the change of the initial time step; in the process of advancing time, when the number of time iterations meets a preset condition, determining the target flow field information; analyzing the target flow field information, and generating a design optimization strategy for the geometric model based on the analysis result. In the compressible flow simulation scheme based on the variable length template WENO format provided in the present application, the geometric model is finely meshed to ensure the accuracy of the computational domain, the appropriate time step is determined based on the initial flow field conditions, the control equation is converted into a numerical form that can be solved on the computational domain by a spatial discretization method, and the simulation is advanced by a time integration method until a predetermined number of iterations is reached to obtain the target flow field information, and the corresponding design optimization strategy is output by analyzing the target flow field information. It can be seen that the control equations are converted into numerical forms that can be solved in the computational domain through the spatial discretization method, and the time integration method is used to advance the simulation, which improves the accuracy and efficiency of the numerical simulation of compressible flow problems and the correctness of the numerical simulation, which is beneficial to predict the performance of physical structures with compressible flow problems, so as to improve the design of the physical structure and ensure the safety and reliability of the design. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0040] Figure 1 An application environment diagram of the compressible flow simulation method based on the variable length template WENO format provided in an embodiment of the present application;
[0041] Figure 2 A flow chart of a compressible flow simulation method based on a variable length template WENO format provided in an embodiment of the present application;
[0042] Figure 3 A schematic diagram of the structure of the format candidate template provided in the embodiment of the present application;
[0043] Figure 4 A schematic diagram of numerical simulation results provided in an embodiment of the present application;
[0044] Figure 5 A structural block diagram of a compressible flow simulation device based on a variable length template WENO format provided in an embodiment of the present application;
[0045] Figure 6 A structural block diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0046] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0047] In addition, described feature, structure or characteristic can be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present application. However, those skilled in the art will appreciate that the technical scheme of the present application can be put into practice without one or more of the specific details, or other methods, components, devices, steps, etc. can be adopted. In other cases, known methods, devices, realizations or operations are not shown or described in detail to avoid blurring the various aspects of the application.
[0048] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0049] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.
[0050] The compressible flow simulation method based on the variable length template WENO format provided by the embodiment of the present invention can be applied in the following aspects: Figure 1In the application environment. The computer device 110 communicates with the server 120 through the network 130. The computer device 110 can mesh the geometric model of the compressible flow simulation object to obtain a calculation domain; calculate the initial time step of the calculation domain based on the initial flow field information; perform spatial discretization on the control equation corresponding to the calculation domain; advance the time based on the time integration method, wherein the time advancement represents the process in which the initial flow field information changes based on the change of the initial time step; in the process of the time advancement, when the number of time iterations meets the preset conditions, determine the target flow field information; analyze the target flow field information, and generate the design optimization strategy of the geometric model based on the analysis results, and display it through the computer device 110. In the present invention, the geometric model is finely meshed to ensure the accuracy of the calculation domain, the appropriate time step is determined based on the initial flow field conditions, the control equation is converted into a numerical form that can be solved on the calculation domain by the spatial discretization method, and the simulation is advanced by the time integration method until the predetermined number of iterations is reached to obtain the target flow field information, and the corresponding design optimization strategy is output by analyzing the target flow field information. It can be seen that the control equation is converted into a numerical form that can be solved in the computational domain by the spatial discretization method, and the time integration method is used to advance the simulation, which improves the accuracy and efficiency of the numerical simulation of the compressible flow problem, improves the correctness of the numerical simulation, and is conducive to predicting the performance of the physical structure with the compressible flow problem, so as to improve the design of the physical structure and ensure the safety and reliability of the design. Among them, the computer device 110 can be, but is not limited to, various smart phones 110-1, tablet computers 110-2 and laptop computers 110-3. The present invention is described in detail below through specific embodiments.
[0051] See also Figure 2 As shown, Figure 2 A flow chart of a compressible flow simulation method based on a variable length template WENO format provided in an embodiment of the present invention. The method can be applied to both a terminal and a server. This embodiment is illustrated by applying to a server. The compressible flow simulation method based on a variable length template WENO format includes the following steps:
[0052] S101: Meshing a geometric model of a compressible flow simulation object to obtain a calculation domain.
[0053] A compressible flow simulation object may be an object in which the density of the fluid changes significantly due to changes in pressure and temperature in an environment with high-speed flow or significant pressure changes. The object may include flow phenomena in the fields of high-speed aircraft, jet engines, rockets, space flight, ballistics, combustion, gas turbines, ramjet engines, etc. The geometric model of a compressible flow simulation object may be the shape and structure of an object used to simulate compressible flow phenomena. The geometric model of a compressible flow simulation object may be a simplification or abstraction of an actual object, used to represent the space where the flow occurs in a computational fluid dynamics (CFD) simulation.
[0054] The computational domain can be a physical space region where compressible flow problems are numerically simulated. The computational domain includes initial conditions and boundary conditions. Initial conditions refer to the known distribution of physical quantities (such as velocity, pressure, temperature, concentration, etc.) at each point in the entire computational domain at the beginning of the simulation (usually time t=0). The initial conditions provide the starting state for the numerical simulation and are the basis for time advancement. For example, the initial flow field information includes preset velocity, pressure, temperature, heat, resistance and other information. Boundary conditions refer to physical conditions imposed on the boundary of the computational domain, which define the behavior of physical quantities on the boundary of the computational domain during the numerical simulation. For example, the initial conditions may include: the velocity distribution of the fluid at the inlet (such as the velocity of each grid cell). The initial pressure and temperature distribution in the computational domain. The boundary conditions can be specifically set as: velocity and temperature at the inlet (Dirichlet condition). Pressure at the outlet (Neumann condition). The wall may be set to a no-slip condition (Dirichlet condition) or a specified heat flux (Neumann condition).
[0055] Specifically, a geometric model of a compressible flow simulation object can be created using computer-aided design software (such as CAD), the geometric model can be imported into a mesh generation tool such as Gridgen, and the mesh scale can be set. Δx,Δy The size of the fluid is , and the geometric model is spatially discretized using an orthogonal structured grid. The initial and boundary conditions are set according to the flow physics (i.e., the initial conditions), thereby obtaining the computational domain.
[0056] S102: Calculating an initial time step of the calculation domain based on initial flow field information.
[0057] Initial flow field information refers to the physical state data of the fluid in the entire computational domain at the beginning of the numerical simulation. For example, the physical state data includes but is not limited to the velocity vector of the fluid at each grid point in the computational domain; the pressure value of the fluid at each point in the computational domain; the temperature of the fluid at each point in the computational domain; and the density of the fluid at each point in the computational domain. The initial time step is the first step used to discretize continuous time in numerical simulation, and it is the first time interval in the time integration method.
[0058] In the initial flow field information, the maximum flow field velocity and the sound velocity in the calculation domain may be determined according to the initial velocity field and the state equation of the fluid. In one embodiment, the initial flow field information includes the maximum flow field velocity, the spatial step length and the sound velocity of the calculation domain. The initial time step length of the calculation domain is calculated based on the initial flow field information, including:
[0059] The initial time step is calculated based on the maximum velocity of the flow field, the spatial step and the speed of sound.
[0060] The initial time step can be calculated based on a preset formula as follows:
[0061]
[0062] Where Δt is the initial time step, CFL is a constant less than 1 (such as 0.5), Δx is the spatial step of the computational domain, and |u max is the maximum velocity of the flow field, and c is the speed of sound.
[0063] The CFL condition is used to constrain the distance that the flow field information propagates in each time step to not exceed the size of a grid unit. In this application, the computational domain is divided into uniform grids, based on which the spatial step size of each grid unit in the computational domain is equal.
[0064] The time step is adaptively adjusted according to the changes in the flow field information in the computational domain. Specifically, at the end of each time step, the initial time step is updated according to the changes in the process information, that is, the changes in the maximum velocity and the speed of sound in the flow field.
[0065] S103: spatially discretizing the control equation corresponding to the computational domain.
[0066] Specifically, numerical methods such as finite difference method, finite volume method or finite element method are usually used to spatially discretize the control equations, that is, to convert the continuous spatial derivatives into discrete numerical approximations.
[0067] Exemplarily, the control equation may be a one-dimensional Euler equation, which may be expressed as:
[0068]
[0069] Where U is the conserved variable, and F(U) is the physical variable related to the conserved variable.
[0070] Among them, the conserved variables and physical variables are expressed as:
[0071]
[0072] Where ρ is density, p is pressure, u represents the velocity of the grid unit in the x direction, and E is the total energy per unit volume of the ideal gas, as follows:
[0073] E=ρe+1 / 2ρu 2
[0074] Among them, e is the internal energy.
[0075] The present application closes the control equation through the ideal gas state equation, so that the control equation only contains three variables: ρ, p and u. The ideal gas state equation is expressed as:
[0076] p=(γ-1)ρe
[0077] Among them, γ is the specific heat ratio. For monatomic ideal gases (such as helium), the specific heat ratio is usually 5 / 3, and for diatomic ideal gases (such as oxygen or nitrogen), the specific heat ratio is 7 / 5.
[0078] In one embodiment, the control equation includes physical variables and conservation variables; the spatial discretization of the control equation corresponding to the computational domain includes:
[0079] Mapping the physical variables and the conserved variables to a feature space;
[0080] The numerical flux of the control equation is spatially discretized in the characteristic space.
[0081] Taking the jth grid unit as an example, in the feature space, the conservation variable U can be transformed into the feature conservation variable
[0082]
[0083] in, is the Jacobian matrix The left eigenvector of m is a conserved variable.
[0084] Taking the jth grid unit as an example, in the feature space, the physical variable F(U) can be expressed as the characteristic physical variable
[0085]
[0086] Wherein, when the weighted essential non-oscillation (WENO) format is a 6-point format, j-2≤m≤j+3, s=1,2,3. is the Jacobian matrix The left eigenvector of m is the physical variable related to the conserved variable.
[0087] In addition, and Represents the matrix A j+1 / 2 The right eigenvectors and eigenvalues of .
[0088] In a uniform network, taking the jth grid unit as an example, the semi-discrete form of the control equation is:
[0089]
[0090] Among them, F j+1 / 2 is the numerical flux at the j+1 / 2th grid point, F j-1 / 2 is the numerical flux at the j-1 / 2th grid point, is the time discrete term of the j-th grid point, is the spatial discretization term of the j-th grid point.
[0091] The spatial discretization of the control equation, that is, solving the numerical flux in the semi-discrete form, in one embodiment, the spatial discretization of the numerical flux of the control equation in the feature space includes:
[0092] Calculate the smoothing factor based on the Jacobian matrix of the feature space and the initial flow field information corresponding to the current initial time step;
[0093] If the smoothness factor is less than and equal to the smoothness threshold, spatially discretizing the numerical flux of the control equation in the feature space based on a linear upwind format;
[0094] If the smoothness factor is greater than the smoothness threshold, the numerical flux of the control equation is spatially discretized in the feature space based on a shock wave capture format.
[0095] Specifically, taking the jth grid unit as an example, the smoothing factor λ can be calculated according to the following formula:
[0096]
[0097] in, Jacobian matrix A j+1 / 2 The corresponding Roe average density.
[0098] Among them, Roe average density is the average value calculated based on the flow field information (such as density, velocity and pressure) of two adjacent grid cells in the calculation domain. Its calculation formula is as follows:
[0099]
[0100] Where u is the velocity of the grid unit in the x direction, j is the number of the grid unit, and ρ is the density.
[0101] In one embodiment, it further includes:
[0102] The smoothness threshold is calculated based on the spatial step length of the computational domain and the characteristic length of the geometric model.
[0103] Among them, the spatial step size is the grid size Δx of the computational domain, and the characteristic length of the geometric model is the characteristic length of the compressible flow, which can be determined according to the geometric dimensions corresponding to the compressible flow simulation. For example, for pipe flow, the diameter or characteristic length of the pipe can be used as the characteristic length; for a wing, the chord length of the wing can be used as the characteristic length.
[0104] The calculation formula of the smooth threshold is as follows:
[0105]
[0106] Where τ is the smoothness threshold and L is the characteristic length of compressible flow.
[0107] If the smoothness factor is less than or equal to the smoothness threshold, the flow field in the computational domain is determined to be smooth, and the linear upwind scheme is used to solve the F in the spatial discrete term. j±1 / 2 , to achieve spatial discretization. Taking the jth grid unit of the jth initial time step as an example, the details are as follows:
[0108]
[0109] in, A positive numerical flux F j+1 / 2 The solution of . Similarly, we can get the negative numerical flux F j-1 / 2 The solution is not repeated here.
[0110] If the smoothness factor is greater than the smoothness threshold, it is determined that there is discontinuity in the flow field of the computational domain, and the shock wave capture format is used to solve the F in the spatial discrete term. j±1 / 2 , in order to achieve spatial discretization.
[0111] Considering that traditional compressible flow calculation formats often cannot take into account both high resolution and numerical stability characteristics at the same time, the method is limited in its wide application in complex flows. In view of this, this embodiment proposes a WENO calculation format based on a variable length template. In the nonlinear convex combination solution, L2 norm regularization is used to reduce the numerical dissipation caused by the combination of templates with different precisions. Finally, a hybrid format is used to mix the nonlinear WENO format with the linear format to further improve the numerical dissipation and dispersion characteristics of the format. In one embodiment, the shock wave capture format is used to spatially discretize the numerical flux of the control equation in the feature space, including:
[0112] Splitting the numerical flux of the control equation in the feature space based on a preset format candidate template to obtain a numerical flux corresponding to each format candidate template;
[0113] Spatial discretization is performed based on the numerical flux corresponding to each of the format candidate templates and the right eigenvector of the Jacobian matrix corresponding to the feature space.
[0114] The shock wave capture format is the WENO format. For example, Figure 3 As shown, the WENO format uses a 6-point center template, which is divided into two 2-point, two 3-point and one 4-point format candidate templates.
[0115] To solve the numerical flux of the control equation based on the shock wave capture format, it is necessary to split the numerical flux in the characteristic space to obtain the positive and negative characteristic fluxes after the split
[0116]
[0117] in, l represents the 6 local points in the preset format candidate template. The 6 local points refer to a set of grid points considered when calculating the numerical flux near a grid cell in the computational domain. These local points are used to reconstruct the solution near the point to improve the accuracy and resolution of the numerical solution.
[0118] At this point, the solution calculation formula for the numerical flux of the control equation can be expressed as:
[0119]
[0120] In the formula, The solution of positive numerical flux found for each format candidate template, The negative numerical flux solution found for each format candidate template.
[0121] Since compressible flows contain abundant multi-scale structures and shock discontinuities, numerical simulations are greatly challenged. On the one hand, the numerical format is required to have low dissipation characteristics to analyze the abundant structures in the flow field. On the other hand, the format is required to have high numerical dissipation near the shock wave to stably capture the shock discontinuity. The weighted essential non-oscillation (WENO) format has been widely used in the numerical simulation of compressible flows containing multi-scale structures and shock discontinuities due to its high resolution and good shock wave capture characteristics. It uses a nonlinear convex combination of several low-order polynomials for interpolation, which can achieve high-order approximation in smooth areas and provide necessary numerical dissipation when capturing shock waves. However, in actual numerical simulations, the traditional WENO format scheme still has the following problems. First, it has accuracy degradation near the critical point, and the numerical dissipation is too large in the analysis of small-scale structures. In addition, when there are very strong discontinuities in the flow field or multiple discontinuities are too close to each other, instability problems will occur. In order to overcome these problems, the prior art solution is to use a set of templates with gradually increasing lengths instead of equal-length templates to realize the reconstruction process. For example, a type of TENO format is proposed by dynamically combining 3-point and 4-point or 5-point candidate templates. The combination of low-order templates and high-order templates enables the TENO format to remain stable when multiple shock waves are close to each other. However, when there are high-density ratio discontinuities and strong shock waves, the TENO format still cannot achieve good numerical stability.
[0122] In order to improve the format stability, the present invention proposes to use two 2-point, two 3-point and one 4-point candidate templates for reconstruction. The introduction of the 2-point template can greatly improve the stability of the format when facing strong shock waves; in the process of solving the nonlinear weights, L2 norm regularization is performed on candidate templates of different precision to compensate for the numerical dissipation introduced due to different template precisions; finally, a hybrid method is used to mix the WENO format with the linear format to further improve the dispersion characteristics and computational efficiency of the format, thereby realizing accurate and efficient numerical simulation of compressible flow problems.
[0123] Based on this, the preset format candidate templates are as follows Figure 3 As shown in the figure, the 6-point calculation template is divided into two 2-point, two 3-point and one 4-point candidate templates; the L2 norm regularization is used in the weighted calculation to make up for the difference in accuracy between templates of different lengths and reduce the numerical dissipation in the calculation; finally, the WENO format is mixed with the linear format by a hybrid method to further improve the dispersion dissipation characteristics and calculation efficiency of the format, thereby realizing accurate and efficient numerical simulation of compressible flow problems. correspond Figure 3 The format candidate template S in 1-0 , correspond Figure 3 The format candidate template S in 1-1 , correspond Figure 3 The format candidate template S2 in correspond Figure 3 The format candidate template S3 in, correspond Figure 3 The format candidate template S4 in , the positive numerical flux corresponding to each format candidate template is:
[0124]
[0125] is the corresponding nonlinear weight, which is expressed as:
[0126]
[0127] in, is an ideal linear weight, ε=10 -20 is a positive decimal, β k is the smoothness factor of each format candidate template, E k is the L2 norm error term, δ is a learning factor used to control the contribution of the L2 norm error term. The present invention makes it equal to the value of the discontinuity identifier, that is, δ = λ, to complete the L2 norm regularization between templates of different lengths.
[0128] Smoothing factor β k The calculation formula is:
[0129]
[0130] L2 norm error term E k The values are:
[0131]
[0132] E2=E3=E4=0.
[0133] Similarly, we can get a negative numerical flux The solution is not repeated here.
[0134] After obtaining the solutions of the positive and negative numerical fluxes in the characteristic space according to the numerical flux solution calculation formula of the control equation, the solutions of the positive and negative numerical fluxes can be transformed into the numerical fluxes in the physical space (i.e., the solutions of the spatial discrete terms) according to the following formula:
[0135]
[0136] In the spatial discrete term F j-1 / 2 The solution reference F j+1 / 2 The calculation method of is not repeated here.
[0137] In this embodiment, a hybrid format is used in the process of solving the numerical flux in the spatial discrete term, which improves the computational efficiency and the resolution of the smooth flow field. In addition, a two-point template is used in the WENO format, which greatly improves the stability of the format candidate template, and utilizes the central upwind characteristics of the WENO format and the addition of the L2 norm error term in the nonlinear weight solution to improve the dispersion dissipation characteristics of the format.
[0138] S104: Perform time advancement based on the time integration method.
[0139] The time advancement represents the process in which the initial flow field information changes based on the change of the initial time step. The time advancement is to discretize the continuous time domain in the computational domain, decompose it into a series of time steps, and gradually solve the value of the conserved variable at each time step to simulate the evolution of the fluid over time.
[0140] The time integration method may be a 3rd order Runge-Kutta method. In one embodiment, the time advancement based on the time integration method includes:
[0141] Construct the conservation variable update equation based on the semi-discrete form of the control equation;
[0142] Time advancement is performed based on the time integration method and the conservation variable update equation.
[0143] Among them, the conservation variable update equation can be expressed as:
[0144]
[0145] The next time step conservation variable can be predicted by the following formula: Values:
[0146]
[0147] in, is the physical variable of the current time step, is the first step predictor variable, is the second step prediction variable, and L is a discrete operator used to predict state transition.
[0148] S105: During the time advancement process, when the number of time iterations meets a preset condition, target flow field information is determined.
[0149] The number of time iterations refers to the number of times the initial time step is updated.
[0150] Exemplarily, during the process of time advancement, if the preset condition is that the number of time iterations is 6 times, if the current number of time iterations is less than 6 times, the solution of the time-space term is repeatedly calculated until the number of updates of the initial time step is equal to 6 times, and the target flow field information corresponding to the next initial time step is predicted and output, and the target flow field information may include conserved variables, such as the density, pressure and velocity of the grid unit.
[0151] S106: Analyze the target flow field information, and generate a design optimization strategy for the geometric model based on the analysis results.
[0152] The target flow field information can be analyzed by engineering visualization software, and the analysis results can be obtained and displayed to realize the numerical simulation of the compressible flow field of the compressible flow simulation object. For example, the engineering visualization software can be Tecplot.
[0153] Exemplarily, the target flow field information includes the spatial distribution of physical quantities such as velocity, pressure and temperature. The target flow field data is analyzed to identify key features in the fluid, such as shock waves, boundary layers, separation zones, recirculation zones, etc.; the problems existing in the fluid are determined to obtain analysis results, which may include flow separation, pressure loss, uneven heat distribution, etc. According to the analysis results, the design optimization goals can be set, such as reducing drag, enhancing mixing, improving thermal efficiency, etc. Based on this, the design optimization strategy can be the adjustment of geometric shape, the change of boundary conditions, etc. For example, the aerodynamic performance of an aircraft airfoil is optimized, and the goal is to reduce drag and increase lift. Through CFD simulation, the flow velocity, pressure distribution and streamline pattern on the airfoil surface are collected. The analysis finds that there is flow separation at the trailing edge of the airfoil, resulting in vortices and increased drag. The main problem identified is flow separation and the resulting vortices. The goal is to reduce vortices and drag while maintaining or increasing lift. The design optimization strategy includes changing the shape of the airfoil, such as increasing the camber, adjusting the leading edge radius or adding a winglet.
[0154] Figure 4 The numerical simulation results after applying the present invention to the Shu-Osher example are shown. The Shu-Osher problem reflects the interaction between a shock wave with a Mach number of 3 and a sine wave. The initial conditions are:
[0155]
[0156] The computational domain is [0,10], 200 equally spaced grid points are used in the calculation, and the computational time is t=1.8. Figure 4The density curves obtained by different methods are shown. The black curve is the reference solution, which is the result obtained by WENO-JS format on 3200 grid points and is a high-resolution solution. The green curve represents the result obtained by the present invention. It can be seen that the numerical simulation structure obtained by the present invention can better capture the shock wave, and the calculation result is closer to the high-resolution solution, making the calculation error smaller.
[0157] The above is the compressible flow simulation process based on the variable length template WENO format of the present application.
[0158] As mentioned above, the present application provides a compressible flow simulation method and related equipment based on a variable length template WENO format, by meshing the geometric model of the compressible flow simulation object to obtain a computational domain; calculating the initial time step of the computational domain based on the initial flow field information; spatially discretizing the control equation corresponding to the computational domain; advancing time based on the time integration method, wherein the time advancement represents the process in which the initial flow field information changes based on the change of the initial time step; in the process of advancing time, when the number of time iterations meets the preset conditions, determining the target flow field information; analyzing the target flow field information, and generating a design optimization strategy for the geometric model based on the analysis results. In the compressible flow simulation scheme based on the variable length template WENO format provided in the present application, the geometric model is finely meshed to ensure the accuracy of the computational domain, the appropriate time step is determined based on the initial flow field conditions, the control equation is converted into a numerical form that can be solved on the computational domain by the spatial discretization method, and the simulation is advanced by the time integration method until a predetermined number of iterations is reached to obtain the target flow field information, and the corresponding design optimization strategy is output by analyzing the target flow field information. It can be seen that the control equations are converted into numerical forms that can be solved in the computational domain through the spatial discretization method, and the time integration method is used to advance the simulation, which improves the accuracy and efficiency of the numerical simulation of compressible flow problems and the correctness of the numerical simulation, which is beneficial to predict the performance of physical structures with compressible flow problems, so as to improve the design of the physical structure and ensure the safety and reliability of the design.
[0159] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.
[0160] In one embodiment, a compressible flow simulation device based on a variable length template WENO format is provided, and the compressible flow simulation device based on a variable length template WENO format corresponds to the compressible flow simulation method based on a variable length template WENO format in the above embodiment. Figure 5As shown, the compressible flow simulation device based on the variable length template WENO format includes:
[0161] A partitioning module 201 is used to perform mesh partitioning on the geometric model of the compressible flow simulation object to obtain a calculation domain;
[0162] A first calculation module 202, used for calculating an initial time step of the calculation domain based on initial flow field information;
[0163] A discretization module 203 is used to perform spatial discretization on the control equation corresponding to the computational domain;
[0164] An advancement module 204, configured to perform time advancement based on a time integration method, wherein the time advancement represents a process in which the initial flow field information changes based on a change in the initial time step;
[0165] A determination module 204 is used to determine target flow field information when the number of time iterations meets a preset condition during the time advancement process;
[0166] The generation module 205 is used to analyze the target flow field information and generate a design optimization strategy for the geometric model based on the analysis results.
[0167] In the compressible flow simulation scheme based on the variable length template WENO format provided in the present application, the geometric model of the compressible flow simulation object is meshed to obtain a computational domain; the initial time step of the computational domain is calculated based on the initial flow field information; the control equation corresponding to the computational domain is spatially discretized; time advancement is performed based on the time integration method, wherein the time advancement represents the process in which the initial flow field information changes based on the change of the initial time step; in the process of time advancement, when the number of time iterations meets the preset conditions, the target flow field information is determined; the target flow field information is analyzed, and the design optimization strategy of the geometric model is generated based on the analysis results. In the compressible flow simulation scheme based on the variable length template WENO format provided in the present application, the geometric model is finely meshed to ensure the accuracy of the computational domain, the appropriate time step is determined based on the initial flow field conditions, the control equation is converted into a numerical form that can be solved on the computational domain by the spatial discretization method, the simulation is advanced by the time integration method until a predetermined number of iterations is reached to obtain the target flow field information, and the corresponding design optimization strategy is output by analyzing the target flow field information. It can be seen that the control equations are converted into numerical forms that can be solved in the computational domain through the spatial discretization method, and the time integration method is used to advance the simulation, which improves the accuracy and efficiency of the numerical simulation of compressible flow problems and the correctness of the numerical simulation, which is beneficial to predict the performance of physical structures with compressible flow problems, so as to improve the design of the physical structure and ensure the safety and reliability of the design.
[0168] Optionally, in some embodiments of the present application, the discretization module includes:
[0169] A first calculation submodule, used for calculating the smoothing factor based on the Jacobian matrix of the feature space and the initial flow field information corresponding to the current initial time step;
[0170] A first discretization submodule, configured to perform spatial discretization on the numerical flux of the control equation in the feature space based on a linear upwind format if the smoothness factor is less than and equal to a smoothness threshold;
[0171] The second discretization submodule is used for spatially discretizing the numerical flux of the control equation in the feature space based on the shock wave capture format if the smoothness factor is greater than the smoothness threshold.
[0172] Optionally, in some embodiments of the present application, the second discretization submodule includes:
[0173] A splitting unit, used for splitting the numerical flux of the control equation in the feature space based on a preset format candidate template to obtain a numerical flux corresponding to each format candidate template;
[0174] A discretization unit is used to perform spatial discretization based on the numerical flux corresponding to each of the format candidate templates and the right eigenvector of the Jacobian matrix corresponding to the feature space.
[0175] Optionally, in some embodiments of the present application, the device further includes:
[0176] The second calculation module is used to calculate the smoothness threshold based on the spatial length of the calculation domain and the characteristic length of the geometric model.
[0177] Optionally, in some embodiments of the present application, the propulsion module includes:
[0178] A construction submodule, used to construct conservation variable update equations based on the semi-discrete form of the control equations;
[0179] The advancement submodule is used to perform time advancement based on the time integration method and the conservation variable update equation.
[0180] Optionally, in some embodiments of the present application, the initial flow field information includes the maximum flow field velocity, spatial step length and sound speed of the calculation domain, and the first calculation module includes:
[0181] The second calculation submodule is used to calculate the initial time step based on the maximum velocity of the flow field, the space step and the sound speed.
[0182] Optionally, in some embodiments of the present application, the control equation includes physical variables and conservation variables; and the discretization module includes:
[0183] A mapping submodule, used for mapping the physical variables and the conserved variables to a feature space;
[0184] The third discretization submodule is used to spatially discretize the numerical flux of the control equation in the characteristic space.
[0185] In one embodiment, a computer device is provided, the internal structure diagram of which can be as follows: Figure 6 As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external server through a network connection. When the computer program is executed by the processor, the functions or steps of a compressible flow simulation method based on a variable-length template WENO format are implemented.
[0186] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the following steps are implemented:
[0187] The geometric model of the compressible flow simulation object is meshed to obtain a computational domain; the initial time step of the computational domain is calculated based on the initial flow field information; the control equation corresponding to the computational domain is spatially discretized; time advancement is performed based on the time integration method, wherein the time advancement represents the process in which the initial flow field information changes based on the change of the initial time step; during the time advancement process, when the number of time iterations meets a preset condition, the target flow field information is determined; the target flow field information is analyzed, and a design optimization strategy for the geometric model is generated based on the analysis results.
[0188] In this embodiment, the geometric model is finely meshed to ensure the accuracy of the computational domain, the appropriate time step is determined based on the initial flow field conditions, the control equation is converted into a numerical form that can be solved on the computational domain by the spatial discretization method, and the time integration method is used to advance the simulation until a predetermined number of iterations is reached to obtain the target flow field information, and the corresponding design optimization strategy is output by analyzing the target flow field information. It can be seen that the control equation is converted into a numerical form that can be solved on the computational domain by the spatial discretization method, and the time integration method is used to advance the simulation, which improves the accuracy and efficiency of the numerical simulation of the compressible flow problem, improves the correctness of the numerical simulation, and is conducive to predicting the performance of the physical structure with the compressible flow problem, so as to improve the design of the physical structure and ensure the safety and reliability of the design.
[0189] In one embodiment, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0190] The geometric model of the compressible flow simulation object is meshed to obtain a computational domain; the initial time step of the computational domain is calculated based on the initial flow field information; the control equation corresponding to the computational domain is spatially discretized; time advancement is performed based on the time integration method, wherein the time advancement represents the process in which the initial flow field information changes based on the change of the initial time step; during the time advancement process, when the number of time iterations meets a preset condition, the target flow field information is determined; the target flow field information is analyzed, and a design optimization strategy for the geometric model is generated based on the analysis results.
[0191] In this embodiment, the geometric model is finely meshed to ensure the accuracy of the computational domain, the appropriate time step is determined based on the initial flow field conditions, the control equation is converted into a numerical form that can be solved on the computational domain by the spatial discretization method, and the time integration method is used to advance the simulation until a predetermined number of iterations is reached to obtain the target flow field information, and the corresponding design optimization strategy is output by analyzing the target flow field information. It can be seen that the control equation is converted into a numerical form that can be solved on the computational domain by the spatial discretization method, and the time integration method is used to advance the simulation, which improves the accuracy and efficiency of the numerical simulation of the compressible flow problem, improves the correctness of the numerical simulation, and is conducive to predicting the performance of the physical structure with the compressible flow problem, so as to improve the design of the physical structure and ensure the safety and reliability of the design.
[0192] It should be noted that the above functions or steps that can be implemented by the computer-readable storage medium or computer device can refer to the relevant descriptions on the server side and the client side in the aforementioned method embodiment. To avoid repetition, they will not be described one by one here.
[0193] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in the present application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0194] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0195] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention.
Claims
1. A compressible flow simulation method based on variable length template WENO format, characterized in that: include: Meshing the geometric model of the compressible flow simulation object to obtain the computational domain; Calculating an initial time step of the computational domain based on initial flow field information; Performing spatial discretization on the control equation corresponding to the computational domain; Performing time advancement based on a time integration method, wherein the time advancement represents a process in which the initial flow field information changes based on a change in the initial time step; In the process of advancing the time, when the number of time iterations meets a preset condition, the target flow field information is determined; The target flow field information is analyzed, and a design optimization strategy for the geometric model is generated based on the analysis result.
2. The compressible flow simulation method based on the variable length template WENO format according to claim 1 is characterized in that: The step of spatially discretizing the numerical flux of the control equation in the characteristic space comprises: Calculate the smoothing factor based on the Jacobian matrix of the feature space and the initial flow field information corresponding to the current initial time step; If the smoothness factor is less than and equal to the smoothness threshold, spatially discretizing the numerical flux of the control equation in the feature space based on a linear upwind format; If the smoothness factor is greater than the smoothness threshold, the numerical flux of the control equation is spatially discretized in the feature space based on a shock wave capture format.
3. The compressible flow simulation method based on the variable length template WENO format according to claim 2 is characterized in that: The step of spatially discretizing the numerical flux of the control equation in the characteristic space based on the shock wave capture format includes: Splitting the numerical flux of the control equation in the feature space based on a preset format candidate template to obtain a numerical flux corresponding to each format candidate template; Spatial discretization is performed based on the numerical flux corresponding to each of the format candidate templates and the right eigenvector of the Jacobian matrix corresponding to the feature space.
4. The compressible flow simulation method based on the variable length template WENO format according to claim 3 is characterized in that: Also includes: The smoothness threshold is calculated based on the spatial length of the computational domain and the characteristic length of the geometric model.
5. The compressible flow simulation method based on the variable length template WENO format according to claim 1 is characterized in that: The time advancement based on the time integration method includes: Construct the conservation variable update equation based on the semi-discrete form of the control equation; Time advancement is performed based on the time integration method and the conservation variable update equation.
6. The compressible flow simulation method based on the variable length template WENO format according to claim 1 is characterized in that: The initial flow field information includes the maximum flow field velocity, spatial step length and sound speed of the calculation domain, and the initial time step length of the calculation domain is calculated based on the initial flow field information, including: The initial time step is calculated based on the maximum velocity of the flow field, the spatial step and the speed of sound.
7. The compressible flow simulation method based on the variable length template WENO format according to claim 1 is characterized in that: The control equation includes physical variables and conservation variables; the spatial discretization of the control equation corresponding to the computational domain includes: Mapping the physical variables and the conserved variables to a feature space; The numerical flux of the control equation is spatially discretized in the characteristic space.
8. A compressible flow simulation device based on variable length template WENO format, characterized in that: include: A partitioning module is used to perform mesh partitioning on the geometric model of the compressible flow simulation object to obtain a calculation domain; A first calculation module, used for calculating an initial time step of the calculation domain based on initial flow field information; A discretization module, used for spatially discretizing the control equation corresponding to the computational domain; An advancement module, configured to perform time advancement based on a time integration method, wherein the time advancement represents a process in which the initial flow field information changes based on a change in the initial time step; A determination module, used for determining target flow field information when the number of time iterations meets a preset condition during the time advancement process; A generation module is used to analyze the target flow field information and generate a design optimization strategy for the geometric model based on the analysis results.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the compressible flow simulation method based on the variable-length template WENO format as described in any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the compressible flow simulation method based on the variable-length template WENO format as claimed in any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Shallow water flow simulation methods, apparatus, equipment and media
CN122572303A
Shallow water flow simulation method, apparatus, device, and medium
CN122572303B