16.08.2013 Views

An Improved Incompressible Smoothed Particle Hydrodynamics ...

An Improved Incompressible Smoothed Particle Hydrodynamics ...

An Improved Incompressible Smoothed Particle Hydrodynamics ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter A. The SPHysics Code<br />

Also the particle density can be calculated from Eq. 2.6, which is<br />

ρ = <br />

mjωij. (A.14)<br />

j<br />

For the accuracy consideration, both of the expression suffer from the trun-<br />

cated kernel error at the free surface. For the efficiency consideration, Eq.<br />

A.13 needs the first derivative of the kernel function, but Eq. 2.41 the kernel<br />

value, which means extra memory and computing cost will be put in because<br />

the momentum equation needs only the first derivative.<br />

Time marching<br />

In code SPHysics, several different time marching schemes, Predictor-Corrector<br />

(also known as the modified Euler method) [72], Verlet and Beeman [3], are<br />

used. The Predictor-Corrector and Verlet scheme are introduced here. Oth-<br />

ers can be found in [31].<br />

Predictor-Corrector<br />

In Predictor-Corrector time marching scheme [72], the variable fields are<br />

first predicted with the half step n + 1/2 based on time step n, and then<br />

corrected based on the previous predicted stage, n+1/2.<br />

Predicting stage:<br />

u n+1/2<br />

i<br />

ρ n+1/2<br />

i<br />

r n+1/2<br />

i<br />

= u n i<br />

+ ∆t<br />

2 Fn<br />

= ρ n i + ∆t<br />

2 Dn<br />

= r n i<br />

182<br />

+ ∆t<br />

2 un<br />

(A.15)<br />

(A.16)<br />

(A.17)

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!