I'm using scipy.odeint
to solve Fisher-Kolmogorov equation:
\begin{equation} u_t = u_{xx}+u(1-u) \end{equation}
The code can be found here.
From Ablowitz and Zeppetella we know that the analytical solution reads:
\begin{equation} u(x,t)=\frac{1}{1+e^{{(-\frac{5}{6} t+ \frac{\sqrt{6}x}{6}})^2}} \end{equation}
Now, if we compare the analytical solution to the numerical solution obtained with ODE integrator we get the following:
Red: Analytical, Blue: OdeInt
By default scipy.odeint
uses Dirichlet boundary conditions.
I would like to know the following:
1) What kind of boundary conditions should I use for odeInt to compare to the analytical solution?
2) How should I include these boundary conditions using scipy.odeint?
scipy.odeint
only handles the time-stepping for the discretized in space system $u_t = A(t,u)$ -- you need to incorporate the boundary condition in the definition of $A$ which you pass toodeint
. $\endgroup$