Applicable extension method, device and equipment for CFD immersed boundary geometry capture algorithm

By establishing a mesh of immersed solids in a three-dimensional coordinate system and utilizing the projection principle and flood algorithm, the application scope of the CFD immersed boundary geometry capture algorithm is expanded, enabling it to capture solids partially immersed in the fluid, overcoming the limitations of existing technologies and improving computational efficiency and accuracy.

CN119740507BActive Publication Date: 2025-10-03SHANGHAI SHIP & SHIPPING RES INST CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411774444.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-04
Publication Date
2025-10-03
Estimated Expiration
2044-12-04

AI Technical Summary

Technical Problem

Existing CFD immersed boundary geometry capture algorithms can only be applied to solids that are completely immersed in fluids and cannot effectively capture solids that are partially immersed in fluids, such as ships floating on the water surface.

Method used

An applied extension method of the CFD immersed boundary geometry capture algorithm is adopted. By establishing the first solid boundary grid and fluid grid of the immersed solid in the three-dimensional coordinate system, the projection principle and flood algorithm are used to calculate the algebraic distance and position properties of the grid cells, identify the grid cells in the fluid and non-fluid, and determine the coordinates of the piercing point.

Benefits of technology

The application scope of the geometric capture algorithm has been expanded, enabling it to capture not only solids completely immersed in the fluid, but also solids partially immersed in the fluid, improving computational efficiency and accuracy, and making it suitable for more application scenarios such as deep and shallow working conditions of submarines and floating conditions of surface ships.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119740507B_ABST
    Figure CN119740507B_ABST
Patent Text Reader

Abstract

The present invention discloses an application expansion method, device and equipment for a CFD immersed boundary geometry capture algorithm, comprising the following steps: S1, establishing a solid boundary grid and a fluid grid; S2, dividing each quadrilateral grid unit in the solid boundary grid into two triangles; S3, constructing a first envelope block and a second envelope block; S4, determining a first projection point and a second projection point based on the second envelope block intersecting with the first envelope block; S5, determining the vector of the center point of the grid unit in the fluid grid and the algebraic distance from the first projection point to the center point of the grid unit in the corresponding fluid grid; S6, determining the position attributes of the grid unit in the fluid grid corresponding to each first projection point based on each algebraic distance, thereby judging whether it is in the actual fluid; S7, calculating the position attributes of the remaining grid units in the fluid grid using a flood algorithm; S8, determining the pierced triangular grid unit and the coordinates of the piercing point of the triangular grid unit.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of fluid mechanics, and in particular to an application expansion method, device and electronic equipment for a CFD immersion boundary geometry capture algorithm based on a projection principle. Background Art

[0002] In natural science and engineering design, it is often necessary to solve fluid-structure interaction problems with large deformations. Large deformation refers to a significant deformation of the solid shape, which also causes a significant deformation of the fluid computational domain. This deformation has a significant impact on the fluid dynamics calculations.

[0003] Since the basic governing equations of fluid mechanics and their discretization, solution, and post-processing are generally based on the Euler expression method, and the basic governing equations of solid mechanics and their discretization, solution, and post-processing are generally based on the Lagrangian expression method, special numerical methods must be used in the Computational Fluid Dynamics (CFD) solver (the solver is a software component specifically used to solve computational fluid dynamics problems) to process the fluid-solid boundary and calculate the coupled physical quantities of the two, namely: the pressure exerted by the fluid on the solid, the displacement and velocity of the fluid-solid boundary in each time step.

[0004] At present, there are generally two types of numerical methods for fluid-solid boundary to deal with large deformation fluid-solid coupling problems: the moving mesh method and the immersed boundary method.

[0005] The advantage of using a moving mesh approach is its high computational accuracy, as the meshes of the fluid and solid computational domains fit perfectly together, and as the computation progresses, the fluid-solid boundary is fully simulated. Furthermore, when the fluid is viscous and turbulence is considered, the resolution of the boundary layer mesh can be achieved, thus meeting the wall function requirements for y+ and U+. Its disadvantages are:

[0006] 1) The fluid mesh must fit the solid shape, so software is needed to model and discretize the fluid domain (i.e., mesh it);

[0007] 2) Since the shape of the fluid-solid boundary is constantly changing, additional geometric algorithms need to be designed. In each time step, the fluid computational domain is discretized again based on its latest shape, which significantly increases the computational workload and reduces computational efficiency.

[0008] 3) When the fluid-solid boundary may experience severe deformation, the dynamic mesh method may cause numerical instability in the CFD solver;

[0009] 4) In some special application scenarios, such as water pipe cracks, the solid domain breaks, resulting in the dynamic mesh method in the CFD solver being unable to solve such topological difficulties.

[0010] In contrast, the immersed boundary method overcomes the aforementioned drawbacks of the moving mesh method, although computational accuracy may decline due to inadequate alignment between the fluid and solid computational domains. In particular, since the fluid mesh does not need to conform to the solid shape, there's no need to create a fluid mesh using software. Instead, the program simply generates a rectangular fluid domain with length, width, and height parallel to the three coordinate axes, and then divides the fluid domain into rectangular grids with length, width, and height parallel to the three coordinate axes. The immersed boundary method clearly offers advantages over the moving mesh method in solving laminar flow problems at low Reynolds numbers, or large-deformation fluid-solid coupling problems where convection dominates and diffusion can be neglected, and the Euler equations (i.e., the Navier-Stokes equations with the diffusion term removed) are the fundamental governing equations of fluid dynamics.

[0011] A key step in designing and implementing the immersed boundary method is to design and implement a geometry capture algorithm to capture the solid domain (mesh) immersed in the fluid domain (mesh) at each time step. Due to the unpredictable changes in the fluid-solid boundary and the need to perform geometry capture at every time step, the designed geometry capture algorithm must be efficient and reliable. At the same time, the actual application scenarios in natural science and engineering design are diverse, so the designed geometry capture algorithm must be applicable to as many different application scenarios as possible.

[0012] Among the currently designed CFD solver's immersed boundary method geometry capture algorithms, one that is highly efficient and reliable in three-dimensional scenarios is a projection-based CFD solver's immersed boundary method geometry capture algorithm. This algorithm was implemented in the Aero-F CFD solver and demonstrated its efficiency and reliability using multiple application scenarios.

[0013] However, this geometric capture algorithm currently only works for solids completely immersed in a fluid, that is, solids whose boundaries form a closed surface. If the solid is not completely immersed in the fluid, that is, the boundaries do not form a closed surface, such as a ship floating on the water, the algorithm cannot effectively capture the solid. This limits the algorithm's applicability. Summary of the Invention

[0014] To address the problem that existing geometric capture algorithms can only be applied to solids completely immersed in a fluid and cannot effectively capture objects that are not completely immersed in the fluid, this invention proposes a method for expanding the applicability of the CFD immersed boundary geometric capture algorithm. This method can be applied to solids completely or partially immersed in a fluid. The invention also relates to a device and electronic device for expanding the applicability of the CFD immersed boundary geometric capture algorithm.

[0015] The present invention is achieved through the following technical solutions:

[0016] An applied extension method of a CFD immersed boundary geometry capture algorithm for capturing solids fully or partially immersed in a fluid includes the following steps:

[0017] S1: establishing a first solid boundary grid and a fluid grid for immersing a solid in a three-dimensional coordinate system, wherein the first solid boundary grid is immersed in the fluid grid;

[0018] S2: Divide each quadrilateral mesh unit in the first solid boundary mesh into two triangles, and calculate the external normal vector of each divided triangular mesh unit to obtain a second solid boundary mesh;

[0019] S3: For each mesh unit center point in the fluid mesh, construct a first envelope block consisting of the center points of all adjacent mesh units of the mesh unit, wherein the length, width, and height of the first envelope block are parallel to the coordinate axes of the three-dimensional coordinate system; for each triangular mesh unit in the second solid boundary mesh, construct a minimum second envelope block that envelops the triangular mesh unit, wherein the length, width, and height of the second envelope block are parallel to the coordinate axes of the three-dimensional coordinate system;

[0020] S4: for each first envelope block, forming a subset of all triangular mesh cells intersecting the second envelope block with the first envelope block to determine a target submesh, and determining a point in the target submesh closest to the center point of the mesh cell in the first envelope block as a first projection point, and determining a projection point of the center point of the mesh cell in the first envelope block on the plane of the target submesh as a second projection point;

[0021] S5: For each first projection point, based on the projection principle, determine the projection position of the second projection point corresponding to the first projection point inside and outside the three sides / three vertices of the triangular mesh unit of the target sub-mesh, as well as the sharing of the side where the first projection point is located with other triangular mesh units. In combination with different projection position conditions and sharing conditions, calculate the algebraic distance from the first projection point to the center point of the mesh unit in the corresponding fluid mesh according to the outer normal vector of the triangular mesh unit of the target sub-mesh and the vector from the first projection point to the center point of the mesh unit in the corresponding fluid mesh;

[0022] S6: determining the position attributes of the grid cells in the fluid grid corresponding to each of the first projection points based on the algebraic distances, thereby determining whether the grid cells are actually in the fluid;

[0023] S7: Calculate the position attributes of the remaining grid cells in the fluid grid using the flood algorithm, so as to determine whether the remaining grid cells are actually in the fluid;

[0024] S8: Using a traversal algorithm, search for all combination pairs of two adjacent grid cells with different position attributes in the fluid grid, and determine the triangular grid cells of the target sub-grid pierced by each of the combination pairs, and determine the coordinates of the piercing points of the triangular grid cells of the target sub-grid pierced by each of the combination pairs.

[0025] Preferably, in step S5, if the second projection point corresponding to the first projection point is inside the triangular grid unit of the corresponding target sub-grid, the algebraic distance from the first projection point to the center point of the grid unit in the corresponding fluid grid is calculated using formula (1), and the formula (1) is:

[0026]

[0027] Among them, V i Point is the center point of the fluid grid, V' i V i The first projection point of is the external normal vector of the target sub-mesh, dis(V' i ,V i ) represents V' i to V i The algebraic distance of

[0028] If the second projection point corresponding to the first projection point is outside a certain edge of the triangular mesh unit of the target sub-mesh to which it corresponds, and the edge of the triangular mesh unit of the target sub-mesh where the first projection point is located is shared with other triangular mesh units, then the algebraic distance from the first projection point to the center point of the mesh unit in the corresponding fluid mesh is calculated using formula (2), and the formula (2) is:

[0029]

[0030] Among them, V i Point is the center point of the fluid grid, P Vi V i The projection point of the point on the target sub-grid plane (i.e. the second projection point), is the external normal vector of the target sub-mesh, P D The intersection of the vertical line from the farthest vertex D of the target sub-mesh to the target sub-mesh and the target sub-mesh, s v and s c All are intermediate amounts;

[0031] If the second projection point corresponding to the first projection point is outside a certain edge of the triangular mesh unit of the target sub-mesh to which it corresponds, and the edge of the triangular mesh unit of the target sub-mesh where the first projection point is located is not shared with other triangular mesh units, then the algebraic distance from the first projection point to the center point of the mesh unit in the corresponding fluid mesh is calculated using formula (3), and the formula (3) is:

[0032]

[0033] Among them, V i Point is the center point of the grid cell in the fluid grid, V' i V i The first projection point of is the outward normal vector of the target sub-mesh.

[0034] Preferably, in step S5, if the second projection point corresponding to the first projection point is outside a vertex of the triangular mesh unit of the corresponding target sub-mesh, a third projection point is obtained according to a first preset method including extending adjacent triangular mesh units to form an open surface and defining an orthogonal plane, and the algebraic distance from the first projection point to the center point of the mesh unit in the corresponding fluid mesh is calculated based on the projection position of the third projection point inside and outside the three sides of the triangular mesh unit of the target sub-mesh and the sharing of the edge of the triangular mesh unit of the target sub-mesh closest to the nearest point with other triangular mesh units.

[0035] Preferably, in step S5, after obtaining the third projection point, the algebraic distance from the first projection point to the center point of the grid cell in the corresponding fluid grid is calculated using formula (4), and the formula (4) is:

[0036]

[0037] Preferably, the method further comprises:

[0038] For each first projection point, if a second projection point corresponding to the first projection point is outside an edge of a triangular mesh unit of the corresponding target sub-mesh, and the edge of the triangular mesh unit of the target sub-mesh where the first projection point is located is shared with other triangular mesh units in the second solid boundary mesh, then determining whether a center point of the fluid mesh unit corresponding to the first projection point is coplanar with the target sub-mesh;

[0039] If they are on the same plane, the triangular mesh cells in the second solid boundary mesh that share the edge of the triangular mesh cell of the target sub-mesh where the first projection point is located are used as the target sub-mesh corresponding to the first projection point;

[0040] The algebraic distance from the first projection point to the center point of the grid cell in the corresponding fluid grid is calculated using formula (2).

[0041] Preferably, the method for determining whether the center point of the fluid grid unit corresponding to the first projection point is on the same plane as the target subgrid includes:

[0042] Determine a point on the triangle plane of the target sub-grid corresponding to the first projection point, where the center point of the grid unit in the fluid grid corresponds to the first projection point, as a fourth projection point;

[0043] If the magnitude of the vector from the fourth projection point to the center point of the fluid grid unit corresponding to the first projection point is less than a preset magnitude, then the center point of the fluid grid unit corresponding to the first projection point and the target subgrid are on the same plane;

[0044] If the amplitude of the vector from the fourth projection point to the center point of the fluid grid unit corresponding to the first projection point is not less than the preset amplitude, the center point of the fluid grid unit corresponding to the first projection point and the target sub-grid are not on the same plane.

[0045] Preferably, in step S4, the method for determining the target subgrid includes:

[0046] S41: For each first envelope block, if there is a second envelope block intersecting with the first envelope block, determine all grid cells of the second solid boundary grid intersecting with the first envelope block to obtain a plurality of undetermined target subgrids;

[0047] S42: Projecting the center points of the grid cells in the fluid grid in the first envelope block onto the target sub-grid plane to be determined, respectively, to obtain a plurality of projection points;

[0048] S43: Calculating the centroid coordinates of each projection point on its corresponding undetermined target subgrid;

[0049] S44: If the three coordinate values ​​in the barycentric coordinates are all non-negative numbers, the projection point is the undetermined first projection point;

[0050] S45: If two coordinate values ​​of the barycentric coordinates are non-negative and one coordinate value is negative, then the intersection of a perpendicular line from the projection point to the nearest edge line of the corresponding undetermined target sub-grid and the edge line is the undetermined first projection point;

[0051] S46: If two coordinate values ​​of the barycentric coordinates are negative and one coordinate value is non-negative, the nearest vertex from the projection point to the corresponding target sub-mesh to be determined is the first projection point to be determined;

[0052] S47: Determine the first projection point and the target sub-grid based on the distances from all the pending first projection points to the center points of the grid units in the fluid grid in the first envelope block to which they correspond, wherein the first projection point is the point with the shortest distance from all the pending first projection points to the center points of the grid units in the fluid grid in the first envelope block to which they correspond, and the target sub-grid is the pending target sub-grid corresponding to the first projection point.

[0053] Preferably, in step S5, the first preset method includes:

[0054] Determine a plurality of triangular mesh units with the same vertex through all triangular mesh units in the second solid boundary mesh adjacent to the first projection point, wherein a vertex of the triangular mesh units with the same vertex coincides with the first projection point;

[0055] Extending the planes of all the triangular mesh units with the same vertex to obtain open planes with the same vertex;

[0056] Determining an orthogonal plane, wherein the orthogonal plane passes through a center point of a grid cell in the fluid grid corresponding to the first projection point and is orthogonal to a vector from the first projection point to a center point of the grid cell in the fluid grid corresponding to the first projection point;

[0057] Selecting a point on the determined orthogonal plane that is sufficiently far from the center point of the grid cell in the fluid grid corresponding to the first projection point, and whose projection onto the open plane with the same vertex does not coincide with the first projection point, and determining the projection of the point onto the open plane with the same vertex to obtain a fifth projection point;

[0058] The closest point from the fifth projection point to the target sub-grid is determined to obtain the third projection point.

[0059] Preferably, in step S7, the flooding algorithm includes:

[0060] All grid cells in the fluid grid are traversed, and the position attribute of each grid cell in the fluid grid that is adjacent to the grid cell in the fluid grid whose position attribute has been determined and whose position attribute has not been set is set to the same.

[0061] An application expansion device for a CFD immersed boundary geometry capture algorithm comprises a network model management module, a boundary mesh optimization module, an envelope block management module, an algebraic distance calculation module, a position attribute calculation module, and a piercing point calculation module, which are connected in sequence; wherein,

[0062] The network model management module is used to establish a first solid boundary grid and a fluid grid of an immersed solid in a three-dimensional coordinate system, wherein the first solid boundary grid is immersed in the fluid grid;

[0063] The boundary mesh optimization module is used to divide each quadrilateral mesh unit in the first solid boundary mesh into two triangles, and calculate the external normal vector of each triangular mesh unit after the division to obtain a second solid boundary mesh;

[0064] The envelope block management module is configured to construct, for each mesh unit center point in the fluid mesh, a first envelope block consisting of the center points of all adjacent mesh units of the mesh unit, wherein the length, width, and height of the first envelope block are parallel to the coordinate axes of the three-dimensional coordinate system; and, for each triangular mesh unit in the second solid boundary mesh, construct a minimum second envelope block that envelops the triangular mesh unit, wherein the length, width, and height of the second envelope block are parallel to the coordinate axes of the three-dimensional coordinate system.

[0065] The algebraic distance calculation module is used to, for each first envelope block, form a subset of all triangular mesh units intersecting the second envelope block with the first envelope block to determine a target submesh, and determine the point in the target submesh closest to the center point of the mesh unit in the first envelope block as a first projection point, and determine the projection point of the center point of the mesh unit in the first envelope block on the target submesh plane as a second projection point; for each first projection point, based on the projection principle, determine the projection position of the second projection point corresponding to the first projection point inside and outside the three sides / three vertices of the triangular mesh unit of the target submesh and the sharing situation of the side where the first projection point is located with other triangular mesh units, and calculate the algebraic distance from the first projection point to the center point of the mesh unit in the corresponding fluid mesh according to the external normal vector of the triangular mesh unit of the target submesh and the vector from the first projection point to the center point of the mesh unit in the corresponding fluid mesh according to different projection position situations and sharing situations;

[0066] The position attribute calculation module is used to determine the position attributes of the grid cells in the fluid grid corresponding to each of the first projection points based on the algebraic distances, thereby determining whether the grid cells are actually in the fluid; and calculate the position attributes of the remaining grid cells in the fluid grid using a flood algorithm, thereby determining whether the remaining grid cells are actually in the fluid;

[0067] The piercing point calculation module is used to use a traversal algorithm to search for all combination pairs of two adjacent grid units with different position attributes in the fluid grid, and determine the triangular grid units of the target sub-grid pierced by each of the combination pairs, and determine the coordinates of the piercing points of the triangular grid units of the target sub-grid pierced by each of the combination pairs.

[0068] An electronic device comprises: at least one memory for storing programs; and at least one processor for executing the programs stored in the memory; wherein, when the programs stored in the memory are executed, the processor is used to implement the application extension method of the CFD immersed boundary geometry capture algorithm as described above.

[0069] The beneficial effects of the present invention are:

[0070] The present invention provides an application extension method of a CFD immersed boundary geometry capture algorithm, a CFD solver immersed boundary method geometry capture algorithm based on the projection principle, and an improved design made to expand its applicability. The method establishes a first solid boundary grid and a fluid grid of an immersed solid in a three-dimensional coordinate system. The first solid boundary grid is immersed in the fluid grid, so that numerical calculations and simulations can be performed by a processor or other execution device, thereby ensuring the unity of theoretical analysis and reality; the quadrilateral grid cells in the first solid boundary grid are divided into two triangles, and the external normal vector of each triangular grid cell after the division is calculated to obtain a second solid boundary grid, which can improve the geometry capture algorithm. The convenience and efficiency of calculation and analysis are improved; for the center point of each grid unit in the fluid grid, a first envelope block composed of the center points of all adjacent grid units of the grid unit is constructed, and the length, width and height of the first envelope block are parallel to the coordinate axes of the three-dimensional coordinate system respectively; for each triangular grid unit in the second solid boundary grid, a minimum second envelope block that envelops the triangular grid unit is constructed, and the length, width and height of the second envelope block are parallel to the coordinate axes of the three-dimensional coordinate system respectively, so that the solid boundary sub-grid close to the position of each fluid sub-grid can be determined simply and accurately; for each first envelope block, all the intersections of the second envelope block and the first envelope block are constructed. The triangular mesh units form a subset to determine the target sub-mesh, and the point in the target sub-mesh closest to the center point of the mesh unit in the first envelope block is determined as the first projection point, and the projection point of the center point of the mesh unit in the first envelope block on the target sub-mesh plane is determined as the second projection point, which is more accurate and simple to calculate; for each first projection point, based on the projection principle, determine the projection position of the second projection point corresponding to the first projection point inside and outside the three sides / three vertices of the triangular mesh unit of the target sub-mesh and the sharing situation of the side where the first projection point is located with other triangular mesh units, combine different projection position situations and sharing situations, according to the location The method further comprises the following steps: calculating the algebraic distance between the first projection point and the center point of the mesh cell in the corresponding fluid mesh based on the outer normal vector of the triangular mesh cell of the target sub-mesh and the vector from the first projection point to the center point of the mesh cell in the corresponding fluid mesh, thereby solving the problem that the prior art geometric capture algorithm can only be applied to solids completely immersed in the fluid, so that the geometric capture algorithm can be applied not only to solids completely immersed in the fluid, but also to solids partially immersed in the fluid; determining the position attribute of the mesh cell in the fluid mesh corresponding to each first projection point based on each algebraic distance, thereby determining whether the mesh cell is actually in the fluid, thereby reducing the amount of calculation and improving the calculation efficiency;The flood algorithm is used to calculate the position attributes of the remaining grid cells in the fluid grid, thereby determining whether the remaining grid cells are actually in the fluid. This method is simple, efficient, and the results are as expected, that is, the grid center points that are actually fluid and the grid center points that are actually not fluid are identified, thereby achieving the goal of the geometric capture algorithm; the traversal algorithm is used to search for all combinations of two adjacent grid cells with different position attributes in the fluid grid, and determine the triangular grid cells of the target sub-grid pierced by each combination pair, as well as the coordinates of the piercing points of the triangular grid cells of the target sub-grid pierced by each combination pair, thereby obtaining the position information of the solid wall boundary applied with fluid mechanics. After the application expansion and improvement of the present invention, the CFD immersed boundary method geometric capture algorithm based on the projection principle has improved its applicability while retaining its original efficiency and reliability. It can not only capture solids that are completely immersed in the fluid, that is, immersed solids whose boundaries can form a closed surface, but also capture immersed solids that are not completely immersed in the fluid, that is, immersed solids whose boundaries cannot form a closed surface. The CFD immersed boundary method geometry capture algorithm, which has been improved through this applicability expansion, will be able to handle more application scenarios, such as submarine deep and shallow conditions, submarine surface conditions, and various floating conditions of surface ships, thus expanding its applicability.

[0071] The present invention preferably provides four calculation methods for the positional relationship of the second projection point relative to the triangular mesh unit of the target sub-mesh, and whether the edges of the triangular mesh unit of the target sub-mesh where the first projection point is located are shared by triangular mesh units in other second solid boundary meshes. This significantly expands the application scope of the geometric capture algorithm and solves the problem that the geometric capture algorithm in the prior art can only be applied to solids that are completely immersed in the fluid, so that the geometric capture algorithm can be applied not only to solids that are completely immersed in the fluid, but also to solids that are partially immersed in the fluid.

[0072] This paper proposes an improved method: if the center point of the fluid mesh cell corresponding to the first projection point is coplanar with the target submesh, the triangular mesh cells in the second solid boundary mesh that share the edges of the triangular mesh cells of the target submesh where the first projection point is located are used as the target submesh corresponding to the first projection point. This method simplifies the calculation process and improves the efficiency of algebraic distance calculation.

[0073] The present invention provides a method for processing when the second projection point corresponding to the first projection point is outside a vertex of the triangular grid unit of the corresponding target sub-grid. This method can simplify complex problems. The simplified positional relationship can be applied to the existing formula to calculate the algebraic distance from the first projection point to the center point of the grid unit in the corresponding fluid grid, thereby improving the calculation efficiency of the algebraic distance.

[0074] The present invention uses a flood algorithm to calculate the position attributes of the remaining grid cells in the fluid grid, thereby determining whether the remaining grid cells are actually in the fluid. This method is simple and efficient, and the results meet expectations.

[0075] The present invention also relates to an application expansion device for a CFD immersed boundary geometry capture algorithm. This device corresponds to the application expansion method for the CFD immersed boundary geometry capture algorithm described above, and can be understood as a device corresponding to the application expansion method for the CFD immersed boundary geometry capture algorithm described above. The device includes a network model management module, a boundary mesh optimization module, an envelope block management module, an algebraic distance calculation module, a position attribute calculation module, and a piercing point calculation module. The network model management module can establish a first solid boundary mesh and a fluid mesh of an immersed solid in a three-dimensional coordinate system, so that numerical calculations and simulations can be performed by a processor or the like, thereby ensuring the unity of theoretical analysis and reality. The boundary mesh optimization module can divide the quadrilateral mesh cells in the first solid boundary mesh into two triangles, which improves the convenience and efficiency of the calculation and analysis of the geometric capture algorithm; the envelope block management module can construct the first envelope block and the second envelope block to simply and accurately determine the solid boundary sub-mesh close to the position of each fluid sub-mesh; the algebraic distance calculation module can use the relationship between the first envelope block and the second envelope block to determine the first projection point and the second projection point, and based on the projection principle, determine the projection position of the three sides / three vertices inside and outside the triangular mesh cell of the target sub-mesh where the second projection point is located, as well as the common situation of the side where the first projection point is located with other triangular mesh cells. In this paper, the geometric capture algorithm of the present invention is used to capture the solid body of the fluid grid. The geometric capture algorithm ... Whether the grid cell is in the actual fluid; the flood algorithm is used to calculate the position attributes of the remaining grid cells in the fluid grid, so as to determine whether the remaining grid cells are in the actual fluid. On the one hand, it can reduce the amount of calculation and improve the calculation efficiency. On the other hand, the method is simple and efficient, and the results are in line with expectations; the piercing point calculation module can use the traversal algorithm to search for all combination pairs of two adjacent grid cells with different position attributes in the fluid grid, and determine the triangular grid cells of the target sub-grid pierced by each combination pair, as well as the coordinates of the piercing points of the triangular grid cells of the target sub-grid pierced by each combination pair, so as to obtain the position information of the solid wall boundary where fluid mechanics is applied. BRIEF DESCRIPTION OF THE DRAWINGS

[0076] Figure 1This is a flow chart of the main body of the application extension method of the CFD immersed boundary geometry capture algorithm of the present invention;

[0077] Figure 2 A flowchart of the present invention for calculating algebraic distance and position attributes;

[0078] Figure 3 A schematic diagram of a solid boundary grid immersed in a fluid grid according to the present invention;

[0079] Figure 4 A schematic diagram of solid boundary meshing according to the present invention;

[0080] Figure 5 Schematic diagram of three types of center of gravity coordinates according to projection positions of the present invention;

[0081] Figure 6 A schematic diagram of a projection point within a solid boundary grid according to the present invention;

[0082] Figure 7 This is a schematic diagram of a projection point outside a certain edge of a solid boundary grid according to the present invention;

[0083] Figure 8 This is a schematic diagram of a projection point outside a vertex of a solid boundary grid according to the present invention;

[0084] Figure 9 A schematic diagram of a center point of a fluid grid that is sufficiently close to a solid boundary grid according to the present invention;

[0085] Figure 10 Schematic diagram of the position attributes of the center point of the fluid grid of the present invention;

[0086] Figure 11 The center point pairs and piercing points of all fluid grids that pierce the solid of the present invention;

[0087] Figure 12 This is a structural block diagram of the application expansion device of the CFD immersed boundary geometry capture algorithm of the present invention. DETAILED DESCRIPTION

[0088] The present invention discloses an application extension method of a CFD immersed boundary geometry capture algorithm, which is essentially an application extension and improvement design of a CFD immersed boundary method geometry capture algorithm based on the projection principle, with the goal of solving the problem that the geometry capture algorithm can be applied to solids that are completely immersed in a fluid or partially immersed in a fluid. The method can be implemented by compiling a calculation program, which is then embedded in a CFD solver program and executed by a processor or an electronic device with processing capabilities, such as Figure 1 As shown, the method includes the following steps:

[0089] S1, establishing a first solid boundary grid and a fluid grid of an immersed solid in a three-dimensional coordinate system, wherein the first solid boundary grid is immersed in the fluid grid.

[0090] like Figure 3 As shown, the embodiment of the present application establishes a first solid boundary grid and a fluid grid of an immersed solid in a three-dimensional coordinate system, wherein the first solid boundary grid is in the fluid grid. The first solid boundary grid refers to a grid used to describe and divide the solid boundary (i.e., a solid surface that does not flow). A first solid boundary grid in the shape of a water surface ship can be used. The main purpose is to accurately represent the geometric shape and position of the solid boundary. Since the immersed boundary method is adopted, the fluid calculation domain does not need to fit the solid shape, so a square calculation domain can be used and discretized into a full square structured grid. The fluid grid refers to a grid used to describe the division of a continuous fluid calculation domain into a series of discrete grids. Each grid cell node of the first solid boundary grid and the fluid grid records a coordinate value. In this way, numerical calculations and simulations can be performed by a processor or the like, ensuring the unity of theoretical analysis and reality.

[0091] Alternatively, the submerged solid may be a submarine, a ship, or the like.

[0092] S2, dividing each quadrilateral mesh unit in the first solid boundary mesh into two triangles, and calculating the external normal vector of each divided triangular mesh unit to obtain a second solid boundary mesh.

[0093] like Figure 4 As shown in the figure, each quadrilateral mesh unit in the first solid boundary mesh is divided into two triangular mesh units. Triangular meshes are relatively simple and easy to process. Compared with quadrilateral meshes, triangular meshes are more stable in numerical calculations. This can improve the convenience and efficiency of the calculation and analysis of the geometric capture algorithm. It should be noted that the purpose of this division is to implement the geometric capture algorithm and does not change the solid mechanics calculation. That is, the solid mechanics calculation is still based on the original mesh division.

[0094] S3. For each mesh unit center point in the fluid mesh, a first envelope block is constructed, which is composed of the center points of all adjacent mesh units of the mesh unit. The length, width, and height of the first envelope block are parallel to the coordinate axes of the three-dimensional coordinate system. For each triangular mesh unit in the second solid boundary mesh, a minimum second envelope block is constructed that encloses the triangular mesh unit. The length, width, and height of the second envelope block are parallel to the coordinate axes of the three-dimensional coordinate system.

[0095] The embodiment of the present application constructs an envelope block for each grid cell in the fluid grid and the triangular grid cell in the second solid boundary grid, so that the triangular grid cell in the second solid boundary grid that is close to the position of the grid cell in each fluid grid can be simply and accurately determined.

[0096] For example, the fluid grid is named D h , name the second solid boundary mesh For each grid cell F in the fluid grid i The center point V i (i=1,2,...,N F , where N F is the number of grid cells in the fluid grid), construct an envelope block b consisting of the center points of all adjacent grid cells of the grid cell, with the length, width and height sides parallel to the three-dimensional coordinate axes. i For each triangle mesh element S in the second solid boundary mesh n (n=1,2,...,N S , where N S is the number of grid cells in the second solid boundary grid), construct a grid that can enclose S n The smallest envelope block b whose length, width and height are parallel to the three-dimensional coordinate axes n .

[0097] S4. For each first envelope block, all triangular mesh units intersecting the second envelope block with the first envelope block are formed into a subset to determine a target sub-mesh, and the point in the target sub-mesh closest to the center point of the mesh unit in the first envelope block is determined as a first projection point, and the projection point of the center point of the mesh unit in the first envelope block on the target sub-mesh plane is determined as a second projection point.

[0098] Furthermore, step S4 may also include the following steps:

[0099] S41: For each first envelope block, if there is a second envelope block intersecting with the first envelope block, determine all grid cells of the second solid boundary grid intersecting with the first envelope block to obtain a plurality of undetermined target subgrids;

[0100] S42: Projecting the center points of the grid cells in the fluid grid in the first envelope block onto the target sub-grid plane to be determined, respectively, to obtain a plurality of projection points;

[0101] S43: Calculating the centroid coordinates of each projection point on its corresponding undetermined target subgrid;

[0102] S44: If the three coordinate values ​​in the barycentric coordinates are all non-negative numbers, the projection point is the undetermined first projection point;

[0103] S45: If two coordinate values ​​of the barycentric coordinates are non-negative and one coordinate value is negative, then the intersection of a perpendicular line from the projection point to the nearest edge line of the corresponding undetermined target sub-grid and the edge line is the undetermined first projection point;

[0104] S46: If two coordinate values ​​of the barycentric coordinates are negative and one coordinate value is non-negative, the nearest vertex from the projection point to the corresponding target sub-mesh to be determined is the first projection point to be determined;

[0105] S47: Determine the first projection point and the target sub-grid based on the distances from all the pending first projection points to the center points of the grid units in the fluid grid in the first envelope block to which they correspond, wherein the first projection point is the point with the shortest distance from all the pending first projection points to the center points of the grid units in the fluid grid in the first envelope block to which they correspond, and the target sub-grid is the pending target sub-grid corresponding to the first projection point.

[0106] In the embodiment of the present application, the positional relationship between the projection point and the center coordinates of the center point of the grid unit in the fluid grid on the corresponding target sub-grid to be determined is determined by the value of the center coordinates of the projection point on the corresponding target sub-grid to be determined. Figure 5 As shown, when all three barycentric coordinate values ​​are non-negative, the projected point is inside the corresponding undetermined target subgrid. When two barycentric coordinate values ​​are non-negative and one is negative, the projected point is outside an edge of the corresponding undetermined target subgrid and not within the angle between any two extensions of the edges. When two barycentric coordinate values ​​are negative and one is non-negative, the projected point is within the range of any two extensions of the edges of the corresponding undetermined target subgrid. Using barycentric coordinate values ​​to determine the positional relationship between the projected point and the grid cells in the second solid boundary grid has the advantages of accuracy and computational simplicity.

[0107] For example, for each grid cell F in the fluid grid i , giving it an identification number or location attribute s i , and all initialized to s i = -1. For each grid cell center point V in the fluid grid i , determine its boundary grid to the second solid Is it close enough? If it is close enough, then Find the distance V on i The nearest point V' i , and judge Vi Is it in the actual fluid domain? If it is in the actual fluid domain, set s i =0, otherwise set s i =1.

[0108] Among them, judging V i arrive The standards and methods for distance are as follows:

[0109] For each grid cell center point V in the fluid grid i , determine the second solid boundary mesh The envelope block and the grid cell F in the fluid grid i The envelope of the block intersects all grid cells in the second solid boundary grid and constitutes Subset of The target subgrid is thus determined. The grid cells in the second solid boundary grid within this subset are all considered to be the grid cells F in the distance fluid grid. i The mesh cells in the second solid boundary mesh are closer. (i.e. C(V i ) is not an empty set), then the center point V of the grid cell in the fluid grid i , is considered to be the distance The center point of the grid cell in the fluid grid is close enough; otherwise, the center point V of the grid cell in the fluid grid i Considered distance The center point of the grid cell in the fluid grid that is farther away is no longer the center point V of the grid cell in the fluid grid. i Calculate the nearest point V' i .

[0110] V' i The position is calculated as follows:

[0111] C(V i ) in the grid cells of the second solid boundary grid included in i The nearest point, V' i First, C(V i ) in each second solid boundary grid S m ∈C(V i )(m=1,2,...,M S , where M S C(V i ) total number of elements in ) distance V i The nearest point Find, then select The minimum value of V'i The specific algorithm is: Figure 5 As shown, V i Projection to C(V i ) in the second solid boundary grid. m On the plane, and calculate each projection point on S m The coordinates of the center of gravity (ξ A ,ξ B ,ξ C ). Depending on the position of the projection point, its center of gravity coordinates can be divided into three different cases:

[0112] a. The projection point is located at S m If the interior of , then the three coordinate values ​​are all non-negative, such as Figure 6 As shown, That is the projection point P Vi ;

[0113] b. The projection point is located at S m If it is outside any side of , and not inside the angle between any two side extensions, then there are only two non-negative coordinate values, such as Figure 7 As shown, That is the projection point P Vi the point of intersection of a perpendicular line to that side and that side;

[0114] c. The projection point is located at S m If the extension line of any two sides of is within the range, then only one of the coordinate values ​​is non-negative, such as Figure 8 As shown, It is the vertex closest to the projected point.

[0115] C(V i ) in the second solid boundary grid. m Corresponding Select distance V i The nearest point is V' i (i.e. the first projection point), that is Upper distance V i The nearest point. At the same time, V' must be recorded i Position, V' i Distance V i distance V' i The solid boundary subgrid S m , the external normal vector of the solid boundary sub-mesh V i to V' i Projection method (one of a, b, or c above).

[0116] S5. For each of the first projection points, based on the projection principle, determine the projection position of the second projection point corresponding to the first projection point inside and outside the three sides / three vertices of the triangular mesh unit of the target sub-mesh, as well as the sharing situation of the side where the first projection point is located with other triangular mesh units. In combination with different projection position situations and sharing situations, calculate the algebraic distance from the first projection point to the center point of the mesh unit in the corresponding fluid mesh according to the external normal vector of the triangular mesh unit of the target sub-mesh and the vector from the first projection point to the center point of the mesh unit in the corresponding fluid mesh.

[0117] Furthermore, step S5 may also include the following steps:

[0118] If the second projection point corresponding to the first projection point is inside the triangular grid unit of the corresponding target sub-grid, the algebraic distance from the first projection point to the center point of the grid unit in the corresponding fluid grid is calculated using formula (1), and the formula (1) is:

[0119]

[0120] Among them, V i Point is the center point of the fluid grid, V' i V i The first projection point of is the external normal vector of the target sub-mesh, dis(V' i ,V i ) represents V' i to V i The algebraic distance.

[0121] If the second projection point corresponding to the first projection point is outside a certain edge of the triangular mesh unit of the target sub-mesh to which it corresponds, and the edge of the triangular mesh unit of the target sub-mesh where the first projection point is located is shared with other triangular mesh units, then the algebraic distance from the first projection point to the center point of the mesh unit in the corresponding fluid mesh is calculated using formula (2), and the formula (2) is:

[0122]

[0123] Among them, V i Point is the center point of the fluid grid, P Vi V i The projection point of the point on the target sub-grid plane, is the external normal vector of the target sub-mesh, P D The intersection of the vertical line from the farthest vertex D of the target sub-mesh to the target sub-mesh and the target sub-mesh, for to V i vector, P D Vector to D, s v and s c All are intermediate amounts.

[0124] If the second projection point corresponding to the first projection point is outside a certain edge of the triangular mesh unit of the target sub-mesh to which it corresponds, and the edge of the triangular mesh unit of the target sub-mesh where the first projection point is located is not shared with other triangular mesh units, then the algebraic distance from the first projection point to the center point of the mesh unit in the corresponding fluid mesh is calculated using formula (3), and the formula (3) is:

[0125]

[0126] Among them, V i Point is the center point of the grid cell in the fluid grid, V' i V i The first projection point of is the outward normal vector of the target sub-mesh.

[0127] If the second projection point corresponding to the first projection point is outside a vertex of the triangular mesh unit of the target sub-mesh to which it corresponds, a third projection point is obtained according to a first preset method including expanding adjacent triangular mesh units to form an open surface and defining an orthogonal plane, and the algebraic distance from the first projection point to the center point of the mesh unit in the corresponding fluid mesh is calculated based on the projection position of the third projection point inside and outside the three sides of the triangular mesh unit of the target sub-mesh and the sharing of the sides of the triangular mesh unit of the target sub-mesh closest to the nearest point with other triangular mesh units. The algebraic distance from the first projection point to the center point of the mesh unit in the corresponding fluid mesh is calculated using formula (4), which is:

[0128]

[0129] like Figure 2 As shown, in the embodiment of the present application, when V i When the projection method to the target sub-grid is b (ie V i The projection point is located at S m There are two possibilities to consider. The first possibility is S m Close to V' iThe edge of the second solid boundary grid is exactly the boundary of the immersed solid (for example, it is located at the waterline of the surface ship). At this time, there is no other grid cell in the second solid boundary grid that is aligned with S m The mesh shares this edge; the second possibility is S m Close to V' i The edge of the second solid boundary grid is not the boundary of the submerged solid (such as the part of the ship under the water surface). In this case, there are other grid cells in the second solid boundary grid that are connected to S m The mesh shares this edge. Then V' is calculated using different formulas for different possibilities. i to V i Thus, the optimized geometric capture algorithm of the present invention can be applied to both solids completely immersed in the fluid and solids partially immersed in the fluid.

[0130] Furthermore, the specific implementation of the first preset method is as follows: Figure 8 As shown, first identify the set of adjacent triangles: find i The nearest point (or V' i ) in all adjacent second solid boundary meshes, and the set of these triangular mesh units is recorded as N i , where these adjacent triangular mesh units are connected by a common vertex V' i Then extend the adjacent triangles to form an open surface: extend the planes of these adjacent triangles to form an infinite open plane (in Figure 8 In the figure, these adjacent triangular mesh units are represented by solid lines, and the expanded infinite open surface is represented by dashed lines. Note: these adjacent triangular mesh units are not necessarily on the same plane. Then define the orthogonal plane and select the far point: determine a center point V that passes through the mesh units in the fluid mesh. i and is orthogonal to A plane, select a point far enough away on this plane ( arrive The vertical line cannot pass through V' i ), Point The projection point in the plane (i.e. Point to The perpendicular line of the plane The point where the planes intersect is either N i In, or in N i External. Calculate distance: If Point The projection point in the plane is N i External time (i.e. Point to The projection method is, The projection of is outside one edge of the target sub-mesh triangle and not inside the angle between any two extended edges), then V' i arrive The algebraic distance is calculated by formula (2); if Point When the projection point in the plane is inside the target sub-grid, then V' i arrive The algebraic distance is calculated by formula (1). Determine the sign of the final distance: With V i On the plane The same side of the V' can be used when calculating the position property. i arrive The algebraic distance of V' i to V i The algebraic distance.

[0131] S6. Determine the position attributes of the grid cells in the fluid grid corresponding to each of the first projection points based on the algebraic distances, thereby determining whether the grid cells are actually in the fluid.

[0132] In the embodiment of the present application, V' i to V i The algebraic distance can determine the position attribute value of the grid cell in the fluid grid. The position attribute is calculated by formula (5), which is as follows:

[0133]

[0134] If V' i to V i The algebraic distance (dis(V' i ,V i )) is greater than 0, the position attribute S of the grid cell in the fluid grid is i Set to 0; if V' i to V i If the algebraic distance is not greater than 0, the position attribute S of the grid cell in the fluid grid is i Set to 1.

[0135] Calculating location attributes through algebraic distance can reduce the amount of calculation and improve calculation efficiency.

[0136] At this point, the centers of all grid cells in the fluid grid that are close enough, as well as their position properties, have been obtained. Figure 9As shown in the figure, the center of the grid cell represented by A represents the center of the grid cell in the fluid grid that is close enough to the fluid-solid interface and is actually in the fluid; the center of the grid cell represented by B represents the center of the grid cell in the fluid grid that is close enough to the fluid-solid interface and is not actually in the fluid.

[0137] S7, using a flood algorithm to calculate the position attributes of the remaining grid cells in the fluid grid, thereby determining whether the remaining grid cells are actually in the fluid.

[0138] In an embodiment of the present application, if there is no second envelope block intersecting with the first envelope block, it means that the grid cells in the fluid grid in the first envelope block are not close to the solid boundary grid. In this case, the above method cannot be used to calculate the position attributes of the grid cells in the fluid grid, but the flood algorithm can be used to set the position attributes of the grid cells in the fluid grid.

[0139] Furthermore, the flood algorithm is implemented as follows: traverse all the grid cells in the fluid grid, and for each location where the attribute value is set (i.e. S i The center point V of the grid cell in the fluid grid that is not equal to -1) i , check the center point V of the grid cell in its adjacent fluid grid k , if V k Position property is not set (ie V k Position attribute is equal to -1), then V k Position property setting and V i The position attributes of the grid cells are the same. Continue traversing until the position attributes of the center points of all the grid cells in the fluid grid have been set (that is, all position attributes are not equal to -1). Figure 10 As shown in the figure, the center of the grid cell represented by A is the center point of the grid cell in the fluid grid that is actually in the fluid; the center of the grid cell represented by B is the center point of the grid cell in the fluid grid that is not actually in the fluid. Using the flooding algorithm to set position attributes is a simple and efficient method, and the results meet expectations.

[0140] S8: Using a traversal algorithm, search for all combination pairs of two adjacent grid cells with different position attributes in the fluid grid, and determine the triangular grid cells of the target sub-grid pierced by each of the combination pairs, and determine the coordinates of the piercing points of the triangular grid cells of the target sub-grid pierced by each of the combination pairs.

[0141] In the embodiment of the present application, the fluid solver needs to apply wall boundary conditions at the piercing point. To do this, it is necessary to know the information of the piercing point, including the line connecting the center points of the grid cells in which two fluid grids pierce the solid and the coordinates of the piercing point. Through the above steps, the embodiment of the present application obtains the center points of the grid cells in the fluid grid that is actually in the fluid and the center points of the grid cells in the fluid grid that is actually without fluid. Then, the line connecting the center points of the grid cells in the fluid grid that is actually in the fluid and the center points of the grid cells in the fluid grid that is actually without fluid must penetrate the solid boundary grid.

[0142] The embodiment of the present application uses a traversal algorithm to traverse all grid cells in the fluid grid, such as Figure 11 As shown, the center points of the grid cells in the adjacent fluid grids with different location attributes are selected to form a center pair (i, j) (i=1,2,...,N F ,j=1,2,...,N F ), then record the number of the sub-mesh of the submerged solid boundary that each center pair pierces, and calculate and record the coordinates of the piercing point of each center pair in the grid cell of the solid boundary grid. The piercing point is the location at which the fluid dynamics solid boundary is applied.

[0143] However, when the problem to be solved is a fluid-solid coupling problem, the velocity of the solid wall boundary must be considered.

[0144] For each first projection point, if the second projection point corresponding to the first projection point is outside one of the edges of the triangular mesh unit of the target sub-mesh to which it corresponds, and the edge of the triangular mesh unit of the target sub-mesh where the first projection point is located is shared with other triangular mesh units in the second solid boundary mesh, then determine whether the center point of the fluid mesh unit corresponding to the first projection point is on the same plane as the target sub-mesh; if they are on the same plane, then use the triangular mesh unit in the second solid boundary mesh that shares the edge of the triangular mesh unit of the target sub-mesh where the first projection point is located as the target sub-mesh corresponding to the first projection point; and calculate the algebraic distance from the first projection point to the center point of the mesh unit in the corresponding fluid mesh using formula (2).

[0145] The point obtained by projecting the center point of the grid unit in the fluid grid corresponding to the first projection point onto the triangular plane of the corresponding target sub-grid is determined as the fourth projection point; if the amplitude of the vector from the fourth projection point to the center point of the fluid grid unit corresponding to the first projection point is less than the preset amplitude, the center point of the fluid grid unit corresponding to the first projection point and the target sub-grid are on the same plane; if the amplitude of the vector from the fourth projection point to the center point of the fluid grid unit corresponding to the first projection point is not less than the preset amplitude, the center point of the fluid grid unit corresponding to the first projection point and the target sub-grid are not on the same plane.

[0146] like Figure 7 As shown, when V i The projection point is located at S m Any side outside ( Figure 7 When the triangle unit ABD in the second solid boundary mesh shares the same side AB with ABC, first determine V i Is it on the plane of ABC? The judgment method is: project the point to the triangular grid unit ABC, the projection point is, if the magnitude of the vector is less than the preset magnitude, then it is on the plane of ABC. If V i On the plane ABC, replace the triangular mesh unit ABC with the triangular mesh unit ABD, and then use formula (2) to calculate V' i to V i The algebraic distance.

[0147] Furthermore, the preset amplitude is determined by a memory executed by a processor or an electronic device with processing capabilities, and can be 10 -8 , 10 -9 wait.

[0148] Based on the same inventive concept, one or more embodiments of this specification also provide an application expansion device for a CFD immersion boundary geometry capture algorithm. Since the principle of the problem solved by the application expansion device for the CFD immersion boundary geometry capture algorithm is similar to the aforementioned application expansion method for the CFD immersion boundary geometry capture algorithm, the real-time implementation of the application expansion device for the CFD immersion boundary geometry capture algorithm can refer to the aforementioned implementation of the application expansion method for the CFD immersion boundary geometry capture algorithm, and the repeated parts will not be repeated.

[0149] Figure 12 This is a structural block diagram of an application expansion device for a CFD immersion boundary geometry capture algorithm provided in one or more embodiments of this specification. Figure 12As shown, the application expansion device of the CFD immersed boundary geometry capture algorithm includes: a network model management module 901, a boundary grid optimization module 902, an envelope block management module 903, an algebraic distance calculation module 904, a position attribute calculation module 905 and a piercing point calculation module 906.

[0150] The network model management module 901 is used to establish a first solid boundary grid and a fluid grid of the immersed solid in a three-dimensional coordinate system, wherein the first solid boundary grid is immersed in the fluid grid;

[0151] The boundary mesh optimization module 902 is used to divide each quadrilateral mesh unit in the first solid boundary mesh into two triangles, and calculate the external normal vector of each triangular mesh unit after the division to obtain a second solid boundary mesh;

[0152] The envelope block management module 903 is configured to construct, for each mesh cell center point in the fluid mesh, a first envelope block consisting of the center points of all adjacent mesh cells of the mesh cell, wherein the length, width, and height of the first envelope block are parallel to the coordinate axes of the three-dimensional coordinate system; and, for each triangular mesh cell in the second solid boundary mesh, construct a minimum second envelope block that encloses the triangular mesh cell, wherein the length, width, and height of the second envelope block are parallel to the coordinate axes of the three-dimensional coordinate system.

[0153] The algebraic distance calculation module 904 is used to, for each first envelope block, form a subset of all triangular mesh units intersecting the second envelope block with the first envelope block to determine a target submesh, and determine the point in the target submesh closest to the center point of the mesh unit in the first envelope block as a first projection point, and determine the projection point of the center point of the mesh unit in the first envelope block on the target submesh plane as a second projection point; for each first projection point, based on the projection principle, determine the projection position of the second projection point corresponding to the first projection point inside and outside the three sides / three vertices of the triangular mesh unit of the target submesh, as well as the sharing of the side where the first projection point is located with other triangular mesh units, and calculate the algebraic distance from the first projection point to the center point of the mesh unit in the corresponding fluid mesh according to the external normal vector of the triangular mesh unit in the target submesh and the vector from the first projection point to the center point of the mesh unit in the corresponding fluid mesh;

[0154] The position attribute calculation module 905 is used to determine the position attributes of the grid cells in the fluid grid corresponding to each first projection point based on each algebraic distance, thereby determining whether the grid cells are actually in the fluid; and calculate the position attributes of the remaining grid cells in the fluid grid using the flood algorithm, thereby determining whether the remaining grid cells are actually in the fluid.

[0155] The piercing point calculation module 906 is used to use a traversal algorithm to search for all combination pairs of two adjacent grid cells with different position attributes in the fluid grid, and determine the triangular grid cells of the target sub-grid pierced by each combination pair, and determine the coordinates of the piercing points of the triangular grid cells of the target sub-grid pierced by each combination pair.

[0156] Based on the method in the above embodiment, an embodiment of the present application further provides an electronic device. The electronic device includes: a memory, a processor and a touch screen; wherein: the touch screen is used to display content; the memory is used to store a computer program, and the computer program includes program instructions; the processor is used to call the program instructions so that the electronic device executes the training method or information parsing method provided in the embodiment of the present application. The electronic device includes but is not limited to mobile phones, tablet computers, personal computers, workstation devices, large-screen devices (for example: smart screens, smart TVs, etc.), handheld game consoles, home game consoles, virtual reality devices, augmented reality devices, mixed reality devices, in-vehicle smart terminals, etc.

[0157] That is to say, after the algorithm is determined through application expansion and improvement, it will be implemented by compiling a calculation program. The compiled program will be embedded in the CFD solver program to realize its functions. In the specific implementation process, it should be noted that in step 3.3, when the projection position is judged to belong to category b) and the edge The boundary is not immersed solid, that is, there is a solid boundary mesh (named mesh ) and grid Shared Edges When V i Whether the point is aligned with the grid Coplanar, if so, the grid Replace with Grid Execute the algorithm of formula (2). The judgment method is to set V i Projecting points onto a grid The projection point is Judgment Vector Is the amplitude of a minimum value (a minimum value can be set in the program, such as 10 -8 etc., determined by the machine memory).

[0158] It should be noted that the specific embodiments described above can enable those skilled in the art to more fully understand the present invention, but do not limit the present invention in any way. Therefore, although this specification has described the present invention in detail with reference to the drawings and embodiments, those skilled in the art should understand that the present invention can still be modified or replaced with equivalents. In short, all technical solutions and improvements that do not depart from the spirit and scope of the present invention should be included in the scope of protection of the patent for the present invention.

Claims

1. An applied extension method of the CFD immersed boundary geometry capture algorithm for capturing solids fully / partially immersed in a fluid, characterized by: The following steps are involved: S1: establishing a first solid boundary grid and a fluid grid for immersing a solid in a three-dimensional coordinate system, wherein the first solid boundary grid is immersed in the fluid grid; S2: Divide each quadrilateral mesh unit in the first solid boundary mesh into two triangles, and calculate the external normal vector of each divided triangular mesh unit to obtain a second solid boundary mesh; S3: For each mesh unit center point in the fluid mesh, construct a first envelope block consisting of the center points of all adjacent mesh units of the mesh unit, wherein the length, width, and height of the first envelope block are parallel to the coordinate axes of the three-dimensional coordinate system; for each triangular mesh unit in the second solid boundary mesh, construct a minimum second envelope block that envelops the triangular mesh unit, wherein the length, width, and height of the second envelope block are parallel to the coordinate axes of the three-dimensional coordinate system; S4: for each first envelope block, forming a subset of all triangular mesh units intersecting the second envelope block with the first envelope block to determine a target submesh, and determining a point in the target submesh closest to a center point of a mesh unit in the first envelope block as a first projection point, and determining a projection point of the center point of the mesh unit in the first envelope block on the plane of the target submesh as a second projection point; S5: For each first projection point, based on the projection principle, determine the projection position of the second projection point corresponding to the first projection point inside and outside the three sides / three vertices of the triangular mesh unit of the target sub-mesh, as well as the sharing of the side where the first projection point is located with other triangular mesh units. In combination with different projection position conditions and sharing conditions, calculate the algebraic distance from the first projection point to the center point of the mesh unit in the corresponding fluid mesh according to the outer normal vector of the triangular mesh unit of the target sub-mesh and the vector from the first projection point to the center point of the mesh unit in the corresponding fluid mesh; S6: determining the position attributes of the grid cells in the fluid grid corresponding to each of the first projection points based on the algebraic distances, thereby determining whether the grid cells are actually in the fluid; S7: Calculate the position attributes of the remaining grid cells in the fluid grid using the flood algorithm, so as to determine whether the remaining grid cells are actually in the fluid; S8: Using a traversal algorithm, search for all combination pairs of two adjacent grid cells with different position attributes in the fluid grid, and determine the triangular grid cells of the target sub-grid pierced by each of the combination pairs, and determine the coordinates of the piercing points of the triangular grid cells of the target sub-grid pierced by each of the combination pairs.

2. The method for applying the CFD immersion boundary geometry capture algorithm according to claim 1, characterized in that: In step S5, If the second projection point corresponding to the first projection point is inside the triangular grid unit of the corresponding target sub-grid, the algebraic distance from the first projection point to the center point of the grid unit in the corresponding fluid grid is calculated using formula (1), and the formula (1) is: Among them, V i Point is the center point of the fluid grid, V' i V i The first projection point of is the external normal vector of the target sub-mesh, dis(V' i ,V i ) represents V' i to V i The algebraic distance of If the second projection point corresponding to the first projection point is outside a certain edge of the triangular mesh unit of the target sub-mesh to which it corresponds, and the edge of the triangular mesh unit of the target sub-mesh where the first projection point is located is shared with other triangular mesh units, then the algebraic distance from the first projection point to the center point of the mesh unit in the corresponding fluid mesh is calculated using formula (2), and the formula (2) is: Among them, V i Point is the center point of the fluid grid, P Vi V i The projection point of the point on the target sub-grid plane, is the external normal vector of the target sub-mesh, P D The intersection of the vertical line from the farthest vertex D of the target sub-mesh to the target sub-mesh and the target sub-mesh, s v and s c All are intermediate amounts; If the second projection point corresponding to the first projection point is outside a certain edge of the triangular mesh unit of the target sub-mesh to which it corresponds, and the edge of the triangular mesh unit of the target sub-mesh where the first projection point is located is not shared with other triangular mesh units, then the algebraic distance from the first projection point to the center point of the mesh unit in the corresponding fluid mesh is calculated using formula (3), and the formula (3) is: Among them, V i Point is the center point of the grid cell in the fluid grid, V' i V i The first projection point of is the outward normal vector of the target sub-mesh.

3. The method for applying the CFD immersion boundary geometry capture algorithm according to claim 2, characterized in that: In step S5, if the second projection point corresponding to the first projection point is outside a vertex of the triangular mesh unit of the corresponding target sub-mesh, a third projection point is obtained according to a first preset method including extending adjacent triangular mesh units to form an open surface and defining an orthogonal plane, and the algebraic distance from the first projection point to the center point of the mesh unit in the corresponding fluid mesh is calculated based on the projection position of the third projection point inside and outside the three sides of the triangular mesh unit of the target sub-mesh and the sharing of the edge of the triangular mesh unit of the target sub-mesh closest to the nearest point with other triangular mesh units.

4. The method for applying the CFD immersion boundary geometry capture algorithm according to claim 3, characterized in that: In step S5, after obtaining the third projection point, the algebraic distance from the first projection point to the center point of the grid cell in the corresponding fluid grid is calculated using formula (4), and the formula (4) is:

5. The method for applying the CFD immersion boundary geometry capture algorithm according to any one of claims 2 to 4, characterized in that: The method further comprises: For each first projection point, if a second projection point corresponding to the first projection point is outside an edge of a triangular mesh unit of the corresponding target sub-mesh, and the edge of the triangular mesh unit of the target sub-mesh where the first projection point is located is shared with other triangular mesh units in the second solid boundary mesh, then determining whether a center point of the mesh unit in the fluid mesh corresponding to the first projection point is coplanar with the target sub-mesh; If they are on the same plane, the triangular mesh cells in the second solid boundary mesh that share the edge of the triangular mesh cell of the target sub-mesh where the first projection point is located are used as the target sub-mesh corresponding to the first projection point; The algebraic distance from the first projection point to the center point of the grid cell in the corresponding fluid grid is calculated using formula (2).

6. The method for applying the CFD immersion boundary geometry capture algorithm according to claim 5, characterized in that: The method for determining whether the center point of the grid unit in the fluid grid corresponding to the first projection point is on the same plane as the target subgrid includes: Determine a point on the triangle plane of the target sub-grid corresponding to the first projection point, where the center point of the grid unit in the fluid grid corresponds to the first projection point, as a fourth projection point; If the magnitude of the vector from the fourth projection point to the center point of the grid unit in the fluid grid corresponding to the first projection point is less than a preset magnitude, then the center point of the grid unit in the fluid grid corresponding to the first projection point and the target subgrid are on the same plane; If the amplitude of the vector from the fourth projection point to the center point of the grid unit in the fluid grid corresponding to the first projection point is not less than the preset amplitude, the center point of the grid unit in the fluid grid corresponding to the first projection point is not on the same plane as the target sub-grid.

7. The method for applying and extending the CFD immersion boundary geometry capture algorithm according to any one of claims 1 to 4, characterized in that: In step S4, the method for determining the target subgrid includes: S41: For each first envelope block, if there is a second envelope block intersecting with the first envelope block, determine all grid cells of the second solid boundary grid intersecting with the first envelope block to obtain a plurality of undetermined target subgrids; S42: Projecting the center points of the grid cells in the fluid grid in the first envelope block onto the target sub-grid plane to be determined, respectively, to obtain a plurality of projection points; S43: Calculating the centroid coordinates of each projection point on its corresponding undetermined target subgrid; S44: If the three coordinate values ​​in the barycentric coordinates are all non-negative numbers, the projection point is the undetermined first projection point; S45: If two coordinate values ​​of the barycentric coordinates are non-negative and one coordinate value is negative, then the intersection of a perpendicular line from the projection point to the nearest edge line of the corresponding undetermined target sub-grid and the edge line is the undetermined first projection point; S46: If two coordinate values ​​of the barycentric coordinates are negative and one coordinate value is non-negative, the nearest vertex from the projection point to the corresponding target sub-mesh to be determined is the first projection point to be determined; S47: Determine the first projection point and the target sub-grid based on the distances from all the pending first projection points to the center points of the grid units in the fluid grid in the first envelope block to which they correspond, wherein the first projection point is the point with the shortest distance from all the pending first projection points to the center points of the grid units in the fluid grid in the first envelope block to which they correspond, and the target sub-grid is the pending target sub-grid corresponding to the first projection point.

8. The method for applying the CFD immersion boundary geometry capture algorithm according to claim 3, characterized in that: In step S5, the first preset method includes: Determine a plurality of triangular mesh units with the same vertex through all triangular mesh units in the second solid boundary mesh adjacent to the first projection point, wherein a vertex of the triangular mesh units with the same vertex coincides with the first projection point; Extending the planes of all the triangular mesh units with the same vertex to obtain open planes with the same vertex; Determining an orthogonal plane, wherein the orthogonal plane passes through a center point of a grid cell in the fluid grid corresponding to the first projection point and is orthogonal to a vector from the first projection point to a center point of the grid cell in the fluid grid corresponding to the first projection point; Select a point on the determined orthogonal plane, where the perpendicular line from the point to the open plane with the same vertex does not pass through the first projection point, and the projection of the point onto the open plane with the same vertex does not coincide with the first projection point, and determine the projection of the point onto the open plane with the same vertex to obtain a fifth projection point; The closest point from the fifth projection point to the target sub-grid is determined to obtain the third projection point.

9. The method for applying the CFD immersion boundary geometry capture algorithm according to claim 1, characterized in that: In step S7, the flooding algorithm includes: All grid cells in the fluid grid are traversed, and the position attribute of each grid cell in the fluid grid that is adjacent to the grid cell in the fluid grid whose position attribute has been determined and whose position attribute has not been set is set to the same.

10. An application extension device for a CFD immersion boundary geometry capture algorithm, characterized in that: It includes a network model management module, a boundary grid optimization module, an envelope block management module, an algebraic distance calculation module, a position attribute calculation module and a piercing point calculation module connected in sequence; wherein, The network model management module is used to establish a first solid boundary grid and a fluid grid of an immersed solid in a three-dimensional coordinate system, wherein the first solid boundary grid is immersed in the fluid grid; The boundary mesh optimization module is used to divide each quadrilateral mesh unit in the first solid boundary mesh into two triangles, and calculate the external normal vector of each triangular mesh unit after the division to obtain a second solid boundary mesh; The envelope block management module is configured to construct, for each mesh unit center point in the fluid mesh, a first envelope block consisting of the center points of all adjacent mesh units of the mesh unit, wherein the length, width, and height of the first envelope block are parallel to the coordinate axes of the three-dimensional coordinate system; and, for each triangular mesh unit in the second solid boundary mesh, construct a minimum second envelope block that envelops the triangular mesh unit, wherein the length, width, and height of the second envelope block are parallel to the coordinate axes of the three-dimensional coordinate system. The algebraic distance calculation module is used to, for each first envelope block, form a subset of all triangular mesh units intersecting the second envelope block with the first envelope block to determine a target sub-mesh, and determine the point in the target sub-mesh closest to the center point of the mesh unit in the first envelope block as a first projection point, and determine the projection point of the center point of the mesh unit in the first envelope block on the plane of the target sub-mesh as a second projection point; for each first projection point, based on the projection principle, determine the projection position of the second projection point corresponding to the first projection point inside and outside the three sides / three vertices of the triangular mesh unit of the target sub-mesh and the sharing situation of the side where the first projection point is located with other triangular mesh units, and in combination with different projection position situations and sharing situations, calculate the algebraic distance from the first projection point to the center point of the mesh unit in the corresponding fluid mesh according to the external normal vector of the triangular mesh unit of the target sub-mesh and the vector from the first projection point to the center point of the mesh unit in the corresponding fluid mesh; The position attribute calculation module is used to determine the position attributes of the grid cells in the fluid grid corresponding to each of the first projection points based on the algebraic distances, thereby determining whether the grid cells are actually in the fluid; and calculate the position attributes of the remaining grid cells in the fluid grid using a flood algorithm, thereby determining whether the remaining grid cells are actually in the fluid; The piercing point calculation module is used to use a traversal algorithm to search for all combination pairs of two adjacent grid units with different position attributes in the fluid grid, and determine the triangular grid units of the target sub-grid pierced by each of the combination pairs, and determine the coordinates of the piercing points of the triangular grid units of the target sub-grid pierced by each of the combination pairs.

11. An electronic device, characterized in that: include: at least one memory for storing a program; At least one processor, configured to execute the program stored in the memory; wherein, when the program stored in the memory is executed, the processor is configured to execute the steps in the method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Offshore wind turbine CFD-FDEM bidirectional fluid-solid coupling interface node identification method and system

    CN118886267A

  • CFD wave-absorbing boundary applying method based on modal discontinuous finite element method

    CN118966047A