1. Introduction
Modeling non-equilibrium gas dynamics necessitates accounting for the atomistic and molecular nature of gases, especially under conditions involving finite-rate thermochemical relaxation and chemical reactions. Such scenarios, coupled with low densities, small length-scales, high gradients, or high flow speeds, lead to pronounced thermochemical non-equilibrium in the bulk flow, particularly within boundary layers. Particle simulation methods, notably DSMC, have proven invaluable for understanding and designing hypersonic vehicles. These methods benefit significantly from increasing computational power.
Changes in the state of a dilute gas primarily occur through molecular collisions, making the mean free path the relevant spatial scale and the mean collision time the pertinent temporal scale. Below the temporal scale of , no variations in the gas state are possible; similarly, no changes occur below the spatial scale of . In a dilute gas, there are a vast number of molecules within a given volume, ranging from tens of thousands to trillions. It is not necessary to account for the properties of every individual molecule; instead, their local distribution functions (for velocity, internal energy, chemical species, etc.) are sufficient to describe the non-equilibrium state of the gas accurately. These distribution functions can be created by taking into account only a small portion of the real molecules of the gas. Additionally, in a dilute gas, the pre-collision orientations (the corresponding impact parameters) of colliding molecules are totally random.
The Direct Simulation Monte Carlo (DSMC) method leverages these inherent properties of dilute gases by utilizing simulator particles, which represent a large number of real gas molecules. These simulator particles are moved in time steps of the order of
, and collision pairs and their initial/final orientations are stochastically selected within volumes (computational cells) of the order of
. These simplifications are based on sound physical principles. Present DSMC methods go further, by employing probabilistic rules to determine local collision rates and outcomes, thus introducing collision models. The DSMC method, introduced by Bird [
1], has since seen extensive development, with Bird authoring three seminal books on the subject [
2,
3,
4], and thousands of research papers have documented the method’s development and applications. Over 50 years, DSMC has proved significant in analyzing high Knudsen number flows, ranging from continuum to free-molecular conditions. DSMC simulations emulate the physics described by the Boltzmann equation, and have been shown to converge to its solution with a very large number of particles [
3]. For low Knudsen numbers (
, the Boltzmann equation, through Chapman–Enskog theory [
5], reduces exactly to the Navier–Stokes equations, the governing equations of gas flow in the continuum regime. Consequently, particle-based (DSMC) and continuum (Navier–Stokes) methods provide a consistent modeling capability for gas flows across the entire Knudsen range.
DSMC collision models are highly flexible, allowing them to be formulated to match continuum thermochemical rate data, or directly include quantum chemistry findings. This flexibility provides the ability for DSMC solvers to perform high-fidelity simulations of multispecies gases in strong non-equilibrium conditions. For example, DSMC has been utilized in investigations such as the Columbia Space Shuttle orbiter accident [
6], the 2001 Mars Odyssey aerobraking mission [
7], and the analysis of post-flight data from the Stardust mission [
8,
9,
10,
11]. As computational resources continue to advance, the utility and range of DSMC applications are expanding accordingly.
The long-term objectives in the DSMC field are multifaceted. First, they include the development of large-scale particle simulations that can seamlessly integrate with Computational Fluid Dynamics (CFD) simulations for intricate 3D flows. Achieving this requires advancements in computational efficiency and the eventual creation of hybrid DSMC-CFD capabilities. Second, the field aims to enhance phenomenological (reduced-order) models for engineering design and analysis, providing more efficient and accurate tools for practical applications. Third, incorporating quantum-chemistry collision models directly into particle simulations is crucial for deepening our understanding of hypersonic flows at the most fundamental level. As with any numerical methodology, these advancements must undergo rigorous validation against experimental data. This process is essential not only for verifying the accuracy of the models, but also for guiding the design of new experiments necessary to further scientific progress.
DSMC method has been employed to study various hypersonic experimental test cases performed in ground-based facilities. Historically, creating rarefied hypersonic flows in such settings posed significant technical challenges, resulting in a limited number of datasets for validating DSMC codes. A notable code validation effort focused on hypersonic viscous interactions on slender-body geometries, conducted at the LENS experimental facility. These experiments involved a variety of geometries, including biconics and flared cylinders [
12]. A prominent comparison of DSMC simulations with experimental data was provided by Moss and Bird [
13], examining a Mach 15.6 flow of nitrogen over a 25/55-degree biconic. Results from two different codes (DS2V and SMILE) were presented, both showing excellent agreement with the experimental measurements. Similarly, another study [
14] reported on a Mach 12.4 flow of nitrogen over a flared cylinder, where the flow conditions did not activate the vibrational energy of the nitrogen molecules, and no chemical reactions occurred.
Additionally, the Bow-Shock Ultra-Violet-2 (BSUV-2) flight experiment, conducted in 1991, involved a vehicle with a capped 15-degree cone nose (radius of 10 cm) re-entering Earth’s atmosphere at 5.1 km/s, collecting data at altitudes between 60 and 110 km [
14]. During this flight, ultraviolet radiation emission from nitric oxide and vacuum ultraviolet emission from atomic oxygen were recorded by onboard instruments. The chemically reacting flow was simulated using both continuum [
15,
16,
17] and particle methods [
18]. Subsequent ultraviolet emissions were calculated with NASA’s non-equilibrium code NEQAIR [
19]. Initial DSMC comparisons showed poor agreement at high altitudes, prompting further study of oxygen dissociation and nitric oxide formation in these conditions by incorporating chemistry models into DSMC simulations [
18,
20]. This refinement led to excellent agreement with radiance data and accurate simulation of spectral features and atomic oxygen emissions. The BSUV-2 experiment underscored the importance of experimental data for advancing thermochemical modeling with DSMC solvers.
A critical issue extensively studied is the communications blackout that occurs during re-entry. This phenomenon is investigated through Radio Attenuation Measurement (RAM) experiments, which involve a series of re-entry flights. The communications blackout is a significant concern for all hypersonic vehicles, as it is caused by plasma formation at very high speeds, which interferes with radio waves transmitted to and from the vehicle. To conduct these experiments, the RAM-C II hypersonic vehicle was developed. This vehicle features a cone with a spherical cap of radius 0.1524 m, a cone angle of 9 degrees, and a total length of 1.3 m. During re-entry, the RAM-C II reached an orbital velocity of 7.8 km/s, with experiments carried out at altitudes between 90 and 60 km. Electron number density in the plasma layer surrounding the vehicle was measured at various locations [
21,
22]. Additionally, a series of reflectometers measured plasma density along lines perpendicular to the vehicle’s surface at four different locations, and several Langmuir probes assessed the variation in plasma density across the plasma layer at the vehicle’s rear. Boyd [
23] conducted DSMC simulations of the RAM-C II vehicle to develop procedures for simulating charged species such as electrons and ions in trace amounts. These DSMC results were compared with experimental measurements, leading to the conclusion that the dissociation chemistry model used needed further investigation. Two models were tested: Total Collision Energy (TCE) and Vibrationally Favored Dissociation (VFD). Both models showed excellent agreement with the available experimental data.
Apart from hypersonic external flows, another significant application of the DSMC method is in the field of microfluidics, where it is particularly valuable for simulating low-speed, rarefied gas flows through micro- and nanochannels. These flows, which occur at low Mach numbers, are characterized by high Knudsen numbers, making continuum assumptions inappropriate and necessitating particle-based methods like DSMC. The works by Varade et al. [
24] and Ebrahimi et al. [
25] investigate the flow in microchannels with diverging geometries, demonstrating how DSMC can effectively capture the complex flow behavior that arises due to the geometric constraints and the rarefied nature of the gas. The aforementioned works provide detailed analysis of gas flows in both micro- and nanochannels, emphasizing the impact of channel size and shape on flow characteristics. Their results highlight the necessity of DSMC for accurately modeling such flows, which exhibit significant deviations from classical fluid dynamics predictions.
Validation and verification are critical processes in computational fluid dynamics (CFD), particularly when dealing with complex simulations, such as those involving rarefied hypersonic flows. Documenting detailed test cases provides the research community with essential benchmarks that not only ensure reproducibility, but also facilitate further development and comparison of computational tools like SPARTA. This paper addresses this need by presenting a collection of test cases, complete with comprehensive instructions on how to set up and run them, thereby enhancing the relevance and utility of SPARTA within the research community. Guidelines on how to run SPARTA efficiently are given in
Section 4 of this work.
The challenge of generating high-quality experimental measurements in the rarefied hypersonic regime persists, posing a substantial obstacle for DSMC solvers improvement. To optimize the use of available experimental resources, DSMC researchers should continue to design experiments that highlight the fundamental characteristics of non-equilibrium flows.
2. The DSMC Methodology
The Direct Simulation Monte Carlo (DSMC) method is a particle-based technique grounded in kinetic theory for simulating rarefied gases. It models gas flow by employing numerous simulator particles, each representing a significant number of real gas particles. In the DSMC method, the time step
is carefully selected to be sufficiently small to decouple particle movements from collisions. During a DSMC simulation, the flow domain is divided into computational cells, which serve as geometric boundaries and volumes for sampling macroscopic properties. The DSMC algorithm comprises four primary steps. First, within each time step
, all particles move along their trajectories, and interactions with boundaries are calculated. Second, particles are indexed into cells based on their positions. Third, collision pairs are selected, and intermolecular collisions are carried out probabilistically. Finally, macroscopic flow properties, such as velocity and temperature, are determined by sampling the microscopic state of particles in each cell.
Figure 1 illustrates the flowchart of the DSMC algorithm.
The DSMC algorithm exhibits linear scaling with both the number of particles and the total number of time steps required to reach a solution. Consequently, methods that reduce the total number of particles and time steps while preserving accuracy can achieve significant computational efficiencies. Even when computational cells are optimally adapted to the local mean free path, the number of particles per cell can vary with changes in flow density. An ideal simulation should maintain a sufficient number of particles per cell to ensure statistical accuracy, keeping the total number of particles relatively constant throughout the simulation. Several efficient strategies for the DSMC method have been proposed by Kennenber and Boyd [
26]. One prominent strategy for reducing the number of simulation time steps and controlling particle numbers is the cell-based time-step approach for steady-state flows. This technique employs a ray-tracing strategy to move particles between cells, with each cell having its own time step adapted to the local mean collision time. Specifically, each cell stores the value
, where
is a global reference time step. During each global time step
, every particle moves for
. As observed, using larger time steps results in fewer particles per cell. To address this, a particle weight
is assigned to each cell. This technique maintains a constant number of particles during a simulation by cloning or deleting particles, with minor modifications to the DSMC algorithm. In general, particle weighting schemes can accurately control the total number of particles in three-dimensional flows. The process of cloning or deleting particles aims to keep the total particle count constant. However, cloning particles can introduce random walk errors. Additionally, collisions between particles of different weights only conserve mass, momentum, and energy on average, potentially leading to random walk errors [
2]. Various strategies have been suggested to mitigate this effect, such as holding cloned particles in buffers instead of immediately injecting them into the simulation. Despite these efforts, an elegant and accurate solution to particle weighting remains elusive.
To minimize the total number of computational cells and, consequently, the total number of particles, LeBeau et al. [
27] introduced the virtual sub-cell (VSC) method, and Bird [
28] developed the transient adaptive sub-cell method (TASC). Both methods aim to reduce the mean collision separation between selected collision pairs, which are no longer chosen randomly within a computational cell. As a result, the cell size can be increased to some extent, while still maintaining a low mean collision separation. The VSC method performs a nearest-neighbor search to select collision partners, whereas the TASC method subdivides each cell into several sub-cells used only during the collision routine to sort collision pairs, thereby minimizing the mean collision separation. To prevent repeated collisions between the same pair, the last collision partner is tracked, and if selected again, the particle is excluded, and the next nearest particle is chosen instead. Additionally, since the collision rate is computed within each cell (not sub-cell), there is a limit to the cell size increase before the assumption of a constant collision rate within a large cell leads to simulation inaccuracies.
Burt et al. [
29] proposed an interpolation scheme for the collision rate within computational cells, in combination with the aforementioned techniques. This scheme allows an increase in cell size while maintaining full accuracy. Bird has also suggested significant algorithmic modifications [
4,
30] to the DSMC method, with similar goals of reducing time steps and the total number of particles. In these new algorithms, the mean collision separation is minimized, but now each particle stores its own time step. This approach enables the simulation to iterate with small time steps, and particles move only when the global time step matches their individual time steps. Consequently, only a small number of particles move during each global time-step iteration. Detailed information on this method can be found in [
31]. The new algorithms resulted in a twofold speedup for Fourier flow simulations compared to the standard DSMC algorithm. Moreover, Ref. [
31] revealed that forming nearest-neighbor collision pairs after particles have moved for large time steps is physically inconsistent, and leads to simulation inaccuracies. Further inaccuracies were noted when a constant collision rate was applied to large cells. The new DSMC algorithms show promise, and further analysis should be conducted on hypersonic flows with large density gradients. Additionally, these new algorithms are parallel, though their scalability requires testing [
32]. Typically, increasing communication between processors (as with more frequent time steps) and reducing the computational load per partition negatively impacts scalability.
3. Molecular Models
The molecular models in DSMC, also known as collision models, describe the interactions between gas particles. These models fall into two main categories:
(i) impulsive models, which use approximations to classical or quantum–mechanical representations of collisions, and
(ii) phenomenological models, which utilize local relaxation concepts to calculate energy exchanges [
33]. The hard-sphere model [
33,
34,
35], the first model introduced in DSMC, treats molecules as hard spheres that collide when the distance between them decreases to the following:
where
and
are the diameters of the colliding molecules. This model’s main advantage is that it uses a finite cross-section, defined by
The collision calculation is straightforward, and the scattering of hard-sphere molecules is isotropic in the center-of-mass frame of reference, meaning all directions are equally probable for
, where
is the magnitude of particle’s velocity. In the hard-sphere model, viscosity and diffusion cross-sections are, respectively, given by
and
The primary characteristics of the hard-sphere model are the finite cross-section, as well as the isotropic scattering in the center-of-mass frame of reference. However, this scattering law is actually unrealistic. A significant problem of the hard-sphere model is the resultant dynamic viscosity. According to [
1], a molecular model for rarefied gas flows should reproduce the dynamic viscosity of the real gas and its temperature dependence. The resulting viscosity of the hard-sphere model is proportional to the temperature to the power of 0.5, while real gases have a temperature dependence closer to 0.75. The primary reason for this discrepancy is that the particle cross-section is independent of the relative translational energy:
where
is the relative velocity and
is the relative mass. The actual cross-section depends on this relative velocity
. Due to inertia, the trajectory changes decrease as the relative velocity increases, requiring a variable cross-section to match the 0.75 power characteristic of real gases. This need led to the development of the variable hard-sphere (VHS) model [
33,
34,
35]. In the VHS model, the molecule is modeled as a hard sphere with a diameter
that is a function of
, using an inverse power law:
where the subscript
is used for the reference values;
is reference effective diameter at relative speed
and
is the VHS parameter, which depends on the particle species. The reference values are defined for a given gas by the effective diameter at the defined temperature. The VHS model uses Equation (7) to calculate the deflection angle
where
is the distance of the mass centers of the collision partners and
is the particle’s diameter, as denoted in Equation (6). VHS model has a temperature dependence of viscosity given as
where
is related to the particle’s total number of degrees of freedom.
The Variable Soft-Sphere (VSS) model [
4,
36] is a recent and popular model used in DSMC simulations. In the VSS model, the deflection angle is modified from the VHS model as follows:
being the VSS scattering parameter. Moreover, the total collision cross-section of the variable soft-sphere model is defined by
. This provides the following dynamic viscosity equation for a given VSS gas [
2,
3]
Similar to the VHS model, viscosity is proportional to
, while the
parameter is chosen in the same manner as for the VHS model. Regarding the diffusion coefficient for a VSS gas mixture, it is given as [
12]
For a simple gas with viscosity
and self-diffusion coefficient
at the reference temperature
the equation for the effective diameters
and
based on the viscosity and diffusion is [
36]
respectively. By equalizing the two diameters,
may be determined as
The VSS model reproduces more accurately the diffusion process, compared to the VHS model and is, therefore, preferred for analyzing diffusion phenomena. However, a drawback of the VSS model is that constant values for
are valid only within a specific range of temperatures. Both the VHS and VSS models approximate the realistic inverse power law model. In addition to the VHS and VSS models, older molecular models exist, such as the variable-
Morse potential, the hybrid Morse potential, and the inverse-power variable-
models. Detailed descriptions of these models can be found in [
37,
38]. Briefly, these older models treat individual collisions as either inelastic with probability
, or completely elastic with probability
. The constant
, is also known as the exchange restriction factor, ranging between 0.1 and 1. At the event of an inelastic collision, the total energy is redistributed between the translational and rotational modes of the particle, based on probabilities derived from the equilibrium distribution [
36].
4. The SPARTA Kernel
The SPARTA (Stochastic Parallel Rarefied-gas Time-Accurate Analyzer) solver, developed by M.A. Gallis and S.J. Plimpton at Sandia Laboratories, is an open-source code distributed under the GPL license [
32]. Designed for ease of extension, modification, and the addition of new functionalities, the SPARTA kernel can operate on a single processor or on a cluster of processors, using the domain decomposition concept and MPI library. Despite its robustness and flexibility, SPARTA is not intended for novice users. It requires a deep understanding of the DSMC method and a specifically written input script to run simulations. SPARTA executes commands from the input script line by line, necessitating a structured format divided into four parts:
Initialize.
Problem settings.
Simulation settings.
Simulation.
The third and fourth parts can be repeated until convergence is achieved. This section will describe each part of the input script and highlight some important features of the solver. In the initialization part of the input script, the simulation parameters are defined. These parameters include the simulation units (CGS or SI), the initial seed for the random number generator, and the problem dimensions (2D or 3D).
In the “Problem settings” part of the input script, all parameters needed to start the simulation are specified. Typical parameters include the coordinates of the simulation box, the simulation grid, surfaces within the simulation box, particle species, and the initial particle population. SPARTA utilizes a hierarchical Cartesian grid [Sparta User’s Manual]. This approach treats the entire simulation domain as a single parent grid cell at level 0, which is then subdivided into by by cells at level 1. Each of these cells can either be a child cell (no further division) or a parent cell, further subdivided up to 16 levels in 64-bit architectures. SPARTA employs domain decomposition to enable parallel simulation. Each processor handles a small portion of the entire domain, executes the algorithm routines, and communicates with neighboring processors to exchange particles. All processors have a copy of the parent cells, while each processor maintains its own child cells.
Child cells can be assigned to processors using one of four methods: clump, block, stride, and random. The clump and block methods create geometrically compact assignments, grouping child cells within each processor. The stride and random methods produce dispersed assignments. In the clump method, each processor receives an equal portion of the simulation domain, with cells assigned sequentially. For example, in a domain with 10,000 cells and 100 processors, the first processor handles cells 1 to 100, the second handles cells 101 to 200, and so on. The block method overlays a virtual logical grid of processors onto the simulation domain, assigning each processor a contiguous block of cells. The stride method assigns every cell to the same processor, where P is the number of processors. For example, in a grid of 10,000 cells and 100 processors, the first processor receives cells 1, 101, 201,…, 9001, while the second processor receives cells 2, 102, 202,…, 9002, and so forth. The random method assigns grid cells randomly to processors, resulting in an unequal distribution of grid cells among processors.
The load balancing performed at the beginning of a SPARTA simulation is static, as it is conducted once. During this stage, the aim is to distribute the computational load evenly across processors. Once the grid is created and grid cells are assigned to processors, these cells, along with their particles, are migrated to their respective processors. SPARTA also features a gridcut option, which, if used correctly, can optimize simulation time. Gridcut is applicable to clump assignments only. In domain decomposition, each processor maintains information about the ghost cells of neighboring processors. By using gridcut, the distance at which ghost cell information is stored can be specified. For example, if gridcut is set to −1, each processor will store a copy of all ghost cells used in the simulation, consuming a large amount of memory, especially for large systems. Conversely, if gridcut is set to 0, each processor will store a minimal number of ghost cells, reducing memory usage but increasing the number of messages required to move particles between processors, potentially creating a communication bottleneck. Tests have shown that a gridcut value of three cell diameters balances memory efficiency and communication overhead. In the test cases examined in this work, a gridcut value of three level-2 cell diameters was used to avoid communication bottlenecks.
Next, the script defines the simulation outputs, collision model, chemistry model, dynamic load balancing, boundary conditions, and surface reflection models. This part of the script is crucial for determining the quality and speed of the simulation. Specifically, it defines the simulation time step, the flow-field variables to be computed, surface properties’ computation, sampling intervals, and output intervals. Miscalculations in sampling intervals or frequent output writing can significantly slow down the simulation. SPARTA performs dynamic load balancing by adjusting the assignment of grid cells and their particles to processors, to distribute the computational load evenly. After dynamic load balancing, the cells assigned to each processor may be either clumped or dispersed. SPARTA offers three methods for dynamic balancing: clumped assignments, dispersed assignments, and recursive coordinate bi-sectioning (RCB). In the first method, each grid cell is randomly assigned to a processor, resulting in an uneven distribution of grid cells. In the second method, each processor randomly selects one processor for its first grid cell and assigns subsequent cells to consecutive processors, also leading to uneven distribution. The RCB method assigns compact clumps of grid cells to processors.
To perform dynamic balancing, SPARTA requires two additional arguments: the imbalance factor and the frequency of imbalance checks. The imbalance factor is defined as the maximum number of particles owned by any processor divided by the average number of particles per processor. The frequency specifies how often the imbalance is checked during the simulation. These factors must be chosen carefully, to avoid communication overheads. In the cases discussed, an imbalance factor of 30% and checking the imbalance no more than twice during the simulation proved effective. An exception was the flared cylinder case, which required four imbalance checks due to the large number of time steps, as described in Part B of this work. In all test cases presented in this work, sufficient time was allowed for the number of particles to stabilize before initiating the sampling procedure. This ensures that the simulations reach a steady state, providing accurate and reliable results. In the first test case, the transient period before starting sampling was 8000 timesteps, while in the second case, the transient period was 100,000 timesteps. In the flat-plate test case a total number of 4000 samples were obtained, while in the 70-degree interplanetary probe a total number of 10,000 samples was obtained.
The detailed documentation of the test cases presented in this paper serves a dual purpose: it validates the SPARTA DSMC solver and provides the community with reliable benchmarks for future research. By sharing these cases with comprehensive instructions, the reproducibility of the results is enhanced, contributing at the same time to the collective effort of refining and validating computational tools in the field of hypersonic flow simulations.
6. Conclusions
Advancements in simulation capabilities have expanded the application of particle-based methods like Direct Simulation Monte Carlo (DSMC), initially used for hypersonic rarefied gas dynamics and re-entry vehicle simulations. DSMC has since been extended to various flow regimes, including subsonic microflows. Part A of this work examined two different rarefied hypersonic flow cases. In both cases, there was a strong agreement between the computed and experimental results. Furthermore, it was demonstrated that with a high-quality grid, SPARTA can accurately analyze rarefied hypersonic flows.
Regarding the flat-plate simulation, it would be beneficial to investigate SPARTA’s scalability beyond 32 processors and compare it with the corresponding DAC scalability. This comparison was not made in this work, due to limited available information. The results of both solvers were in very good agreement, except for the heat transfer calculation, where SPARTA outperformed DAC. In the 70-degree blunt-cone simulation, the computed results also showed strong agreement with the experimental data. A refined grid was used around the blunt cone, in this case. In the more rarefied of the two examined cases, the vortices at the back of the cone were not well resolved, which is related to the gas rarefaction rather than a grid issue. In the second subcase, where the gas is denser, the two vortices at the back of the cone were clearly observed. The agreement between computed and experimental results was very good in the fore-cone region. However, there was a slight difference at the back of the cone, which, according to Ref. [
42], is due to the inability of the sensors utilized in the corresponding experiment to accurately resolve flow data in that area because of gas rarefaction.
While SPARTA is a highly capable DSMC solver, achieving accurate results often hinges on the correct setup of simulations. The complexity of the tool means that discrepancies in expected outcomes are frequently due to user setup errors rather than limitations of the software itself. A solid understanding of the DSMC method, grid adaptation, and grid partitioning techniques is necessary. The detailed validation and verification cases documented in this paper represent a significant contribution to the DSMC community. By providing clear and reproducible test cases, we not only validate the SPARTA solver but also create a valuable resource for future research. Part B of this work will present further testing of the SPARTA kernel, with a focus on hypersonic vehicles.