Graphics Reference
In-Depth Information
X
s j
r j rW h r r j
rsðrÞ¼
m j
j
(8.43)
X
s j
r j r
2
2
r
sðrÞ¼
m j
W h r r j
j
X
X
r s ðrÞ¼
rðrÞ¼
m j W h r r j
m j W h r r j
(8.44)
j
j
The use of particles guarantees that mass is conserved as long as the mass of a particle does not change
and as long as particles are not created or destroyed. Updating the fluid according to CFD principles is
effected by migration of particles through space due to the forces modeled by the CFD equations. First,
the density at a location is computed using Equation 8.43 .
Then the pressure is computed using the ideal gas state equation p¼k ( rr 0 ), where r 0 is
the rest density for water and k is a constant in the range of 100 to 1000. Forces derived directly by
SPH are not guaranteed to be symmetric, so symmetric versions of the force equations are then
computed ( Eq. 8.45 ) :
X
M j p i þ p j
2
f pressure ðr i Þ¼
rWðr i r j;
r j
j
f gravity ðr i Þ¼r i g
f viscosity ðr i Þ¼m
(8.45)
X
m j v j v i
r j
2
r
Wðr i r j;
j
Quantities in the particle field can be computed at any given location by the use of a radial, symmetric,
smoothing kernel. Smoothing kernels with a finite area of support are typically used for computational
efficiency. Smoothing kernels should integrate to 1, which is referred to as normalized . Different smooth-
ing kernels can be used when computing various values as long as the smoothing kernel has the basic
properties of being normalized and symmetric. As examples, the kernels used in the work being followed
here are a general purpose kernel (Eq. 8.46 ) , a kernel for pressure to avoid a zero gradient at the center
(Eq. 8.47 ), and a kernel for the viscosity (Eq. 8.48 ) and its corresponding Laplacian (Eq. 8.49 ). In this
work, a Leap Frog integrator is used to compute the accelerations from the forces.
315
64 ph
2
2
0
r hb
otherwise
ðh
r
Þ
W poly 6 ðr; hÞ¼
(8.46)
9
0
15
ph
3
0
r h
otherwise
ðh rÞ
W spiky ðr; hÞ¼
(8.47)
6
0
8
<
3
2 h
2
r
r
2 r
15
2 ph
3 þ
2 þ
1
W viscosity ðr; hÞ¼
h
(8.48)
0
r h
otherwise
3
:
0
45
ph
2
r
W viscosity ðr; hÞ¼
6 ðh rÞ
(8.49)
 
Search WWH ::




Custom Search