I am considering the following set of PDEs:
\begin{align} \frac{\partial u}{\partial t} &= f(u,v) - \chi \nabla\cdot \left(u\nabla v\right)+d\Delta u\\ &= f(u,v) - \chi\nabla u\cdot \nabla v - \chi u \Delta v +d \Delta u\\ \frac{\partial v}{\partial t} &= g(u,v) +\Delta u\\ \end{align}
with periodic boundary conditions on a finite domain and some non-negative initial conditions. This can be interpreted as a diffusing chemical $v$ and a species $v$ that diffuses and shows directed movement to the highest chemical concentration.
I want to solve the problem numerically in Python using Operator splitting. I used the FTCS (forward in time, central in space) scheme for the diffusion term, the fourth order Runge Kutta scheme reaction term but I need help with the discretization/numerical treatment of the taxis (directed movement) term $\chi \nabla\cdot (u\nabla v)$.
Any help is appreciated.
Note that the diffusion term $\Delta u$ may be viewed as $\nabla \cdot \nabla u$. In Cartesian coordinates, this rule also applies to the corresponding centered finite difference operators. Indeed, \begin{aligned} (\Delta u)_i & \simeq \frac{u_{i+1} - 2u_i + u_{i-1}}{h^2} \\ & = \frac1{h}\left(\frac{u_{i+1} - u_i}h - \frac{u_i - u_{i-1}}h \right) \simeq (\nabla\cdot \nabla u)_i \end{aligned} in 1D. Similarly, we have $$ \nabla\cdot(u\nabla v) \simeq \frac{1}{h}\left(\frac{u_i+u_{i+1}}2 \frac{v_{i+1} - v_i}h - \frac{u_{i-1}+u_{i}}2 \frac{v_{i} - v_{i-1}}h\right) . \tag{1} $$ Alternatively, using the chain rule $\nabla\cdot(u\nabla v) = \nabla u\cdot \nabla v + u\Delta v$, we have $$ \nabla\cdot(u\nabla v) \simeq \frac{u_{i+1}-u_{i-1}}{2h}\frac{v_{i+1}-v_{i-1}}{2h} + u_i \frac{v_{i+1} - 2v_i + v_{i-1}}{h^2} . \tag{2} $$ The difference $(1)-(2)$ is $$ \frac{(u_{i+1} - 2u_i + u_{i-1})(v_{i+1} - 2v_i + v_{i-1})}{4h^2} \simeq \frac{h^2}{4}(\Delta u \Delta v)_{i} $$ which is of same order as the finite difference's error. Hope that helps!