Improvement of the second order approximation of the smoothed particle hydrodynamics

4
J. Shanghai Jiaotong Univ. (Sci.), 2008, 13(4): 404–407 DOI: 10.1007/s12204-008-0404-1 Improvement of the Second Order Approximation of the Smoothed Particle Hydrodynamics CHEN Si (), ZHOU Dai (), DONG Shi-lin (), LI Hua-feng (), YANG Guang () (School of Naval Architecture, Ocean and Civil Engineering, Shanghai Jiaotong University, Shanghai 200240, China) Abstract: The smoothed particle hydrodynamics (SPH), as a fully Lagrangian particle method, has been suc- cessfully applied to astrophysical problems and extended to elastic dynamics and computational fluid dynamics. High order derivatives have to be approximated when elastic dynamics problems are modeled. However, the approximation errors in SPH could lead to computational failure in the case that the order of derivative is high. A novel method was proposed in order to improve the accuracy of SPH method, which shows the relationship between the selected functions and their SPH approximations. The entire involved system was represented by a finite number of particles that carry individual mass and occupy individual space, and the integral interpo- lation was approximated by a summation interpolation. In addition, error comparison was made between SPH method with and without the present improvement. Key words: smoothed particle hydrodynamics (SPH); second order derivatives; approximation; error analysis CLC number: TU 393.3 Document code: A Introduction The key idea of SPH is that the fluid (or solid) can be divided into arbitrarily distributed particles. So this method can achieve numerical solutions with- out any computational grids. SPH was introduced by Lucy, et al [1,2] , whose aim was to simulate astrophys- ical phenomena that involved large density contrasts and complicated non-symmetric geometry. SPH was also introduced into the area of computational fluid dynamics [3-5] and solid mechanics [6] . So far, SPH has been extended to free surface flows [7] , heat transfer [8] , explosion phenomena [9] and other applications. With introduction of the SPH including the particle approxi- mation, the paper is focused on the improvement of the second order approximation of some functions involved in the key computation. 1 Preliminary Knowledge In the standard SPH method, each function is rep- resented by its integral interpolation, which is defined by f (r) f (r )W (r r ,h)dr , (1) Received date: 2007-07-12 Foundation item: the Key Project of Fund of Science and Technology Development of Shanghai (No. 07JC14023); the National Natural Science Foundation of China (No. 50778111) E-mail: [email protected] where in one-, two- and three-dimensional spaces, r and r are scalars, two-dimensional vectors or three- dimensional vectors, respectively. W is the so-called smoothing kernel function, h is the smoothing length defining the influence area of the smoothing function W . The symbol · was introduced to denote the con- volution. In Eq. (1), the integration is over the entire space and W is an interpolating kernel which is usually chosen to be an even function [10,11] . Based on the particle approximation, the entire sys- tem is represented by a finite number of particles that carry individual mass and occupy individual space. The integral interpolation is approximated by a summation interpolate [10] f s (r)= n j=1 m j f (r j ) ρ j W (r r j ,h), where the summation index j denotes a particle label, and the summation is over all the particles. If W (r r ,h)| S =0 W (r r ,h)| S =0 , the second derivative of f (r) is f (r) = f (r )W (r r,h)dr . One of SPH’s main weaknesses, however, is its in- stability on processing the high-order derivatives [1214] .

Transcript of Improvement of the second order approximation of the smoothed particle hydrodynamics

J. Shanghai Jiaotong Univ. (Sci.), 2008, 13(4): 404–407

DOI: 10.1007/s12204-008-0404-1

Improvement of the Second Order Approximation of the Smoothed

Particle Hydrodynamics

CHEN Si (陈 思), ZHOU Dai (周 岱), DONG Shi-lin (董石麟),LI Hua-feng (李华峰), YANG Guang (阳 光)

(School of Naval Architecture, Ocean and Civil Engineering, Shanghai Jiaotong University,Shanghai 200240, China)

Abstract: The smoothed particle hydrodynamics (SPH), as a fully Lagrangian particle method, has been suc-cessfully applied to astrophysical problems and extended to elastic dynamics and computational fluid dynamics.High order derivatives have to be approximated when elastic dynamics problems are modeled. However, theapproximation errors in SPH could lead to computational failure in the case that the order of derivative is high.A novel method was proposed in order to improve the accuracy of SPH method, which shows the relationshipbetween the selected functions and their SPH approximations. The entire involved system was represented bya finite number of particles that carry individual mass and occupy individual space, and the integral interpo-lation was approximated by a summation interpolation. In addition, error comparison was made between SPHmethod with and without the present improvement.Key words: smoothed particle hydrodynamics (SPH); second order derivatives; approximation; error analysisCLC number: TU 393.3 Document code: A

Introduction

The key idea of SPH is that the fluid (or solid)can be divided into arbitrarily distributed particles.So this method can achieve numerical solutions with-out any computational grids. SPH was introduced byLucy, et al[1,2], whose aim was to simulate astrophys-ical phenomena that involved large density contrastsand complicated non-symmetric geometry. SPH wasalso introduced into the area of computational fluiddynamics[3-5] and solid mechanics[6]. So far, SPH hasbeen extended to free surface flows[7], heat transfer[8],explosion phenomena[9] and other applications. Withintroduction of the SPH including the particle approxi-mation, the paper is focused on the improvement of thesecond order approximation of some functions involvedin the key computation.

1 Preliminary Knowledge

In the standard SPH method, each function is rep-resented by its integral interpolation, which is definedby

〈f(r)〉 ≡∫

f(r′)W (r − r′, h)dr′, (1)

Received date: 2007-07-12Foundation item: the Key Project of Fund of Science and

Technology Development of Shanghai (No. 07JC14023);the National Natural Science Foundation of China(No. 50778111)

∗E-mail: [email protected]

where in one-, two- and three-dimensional spaces, rand r′ are scalars, two-dimensional vectors or three-dimensional vectors, respectively. W is the so-calledsmoothing kernel function, h is the smoothing lengthdefining the influence area of the smoothing functionW . The symbol 〈·〉 was introduced to denote the con-volution. In Eq. (1), the integration is over the entirespace and W is an interpolating kernel which is usuallychosen to be an even function[10,11].

Based on the particle approximation, the entire sys-tem is represented by a finite number of particles thatcarry individual mass and occupy individual space. Theintegral interpolation is approximated by a summationinterpolate[10]

fs(r) =n∑

j=1

mjf(rj)

ρjW (r − rj , h),

where the summation index j denotes a particle label,and the summation is over all the particles.

If {W (r − r′, h)|S = 0W ′(r − r′, h)|S = 0

,

the second derivative of 〈f(r)〉 is

〈f ′′(r)〉 =∫

f(r′)W ′′(r′ − r, h)dr′.

One of SPH’s main weaknesses, however, is its in-stability on processing the high-order derivatives[12−14].

J. Shanghai Jiaotong Univ. (Sci.), 2008, 13(4): 404–407 405

To overcome this weakness, Brookshaw suggestedthat[12](

d2f

dx2

)i

= 2N∑

j=1

m

ρj

(fi − fj)xij

∂Wij

∂xi+ o(h2), (2)

and Watkins suggested that[14]

(∇×∇× f)i =∑

j

mj

ρj[(∇× f)i − (∇× f)j ] ×∇iWij ,

(3)

where

f = if1 + if2 + kf3.

The authors have previously studied the amendmentof the SPH approximation. However, although thisamendment is effective to the first derivatives of SPHapproximation, it is often fail to amend the secondderivatives.

Based on Eqs. (2) and (3) and the method given inRef. [15], a novel method is issued to amend the secondderivatives of SPH approximation.

2 Enhancement of the SPHApproximation

Lemma 1 Let f(r) ∈ span(1, r, r2, r3) and let par-ticles in the support domain of W (r − ri, h) disposesymmetrically to ri. And let W (r, h) ∈ C2(r), and{

W (r − ri, h)|S = 0W ′(r − ri, h)|S = 0

,

where S stands for the boundary of integral area. Thenwe have

n∑j=1

mj

ρjfj

∂Wij

∂xi∂yj= C(h) · ∂2fi

∂x∂y, (4)

where the constant C(h) is only relevant to h and thekind of kernel W (r, h).

Proof Let

fi := f(xi, yi), fj := f(xj , yj), xji := xj − xi,

To simplify the discussion, we work in two dimen-sions. If

f(r) ∈ span(1, r, r2, r3),

for any point (xi, yi), we have

fj = fi + xji∂fi

∂x+ yji

∂fi

∂y+

12!

x2ji

∂2fi

∂x2

+ xjiyji∂2fi

∂x∂y+

12!

y2ji

∂2fi

∂y2

+13!

x3ji

∂3f(xi, yi)∂x3

+12x2

jiyji∂3f(xi, yi)

∂x2∂y

+12xjiy

2ji

∂3f(xi, yi)∂x∂y2

+13!

y3ji

∂3fi

∂y3· · · .

Noticing particles in the support domain of W (r−ri, h)dispose symmetrically to ri and W (r, h) is an evenfunction, we get

n∑j=1

mj

ρj

∂Wij

∂xi∂yixα

jiyβji = 0,

where α or β is an even. Then we can obtain

n∑j=1

mj

ρj

∂Wij

∂xi∂yi=

∂2fi

∂x∂y

n∑j=1

mj

ρjxjiyji

∂Wij

∂xi∂yi,

i.e.,

n∑j=1

mj

ρjfj

∂Wij

∂xi∂yi= C(h) · ∂2fi

∂x∂y,

where

C(h) =n∑

j=1

mj

ρjxjiyji

∂Wij

∂xi∂yi.

Noticing Eq. (2) and following the same course, anotherlemma is gotten:

Lemma 2 The condition is the same as the Lemma1, and we have

2n∑

j=1

mj

ρj

fi − fj

xij

∂W

∂xi= C2(h) · ∇2fi(r), (5)

where the constant C2(h) is only relevant to h and thekind of kernel W (r, h).

To get Eqs. (4) and (5), we assume that particles inthe support domain of W (r − ri, h) dispose symmet-rically to ri, which can be ensured by moving leastsquares method (MLS). By our computations, however,this condition can be omitted, if we rewrite Eqs. (4) and(5) as

n∑j=1

mj

ρjfj

∂Wij

∂xi∂yi= C′(h, xi, yj) · ∂2fi

∂x∂y,

2∑

j

fj − fi

xji

∂Wij

∂x

mj

ρj

= C′2(h, xi, yi)

(∂2fi

∂x2+

∂2fi

∂y2

)+ o(∇2f),

where the constants C′2(h, xi, yj) and C′(h, xi, yi) are

relevant not only to h and the kind of kernel W (r, h),but also to the point (xi, yi):

C′(h, xi, yi) =n∑

j=1

mj

ρjxjiyji

∂Wij

∂xi∂yi,

C′2(h, xi, yi) =

12

∑j

(x2j + y2

j ) − (x2i + y2

i )xji

∂Wij

∂x

mj

ρj.

406 J. Shanghai Jiaotong Univ. (Sci.), 2008, 13(4): 404–407

3 Computation and Conclusion

Let set X and Y be two tables of number generatedrandomly by computer, set Ω be the direct product ofX and Y

Ω := X × Y = {(x, y)|x ∈ X, y ∈ Y }.

With each point in set Ω, there is associated a realnumber ci:

ci = f(xi, yi) = exi+yi .

The kernel W is

W (R, h) =7

478π

×

⎧⎪⎪⎪⎪⎨⎪⎪⎪⎪⎩

(3−R)5−6(2−R)5+15(1−R)5, 0 � R < 1

(3 − R)5 − 6(2 − R)5, 1 � R < 2

(3 − R)5, 2 � R < 3

0, R � 3

,

where

R =

√(x − x0)2 + (y − y0)2

h.

The error comparisons to calculate fxx between thepresent method and the traditional SPH are given inFigs. 1 and 2, while the error comparisons to calcu-late fxy are given in Figs. 3 and 4. The error of SPHapproximation could lead computational failure in thecase that the derivative order is high, for example, whenwe calculate ∂2f

∂x2 or ∂2f∂y2 . The present method can im-

prove the accuracy of SPH approximation of ∂2f∂x2 or ∂2f

∂y2 .However, it should be pointed out that, for the calcula-tion of ∂2f

∂x∂y , the classical SPH method and the presentmethod almost result in the same accuracy of the SPHapproximation.

Fig. 1 Calculation error of fxx by the present method

Fig. 2 Calculation error of fxx by the traditional method

Fig. 3 Calculation error of fxy by the present method

Fig. 4 Calculation error of fxy by the traditional method

References

[1] Lucy L B. A numerical approach to the testing ofthe fission hypothesis [J]. Astronomical Journal, 1977,82(12): 1013–1024.

[2] Gingold R A, Monaghan J J. Smoothed particle hy-drodynamics: theory and application to non-sphericalstars [J]. Monthly Notices of the Royal AstronomicalSociety, 1977, 181(2): 375–389.

[3] Sod G A. A survey of several finite difference methodsfor systems of hyperbolic conservation laws [J]. Journalof Computational Physics, 1978, 27(1): 1–31.

[4] Liu M B, Liu G R. Investigations into water miti-gations using a meshless particle method [J]. ShockWaves, 2002, 12(3): 181–195.

[5] Monaghan J J. Implicit SPH drag and dusty gas dy-namics [J]. J Comput Phys, 1997, 138(2): 801–820.

[6] Campbell J, Vignjevic R, Libersky L. A contact algo-rithm for smoothed particle hydrodynamics [J]. Com-put Methods Appl Mech Eng, 2000, 184(1): 49–65.

J. Shanghai Jiaotong Univ. (Sci.), 2008, 13(4): 404–407 407

[7] Monaghan J J, Kos A. Solitary waves on a cretan beach[J]. Journal Of Waterway Port Coastal and OceanEngineering-ASCE, 1999, 125(3): 145–154.

[8] Cleary P W. Modeling confined multi-material heatand mass flows using SPH [J]. Applied MathematicalModelling, 1998, 22(12): 981–993.

[9] Liu M B, Liu G R. Computer simulation of the highexplosive explosion using smoothed particle hydrody-namics methodology [J]. Comput Fluids, 2003, 32(3):305–322.

[10] Liu G R, Liu M B. Smoothed particle hydrodynamics:a mesh-free particle method [M]. New York: WorldScientific, 2003.

[11] Monaghan J J. Smoothed particle hydrodynamics [J].Numerical Astrophysics, 1999, 240: 357–366.

[12] Brookshaw L. A method of calculating radiative heatdiffusion in particle simulations [C]//Proceedings As-tronomical Society Of Australia. 1985, 6(2): 207–210.

[13] Flebbe O, Münzel S, Herold H, et al. Smoothed particlehydrodynamics: physical viscosity and the simulation[J]. Astrophysical Journal, 1994, 431(2): 754–760.

[14] Watkins S J, Bhattal A S. A new prescription for vis-cosity in smoothed particle hydrodynamics [J]. Astron-omy & Astrophysics Supplement Series, 1996, 119(1):177–187.

[15] Chen Si, Zhou Dai, BAO Yan, et al. A method toimprove first order approximation of smoothed parti-cle Hydrodynamics [J]. Journal of Shanghai JiaotongUniversity (Science), 2008, 13(2): 136–138.