In a gas of particles, how is the displacement vector related to the number density?

Suppose I have a gas of particles that is initially uniformly distributed so that the number density is $n_0$ (number of particles per unit volume), and then I displace the particles by the vector field $\vec{d}(\vec{x})$ (i.e. the particle initially at position $\vec{x}$ is displaced by the vector $\vec{d}$). How is the resulting number density $n(\vec{x})$ related to the displacement vector $\vec{d}(\vec{x})$?

I'm sure this must be done somewhere in a standard textbook but I can't find where.

-

A simple 1D calculation gives, at first order, something like

$$\frac{1}{n} = \frac{1}{n_0}\left(1+\vec{\nabla}\cdot\vec{d}\right)$$

but only if $\vec{d}$ is small enough. Otherwise, for calculating $n(\vec{x})$, you need to evaluate the divergence at a point $\vec{x'}$ such that $\vec{x'}+\vec{d}(\vec{x'}) = \vec{x}$.

-
I also got this in 1-D, but I thought it was wrong since if $d$ is sinusoidal, shouldn't $n$ be sinusoidal as well? –  Joss L Jun 30 '11 at 14:54
Only if d is small compared to your wavelength, in which case the equation above could also be written $n = n_0 (1 - \vec{\nabla}\cdot\vec{d})$. –  Edgar Bonet Jun 30 '11 at 15:00
Oh, I see. If we define $\delta = \frac{n - n_0}{n_0}$ then for small $\delta$ we get $\delta + \vec{\nabla} \cdot \vec{d} = 0$. Thanks, Edgar! –  Joss L Jun 30 '11 at 15:20

Take a point A. Find where it's been translated to, say A'. Add to the density at A' the original density at A divided by the Jacobian of the transformation at A.

Integrate this over all A.

-
I don't understand this –  Joss L Jun 30 '11 at 14:56