A Particle Simulation Method for the BGK Equation M. N. Macrossan

advertisement
A Particle Simulation Method for the BGK Equation
M. N. Macrossan
Centre for Hyper sonics, The University of Queensland, Brisbane. 4072. Australia.
Abstract. A particle simulation method, the "relaxation time" simulation method (RTSM), is described. In RTSM the
collision phase in standard DSMC is replaced by a procedure whereby some of the particle velocities in each cell at each
time step are selected from an equilibrium distribution, while conserving the total energy and momentum in the cell. The
remaining velocities in each cell are not changed. The number of velocities to be changed is determined from the local
relaxation time, which can be derived from the cell density and temperature and any desired viscosity law. The relaxation
time method is a simulation method to solve the BGK equation. RTSM is efficient compared to DSMC, and becomes
more so as the collision rate increases, so RTSM appears to be a natural candidate for near continuum flows.
1 INTRODUCTION
Pullin (1980) developed a particle simulation method called the Equilibrium Particle Simulation Method (EPSM),
as the infinite collision rate or "continuum" limit of DSMC for a given cell network and number of simulator
particles. In EPSM, as in DSMC, a flow is simulated by tracking the motion and interactions of a set of
representative particles. In EPSM, however, no collisions between particles are calculated, but the effect of
collisions is simulated by redistributing the total momentum and energy of all the particles in each cell at each time
step amongst all the particles in the cell. New particle velocities, representative of a local Maxwellian equilibrium
distribution, are selected at random while preserving the total momentum and energy in each cell. The effect is just
as though DSMC were used to calculate an infinite number of collisions amongst the particles in each cell at each
time step.
If not all, but only a fraction, of the particle velocities in a cell are brought into equilibrium at each time step
EPSM can form the basis of a simulation method with a realistic (finite) collision rate. The departure from
equilibrium is then related to the fraction of molecular velocities left unchanged and this in turn must depend
(inversely) on the local collision rate. Since in this method new velocities are always selected from an equilibrium
distribution, it can be considered a solution method for the BGK model equation, which incorporates a source term
based on the local equilibrium distribution. Here I describe such a simulation method, the "relaxation time
simulation method" (RTSM) and apply it to two test cases and compare the results with those from DSMC
calculations. The test cases are the unsteady flow in a shock tube, and steady Couette flow. The latter case illustrates
that the Prandtl numbers in the DSMC and RTSM simulations are different, as is to be expected since the Prandtl
number derived from the BGK equation is known to be constant and equal to 1. The DSMC method gives a Prandtl
number of 2/3 for hard spheres, which is in agreement with experimental data and the Boltzmann equation
(Cercignani 1988).
2 THEORY
The relaxation time approximation (Chapman and Cowling 1970) or BGK approximation (Bhatnagar et al 1954)
to the collision term allows the Boltzmann equation to be written as
t +c - d ( n f ) / d r = n t ~ l ( f e - f )
CP585, Rarefied Gas Dynamics: 22nd International Symposium, edited by T. J. Bartel and M. A. Gallis
© 2001 American Institute of Physics 0-7354-0025-3/01/$18.00
426
where feis the local Maxwell-Boltzmann equilibrium distribution and t is a local relaxation time. During each
collision phase of a particle simulation method the distribution of particle velocities in each cell should approach or
"relax" towards, equilibrium. According to the relaxation time approximation/ in any cell will satisfy the
governing equation
df/dt = ( f e - f ) / t
(1).
during the approach to equilibrium, where
fe = (2pRT)-3/2 exp- v2 /(2RT)
(la)
is the local Maxwellian (equilibrium) distribution function (v = c - c is the thermal velocity). The exact solution of
(Dis
/('')-/, =(/(o)-/ e )exp(-f'/f)
(2)
where 0 < f< At and/(0) is the initial distribution established in the cell by the convection phase of the simulation.
In other words, according to the relaxation time approximation, the distribution function decays exponentially
towards fe with a time constant t which is the same for all c but which may vary throughout the flow.
3 RELAXATION TIME SIMULATION METHOD
The following "relaxation time simulation method" (RTSM) is proposed. The collision phase of standard DSMC
is replaced by a relaxation phase: at every time step, in every cell, a subset of particles, a fraction 1- exp(- At It ) of
the particles in the cell, is forced into equilibrium, using the EPSM method on that subset only. New velocities for
this subset are selected from a Maxwellian distribution while preserving the total energy and momentum of the
subset. The equilibrium state so established for the sub-set is an approximation to the equilibrium state for the entire
set. As far as possible, the sub-set of particles in each cell selected to undergo this pseudo-collision process consists
of "near-neighbours". The velocities of the remaining particles are not altered. Clearly, the final distribution of
velocities obtained with any time step/(r'= Ar ) conforms, in a statistical sense, to (2); that is, /established in the cell
is a mixture of /(o) and a distribution representative of f e , and the departure from fe is proportional to
The relaxation time must be chosen to represent, as closely as possible, the physically correct relaxation rate
established by collisions. Since the viscosity coefficient derived from the BGK equation is
m= rRTt
(3)
the value of the relaxation timef in any cell can be derived from any assumed viscosity law m= nft) , using the
local kinetic temperature for T. Note that if we define a nominal mean free path from the well known relation
2m= rvl
1
(4)
2
where v = ($RT /p) '
is the mean thermal speed, we see from (3) and (4) that the nominal mean free time t con =
I I v is closely related to the relaxation time. Thus
t=4tcoll/p.
(5)
After the abstract for this paper was published the similar work of Montanero et al (1998) was brought to my
attention. Montanero and his co-authors presented a simulation method for the BGK equation, the "collision phase"
of which they described as follows (for convenience I have changed their notation to conform to mine):
"the velocity of each particle is replaced with probability A* It by a random velocity sampled from the
local equilibrium distribution. In this collision stage, strict conservation of momentum and energy may be
violated due to statistical fluctuations. To compensate for this artificial effect, the velocities of the particles
in each cell are conveniently displaced and rescaled." (Montanero et al 1998, p.57)
Although that work uses essentially the same approach to simulating the BGK equation as presented here, there are a
few differences in detail to be considered.
427
1.
In their method, it appears that a fraction At/t of particles in the cell are assigned new "equilibrium" velocities
at any time step. If this is true, their method is apparently not a correct simulation of the BGK equation since the
departure from equilibrium of their velocity distribution function after each collision phase, (fe - /), is
proportional to l-At/t . Note that for their method, complete equilibrium would be established if Ar = f
which is not correct - more than one collision per particle is required to establish equilibrium1. The correct
solution of the BGK equation, which mimics the correct physical situation, requires that the departure from
equilibrium should be proportional to exp(- At/t) as shown above.
2. There is a slight difference in detail in the "parent" distribution from which the new velocities are selected.
Pullin's (1979) formal derivation of his algorithm shows that the new velocities are a representative sample
selected from a normal distribution with an unknown mean and variance. This is consistent with the statistical
nature of the simulation, in that the true physical state in the cell is never known exactly from the finite (small)
sample of particles used in the simulation.2 The velocities in Montanero's method are first selected from the
parent equilibrium distribution established by the total momentum and energy in the cell, but are then "displaced
and rescaled" to preserve energy and momentum. It appears, therefore, that the final sample of velocities is
representative of a parent distribution which is also not the exact (unknown) distribution.3
3. It appears that Montanero et al have produced an ad hoc alternative to Pullin's formally derived algorithm
which establishes a sample of normal variates with specified mean and variance. Their method, applied to the
fundamental problem of establishing a sample of normal variates with zero mean and unit variance is described
below (as I understand it).
3.1 The rescaling algorithm
Select N values, xj} j = 1.. JV, from a parent normal distribution (with any mean and any variance), by the usual
procedures (e.g. Xj = (-In R/)/2 cos 7}, where Rf and 7} are uniformly distributed random fractions). Then let
Vj=(Xj-x)/S
where
and S2 =^(x . -%)2 / N
Since the mean
and the variance
_
v = — Iv • = I -1—s— = ——
—— = 0
s
N
'
N
s
2
=
1v 2
(*/-*) 2 S 2
Lv =L
= 20 = 1 ,
0
N
j
/ys 2
S
and since the v/ are linearly related to the Xj selected from a normal distribution, it appears that the v/ are a
satisfactory set of sample values, with a specified sample mean of 0 and specified sample variance of 1.
This algorithm appears to work in practice, and requires about 30% of the computational effort of Pullin's formally
derived algorithm, mainly because the latter contains elements which inhibit vectorisation. The reduced effort for the
above algorithm translates to an increase in speed for the RTSM code of about 1.6 for the test cases considered here.
1
Note that if the time step in their method were everywhere greater than or equal to the local t it would reduce to Pullin's EPSM. A correct
method should not reach this limit until the collision rate is infinite.
2
For example, it follows from a standard result of statistical theory that the best estimate of the true equilibrium temperature (or parent variance
RT of the particle velocities) in the cell is N/(N-1) times the actual (sample) variance of velocities in the cell.
3
1 assume this rescaling applies only to that subset of particles for which new velocities were selected. However it is possible that they adjust all
velocities in the cell in this final stage. In the latter case, there is some change of momentum and energy of all the particles at each collision phase,
which is probably of no significance, but which is difficult to relate to the BGK equation.
428
4 UNSTEADY SHOCK TUBE FLOW
The unsteady flow in a shock tube was simulated as a test case. The pressure ratio p2 / pl was 5 and the temperature
was T2/Tl = 1. The length of the initial low-pressure region was L. A contact surface propagates into the low
pressure region, driving a shock ahead of it and leaving an expansion region behind it, propagating into the high
pressure gas. For simplicity there are were rotational or vibrational degrees of freedom and hard sphere scattering
was used for the DSMC simulations. A hard sphere viscosity m= rri^/T^2 was used for to set t for RTSM
using eq. (3). The nominal mean free paths derived from the viscosity, eq. (4) were / i / L = 0.1 and 12/L= 0.02 in
the low pressure and high pressure initial states, respectively. The cell size was Ax = 0.01 L. The (constant) time
step was 0.2 11 which was everywhere greater than the local t . The simulations were entirely non-dimensional.
8000 particles were used and ensemble averages of 200 runs were taken.
HI
Sli
ill
•••••••••^^^^
FIGURE 1 (a) Shock tube profiles of Tx and Ty at tUs/L = 0.5 Kn = 0.l- DSMC
Figures l(a) and (b) show Tx and T temperature profiles (smoothed by averaging over 9 cells) obtained from
DSMC (hard spheres) and RTSM calculations. The theoretical shock location is at cell 150 for the elapsed time
shown of tUs /L = 0.5, where Us is the theoretical shock speed. As expected for such a large Knudsen number,
these temperature components are quite different - the x-temperature rises to greater values in the "shock" (cells
140-160) and falls to lower values in the expansion region (cells 60-90). The results for each method are similar,
which is somewhat of a surprise given that the relaxation time approximation is usually thought of as a nearequilibrium assumption. However, DSMC does produce slightly greater departures from equilibrium. The RTSM
solution ahead of the shock (cell > 175) appears to show the long precursor region characteristic of the BGK derived
shock structure (Liepmann, Narasimha and Chahine 1962). RTSM was slightly more than twice as fast as DSMC in
this test case.
The slightly different temperature profiles produced by RTSM and DSMC may be because the heat transfer
coefficients for the two models are different. The theoretical heat transfer coefficient for the BGK equation is given
by
k = rRTtCp = n€p,
429
where Cp = 3RT/2, so the Prandtl number Pr = n€p /£ = 1, whereas the Prandtl number for hard sphere scattering is
2/3. The relaxation time for RTSM was set to match the viscosity in the two simulations, rather than the heat transfer
coefficients which are then necessarily different. In the next test case both heat transfer and momentum transfer
(viscosity) are expected to be important. It is therefore a more severe test, and brings out more clearly the different
Prandtl number for the two models.
fil
lies
FIGURE 1 (b) Shock tube profiles of Tx and T at tUs/L = 0.5 Kn = 0.1 RTSM with m= n\(T /7\ )X//
5 COUETTE FLOW
The second test case was that of one-dimensional Couette flow between two flat plates (both parallel to the xaxis) moving relative to each other with relative speed Uw. The distance between the plates (in the j-direction) was
H. An unsteady simulation was performed, with the gas between the plates initially at rest with density and
temperature r i and T2 respectively. The time averaged steady solution was found after steady state was achieved.
Advantage was taken of the plane of skew symmetry midway between the plates to simulate half the flow only. The
origin of the j-axis was at the plane of skew symmetry where particles were "reflected" with x and y velocity
components reversed. At the plane y = H/2 a diffusely reflecting, moving-wall boundary condition was
implemented. The mean ^-component of velocity of the diffusely reflected molecules was UJ2. A variable time step
was used, set to be no more than 0.44 t cou in any cell.
Both DSMC and RTSM simulations were performed. Maxwell VHS scattering was used for DSMC and, for
RTSM, the matching viscosity law, m= n{(r/T\) was used to set the local relaxation time according to eq. (3). The
nominal mean free path in the initial state was / j =2/7j/(r 1 q). Under these conditions the flow is completely
specified by the non-dimensional parameters Tw/Tj= 1 (the wall temperature ratio), Sw = UW /(2RTW)1'2 = 2.67 (the
wall speed ratio) and Kni= / ±/ H = 0.03 (the Knudsen number).
430
The velocity profiles shown in figure 2(a) are very close for the two models, indicating that the viscosity
coefficients are matched. However, the temperature profiles in figure 2(b) are quite different for the two models, as a
consequence of the higher heat transfer coefficient for DSMC simulations. Since in the steady state, the rate of heat
flow towards the wall must be equal to the rate of work done on the flow by the moving wall (the same for both
DSMC and RTSM) the temperature gradient at the wall is necessarily smaller for DSMC.
ill _._..ipk..,,................ jiip............. tii
i
FIGURE 2(a) Velocity profiles uxIUw in Couette flow for DSMC (Maxwell VMS scattering) and RTSM
in.
ililf
:::|::::::S
:: :
^I::§S;::;^
^l^P
$^iX
%^|
FIGURE 2(b) Temperature profiles T/Tj in Couette flow, corresponding to figure 2(a).
431
Figure 3 shows the distribution fx(vx) of the jt-component of thermal velocity (vx =cx- cx =cx- ux) at the plane mid-
way between the plates (y=0), as well as the equilibrium distribution, fe^x =(2pRTx}~
exp-v^ /(2RTX). The
distributions are shown in non-dimensional form, fx(2RTX)1'2 vs. vx/(2RTx)1/2. It is clear that the flow is far from
equilibrium. The local kinetic temperature Tx is different for the two models (as indicated in figure 2(b)) but in this
non-dimensional form the results for each method are almost identical. Thus the BGK equation produces a similar
form of the distribution function to DSMC even in a state quite far removed from equilibrium.
Figure 3. The distribution of ^-component of thermal velocity fx (2RTX)'
vs. vx /(2RTX)'
. Couette flow, at mid-plane.
6 PRANDTL NUMBER
Cercignani (1988) describes the "ellipsodial statistical" or ES model, a modification of the BGK equation due to
Holway (1963), in which the isotropic local Maxwellian distribution function on the RHS of (1) is replaced with a
local anisotropic three-dimensional Gaussian distribution function. The anisotropic distribution function contains the
Prandtl number as a disposable parameter, and the formal derivation of the transport coefficients yields this Prandtl
number, which can be set to any desired value. In an abstract submitted to the 22nd Rarefied Gas Dynamics
Symposium, Andries and Perthame (2000) report that they have proved that Holway's ES model equation satisfies
the H-theorem for 2/3 < Pr < 1. They also report that they have solved the ES equation by a simple finite difference
scheme, and that the complexity of the implementation is of the same order as for the original BGK model equation.
Clearly the relaxation time simulation method presented here should be modified to simulate the ES equation.
432
7 CONCLUSION
From the results shown here, it is reasonable to conclude that the relaxation time simulation method (RTSM)
produces a solution of the BGK equation, in the same sense that DSMC produces a solution of the Boltzmann
equation. Despite the problem of unit Prandtl number for the BGK equation, the RTSM solutions were shown to be
remarkably similar to the DSMC solutions for reasonably large values of the Knudsen number. RTSM required less
than half the computational effort of DSMC for the Knudsen numbers considered here (0.1 - 0.03), and de-coupling
intervals At ~ 0.5f . As DSMC is applied in near-continuum flows, it sometimes happens that the de-coupling
interval is comparable to or larger than the mean free time in some cells, in some regions of the flow. In this case,
the computational effort of DSMC, which is proportional to the number of collisions/particle at each time step,
increases rapidly. The computational effort of RTSM increases much less (because of the l-exp(-A?/f ) term for
the fraction of new velocities required in one time step) and the advantage of RTSM over DSMC increases. At the
same time we would expect the BGK equation (even with unit Prandtl number) to become increasingly accurate as
the departure from equilibrium is reduced. Thus it appears that RTSM, either by itself or as part of a hybrid
DSMC/RTSM code, might be a viable alternative to hybrid DSMC (rarefied)/continuum (high density) codes.
ACKNOWLEDGMENTS
The Australian Research Council supported this work under grant 97/ARCL99.
REFERENCES
1.
2.
3.
4.
5.
6.
7.
8.
9.
Andries, P and B Perthame (2000) "The ES-BGK model equation with correct Prandtl number", 22nd Int Sym Rarefied Gas
Dynamics, Abstract 2015, http://www.cfd.sandia.gov/rgd/contributed.html
Bhatnagar, P L, E P Gross and M Krook (1954), "Model for collision processes in gases, L", Phys Rev 94, 511
Cercignani, C (1988) The Boltzmann equation and its applications, Applied Mathematical Series, vol 67, Springer Verlag.
Chapman, S. and T G Cowling (1970) The Mathematical Theory of Non-Uniform Gases, 3rd edition, CUP, Cambridge, p,
104-105.
Holway, L H Jr, (1963) Ph D Thesis, Harvard
Liepmann, H W, R Narasimha and M T Chahine (1962), "Structure of a plane shock layer" Phys Fluids 5,1313
Montanero, J M, A Santos, J W Duffy and J F Lutsko (1988), "Stability of uniform shear flow", Phys Rev E 57, 547
Pullin, D I (1979), "Generation of normal variates with given sample mean and variance", / Statist Comput Simul, 9, 303309.
Pullin, D I (1980), "Direct simulation methods for compressible ideal gas flow", / Comput Phys, 34, 231-144.
433
Download