0% found this document useful (0 votes)
10 views66 pages

SPH 2017

Uploaded by

Nishara Navodya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views66 pages

SPH 2017

Uploaded by

Nishara Navodya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 66

Penn State University

College of Earth and Mineral Science


Department of Energy and Mineral
Engineering

Smooth Particle Hydrodynamics


(SPH)
Group Presentation
EGEE 520 Course
Spring 2017

Presented By
Ahmed Nasreldeen
Long Fan
Keru Liu
Presentation
Outlines

Ø Introduction

Ø Historical Perspective

Ø General Principles.

Ø Governing Equations

Ø Hand-Calculation Example

Ø Numerical Example

Ø Example Applications
Smoothed 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 many fields of research,
including astrophysics, ballistics, volcanology, and oceanography. It is a mesh-free
Lagrangian method (where the coordinates move with the fluid)
Smoothed Particle
Hydrodynamics
Some particle properties are The fluid is Fluid dynamics
determined by taking an average represented by a
over neighboring particles particle system

The Smoothed Particle Hydrodynamics


(SPH) method works by dividing the fluid
into a set of discrete elements, referred to
as particles. These particles have a spatial
distance (known as the "smoothing
length", typically represented in equations
by h), over which their properties are
"smoothed" by a kernel function
Basic Concepts of Computational Hydrodynamics
Grid Based
Methods
Ø Eulerian approach (FDM)
Ø Lagrangian approach (FEM)
Ø Meshfree methods can use both approaches

Particle Based
Methods
Ø Smoothed Particle Hydrodynamics
Ø Dissipative Particle Dynamics
Ø Brownian Dynamics
Eulerian vs Lagrangian
descriptions
Eulerian method Lagrangian
Concerned with fluid properties method
Concerned with a particular
(velocity, density, pressure, particle of fluid as it moves
temperature) at a specific space- through space to reflect the
time point (x,y,z,t). behavior of the rest particles.

Control volume approach Control mass approach

Named after Swiss Named after Italian


mathematician Leonhard Euler mathematician Joseph Lagrange
(1707-1783). (1736-1813).
Eulerian vs Lagrangian
descriptions
L a gr a ngi a n Me thod s E ule r i a n Me thod s
Attaching on the moving
Grid Fixed in the space
material
Mass, momentum, and energy
Movement of any point on
Track flux across grid nodes and mesh
materials
cell boundary
Easy to obtain time-history Difficult to obtain time-history
Time History data at a point attached on data at a point attached on
materials materials
Moving
Boundary and Easy to track Difficult to track
Interference
Irregular Difficult to model with good
Geometry
Easy to model
accuracy
Large
Deformation
Difficult to handle Easy to handle
Meshfree and Meshfree Particle
Methods
Ø The basic idea of the meshfree methods is to discretize the continuum through a
set of nodes without the connective mesh in order to follow the deformation
experienced by the material and avoid the degradation of the numerical result
maintaining a suitable computational effort.

Ø When the nodes assumes a physical meaning, i.e. they represent material particles
carrying physical properties, the method is said to be meshfree particle and
follows, in general, a Lagrangian approach.

Ø Accurate and stable numerical solutions for integral equations or PDEs with all
kind of boundary conditions
Limitations of Grid Based
Methods
Not Suitable for problems involving:
Ø Large displacements.

Ø Large inhomogeinities.

Ø Moving material interface.

Ø Deformable boundaries.

Ø Free surfaces.
Historical
Perspective
Computer
(Monaghan, 2005) graphics

Cosmological
(Springel, 2005) simulations

Applied to solid and fluid


(Monaghan, 1992)
mechanics

(Benz, Slattery & Cameron, 1986) Collision problems

Fragmentation in collapsing molecular


(Miyama, Hayashi & Narita, 1984)
clouds

(Lucy, 1977), (Gingold & Monaghan, 1977) Simulating astrophysics problems


Advantages of SPH
Method
Ø It can obtain the time history of the material particles. The advection and transport
of the system can thus be calculated.

Ø The free surfaces, material interfaces, and moving boundaries can all be traced
naturally in the process of simulation regardless the complicity of the movement of
the particles, which have been very challenging to many Eulerian methods.
Therefore, SPH is an ideal choice for modeling free surface and interfacial flow
problems.

Ø The distinct meshfree feature of the SPH method allows a straightforward


handling of very large deformations, since the connectivity between particles are
generated as part of the computation and can change with time.

Ø SPH is suitable for problems where the object under consideration is not a
continuum. This is especially true in bio- and nano- engineering at micro and nano
scale, and astrophysics at astronomic scale
Ø SPH is comparatively easier in numerical implementation, and it is more natural to
develop three-dimensional numerical models than grid based methods.

Ø Pure advection is treated exactly. For example, if the particles are given a colour,
and the velocity is specified, the transport of colour by the particle system is exact

Ø With more than one material, each described by its own set of particles, interface
problems are often trivial for SPH but difficult for finite difference schemes.

Ø Particle methods bridge the gap between the continuum and fragmentation in a
natural way.

Ø The resolution can be made to depend on position and time, which makes the
method very attractive for most astrophysical and many geophysical problems.

Ø SPH has the computational advantage, particularly in problems involving


fragments, drops or stars that the computation is only where the matter is, with a
consequent reduction in storage and calculation.
Disadvantages of SPH
Method
Ø The main disadvantage of SPH is its limited accuracy in multi-dimensional flows due
to noise. This noise seriously messes up the accuracy that can be reached with the
technique, especially for subsonic flow, and also leads to a slow convergence rate.

Ø Particularly problematic in SPH are fluid instabilities across contact discontinuities,


such as Kelvin-Helmholtz instabilities. These are usually found to be suppressed in
their growth.

Ø Another generic problem is that the artificial viscosity is operating at some level
also outside of shocks, giving the numerical model a relatively high numerical
viscosity, which limits the Reynolds numbers that can be easily reached with SPH.
Industrial applications of SPH
Method
Ø Aerospace industries
Ø Car industries

Ø Energy production industries

Ø Industrial processing

Ø Marine and coastal engineering

Ø Environmental and geophysical problems

Ø Fluid-structure interaction
Ø Other applications
(Astrophysics, Bioengineering, Hydrodynamics)
The basic step of the method
(domain discretization, field function approximation and numerical solution):

Ø The continuum:
A set of arbitrarily distributed particles with no connectivity (meshfree);

Ø Field function approximation:


The integral representation method

Ø Converting integral representation into finite summation:


Particle approximation

15
Integral representation of a function:

The continuum A set of arbitrarily particles


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

16
Integral representation of a function:
Ø The interpolation is based on the theory of integral interpolants using kernels
that approximate a delta function

Ø The integral interpolant of any quantity function, A(r)


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

Ø where: r is any point in domain (Ω ), W is a smoothing kernel with h as width.

Ø The width, or core radius, is a scaling factor that controls the smoothness or
roughness of the kernel.

17
Integral representation into finite summation
Ø Numerical equivalent
​𝐴↓𝐼 (𝑟)=∫Ω↑▒𝐴(​𝑟 )𝑊(𝑟−​𝑟 ,ℎ)𝑑​𝑟
​𝐴↓𝑆 (𝑟)=∑𝑗↑▒​𝐴↓𝑗 ​𝑉↓𝑗 𝑊(𝑟−​𝑟↓𝑗 ,ℎ)

Ø 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 any
quantity A at rj

𝑉=​𝑚/𝜌
Ø The basis formulation of the SPH

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

18
Ø Up to now, various kernel functions have been developed and used in
the SPH method, among which the most widely used are the cubic
spline kernel function and the Wendland kernel.
​−𝑊(​𝑟↓𝑖𝑗 ,ℎ)=𝐶↓ℎ █ {█​(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 )

q=​𝑟↓𝑖𝑗 /ℎ

19
Governing
Equations
Each particle is specified by a state list:
mass,
velocity,
position,
force,
density,
pressure

Particle i (mi , v i , ri , Fi , ρ i , pi )
Governing Equations
The acceleration of a particle is

dvi pressure viscosity interactive gravity


= ai + ai + ai + ai
dt
Particle mass
Assume we have the same mass for all particles, mi = m

The mass m is calculated by

m=
( Density of fluid )⋅ (Total volume)
Total number of particles
Let us now go back to the weighted
averages…

How to determine the density of a particle?

ρi = ∑ m jW (rij )
j

Weight function or Kernel function

rij
Surface tracking

We can find the surface by monitoring the density


If the density at a particle deviates too much compared to expected density
we tag it as a surface particle
Pressur
e

We get the pressure from the relation:

2
pi = cs (ρi − ρ 0 )
where Cs is the speed of sound and ρ0 is the fluid reference density
(mi , v i , ri , Fi , ρ i , pi )

Ø The next property we focus on is the force

Ø Velocities and positions are calculated from the forces in a way similar to an
ordinary particle system

Ø But before we go into that we need to learn more about taking averages…
In SPH, the average is formally defined as follows:

A(r ) = ∫ A(r ' )W (r − r ' )dr '


V

For numerical solutions, the summation is used in stead of integration.

mj
A i ≈∑ A jW (rij ) mj
j ρj ρ i ≈∑ ρ jW (rij )
j ρj
mj
∇A i ≈ ∑ A j ∇W (rij ) ≈ ∑ m jW ( rij )
j ρj
j

2
mj
∇ A ≈∑ A j ∇ 2W (rij ) Meshless method!!
i ρj
j
Velocities and
Forces
Motion equation in elasticity:

dv 1 1
= ∇ ⋅ σ + Fext
dt ρ ρ
where:
σ = Cε
σ = − pΙ + µε!
All this together produces the following fluid equation called
Navier-Stokes equation

dv 1 µ 1
= − ∇p + ∇ ⋅ ∇v + Fext + g
dt ρ ρ ρ
Convert each term on the RHS in Navier-Stokes to SPH-
averages

Ø First term (pressure) becomes:

1
− ∇p ≈ ∑ Pij∇W (rij )
ρ i j

where

m j ⎛ pi pj ⎞
Pij = − ⎜ + ⎟
ρ j ⎜⎝ ρ i 2 ρ j 2 ⎟⎠
1
− ∇p ≈ ∑ Pij∇W (rij )
ρ i j

30
The second term (viscosity):

µ
− ∇ ⋅ ∇v ≈ ∑ Vij ∇ 2W (rij )
ρ i j

where

m j ⎛ vi vj ⎞
Vij = − µ ⎜ + ⎟
ρ j ⎜⎝ ρ i 2 ρ j 2 ⎟⎠
Summary
Ø The acceleration of a particle can now be written:

dvi pressure viscosity external gravity


= ai + ai + ai + ai
dt
pressure
ai ≈ ∑ Pij∇W (rij )
j
viscosity
ai ≈ ∑ Vij∇W (rij )
j

external 1 external
ai ≈ Fi
ρi
gravity
ai ≈ (0,0,− g )
Hand-Calculation
Example

33
Problem
Description
Mass Density Pressure Viscosity Velocity Location
h ∆t
/m /ρ /P /μ /v /(x,y)
Particle i 1 1 1 1 (1,1) (2,1) 2.5 1
Particle j 1 1 1 1 (0.5,1) (1,2) 2.5 1

4
​𝑋↓𝑗 =(4,3)
3 ​𝑉↓𝑗 =(0.5,1)
2 ​𝑟↓𝑖,𝑗
​𝑋↓𝑖 =(2,2) ℎ
1
0 ​𝑉↓𝑖 =(1,1)
-1 0 1 2 3 4 5 6 7
-1

34
Calculation of 𝛻​
W↓𝑖𝑗
Using the numerical method to solve 𝛻​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

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

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

Particle i
𝛻​W↓i,j =​𝜕W
​ ↓ij /𝜕x ,​𝜕W
​ ↓ij /𝜕y =(−2.43∗​10↑−1 ,−1.21∗​
10↑−1 );
35
Calculation of 𝛁​
𝑾↓𝐣𝐢
Using the numerical method to solve 𝛻​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

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

Particle j

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


Particle i

𝛻​W↓𝑗𝑖 =​𝜕W
​ ↓𝑗𝑖 /𝜕x ,​𝜕W
​ ↓𝑗𝑖 /𝜕y =(−2.43∗​10↑−1 ,−1.21∗​
10↑−1 );
36
Calculation of 𝛁​
2𝑾↓i,j
Using the numerical method to solve 𝛻2​W↓𝑖,𝑗

​𝛻↑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

​−𝑊(𝑟,ℎ)=𝐶↓ℎ █ {█​(2−𝑞)↑3 −4​(1−𝑞)↑3 𝑓𝑜𝑟 0≤𝑞≤1 ​(2−𝑞)↑3

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

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

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

37
Calculation of 𝛁​
𝟐𝑾↓𝐣,𝐢
Using the numerical method to solve 𝛻2​W↓𝑗,𝑖

​𝛻↑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

​−𝑊(𝑟,ℎ)=𝐶↓ℎ █ {█​(2−𝑞)↑3 −4​(1−𝑞)↑3 𝑓𝑜𝑟 0≤𝑞≤1 ​(2−𝑞)↑3

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

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


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

38
Calculation of Acceleration, Velocity and
Location

​𝑎↓𝑖 =​𝑎↓𝑖↑𝑝𝑟𝑒𝑠𝑠𝑢𝑟𝑒 +​𝑎↓𝑖↑𝑣𝑖𝑠𝑐𝑜𝑠𝑖𝑡𝑦 +​𝑎↓𝑖↑𝑒𝑥𝑡𝑒𝑟𝑛𝑎𝑙 +​𝑎↓𝑖↑𝑔𝑟𝑎𝑣𝑖𝑡𝑦 =∑𝑗↑▒​𝑃↓𝑖𝑗 𝛻𝑊(​𝑟↓𝑖𝑗 )


+ ∑𝑗↑▒​𝑉↓𝑖𝑗 ​𝛻↑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)

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


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

39
Calculation of Acceleration, Velocity and
Location

​𝑎↓𝑗 =​𝑎↓𝑗↑𝑝𝑟𝑒𝑠𝑠𝑢𝑟𝑒 +​𝑎↓𝑗↑𝑣𝑖𝑠𝑐𝑜𝑠𝑖𝑡𝑦 +​𝑎↓𝑗↑𝑒𝑥𝑡𝑒𝑟𝑛𝑎𝑙 +​𝑎↓𝑗↑𝑔𝑟𝑎𝑣𝑖𝑡𝑦 =∑𝑖↑▒​𝑃↓𝑗𝑖


𝛻𝑊(​𝑟↓𝑗𝑖 )+ ∑𝑖↑▒​𝑉↓𝑗𝑖 ​𝛻↑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)

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


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

40
Calculation
Results
Mass Density Pressure Viscosity Velocity Location
h ∆t
/m /ρ /P /μ /v /(x,y)
Particle i 1 1 1 1 (2.5,1.7) (2,1) 2.5 1
Particle j 1 1 1 1 (-1.0,0.3) (1,2) 2.5 1

4 ​𝑉↓𝑗𝑛𝑒𝑤 ​𝑉↓𝑖𝑛𝑒𝑤
3
​𝑉↓𝑗𝑝𝑟𝑒
2
​𝑉↓𝑖𝑝𝑟𝑒 ℎ
1
0
-1 0 1 2 3 4 5 6 7
-1
For each time step:
Ø Discrete from integration to summation
Ø Numerical approximation for Kernel Function
Ø Calculate density for each particle
Ø Calculate pressure for each particle
Ø Calculate all type of accelerations for each particle, and sum it up
Ø Find new velocities and positions by using the same summation method as
before…
Numerical Example

43
Simulation Example

Ø Software Introduction

Ø Software preparation

Ø Numerical Computation

Ø Parameter Setup

Ø Coding

Ø Visualization of result
Software
Introduction

Ø Code source: Open source.

Ø Dimension: 2-D & 3-D.

Ø Numerically computation.

Ø Visualization routines with


ParaView.
Software
preparation

Ø Windows: Intel Visual Fortran


Silverfrost FTN95
GNU gfortran compiler on Cygwin

Ø Mac: GNU gfortran

Ø Linux: GNU gfortran compiler on Cygwin


ParaView 5.3.0 (Visualization)
Numerical Computation

Numerically compute free-surface elevation:

1) For a given (X,Y) position.

2) Compute numerical MASS at different Z


positions using MASS values of neighbouring fluid particles:

3) We will choose as wave elevation:


the Z value for which m=0.5*m(reference)
Numerical Computation

Numerically compute velocity:

1). For a given location.

2). Compute numeical velocity using velocity values of


neighbouring fluid particles:
Numerical Computation

Numerically compute pressure:

1). For a given location.

2). Compute numerical PRESSURE


using PRESSURE values of neighbouring fluid particles:
Numerical Computation
Numerically compute forces:

1) For a range of boundary particles

2) We compute numerical ACCELERATION of


those boundary particles solving the particle
interactions with fluid neighbouring particles :

3) Summation of ACCELERATION values of those


boundary particles:
Parameter Setup

Kernel Function:

Ø Gaussian

Ø Quadratic

Ø Cubic

Ø Wendland
Parameter Setup

Time-stepping algorithm:

Ø Predictor-Corrector

Ø Verlet

Ø Symplectic

Ø Beeman
Parameter Setup

Viscosity treatment:

Ø Artificial viscosity

Ø Laminar

Ø Laminar viscosity+ Sub-Particle Scale


Parameter Setup

Density Filter:

Ø Zeroth Order – Shepard Filter

Ø First Order – Moving Least Squares (MLS)


Other choices

Ø Kernel correction (None)

Ø Equation of state (Tait’s equation)

Ø Boundary conditions (Dalrymple)

Ø Geometry of the zone (Box)

Ø Initial fluid particle structure (BCC)


Coding

In Cygwin, with virtual Linux platform:

Ø Compiles SPHysicsgen_2D by SPHysicsgen.make.

Ø Run SPHysicsgen_2D with input file(Case1.txt), then obtain a


output file (Case1.out) .

Ø Compile and generate SPHysics_2D by SPHysics.make, places


the SPHysics_2D executable.

Ø Execute SPHysics_2D.

Ø Visualize by ParaView.
Coding-bug and
solution
Bug:
‘Xilink’ Command in SPHYSICS.mak file cannot be recognize
by new version of Cygwin.

Solution:
Remodify the PHYSICS.mak file as follows:
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-particle hydrodynamics's adaptive resolution, numerical conservation of
physically conserved quantities, and ability to simulate phenomena covering many
orders of magnitude make it ideal for computations in theoretical astrophysics.
Uses in fluid simulation
First, SPH guarantees conservation of mass without extra
computation. Second, SPH computes pressure from weighted
contributions of neighboring particles. Finally, SPH creates a free
surface for two-phase interacting fluids directly.For these reasons it is
possible to simulate fluid motion using SPH in real time.
Uses in solid mechanics
This feature has been exploited in many applications in Solid
Mechanics: metal forming, impact, crack growth, fracture,
fragmentation, etc.
Questions

66

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy