Fick's first law inhomogeneous proof I have seen Fick's first law of diffusion derived for a homogeneous material many times, however I am struggling to find a satisfactory proof for inhomogeneous, particularly for particle diffusion. Why does it take the form:
$$D {\partial \phi \over \partial x}$$ 
Where $D$ is the diffusion coefficient, And the same form:
$$D(x) {\partial \phi \over \partial x}$$ 
When $D$ is a function of $x$? For example wiki gives this (http://en.wikipedia.org/wiki/Fick%27s_laws_of_diffusion) but no explanation as to why? What assumptions are made that lead to this? And under what circumstances is the Fokker–Planck diffusion law a better model?
 A: First of all, this is a reasonable question. If I derive the diffusion equation only for D=const, then I can obviously not distinguish between 
$$ 
\vec\jmath =-D\vec\nabla \phi 
\quad {\rm and} \quad
\vec\jmath =-\vec\nabla (D\phi) , 
$$
which are cleary different.
1) The diffusion constant (like other transport coefficients, for example the shear viscosity $\eta$ and the thermal conductivity $\kappa$) is a function of the thermodynamic variables $T$ and $P$ (or $T$ and $\mu$). This means that $D$ acquires a dependence on $x$ via $P$ and $T$, that is $D=D(T(x),P(x))$. This arises from the standard coarse graining employed in deriving macroscopic equations.
2) This is seen explicitly if we compute $D$ in kinetic theory. The diffusion constant is obtained by linearizing the Boltzmann equation around the local equilibrium distribution (this is called the Chapman-Enskog procedure)
$$
f(x,p)=\exp(-(E_p-\mu(x))/T(x))
$$ 
so that we obtain $D=D(\mu(x),T(x))$.
3) This means that the two versions of Fick's law given above differ by gradients of $T$ and $P$. However, the most general form of Fick's law does contain such terms explicitly. For example, Landau and Lifshitz define
$$
\vec\jmath =-D\left[\vec\nabla \phi +k_T\vec\nabla\log T +k_P\vec\nabla\log P\right],
$$
where $k_T$ and $k_P$ are the "thermal diffusion" and "baro-diffusion" coefficient.
4) This implies that I should measure (or compute) $D$ for the most general driving term, containing gradients of $\phi,T,P$. This $D$ will still be a fucntion of $T(x)$ and $P(x)$, and so are $k_T$ and $k_P$. The diffusion equation is 
$$ 
\partial_t\phi + \vec\nabla\cdot\vec\jmath=0
$$
and gradients of $\vec\jmath$ will act on any spatial variation of $D$. 
A: From a mesoscopic point of view the net number of particles going across a section with area $\delta y \delta z $ in a time $\tau$ and located about $x$ is given by
\begin{equation}
\Delta N(x,\tau) = \phi(x)\delta y \delta z v_0 \tau - \phi(x+\delta x)\delta y \delta z v_0 \tau
\end{equation}By expanding $\phi(x+\delta x) \approx \phi(x)+\partial_x \phi(x)\delta x$, we end up with the current density $j \equiv \Delta N/(\delta y \delta z\tau)$ giving:
\begin{equation}
j(x,t) = -\delta x \: v_0 \frac{\partial \phi}{\partial x} 
\end{equation}Now, $v_0$ can be interpreted (up to some unimportant prefactor) as the ratio of the mean free path of the tracer particles $\lambda$ divided by the collision time $\tau$. We can end up rewriting the whole equation for the current as being:
\begin{equation}
j(x,t) = -D \frac{\partial \phi}{\partial x} = -\frac{\lambda^2}{\tau} \frac{\partial \phi}{\partial x} 
\end{equation}
Now, in an inhomogeneous medium, the mean free path of tracer particles and the typical time between collisions will be both dependent on position $\lambda \rightarrow \lambda(x)$ and $\tau \rightarrow \tau(x)$, such that the diffusion coefficient of the tracer particles becomes effectively position dependent:
\begin{equation}
j(x,t) = -D(x) \frac{\partial \phi}{\partial x}
\end{equation}
Now, in crowded environments where there can be strong local inhomogeneities (not because of an external medium but because the tracer particles themselves have a stationary density profile), it is often the case that $D(x) = D(\phi(x))$, which often simplifies the derivation of general results on these problems.
