cee 618 scientific parallel computing (lecture 12) f ma · cee 618 scientific parallel computing...

5
CEE 618 Scientific Parallel Computing (Lecture 12) Dissipative Hydrodynamics (DHD) Albert S. Kim Department of Civil and Environmental Engineering University of Hawai‘i at Manoa 2540 Dole Street, Holmes 383, Honolulu, Hawaii 96822 1 / 26 Particle Dynamics Outline 1 Particle Dynamics Introduction Brownian Dynamics Stokesian Dynamics Lab work and Project 2 Raster3D Visualizing Spheres 2 / 26 Particle Dynamics Introduction What is Particle Dynamics? A study of motion of multiple particles, influenced by forces and torques 3 / 26 Particle Dynamics Introduction What is the force? FORCE A push or pull that can cause an object with mass to accelerate Newton’s second law: F = ma Acceleration: a = dv dt = d 2 r dt 2 ENERGY A scalar physical quantity that is a property of objects and systems which is conserved by nature The ability to do work: E = r2 r1 F · dr only if F = F(r). 4 / 26 Particle Dynamics Introduction Statistical Mechanical Approaches 1 Nano-scale (10 9 m) MD (Molecular Dynamics) = Deterministic simulation of solving Newton’s second law for ion species 2 Nano to Micro-scale (10 6 m) BD (Brownian Dynamics) = Updated simulation protocol of MD for ions in a fluid medium, but more applied to volumeless (point) colloidal/nano-particles: Random Forces/Torques DPD (Dissipative Particle Dynamics) = Simulation method for Brownian motion of multiple particles using (approximate) pair-wise hydrodynamics. 3 Nano to Meso-scale (10 3 m) SD (Stokesian Dynamics) = Accurate simulation method for micro-hydrodynamics of spherical particles DHD = General simulation method for micro-hydrodynamics of Brownian and non-Brownian particles 5 / 26 Particle Dynamics Brownian Dynamics Brownian Dynamics: Langevin’s Equation The Langevin equations for the system of N Brownian particles: for particle i interacting with j ’s ˙ p i = m i ˙ v i = F i (r) + j () ξ ij v j + j α ij f j 1 Molecular Dynamics for conservative forces/torques 2 Stokesian Dynamics for hydrodynamic forces/torques 3 Dissipative Particle Dynamics for stochastic forces/torques * On the average hydrodynamic stochastic p i = m i v i is the momentum, ξ ij is the hydrodynamic friction tensor, F i is the sum of inter-particle and external forces, and j α ij f j represents the randomly fluctuating force exerted on a particle by the surrounding fluid : negligible if particles are much bigger than 1.0 μm. 6 / 26

Upload: others

Post on 21-Jan-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: CEE 618 Scientific Parallel Computing (Lecture 12) F ma · CEE 618 Scientific Parallel Computing (Lecture 12) Dissipative Hydrodynamics (DHD) Albert S. Kim Department of Civil and

CEE 618 Scientific Parallel Computing (Lecture 12)Dissipative Hydrodynamics (DHD)

Albert S. Kim

Department of Civil and Environmental EngineeringUniversity of Hawai‘i at Manoa

2540 Dole Street, Holmes 383, Honolulu, Hawaii 96822

1 / 26

Particle Dynamics

Outline

1 Particle Dynamics

Introduction

Brownian Dynamics

Stokesian Dynamics

Lab work and Project

2 Raster3D

Visualizing Spheres

2 / 26

Particle Dynamics Introduction

What is Particle Dynamics?

A study of motion of multiple particles,

influenced by forces and torques

3 / 26

Particle Dynamics Introduction

What is the force?

FORCE

A push or pull that can cause an object with mass to accelerate

Newton’s second law:

F = ma

Acceleration:

a =dv

dt=

d2r

dt2

ENERGY

A scalar physical quantity that is a property of objects and

systems which is conserved by nature

The ability to do work:

E = −∫

r2

r1

F · dr

only if F = F(r).

4 / 26

Particle Dynamics Introduction

Statistical Mechanical Approaches

1 Nano-scale (10−9 m)

MD (Molecular Dynamics) = Deterministic simulation of solving

Newton’s second law for ion species

2 Nano to Micro-scale (10−6 m)

BD (Brownian Dynamics) = Updated simulation protocol of MD for

ions in a fluid medium, but more applied to volumeless (point)

colloidal/nano-particles: Random Forces/Torques

DPD (Dissipative Particle Dynamics) = Simulation method for

Brownian motion of multiple particles using (approximate) pair-wise

hydrodynamics.

3 Nano to Meso-scale (10−3 m)

SD (Stokesian Dynamics) = Accurate simulation method for

micro-hydrodynamics of spherical particles

DHD = General simulation method for micro-hydrodynamics of

Brownian and non-Brownian particles

5 / 26

Particle Dynamics Brownian Dynamics

Brownian Dynamics: Langevin’s Equation

The Langevin equations for the system of N Brownian particles:

for particle i interacting with j’s

pi = mivi = Fi (r) +∑

j

(−) ξijvj +∑

j

αijfj

1 Molecular Dynamics for conservative forces/torques2 Stokesian Dynamics for hydrodynamic forces/torques3 Dissipative Particle Dynamics for stochastic forces/torques

* On the average hydrodynamic ≈ stochastic

pi = mivi is the momentum,

ξij is the hydrodynamic friction tensor,

Fi is the sum of inter-particle and external forces, and∑

j αijfj represents the randomly fluctuating force exerted on a

particle by the surrounding fluid: negligible if particles are much

bigger than 1.0 µm.

6 / 26

Page 2: CEE 618 Scientific Parallel Computing (Lecture 12) F ma · CEE 618 Scientific Parallel Computing (Lecture 12) Dissipative Hydrodynamics (DHD) Albert S. Kim Department of Civil and

Particle Dynamics Brownian Dynamics

Properties of Random Fluctuating Force, fi

1 Time average is zero:

〈fi〉 = 0 (1)

2 Independently exerted on i and j particle of different positions

(i.e., ri and rj) and at different times (i.e., t and t′)

〈fi (t) fj(

t′)

〉 = 2δijδ(

t− t′)

(2)

3 δ is the Dirac-delta function:

δij = 0 if i 6= j; and δij = 1 if i = j;

δ (t− t′) = 0 if t 6= t′; and δ (t− t′) = 1 if t = t′.

4 Related to the friction coefficient

ξij =1

kBT

k

αikαjk (3)

indicating α ∼√ξ.

7 / 26

Particle Dynamics Brownian Dynamics

Brownian Dynamics

Integration of the Langevin equation gives the time evolution equation:

ri (t+∆t) = ri (t) +∑

j

Dij (t)

kBT· Fj ∆t+ (∇ ·D)∆t+∆rGi (4)

where the components of ∆rGi are random displacements selected

from 3N variate Gaussian distribution with zero means and

covariance matrix

〈∆rGi 〉 = 0 and 〈∆rGi ∆rGj 〉 = 2Dij∆t (5)

The Oseen tensor (crude approximation) is given by

Dij =kBT

6πηa1, for i = j (6a)

=kBT

8πηrij

(

1+rijrij

r2ij

)

, for i 6= j (6b)

and one calculates ∇ ·D = 0. If Fj ≈ 0, the random motion is

dominant in multi-particle dynamics: ∆rGi ∝√∆t.

8 / 26

Particle Dynamics Brownian Dynamics

Brownian Dynamics (BD)

Langevin equation1 with inter-particle (conservative) forces fP ,

drag forces fH = −ξv, and random Brownian forces fB

mdv

dt= fP + fH + fB (t) (7a)

fH = −ξv (7b)

〈fB(t)〉 = 0 (7c)

〈fB(0) · fB(t)〉 = 6ξkBTδ (t) (7d)

1Ermak and McCammon, J. Chem. Phys. 69 (1978) 1352-1360; Langevin,

C. R. Acad. Sci. (Paris) 146 (1908) 530-5339 / 26

Particle Dynamics Brownian Dynamics

e.g., a falling body in liquid with x(0) = 0 & v(0) = 0

ma = −mg − βv + fB (t)

10 / 26

Particle Dynamics Stokesian Dynamics

Stokesian Dynamics: Langevin’s Equation

The Langevin equations for the system of N force-free, non-Brownian

particles

pi = mivi = −∑

j

ξij (vj − U) ≡ FH

FH is the hydrodynamic forces/torques,

pi = mivi is the momentum, and

ξij is the hydrodynamic friction tensor.

If particles are at rest,

U = M∞ · FH (8)

FH = R∞ ·U (9)

R∞ = (M∞)−1 (10)

where U is the translational/rotational velocity vector, and M∞ and

R∞ are the grand mobility and grand resistance matrixes, respectively.

R∞ is dependent on particle positions and calculated as an inverse

matrix of M∞.11 / 26

Particle Dynamics Stokesian Dynamics

Stokesian Dynamics (SD)

Particles translate and rotate in a fluid field of

V = U∞ + r ×Ω∞ +E∞ : r

where U∞ is the uni-directional flow; and the vorticity Ω∞ and rate of

strain E∞ are represented as

Ω∞ = 1

2∇× V (r)

E∞

ij =1

2

(

∂Vi

∂xj+

∂Vj

∂xi

)

= 1

2(∂jVi + ∂iVj) = Eji

respectively. If no shear, E∞ = 0

12 / 26

Page 3: CEE 618 Scientific Parallel Computing (Lecture 12) F ma · CEE 618 Scientific Parallel Computing (Lecture 12) Dissipative Hydrodynamics (DHD) Albert S. Kim Department of Civil and
Page 4: CEE 618 Scientific Parallel Computing (Lecture 12) F ma · CEE 618 Scientific Parallel Computing (Lecture 12) Dissipative Hydrodynamics (DHD) Albert S. Kim Department of Civil and

Particle Dynamics Stokesian Dynamics

Directions of force/torque: Fx, Fy, Fz, Tx, Ty, Tz

Exerted on each particle with upflow, U = +1 (↑).

19 / 26

Particle Dynamics Lab work and Project

Lab work

SD code code for hydrodynamic force/torque calculation is in

/opt/cee618s13/class12/hasonjee/

20 / 26

Raster3D

Outline

1 Particle Dynamics

Introduction

Brownian Dynamics

Stokesian Dynamics

Lab work and Project

2 Raster3D

Visualizing Spheres

21 / 26

Raster3D Visualizing Spheres

Raster3D

http://skuld.bmsc.washington.edu/raster3d/

1 Raster3D is a set of tools for generating high quality raster images

of proteins or other molecules.2 The core program renders spheres, triangles, cylinders, and

quadric surfaces with specular highlighting, Phong shading, and

shadowing.22 / 26

Raster3D Visualizing Spheres

Example 1

1 Copy all the files from

/opt/cee618s13/class12/raster3d/example1/

to your own directory.2 Type and enter: qsub⊔raster_ex1.pbs3 This pbs script will execute example1h.script and generate an

image file, example1h.tff

23 / 26

Raster3D Visualizing Spheres

Sphere configuration: 6× 6× 6 array

Under ‘/mnt/home/albertsk/UHTraining/cee618-sp2012/class09/DHD’1 In “sHsnj_obsd_fts_64.f”

To rotate image change Euler angles of alpha0, beta0, and

gamma0.

To change the distance between the center and your eyes, control

distance “sHsnj_obsd_fts_64.f”.

2 “Raster3Dspheres.f” is included in the main code

“sHsnj_obsd_fts_64.f”.3 There will be three output files from this serial run:

1 “sForceFTS.dat” stores force/torque calculation data.2 “sCoordXYZ.dat” includes (x, y, z) coordinates of Np particles.3 “sCoordXYZ.r3d” contains Raster3D format coordinate data,

translated to the center of mass.

24 / 26

Page 5: CEE 618 Scientific Parallel Computing (Lecture 12) F ma · CEE 618 Scientific Parallel Computing (Lecture 12) Dissipative Hydrodynamics (DHD) Albert S. Kim Department of Civil and

Raster3D Visualizing Spheres

How to generate an image

1 Copy all the files in /opt/cee618s13/class12/dhd-raster3d/ to your

own directory.2 Execute

$ make

$ make⊔run3 Then, a file like “sCoordXYZ.tff” will be generated.4 Download the .tff file and view it.

25 / 26

Raster3D Visualizing Spheres

Raster file: sCoordXYZ.r3d, x, y, z, a, and 3 more

1 Example of material properties and file indirection

2 80 64 tiles in x,y

3 8 8 pixels (x,y) per tile

4 4 3x3 virtual pixels -> 2x2 pixels

5 0 0.1 0 background colour

6 T cast shadows

7 25 Phong power

8 0.15 secondary light contribution

9 0.05 ambient light contribution

10 0.25 specular reflection component

11 4.0 eye position

12 1 1 1 main light source position

13 0.578E+00 -0.259E+00 0.483E+00 0.000E+00

14 0.224E+00 0.966E+00 0.129E+00 0.000E+00

15 -0.500E+00 0.000E+00 0.866E+00 0.000E+00

16 0.000E+00 0.000E+00 0.000E+00 0.900E+02

17 3 mixed objects

18 *19 *20 *21 # Draw a bunch of spheres

22 #

23 #

24 #

25 @orange.r3d

26 2

27 -.241800E+02 -.241800E+02 -.241800E+02 0.100000E+01 0.100000E+01 0.100000E+01 0.100000E+01

28 @green.r3d

29 2

30 -.806000E+01 -.241800E+02 -.241800E+02 0.100000E+01 0.100000E+01 0.100000E+01 0.100000E+01

31 @blue.r3d

32 2

33 0.806000E+01 -.241800E+02 -.241800E+02 0.100000E+01 0.100000E+01 0.100000E+01 0.100000E+01

34 @red.r3d

26 / 26