• 沒有找到結果。

Smoothed Particle Hydrodynamics (SPH) Model

CHAPTER 3 WATER AND SAND INTERACTIVE MODEL

3.1 Smoothed Particle Hydrodynamics (SPH) Model

In order to simulate fluids, we represent fluids as a set of particles. Smoothed particle hydrodynamics (SPH) is a method to compute approximate numerical solution of the fluid dynamics equations.

The classical SPH equation from [21], [22] is:

∑ , , (1)

where is the density of particle i and , is a smoothing kernel function, with

6

support radius h. A particle is at position , with mass and additional attributes .

3.2 Fluid Simulation

We use Smoothed Particle Hydrodynamics (SPH) based on previous works of Müller et al. [19] and Müller et al. [20] to simulation fluids. Since we use adaptive sampling to simulate particles, the definitions of the force we use are different.

To simulate fluids, we need to use particles to solve the Navier-Stokes equations. The Navier-Stokes momentum equation is:

(2)

where v is velocity, P is pressure is viscosity and g is the gravity. Then, particle forces can be obtained by using the work as Müller et al. [19]. Equation (2) modeling three forces:

pressure force ( ), external forces ( ) and viscosity force ( ). Thus, equation (2) can be rewritten as:

. (3) We define that the is external body forces as gravity force or surface tension force.

Since our system is based on adaptive sampling algorithm [1]. By the definition of [1], a particle has a neighbor if , . In Figure 3.1, particle and are neighbors of each other. We use k-d tree to compute particles' neighborhood.

Figure 3.1: Particle and particle are neighbors of each other

In our system, particles may have difference radius. So we use the shooting-gathering approach from the work of Desbrun and Cani [10] and Adams et al. [1]. Combing the force defined in [19], we obtain the forces: constant. The kernel functions of , we use is as defined in [19]. Since the kernel function is radially symmetric, our system obeys Newton's Third Law.

The surface tension model we use is similar to the work of Becker and Teschner [3].

3.3 Sand Simulation

To simulate sand materials, we use the method based on Zhu and Bridson [26]. Zhu and Bridson [26] provided a physically-based simulation method to animate sand as fluids. At first, we use the SPH model to solve the pressure gradients, and then we use Tait's pressure

8

equation in the work of Becker and Teschner [3] to make the intermediate velocity field nearly incompressible. Tait's equation is

1 (7) with the pressure constant B and a user define constant γ.

In Zhu and Bridson [26], they decompose the sand materials into two parts: one is the region moving rigidly and the other is the region of flow. When the particle of sand is flowing, the frictional stress is given as:

σ / | | (8)

where is the friction coefficient. The strain rate T /2 can be evaluated by using the SPH method. In the Solenthaler et al. [25], is defined as the displacement gradient:

∑ , ∆ (9) Note that the result of is a 3 3 matrix, since , is a 3 1 matrix and

∆ is a 1 3 matrix. To find out which particle is moving rigidly, we need to use the Mohr-Coulomb condition as the work in Zhu and Bridson [26]. The Mohr-Coulomb condition determines the martial will not yield as long as:

√3 (10) where is the shear stress, /3 is the mean stress and 0 is the cohesion coefficient. can be compute as:

| | /√2 (11)

where |·| is the Frobenus norm. The definition of Frobenus norm is

| | ∑ ∑ , A is an m n matrix. We use the rigid stress to check if the particles satisfy the Mohr-Coulomb condition. The rigid stress is:

(12)

Equation (10) can help us to recognize which particle is rigid or not. Then, we search for clusters of particles which are moving rigidly. If two particles are neighboring particles and within a support range, we mark these particles as in the same clusters. Using the breadth-first search, we can easily find the clusters of particles.

Figure 3.2: Sand particles interactive with water particles.

In Figure 3.2, there are two kinds of particles. The blue particles are water particles, and the brown and orange particles are sand particles. The orange particles are moving rigidly. h is the support range of a particle and h' is the distance between the neighboring particles. If , the neighboring particles are in the same cluster. After we define the clusters, we need to compute the force acting on the clusters. Since the particle clusters are moving rigidly, we consider the rigid body motion. The basic rigid body simulation described in Baraff [2].

According to Solenthaler et al. [25] and Baraff [2], the torque vector τ can be computed as:

10

(12)

where is the center of mass of a cluster and is the total force on the ith particle. The total force acting on a cluster is the sum of the :

(13)

and the total torque can be computed similar to (13):

∑ (14)

After the total force and torque of a cluster are computed, we can use this information to compute the angular accelerations and then update the angular velocity and position of particles. By the definition of the Newton's second law, the relation between torque and angular acceleration is:

(15)

where is the total torque acting on a cluster (a rigid body) and I is the inertia tensor. To compute the angular acceleration action on the ith cluster, equation (15) can be rewritten as:

α (16)

In Baraff [2], the inertia tensor in the ith cluster:

∑ (17)

with , for all the particles th cluster. Then the velocity of the particles can be updated:

1 ∆ α ∆ (18)

The brown particles in Figure 3.2 are in a state of shearing flow. Since in equation (8) we

have compute the frictional stress, the force acting on these particles can be computed by using the work in the Solenthaler et al. [25]. The force is similar to the elastic force:

2 (19)

where I is the identity matrix, is the body volume of particle i, and is defined as:

, (20)

Finally, Figure 3.3 summarizes the algorithm for simulating the sand material.

      Figure 3.3: Algorithm for a step in SandSimulator

3.4 Porous Flow Simulation

To simulate the water absorption of sand, we use porous flow simulation as the work of Lenaerts et al. [16]. A porous particle is defined by its porosity and permeability. We can think that a porous particle has a lot of hole inside its body. Thus, a porous particle is capable

12

of holding a amount of water. Figure 3.4 shows the microscopic view and macroscopic view of the porous material model.

Figure 3.4 Porous materials. Top right region is microscopic view of a porous particle. A

porous particle can hold water inside; the water inside a porous particle is in blue color.

Bottom right region is macroscopic view of a porous particle. A porous particle p with porosity , saturation and permeability .

By the definition of porous particles in Lenaerts et al. [16], the porosity represents the unit volume of void space among particles. For example, is the void volume in a particle . Therefore, a particle with porosity can hold the absorbed masses

. The particle's saturation can be computed as:

, 0 1 (21) The permeability is a constant. For different materials, the is different.

In microscopic view, the capillary pressure is the reason why the water can enter into a porous particle and diffuse to neighboring porous particles. The capillary pressure force also keeps the water inside the porous materials. Since our model does not have real pores, we use

the method of Lenaerts et al. [16] to model the capillary forces.

∑ , , (22)

where is the capillary potential, it can be defined as:

1 , (23)

where is a constant and 0 1. When a porous particle's saturation increases, the capillary force decreases.

During the simulation, particles in our system will split and merge due to adaptive sampling algorithm. The volume of the pore space will be different. The porosity is depending on the local density of the material:

(24)

is the porosity in the beginning. To compute the pore pressure , we use the equation similar to the Tait's equation [3]:

1 (25)

Darcy's law [9] is an equation to describe incompressible fluid flow inside the porous materials. The pore velocity is , where q is the Darcy flux. In three dimensions, we need to consider the gravity, so the Darcy's law can be:

(26)

By using equation (26), the pore velocity can be computed as:

(27)

14

The pore velocity inside the materials can't be easily predicted because it's an anisotropic diffusion. Figure 3.5 shows the pore velocity of water through the sand materials in macroscopic view.

Figure 3.5: Actual fluid velocity through the pore space of sand materials.

In our thesis, we just consider the fluid flow inside the materials, like the diffusion process in Müller et al. [20]. During the simulation, fluid mass is diffusing from one porous particle to its neighbors. This way is easy than tracking the fluid particle inside the materials. The diffusion equation for compute absorbed fluid mass is:

∑ , (28)

with the diffusion coefficients :

· , 0 (29)

Using an explicit Euler integration step, the fluid mass can be updated:

∆ (30)

Before updating the fluid mass, we need to check the free and occupied volumes of the porous particles. The free volume of a porous particle is 1 , and occupied volumes of a porous particle are .

14

The pore velocity inside the materials can't be easily predicted because it's an anisotropic diffusion. Figure 3.5 shows the pore velocity of water through the sand materials in macroscopic view.

Figure 3.5: Actual fluid velocity through the pore space of sand materials.

In our thesis, we just consider the fluid flow inside the materials, like the diffusion process in Müller et al. [20]. During the simulation, fluid mass is diffusing from one porous particle to its neighbors. This way is easy than tracking the fluid particle inside the materials. The diffusion equation for compute absorbed fluid mass is:

∑ , (28)

with the diffusion coefficients :

· , 0 (29)

Using an explicit Euler integration step, the fluid mass can be updated:

∆ (30)

Before updating the fluid mass, we need to check the free and occupied volumes of the porous particles. The free volume of a porous particle is 1 , and occupied volumes of a porous particle are .

14

The pore velocity inside the materials can't be easily predicted because it's an anisotropic diffusion. Figure 3.5 shows the pore velocity of water through the sand materials in macroscopic view.

Figure 3.5: Actual fluid velocity through the pore space of sand materials.

In our thesis, we just consider the fluid flow inside the materials, like the diffusion process in Müller et al. [20]. During the simulation, fluid mass is diffusing from one porous particle to its neighbors. This way is easy than tracking the fluid particle inside the materials. The diffusion equation for compute absorbed fluid mass is:

∑ , (28)

with the diffusion coefficients :

· , 0 (29)

Using an explicit Euler integration step, the fluid mass can be updated:

∆ (30)

Before updating the fluid mass, we need to check the free and occupied volumes of the porous particles. The free volume of a porous particle is 1 , and occupied volumes of a porous particle are .

14

The pore velocity inside the materials can't be easily predicted because it's an anisotropic diffusion. Figure 3.5 shows the pore velocity of water through the sand materials in macroscopic view.

Figure 3.5: Actual fluid velocity through the pore space of sand materials.

In our thesis, we just consider the fluid flow inside the materials, like the diffusion process in Müller et al. [20]. During the simulation, fluid mass is diffusing from one porous particle to its neighbors. This way is easy than tracking the fluid particle inside the materials. The diffusion equation for compute absorbed fluid mass is:

∑ , (28)

with the diffusion coefficients :

· , 0 (29)

Using an explicit Euler integration step, the fluid mass can be updated:

∆ (30)

Before updating the fluid mass, we need to check the free and occupied volumes of the porous particles. The free volume of a porous particle is 1 , and occupied volumes of a porous particle are .

14

The pore velocity inside the materials can't be easily predicted because it's an anisotropic diffusion. Figure 3.5 shows the pore velocity of water through the sand materials in macroscopic view.

Figure 3.5: Actual fluid velocity through the pore space of sand materials.

In our thesis, we just consider the fluid flow inside the materials, like the diffusion process in Müller et al. [20]. During the simulation, fluid mass is diffusing from one porous particle to its neighbors. This way is easy than tracking the fluid particle inside the materials. The diffusion equation for compute absorbed fluid mass is:

∑ , (28)

with the diffusion coefficients :

· , 0 (29)

Using an explicit Euler integration step, the fluid mass can be updated:

∆ (30)

Before updating the fluid mass, we need to check the free and occupied volumes of the porous particles. The free volume of a porous particle is 1 , and occupied volumes of a porous particle are .

14

The pore velocity inside the materials can't be easily predicted because it's an anisotropic diffusion. Figure 3.5 shows the pore velocity of water through the sand materials in macroscopic view.

Figure 3.5: Actual fluid velocity through the pore space of sand materials.

In our thesis, we just consider the fluid flow inside the materials, like the diffusion process in Müller et al. [20]. During the simulation, fluid mass is diffusing from one porous particle to its neighbors. This way is easy than tracking the fluid particle inside the materials. The diffusion equation for compute absorbed fluid mass is:

∑ , (28)

with the diffusion coefficients :

· , 0 (29)

Using an explicit Euler integration step, the fluid mass can be updated:

∆ (30)

Before updating the fluid mass, we need to check the free and occupied volumes of the porous particles. The free volume of a porous particle is 1 , and occupied volumes of a porous particle are .

14

The pore velocity inside the materials can't be easily predicted because it's an anisotropic diffusion. Figure 3.5 shows the pore velocity of water through the sand materials in macroscopic view.

Figure 3.5: Actual fluid velocity through the pore space of sand materials.

In our thesis, we just consider the fluid flow inside the materials, like the diffusion process in Müller et al. [20]. During the simulation, fluid mass is diffusing from one porous particle to its neighbors. This way is easy than tracking the fluid particle inside the materials. The diffusion equation for compute absorbed fluid mass is:

∑ , (28)

with the diffusion coefficients :

· , 0 (29)

Using an explicit Euler integration step, the fluid mass can be updated:

∆ (30)

Before updating the fluid mass, we need to check the free and occupied volumes of the porous particles. The free volume of a porous particle is 1 , and occupied volumes of a porous particle are .

14

The pore velocity inside the materials can't be easily predicted because it's an anisotropic diffusion. Figure 3.5 shows the pore velocity of water through the sand materials in macroscopic view.

Figure 3.5: Actual fluid velocity through the pore space of sand materials.

In our thesis, we just consider the fluid flow inside the materials, like the diffusion process in Müller et al. [20]. During the simulation, fluid mass is diffusing from one porous particle to its neighbors. This way is easy than tracking the fluid particle inside the materials. The diffusion equation for compute absorbed fluid mass is:

∑ , (28)

with the diffusion coefficients :

· , 0 (29)

Using an explicit Euler integration step, the fluid mass can be updated:

∆ (30)

Before updating the fluid mass, we need to check the free and occupied volumes of the porous particles. The free volume of a porous particle is 1 , and occupied volumes of a porous particle are .

14

The pore velocity inside the materials can't be easily predicted because it's an anisotropic diffusion. Figure 3.5 shows the pore velocity of water through the sand materials in macroscopic view.

Figure 3.5: Actual fluid velocity through the pore space of sand materials.

In our thesis, we just consider the fluid flow inside the materials, like the diffusion process in Müller et al. [20]. During the simulation, fluid mass is diffusing from one porous particle to its neighbors. This way is easy than tracking the fluid particle inside the materials. The diffusion equation for compute absorbed fluid mass is:

∑ , (28)

with the diffusion coefficients :

· , 0 (29)

Using an explicit Euler integration step, the fluid mass can be updated:

∆ (30)

Before updating the fluid mass, we need to check the free and occupied volumes of the porous particles. The free volume of a porous particle is 1 , and occupied volumes of a porous particle are .

14

The pore velocity inside the materials can't be easily predicted because it's an anisotropic diffusion. Figure 3.5 shows the pore velocity of water through the sand materials in macroscopic view.

Figure 3.5: Actual fluid velocity through the pore space of sand materials.

In our thesis, we just consider the fluid flow inside the materials, like the diffusion process in Müller et al. [20]. During the simulation, fluid mass is diffusing from one porous particle to its neighbors. This way is easy than tracking the fluid particle inside the materials. The diffusion equation for compute absorbed fluid mass is:

∑ , (28)

with the diffusion coefficients :

· , 0 (29)

Using an explicit Euler integration step, the fluid mass can be updated:

∆ (30)

Before updating the fluid mass, we need to check the free and occupied volumes of the porous particles. The free volume of a porous particle is 1 , and occupied volumes of a porous particle are .

14

The pore velocity inside the materials can't be easily predicted because it's an anisotropic diffusion. Figure 3.5 shows the pore velocity of water through the sand materials in macroscopic view.

Figure 3.5: Actual fluid velocity through the pore space of sand materials.

In our thesis, we just consider the fluid flow inside the materials, like the diffusion process in Müller et al. [20]. During the simulation, fluid mass is diffusing from one porous particle to its neighbors. This way is easy than tracking the fluid particle inside the materials. The diffusion equation for compute absorbed fluid mass is:

∑ , (28)

with the diffusion coefficients :

· , 0 (29)

Using an explicit Euler integration step, the fluid mass can be updated:

∆ (30)

Before updating the fluid mass, we need to check the free and occupied volumes of the porous particles. The free volume of a porous particle is 1 , and occupied volumes of a porous particle are .

When porous particles absorb fluid, the absorbed fluid mass should be taken into account to all computations. The density of a porous particle will be changed if the absorbed fluid mass increases. Thus, the density in rest becomes:

(31)

Considering the simulation of elastic bodies, the fluid pressure also influences the stress σ in the elastic bodies:

(32)

The is the pore pressure of the present fluid. is a scaling factor.

3.5 Combing Different Particles

This section presents how we combine different kinds of particles together. During the simulation, if there is no collision or any intersection between the sand particles and water particles, we just simulate them separately. But if the water particles are too close to the sand particles, or there are collisions occur, the interaction between difference kinds of particles must take into account. The collision handling we use in our system is based on the approach of the Molecular Dynamics in Bell et al. [4] and Clavet et al. [7]. Figure 3.6 is the algorithm of the mix simulation step.

16

Figure 3.6 Algorithm for a step in MixSimulator

In the beginning, we do not need to consider the sand particle until the water particles are too close to the sand particles. Line 1 to line 5 are the step of computing the total forces on the sand and water particles. Line 6 is to update the sand and water particles position and velocity.

In the beginning, we do not need to consider the sand particle until the water particles are too close to the sand particles. Line 1 to line 5 are the step of computing the total forces on the sand and water particles. Line 6 is to update the sand and water particles position and velocity.

相關文件