Publications

A Pseudo-Spectral Method for Self-Gravitating Fluid Dynamics

Jane Smith, C. Mathematician

Journal of Computational Physics , 2023

numerical methodsspectral methodshydrodynamics

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 2Φ=4πGρ\nabla^2 \Phi = 4\pi G \rho is trivially solved in Fourier space:

Φ^(k)=4πGρ^(k)k2\hat{\Phi}(\mathbf{k}) = -\frac{4\pi G \hat{\rho}(\mathbf{k})}{k^2}

Two FFTs (forward and inverse) give the gravitational potential at O(NlogN)O(N \log N) cost — far cheaper than the O(N2)O(N^2) direct summation or O(NlogN)O(N \log N) tree codes for moderate NN.

Paper

Open PDF in a new tab →