Centered difference scheme with half step size

256 Views Asked by At

I am trying to solve a Fokker-Planck equation of the form

$$\frac{\partial P(x,t)}{\partial t} = \frac{\partial}{\partial x}[A(x)P(x,t)]+D \frac{\partial^{2} P(x,t)}{\partial x^{2}}$$

using the Chang-Cooper scheme[Chang, J. S.; Cooper, G., A practical difference scheme for Fokker-Planck equations, J. Comput. Phys. 6, 1-16 (1970). ZBL0221.65153.]. In the method, the drift term $A(x)$ has to be evaluated at points $x_{j-1/2}$. My problem is, what is the usual practice to do this when $j=0$? Then obviously the grid point is outside the boundary. I am sorry if the question is too naive. But I am really stuck in this.

1

There are 1 best solutions below

1
On BEST ANSWER

It depends on which kind of boundary condition you are considering at the left side of your domain. Assume that this domain is $[a,b]$, that $x_j=a+jh$ with $h=\frac{b-a}{N}$ for some $N>0$ and $j=0\ldots N$. Then you need boundary conditions at $x=a$ and $x=b$. If $P$ is given at $a$ (Dirichlet boundary conditions) then you do not have to care about $j=0$ since you know the value of $P$ at $x_0=a$. If $P$ is not given, usually you will set a Neumann or mixed condition, which could be for this equation at $x=a$, $$A(a)P(a)+D\frac{\partial P}{\partial x}(a)=0.$$ In the cited article they seem to assume that this boundary condition is fulfilled at $x_{-\frac12}=a-\frac h2$, which is true at order $h$. Then writing the discretisation a $x=a$ gives: $$\frac{P_0^{n+1}-P_0^n}{\Delta t}=\frac1h\left[A(x_\frac12) P_\frac12^{n+1}+D\frac{P_1^{n+1}-P_0^{n+1}}h-0\right]$$ where the $0$ correspond to the above boundary condition and where they take $P_\frac12^{n+1}=\frac12[P_1^{n+1}+P_0^{n+1}]$. The overall error will be usually of order one since the boundary condition is set on $a-\frac h 2$ instead of $a$. One can build an order 2 scheme by introducing a fictitious point at $x=a-h$, but you may not need such accuracy. Hope that helps, Emmanuel