I have a 2 compartment simulation. The first compartment simulates reactions using ODEs. The second compartment uses Brownian motion. I want to be able to have molecules from the ODE compartment diffuse into the Brownian compartment.

It would seem I need to answer this question:

What physics/maths governs the rate of diffusion out of a volume? Can I simply use Fick's law?


In a volume $V$, a large number number of particles starting to move according to Brownian motion at time $t=0$ from the position $x_0\in V$ will exit from $V$ at a rate that depends on time, on the geometry of the volume $V$, and on the position $x_0$. For instance in one dimension, particles diffusing from $x_0>0$ will enter the region $x<0$ at time $t$ with probability density $$ p(t)=\frac{x_0}{\sqrt{4\pi Dt^3}}\exp\left(-\frac{x_0^2}{4Dt}\right).\tag{1}$$ (1) is called Smirnov density.

Let us note $q(x, t; x_0,t_0)$ the probability of being at $x$ at time $t$, when we started in $x_0$ at time $t_0$. We are interested in $$Q(t; x_0,t_0)=\iiint_Vq(x,t;x_0,t_0)\mathrm d^3x$$ the probability of being in $V$ at time $t$. Starting from the diffusion equation $$\partial_tq(x,t;x_0,t_0)=D\Delta_xq(x,t;x_0,t_0)$$ we obtain after integration over $x$ and using the fact that $\Delta_{x_0} Q=\Delta_x Q$ and $\partial q/\partial t_0=-\partial q/\partial t$ $$\frac{\partial Q}{\partial t_0}=-D\,\Delta_{x_0}Q(t;x_0,t_0).$$ As it is a diffusion equation where the variable are the initial conditions, it is called a backward diffusion equation. We now can set $t_0=0$ for simplicity. The solution we want is obtained with the initial boundary condition $$Q(0;x_0)=\left\{\begin{array}{cc}1&\text{if $x_0\in V$},\\0&\text{otherwise}.\end{array}\right.$$ You can check that $$Q(t;x_0)=\iiint_V \frac{\mathrm d^3x}{(4\pi Dt)^{3/2}}\exp\left(-\frac{(x-x_0)^2}{4Dt}\right).$$ And the exit rate at time $t$ is $$p(t)=\frac{\partial Q}{\partial t}(t,x_0).$$

  • $\begingroup$ So, I need to evaluate the final equation at each timestep? $\endgroup$
    – RNs_Ghost
    Jan 14 '14 at 16:30
  • $\begingroup$ @RRs_Ghost. I have answered the question "What physics/maths governs the rate of diffusion out of a volume?" and my answer shows how it works. Depending on how you perform your simulation, this answer might be helpful or not. $\endgroup$
    – Tom-Tom
    Jan 14 '14 at 22:34

Geometry: Area of orifice, length of orifice

Difference in concentrations which will need to be modeled over time.

Square root of the density: inversely proportional to sqrt of mass of particles. Assuming this is gaseous phase, the density is directly related to mass.) Look up Graham's Law of Diffusion.


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.