Upload
others
View
4
Download
0
Embed Size (px)
Citation preview
Pressure corrected SPH for fluidanimation
Analyzed by Po-Ram Kim
2 March 2010
Korea UniversityComputer Graphics Lab.
Kai Bao, Hui Zhang,Lili Zhengand Enhua Wu
Korea UniversityComputer Graphics Lab. Po-Ram Kim | 2 March 2010 | # 2KUCG |
Abstract
• We present pressure scheme for the SPH for fluid animation
• In conventional SPH method, EOS are used§ For volume conservation, high speeds of sound are
required à numerical instability
• In the paper, a new extra pressure correction scheme is proposed
Korea UniversityComputer Graphics Lab. Po-Ram Kim | 2 March 2010 | # 3KUCG |
Abstract
• Smoother pressure distribution and more efficient simulation are achieved
• The proposed method has been used to simulate free surface problems
• Surface tension and fluid fragmentation can be well handled
Korea UniversityComputer Graphics Lab. Po-Ram Kim | 2 March 2010 | # 4KUCG |
Introduction
• SPH is a method to capture characteristics and thus becomes more and more widely used
• To simulate free surface flow, one crucial problem is to ensure the incompressibility of the flow§ There are two main ways to achieve this
• The divergence of the velocity field à zero‗ Poisson equation : time consuming solution
• Keeping the fluid density constant‗ Poisson equation : time consuming solution‗ Moving Particle Semi-implicit (MPS) method
Korea UniversityComputer Graphics Lab. Po-Ram Kim | 2 March 2010 | # 5KUCG |
Introduction
• In the conventional SPH method§ EOS are used to directly associate the pressure with
particle density• The time-consuming solution of Poisson equation is avoided :
widely used‗ But, it proved to be hard to guarantee the incompressibility of free
surface flow
§ Tait’s equation• The volume of fluid is generally well conserved
‗ But , a high sound speed has to be used àthe time step is too small‗ little difference in density will lead to large variation in pressure
Korea UniversityComputer Graphics Lab. Po-Ram Kim | 2 March 2010 | # 6KUCG |
Introduction
• In the paper§ An iterative pressure correction scheme is proposed
to be used along with the EOS§ The local pressure disturbance is made to propagate
to the neighboring areas • Smoother pressure distribution• Incompressible fluid• More accurate and efficient simulation
§ Smaller sound speeds and larger time steps are made possible
§ Enhancement in the surface tension model
Korea UniversityComputer Graphics Lab. Po-Ram Kim | 2 March 2010 | # 7KUCG |
Previous Work
• In Eulerain methods§ The incompressibility is easy to enforce§ While the mass conservation for small features is not
well guaranteed§ Widely used in the physically based animation and
many fluid phenomena
Korea UniversityComputer Graphics Lab. Po-Ram Kim | 2 March 2010 | # 8KUCG |
Previous Work
• In Largrangian particles(SPH)§ First introduced for highly deformable bodies§ Grids are required during the computation§ Mass conservation is naturally guaranteed § Surface tracking techniques are required§ Large deformation and violent fragmentation can be
handled§ Interactive simulation of free surface flow was
achieved using SPH by Muller et al
Korea UniversityComputer Graphics Lab. Po-Ram Kim | 2 March 2010 | # 9KUCG |
Previous Work
• Free-surface flow
• Highly viscous fluids
Korea UniversityComputer Graphics Lab. Po-Ram Kim | 2 March 2010 | # 10KUCG |
Previous Work
• Solid-fluid coupling
• An adaptive sampling technique
Korea UniversityComputer Graphics Lab. Po-Ram Kim | 2 March 2010 | # 11KUCG |
Methodology
Basic SPH Formations
• Lagrangian form of the Navier – Stokes equation§ Conservation of mass
§ Conservation of momentum
v : velocity vector , p : pressure , ρ : fluid density , g : gravitational acceleration vector,: kinetic viscosity
Korea UniversityComputer Graphics Lab. Po-Ram Kim | 2 March 2010 | # 12KUCG |
Methodology
Basic SPH Formations
• To evaluate the value f at an arbitrary position x§ an interpolation is applied with the neighboring
particles: Particle approximation
fj : the value of f at the position of particle j , W : smoothing kernel functionm : mass , ρ : density
i
j
Korea UniversityComputer Graphics Lab. Po-Ram Kim | 2 March 2010 | # 13KUCG |
Methodology
Basic SPH Formations
• By applying the SPH particle approximation to the momentum equation(equation (2))
i
j
pj : the pressure of particle i , : direction gradient to particle i
Korea UniversityComputer Graphics Lab. Po-Ram Kim | 2 March 2010 | # 14KUCG |
Methodology
Density Computation
• Two main approaches to determine the density of particles in the traditional SPH§ The density summation method
§ Tracking the evolution of the density through the continuity equation
Korea UniversityComputer Graphics Lab. Po-Ram Kim | 2 March 2010 | # 15KUCG |
Methodology
Density Computation
• The density summation method (ßwidely used)§ Advantage
• It conserves the mass exactly
§ Disadvantage • It suffers from particle deficiency near the boundary
• In the paper, the continuity density approach (equation(5)) is used
Korea UniversityComputer Graphics Lab. Po-Ram Kim | 2 March 2010 | # 16KUCG |
Methodology
Equations of State
• Incompressible fluid§ liquids
• Compressible fluid§ Gases
• A theoretically incompressible flow is practically compressible§ Artificial compressibility is introduced
• Weakly compressible• The pressure is determined with EOS• This approach for free surface flowàThe volume of the flow is hard to be well conserved
Korea UniversityComputer Graphics Lab. Po-Ram Kim | 2 March 2010 | # 17KUCG |
Methodology
Equations of State
• Equation of State
• Tait’s equation
àThe variations of density remain smallàThe volume of the fluid is generally well conserved
kp = c2 , c : the sound of speed , ρ0 : reference density
Korea UniversityComputer Graphics Lab. Po-Ram Kim | 2 March 2010 | # 18KUCG |
Methodology
Equations of State
• Tait’s equation§ Small deviation in density field will result in large
fluctuation in pressure§ Noisy pressure distribution will be obtained
• Numerical instability
Korea UniversityComputer Graphics Lab. Po-Ram Kim | 2 March 2010 | # 19KUCG |
Methodology
Equations of State
• Time step
• With the Tait’s equation, § A high speed of sound is required
• To keep density fluctuation lowà Small time step has to be used
§ To keep the density variation under the order of 1%• Sound speed = 10 * (maximum possible velocity)• In ref[8]
‗ Time step = 4.52*10-4
CFL conditionViscous force conditionExternal force condition
Korea UniversityComputer Graphics Lab. Po-Ram Kim | 2 March 2010 | # 20KUCG |
Methodology
Pressure Correction Equation
• For a truly incompressible flow§ ρ = constant ৠequation(1) àà divergence-free field
§ To obtain a divergence free field, the classical prejection method is used
• However, solving poisson equation proves to be very time consuming
0=dtdr
0v =×Ñ
*2 vdt
p ×Ñ=Ñr
v* : intermediate velocity field without applying the pressure in momentum equation
Korea UniversityComputer Graphics Lab. Po-Ram Kim | 2 March 2010 | # 21KUCG |
Methodology
Pressure Correction Equation
• To resolve § The noisy pressure disturbance§ Instability arising from the EOS
§ To avoid the expensive solution of global Poisson equation
• A flexible pressure correction equation is presented
Korea UniversityComputer Graphics Lab. Po-Ram Kim | 2 March 2010 | # 22KUCG |
Methodology
Pressure Correction Equation
• By substituting the equation(6) into continuity equation(equation(1)), the following equation could be obtained
0
01)1(
1
)(
2
0
=×Ñ+
=×Ñ+
=
=
=
-=
v
v
r
r
r
r
rr
cdtdpdtdp
k
equationdtdp
kdtd
dtdk
dtdp
kp
p
p
p
p
02 =×Ñ+ vcdtdp r (9)
tdtdII dffd )()( =
Variational method
Korea UniversityComputer Graphics Lab. Po-Ram Kim | 2 March 2010 | # 23KUCG |
Methodology
Pressure Correction Equation
• Equation(9) can be written in SPH form as
• If the computation is convergent, RHS of equation(10) should be zero
• A pressure correction value could be obtained by
Since the pressure correction scheme is iterative, a counting number n is introduced
Korea UniversityComputer Graphics Lab. Po-Ram Kim | 2 March 2010 | # 24KUCG |
Methodology
Pressure Correction Equation
• The pressure at the new iteration is written as
• With the pressure correction value, the velocity correction value can be obtained with the momentum equation
ω is the relaxation factor with a value under 1.0
v is the kinetic viscosity
Korea UniversityComputer Graphics Lab. Po-Ram Kim | 2 March 2010 | # 25KUCG |
Methodology
Pressure Correction Equation
• The velocity correction can be obtained by
• The velocity is updated with
Ω is the relaxation factor with a value under 1.0
Korea UniversityComputer Graphics Lab. Po-Ram Kim | 2 March 2010 | # 26KUCG |
Methodology
Pressure Correction Equation
• In each SPH time step§ Equations (11) and (15) are solved iteratively until
convergent§ During the iteration
• Pressure disturbance will propagate to the neighboring particles • Smoother pressure distribution will be obtained
• The pressure correction scheme actually provides a combination of the EOS method and the global pressure Poisson method
• With larger speed of sound, less pressure correction iterations will be required
Korea UniversityComputer Graphics Lab. Po-Ram Kim | 2 March 2010 | # 27KUCG |
Methodology
Surface Tension Model
• Surface tension plays a fundamental role in many fluid phenomena§ Fluid breaking§ Droplet dynamics
• The surface tension results from the uneven molecular forces of attraction near the surface
• The surface tension will lead to a net force in the direction of surface normal
Korea UniversityComputer Graphics Lab. Po-Ram Kim | 2 March 2010 | # 28KUCG |
Methodology
Surface Tension Model
• In SPH method, widely used form
• Smoother surface tension force
σ : Tension coefficient
Korea UniversityComputer Graphics Lab. Po-Ram Kim | 2 March 2010 | # 29KUCG |
Results and Discussions
• All the simulations are performed within a single thread§ Intel Core2 Q6700 CPU § 8GB RAM
• The reference densities in all the simulations
• All the 2D results are rendered with OpenGL• All the 3D results with POVRay
Korea UniversityComputer Graphics Lab. Po-Ram Kim | 2 March 2010 | # 30KUCG |
Results and Discussions
Divergence
• The particles are represented by dots • The velocities of the particles are displayed with line
segments starting from the positions of the particles• Located in the rectangle of 0.2 × 0.2• The initial spacing of the particles is 0.02 • 2520 fluid particles are used in the simulation• A speed of sound of 40 is taken • The time step is 0.001 second
Korea UniversityComputer Graphics Lab. Po-Ram Kim | 2 March 2010 | # 31KUCG |
Results and Discussions
Divergence
Figure1(a-1) Figure1(a-2)
Figure1(a-3) Figure1(a-4)
Initial velocity: (0.5,0.0)
Korea UniversityComputer Graphics Lab. Po-Ram Kim | 2 March 2010 | # 32KUCG |
Results and Discussions
Divergence
Figure1(b-1) Figure1(b-2)
Figure1(b-4)Figure1(b-3)
Initial velocity: (0.5,0.5)
Korea UniversityComputer Graphics Lab. Po-Ram Kim | 2 March 2010 | # 33KUCG |
Results and Discussions
Divergence
§ Usually, several times of the iterations are enough§ c = 5 and dt = 0.008 second
• exactly the same correction results are obtained
We consider the computation has been convergent
Korea UniversityComputer Graphics Lab. Po-Ram Kim | 2 March 2010 | # 34KUCG |
Results and Discussions
Pressure Distribution
• Dam-break flow§ Initial height of water body = 2m§ Initial width of water body = 1m§ Initial particle spacing = 0.02m§ Total 5000 fluid particles are used§ In figure 2
• Figure 2a : the pressure correction scheme is NOT used• Figure 2b : the pressure correction scheme is used• Purple color : the highest pressure• Red color : the lowest pressure
Korea UniversityComputer Graphics Lab. Po-Ram Kim | 2 March 2010 | # 35KUCG |
Results and Discussions
Pressure Distribution
c = 102gH ≈ 62.6m/seconddt
= 8 · 10−5
c = 30 m/seconddt = 2 × 10
−4
figure2
Korea UniversityComputer Graphics Lab. Po-Ram Kim | 2 March 2010 | # 36KUCG |
Results and Discussions
Pressure Distribution
• As shown from the Figure 2,§ Without the pressure correction, the pressure fields
obtained are unphysically noisy§ The pressure noise is significantly reduced § Smoother pressure distribution is achieved
Korea UniversityComputer Graphics Lab. Po-Ram Kim | 2 March 2010 | # 37KUCG |
Results and Discussions
Surface Tension
• The initial side length of cube is 0.005 m• The initial spacing of the particles is 0.0002m • About 12K particles in total are used in the
simulation. • dt = 0.00005 sec• It takes about 0.3 second for one time step of
simulation• As the energy is damped by viscous and numerical
dissipation§ The particles are stable at a spherical shape
• It takes very long time to achieve
Korea UniversityComputer Graphics Lab. Po-Ram Kim | 2 March 2010 | # 38KUCG |
Results and Discussions
Surface Tension
• Evolution of a drop initially in cube shape under effect of surface tension with zero gravity
0.0sec 0.0518sec0.0255 sec
0.0833sec
0.114sec 2.0sec Figure 3
Korea UniversityComputer Graphics Lab. Po-Ram Kim | 2 March 2010 | # 39KUCG |
Results and Discussions
Dam-break on a Wet Bed
• Initial value§ Height = 0.45m§ Length = 0.32m§ Width = 0.4m§ Initial water depth on the bed region = 0.018§ Initial spacing of the particles = 0.006m§ Total # of particle = 267k§ Time step = 0.0005sec§ Simulation time = 7.5 sec
Korea UniversityComputer Graphics Lab. Po-Ram Kim | 2 March 2010 | # 40KUCG |
Results and Discussions
Dam-break on a Wet Bed
Figure 4
• The free surface shape is the main focus of this simulation§ At the initial time
• A mushroom shape in free surface
§ Two breaking waves enclosing voids will be generated
0.0sec
0.19sec
0.34sec
0.72sec
Korea UniversityComputer Graphics Lab. Po-Ram Kim | 2 March 2010 | # 41KUCG |
Results and Discussions
Dam-break Flow on Complicated Topography
• Digital elevation model (DEM) data is used § To generate the terrain surface§ Then a distance field is generated to enforce the solid
boundary condition• Initial velocity of water body is 3m/sec• The initial spacing of particles is 0.04m • Total # of particle is 330k particles• The time step is 0.001 second• When water interacts with the terrain surface
§ Violent breakage and fragmentation occur § Wave propagation and reflection are well produced
Korea UniversityComputer Graphics Lab. Po-Ram Kim | 2 March 2010 | # 42KUCG |
Results and Discussions
Dam-break Flow on Complicated Topography
2.9sec 4.75sec 7.9sec
1.25sec0.5sec0.0sec
Korea UniversityComputer Graphics Lab. Po-Ram Kim | 2 March 2010 | # 43KUCG |
Results and Discussions
CASA 2009
• A simulation of dambreak with an obstacle in “CASA 2009” shape is carried out
• When the water flows over the obstacle, violent breaking is produced
• When the flow settles down§ The shape of the terrain obstacle becomes visible
• The initial spacing of particles is 0.005m • The time step is 0.0005 second• Total # of particle is 310k particles
Korea UniversityComputer Graphics Lab. Po-Ram Kim | 2 March 2010 | # 44KUCG |
Results and Discussions
CASA 2009
Figure 6
0.14sec
1.14sec
0.34sec
4.64sec
Korea UniversityComputer Graphics Lab. Po-Ram Kim | 2 March 2010 | # 45KUCG |
Conclusions and Future Work
• In the paper,§ A pressure correction equation is proposed for free
surface flow§ The pressure disturbance incurred by the EOS is
reduced § No solution of pressure Poisson equation is required§ More accurate and efficient simulation is achieved§ The improved SPH method has been used in free
surface and surface tension problem simulation
Korea UniversityComputer Graphics Lab. Po-Ram Kim | 2 March 2010 | # 46KUCG |
Conclusions and Future Work
• Our ongoing work § Investigation of numerical properties of the pressure
correction scheme § Its applications to more fluid phenomena, such as
multi-phase flow