Upload
others
View
3
Download
0
Embed Size (px)
Citation preview
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
Ø HistoricalPerspective
Ø GeneralPrinciples.
Ø GoverningEquations
Presentation Outlines
Ø Hand-CalculationExample
Ø NumericalExample
Ø ExampleApplications
Ø Introduction
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
Basic Concepts of Computational Hydrodynamics
Grid Based Methods
Particle Based Methods
Ø Eulerianapproach(FDM)
Ø Lagrangianapproach(FEM)
Ø Meshfreemethodscanusebothapproaches
Ø SmoothedParticleHydrodynamics
Ø DissipativeParticleDynamics
Ø BrownianDynamics
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).
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
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
Limitations of Grid Based Methods
Not Suitable for problems involving: Ø Largedisplacements.
Ø Largeinhomogeinities.
Ø Movingmaterialinterface.
Ø Deformableboundaries.
Ø Freesurfaces.
(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
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
Ø 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.
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.
Industrial applications of SPH Method
Ø Aerospaceindustries
Ø Carindustries
Ø Energyproductionindustries
Ø Industrialprocessing
Ø Marineandcoastalengineering
Ø Environmentalandgeophysicalproblems
Ø Fluid-structureinteraction Ø Otherapplications
(Astrophysics,Bioengineering,Hydrodynamics)
15
The basic step of the method (domaindiscretization,fieldfunctionapproximationandnumericalsolution):Ø Thecontinuum:
Asetofarbitrarilydistributedparticleswithnoconnectivity(meshfree);Ø Fieldfunctionapproximation:Theintegralrepresentationmethod
Ø Convertingintegralrepresentationintofinitesummation:Particleapproximation
16
Integral representation of a function:
ThecontinuumAsetofarbitrarilyparticles𝑓(𝑥)=∫Ω↑▒𝑓(𝑥 )𝑊(𝑥− 𝑥 ,ℎ)𝑑𝑥
17
Integral representation of a function: Ø Theinterpolationisbasedonthetheoryofintegralinterpolantsusingkernels
thatapproximateadeltafunction
Ø Theintegralinterpolantofanyquantityfunction,A(r)
Ø where:risanypointindomain(Ω),Wisasmoothingkernelwithhaswidth.
Ø Thewidth,orcoreradius, isascalingfactorthatcontrolsthesmoothnessorroughnessofthekernel.
𝐴↓𝐼 (𝑟)=∫Ω↑▒𝐴(𝑟 )𝑊(𝑟− 𝑟 ,ℎ)𝑑𝑟
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
𝐴↓𝑆 (𝑟)=∑𝑗↑▒𝐴↓𝑗 𝑉↓𝑗 𝑊(𝑟− 𝑟↓𝑗 ,ℎ)
𝑉= 𝑚/𝜌
𝐴↓𝑆 (𝑟)=∑𝑗↑▒𝐴↓𝑗 𝑚↓𝑗 /𝜌↓𝑗 𝑊(𝑟− 𝑟↓𝑗 ,ℎ)
𝐴↓𝐼 (𝑟)=∫Ω↑▒𝐴(𝑟 )𝑊(𝑟− 𝑟 ,ℎ)𝑑𝑟
Ø 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= 𝑟↓𝑖𝑗 /ℎ
Eachparticleisspecifiedbyastatelist:mass,velocity,position,force,density,pressure
),,,,,( iiiiii prm ρFvParticle i
Governing Equations
Theaccelerationofaparticleis
gravityi
einteractivi
viscosityi
pressurei
i aaaadtdv
+++=
Governing Equations
Assumewehavethesamemassforallparticles,mi=m
The mass m is calculated by
( ) ( )particlesofnumberTotal
volumeTotalfluidofDensitym ⋅=
Particle mass
Let us now go back to the weighted averages…
Howtodeterminethedensityofaparticle?
ijr
∑=j
ijji rWm )(ρ
Weight function or Kernel function
Surface tracking
WecanfindthesurfacebymonitoringthedensityIfthedensityataparticledeviatestoomuchcomparedtoexpecteddensitywetagitasasurfaceparticle
Pressure
Wegetthepressurefromtherelation:
( )02 ρρ −= isi cp
whereCsisthespeedofsoundandρ0isthefluidreferencedensity
),,,,,( iiiiii prm ρFv
Ø Thenextpropertywefocusonistheforce
Ø Velocitiesandpositionsarecalculatedfromtheforcesinawaysimilartoanordinaryparticlesystem
Ø Butbeforewegointothatweneedtolearnmoreabouttakingaverages…
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!!
Velocities and Forces
Motionequationinelasticity:
extFdtdv
ρσ
ρ11
+⋅∇=
where: εσ C=εµσ !+Ι−= p
AllthistogetherproducesthefollowingfluidequationcalledNavier-Stokesequation
gvv++∇⋅∇+∇−= extFp
dtd
ρρµ
ρ11
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
30
∑ ∇≈∇−j
ijiji
rWPp )(1ρ
The second term (viscosity):
∑ ∇≈∇⋅∇−j
ijiji
rW )(2Vvρµ
⎟⎟
⎠
⎞
⎜⎜
⎝
⎛+−= 22
j
j
i
i
j
jij
mρρρ
µvvV
where
Summary
Ø Theaccelerationofaparticlecannowbewritten:
gravityi
externali
viscosityi
pressurei
i aaaadtdv
+++=
∑ ∇≈j
ijijpressurei rWPa )(
externali
i
externali Fa
ρ1
≈
),0,0( ga gravityi −≈
∑ ∇≈j
ijijviscosityi rWVa )(
Hand-Calculation Example
33
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)𝑟↓𝑖,𝑗
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 );
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
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
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
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)
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)
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
For each time step: Ø DiscretefromintegrationtosummationØ NumericalapproximationforKernelFunctionØ CalculatedensityforeachparticleØ CalculatepressureforeachparticleØ Calculatealltypeofaccelerationsforeachparticle,andsumitupØ Findnewvelocitiesandpositionsbyusingthesamesummationmethodas
before…
Numerical Example
43
Simulation Example
Ø SoftwareIntroduction
Ø Softwarepreparation
Ø NumericalComputation
Ø ParameterSetup
Ø Coding
Ø Visualizationofresult
Software Introduction
Ø Codesource:Opensource.
Ø Dimension:2-D&3-D.
Ø Numericallycomputation.
Ø VisualizationroutineswithParaView.
Software preparation
Ø Windows:IntelVisualFortranSilverfrostFTN95GNUgfortrancompileronCygwin
Ø Mac:GNUgfortran
Ø Linux:GNUgfortrancompileronCygwin ParaView5.3.0(Visualization)
Numerical Computation
Numericallycomputefree-surfaceelevation:
1)Foragiven(X,Y)position.
2)ComputenumericalMASSatdifferentZpositionsusingMASSvaluesofneighbouringfluidparticles:
3)Wewillchooseaswaveelevation:theZvalueforwhichm=0.5*m(reference)
Numerical Computation
Numericallycomputevelocity:1).Foragivenlocation.2).Computenumeicalvelocityusingvelocityvaluesofneighbouringfluidparticles:
Numerical Computation
Numericallycomputepressure:1).Foragivenlocation.2).ComputenumericalPRESSUREusingPRESSUREvaluesofneighbouringfluidparticles:
Numerical Computation Numericallycomputeforces:1)Forarangeofboundaryparticles2)WecomputenumericalACCELERATIONofthoseboundaryparticlessolvingtheparticleinteractionswithfluidneighbouringparticles:3)SummationofACCELERATIONvaluesofthoseboundaryparticles:
Parameter Setup
KernelFunction:Ø Gaussian
Ø Quadratic
Ø Cubic
Ø Wendland
Parameter Setup
Time-steppingalgorithm:Ø Predictor-Corrector
Ø Verlet
Ø Symplectic
Ø Beeman
Parameter Setup
Viscositytreatment:Ø Artificialviscosity
Ø Laminar
Ø Laminarviscosity+Sub-ParticleScale
Parameter Setup
DensityFilter:Ø ZerothOrder–ShepardFilter
Ø FirstOrder–MovingLeastSquares(MLS)
Other choices
Ø Kernelcorrection(None)
Ø Equationofstate(Tait’sequation)
Ø Boundaryconditions(Dalrymple)
Ø Geometryofthezone(Box)
Ø Initialfluidparticlestructure(BCC)
Coding
InCygwin,withvirtualLinuxplatform:
Ø CompilesSPHysicsgen_2DbySPHysicsgen.make.
Ø RunSPHysicsgen_2Dwithinputfile(Case1.txt),thenobtainaoutputfile(Case1.out).
Ø CompileandgenerateSPHysics_2DbySPHysics.make,placestheSPHysics_2Dexecutable.
Ø ExecuteSPHysics_2D.
Ø VisualizebyParaView.
Bug:‘Xilink’CommandinSPHYSICS.makfilecannotberecognize
bynewversionofCygwin.
Solution:RemodifythePHYSICS.makfileasfollows:
Coding-bug and solution
Visualization of result
Visualization of result (t=0, 15,30,45)
Visualization of result (t=60, 75,90,105)
Visualization of result (t=120, 135,149)
Example Applications
62
Uses in astrophysics Smoothed-particlehydrodynamics'sadaptiveresolution,numericalconservationofphysicallyconservedquantities,andabilitytosimulatephenomenacoveringmanyordersofmagnitudemakeitidealforcomputationsintheoreticalastrophysics.
Uses in fluid simulation
First,SPHguaranteesconservationofmasswithoutextracomputation.Second,SPHcomputespressurefromweightedcontributionsofneighboringparticles.Finally,SPHcreatesafreesurfacefortwo-phaseinteractingfluidsdirectly.ForthesereasonsitispossibletosimulatefluidmotionusingSPHinrealtime.
Uses in solid mechanics ThisfeaturehasbeenexploitedinmanyapplicationsinSolidMechanics:metalforming,impact,crackgrowth,fracture,fragmentation,etc.
Questions
66