• 검색 결과가 없습니다.

IPAM Research in Industrial Projects for Students (RIPS) Viscoelastic Liquids

N/A
N/A
Protected

Academic year: 2022

Share "IPAM Research in Industrial Projects for Students (RIPS) Viscoelastic Liquids"

Copied!
36
0
0

로드 중.... (전체 텍스트 보기)

전체 글

(1)

IPAM Research in Industrial Projects for Students (RIPS)

Viscoelastic Liquids

Summer 2004 (June 28th-August 27th)

Final Report Prepared for

Pixar Animation Studios

IPAM RIPS Team:

Andrew Lutomirski Katarina Petrovi´c

Paul-James White Lauren Anderson

(Project Manager)

Faculty Advisors:

Dr. Doug Enright Dr. Chohong Min

Liaison:

Dr. John R. Anderson

(2)
(3)

Abstract

Fluids of varying viscosity/viscoelasticity exhibit both solid and fluid characteristics.

Some examples of viscoelastic fluids include toothpaste, soft-serve ice cream, ketchup, gelatin, melted chocolate and tar. The goal of our project is to implement an algorithm that successfully animates viscoelastic fluids in three dimensions. In order to achieve this goal, we began by performing various runs with varying parameters of a pre-existing 2D and 3D Navier-Stokes simulation engine in order to enhance our understanding of the existing model. We studied numerical schemes to handle the additional elastic/plastic terms to model viscoelastic behavior, and formulated a two dimensional viscoelastic simulation incorporating these additional terms. After obtaining a working algorithm, we were able to generate different animation effects such as merging and bouncing. We also generated simulations displaying how the elastic coefficient changes the behavior of the liquid. We then implemented the algorithm in three dimensions. Our modification of the existing three dimensional simulation engine generated realistic results. A visual palette illustrating the behavior of a viscoelastic liquid undergoing dropping and pouring with various elastic and/or plastic parameters was created. Reference video footage of actual physical examples of viscoelastic liquids, e.g. ketchup, gelatin, toothpaste, and

”goop”, was taken. From the reference toothpaste footage and the visual palette of pouring behavior, we were able to determine the elastic and plastic parameters necessary to animate realistic looking toothpaste. We explored different effects such as bouncing, varying viscosity with strain rate to approximate ketchup, and squirting behavior with the three dimensional viscoelastic code.

Keywords: viscoelastic, plasticity, integrated strain rate, Navier-Stokes, level set,

(4)
(5)

Table of contents

Acknowledgments v

CHAPTER 1

Introduction 1

1.1 Problem Background . . . 1

1.2 Approach . . . 1

1.3 Report Overview . . . 2

CHAPTER 2 Governing Equations 3 2.1 The Eulerian Model . . . 3

2.2 The Navier-Stokes Equations . . . 3

2.3 Plasticity . . . 4

CHAPTER 3 Numerical Method 5 3.1 The Particle Level Set Method . . . 5

3.2 MAC (Marker-and-Cell) Grid . . . 5

3.3 Solving the Navier-Stokes Equations . . . 6

3.4 CFL Condition . . . 6

CHAPTER 4 Results 7 4.1 Code Overview . . . 7

4.2 Free-Surface Strain Condition . . . 7

4.3 Visual Palette . . . 10

CHAPTER 5 Additional Animation Effects 13 5.1 Bouncing . . . 13

5.2 Varying Viscosity . . . 13

5.3 Squirting . . . 14 CHAPTER 6

Conclusion 15

(6)

ii Table of contents

APPENDIX A

Code segments 17

A.1 Outline of the algorithm . . . 17 APPENDIX B

Two-Phase Viscoelastic Flow Model1 21

B.1 Modeling Two-Phase Flow . . . 21 B.2 Modeling Visco-Elastic Force . . . 21 B.3 Numerical Algorithm . . . 22

1This section was authored by Chohong Min.

ii

(7)

List of figures

4.1 Two-Dimensional Colliding Blobs . . . 8

4.2 Tom´e strain boundary after 300 frames . . . 9

4.3 Elastic strain boundary After 300 frames . . . 9

4.4 Still Frames Demonstrating a Range of Elasticity Values . . . 10

4.5 Still Frames Demonstrating a Range of Elastic Decay Rate Values . . . 11

4.6 Still Frames Demonstrating a Range of Yield Point Values . . . 11

4.7 A String of Images Demonstrating Pouring of a Viscoelastic Liquid . . . 12

(8)
(9)

Acknowledgments

This project is supported by the National Science Foundation (DMS 9810282) and Pixar Animation Studios. We thank the Harvey Mudd College Math Clinic for use of their LATEX report template. We would also like to thank our Faculty Mentors, Doug Enright, for providing us with the necessary C++ code to build on and Chohong Min for giving us relevant numerical background.

(10)
(11)

CHAPTER 1

Introduction

Pixar Animation Studios is the industry leader in the creation of original stories in the medium of computer animation. Pixar has combined artistic and innovative technology to create five of the most successful animated films of all time: Academy Award r°- winning Toy Story (1995), A Bug’s Life (1998), Golden-Globe-winner Toy Story 2 (1999), Monsters, Inc. (2001), and Finding Nemo (2003).

Pixar’s relentless pursuit of creative technical solutions to the needs of the underlying story have made Pixar’s films a unique mixture of cutting-edge visual special effects and good old fashion story telling. Recent research advancements in fluid animation have raised audience expectations, providing motivation for Pixar to explore the animation of high viscosity/viscoelastic liquids. Our team has been tasked with determining which numerical algorithms are appropriate for the animation of viscoelastic liquids.

1.1 Problem Background

Liquids are usually simulated as a volume with a velocity field defined at fixed points in space (an Eulerian model). For a liquid with a free-surface boundary, a particle level-set method can be used to track the movement of the liquid-air interface. A property of this model is that it does not retain a history of the shape evolution of the liquid, i.e. there is no way to determine where a small piece of the fluid came from. This is problematic when modeling a viscoelastic fluid, which retains memory of its original shape. In 2004 Goktekin et al. [6] presented a scheme for modeling a viscoelastic fluid using an Eulerian model. The model includes an integrated strain rate (effectively the rate at which a given infinitesimal section of fluid is being stretched or sheared) in order to solve for the total strain on the fluid as a function of position. This allows the restoring force to be computed, affording a realistic model of the fluid’s attempt to preserve its shape. This idea has became the underlying model that we used to incorporate elasticity into the existing free surface Navier-Stokes simulation.

1.2 Approach

• Become familiar with the existing free surface model and experiment with param- eters

• Determine appropriate numerical scheme to handle additional stress term

• Implement algorithm in existing two-dimensional simulation

(12)

2 Introduction

• Experiment with parameters and verify stability

• Determine promising parameters for three-dimensions

• Extend working algorithm into existing three-dimensional simulation

• Experiment with parameters to mimic physical examples

• Create a visual palette demonstrating capabilities of implementation

• If time permits, extend code to handle fracturing viscoelastic liquids

1.3 Report Overview

This report is organized as follows:

• Chapter 2 discusses the governing equations for our model

• Chapter 3 covers the numerical method we use to handle each term of the governing equations

• Chapter 4 describes our results with the three-dimensional simulation with some examples

• Chapter 5 discusses the additional animation effects we were able to achieve

• Chapter 6 concludes our report and gives suggestions for future work

• Appendix A outlines the important segments of our algorithm

• Appendix B gives an alternative approach to our problem

2

(13)

CHAPTER 2

Governing Equations

2.1 The Eulerian Model

When modeling liquids, keeping track of displacements (the common way to calculate strains from which the elastic stresses are calculated in solids) can become very com- plicated and in some cases impossible in the presence of merging and pinching of the viscoelastic liquid interface. There have been various attempts to incorporate elasticity by modeling the system as a set of particles connected by springs which track displace- ments to the interface and apply a restoring force to the interface, i.e. see [14, 9]. Energy minimization methods have also been used, see [13, 12]. Since these methods have great difficulty and/or are not able to model merging, pinching, or folding of the liquid inter- face, a different approach must be used.

We chose an Eulerian model to overcome this difficulty and we incorporated an ad- ditional stress term, tracking deformation with a linear, time-independent strain tensor.

As this method imposes no internal fluid structure, it can handle merging and pinching with ease. This method, as proposed in [6], computes the strain as follows:

˙ε = (∇~u + (∇~u)T)

2 − ˙εP lc, (2.1)

where ∇~u+∇~2 uT is the instantaneous strain rate and ˙ε is the total (convected) time deriva- tive of ε, and ˙εP lc is the plastic flow rate, discussed below.

2.2 The Navier-Stokes Equations

In the Eulerian model, the motion of fluids can be described by the Navier-Stokes equa- tions. These equations enforce the conservation of momentum and mass. We use the incompressible Navier-Stokes equations, as the fluids we model are nearly incompressible.

The incompressibility condition we impose replaces the conservation of mass constraint with the condition that the velocity field be divergence-free.

The Navier-Stokes equations, with our extra strain tensor, are:

∂~u

∂t + (~u · ∇)~u = −∇p ρ +µv

ρ 2~u + 1

ρ∇ · (µeε) + ~g, (2.2)

∇ · ~u = 0, (2.3)

(14)

4 Governing Equations

where ~u represents the velocity vector, t is time, p is the pressure, ρ is the density of the fluid, ~g is the value of gravity and ε is the elastic strain tensor. The constants µv and µe

represent the coefficients of viscosity and elasticity respectively.

The tensor ε in equation 2.2 represents the elastic stress acting upon the liquid.

In n dimensions ε is represented by a symmetric n-dimensional rank-2 tensor whose components represent the strain the fluid is undergoing in each direction.

2.3 Plasticity

We also wish to capture plastic behavior with our model. Plasticity is the property that fluids undergo non-reversible change in shape under certain strain conditions. We use von Mises’ criterion [6] that plastic flow is an exponential decay in strain above a threshold:

˙εP lc = −α ε0

0kmax(0, kε0k − γ) (2.4) γ is the yield point, α is the elastic decay rate and ε0 is the dilation-free strain:

ε0 = ε − T r(ε)

n I. (2.5)

While T r(ε) = 0 due to incompressibility, we leave it in because we do not perfectly enforce incompressibility. It should not make much difference, however.

4

(15)

CHAPTER 3

Numerical Method

3.1 The Particle Level Set Method

In order to numerically solve the equations which govern our viscoelastic liquid system we need to use appropriate numerical schemes. In the method we will be using, the liquid is defined using a level set function. The level set function, φ, takes a negative value inside the liquid, zero on the boundary and a positive value outside the liquid. In each time step the level set is moved (i.e. advected) based on the liquid velocity field, ~u, by using the advection equation,

φt+ ~u · ∇φ = 0. (3.1)

The level set method [10] is a very practical technique for defining a liquid volume and easily deals with topological changes, but has one great disadvantage, in regions of low resolution use of this method can lead to a loss of volume which is visually manifested as tiny drops disappearing in space. To correct this problem, we use a hybrid particle level set model [3] that adds two sets of particles, one on each side of the level set, which reduce any numerical diffusion errors present in equation 3.1. The particles are advected together with the level set function according to the following equation,

d~xp

dt = ~u(~xp), (3.2)

where ~u(~xp) is the velocity of the fluid at the location ~xp where the each particle is.

Afterward advecting both the particles and level set, the particles are used to make corrections to the level set function where necessary. The particle level set method defines a smooth fluid surface that retains liquid volume when advanced through time.

3.2 MAC (Marker-and-Cell) Grid

The parameters for our system are defined spatially on a grid that covers the domain of our simulation. The type of grid we use is the Marker and Cell Grid proposed by Harlow and Welch [7]. Scalar values such as the pressure p and the level set function φ are stored in the center of grid cells while the components of the velocities are kept on the appropriate cell walls. Unlike Goktekin et al. [6], we store all of the components of the stress tensor in the center of the grid, rather on the cell walls and corners.

(16)

6 Numerical Method

3.3 Solving the Navier-Stokes Equations

Solving the Navier-Stokes equations is essential for our model since these equations dictate the velocity field and ultimately the behavior of the visually perceived liquid interface. Currently we use a numerical operator splitting approach [2] as follows. First, we handle the velocity advection term by using a semi-Lagrangian advection technique [5]

to evolve the entire velocity field,

(~u · ∇)~u. (3.3)

This creates a partially evolved velocity field. To this velocity field we now add in the contributions due to viscosity,

µv

ρ 2~u, (3.4)

body forcing terms such as gravity,

~g, (3.5)

and elastic stress terms,

µe

ρ ∇ · ε. (3.6)

After applying the contributions of equations 3.4-3.6, we calculate a pressure field which when applied to the partially updated velocity field will result in a divergence-free (i.e. mass preserving) velocity field. A point to make is that all the spatial derivatives in equations 3.4-3.6 are approximated using central differencing. At each time step, the stress tensor is updated by integrating the rate of strain term and its effect on the fluid is included in order to complete the update of the velocity field.

The previously mentioned method describes a single forward Euler step to solve the Navier-Stokes equations, i.e. equations 2.2 and 2.3. For added stability we can use a higher order scheme such as a 2nd or 3rd order TVD-Runge Kutta scheme [10]. The obvious trade off, however, is longer run times since we are now effectively doubling or tripling the computational expense.

3.4 CFL Condition

The addition of the elastic terms introduces an upper limit on the time step for stability:

the elastic wave speed q

µε

ρ must be less than the cell propagation speed speed, i.e. ∆x∆t, of the solver. We use ∆t ≤ ∆xq

ρ µε.

6

(17)

CHAPTER 4

Results

4.1 Code Overview

We began with a C++ free surface incompressible flow solver [4] provided by faculty mentor, Doug Enright. We implemented the integrated strain rate model as described in Chapters 2 and 3, including von Mises’s plasticity condition, and created various examples demonstrating the capabilities of our model (Figure 4.1). For simplicity, we use pure (scalar) semi-Lagrangian advection for the strain tensor, so our scheme is not invariant under rotation; this way our advection scheme is always stable.

4.2 Free-Surface Strain Condition

It is necessary to specially treat the strain at the free-surface boundary. To see this, consider the following analytic flow field (with α > 0):

~u = (αx, −αy) (4.1)

∇ · ~u = 0 (4.2)

˙ε ∝ ∇~u =

µ α 0

0 −α

. (4.3)

Since the strain is uniform everywhere, the force is zero everywhere. This means that the object fails to resist deformation.

Intuitively, a physical viscoelastic fluid cannot exert a normal force at the surface, except for the pressure. This is because the force has no mass - if the force were nonzero, the acceleration would be infinite. But each fluid cell exerts force related to its strain tensor. Thus, the normal and shear components at the surface must be zero. Since the trace of the extra-strain tensor must be zero due to incompressibility, we can conclude that all components should be zero. Thus, the free-surface strain condition is:

ε = 0.

Various attempts to enforce this introduced artifacts into the solution where the rigid boundary intersected the free surface. Ignoring it led to obviously incorrect behavior.

Our first scheme to enforce the above free-surface strain condition was derived from [15]. For every Euler step, we zero the strain field in all cells with φ ≥ 0 and all of their neighbors. This generates reasonable results, except that the surface distorts

(18)

8 Results

(a) Colliding Liquid Blobs Prior to Collision

(b) Result of Non-Elastic Blobs After Collision

(c) Result of Elastic Blobs After Collision

Figure 4.1. Colliding Blobs in Two-Dimensions

badly over time. This seems to be caused by cells in which φ is very close to zero. These cells may slightly oscillate between positive and negative φ as we approach steady state, which will incorrectly erase the strain in the cell’s neighbors, allowing the fluid in that cell to flow. Figure 4.2 shows the result after 300 frames; note how the right side is no longer spherical. (These figures are from a 2D version of our solver.)

To address this, we tried modifying the strain evolution to enforce the boundary condition:

˙ε = (∇~u + (∇~u)T)

2 (1 − H(φ)), (4.4)

8

(19)

Free-Surface Strain Condition 9

Figure 4.2. Sagging Surface after 300 Frames

where

H(φ) =





0 φ < −ε,

1

2 + φ +1 sin

³πφ ε

´

−ε ≤ φ ≤ ε,

1 ε < φ.

(4.5)

This scheme generates (to first-order accuracy) zero strain outside the fluid, assuming that advection errors are small. It is not prone to the oscillation problem described above, and it generates much more stable steady-state solutions. This scheme does not enforce the boundary condition perfectly after a large number of frames; this property does not appear to prevent steady state from being reached. Figure 4.3 shows the result after 300 frames; the blob remains round.

Figure 4.3. Stable Surface After 300 Frames

The problem with this scheme is that, when the fluid detaches from a wall, either through advection or by bouncing (see below), discontinuities are introduced in the strain

(20)

10 Results

Our current scheme is to adjust the stress forcing without directly enforcing a strain- free boundary:

µ0ε(~x) = µε· (1 − H(φ(~x))) (4.6) F (~x) = ∇ · (µ~ 0ε(~x) · ε(~x)) (4.7) This models, to first order, the fact that there is no stress force outside the interface.

In practice, this results in a nearly stress-free boundary.

4.3 Visual Palette

The main goal of our project was to explore a range of animation effects with the working three dimensional simulation engine we developed. We created a series of animations (all ran on a 503 grid) by varying parameters to demonstrate the dependence of the behavior of the viscoelastic liquid on each parameter value. We took values for elasticity between µe = 1000, 5000, 10000; the decay rate α = 0, 25, 500; and the yield point γ = 0, 0.1, 0.5. This animation palette was helpful in determining promising parameters for physical examples such as toothpaste. Figures 4.4, 4.5, and 4.6 show the variation of one parameter while keeping all other parameters constant. Increasing the elasticity constant (µe) as shown in figure 4.4 presents an increase in solid-like behavior as we expected. In figure 4.5 you can see an increase in decay rate (α) causes the liquid to relax in less time. Modifying the yield point (γ) as in figure 4.6 demonstrates the direct correlation to the strain at which the liquid begins to flow. Figure 4.7 contains successive frames demonstrating the pouring behavior of a viscoelastic liquid with a relatively low elasticity.

Animations and stills of all the visual palette runs made are included on the report CD.

(a) µe= 1, 000Nm (b) µe= 5, 000Nm (c) µe= 10, 000Nm

Figure 4.4. Behavior of Viscoelastic Liquid With Varying Elasticity Values, α = 0s−1 and γ = 0.0

10

(21)

Visual Palette 11

(a) α = 0s−1 (b) α = 25s−1 (c) α = 500s−1

Figure 4.5. Behavior of Viscoelastic Liquid With Varying Elastic Decay Rate (α) Val- ues, µe= 5, 000Nm and γ = 0.0

(a) γ = 0.0 (b) γ = 0.1 (c) γ = 0.5

Figure 4.6. Behavior of Viscoelastic Liquid With Varying Yield Point (γ) Values, µ =

(22)

12 Results

(a) Frame 1 (b) Frame 20 (c) Frame 40

(d) Frame 60 (e) Frame 80 (f) Frame 100

Figure 4.7. Viscoelastic Pouring palette with µe = 1, 000Nm, α = 25s−1, and γ = 0.5

12

(23)

CHAPTER 5

Additional Animation Effects

5.1 Bouncing

In all the previous animations, once the liquid reached the bottom of the container it was unable to detach even though it was physically supposed to. This is reasonable for a sticky fluid, but non-sticky fluids (like Jello) should be able to bounce. This happened because once the fluid reached the ground the positive values of the level set function that represented open space were advected into the ground and had no way of advecting back out. In order to model bouncing behavior, we apply a condition that, if the pressure at the boundary drops below a pre-defined threshold, we removed liquid from that cell (i.e. set φ = ∆x). This empty space below the fluid would then allow it to bounce back up. This scheme is not quite physically accurate because it conserves neither mass, momentum nor energy, but it generates reasonable looking results and is therefor useful for animation purposes. We are considering possible alternate schemes that would deal with such problems as handling the strain at the newly-detached free surface.

5.2 Varying Viscosity

Many common fluids, especially foods, undergo strain thinning [1]. Strain thinning fluids decrease in viscosity with increasing strain rate. In one dimension, this means that stress = (rate of shear)n. In higher dimensions, we extend this to µv = µ0 · kDkn−1, where

D = (∇~u + (∇~u)T)

2 (5.1)

is the strain rate. Because µv is no longer constant, we change the viscosity force to

∇ · (µv∇D).

Naive application of this scheme however results in instabilities for two reasons. First, the µv grows without bound at low D. Secondly, rapid small fluctuations in the velocity field result in amplified oscillations in viscosity, which produces large forces. We address the former by capping viscosity and the latter by averaging over time (where R is the time-averaged normed strain rate):

R =˙ 1 τD

µk∇~u + (∇~u)Tk

2 − R

, (5.2)

µv = µ0· max(Rn−1, 2) (5.3)

Numerically, we solve the variable viscosity as follows:

(24)

14 Additional Animation Effects

r = e−∆t/τD, (5.4)

R(t + ∆t) = rR(t) + (1 − r)

µk∇~u(t) + (∇~u(t))Tk

2 − R(t)

, (5.5)

µv(t) = µ0· max(R(t)n−1, 2) (5.6)

This way, strain thinning does not lag, and, as τD → 0, this scheme approaches a scheme without temporal averaging.

A value of n = 0.5 appears to model ketchup well.

5.3 Squirting

Another behavior that we tried to animate is the property of ketchup to come out in spurts when squirted from a bottle. One factor that causes this behavior may be strain thinning. This is the property of the viscosity to decrease as the strain on the fluid increases. As a result of this the flow rate will tend to be unstable, since higher flow means less resistance. We attempted to model this as a constant pressure applied to the top of a ”bottle,” and a disc with a hole in it at the bottom. We had some trouble with the collision object that resulted in unphysical results, but our method may work with a little more time.

14

(25)

CHAPTER 6

Conclusion

The goal of this project was to create an algorithm that realistically animated three dimensional viscoelastic liquids. We were able to extend the existing two-dimensional code provided to us by our faculty mentor, Doug Enright, so that it models elastic and plastic behaviors. Numerical stability issues as well as elastic stress free surface boundary conditions had to be addressed.

We were also able to extend the simulation to three dimensions by appropriately adapting and extending the two dimensional algorithm. Bouncing behavior was ob- tained by modifying the physically-based algorithm. A visual palette of how the various parameters in our code affect the behavior of our liquid was created. From this palette we were able to determine the elasticity and plasticity parameters necessary to obtain behavior analogous to real life examples, such as toothpaste. We proposed and imple- mented a varying viscosity strain-thinning algorithm to animate the behavior of ketchup.

Some progress was made on animating the squirting of ketchup out of a bottle. We were able to create an animation of this effect but certain problems on the boundaries caused the animation to become unstable and unrealistic.

Based upon the work presented here, future efforts such as incorporating time- dependent viscosity, strain-thickening, and the fracturing of viscoelastic liquids should be examined.

(26)
(27)

APPENDIX A

Code segments

A.1 Outline of the algorithm

Initialize data structures For each frame

Subcycle time until next frame reached as follows:

For each lagrangian time step substep (dt)

Update position of levelset and particles via subcycling at levelset CFL Advect levelset

Advect particles

Combine particles and levelset

Fill ghost cells for velocity and strain Advect velocity

Advect strain

Update stress terms (see attached function)

Update velocity due to strain (see attached function) Update velocity due to gravity

If viscosity > critical value

Update viscosity implicitly Else

Update viscosity explicitly Solve then update velocity due to pressure

Enforce boundary conditions:

No slip for velocity

Constant extrapolation for strain Extrapolate velocity across interface

Zero strain out away from interface Enforce boundary conditions:

(28)

18 Code segments

No slip for velocity

Constant extrapolation for strain

The previously mentioned functions are defined as follows:

Update Stress Terms:

Iterate over the grid and for each grid cell

Calculate Ux, Uy, Uz, Vx, Vy, Vz, Wx, Wy and Wz, using central differencing Update stress due to plasticity as follows:

Etrace = Trace of stress tensor matrix Enorm = Norm of stress tensor matrix If (Enorm > Plasticity Gamma)

Scale = 0 Else

Scale = Plasticity Alpha * (Enorm - Plasticity Gamma) / Enorm Etrace = Trace of stress tensor matrix

EXX -= dt * scale * (EXX - Etrace / 3) EXY -= dt * scale * EXY

EXZ -= dt * scale * EXZ

EYY -= dt * scale * (EYY - Etrace / 3) EYZ -= dt * scale * EYZ

EZZ -= dt * scale * (EZZ - Etrace / 3) Update stress due to elasticity as follows:

EXX += dt * Ux

EXY += dt * (Uy + Vx) / 2 EXZ += dt * (Uz + Wx) / 2 EYY += dt * dt * Vy

EYZ += dt * (Vz + Wy) / 2 EZZ += dt * Wz

Update velocity due to strain:

Iterate over the grid and for each grid cell

Calculate the following partial derivatives using central differencing These partial derivatives are not taken

U += dt * (dEXX/dx + dEXY/dY + dEXZ/dz)

18

(29)

Outline of the algorithm 19

V += dt * (dEYY/dy + dEYZ/dz + dEXY/dx) W += dt * (dEZZ/dz + dEXZ/dx + dEYZ/dy)

(30)
(31)

APPENDIX B

Two-Phase Viscoelastic Flow Model 1

B.1 Modeling Two-Phase Flow

The two phase flow approach [8] has often been employed to the simulation of one phase flow with moving interface, since it removes the difficulty treating the boundary condition at the interface. It usually fills the empty space with a negligible flow, such as air.

Combined with the level set method capturing the interface [11], a two-phase flow is modeled by the incompressible Navier-Stokes equation with variable density and vis- cosity.

~ut+ (~u · ∇) ~u = 1ρ

³

∇p + ∇ · (2µND) + ~f

´ + ~g

∇ · ~u = 0 φt+ (~u · ∇) φ = 0 ρ = ρ+ (ρ+− ρ) H(φ) µN = µN

µ+N − µN¢ H(φ)

Here, D denotes the strain rate tensor, ∇~u+∇~2 u, and ~f is an external force that will be taken as a Visco-Elastic force.

Given an incompressible vector field ~u, it is canonically decomposed as the sum of translation, deformation and rotation ;

~u(x + h) = ~u(x) + ∇~u · h + O(h2)

= ~u(x) + ∇~u+∇~2 u · h +∇~u−∇~2 u · h + O(h2)

Physically, it is obvious to see that the friction or viscosity should be a function of the deformation only.

B.2 Modeling Visco-Elastic Force

By the analysis of the Section B.1, a highly viscous flow hardly allows deformations.

The main idea of visco-elastic flow is to give a delay to the Newtonian viscous force, so that deformation is easily allowed at the initial time but the Newtonian viscous force corresponding to the deformations is remembered and taken into effect later time to restore the original shape. We use the following well-known ODE to remember the Newtonian viscous force ;

1This section was authored by Chohong Min.

(32)

22 Two-Phase Viscoelastic Flow Model1

f~t = λ h

∇ · (2µED) − ~f i

Its analytical solution is easily given as f (t) = λ~

Z 0

−∞

eλ(t+τ )∇ · (2µED(τ )) dτ

Since λR0

−∞eλ(t+τ )dτ = 1, ~f is an weighted average of the past Newtonian viscous forces. Via this visco-elastic force ~f , the Newtonian viscous force is remembered and taken into effect through later time.

B.3 Numerical Algorithm

~u and ~f are sampled at the boundary of the MAC cell, and φ and p are sampled at the center of the cell. First, the level set function is updated using the ENO interpolation on convection and the TVD-RK method on time.

φn+1− φn

∆t + (~un· ∇) φn= 0 The velocity is advanced with a temporary variable ~u;

~u− ~un

∆t + (~un· ∇) ~un = 1 ρn+1

³

∇ ·¡

n+1N D¢ + ~fn

´ + ~g

~u is projected into a divergence free,

ρ∇pn+1 = ∇ · ~u

~un+1= ~u ρ∇pn+1

The visco-elastic force is updated by taking an average that came from the analysis of Section B.1 ;

f~n+1 = λ∇ ·¡

n+1E Dn+1¢

ρn+1 + λe−λ∆t ·

³f~n+ (~un· ∇) ~fn

´

B.3.1 CFL condition

φ is numerically stable if ;

∆t ≤ ∆x

d · k~unk (B.1)

Here d denotes the dimension. ~f is also stable with the above CFL condition, since it is an average of the next step and the convected part.

22

(33)

Numerical Algorithm 23

Since ~f is an average of the Newtonian force past, we can think that the viscosity part of ~u is mixed with an implicit part ∇ · (2µnND) and an explicit part ~fn. By a rule of thumb that any numerical scheme with an implicit part for the heat equation is unconditionally stable, the vector field is numerically stable with the above CFL condition. The projection part is naturally stable by the Hodge theory. In overall, our numerical algorithm is stable with the CFL condition B.1.

(34)
(35)

Bibliography

[1] Ulf Balmstedt. Viscosity and rheology: Theorectical and practical considerations in liquid food processing. New food, 3(2), 2000.

[2] Mark Carlson, Peter J. Mucha, R. Brooks Van Horn III, and Greg Turk. Melting and flowing. In ACM SIGGRAPH Symposium on Computer Animation, pages 167–174, 2002.

[3] D. Enright, R. Fedkiw, J. Ferziger, and I. Mitchell. A hybrid particle level set method for improved interface capturing. J. Comp. Phys., 183(1):83–116, 2002.

[4] Douglas Enright, Stephen Marschner, and Ronald Fedkiw. Animation and rendering of complex water surfaces. ACM Trans. on Graphics (SIGGRAPH 2002 Proceed- ings), 21(3):736–744, 2002.

[5] Nick Foster and Ronald Fedkiw. Practical animation of liquids. In Eugene Fiume, editor, Proceedings of SIGGRAPH 2001, Computer Graphics Proceedings, Annual Conference Series, pages 23–30. ACM, ACM Press / ACM SIGGRAPH, 2001.

[6] Tolga G. Goktekin, Adam W. Bargteil, and James F. O’Brien. A method for an- imating viscoelastic fluids. In To Appear in the Proceedings of ACM SIGGRAPH 2004. ACM Press, August 2004.

[7] F. Harlow and J. Welch. Numerical calculation of time-dependent viscous incom- pressible flow of fluid with free surface. Phys. Fluids, 8(1):2182–2189, 1965.

[8] P. Smereka M. Sussman, E. Fateni and S.J. Osher. An improved level set method for incompressible two-phase flows. journal of computers and fluids. Journal of Computers and Fluids, 27(5-6):663–680.

[9] Daniel Nixon and Richard Lobb. A fluid-based soft-object model. IEEE Computer Graphics & Applications, 22(4):68–75, 2002.

[10] S. Osher and R. Fedkiw. The Level Set Method and Dynamic Implicit Surfaces.

Springer-Verlag, New York, 2002.

[11] S. Osher and J. Sethian. Fronts propagating with curvature-dependent speed: Al- gorithms based on hamilton-jacobi equations. Journal of Comp.Phys, 79:12–49, 1988.

(36)

26 Bibliography

[12] D. Terzopoulos and K. Fleischer. Modeling inelastic deformation: viscoelasticity, plasticity, fracture. Comput. Graph. (SIGGRAPH Proc.), pages 269–278, 1988.

[13] D. Terzopoulos, J. Platt, A. Barr, and K. Fleischer. Elastically deformable models.

Comput. Graph. (Proc. SIGGRAPH 87), 21(4):205–214, 1987.

[14] Demetri Terzopoulos, John Platt, and Kurt Fleischer. Heating and melting de- formable models (from goop to glop). In Graphics Interface ’89, pages 219–226, June 1989.

[15] M.F. Tom´e, N. Mangiavacchi, J.A. Cuminato, A. Castelo, and S. McKee. A finite difference technique for simulating unsteady viscoelastic free surface flows. J. Non- Newt. Fluid Mech., 106:61–106, 2002.

26

참조

관련 문서

The index is calculated with the latest 5-year auction data of 400 selected Classic, Modern, and Contemporary Chinese painting artists from major auction houses..

Average of the indexed values of the following data: (1) Total value of the indexed score for disability-adjusted life years (the number of years lost due to illness,

The “Asset Allocation” portfolio assumes the following weights: 25% in the S&amp;P 500, 10% in the Russell 2000, 15% in the MSCI EAFE, 5% in the MSCI EME, 25% in the

1 John Owen, Justification by Faith Alone, in The Works of John Owen, ed. John Bolt, trans. Scott Clark, &#34;Do This and Live: Christ's Active Obedience as the

• Stress magnitude varies with respect of the direction of reference plane = stress is ‘2 nd order tensor’.

The approach used in the following analysis is to investigate the effect of neglecting the strain energy due to the 2 nd invariant of the strains in the middle surface

Fourth, as the information technology is developed due to the fourth industrial revolution and the proportion of information technology in the commercial

In gi ngi va,LCs are found i n oralepi thel i um ofnormalgi ngi va and i n smal l er amountsi nthesul cul arepi thel i um,buttheyareprobabl yabsentfrom thejuncti onal epi thel