Gridless DSMC Spencer Olson University of Michigan Naval Research Laboratory Now at: Air Force Research Laboratory Collaborator: Andrew Christlieb, Michigan State University 8 June 2007 30 June 2009 J Comp Phys, Vol 227, pp 8035-8064, 2008.
Outline Background Algorithm Overview Test Cases Low velocity flow Hypersonic flow
Gas Dynamics Simulation Approaches Discrete Particle Model Rarefied Dense Inviscid Free-Particle Limit Limit Fig. 1.1, G. A. Bird, Molecular Gas Dynamics and the Direct Simulation of Gas Flows, 1994. : Local Knudsen number : Mean free path : Local Characteristic length
Continuous Solution? What about a numerical solution of the Boltzmann equation? : Collision integral : N-Body phase-space density For cm/s and ~10µ m X 10µ m X 1mm resolution, need ~>> 1 TB of memory! (and a lifetime to compute the collision integral)
Direct Simulation of gas dynamics using Monte Carlo
Direct Simulation of gas dynamics using Monte Carlo Grid Truncate collision integral
Direct Simulation of gas dynamics using Monte Carlo Grid Ansatz: Collisional processes separable from particle motion. Collide Transport
Grid Mismatch: Coarse Grid Grid Density variations could be due to: Shockwaves Nonfree particle systems Transient processes Captures only low-density dynamics well Allows non-probable collisions
Grid Mismatch: Fine Grid Grid Density variations could be due to: Shockwaves Nonfree particle systems Transient processes Captures only high-density dynamics well Wastes memory resources Thermally isolates particles that should be allowed to collide
Particle Method of Choice: DSMC Direct Simulation of gas dynamics using Monte Carlo (DSMC) Algorithm: Collide Sort (gridless) Update/Sample macroscopic gas quantities Move (integrate) Apply Boundary Conditions (reflections, absorption,etc.)
Simple Gridless Case: Binary Sort/Search Algorithm LNOHFMJIDKBA CEG
Binary Sort/Search Algorithm NOHFMJIDKBACEG L H N F J M O D G I K B E A C
Binary Sort/Search Algorithm IDKBACEG L H N F J M O D G I K B E A C
Binary Sort/Search Algorithm CEG L H N F J M O D G I K B E A C
Binary Sort/Search Algorithm Execution time: Sort: Search: (averaged over all trees) L H N F J M O D G I K B E A C
Binary Sort/Search Algorithm Execution time: Sort: Search: (averaged over all trees) H D L B F J N A C E G I K M O
Quadtree Sorting: Divisions about Geometric Center A Divide by geometric center Disallow children with too few particles Avoid bad aspect ratio A B C B C D E F G F G H I H
Quadtree Sorting: Divisions about Geometric Center A Divide by geometric center Disallow children with too few particles Avoid bad aspect ratio A B C B C D E F G F G H I H
Quadtree Sorting: Divisions about Geometric Center A Divide by geometric center Disallow children with too few particles Avoid bad aspect ratio A B C B C D E F G F G H I H
Quadtree Sorting: Divisions about Center of Mass A Divide by center of mass Disallow children with too few particles Avoid bad aspect ratio Shrink to avoid large empty space A B C B C D E F L J F G H I J K L M H
Quadtree Sorting Divisions about Geometric Center Large Empty Space Avoided Divisions about Center of Mass Minimal Bounded Volume
DSMC Validity Condition : Scale size of nodes : Mean collision separation F. J. Alexander, A.~L. Garcia, B. J. Alder, Cell size dependence of transport coefficients in stochastic particle algorithms, Phys. Fluids, 10:1540-1542, 1998.
DSMC Validity Condition Validity Metric F. J. Alexander, A.~L. Garcia, B. J. Alder, Cell size dependence of transport coefficients in stochastic particle algorithms, Phys. Fluids, 10:1540-1542, 1998.
Quadtree Example
Getting the Collision Rate Correct (Grid Based) Time counting methods: In each cycle, evaluate random collision pairs until desired collision rate is met. Collision probability and spacing mismatched in time. Not vectorizable (multi-processor code not easy) G. A. Birds NTC method (1989) Calculate number of tested collisions ahead of time (no time mismatch problems). Vectorizable.
Getting the Collision Rate Correct (Grid Based) Grid G. A. Birds NTC method (1989) #Select =
Getting the Collision Rate Correct (Tree Based) Grid Gridless ~ --> time averaged gridless data #Select =
Move Particles Solve Using favorite integrator. Free particles: RK2, leap-frog, etc. Non-free particles: Adaptive RK5 (embedded RK4 for error detection) RK4 (with small time step) etc.
Apply Boundary Conditions 1. Scale boundary boxes 2. Test boundary boxes for overlap with tree nodes 3. Allow each overlapped boundary to interact with tree node particles Each boundary segment treated as an individual object with its own interaction logic
Example Boundary (collisional)
Test Cases Couette flow Velocity diffusion Thermal diffusion Very low velocity flow past thin plate Hypersonic flow Square cylinder Biconic cylinder (2D) (static shock-shock interaction) Evaporative cooling in ultracold gas
Couette Flow Flow between two infinite parallel plates. Case 1: Case 2: 32
Couette Flow: v 2 v 1 = 300m/s Gridded DSMC data provided by Dr. Quanhua Sun 33
Hypersonic Flow Mach 10 Gas: Argon Compared to results from G. A. Bird's DS2V program Case 1: Square Cylinder Case 2: Biconic Cylinder (2D) 34
Hypersonic Flow: Square Cylinder Mach 10 Gas: Argon Compared to results from G. A. Bird's DS2V program Case 1: Square Cylinder 8 m Computational domain Case 2: Biconic Cylinder (2D) v 0.5 3 m 0.5 35
Hypersonic Flow: Square Cylinder Number Density Gridless DSMC Mach Number DS2V DSMC Temperature 36
DSMC Validity Condition: Square Cylinder Validity condition met: Uniform validity throughout. Gridless DSMC Validity condition met: Non-uniform validity metric. Cell size might possibly be made too small causes thermal isolation. DS2V DSMC 0.08 0.06 0.04 0.02 0.00
Hypersonic Flow: Biconic Cylinder (2D) Mach 10 Gas: Argon Compared to results from G. A. Bird's DS2V program Case 1: Square Cylinder 25 cm Computational domain Case 2: Biconic Cylinder (2D) v 20 cm J. N. Moss, G. A. Bird, and G. N. Markelov, DSMC Simulations of Hypersonic Flows and Comparison With Experiments, Rarefied Gas Dynamics: 24 th Intntl. Sym. on Rare. Gas Dyn, 2005. 38
DSMC Validity Condition: Biconic Cylinder (2D) Validity condition NOT met: Non-uniform validity metric not enough particles Gridless DSMC Validity condition partially met: Non-uniform validity metric. Cell size may be too small causes thermal isolation. DS2V DSMC 0.4 0.3 0.2 0.1 0.00 39
DSMC Validity Condition: Biconic Cylinder (2D) Validity condition met: N ~ X13 N 0 Gridless DSMC Validity condition met: Non-uniform validity metric. Cell size may still be too small causes thermal isolation. N ~ X13 N 0 DS2V DSMC 0.4 0.3 0.2 0.1 0.00 40
Future Work In the middle of a major code-rewrite Faster: Sort time Tree traversal time Handles multiple particle types Arbitrary collision equation sets (only binary input now) Integrate with multipole-expansion treecode field solvers Simulate plasma+neutral shock-shock interactions Continue boundary code development 41