Beruflich Dokumente
Kultur Dokumente
Monte Carlo method: Definitions Basic concepts of kinetic theory of gases Applications of DSMC Generic algorithm of the DSMC method Summary
Reading: G.A. Bird, Molecular gas dynamics and the direct simulation of gas flows. Clarendon Press, 1994
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 For a dilute gas Collision length scale d is much smaller then the average distance between molecules l = 1 / n1/3 = d / 1/3, d << l => most of time every molecule moves without interactions with other ones, hence, an interaction between molecules can be considered as an instant change of their velocities, i.e. as a collision between billiardball-like particles. Real process of molecular motion can be divided into two stages: (I) collisionless (free) motion of molecules and (II) instant collisions between them If PN is the probability of simultaneous interaction between N gas molecules, then PN+1/PN => only binary collisions between gas molecules are important
3
=
g t 2d
ngt = ng t
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
Local equilibrium
Non-equilibrium flows
HD
Si wafer
Soot clusters 6
ri fei
vi
n1, 1
n2, 2
If n1 1 = n2 2 , then the collision frequencies are the same in both flows. If other conditions in both flows are the same, then two flows are equivalent to each other.
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
sim
n = = W nsim
d 2 vi mi = f ij + f ei 2 dt j
Interaction force between molecules i and j
i = 1,..., N
External force
DSMC simulations:
Splitting at a time step
d 2 vi mi = f ei 2 dt d 2 vi mi = f ij 2 dt j
(*)
Special probabalistic approach for sampling of binary collisions instead of direct solution of Eq. (*) Use of statistical weights
Gas state
Where applied
No limitations, usually, No limitations, / L > 0.01 usually, / L < 0.1 Moderate Low
11
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 Relative velocity of molecules i and j
g ij = v j v i
g ij =| g ij |
g ij
ij ( sim )
j
Pij =
g ij t
ij ( sim ) g ij t Vcell
14
Collision sampling in a cell : Calculation of particle velocities after a binary collision of hard sphere
Velocities before collision Conservation laws of momentum, energy, and angular momentum Velocities after collision Equations for molecule velocities after collision
For hard sphere (HS) molecules unity vector n is an isotropic random vector:
Calculation of the collision probability Does collision between molecules i and j occur? Calculation of velocities after collision
Disadvantage of the primitive scheme: Number of operation ~ Ncell2 In real DSMC simulations, more efficient schemes for collision sampling are used, e.g. the NTC scheme by Bird
16
Permeable boundary between the computational domain and the reservoir of molecules (e.g. Earth atmosphere) : free motion of molecules through boundary reproducing inflow/outflow fluxes
Reservoir (Earth atmosphere) Computational domain 17
y nw Vi z
Vr x
In DSMC simulations, velocity of every molecule incident to the wall is replaced by the velocity of the reflected molecule. In simulations, the Maxwell models of molecule rebound are usually applied.
x1
1.
x2
At every time step of DSMC simulations All molecules moving from the computational domain into reservoir is excluded from further simulations Reservoir is filled by N=nV molecules, where V is the reservoir volume. Random coordinates of every molecule in reservoir are generated homogeneously, random velocities are generated from the Maxwelian distribution. All molecules in the reservoir are moved: Their positions and velocities are changed with accordance to their equations of motion during a time step. All molecules from the reservoir that entered the computational domain during a time step are included to the set of simulated molecules. All other molecules from the reservoir are excluded from further simulations.
2.
x = x1 + ( x2 x1 )1 y = y1 + ( y2 y1 ) 2 z = z1 + ( z 2 z1 ) 3
Random velocities:
3.
4.
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 20 flows. Clarendon Press, 1994.