CN102298794A - A real-time simulation method based on surface water droplets grid - Google Patents

A real-time simulation method based on surface water droplets grid Download PDF

Info

Publication number
CN102298794A
CN102298794A CN 201110271203 CN201110271203A CN102298794A CN 102298794 A CN102298794 A CN 102298794A CN 201110271203 CN201110271203 CN 201110271203 CN 201110271203 A CN201110271203 A CN 201110271203A CN 102298794 A CN102298794 A CN 102298794A
Authority
CN
Grant status
Application
Patent type
Application number
CN 201110271203
Other languages
Chinese (zh)
Inventor
周昆
张译中
王华民
王帅
童一颖
Original Assignee
浙江大学
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

Links

Abstract

本发明公开了一种基于面网格的实时水滴仿真方法,该方法通过将三维流体运动模型简化为面网格模型;通过在每一步迭代隐式计算平均曲率流,产生表面张力的效果;通过接触角运算改变水滴接触固体表面时的形状;本发明通过进行一系列的网格优化及连通性测试,实现网格的融合与分裂,并提高网格的质量,实时获得与多种真实物理实验接近的水滴运动效果,包括水滴碰撞时的小波,水柱的截断以及水滴在固体表面的流动。 The present invention discloses a method based on a real-time simulation of droplet surface mesh, the method by simplifying the three-dimensional movement of the fluid model surface mesh model; each iteration by implicitly calculated mean curvature flow, an effect of surface tension; by the contact angle of water droplet shape change operation the contact surface of the solid; the present invention, a series of mesh connectivity testing and optimization, to achieve the integration and division of the grid, and to improve the quality of the mesh, and more in real time the actual physical experiment close droplets motion effects, including wavelet collision of water droplets, and droplets of water cut flows solid surface.

Description

一种基于面网格的实时水滴仿真方法 A real-time simulation method based on surface water droplets grid

技术领域 FIELD

[0001] 本发明涉及物理仿真技术领域,尤其涉及一种基于面网格的实时水滴仿真方法。 [0001] The present invention relates to a physical simulation, and in particular relates to a real-time simulation method based on the drop of the surface mesh. 背景技术 Background technique

[0002] 水滴经常出现在日常生活的场景中,比如浴室的玻璃,雨天的车窗等。 [0002] water droplets often appear in scenes of daily life, such as the bathroom glass, windows and so on rainy days. 同大体积的流体相比,水滴具有较大的粘性和表面张力,因此其仿真难度更大。 Compared with a large volume of fluid droplets having a larger surface tension and viscosity, and therefore more difficult the simulation. 当水滴以三维体素表示时,如此大的粘性和表面张力需要非常小的步长才能保证精度和稳定性。 When expressed in a three-dimensional voxel droplets, such a large viscosity and surface tension required very small steps in order to ensure the accuracy and stability. 三维体素表示需要很大的内存开销才能记录表面的细节,使得制作包含很多水滴的一般场景的时候会非常困难。 Three-dimensional voxel represents a significant overhead required to record the details of the surface of the memory, so that when the general production contains scenes of many water droplets will be very difficult. 因此一般的流体仿真方法不适合用于水滴的仿真。 Thus a general flow simulation method is not suitable for the simulation of droplets.

[0003] Wang提出了一种基于潜水方程的流体仿真方法(H. Wang, G. Miller, and G. Turk, "Solving general shallow wave equations on surfaces,,,in Proceedings of the 2007 ACM SIGGRAPH/Eurοgraphics symposium on Computer animation (SCA 2007), 2007, pp. 2¾- 238),这种采用高度场表示的网格能够很方便的模拟水滴在固体表面的流动,但是不能够处理凹陷的固体表面和水柱的断裂。Thtoey则采用了面网格来表示水滴表面的细节(N. Thiirey, C. ffojtan, M. Gross, and G. Turk, "A multiscale approach to mesh-based surface tension flows, ,, ACM Transactions on Graphics (SIGGRAPH 2010),vol. 29,no. 4,pp. 48:1 - 48:10,July 2010),但是他们的方法计算量很大,需要离线计算。 [0003] Wang proposes a fluid simulation method based on Equation diving (H. Wang, G. Miller, and G. Turk, "Solving general shallow wave equations on surfaces ,,, in Proceedings of the 2007 ACM SIGGRAPH / Eurοgraphics symposium on Computer animation (SCA 2007), 2007, pp. 2¾- 238), which uses the height field represented by the grid can be easily simulated in the water droplet flowing solid surface, but can not handle concave broken solid surface and the water column .Thtoey surface mesh is used to represent the details of the water droplet surface (N. Thiirey, C. ffojtan, M. Gross, and G. Turk, "a multiscale approach to mesh-based surface tension flows, ,, ACM Transactions on Graphics (SIGGRAPH 2010), vol 29, no 4, pp 48: 1 - 48:... 10, July 2010), but their method of computationally expensive, off-line calculation required.

[0004] 平均曲率流的隐式解法可以参考Desbrun的论文(M. Desbrun, M. Meyer, P. Schroder, and Α. H. Barr, "Implicit fairing of irregular meshes using diffusion and curvature flow, ” in Proceedings of the 26th annual conference on Computer graphics and interactive techniques (SIGGRAPH ' 99), 1999, pp. 317 - 324 ;D. Mathieu, Μ. Mark, S. Peter, and AH Barr, "Discrete differential geometry operators in nD. " Springer-Verlag, 2000, pp. 35 - 57),^Laplace-Beltrami [0004] Implicit Solution mean curvature flow may Desbrun reference paper (M. Desbrun, M. Meyer, P. Schroder, and Α. H. Barr, "Implicit fairing of irregular meshes using diffusion and curvature flow," in Proceedings of the 26th annual conference on Computer graphics and interactive techniques (SIGGRAPH '99), 1999, pp 317 - 324;... D Mathieu, Μ Mark, S. Peter, and AH Barr, "Discrete differential geometry operators in nD." Springer-Verlag, 2000, pp 35 -. 57), ^ Laplace-Beltrami

在稀疏线性空间,因此可以用大步长进行迭代,但是他们提出的方法会造成体积损失。 In sparse linear space, so we can iterate with a long stride, but the method they proposed would result in loss of volume. 要对体积进行修正,可以采用(I. Eckstein, J. -P. Pons, Y. Tong, C. -CJ Kuo, and Μ. Desbrun, "Generalized surface flows for mesh processing,,,in Proceedings of the fifth Eurographics symposium on Geometry processing (SGP 2007), 2007, pp. 183 - 192)提出的体积修正方法。 To correct for the volume, may be employed (I. Eckstein, J. -P. Pons, Y. Tong, C. -CJ Kuo, and Μ. Desbrun, "Generalized surface flows for mesh processing ,,, in Proceedings of the fifth Eurographics symposium on Geometry processing (SGP 2007), 2007, pp 183 -. 192) proposed by volume correction method.

[0005] 由于三维体素化表达不适合表示水滴,而面网格表示则会有很多的优势。 [0005] Since the three-dimensional voxel expression droplets will not fit, the surface mesh representation will have many advantages. 大的粘性使得速度场趋向光滑,因此可以忽略水滴内部的运动,而只关注其表面。 Large viscosity such that the velocity field tends to smooth movement can be ignored inside the droplets, but only the surface of interest. 同时,表面张力可以通过表面的平均曲率直接计算。 Meanwhile, the surface tension can be directly calculated by the mean curvature of the surface. 这些现象使得表面趋向光滑,并使得网格的拓扑变化更易实现。 These phenomena tend to make the surface smooth, and so easier to implement mesh topology change.

发明内容 SUMMARY

[0006] 本发明针对电影及游戏中出现的水滴,其运动计算量大且不稳定的问题,提出了一种基于面网格的实时水滴仿真方法。 [0006] The present invention is directed to films and drops appear in the game, which sports large computation and instability problems, proposed simulation method based on real-time droplet surface mesh.

[0007] 本发明的目的是通过以下技术方案来实现的:一种基于网格的实时水滴仿真方法,该方法采用三角形面网格来表示水滴;通过变形操作模拟流体粘性和表面张力以及与固体接触时的接触角;然后通过网格操作实现网格的融合与分裂,并对网格进行优化。 [0007] The object of the present invention is achieved by the following technical solutions: a real-time simulation droplets grid-based method, which represents a triangular surface mesh to droplets; deformation by operation of the analog and the fluid viscosity and surface tension of the solid contact angle of the contact; then implements merging and splitting operation through the grid mesh, and the mesh is optimized.

[0008] 进一步地,所述通过变形操作模拟流体粘性和表面张力以及与固体接触时的接触角,包括以下子步骤: [0008] Further, by deformation of said analog operating fluid viscosity and surface tension and contact angle when in contact with a solid, comprising the following substeps:

(1)对网格中每个顶点施加外力,包括重力、固体表面吸附力、摩擦力以及一部分粘滞阻力,这些外力用于修正顶点的速度和位置; (1) is applied to each vertex of the mesh force, including gravity, solid surface adsorption, and friction part of the viscous resistance, these forces for correcting the speed and position of the vertices;

(2)隐式计算网格的平均曲率流; (2) Mean Curvature Flow implicitly computing grid;

(3)显式形成接触角,即水滴边缘与固体表面形成的角度;具体如下:首先搜索所有与固体表面接触的顶点,从中提取出接触线,并计算出接触线上每一点与固体表面所成的角度;如果角度大于最大角,则对该顶点施加向外的外力;如果角度小于最小角,则对该顶点施加向内的外力; (3) contact angle formed explicitly, i.e., the angle of water droplets formed on the edge of a solid surface; as follows: First, search all vertices in contact with the solid surface, extracts the contact lines, and calculate the line of contact with a solid surface for each point the angle; if the angle is greater than the maximum angle, the vertex of the external force is applied outwardly; if the angle is less than the minimum angle, an external force is applied inwardly to the apex;

(4)对网格进行体积修正,对计算过程造成的体积损失通过局部和全局两种方法进行修正。 (4) the mesh volume correction, calculation of the volume loss caused by the local and global correction methods.

[0009] 进一步地,所述通过网格操作实现网格的融合与分裂,并对网格进行优化包括以下子步骤: [0009] Further, to achieve the merging and splitting operation through the grid mesh, and the mesh is optimized comprises the substeps of:

(1)网格融合:具体如下:对于两个其包围盒相交的网格,找出两个网格相交的交线, 将原网格沿着这条交线切开,并重新三角化。 (1) Mesh fusion: as follows: For its two bounding boxes intersecting grid, identify the line of intersection of two intersecting grid, mesh original cut along this intersection line, and re-triangulation. 对每一个网格上的三角形,计算其位于另外一个网格的内部还是外部,将标记为内部的三角形删除,并将所有标记为外部的三角形合并成为一个新的网格; On each of the triangular grid, a grid computing located further inside or outside the triangular mark for deletion of internal and external markers all merged into a new triangle mesh;

(2)网格分裂:在进行边删除操作的过程中,如果删除一条边后,网格就不再是流形,则在此处将网格一分为二。 (2) grid division: performing edge deletion process, if deleting an edge, the mesh is no longer manifold, where the grid is divided into two. 具体如下:当要删除的边确定后,搜索其两个顶点的一环邻域,如果发现公共的顶点,并且这个顶点不属于与此边相邻的三角形,那么就在这三个顶点处插入新的顶点和三角形,使原网格分裂为两个新的网格。 As follows: After the edge is determined to be deleted, a search of its two ring vertices neighborhood, if the common vertex, and the vertices are not adjacent to this side of the triangle, then the inserted found at the vertex of the three new vertices and triangles, so that the original grid split into two new grid. 如果要删除的边所在的网格已经只是一个四面体,则将此四面体删除; Mesh side where if you want to remove have been just a tetrahedron, the tetrahedron delete this;

(3)网格优化:包括边折叠,边分裂,边翻转; (3) Mesh Optimization: including a folded edge, side split edge flip;

本发明的有益效果是,将流体仿真的自由度从三维体素降低到二维网格的顶点,从而大大减少了计算的空间和时间开销。 Advantageous effects of the present invention, the degree of freedom simulation of fluid from the three-dimensional volume element to reduce the two-dimensional grid of vertices, thereby greatly reducing the time and cost calculation space. 整个模型分为两步:变形操作,使得水滴形状发生变化;网格操作,使得网格产生融合与分裂效果,并且对网格进行优化。 The entire model is divided into two steps: the deformation operation, so that the drop shape changes; grid operation, the grid will produce a fusion and division results, and to optimize the mesh. 本发明可以很容易的与现有的流体方针技术相结合,用来制作高精度的流体动画。 The present invention can be readily combined with fluid prior art approach, the fluid used to make highly accurate animation.

附图说明 BRIEF DESCRIPTION

[0010] 图1是本发明提出的算法流程图; [0010] FIG. 1 is a flowchart showing an algorithm proposed by the invention;

图2是本发明提出的形成接触角运算示意图; FIG 2 is a schematic view of a contact angle of operation proposed by the invention;

图3是本发明提出的网格分裂算法示意图,图3 (a)显示了通过添加新的顶点和三角形将网格分裂成四面体的过程,图3 (b)显示了一种需要特殊处理的情况; 3 is a schematic of the proposed algorithm of the present invention, the mesh division, FIG. 3 (a) shows the addition of new vertices and triangles split into a tetrahedral mesh of the process, FIG. 3 (b) shows a need for special handling Happening;

图4是本发明的两水滴碰撞,融合并震荡的效果图,其中图4 (a)是碰撞前地水滴,图4 (b)和(c)显示融合震荡过程中的两个状态;图5是本发明的一滴水滴落在固体表面,被固体表面吸附形成接触线的效果图,其中图5 (a)是滴落前地水滴,图5 (b)是吸附过程中的水滴,图5 (c)是最终形成接触线的水滴; FIG 4 is a two droplets collide to the present invention, FIG effect fusion and shaken, wherein FIG. 4 (a) is the droplet, FIG. 4 (b) and (c) shows the state of two fused shock during a frontal collision; FIG. 5 the present invention is a drop of water is dropped on a solid surface, is adsorbed to form a solid line of contact surface renderings, wherein FIG. 5 (a) is a front dropped to drop, FIG. 5 (b) is a drop in the adsorption process, FIG. 5 ( c) formation of water droplets is the final line of contact;

图6是本发明的不同表面张力系数的流体在相同材料的表面表现出不同形状的效果 FIG 6 is different from the fluid surface tension coefficient of the present invention exhibit a different shape in the surface of the same material effect

图; Figure;

图7是本发明的不同表面张力系数的流体Rayleigh-Plateau不稳定现象效果图,其中图7 (a)是张力系数较小时的效果,图7 (b)是中等张力系数的效果,图7 (c)是张力系数较大时的效果。 7 is different from the surface tension coefficient of the fluid Rayleigh-Plateau instability renderings of the invention, wherein FIG. 7 (a) is a small effect tension coefficient, FIG. 7 (b) the effect of medium tension coefficient, FIG. 7 ( c) the effect of large tension coefficient.

具体实施方式 detailed description

[0011] 所有的水滴都是由三角形面网格来表示的。 [0011] All droplets are represented by the grid of the triangular faces. 面网格的数据结构包括顶点坐标,每一个三角形所包含的顶点,以及面网格上一环邻域的邻接关系。 The data structure comprises a plane mesh vertex coordinates, vertex of each triangle included, and a mesh surface abutting relationship ring neighborhood. 网格可以采用半边结构,或者其它的能够直接获得网格上一环邻域的结构来表示。 Grids can be half of the structure, or other structures can be obtained on the grid a ring represented direct neighborhood.

[0012] 由于小尺度下相对大粘性和强表面张力,水滴的运动主要是受到表面影响。 [0012] Because of the relatively small scale and large viscosity strong surface tension, the movement of water droplets mainly by impact surface. 基于面网格的流体仿真方法主要分为两个步骤,第一步包含了基于物理规律的面网格变形运算,这个运算考虑外力、摩擦力、表面张力以及其他同水滴相关的物理现象。 Fluid surface mesh based simulation method is divided into two steps, the first step comprises a mesh surface based on physical laws strain calculation, consider the operation force, frictional force, surface tension and other physical phenomena associated with the water droplet. 第二步包含一系列改变网格拓扑结构的网格操作,包括网格融合,网格分裂以及网格优化。 The second step includes a series of mesh topology change grid operations, including fusion mesh, the mesh and mesh optimization division.

[0013] 整个系统流水线如图1所示。 [0013] the entire pipeline system shown in Figure 1. 我们通过4个子步骤来实现网格的变形操作,更新网格每个顶点的速度和位置。 We mesh deformation operations implemented by four sub-step, updating the velocity and position of each vertex of the mesh. 对网格中每个顶点施加外力,包括重力和接触力,首先作用在网格的形状和速度上。 It is applied to each vertex of the mesh force, including gravity and contact force, acting on the first speed and the shape of the grid. 随后,隐式计算网格的平均曲率流,模拟表面张力的效果。 Then, the average curvature flow implicitly computing grid, simulate the effect of surface tension. 当水滴与固体表面接触时,为了产生不同的浸润效果,再根据接触角的情况,在接触线上显式地形成接触角。 When the water droplet in contact with the solid surface, in order to produce the effect of invasion, then the contact angle according to the situation, the contact angle formed explicitly in the line of contact. 最终通过体积修正运算来修正整个过程中产生的体积损耗。 The final corrected overall volume loss generated during the volumetric correction operation. 变形运算完成之后, 再进行网格的融合,分裂及优化操作。 After completion of the deformation operation, then fusion of the grid, splitting and optimization operations.

[0014] 这些操作之间相互独立,并按顺序执行,因此可以视为对网格顶点速度和位置的算子。 [0014] These operations are independent of each other, according to the execution order, it can be seen as the velocity and position of the mesh vertices operator. 当经过了前一个算子运算之后,顶点的速度和位置就作为下一个算子的输入。 When an operator has elapsed before the calculation, vertex velocity and position it as the next operator input. 为了 in order to

简化表达,我们用 ν严和;^来表示 Simplify the expression, we use ν strict and; ^ expressed

顶点i在算子运算前的速度和位置,用来表示算子运算后的速度和位置。 In vertex i operator before the operation speed and position, speed and position used to indicate the arithmetic operator. 具体阐 Specifically explain

述如下: As follows:

一、对网格中每个顶点施加外力 An external force is applied to each vertex in the mesh

需要添加的外力包括重力、固体表面吸附力、摩擦力以及一部分粘滞阻力。 We need to add external forces including gravity, surface adsorption forces solids, and a portion of the viscous frictional resistance. 用、, 表示顶点i在这一步前的速度,添加重力可以表示为 + 其中<〜是运算后 After ,, vertex i is represented by the speed of the front of this step, is added where gravity can be expressed as + <~ is an operational

的速度,g是重力加速度,u是时间步长。 Velocity, g is the gravitational acceleration, u is the time step.

Figure CN102298794AD00051

顶点i的位置^前向欧拉法计算,公式为 The position of vertex i ^ before calculating the Euler formula is

Xftf=^f+<™ώ。 Xftf = ^ f + <™ ώ. 顶点位置更新之后,我们检测此顶点是否已经穿透了固体表面。 After the vertex position update, we examined whether the apex has penetrated the solid surface. 如果确 If indeed

实穿透了固体表面,就找出该顶点在固体表面上最近的投影点作为该顶点的新位置,速度也变化为: Real penetrates a solid surface, to find the new location of the nearest vertex on the solid surface of the projection point as the apex, the speed change:

Figure CN102298794AD00052

其中,、是固体表面在f点的速度〜是固体表面&,点的法向。 ,, wherein the solid surface is at the point f is a solid surface speed - &, normal points. 这个公式消除了该 This formula eliminates the

顶点在固体表面法向的相对速度。 Vertex relative speed to a solid surface normal. 一旦穿透固体表面的顶点都被找出来,我们对这些顶点施加摩擦力,公式如下: Once the penetration of the solid surface vertex is to find out, we apply a frictional force to the vertices, the following formula:

Figure CN102298794AD00061

其中,£是摩擦系数。 Wherein, £ is the coefficient of friction. 然后我们用< 〜和的差来重新计算顶点的位置 We then use <~ recalculated and the difference in the positions of the vertices

Figure CN102298794AD00062

[0015] 尽管粘滞阻力在体素化流体仿真中并不被认为是外力,但是在这里我们对面网格施加阻尼来获得粘滞阻力类似的效果。 [0015] Although the viscous resistance of the fluid voxel simulation is not considered an external force, but here we applied across the grid to obtain a damping effect similar to viscous drag. 我们的阻尼效果分为两项: We damping effect is divided into two:

其中,第一项是通常的阻尼产生的,效果是使速度在每步迭代减小的比例为第二项是显式Laplacian-Beltrami算子以阻尼系数”作用产生的。第二项同Navier-Stokes方程中的阻尼非常相似,只是它完全定义在网格表面。“通常取值范围是0. 3到0. 5,V通常在O到0. 1之间。 Wherein the first term is typically generated damping effect is that the speed reduction ratio of each iteration is the second entry is explicitly Laplacian-Beltrami operator to damping "effect produced by the second term with Navier- Stokes equations are very similar damping, but it is completely defined in the mesh surface. "generally in the range of 0. the a. 3 to 0. 5, V O is typically between 0.1. 使用非常大的5值可以避免很多网格缺陷,因此当网格性质很差而需要特别大的阻尼时,可以将▽值设得很大。 A very large number of lattice defects can be avoided value 5, so when the grid is very poor properties and require a particularly large damping values ​​may be set very large ▽.

[0016] 二、隐式计算网格的平均曲率流 [0016] Second, the curvature of the implicit average flow computing grid

我们通过平均曲率流来产生表面张力的效果。 We produce the effect of surface tension mean curvature flow through. 设Y为表面S上任一点,y为曲率流的系 Let Y is any point on the surface S, y is the curvature-based stream

数,Π是S的Laplace-Beltrami算子。 Number, Π S is the Laplace-Beltrami operator. 平均曲率流的连续表示形式为: Mean curvature flow continuous representation of:

Figure CN102298794AD00063

其中,®是法线《方向定义的平均曲率。 Wherein, ® is the mean curvature normal "defined direction. 我们用Desbrun提出的方法(M. Desbrun, M. Methods (M. Desbrun, M. presented us with Desbrun

Figure CN102298794AD00064

Meyer, P. Schroder, and Α. H. Barr, "Implicit fairing of irregular meshes using diffusion and curvature flow, ” in Proceedings of the 26th annual conference on Computer graphics and interactive techniques (SIGGRAPH ' 99), 1999, pp. 317 -324.)对其进行离散化: Meyer, P. Schroder, and Α. H. Barr, "Implicit fairing of irregular meshes using diffusion and curvature flow," in Proceedings of the 26th annual conference on Computer graphics and interactive techniques (SIGGRAPH '99), 1999, pp. 317 . -324) be discrete:

Figure CN102298794AD00065

其中i:是顶点位置的向量u是时间步长,Af是集中地质量矩阵,£是包含了离散Laplace-Beltrami算子计算出的余切系数的对称阵。 Where i: is the position vector of the vertex u is the time step, Af is concentrated mass matrix, £ containing discrete Laplace-Beltrami operator cotangent calculated matrix coefficient symmetry. 用况(彳来表示顶点i的一环邻域 Use case (left foot ring to represent a vertex i neighborhoods

Figure CN102298794AD00066

其中, among them,

Figure CN102298794AD00071

with

Figure CN102298794AD00072

分别为最小接触角和最大接触角,.是边界力的系数是液面法线〜在 They are the minimum contact angle and the maximum contact angle. Border is a coefficient force level is at the normal ~

固体表面的投影,如图2所示。 The projection of the solid surface, as shown in FIG. 这个公式表示接触顶点不会轻易改变位置,并且使得边界外力趋向最小。 This formula represents the contact will not easily change the position of the vertex, and such that the force tends to minimize the boundary.

[0021] 四、对网格进行体积修正 [0021] Fourth, the mesh volume correction

我们的体积修正方法分为局部修正和全局修正两步。 Our volume correction method is divided into two steps the local correction and the global correction.

[0022] 首先计算每个水滴的总速度,包括平移速度和转动速度,然后将其从网格的速度 [0022] First, calculate the total speed of each of the droplets, including translational velocity and rotational speed, then the speed of the grid

场中移除,则剩下的速度使得水滴产生形变和体积变化。 Field is removed, the remaining water droplets so that the speed of deformation and volume change. 设④是单位面积的体积变化率, 其计算方法为: ④ is set volume change per unit area, which is calculated as:

Figure CN102298794AD00073

其中%是顶点i处水滴表面的法线。 % Of which is normal to the surface of the droplets at the vertex i. 然后通过一环邻域计算,的局部均值: Then calculated, by a ring neighborhood local mean:

其中,.和4是与i和j构成的边相对的两个角。 Wherein. 4 side and i and j are composed of two opposite corners. 由于/和£都是对称阵,因此离散平均 Since / and £ are symmetric matrix, and therefore the average discrete

曲率流公式可以通过两边都乘以M变成正定对称阵。 Curvature flow equation can be multiplied by a positive definite symmetric matrix M into by both sides. 我们用非完全预处理Cholesky分解 We incomplete Cholesky decomposition pretreatment

Gene H. ; Van Loan, Charles F. (1996), Matrix Computations (3rd ed.), Johns Hopkins)来求解这个线性系统,其结果是一个新的顶点位置向量。 Gene H.; Van Loan, Charles F. (1996), Matrix Computations (. 3rd ed), Johns Hopkins) for solving the linear system, the result is a new vertex position vector. 当计 When the count

Sfw? — &M Sfw -? & M

算出新的位置之后,计算新的顶点速度: After the new position is calculated, to calculate a new vertex speed:

Figure CN102298794AD00074

[0017] 三、显式形成接触角 [0017] Third, the angle of contact of the explicit

当水滴在固体表面流动的时候,接触线会受到固体材料浸润性的影响。 When the surface of the flow of the water droplets in the solid, the contact line will be affected by the wettability of solid material. 不同的浸润性质导致水滴出现不同的形状,而接触角用来描述这一性质。 Different wetting properties result in different shapes of water drops, and the contact angle is used to describe this property. 我们显式地计算出接触角,并根据接触角的大小修正接触线。 We explicitly calculate the contact angle, and contact line correction according to the size of the contact angle.

[0018] 形成接触角的第一步是在面网格上找出接触线。 The first step [0018] is to find a contact angle line of contact on the surface mesh. 再添加外力一步中,我们已经标记出了所有穿透固体表面的顶点,将接触顶点定义为与非穿透顶点相连的穿透顶点,接触线就定义为连接接触顶点的边的集合,如图2所示。 Add external step, we have marked all penetrating the solid surface apex, the apex is defined as the contact with the non-penetrating penetrating vertices adjacent vertices, the contact line is defined as a set of edges connecting vertices in contact, FIG. 2 shown in FIG.

[0019] 当我们找出接触线之后,我们就将移动接触线,使其达到稳定接触角。 [0019] When we find the line of contact, we will move the line of contact, so as to stabilize the contact angle. 如图2所示,设0为一个接触顶点,A、B、C是水滴在气液表面侧网格的邻面,我们将A、B、C三个面的 As shown, set 0 to a vertex of the contact 2, A, B, C is a gas-liquid droplet interproximal surface side of the mesh, will be A, B, C of the three faces

法线面积加权和作为点0的法线。 And normal area weighted point 0 as normal. %与〜的夹角就可以作为点:)处接触角的估计。 % And ~ angle can be estimated as the contact angle at the point :).

[0020] 根据当前接触角与稳定接触角的差,判断接触顶点的移动方向,通过给顶点施加外力的方法来实现:其中,4是顶点i的总面积。 [0020] The difference between the contact angle and contact angle of the current stabilization, movement direction of the contact is determined vertices, achieved by a method of applying an external force to the vertex: where 4 is the total area of ​​the vertex i. 然后将g从α中减去: G is then subtracted from the α:

a; = Ui -Sj^i ο a; = Ui -Sj ^ i ο

[0023] 全局修正也可以用来对体积进行修正。 [0023] The global correction can also be used to correct the volume. 首先计算当前体积与初始体积的差,然后对网格进行平移,距离为d = 其中u是体积变化是总的表面积。 First computes the current difference between the volume of the initial volume, and then translating the mesh, wherein the distance of d = u is the change in volume is the total surface area. 平移通过沿每一 Translation along each

个顶点的法线移动顶点来实现:Ui=Ui+ dn,。 Moving vertex normals vertices achieved: Ui = Ui + dn ,.

[0024] 当视点距水滴较远时,采用全局修正的方法以提高计算速度;当需要水滴的细节时,我们选用局部修正来保持水滴表面的小波,并根据需要再进行全局修正。 [0024] When the viewpoint from the drop far, the global correction method to increase the calculation speed; drop when necessary details, we choose to keep the partial amendment wavelet droplet surface, and then if necessary corrected globally. 当_修正之 When _ amended

后,再把整个水滴的总速度加回原来的速度场,则现在的速度场就具有了体积守恒的性质。 After, and then add the total speed of the entire water drops back to the original velocity field, the current velocity field on the conservation of nature has a volume.

[0025] 完成上述步骤之后,就实现了单个水滴的变形操作。 After [0025] completing the above steps, to achieve the modification of the operation of a single droplet. 下一步就是要进行多个水滴融合、分裂及优化的网格操作。 The next step is to drop multiple fusion, fission and optimization of grid operations. 具体阐述如下: Specifically addressed as follows:

一、网格融合 First, grid integration

网格融合模拟的是水滴碰撞之后合成一个大水滴的过程。 Grid integration is a synthetic analog of a large drop of water droplets after the collision process. 我们给每一个网格构建一个包围盒,对于两个其包围盒相交的网格,通过AABB树加速找出所有边与面的交点, 如果存在交点,则对两个网格进行逻辑并操作。 We construct a grid to each bounding box, which bounding boxes for two intersecting grid intersection acceleration identify all sides by surfaces AABB tree, if there is an intersection, the two grids and logical operations. 具体方法如下:采用Baraff提出的方法(D. Baraff, A. ffitkin, and Μ. Kass, "Untangling cloth, ” ACM Transactions on Graphics (SIGGRAPH 2003), vol. 22,no. 3,pp. 862 - 870,July 2003)则依次连接这些交点形成交线,将原网格沿着这条交线重新三角化。 Specific methods are as follows: Baraff proposed method (D. Baraff, A. ffitkin, and Μ Kass, "Untangling cloth," ACM Transactions on Graphics (SIGGRAPH 2003), vol 22, no 3, pp 862 - 870.... , July 2003) these intersections are sequentially connected to form a cross line, along which the original grid intersection line re-triangulation. 对每一个网格上的三角形,计算其位于另外一个网格的内部还是外部,将标记为在内部的三角形删除,并将所有标记为外部的三角形合并成为一个新的闭合的网格。 On each of the triangular grid, is calculated which is located further inside or outside of a grid, are marked for deletion in the interior of the triangle, and the triangle marked to external merged into a new grid closed. 这个方法同样可以用在网格的自相交运算中。 This method can also be used in the self-intersection computing grid.

[0026] 二、网格分裂 [0026] Second, the mesh is broken

网格分裂模拟的是一个大水滴被拉成两个小水滴的过程。 Grid division is a simulation of large water droplets into the process pulled two small water droplets. 在进行边删除操作的过程中,如果删除一条边后,网格就不再是流形,则在此处将网格一分为二,如图3所示。 Performing edge deletion process, if deleting an edge, the mesh is no longer manifold, where the grid is divided into two, as shown in FIG. 具体如下:图3中AB为要删除的边,搜索其两个顶点的一环邻域,如果发现公共的相邻顶点,并且这个顶点不属于与此边相邻的三角形,即点E,我们就在A、B、E处添加新的顶点和三角形, 将网格分裂开,如图3 (a)所示。 As follows: AB in FIG. 3 is a side to be deleted, a search of its two vertices neighborhood ring, if found common adjacent vertices, and the vertices are not adjacent to this side of the triangle, i.e. points E, we is added in a, B, E at the new vertices and triangles, the mesh is broken open, FIG. 3 (a) shown in FIG. 如果确定要删除边AB后发现整个连通网格只是一个四面体,那么就直接将这一个四面体删除,如图3 (b)所示。 If it is determined to be deleted after the entire side AB found only a tetrahedral mesh communication, then these directly delete a tetrahedron, as shown in FIG 3 (b) shown in FIG.

[0027] 三、网格优化 [0027] Third, the mesh optimization

每一步迭代都对网格进行一次局部优化,包括边折叠,边分裂,边翻转(Hugues Hoppe, Tony DeRose, Tom Duchamp, John McDonald, Werner Stuetzle. "Mesh Optimization,, ACM SIGGRAPH 1993 Proceedings, 19-26)。当边的长度大于阈值时,就将这条边分裂开; 当边的长度小于阈值时,就将这条边折叠,其中小阈值设为0. 04,大阈值设为小阈值的3 倍。为了加速优化过程并提高优化质量,我们通过最大堆和最小堆构建两个优先级队列,边分裂从最长的边开始依次进行,而边折叠从最短的边开始。边翻转按照边的序号进行,如果一条边的余弦权重为负值,则将这条边进行翻转。 Each iteration will conduct a local optimization of the grid, including the edge collapse, edge split, side flip (Hugues Hoppe, Tony DeRose, Tom Duchamp, John McDonald, Werner Stuetzle. "Mesh Optimization ,, ACM SIGGRAPH 1993 Proceedings, 19-26 .) when the length of a side is greater than a threshold value, it will be this edge split off; when the length of the side is smaller than the threshold value, it will be this edge fold in which a small threshold is set to 0.04, a large threshold is set to 3 hours threshold times. in order to accelerate the optimization process and improve the quality of optimization, we constructed two priority queues by the maximum and minimum heap stack while sequentially performed from cleavage begins longest edge, and starting from the folded edge of the shortest side. flip side edges according to No. conduct, if the flip side of a cosine right weight is negative, then this edge.

[0028] 我们同时给每条边赋一个权重,使得网格边长能够自适应。 [0028] We also to assign a weight to each edge, such that the long sides of the mesh can be adaptive. 比如,我们给流体固体接触面上的边赋以较小的权重,这样即使边的实际长度大于阈值也能够被折叠,这样就可以在接触面上只保留较少的顶点。 For example, we give a solid side contact surface of the fluid endowed with a smaller weight, so that even if the actual length of the sides is greater than a threshold value can also be folded so that it can only keep in less contact surface vertex. 由于接触线对于拓扑变化非常敏感,因此如果某条边属于接触线,则不对其进行边翻转操作。 Since the contact line is very sensitive to changes in the topology, so that if one edge belonging to the line of contact, no edge flip its operation.

[0029] 通过上述步骤,发明人在一台配备了两个2. 4GHz的8核Xeon CPU, 16G内存的计算机上实现了本发明的若干实施实例。 [0029] Through the above steps, the inventors 8 equipped with a two-core Xeon CPU 2. 4GHz of the several examples of embodiment of the present invention on computer memory 16G.

[0030] 实施例一、发明人测试了两个水滴碰撞融合的效果,如图4所示。 [0030] one embodiment, the inventors tested the effect of two colliding droplets fusion, as shown in FIG. 由于水滴的碰撞在水滴表面形成小波,这些小波沿着水滴的表面传播,水滴震动数次,最终在阻尼的作用下停止振动。 Due to the collision of water droplets at the droplet surface formed wavelet, wavelet propagating along the surface of the droplets, drop shock several times, finally stopped under the action of vibration damping.

[0031] 实施例二、发明人测试了一滴水滴落在固体表面的效果,如图5所示。 [0031] according to a second embodiment, the inventors tested the drop of water is dropped on a solid surface results, as shown in FIG. 表面为亲水材料,当水滴接触固体表面后,接触线在表面的强吸附力作用下迅速扩张。 A hydrophilic surface material, solid surface after the water contact, the contact line of rapid expansion at the surface of the strong adsorption force. 最终整滴水在平面上摊开,达到稳定状态。 Eventually the entire drip spread on a plane, to reach a steady state.

[0032] 实施例三、发明人测试了不同表面张力系数的液体在相同的固体表面的效果,如图6所示。 [0032] third embodiment, the inventors tested the same effect in the solid surface, as shown in FIG liquids of different surface tension coefficient. 三个水滴所形成的接触角相同,但表面张力系数越大的液体,其形状越趋向于球形;而表面张力系数小的液体,则更趋向于在表面上摊开。 The same contact angle of water droplets formed by three, but the greater the liquid surface tension coefficient, which tends to be more spherical shape; and a small coefficient of surface tension of the liquid, tends to be even more spread out on the surface.

[0033] 实施例四、发明人测试了不同表面张力系数的液体的Rayleigh-Plateau不稳定现象。 [0033] The fourth embodiment, the inventors tested the Rayleigh-Plateau instability of different liquid surface tension coefficient. 当水从水龙头中流出来,由于Rayleigh-Plateau不稳定现象,水柱会被截断为很多小水滴。 When the water flows out of the tap, because the Rayleigh-Plateau instability, the water column will be truncated to many small water droplets. 表面张力系数越大,水柱就越容易被截断。 The larger the surface tension coefficient, the more easily the water column is truncated. 本实例的运算速度为50FPS。 In this example the operation speed 50FPS.

9 9

Claims (3)

  1. 1. 一种基于网格的实时水滴仿真方法,其特征在于,该方法采用三角形面网格来表示水滴;通过变形操作模拟流体粘性和表面张力以及与固体接触时的接触角;然后通过网格操作实现网格的融合与分裂,并对网格进行优化。 A real-time simulation of droplet grid-based method, wherein the method uses triangular surface mesh represented droplets; contact angle contact by deforming operation simulating fluid viscosity and surface tension and a solid; and then through a grid achieve integration with the operating divisions of the grid, and grid optimization.
  2. 2.根据权利要求1所述基于网格的实时水滴仿真方法,其特征在于,所述通过变形操作模拟流体粘性和表面张力以及与固体接触时的接触角,包括以下子步骤:(1)对网格中每个顶点施加外力,包括重力、固体表面吸附力、摩擦力以及一部分粘滞阻力,这些外力用于修正顶点的速度和位置;(2)隐式计算网格的平均曲率流;(3)显式形成接触角,即水滴边缘与固体表面形成的角度;具体如下:首先搜索所有与固体表面接触的顶点,从中提取出接触线,并计算出接触线上每一点与固体表面所成的角度;如果角度大于最大角,则对该顶点施加向外的外力;如果角度小于最小角,则对该顶点施加向内的外力;(4)对网格进行体积修正,对计算过程造成的体积损失通过局部和全局两种方法进行修正。 1 according to the real-time simulation of droplet grid-based method, wherein the deforming operation by simulating fluid viscosity and surface tension and contact angle when in contact with a solid, comprising the sub-steps of claim: (1) an external force is applied to each vertex of the mesh, including gravity, solid surface adsorption, and friction part of the viscous resistance, these forces for correcting the speed and position of the vertices; mean curvature (2) implicit flow computing grid; ( 3) an explicit form contact angle, i.e. the angle of water droplets formed on the edge of a solid surface; as follows: first, search all vertices in contact with the solid surface, extracts the contact lines, and the line of contact is calculated for each point to the solid surface angle; if the angle is greater than the maximum angle, the vertex of the external force is applied outwardly; if the angle is less than the minimum angle, an external force is applied inwardly to the apex; (4) the mesh volume correction, caused by the calculation process volume loss corrected by local and global methods.
  3. 3.根据权利要求1所述基于网格的实时水滴仿真方法,其特征在于,所述通过网格操作实现网格的融合与分裂,并对网格进行优化包括以下子步骤:(1)网格融合:具体如下:对于两个其包围盒相交的网格,找出两个网格相交的交线, 将原网格沿着这条交线切开,并重新三角化;对每一个网格上的三角形,计算其位于另外一个网格的内部还是外部,将标记为内部的三角形删除,并将所有标记为外部的三角形合并成为一个新的网格;(2)网格分裂:在进行边删除操作的过程中,如果删除一条边后,网格就不再是流形,则在此处将网格一分为二;具体如下:当要删除的边确定后,搜索其两个顶点的一环邻域,如果发现公共的顶点,并且这个顶点不属于与此边相邻的三角形,那么就在这三个顶点处插入新的顶点和三角形,使原网格分裂为两个新的网格;如果要 1 3. The real-time simulation of droplet grid-based method, according to claim characterized in that, to achieve the merging and splitting operation through the grid mesh, and the mesh is optimized comprises the substeps of: (1) Network cell fusion: as follows: for its two bounding boxes intersecting grid, identify the line of intersection of two intersecting grid, mesh original cut along this intersection line, and re triangulation; each network triangle grid, a grid computing located further inside or outside the triangular mark for deletion of internal and external markers all merged into a new triangle mesh; (2) grid division: performing edge deletion process, if deleting an edge, the mesh is no longer manifold, where the grid is divided into two; as follows: when the edge is determined to be deleted, searches its two vertices neighborhood of a loop, if the common vertex, and the vertices are not adjacent to this side of the triangle, then insert a new vertex at the vertex of a triangle and three, so that the original grid split into two new discovery mesh; if you want to 删除的边所在的网格已经只是一个四面体,则将此四面体删除;(3)网格优化:包括边折叠,边分裂,边翻转。 Mesh edges where only a tetrahedron has been deleted, the delete this tetrahedron; (3) Mesh Optimization: including a folded edge, side split edge flip.
CN 201110271203 2011-09-14 2011-09-14 A real-time simulation method based on surface water droplets grid CN102298794A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201110271203 CN102298794A (en) 2011-09-14 2011-09-14 A real-time simulation method based on surface water droplets grid

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201110271203 CN102298794A (en) 2011-09-14 2011-09-14 A real-time simulation method based on surface water droplets grid

Publications (1)

Publication Number Publication Date
CN102298794A true true CN102298794A (en) 2011-12-28

Family

ID=45359187

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201110271203 CN102298794A (en) 2011-09-14 2011-09-14 A real-time simulation method based on surface water droplets grid

Country Status (1)

Country Link
CN (1) CN102298794A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103853873A (en) * 2012-12-06 2014-06-11 索尼在线娱乐有限责任公司 System and method for building digital objects with blocks
US9773074B2 (en) 2012-12-06 2017-09-26 Daybreak Game Company Llc System and method for building digital objects with blocks

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030090484A1 (en) * 2001-11-15 2003-05-15 Claude Comair System and method for efficiently simulating and imaging realistic water surface and other effects
US7280109B2 (en) * 1998-07-14 2007-10-09 Microsoft Corporation Regional progressive meshes
CN101059821A (en) * 2006-04-20 2007-10-24 独立行政法人海洋研究开发机构 Simulation method, simulation program, and simulator
US7589720B2 (en) * 2004-08-04 2009-09-15 Microsoft Corporation Mesh editing with gradient field manipulation and user interactive tools for object merging

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7280109B2 (en) * 1998-07-14 2007-10-09 Microsoft Corporation Regional progressive meshes
US20030090484A1 (en) * 2001-11-15 2003-05-15 Claude Comair System and method for efficiently simulating and imaging realistic water surface and other effects
US7589720B2 (en) * 2004-08-04 2009-09-15 Microsoft Corporation Mesh editing with gradient field manipulation and user interactive tools for object merging
CN101059821A (en) * 2006-04-20 2007-10-24 独立行政法人海洋研究开发机构 Simulation method, simulation program, and simulator

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
YIZHONG ZHANG ET AL: "A Deformable Surface Model for Real-Time Water Drop Animation", 《IEEE TRANSACTIONS ON VISUALIZATION AND COMPUTER GRAPHICS》, vol. 18, no. 8, 25 August 2011 (2011-08-25), pages 1281 - 1289, XP011490441, DOI: doi:10.1109/TVCG.2011.141 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103853873A (en) * 2012-12-06 2014-06-11 索尼在线娱乐有限责任公司 System and method for building digital objects with blocks
US9773074B2 (en) 2012-12-06 2017-09-26 Daybreak Game Company Llc System and method for building digital objects with blocks

Similar Documents

Publication Publication Date Title
Foster et al. Realistic animation of liquids
Kamensky et al. An immersogeometric variational framework for fluid–structure interaction: Application to bioprosthetic heart valves
Terashima et al. A front-tracking/ghost-fluid method for fluid interfaces in compressible flows
Wojtan et al. Fast viscoelastic behavior with thin features
Barbič et al. Six-dof haptic rendering of contact between geometrically complex reduced deformable models
Keiser et al. A unified lagrangian approach to solid-fluid animation
Meyer et al. Interactive animation of cloth‐like objects in virtual reality
Bargteil et al. A semi-Lagrangian contouring method for fluid simulation
Iaccarino et al. Immersed boundary technique for turbulent flow simulations
Chentanez et al. Simultaneous coupling of fluids and deformable bodies
Fidkowski et al. Review of output-based error estimation and mesh adaptation in computational fluid dynamics
US20070085851A1 (en) Method of simulating dynamic objects using position based dynamics
Losasso et al. Spatially adaptive techniques for level set methods and incompressible flow
Allard et al. Volume contact constraints at arbitrary resolution
Löhner et al. Adaptive embedded and immersed unstructured grid techniques
Belytschko et al. The splitting pinball method for contact-impact problems
Wojtan et al. Physics-inspired topology changes for thin fluid features
Wang et al. Water drops on surfaces
Pirzadeh An adaptive unstructured grid method by grid subdivision, local remeshing, and grid movement
US20090157364A1 (en) Method and system for a quick calculation of aerodynamic forces on an aircraft
Post et al. Visual representation of vector fields
Kalitzin et al. Toward immersed boundary simulation of high Reynolds number flows
Ando et al. Preserving fluid sheets with adaptively sampled anisotropic particles
Sin et al. A point-based method for animating incompressible flow
US7921003B2 (en) System and method for simulating shallow water effects on arbitrary surfaces

Legal Events

Date Code Title Description
C06 Publication
C10 Entry into substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)