Vous êtes sur la page 1sur 35

Direct Simulation Monte Carlo is a well-established method for the computer

simulation of a gas flow at the molecular level. While there is a limit to the size
of the flow-field with respect to the molecular mean free path, personal computers
now allow solutions well into the continuum flow regime. The method can be
applied to basic problems in gas dynamics and practical applications range from
micro-electro-mechanics systems (MEMS) to astrophysical flows. DSMC
calculations have assisted in the design of vacuum systems, including those for
semiconductor manufacture, and of many space vehicles and missions.
The method was introduced by the author fifty years ago and it has been the
subject of two monographs that have been published by Oxford University Press.
It is now twenty years since the second of these was written and, since that time,
most DSMC procedures have been superseded or significantly modified. In
addition, visual interactive DSMC application programs have been developed that
have proved to be readily applicable by non-specialists to a wide variety of practical
problems. The computational variables are set automatically within the code and
the programs report whether or not the criteria for a good calculation have been
met. This book is concerned with the theory behind the current DSMC molecular
models and procedures, with their integration into general purpose programs, and
with the validation and demonstration of these programs. The DSMC and
associated programs, including all source codes, can be freely downloaded through
links that are provided in the book.
The main accompanying program is simply called the "DSMC program" and, in
future versions of the book, it will be applicable to homogeneous (or
zero-dimensional) flows through to three-dimensional flow. All DSMC simulations
are time-accurate unsteady calculations, but the flow may become steady at large
times. The current version of the DSMC code is applicable only to zero and
one-dimensional flows and the older DS2V code is employed for the
two-dimensional validation and demonstration cases. It is because of this
temporary use of the older and well-proven program that the DS2V source code
is made freely available for the first time.
Most of the homogeneous flow cases are validation studies, but include internal
mode relaxation studies and spontaneous and forced ignition leading to combustion
in an oxygen-hydrogen mixture. The one-dimensional cases include the structure
of a re-entry shock wave that takes into account electronic excitation as well as
dissociation, recombination and exchange reactions. They also include a
spherically imploding shock wave and a spherical blast wave. The two-dimensional
and axially-symmetric demonstration cases range from a typical MEMS flow to
aspects of the flow around rotating planets. Intermediate cases include the
formation and structure of a combustion wave, a vacuum pump driven by thermal
creep, a typical vacuum processing chamber, and the flow around a typical re-entry
vehicle.

Description of the code Line by Line

The first version of the DSMC.F90 program can be applied to homogeneous gases
and one-dimensional flows with plane, cylindrical or spherical geometry. Future
versions will extend it to cover two-dimensional flows with plane or axially-symmetric
geometry and three-dimensional flows. All DSMC calculations have physical time
as a variable and are unsteady flows. However, if the boundary conditions are such
that a time-invariant state is attained at large times, this steady flow can be studied.

Following constants are used in the code

!***********************
constants
PI=3.1415926535897932D00
DPI=6.283185307179586D00
SPI=1.772453850905516D00
BOLTZ=1.380658D-23
AVOG=6.022169D26
!***********************

1 IRUN specify whether it is to be a new run or the continuation of a previous run


that has generated the necessary restart files.

2 ICLASS specify whether it is for a homogeneous gas, a one-dimensional flow, a


two-dimensional flow, an axially-symmetric flow, or a three-dimensional flow
3 IMEG number of megabytes of storage that are required for the initial number of
simulated molecules in the calculation. This is the only computational
variable that is required in the data files and the number of simulated
molecules must be sufficiently large to permit the criteria for a good DSMC
simulation to be met.
The program can check whether the total number of simulated molecules
is sufficiently large and warnings can be generated if the criteria for a good
calculation have been met.
4 ISF Steady of unsteady flow
5. DS01.DAT Input file
6. DS01.TXT Diagnosis file
7. NMCC DEFAULT=15--desired number of simulated molecules in a collision cell
8. CPDTM DEFAULT=0.2--fraction of the local mean collision time that is the desired
maximum time step
9. TPDTM DEFAULT=0.5--the fraction or multiple of a sampling cell transit time that
is the desired maximum time step

10 NNC DEFAULT=0--0 to select collision partner randomly from collision cell, 1 for
. nearest-neighbour collisions
11 SAMPRAT DEFAULT=5--the number of time steps in a sampling interval
12 OUTRAT DEFAULT=50--the number of flow samples in a file output interval
.
13 FRACSAM DEFAULT=0.5--fraction of the output interval over which a time-averaged
sample is taken in an unsteady flow
14 IMTS DEFAULT=0--0 to set the move time step to the instantaneous overall time
. step that changes with time, 1 to use a cell dependent collision time, 2 to
keep the time step fixed at the initial value
15 TLIM DEFAULT=1.D20 sets an indefinite run - set if a define STOP time is
. required
16 READ_DATA Subroutine to read Gas data
.
17 IGAS Type of gas: hard sphere, ideal N2, real O2 etc.
.
18 FND(1) Number density of the gas
.
19 FTMP(1) Free stream temperature of Gas
.
20 MMVM the maximum number of vibrational modes of any species
.
21 MELE the maximum number of electronic states of any molecule
.
22 MVIBL the maximum number of vibrational levels for detailed balance lists
23 MMRM 0 if gas is completely monatomic, 1 if some species have rotation
24 MSP the number of molecular species
25 MEX number of exchange or chain reactions
26 MMEX maximum number of exchange reactions involving the same precollision
pair of molecules
27 MNSR the number oF surface reactions
28 SP(1,L) reference diameter of species L
SP(2,L) reference temperature of species L
SP(3,L) viscosity-temperature power law of species L
SP(4,L) reciprocal of the VSS scattering parameter
SP(5,L) molecular mass of species L
SP(6,L) the heat of formation at 273 K.
29 ISPR(1,L) number of rotational degrees of freedom of species L
.
30 ISPR(2,L) 0,1 for constant, polynomial rotational relaxation collision number
31 SPR(1,L) constant rotational relaxation collision number or constant in a second order
SPR(2,L) polynomial coefficient of temperature in the polynomial
SPR(3,L) coefficient of temperature squared in the
32 ISPV(1) number of vibrational modes

33 SPM(1,L,M) the reduced mass for species L,M


SPM(2,L,M) reference collision cross-section for species L,M
SPM(3,L,M) mean value of the viscosity-temperature power law
SPM(4,L,M) reference diameter for L,M collisions
SPM(5,L,M) reference temperature for species L,M
SPM(6,L,M) reciprocal of the gamma function of (5/2-w) for species L,M
SPM(7,L,M) rotational relaxation collision number for species L,M, or const in polynomial
SPM(8,L,M) reciprocal of VSS scattering parameter
34 SPVM(1,K,L) characteristic vibrational temperature
SPVM(2,K,L) constant Zv, or reference Zv for mode K
SPVM(3,K,L) -1. for constant Zv, or reference temperature
SPVM(4,K,L) the characteristic dissociation temperature
SPVM(5,K,L) arbitrary rate reduction factor
35 ISPVM(1,K,L) the species code of the first dissociation product
ISPVM(2,K,L) the species code of the second dissociation product
36 NELL(L) the number of electronic levels of species L
37 QELC(N,M,L) for up to M levels of form g*exp(-a/T) in the electronic partition function
for species L
N=1 degeneracy g
N=2 coefficient a
N=3 ratio of the excitation cross-section to the elastic
cross-section
38 ISPRC(L,M) the species of the recombined molecule from species L and M
39 ISPRK(L,M) the applicable vibrational mode of this species
40 SPRC(1,L,M,K) the constant a in the ternary collision volume
SPRC(2,L,M,K) the temperature exponent b in the ternary collision volume
41 SPRT(1,L,M) lower temperature value for SPRP
SPRT(2,L,M) higher temperature value for SPRP
42 SPRP(1,L,M,K) cumulative dissociation distribution to level K for products L and M at lower
SPRP(2,L,M,K) temperature
!ditto at higher temperature, for application to post-recombination molecule!
43 NSPEX(L,M) number of exchange reactions with L,M as the pre-collision species

44 in the following variables, J is the reaction number (1 to NSPEX(L,M))


ISPEX(J,1,L,M) species that splits in an exchange reaction
ISPEX(J,2,L,M) the other pre-reaction species (all ISPEX are set to 0 if no exchange
ISPEX(J,3,L,M) reaction)
ISPEX(J,4,L,M) the post-reaction molecule that splits in the opposite reaction
ISPEX(J,5,L,M) the other post-reaction species
ISPEX(J,6,L,M) the vibrational mode of the molecule that splits
ISPEX(J,7,L,M) degeneracy of this reaction
the vibrational mode of the molecule that splits
45 SPEX(1,J,L,M) the constant a in the reaction probability for the reverse reaction
SPEX(2,J,L,M) the temperature exponent b in the reaction probability (reverse reaction
SPEX(3,J,L,M) only)
SPEX(4,J,L,M) for the heat of reaction
SPEX(5,J,L,M) the lower temperature for SPREX
SPEX(6,J,L,M) the higher temperature for SPREX
the energy barrier

46 SPREX(1,J,L,M,K at lower temperature, the Jth reverse exchange reaction of L,M cumulative
) level K viv. dist of post reac mol
SPREX(2,J,L,M,K !-- ditto at higher temperature
)
47 TNEX(N) total number of exchange reaction N

48 NEX(N,L,M) the code number of the Nth exchange or chain reaction in L,M collisions
49 VRRD(1,L,M,K) dissociation rate coefficient to species L, M for vibration level K at 5,000
VRRD(2,L,M,K) K
similar for 15,000 K

50 VRREX(1,J,L,M,K Jth exchange rate coefficient to species L,M for vibrational level K at 1,000
) K
VRREX(2,J,L,M,K similar for 3,000 K
)
51 ITYPE(K) the type of boundary at the minimum x (K=1) and maximum x (K=2)
boundaries
! 0 for a stream boundary
! 1 for a plane of symmetry
! 2 for a solid surface
! 3 for a vacuum
52 MOLSC The desired number of molecules in a sampling cell: 10000*IMEG
53 IGS 0 for initial gas, 1 for stream(s) or reference gas
54 DMOM Sum of momentum of initial molecules

55 DENG the energy sum of the initial molecules


56 NDIV Number of divisions
57 DDIV the width of a division
58 MDIV maximum number of sampling cell divisions at any level of subdivision
59 NCELLS Number of sampling cells=NDIV
60 NMCC desired number of molecules in a collision cell
61 NCCELLS Number of collision cells
62 FNUM the number of real molecules represented by each simulated molecule
63 FTIME the flow time
64 TOTMOV total molecule moves
TOTCOL total collisions
65 CELL(M,N) information on sampling cell N
! M=1 x coordinate
! M=2 minimum x coordinate
! M=3 maximum x coordinate
! M=4 volume
66 ICELL(N) number of collision cells preceding those in sampling cell N
67 CCELL(M,N) information on collision cell N
! M=1 volume
! M=2 remainder in collision counting
! M=3 half the allowed time step
! M=4 maximum value of product of cross-section and relative velocity
! M=5 collision cell time
68 ICCELL(M,N) integer information on collision cell N
! M=1 the (start address -1) in ICREF of molecules in collision cell N
! M=2 the number of molecules in collision cell N
! M=3 the sampling cell in which the collision cell lies

69 NCIS number of collision cells in a sampling cell


70 TCOL species dependent collision counter
71 TLIM the time at which the calculation stops

72 TDISS(L) dissociations of species L since sample reset


73 TRECOMB(L) recombinations of species L since sample reset
74 CPDTM maximum number of collisions per time step (standard 0.2)
75 TPDTM maximum number of sampling cell transit times of the flow per time step
76 TREACG(N,L) total number of species L gained from reaction type N=1 for dissociation,
2 for recombination, 3 for forward exchange, 4 for reverse exchange
TREACL(N,L) the total number of species L lost from reaction type N=1 for dissociation,
2 for recombination, 3 for forward exchange, 4 for reverse exchange
77 NDISSOC the number of dissociations
NRECOMB the number of recombinations
NDISSL(L) the number of dissociations from level
78 COLLS total number of collisions in sampling cell N
WCOLLS(N) (N) total weighted collisins in N
79 CLSEP(N) sum of collision pair separation in cell N
80 VIBFRAC(L,K,M) the sum of species L mode K in level M

81 SUMVIB(L,K) the total sample in VIBFRAC

82 VARSP(M,N,L) the flow field properties for species L in cell N


!--M=0 the sample size
!--M=1 the fraction
!--M=2 the temperature component in the x direction
!--M=3 the temperature component in the y direction
!--M=4 the temperature component in the z direction
!--M=5 the translational temperature
!--M=6 the rotational temperature
!--M=7 the vibrational temperature
!--M=8 the temperature
!--M=9 the x component of the diffusion velocity
!--M=10 the y component of the diffusion velocity
!--M=11 the z component of the diffusion velocity
!--M=12 the electronic temperature
83 VARS(N,M) surface property N on interval L of surface M
!N=0 the unweighted sample (remainder of variables are weighted for cyl.
and sph. flows)
!--N=1 the incident sample
!--N=2 the reflected sample
!--N=3 the incident number flux
!--N=4 the reflected number flux
!--N=5 the incident pressure
!--N=6 the reflected pressure
!--N=7 the incident parallel shear tress
!--N=8 the reflected parallel shear stress
!--N=9 the incident normal-to-plane shear stress
!--N=10 the reflected normal shear stress
!--N=11 the incident translational heat flux
!--N=12 the reflected translational heat fluc
!--N=13 the incident rotational heat flux
!--N=14 the reflected rotational heat flux
!--N=15 the incident vibrational heat flux
!--N=16 the reflected vibrational heat flux
!--N=17 the incident heat flux from surface reactions
!--N=18 the reflected heat flux from surface reactions
!--N=19 slip velocity
!--N=20 temperature slip
!--N=21 rotational temperature slip
!--N=22 the net pressure
!--N=23 the net parallel in-plane shear
!--N=24 the net parallel normal-to-plane shear
!--N=25 the net translational energy flux
!--N=26 the net rotational heat flux
!--N=27 the net vibrational heat flux
!--N=28 the heat flux from reactions
!--N=29 total incident heat transfer
!--N=30 total reflected heat transfer
!--N=31 net heat transfer
!--N=32 surface temperature --not implemented
!--N=33 incident electronic energy
!--N=34 reflected electronic energy
!--N=35 net electronic energy
!--N=35+K the percentage of species K
84 SREAC(N) !the number of type N surface reactions

85 VAR(M,N) the flow field properties in cell N


!--M=1 the x coordinate
!--M=2 sample size
!--M=3 number density
!--M=4 density
!--M=5 u velocity component
!--M=6 v velocity component
!--M=7 w velocity component
!--M=8 translational temperature
!--M=9 rotational temperature
!--M=10 vibrational temperature
!--M=11 temperature
!--M=12 Mach number
!--M=13 molecules per cell
!--M=14 mean collision time / rate
!--M=15 mean free path
!--M=16 ratio (mean collisional separation) / (mean free path)
!--M=17 flow speed
!--M=18 scalar pressure nkT
!--M=19 x component of translational temperature TTX
!--M=20 y component of translational temperature TTY
!--M=21 z component of translational temperature TTZ
!--M=22 electronic temperature
CS(J,N,L) J=0 sampled number of species L in cell N
1: sampled weighted number of species L in cell N
all the following CS are weighted sums
2->4: sampled sum of u, v, w
5->7: sampled sum of u*u, v*v, w*w
8: sampled sum of rotational energy of species L in cell N
9: sampled sum of electronic energy of species L in cell N
9+K sampled sum of vibrational level of species L in cell N, K is the mode
CSS(K,J,L,M) M=1 for incident molecules and M=2 for reflected molecules
J=1 for surface at x=XB(1), 2 for surface at x=XB(2)
K=0: number sum of molecules of species L
1: weighted number sum of molecules of species L
all the following CSS are weighted
2: normal momentum sum to surface
3: y momentum sum to surface
4: z momentum sum to surface
5: tranlational energy sum to surface
6: rotational energy sum to surface
7: vibrational energy sum to the surface
8: electronic energy sum to the surface
CSSS(I,J) I=1:
weighted sum (over incident AND reflected molecules) of 1/normal vel.
component
all the following CSSS are weighted
2: similar sum of molecular mass / normal vel. component
3: similar sum of molecular mass * parallel vel. component / normal vel.
component
4: similar sum of molecular mass * speed squared / normal vel. component
5: similar sum of rotational energy / normal vel. component
6: similar sum of rotational degrees of freedom /normal velocity component
FMA Stream Mach Number
FSP(N,J) fraction of species N in the stream
VMP(N,J) most probable molecular velocity of species N at FTMP(J)

VMPM Maximum value of VMP


VNMAX(L) the maximum normal velocity component of species L; 3 times VMP
FDEN stream 1 density
FPR stream 1 pressure
RMAS Reduced mass
TNORM normalizing time (may vary e.g. mean collision time , or a transit time)
DTM Initial Time step: CPDTM*CTM
PROT(N) rotational energy
PELE(N) electronic energy
IPVIB (K,N) level of vibrational mode K of molecule N
EPF Electronic partition function
ELE Electronic energy of a molecule
PX(1,2 or 3,N) x,y,z position coordinates of molecule N
PV(1-3,N) u,v,w velocity components
PTIM(N) molecule time
IPSP(N) the molecular species
IPCELL(N) the collision cell number
IVB Boundary moving (1) or stationary (0)
IMTS 0 for uniform move time steps, 1 for time steps that vary over the cells,
2 for fixed
NCI initial cell time
VRC/VR Relative velocity/speed
VRR Square of VR
CVR product of collision cross-section and relative speed
RGFS reciprocal of gamma function for single species case
IPCP(N) the code number of the last collision partner of molecule
ECT relative translational energy

EVIB vibrational energy


ECC collision energy (rel trans +vib)
MAXLEV maximum vibrational level
ZV vibration collision number
VCM components of the center of mass velocity
VRCP post-collision components of the relative velocity
SEP the collision partner separation
SDF number of degrees of freedom associated with the collision
ERM rotational energy
IWF 0 for no radial weighting factors, 1 for radial weighting factors
ICREF molecule numbers in order of collision cells
CXSS reference cross-section for single species case
RMAS reduced mass for single species case
NSEL integer number of selections
NTRY number of attempts to find a second molecule
KT third body molecule code
ECTOT energy added at recmbination
IREC initially 0, becomes 1 of a recombination occurs
IEX becomes the reaction number if a reaction occurs
PSF(MMEX) PSF is the probability that this reaction will occur in this collision
INC counting increment
NSET the alternative set numbers in the setting of exact initial state

SN. Subroutine Description


1. DSMC Main program
2. READ_DATA Read Gas and flow Data from file
3. REAL_OXYGEN
4. ALLOCATE_GAS
5. DERIVED_GAS_DATA
6 SET_INITIAL_STATE_1D
7 INITIALISE_SAMPLES
SAMPLE_FLOW 1. Loop over all the molecules
2. Sample velocities and product of
velocities: CS
OUTPUT_RESULTS
ENERGY(I,TOKEN) !calculate the total energy (all molecules if
I=0, otherwise molecule I)I>0 used for
dianostic purposes only
Loop over time
MOLECULES_MOVE_1D molecule moves appropriate to the time
step
!--for homogeneous and one-dimensional
flows
!--(homogeneous flows are calculated as
one-dimensional)
REMOVE_MOL(N) remove molecule N and replaces it by NM

FIND_CELL_1D find the collision and sampling cells at a


given location in a 0D or 1D case
INDEX_MOLS index the molecules to the collision cells

COLLISIONS Loop over all collision cells and perform


collisions among molecules

All data items must be set in base SI units and the program employs base SI units
throughout. The data files do not fully specify the gaseous medium. Instead, the
details of the gas species, or combinations of gas species and the potential chemical
reactions between them, are set as subroutines within the source code. The user
is expected to prepare a new subroutine whenever the existing subroutines are
inadequate for the problem to be studied.

CASE

ICLASS 0
ITYPE 1
ISECS 0
MSP 1
1

from Eq. 2.37

5
The mean collision rate per molecule for the mixture is obtained as the sum over
the species weighted by the number fraction. i.e. p

The collision time is written as inverse of the mean collision rate. Similarly the mean
free path (FP, FPM) is given by Equations 2.40 and 2.41.

is the effective degrees of freedom.

The initial velocity components of the simulated molecule in an equilibrium gas are
generated from the distribution function of Eqn. (2.9). The cumulative distribution
function is

and cannot be inverted. The most common alternative to the inverse cumulative
distribution procedure is the acceptance-rejection procedure. The ratio of the
probability of a particular value of the variate to the maximum probability is equal
to the ratio of the distribution function to the maximum value of the distribution.
A problem with the application of the acceptance-rejection procedure to the velocity
components is that they range from minus infinity to infinity. Cut-off limits have to
be applied to the allowed range of u' etc. values and, the wider the limits, the less
efficient the procedure.

Further, many applications, including all studies of homogeneous gases, involve a


fixed number of molecules with assumed zero stream velocity at a prescribed
number density and pressure. That is, the momentum summed over all molecules
should be zero in each direction and the sum of the molecular energies should be
that corresponding to the specified temperature. The number density will be the
desired value but the momentum in each direction and the overall energy is subject
to a random walk. Each molecule that is added represents a step in the random
walk and the mean deviations from the nominal values increase as the square root
of the number of molecules. To avoid these random walk discrepancies, the
procedures keep track of the overall momentum in each direction and alternative
pairs of random velocity components are generated. Should the total momentum
in one direction be positive, the smaller value in the pair for that direction is chosen,
and vice versa. In order to minimize the energy deviation as well as the momentum
deviations, alternative momentum pairs have to be generated and the corresponding
choices made with regard to the total energy. Alternative internal energies may be
included in the low-discrepancy procedure for the overall temperature.

Rotational relaxation and randomly assign rotation energy to molecules as per


the Boltzmann distribution

For the generation of representative initial values of the rotational energy, the
required Boltzmann distribution is given in Eq. 4.6-4.9
10

and the cumulative distribution function for the special case of two rotational degrees
of freedom is

11
Thus, sampling from the above distribution as

12

An acceptance-rejection procedure is required for other than a diatomic gas and the
ratio of the probability to the maximum probability for the rotational energy of a
polyatomic molecule is

13

Acceptance Rejection Procedure:

First the above equation is written as:

14

1. a maximum value of non-dimensional energy is chosen: =10.


2. Select a random number uniformly distributed between 0 and 10.
3. evaluate the above ratio: P/Pmax
4. Generate another random number R
5. if P/Pmax> R, accept the energy value or repeat

Vibrational relaxation and randomly assign vibration energy to molecules as per


the Boltzmann distribution: mode K

The simple harmonic model will be employed for the vibrational mode and a level
will be stored for each vibrational mode of a simulated molecule with one or more
vibrational modes. Each vibrational mode contributes two degrees of freedom and
above Eqn. (4.9) for two degrees of rotational freedom is consistent with the
Boltzmann distribution. The simplest procedure for generating the initial distribution
of levels is to apply Eqn. (4.8) for the vibrational energy and to truncate this energy
to the energy of the highest available level. A representative vibrational level of a
mode with a characteristic vibrational temperature

15

Collisions:

No collisions calculated if there are less than two molecules in collision cell. There
are separate collision and sampling cells and every molecule, as well as every
collision cell, is assigned a time parameter. These parameters are kept up to date
with the physical flow time through time steps that vary over the flow field and are
continuously adapted to the local mean collision time. The specified number of
molecules in the sampling cells is generally at least one order of magnitude larger
than the number in a collision cell. All calculations start at zero time and the initial
cell structure reflects the initial state of the flow which is generally a uniform flow.
The number of simulated molecules at any location generally changes with time and
there is often a need to adapt the cells to reflect the changes in the distribution
of number density over the flow field. There is an opportunity for the user to initiate
cell adaption whenever the flow is restarted.

The molecule moves and collisions are uncoupled over a small time step that is
set to a fixed fraction of the local mean collision time. The density in some
applications varies by several orders of magnitude over the flow field. The region
of highest density is often the most important and a good calculation requires that
the time step be small in comparison with the mean collision time in that region.
Note that the molecules move and collisions are calculated in a collision cell when
their times fall more than half a time step behind the overall time step. This means
that the average molecule and collision times are, at all times, equal to the flow
time. Equation 2.33 is employed to calculate the collision cross section, and a
collision takes place if the ratio of product of collision cross section and relative
velocity to maximum value of product of cross section and relative velocity exceeds
a random number.

A time parameter tcell is assigned to each collision cell and collisions appropriate
to tcell are calculated whenever tcell falls 0.5 tcell behind the overall flow time. The
time step tcell is set to a specified small fraction of the sampled mean collision time
in the sampling cell in which the collision cell lies.

A time parameter is associated with every molecule and a similar procedure is


applied to the molecule moves. A move time step equal to the collision time step
would automatically satisfy the condition that the move distance should be small
in comparison with the local mean free path. However, there are often practical
considerations, especially in high Knudsen number flows, that call for a move time
step that is much smaller than the collision time step. In addition, the overall time
step should not be larger than the smallest collision time step.

The determination of the number of possible collision pairs to be considered in a


collision cell over the time step for that cell is the critical step in the overall
procedure. The NTC scheme has been shown (Bird, 1994) to lead to the correct
collision rate. This states that the number of possible collision pairs to be selected
in a cell with N simulated molecules is

16

This expression contains the mean value of the number of molecules. This takes
some time to establish and may change rapidly in an unsteady flow. Also, it has
a finite value when there is only one molecule in a collision cell and this number
has to be carried forward along with the remainder when the number of selections
is truncated to an integer. While these are minor problems, they may be avoided
if advantage is taken of a mathematical property of the Poisson distribution that
describes the fluctuations in the molecule number.

17

and the collision rate is unchanged if the number of pair selections is

18

Early DSMC programs employed a single set of cells and the number of simulated
molecules per cell was generally around twenty or thirty. It soon became clear that
the mean spacing between collision pairs was too large in comparison with the mean
free path and this led to the introduction of sub-cells. These have now been
superseded by separate sets of collision and sampling cells and the emphasis has
been on the reduction of the mean separation between the molecules that are
accepted as collision pairs. The early DSMC programs regarded the molecules
within a cell as representative of the molecules at the location of the cell and the
relative locations of the molecules within the cell were ignored. This continues to
be an option with regard to the selection of collision pairs from collision cells. The
smaller the size of the collision cells, the smaller the ratio of the mean separation
of the collision pairs to the local mean free path.

The probability of a collision is proportional to the product of the relative speed of


the molecules and the collision cross-section. Random pairs of molecules are
selected and the collision pairs are chosen from these through an
acceptance-rejection procedure based on the probability ratio

19

where the collision cross section is given as

Represented by CVR in the code, this is given by the following equations:

20

The maximum value of the product of the total collision cross-section and the relative
speed is initially set to a reasonably large value and, should a larger value be
encountered during a calculation, it is increased.

As noted above, if the collision number of a relaxing mode is Z, the collision


procedure for a particular mode is applied in 1/Z of the relevant collisions. The
relaxation collision numbers are set as part of the data for each molecular species.
These collision numbers are often an arbitrary function of the temperature and the
question arises as to how this temperature dependence should be applied within
the DSMC procedures.

Check for Dissociation:

pre-collision of a vibrational molecule is calculated as:

Pre-collision vibration energy in level i is calculated as

21

22

23

There is a continuous set (i.e. an infinite number) of levels beyond the dissociation
limit so that, if imax is above the dissociation level, it must be selected and
dissociation occurs. The condition for dissociation is therefore

24

post dissociation translation energy is given as:

25
26

Recombination:

The procedure for a recombination reaction is to implement it whenever there is a


probability of another molecule being within the ternary collision volume. This
volume is set to the value that satisfies the equilibrium constant for the forward
dissociation reaction and the reverse recombination reaction. The procedures for
binary exchange and chain reaction are analogous to the dissociation procedure,
but are entirely phenomenological. Most applications of DSMC to chemically reacting
flows have employed procedures (Bird, 1979) that are now called the TCE method.
These convert experimentally based rate coefficients to reaction cross-sections.

The Q-K procedures are sufficiently simple that analytical expressions can be
derived for the corresponding rate coefficients in an equilibrium gas. The Q-K
predicted rates have been shown (e.g., Gallis et al, 2010) to be generally within
the bounds of uncertainty of the generally accepted rates. Moreover, because the
predicted rates are in the form of a summation over the vibrational levels,
expressions may be written down for the vibrationally resolved rates. These allow
the post-reaction vibrational state of the product molecules to be set to values that
satisfy the detailed balance principle. The Larsen-Borgnakke procedures lead to
equilibrium in a non-reacting gas, but their application to reacting gases, as in the
TCE model, leads to a failure of equipartition with regard to the vibrational
temperatures.

A typical DSMC application involves millions of simulated molecules and trillions of


intermolecular collisions. The best possible solution of the Schrdinger equation for
single collision poses a computational task of a similar magnitude to that of the
whole DSMC computation. It is therefore necessary to either employ the
phenomenological models or refer to a vast database of the results from more
physically realistic, but unavoidably approximate, computations that cover all
collisional impact parameters for all molecular species. The vast database does not
exist.

All molecular models are phenomenological to some extent and, while the degree
of physical realism should be kept in mind, the accuracy of the results that are
produced by the model is the primary consideration. A model with a greater degree
of physical realism does not necessarily lead to a more accurate result!

According to Bird, the condition for recombination in a collision between two


molecules (or atoms) is that there is another molecule (or atom) within a ternary
collision volume. Since the mean free path () at high altitudes is comparable to
the re-entry capsule size, the probability of a ternary collision is very low. Because
recombination is only an important mechanism at relatively high density, these
reactions are omitted from hypersonic dsmcFoam analyses. It has been found that
a volume in the form

27

allows an almost exact fit of ratio of forward and backward kinetic rates to the
equilibrium constant. The reference volume is most conveniently set to the volume
of the sphere with radius equal to the sum of the reference radii of the three
molecules. The probability of recombination is:

28

where n is the number density. The total energy of the recombined molecule is
calculated from the constituents, p and q as

29
The rotational, vibrational and electronic energy of the molecule formed after
recombination would be zero. Add the energy released from recombination to get
the total energy of the molecule

29

to the above energy, now add the relative kinetic energy of the recombined molecule
and thrid body particle. Now, set the vibrational energy of the recombined molecule
to enforce detailed balance.

The program generates tables of vibrationally-resolved dissociation probabilities so


that the vibrational level of the recombined molecule can be set for detailed balance.
There is linear interpolation for gas temperatures between these limits that are set
as data items. Moreover, the dissociation rate coefficient is vibrationally resolved
and this makes it possible to satisfy detailed -
Subtract the vibrational energy from the total energy and recalculate relative velocity
and velocity of centre of mass. If dissociation and recombination or any other
reaction has not taken place, normal relaxation procedure is followed.

Relaxation post collision:

The post collision energy is distributed using serial Larsen-Borgnakke procedure.


First the relative translation energy is calculated.

30

Electronic Relaxation:

It employs direct sampling from the Boltzmann distribution. The electronic levels are
irregularly spaced and few in number. A very large fraction of the molecules are
initially in the ground state and a direct sampling from the Boltzmann distribution
is feasible. For a given temperature, the fraction of molecules in each level is
calculated from Eqn. (2.12). A random fraction is generated and the molecule is
initially placed in the ground state. If the random fraction is below the fraction in
the ground state, it remains in the ground state. If not, the level is progressively
increased until the cumulative fraction exceeds the random fraction.

Add the electronic energy to the translation energy.


31

32

Steps:

1. Calculate electronic partition function


2. Loop over all levels, all levels with energy higher than collision energy are
considered. The degeneracy of each level are also considered while
considering total levels.
3. Calculate fraction of molecules in each level
4. Compare fraction of molecules in level less than and equal to i with a random
number.
5. Accept when the random number is smaller than the fraction of molecules.
6. Repeat for other particle

The representative electronic level j is therefore given by

33
Probability of post-collision level is proportional to i*
34

35

Vibration Relaxation:

Vibration relaxation is applied in serial to each of the vibration modes of each of


the molecular specie. Once the amount of energy is distributed to a given mode,
it is substracted from the total energy, and rest is available for distribution in other
modes.

36

37

The acceptance-rejection procedure may be applied to this probability ratio in order


to select the post-collision state of molecule 1. This selection process is applied to
potential states that are chosen uniformly from the ground state to the highest state
with energy below .
where Tc is translation temperature. and Zref is the vibrational collision number at
a reference temperature Tref , which is usually taken to be the characteristic
vibrational temperature, v.
Vibration relaxation is applied through acception/rejection method only when 1/Zv
> R. That mean the collision must happen before the type of collision or post
collision level is selected using the rejection sampling.
Consider the serial application of the quantum L-B model to a vibrational mode of
one of the molecules in a collision in which the sum of the relative translational
energy and the pre-collision vibrational energy of the molecule and mode under
consideration is The maximum vibrational level that can be selected is Ec.

38

Potential post-collision states are chosen uniformly from the states equal to or below
imax and are selected through an acceptance-rejection routine with probability

39

Now consider the L-B redistribution between the translational mode as group b and
a quantized internal mode with two degrees of freedom of molecule 1 as group a.
Equation (3.25) can then be applied with the energy equal to the sum of the
pre-collision translational energy and the energy of the pre-collision state. is a
constant in the redistribution Ec .

40

where
41
For a gas mixture, the preceding equations are applied separately to each molecular
species in order to generate the initial equilibrium gas.

Now, the rotational relaxation is implemented:

Rotational Relaxation:
Usually, DSMC calculations employ the rotational collision number Zrot = 5. In other
words, it means that, on average, the rotational energy relaxation occurs once every
five collisions. In general, this is a good approximation for engineering problems;
however, more realistic models for rotational collision number as a function of the
translational temperature or translational energy have been proposed.

Rotational transition occurs if 1/Zrot > R.

42

43

where f is Larsen-Borgnakke distribution function for any number of rotational degree


of freedom. There is a simplified method for degree of freedom equal to two.

Larsen Borgnakke Method:

44

45

46
For example, consider the special case of the assignment of energy to a single
internal mode with two degrees of freedom. Eqn. (3.24) then reduces to

47

This distribution is amenable to sampling from the cumulative distribution function


and the representative value of that corresponds to the random fraction is a E F
R
48

49

After the L-B procedure the velocities of the species are adjusted for reflecting the
change in kinetic energy. The velocity of centre of mass does not change during
the collision. The post collision velcoities are calculated based on either the VHS
model or the VSS model. Use equations 3.7 and 3.18.

Completing the Dissociation Procudure:

Dissociation Temperature:

50

The degree of dissociation,, is defined as the mass fraction of dissociated gas.


Therefore, for the dissociation of a symmetrical diatomic molecule:

50
In the case of the DSMC simulation of dissociation-recombination in a homogeneous
gas, it is readily shown that this degree of dissociation is the ratio of the final to
the initial number of simulated molecules minus one. The energy available to atoms
for motion is basically rotational and electronic energy of the pre-dissociation
molecule. Set all internal energies in electronic, rotation, vibration modes, if any,
for both the species formed after dissociation.

Total energy of the system is given as sum over all molecules

The program calculates the characteristic dissociation temperature from the heats
of formation and sets it as SPVM(4,K,L). Dissociation is regarded as an integral part
of vibration excitation and no additional data is required. There is one characteristic
temperature for each vibration mode.

1
where

Moving Molecules:

In symmetry boundary conditions, molecule exit from one boundary and enters from
the other. There is no reflection or removal of the molecule from the system. Particle
moves in fraction of overall timestep.

Represented by CVR in the code, this is given by the following equations:

1
CR

The Following steps are followed:


1. Let the two colliding molecules are represented by LS and MS.
2. Calculate collision cross section and relative velocity and determine if the
collision occurs between the two randomly selected molecules. Mean values
of properties between the two species are taken for the calculation.
3. Calculate velocity of centre of mass.
4. Calculate relative translation energy.
5. Check for dissociation for molecular species
6. if dissociation occurs, reduce total collision energy by dissocation energy
7. Adjust relative translational energy
8. Adjust the relative velocity of molecules
9. Repeat dissociation check for all vibrational modes.
10. Repeat dissocition check for both colliding molecules.
Models for chemical reactions

Most simulations of chemical reactions in DSMC have employed the TCE method
that was detailed in Bird (1994). This has now been superseded by the
quantum-kinetic, or Q-K method and this will be implemented exclusively in the
programs in this book. This theory (Bird, 2011) is based on the quantum vibration
model.

Quantum Chemistry Models:


The possibility of chemical reactions must be taken into account and there may be
changes in the pre and post-collision molecular masses. The total collision energy
is the sum of the relative translational energy and the energies in all the internal
modes of both molecules. In the case of chemically reacting flows, the heats of
formation of each molecule are added to the total collision energy. The reaction
model is then applied and, if the reaction occurs, the molecular species are set to
the post-reaction identities and the total collision energy is adjusted for the changed
heats of formation. The post-collision internal energies are subtracted from the total
collision energy to obtain the post-collision relative translational energy

Now consider exchange and chain reactions. An exchange reaction has one stable
molecule and one radical both before and after the reaction. A reaction between
two stable molecules that leads to one or more radicals is, like thermal dissociation,
a chain-initiating reaction. When a pre-reaction pair comprised of one stable
molecule and one radical leads to two radicals, it is a chain-branching reaction, while
the opposite is a chain-terminating reaction.

Consider the forward and reverse reaction pair

in which A and C are the molecules that split, while B and D are either molecules
or atoms. The phenomenological DSMC procedure for these reactions is analogous
to that for the dissociation model. For the forward or endothermic reactions, the
reaction probability is equal to that of Eqn. (3.36) with i* set to imax defined by Eqn.
(3.35) and with Ec replaced by the activation energy that applies to the reaction.

This is a relative probability that must be normalized through division by the sum
of probabilities from the ground state to imax . Therefore

This is satisfactory only if the level imaxkvib in the numerator is replaced by Ea. Thus

The summation in the denominator is unity when Ea/k is less than vib and only a
few terms need be calculated when the activation energy is small.

First the recombination reaction is checked between two colliding particles. If


dissociation and recombination has not happened, chain and exchange reactions
are looked at. Loop over all the exchange reactions. A reaction occurs if the collision
energy is greater than the activation energy with a probability given by the following
expression:

The default activation energy for the forward exchange reaction is the heat of
reaction and for the reverse reaction it is zero. To ensure that the ratio of the number
of forward to reverse exchange reaction is consistent with that predicted by statistical
mechanics, it is necessary to adjust the activation energy in phenomenological
manner. The collision energy is given as:

Vous aimerez peut-être aussi