Date of Award


Document Type

Thesis open access


Computer Engineering

First Advisor

Mark C. Lewis

Second Advisor

Nirav Mehta

Third Advisor

Seth Fogarty


In this thesis I will implement a numerically stable soft-sphere collision model using Hooke’s Law as the restoring force. This model allows choosing a desired coefficient of restitution and maximum penetration depth in order to generate appropriate values for the spring constant and damping. Then I will explore the applicability of various languages to the field of kD-tree based N-body simulations, concluding that Rust is competitive in both the time and memory usage to C/C++, which are the languages traditionally used for high-performance applications. Additionally, I found that the usage of higher-level languages like Java come at significant time or memory usage costs, making them of little value in the field of large astrophysics simulations. Lastly, as soft-sphere simulations require much smaller time steps for integration compared to hard-spheres, I implemented and benchmarked a priority-queue based adaptive time step system to only take the small time steps when needed. The benchmarks showed a significant speedup compared soft-sphere simulations without this adaptive time step method at roughly 8x faster. In direct particle-particle testing, the adaptive time step showed that with as little as 15 steps during a collision, which the adaptive time step method allows me to set, stable collision handling can be achieved across a spectrum of impact speeds and particle size ratios.