advertisement

Timestep Dependence Of Transport Coefficients In The Direct Simulation Monte Carlo Nicolas G. Hadjiconstantinou Department of Mechanical Engineering Massachusetts Institute of Technology 77 Massachusetts Avenue, Cambridge, MA 02139 Abstract. Using Green-Kubo theory we calculate the timestep dependence of transport coefficients (viscosity, thermal conductivity, coefficient of diffusion) in the direct simulation Monte Carlo (DSMC). Because DSMC is discrete in time, we formulate a continuous-time model of DSMC that allows application of the Green-Kubo formulation (N.G. Hadjiconstantinou, "Analysis of discretization in the direct simulation Monte Carlo", to appear in Physics of Fluids). The transport coefficients in equilibrium are found to be quadratic functions of the timestep, resulting in errors (with respect to the dilute gas Enskog result) of the order of 5% for timesteps of the order of one mean free time. The results are in very good agreement with numerical simulations performed by Garcia and Wagner (A.L. Garcia and W. Wagner, "Time step truncation error in direct simulation Monte Carlo", to appear in Physics of Fluids). I INTRODUCTION In a recent paper, Alexander et al. [1] used the Green-Kubo theory as applied to hard spheres by Wainright [2] to calculate the dependence of transport coefficients on the cell size in the Direct Simulation Monte Carlo (DSMC) [3,4]. This work has shown that the error (defined as the deviation from the dilute gas Enskog theory) is a quadratic function of the cell size, and is of the order of 10% for cell sizes of the order of one mean free path. Unfortunately this work was limited to the limit of zero timestep because the Green-Kubo theory cannot be readily applied to DSMC in the limit of finite non-zero timestep because DSMC is discrete in time. We have developed [5] a continuous-time analogue of DSMC that allows the use of Green-Kubo theory for the calculation of the effect of finite timestep on the transport coefficients. In this analogue, or model, the collisions that occur instantaneously during the "collide" part of the DSMC algorithm are distributed uniformly throughout the timestep. It is shown that this redistribution of collision times generates molecular trajectories different from the trajectories generated by the DSMC algorithm. However, the change in trajectories and its effect can be formulated analytically in the limit of a small cell size. Subsequently, the change in trajectories is compensated for by supplying spatial shifts during the collision process, such that the particle dynamics are equivalent: no changes to the collision pairs are made, while particles under the model dynamics have the same final positions as molecules following the DSMC algorithm starting at the same initial position. Application of the Green-Kubo theory implies the consideration of problems that are steady. However, we expect these results to hold for transient problems on hydrodynamic timescales that are typically much longer than the molecular relaxation timescale. We quantify the deviation between the DSMC solution and the correct non-equilibrium steady state by obtaining measures of the deviation of the transport coefficients from their theoretical values. We will refer to the deviation of the transport coefficients from the exact Enskog values for dilute gases (which DSMC reproduces in the limit of infinite number of particles and vanishing timestep and cell size [61) as the truncation error. 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 381 (s?,v?) FIGURE 1. Schematic of a representative collision between particles in DSMC for cell size L —>• 0. The particles collide at T = At/2. II EQUIVALENT CONTINUOUS-TIME MODEL In what follows we will limit our illustration to two dimensions; generalization to three dimensions follows directly. Consider two particles, i and j, that collide at timestep n (Fig. 1); their initial locations at the start of the timestep are (x®,y®) and (o^yP). Let r be the time variable over which DSMC coarse grains, that is T = mod(t. At), where t = nAt -f r is time. The above particles travel with velocities Vi and iTj, and at r = At/2 (when collisions take place) will be in the same cell so that they are chosen as collision partners. After colliding, the particles acquire new velocities v\ and v^ and travel ballistically for the remainder of the timestep r = At/2 to their final positions (xt,yt) and (x|,y|). Note that in our notation a timestep starts l/2At before the instantaneous collision process and ends l/2At after the instantaneous collision process. This being purely a matter of convention has no effect on the DSMC dynamics: particles travel ballistically between collisions for a time At (we exclude the presence of external fields that may introduce particle accelerations) and then instantaneous collisions accounting for the whole time interval At take place. Our convention merely introduces a shift in the global time counter with collisions taking place at t = At/2, 3At/2, 5At/2,... with ballistic motion in between, instead of t = 0, At, 2At,... with ballistic motion in between. We now proceed to examine the case in which At is finite and thus the DSMC algorithm becomes discrete in time. For the Green-Kubo formalism to be applied we propose a continuous-time model that is dynamically equivalent to DSMC. Consider a model where the particles that according to DSMC would have collided at r = At/2 (that is, at r = At/2 were in the same cell) instead collide (each colliding pair independently) at tc that lies uniformly between r = 0 and T = At. The distribution function for the particle location (at collision r = tc) relative to the DSMC collision point depends on the difference between the collision time tc and the DSMC collision time T = At/2: we can write the single particle distribution (in one dimension) in the case that the collision cell is centered on x = 0 as rL/2 f(x;tc) = I p(x] q(x x ] t c ) dx, (1) J-L/2 where p(x) is the probability (uniform in this approximation) for a particle to be in the cell at x, and q(x\x] tc) is the probability for a particle that is at x at r = At/2 to be found at x at r = tc. Due to the Maxwellian velocity distribution q(x x\ tc) has a particularly simple form that leads to 382 FIGURE 2. Schematic of a representative collision between particles in the continuous-time model. The discontinuous jump in the trajectories represents the shift occuring along with the collision. f(x;tc) = (2) where k is Botzmann's constant, and T is the temperature. The above expression reduces to a Maxwellian distribution (centered on x = 0) if the cell size L -> 0. We can see that a finite cell size modifies the particle distribution function and thus, strictly, couples to the finite timestep truncation error. In the interest of simplicity (the effect of finite cell size can be fully quantified if the algebraic complexity is undertaken) and because the error due to a finite cell size in the limit At —>• 0 is known [1], we will take L —>• 0. In this limit the relative distance in the y direction between a collision pair at collision can be written as = (tc- - ) (3) where g = vi — Vj is the pre collision relative velocity of the particles. Figure 2 indicates that for this model to be dynamically identical to the DSMC implementation, colliding particles need to be shifted after their collisions by an amount that corrects for their ballistic motion with post-collision velocities instead of the pre-collision velocities for the appropriate amount of time (tc — At/2). that are the same as for DSMC The shift ensures that the molecules have final positions (#jf ,2//) and (Fig. 1). The amount each molecule needs to be shifted is given by A -» ___ /, ___ \( ~* ___ ~M f/l^ This shift introduces mass, momentum, and energy fluxes that contribute to "enhanced" transport coefficients as shown below. Ill CALCULATION OF TRANSPORT COEFFICIENTS We now present the calculation of the diffusion coefficient of the DSMC-equivalent continuous-time model as a function of the timestep. The derivation of the coefficient of viscosity is given in [5]. 383 Application of the Green-Kubo theory implies that steady problems are considered, at least at the autocorrelation decay timescale. This is not a very restrictive assumption since typical hydrodynamic evolution takes place at timescales much longer than the latter timescale. It is thus reasonable to assume that the results derived below will also hold for problems evolving at times long compared to the molecular relaxation timescale. The diffusion coefficient can be calculated using the Einstein formula where a long time limit is assumed. In addition to the ideal gas (Enskog) contribution to (xt(i) — #$(())), the continuous- time model reveals that the shift (eq. (4)) for both colliding particles required for every collision, leads to an extra contribution proportional to Y^c^xc = Sc(^ — ^)Ai£c, where the sum is over all collisions in time t. The cross term between the Enskog and shift contribution vanishes because DSMC is "centered" in time (6) where the (}c denotes average over collisions. The extra contribution is thus *- 5 where M is the number of collisions in time t. For uniformly distributed collisions in time Additionally, which leads to D' = --—At2 9n m v(10) ; where n is the number density, and F = 2a2n2^/7rkT/m is the collision rate per unit volume. The resulting expression for the diffusion coefficient D is 8r^V™ l i T ^ ^ ^ " (U) where c0 = -\/2kT/m is the most probable speed. The calculation of other transport coefficients follows along the same lines [5]. The expression for the viscosity including the timestep contribution is [5] 16(J2 V 7T V iSOTT A2 A similar calculation for the thermal conductivity K yields 75k [kT ( + 64 (c0A£)2 6757T A2 384 (12) Collisionless Limit 10' 10" 10" 10" 10U 10' FIGURE 3. Error in coefficient of diffusion as a function of timestep At (from [7]). Circles denote the normalized error in particle flux (E°) in the simulations of Garcia and Wagner [7], and the solid line is the prediction of (11). Collisionless Limit 10' 10" 10U 10 At FIGURE 4. Error in coefficient of viscosity as a function of timestep At (from [7]). Circles denote the normalized error in momentum flux (E%) in the simulations of Garcia and Wagner [7], and the solid line is the prediction of (12). 385 Collisionless Limit 10' 10° 10" 10U 10' FIGURE 5. Error in thermal conductivity as a function of timestep At (from [7]). Circles denote the normalized error in energy flux (E%) in the simulations of Garcia and Wagner [7], and the solid line is the prediction of (13). IV COMPARISON WITH NUMERICAL SIMULATIONS Garcia and Wagner [7] performed steady state simulations in a variety of configurations to measure the truncation error as a function of the timestep. In those simulations the cell size was taken to be L = A/5 so that the cell contribution is negligible, and the timestep was varied from At = A/(2c 0 ) to At = 16A/c0. The error is defined as the normalized deviation in the flux corresponding to the transport coefficient with respect to the exact result. The exact result is taken to be a very accurate simulation with At = A/(8co). Figures 3, 4, and 5 show the comparison between the numerical results of Garcia and Wagner and the theoretical prediction of equations (11), (12), and (13) for the diffusion coefficient, the viscosity coefficient, and the thermal conductivity respectively. The agreement is very good for At —»• 0. For At ^> A/CO the error deviates from the quadratic timestep dependence. Garcia and Wagner [7] point out that this is due to the upper bound set on the transport coefficients by the collisionless limit that is indicated on the same graph. V CONCLUDING REMARKS We have presented a formulation that allows the calculation of the transport coefficient dependence on timestep. The calculations predict that the error in the transport coefficients is of order At 2 , and that for At ~ A/CO the truncation error is approximately 5%, which confirms the empirical observations that accurate solutions require a timestep that is a small fraction of the mean free time. The theory presented relies on the application of the Green-Kubo theory and is thus valid for problems that appear steady at the autocorrelation decay timescale. The results of this paper have been verified by extensive numerical simulations [7]; the agreement between simulations and theory is very good for At —»• 0. For At ^> A/CO the error approaches the value set by the collisionless limit. Interestingly, Garcia and Wagner show that the error in transient calculations is of order At 2 , but no direct comparison between transport coefficients and equations (11-13) was presented. 386 VI ACKNOWLEDGEMENTS The author would like to thank Alej Garcia and Wolfgang Wagner for making their simulation results available, and Frank Alexander for helpful discussions. REFERENCES 1. 2. 3. 4. 5. 6. 7. Alexander, F. J., Garcia, A. L., and Alder, B. J., Phys. Fluids, 10, 1540 (1998). Wainright, T., J. Chem. Phys., 40, 2932 (1964). Bird, G. A., Molecular Gas Dynamics and the Direct Simulation of Gas Flows, Clarendon, Oxford (1994). Alexander, F. J., and Garcia, A. L., Comp. Phys., 11, 586 (1997). Hadjiconstantinou, N. G., to appear in Phys. Fluids. Wagner, W., J. Stat. Phys., 66, 1011, 1992. Garcia, A. L., and Wagner, W., to appear in Phys. Fluids. 387