KR101319996B1 - Method for simulating fluid - Google Patents

Method for simulating fluid Download PDF

Info

Publication number
KR101319996B1
KR101319996B1 KR1020110146869A KR20110146869A KR101319996B1 KR 101319996 B1 KR101319996 B1 KR 101319996B1 KR 1020110146869 A KR1020110146869 A KR 1020110146869A KR 20110146869 A KR20110146869 A KR 20110146869A KR 101319996 B1 KR101319996 B1 KR 101319996B1
Authority
KR
South Korea
Prior art keywords
particles
fluid
sphere
ellipsoid
particle
Prior art date
Application number
KR1020110146869A
Other languages
Korean (ko)
Other versions
KR20130078102A (en
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
Application filed by 세종대학교산학협력단 filed Critical 세종대학교산학협력단
Priority to KR1020110146869A priority Critical patent/KR101319996B1/en
Publication of KR20130078102A publication Critical patent/KR20130078102A/en
Application granted granted Critical
Publication of KR101319996B1 publication Critical patent/KR101319996B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T13/00Animation
    • G06T13/203D [Three Dimensional] animation
    • G06T13/603D [Three Dimensional] animation of natural phenomena, e.g. rain, snow, water or plants
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • G06T17/10Constructive solid geometry [CSG] using solid primitives, e.g. cylinders, cubes

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Geometry (AREA)
  • Computer Graphics (AREA)
  • Software Systems (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

본 발명은 (a) 유체를 구 입자로 모델링하는 단계; (b) 상기 구 입자를 타원형 구 입자로 변환하는 단계; (c) 상기 타원형 구 입자를 전역 좌표계로 변환하는 단계; 및 (d) 상기 전역 좌표계에서의 위치가 결정된 입자들을 사용하여 유체의 표면을 랜더링하는 단계;를 포함하되, 상기 (b) 단계는 상기 각 타원형 구 입자로부터 미리 설정된 거리 내에 있는 이웃 입자들과의 상호 작용을 고려하여 상기 각 입자를 중심으로 한 보간된 물리량을 구하는 것이며, 상기 (d) 단계는 상기 입자들로 결정되는 상기 유체의 표면을 렌더링하기 위해, 상기 타원형 구 입자의 표면 메쉬를 구하되, 상기 타원형 구 입자의 포텐셜 값을 부호가 있는 거리 함수로 바꾸어 상기 표면 메쉬의 곡률을 줄이는 것인 유체 시뮬레이션 방법을 제공한다.The present invention comprises the steps of (a) modeling a fluid into sphere particles; (b) converting the sphere particles into elliptical sphere particles; (c) converting the elliptical sphere particle into a global coordinate system; And (d) rendering the surface of the fluid using the determined particles in the global coordinate system, wherein step (b) is performed with neighboring particles within a predetermined distance from each of the elliptic sphere particles. In consideration of the interaction, the interpolated physical quantity is obtained based on each particle, and the step (d) calculates the surface mesh of the elliptic sphere particles to render the surface of the fluid determined by the particles. And reducing the curvature of the surface mesh by changing the potential value of the ellipsoidal sphere particle to a signed distance function.

Description

유체 시뮬레이션 방법{METHOD FOR SIMULATING FLUID}Fluid simulation method {METHOD FOR SIMULATING FLUID}

본 발명은 유체 시뮬레이션 방법 및 그 기록 매체에 관한 것이다.The present invention relates to a fluid simulation method and a recording medium thereof.

영화, 애니메이션, 게임 등 다양한 컨텐츠 제작 분야에서 유체 시뮬레이션은 큰 비중을 차지하고 있다. 예전에는 3차원 도형에 텍스쳐를 덧씌워 표현하는 등 시간과 노력이 많이 소모되면서도 사실감은 떨어지는 방법을 사용하였으나, 기술의 발달에 따라 근래에는 실제 물리에 기반을 둔 유체 시뮬레이션 방법을 사용하여 자동으로 훨씬 현실감 있는 움직임을 만들어내고 있다.Fluid simulation plays a big role in various contents production fields such as movies, animations, and games. In the past, it used a method of overlaying a texture on a three-dimensional figure, which consumed a lot of time and effort, but decreased the realism. However, with the development of technology, a fluid simulation method based on real physics has been used much more recently. It creates realistic movements.

유체를 시뮬레이션 하는 방법에는 오일러(Euler) 방법에 기반을 둔 격자 기반 방식과 라그랑지(Lagrange) 방법에 기반을 둔 입자 기반 방식이 있다. 격자 기반 방식은 사실감 있는 움직임을 만들어낼 수 있지만 많은 계산을 필요로 하기 때문에 영화 제작에 주로 쓰이고, 입자 기반 방식은 실시간 계산이 필요한 게임 제작에 주로 쓰인다.There are two methods for simulating fluids: the lattice based method based on Euler's method and the particle based method based on Lagrange's method. Grid-based methods can produce realistic motion, but they are often used in movie production because they require a lot of computation. Particle-based methods are used for game production that requires real-time calculation.

유체 운동 방정식인 나비에-스토크의 방정식(Navier-Stoke's equation)은 유체 시뮬레이션의 기본이 되는 방정식이다. 유체를 구 입자로 표현하는 방식인 SPH(Smoothed Particle Hydrodynamics)는 이 방정식을 이산화하여 각 구 입자들의 상호 작용에 의해 필요한 물리량을 계산한다.The Navier-Stoke's equation, the fluid motion equation, is the basis of fluid simulation. Smooth Particle Hydrodynamics (SPH), a method of representing fluids as sphere particles, discretizes this equation to calculate the physical quantities required by the interaction of each sphere particle.

입자 수는 해상도를 좌우하므로 유체의 움직임의 현실감과 물리적 정확도에 영향을 미친다. 하지만 입자 수를 늘리는 것은 계산 비용을 증가시키므로 적절한 선에서 타협해야 한다. 이에 따라 본 발명은 구 입자 대신 타원형 입자를 사용하여 입자 수를 늘리지 않으면서도 유체의 움직임을 사실적이고 섬세하게 표현해내는 방법을 제안한다.The number of particles depends on the resolution, which affects the realism and physical accuracy of the fluid's movement. Increasing the number of particles, however, increases the cost of computation and must be compromised on an appropriate basis. Accordingly, the present invention proposes a method for realistically and delicately expressing the motion of a fluid without increasing the number of particles by using elliptical particles instead of spherical particles.

또한 물리량 계산에 사용되는 입자 수를 줄여 계산 비용을 크게 낮추고, 렌더링시 표면을 좀더 사실적으로 표현해내는 방법을 제안한다.In addition, by reducing the number of particles used to calculate the physical quantity, the computational cost is greatly reduced, and a method of expressing the surface more realistically when rendering is proposed.

이와 관련하여 한국공개특허 제10-2010-0066976호("비압축 상태의 유체 시뮬레이션 방법, 기록매체, 장치, 시스템")에는 비압축 상태의 유체를 시뮬레이션하는 구성이 개시되어 있다.In this regard, Korean Patent Laid-Open Publication No. 10-2010-0066976 ("Method for simulating fluid in uncompressed state, recording medium, apparatus, system") discloses a configuration for simulating a fluid in an uncompressed state.

또한, 한국등록특허 제10-0568563호("입자동역학 해석기법과 볼륨렌더링 기법을 이용한 실시간 유체유동 시뮬레이션 및 렌더링 방법")는 유체의 운동 및 입체감을 표현하는 구성이 개시되어 있다.In addition, Korean Patent No. 10-0568563 ("Real-time fluid flow simulation and rendering method using particle dynamics analysis and volume rendering techniques") discloses a configuration that represents the motion and three-dimensional feeling of the fluid.

본 발명은 전술한 문제를 해결하기 위한 것으로서, 그 목적은 적은 비용으로 유체의 움직임을 사실감 있게 표현해내는 유체 시뮬레이션 방법을 제공하는 것이다.SUMMARY OF THE INVENTION The present invention has been made to solve the above problems, and an object thereof is to provide a fluid simulation method that realistically expresses the motion of a fluid at low cost.

상기와 같은 목적을 달성하기 위한 본 발명의 제 1 측면에 따른 유체 시뮬레이션 방법은 (a) 유체를 구 입자로 모델링하는 단계; (b) 상기 구 입자를 타원형 구 입자로 변환하는 단계; (c) 상기 타원형 구 입자를 전역 좌표계로 변환하는 단계; 및 (d) 상기 전역 좌표계에서의 위치가 결정된 입자들을 사용하여 유체의 표면을 랜더링하는 단계;를 포함하되, 상기 (b) 단계는 상기 각 타원형 구 입자로부터 미리 설정된 거리 내에 있는 이웃 입자들과의 상호 작용을 고려하여 상기 각 입자를 중심으로 한 보간된 물리량을 구하는 것이며, 상기 (d) 단계는 상기 입자들로 결정되는 상기 유체의 표면을 렌더링하기 위해, 상기 타원형 구 입자의 표면 메쉬를 구하되, 상기 타원형 구 입자의 포텐셜 값을 부호가 있는 거리 함수로 바꾸어 상기 표면 메쉬의 곡률을 줄이는 것을 특징으로 한다.A fluid simulation method according to the first aspect of the present invention for achieving the above object comprises the steps of (a) modeling a fluid as a sphere particle; (b) converting the sphere particles into elliptical sphere particles; (c) converting the elliptical sphere particle into a global coordinate system; And (d) rendering the surface of the fluid using the determined particles in the global coordinate system, wherein step (b) is performed with neighboring particles within a predetermined distance from each of the elliptic sphere particles. In consideration of the interaction, the interpolated physical quantity is obtained based on each particle, and the step (d) calculates the surface mesh of the elliptic sphere particles to render the surface of the fluid determined by the particles. And reducing the curvature of the surface mesh by changing the potential value of the ellipsoidal particle to a signed distance function.

상기와 같은 목적을 달성하기 위한 본 발명의 제 2 측면에 따른 기록 매체는 상기 제 1 측면에 따른 유체 시뮬레이션 방법을 수행하는 프로그램이 기록된 컴퓨터가 읽기 가능한 기록 매체임을 특징으로 한다.The recording medium according to the second aspect of the present invention for achieving the above object is a computer-readable recording medium on which a program for performing the fluid simulation method according to the first aspect is recorded.

본 발명은 유체 시뮬레이션 방법에 있어, 유체의 움직임을 좀더 사실감 있게 표현해내는 효과를 얻는다. In the fluid simulation method, the present invention obtains the effect of more realistically representing the motion of a fluid.

특히 빠르게 움직이는 유체의 움직임을 표현하는데 있어서, 계산 비용을 크게 증가시키지 않고도 상세한 움직임을 묘사할 수 있다.In particular, in expressing the motion of a fast-moving fluid, detailed motion can be depicted without significantly increasing computational costs.

구체적으로 모델링에 필요한 입자 수를 크게 늘리지 않고도 유체 움직임의 해상도를 늘릴 수 있다.Specifically, the resolution of fluid motion can be increased without significantly increasing the number of particles required for modeling.

또한 물리량 계산에 사용되는 입자 수를 제한함으로써 계산 비용이 줄어드는 효과가 있다.In addition, the calculation cost is reduced by limiting the number of particles used to calculate the physical quantity.

또한 유체 표면을 렌더링할 때의 굴곡을 줄일 수 있다.It also reduces curvature when rendering fluid surfaces.

도 1은 본 발명에 따른 유체 시뮬레이션 방법의 흐름을 도시함.
도 2는 구 입자를 타원형 구 입자로 변환하는 모습을 도시함.
도 3은 입자들이 서로의 물리량에 영향을 주는 모습을 도시함.
도 4는 입자의 물리량에 영향을 미치는 다른 입자의 수를 제한하는 모습을 도시함.
도 5는 표면 메쉬를 생성하는 모습을 도시함.
도 6은 표면 메쉬의 곡률을 감소시키는 모습을 도시함.
도 7은 본 발명에 따른 유체 시뮬레이션 방법의 실시예를 도시함.
도 8은 본 발명에 따른 유체 시뮬레이션 방법의 실시예를 도시함.
1 shows a flow of a fluid simulation method according to the present invention.
2 shows the conversion of sphere particles into elliptical sphere particles.
Figure 3 shows how particles affect each other's physical quantities.
Figure 4 shows how to limit the number of other particles affecting the physical quantity of the particles.
5 shows the appearance of creating a surface mesh.
6 shows the appearance of reducing the curvature of the surface mesh.
7 shows an embodiment of a fluid simulation method according to the present invention.
8 shows an embodiment of a fluid simulation method according to the present invention.

아래에서는 첨부한 도면을 참조하여 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자가 용이하게 실시할 수 있도록 본 발명의 실시예를 상세히 설명한다. 그러나 본 발명은 여러 가지 상이한 형태로 구현될 수 있으며 여기에서 설명하는 실시예에 한정되지 않는다. 그리고 도면에서 본 발명을 명확하게 설명하기 위해서 설명과 관계없는 부분은 생략하였으며, 명세서 전체를 통하여 유사한 부분에 대해서는 유사한 도면 부호를 붙였다.Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings, which will be readily apparent to those skilled in the art. The present invention may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. In the drawings, parts irrelevant to the description are omitted in order to clearly describe the present invention, and like reference numerals designate like parts throughout the specification.

명세서 전체에서, 어떤 부분이 다른 부분과 "연결"되어 있다고 할 때, 이는 "직접적으로 연결"되어 있는 경우뿐 아니라, 그 중간에 다른 소자를 사이에 두고 "전기적으로 연결"되어 있는 경우도 포함한다. 또한 어떤 부분이 어떤 구성요소를 "포함"한다고 할 때, 이는 특별히 반대되는 기재가 없는 한 다른 구성요소를 제외하는 것이 아니라 다른 구성요소를 더 포함할 수 있는 것을 의미한다.Throughout the specification, when a part is referred to as being "connected" to another part, it includes not only "directly connected" but also "electrically connected" with another part in between . Also, when an element is referred to as "comprising ", it means that it can include other elements as well, without departing from the other elements unless specifically stated otherwise.

도 1은 본 발명에 따른 유체 시뮬레이션 방법의 흐름을 도시하고 있다.1 shows the flow of a fluid simulation method according to the present invention.

먼저 간략히 살펴보면, 유체를 구 입자로 모델링하고(S110), 타원형 구 입자로 변환(S120)한 다음, 전역 좌표계로 변환한다(S130). 이렇게 각 입자의 위치가 도출된 후에는 각 입자를 이용해 표면 메쉬를 생성하고 표면 메쉬의 곡률을 줄여 유체를 렌더링(S140)한다.First, briefly, the fluid is modeled as a sphere particle (S110), the elliptic sphere particles are converted (S120), and then converted into a global coordinate system (S130). After the location of each particle is derived, surface particles are generated using each particle, and the fluid is rendered by reducing the curvature of the surface mesh (S140).

각 유체 입자는 서로에게 영향을 미치는 질량 m, 밀도 ρ, 점성 μ, 압력 p, 외력 f, 위치 r, 및 속도 u 등의 물리량을 갖는다. 이러한 물리량들은 전술한 바와 같이 유체 운동 방정식인 나비에-스토크 방정식(Navier-Stokes' equation)에 기초해서 표현된다. 유체의 운동량 보존 법칙과 질량 보존 법칙을 잘 보여주는 나비에-스토크 방정식은 유체의 흐름에 따른 속도 u의 변화를 다음 수식과 같이 나타낸다.Each fluid particle has a physical quantity such as mass m, density p, viscosity μ, pressure p, external force f, position r, and velocity u that affect each other. These physical quantities are expressed based on the Navier-Stokes' equation, which is a fluid motion equation as described above. The Navier-Stoke equation, which shows the law of conservation of momentum and mass of a fluid, shows the change of velocity u with the flow of fluid as

<수식1>

Figure 112011105365512-pat00001
<Equation 1>
Figure 112011105365512-pat00001

<수식2>

Figure 112011105365512-pat00002
<Equation 2>
Figure 112011105365512-pat00002

유체를 구 입자로 모델링하는 단계(S110)는 위와 같이 표현되는 연속 함수인 나비에-스토크 방정식을 이산화해서 구 입자로 표현하는 단계이다. 구 입자가 갖는 곡선 커널(smoothing kernel) 함수를 W라고 하면, 위치 r에서 주변의 거리가 h이하인 입자들이 갖고 있는 물리량들의 합으로 보간된(interpolated) 물리량 A(r)은 다음 수식으로 나타낼 수 있다.Modeling the fluid as a sphere particle (S110) is a step of discretizing the Navier-Stoke equation, which is a continuous function expressed as above, and expressing it as a sphere particle. If W is a smoothing kernel function of a sphere particle, the physical quantity A (r) interpolated as the sum of the physical quantities of particles having a distance less than h from the position r can be expressed by the following equation. .

<수식3>

Figure 112011105365512-pat00003
&Quot; (3) &quot;
Figure 112011105365512-pat00003

본 발명에 따른 유체 시뮬레이션 방법은 곡선 커널 함수를 각 물리량에 맞게 정의하여 사용한다. 다음 수식들은 각각 밀도, 압력, 점성을 계산하기 위한 커널들이다.In the fluid simulation method according to the present invention, a curved kernel function is defined and used for each physical quantity. The following equations are kernels for calculating density, pressure, and viscosity, respectively.

<수식4>

Figure 112011105365512-pat00004
&Lt; Equation 4 &
Figure 112011105365512-pat00004

<수식5>

Figure 112011105365512-pat00005
<Equation 5>
Figure 112011105365512-pat00005

<수식6>

Figure 112011105365512-pat00006
<Equation 6>
Figure 112011105365512-pat00006

구 입자를 타원형 구 입자로 변환하는 모습을 도시한 도 2를 통해 타원형 구 입자로 변환하는 단계(S120)를 살펴보자. 도면은 설명의 편의를 위해 2차원 평면에서의 원과 타원을 도시하고 있다.Let's look at the step (S120) of converting the spherical particles into elliptical sphere particles through FIG. The drawings show circles and ellipses in a two-dimensional plane for ease of explanation.

전술한 바와 같이, 구 입자 대신에 구 입자를 이동 방향으로 속력에 따라 늘려 변형시킨 타원형 입자를 사용하면 입자 수를 늘리지 않고도 유체 움직임의 정확성과 사실감을 향상시킬 수 있다. 진행 방향에 따라 가중치가 증가하고 힘을 더 받게 되기 때문이다. 따라서 내리는 비나 샤워기의 물 등의 입자의 수가 많고, 속도가 빠른 유체를 효과적으로 모사할 수 있다.As described above, the use of elliptical particles in which the spherical particles are deformed by increasing the speed of the spherical particles in the direction of movement in the moving direction can improve the accuracy and the realism of the fluid movement without increasing the number of particles. This is because the weight increases according to the direction and receives more force. Therefore, a large number of particles, such as rain or shower water, can be effectively simulated.

이를 위해 본 발명에 따른 유체 시뮬레이션 방법은 도 2에 도시된 바와 같이 구 입자가 단위 시간 동안 움직인 거리를 타원의 두 초점 사이 거리로 설정한다. 장축의 길이를 a, 단축의 길이를 b라 할때 타원은 다음 수식으로 나타낼 수 있다.To this end, the fluid simulation method according to the present invention sets the distance the sphere particles move for a unit time as shown in FIG. 2 as the distance between two focal points of the ellipse. When the length of the major axis is a and the length of the minor axis is b, the ellipse can be expressed by the following equation.

<수식7>

Figure 112011105365512-pat00007
<Equation 7>
Figure 112011105365512-pat00007

또한 본 발명에 따른 유체 시뮬레이션 방법은 타원의 장축의 길이 a가 임계값을 넘지 않도록 제한한다. 즉, a는 다음과 같이 나타낼 수 있는데, 여기서 a는 기정된 a의 최대값과 다음 수식으로 도출된 값 중 작은 값으로 설정된다.In addition, the fluid simulation method according to the present invention limits the length a of the long axis of the ellipse not to exceed the threshold. That is, a may be represented as follows, where a is set to a smaller value of the maximum value of a predetermined value and a value derived by the following equation.

<수식8>

Figure 112011105365512-pat00008
<Equation 8>
Figure 112011105365512-pat00008

<수식9>

Figure 112011105365512-pat00009
<Equation 9>
Figure 112011105365512-pat00009

이는 각 입자에 영향을 미치는 이웃 입자들의 수를 줄이기 위함이다. 도 3과 도 4를 통해 알아보자.This is to reduce the number of neighboring particles affecting each particle. Let's look through Figures 3 and 4.

도 3은 입자들이 서로의 물리량에 영향을 주는 모습을 도시하고 있다. 전술한 설명에서 입자를 사용하여 보간된 물리량을 구하는 수식이 도출될 수 있었던 근거가 여기에 있다. 하지만 입자간 거리가 멀수록 영향도 줄어들 것이므로, 어떤 입자 주위의 물리량을 계산할 때 유체를 구성하는 모든 입자들을 고려하는 것은 계산 낭비이다.3 shows how particles affect each other's physical quantities. Here is the reason why the equation for obtaining the interpolated physical quantity using particles in the above description can be derived. However, the greater the distance between particles, the less the impact, so it is a waste of computation to consider all the particles that make up a fluid when calculating the physical quantities around a particle.

그러나 종래 기술에서는 물리적인 힘을 결정하기 위해 모든 입자들간의 거리를 계산해야 했기 때문에, 입자 수가 늘어나면 계산 시간이 크게 늘어났다. 즉, 입자가 n개이면 각 입자마다 모든 입자를 검색해야 하므로 O(n2)의 시간이 걸렸다.However, in the prior art, the distance between all particles had to be calculated to determine the physical force, so that the calculation time greatly increased as the number of particles increased. That is, when n particles were required, it took O (n 2 ) time since all particles had to be searched for each particle.

반면 입자의 물리량에 영향을 미치는 다른 입자의 수를 제한하는 모습을 도시한 도 4에서 볼 수 있는 바와 같이, 본 발명에 따른 유체 시뮬레이션 방법에서는 탐색 공간을 타원체 입자에 맞춘 격자로 나누어 입자 주위로 기지정된 수의 격자 안에 있는 타원체 입자들간의 거리만 계산하면 된다. 이렇게 하면 기지정된 수의 격자 안에 위치한 입자 k개에 대해서만 물리량을 탐색하고 계산에 반영하면 되므로, 계산 시간을 O(kn)으로 크게 줄일 수 있다. 여기에서 탐색 공간을 타원체 입자에 맞춘 격자로 나눈다는 것은 타원형 구의 장축의 길이를 고려하여 격자를 설정한다는 것을 의미한다.On the other hand, as shown in Figure 4 showing the limit of the number of other particles affecting the physical quantity of particles, in the fluid simulation method according to the present invention by dividing the search space into a lattice tailored to the ellipsoid particles You only need to calculate the distance between the ellipsoid particles within a specified number of grids. This greatly reduces the computation time to O (kn) because the physical quantities need only be searched for and reflected in the calculation for k particles located within a predetermined number of lattice. Here, dividing the search space into a lattice tailored to ellipsoid particles means that the lattice is set in consideration of the length of the long axis of the elliptical sphere.

유체의 입자 모델을 타원형 구로 변형하여 필요한 물리량을 모두 구한 후에는(S120), 전역 좌표계로 변환하여 최종 위치를 결정한다(S130). 전역 좌표계로의 변환은 회전 행렬과 크기 변환 행렬의 곱으로 수행되는데, 크기 변환 행렬은 타원의 장축 및 단축의 길이를 요소로 갖는 대각선 행렬이다.After deforming the particle model of the fluid into an elliptic sphere to obtain all the necessary physical quantities (S120), the final position is determined by converting to a global coordinate system (S130). The conversion to the global coordinate system is performed by the product of the rotation matrix and the size transformation matrix, which is a diagonal matrix having the lengths of the major and minor axes of the ellipse.

유체 모델에서 각 입자의 위치가 모두 결정되었다면, 이 위치 데이터를 가지고 실제로 유체를 렌더링해야 한다(S140). 본 발명에 따른 유체 시뮬레이션 방법은 유체의 표면을 메쉬로 표현한다. 도 5 및 도 6을 통해 알아보자.If the position of each particle in the fluid model has been determined, it is necessary to actually render the fluid with this position data (S140). The fluid simulation method according to the present invention represents the surface of the fluid in a mesh. Let's look through Figures 5 and 6.

도 5는 표면 메쉬를 생성하는 모습을 도시하고 있고, 도 6은 표면 메쉬의 곡률을 감소시키는 모습을 도시하고 있다.FIG. 5 illustrates the creation of a surface mesh, and FIG. 6 illustrates the reduction of the curvature of the surface mesh.

메타볼 등 종래 기술은 표면에 굴곡이 생기는 단점을 가지고 있다. 이와 달리, 본 발명에 따른 유체 시뮬레이션 방법은 유체 표면을 메쉬로 표현하기 위해, 공간을 격자로 나누고 타원형 구 입자의 포텐셜(커널) 값을 격자의 꼭지점에 설정하여, 그 값을 기준으로 표면 메쉬를 생성한다. 포텐셜의 값이 음수이면 물 안으로 판정, 양수이면 물 밖으로 판정, 그리고 0이면 물 표면으로 판정한다. 도 5의 두번째 도면에 이렇게 생성된 메쉬의 실시예가 도시되어 있다.Conventional technologies, such as metaballs, have the disadvantage that the surface is curved. In contrast, the fluid simulation method according to the present invention divides the space into a lattice and sets the potential (kernel) value of the elliptical sphere particle at the vertex of the lattice to express the surface of the fluid as a mesh, and based on the value, Create If the potential value is negative, it is judged into water, if it is positive, it is judged out of water, and if it is zero, it is determined as water surface. An embodiment of the mesh thus created is shown in the second drawing of FIG. 5.

이렇게 생성된 표면 메쉬는 종래의 메타볼에 비해서 굴곡이 작다. 그러나 격자의 개수가 적거나 유체가 합쳐지거나 갈라지는 등의 위상 변화가 심한 경우는 도 6의 첫번째 도면에 도시된 바와 같이 여전히 어색한 굴곡이 보일 수 있다. The surface mesh thus produced has a smaller curvature compared to conventional metabols. However, when the number of gratings is small, or when the phase change is severe, such as when the fluid merges or splits, the curvature may still be awkward as shown in the first drawing of FIG. 6.

이를 보완하여 부드러운 표면 메쉬를 생성하기 위해, 본 발명에 따른 유체 시뮬레이션 방법은 포텐셜 값을 부호가 있는 거리 함수로 바꾸고 곡률을 줄여 평평하게 해준다. 그러면 도 6의 두번째 도면과 같이 표면을 좀더 사실감 있게 시각화할 수 있다.In order to compensate for this and create a smooth surface mesh, the fluid simulation method according to the present invention converts the potential value into a signed distance function and reduces the curvature to make it flat. Then, the surface can be visualized more realistically as shown in the second drawing of FIG. 6.

이를 위해 임의의 표면 장력이 유체 표면에 작용하여 빠르게 동적 평형 상태로 수렴된다고 가정한다.

Figure 112011105365512-pat00010
는 표면의 위치이고,
Figure 112011105365512-pat00011
Figure 112011105365512-pat00012
에서의 표면 법선이며,
Figure 112011105365512-pat00013
은 표면 장력 계수이다.
Figure 112011105365512-pat00014
이 부호가 있는 거리 함수,
Figure 112011105365512-pat00015
은 속도의 법선 방향 요소라고 하면, 이는 다음 수식들로 나타낼 수 있다.For this purpose it is assumed that any surface tension acts on the fluid surface and quickly converges to dynamic equilibrium.
Figure 112011105365512-pat00010
Is the position of the surface,
Figure 112011105365512-pat00011
silver
Figure 112011105365512-pat00012
Is the surface normal at,
Figure 112011105365512-pat00013
Is the surface tension coefficient.
Figure 112011105365512-pat00014
This signed distance function,
Figure 112011105365512-pat00015
If is a normal component of velocity, it can be expressed by the following equation.

<수식10>

Figure 112011105365512-pat00016
<Equation 10>
Figure 112011105365512-pat00016

<수식11>

Figure 112011105365512-pat00017
<Equation 11>
Figure 112011105365512-pat00017

<수식12>

Figure 112011105365512-pat00018
<Equation 12>
Figure 112011105365512-pat00018

따라서 본 발명에 따른 유체 시뮬레이션 방법은 표면 장력 계수를 조절하면 유체 표면의 날카로움 정도를 제어할 수 있다.Therefore, the fluid simulation method according to the present invention can control the degree of sharpness of the fluid surface by adjusting the surface tension coefficient.

도 7 및 도 8은 본 발명에 따른 유체 시뮬레이션 방법의 실시예를 도시하고 있다.7 and 8 illustrate an embodiment of a fluid simulation method according to the present invention.

도 7은 144,000개의 입자가 사용하여 3차원 댐 파괴 실험을 실시한 결과를 도시하고 있다. 30fps의 애니메이션에서 한 장의 프레임을 도출하기 위해 91.246초 정도가 소요되었다.FIG. 7 shows the results of a three-dimensional dam destruction experiment using 144,000 particles. It took 91.246 seconds to derive one frame from a 30fps animation.

도 8은 830,000개의 입자를 사용하여 샤워 실험을 실시한 결과이다. 위쪽 도면들은 기본적인 구 입자 기반 시뮬레이션 방법의 실험 결과를, 아래쪽 도면들은 본 발명에 따른 타원형 구 입자 기반 시뮬레이션 방법의 실험 결과를 도시하고 있다. 도시된 바와 같이, 본 발명에 따른 유체 시뮬레이션 방법 쪽이 좀더 사실적이고 상세한 움직임을 표현해내고 있다.8 shows the results of a shower experiment using 830,000 particles. The upper figures show the experimental results of the basic sphere particle based simulation method, and the lower figures show the experimental results of the elliptic sphere particle based simulation method according to the present invention. As shown, the fluid simulation method according to the present invention represents more realistic and detailed movement.

전술한 본 발명의 설명은 예시를 위한 것이며, 본 발명이 속하는 기술분야의 통상의 지식을 가진 자는 본 발명의 기술적 사상이나 필수적인 특징을 변경하지 않고서 다른 구체적인 형태로 쉽게 변형이 가능하다는 것을 이해할 수 있을 것이다. 그러므로 이상에서 기술한 실시예들은 모든 면에서 예시적인 것이며 한정적이 아닌 것으로 이해해야만 한다. 예를 들어, 단일형으로 설명되어 있는 각 구성 요소는 분산되어 실시될 수도 있으며, 마찬가지로 분산된 것으로 설명되어 있는 구성 요소들도 결합된 형태로 실시될 수 있다.The foregoing description of the present invention is intended for illustration, and it will be understood by those skilled in the art that the present invention may be easily modified in other specific forms without changing the technical spirit or essential features of the present invention. will be. It is therefore to be understood that the above-described embodiments are illustrative in all aspects and not restrictive. For example, each component described as a single entity may be distributed and implemented, and components described as being distributed may also be implemented in a combined form.

본 발명의 범위는 상기 상세한 설명보다는 후술하는 특허청구범위에 의하여 나타내어지며, 특허청구범위의 의미 및 범위 그리고 그 균등 개념으로부터 도출되는 모든 변경 또는 변형된 형태가 본 발명의 범위에 포함되는 것으로 해석되어야 한다.The scope of the present invention is shown by the following claims rather than the above description, and all changes or modifications derived from the meaning and scope of the claims and their equivalents should be construed as being included in the scope of the present invention. do.

Claims (9)

유체 시뮬레이션 방법에 있어서,
(a) 유체를 하나 이상의 물리량을 갖는 구(sphere) 입자로 모델링하는 단계;
(b) 상기 구 입자를 타원체(ellipsoid) 입자로 변환하는 단계;
(c) 상기 타원체 입자의 좌표계를 전역 좌표계로 변환하는 단계; 및
(d) 상기 전역 좌표계에서의 위치가 결정된 입자들을 사용하여 유체의 표면을 랜더링하는 단계;를 포함하되,
상기 (b) 단계는
상기 각 타원체 입자로부터 미리 설정된 거리 내에 있는 이웃 입자들이 갖고 있는 물리량의 합으로 보간된(interpolated) 물리량을 구하는 단계;를 포함하며,
상기 (d) 단계는
상기 타원체 입자의 포텐셜 값을 부호가 있는 거리 함수로 표현한 상기 유체의 표면 메쉬에 표면 장력의 작용을 시뮬레이션하여 상기 표면 메쉬의 곡률을 상기 표면 메쉬가 생성되었을 때의 곡률보다 줄이는 것이며,
상기 표면 장력은 표면 장력 계수를 사용하여 모델링 되는 것인 유체 시뮬레이션 방법.
In the fluid simulation method,
(a) modeling the fluid as sphere particles having one or more physical quantities;
(b) converting the sphere particles into ellipsoid particles;
(c) converting a coordinate system of the ellipsoid particles into a global coordinate system; And
(d) rendering the surface of the fluid using the particles having their positions determined in the global coordinate system;
The step (b)
Obtaining an interpolated physical quantity by the sum of physical quantities possessed by neighboring particles within a predetermined distance from each of the ellipsoid particles;
The step (d)
Simulating the effect of surface tension on the surface mesh of the fluid expressing the potential value of the ellipsoid particles as a signed distance function to reduce the curvature of the surface mesh from that when the surface mesh was created,
The surface tension is modeled using surface tension coefficients.
제 1 항에 있어서,
상기 구 입자 및 상기 타원체 입자가 갖는 하나 이상의 물리량은 외력, 질량, 밀도, 압력, 점성, 속도, 또는 위치인 유체 시뮬레이션 방법.
The method of claim 1,
At least one physical quantity possessed by the sphere particles and the ellipsoid particles is an external force, mass, density, pressure, viscosity, velocity, or position.
제 1 항에 있어서,
상기 (a) 단계는
상기 모델링은 Navier-Stoke 방정식을 이산화하여 이루어지는 것인 유체 시뮬레이션 방법.
The method of claim 1,
The step (a)
The modeling is a fluid simulation method that is made by discretizing the Navier-Stoke equation.
제 1 항에 있어서,
상기 (b) 단계는
상기 구 입자를 상기 구 입자의 속도 및 이동 방향에 따라 타원체 입자로 변환하는 것인 유체 시뮬레이션 방법.
The method of claim 1,
The step (b)
And converting the sphere particles into ellipsoid particles according to the velocity and direction of movement of the sphere particles.
제 1 항에 있어서,
상기 (b) 단계는
상기 타원체 입자의 초점 거리는 상기 구 입자의 단위 시간당 이동 거리와 같은 것인 유체 시뮬레이션 방법.
The method of claim 1,
The step (b)
The focal length of the ellipsoid particles is equal to the moving distance per unit time of the spherical particles.
제 1 항에 있어서,
상기 (b) 단계는
상기 타원체 입자의 장축의 길이는 기지정된 임계값을 넘지 않도록 설정되는 것인 유체 시뮬레이션 방법.
The method of claim 1,
The step (b)
Wherein the length of the long axis of the ellipsoid particles is set not to exceed a predetermined threshold.
제 1 항에 있어서,
상기 (b) 단계는
상기 타원체 입자의 장축의 길이에 맞추어 공간을 격자로 나누고 기지정된 수의 격자 안에 위치한 이웃 입자들만 선택해 물리량 계산에 반영하는 유체 시뮬레이션 방법.
The method of claim 1,
The step (b)
Dividing the space into a lattice according to the length of the long axis of the ellipsoidal particles, and selecting only the neighboring particles located within a predetermined number of lattice to reflect the calculation in the physical quantity.
제 1 항에 있어서,
상기 (c) 단계는
크기 변환 행렬 및 회전 변환 행렬의 곱을 사용하여 좌표를 변환하되,
상기 크기 변환 행렬은 타원의 장축 및 단축의 길이를 요소로 갖는 대각선 행렬인 유체 시뮬레이션 방법.
The method of claim 1,
The step (c)
Convert coordinates using the product of a magnitude transformation matrix and a rotation transformation matrix,
And the magnitude transformation matrix is a diagonal matrix having elements of long and short axes of ellipses as elements.
제 1 항 내지 제 8 항 중 어느 하나의 항에 기재된 방법을 수행하는 프로그램이 기록된 컴퓨터가 읽기 가능한 기록 매체.A computer-readable recording medium having recorded thereon a program for performing the method according to any one of claims 1 to 8.
KR1020110146869A 2011-12-30 2011-12-30 Method for simulating fluid KR101319996B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020110146869A KR101319996B1 (en) 2011-12-30 2011-12-30 Method for simulating fluid

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020110146869A KR101319996B1 (en) 2011-12-30 2011-12-30 Method for simulating fluid

Publications (2)

Publication Number Publication Date
KR20130078102A KR20130078102A (en) 2013-07-10
KR101319996B1 true KR101319996B1 (en) 2013-10-18

Family

ID=48991154

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020110146869A KR101319996B1 (en) 2011-12-30 2011-12-30 Method for simulating fluid

Country Status (1)

Country Link
KR (1) KR101319996B1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101671365B1 (en) 2015-05-11 2016-11-01 동서대학교 산학협력단 Color mixing Implementation method of Similar liquefaction point groups
US9953109B2 (en) 2014-08-26 2018-04-24 Samsung Electronics Co., Ltd. Object modeling method and apparatus

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101527678B1 (en) * 2014-02-10 2015-06-09 한국과학기술원 Method and apparatus for painting simulation
KR102255188B1 (en) * 2014-10-13 2021-05-24 삼성전자주식회사 Modeling method and modeling apparatus of target object to represent smooth silhouette
KR102263096B1 (en) * 2014-11-13 2021-06-09 삼성전자주식회사 Method and apparatus for modeling objects consisting of particles
KR102437374B1 (en) * 2015-10-01 2022-08-30 삼성전자주식회사 Method and device for modeling an object
KR102513601B1 (en) * 2020-11-09 2023-03-22 울산대학교 산학협력단 System, method and program for fluid simulation based on 3d image

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100568563B1 (en) 2003-11-04 2006-04-07 강문구 A real-time simulation and rendering method for fluid flows using particle dynamics and volume rendering techniques
KR20080098871A (en) * 2007-05-07 2008-11-12 삼성전자주식회사 Method and apparatus to express fluid flows
KR100963114B1 (en) 2008-12-23 2010-06-15 고려대학교 산학협력단 Apparatus and method for simulating fluid

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100568563B1 (en) 2003-11-04 2006-04-07 강문구 A real-time simulation and rendering method for fluid flows using particle dynamics and volume rendering techniques
KR20080098871A (en) * 2007-05-07 2008-11-12 삼성전자주식회사 Method and apparatus to express fluid flows
KR100963114B1 (en) 2008-12-23 2010-06-15 고려대학교 산학협력단 Apparatus and method for simulating fluid

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9953109B2 (en) 2014-08-26 2018-04-24 Samsung Electronics Co., Ltd. Object modeling method and apparatus
KR101671365B1 (en) 2015-05-11 2016-11-01 동서대학교 산학협력단 Color mixing Implementation method of Similar liquefaction point groups

Also Published As

Publication number Publication date
KR20130078102A (en) 2013-07-10

Similar Documents

Publication Publication Date Title
KR101319996B1 (en) Method for simulating fluid
Solenthaler et al. A unified particle model for fluid–solid interactions
Macklin et al. Unified particle physics for real-time applications
Guendelman et al. Coupling water and smoke to thin deformable and rigid shells
Rasmussen et al. Directable photorealistic liquids
US7983884B2 (en) Water particle manipulation
Song et al. Stable but nondissipative water
Yu et al. Explicit mesh surfaces for particle based fluids
US8452721B2 (en) Region of interest tracking for fluid simulation
CN102592297B (en) Real-time water wave texture processing method based on 2D (Two-dimensional) grid
Yan et al. Real‐time fluid simulation with adaptive SPH
KR101328739B1 (en) Apparatus and method for simulating multiphase fluids and controlling the fluids&#39;s shape
CN103559741A (en) Particle-based multiphase coupling method in virtual surgery
Chen et al. A heuristic approach to the simulation of water drops and flows on glass panes
KR100963114B1 (en) Apparatus and method for simulating fluid
Kim et al. Synthesizing Large‐Scale Fluid Simulations with Surface and Wave Foams via Sharp Wave Pattern and Cloudy Foam
Kim et al. Physics-inspired approach to realistic and stable water spray with narrowband air particles
Fujisawa et al. Particle-based shallow water simulation with splashes and breaking waves
KR101820946B1 (en) Rain simulation method by smoothed particle hydrodynamics based on particles, and rain simulation platform which is composed in order to be performed with the same
Djado et al. Particle‐based drop animation on meshes in real time
Mandal et al. Physics-based Mesh Deformation with Haptic Feedback and Material Anisotropy
JP5720551B2 (en) Simulation program, simulation method, and simulation apparatus
Shao et al. Unified particle-based coupling algorithm for stable soft tissue-blood interaction
Kellomäki Interaction with dynamic large bodies in efficient, real-time water simulation
Roble et al. Don't trust your eyes: cutting-edge visual effects

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20170920

Year of fee payment: 5

LAPS Lapse due to unpaid annual fee