Beruflich Dokumente
Kultur Dokumente
• Reading: G.A. Bird, Molecular gas dynamics and the direct simulation
of gas flows. Clarendon Press, 1994
1
Direct Simulation Monte Carlo of gas flows: Definitions
• Monte Carlo method is a generic numerical method for a variety of
mathematical problems based on computer generation of random
numbers.
2
Dilute gas
• DSMC is applied for simulations of flows of a dilute gas
• Dilute gas is a gas where the density parameter ε (volume fraction) is small
ε = n d3 << 1
n is the numerical concentration of gas molecule
d is the diameter of gas molecules
• In Earth atmosphere, air can be considered as a dilute gas at any altitude, e.g.
on the Earth surface n = 2.7 x 1025 m-3, d = 3.7 x 10-10 m, and ε = 1.4 x 10-3
g nσg∆t
ν= = nσg
∆t
g · ∆t 2d
• Mean free path of a molecule λ = g · (1 / ν ) = 1 / ( n σ )
• Knudsen number Kn = λ / L = 1 / ( n σ L ), L is the flow length scale
Knudsen number is a measure of importance of collisions in a gas flow
Kn << 1 (Kn < 0.01) Kn ~ 1 Kn >> 1 (Kn > 10)
Continuum flow Transitional flow Free molecular (collisionless) flow
4
Local equilibrium Non-equilibrium flows
Applications of DSMC simulations (I)
• Aerospace applications: Flows in upper atmosphere and in vacuum
Satellites and spacecrafts Re-entry vehicles in Nozzles and jets
on LEO and in deep space upper atmosphere in space environment
5
Applications of DSMC simulations (II)
• Fast, non-equilibrium gas flows (laser ablation, evaporation, deposition)
Soot
HD Si wafer clusters
6
Basic approach of the DSMC method
• Gas is represented by a set of N simulated molecules (similar to MD)
X(t)=(r1(t),V1(t),…,rN(t),VN(t))
• Velocities Vi (and coordinates ri) of gas molecules are random variables. Thus, DSMC is
a probabilistic approach in contrast to MD which is a deterministic one.
• Gas flow is simulated as a change of X(t) in time due to
– Free motion of molecules or motion under the effect of external (e.g. gravity) forces
– Pair interactions (collisions) between gas molecules
– Interaction of molecules with surfaces of streamlined bodies, obstacles, channel
walls, etc.
Pair collision
External force field fe In typical DSMC simulations
(e.g. flow over a vehicle in
Earth atmosphere) the
ri vi computational domain is a
fei part of a larger flow. Hence,
some boundaries of a
domain are ‘transparent’ for
molecules and number of
simulated molecules, N, is
varied in time.
n1, σ1 n2, σ2 If n1 σ1 = n2 σ2 ,
then the collision frequencies
are the same in both flows.
• Thus, in DSMC simulations the number of simulated molecules can not be equal to the
number of molecules in real flow. This differs DSMC from MD, where every simulated
particle represents one molecule of the real system.
• Every simulated molecule in DSMC represents W molecules of real gas, where
W = n / nsim is the statistical weight of a simulated molecule. In order to make flow of
simulated molecules the same as compared to the flow of real gas, the cross-section of
simulated molecules is calculated as follows
n
σ sim =σ = σW
nsim 8
DSMC algorithm (after G.A. Bird)
• Any process (evolving in time or steady-state) is divided into short time
intervals – time steps ∆t
X(t)=(r1(t),V1(t),…,rN(t),VN(t))
Xn = X(tn), state of simulated molecules at time tn
Xn+1 = X(tn+1), state of simulated molecules at time tn+1 = tn + ∆t
• At every time step, the change of Xn into Xn+1 (Xn → Xn+1) is splitted into a
sequence of three basic stages
– Stage I. Collisionless motion of molecules (solution of the motion
equations)
Xn → X*
– Stage II. Collision sampling (pair collisions between molecules)
X* → X**
– Stage III. Implementations of boundary conditions (interactions of
molecules with surfaces, free inflow/outflow of molecules through
boundaries, etc)
X** → Xn+1
Thus, in contrast with MD, where interaction between particles are
described by forces in equations of motion, in DSMC, interactions
between particles is described by means of a special random algorithm
(collision sampling) which is a core of any DSMC computer code.
9
DSMC vs. Molecular Dynamics (MD) simulations
Both MD and DSMC are particle-based methods
MD simulations: Direct solution of the motion equations at a time step
d 2 vi
mi 2
= ∑ f ij + f ei i = 1,..., N
dt j
MD DSMC CFD
Theoretical model Classical equations Boltzmann kinetic Navier-Stokes
of motion for equation equations
particles
Gas state Dilute gas, dense Dilute gas Dilute gas
gas, clusters, etc.
Where applied Dense gas flows, Transitional and free Continuum near-
phase changes, molecular non- equilibrium flows
complex molecules equilibrium flows
Typical flow length Less then 1 No limitations, usually, No limitations,
scale L micrometer λ / L > 0.01 usually, λ / L < 0.1
12
Stage II. Collision sampling (after G.A. Bird)
X* = (r1*,V1*,…,rN*,VN*)
X* → X**
• Computational domain is divided into a mesh of cells.
Cell
• For every molecule, the index of cell to which the molecule belongs is calculated
(indexing of molecules).
• At a time step, only collisions between molecules belonging to the same cell are taken
into account
• Every collision is considered as a random event occurring with some probability of
collision
• In every cell, pairs of colliding molecules are randomly sampled (collision sampling in a
cell). For every pair of colliding molecules, pre-collisional velocities are replaced by
their post-collisional values.
13
Collision sampling in a cell : Calculation of the
collision probability during time step
Cell of volume Vcell containing Ncell
molecules Molecules are assumed to be
distributed homogeneously within
the cell
14
Collision sampling in a cell : Calculation of particle
velocities after a binary collision of hard sphere
Velocities Velocities
before after
collision collision
For hard sphere (HS) molecules unity vector n is an isotropic random vector:
nx = cos θ, n y = sin θ cos(2πα 2 ), nz = sin θ sin(2πα 2 ),
cos θ = 1 − 2α1 , sin θ = 1 − cos 2 θ
αi is a random number distributed with equal probability from 0 to 1.
In a computer code, it can be generated with the help of library functions, 15
which are called ‘random number generators’.
Collision sampling in a cell: The ‘primitive’ scheme
i=1
j=i+1 Disadvantage of
Calculation of the the primitive
Pij = ∆tσij(sim)gij / Vcell collision probability scheme:
17
Rebound of molecules from an impermeable wall
• Boundary condition is based on the Maxwell model of specular scattering: A
model describing the rebound of an molecule reflects from the wall like an
individual gas molecule from the wall. ideal billiard ball, i.e.
• The model should defined the velocity of Vrx = Vix, Vry = - Viy, Vrz = Viz
reflected molecule as a function of the Vr = Vi – 2 ( Vi · nw ) nw
velocity of the incident molecule,
Vr=Vr(Vi,nw,Tw,…). Disadvantage: heat flux and shear drag on
the wall are zero (Vr2 = Vi2). The model is
y capable to predict normal stress only.
Vr
nw Maxwell model of diffuse scattering: Velocity
distribution function of reflected molecules is
Vi
x assumed to be Maxwellian:
nr mVr2
Tw, wall temperature f (Vr ) = exp −
z (2π(k / m)Tr )3 / 2 2 kTw
3. All molecules in the reservoir ‘are moved’: Their positions Random velocities:
and velocities are changed with accordance to their
equations of motion during a time step. Vx = U ∞x + − 2(k / m)T∞ lg α1 cos(2πα 2 )
4. All molecules from the reservoir that entered the V y = U ∞y + − 2(k / m)T∞ lg α 3 cos(2πα 4 )
computational domain during a time step are included to
the set of simulated molecules. All other molecules from Vz = U ∞z + − 2(k / m)T∞ lg α 5 sin(2πα 6 )
the reservoir are excluded from further simulations.
19
Summary
DSMC is a numerical method for simulations of free-molecular, transitional and
near-continuum flows of a dilute gas on a level of individual molecules.
It is usually used for flows where the local state of gas molecules is far from the
local equilibrium
As compared to MD, DSMC has the following distinctive features
Every simulated molecule in DSMC represents W molecules in real flow, typically
W >> 1. It makes DSMC capable for simulation of flows with almost arbitrary length
scale (e.g., planetary atmosphere).
Interactions between molecules are taken into account in the framework of a special
collision sampling algorithm, where interactions (pair collisions) are considered as
random events and simulated based on generation of random numbers.
Typically, an implementation of DSMC in a computer code relays on two types
of models describing
Pair collision between molecules
Rebound of a molecule from an impermeable wall
Though in this lecture we consider only hard sphere molecules, a variety of models
exists for both inter-molecular and molecule-wall collisions. These models are
capable to account for many features of molecules in real gases (e.g., internal
degrees of freedom, etc.)
Reading: G.A. Bird, Molecular gas dynamics and the direct simulation of gas
flows. Clarendon Press, 1994. 20