The diffusion equation with constant diffusion $D$ can be represented as:
\begin{equation}
\frac{\partial \phi(r, t)}{\partial t}=D \Delta \phi(r, t)
\end{equation}
where


* $\Delta$ is the Laplace operator and
* $\phi(r,t)$ represents a concentration at a point $r\in\mathbb{R}^n$ at time $t$.


When the diffusion is on a network, the Laplacian operator can be discretized and take the form of a matrix representation. The diffusion equation then takes the form:
\begin{equation}
\frac{d \phi\_{i}(t)}{d t}=D \sum\_{j} A\_{i j}\left(\phi\_{j}(t)-\phi\_{i}(t)\right)
\end{equation}
where now


* $\phi\_i(t)$ represents a concentration on the vertex $i$ at time $t$ and
* $A\_{ij}=1$ if there exists an edge between $i$ and $j$.


Consider now the case where the diffusion is not constant but is now a function depending on space and time: $D\to D(r,t)$. The diffusion equation simply is:


\begin{equation}
\frac{\partial \phi(r, t)}{\partial t}=\nabla \left[D(r,t) \nabla\phi(r, t)\right]
\end{equation}


**What happens to the network case now?** Writing out the discrete version of the Laplacian gives me:
\begin{equation}
\frac{d \phi\_{i}(t)}{d t}=\sum\_{j} A\_{i j}D\_{i}(t)\left(\phi\_{j}(t)-\phi\_{i}(t)\right)+"(\nabla D)(\nabla\phi)"
\end{equation}


But I have no idea how to discretize $\nabla$ and it feels wrong anyway. Intuitively I would expect something like:
\begin{equation}
\frac{d \phi\_{i}(t)}{d t}=-\phi\_{i}(t)+f\left(\sum\_{j} A\_{i j}\left(\phi\_{j}(t)(t)\right)\right)
\end{equation}
Where $f$ is some function related to $D$ so that we recover the non-linear behaviour of the continuous case.


What am I missing? [These notes](http://www.leonidzhukov.net/hse/2015/networks/lectures/lecture11.pdf) follow the approach I took, but are limited to constant diffusion. I was not able to find any lecture notes that cover non-linear diffusion on networks.



Non-linear diffusion on networks
$\newcommand{\R}{\mathbb R}$You do not need to "discretize $\nabla$". Also, you wrote the diffusion equation incorrectly. The correct version is this:
\begin{equation}
\frac{\partial f(r,t)}{\partial t}=\nabla\cdot[B(r,t)\,\nabla f(r,t)],
\end{equation}
where $f:=\phi$, $B:=D$, and $\cdot$ denotes the dot product. In the coordinate form, this equations is
\begin{equation}
\frac{\partial f(r,t)}{\partial t}=\sum\_{j=1}^n [B(r,t)\,(D\_j^2 f)(r,t)+(D\_j B)(r,t)\,
(D\_j f)(r,t)],
\end{equation}
where $D\_j$ is the operator of the partial differentiation with respect to the $j$th coordinate of $r\in\R^n$.


Now discretization becomes straightforward, by replacing the partial derivatives by the corresponding differences:
\begin{equation}
\frac{df\_i(r,t)}{dt}=
\sum\_j A\_{i,j}[B\_i(t)\,(f\_j(t)-f\_i(t))+
(B\_j(t)-B\_i(t))(f\_j(t)-f\_i(t))] 
\end{equation}
or, simply,
\begin{equation}
\frac{df\_i(r,t)}{dt}=
\sum\_j A\_{i,j}B\_j(t)(f\_j(t)-f\_i(t)). 
\end{equation}


More generally, we can write
\begin{equation}
\frac{df\_i(r,t)}{dt}=
\sum\_j A\_{i,j}B\_{i,j}(t)(f\_j(t)-f\_i(t)), 
\end{equation}
where the $B\_{i,j}$'s are nonnegative functions. This will describe a general continuous-time random walk on the network. One may want to recall at this point that the diffusion equation describes an approximation of jump processes (which are continuous-time random walks) by processes continuous in space.


