66
Penn State University College of Earth and Mineral Science Department of Energy and Mineral Engineering Smooth Particle Hydrodynamics (SPH) Presented By Ahmed Nasreldeen Long Fan Keru Liu Group Presentation EGEE 520 Course Spring 2017

Smooth Particle Hydrodynamics (SPH) · It is a computational method used for simulating the dynamics of continuum media, such as solid mechanics and fluid flows. It has been used

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Smooth Particle Hydrodynamics (SPH) · It is a computational method used for simulating the dynamics of continuum media, such as solid mechanics and fluid flows. It has been used

Penn State University College of Earth and Mineral Science

Department of Energy and Mineral Engineering

Smooth Particle Hydrodynamics (SPH)

Presented By Ahmed Nasreldeen

Long Fan Keru Liu

Group Presentation EGEE 520 Course

Spring 2017

Page 2: Smooth Particle Hydrodynamics (SPH) · It is a computational method used for simulating the dynamics of continuum media, such as solid mechanics and fluid flows. It has been used

Ø  HistoricalPerspective

Ø  GeneralPrinciples.

Ø  GoverningEquations

Presentation Outlines

Ø  Hand-CalculationExample

Ø  NumericalExample

Ø  ExampleApplications

Ø  Introduction

Page 3: Smooth Particle Hydrodynamics (SPH) · It is a computational method used for simulating the dynamics of continuum media, such as solid mechanics and fluid flows. It has been used

Smoothed Particle Hydrodynamics (SPH)

FluiddynamicsThefluidisrepresentedbyaparticlesystem

Someparticlepropertiesaredeterminedbytakinganaverage

overneighboringparticles

The Smoothed Particle Hydrodynamics(SPH) method works by dividing the fluidintoasetofdiscreteelements, referred toas particles. These particles have a spatialdistance (known as the "smoothinglength", typically represented in equationsby h), over which their properties are"smoothed"byakernelfunction

It is a computational method used for simulating the dynamics of continuummedia,suchassolidmechanicsandfluidflows.Ithasbeenusedinmanyfieldsofresearch,including astrophysics, ballistics, volcanology, and oceanography. It is a mesh-freeLagrangianmethod(wherethecoordinatesmovewiththefluid)

Smoothed Particle Hydrodynamics

Page 4: Smooth Particle Hydrodynamics (SPH) · It is a computational method used for simulating the dynamics of continuum media, such as solid mechanics and fluid flows. It has been used

Basic Concepts of Computational Hydrodynamics

Grid Based Methods

Particle Based Methods

Ø  Eulerianapproach(FDM)

Ø  Lagrangianapproach(FEM)

Ø  Meshfreemethodscanusebothapproaches

Ø  SmoothedParticleHydrodynamics

Ø  DissipativeParticleDynamics

Ø  BrownianDynamics

Page 5: Smooth Particle Hydrodynamics (SPH) · It is a computational method used for simulating the dynamics of continuum media, such as solid mechanics and fluid flows. It has been used

Eulerian vs Lagrangian descriptions

Eulerian method Concernedwithfluidproperties

(velocity,density,pressure,temperature)ataspecificspace-

timepoint(x,y,z,t).

Controlvolumeapproach

NamedafterSwissmathematicianLeonhardEuler

(1707-1783).

Lagrangian method

Concernedwithaparticularparticleoffluidasitmovesthroughspacetoreflectthebehavioroftherestparticles.

Controlmassapproach

NamedafterItalianmathematicianJosephLagrange

(1736-1813).

Page 6: Smooth Particle Hydrodynamics (SPH) · It is a computational method used for simulating the dynamics of continuum media, such as solid mechanics and fluid flows. It has been used
Page 7: Smooth Particle Hydrodynamics (SPH) · It is a computational method used for simulating the dynamics of continuum media, such as solid mechanics and fluid flows. It has been used

Eulerian vs Lagrangian descriptions

LagrangianMethods Euler ianMethods

GridAttachingonthemoving

material Fixedinthespace

TrackMovementofanypointon

materials

Mass,momentum,andenergyfluxacrossgridnodesandmesh

cellboundary

TimeHistoryEasytoobtaintime-historydataatapointattachedon

materials

Difficulttoobtaintime-historydataatapointattachedon

materialsMovingBoundaryandInterference

Easytotrack Difficulttotrack

IrregularGeometry Easytomodel Difficulttomodelwithgood

accuracy

LargeDeformation Difficulttohandle Easytohandle

Page 8: Smooth Particle Hydrodynamics (SPH) · It is a computational method used for simulating the dynamics of continuum media, such as solid mechanics and fluid flows. It has been used

Meshfree and Meshfree Particle Methods

Ø  Thebasicideaofthemeshfreemethodsistodiscretizethecontinuumthroughaset of nodes without the connective mesh in order to follow the deformationexperienced by thematerial and avoid the degradation of the numerical resultmaintainingasuitablecomputationaleffort.

Ø  Whenthenodesassumesaphysicalmeaning,i.e.theyrepresentmaterialparticlescarrying physical properties, the method is said to be meshfree particle andfollows,ingeneral,aLagrangianapproach.

Ø  AccurateandstablenumericalsolutionsforintegralequationsorPDEswithallkindofboundaryconditions

Page 9: Smooth Particle Hydrodynamics (SPH) · It is a computational method used for simulating the dynamics of continuum media, such as solid mechanics and fluid flows. It has been used

Limitations of Grid Based Methods

Not Suitable for problems involving: Ø  Largedisplacements.

Ø  Largeinhomogeinities.

Ø  Movingmaterialinterface.

Ø  Deformableboundaries.

Ø  Freesurfaces.

Page 10: Smooth Particle Hydrodynamics (SPH) · It is a computational method used for simulating the dynamics of continuum media, such as solid mechanics and fluid flows. It has been used

(Lucy,1977),(Gingold&Monaghan,1977)

(Miyama,Hayashi&Narita,1984)

(Benz,Slattery&Cameron,1986)

(Springel,2005)

(Monaghan,2005)

(Monaghan,1992)

Historical Perspective

Simulatingastrophysicsproblems

Fragmentationincollapsingmolecularclouds

Collisionproblems

Appliedtosolidandfluidmechanics

Cosmologicalsimulations

Computergraphics

Page 11: Smooth Particle Hydrodynamics (SPH) · It is a computational method used for simulating the dynamics of continuum media, such as solid mechanics and fluid flows. It has been used

Advantages of SPH Method

Ø  Itcanobtainthetimehistoryofthematerialparticles.Theadvectionandtransportofthesystemcanthusbecalculated.

Ø  The free surfaces, material interfaces, and moving boundaries can all be tracednaturallyintheprocessofsimulationregardlessthecomplicityofthemovementofthe particles, which have been very challenging to many Eulerian methods.Therefore, SPH is an ideal choice for modeling free surface and interfacial flowproblems.

Ø  The distinct meshfree feature of the SPH method allows a straightforwardhandlingofvery largedeformations, sincetheconnectivitybetweenparticlesaregeneratedaspartofthecomputationandcanchangewithtime.

Ø  SPH is suitable for problems where the object under consideration is not acontinuum.Thisisespeciallytrueinbio-andnano-engineeringatmicroandnanoscale,andastrophysicsatastronomicscale

Page 12: Smooth Particle Hydrodynamics (SPH) · It is a computational method used for simulating the dynamics of continuum media, such as solid mechanics and fluid flows. It has been used

Ø  SPHiscomparativelyeasierinnumericalimplementation,anditismorenaturaltodevelopthree-dimensionalnumericalmodelsthangridbasedmethods.

Ø  Pureadvection istreatedexactly.Forexample, if theparticlesaregivenacolour,andthevelocityisspecified,thetransportofcolourbytheparticlesystemisexact

Ø  Withmorethanonematerial,eachdescribedbyitsownsetofparticles,interfaceproblemsareoftentrivialforSPHbutdifficultforfinitedifferenceschemes.

Ø  Particlemethodsbridge thegapbetween thecontinuumand fragmentation inanaturalway.

Ø  The resolution can be made to depend on position and time, which makes themethodveryattractiveformostastrophysicalandmanygeophysicalproblems.

Ø  SPH has the computational advantage, particularly in problems involvingfragments,dropsorstarsthatthecomputationisonlywherethematteris,withaconsequentreductioninstorageandcalculation.

Page 13: Smooth Particle Hydrodynamics (SPH) · It is a computational method used for simulating the dynamics of continuum media, such as solid mechanics and fluid flows. It has been used

Disadvantages of SPH Method

Ø  ThemaindisadvantageofSPHisitslimitedaccuracyinmulti-dimensionalflowsduetonoise.Thisnoiseseriouslymessesuptheaccuracythatcanbereachedwiththetechnique,especiallyforsubsonicflow,andalsoleadstoaslowconvergencerate.

Ø  ParticularlyproblematicinSPHarefluidinstabilitiesacrosscontactdiscontinuities,suchasKelvin-Helmholtzinstabilities.Theseareusuallyfoundtobesuppressedintheirgrowth.

Ø  Anothergenericproblem is that the artificial viscosity is operating at some levelalso outside of shocks, giving the numerical model a relatively high numericalviscosity,whichlimitstheReynoldsnumbersthatcanbeeasilyreachedwithSPH.

Page 14: Smooth Particle Hydrodynamics (SPH) · It is a computational method used for simulating the dynamics of continuum media, such as solid mechanics and fluid flows. It has been used

Industrial applications of SPH Method

Ø  Aerospaceindustries

Ø  Carindustries

Ø  Energyproductionindustries

Ø  Industrialprocessing

Ø Marineandcoastalengineering

Ø  Environmentalandgeophysicalproblems

Ø  Fluid-structureinteraction Ø Otherapplications

(Astrophysics,Bioengineering,Hydrodynamics)

Page 15: Smooth Particle Hydrodynamics (SPH) · It is a computational method used for simulating the dynamics of continuum media, such as solid mechanics and fluid flows. It has been used

15

The basic step of the method (domaindiscretization,fieldfunctionapproximationandnumericalsolution):Ø  Thecontinuum:

Asetofarbitrarilydistributedparticleswithnoconnectivity(meshfree);Ø  Fieldfunctionapproximation:Theintegralrepresentationmethod

Ø  Convertingintegralrepresentationintofinitesummation:Particleapproximation

Page 16: Smooth Particle Hydrodynamics (SPH) · It is a computational method used for simulating the dynamics of continuum media, such as solid mechanics and fluid flows. It has been used

16

Integral representation of a function:

ThecontinuumAsetofarbitrarilyparticles𝑓(𝑥)=∫Ω↑▒𝑓(𝑥 )𝑊(𝑥− 𝑥 ,ℎ)𝑑𝑥  

Page 17: Smooth Particle Hydrodynamics (SPH) · It is a computational method used for simulating the dynamics of continuum media, such as solid mechanics and fluid flows. It has been used

17

Integral representation of a function: Ø  Theinterpolationisbasedonthetheoryofintegralinterpolantsusingkernels

thatapproximateadeltafunction

Ø  Theintegralinterpolantofanyquantityfunction,A(r)

Ø  where:risanypointindomain(Ω),Wisasmoothingkernelwithhaswidth.

Ø  Thewidth,orcoreradius, isascalingfactorthatcontrolsthesmoothnessorroughnessofthekernel.

𝐴↓𝐼 (𝑟)=∫Ω↑▒𝐴(𝑟 )𝑊(𝑟− 𝑟 ,ℎ)𝑑𝑟  

Page 18: Smooth Particle Hydrodynamics (SPH) · It is a computational method used for simulating the dynamics of continuum media, such as solid mechanics and fluid flows. It has been used

18

Integral representation into finite summation

Ø  Numericalequivalent

Ø  where j is iterated over all particles, Vj is the volume attributed

implicitly to particle j, rj the position, and Aj is the value of anyquantityAatrj

Ø  ThebasisformulationoftheSPH

𝐴↓𝑆 (𝑟)=∑𝑗↑▒𝐴↓𝑗 𝑉↓𝑗 𝑊(𝑟− 𝑟↓𝑗 ,ℎ) 

𝑉= 𝑚/𝜌 

𝐴↓𝑆 (𝑟)=∑𝑗↑▒𝐴↓𝑗 𝑚↓𝑗 /𝜌↓𝑗   𝑊(𝑟− 𝑟↓𝑗 ,ℎ) 

𝐴↓𝐼 (𝑟)=∫Ω↑▒𝐴(𝑟 )𝑊(𝑟− 𝑟 ,ℎ)𝑑𝑟  

Page 19: Smooth Particle Hydrodynamics (SPH) · It is a computational method used for simulating the dynamics of continuum media, such as solid mechanics and fluid flows. It has been used

Ø  Up tonow, various kernel functions havebeendeveloped andused inthe SPH method, among which the most widely used are the cubicsplinekernelfunctionandtheWendlandkernel.

−𝑊(𝑟↓𝑖𝑗 ,ℎ)=𝐶↓ℎ  █�{█(2−𝑞)↑3 −4 (1−𝑞)↑3  𝑓𝑜𝑟 0≤𝑞≤1� (2−𝑞)↑3  𝑓𝑜𝑟 1≤𝑞≤2�0 𝑓𝑜𝑟 𝑞>2  � 𝐶↓ℎ =15/(4𝜋ℎ↑2 )� 𝑊(𝑟↓𝑖𝑗 ,ℎ)=𝐶↓ℎ  █�{█(2−𝑞)↑4 (1+2𝑞)−4 (1−𝑞)↑3  𝑓𝑜𝑟 0≤𝑞≤2��0 𝑓𝑜𝑟 𝑞>2  � 𝐶↓ℎ =7/(64𝜋ℎ↑2 ) 

19

q= 𝑟↓𝑖𝑗 /ℎ 

Page 20: Smooth Particle Hydrodynamics (SPH) · It is a computational method used for simulating the dynamics of continuum media, such as solid mechanics and fluid flows. It has been used

Eachparticleisspecifiedbyastatelist:mass,velocity,position,force,density,pressure

),,,,,( iiiiii prm ρFvParticle i

Governing Equations

Page 21: Smooth Particle Hydrodynamics (SPH) · It is a computational method used for simulating the dynamics of continuum media, such as solid mechanics and fluid flows. It has been used

Theaccelerationofaparticleis

gravityi

einteractivi

viscosityi

pressurei

i aaaadtdv

+++=

Governing Equations

Page 22: Smooth Particle Hydrodynamics (SPH) · It is a computational method used for simulating the dynamics of continuum media, such as solid mechanics and fluid flows. It has been used

Assumewehavethesamemassforallparticles,mi=m

The mass m is calculated by

( ) ( )particlesofnumberTotal

volumeTotalfluidofDensitym ⋅=

Particle mass

Page 23: Smooth Particle Hydrodynamics (SPH) · It is a computational method used for simulating the dynamics of continuum media, such as solid mechanics and fluid flows. It has been used

Let us now go back to the weighted averages…

Howtodeterminethedensityofaparticle?

ijr

∑=j

ijji rWm )(ρ

Weight function or Kernel function

Page 24: Smooth Particle Hydrodynamics (SPH) · It is a computational method used for simulating the dynamics of continuum media, such as solid mechanics and fluid flows. It has been used

Surface tracking

WecanfindthesurfacebymonitoringthedensityIfthedensityataparticledeviatestoomuchcomparedtoexpecteddensitywetagitasasurfaceparticle

Page 25: Smooth Particle Hydrodynamics (SPH) · It is a computational method used for simulating the dynamics of continuum media, such as solid mechanics and fluid flows. It has been used

Pressure

Wegetthepressurefromtherelation:

( )02 ρρ −= isi cp

whereCsisthespeedofsoundandρ0isthefluidreferencedensity

Page 26: Smooth Particle Hydrodynamics (SPH) · It is a computational method used for simulating the dynamics of continuum media, such as solid mechanics and fluid flows. It has been used

),,,,,( iiiiii prm ρFv

Ø  Thenextpropertywefocusonistheforce

Ø  Velocitiesandpositionsarecalculatedfromtheforcesinawaysimilartoanordinaryparticlesystem

Ø  Butbeforewegointothatweneedtolearnmoreabouttakingaverages…

Page 27: Smooth Particle Hydrodynamics (SPH) · It is a computational method used for simulating the dynamics of continuum media, such as solid mechanics and fluid flows. It has been used

In SPH, the average is formally defined as follows:

∫ −=V

drrrWrArA ')'()'()(

Fornumericalsolutions,thesummationisusedinsteadofintegration.

∑≈j

ijjj

ji

rWAm

A )(ρ

∑ ∇≈∇j

ijjj

ji

rWAm

A )(ρ

∑ ∇≈∇j

ijjj

j

irWA

mA )(22

ρ

jijj

jijj

j

ji

rWm

rWm

)(

)(ρρ

ρ

Meshlessmethod!!

Page 28: Smooth Particle Hydrodynamics (SPH) · It is a computational method used for simulating the dynamics of continuum media, such as solid mechanics and fluid flows. It has been used

Velocities and Forces

Motionequationinelasticity:

extFdtdv

ρσ

ρ11

+⋅∇=

where: εσ C=εµσ !+Ι−= p

AllthistogetherproducesthefollowingfluidequationcalledNavier-Stokesequation

gvv++∇⋅∇+∇−= extFp

dtd

ρρµ

ρ11

Page 29: Smooth Particle Hydrodynamics (SPH) · It is a computational method used for simulating the dynamics of continuum media, such as solid mechanics and fluid flows. It has been used

Convert each term on the RHS in Navier-Stokes to SPH-averages

Ø  Firstterm(pressure)becomes:

∑ ∇≈∇−j

ijiji

rWPp )(1ρ

⎟⎟

⎜⎜

⎛+−= 22

j

j

i

i

j

jij

ppmP

ρρρ

where

Page 30: Smooth Particle Hydrodynamics (SPH) · It is a computational method used for simulating the dynamics of continuum media, such as solid mechanics and fluid flows. It has been used

30

∑ ∇≈∇−j

ijiji

rWPp )(1ρ

Page 31: Smooth Particle Hydrodynamics (SPH) · It is a computational method used for simulating the dynamics of continuum media, such as solid mechanics and fluid flows. It has been used

The second term (viscosity):

∑ ∇≈∇⋅∇−j

ijiji

rW )(2Vvρµ

⎟⎟

⎜⎜

⎛+−= 22

j

j

i

i

j

jij

mρρρ

µvvV

where

Page 32: Smooth Particle Hydrodynamics (SPH) · It is a computational method used for simulating the dynamics of continuum media, such as solid mechanics and fluid flows. It has been used

Summary

Ø  Theaccelerationofaparticlecannowbewritten:

gravityi

externali

viscosityi

pressurei

i aaaadtdv

+++=

∑ ∇≈j

ijijpressurei rWPa )(

externali

i

externali Fa

ρ1

),0,0( ga gravityi −≈

∑ ∇≈j

ijijviscosityi rWVa )(

Page 33: Smooth Particle Hydrodynamics (SPH) · It is a computational method used for simulating the dynamics of continuum media, such as solid mechanics and fluid flows. It has been used

Hand-Calculation Example

33

Page 34: Smooth Particle Hydrodynamics (SPH) · It is a computational method used for simulating the dynamics of continuum media, such as solid mechanics and fluid flows. It has been used

Problem Description

34

𝑋↓𝑗 =(4,3)

𝑉↓𝑖 =(1,1)

𝑉↓𝑗 =(0.5,1)

-1

7

1 52 3 4 6 7

3

6

5

4

2

1

0-1

0

Mass/m

Density/ρ

Pressure/P

Viscosity/μ

Velocity/v

Location/(x,y) h ∆t

Particlei 1 1 1 1 (1,1) (2,1) 2.5 1

Particlej 1 1 1 1 (0.5,1) (1,2) 2.5 1

𝑋↓𝑖 =(2,2)𝑟↓𝑖,𝑗 

Page 35: Smooth Particle Hydrodynamics (SPH) · It is a computational method used for simulating the dynamics of continuum media, such as solid mechanics and fluid flows. It has been used

35

Calculation of 𝛻W↓𝑖𝑗 

Usingthenumericalmethodtosolve𝛻W↓𝑖,𝑗 𝜕𝑊↓𝑖𝑗 /𝜕𝑥  = (− 45∗((2−0.001)↑2 + 1↑2 )↑3/2  /4π∗ ℎ↑5  + 45∗((2−0.001)↑2 + 1↑2 )/2π∗ ℎ↑4  − 15/π∗ℎ↑2  )−(− 45∗5↑3/2  /4π∗ ℎ↑5  + 45∗5/2π∗ ℎ↑4  − 15/π∗ℎ↑2  )/0.001 =−2.43∗10↑−1 𝜕𝑊↓𝑖𝑗 /𝜕𝑦  = (− 45∗(2↑2 + (1−0.001)↑2 )↑3/2  /4π∗ ℎ↑5  + 45∗(2↑2 + (1−0.001)↑2 )/2π∗ ℎ↑4  − 15/π∗ℎ↑2  )−(− 45∗5↑3/2  /4π∗ ℎ↑5  + 45∗5/2π∗ ℎ↑4  − 15/π∗ℎ↑2  )/0.001 =−1.21∗10↑−1 

−𝑊(𝑟,ℎ)=𝐶↓ℎ  █�{█(2−𝑞)↑3 −4(1−𝑞)↑3  𝑓𝑜𝑟 0≤𝑞≤1� (2−𝑞)↑3  𝑓𝑜𝑟 1≤𝑞≤2�0 𝑓𝑜𝑟 𝑞>2  � 𝐶↓ℎ =15/(4𝜋ℎ↑2 )� 

q= 𝑟↓𝑗,𝑖 /ℎ = √�5 /2.5 <1

Particlej

Particlei

𝑊↓𝑖𝑗 = 45𝑟↓𝑖𝑗↑3 /4𝜋ℎ↑5  − 45𝑟↓𝑖𝑗↑2 /2𝜋ℎ↑4  + 15/𝜋ℎ↑2  

𝛻W↓i,j = 𝜕W↓ij /𝜕x , 𝜕W↓ij /𝜕y =(−2.43∗10↑−1 ,−1.21∗10↑−1 );

Page 36: Smooth Particle Hydrodynamics (SPH) · It is a computational method used for simulating the dynamics of continuum media, such as solid mechanics and fluid flows. It has been used

Calculation of 𝛁𝑾↓𝐣𝐢 

36

Usingthenumericalmethodtosolve𝛻W↓𝑗𝑖 𝜕𝑊↓𝑗𝑖 /𝜕𝑥  = (− 45∗((−2−0.001)↑2 + 1↑2 )↑3/2  /4π∗ ℎ↑5  + 45∗((−2−0.001)↑2 + 1↑2 )/2π∗ ℎ↑4  − 15/π∗ℎ↑2  )−(− 45∗5↑3/2  /4π∗ ℎ↑5  + 45∗5/2π∗ ℎ↑4  − 15/π∗ℎ↑2  )/0.001 =−2.43∗10↑−1 𝜕𝑊↓𝑗𝑖 /𝜕𝑦  = (− 45∗(2↑2 + (−1−0.001)↑2 )↑3/2  /4π∗ ℎ↑5  + 45∗(2↑2 + (−1−0.001)↑2 )/2π∗ ℎ↑4  − 15/π∗ℎ↑2  )−(− 45∗5↑3/2  /4π∗ ℎ↑5  + 45∗5/2π∗ ℎ↑4  − 15/π∗ℎ↑2  )/0.001 =−1.21∗10↑−1 

−𝑊(𝑟,ℎ)=𝐶↓ℎ  █�{█(2−𝑞)↑3 −4(1−𝑞)↑3  𝑓𝑜𝑟 0≤𝑞≤1� (2−𝑞)↑3  𝑓𝑜𝑟 1≤𝑞≤2�0 𝑓𝑜𝑟 𝑞>2  � 𝐶↓ℎ =15/(4𝜋ℎ↑2 )� 

q= 𝑟↓𝑗,𝑖 /ℎ = √�5 /2.5 <1

Particlej

Particlei

𝛻W↓𝑗𝑖 = 𝜕W↓𝑗𝑖 /𝜕x , 𝜕W↓𝑗𝑖 /𝜕y =(−2.43∗10↑−1 ,−1.21∗10↑−1 );

𝑊↓𝑗𝑖 = 45𝑟↓𝑗𝑖↑3 /4𝜋ℎ↑5  − 45𝑟↓𝑗𝑖↑2 /2𝜋ℎ↑4  + 15/𝜋ℎ↑2  

Page 37: Smooth Particle Hydrodynamics (SPH) · It is a computational method used for simulating the dynamics of continuum media, such as solid mechanics and fluid flows. It has been used

Calculation of 𝛁2𝑾↓i,j 

37

Usingthenumericalmethodtosolve𝛻2W↓𝑖,𝑗 𝛻↑2 𝑊↓𝑖𝑗 |↓𝑥 = 𝑊↓𝑖+0.001,𝑗 −2𝑊↓𝑖𝑗 + 𝑊↓𝑖−0.001,𝑗 /0.001↑2  = −0.257075−2∗(−0.257317)−0.257558/0.001^2 =5.1∗10↑−1  𝛻↑2 𝑊↓𝑖𝑗 |↓𝑦 = 𝑊↓𝑖,𝑗+0.001 −2𝑊↓𝑖𝑗 + 𝑊↓𝑖,𝑗−0.001 /0.001↑2  = −0.257196−2∗(−0.257317)−0.257438/0.01↑2  −2.36∗10↑−1 

𝛻2W↓i,j = 𝛻↑2 𝑊↓𝑖𝑗 |↓𝑥 , 𝛻↑2 𝑊↓𝑖𝑗 |↓𝑦 =(−5.1∗10↑−1 ,−2.36∗10↑−1 );

−𝑊(𝑟,ℎ)=𝐶↓ℎ  █�{█(2−𝑞)↑3 −4(1−𝑞)↑3  𝑓𝑜𝑟 0≤𝑞≤1� (2−𝑞)↑3  𝑓𝑜𝑟 1≤𝑞≤2�0 𝑓𝑜𝑟 𝑞>2  � 𝐶↓ℎ =15/(4𝜋ℎ↑2 )� 

q= 𝑟↓𝑗,𝑖 /ℎ = √�5 /2.5 <1

𝑊↓𝑗𝑖 = 45𝑟↓𝑗𝑖↑3 /4𝜋ℎ↑5  − 45𝑟↓𝑗𝑖↑2 /2𝜋ℎ↑4  + 15/𝜋ℎ↑2  

Page 38: Smooth Particle Hydrodynamics (SPH) · It is a computational method used for simulating the dynamics of continuum media, such as solid mechanics and fluid flows. It has been used

Calculation of 𝛁𝟐𝑾↓𝐣,𝐢 

38

Usingthenumericalmethodtosolve𝛻2W↓𝑗,𝑖 𝛻↑2 𝑊↓𝑗𝑖 |↓𝑥 = 𝑊↓𝑗+0.001,𝑖 −2𝑊↓𝑗𝑖 + 𝑊↓𝑗−0.001,𝑖 /0.001↑2  = −0.257558−2∗(−0.257317)−0.257075/0.001↑2  =−5.1∗10↑−1  𝛻↑2 𝑊↓𝑗𝑖 |↓𝑦 = 𝑊↓𝑗,𝑖+0.001 −2𝑊↓𝑗𝑖 + 𝑊↓𝑗,𝑖−0.001 /0.001↑2  = −0.257438−2∗(−0.257317)−0.257196/0.001↑2  =−2.36∗10↑−1 

𝛻2W↓𝑗𝑖 = 𝛻↑2 𝑊↓𝑗𝑖 |↓𝑥 , 𝛻↑2 𝑊↓𝑗𝑖 |↓𝑦 =(−5.1∗10↑−1 ,−2.36∗10↑−1 );

−𝑊(𝑟,ℎ)=𝐶↓ℎ  █�{█(2−𝑞)↑3 −4(1−𝑞)↑3  𝑓𝑜𝑟 0≤𝑞≤1� (2−𝑞)↑3  𝑓𝑜𝑟 1≤𝑞≤2�0 𝑓𝑜𝑟 𝑞>2  � 𝐶↓ℎ =15/(4𝜋ℎ↑2 )� 

q= 𝑟↓𝑗,𝑖 /ℎ = √�5 /2.5 <1

𝑊↓𝑗𝑖 = 45𝑟↓𝑗𝑖↑3 /4𝜋ℎ↑5  − 45𝑟↓𝑗𝑖↑2 /2𝜋ℎ↑4  + 15/𝜋ℎ↑2  

Page 39: Smooth Particle Hydrodynamics (SPH) · It is a computational method used for simulating the dynamics of continuum media, such as solid mechanics and fluid flows. It has been used

Calculation of Acceleration, Velocity and Location

39

𝑽↓𝒊 𝒏𝒆𝒘 = 𝑽↓𝒊 + 𝒂↓𝒊 ∗∆𝒕 =(𝟏,𝟏)+(𝟏.𝟓𝟒𝟐,𝟎.𝟕𝟎𝟓)=(𝟐.𝟓𝟒𝟐,𝟏.𝟕𝟎𝟓); 𝑿↓𝒊 𝒏𝒆𝒘 = 𝑿↓𝒊 + 𝑽↓𝒊 𝒏𝒆𝒘 ∗∆𝒕 =(2,2)+(𝟐.𝟓𝟒𝟐,𝟏.𝟕𝟎𝟓)=(𝟒.𝟓𝟒𝟐,𝟑.𝟕𝟎𝟓);

𝑎↓𝑖 = 𝑎↓𝑖↑𝑝𝑟𝑒𝑠𝑠𝑢𝑟𝑒 + 𝑎↓𝑖↑𝑣𝑖𝑠𝑐𝑜𝑠𝑖𝑡𝑦 + 𝑎↓𝑖↑𝑒𝑥𝑡𝑒𝑟𝑛𝑎𝑙 + 𝑎↓𝑖↑𝑔𝑟𝑎𝑣𝑖𝑡𝑦 =∑𝑗↑▒𝑃↓𝑖𝑗 𝛻𝑊(𝑟↓𝑖𝑗 )+  ∑𝑗↑▒𝑉↓𝑖𝑗 𝛻↑2 𝑊(𝑟↓𝑖𝑗 )+ (1/𝜌↓𝑖 ) 𝐹↓𝑖↑𝑒𝑥𝑡𝑒𝑟𝑛𝑎𝑙 +(0,−𝑔)=(−2.43∗10↑−1 ,−1.21∗10↑−1 )−3.5(−5.1∗10↑−1 ,−2.36∗10↑−1 )+(0,0)+(0,0)=(1.542,0.705)

Page 40: Smooth Particle Hydrodynamics (SPH) · It is a computational method used for simulating the dynamics of continuum media, such as solid mechanics and fluid flows. It has been used

Calculation of Acceleration, Velocity and Location

40

𝑽↓𝒋 𝒏𝒆𝒘 = 𝑽↓𝒋 +𝒂𝒋∗∆𝒕 =(𝟎.𝟓,𝟏)+(−𝟏.𝟓𝟒𝟐,−𝟎.𝟕𝟎𝟓)=(−𝟏.𝟎𝟒𝟐,𝟎.𝟐𝟗𝟓); 𝑿↓𝒋 𝒏𝒆𝒘 = 𝑿↓𝒋 + 𝑽↓𝒋 𝒏𝒆𝒘 ∗∆𝒕 =(4,3)+(−𝟏.𝟎𝟒𝟐,𝟎.𝟐𝟗𝟓)=(𝟐.𝟗𝟓𝟖,𝟑.𝟐𝟗𝟓);

𝑎↓𝑗 = 𝑎↓𝑗↑𝑝𝑟𝑒𝑠𝑠𝑢𝑟𝑒 + 𝑎↓𝑗↑𝑣𝑖𝑠𝑐𝑜𝑠𝑖𝑡𝑦 + 𝑎↓𝑗↑𝑒𝑥𝑡𝑒𝑟𝑛𝑎𝑙 + 𝑎↓𝑗↑𝑔𝑟𝑎𝑣𝑖𝑡𝑦 =∑𝑖↑▒𝑃↓𝑗𝑖 𝛻𝑊(𝑟↓𝑗𝑖 )+  ∑𝑖↑▒𝑉↓𝑗𝑖 𝛻↑2 𝑊(𝑟↓𝑗𝑖 )+ (1/𝜌↓𝑗 ) 𝐹↓𝑗↑𝑒𝑥𝑡𝑒𝑟𝑛𝑎𝑙 +(0,−𝑔)=−(−2.43∗10↑−1 ,−1.21∗10↑−1 )+3.5(−5.1∗10↑−1 ,−2.36∗10↑−1 )+(0,0)+(0,0)=(−1.542,−0.705)

Page 41: Smooth Particle Hydrodynamics (SPH) · It is a computational method used for simulating the dynamics of continuum media, such as solid mechanics and fluid flows. It has been used

Calculation Results

-1

7

1 52 3 4 6 7

3

6

5

4

2

1

0-1

0

ℎ𝑉↓𝑗𝑝𝑟𝑒 

𝑉↓𝑖𝑛𝑒𝑤 𝑉↓𝑗𝑛𝑒𝑤 

𝑉↓𝑖𝑝𝑟𝑒 

Mass/m

Density/ρ

Pressure/P

Viscosity/μ

Velocity/v

Location/(x,y) h ∆t

Particlei 1 1 1 1 (2.5,1.7) (2,1) 2.5 1

Particlej 1 1 1 1 (-1.0,0.3) (1,2) 2.5 1

Page 42: Smooth Particle Hydrodynamics (SPH) · It is a computational method used for simulating the dynamics of continuum media, such as solid mechanics and fluid flows. It has been used

For each time step: Ø  DiscretefromintegrationtosummationØ  NumericalapproximationforKernelFunctionØ  CalculatedensityforeachparticleØ  CalculatepressureforeachparticleØ  Calculatealltypeofaccelerationsforeachparticle,andsumitupØ  Findnewvelocitiesandpositionsbyusingthesamesummationmethodas

before…

Page 43: Smooth Particle Hydrodynamics (SPH) · It is a computational method used for simulating the dynamics of continuum media, such as solid mechanics and fluid flows. It has been used

Numerical Example

43

Page 44: Smooth Particle Hydrodynamics (SPH) · It is a computational method used for simulating the dynamics of continuum media, such as solid mechanics and fluid flows. It has been used

Simulation Example

Ø  SoftwareIntroduction

Ø  Softwarepreparation

Ø  NumericalComputation

Ø  ParameterSetup

Ø  Coding

Ø  Visualizationofresult

Page 45: Smooth Particle Hydrodynamics (SPH) · It is a computational method used for simulating the dynamics of continuum media, such as solid mechanics and fluid flows. It has been used

Software Introduction

Ø  Codesource:Opensource.

Ø  Dimension:2-D&3-D.

Ø  Numericallycomputation.

Ø  VisualizationroutineswithParaView.

Page 46: Smooth Particle Hydrodynamics (SPH) · It is a computational method used for simulating the dynamics of continuum media, such as solid mechanics and fluid flows. It has been used

Software preparation

Ø  Windows:IntelVisualFortranSilverfrostFTN95GNUgfortrancompileronCygwin

Ø  Mac:GNUgfortran

Ø  Linux:GNUgfortrancompileronCygwin ParaView5.3.0(Visualization)

Page 47: Smooth Particle Hydrodynamics (SPH) · It is a computational method used for simulating the dynamics of continuum media, such as solid mechanics and fluid flows. It has been used

Numerical Computation

Numericallycomputefree-surfaceelevation:

1)Foragiven(X,Y)position.

2)ComputenumericalMASSatdifferentZpositionsusingMASSvaluesofneighbouringfluidparticles:

3)Wewillchooseaswaveelevation:theZvalueforwhichm=0.5*m(reference)

Page 48: Smooth Particle Hydrodynamics (SPH) · It is a computational method used for simulating the dynamics of continuum media, such as solid mechanics and fluid flows. It has been used

Numerical Computation

Numericallycomputevelocity:1).Foragivenlocation.2).Computenumeicalvelocityusingvelocityvaluesofneighbouringfluidparticles:

Page 49: Smooth Particle Hydrodynamics (SPH) · It is a computational method used for simulating the dynamics of continuum media, such as solid mechanics and fluid flows. It has been used

Numerical Computation

Numericallycomputepressure:1).Foragivenlocation.2).ComputenumericalPRESSUREusingPRESSUREvaluesofneighbouringfluidparticles:

Page 50: Smooth Particle Hydrodynamics (SPH) · It is a computational method used for simulating the dynamics of continuum media, such as solid mechanics and fluid flows. It has been used

Numerical Computation Numericallycomputeforces:1)Forarangeofboundaryparticles2)WecomputenumericalACCELERATIONofthoseboundaryparticlessolvingtheparticleinteractionswithfluidneighbouringparticles:3)SummationofACCELERATIONvaluesofthoseboundaryparticles:

Page 51: Smooth Particle Hydrodynamics (SPH) · It is a computational method used for simulating the dynamics of continuum media, such as solid mechanics and fluid flows. It has been used

Parameter Setup

KernelFunction:Ø  Gaussian

Ø  Quadratic

Ø  Cubic

Ø  Wendland

Page 52: Smooth Particle Hydrodynamics (SPH) · It is a computational method used for simulating the dynamics of continuum media, such as solid mechanics and fluid flows. It has been used

Parameter Setup

Time-steppingalgorithm:Ø  Predictor-Corrector

Ø  Verlet

Ø  Symplectic

Ø  Beeman

Page 53: Smooth Particle Hydrodynamics (SPH) · It is a computational method used for simulating the dynamics of continuum media, such as solid mechanics and fluid flows. It has been used

Parameter Setup

Viscositytreatment:Ø  Artificialviscosity

Ø  Laminar

Ø  Laminarviscosity+Sub-ParticleScale

Page 54: Smooth Particle Hydrodynamics (SPH) · It is a computational method used for simulating the dynamics of continuum media, such as solid mechanics and fluid flows. It has been used

Parameter Setup

DensityFilter:Ø  ZerothOrder–ShepardFilter

Ø  FirstOrder–MovingLeastSquares(MLS)

Page 55: Smooth Particle Hydrodynamics (SPH) · It is a computational method used for simulating the dynamics of continuum media, such as solid mechanics and fluid flows. It has been used

Other choices

Ø  Kernelcorrection(None)

Ø  Equationofstate(Tait’sequation)

Ø  Boundaryconditions(Dalrymple)

Ø  Geometryofthezone(Box)

Ø  Initialfluidparticlestructure(BCC)

Page 56: Smooth Particle Hydrodynamics (SPH) · It is a computational method used for simulating the dynamics of continuum media, such as solid mechanics and fluid flows. It has been used

Coding

InCygwin,withvirtualLinuxplatform:

Ø  CompilesSPHysicsgen_2DbySPHysicsgen.make.

Ø  RunSPHysicsgen_2Dwithinputfile(Case1.txt),thenobtainaoutputfile(Case1.out).

Ø  CompileandgenerateSPHysics_2DbySPHysics.make,placestheSPHysics_2Dexecutable.

Ø  ExecuteSPHysics_2D.

Ø  VisualizebyParaView.

Page 57: Smooth Particle Hydrodynamics (SPH) · It is a computational method used for simulating the dynamics of continuum media, such as solid mechanics and fluid flows. It has been used

Bug:‘Xilink’CommandinSPHYSICS.makfilecannotberecognize

bynewversionofCygwin.

Solution:RemodifythePHYSICS.makfileasfollows:

Coding-bug and solution

Page 58: Smooth Particle Hydrodynamics (SPH) · It is a computational method used for simulating the dynamics of continuum media, such as solid mechanics and fluid flows. It has been used

Visualization of result

Page 59: Smooth Particle Hydrodynamics (SPH) · It is a computational method used for simulating the dynamics of continuum media, such as solid mechanics and fluid flows. It has been used

Visualization of result (t=0, 15,30,45)

Page 60: Smooth Particle Hydrodynamics (SPH) · It is a computational method used for simulating the dynamics of continuum media, such as solid mechanics and fluid flows. It has been used

Visualization of result (t=60, 75,90,105)

Page 61: Smooth Particle Hydrodynamics (SPH) · It is a computational method used for simulating the dynamics of continuum media, such as solid mechanics and fluid flows. It has been used

Visualization of result (t=120, 135,149)

Page 62: Smooth Particle Hydrodynamics (SPH) · It is a computational method used for simulating the dynamics of continuum media, such as solid mechanics and fluid flows. It has been used

Example Applications

62

Page 63: Smooth Particle Hydrodynamics (SPH) · It is a computational method used for simulating the dynamics of continuum media, such as solid mechanics and fluid flows. It has been used

Uses in astrophysics Smoothed-particlehydrodynamics'sadaptiveresolution,numericalconservationofphysicallyconservedquantities,andabilitytosimulatephenomenacoveringmanyordersofmagnitudemakeitidealforcomputationsintheoreticalastrophysics.

Page 64: Smooth Particle Hydrodynamics (SPH) · It is a computational method used for simulating the dynamics of continuum media, such as solid mechanics and fluid flows. It has been used

Uses in fluid simulation

First,SPHguaranteesconservationofmasswithoutextracomputation.Second,SPHcomputespressurefromweightedcontributionsofneighboringparticles.Finally,SPHcreatesafreesurfacefortwo-phaseinteractingfluidsdirectly.ForthesereasonsitispossibletosimulatefluidmotionusingSPHinrealtime.

Page 65: Smooth Particle Hydrodynamics (SPH) · It is a computational method used for simulating the dynamics of continuum media, such as solid mechanics and fluid flows. It has been used

Uses in solid mechanics ThisfeaturehasbeenexploitedinmanyapplicationsinSolidMechanics:metalforming,impact,crackgrowth,fracture,fragmentation,etc.

Page 66: Smooth Particle Hydrodynamics (SPH) · It is a computational method used for simulating the dynamics of continuum media, such as solid mechanics and fluid flows. It has been used

Questions

66