Analytic solutions and convergence tests#
To verify our solvers we derive some analytic solutions and checks the numerical solution against the analytic. We also perform convergence tests in the spatial and temporal dimension and verify that we get the correct order of convergence.
Spatial convergence tests#
TBW
Temporal convergence tests#
TBW
Analytic solution to the Monodomain model#
We want to solve
for \((x, y) \in \Omega\), with the boundary condition
for \((x, y) \in \partial \Omega\). If we let \(\Omega = [0, 1] \times [0, 1]\), \(M = 1.0\), and let
then
and
and finally
Therefore we see that
for \(x \in \partial \Omega\), and \(n\) being the outward pointing unit normal. Since
we have
Now we can let
and
Then
and finally
We also have the following initial conditions
Splitting scheme#
Solve
\[\begin{align*} \frac{\partial v}{\partial t} &= -I_{\mathrm{ion}}(v, s), \hspace{1cm} v(t_n) = v^n\\ \frac{\partial s}{\partial t} &= f(s, v, t) \hspace{1cm} s(t_n) = s^n \end{align*}\]for \(t_n < t \leq t_n + \theta \Delta t\). The solutions at \(t_n + \theta \Delta t\) are denoted \(s_{\theta}^n\) and \(v_{\theta}^n\).
Solve
\[\begin{align*} \frac{\partial v}{\partial t} = \nabla \cdot \left( M \nabla v \right) + I_{\mathrm{stim}}, \hspace{1cm} v(t_n) = v_{\theta}^n \end{align*}\]for \(t_n < t \leq t_n + \Delta t\). The solution is denoted \(v_{\theta}^{n+1}\)
Solve
\[\begin{align*} \frac{\partial v}{\partial t} &= -I_{\mathrm{ion}}(v, s), \hspace{1cm} v(t_n + \theta \Delta t) = v_{\theta}^{n+1}\\ \frac{\partial s}{\partial t} &= f(s, v, t) \hspace{1cm} s(t_n + \theta \Delta t) = s_{\theta}^{n} \end{align*}\]for \(t_n + \theta \Delta t < t \leq t_n + \Delta t\). The solutions at \(t_n + \theta \Delta t\) are denoted \(s^{n+1}\) and \(v^{n+1}\).