390_1.pdf

On the Time Step Error of the DSMC
Tomokuni Hokazono, Seijiro Kobayashi, Tomoki Ohsawa, Taku Ohwada
Department of Aeronautics and Astronautics, Graduate School of Engineering, Kyoto University
Abstract. The time step truncation error of the DSMC is examined numerically. Contrary to the claim of
[S.V. Bogomolov, U.S.S.R. Comput. Math. Math. Phys., Vol. 28, 79 (1988)] and in agreement with that of
[T. Ohwada, J. Compt. Phys., Vol. 139, 1 (1998)], it is demonstrated that the error of the conventional DSMC
per time step ∆t is not O(∆t3 ) but O(∆t2 ). Further, it is shown that the error of the DSMC is reduced to
O(∆t3 ) by applying Strang’s splitting for the partial differential equations to the Boltzmann equation. The
error resulting from the boundary condition, which is not studied in the abovementioned theoretical studies,
is also discussed.
1
INTRODUCTION
The direct simulation Monte-Carlo (DSMC)[1] is the most successful and prevailing numerical method for
the Boltzmann equation at the present time and the mathematical basis of this method is established by the
rigorous convergence proof.[2, 3, 4] However, there is still a confusion about the truncation error of the time
discretization, which is one of the important properties of the numerical methods for evolutionary equations.
The DSMC is based on the splitting scheme, which consists of the free flow step solving the collisionless
Boltzmann equation and the collision step solving the spatially homogeneous Boltzmann equation. The time
step truncation error of the splitting scheme of the Boltzmann equation is discussed in Refs. [5] and [6] but
different conclusions are made. While Ref. [5] claims that the error of the conventional DSMC for the time
step ∆t would be O(∆t3 ) if both of the steps were solved exactly, Ref. [6] claims that the intrinsic error
of the conventional splitting is O(∆t2 ) and the error is reduced to O(∆t3 ) if Strang’s splitting for partial
differential equations[7] is applied to the Boltzmann equation. Incidentally, Strang’s splitting is extended to
the case of general evolutionary equations in Ref. [8]. As for the numerical validation, Garcia and Wagner
recently carried out the detailed DSMC computation and showed the second order convergence rate for
the conventional DSMC in some simple boundary value problems,[9] which supports the claim of Ref. [5].
The numerical results that support the claim of Ref. [6] are also found in the literature. For example, it is
reported in Ref. [10] that the time step error of the conventional DSMC is reduced greatly by using a new
sampling procedure, which is a variant of Strang’s splitting.
Needless to say, it is impossible to determine the order of accuracy of a numerical method only by the
numerical results; when the error is c1 ∆t+∆t2 +· · · , the convergence rate is judged to be second order by the
numerical observation for |c1 | ∆t. However, the numerical computation can afford the counterexamples
of the optimistic theory; the theory that claims c1 = 0 fails if the first order convergence rate is confirmed in
a certain problem. In the present paper, we first show a counterexample of the claim of Ref. [5] in a simple
one-dimensional Cauchy problem of the Boltzmann equation without boundary. Secondly we discuss the
time step error of the splitting method resulting from the boundary condition, which is not discussed in the
abovementioned theoretical studies. It will be shown together with the numerical example that the splitting
method is not consistent with the solution of the Boltzmann equation in the case where the characteristic
line intersects the boundary. Thirdly, we investigate the time step error in the case of the steady boundary
value problem. We carry out the conventional and Strang DSMC computations in the problems of Couette
flow and heat flow between two parallel plates.
CP663, Rarefied Gas Dynamics: 23rd International Symposium, edited by A. D. Ketsdever and E. P. Muntz
© 2003 American Institute of Physics 0-7354-0124-1/03/$20.00
390
2
DSMC PROCEDURE
The conventional DSMC consists of the free flow step and the collision step. In the free flow step, the
particles are moved according to Newton’s law; the boundary condition is taken into account there. The
collision step is performed in each cell; the particles in the same cell are randomly chosen as the collision
partners according to the probability based on the inter-molecular force law and the velocities of selected
particles are updated randomly according to the probability based on the same law.
The free flow step and the collision step correspond to solving the collisionless equation and solving the
spatially homogeneous Boltzmann equation, respectively. The simulation procedure for the time step ∆t is
(free flow step for ∆t)+(collision step for ∆t); the exchange of order of these steps is also allowed. The final
DSMC result in the case of unsteady problem is obtained as the average of the results for different seeds of
random number. In the steady case, the time average is employed; the samples are taken after the steady
state is judged to be established. In Ref. [10] a new sampling procedure for the steady case is proposed;
the samples are taken after each free flow step and after each collision step, i.e., free flow, sample, collision,
sample, · · · , while the samples are taken after each time step in the conventional DSMC, i.e., free flow,
collision, sample, · · · (or collision, free flow, sample, · · · ). In the Strang DSMC,[6] the simulation procedure
for time step ∆t is (free flow step for ∆t/2)+(collision step for ∆t)+(free flow step for ∆t/2) and samples are
taken after each time step. It is easily seen from the example [y(a) + y(b)]/2 ∼ y([a + b]/2) that the sampling
procedure of Ref. [10] is a variant of the Strang DSMC. Incidentally, the relation between the conventional
DSMC and the Strang DSMC is compared to that between the Euler formula and the trapezoid formula in
the numerical integration.
3
NUMERICAL TESTS AND DISCUSSIONS
As the test problems, we consider three problems in spatially one-dimensional case. The first problem
is an initial value problem without boundary, to which the theories of Refs. [5, 6] are applicable. The
second problem is an initial and boundary value problem in a half space. The third problem is a steady
boundary value problem (Couette flow and heat flow between two parallel plates). The molecular model
employed in the simulation is hard-sphere and the collision step is computed by the no time counter (NTC)
technique.[1] In the NTC technique, the particles which undergo the collision are allowed to collide again
during the same time step. This improves the accuracy dramatically. In fact, the result of the spatially
homogeneous Boltzmann equation obtained by the NTC technique does not depend on the time step and
it is demonstrated in Ref. [11] that the NTC yields a better result than the second order accurate finite
difference (deterministic) scheme of the same equation.
3.1
Notation
Before proceeding to the numerical computation, we summarize the notation. The reference density
and temperature are denoted by ρ0 and T0 , respectively; l0 is the mean free path of the gas molecules in
the reference equilibrium state at rest; Xi = l0 xi is the Cartesian coordinate system; l0 (2RT0 )−1/2 t is the
time (R is the specific gas constant), (2RT0 )1/2 ζi is the molecular velocity; ρ0 (2RT0 )−3/2 f(xi , ζi , t) is the
distribution function of the gas molecules; ρ0 ρ, (2RT0 )1/2 ui , and T0 T are the density, flow velocity, and
temperature of the gas, respectively; P0 = Rρ0 T0 ; P0 Pij and P0 (2RT0 )1/2 Qi are the stress tensor and heat
flow vector, respectively.
3.2
Initial value problem without boundary
In this subsection we consider the Cauchy problem of the one-dimensional Boltzmann equation
∂f
∂f
= Q(f, f),
+ ζ1
∂t
∂x1
391
(1)
1.25
1.25
∆ t=1.0
∆ t=0.5
∆ t=0.25
∆ t=0.125
∆ t=0.0625
1.2
∆ t=1.0
∆ t=0.5
∆ t=0.25
∆ t=0.125
∆ t=0.0625
1.2
T
1.15
T
1.15
1.1
1.1
1.05
1.05
1
1
0
1
2
3
4
5
0
1
2
3
x1
4
5
x1
Fig. 1: Temperature distribution at t = 1. (a) The conventional DSMC. (b) The Strang DSMC.
from the initial condition
f(x1 , ζi , 0) =
π 3/2
a(x1 ) = 1
1
a(x1 )
exp(−
ζ12
− ζ22 − ζ32 ),
a(x1 )
(2)
+ 4 exp[−5x21 ].
For the initial condition (2), ρ = 1, vi = 0, and T = 1 + (4/3) exp(−5x21 ). In the actual simulation, we take
account of the symmetry of the problem, limit the computational domain to (0, D), and impose the specular
reflection boundary condition at x1 = 0 and the inflow boundary condition at x1 = D (f(x1 = D, ζ1 <
0, t) = π −3/2 exp(−ζi2 )). The parameter D should be large enough so that a(D) − 1 1 and no disturbance
arrives at the computational boundary x1 = D during the computation. The simulation was carried out
for D = 12. The other computational parameters are as follows. The cell size is uniform and is 0.05; the
number of particles per cell for the reference density is 10,000; the final result is established as the average
of 10,000 results for different seeds of random number.
Figure 1 shows the temperature distributions at t = 1 for different values of ∆t. It is seen that the
convergence of Strang DSMC is much faster than that of the conventional DSMC. In order to see the
behavior of convergence in detail, we measure the error for the macroscopic variables h = ρ, u1 , T , etc at
t = t defined by
1 D
E(∆t; h, t) =
|h(∆t; x1, t) − ĥ(x1 , t)|dx1,
(3)
D 0
where ĥ is the standard solution obtained by the Strang DSMC for the smallest time step (∆t = 0.0625).
The E(∆t; h, 1) versus time step ∆t (h = ρ, u1 , T , and P11 ) is shown in Fig. 2. It is clearly seen that the
convergence rate of the conventional DSMC is first order and that of the Strang DSMC is second order. The
same observation is made for Q1 (no figure). Taking account of the accumulation of the time step error, we
conclude that the error of the conventional DSMC per the time step ∆t is O(∆t2 ) and that of Strang DSMC
is O(∆t3 ), which is contrary to the claim of Ref. [5] and is in agreement with that of Ref. [6]. Incidentally,
the same conclusion is derived from the results of cheaper computation, such as the case where the number
of particles per cell for the reference density is 100.
3.3
Initial and boundary value problem
In this subsection, we investigate the error of the splitting method in an initial and boundary value
problem in the half space x1 > 0. Let us consider the solution of the Boltzmann equation (1) for the initial
and boundary conditions
f(x1 , ζi , t = 0) = f0 (x1 , ζi ),
(4)
f(x1 = 0, ζ1 > 0, t) = ψ(ζi ).
(5)
We consider the case where ψ(ζi ) = f0 (0, ζi ) (ζ1 > 0) for simplicity. The solution at t = ∆t is formally
expressed in the integral form along the characteristic line. In the case of 0 < x1 < ζ1 ∆t (0 < ζ1 ),
392
DSMC
Strang
DSMC
Strang
10−2
E(∆t;u1,1)
E(∆t;ρ,1)
10−2
10−3
10−3
10−4
10−4
10−1
100
10−1
∆t
∆t
DSMC
Strang
DSMC
Strang
10−2
E(∆t;P11,1)
E(∆t;T,1)
10−2
10−3
10−4
100
10−1
10−3
10−4
100
∆t
10−1
100
∆t
Fig. 2: E(∆t; h, 1) versus ∆t (h = ρ, u1 , T , and P11 ). The dashed line indicates the first order convergence rate and
the dash-dot line does the second order convergence rate.
the characteristic line passing through the point (x1 , ∆t) intersects the boundary at (x1 , t) = (0, λ∆t)
[λ = 1 − x1 /(ζ1 ∆t), 0 < λ < 1] and the solution is evaluated as
f(x1 , ζi , ∆t) = ψ(ζi ) + (1 − λ)∆tQ(f0 , f0 )[x1 = 0, ζi ] + O(∆t2 ) (0 < ζ1 , 0 < x1 < ζ1 ∆t).
(6)
On the other hand, f(x1 , ζi , ∆t) obtained in the splitting method (free flow + collision) is evaluated as
f(x1 , ζi , ∆t) = ψ(ζi ) + ∆tQ(f0 , f0 )[x1 = 0, ζi ] + O(∆t2 ) (0 < ζ1 , 0 < x1 < ζ1 ∆t).
(7)
Comparing Eq. (6) with Eq. (7), we find that the error of the splitting scheme per time step ∆t is O(∆t) in
the region 0 < x1 < ζ1 ∆t. Thus, the splitting method is not consistent with the integral form.
In order to demonstrate the error caused by the inconsistent treatment of the boundary condition, we
carried out the conventional DSMC (free flow+collision) for the following initial function and boundary
function:
2
2
f0 (x1 , ζi ) = 10E(ζi )e−x1 + (1 − e−x1 )E(ζi ),
(8)
ψ(ζi ) = 10E(ζi ),
(9)
where E(ζi ) = π −3/2 exp(−ζi2 ). The computational condition is as follows. The region for x1 is limited to
(0, 5) and the inflow boundary condition is imposed at x1 = 5 [f(5, ζ1 < 0, t) = E(ζi )]; the domain is divided
into 500 cells of a uniform size (the cell size is 0.01); the number of particles per cell for the reference density
is 100; the final result is obtained as the average of 9000 samples for different seeds of random number.
The marginal distribution
393
g(x1 , ζ1 , t) =
∞
−∞
∞
−∞
f(x1 , ζi , t)dζ2 dζ3 ,
(10)
for (x1 , t) = (0.015, 0.4) is shown in Fig. 3. In order to confirm whether the large deviation seen in Fig. 3 is
caused by the inconsistent treatment of the boundary condition, we carried out the BGK computation for
the same initial data and boundary condition using two schemes, (i) the conventional splitting scheme (free
flow+collision) and (ii) the first order scheme that is consistent with Eq. (6). Figure 4(a) shows the results
of the method (i) and Fig. 4(b) does those of (ii). It is clearly seen that the error appears for ζ1 > x1 /∆t
[Fig. 4(a)] and it is resolved by using the consistent first order scheme [Fig. 4(b)]. While the origin of the
error, ζ1 = x1 /∆t, is sharply captured in the BGK result, it is faded in the DSMC result. This is due to the
cell averaging employed to compute the distribution function.
Although the splitting scheme is not consistent with the solution of the Boltzmann equation when the
characteristic line intersects the boundary, this does not cause a fatal error. The region 0 < x1 < ζ1 ∆t,
where the splitting method is inconsistent, vanishes as ∆t does. Once the region becomes smaller than the
cell size effectively, the error of the distribution of the particles in the cell adjacent to the boundary becomes
O(∆t2 ). The inconsistent treatment of the boundary condition is interpreted as the boundary condition with
the error of O(∆t). The treatment of the boundary equations in the conventional DSMC is consistent with
its accuracy. Due to the error resulting from the boundary condition, the higher order accuracy of Strang’s
splitting is not expected in the case of boundary value problem. As will be seen in the next subsection,
however, Strang’s splitting is not useless even in this case. It will be shown that the error is reduced greatly
by using the Strang DSMC.
5
∆ t=0.4
∆ t=0.2
∆ t=0.1
∆ t=0.05
∆ t=0.025
∆ t=0.0125
4.5
g(0.015,ζ1,0.4)
4
3.5
3
2.5
2
1.5
1
0
0.2
0.4
0.6
0.8
1
1.2
ζ1
Fig. 3: The marginal distribution g for (x1 , t) = (0.015, 0.4). The vertical lines indicate ζ1 = x1 /∆t.
5
5
∆ t=0.1
∆ t=0.05
∆ t=0.025
∆ t=0.0125
4.5
3.5
4
g(0.1,ζ1,0.4)
g(0.1,ζ1,0.4)
4
3
2.5
∆ t=0.1
∆ t=0.05
∆ t=0.025
∆ t=0.0125
4.5
3.5
3
2.5
2
2
1.5
1.5
1
1
0
0.2
0.4
0.6
0.8
1
1.2
0
ζ1
0.2
0.4
0.6
0.8
1
1.2
ζ1
Fig. 4: The marginal distribution g for(x1 , t) = (0.1, 0.4). (a) The result of the splitting scheme. (b) The result of
the first order scheme. The vertical lines indicate ζ1 = x1 /∆t.
394
3.4
Steady boundary-value problem
In this subsection, we investigate the time step error of the DSMC in the case of steady boundary value
problem. We carry out the computations in the problems of Couette flow and heat flow between parallel
plates in the case of the diffuse reflection boundary condition. The average density of the gas between the
plates is taken as the reference density ρ0 . The plate with temperature T0 is located at X1 = 0 and that with
the temperature T1 is done at X1 = Dl0 . The plate at X1 = 0 is at rest and the other plate is moving in
the X2 direction with the speed (2RT0 )1/2 U . The computation was carried out for (U, T1 /T0 , D) = (1, 1, 10)
(the Couette flow) and (U, T1 /T0 , D) = (0, 2, 10) (the heat flow). Incidentally, the parameter D is the
inverse of the Knudsen number Kn based on the plate spacing and D = 10 corresponds to Kn= 0.1. The
other computational parameters are as follows. The cell size is uniform and is 0.2; the number of particles
per cell for the reference density is 200; the final result is obtained as the time average of the samples for
100, 000 ≤ t ≤ 1000, 000.
Figure 5 shows the distributions of the stress tensor P12 for different values of ∆t in the Couette flow
problem. As inferred from the results in Sec. 3.2, the Strang DSMC yields better results than the conventional
one. As expected from the results of Sec. 3.3, nonuniform regions of the stress tensor P12 , which should
theoretically be constant, are observed around the boundaries and these regions shrink as ∆t decreases. We
measure the total error defined by
1
Ẽ(∆t; h) =
D
D
0
|h(∆t; x1) − ĥ(x1 )|dx1 ,
(11)
-0.02
-0.02
-0.04
-0.04
-0.06
-0.06
-0.08
-0.08
P12
P12
where ĥ is the standard solution (∆t = 0.1, Strang). The Ẽ(∆t; P12) versus ∆t is shown in Fig. 6. Although
the accuracy of the Strang DSMC is not second order due to the inconsistent treatment of the boundary
condition, the total error is proportional to O(∆t2 ); the total error of the conventional DSMC is O(∆t).
Figure 7 shows Ẽ(∆t; u2 ) versus ∆t. In this case, the second order convergence rate is observed for both of
the DSMC methods. The similar observations are made in the case of the heat flow. Figure 8 shows the
distributions of Q1 for different values of ∆t. The Ẽ(∆t; Q1 ) versus ∆t and Ẽ(∆t; T ) versus ∆t are shown
in Figs. 9 and 10, respectively. The convergence rate of the conventional DSMC computation is first order
for P12 (Q1 ) and second order for u2 (T ). This implies that the higher order convergence rate observed in
the numerical computation does not necessary guarantee the higher order accuracy of the scheme (the case
of |c1 | 1 is not excluded; see the second paragraph of Sec. 1).
Incidentally, the second order convergence rate is confirmed in the conventional DSMC computation
of Ref. [9] even for P12 and Q1 , which is contrary to the above observations. The sampling procedure
employed in Ref. [9] for the evaluation of P12 and Q1 is different from that employed in the evaluation of
other macroscopic variables. For example, the stress tensor P12 is measured from the x2 component of the
velocities of particles passing through the cell boundaries during the free flow step. This corresponds to the
-0.1
∆ t=2.0
∆ t=1.0
∆ t=0.5
∆ t=0.25
∆ t=0.1
-0.1
∆ t=2.0
∆ t=1.0
∆ t=0.5
∆ t=0.25
∆ t=0.1
-0.12
-0.14
0
2
4
6
8
-0.12
-0.14
10
0
x1
2
4
6
8
10
x1
Fig. 5: The distributions of P12 for different values of ∆t. (a) The conventional DSMC. (b) The Strang DSMC.
395
DSMC
Strang
10−2
DSMC
Strang
~
E(∆t;u2)
~
E(∆t;P12)
10−2
10−3
10−3
10−4
10−1
100
10−1
100
∆t
∆t
Fig. 6: Ẽ(∆t; P12 ) versus ∆t. The dashed line indicates the first order convergence rate and the dashdot line does the second order convergence rate.
Fig. 7: Ẽ(∆t; u2 ) versus ∆t. The dash-dot line indicates the second order convergence rate.
-0.15
-0.15
∆ t=1.6
∆ t=1.0
∆ t=0.5
∆ t=0.25
∆ t=0.1
Q1
-0.1
Q1
-0.1
∆ t=1.6
∆ t=1.0
∆ t=0.5
∆ t=0.25
∆ t=0.1
-0.2
-0.25
0
2
4
6
8
-0.2
-0.25
10
0
2
4
6
x1
8
10
x1
Fig. 8: The distributions of Q1 for different values of ∆t. (a) The conventional DSMC. (b) The Strang DSMC.
following formula:
(i)
P12(x1 ) =
n
e −1 (n+1)∆t 1
(i)
ζ1 ζ2 f(x1 , ζj , t)dζdt,
(ne − ns )∆t n=n n∆t
3
R
(12)
s
(i)
where x1 denotes the cell boundary, the samples are taken from ns th step to ne th step, and the time
integration is carried out in each free flow step. By applying the Taylor expansion to the above formula, we
have
n
e −1 1
1
(i)
(i)
P12 (x1 ) =
ζ1 ζ2 f(x1 , ζj , (n + )∆t)dζ + O(∆t2 ).
(13)
(ne − ns ) n=n R3
2
s
Then, we find that this sampling procedure is a variant of the Strang DSMC.
396
DSMC
Strang
10−2
~
E(∆t;T)
~
E(∆t;Q1)
10−1
10−2
10−3
DSMC
Strang
10−3
10−4
10−1
100
10−1
∆t
100
∆t
Fig. 9: Ẽ(∆t; Q1 ) versus ∆t. The dashed line indicates the first order convergence rate and the dashdot line does the second order convergence rate.
Fig. 10: Ẽ(∆t; T ) versus ∆t. The dash-dot line indicates the second order convergence rate.
REFERENCES
1. Bird, G.A., Molecular Gas Dynamics and the Direct Simulation of Gas Flows,(Clarendon, Oxford, 1994).
2. Babovsky, H., “A convergence proof for Nanbu’s Boltzmann simulation scheme,” Eur. J. Mech. B/Fluids, 8, 41
(1989).
3. Babovsky, H. and Illner, R., “A convergence proof for Nanbu’s simulation method for the full Boltzmann equation,”
SIAM J. Numer. Anal., 26, 45 (1989).
4. Wagner, W., “A convergence proof for Bird’s direct simulation Monte-Carlo method for the Boltzmann equation,”
J. Stat. Phys., 66, 1011 (1992).
5. Bogomolov, S.V., “Convergence of the total-approximation method for the Boltzmann equation,” U.S.S.R. Comput. Math. Math. Phys., 28, 79-84 (1988).
6. Ohwada, T., “Higher order approximation methods for the Boltzmann equation,” J. Compt. Phys., 139, 1 (1998).
7. Strang, G., “On the construction and comparison of difference schemes,” SIAM J. Numer. Anal., 5, 506 (1968).
8. Bobylev, A.V. and Ohwada, T., “The error of the splitting scheme for solving evolutionary equations,” Applied
Mathematics Letters, 14, 45 (2001).
9. Garcia, A. and Wagner, W., “Time step truncation error in direct simulation Monte Carlo,” Phys. Fluids, 12,
2621 (2000).
10. Rebrov, A.K. and Skovorodko, P.A., “An improved sampling procedure in DSMC method,” in Rarefied Gas
Dynamics, edited by C. Shen (Peking University Press, Beijing, 1997), p.215.
11. Ohwada, T., “Higher order time integration of spatially nonhomogeneous Boltzmann equation: Deterministic
and stochastic computations,” Transp. Theo. Stat. Phys., 29, 495 (2000).
397