Smoothed Particle Hydrodynamics · 2014. 4. 16. · Smoothed Particle Hydrodynamics S.P. Korzilius...
Transcript of Smoothed Particle Hydrodynamics · 2014. 4. 16. · Smoothed Particle Hydrodynamics S.P. Korzilius...
Where innovation starts
Smoothed ParticleHydrodynamicsS.P. Korzilius
Promotor:W.H.A. Schilders
Supervisor:M.J.H. Anthonissen
April 9th 2014, Eindhoven
2/20
/ department of mathematics and computer science
Outline
• SPH
• Particle clustering
• Remedies
• Results
• Future work
3/20
/ department of mathematics and computer science
SPH
4/20
/ department of mathematics and computer science
Basic idea of SPH
Observe that:
f(x) =
∫Ω
f(y)δ(x− y) dy.
Replacing δ by a smooth function W gives:
f(x) ≈∫
Ω
f(y)Wh(x− y) dy.
Representing the domain Ω by a set of particlesleads to the discrete approximation:
〈fi〉 :=∑j∈Si
fjWh(xi − xj)Vj
where Si represents the setof particles in the supportdomain of particle i.
The kernel function should:
• have the delta function property
• satisfy the unity condition
• have compact support
• be radially symmetric
5/20
/ department of mathematics and computer science
Derivatives in SPH
From the kernel approximation we can derive that:
f(x) ≈∫
Ω
f(y)Wh(x− y) dy =⇒ f′(x) ≈
∫Ω
f′(y)Wh(x− y) dy.
Partial integration then gives:
f′(x) ≈ f(y)Wh(x− y)
∣∣∣∣∂Ω
+
∫Ω
f(y)W′h(x− y) dy
.=
∫Ω
f(y)W′h(x− y) dy,
where the derivative is with respect to x. Representing the domain by a set ofparticles gives:
⟨f′i
⟩=∑j∈Si
fjW′h(xi − xj)Vj
In practice, the following expression is often used:
⟨f′i
⟩=∑j∈Si
(fj − fi)W ′h(xi − xj)Vj
6/20
/ department of mathematics and computer science
Application to fluid flow
SPH is usually applied to the compressible N-S equations. With the volumeof a particle defined as Vj =
mjρj
, we have
• Conservation of mass:Dρ
Dt= −ρ∇ · v −→
⟨Dρi
Dt
⟩= ρi
∑j∈Si
mj
ρj(vi − vj) · ∇Wh(xi − xj)
−→ 〈ρi〉 =∑j∈Si
mjWh(xi − xj).
• Equation of state:
∆p =ρ0c
20
γ
[(ρ
ρ0
)γ− 1
]−→ 〈∆pi〉 =
ρ0c20
γ
[(ρi
ρ0
)γ− 1
].
• Conservation of momentum:
ρDv
Dt= −∇p+∇ ·T + ρg −→
⟨Dvi
Dt
⟩=∑j∈Si
mj (Pij + Πij)∇Wij + g.
7/20
/ department of mathematics and computer science
Particle clustering
8/20
/ department of mathematics and computer science
Particle clustering (1)
Problem:• For small particle distances
the kernel derivative vanishes.• Via the momentum equation this
leads to a diminishing repulsiveforces between approachingparticles:
|〈Fij〉| = |mimjPij∇Wij | .
Price (2012)
9/20
/ department of mathematics and computer science
Particle clustering (2)
• Accuracy error associated withparticle clustering is small.
• Waist of computational effort.
• Leads to questionable results.
Different kernel functions have been used:
W∗(R) = α
(√2−√R),
W∗∗
(R) = α
(1
4R
2 − R + 1
).
∗Schüssler and Schmitt (1981), ∗∗ Johnson and Beissel (1996).
These gave unsatisfactory results.
Remedies:• Better performing kernel with
nonzero derivative at origin.• Particle collisions.
10/20
/ department of mathematics and computer science
Remedies
11/20
/ department of mathematics and computer science
Convex kernel (1)
We look for a kernel Wnew that has nonzeroderivative at the origin and still satisfies(most of) the kernel requirements.
We use the following algorithm:
• Start with regular-shaped kernel function:
Worg(R) = αorg(2− |R|)3
(3
2|R|+ 1
)for 0 ≤ |R| ≤ 2,
where R := x−yh .
• Define
W′new(R) =
+Worg(R) forR < 0,
−Worg(R) forR > 0.
• Integrate W ′new(R) to find Wnew(R).
• Normalise Wnew(R) to satisfy unity condition.
12/20
/ department of mathematics and computer science
Convex kernel (2)
For the given kernel the algorithm leads to the following convex kernel:
Wnew(R) = αnew(2− |R|)4
(3
4|R|+ 1
)for 0 ≤ |R| ≤ 2.
Consequences:• Different weight distribution: more weight is “lost”, which has
a negative effect on the accuracy.• Better particle distribution has a positive effect on accuracy.
13/20
/ department of mathematics and computer science
Particle collisions (1)
We can use “real” collisions to keep particles apart. In a fully elastic collisionmomentum and energy are conserved:
miui +mjuj = mivi +mjvj
12mi|ui|
2 + 12mj |uj |
2 = 12mi|vi|
2 + 12mj |vj |
2
=⇒ v
elastici =
(mi −mj)ui + 2mjuj
mi +mj.
In a fully inelastic collision only momentum is conserved, but we now thevelocities are equal afterwards:
miui +mjuj = mivi +mjvj
vi = vj
=⇒ v
inelastici =
miui +mjuj
mi +mj.
where u is the velocity before and v the velocity after the collision.
Combining both gives
vi = Ecvelastici + (1− Ec)v
inelastici =⇒ vi = ui −
mj
mi +mj(1 + Ec)(ui − uj).
with elasticity parameter 0 ≤ Ec ≤ 1.
14/20
/ department of mathematics and computer science
Particle collisions (2)
Use this one-collision expression in the following way:
1. Consider only velocity in inter-particle direction,2. Apply to all particles closer than δc to each other.
This gives: δc
vi = ui −∑j∈Ci
mj
mi +mj(1 + Ec)
(uij · rij)rijd2ij
. support domain
Order of computations:Compute new densitiesCompute new pressuresCompute new accelerationsCompute new velocities
← Apply collisions; update velocitiesCompute new positions
15/20
/ department of mathematics and computer science
Results
16/20
/ department of mathematics and computer science
Rotating shaft
Flow of air (ρ = 1) around a shaft with speed 1000 rpm:
Wendland kernel Particle collisions Convex kernel
17/20
/ department of mathematics and computer science
Hydrostatic pressure
Errors in numerical pressure gradients, compared to−ρg,for a column of water (ρ = 1000) with initial zero-pressure:
Method h = 1.5d h = 2.0dWendland kernel 1.32 % -Particle collisions 1.32 % -Convex kernel 2.76 % 1.20 %
(Smoothing length can be increased for convexkernel without leading to particle clustering.)
18/20
/ department of mathematics and computer science
Future work
19/20
/ department of mathematics and computer science
Future work
• Write paper on “convex kernel” and “particle collisions” andpresent them at SPHERIC 2014.
• Write paper on two-dimensional Laplacian estimate,
(Presented one-dimensional estimate at SPHERIC 2013.)
• Work on the problem of “tensile instability”.
Tensile instability occurs if an equation of state allows for negativepressures; the net force between particle pairs becomes attractive,causing a numerical instability.
20/20
/ department of mathematics and computer science
Questions?