\begin{equation} \frac{\partial P}{\partial t}=\frac{\partial}{\partial x}\left[D(x)\frac{\partial P}{\partial x}\right]-v\frac{\partial P}{\partial x}-\tau P+S \end{equation} and \begin{equation} \frac{\partial Q}{\partial t}=\frac{\partial}{\partial x}\left[D(x)\frac{\partial Q}{\partial x}\right]-v\frac{\partial Q}{\partial x}-\tau P, \end{equation} where $t$ is time, $x$ is the spatial variable along the column, $D(x)$ is the diffusion rate, $v$ is the advection rate, $\tau$ is the decay rate, and $S(x)$ is the source rate. We will be looking for the late-time, steady state solution to these equations with $\partial P/\partial t=\partial Q/\partial t = 0$. The diffusion rate and source rate may be assumed to be smooth and non-negative. We will also assume $v$ is non-negative.
The $x$ domain is $x\in[0,L]$. Boundary conditions for $P$ and $Q$ are mixed at $x=0$, representing zero influx \begin{equation} \left.\left(D\frac{\partial P}{\partial x}-vP\right)\right|_{x=0}=\left.\left(D\frac{\partial Q}{\partial x}-vQ\right)\right|_{x=0}=0. \end{equation} At $x=L$ the boundary condition will be $P=Q=c$, where $c$ is a constant.
The question is we wish to find a finite difference scheme (break up the domain into $N$ gridpoints ranging from $0$ to $N-1$ and form index equations for each point) in order to create matrices such as $A$ where $AP = S$ then numerically solve this equation. I'm wondering which schemes would be most useful. I have thought of using centred/forward/backward finite difference scheme but I'm very confused about how to input the boundary conditions and which to use?
We require a tridiagonal matrix A. e.g as produced in this example. values of D(x) and S(x) are provided at all points on the index grid.
https://web.mit.edu/10.001/Web/Course_Notes/Differential_Equations_Notes/node9.html
You can translate that almost literally. For the second derivative apply twice central difference quotients with step size $\Delta x$, that is, half-steps from the center. This will lead to $$ \left.\frac{\partial}{\partial x}\left(D(x)\frac{\partial P(x,t)}{\partial x}\right)\right|_{(x,t)=(x_i,t_j)} \approx \frac{D_{i+\frac12}(P^j_{i+1}-P^j_{i})-D_{i-\frac12}(P^j_{i}-P^j_{i-1})}{Δx^2} $$ For the first derivative take the central difference quotient with step size $2Δx$, $$ \left.\frac{\partial P(x,t)}{\partial x}\right|_{(x,t)=(x_i,t_j)} \approx \frac{P^j_{i+1}-P^j_{i-1}}{2Δx} $$ For the right boundary conditions you set that component as constant and remove it from the active computation. For the left condition it is probably easiest to introduce ghost cells at index $i=-1$ so that the PDE can be applied there and also the boundary condition can be constructed with central difference quotients.