Numerical value and square cavity driving flow simulation method and system based on mixed high-order compact difference method
By adopting the hybrid high-order compaction difference method in numerical simulation, the problems of accuracy and memory consumption when solving retuning equations in the prior art are solved, and high-precision square cavity driving flow simulation is realized, meeting the demand for the capture of the main vortex and the secondary vortex details.
Patent Information
- Application Number
- CN202411938204.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-26
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2044-12-26
AI Technical Summary
When solving the retuning equation, it is difficult for existing differential methods to maintain high-order accuracy while maintaining the compactness of the differential template, resulting in excessive computational memory consumption and cannot meet the details capture requirements of square cavity drive flow simulation for the main vortex and secondary vortex.
The numerical simulation method based on the hybrid higher-order compaction difference method is adopted to construct control equations, introduce intermediate variables, discretely coupled Poisson equations, and use Newman boundary conditions at the boundary point to discrete the higher-order compaction difference format.
It realizes the high-precision numerical simulation results on a coarse grid, reduces computational memory consumption, and captures eddy current characteristics more accurately, meeting the needs of high-precision and low hardware costs.
Smart Images

Figure CN119849245A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of high-order difference numerical simulation, and in particular relates to a numerical and square cavity driven flow simulation method and system based on a mixed high-order compact difference method. Background Art
[0002] Numerical simulation is equivalent to numerical experiment, that is, to verify theories, explore phenomena or predict unknown results without conducting high-cost physical experiments. For example, in fluid mechanics research, numerical simulation can provide parameter references for experimental design, and physical experiments are used to verify simulation results. Therefore, numerical simulation is widely used in many fields.
[0003] The reharmonic equation is a fourth-order partial differential equation arising in the field of continuum mechanics. It is currently being actively applied in many fields. For example, in elasticity mechanics, the reharmonic equation is used to describe the deformation of thin plates during bending, and thus can calculate the bending and deformation of structural components under load in the structural analysis of bridges and buildings. In fluid mechanics, the reharmonic equation is often used to describe the stream function and velocity potential of steady flow, and is used to simulate and predict flow patterns in the ocean and atmosphere, and can participate in the design and optimization of fluid transport systems, such as pipelines and ventilation systems. It can be seen that numerical simulations based on solving the reharmonic equation are widely used in many fields, and the accuracy of their numerical solutions is crucial.
[0004] In fluid mechanics, the study of cavity-driven flow can be used to optimize the design of mixing reactors to improve the efficiency of chemical production. For example, in pharmaceutical factories, by simulating cavity-driven flow and analyzing the distribution of velocity field, stream function and vortex function, dead zones and inefficient vortex areas in the reactor can be identified. Adjusting the sliding speed of the reactor cover and the cavity geometry (such as designing an arc-shaped bottom) can effectively improve fluid mixing performance, reduce mixing time and improve product uniformity. At the same time, the wall shear force distribution is analyzed through vortex function, the equipment structure is optimized, and wear or failure caused by stress concentration is avoided. The optimized design can significantly improve mixing efficiency and equipment stability, providing theoretical guidance for industrial practice.
[0005] In geological fluid simulation, the square cavity driven flow model can be used to study the flow behavior in the magma cavity and reveal the impact of volcanic activity on the crustal structure. In the magma cavity, the magma produces complex flows due to thermal convection, density differences and pressure gradients. This flow directly affects the rising, cooling and mixing of chemical components of the magma. By simulating the flow in the cavity, it is possible to predict the movement pattern of magma under different geological conditions, such as vortex formation, turbulent characteristics and heat exchange effects with surrounding rocks. These studies can help scientists understand the triggering mechanism of volcanic eruptions, the scale of eruptions and the long-term impact of volcanic activities on crustal deformation, while providing a theoretical basis for geological disaster prediction and magma resource development.
[0006] Therefore, the simulation research of square cavity driven flow based on solving the reharmonic equation is extremely important in this field.
[0007] The finite difference method (FDM) discretizes continuous differential equations and converts them into a set of algebraic equations, thereby calculating approximate solutions on discrete grids. Among them, high-order and compact difference methods perform well in capturing the details and features of complex problems, especially when dealing with high-frequency fluctuation problems in fields such as fluid mechanics, acoustics and electromagnetism, and can simulate physical phenomena more accurately. However, when using the difference format to solve the reharmonic equation in the prior art, in order to obtain high-order accuracy, the compactness of the difference template will be destroyed, that is, the information outside the center point is used; or in order to ensure the compactness of the difference template, the calculation accuracy at the boundary points is sacrificed, that is, the global error can only have first-order or second-order accuracy under the infinite norm estimation; or the goal is achieved by introducing more basic unknowns. Its idea is similar to the combined compact difference format. The number of its basic unknowns increases with the increase of spatial dimensions, which is easy to cause the deterioration of computational memory and computational efficiency. It cannot meet the requirements of square cavity driven flow simulation for capturing the details of the primary and secondary vortices, as well as the requirements of high precision and low hardware cost for numerical simulation applications. Summary of the invention
[0008] The present invention aims to solve the problems of accuracy and computational memory consumption in the numerical simulation of numerical models that satisfy the reharmonic equations using existing differential methods, and in particular to meet the requirements of high accuracy and low hardware cost for cavity-driven flow simulation based on solving the reharmonic equations, so as to more accurately capture vortices and sub-vortices, improve the accuracy of numerical simulation results, and reduce computational memory consumption, thereby providing a numerical and cavity-driven flow simulation method and system based on a hybrid high-order compact difference method.
[0009] To this end, the present invention provides the following technical solutions:
[0010] In one aspect, the present invention provides a numerical simulation method based on a hybrid high-order compact difference method, which is applied to numerical simulation of a target variable satisfying a retuned equation in a target region Ω, and the method comprises the following steps:
[0011] S1: Construct the control equation of the target variable u expressed by the retuned equation, and l ,x r ]×[y l ,y r ] to obtain the discrete grid point area
[0012]
[0013] Where f is the source term of the control equation, u n For u at the border The normal derivative at g D is the specified Dirichlet boundary condition, g N is the specified Newman boundary condition, is the boundary of the target region Ω, (x i ,y j ) is the grid point coordinate, h is the grid step size, (N+1)×(N+1) is the number of grid points, i and j are the grid point numbers in the x and y directions, in means in the corresponding target area Ω, and on means on the boundary x l ,x r ,y l ,y r is the grid boundary coordinate value;
[0014] S2: define an intermediate variable v=Δu, and then reduce the control equation to two coupled Poisson equations Δu=v, Δv=f;
[0015] S3: Determine the input grid point (x i ,y j ) is an internal grid point or a boundary point of the target region Ω. If it is an internal grid point, the two coupled Poisson equations are discretized using a classical high-order compact difference format; if it is a boundary point and a corner point, the boundary conditions of the target variable u are differentiated to obtain the solution of the intermediate variable v at the corner point; if it is a boundary point and not a corner point, the boundary discrete equation of the intermediate variable v is constructed using a high-order difference format with a passive term extension of the Poisson equation Δu=v;
[0016] S4: After all grid points of the target area Ω are discretely input, a discrete linear system is constructed, and the discrete linear system is solved by a direct method or an iterative method to obtain numerical simulation results of the target variable u and the intermediate variable v of the target area Ω.
[0017] Preferably, if the input grid point (x i ,y j ) is the boundary point of the target area Ω and is not a corner point. Based on the Newman boundary condition, the high-order difference format Poisson equation Δu=v is extended by the passive term for discretization, which is expressed as:
[0018]
[0019] in,
[0020] In the formula, are the coefficients of the difference equation, They are the target variable u and the intermediate variable v at point The approximate value of is the Newman boundary condition g N (y) at point The value at i k ,j k is the local index subscript, g N (y) represents the Newman boundary condition g of input y N .
[0021] The obtained high-order compact differential discrete equations at other boundary points other than corner points are expressed as:
[0022] (x0,y j )
[0023]
[0024] In the formula, (g N ) i g N At x=x i The value at (g N ) j g N (y) when y=y j The value at .
[0025] Preferably, if the input grid point (x i ,y j ) is the internal grid point of the target region Ω. When the two coupled Poisson equations are discretized using the classical high-order compact difference scheme, the internal point (x i ,y j ) is expressed as:
[0026]
[0027] Among them, f ij is the source term f at point (x i ,y j ) at the point where the grid is. U and V are the approximate values of u and v respectively. The subscripts i and j in U, V and f correspond to the coordinates of the grid points.
[0028] Preferably, the target variable is a stream function or a deflection of a thin plate.
[0029] Preferably, the target variable is the deflection ω' of the thin plate, and the corresponding control equation is expressed as:
[0030] Δ 2 ω'=q / D
[0031] Where q is the externally applied load and D is the stiffness of the thin plate, both of which are known values given by the actual problem model.
[0032] After the deflection distribution of the thin plate under the uniformly distributed load is obtained by using steps S1-S4, the maximum deformation position of the thin plate is identified based on the deflection distribution, or the bending moment and shear stress of the thin plate are calculated based on the deflection distribution.
[0033] In another aspect, the present invention further provides a square cavity driven flow simulation based on a hybrid high-order compact difference method, comprising the following steps:
[0034] Step 1: Construct the control equation of the square cavity driven flow and mesh the target area Ω, where (N+1)×(N+1) is the number of grid points, and i and j are the order of the grid points in the x and y directions;
[0035] -μΔ 2 ψ=f,Ω=[0,1] 2
[0036] ψ=0,ψ n =1, at the upper boundary;
[0037] ψ=0,ψ n =0, at other boundaries;
[0038] Where ψ is the square cavity driven flow to be simulated, μ is the given viscosity coefficient, f is the externally applied source term, i.e., the source term of the control equation, and ψ n is the normal derivative of the stream function on the boundary, Ω is the target area, ψ n is the normal derivative of ψ at the boundary. The value of ψ at the boundary corresponds to the Dirichlet boundary condition g D ψ at the boundary n The value corresponds to the Newman boundary condition g N ;
[0039] Step 2: Introduce the vorticity ω as an intermediate variable and reduce the original control equation to two coupled Poisson equations; Δψ=ω and -μΔω=f;
[0040] Step 3: Determine the input grid point (x i ,y j ) is an internal grid point or a boundary point of the target region Ω. If it is an internal grid point, the two coupled Poisson equations are discretized using a classical high-order compact difference format; if it is a boundary point and a corner point, the boundary conditions of the square cavity driven flow ψ are differentiated to obtain the solution of the vorticity ω at the corner point; if it is a boundary point and not a corner point, the passive term of the Poisson equation Δψ=ω of the stream function ψ is extended using a high-order difference format to construct a discrete equation at the boundary of the vorticity ω;
[0041] Step 4: When all grid points are input, the discrete linear system is obtained It is the vector formed by the values of boundary conditions and source terms at the grid points; directly solve or iteratively solve the discrete linear system to obtain the approximate values of flow and vorticity [ψ; ω].
[0042] Optionally, after obtaining the approximate values of the flow ψ and the vorticity ω in step 4, the method further comprises: drawing a contour map of the flow ψ or performing numerical differentiation on the flow ψ to obtain a velocity distribution of the fluid.
[0043] In a third aspect, the present invention provides a numerical simulation system based on the above method, comprising:
[0044] The construction module is used to construct the control equation of the target variable u expressed as a retuned equation and to calculate the target region Ω = [x l ,x r ]×[y l ,y r ]Mesh the grid to get the grid point area
[0045]
[0046] Where f is the source term of the control equation, u n For u at the border The normal derivative at g D is the specified Dirichlet boundary condition, g N is the specified Newman boundary condition, is the boundary of the target region Ω, (x i ,y j ) is the grid point coordinate, h is the grid step size, (N+1)×(N+1) is the number of grid points, i and j are the grid point numbers in the x and y directions, in means in the corresponding target area Ω, and on means on the boundary x l ,x r ,y l ,y r is the grid boundary coordinate value;
[0047] An order reduction module is used to define an intermediate variable v=Δu, thereby reducing the control equation to two coupled Poisson equations Δu=v, Δb=f;
[0048] Discrete module, used to determine the input grid point (x i ,y j) is an internal grid point or a boundary point of the target region Ω. If it is an internal grid point, the two coupled Poisson equations are discretized using a classical high-order compact difference format; if it is a boundary point and a corner point, the boundary conditions of the target variable u are differentiated to obtain the solution of the intermediate variable v at the corner point; if it is a boundary point and not a corner point, the boundary discrete equation of the intermediate variable v is constructed using a high-order difference format with a passive term extension of the Poisson equation Δu=v;
[0049] The numerical calculation module is used to complete the discrete input of all grid points in the target area Ω, construct a discrete linear system, and use a direct method or an iterative method to solve the discrete linear system to obtain the numerical simulation results of the target parameters of the target area Ω.
[0050] In a fourth aspect, the present invention provides a computer device, comprising at least:
[0051] one or more processors;
[0052] a memory storing one or more computer programs;
[0053] The processor calls the computer program to implement:
[0054] A step of a numerical simulation method based on a hybrid high-order compact difference method or a step of simulating a square cavity driven flow based on a hybrid high-order compact difference method.
[0055] In a fifth aspect, the present invention provides a computer-readable storage medium storing a computer program, wherein the computer program is called by a processor to implement:
[0056] A step of a numerical simulation method based on a hybrid high-order compact difference method or a step of simulating a square cavity driven flow based on a hybrid high-order compact difference method.
[0057] Beneficial Effects
[0058] The technical solution of the present invention designs a new high-order compact difference format, which is applied to the numerical simulation of models that satisfy the reharmonic equations, thereby further expanding the application space of models that satisfy the reharmonic equations in the fields of elasticity, fluid mechanics, etc., meeting the high-precision numerical solution requirements of numerical simulations based on solving the reharmonic equations, and obtaining high precision on coarser grids, thereby reducing the hardware requirements for high-precision numerical simulations and significantly reducing memory consumption.
[0059] Among them, the high-order compact difference format designed by the technical solution of the present invention uses the non-extended high-order compact difference format at the Newman boundary at the boundary grid points to form a complete high-order compact difference format for solving the reharmonic equation, which has the advantages of:
[0060] From the given calculation examples, high-order accuracy is obtained on a coarser grid; high-oscillation solutions are simulated more effectively, so more accurate numerical simulations can be performed for high-oscillation models; from the format itself, because the calculation template only involves grid points that are h steps away, it is more practical for infinite regions and three-dimensional models, thereby reducing the required memory; from the perspective of theoretical analysis, it has a smaller error constant; the grid direction effect is greatly reduced; and it is easier to perform error analysis and optimal error estimation. When the technical solution of the present invention is applied to numerical simulation, the efficiency and accuracy of the simulation can be greatly improved, and by introducing intermediate variables, the number of unknown quantities in the solution process does not increase with the dimension, which is more in line with the application requirements of numerical models and more in line with the requirements of high-oscillation models.
[0061] In particular, when this numerical simulation method is specifically applied to the simulation of square cavity driven flow, it can achieve sharp capture of the details of the main vortex and the secondary vortex, laying the foundation for drawing the contour map of the flow ψ and obtaining the velocity distribution of the fluid, and reducing the hardware requirements and the memory consumption of the square cavity driven flow simulation, so that the square cavity driven flow simulation can fully play its role in the pharmaceutical field and the geological fluid field. When this numerical simulation method is applied to the field of thin plates, the high-precision deflection distribution obtained can clearly identify the maximum deformation position of the thin plate, which usually corresponds to the area with concentrated force or weak support, which is crucial for evaluating the strength and safety of the thin plate. In addition, the deflection distribution can be further used to calculate the bending moment and shear stress of the thin plate, revealing the internal stress distribution and stress concentration area, thereby providing a scientific basis for optimizing the geometric design, material selection and boundary support conditions of the thin plate. These analyses can effectively improve the bending stiffness and structural stability of the thin plate, ensuring its reliability and durability in actual use. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] Figure 1 It is a flow chart of the technical idea of the numerical simulation method provided by the present invention.
[0063] Figure 2 Contour plot of the flow ψ for the cavity-driven flow simulation. DETAILED DESCRIPTION
[0064] In order to make the purpose, technical scheme and advantages of the present invention clearer, the technical scheme of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. The embodiments described in this application are only embodiments of a part of the present invention, rather than all embodiments. Based on the spirit of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work belong to the protection scope of the present invention.
[0065] The present invention provides a numerical simulation method based on a hybrid high-order compact difference method, which is used for numerical simulation of target variables satisfying the re-harmonic equation in the target region Ω, that is, it can be understood that the variable models satisfying the re-harmonic equation can all use the technical solution of the present invention to realize the numerical model of the variables. Such as the deformation of a thin plate during bending, the numerical simulation of the stream function and vorticity of a fluid. Among them, the technical ideas of the present invention are as follows:
[0066] S1: Construct the control equation of the target variable u expressed by the retuned equation, and l ,x r ]×[y l ,y r ]Mesh the grid
[0067]
[0068] Where f is the source term of the control equation, u n For u at the border The normal derivative at g D is the specified Dirichlet boundary condition, g N is the specified Newman boundary condition, is the boundary of the target region Ω, (x i ,y j ) is the grid point coordinate, h is the grid step size, (N+1)×(N+1) is the number of grid points, x l ,x r ,y l ,y r is the grid boundary coordinate value;
[0069] S2: Define the intermediate variable v=Δu, and then reduce the control equation, which is a fourth-order reharmonic equation, to two coupled Poisson equations Δu=v, Δv=f.
[0070] It should be understood that in different applications, the target variable u is different, and thus the defined intermediate variable v is also different; however, regardless of the numerical simulation of the specific target variable, the technical idea is universal, which is to introduce intermediate variables to reduce the control equation of the fourth-order reharmonic equation to two coupled Poisson equations.
[0071] S3: Determine the input grid point (x i ,y j) is an internal grid point or boundary point of the target region Ω. If it is an internal grid point, the classical high-order compact difference format is used to discretize the two coupled Poisson equations (Δu=v, Δv=f); if it is a boundary point and a corner point, the boundary conditions of the target variable u are differentiated to obtain the solution of the intermediate variable v at the corner point; if it is a boundary point and not a corner point, the passive term extension high-order difference format is used to discretize the Poisson equation Δu=v to obtain the boundary discrete equation of the Poisson equation of v.
[0072] Among them, at the grid point (x i ,y j ), for the Poisson equation Δu=v, v is regarded as the source term for discretization, that is, the high-order compact difference discretization at the interior point can be obtained:
[0073]
[0074] Among them, f ij is the source term f at point (x i ,y j ); U and V are the approximate values of u and v respectively; the subscripts of U, V, and f correspond to the coordinates of the grid points, such as U i,j It means u is at point (x i ,y j ) is the approximate value at .
[0075] At the boundary corner, that is, the corner point (x l ,y l )、(x l ,y r )、(x r ,y l )、(x r ,y r ), using the existing boundary conditions, derive the Dirichlet boundary conditions of the intermediate variables at the corner points of the solution region. l ,u l ) as an example, according to the Dirichlet boundary condition of u, u=g D We can know the boundary (x l ,y)、(x,y l ) at u(x l ,y)=g D (y) and u(x,y l ) = g D (x). Therefore, by taking the second derivative we can get The same method can be used to obtain v at other corner points (x l ,y r ),(x r ,y l ),(x r ,y r) The value at that point, i.e., differentiating the boundary conditions. Such a treatment can be regarded as imposing Dirichlet boundary conditions on the intermediate variable v at the corner points. For the sake of explanation below, define the target region Ω = [x l , x r × [y l , y r , where 0 < i, j < N. Therefore, the corner points can also be labeled as: (x0, y0), (x0, y N ), (x N , y0), (x N , y N ).
[0076] At other boundary points (the four sides of the square region), i.e., {(x0, y j ), (x N , t j ), (x i , y0), (x i , y N ) | 0 < i, j < N}, taking the boundary point (x0, y j ) as an example, directly impose the Dirichlet boundary condition u = g D on the original variable u, and use the non-extended Neumann boundary condition u n = g N to discretize the third-order compact difference scheme for the intermediate variable v at the boundary point;
[0077] That is, utilize the existence of the Neumann boundary condition u n = g N and Δu = v at the boundary. If v is regarded as the source term of the Poisson equation Δu = v, use the high-order compact difference scheme for the Neumann boundary condition of the Poisson equation:
[0078]
[0079] Where:
[0080]
[0081] In the formula, are all given difference coefficients, are the approximate values of the unknowns u, v at the point , is the value of g N (y) at .
[0082] Apply the above difference scheme to the solution of the biharmonic equation, i.e.:
[0083]
[0084] The other boundaries (x N ,y j ),(x i ,y0),(x i ,y N ) is a high-order compact difference discretization,
[0085]
[0086] Among them, (g N ) i g N At x=x i The value at (g N ) j g N At y=y j The value at .
[0087] That is, the grid at the boundary points:
[0088]
[0089] v ij ={(g D ) xx +(g D ) yy} ij ,(i,j)=(0,0),(0,N),(N,0),(N,N);
[0090]
[0091] Among them, 0 <i,j<N;
[0092] (g D ) xx ,(g D ) yy is defined as D The second-order derivative of (i,j) = (0,0), (0,N), (N,0), (N,N) is the corner point of the region, corresponding to (x0,y0), (x0,y N )、(x N ,y0)、(x N ,y N ).
[0093] S4: After all grid points of the target area Ω are discretely input, assemble the coefficient matrix, and use a direct method or an iterative method to solve the discrete linear system to obtain the numerical simulation results of the target parameters of the target area Ω.
[0094] Among them, for the Poisson equation of u, the discrete system constructed based on discrete points: A h U+BV=F1,Ah , B, F1 are {U ij}The matrix formed by the corresponding coefficients, {V ij} The matrix formed by the corresponding coefficients, the Dirichlet boundary conditions and the vector composed of 0 elements;
[0095] For Poisson's equation of v, the discrete system constructed based on discrete points: C h U+D h V=F2,C h , D h , F2 are {U ij}The matrix formed by the corresponding coefficients, {V ij}The matrix formed by the corresponding coefficients, the vector composed of the Newman boundary conditions and the source terms.
[0096] Furthermore, the final algebraic system can be obtained by assembling the linear system after discretization of the coupled Poisson equation:
[0097]
[0098] By using direct solution or iterative solution method, high-precision numerical solutions U and V of the original harmonic equation can be obtained.
[0099] Examples:
[0100] The target variable is set as: u = sin(25x)cos(5y), and the calculation area is Ω = [0,1] × [0,1]. The solution is very oscillating in the solution area, and it is difficult for the low-order format to obtain more accurate numerical results on a coarser grid. Table 1 gives the numerical solution errors under different coarse and fine grids. Columns 2-3 are the errors and convergence orders of the target variables (basic unknowns) of the reharmonic equation, and columns 4-5 are the errors and convergence orders of the intermediate variables (unknowns). Both can achieve high-order convergence; column 6 is the condition number of the discrete linear system coefficient matrix. It can be found that for the fourth-order reharmonic equation, the condition number only maintains The growth rate of. It is found that the format constructed by the present invention obtains better results for approximating the oscillating solution. In Table 2, the difference format constructed by the present invention (the final algorithm S1-S4 obtained by the whole invention) and the 13-point second-order difference format are compared. Whether in terms of error or coefficient matrix condition number, the format constructed by the present invention is more superior.
[0101] Table 1 Numerical results of high-order compact difference method for reharmonic equation
[0102]
[0103] Table 2 Comparison of high-order compact difference format and 13-point second-order format
[0104]
[0105] Problems without analytical solutions
[0106] Assuming the source term is zero in the entire region, the boundary conditions are:
[0107]
[0108] Since there is no analytical solution to this problem, the numerical solution of 2048×2048 grid is used as the reference solution, and Table 3 can be obtained. It can be found from the table that the third-order convergence can still be maintained for the numerical solution.
[0109] Table 3 Numerical results of high-order compact difference method for reharmonic equation
[0110]
[0111] It should be understood that the technical idea of the present invention is applicable to the numerical simulation of the target variable in the target region Ω that satisfies the retuning equation. The following embodiment will be described by taking the numerical simulation of the square cavity driven flow as an example. The numerical simulation of the square cavity driven flow can help optimize industrial processes, improve the efficiency and quality of mixing, cooling and material processing, design and improve fluid equipment, and optimize the performance of microscale devices in microfluidic technology, thereby improving the accuracy and reliability of overall engineering design and operation.
[0112] This embodiment provides a square cavity driven flow simulation based on a hybrid high-order compact difference method, comprising the following steps:
[0113] Step 1:
[0114] The control equations of the cavity driven flow are constructed, and the target area Ω is meshed.
[0115] -μΔ 2 ψ=f,∈[0,1] 2
[0116] ψ=0,ψ n =1, at the upper boundary;
[0117] ψ=0,ψ n =0, at other boundaries;
[0118] Where, ψ is the square cavity driven flow to be numerically simulated, μ is the given viscosity coefficient, which is set to 1 in this example, and f is the externally applied source term, which is set to 0 in this embodiment. n is the normal derivative of ψ at the boundary, corresponding to formula 1, and the value of ψ at the boundary corresponds to g D ψ at the boundary n The value corresponds to g N .
[0119] Step 2: Introduce an intermediate variable (vorticity ω) to reduce the original governing equations to two coupled Poisson equations: Δψ = ω and -μΔω = f.
[0120] Step 3: Determine whether the input grid point (x i , y j ) is an interior grid point or a boundary point of the target region Ω. If it is an interior grid point, discretize the two coupled Poisson equations using the classical high-order compact difference scheme; if it is a boundary point and a corner point, differentiate the boundary condition of the cavity-driven flow ψ to obtain the solution of vorticity ω at the corner point; if it is a boundary point and not a corner point, construct a source-term-free extended high-order difference scheme for discretizing vorticity ω using the Poisson equation of the cavity-driven flow ψ, Δψ = ω.
[0121] Among them, based on the boundary conditions of the governing equations, calculate the values of vorticity at the corner points of the solution region (i.e., the corresponding Dirichlet boundary conditions); it is mainly obtained by differentiating the boundary conditions of ψ. The values of vorticity ω at the corner points are: ω(0,0) = 0, ω(0,1) = 0, ω(1,0) = 0, ω(1,1) = 0; where (0,0), (0,1), (1,0), and (1,1) are the four corner points of the cavity.
[0122] If it is an interior region grid point, discretize the coupled Poisson equations using the classical high-order compact difference scheme; if it is a boundary point, construct a source-term-free extended high-order difference scheme for discretizing vorticity ω using the Poisson equation of the cavity-driven flow ψ, Δψ = ω.
[0123] For interior points, discretize the coupled Poisson equations using the classical high-order compact difference scheme:
[0124] For Δψ = ω and -μΔω = 0, the discretization equations at interior points {(x i , y j )|0 < i, j < N} are as follows:
[0125]
[0126] Construct a high-order difference scheme for the Poisson equation at Neumann boundary points, that is, construct a source-term-free extended high-order difference scheme;
[0127] Take the left boundary of the cavity as an example:
[0128]
[0129] Among them, g N = 0, and
[0130]
[0131] At the boundary point grid (taking the left boundary as an example, i.e., i = 0):
[0132] ψ ij =0
[0133] ω ij =0 at j=0,N
[0134] i=0,j≠0,N can similarly obtain the discrete format at i=0,j=0,N+1.
[0135] Step 4: When all grid points are input, assemble them in the order of input numbers i+(N+1)(j-1) to obtain the discrete linear system Directly solve or iteratively solve (BICGStab, GMRES, etc.) the discrete coupled Poisson equation to obtain approximate values of flow and vorticity [ψ; ω].
[0136] Step 5: Draw the contour map of the square cavity driven flow ψ, such as Figure 2 As shown, a primary vortex and two secondary vortices can be observed in detail on a coarser grid, and the velocity distribution of the fluid can be obtained by further numerically differentiating the stream function.
[0137] It should be noted that the square cavity is understood as a square area, and the study of the square cavity driven flow can be used to optimize the design of the mixing reactor to improve the efficiency of chemical production. For example, in a pharmaceutical factory, the square cavity driven flow is simulated by the technical solution of the present invention, and the distribution of the velocity field, stream function and vortex function is analyzed, and the dead zone and inefficient vortex area in the reactor can be identified. Adjusting the sliding speed of the cover plate and the cavity geometry of the reactor (such as designing an arc bottom) can effectively improve the fluid mixing performance, reduce the mixing time and improve the uniformity of the product. At the same time, after simulating the square cavity driven flow by the technical solution of the present invention to obtain the vortex function distribution, the wall shear force distribution is analyzed by the vortex function, the equipment structure is optimized, and the wear or failure caused by stress concentration is avoided. The optimized design can significantly improve the mixing efficiency and equipment stability, and provide theoretical guidance for industrial practice. In geological fluid simulation, the square cavity driven flow model can be used to study the flow behavior in the magma cavity and reveal the impact of volcanic activity on the crustal structure. In the magma cavity, the magma produces complex flow due to the effects of thermal convection, density difference and pressure gradient, which directly affects the rising, cooling and mixing process of the magma chemical composition. By simulating the flow in the cavity through the technical solution of the present invention (first setting the relevant simulation parameters according to the application scenario, and then using the technical solution of the present invention for numerical simulation), the movement pattern of magma under different geological conditions can be predicted, such as vortex formation, turbulent characteristics and heat exchange effects with surrounding rocks. These studies can help scientists understand the triggering mechanism of volcanic eruptions, the scale of eruptions, and the long-term impact of volcanic activities on crustal deformation, while providing a theoretical basis for geological disaster prediction and magma resource development.
[0138] It should be understood that this embodiment takes the square cavity driven flow as an example, and other feasible embodiments are not constrained to be the square cavity driven flow. For example, if the target variable is the deflection ω' of the thin plate, the corresponding control equation is expressed as:
[0139] Δ 2 ω'=q / D
[0140] Where q is the externally applied load and D is the stiffness of the plate.
[0141] The bending problem of a rectangular thin plate under a uniformly distributed load is a classic application in thin plate mechanics. The deflection distribution ω'(x,y) of the thin plate under a uniformly distributed load can be obtained through the technical solution of the present invention. By analyzing the deflection distribution, the maximum deformation position of the thin plate can be clearly identified, which usually corresponds to the area with concentrated force or weak support, which is crucial for evaluating the strength and safety of the thin plate. In addition, the deflection distribution can be further used to calculate the bending moment and shear stress of the thin plate, revealing the internal stress distribution and stress concentration area, thereby providing a scientific basis for optimizing the geometric design, material selection and boundary support conditions of the thin plate. These analyses can effectively improve the bending stiffness and structural stability of the thin plate, ensuring its reliability and durability in actual use.
[0142] In some embodiments, the present invention provides a numerical simulation system based on the above method, comprising:
[0143] A construction module is used to construct a control equation of the target variable u expressed as a retuned equation, and to mesh the target area Ω to obtain a grid;
[0144]
[0145] An order reduction module is used to define an intermediate variable v=Δu, thereby reducing the control equation to two coupled Poisson equations Δu=v, Δv=f;
[0146] Discrete module, used to determine the input grid point (x i ,y j ) is an internal grid point or a boundary point of the target region Ω. If it is an internal grid point, the two coupled Poisson equations are discretized using a classical high-order compact difference format; if it is a boundary point and a corner point, the boundary conditions of the target variable u are differentiated to obtain the solution of the intermediate variable v at the corner point; if it is a boundary point and not a corner point, the boundary discrete equation of the intermediate variable v is constructed using a high-order difference format with a passive term extension of the Poisson equation Δu=v;
[0147] The numerical calculation module is used to complete the discrete input of all grid points in the target area Ω, assemble the coefficient matrix, and use the direct method or the iterative method to solve the discrete linear system to obtain the numerical simulation results of the target parameters of the target area Ω.
[0148] It should be understood that when the numerical simulation system is a square cavity driven flow simulation system, it is composed of a construction module, a reduction module, a discrete module, and a numerical calculation module, and its functions are also the same.
[0149] Please refer to the above method content for the specific implementation process of each module. The present invention will not be repeated here, and the division of the above functional modules is only for example. In some embodiments, some functional modules can be merged, and some functional modules can be split. Each functional module can be implemented in software or hardware or a combination of software and hardware. Among them, the hardware and software equipment includes but is not limited to general-purpose computer equipment, programmable gate arrays, digital signal processors, microprocessors and their corresponding programming or burning software.
[0150] In some embodiments, the present invention also provides a computer device, comprising at least: one or more processors and a memory storing one or more computer programs; wherein the processor calls the computer program to implement: the steps of a numerical simulation method based on a hybrid high-order compact difference method.
[0151] Specific implementation:
[0152] Constructing a control equation of the target variable u expressed as a retuned equation, and meshing the target region Ω to obtain a grid;
[0153]
[0154] An intermediate variable v=Δu is defined, and the control equation is reduced to two coupled Poisson equations Δu=v, Δv=f;
[0155] Determine the input grid point (x i ,y j ) is an internal grid point or a boundary point of the target region Ω. If it is an internal grid point, the two coupled Poisson equations are discretized using a classical high-order compact difference format; if it is a boundary point and a corner point, the boundary conditions of the target variable u are differentiated to obtain the solution of the intermediate variable v at the corner point; if it is a boundary point and not a corner point, the boundary discrete equation of the intermediate variable v is constructed using a high-order difference format with a passive term extension of the Poisson equation Δu=v;
[0156] After all grid points of the target area Ω are discretely input, a coefficient matrix is assembled, and a direct method or an iterative method is used to solve the discrete linear system to obtain the numerical simulation results of the target parameters of the target area Ω.
[0157] For the specific implementation process of each step, please refer to the description of the above method.
[0158] It should be understood that in the embodiments of the present invention, the processor may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The memory may include a read-only memory and a random access memory, and provide instructions and data to the processor. A portion of the memory may also include a non-volatile random access memory. For example, the memory may also store information about the type of device.
[0159] In some embodiments, the present invention provides a computer-readable storage medium storing a computer program, wherein the computer program is called by a processor to implement: steps of a numerical simulation method based on a hybrid high-order compact difference method.
[0160] Specifically, the following are implemented:
[0161] Constructing a control equation of the target variable u expressed as a retuned equation, and meshing the target region Ω to obtain a grid;
[0162]
[0163] An intermediate variable v=Δu is defined, and the control equation is reduced to two coupled Poisson equations Δu=v, Δv=f;
[0164] Determine the input grid point (x i ,y j ) is an internal grid point or a boundary point of the target region Ω. If it is an internal grid point, the two coupled Poisson equations are discretized using a classical high-order compact difference format; if it is a boundary point and a corner point, the boundary conditions of the target variable u are differentiated to obtain the solution of the intermediate variable v at the corner point; if it is a boundary point and not a corner point, the boundary discrete equation of the intermediate variable v is constructed using a high-order difference format with a passive term extension of the Poisson equation Δu=v;
[0165] After all grid points of the target area Ω are discretely input, a coefficient matrix is assembled, and a direct method or an iterative method is used to solve the discrete linear system to obtain the numerical simulation results of the target parameters of the target area Ω.
[0166] For the specific implementation process of each step, please refer to the description of the above method.
[0167] The readable storage medium is a computer-readable storage medium, which may be an internal storage unit of the software and hardware device described in any of the aforementioned embodiments, such as a hard disk or memory of a controller. The readable storage medium may also be an external storage device of the controller, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the controller. Furthermore, the readable storage medium may also include both an internal storage unit of the controller and an external storage device. The readable storage medium is used to store the computer program and other programs and data required by the controller. The readable storage medium may also be used to temporarily store data that has been output or is to be output.
[0168] Based on this understanding, the technical solution of the present invention, in essence or in other words, the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned readable storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., various media that can store program codes.
[0169] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-readable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes. The present application is a device for realizing the function specified in one flow or multiple flows of the flow chart and / or one or multiple blocks of the block diagram with reference to the instructions executed by the processor according to the method, device (system) and computer program product of the embodiment of the present application. These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction device, which realizes the function specified in one flow or multiple flows of the flow chart and / or one or multiple blocks of the block diagram. These computer program instructions may also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, whereby the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0170] It should be emphasized that the examples described in the present invention are illustrative rather than restrictive, and therefore the present invention is not limited to the examples described in the specific embodiments. Any other embodiments derived by those skilled in the art based on the technical solution of the present invention that do not depart from the purpose and scope of the present invention, whether modified or replaced, also fall within the scope of protection of the present invention.
Claims
1. A numerical simulation method based on a hybrid high-order compact difference method, characterized in that: The method is applied to numerical simulation of a target variable satisfying the retuned equation in a target region Ω, and the method comprises the following steps: S1: Construct the control equation of the target variable u expressed by the retuned equation, and l ,x r ]×[y l ,y r ] to obtain the discrete grid point area Where f is the source term of the control equation, u n For u at the border The normal derivative at g D is the specified Dirichlet boundary condition, g N is the specified Newman boundary condition, is the boundary of the target region Ω, (x i ,y j ) is the grid point coordinate, h is the grid step size, (N+1)×(N+1) is the number of grid points, i and j are the grid point numbers in the x and y directions, in means in the corresponding target area Ω, and on means on the boundary x l ,x r ,y l ,y r is the grid boundary value; S2: define an intermediate variable v=Δu, and then reduce the control equation to two coupled Poisson equations Δu=v, Δv=f; S3: Determine the input grid point (x i ,y j ) is an internal grid point or a boundary point of the target region Ω. If it is an internal grid point, the two coupled Poisson equations are discretized using a classical high-order compact difference format; if it is a boundary point and a corner point, the boundary conditions of the target variable u are differentiated to obtain the solution of the intermediate variable v at the corner point; if it is a boundary point and not a corner point, the boundary discrete equation of the intermediate variable v is constructed using a high-order difference format with a passive term extension of the Poisson equation Δu=v; S4: After all grid points of the target area Ω are input, a discrete linear system is constructed, and the discrete linear system is solved by a direct method or an iterative method to obtain numerical simulation results of the target variable u and the intermediate variable v of the target area Ω.
2. The method according to claim 1, characterized in that: If the input grid point (x i ,y j ) is the boundary point of the target region Ω and is not a corner point. Based on the Newman boundary condition, the Poisson equation Δu=v of the intermediate variable v is discretized using the passive term extension high-order difference format, which is expressed as: in, In the formula, are the coefficients of the difference equation, They are the target variable u and the intermediate variable v at point The approximate value of is the Newman boundary condition g N (y) at point The value at i k ,j k is the local index subscript, g N (y) represents the Newman boundary condition g of input y N .
3. The method according to claim 1, characterized in that: If the input grid point (x i ,y j ) is the internal grid point of the target region Ω. When the two coupled Poisson equations are discretized using the classical high-order compact difference scheme, the internal point (x i ,y j ) is a high-order compact difference discrete equation, the specific form is: Among them, f ij is the source term f at point (x i ,y j ) at the point where the grid is. U and V are the approximate values of u and v respectively. The subscripts i and j in U, V and f correspond to the coordinates of the grid points.
4. The method according to claim 1, characterized in that: The target variable is the stream function or the deflection of the thin plate.
5. The method according to claim 4, characterized in that: If the target variable is the deflection ω' of the thin plate, the corresponding control equation is expressed as: D 2 ω'=q / D Where q is the externally applied load and D is the stiffness of the thin plate; After the deflection distribution of the thin plate under the uniformly distributed load is obtained by using steps S1-S4, the maximum deformation position of the thin plate is identified based on the deflection distribution, or the bending moment and shear stress of the thin plate are calculated based on the deflection distribution.
6. A method for simulating square cavity driven flow based on a hybrid high-order compact difference method, characterized in that: The following steps are involved: Step 1: Construct the control equation of the square cavity driven flow and mesh the target area Ω, where (N+1)×(N+1) is the number of grid points, and i and j are the order of the grid points in the x and y directions; -mD 2 ψ=f,Ω= [ 0.1 ] 2 ψ=0,ψ n =1, at the upper boundary; ψ=0,ψ n =0, at other boundaries; Where ψ is the square cavity driven flow to be simulated, μ is the given viscosity coefficient, f is the externally applied source term, i.e., the source term of the control equation, and ψ n is the normal derivative of the stream function ψ on the boundary, Ω is the target area, and the value of ψ at the boundary corresponds to the Dirichlet boundary condition g D ψ at the boundary n The value corresponds to the Newman boundary condition g N ; Step 2: Introduce the vorticity ω as an intermediate variable and reduce the original control equation to two coupled Poisson equations; Δψ=ω and -μΔω=f; Step 3: Determine the input grid point (x i ,y j ) is an internal grid point or a boundary point of the target region Ω. If it is an internal grid point, the two coupled Poisson equations are discretized using a classical high-order compact difference format; if it is a boundary point and a corner point, the boundary conditions of the square cavity driven flow ψ are differentiated to obtain the solution of the vorticity ω at the corner point; if it is a boundary point and not a corner point, the passive term of the Poisson equation Δψ=ω of the stream function ψ is extended using a high-order difference format to construct a discrete equation at the boundary of the vorticity ω; Step 4: When all grid points are input, assemble the discrete linear system It is the vector formed by the values of boundary conditions and source terms at the grid points; directly solve or iteratively solve the discrete linear system to obtain the approximate values of flow and vorticity [ψ; ω].
7. The method according to claim 6, characterized in that: After obtaining the approximate values of the flow ψ and the vorticity ω in step 4, the method further comprises: drawing a contour map of the flow ψ or performing numerical differentiation on the flow ψ to obtain a velocity distribution of the fluid.
8. A numerical simulation system based on the method according to any one of claims 1 to 5, characterized in that: include: The construction module is used to construct the control equation of the target variable u expressed as a retuned equation and to calculate the target region Ω = [x l ,x r ]×[y l ,y r ]Mesh the grid to get the grid point area Where f is the source term of the control equation, u n For u at the border The normal derivative at g D is the specified Dirichlet boundary condition, g N is the specified Newman boundary condition, is the boundary of the target region Ω, (x i ,y j ) is the grid point coordinate, h is the grid step size, (N+1)×(N+1) is the number of grid points, i and j are the grid point numbers in the x and y directions, in means in the corresponding target area Ω, and on means on the boundary x l ,x r ,y l ,y r is the grid boundary coordinate value; An order reduction module is used to define an intermediate variable v=Δu, thereby reducing the control equation to two coupled Poisson equations Δu=v, Δv=f; Discrete module, used to determine the input grid point (x i ,y j ) is an internal grid point or a boundary point of the target region Ω. If it is an internal grid point, the two coupled Poisson equations are discretized using a classical high-order compact difference format; if it is a boundary point and a corner point, the boundary conditions of the target variable u are differentiated to obtain the solution of the intermediate variable v at the corner point; If it is a boundary point and not a corner point, the boundary discrete equation of the intermediate variable v is constructed by extending the high-order difference format with the passive term of the Poisson equation Δu=v; The numerical calculation module is used to complete the discrete input of all grid points in the target area Ω, construct a discrete linear system, and use a direct method or an iterative method to solve the discrete linear system to obtain the numerical simulation results of the target parameters of the target area Ω.
9. A computer device, characterized in that: At least: one or more processors; a memory storing one or more computer programs; The processor calls the computer program to implement: The steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: A computer program is stored, which is called by a processor to implement: The steps of the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Image denoising method based on mixed high-order partial differential equation model
CN111724318A
Multi-extreme learning machine model construction method and device and computer equipment
CN112070157A
Self-adaptive grid method for calculating fluid-structure interaction
CN118520720A