adaptive particle refinement (apr) applied to sph method :...
TRANSCRIPT
Adaptive Particle Re�nement (APR) applied to SPHmethod : Stability, accuracy and CPU analysis
Laurent Chiron
LHEEA Lab - Ecole Centrale Nantes
1er juillet 2015
Laurent Chiron Adaptive Particle Re�nement (APR) applied to SPH method : Stability, accuracy and CPU analysis1er juillet 2015 1 / 25
Plan
1 SPH background
2 Particle Re�nement theory
3 Particle re�nement improvementsArbitrary Lagrangian Eulerian (ALE) processThe APR conceptParallelization
4 Some resultsKleefsman dambreak
Laurent Chiron Adaptive Particle Re�nement (APR) applied to SPH method : Stability, accuracy and CPU analysis1er juillet 2015 2 / 25
Plan
1 SPH background
2 Particle Re�nement theory
3 Particle re�nement improvementsArbitrary Lagrangian Eulerian (ALE) processThe APR conceptParallelization
4 Some resultsKleefsman dambreak
Laurent Chiron Adaptive Particle Re�nement (APR) applied to SPH method : Stability, accuracy and CPU analysis1er juillet 2015 3 / 25
Sph-�ow scopes
Laurent Chiron Adaptive Particle Re�nement (APR) applied to SPH method : Stability, accuracy and CPU analysis1er juillet 2015 4 / 25
SPH background
Conservation law
∂tU + ∂xf(U) = 0∂xf(U)→
Finite di�erencesFinite volumesDiscontinuous GalerkinSPH
• How to calculate the term ∂xf(U) in SPH ?
Convolution product properties
f ∗ δ =∫R f(y)δ(x− y)dy = f ∇f ∗ g = f ∗ ∇g
δ is approached by a kernel function W
∇fi ≈ ∇f ∗W = f ∗ ∇W =∑jwjfj∇Wij
Laurent Chiron Adaptive Particle Re�nement (APR) applied to SPH method : Stability, accuracy and CPU analysis1er juillet 2015 5 / 25
SPH background
Conservation law
∂tU + ∂xf(U) = 0∂xf(U)→
Finite di�erencesFinite volumesDiscontinuous GalerkinSPH
• How to calculate the term ∂xf(U) in SPH ?
Convolution product properties
f ∗ δ =∫R f(y)δ(x− y)dy = f ∇f ∗ g = f ∗ ∇g
δ is approached by a kernel function W
∇fi ≈ ∇f ∗W = f ∗ ∇W =∑jwjfj∇Wij
Laurent Chiron Adaptive Particle Re�nement (APR) applied to SPH method : Stability, accuracy and CPU analysis1er juillet 2015 5 / 25
SPH background
Conservation law
∂tU + ∂xf(U) = 0∂xf(U)→
Finite di�erencesFinite volumesDiscontinuous GalerkinSPH
• How to calculate the term ∂xf(U) in SPH ?
Convolution product properties
f ∗ δ =∫R f(y)δ(x− y)dy = f ∇f ∗ g = f ∗ ∇g
δ is approached by a kernel function W
∇fi ≈ ∇f ∗W = f ∗ ∇W =∑jwjfj∇Wij
Laurent Chiron Adaptive Particle Re�nement (APR) applied to SPH method : Stability, accuracy and CPU analysis1er juillet 2015 5 / 25
SPH background
Bene�ts
• Meshless (particles)
• Lagrangian method
Weacknesses
• Low spatial order
• No convergence theorem
"Convergence" conditions
• h∆x →∞ and h→ 0
Laurent Chiron Adaptive Particle Re�nement (APR) applied to SPH method : Stability, accuracy and CPU analysis1er juillet 2015 6 / 25
Plan
1 SPH background
2 Particle Re�nement theory
3 Particle re�nement improvementsArbitrary Lagrangian Eulerian (ALE) processThe APR conceptParallelization
4 Some resultsKleefsman dambreak
Laurent Chiron Adaptive Particle Re�nement (APR) applied to SPH method : Stability, accuracy and CPU analysis1er juillet 2015 7 / 25
Particle re�nement theory
Some parameters
• Spacing parameter ε ∈ [0, 1]
• Radius ratio α ∈]0, 1]
• Switch parameter γ ∈ [0, 1]
• •
•••
•
• • •
Rm
∆xm
Re�nement
Process
• •
•••
•
• • •••••
••••
••••
••••
••••
••••
••••
••••
••••
ε∆xm
Rm
αRm
Laurent Chiron Adaptive Particle Re�nement (APR) applied to SPH method : Stability, accuracy and CPU analysis1er juillet 2015 8 / 25
Particle re�nement theory
Switch parameter properties
• γ = 1→ particle is turned on (active particle)
• γ = 0→ particle is turned o� (passive particle)
0
1
γ
Bu�er zone Bu�er zone
γm γf
Re�ned area
Modi�ed SPH operator
• 〈∇f〉i =∑jfjωj∇Wijγj
Laurent Chiron Adaptive Particle Re�nement (APR) applied to SPH method : Stability, accuracy and CPU analysis1er juillet 2015 9 / 25
Plan
1 SPH background
2 Particle Re�nement theory
3 Particle re�nement improvementsArbitrary Lagrangian Eulerian (ALE) processThe APR conceptParallelization
4 Some resultsKleefsman dambreak
Laurent Chiron Adaptive Particle Re�nement (APR) applied to SPH method : Stability, accuracy and CPU analysis1er juillet 2015 10 / 25
Plan
1 SPH background
2 Particle Re�nement theory
3 Particle re�nement improvementsArbitrary Lagrangian Eulerian (ALE) processThe APR conceptParallelization
4 Some resultsKleefsman dambreak
Laurent Chiron Adaptive Particle Re�nement (APR) applied to SPH method : Stability, accuracy and CPU analysis1er juillet 2015 11 / 25
Arbitrary Lagrangian Eulerian (ALE) process
d~xidt
= ~v0i, (1)
dωi
dt= ωi
∑j
ωj(~v0j − ~v0i)∇Wij , (2)
dωiρidt
= −ωi
∑j
ωj2ρE(~vE − ~v0(~xij))∇Wij , (3)
dωiρi~vidt
= −ωi
∑j
ωj2(ρE~vE ⊗ (~vE − ~v0(~xij)) + PE
¯̄I)∇Wij + ωiρi~g, (4)
3 possibilities : ~v0i =
~vi (Lagrangian)0 (Eulerian)
~vi + ~δvi (ALE)
Laurent Chiron Adaptive Particle Re�nement (APR) applied to SPH method : Stability, accuracy and CPU analysis1er juillet 2015 12 / 25
ALE process : bene�ts on a dambreak test case
Laurent Chiron Adaptive Particle Re�nement (APR) applied to SPH method : Stability, accuracy and CPU analysis1er juillet 2015 13 / 25
Why using such an approach ?
Pressure instabilities at the �ne/coarse interface
• Particles move in a Lagrangian way (Streamlines)
Laurent Chiron Adaptive Particle Re�nement (APR) applied to SPH method : Stability, accuracy and CPU analysis1er juillet 2015 14 / 25
Plan
1 SPH background
2 Particle Re�nement theory
3 Particle re�nement improvementsArbitrary Lagrangian Eulerian (ALE) processThe APR conceptParallelization
4 Some resultsKleefsman dambreak
Laurent Chiron Adaptive Particle Re�nement (APR) applied to SPH method : Stability, accuracy and CPU analysis1er juillet 2015 15 / 25
The APR concept
Prolongation
φd = φm + RDh(φ)m.(xd − xm)
•••
•
•
•
Quantity Before re�nement After re�nement
Mass mm
D∑j
mj
Kinetic energy 12mm~um. ~um
12
D∑j
mj ~uj . ~uj
Linear momentum mm ~um
D∑j
mj ~uj
Angular momentum ~xm ×mm ~um
D∑j
~xj ×mj ~uj
Laurent Chiron Adaptive Particle Re�nement (APR) applied to SPH method : Stability, accuracy and CPU analysis1er juillet 2015 16 / 25
The APR concept
Prolongation
φd = φm + RDh(φ)m.(xd − xm)
Without prolongation With prolongation
Laurent Chiron Adaptive Particle Re�nement (APR) applied to SPH method : Stability, accuracy and CPU analysis1er juillet 2015 16 / 25
Plan
1 SPH background
2 Particle Re�nement theory
3 Particle re�nement improvementsArbitrary Lagrangian Eulerian (ALE) processThe APR conceptParallelization
4 Some resultsKleefsman dambreak
Laurent Chiron Adaptive Particle Re�nement (APR) applied to SPH method : Stability, accuracy and CPU analysis1er juillet 2015 17 / 25
The utility of well distributed tasks between processors
• Neighbors number • Particle radius
Poor distribution of particles between processors
• Particles inside/near the bu�er zone have 2 to 4 more neighbors thanother particles
Laurent Chiron Adaptive Particle Re�nement (APR) applied to SPH method : Stability, accuracy and CPU analysis1er juillet 2015 18 / 25
New algorithm e�ciency
Load balancing
τ = minλ(k)maxλ(k) where λ(k) is the number of interactions of processor k
• Former algorithm (cutting into anequal number of particles)
• New algorithm (cutting into anequal number of interactions)
At least of 30% CPU gain
On this test case, τ = 0.8 with the new algorithm (against τ = 0.54 before)
Laurent Chiron Adaptive Particle Re�nement (APR) applied to SPH method : Stability, accuracy and CPU analysis1er juillet 2015 19 / 25
Plan
1 SPH background
2 Particle Re�nement theory
3 Particle re�nement improvementsArbitrary Lagrangian Eulerian (ALE) processThe APR conceptParallelization
4 Some resultsKleefsman dambreak
Laurent Chiron Adaptive Particle Re�nement (APR) applied to SPH method : Stability, accuracy and CPU analysis1er juillet 2015 20 / 25
Plan
1 SPH background
2 Particle Re�nement theory
3 Particle re�nement improvementsArbitrary Lagrangian Eulerian (ALE) processThe APR conceptParallelization
4 Some resultsKleefsman dambreak
Laurent Chiron Adaptive Particle Re�nement (APR) applied to SPH method : Stability, accuracy and CPU analysis1er juillet 2015 21 / 25
Kleefsman dambreak : pressure �eld analysis
1.22m 1.17m
0.55m
0.45m
0.16m0.67m
0.68m 0.6m
Re�ned area
• Coarse • APR • FineLaurent Chiron Adaptive Particle Re�nement (APR) applied to SPH method : Stability, accuracy and CPU analysis1er juillet 2015 22 / 25
Kleefsman dambreak : pressure �eld analysis
1.22m 1.17m
0.55m
0.45m
0.16m0.67m
0.68m 0.6m
Re�ned area
• Coarse • APR • Fine
Laurent Chiron Adaptive Particle Re�nement (APR) applied to SPH method : Stability, accuracy and CPU analysis1er juillet 2015 22 / 25
Kleefsman dambreak : Comparison of pressure sensors
• Sensor P1 • Sensor P1 (Zoom)
Laurent Chiron Adaptive Particle Re�nement (APR) applied to SPH method : Stability, accuracy and CPU analysis1er juillet 2015 23 / 25
Kleefsman dambreak : Comparison of pressure sensors
• Sensor P3 • Kinetic Energy
Simulation performed CPU Time (seconds) Pro�t
Fine 21 000 -
APR 9000 57.2%
Laurent Chiron Adaptive Particle Re�nement (APR) applied to SPH method : Stability, accuracy and CPU analysis1er juillet 2015 23 / 25
Thank you for your attention !
Laurent Chiron Adaptive Particle Re�nement (APR) applied to SPH method : Stability, accuracy and CPU analysis1er juillet 2015 24 / 25
References
D.A. Barcarolo, G. Oger, and D. Le Touzé.Adaptive particle re�nement and dere�nement applied to Smoothed ParticleHydrodynamics method.Journal of computer physics, 273 :640�657, 2014.
J.Feldman and J.Bonet.Dynamic re�nement and boundary contact forces in SPH with applications in �uid �owproblems.Int. J. Numer. Meth. Eng, 72 :295�324, 2007.
S. Kitsionas and A. Whitworth.Development of SPH variable resolution using dynamic particle coalescing and splitting.Monthly Notices of the Royal Astronomical Society, 330 :129�136, 2002.
K.M.T. Kleefsman, G. Fekken, A.E.P. Veldman, B. Iwanowski, and B. Buchner.A volume-of-�uid based simulation method for wave impact problems.Journal of Computational Physics, 206 :363�393, 2005.
Y. R. Lopez, D. Roose, and C. R. Morfa.Dynamic particle re�nement in SPH : application to free surface �ow and non-cohesive soilsimulations.Comput Mech, 51 :731�741, 2013.
S. Marrone, A. Colagrossi, D. Le Touzé, and G. Graziani.Fast free-surface detection and level-set function de�nition in SPH solvers.Journal of Computational Physics, 229 :3652�3663, 2010.
G. Oger, S. Marrone, and D. Le Touzé.A consistent continuous particle reordering in weakly-compressible SPH through an ALEformalism.Proceedings of the 10th International SPHERIC workshop, 2015.
R. Vacondio, B. D. Rogers, P. K. Stansby, P. Mignosa, and J. Feldman.Development of SPH variable resolution using dynamic particle coalescing and splitting.Proceedings of the 7th International SPHERIC workshop, page 347�354, 2012.
R. Vacondio, B. D. Rogers, P. K. Stansby, P. Mignosa, and J. Feldman.Smoothed Particle Hydrodynamics with particle splitting, applied to self-gravitatingcollapse.Proceedings of the 7th International SPHERIC workshop, pages 347�354, 2012.
Laurent Chiron Adaptive Particle Re�nement (APR) applied to SPH method : Stability, accuracy and CPU analysis1er juillet 2015 25 / 25