Direct simulation Monte Carlo

From HandWiki - Reading time: 6 min

Short description: Monte Carlo method

Direct simulation Monte Carlo (DSMC) method uses probabilistic Monte Carlo simulation to solve the Boltzmann equation for finite Knudsen number fluid flows.

The DSMC method was proposed by Graeme Bird,[1][2][3] emeritus professor of aeronautics, University of Sydney. DSMC is a numerical method for modeling rarefied gas flows, in which the mean free path of a molecule is of the same order (or greater) than a representative physical length scale (i.e. the Knudsen number Kn is greater than 1). In supersonic and hypersonic flows rarefaction is characterized by Tsien's parameter, which is equivalent to the product of Knudsen number and Mach number (KnM) or M[math]\displaystyle{ ^2 }[/math]/Re, where Re is the Reynolds number.[4][5] In these rarefied flows, the Navier-Stokes equations can be inaccurate. The DSMC method has been extended to model continuum flows (Kn < 1) and the results can be compared with Navier Stokes solutions.

The DSMC method models fluid flows using probabilistic simulation molecules to solve the Boltzmann equation. Molecules are moved through a simulation of physical space in a realistic manner that is directly coupled to physical time such that unsteady flow characteristics can be modeled. Intermolecular collisions and molecule-surface collisions are calculated using probabilistic, phenomenological models. Common molecular models include the hard sphere model, the variable hard sphere (VHS) model, and the variable soft sphere (VSS) model. Various collision models are presented in.[6]

Currently, the DSMC method has been applied to the solution of flows ranging from estimation of the Space Shuttle re-entry aerodynamics to the modeling of microelectromechanical systems (MEMS).

DSMC Algorithm

The direct simulation Monte Carlo algorithm is like molecular dynamics in that the state of the system is given by the positions and velocities of the particles, [math]\displaystyle{ \{ \mathbf{r}_i, \textbf{v}_i\} }[/math], for [math]\displaystyle{ i = 1, \ldots, N }[/math]. Unlike molecular dynamics, each particle in a DSMC simulation represents [math]\displaystyle{ F_N }[/math] molecules in the physical system that have roughly at the same position and velocity. This allows DSMC to rescale length and time for the modeling of macroscopic systems (e.g., atmospheric entry). Specifically, the system volume is [math]\displaystyle{ V = (N F_N)/n }[/math], where [math]\displaystyle{ n }[/math] is the number density and each collision between simulation particles represents [math]\displaystyle{ F_N }[/math] collisions among molecules in the physical system. As a rule of thumb there should be 20 or more particles per cubic mean free path for accurate results.[citation needed]

The evolution of the system is integrated in time steps, [math]\displaystyle{ \tau }[/math], which are typically on the order of the mean collision time for a particle. At each time step all the particles are moved and then a random set of pairs collide. In the absence of external fields (e.g., gravity) the particles move ballistically as [math]\displaystyle{ \mathbf{r}_i(t+\tau) = \mathbf{r}_i(t) + \mathbf{v}_i(t) \tau }[/math]. Any particle that reaches a boundary or a surface has its position and velocity reset accordingly (e.g., periodic boundary conditions). After all the particles have moved, they are sorted into cells and some are randomly selected to collide. based on probabilities and collision rates obtained from the kinetic theory of gases. After the velocities of all colliding particles have been reset, statistical sampling is performed and then the process is repeated for the next time step.

Collisions

On each timestep the particles are sorted into spatial cells and only particles in the same cell are allowed to collide. Typically the dimension of a cell is no larger than a mean free path. All pairs of particles in a cell are candidate collision partners, regardless of their actual trajectories.

The details of how collisions are calculated in DSMC depend on the molecular interaction model; here we take the hard spheres model, which is the simplest. In the hard spheres model, the collision probability for the pair of particles, [math]\displaystyle{ i }[/math] and [math]\displaystyle{ j }[/math], is proportional to their relative speed, [math]\displaystyle{ P_\mathrm{coll}[i,j] = { {|\mathbf{v}_i - \mathbf{v}_j|} \over {\sum_{m=1}^{N_\mathrm{c}} \sum_{n=1}^{m-1} |\mathbf{v}_m - \mathbf{v}_n|} } }[/math] where [math]\displaystyle{ N_\mathrm{c} }[/math] is the number of particles in the cell and the summations are over particles within the cell. Because of the double sum in the denominator it can be computationally expensive to use this collision probability directly. Instead, the following rejection sampling scheme can be used to select collision pairs:

  1. A pair of candidate particles, [math]\displaystyle{ i }[/math] and [math]\displaystyle{ j }[/math], is chosen at random and their relative speed, [math]\displaystyle{ v_\mathrm{r} = |\mathbf{v}_i - \mathbf{v}_j| }[/math], is computed.
  2. The pair is accepted as collision partners if [math]\displaystyle{ v_\mathrm{r} \gt v_\mathrm{r}^\mathrm{max} \Re }[/math], where [math]\displaystyle{ v_\mathrm{r}^\mathrm{max} }[/math] is the maximum relative speed in the cell and [math]\displaystyle{ \Re }[/math] is a uniform deviate in [0, 1).
  3. If the pair is accepted, the collision is processed; the velocities of the particles are reset but positions are unchanged.
  4. After the collision is processed or if the pair is rejected, return to step 1.

This procedure is correct even if the value of [math]\displaystyle{ v_\mathrm{r}^\mathrm{max} }[/math] is overestimated, although it is less efficient in the sense that more candidates are rejected.

After the collision pair is chosen, their post-collision velocities, [math]\displaystyle{ \mathbf{v}_i^* }[/math] and [math]\displaystyle{ \mathbf{v}_j^* }[/math], are evaluated. Writing the relative velocity in terms of spherical angles, [math]\displaystyle{ \theta }[/math] and [math]\displaystyle{ \phi }[/math] [math]\displaystyle{ \mathbf{v}_\mathrm{r}^* = v_\mathrm{r} [ (\sin\theta \cos\phi) \hat{\mathbf{x}} + (\sin\theta \sin\phi) \hat{\mathbf{y}} + \cos\theta \,\hat{\mathbf{z}} ] }[/math] these angles are selected by a Monte Carlo process with distributions given by the collision model. For the hard spheres model these angles are uniformly distributed over the unit sphere. The azimuthal angle is uniformly distributed between 0 and [math]\displaystyle{ 2\pi }[/math], so it is selected as [math]\displaystyle{ \phi = 2\pi\Re_1 }[/math] where [math]\displaystyle{ \Re_1 }[/math] is a uniform deviate in [0, 1). The polar angle is distributed according to the probability density, [math]\displaystyle{ P_\theta(\theta) \, d\theta = {\textstyle \frac{1}{2}} \sin\theta \, d\theta }[/math] Using the change of variable [math]\displaystyle{ q = \sin\theta }[/math], we have [math]\displaystyle{ P_q(q) \, dq = ({\textstyle \frac12}) \, dq }[/math] so [math]\displaystyle{ \cos\theta = q ~\mathrm{and}~ \sin\theta = \sqrt{1 - q^2} ~\mathrm{where}~ q = 2\Re_2 -1 }[/math] The post-collision velocities are set as [math]\displaystyle{ \mathbf{v}_i^* = \mathbf{v}_\mathrm{cm}^* + {1\over2}\mathbf{v}_\mathrm{r}^* \qquad \mathbf{v}_j^* = \mathbf{v}_\mathrm{cm}^* - {1\over2}\mathbf{v}_\mathrm{r}^* }[/math] Note that by conservation of linear momentum and energy the center of mass velocity and the relative speed are unchanged in a collision. That is, [math]\displaystyle{ \mathbf{v}_\mathrm{cm} = {1\over2} (\mathbf{v}_i + \mathbf{v}_j) = {1\over2} (\mathbf{v}_i^* + \mathbf{v}_j^*) = \mathbf{v}_\mathrm{cm}^* }[/math] and [math]\displaystyle{ v_\mathrm{r} = | \mathbf{v}_i - \mathbf{v}_j | = | \mathbf{v}_i^* - \mathbf{v}_j^* | = v_\mathrm{r}^* }[/math] This process is repeated for every pair of colliding particles.

From the collision frequency, [math]\displaystyle{ f_\mathrm{coll} }[/math], given by kinetic theory the total number of hard sphere collisions in a cell during a time [math]\displaystyle{ \tau }[/math] is [math]\displaystyle{ M_\mathrm{coll} = {1\over2} (N_\mathrm{c}-1) F_N f_\mathrm{coll} \tau = { {N_\mathrm{c}(N_\mathrm{c}-1) F_N \pi d^2 \langle v_\mathrm{r} \rangle \tau}\over {2 V_\mathrm{c}} } }[/math] where [math]\displaystyle{ d }[/math] is the particle diameter and [math]\displaystyle{ V_\mathrm{c} }[/math] is the volume of the cell. Since collision candidates go through a rejection sampling procedure the ratio of total accepted to total candidates for hard sphere particles is [math]\displaystyle{ { {M_\mathrm{coll}}\over{M_\mathrm{cand}} } = { {\langle v_\mathrm{r} \rangle}\over{v_\mathrm{r}^{\max}} } }[/math] The number of collision candidates selected in a cell over a time step [math]\displaystyle{ \tau }[/math] is [math]\displaystyle{ M_\mathrm{cand} = { {N_\mathrm{c}(N_\mathrm{c}-1) F_N \pi d^2 v_\mathrm{r}^{\max} \tau}\over {2 V_\mathrm{c}} } }[/math] This approach for determining the number of collisions is known as the No-Time-Counter (NTC) method. If [math]\displaystyle{ v_\mathrm{r}^{\max} }[/math] is set excessively high then the algorithm processes the same number of collisions (on average) but the simulation is inefficient because many candidates are rejected.

References

  1. Bird, G. A (1963). "Approach to Translational Equilibrium in a Rigid Sphere Gas". Physics of Fluids 6 (10): 1518. doi:10.1063/1.1710976. Bibcode1963PhFl....6.1518B. 
  2. G. A. Bird, Molecular Gas Dynamics, Clarendon Press, Oxford (1976)[page needed]
  3. G. A. Bird, Molecular Gas Dynamics and the Direct Simulation of Gas Flows, Clarendon Press, Oxford (1994)[page needed]
  4. Tsien, Hsue-Shen (1946). "Superaerodynamics, Mechanics of Rarefied Gases". Journal of the Aeronautical Sciences 13 (12): 653–64. doi:10.2514/8.11476. 
  5. M. N. Macrossan, 'Scaling Parameters for Hypersonic Flow: Correlation of Sphere Drag Data'. In: M. S. Ivanov and A. K. Rebrov, 25th International Symposium on Rarefied Gas Dynamics, Siberian Division of the Russian Academy of Sciences, p.759 (2007).
  6. Roohi, E.; Stefanov, S. (2016). "Collision partner selection schemes in DSMC: From micro/nano flows to hypersonic flows". Physics Reports 656 (1): 1–38. doi:10.1016/j.physrep.2016.08.002. Bibcode2016PhR...656....1R. 

External links




Licensed under CC BY-SA 3.0 | Source: https://handwiki.org/wiki/Direct_simulation_Monte_Carlo
5 views | Status: cached on July 31 2024 14:22:50
↧ Download this article as ZWI file
Encyclosphere.org EncycloReader is supported by the EncyclosphereKSF