Fluid simulation method and electronic device

CN122904793APending Publication Date: 2026-10-13INST OF APPLIED PHYSICS & COMPUTATIONAL MATHEMATICS
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611192284.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-07
Publication Date
2026-10-13

AI Technical Summary

Technical Problem

[0004]本发明实施例提供一种流体模拟方法及电子设备,以解决现有技术中网格单元无法自适应变化,容易导致精度过低或计算成本过高的技术问题

Benefits of technology

[0015]本发明实施例提供了一种流体模拟方法及电子设备,该流体模拟方法包括:基于待模拟流体构建流体曲线网格,获取待模拟流体的流体参数数据;其中,流体参数数据数包括密度数据、速度数据、压强数据和能量数据;基于流体参数数据确定待模拟流体对应的预测算子值和投影算子值;基于预测算子值和投影算子值的比较结果对流体曲线网格进行网格优化处理;其中,优化处理包括网格加密处理、网格粗化处理和网格保持处理。本发明通过构建流体曲线网格,基于流体参数数据(包括密度数据、速度数据、压强数据和能量数据)确定待模拟流体对应的预测算子值和投影算子值,基于预测算子值和投影算子值的比较结果对流体曲线网格进行网格优化处理,流体曲线网格自适应性的进行优化处理,网格粗糙时自适应进行网格加密处理,提升流体曲线网格的精度,网格过于精细时对网格进行网格粗化处理,减少对流体曲线网格的过精细化处理,降低计算成本,在流体曲线网格的精度适宜时,进行网格保持处理,维持流体曲线网格不变。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122904793A_ABST
    Figure CN122904793A_ABST
Patent Text Reader

Abstract

The application provides a fluid simulation method, and relates to the technical field of fluid simulation, and the method comprises the following steps: constructing a fluid curve grid based on a fluid to be simulated, and acquiring fluid parameter data of the fluid to be simulated; wherein the fluid parameter data comprises density data, velocity data and pressure data; determining a prediction operator value and a projection operator value corresponding to the fluid to be simulated based on the fluid parameter data; and performing grid optimization processing on the fluid curve grid based on a comparison result of the prediction operator value and the projection operator value; wherein the optimization processing comprises grid densification processing, grid coarsening processing and grid maintenance processing. The application can further improve the accuracy of the fluid curve grid and reduce the calculation cost when the fluid curve grid is acquired by performing grid optimization processing on the fluid curve grid based on the comparison result of the prediction operator value and the projection operator value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of fluid simulation technology, and more specifically, to a fluid simulation method and electronic device. Background Technology

[0002] Curved meshes offer flexibility in fluid simulation, improving computational efficiency and reducing computational costs. However, the varying sizes and shapes of mesh cells and complex neighbor relationships within curved meshes can lead to lower efficiency in fluid simulations. To enhance the efficiency of curved meshes in fluid simulations, a conversion between curved and Cartesian meshes is typically performed, transforming irregular mesh cells in the curved mesh into regular mesh cells in the Cartesian mesh for easier subsequent calculations.

[0003] In existing technologies, when converting between curved meshes and Cartesian meshes, a uniform mesh algorithm is usually used. However, the mesh elements in the fluid mesh obtained by this algorithm cannot adapt to changes, which can easily lead to coarser or finer mesh elements, resulting in either low accuracy or high computational cost. Summary of the Invention

[0004] This invention provides a fluid simulation method and electronic device to solve the technical problem in the prior art where the mesh cells cannot adapt to change, which easily leads to low accuracy or high computational cost.

[0005] To achieve the above objectives, the technical solutions adopted in the embodiments of the present invention are as follows: In a first aspect, embodiments of the present invention provide a fluid simulation method, comprising: A fluid curve mesh is constructed based on the fluid to be simulated, and the fluid parameter data of the fluid to be simulated is obtained; wherein, the fluid parameter data includes density data, velocity data, pressure data and energy data; Based on the fluid parameter data, determine the prediction operator value and projection operator value corresponding to the fluid to be simulated; The fluid curve mesh is optimized based on the comparison results of the predicted operator value and the projected operator value; wherein the optimization process includes mesh refinement, mesh coarsening and mesh preservation.

[0006] Furthermore, this embodiment of the invention provides a first possible implementation of the first aspect, wherein the step of constructing a fluid curve mesh based on the fluid to be simulated and obtaining fluid parameter data of the fluid to be simulated includes: The fluid curve mesh is constructed based on the fluid to be simulated; wherein the fluid curve mesh is located in the curve mesh coordinate system; The fluid curve mesh is transformed from the curve mesh coordinate system to the Cartesian mesh coordinate system to obtain the fluid Cartesian mesh; Determine the fluid parameter data corresponding to each first grid in the fluid Cartesian grid.

[0007] Furthermore, this embodiment of the invention provides a second possible implementation of the first aspect, wherein the step of determining the prediction operator value and projection operator value corresponding to the fluid to be simulated based on the fluid parameter data includes: Based on the fluid parameter data and the coordinate system Jacobian, the curve conservation quantity corresponding to the fluid to be simulated is determined; wherein, the coordinate system Jacobian is the Jacobian corresponding to the transformation between the curve grid coordinate system and the Cartesian grid coordinate system; The prediction operator value and projection operator value corresponding to the fluid to be simulated are determined based on the curve conservation quantity.

[0008] Furthermore, this embodiment of the invention provides a third possible implementation of the first aspect, wherein the step of determining the curve conservation quantity corresponding to the fluid to be simulated based on the fluid parameter data and the coordinate system Jacobian includes: Based on the fluid parameter data corresponding to each of the first grids, the grid boundary flux and the first Cartesian conservation quantity corresponding to each of the first grids are determined; wherein, the grid boundary flux is the flux corresponding to the boundary of the first grid; The curve conservation quantity corresponding to each second grid in the fluid curve grid is determined based on each of the first Cartesian conservation quantities and the Jacobian coordinate system.

[0009] Furthermore, this embodiment of the invention provides a fourth possible implementation of the first aspect, wherein the step of determining the grid boundary flux and the first Cartesian conservation quantity corresponding to each of the first grids based on the fluid parameter data corresponding to each of the first grids includes: Gaussian points at the boundaries of each of the first grid cells are determined based on Gaussian integrals. The Jacobian of each Gaussian point is determined based on the Gaussian polynomial approximation method. Based on the fluid parameter data corresponding to each first grid, the Jacobian of each Gaussian point and the preset reconstruction method, the flux corresponding to each Gaussian point is determined, and the grid boundary flux corresponding to each first grid is obtained. The second Cartesian conservation quantity corresponding to each of the first grids is determined based on the fluid parameter data corresponding to each of the first grids and the coordinate system Jacobian. A Cartesian conserved quantity corresponding to each of the first grids is determined based on each of the second Cartesian conserved quantities and each of the grid boundary fluxes.

[0010] Furthermore, this embodiment of the invention provides a fifth possible implementation of the first aspect, wherein the step of determining the Jacobian of each Gaussian point based on the Gaussian polynomial approximation method includes: An approximation polynomial corresponding to each Gaussian point is established based on the Gaussian curve coordinates of the Gaussian approximation points corresponding to each Gaussian point; wherein, the Gaussian curve coordinates are located in the curve grid coordinate system; The Jacobian of each Gaussian point is determined based on each of the approximation polynomials.

[0011] Furthermore, this embodiment of the invention provides a sixth possible implementation of the first aspect, wherein the step of determining the flux corresponding to each Gaussian point based on the fluid parameter data corresponding to each of the first grids, the Jacobian of each of the Gaussian points, and a preset reconstruction method, and obtaining the grid boundary flux corresponding to each of the first grids, includes: Based on the fluid parameter data corresponding to each of the first grids, determine the left and right limit values ​​of the conserved quantities at each Gaussian point; Based on the left limit value, the right limit value, and the Jacobian of each Gaussian point, the flux corresponding to each Gaussian point is determined, and the grid boundary flux corresponding to each first grid is obtained.

[0012] Furthermore, this embodiment of the invention provides a seventh possible implementation of the first aspect, wherein the step of determining the prediction operator value and projection operator value corresponding to the fluid to be simulated based on the curve conservation quantity includes: Based on the layer number of each second grid and the curve conservation quantity corresponding to each second grid, the first prediction operator value, the second prediction operator value, and the projection operator value corresponding to each second grid are determined: ; ; ; in, The projection operator value corresponding to the j-th second grid in the l-th layer; The first prediction operator value corresponding to the j-th second grid in the l-th layer; The value of the second prediction operator corresponding to the j-th second grid in the l-th layer; This is the curve conservation quantity corresponding to the 2jth second grid in the (l+1)th layer; This is the curve conservation quantity corresponding to the (2j+1)th second grid in the (l+1)th layer; This is the curve conservation quantity corresponding to the j-th second grid in the l-th layer; This is the curve conservation quantity corresponding to the (j+1)th second grid in the l-th layer; This is the curve conservation quantity corresponding to the (j-1)th second grid in the l-th layer; These are the preset interpolation coefficients; The prediction operator value corresponding to each second grid is determined based on each of the first prediction operator values ​​and each of the second prediction operator values.

[0013] Furthermore, this embodiment of the invention provides an eighth possible implementation of the first aspect, wherein the step of performing mesh optimization processing on the fluid curve mesh based on the comparison result of the prediction operator value and the projection operator value includes: Calculate the difference between the prediction operator value and the projection operator value to obtain a first difference; The first difference is compared with a first preset threshold and a second preset threshold respectively. If the first difference is less than the first preset threshold, the fluid curve mesh is coarsened. If the first preset threshold is less than the first difference and the second preset threshold is less than the second preset threshold, the fluid curve mesh is preserved. If the second preset threshold is less than the first difference, the fluid curve mesh is refined.

[0014] In a second aspect, embodiments of the present invention also provide an electronic device, characterized in that it includes: a processor and a storage device; The storage device stores a computer program, which executes the above method when run by the processor.

[0015] This invention provides a fluid simulation method and an electronic device. The fluid simulation method includes: constructing a fluid curve mesh based on the fluid to be simulated, and obtaining fluid parameter data of the fluid to be simulated; wherein the fluid parameter data includes density data, velocity data, pressure data, and energy data; determining the prediction operator value and projection operator value corresponding to the fluid to be simulated based on the fluid parameter data; and performing mesh optimization processing on the fluid curve mesh based on the comparison result of the prediction operator value and the projection operator value; wherein the optimization processing includes mesh refinement processing, mesh coarsening processing, and mesh preservation processing. This invention constructs a fluid curve mesh and determines the predicted and projected operator values ​​corresponding to the fluid to be simulated based on fluid parameter data (including density, velocity, pressure, and energy data). The fluid curve mesh is then optimized based on the comparison results of the predicted and projected operator values. The optimization process is adaptive: when the mesh is coarse, it is adaptively refined to improve accuracy; when the mesh is too fine, it is coarsened to reduce over-refinement and lower computational costs; and when the accuracy of the fluid curve mesh is appropriate, it is preserved to maintain its integrity. Attached Figure Description

[0016] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0017] Figure 1 This is a schematic flowchart of a fluid simulation method provided in an embodiment of the present invention; Figure 2a This is a schematic diagram of density comparison under a third preset condition in a fluid simulation method provided by an embodiment of the present invention; Figure 2b This is a schematic diagram of velocity comparison under a third preset condition in a fluid simulation method provided in an embodiment of the present invention; Figure 2c This is a schematic diagram showing the pressure comparison under a third preset condition in a fluid simulation method provided by an embodiment of the present invention. Figure 3 This is a schematic diagram showing the comparison of the number of grids under a third preset condition in a fluid simulation method provided by an embodiment of the present invention; Figure 4a This is a schematic diagram of density comparison under a fourth preset condition in a fluid simulation method provided by an embodiment of the present invention; Figure 4b This is a schematic diagram of local density comparison under a fourth preset condition in a fluid simulation method provided in an embodiment of the present invention; Figure 4c This is a schematic diagram of velocity comparison under a fourth preset condition in a fluid simulation method provided by an embodiment of the present invention; Figure 4d This is a schematic diagram showing the pressure comparison under a fourth preset condition in a fluid simulation method provided by an embodiment of the present invention. Figure 5a This is a schematic diagram of density comparison under the fifth preset condition in a fluid simulation method provided by an embodiment of the present invention; Figure 5b This is a schematic diagram of local density comparison under the fifth preset condition in a fluid simulation method provided in an embodiment of the present invention; Figure 5c This is a schematic diagram of velocity comparison under a fifth preset condition in a fluid simulation method provided by an embodiment of the present invention; Figure 5d This is a schematic diagram showing the pressure comparison under the fifth preset condition in a fluid simulation method provided by an embodiment of the present invention. Figure 6aA schematic diagram of the density of the fluid curve mesh obtained by the fluid simulation method under the sixth preset condition in an embodiment of the present invention; Figure 6b In a fluid simulation method provided by an embodiment of the present invention, the density grid diagram of the fluid curve grid obtained by the uniform grid algorithm under the sixth preset condition; Figure 6c A schematic diagram of the density calculation block of the fluid curve mesh obtained by the fluid simulation method under the sixth preset condition in a fluid simulation method provided in an embodiment of the present invention; Figure 6d A schematic diagram of the fluid curve mesh obtained by the fluid simulation method under the sixth preset condition in a fluid simulation method provided in an embodiment of the present invention; Figure 7a A schematic diagram of the density grid of the fluid curve obtained by the fluid simulation method under the seventh preset condition of 5 incoming Mach number in a fluid simulation method provided in an embodiment of the present invention; Figure 7b A schematic diagram of the density grid of the fluid curve obtained by the fluid simulation method under the seventh preset condition of 8 incoming Mach number in a fluid simulation method provided in an embodiment of the present invention; Figure 7c This is a schematic diagram of the density grid of the fluid curve obtained by the fluid simulation method under the seventh preset condition of 10 Mach number, provided in an embodiment of the present invention. Detailed Implementation

[0018] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be described below in conjunction with the accompanying drawings. Obviously, the described embodiments are some embodiments of the present invention, but not all embodiments.

[0019] This embodiment provides a fluid simulation method; see [link to documentation]. Figure 1 The diagram shown illustrates a flow chart of a fluid simulation method, which mainly includes: Step S10: Construct a fluid curve mesh based on the fluid to be simulated and obtain the fluid parameter data of the fluid to be simulated; wherein, the fluid parameter data includes density data, velocity data, pressure data and energy data; Establish a fluid curve grid corresponding to the fluid to be simulated in the curve grid coordinate system, and obtain the fluid parameter data of the fluid to be simulated (including density). The corresponding density data, velocity data (including velocity data corresponding to the velocity component u in the horizontal axis direction and velocity data corresponding to the velocity component v in the vertical axis direction), pressure data corresponding to the pressure p, and energy data corresponding to the energy E).

[0020] Step S20: Determine the prediction operator value and projection operator value corresponding to the fluid to be simulated based on the fluid parameter data; Step S30: Based on the comparison results of the predicted operator value and the projected operator value, perform mesh optimization processing on the fluid curve mesh; wherein, the optimization processing includes mesh refinement processing, mesh coarsening processing, and mesh preservation processing; Based on an adaptive multi-resolution method and fluid parameter data, the predicted and projected operator values ​​corresponding to the fluid to be simulated are determined. Based on the comparison results of the predicted and projected operator values, the fluid curve mesh is optimized (including mesh refinement, mesh coarsening, and mesh preservation). Specifically, this method can capture the local regularity information of the fluid to be simulated, perform mesh coarsening in the smooth regions of the fluid to be simulated to improve the accuracy of the fluid curve mesh, perform mesh refinement in the discontinuous regions of the fluid to be simulated to significantly reduce computation time and memory consumption, thereby reducing computational costs, and perform mesh preservation when the accuracy of the fluid curve mesh is appropriate to keep the fluid curve mesh unchanged.

[0021] The fluid simulation method provided in this invention constructs a fluid curve mesh, determines the predicted operator value and the projected operator value corresponding to the fluid to be simulated based on fluid parameter data (including density data, velocity data, pressure data, and energy data), and performs mesh optimization processing on the fluid curve mesh based on the comparison results of the predicted operator value and the projected operator value. The fluid curve mesh is adaptively optimized. When the mesh is coarse, mesh refinement processing is adaptively performed to improve the accuracy of the fluid curve mesh. When the mesh is too fine, mesh coarsening processing is performed to reduce over-fine processing of the fluid curve mesh and reduce computational costs. When the accuracy of the fluid curve mesh is appropriate, mesh preservation processing is performed to keep the fluid curve mesh unchanged.

[0022] In one embodiment, the step of constructing a fluid curve mesh based on the fluid to be simulated and obtaining fluid parameter data of the fluid to be simulated, provided in this embodiment, includes: Step S101: Construct a fluid curve mesh based on the fluid to be simulated; wherein the fluid curve mesh is located in the curve mesh coordinate system; Establish a curve grid coordinate system, set the x-axis as the horizontal axis of the curve grid coordinate system, and set the y-axis as the vertical axis of the curve grid coordinate system. Create a fluid curve grid corresponding to the fluid to be simulated in the curve grid coordinate system.

[0023] Step S103: Transform the fluid curve mesh from the curve mesh coordinate system to the Cartesian mesh coordinate system to obtain the fluid Cartesian mesh; Establish a Cartesian grid coordinate system, and The axis is set to the horizontal axis of the Cartesian grid coordinate system. The axis is set as the vertical axis of the curve grid coordinate system. The fluid curve grid is transformed from the curve grid coordinate system to the Cartesian grid coordinate system to obtain the fluid Cartesian grid. Each second grid in the fluid curve grid corresponds one-to-one with each first grid in the fluid Cartesian grid. Specifically, in the Cartesian grid coordinate system, the fluid Cartesian grid satisfies the two-dimensional Euler equations: ; Where U represents the second Cartesian conserved quantity (i.e., the conserved quantity vector) corresponding to the fluid Cartesian grid. ; This represents the partial derivative of the second Cartesian conservation with respect to time t; Representing fluid Cartesian grids in Flux in the direction, ; Representing fluid Cartesian grids in Flux pairs in the direction The partial derivative; G represents the fluid Cartesian mesh in Flux in the direction, ; Representing fluid Cartesian grids in Flux pairs in the direction The partial derivative of .

[0024] Step S105: Determine the fluid parameter data corresponding to each first grid in the fluid Cartesian grid; The fluid parameter data of each second grid in the fluid curve grid is the fluid parameter data of the corresponding first grid.

[0025] In one embodiment, the steps provided in this embodiment for determining the prediction operator value and projection operator value corresponding to the fluid to be simulated based on fluid parameter data include: Step S201: Determine the curve conservation quantity corresponding to the fluid to be simulated based on the fluid parameter data and the coordinate system Jacobian; wherein, the coordinate system Jacobian is the Jacobian corresponding to the transformation between the curve grid coordinate system and the Cartesian grid coordinate system; Step S203: Determine the prediction operator value and projection operator value corresponding to the fluid to be simulated based on the curve conservation quantity; Determine the Jacobian of the coordinate system when transforming between the curve grid coordinate system and the Cartesian grid coordinate system based on various spatial metrics: ; Where J represents the Jacobian coordinate system; x in the curve grid coordinate system versus the Cartesian grid coordinate system The partial derivative; x in the curve grid coordinate system versus the Cartesian grid coordinate system The partial derivative; For the curve grid coordinate system, y is relative to the Cartesian grid coordinate system. The partial derivative; For the curve grid coordinate system, y is relative to the Cartesian grid coordinate system. The partial derivative; Transform the governing equations corresponding to the curve grid coordinate system to the Cartesian grid coordinate system: ; in, The curve conservation quantity corresponding to the fluid curve grid. ; The partial derivative of the conserved quantity of the curve with respect to time t; This represents the flux of the fluid curve grid in the x-direction. ; Flux pairs in the x-direction of the fluid curve grid The partial derivative; This represents the flux of the fluid curve grid in the y-direction. ; Flux pairs in the y-direction of the fluid curve grid The partial derivative; The velocity component in the x-direction after transformation from the curvilinear grid coordinate system to the Cartesian grid coordinate system; The velocity component in the y-direction after transformation from the curvilinear grid coordinate system to the Cartesian grid coordinate system; and They respectively satisfy the formulas: ; ; in, In the Cartesian grid coordinate system Partial derivative with respect to x in the curved grid coordinate system; In the Cartesian grid coordinate system The partial derivative of y with respect to the curved grid coordinate system; In the Cartesian grid coordinate system Partial derivative with respect to x in the curved grid coordinate system; In the Cartesian grid coordinate system The partial derivative of y with respect to the curved grid coordinate system; The prediction operator value and projection operator value corresponding to the fluid to be simulated are determined based on the curve conservation quantity.

[0026] In one embodiment, the steps provided in this embodiment for determining the curve-conserved quantities corresponding to the fluid to be simulated based on fluid parameter data and the Jacobian coordinate system include: Step S2011: Based on the fluid parameter data corresponding to each first grid, determine the grid boundary flux and the first Cartesian conserved quantity corresponding to each first grid; wherein, the grid boundary flux is the flux corresponding to the boundary of the first grid; Step S2012: Determine the curve conservation quantities corresponding to each second grid in the fluid curve grid based on each first Cartesian conservation quantity and the Jacobian coordinate system. Map each second grid in the fluid curve grid to each first grid in the fluid Cartesian grid: ( → =( ); in, This refers to the curve grid coordinates corresponding to the second grid in the e-th row and f-th column of the curve grid coordinate system (i.e., the coordinates corresponding to the element control volume in the fluid curve grid). This refers to the Cartesian grid coordinates of the first grid in the e-th row and f-th column of the Cartesian grid coordinate system (i.e., the coordinates corresponding to the control volume of the element in the fluid Cartesian grid). The coordinates of the four corner points can be represented as: bottom left corner ( , (bottom right corner) , (top right corner) , ), top left corner ( , ); The second grid in the Cartesian grid coordinate system satisfies the following equation: ; in, The first average value corresponding to the first grid cell in the e-th row and f-th column; The spatial average value corresponding to the right boundary of the first grid in the e-th row and f-th column; The spatial average value corresponding to the left boundary of the first grid in the e-th row and f-th column; This is the spatial average value corresponding to the upper boundary of the first grid in the e-th row and f-th column; This is the spatial average value corresponding to the lower boundary of the first grid in the e-th row and f-th column; is the average horizontal spacing between the first grids in the Cartesian grid coordinate system; represents the average vertical spacing between the first grids in the Cartesian grid coordinate system; The first average value corresponding to the first grid in the e-th row and f-th column above satisfies the equation: ; in, Let t be the vector of physical quantities corresponding to the first grid (i.e., the vector composed of fluid parameters). ); The conserved quantities of the second Cartesian grid corresponding to each first grid at time t=0 can be obtained by substituting the fluid parameter data corresponding to the first grid into the Euler equation corresponding to the Cartesian grid coordinate system mentioned above; the conserved quantities of the curve grid corresponding to each second grid at time t=0 can be obtained through the Jacobian coordinate system and the conserved quantities of the second Cartesian grid. The first Cartesian grid conservation quantity corresponding to each first grid is obtained by updating the second Cartesian grid conservation quantity based on the grid boundary flux; There is a mathematical relationship between the spatial average value of each boundary of the first grid and the corresponding grid boundary flux, for example: = ; ; in, Let f be the grid boundary flux corresponding to the right boundary of the first grid in row e and column f; Let f be the grid boundary flux corresponding to the upper boundary of the first grid in row e and column f; similarly, a mathematical relationship can be established between the grid boundary flux and the spatial average value of the remaining boundaries of the second grid.

[0027] In one embodiment, the steps provided in this embodiment for determining the grid boundary flux and the first Cartesian conserved quantity corresponding to each first grid based on the fluid parameter data corresponding to each first grid include: Step S20121: Determine the Gaussian points at the boundaries of each first grid based on the Gaussian integral; Step S20122: Determine the Jacobian of each Gaussian point based on the Gaussian polynomial approximation method; Step S20123: Based on the fluid parameter data corresponding to each first grid, the Jacobian of each Gaussian point and the preset reconstruction method, determine the flux corresponding to each Gaussian point, and obtain the grid boundary flux corresponding to each first grid. Step S20124: Determine the second Cartesian conservation quantity corresponding to each first grid based on the fluid parameter data and the Jacobian coordinate system corresponding to each first grid. Step S20125: Determine the Cartesian conservation quantity corresponding to each first grid based on each second Cartesian conservation quantity and each grid boundary flux; The grid boundary flux corresponding to each first grid is obtained based on the Gaussian integral approximation, and the Gaussian points at each boundary (including the upper boundary, lower boundary, left boundary, and right boundary) of each first grid are determined. Specifically, the grid boundary flux corresponding to each first grid is obtained based on the Gaussian integral approximation. For example, the grid boundary flux of the right boundary is taken as an example: = ; in, The weights of the Gaussian integrals corresponding to the Gaussian points; This represents the grid boundary flux at the Gaussian point; when h=1, = , = , Gaussian point The corresponding weights of the Gaussian integral, Gaussian point corresponding coordinate, Gaussian point The corresponding grid boundary flux; when h=2, = , = , Let fp be the weight of the Gaussian integral corresponding to the Gaussian point fp. For the Gaussian point fp coordinate, Let fp be the grid boundary flux corresponding to the Gaussian point fp; where, = =1 / 2, = , = ; For the j-th column grid Coordinates; determine the coordinates of the two Gaussian points on the right boundary. and Similarly, by adaptively modifying the above formula, Gaussian points for the remaining boundaries (including the upper boundary, lower boundary, and left boundary) can be obtained. Based on the coordinates of the Gaussian points, the corresponding Gaussian approximation points are determined, and a polynomial (e.g., a cubic polynomial) is established using the Gaussian approximation points to determine the Jacobian of each Gaussian point. Based on the fluid parameter data corresponding to each first grid, the Jacobian of each Gaussian point, and the preset reconstruction method (Simple-WENO reconstruction can be used), the flux corresponding to each Gaussian point is determined, and the grid boundary flux corresponding to each first grid is obtained. The second Cartesian conservation quantity corresponding to each first grid is determined based on the fluid parameter data and the Jacobian coordinate system corresponding to each first grid. The first Cartesian conserved quantity for each first grid at the next moment is determined based on each second Cartesian conserved quantity and each grid boundary flux.

[0028] In one embodiment, the steps for determining the Jacobian of each Gaussian point based on the Gaussian polynomial approximation method provided in this embodiment include: Step S201221: Establish the approximation polynomial corresponding to each Gaussian point based on the Gaussian curve coordinates of the Gaussian approximation points corresponding to each Gaussian point; wherein, the Gaussian curve coordinates are located in the curve grid coordinate system. To ensure high accuracy of the finite volume method on fluid curve meshes, it is necessary to ensure that the fluid simulation method maintains geometric conservation laws during the simulation process. Under the condition of maintaining geometric conservation laws, the governing equations can be expressed as: ; ; in, for Direction value; for Direction value; for Direction value; for Direction value; Discretizing the geometric conservation laws at Gaussian points yields equations, for example:

[0029]

[0030] in, The Gaussian point fm on the right boundary corresponds to ; The Gaussian point fm on the left boundary corresponds to ; The Gaussian point fp on the right boundary corresponds to ; The Gaussian point fp on the left boundary corresponds to ; The Gaussian point em on the upper boundary corresponds to ; The Gaussian point fm on the lower boundary corresponds to ; For the Gaussian point ep on the upper boundary ; For the Gaussian point fp on the lower boundary ; Construct a polynomial based on the Gaussian approximation points corresponding to the Gaussian points. For example, determine the four Gaussian approximation points corresponding to the Gaussian points jm and jp on the right boundary. ( ), ( ), ( ), ( The coordinates of each Gaussian approximation point in the curve grid coordinate system are: ( ), ( ), ( ), ( ); A polynomial (using a cubic polynomial) is established based on each Gaussian approximation point: ; in, , , and The coefficients in the polynomial;

[0031]

[0032]

[0033] ; in, For Gaussian approximation point The corresponding x-coordinate in the curve grid coordinate system; For the Gaussian approximation point The corresponding x-coordinate in the curve grid coordinate system; For Gaussian approximation point The corresponding x-coordinate in the curve grid coordinate system; For the Gaussian approximation point The corresponding x-coordinate in the curve grid coordinate system; When the polynomial = At that time, determine the spatial metric at the Gaussian point fp. The value is : = ; When the polynomial =- At that time, determine the spatial metric at the Gaussian point fm. The value is : = ; Similarly, by adaptively modifying the above formula, the spatial metrics at Gaussian points fm and fp can be obtained. , and ).

[0034] Step S201222: Determine the Jacobian of each Gaussian point based on each approximation polynomial; The Jacobian ratio of each Gaussian point is determined based on the spatial metric corresponding to each Gaussian point. For example, the Jacobian ratio of the Gaussian point fp is: ; in, Spatial metric at Gaussian point fp The value; Spatial metric at Gaussian point fp The value; Spatial metric at Gaussian point fp The value of ; similarly, by adapting the above formula, the Jacobian of the corresponding Gaussian point can be determined for the remaining Gaussian points.

[0035] In one embodiment, the step of determining the flux corresponding to each Gaussian point based on the fluid parameter data corresponding to each first grid, the Jacobian of each Gaussian point, and a preset reconstruction method, and obtaining the grid boundary flux corresponding to each first grid, includes: Step S201231: Determine the left and right limit values ​​of the conserved quantities at each Gaussian point based on the fluid parameter data corresponding to each first grid. Step S201232: Based on each left limit value, each right limit value, and each Gaussian point Jacobian, determine the flux corresponding to each Gaussian point, and obtain the grid boundary flux corresponding to each first grid. The grid boundary flux corresponding to each first grid is determined based on a preset reconstruction method (Simple-WENO reconstruction can be selected). Specifically, for example, the grid boundary flux corresponding to the Gaussian point fp can be expressed as: ; is a monotonic flux function, where Let fp be the left limit at the Gaussian point; This is the right limit at the Gaussian point fp; similarly, the Jacobian of the Gaussian point (including the Gaussian point fm, etc.) can be determined using the above formula. When solving for the left and right limits at the Gaussian point fp, it is necessary to first determine the line average value on the boundary of the first grid based on the average value of the physical quantities on the boundary where the Gaussian point fp is located: ; ; in, This is the average value of the left line of the right boundary corresponding to the first grid. This represents the average value of the left physical quantity corresponding to the right boundary of the first grid. This is the average value of the right line of the right boundary corresponding to the first grid. This represents the average value of the right physical quantity at the right boundary corresponding to the first grid. The left limit at Gaussian point fp is determined based on the Simple-WENO reconstruction and the line average values ​​on the boundaries of each first grid. The right limit at the Gaussian point fp The left limit at the Gaussian point fm And the right limit at the Gaussian point fm ; Calculate the grid boundary flux at the Gaussian point fp based on Rusanov flux: ; in, The largest eigenvalue of the linearized Roe-mean Jacobian matrix in the reconstruction template for Simple-WENO reconstruction; in the above process, when solving for the grid boundary flux corresponding to the Gaussian point fp, it is necessary to determine the fluid parameters (including density, velocity, and pressure) at the Gaussian point fp. ; ; ; ; in, This represents the density at the Gaussian point fp; This represents the velocity component along the horizontal axis at the Gaussian point fp. This represents the velocity component along the vertical axis at the Gaussian point fp; This represents the pressure at the Gaussian point fp; The specific heat ratio (i.e., the adiabatic index) is used. Similarly, by adaptively modifying the above formula, the grid boundary flux corresponding to the other boundaries of the first grid can be obtained.

[0036] In one embodiment, the steps provided in this embodiment for determining the prediction operator value and projection operator value corresponding to the fluid to be simulated based on the curve conservation quantity include: Step S2031: Based on the layer number of each second grid and the curve conservation quantity corresponding to each second grid, determine the first prediction operator value, the second prediction operator value, and the projection operator value corresponding to each second grid: ; ; ; in, The projection operator value corresponding to the j-th second grid in the l-th layer; The first prediction operator value corresponding to the j-th second grid in the l-th layer; The value of the second prediction operator corresponding to the j-th second grid in the l-th layer; This is the curve conservation quantity corresponding to the 2jth second grid in the (l+1)th layer; This is the curve conservation quantity corresponding to the (2j+1)th second grid in the (l+1)th layer; This is the curve conservation quantity corresponding to the j-th second grid in the l-th layer; This is the curve conservation quantity corresponding to the (j+1)th second grid in the l-th layer; This is the curve conservation quantity corresponding to the (j-1)th second grid in the l-th layer; These are the preset interpolation coefficients; Step S2032: Determine the prediction operator value corresponding to each second grid based on each first prediction operator value and each second prediction operator value; To ensure that the fluid curve meshes obtained by fluid simulation methods maintain high-order accuracy and geometric conservation laws at different levels, prediction and projection operators are used to transfer data between different mesh levels. For example, in a fluid Cartesian mesh, the dynamic mesh (including fluid curve meshes and fluid Cartesian meshes) is denoted as... , The maximum number of layers in the fluid mesh, at the th Layered mesh The average value of the first Cartesian conservation quantity corresponding to the j-th first grid is The projection operator value corresponding to the fluid Cartesian mesh for: ; in, This is the average value of the first Cartesian conserved quantity corresponding to the 2jth first grid in the (l+1)th layer; The average value of the first Cartesian conserved quantity corresponding to the (l+1)th layer and the (2j+1)th first grid; the prediction operator value corresponding to the fluid Cartesian grid. for: ; ; in, It is the average value of the first Cartesian conservation quantity corresponding to the (j+1)th second grid in the l-th layer; This is the average value of the first Cartesian conserved quantity corresponding to the (j-1)th second grid in the l-th layer; These are preset interpolation coefficients used to control the accuracy of the interpolator. To ensure fifth-order accuracy, the preset interpolation coefficients can be set as follows: ; Based on the first Cartesian conservation value corresponding to each first grid, the curve conservation value corresponding to each second grid (i.e., the average value of the curve conservation value corresponding to each second grid) is determined, and the first prediction operator value, second prediction operator value, and projection operator value corresponding to each second grid are obtained: ; ; ; To ensure the geometric conservation law, the values ​​of the first and second prediction operators can also be expressed as: ; ; in, The Jacobian of the j-th second grid; The coordinates of the fine grid (i.e., the second grid relative to a lower level) are determined based on the coordinates of the coarse grid (i.e., the second grid relative to a higher level). For example: =

[0037] in, The coordinates of the curve grid corresponding to the (2j+1)th grid in the (l+1)th layer of the fluid curve grid; The coordinates of the curve grid corresponding to the (j+1)th grid in the l-th fluid curve grid; The coordinates of the curve grid corresponding to the (j-1)th grid in the l-th fluid curve grid; The coordinates of the curve grid corresponding to the (j+2)th grid in the l-th fluid curve grid; The coordinates of the curve grid corresponding to the (j-1)th grid in the l-th fluid curve grid; The coordinates of the curve grid corresponding to the (j+3)th grid in the l-th fluid curve grid; The coordinates of the curve grid corresponding to the (j-3)th grid in the l-th fluid curve grid.

[0038] In one embodiment, the step of performing mesh optimization processing on the fluid curve mesh based on the comparison result of the prediction operator value and the projection operator value provided in this embodiment includes: Step S301: Calculate the difference between the prediction operator value and the projection operator value to obtain the first difference; Step S303: Compare the first difference with the first preset threshold and the second preset threshold respectively. If the first difference is less than the first preset threshold, the fluid curve mesh is coarsened. If the first preset threshold is less than the first difference and the second preset threshold is less than the second preset threshold, the fluid curve mesh is preserved. If the second preset threshold is less than the first difference, the fluid curve mesh is refined. The first difference is determined based on the first prediction operator value, the second prediction operator value, and the projection operator value corresponding to the j-th grid in the l-th layer of the fluid curve mesh. : ; Determine the error threshold corresponding to the l-th layer in the fluid curve mesh. for: ; in, The preset error threshold is used; The first difference corresponding to the j-th grid in the l-th layer of the fluid curve grid is compared with the first preset threshold and the second preset threshold respectively. If the first difference ( < First preset threshold (can be set to 0.4) If the first preset threshold (which can be set to 0.4) is used, then the j-th grid in the l-th layer of the fluid curve mesh is coarsened (that is, the j-th grid in the l-th layer of the fluid curve mesh is coarsened from the l-th layer to the (l-1)-th layer); )≤First difference ( < Second preset threshold (can be set to 0.6) If the second preset threshold (which can be set to 0.6) is applied, then the j-th grid in the l-th layer of the fluid curve mesh is subjected to mesh preservation processing (i.e., the layer number of the j-th grid in the l-th layer of the fluid curve mesh remains unchanged); If the difference is less than or equal to the first difference, then the j-th grid in the l-th layer of the fluid curve grid is refined (that is, the j-th grid in the l-th layer of the fluid curve grid is refined from the l-th layer to the (l+1)-th layer).

[0039] This invention also provides an electronic device, characterized in that it includes: a processor and a storage device; The storage device stores a computer program, which executes the above method when run by a processor.

[0040] The fluid simulation method provided in this invention can achieve fifth-order accuracy when simulating compressible fluids (including compressible fluids). For example, it can simulate various fluid parameters of the fluid to be simulated (including density). The initial conditions for the velocity components u in the x-direction, v in the y-direction, and pressure p are set to the first preset condition: ; The exact solution for the fluid to be simulated is obtained as follows: ; ; ; ; in, This represents the density at the midpoint (x, y) of the fluid curve grid at time t; The horizontal velocity component represents the point (x, y) at the midpoint of the fluid curve grid at time t. The vertical velocity component represents the point (x, y) at the midpoint of the fluid curve grid at time t. This represents the pressure at the midpoint (x, y) of the fluid curve grid at time t; Establish the transformation equations between the curve grid (i.e., physical space) coordinate system and the Cartesian grid (i.e., computational space) coordinate system: = ; = ; The fluid simulation method provided by this invention determines the errors and convergence orders corresponding to different grid numbers under the preset conditions. See Table 1 for a comparison table of errors and convergence orders for different grid numbers of density:

[0041] Table 1. Comparison of density error and convergence order under different grid numbers In Table 1, N is the number of grid cells in the fluid curve grid; The density corresponding to the fluid curve mesh error; The density corresponding to the fluid curve mesh error; The density corresponding to the fluid curve mesh Error; 'order' represents the convergence order corresponding to each error at each grid number. As shown in Table 1, the convergence order corresponding to any type of error at any grid number belongs to... Within the interval, it can be seen that the convergence order of the fluid simulation method provided by the embodiments of the present invention has reached the fifth order of accuracy; Furthermore, considering the free flow conditions during the simulation of the fluid to be simulated, the initial conditions of each fluid parameter of the fluid to be simulated can also be set as a second preset condition: ; When the number of grids in the fluid curve obtained by the simulated fluid method provided in this embodiment of the invention is 100 under the second preset condition, the velocity corresponding to... Error value It can be seen that the simulated fluid method provided in the embodiments of the present invention maintains the geometric conservation law.

[0042] For example, to test the performance of fluid simulation methods in handling the Woodward-Colella explosion wave problem, the initial conditions of each fluid parameter of the fluid to be simulated can be set to a third preset condition: ; Under the third preset condition, the numerical values ​​of the fluid parameters obtained by the fluid simulation method and the uniform mesh algorithm at t=0.038 are shown in [reference]. Figure 2a The diagram illustrates a density comparison under a third preset condition in a fluid simulation method. Figure 2a In the diagram, the black curve (Ref solut) represents the reference curve showing the density of the simulated fluid as a function of x under the third preset condition; the red curve (AMR solut) represents the curve showing the density of the simulated fluid as a function of x obtained by the fluid simulation method under the third preset condition; and the blue curve (Uniform solut) represents the curve showing the density of the simulated fluid as a function of x obtained by the uniform mesh algorithm under the third preset condition. See also... Figure 2b The diagram illustrates a velocity comparison under a third preset condition in a fluid simulation method. Figure 2b In the diagram, the black curve (Ref solut) represents the reference curve showing the velocity of the simulated fluid as a function of x under the third preset condition; the red curve (AMR solut) represents the curve showing the velocity of the simulated fluid as a function of x obtained by the fluid simulation method under the third preset condition; and the blue curve (Uniform solut) represents the curve showing the velocity of the simulated fluid as a function of x obtained by the uniform mesh algorithm under the third preset condition. See also... Figure 2c The diagram illustrates a pressure comparison under a third preset condition in a fluid simulation method. Figure 2c In the diagram, the black curve (Ref solut) represents the reference curve of the pressure of the fluid to be simulated changing with the x value under the third preset condition, the red curve (AMR solut) represents the curve of the pressure of the fluid to be simulated changing with the x value obtained by the fluid simulation method under the third preset condition, and the blue curve (Uniform solut) represents the curve of the pressure of the fluid to be simulated changing with the x value obtained by the uniform mesh algorithm under the third preset condition. exist Figure 2a , Figure 2b and Figure 2cIn the diagram, the red curve is closer to the black curve, indicating that under the third preset condition, the density, velocity, and pressure of the fluid to be simulated obtained by the fluid simulation method provided in this embodiment of the invention are closer to the reference solution. This proves that the fluid simulation method is less susceptible to the Woodward-Clara explosion wave problem during the simulation of the fluid to be simulated. See also... Figure 3 The diagram shown illustrates a comparison of the number of grid cells under a third preset condition in a fluid simulation method. Figure 3 In the diagram, the blue curve (Blast problem non-adaptive) represents the change in the number of grid cells (i.e., the finest resolution) obtained using the uniform mesh algorithm over time, while the red curve (Blast problem adaptive) represents the change in the number of grid cells (i.e., the finest resolution) obtained using the fluid simulation algorithm over time. Figure 3 It can be seen that the fluid simulation method provided in this embodiment of the invention generates more grids in a shorter time than the uniform grid algorithm when simulating the fluid to be simulated, and it has higher efficiency. For example, to test the performance of fluid simulation methods in handling Shu-Osher wave interaction problems, the initial conditions of each fluid parameter of the fluid to be simulated can be set as a fourth preset condition: ; Under the fourth preset condition, the numerical values ​​of the fluid parameters obtained by the fluid simulation method and the uniform mesh algorithm at t=1.8 are shown in [reference]. Figure 4a A schematic diagram illustrating density comparison under the fourth preset condition in a fluid simulation method is shown below. Figure 4b The diagram illustrates a comparison of local densities under a fourth preset condition in a fluid simulation method. Figure 4a and Figure 4b In the diagram, the black curve (Ref solut) represents the reference curve showing the density of the fluid to be simulated as a function of x under the fourth preset condition; the red curve (AMR solut) represents the curve showing the density of the fluid to be simulated as a function of x obtained by the fluid simulation method under the fourth preset condition; and the blue curve (Uniform solut) represents the curve showing the density of the fluid to be simulated as a function of x obtained by the uniform mesh algorithm under the fourth preset condition. Figure 4b From Figure 4a A schematic diagram illustrating the density contrast of a drastically changing local area extracted from the image; see also Figure 4c The diagram illustrates a velocity comparison under a fourth preset condition in a fluid simulation method. Figure 4cIn the diagram, the black curve (Ref solut) represents the reference curve showing the velocity of the simulated fluid as a function of x under the fourth preset condition; the red curve (AMR solut) represents the curve showing the velocity of the simulated fluid as a function of x obtained by the fluid simulation method under the fourth preset condition; and the blue curve (Uniform solut) represents the curve showing the velocity of the simulated fluid as a function of x obtained by the uniform mesh algorithm under the fourth preset condition. See also... Figure 4d One of the ones shown is Figure 4d In the diagram, the black curve (Ref solut) represents the reference curve of the pressure of the fluid to be simulated as a function of x under the fourth preset condition; the red curve (AMR solut) represents the curve of the pressure of the fluid to be simulated as a function of x obtained by the fluid simulation method under the fourth preset condition; and the blue curve (Uniform solut) represents the curve of the pressure of the fluid to be simulated as a function of x obtained by the uniform mesh algorithm under the fourth preset condition. exist Figure 4a , Figure 4b , Figure 4c and Figure 4d In the diagram, the red curve is closer to the black curve, indicating that under the fourth preset condition, the density, velocity, and pressure of the fluid to be simulated obtained by the fluid simulation method provided in this embodiment of the invention are closer to the reference solution. This proves that the fluid simulation method is less susceptible to the influence of the Shu-Osher wave interaction problem during the simulation of the fluid to be simulated. At the same time, under the fourth preset condition, the fluid curve grid generated by the fluid simulation method has only 592 grids, while the reference solution is based on a fluid curve grid with 1024 grids (i.e., 1024 finest resolution). Therefore, the fluid simulation method provided in this embodiment of the invention can solve for the fluid parameter data corresponding to the 1024 finest resolution with only 592 grids, and the effect of its generated fluid curve grid is better. For example, to test the performance of fluid simulation methods in handling high density ratio problems, the initial conditions of each fluid parameter of the fluid to be simulated can be set to the fifth preset condition: ; Under the fifth preset condition, the numerical values ​​of the fluid parameters obtained by the fluid simulation method and the uniform mesh algorithm at t=0.15 are shown in [reference]. Figure 5a A schematic diagram illustrating density comparison under the fifth preset condition in a fluid simulation method is shown below. Figure 5b The diagram illustrates a comparison of local densities under the fifth preset condition in a fluid simulation method. Figure 5a and Figure 5bIn the diagram, the black curve (Ref solut) represents the reference curve showing the density of the fluid to be simulated as a function of x under the fifth preset condition; the red curve (AMR solut) represents the curve showing the density of the fluid to be simulated as a function of x obtained by the fluid simulation method under the fifth preset condition; and the blue curve (Uniform solut) represents the curve showing the density of the fluid to be simulated as a function of x obtained by the uniform mesh algorithm under the fifth preset condition. Figure 5b From Figure 5a A schematic diagram illustrating the density contrast of a drastically changing local area extracted from the image; see also Figure 5c The diagram illustrates a velocity comparison under the fifth preset condition in a fluid simulation method. Figure 5c In the diagram, the black curve (Ref solution) represents the reference curve showing the velocity of the simulated fluid as a function of x under the fifth preset condition; the red curve (AMR solution) represents the curve showing the velocity of the simulated fluid as a function of x obtained by the fluid simulation method under the fifth preset condition; and the blue curve (Uniform solution) represents the curve showing the velocity of the simulated fluid as a function of x obtained by the uniform mesh algorithm under the fifth preset condition. See also... Figure 5d The diagram shown illustrates a pressure comparison under the fifth preset condition in a fluid simulation method. Figure 5d In the diagram, the black curve (Ref solut) represents the reference curve of the pressure of the fluid to be simulated as a function of x under the fifth preset condition; the red curve (AMR solut) represents the curve of the pressure of the fluid to be simulated as a function of x obtained by the fluid simulation method under the fifth preset condition; and the blue curve (Uniform solut) represents the curve of the pressure of the fluid to be simulated as a function of x obtained by the uniform mesh algorithm under the fifth preset condition. exist Figure 5a , Figure 5b , Figure 5c and Figure 5d In the diagram, the red curve is closer to the black curve, indicating that under the fifth preset condition, the density, velocity, and pressure of the fluid to be simulated obtained by the fluid simulation method provided in this embodiment of the invention are closer to the reference solution. This proves that the fluid simulation method is less susceptible to the high density ratio problem during the simulation of the fluid to be simulated, and has a lower computational cost. For example, to test the performance of fluid simulation methods in handling two-dimensional Riemann problems, the initial conditions of each fluid parameter of the fluid to be simulated can be set to the sixth preset condition: ; Under the sixth preset condition, the fluid simulation method provided in the experimental embodiment of the present invention is used to perform six adaptive densifications to obtain the fluid curve mesh. The consistent mesh algorithm uses the same number of meshes as after the six adaptive densifications to generate the fluid curve mesh. See [link to relevant documentation]. Figure 6aThe diagram illustrates the density of the fluid curve mesh obtained under the sixth preset condition in a fluid simulation method. (See attached diagram.) Figure 6b In one fluid simulation method, the density grid diagram of the fluid curve grid obtained by the uniform grid algorithm under the sixth preset condition is shown in [reference]. Figure 6c The diagram shows a density calculation block of the fluid curve mesh obtained by the fluid simulation method under the sixth preset condition, in one of the fluid simulation methods. Figure 6a , Figure 6b and Figure 6c In the diagram, different colors represent different densities of the fluid curve grid, which is... Figure 6a and Figure 6b It can be seen that, compared with the fluid curve mesh obtained by the uniform mesh algorithm, the fluid curve mesh obtained by the fluid simulation method provided in this embodiment of the invention has a more accurate density distribution in the central region of the fluid curve mesh, and can adaptively capture shock waves and eddies; see also Figure 6d The diagram shows a schematic of the fluid curve mesh obtained by the fluid simulation method under the sixth preset condition in one of the fluid simulation methods. Figure 6c and Figure 6d In this method, the size of the grid area represents the fineness of each part of the fluid curve grid. For the parts of the fluid to be simulated that need to be refined, a small grid area is used for fine processing. For the parts of the fluid to be simulated that do not require high precision, a large grid area is used to maintain its coarsening level. The fluid simulation method provided in this embodiment of the invention can achieve the resolution requirements of the fluid curve grid while saving approximately 76% of the grid amount. For example, to test the performance of fluid simulation methods in handling the problem of supersonic flow around a cylinder, the initial conditions of each fluid parameter of the fluid to be simulated can be set as the seventh preset condition: ; Under the seventh preset condition, fluid curve meshes for incoming Mach numbers of 5, 8, and 10 were obtained based on the fluid simulation method provided in the experimental embodiment of the present invention. See [link / reference]. Figure 7a The diagram shows a density grid of the fluid curve obtained by the fluid simulation method under the seventh preset condition of 5 incoming Mach number. (See attached diagram.) Figure 7b The diagram shows a density grid of the fluid curve obtained by the fluid simulation method under the seventh preset condition of 8 incoming Mach number. (See attached diagram.) Figure 7c One of the examples shown is... Figure 7a , Figure 7b and Figure 7cIn this method, different colors represent different densities of the fluid curve grid, and the size of the grid area represents the level of detail of each part of the fluid curve grid. Under normal circumstances, the fluid simulation method provided by this invention can save approximately 59.4% of the computational cost compared with the uniform grid algorithm.

[0043] In the description of this invention, it should be noted that the terms "upper", "lower", "front", "horizontal", etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or apparatus referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this invention.

[0044] In the description of this invention, it should be noted that, unless otherwise explicitly specified and limited, the term "installation" should be interpreted broadly. For example, it can refer to a fixed connection, a detachable connection, or an integral connection; it can refer to a mechanical connection or an electrical connection; it can refer to a direct connection or an indirect connection through an intermediate medium; it can refer to the internal connection of two devices. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.

[0045] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A fluid simulation method, characterized in that, include: A fluid curve mesh is constructed based on the fluid to be simulated, and the fluid parameter data of the fluid to be simulated is obtained; wherein, the fluid parameter data includes density data, velocity data, pressure data and energy data; Based on the fluid parameter data, determine the prediction operator value and projection operator value corresponding to the fluid to be simulated; The fluid curve mesh is optimized based on the comparison results of the predicted operator value and the projected operator value; wherein the optimization process includes mesh refinement, mesh coarsening and mesh preservation.

2. The fluid simulation method according to claim 1, wherein the step of constructing a fluid curve mesh based on the fluid to be simulated and obtaining the fluid parameter data of the fluid to be simulated includes: The fluid curve mesh is constructed based on the fluid to be simulated; wherein the fluid curve mesh is located in the curve mesh coordinate system; The fluid curve mesh is transformed from the curve mesh coordinate system to the Cartesian mesh coordinate system to obtain the fluid Cartesian mesh; Determine the fluid parameter data corresponding to each first grid in the fluid Cartesian grid.

3. The fluid simulation method according to claim 2, wherein the step of determining the prediction operator value and projection operator value corresponding to the fluid to be simulated based on the fluid parameter data includes: Based on the fluid parameter data and the coordinate system Jacobian, the curve conservation quantity corresponding to the fluid to be simulated is determined; wherein, the coordinate system Jacobian is the Jacobian corresponding to the transformation between the curve grid coordinate system and the Cartesian grid coordinate system; The prediction operator value and projection operator value corresponding to the fluid to be simulated are determined based on the curve conservation quantity.

4. The fluid simulation method according to claim 3, wherein the step of determining the curve-conserving quantity corresponding to the fluid to be simulated based on the fluid parameter data and the coordinate system Jacobian includes: Based on the fluid parameter data corresponding to each of the first grids, the grid boundary flux and the first Cartesian conservation quantity corresponding to each of the first grids are determined; wherein, the grid boundary flux is the flux corresponding to the boundary of the first grid; The curve conservation quantity corresponding to each second grid in the fluid curve grid is determined based on each of the first Cartesian conservation quantities and the Jacobian coordinate system.

5. The fluid simulation method according to claim 4, wherein the step of determining the grid boundary flux and the first Cartesian conservation quantity corresponding to each of the first grids based on the fluid parameter data corresponding to each of the first grids includes: Gaussian points at the boundaries of each of the first grid cells are determined based on Gaussian integrals. The Jacobian of each Gaussian point is determined based on the Gaussian polynomial approximation method. Based on the fluid parameter data corresponding to each first grid, the Jacobian of each Gaussian point and the preset reconstruction method, the flux corresponding to each Gaussian point is determined, and the grid boundary flux corresponding to each first grid is obtained. The second Cartesian conservation quantity corresponding to each of the first grids is determined based on the fluid parameter data corresponding to each of the first grids and the coordinate system Jacobian. A Cartesian conserved quantity corresponding to each of the first grids is determined based on each of the second Cartesian conserved quantities and each of the grid boundary fluxes.

6. The fluid simulation method according to claim 4, wherein the step of determining the Jacobian of each Gaussian point based on the Gaussian polynomial approximation method comprises: An approximation polynomial corresponding to each Gaussian point is established based on the Gaussian curve coordinates of the Gaussian approximation points corresponding to each Gaussian point; wherein, the Gaussian curve coordinates are located in the curve grid coordinate system; The Jacobian of each Gaussian point is determined based on each of the approximation polynomials.

7. The fluid simulation method according to claim 4, wherein the step of determining the flux corresponding to each Gaussian point based on the fluid parameter data corresponding to each first grid, the Jacobian of each Gaussian point, and a preset reconstruction method, and obtaining the grid boundary flux corresponding to each first grid, includes: Based on the fluid parameter data corresponding to each of the first grids, determine the left and right limit values ​​of the conserved quantities at each Gaussian point; Based on the left limit value, the right limit value, and the Jacobian of each Gaussian point, the flux corresponding to each Gaussian point is determined, and the grid boundary flux corresponding to each first grid is obtained.

8. The fluid simulation method according to claim 4, wherein the step of determining the prediction operator value and projection operator value corresponding to the fluid to be simulated based on the curve conservation quantity includes: Based on the layer number of each second grid and the curve conservation quantity corresponding to each second grid, the first prediction operator value, the second prediction operator value, and the projection operator value corresponding to each second grid are determined: ; ; ; in, The projection operator value corresponding to the j-th second grid in the l-th layer; The value of the first prediction operator corresponding to the j-th second grid in the l-th layer; The value of the second prediction operator corresponding to the j-th second grid in the l-th layer; This is the curve conservation quantity corresponding to the 2jth second grid in the (l+1)th layer; This is the curve conservation quantity corresponding to the (2j+1)th second grid in the (l+1)th layer; This is the curve conservation quantity corresponding to the j-th second grid in the l-th layer; This is the curve conservation quantity corresponding to the (j+1)th second grid in the l-th layer; This is the curve conservation quantity corresponding to the (j-1)th second grid in the l-th layer; These are the preset interpolation coefficients; The prediction operator value corresponding to each second grid is determined based on each of the first prediction operator values ​​and each of the second prediction operator values.

9. The fluid simulation method according to claim 1, wherein the step of performing mesh optimization processing on the fluid curve mesh based on the comparison result of the prediction operator value and the projection operator value includes: Calculate the difference between the prediction operator value and the projection operator value to obtain a first difference; The first difference is compared with the first preset threshold and the second preset threshold respectively. If the first difference is less than the first preset threshold, the fluid curve mesh is coarsened. If the first preset threshold ≤ the first difference < the second preset threshold, then the fluid curve mesh will be processed to preserve the mesh. If the second preset threshold is less than or equal to the first difference, then the fluid curve mesh is subjected to mesh densification processing.

10. An electronic device, characterized in that, include: Processors and storage devices; The storage device stores a computer program that, when executed by the processor, performs the method as described in any one of claims 1 to 9.