Disclosure of Invention
Aiming at the defects in the prior art, the flow field calculation method combining the discontinuous finite element and the immersion boundary method solves the problem that the flow of high Reynolds number wall surfaces is difficult to flow respectively in the process of performing numerical simulation on the boundary layer structure by using the conventional boundary entering method.
In order to achieve the purpose of the invention, the invention adopts the technical scheme that: a flow field calculation method combining an interrupted finite element method and an immersion boundary method comprises the following steps:
s1, generating right-angle grid units for the whole flow field;
s2, constructing shape functions of all units in the flow field based on the generated right-angle grid units;
s3, initializing a flow field;
and S4, performing time advancing circulation on each unit of the flow field by using an immersion boundary method based on the shape function of each unit of the structure to obtain flow field calculation data.
Further, in step S1, in the process of generating the rectangular grid cells, the encryption process is performed near the wall surface.
Further, the step S2 is specifically:
s21, in the rectangular grid cells, marking the rectangular cells near the wall surface as near-wall cells, and defining a xi-eta coordinate system of the near-wall cells according to the direction of the local wall surface;
wherein xi is a wall surface tangential direction, and eta is a wall surface normal direction;
s22, respectively selecting polynomials of corresponding times in xi and eta directions in the near wall unit, constructing corresponding anisotropic shape functions, and forming an approximate space corresponding to a near wall unit solution, namely an approximate space of a discontinuous finite element;
and simultaneously, adopting an isotropic shape function of an x-y space in a non-near-wall unit to complete the shape function construction of all units in the flow field.
Further, in step S21, the ξ - η coordinate system of the near-wall unit is determined specifically as follows:
in the rectangular grid unit, for the rectangular unit of the coarse rectangular grid in the x-y space, a xi-eta coordinate system is set at the centroid of the unit, and the xi-eta is obtained by arbitrarily rotating the x-y coordinate system of the coordinate system.
Further, in step S22, when the gradient of the tangential velocity field in the vicinity of the wall surface in the wall surface normal direction is larger than the gradient of the wall surface tangential direction in the viscous flow, the degree of the η -direction corresponding polynomial is larger than the degree of the ξ -direction corresponding polynomial.
Further, the step S22 is specifically:
establishing a local coordinate system xi-eta by taking the unit centroid as an origin (0,0), and setting the distribution of the flow field variable u (xi, eta) in the unit to be approximately obtained by the linear combination of corresponding shape functions, namely:
in the formula, B
(m,n)(xi, eta) is a shape function, the highest degree of xi direction is n times, the highest degree of eta direction is m times, the polynomial of xi is p times, the polynomial of eta is q times,
coefficients that are shape functions;
the degree of freedom and the shape function of the (p +1) × (q +1) term pair are obtained based on u (xi, η) and are used as an approximate space of the near wall unit solution.
Further, the step S4 is specifically:
s41, applying physical boundary conditions;
s42, based on the applied physical boundary conditions, using the immersion boundary method to correct the freedom degree of the wall surface cut in the right-angle grid unit;
s43, calculating residual errors of discontinuous finite elements of the units according to the shape functions of the constructed units;
s44, performing time advancing by adopting a set time dispersion mode, and updating the degree of freedom of solution variables in the units according to the residual errors corresponding to each unit;
wherein each cell comprises a near-wall cell and a non-near-wall cell;
s45, calculating current flow field data according to the degree of freedom of solution variables in each current unit and outputting the data;
s46, repeating the steps S41-S45 until the set time step length is reached;
and S47, completing time advancing circulation, storing output flow field data and completing flow field calculation.
Further, the flow field data in the step S45 includes an aerodynamic coefficient, a fluid density, a fluid pressure, and a fluid temperature.
The invention has the beneficial effects that:
the method can greatly improve the flow numerical simulation efficiency of various complex geometric areas in practical engineering application, has good application prospect and is embodied in the following points:
(1) the degree of freedom configuration of the anisotropic shape function discontinuous finite element adopted in the invention does not depend on the shape of the grid, and has better flexibility;
(2) in the invention, the high Reynolds number boundary layer of the irregular wall surface can be really distinguished only by adopting the right-angle grids;
(3) the invention adopts the right-angle grid, which can greatly save the manpower, time and computing resources required by grid generation and can easily realize the step of grid automatic generation in CFD.
Detailed Description
The following description of the embodiments of the present invention is provided to facilitate the understanding of the present invention by those skilled in the art, but it should be understood that the present invention is not limited to the scope of the embodiments, and it will be apparent to those skilled in the art that various changes may be made without departing from the spirit and scope of the invention as defined and defined in the appended claims, and all matters produced by the invention using the inventive concept are protected.
As shown in fig. 3, a flow field calculation method combining discontinuous finite element and dipping boundary method includes the following steps:
s1, generating right-angle grid units for the whole flow field;
s2, constructing shape functions of all units in the flow field based on the generated right-angle grid units;
s3, initializing a flow field;
and S4, performing time advancing circulation on each unit of the flow field by using an immersion boundary method based on the shape function of each unit of the structure to obtain flow field calculation data.
In step S1 of the present embodiment, in the process of generating the rectangular grid cells, an encryption process is performed near the wall surface to improve the approximation to the irregular wall surface.
In step S2 of this embodiment, an anisotropic shape function discontinuous finite element is constructed, and decoupling of the degree of freedom configuration and the mesh is achieved, that is, the degree of freedom configuration no longer depends on the shape, size, and other factors of the mesh.
The degrees of freedom in the conventional immersion boundary method are arranged at the vertices of the rectangular meshes or the cell centers, and are tightly bound to the mesh shapes, so that since the meshes cannot decompose the wall geometry, the degrees of freedom defined by the coarse rectangular meshes cannot match the wall geometry to the boundary layer anisotropy resolution form. The invention combines the anisotropic shape function discontinuous finite element in the immersion boundary method, and can distinguish the irregular wall surface shape and the thin boundary layer in the coarse right-angle grid.
The discontinuous finite element of the anisotropic function in this embodiment is obtained by sampling any anisotropic shape function and improving on the basis of the taylor unfolding discontinuous finite element method, and based on this, the step S2 specifically includes:
s21, in the rectangular grid cells, marking the rectangular cells near the wall surface as near-wall cells, and defining a xi-eta coordinate system of the near-wall cells according to the direction of the local wall surface;
wherein xi is a wall surface tangential direction, and eta is a wall surface normal direction;
s22, respectively selecting polynomials of corresponding times in xi and eta directions in the near wall unit, constructing corresponding anisotropic shape functions, and forming an approximate space corresponding to a near wall unit solution, namely an approximate space of a discontinuous finite element;
and simultaneously, adopting an isotropic shape function of an x-y space in a non-near-wall unit to complete the shape function construction of all units in the flow field.
In step S21, the method for determining the ξ - η coordinate system of the near-wall unit specifically includes:
in the rectangular grid unit, for the rectangular unit of the coarse rectangular grid in the x-y space, a xi-eta coordinate system is set at the centroid of the unit, and the xi-eta is obtained by arbitrarily rotating the x-y coordinate system of the coordinate system.
As the shape function of the near-wall unit is based on the xi-eta coordinate system, the shape function and the corresponding freedom degree can be matched with the designated direction at will, and the decoupling of the freedom degree configuration and the rectangular grid is realized.
The step S22 is specifically:
establishing a local coordinate system xi-eta by taking the unit centroid as an origin (0,0), and setting the distribution of the flow field variable u (xi, eta) in the unit to be approximately obtained by the linear combination of corresponding shape functions, namely:
in the formula, B
(m,n)(xi, eta) is a shape function, the highest degree of xi direction is n times, the highest degree of eta direction is m times, the polynomial of xi is p times, the polynomial of eta is q times,
coefficients that are shape functions;
obtaining the degree of freedom and the anisotropic shape function of (p +1) × (q +1) term pairing based on u (xi, eta), taking the degree of freedom and the anisotropic shape function as an approximate space of a near-wall unit solution, and performing spatial dispersion on a flow field control equation; since p and q are not necessarily the same, the approximation capability of the approximation space of these shape functions to form the near-wall cell solution is different in both ξ and η directions, i.e., anisotropic for the ξ - η space, in order to better resolve the drastic changes in the normal direction within the wall bounding layer.
Based on the obtained anisotropic shape function discontinuous finite element, in a coarse right-angle grid of the immersion boundary method, the anisotropy characteristics of the irregular wall surface shape and the wall surface boundary layer in the right-angle grid can be distinguished through flexible configuration freedom.
As shown in fig. 4, in step S22 described above, when the gradient of the tangential velocity field in the vicinity of the wall surface in the wall surface normal direction is larger than the gradient of the wall surface tangential direction in the viscous flow, the degree of the η -direction corresponding polynomial expression is larger than the degree of the ξ -direction corresponding polynomial expression. When the variable has larger change in the tangential direction, the tangential polynomial degree can also be properly increased, in short, the polynomial degrees in different directions are self-adaptively adjusted according to the local flow field change to form an anisotropic shape function.
Specifically, the flow field near the wall surface has a larger gradient in the normal direction of the wall surface and a less variable flow field in the tangential direction. In order to analyze the flow field, enough degrees of freedom need to be arranged in the wall surface normal direction, for a right-angle unit close to the wall surface, the wall surface tangential direction and the wall surface normal direction can be selected as a shape function space, for a right-angle unit close to the wall surface, and the wall surface tangential direction and the wall surface normal direction can be selected as a xi-eta coordinate system of the shape function space. Meanwhile, in order to distinguish the drastic change of the flow field near the wall surface in the normal direction (eta direction), a higher-order polynomial can be adopted for the shape function in the eta direction, and a lower-order polynomial can be adopted for the shape function along the flow direction (xi direction) (as shown in fig. 5). In this way, the identification of the wall surface geometric characteristics and the analysis of the anisotropic boundary layer under the coarse right-angle grid can be realized.
Step S4 of this embodiment specifically includes:
s41, applying physical boundary conditions;
s42, based on the applied physical boundary conditions, using the immersion boundary method to correct the freedom degree of the wall surface cut in the right-angle grid unit;
as shown in fig. 6, for a cell cut by a wall surface (in the figure, a dark color is a flow field area, and a light color is a solid area), the value of the degree of freedom is corrected, so that the value of the flow area is almost unchanged, and at the same time, a function is ensured to meet boundary conditions, thereby avoiding boundary application in the sense of an immersion boundary method is completed, and specific embodiments refer to boundary measures of a conventional immersion method, such as cut-cell method, ghost-cell method, grid-less method, and the like;
s43, calculating residual errors of discontinuous finite elements of the units according to the shape functions of the constructed units;
s44, performing time advancing by adopting a set time dispersion mode, and updating the degree of freedom of solution variables in the units according to the residual errors corresponding to each unit;
wherein each cell comprises a near-wall cell and a non-near-wall cell;
s45, calculating current flow field data according to the degree of freedom of solution variables in each current unit and outputting the data;
s46, repeating the steps S41-S45 until the set time step length is reached;
and S47, completing time advancing circulation, storing output flow field data and completing flow field calculation.
The flow field data in the above step S45 includes an aerodynamic coefficient, a fluid density, a fluid pressure, and a fluid temperature.
In the flow field calculation process, the key point of distinguishing the high Reynolds number boundary layer is that enough degrees of freedom are arranged along the normal direction of the wall surface, so that the step length of the normal close-fit radius layer grid is very small, and the step lengths in other directions can be larger, so that the thin boundary layer with high anisotropy can be economically and effectively distinguished.
The invention provides a novel method for realizing flow field analysis by combining an anisotropic shape function and an immersion boundary method, which has the capability of realizing more freedom degree in the wall surface normal direction in a thicker right-angle grid so as to ensure that a high Reynolds number thin boundary layer is distinguished in a thick right-angle grid, and simultaneously reserves the advantages of simple generation and easy realization of automation of the right-angle grid in the immersion boundary method.