A Pseudo-Spectral Method for Self-Gravitating Fluid Dynamics
Journal of Computational Physics , 2023
Abstract
We develop a pseudo-spectral method for solving the coupled Poisson–Euler system describing self-gravitating fluid dynamics in three dimensions. The algorithm achieves spectral accuracy for smooth problems and scales as O(N log N) per timestep via fast transforms, representing a significant speedup over conventional finite-volume approaches. We validate the method on a suite of test problems including Jeans instability, soliton propagation, and collapse of a cold cloud, and demonstrate sub-percent energy conservation over hundreds of dynamical times.
Behind the Scenes
More context, methodology notes, and supplementary material.
Key idea
Spectral methods represent the solution as a truncated series of basis functions (here, Fourier modes on a periodic domain). The key advantage: for smooth solutions, the error decays exponentially with resolution rather than as a power law.
Why this matters for gravity
The Poisson equation is trivially solved in Fourier space:
Two FFTs (forward and inverse) give the gravitational potential at cost — far cheaper than the direct summation or tree codes for moderate .