User:Adv stat kid/sandbox

== Smoluchowski Diffusion Equation == The Smoluchowski Diffusion equation is the Fokker-Planck equation restricted to Brownian particles affected by an external force $$F(r)$$.

$$\partial_t P(r,t| r_0, t_0) = \nabla \cdot [D (\nabla - \beta F(r)) P(r,t| r_0, t_0)] $$

Where $$D$$ is the diffusion constant and $$\beta=\frac{1}{k_B T}$$. The importance of this equation is it allows for both the inclusion of the effect of temperature on the system of particles and a spatially dependent diffusion constant.

Starting with the Langevin Equation of a Brownian particle in external field $$F(r)$$, where $$\gamma$$ is the friction term, $$\xi$$ is a fluctuating force on the particle, and $$\sigma$$ is the amplitude of the fluctuation.

$$m\ddot{r} = - \gamma \dot{r} + F(r) + \sigma \xi(t) $$

At equilibrium the frictional force is much greater than the inertial force, $$\left\vert \gamma \dot{r} \right\vert >> \left\vert m \ddot{r} \right\vert$$. Therefore the Langevin equation becomes,

$$\gamma \dot{r} = F(r) + \sigma \xi(t)$$

Which generates the following Fokker-Planck equation,

$$\partial_t P(r,t|r_0,t_0) = \Bigl(\nabla^2\frac{\sigma^2}{2 \gamma^2} - \nabla \cdot \frac{F(r)}{\gamma}\Bigr) P(r,t|r_0,t_0) $$

Rearranging the the Fokker-Planck equation,

$$\partial_t P(r,t|r_0,t_0)= \nabla \cdot \Bigl( \nabla D- \frac{F(r)}{\gamma}\Bigr) P(r,t|r_0,t_0)$$

Where $$D = \frac{\sigma^2}{2 \gamma^2}$$. Note, the diffusion coefficient may not necessarily be spatially independent if $$\sigma$$ or $$\gamma$$ are spatially dependent.

Next, the total number of particles in any particular volume is given by,

$$N_V (t| r_0, t_0) = \int\limits_V dr P(r,t|r_0,t_0)$$

Therefore, the flux of particles can be determined by taking the time derivative of the number of particles in a given volume, plugging in the Fokker-Planck equation, and then applying Gauss's Theorem.

$$\partial_t N_V (t|r_0, t_0) = \int\limits_V dV \nabla \cdot\Bigl( \nabla D- \frac{F(r)}{\gamma}\Bigr) P(r,t|r_0, t_0) = \int\limits_{\partial V} \vec{da} \cdot j(r,t|r_0, t_0)$$

$$j(r,t|r_0, t_0) = \Bigl( \nabla D- \frac{F(r)}{\gamma}\Bigr)P(r,t|r_0, t_0)$$

In equilibrium, it is assumed that the flux goes to zero. Therefore, Boltzmann statistics can be applied for the probability of a particles location at equilibrium, where $$F(r) = -\nabla U(r)$$ is a conservative force and the probability of a particle being in a state $$r$$ is given as $$P(r,t|r_0, t_0) = \frac{e^{-\beta U(r)}}{Z}$$.

$$j(r,t|r_0, t_0) = \Bigl( \nabla D- \frac{F(r)}{\gamma}\Bigr)\frac{e^{-\beta U(r)}}{Z} = 0$$

$$\Rightarrow \nabla D   = F(r)(\frac{1}{\gamma} - D \beta)$$

This relation is a realization of the Fluctuation-Dissipation-theorem. Now applying $$ \nabla \cdot \nabla $$ to $$D P(r,t|r_0, t_0)$$ and using the Fluctuation-dissipation theorem,

$$\nabla \cdot \nabla D P(r,t|r_0,t_0) = \nabla \cdot D \nabla P(r,t|r_0,t_0)+ \nabla \cdot P(r,t|r_0,t_0) \nabla D$$

$$=\nabla \cdot D \nabla P(r,t|r_0,t_0)+\nabla \cdot P(r,t|r_0,t_0) \frac{F(r)}{\gamma} - \nabla \cdot P(r,t|r_0,t_0) D \beta F(r)$$

Rearranging,

$$ \Rightarrow \nabla \cdot \Bigl( \nabla D- \frac{F(r)}{\gamma}\Bigr)P(r,t|r_0,t_0)= \nabla \cdot D(\nabla-\beta F(r)) P(r,t|r_0,t_0)$$

Therefore, the Fokker-Planck equation becomes the Smoluchowski equation,

$$\partial_t P(r,t| r_0, t_0) = \nabla \cdot D (\nabla - \beta F(r)) P(r,t| r_0, t_0) $$

For an arbitrary force $$F(r)$$.

Computational considerations
Brownian motion follows the Langevin equation, which can be solved for many different stochastic forcings with results being averaged (canonical ensemble in molecular dynamics). However, instead of this computationally intensive approach, one can use the Fokker–Planck equation and consider the probability $$p(\mathbf{v}, t)\,d\mathbf{v}$$ of the particle having a velocity in the interval $$(\mathbf{v}, \mathbf{v} + d\mathbf{v})$$ when it starts its motion with $$\mathbf{v}_0$$ at time 0.

=== 1-D Linear Potential Example ===

Theory
Starting with a linear potential of the form $$U(x) = cx$$ the corresponding Smoluchowski equation becomes,

$$\partial_t P(x,t| x_0, t_0) = \partial_x D (\partial_x + \beta c) P(x,t| x_0, t_0) $$

Where the diffusion constant, $$D$$, is constant over space and time. The boundary conditions are such that the probability vanishes at $$x \rightarrow \pm \infin $$ with an initial condition of the ensemble of particles starting in the same place, $$P(x,t|x_0,t_0)= \delta (x-x_0) $$.

Defining $$\tau = D t $$ and $$b = \beta c $$ and applying the coordinate transformation,

$$y = x +\tau b ,\ \ \ y_0= x_0 + \tau_0 b $$

With $$P(x, t, |x_0, t) = q(y, \tau|y_0, \tau_0)$$ the Smoluchowki equation becomes,

$$\partial_t q(y, \tau| y_0, \tau_0) =\partial_y^2 q(y, \tau| y_0, \tau_0)$$

Which is the free diffusion equation with solution,

$$q(y, \tau| y_0, \tau_0)= \frac{1}{4 \pi D (\tau - \tau_0)} e^{ -\frac{(y-y_0)^2}{4(\tau-\tau_0)} }$$

And after transforming back to the original coordinates,

$$P(x, t| x_0, t_0)= \frac{1}{4 \pi D (t - t_0)} \exp {\Bigl[{ -\frac{(x-x_0+ D \beta c(t-t_0))^2}{4D(t-t_0)}} }\Bigr]$$

==== Simulation ==== The simulation on the right was completed using a Brownian dynamics simulation. Starting with a Langevin equation for the system,

$$m\ddot{x} = - \gamma \dot{r} -c + \sigma \xi(t) $$

Where $$\gamma$$ is the friction term, $$\xi$$ is a fluctuating force on the particle, and $$\sigma$$ is the amplitude of the fluctuation. At equilibrium the frictional force is much greater than the inertial force, $$\left\vert \gamma \dot{x} \right\vert >> \left\vert m \ddot{x} \right\vert$$. Therefore the Langevin equation becomes,

$$\gamma \dot{x} = -c + \sigma \xi(t)$$

For the Brownian dynamic simulation the fluctuation force $$\xi(t)$$ is assumed to be Gaussian with the amplitude being dependent of the temperature of the system $$\sigma = \sqrt{2\gamma k_B T}$$. Rewriting the Langevin equation,

$$\frac{dx}{dt}=-D \beta c + \sqrt{2D}\xi(t)$$

Where $$D=\frac{k_BT}{\gamma}$$ is the Einstein relation. The integration of this equation was done using the Euler- Maruyama method to numerically approximate the path of this Brownian particle.