[go: up one dir, main page]

CN112528530A - Splicing algorithm based on arbitrary-shape three-dimensional non-corresponding grid surface - Google Patents

Splicing algorithm based on arbitrary-shape three-dimensional non-corresponding grid surface Download PDF

Info

Publication number
CN112528530A
CN112528530A CN202011221466.6A CN202011221466A CN112528530A CN 112528530 A CN112528530 A CN 112528530A CN 202011221466 A CN202011221466 A CN 202011221466A CN 112528530 A CN112528530 A CN 112528530A
Authority
CN
China
Prior art keywords
clip
intersection
algorithm based
face
dimensional non
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202011221466.6A
Other languages
Chinese (zh)
Other versions
CN112528530B (en
Inventor
王子寒
凌空
张帅
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xi'an Shufeng Information Technology Co ltd
Original Assignee
Xi'an Shufeng Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xi'an Shufeng Information Technology Co ltd filed Critical Xi'an Shufeng Information Technology Co ltd
Priority to CN202011221466.6A priority Critical patent/CN112528530B/en
Priority claimed from CN202011221466.6A external-priority patent/CN112528530B/en
Publication of CN112528530A publication Critical patent/CN112528530A/en
Application granted granted Critical
Publication of CN112528530B publication Critical patent/CN112528530B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation
    • G06F30/28Design optimisation, verification or simulation using fluid dynamics, e.g. using Navier-Stokes equations or computational fluid dynamics [CFD]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation
    • G06F30/23Design optimisation, verification or simulation using finite element methods [FEM] or finite difference methods [FDM]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2111/00Details relating to CAD techniques
    • G06F2111/10Numerical modelling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2113/00Details relating to the application field
    • G06F2113/08Fluids
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2119/00Details relating to the type or aim of the analysis or the optimisation
    • G06F2119/08Thermal analysis or thermal optimisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2119/00Details relating to the type or aim of the analysis or the optimisation
    • G06F2119/14Force analysis or force optimisation, e.g. static or dynamic forces

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Evolutionary Computation (AREA)
  • Geometry (AREA)
  • General Engineering & Computer Science (AREA)
  • Algebra (AREA)
  • Computing Systems (AREA)
  • Fluid Mechanics (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Mathematical Physics (AREA)
  • Pure & Applied Mathematics (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The invention relates to a splicing algorithm based on an arbitrary-shape three-dimensional non-corresponding grid surface, which comprises the following steps: identifying two sides τ of non-corresponding interfaceAAnd τB(ii) a Defining a list L for storing intersecting facetsc(ii) a For all tauAA certain face K onAThe following operations are performed: for all tauBA certain face K onBThe following operation is performed to determine the median plane τCCalculate outSurface normal n of the intermediate planeCJudging K with a filterAAnd KBWhether or not intersections are possible; if K isAAnd KBIf there is a possibility of intersection, the next step is carried out: using projection to project KAAnd KBProjection onto the median plane tauCUpper and intersecting; if K isAAnd KBIntersecting surface KCIf so, the next step is carried out: calculating KCCalculated area, face center and face normal, let KCIs added to Lc(ii) a Establishing a mapping χCA(KC)=KA,χCB(KC)=KB,KCIs composed of KAAnd KBObtaining the result of intersection; and checking the area of the intersecting facets. The invention has the advantage of greatly reducing the use limit of the grid in computational fluid mechanics engineering application.

Description

一种基于任意形状三维非对应网格面的拼接算法A Mosaic Algorithm Based on 3D Non-corresponding Mesh Surfaces of Arbitrary Shape

技术领域technical field

本发明属于数值计算仿真工业软件技术领域,具体涉及一种基于任意形状 三维非对应网格面的拼接算法。The invention belongs to the technical field of numerical calculation and simulation industrial software, and in particular relates to a splicing algorithm based on three-dimensional non-corresponding grid surfaces of arbitrary shapes.

背景技术Background technique

现在CFD(计算流体力学)正在高速发展,且广泛应用于工程问题中。网 格作为CFD计算中关键的一环,直接影响计算的时间和内存消耗。在处理复杂 几何结构的问题时,工程上常常将其分为简单的子区域并他们分开进行网格生 成。这样分开生成的网格在交接面处一般不是一一对应的,故称之为非对应交 界面。典型的例子便是机翼设计中的流固区域的耦合传热计算,两区域的网格 一般是由不同工程师生成的。所以CFD软件应该提供便于用户使用的工程级别 的非对应交界面处理模块。Now CFD (Computational Fluid Dynamics) is developing rapidly and is widely used in engineering problems. As a key part of CFD calculation, grid directly affects calculation time and memory consumption. When dealing with complex geometries, engineering often divides them into simple sub-regions and meshes them separately. The meshes generated separately in this way generally do not correspond one-to-one at the interface, so it is called a non-corresponding interface. A typical example is the coupled heat transfer calculation of the fluid-solid region in the wing design, where the meshes of the two regions are generally generated by different engineers. Therefore, the CFD software should provide a non-corresponding interface processing module at the engineering level that is convenient for users to use.

从现有相关文献来看,目前已知的网格拼接技术适用范围十分有限,仅限 于简单形状,如平面,圆柱面,球面等。这些简单形状完全无法满足现有工业 需求,比如飞机引擎叶片,固体区域上就布有多个冷凝气膜孔,两区域形成复 杂的交界面。本发明正是解决了这一问题,提供了一种可以适用于任意面的网 格拼接技术。Judging from the existing relevant literature, the currently known mesh splicing technology has a very limited application range and is limited to simple shapes, such as planes, cylinders, and spheres. These simple shapes are completely unable to meet the existing industrial needs, such as aircraft engine blades, there are many condensate film holes on the solid area, and the two areas form a complex interface. The present invention solves this problem and provides a grid splicing technology that can be applied to any surface.

发明内容SUMMARY OF THE INVENTION

本发明的目的是解决上述问题,提供一种多区域数值模拟计算中,基于任 意形状三维非对应网格面的拼接算法,大大降低了计算流体力学工程应用中对 网格的使用限制。The purpose of the present invention is to solve the above-mentioned problems, and to provide a splicing algorithm based on three-dimensional non-corresponding mesh surfaces of arbitrary shapes in a multi-region numerical simulation calculation, which greatly reduces the restriction on the use of meshes in the application of computational fluid dynamics engineering.

为实现上述目的,本发明提供如下技术方案:To achieve the above object, the present invention provides the following technical solutions:

一种基于任意形状三维非对应网格面的拼接算法,包括以下步骤:A splicing algorithm based on three-dimensional non-corresponding grid surfaces of any shape, comprising the following steps:

S1:确认非对应交界面的两侧面τA和τBS1: Confirm the two sides τ A and τ B of the non-corresponding interface;

S2:定义用于储存相交小面的列表LcS2: define a list L c for storing intersecting facets;

S3:对所有的τA上的某一个面KA执行下面的操作;S3: Perform the following operations on a certain face KA on all τ A ;

1)对所有的τB上的某一个面KB执行下面的操作;1) Perform the following operations on a certain face KB on all τ B ;

1.1确定出中间面τC1.1 Determine the middle plane τ C ;

1.2计算出中间面的面法向nC1.2 Calculate the surface normal n C of the middle surface;

1.3用过滤器判断KA和KB是否可能相交;1.3 Use a filter to determine whether K A and K B may intersect;

1.4如果KA和KB可能相交,则进行下一步;1.4 If K A and K B may intersect, proceed to the next step;

1.4.1使用投影将KA和KB投影到中间面τC上并相交;1.4.1 Use projection to project KA and KB onto the midplane τ C and intersect ;

1.4.2如果KA和KB相交面KC存在,则进行下一步;1.4.2 If the intersection surface K C of K A and K B exists, proceed to the next step;

1.4.2.1计算KC计算的面积、面心和面法向;1.4.2.1 Calculate the area, face center and face normal direction calculated by K C ;

1.4.2.2将KC添加至Lc1.4.2.2 adding K C to L c ;

1.4.2.3建立映射χCA(KC)=KA,χCB(KC)=KB,表示KC是由KA和 KB相交得到的;1.4.2.3 Establish the mapping χ CA (K C )=K A , χ CB (K C )= KB , indicating that K C is obtained by the intersection of KA and KB ;

S4:对相交小面进行面积校核。S4: Check the area of the intersecting facets.

进一步的,所述步骤S7中采用过滤器判断KA和KB相交的具体方式为: KA和KB若可能相交,则应满足下列两式:Further, in the step S7, the specific method of using a filter to judge the intersection of KA and KB is: If KA and KB may intersect, the following two formulas should be satisfied:

Figure RE-GDA0002893366180000021
Figure RE-GDA0002893366180000021

Figure RE-GDA0002893366180000022
Figure RE-GDA0002893366180000022

其中rA是以面心为圆心,能包含KA的最小球体的半径;where r A is the radius of the smallest sphere that can contain KA ;

Figure RE-GDA0002893366180000031
Figure RE-GDA0002893366180000031

rB rB is

Figure RE-GDA0002893366180000032
Figure RE-GDA0002893366180000032

dAB表示从KA面心到KB面心的向量,即

Figure BDA0002762170230000033
nC是中间面的面法向。d AB represents the vector from the face center of K A to the face center of K B , namely
Figure BDA0002762170230000033
n C is the face normal of the midplane.

进一步的,空间凸多边形相交算法为:Further, the spatial convex polygon intersection algorithm is:

1)确认一对可能相交的面KA和KB,以及它们的中间平面; 1 ) Identify a pair of potentially intersecting faces KA and KB , and their midplane;

2)将KA投影到中间平面,得到空间凸多边形PA2) Projecting KA to the mid-plane to obtain a space convex polygon P A ;

3)对所有的KB的边执行下面的操作;3) Perform the following operations on all edges of KB ;

3.1创建一个通过该边的切割面αclip3.1 Create a cutting surface α clip through the edge;

3.2使用αclip将PA切割成两部分并得到保留部分;3.2 Use α clip to cut P A into two parts and get the reserved part;

3.3将PA替换为该步骤得到的保留部分;3.3 Replace P A with the reserved part obtained in this step;

4)如果PA存在,则进行下一步;4 ) If PA exists, proceed to the next step;

4.1将PA储存为小面,记为KC,附属于KA和KB4.1 Store P A as a facet, denoted as K C , attached to K A and K B ;

4.2计算KC的面心,面积和面法向;4.2 Calculate the face center, area and face normal of K C ;

4.3返回KC作为结果。4.3 Return K C as the result.

所述面法向由下式计算得到,The surface normal is calculated by the following formula,

Figure RE-GDA0002893366180000034
Figure RE-GDA0002893366180000034

进一步的,所述空间三维凸多边形切割算法为:Further, the space three-dimensional convex polygon cutting algorithm is:

1)给定一凸多边形P和其切割面αclip(nclip,rclip);1) Given a convex polygon P and its cutting surface α clip (n clip , r clip );

2)对所有的P的顶点执行下面的操作;2) Perform the following operations on all the vertices of P;

2.1判断并记录该点是否在切割面的内侧;2.1 Judge and record whether the point is on the inner side of the cutting surface;

3)创建一个空的多边形Pnew3) Create an empty polygon P new ;

4)对所有的P的顶点执行下面的操作;4) Perform the following operations on all the vertices of P;

4.1如果该点(Ni)在切割面内侧,则进行下一步;4.1 If the point (N i ) is inside the cutting plane, proceed to the next step;

4.1.1将Ni加入到Pnew的顶点列表中; 4.1.1 Add Ni to the vertex list of P new ;

4.2如果Ni和它的下一点Ni+1在αclip的不同侧,则进行下一步;4.2 If Ni and its next point Ni +1 are on different sides of α clip , proceed to the next step;

4.2.1计算NiNi+1和αclip的交点,记为Nnew4.2.1 Calculate the intersection of N i N i+1 and α clip , denoted as N new ;

4.2.2将Nnew加到Pnew的顶点列表中;4.2.2 Add N new to the vertex list of P new ;

5)返回Pnew5) Return P new .

进一步的,在αclip内侧的顶点N需满足下式:Further, the vertex N inside the α clip needs to satisfy the following formula:

(rN-rclip)·nclip≥0。(r N -r clip )·n clip ≥0.

进一步的,交点的计算方法为:Further, the calculation method of the intersection point is:

rnew=ri+λ(ri+1-ri)r new =r i +λ(r i+1 -r i )

其中,

Figure RE-GDA0002893366180000041
in,
Figure RE-GDA0002893366180000041

进一步的,网格及其相交得到的小面应满足下式:Further, the facets obtained by the mesh and its intersection should satisfy the following formula:

Figure RE-GDA0002893366180000042
Figure RE-GDA0002893366180000042

and

Figure RE-GDA0002893366180000043
Figure RE-GDA0002893366180000043

与现有技术相比,本发明的有益效果在于:Compared with the prior art, the beneficial effects of the present invention are:

本发明提出了在多区域数值模拟计算中,任意形状非对应三维平面的网格 拼接计算方案,使处理复杂几何的非对应区域交界面成为了可能,大大降低了 计算流体力学工程应用中对网格的使用限制,可以提高工业数值仿真软件的计 算的效率,并且拓展其适用范围。The invention proposes a grid splicing calculation scheme for non-corresponding three-dimensional planes of arbitrary shapes in multi-region numerical simulation calculation, which makes it possible to deal with the non-corresponding region interface of complex geometry, and greatly reduces the grid connection in the application of computational fluid dynamics engineering. The limitation of grid usage can improve the computational efficiency of industrial numerical simulation software and expand its scope of application.

附图说明Description of drawings

为了更清楚地说明本发明实施例技术方案,下面将对实施例描述中所需要 使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是为了更清楚 地说明本发明实施例或现有技术中的技术方案,对于本领域普通技术人员来讲, 在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to explain the technical solutions of the embodiments of the present invention more clearly, the following briefly introduces the accompanying drawings that need to be used in the description of the embodiments. Obviously, the accompanying drawings in the following description are only for explaining the embodiments of the present invention more clearly. Or technical solutions in the prior art, for those of ordinary skill in the art, other drawings can also be obtained based on these drawings without creative effort.

图1为将非对应面转化为对应的相交小面示意图;Figure 1 is a schematic diagram of converting a non-corresponding surface into a corresponding intersecting facet;

图2为曲率大且网格粗糙的交界面示意图;Fig. 2 is the schematic diagram of the interface with large curvature and rough mesh;

图3为用于判断两面是否可能相交的过滤器示意图;3 is a schematic diagram of a filter for judging whether two sides may intersect;

图4为三维空间中两凸多边形相交过程示意图;4 is a schematic diagram of the intersection process of two convex polygons in three-dimensional space;

图5为波纹管中的流固耦合流动传热问题示意图;Figure 5 is a schematic diagram of the fluid-structure coupling flow heat transfer problem in a bellows;

图6为流体区域网格和固体区域网格交界面处的相交网格示意图;6 is a schematic diagram of the intersecting grid at the interface between the fluid area grid and the solid area grid;

图7温度分布在波纹管中流动方向的某几个截面上的示意图;Figure 7 is a schematic diagram of temperature distribution on certain sections in the flow direction in the bellows;

图8温度分布在流-固交界面的示意图。Figure 8. Schematic diagram of temperature distribution at the fluid-solid interface.

具体实施方式Detailed ways

为了使本领域技术人员更好地理解本发明的技术方案能予以实施,下面结 合具体实施例对本发明作进一步说明,但所举实施例只作为对本发明的说明, 不作为对本发明的限定。In order to enable those skilled in the art to better understand that the technical solutions of the present invention can be implemented, the present invention will be further described below in conjunction with specific embodiments, but the examples are only used as descriptions of the present invention, not as limitations of the present invention.

如图1-4所示的一种基于任意形状三维非对应网格面的拼接算法,具体方案 包括:As shown in Figure 1-4, a splicing algorithm based on three-dimensional non-corresponding mesh surfaces of any shape, the specific scheme includes:

1.网格拼接1. Grid stitching

本发明方法的核心思路便是将非对应面转化为更小的相交小面。The core idea of the method of the present invention is to convert non-corresponding faces into smaller intersecting facets.

图1中(a)为交界面两侧的网格,(b)为相交网格的生成。In Figure 1, (a) is the grid on both sides of the interface, and (b) is the generation of the intersecting grid.

算法1任意三维面的通用非对应交界面网格拼接方法:Algorithm 1 General non-corresponding interface mesh stitching method for any 3D surface:

S1:确认非对应交界面的两侧面τA和τBS1: Confirm the two sides τ A and τ B of the non-corresponding interface;

S2:定义用于储存相交小面的列表LcS2: define a list L c for storing intersecting facets;

S3:对所有的τA上的某一个面KA执行下面的操作;S3: Perform the following operations on a certain face KA on all τ A ;

1)对所有的τB上的某一个面KB执行下面的操作;1) Perform the following operations on a certain face KB on all τ B ;

1.1确定出中间面τC1.1 Determine the middle plane τ C ;

1.2计算出中间面的面法向nC1.2 Calculate the surface normal n C of the middle surface;

1.3用过滤器判断KA和KB是否可能相交;1.3 Use a filter to determine whether K A and K B may intersect;

1.4如果KA和KB可能相交,则进行下一步;1.4 If K A and K B may intersect, proceed to the next step;

1.4.1使用投影将KA和KB投影到中间面τC上并相交;1.4.1 Use projection to project KA and KB onto the midplane τ C and intersect ;

1.4.2如果KA和KB相交面KC存在,则进行下一步;1.4.2 If the intersection surface K C of K A and K B exists, proceed to the next step;

1.4.2.1计算KC计算的面积、面心和面法向;1.4.2.1 Calculate the area, face center and face normal direction calculated by K C ;

1.4.2.2将KC添加至Lc1.4.2.2 adding K C to L c ;

1.4.2.3建立映射χCA(KC)=KA,χCB(KC)=KB,表示KC是由KA和 KB相交得到的;1.4.2.3 Establish the mapping χ CA (K C )=K A , χ CB (K C )= KB , indicating that K C is obtained by the intersection of KA and KB ;

S4:对相交小面进行面积校核。S4: Check the area of the intersecting facets.

2.过滤器2. Filters

为了节省计算资源,本发明使用了过滤器。对于某一τA上的某一个面KA, 仅有几个τB上的KB可能与之相交,而这些KB是可以通过简单的判断得到的。 如图2所示,(a)两面的垂直距离不能过大,(b)两面的切向距离不能过大。To save computing resources, the present invention uses filters. For a certain face KA on a certain τ A , only a few KBs on τ B may intersect with it, and these KBs can be obtained by simple judgment. As shown in Figure 2, (a) the vertical distance between the two sides should not be too large, and (b) the tangential distance between the two sides should not be too large.

如图3(a)所示,相交小面的所在平面τC由其面上一点及面法向决定,如 下方程所示:As shown in Figure 3(a), the plane τ C where the intersecting facets are located is determined by a point on the face and the normal direction of the face, as shown in the following equation:

nC=-ωAnABnB (1)n C = -ω A n AB n B (1)

rC=ωArABrB (2)r C = ω A r A + ω B r B (2)

其中加权系数如下表示,The weighting coefficient is expressed as follows,

Figure RE-GDA0002893366180000071
Figure RE-GDA0002893366180000071

如图3(b)所示,由过滤器的定义得,KA和KB若可能相交,则应满足下 列两式:As shown in Figure 3(b), from the definition of the filter, if K A and K B may intersect, the following two equations should be satisfied:

Figure RE-GDA0002893366180000072
Figure RE-GDA0002893366180000072

Figure RE-GDA0002893366180000073
Figure RE-GDA0002893366180000073

其中rA是以面心为圆心,能包含KA的最小球体的半径;where r A is the radius of the smallest sphere that can contain KA ;

Figure RE-GDA0002893366180000074
Figure RE-GDA0002893366180000074

rB rB is

Figure RE-GDA0002893366180000075
Figure RE-GDA0002893366180000075

dAB表示从KA面心到KB面心的向量,即

Figure BDA0002762170230000076
nC是中间面的面法向。d AB represents the vector from the face center of K A to the face center of K B , namely
Figure BDA0002762170230000076
n C is the face normal of the midplane.

ε1和ε2是过滤器参数,默认为0.1和1.1。ε 1 and ε 2 are filter parameters and default to 0.1 and 1.1.

方程保证了KA和KB在垂直方向的距离足够小,方程保证了KA和KB在的 面法向夹角垂直方向的距离很小。如果两面不能满足其中任意一式,则过滤器 会认为它们不相交,将其过滤掉。 The equation ensures that the distance between KA and KB in the vertical direction is small enough, and the equation ensures that the distance between KA and KB in the vertical direction of the surface normal angle is very small. If the two faces do not satisfy either of the formulas, the filter considers them disjoint and filters them out.

3.空间凸多边形相交算法3. Space convex polygon intersection algorithm

当两多边形面通过了过滤器检查后,它们将被投影到中间平面上并在空间 中进行相交。在此公开一种空间中平面相交的算法。首先,中间平面由式(1) (2)决定,相交的过程如图4所示。When two polygonal faces pass the filter check, they are projected onto the midplane and intersected in space. An algorithm for plane intersection in space is disclosed herein. First, the middle plane is determined by equations (1) and (2), and the process of intersection is shown in Figure 4.

图4中左侧(a)表示三维空间中的多边形相交图,右侧(b)表示三维空 间中切割一个多边形的表示。The left (a) in Figure 4 represents a polygon intersection graph in three-dimensional space, and the right (b) represents a representation of cutting a polygon in three-dimensional space.

算法2:空间凸多边形相交算法:Algorithm 2: Space convex polygon intersection algorithm:

1)确认一对可能相交的面KA和KB,以及它们的中间平面; 1 ) Identify a pair of potentially intersecting faces KA and KB , and their midplane;

2)将KA投影到中间平面,得到空间凸多边形PA2) Projecting KA to the mid-plane to obtain a space convex polygon P A ;

3)对所有的KB的边执行下面的操作;3) Perform the following operations on all edges of KB ;

3.1创建一个通过该边的切割面αclip3.1 Create a cutting surface α clip through the edge;

3.2使用αclip将PA切割成两部分并得到保留部分;3.2 Use α clip to cut P A into two parts and get the reserved part;

3.3将PA替换为该步骤得到的保留部分;3.3 Replace P A with the reserved part obtained in this step;

4)如果PA存在,则进行下一步;4 ) If PA exists, proceed to the next step;

4.1将PA储存为小面,记为KC,附属于KA和KB4.1 Store P A as a facet, denoted as K C , attached to K A and K B ;

4.2计算KC的面心,面积和面法向;4.2 Calculate the face center, area and face normal of K C ;

4.3返回KC作为结果。4.3 Return K C as the result.

为了确认上述方法④中的切割面,需要该面上一已知点和该面的面法向。 以图4为例,切割面上的点可用边N1N2上任意一点,比如0.5(rN1+rN2)。In order to confirm the cutting plane in the above method ④, a known point on the plane and the plane normal of the plane are required. Taking Figure 4 as an example, the point on the cutting surface can be any point on the edge N1N2, such as 0.5(rN1+rN2).

面法向由下式计算得到,The face normal is calculated by the following formula,

Figure RE-GDA0002893366180000081
Figure RE-GDA0002893366180000081

以保证切割面与被切面垂直。用该切割面切割后取的剩余的多边形,再用 KB的下一边去做这种切割,所有边都循环完毕后,剩余的多边形便是相交后的 多边形,如图4(b)所示。下述的算法3是用切割面切割空间凸多边形的算法,算 法会返回一个被切割后的剩余多边形,如图4(b)中的中心部分。To ensure that the cutting surface is perpendicular to the cut surface. Use the remaining polygons after cutting with this cutting plane, and then use the next edge of KB to do this cutting. After all the edges are cycled, the remaining polygons are the intersected polygons, as shown in Figure 4(b) . The following Algorithm 3 is an algorithm for cutting a space convex polygon with a cutting plane, and the algorithm returns a residual polygon after cutting, as shown in the center part of Fig. 4(b).

算法3:所述空间三维凸多边形切割算法为:Algorithm 3: The spatial three-dimensional convex polygon cutting algorithm is:

1)给定一凸多边形P和其切割面αclip(nclip,rclip);1) Given a convex polygon P and its cutting surface α clip (n clip , r clip );

2)对所有的P的顶点执行下面的操作;2) Perform the following operations on all the vertices of P;

2.1判断并记录该点是否在切割面的内侧;2.1 Judge and record whether the point is on the inner side of the cutting surface;

3)创建一个空的多边形Pnew3) Create an empty polygon P new ;

4)对所有的P的顶点执行下面的操作;4) Perform the following operations on all the vertices of P;

4.1如果该点(Ni)在切割面内侧,则进行下一步;4.1 If the point (N i ) is inside the cutting plane, proceed to the next step;

4.1.1将Ni加入到Pnew的顶点列表中; 4.1.1 Add Ni to the vertex list of P new ;

4.2如果Ni和它的下一点Ni+1在αclip的不同侧,则进行下一步;4.2 If Ni and its next point Ni +1 are on different sides of α clip , proceed to the next step;

4.2.1计算NiNi+1和αclip的交点,记为Nnew4.2.1 Calculate the intersection of N i N i+1 and α clip , denoted as N new ;

4.2.2将Nnew加到Pnew的顶点列表中;4.2.2 Add N new to the vertex list of P new ;

5)返回Pnew5) Return P new .

在算法3的③中,在αclip内侧的顶点N需满足下式:In ③ of Algorithm 3, the vertex N inside α clip needs to satisfy the following formula:

(rN-rclip)·nclip≥0。(r N -r clip )·n clip ≥0.

为体现多边形的封闭性,在循环顶点的时候(算法3的6行至14行),循 环完所有点后,最后一个点的下一顶点为该轮循环的第一个顶点,这样便形成 了一个闭环。在步骤

Figure RE-GDA0002893366180000092
中,交点的计算方法为:In order to reflect the closure of polygons, when looping vertices (Lines 6 to 14 of Algorithm 3), after looping all points, the next vertex of the last point is the first vertex of the loop, thus forming a closed loop. in step
Figure RE-GDA0002893366180000092
, the calculation method of the intersection point is:

rnew=ri+λ(ri+1-ri)r new =r i +λ(r i+1 -r i )

其中,

Figure RE-GDA0002893366180000091
in,
Figure RE-GDA0002893366180000091

4.网格质量校核4. Grid quality check

网格质量校核可用于判断网格质量是否达标以适用于该发明。正如前面提 过的,在大曲率处使用粗网格会导致本该相交的两网格面间垂直距离过大,过 滤器可能将它们滤掉,视为不可能相交的两面。如图2(a)所示。这样的话,生成 的小面的面积之和会与原面面积有显著差距,由于部分本该存在的小面没有被 生成。最终会导致有限体积法的守恒性要求无法被满足。The grid quality check can be used to determine whether the grid quality is up to standard for the invention. As mentioned earlier, using a coarse mesh at large curvatures will result in too large a vertical distance between two mesh faces that should intersect, and the filter may filter them out as two faces that are unlikely to intersect. As shown in Figure 2(a). In this case, the sum of the area of the generated facets will be significantly different from the area of the original face, because some of the facets that should exist are not generated. Ultimately, the conservation requirement of the finite volume method cannot be satisfied.

数值上来说,用相交得到的小面的面积加和与原面面积对比来判断网格质 量。符合要求的网格及其相交得到的小面应满足下式,Numerically, the mesh quality is judged by comparing the sum of the area of the intersected facets with the area of the original face. The meshes that meet the requirements and their intersecting facets should satisfy the following formula,

Figure RE-GDA0002893366180000101
Figure RE-GDA0002893366180000101

and

Figure RE-GDA0002893366180000102
Figure RE-GDA0002893366180000102

其中ε3为允许面积误差,一般设为0.01。对于质量不达标的网格,可通过 细化网格,尤其是曲率较大处,来进行优化。Among them, ε3 is the allowable area error, which is generally set to 0.01. Meshes with substandard quality can be optimized by refining the mesh, especially where the curvature is large.

实施例:Example:

这里展示一个使用本发明解决的耦合传热问题。如图5所示,计算域为流 体区域(ΩA)和固体区域(ΩB)。内部管径为8mm-14mm。流体区域为高温入口 (100℃),固定流速(0.1m/s)。固体区域的外壁为固定温度(0℃)。A coupled heat transfer problem solved using the present invention is presented here. As shown in Figure 5, the computational domains are the fluid region (Ω A ) and the solid region (Ω B ). The internal pipe diameter is 8mm-14mm. The fluid region is a high temperature inlet (100°C) with a fixed flow rate (0.1m/s). The outer walls of the solid region are at a fixed temperature (0°C).

流体密度为1000kg/m3,动力粘性系数为,比热容为,导热系数为。固体 区域导热系数为。本问题求解稳态流固耦合传热。The fluid density is 1000kg/m 3 , the dynamic viscosity coefficient is , the specific heat capacity is , and the thermal conductivity is . The thermal conductivity of the solid region is . This problem solves the steady-state fluid-structure coupled heat transfer.

流体和固体区域分别用六面体和四面体离散,图6为利用该方法得到的交 界面。The fluid and solid regions are discretized with hexahedrons and tetrahedrons, respectively. Figure 6 shows the interface obtained by this method.

图7-8展示了波纹管中不同截面的温度分布和固-液交界面的温度分布。结 果中可以看到典型的波纹管流动传热特征。在出口边界的冷却作用下,温度在 流动方向呈下降趋势。在固体区域,高温集中出现在波谷区,原因是这些地方 里管中心轴更近。温度分布在交界面处保持了连续性。本实施例展示了本发明 对于耦合传热问题的适用性。Figures 7-8 show the temperature distribution of different sections in the bellows and the temperature distribution of the solid-liquid interface. Typical bellows flow heat transfer characteristics can be seen in the results. Under the cooling effect of the outlet boundary, the temperature tends to decrease in the flow direction. In the solid region, the high temperature is concentrated in the trough region because the central axis of the tube is closer in these regions. The temperature distribution maintains continuity at the interface. This example demonstrates the applicability of the present invention to coupled heat transfer problems.

本发明提出了任意形状非对应三维平面的网格拼接方案,使处理复杂几何 的非对应区域交界面成为了可能,大大降低了计算流体力学工程应用中对网格 的使用限制,可以提高工业数值仿真软件的计算的效率,并且拓展其适用范围。The invention proposes a grid splicing scheme for non-corresponding three-dimensional planes of any shape, which makes it possible to deal with the non-corresponding area interface of complex geometry, greatly reduces the use restriction of grids in computational fluid dynamics engineering applications, and can improve industrial numerical value The computational efficiency of the simulation software and its scope of application are expanded.

本发明中未做详细描述的内容均为现有技术。Contents that are not described in detail in the present invention are all in the prior art.

以上所述仅为本发明的较佳实施例而已,并不用以限制本发明,凡在本发 明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发 明的保护范围之内。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included in the scope of the present invention. within the scope of protection.

Claims (8)

1.一种基于任意形状三维非对应网格面的拼接算法,其特征在于,包括以下步骤:1. a splicing algorithm based on the three-dimensional non-corresponding grid surface of any shape, is characterized in that, comprises the following steps: S1:确认非对应交界面的两侧面τA和τBS1: Confirm the two sides τ A and τ B of the non-corresponding interface; S2:定义用于储存相交小面的列表LcS2: define a list L c for storing intersecting facets; S3:对所有的τA上的某一个面KA执行下面的操作;S3: Perform the following operations on a certain face KA on all τ A ; 1)对所有的τB上的某一个面KB执行下面的操作;1) Perform the following operations on a certain face KB on all τ B ; 1.1确定出中间面τC1.1 Determine the middle plane τ C ; 1.2计算出中间面的面法向nC1.2 Calculate the surface normal n C of the middle surface; 1.3用过滤器判断KA和KB是否可能相交;1.3 Use a filter to determine whether K A and K B may intersect; 1.4如果KA和KB可能相交,则进行下一步;1.4 If K A and K B may intersect, proceed to the next step; 1.4.1使用投影将KA和KB投影到中间面τC上并相交;1.4.1 Use projection to project KA and KB onto the midplane τ C and intersect ; 1.4.2如果KA和KB相交面KC存在,则进行下一步;1.4.2 If the intersection surface K C of K A and K B exists, proceed to the next step; 1.4.2.1计算KC计算的面积、面心和面法向;1.4.2.1 Calculate the area, face center and face normal direction calculated by K C ; 1.4.2.2将KC添加至Lc1.4.2.2 adding K C to L c ; 1.4.2.3建立映射χCA(KC)=KA,χCB(KC)=KB,表示KC是由KA和KB相交得到的;1.4.2.3 Establish the mapping χ CA (K C )=K A , χ CB (K C )= KB , indicating that K C is obtained by the intersection of KA and KB ; S4:对相交小面进行面积校核。S4: Check the area of the intersecting facets. 2.根据权利要求1所述的一种基于任意形状三维非对应网格面的拼接算法,其特征在于,所述步骤S7中采用过滤器判断KA和KB相交的具体方式为:KA和KB若可能相交,则应满足下列两式:2. a kind of splicing algorithm based on three-dimensional non-corresponding grid surface of arbitrary shape according to claim 1, is characterized in that, adopts filter in described step S7 to judge the concrete mode that K A and K B intersect as: K A If it is possible to intersect with K B , the following two formulas should be satisfied:
Figure RE-FDA0002893366170000011
Figure RE-FDA0002893366170000011
Figure RE-FDA0002893366170000012
Figure RE-FDA0002893366170000012
其中rA是以面心为圆心,能包含KA的最小球体的半径;where r A is the radius of the smallest sphere that can contain KA ;
Figure RE-FDA0002893366170000021
Figure RE-FDA0002893366170000021
rB rB is
Figure RE-FDA0002893366170000022
Figure RE-FDA0002893366170000022
dAB表示从KA面心到KB面心的向量,即
Figure RE-FDA0002893366170000023
nC是中间面的面法向。
d AB represents the vector from the face center of K A to the face center of K B , namely
Figure RE-FDA0002893366170000023
n C is the face normal of the midplane.
3.根据权利要求1所述的一种基于任意形状三维非对应网格面的拼接算法,其特征在于,空间凸多边形相交算法为:3. a kind of splicing algorithm based on arbitrary shape three-dimensional non-corresponding mesh surface according to claim 1, is characterized in that, space convex polygon intersection algorithm is: 1)确认一对可能相交的面KA和KB,以及它们的中间平面; 1 ) Identify a pair of potentially intersecting faces KA and KB , and their midplane; 2)将KA投影到中间平面,得到空间凸多边形PA2) Projecting KA to the mid-plane to obtain a space convex polygon P A ; 3)对所有的KB的边执行下面的操作;3) Perform the following operations on all edges of KB ; 3.1创建一个通过该边的切割面αclip3.1 Create a cutting surface α clip through the edge; 3.2使用αclip将PA切割成两部分并得到保留部分;3.2 Use α clip to cut P A into two parts and get the reserved part; 3.3将PA替换为该步骤得到的保留部分;3.3 Replace P A with the reserved part obtained in this step; 4)如果PA存在,则进行下一步;4 ) If PA exists, proceed to the next step; 4.1将PA储存为小面,记为KC,附属于KA和KB4.1 Store P A as a facet, denoted as K C , attached to K A and K B ; 4.2计算KC的面心,面积和面法向;4.2 Calculate the face center, area and face normal of K C ; 4.3返回KC作为结果。4.3 Return K C as the result. 4.根据权利要求1或2所述的一种基于任意形状三维非对应网格面的拼接算法,其特征在于,所述面法向由下式计算得到,4. a kind of splicing algorithm based on arbitrary shape three-dimensional non-corresponding mesh surface according to claim 1 and 2, is characterized in that, described surface normal is calculated by following formula,
Figure RE-FDA0002893366170000024
Figure RE-FDA0002893366170000024
5.根据权利要求1所述的一种基于任意形状三维非对应网格面的拼接算法,其特征在于,所述空间三维凸多边形切割算法为:5. a kind of splicing algorithm based on arbitrary shape three-dimensional non-corresponding mesh surface according to claim 1, is characterized in that, described space three-dimensional convex polygon cutting algorithm is: 1)给定一凸多边形P和其切割面αclip(nclip,rclip);1) Given a convex polygon P and its cutting surface α clip (n clip , r clip ); 2)对所有的P的顶点执行下面的操作;2) Perform the following operations on all the vertices of P; 2.1判断并记录该点是否在切割面的内侧;2.1 Judge and record whether the point is on the inner side of the cutting surface; 3)创建一个空的多边形Pnew3) Create an empty polygon P new ; 4)对所有的P的顶点执行下面的操作;4) Perform the following operations on all the vertices of P; 4.1如果该点(Ni)在切割面内侧,则进行下一步;4.1 If the point (N i ) is inside the cutting plane, proceed to the next step; 4.1.1将Ni加入到Pnew的顶点列表中; 4.1.1 Add Ni to the vertex list of P new ; 4.2如果Ni和它的下一点Ni+1在αclip的不同侧,则进行下一步;4.2 If Ni and its next point Ni +1 are on different sides of α clip , proceed to the next step; 4.2.1计算NiNi+1和αclip的交点,记为Nnew4.2.1 Calculate the intersection of N i N i+1 and α clip , denoted as N new ; 4.2.2将Nnew加到Pnew的顶点列表中;4.2.2 Add N new to the vertex list of P new ; 5)返回Pnew5) Return P new . 6.根据权利要求5所述的一种基于任意形状三维非对应网格面的拼接算法,其特征在于,在αclip内侧的顶点N需满足下式:6. a kind of splicing algorithm based on arbitrary shape three-dimensional non-corresponding mesh surface according to claim 5, is characterized in that, the vertex N in the inside of α clip needs to satisfy following formula: (rN-rclip)·nclip≥0。(r N -r clip )·n clip ≥0. 7.根据权利要求5所述的一种基于任意形状三维非对应网格面的拼接算法,其特征在于,交点的计算方法为:7. a kind of splicing algorithm based on arbitrary shape three-dimensional non-corresponding grid surface according to claim 5, is characterized in that, the calculation method of intersection is: rnew=ri+λ(ri+1-ri)r new =r i +λ(r i+1 -r i ) 其中,
Figure RE-FDA0002893366170000031
in,
Figure RE-FDA0002893366170000031
8.根据权利要求1所述的一种基于任意形状三维非对应网格面的拼接算法,其特征在于,网格及其相交得到的小面应满足下式:8. a kind of splicing algorithm based on arbitrary shape three-dimensional non-corresponding grid surface according to claim 1, is characterized in that, the facet that grid and its intersection obtain should satisfy following formula:
Figure RE-FDA0002893366170000032
Figure RE-FDA0002893366170000032
and
Figure RE-FDA0002893366170000033
Figure RE-FDA0002893366170000033
CN202011221466.6A 2020-11-05 A stitching algorithm based on 3D non-corresponding mesh surfaces of arbitrary shapes Active CN112528530B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011221466.6A CN112528530B (en) 2020-11-05 A stitching algorithm based on 3D non-corresponding mesh surfaces of arbitrary shapes

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011221466.6A CN112528530B (en) 2020-11-05 A stitching algorithm based on 3D non-corresponding mesh surfaces of arbitrary shapes

Publications (2)

Publication Number Publication Date
CN112528530A true CN112528530A (en) 2021-03-19
CN112528530B CN112528530B (en) 2025-04-18

Family

ID=

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003271684A (en) * 2002-03-13 2003-09-26 Ricoh Co Ltd Method, program and recording medium for sewing triangle mesh
CN103389649A (en) * 2013-07-29 2013-11-13 中国空气动力研究与发展中心高速空气动力研究所 Aircraft maneuvering simulation method based on spherical abutting grids
CN106649992A (en) * 2016-11-17 2017-05-10 复旦大学 Ship and wake mesh model merging and optimization method
CN108171799A (en) * 2018-01-19 2018-06-15 北京建筑大学 A kind of method for reconstructing lamination area triangle gridding
CN109074675A (en) * 2016-04-13 2018-12-21 奇跃公司 The steady merging of 3D texture grid

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003271684A (en) * 2002-03-13 2003-09-26 Ricoh Co Ltd Method, program and recording medium for sewing triangle mesh
CN103389649A (en) * 2013-07-29 2013-11-13 中国空气动力研究与发展中心高速空气动力研究所 Aircraft maneuvering simulation method based on spherical abutting grids
CN109074675A (en) * 2016-04-13 2018-12-21 奇跃公司 The steady merging of 3D texture grid
CN106649992A (en) * 2016-11-17 2017-05-10 复旦大学 Ship and wake mesh model merging and optimization method
CN108171799A (en) * 2018-01-19 2018-06-15 北京建筑大学 A kind of method for reconstructing lamination area triangle gridding

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
洪俊武;梁孝平;王光学;庞宇飞;: "多重拼接网格技术应用研究", 空气动力学学报, no. 01, 30 March 2007 (2007-03-30), pages 45 - 49 *
赵轲;高正红;黄江涛;李静;: "拼接网格技术在复杂流场数值模拟中的应用研究", 应用力学学报, no. 01, 15 February 2011 (2011-02-15), pages 69 - 74 *

Similar Documents

Publication Publication Date Title
CN113505443B (en) Self-adaptive Cartesian grid generation method for three-dimensional streaming problem with any shape
Kowalski et al. A PDE based approach to multidomain partitioning and quadrilateral meshing
Chen et al. Automatic sizing functions for unstructured surface mesh generation
Li et al. Polynomial splines over general T-meshes
Zhuang et al. A general and efficient method for finding cycles in 3D curve networks
Sun et al. Quality improvement methods for hexahedral element meshes adaptively generated using grid‐based algorithm
Diazzi et al. Constrained delaunay tetrahedrization: A robust and practical approach
CN104732589B (en) Quick hybrid grid generation method
Owen et al. Pyramid elements for maintaining tetrahedra to hexahedra conformability
Pan et al. Subdivision based isogeometric analysis for geometric flows
Brenner et al. Multigrid methods for the symmetric interior penalty method on graded meshes
CN112528530A (en) Splicing algorithm based on arbitrary-shape three-dimensional non-corresponding grid surface
CN105224726B (en) The method that structured grid Dynamic mesh is used for unstrctured grid flow field calculation device
CN110188395A (en) A Dimension-Increasing Computational Fluid Mesh Generation Method Based on Linehedron
Foucault et al. Mechanical Criteria for the Preparation of Finite Element Models.
Gou et al. A high‐order element based adaptive mesh refinement strategy for three‐dimensional unstructured grid
Breil et al. A swept intersection‐based remapping method for axisymmetric ReALE computation
CN109783965B (en) Automatic block encryption method for structural grid
CN110728030B (en) Numerical Simulation Method of Coupling Between Steam and Water Based on Surface Condenser
Dyer et al. Voronoi-Delaunay duality and Delaunay meshes
CN112528530B (en) A stitching algorithm based on 3D non-corresponding mesh surfaces of arbitrary shapes
CN111488704A (en) A method and system for calculating the external thermal resistance of cables laid in pipes
CN114936407A (en) Method for sharing GIM (graphic information management) model based on digital design management platform
Colaïtis et al. A cell-centered Amr-Ale framework for 3d multi-material hydrodynamics. Part I: Lagrangian and indirect Euler Amr algorithms
Remmerswaal et al. Towards a sharp, structure preserving two-velocity model for two-phase flow: transport of mass and momentum

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant