1 Partial differential equations • Numerical Solution of Partial Differential Equations, K.W. Morton and D.F. Mayers (Cambridge Univ. Press, 1995) • Numerical Solution of Partial Differential Equations in Science and Engineering, L. Lapidus and G.F. Pinder (Wiley, 1999) • Finite Difference Schemes and Partial Differential Equations, J.C. Strikwerda (Wadsworth, Belmont, 1989) = PDE 2 Examples for PDEs 0 0 0 n ( ), () , () x x field depends on Poisson equation: Laplace equation: examples for scalar boundary . value problems (elliptic eqs.) Dirichlet boundary condition von Neuman boundary condition
104
Embed
Numerical Solution of Partial Differential Equations ... · • Numerical Solution of Partial Differential Equations in Science and Engineering, L. ... Laplace equation: examples
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
1
Partial differential equations
• Numerical Solution of Partial Differential Equations, K.W. Morton and D.F. Mayers (Cambridge Univ. Press, 1995)
• Numerical Solution of Partial Differential Equations in Science and Engineering, L. Lapidus and G.F. Pinder (Wiley, 1999)
Lattice gas AutomataParticles move on a triangular lattice and
follow the following collision rules:
Momentum is conserved at each collision.
It can be proven (Chapman-Enskog) that
its continuum limit is the Navier Stokes eq.
Lattice gas Automata
157
von Karman street
velocity field of a fluid behind an obstacle
Each vector is an average over time of the
velocities inside a square cell of 25 triangles.
159
Lattice gas Automata
Problem in three dimensions, because there exists
no translationally invariant lattice which is
locally isotropic. One must study the model in 4d
and then project down to 3d. Start with 4d
face centered hypercube that has 24 directions
giving 224 = 1677216 possible states. Projecting onto
a 3d hyperplane that already contains 12 directions
adds another six new directions giving 18 in 3d.
160
Discrete fluid solvers
• Lattice Gas Automata (LGA)
• Lattice Boltzmann Method (LBM)
• Dissipative Particle Dynamics (DPD)
• Smooth Particle Hydrodynamics (SPH)
• Stochastic Rotation Dynamics (SRD)
• Direct Simulation Monte Carlo (DSMC)
161
From LGCA to Lattice Boltzmann Models (LBM)
• (Boolean) molecules to (discrete) distributions
ni fi = < ni >
• (Lattice) Boltzmann equations (LBE)
( , 1) ( , )ii i if x c t f x t C f
Lattice Boltzmann
S.Succi, The Lattice Boltzmann equation for fluid dynamics and beyond, Oxford Univ. Press, 2001
ni is the number of particles in a cell going in direction i
162
Boltzmann equation
, ,f x v t x v distribution function
is the number of
particles having at time t velocities
between v and v + Δv in the elementary
volume between x and x + Δx.
, , , , t x vf x x v v t t f x v t t f x f v f
0
, , , ,
lim t x vt
f x x v v t t f x v tf v f a f
t
0
lim
t
va
t
Taylor expansion:
Ludwig Boltzmann
163
Boltzmann equation
Due to collisions between particles in the
volume Δx during the time interval Δt
some additional particles
acquire velocities between v and v+Δv and
some particles do not anymore
have velocities between v and v+Δv , giving the
collision
term:
, ,collf x v t
, ,collf x v t
, , , ,coll coll collf x v t f x v t
164
Boltzmann equation
This gives the Boltzmann equation:
t x v collf v f a f
In thermal equilibrium one expects
the Maxwell-Boltzmann distribution:
22
2
eq kT mn
v u
kTf e
( , )u x t
165
BGK collision term
P.L. BhatnagarBGK model:
P.L. Bhatnagar, E.P. Gross and M. Krook (1954)
eq
coll
f f
where τ is a relaxation time
2
s
m
kT ccs is «sound speed»
μ is viscosity 2 s
kTc
m
166
Averaged quantitiesMoments of the velocity distribution:
, , ,x t m f x v t dv
2
2
( )
, , , ,v u
x t e x t m f x v t dv
, , , ,x t u x t m v f x v t dv
mass density:
momentum density:
energy density:
168
Knudsen numberValidity of the continuum description:
characteristic length of system L must be much larger
than the mean free path l of the molecules
(distance between two subsequent collisions).
K l L
Navier-Stokes equation: 0.01 > K
Boltzmann equation: 0.005 > K
170
Chapman-Enskog expansion0
( )n n
n
f K f
where the small parameter K is the Knudsen number
0 ( ) eqf f
1 1
( )( )
, n n nx x n
n n
K Kt t
Chapman-Enskog
175
1 11
( ) ( )
( ) x xu u u e at
Chapman-Enskog
0 11 1 1 1 2 0 2 0 2
2 1
1
( ) ( )( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( )
( ) ( ) x v x v
f fv f a f v f a f f
t t
0 11 1 1 1 2
2 1
1
( ) ( )( ) ( ) ( ) ( ) ( )
( ) ( ) x v
f fv f a f f
t t
110 1
2
( ) , eq
xy
uv v f f dv
t
Navier Stokes equation:
momentum conservation
176
Gaussian quadrature theorem
0
( ) ( ) ( )b n
i iia
g x w x dx w g x
0
( ) , , ...,b n
ki
k ì i ka
x xw w x dx i n
x x
Be g(x) a polynomial of at most degree 2n+1
if for the positive weight function w(x) there exists a
polynomial p(x) of
degree n+1 such that 0 0 ( ) ( ) , , ...,b
k
a
x p x w x dx k n
with
and xi , i = 0,...,n are the zeros of p(x).
177
Lattice Boltzmann
22 2
2
2 2 4 22
2 12 22
eq sd
s s ss
vc vuvu u
fc c cm c
e
2 with ss
u kTc
c m
small parameter:
w(x) p(x)2
0
( )i ii
a H v
2
2
2
2
d
eq kT m
v u
m kT mf e
178
Hermite Polynomials2 3
0 1 2 31 1 3 ( ) , ( ) , ( ) , ( )H x H x x H x x H x x x
2
2
( ) ( ) ! xi j ijH x H x e dx i
179
Lattice Boltzmannone dimensional case:
2
22
2
1
( ) s
s
vcw v
ce
n + 1 = 31 1
03 3
, ,iv
220 1 2
1 1 2 1
6 3 61
, ,
( )!, ,
( ) ( )i
in i
nw
n H v
180
Lattice Boltzmannthree dimensional case:
2 222
2 2 2 22 2 2 2
y zx
s s s s
v vvvc c c ce e e e
0 0 0 0 0 0
0 01 3 0 0 0 1 3 0 0 0 1 3 1 3
01 3 1 3 0 0 1 3 1 3 1 3 0 1 3 1 3 1 3
1 3 1 3 1 3 1 3 1 3 1
8 27
2 27
1 54
( , , )
( / , , ) ( , / , ) ( , , / ) /
( / , / , ) ( , / , / ) ( / , , / ) / /
( / , / , / ) / / /
w w w w
w w w w w w
w w w w w w
w w w w3
1 216
27 discrete velocity vectors
181
Lattice Boltzmann
D2Q9
D3Q15
D3Q19
Lattice Boltzmann
where the equilibrium distribution is defined as:
Define on each site x of a lattice on each outgoing
bond i a velocity distribution function f(x,vi,t)
which is updated as:
2 20
2 4 2
93 31
2 2
i n is s s
vuvu uf w
c c c
011
( , , ) ( , , ) ( ) ( , , ) ( , , )i i i i i i i i n i if x v v t f x v t F v f u T f x v t
183
Lattice Boltzmann
discretization
1
v t
x
CFL number
22
s
t
c
2 2
2
, , , , t tx x v v t t x v t
tf f t v f v f
js is the inverse of a relaxation time.Orthogonal polynomials
Projections of the distribution
Shear viscosity
Bulk viscosity
Chapman-Enskog expansion:
Multi-Relaxation-Time (MRT) LBM
P. Lallemand and L.S. Luo
Phys.Rev.E 61, 6546 (2000)
0
( , ) ( , ) ( )N
j eqj j j
j j j
sf x c t t t f x t m m
i
mj j f
mj (,...,ux,...)
cs2 1
s9,...,13
1
2
59cs2
9
1
s2
1
2
D3Q15
186
Powerflow, EXA
Car design
Lattice Boltzmann
187
Raising of a bubble
188
3d Rayleigh Benard
189
Flow through porous medium in 2d
using a NVidia GTX680
190
Surface Flow with Moving and Deforming Objects
Interfaces and free surfaces
191
192
Discrete fluid solvers
• Lattice Gas Automata (LGA)
• Lattice Boltzmann Method (LBM)
• Dissipative Particle Dynamics (DPD)
• Smooth Particle Hydrodynamics (SPH)
• Stochastic Rotation Dynamics (SRD)
• Direct Simulation Monte Carlo (DSMC)
193
• SPH describes a fluid by replacing its continuum properties with locally (smoothed) quantities at discrete Lagrangian locations meshless
• SPH is based on integral interpolants (Lucy 1977, Gingold & Monaghan 1977, Liu 2003)
(W is the smoothing kernel)
• These can be approximated discretely by a summation interpolant
'd,' ' rrrrr hWAA
j
jN
jjj
mhWAA
1
, rrrr
Smooth Particle Hydrodynamics
194
The kernel (or weighting Function)
• Example: quadratic kernel
1
4
1
2
3, 2
2qq
hhrW
W(r-r’,h)
Compact supportof kernel
WaterParticles
2h
Radius ofinfluence
r
| | , barh
rq rr
Smooth Particle Hydrodynamics
195
• Spatial gradients are approximated using a summation containing the gradient of the chosen kernel function
• Advantages are:– spatial gradients of the data are calculated analytically
– the characteristics of the method can be changed by using a different kernel
ijijj j
ji WA
mA
ijij
jijii Wm . . uuu
Smooth Particle Hydrodynamics
196
Equations of Motion
• Navier-Stokes equations:
• Recast in particle form as:d
d
jiii j ij
j ij
m Wt
vrv
ijj
ijiji Wm
t vvd
d
iijj
iijj
j
i
ij
i Wpp
mt
Fv
22d
d
v.d
d
t
2d 1
d ipt
v
u F
0
d
d
t
mi
Smooth Particle Hydrodynamics
197
Simulation of free surface
198
Simulation of free surface
199
Simulation of free surface
200
Dwarf Galaxy Formation
201
Discrete fluid solvers
• Lattice Gas Automata (LGA)
• Lattice Boltzmann Method (LBM)
• Dissipative Particle Dynamics (DPD)
• Smooth Particle Hydrodynamics (SPH)
• Stochastic Rotation Dynamics (SRD)
• Direct Simulation Monte Carlo (DSMC)
202
Stochastic Rotation Dynamics
Stochastic Rotation Dynamics (SRD)• introduction of representative fluid particles
• collective interaction by rotation of local particle velocities
• very simple dynamics, but recovers hydrodynamics correctly
• Brownian motion is intrinsic
203
Stochastic Rotation Dynamics
Shift grid to impose
Galilean invariance.
Example of two particles in cell:
204
Shear flow
205
One particle in fluid
particlevv
fluid
e.g. pull sphere through fluid
particlev
Γ
no-slip condition:
create shear in fluid : exchange momentum
movingboundary condition
206
Drag force
AdFD
jiij ij
j i
vvp
x x
drag force
stress tensor
η = μ is static viscosity
(Bernoulli‘s principle)
207
Homogeneous flow
Re << 1 Stokes law:
FD = 6π η R v(exact for Re = 0)
R
v
Re >> 1 Newton‘s law: FD = 0.22π R2v2
general drag law:
CD is the drag coefficient
22
Re8 DD CF
R is particle radius, v is relative velocity
208
Drag coefficient CD
Reynolds number Re = Dv/μ
Re
209
Inhomogeneous flow
In velocity or pressure gradients: Lift forcesare perpendicular to the direction of the external flow,
important for wings of airplanes.
when particle rotates: Magnus effectimportant for soccer
lift force:
CL is „lift coefficient“
2v
2LL C A
210
Many particles in fluids
•The fluid velocity field followsthe incompressible NavierStokes equations.
• Many industrial processesinvolve the transport of solidparticles suspended in a fluid.The particles can be sand,colloids, polymers, etc.
•The particles are dragged bythe fluid with a force:
simulating particles moving in a sheared fluid
22
Re8 DD CF
211
Stokes limit
hydrodynamic interaction between the particles
ij
jjiiji vrrMv
matrixmobility
)(
for Re = 0 mobility matrix exact
Stokesian Dynamics (Brady and Bossis)
invert a full matrix only a few thousand particles
212
Numerical techniques
Calculate stress tensor directly by evaluating the gradients of the velocity field
through interpolation on the numerical grid,e.g. using Chebychev polynomials .
Method of Fogelson and Peskin:Advect markers that were placed in the particle and then put springs between
their new an their old position.These springs then pull the particle.
1
2
Numerical techniques
2 Method of A.L. Fogelson and C.S. Peskin:
Advect markers that were placed in the
particle and then put springs between
their new an their old position.
These springs then pull the particle.
216
Sedimentation
comparing experiment and simulation
Glass beadsdescendingin silicon oil
Sedimentation of platelets
Oblate ellipsoids descend
in a fluid under the action
of gravity.
This has applications inbiology (blood), industry(paint) and geology (clay).
Thesis of Frank Fonseca
θ = 0.15 in 3d
228
Oral exams
Jan.22-Feb.02
2017
229
15 relevant questions
• Congruential and lagged-Fibbonacci RN• Definition of percolation• Fractal dimension and sand-box method• Hoshen-Kopelman algorithm• Finite size scaling• Integration with Monte Carlo• Detailed balance and MR2T2
• Ising model
230
15 relevant questions
• Simulate random walk
• Euler method
• 2nd order Runge-Kutta
• 2nd order predictor-corrector
• Jacobi and Gauss-Seidel relaxation
• Gradient methods
• Strategy of finite elements, finite volumes and spectral methods
231
Next semester402-0810 Computational Quantum Physics