I'm interested in solving the diffusion equation for gas in vacuum. I have a general question and a more specific questions.

What I know:

The Diffusion Equation: For density function $\phi(\vec{\mathbf{r}},t)$ the diffusion equation is: $$\frac{\partial}{\partial t} \phi(\vec{\mathbf{r}},t) = D \nabla^{2} \phi(\vec{\mathbf{r}},t)$$ where D is the diffusion coefficient.

For a gas of two constituent atom types, Chapman-Enskog theory predicts that the Diffusion Coefficient - at 1 atm and 300 K - will be: $$ D = \dfrac{9.65445\cdot\sqrt{1/M_{1} + 1/M_{2}}}{\sigma_{12}^{2}\Omega} $$ where $\sigma_{12}^{2}$ is the average of the collision diameters for the two gasses ($\sigma_{1}$ and $\sigma_2$) in Angstroms and $\Omega$ is a temperature-dependent collision integral (apparently, usually on order 1).

What I don't know

How would one calculate the diffusion coefficient if instead of a gas of two atoms, we have a gas of just one atom type diffusing?

General Question

Let's say we know that at time t=0 we have a gas of one type of atom confined to a volume $V_c$ in the corner of a box of size $V_b$ (with $V_c$ = $V_b / 1000$), we let it diffuse out of the corner, and we know the time at which the gas diffuses to uniformly fill the box of size $V_b$ (t=T). How could we calculate the proportion of the room that is filled by gas at T/2 seconds?

Specific question

Let's say we're dealing with Argon Gas at a density of 2 g/cm^3 (g/ml) or 0.002g/m^3 initially in a 100 ml container. The diffusion time to to fill a 100 cubic meter box at vacuum is 56 seconds. I know that the initial and final density could be defined as follows, with $\phi(\vec{\mathbf{r},t})$ expressed in cartesian coordinates with the corner the gas stars in defined as the origin, and the box defined as the positive quadrant from $x,y,z=0...10m$: $$ \phi(\vec{\mathbf{r}},0) = 0.002 \ [g/m^3] \ \text{for} \ x,y,z < 0.01 \ [m] $$ and $$ \phi_{f}(\vec{\mathbf{r}},56) = 0.02 [g/m^3] \ \text{for} \ x,y,z < 10 \ [m] $$

How could I analytically/numerically solve for the density as a function of time, and are there any free software packages I could use to solve for and plot this?

  • $\begingroup$ Just how do you have a gas in a vacuum? If it has gas it is not a vacuum. Vacuum definition: a space entirely devoid of matter. $\endgroup$ – paparazzo Sep 14 '15 at 21:32
  • $\begingroup$ Thought this might be clear, but you start off with big space at vacuum, and you release gas from a small volume in the corner of the space, to diffuse in to the vacuum $\endgroup$ – D. W. Sep 14 '15 at 22:27
  • $\begingroup$ Oh in to not in. $\endgroup$ – paparazzo Sep 14 '15 at 22:42
  • $\begingroup$ Did you just read the title $\endgroup$ – D. W. Sep 14 '15 at 22:49
  • 1
    $\begingroup$ As Thomas says, diffusion concerns slow movement of rarified particles in the crowd of other particles. If you just let gas out of a box to expand into vacuum, the major effect is adiabatic expansion of the gas and its motion is a complicated transport process, not reducible to any model of diffusion. $\endgroup$ – Ján Lalinský Sep 16 '15 at 20:03

How could I analytically/numerically solve for the density as a function of time, and are there any free software packages I could use to solve for and plot this?

Let's focus on the diffusion equation in one dimension, to see what happens here (the results can easily be modified to multiple dimensions).

$\frac{\partial \phi(x,t)}{\partial t} = D \frac{\partial^2 \phi(x,t)}{\partial x^2}$.

Now we will solve this equation after using the fourier transformation

$\hat{\phi}(k,t) = \frac{1}{\sqrt{2\pi}}\int\limits_{-\infty}^{\infty} \phi(x,t) e^{-ikx} \mathrm{d}x$.

Using this, the diffusion equation becomes a ordinary differential equation

$\frac{\partial \hat{\phi}(k,t)}{\partial t} = -D k^2\hat{\phi}(k,t)$.

We can simply integrate it to get the result

$\hat{\phi}(k,t) = \hat{\phi}(k,0) e^{-D k^2\cdot t}$,

where $\hat{\phi}(k,0)$ is the fourier transformation of the initial condition $\phi(x,0)$.

So now we transformate back into the space coordinate $x$

$\phi(x,t) = \frac{1}{\sqrt{2\pi}}\int\limits_{-\infty}^{\infty} \hat{\phi}(k,t) e^{ikx} \mathrm{d}k = \frac{1}{\sqrt{2\pi}}\int\limits_{-\infty}^{\infty} \hat{\phi}(k,0) e^{-D k^2\cdot t + ikx} \mathrm{d}k$.

Next we find $\hat{\phi}(k,0)$ for your problem. Since you want the gas to start in a small area in a empty space, we have the initial condition

$\phi(x,0) =\operatorname{rect}(x)$.

The rectangular function $\operatorname{rect}(x)$ is 0, except in the interval $[-1/2,1/2]$, where it is 1. Its fourier transformation is $\hat{\phi}(k,0) = 1/\sqrt{2\pi} \operatorname{sinc}(k/2\pi)$. Now the density function can be written as

$\phi(x,t) = \frac{1}{2\pi}\int\limits_{-\infty}^{\infty} \operatorname{sinc}(k/2\pi) e^{-D k^2\cdot t + ikx} \mathrm{d}k$.

This is probably as far as you can get. You have to solve this integral numerically for different times and diffusion constants $D$. I'll try to plot some solutions this evening if I have the time.

How would one calculate the diffusion coefficient if instead of a gas of two atoms, we have a gas of just one atom type diffusing?

I'm not 100% sure, but I think, you simply can neglete the second gas (or set $M_1 = M_2$).

  • $\begingroup$ Thank you so much! This answer is everything I could have asked for! $\endgroup$ – D. W. Sep 15 '15 at 18:27
  • $\begingroup$ Do you happen to know of any free software packages that can handle this kind of numerical integration / plotting? I don't think numpy/scipy can do this kind of thing, but I'm probably wrong $\endgroup$ – D. W. Sep 15 '15 at 18:28
  • $\begingroup$ Python / Numpy supports complex numbers and I'm pretty sure that they have predefined integrators. So yes, you can even use python. But there are other options like octave or the gsl library for C. $\endgroup$ – manthano Sep 15 '15 at 21:00
  • 1
    $\begingroup$ As I explain in my answer, I don't think this problem has anything to do with diffusion. $\endgroup$ – Thomas Sep 16 '15 at 2:44

The expansion of a gas into the vacuum is not a diffusive process. Depending on the initial conditions (density and density gradient) the expansion is either described by the Euler/Navier-Stokes equation of fluid dynamics, or the Boltzmann equation of kinetic theory.

For the parameters that you mention the gas is sufficiently dense that most of it is in the regime of short mean free paths, and the expansion is described by the Euler equation (or the Navier-Stokes equation, if you would like to keep dissipative corrections). The Euler description breaks down near the dilute edge (and this is difficult to treat correctly), but this is not where most of the particles are.

If the initial density has a sharp edge, then the expansion takes the form of shock wave (in 1d, this is the Riemann problem). This is discussed in standard text books on fluid dynamics. If the initial density is smooth (say a Gaussian), then the expansion is approximately described by self-similar scaling solutions of the Euler equation.

Order of magnitude estimates can be obtained just from energy conservation. The initial energy is $E=\frac{3}{2}NT_0$ (for an ideal gas). The expansion cools the gas and converts this into kinetic energy, $$ E=\int d^3x \frac{1}{2}\rho u^2. $$ This means that after some initial acceleration phase the gas moves with mean velocity $u_{rms}=\sqrt{3T_0/m}$. This is not surprising, it says that the gas moves (approximately) with the speed of sound in the initial cloud. However, it is clearly different from a diffusive front, which slows down with time (the mean position goes as $\langle x^2\rangle^{1/2}\sim \sqrt{t}$).

  • $\begingroup$ In your integral is the density $\rho$ constant? As in, is that the initial density, or do density and velocity both change with change in volume? How did you solve for u? What assumptions did you make? Also, shouldn't it be (3/2)NkT $\endgroup$ – D. W. Sep 17 '15 at 17:53
  • $\begingroup$ 1) This is the mean velocity, defined by $\int d^3x\rho u^2=Nm u_{rms}^2$. 2) In natural units, $k_B=1$. $\endgroup$ – Thomas Sep 17 '15 at 21:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.