\documentclass{article}
\usepackage{amsmath}
\usepackage{xspace}
\usepackage{mhchem}
\usepackage[amssymb]{SIunits}
\addunit{\molar}{M}
\newcommand{\ICa}{\ensuremath{I_\mathrm{Ca}}\xspace}
\newcommand{\gCa}{\ensuremath{g_\mathrm{Ca}}\xspace}
\newcommand{\ECa}{\ensuremath{E_\mathrm{Ca}}\xspace}
\newcommand{\Cmem}{\ensuremath{C_\mathrm{m}}\xspace}
\newcommand{\dif}{\textrm{d}}
\newcommand{\cCa}{[\textrm{Ca}]}


\begin{document}

\begin{table}
  \centering
  \begin{tabular}{lll}
    Quantity       & Symbol & Units \\
    \hline
    Voltage        & $V$    & mV    \\
    Time           & $t$    & ms    \\
    Conductance    & $g$    & \siemens\per\centi\square\meter \\
    Concentration  & [Ca]   & mM \\
    Faraday const. & $F$    & C\per\mole  \\
    Length         & $l$    & \micro\meter \\
    Diameter       & $d$    & \micro\meter \\
    Capacitance    & $\Cmem$ & \micro\farad\per\centi\square\meter \\
    \hline
  \end{tabular}
  \caption{Quantities, symbols and units}
  \label{tab:quantities}
\end{table}

\clearpage
\section{Test 1 - Ca accumulation}
\label{tests:sec:test-1-ca}


1 compartment, length $L$, diameter $d$, membrane capacitance \Cmem,
membrane potential $V$. Calcium current $\ICa=\gCa(V-\ECa)$, where $g$ is
conductance and $\ECa$ is calcium reversal potential. $g$ is 0 apart
from when it is set to $\overline{g}$ from $t_1$ to $t_2$.

ODEs describing membrane potential and calcium concentration:
\begin{equation}
  \label{tests:eq:1}
  \Cmem\frac{\dif V}{\dif t} = \ICa
\end{equation}
 This can be solved:
\begin{equation}
  \label{tests:eq:2}
  V(t) = V(t_0) + (\ECa - V(t_0))(1-\exp((t-t_0)\gCa/\Cmem))
\end{equation}


The equation describing the calcium concentration [Ca] is:
\begin{equation}
  \frac{\dif [\mathrm{Ca}]}{\dif t} = \frac{\ICa a }{2Fv} = \frac{2\ICa }{Fd}
\end{equation}
where $a= \pi Ld$ is the surface area and $v = \pi Ld^2/4$ is the
volume. 

Hence following should be true:
\begin{equation}
[\textrm{Ca}](t_1) - [\textrm{Ca}](t_0) =  \frac{\Cmem a (V(t_1) -
    V(t_0))  }{2Fv} =  \frac{2\Cmem  (V(t_1) -
    V(t_0))  }{Fd}
\end{equation}

Hence the factor-label method gives: 
\begin{equation}
  \begin{split}
  \frac{\micro\farad}{\centi\square\meter}\cdot\frac{\micro\meter\squared\cdot\milli\volt}%
  {\coulomb\per\mole\cdot\micro\meter\cubed}
  = \frac{10^{-6} \farad}{10^{-4}\square\meter}\cdot\frac{\mole\cdot10^{-3}\volt}%
  {\coulomb\cdot10^{-6}\meter}
  = \frac{10^{-6} \coulomb}{10^{-4}\volt\square\meter}\cdot\frac{\mole\cdot10^{-3}\volt}%
  {\coulomb\cdot10^{-6}\meter}\\
  = \frac{10^1\mole}{\meter\cubed} =
  \frac{10^1\mole}{10^3\deci\meter\cubed} = 10^{-2}\molar = 10\milli\molar
  \end{split}
\end{equation}
  
\clearpage
\section{Test 2  - Ca accumulation with linear pump}
\label{tests:sec:test-1-ca}

\begin{itemize}
\item 1 compartment, length $L$, diameter $d$, membrane capacitance
  \Cmem, membrane potential $V$.
\item Calcium channel current $\ICa^\mathrm{chan}=\gCa(V-\ECa)$, where $g$ is conductance
  and $\ECa$ is calcium reversal potential.
\item Calcium pump current $\ICa^\mathrm{pump}=- \frac{Fdk_1}{2}\cCa$,
  where $k_1$ is a constant.
\item $g$ is 0 apart from when it is set to $\overline{g}$ from $t_1$
  to $t_2$.
\end{itemize}

ODEs describing membrane potential and calcium concentration:
\begin{equation}
  \begin{split}
    \Cmem\frac{\dif V}{\dif t} = -\ICa^\mathrm{chan} - \ICa^\mathrm{pump} = \gCa(\ECa - V) - \frac{Fdk_1}{2}\cCa ) \\
    \frac{\dif\cCa}{\dif t} = -\frac{2\ICa^\mathrm{chan}}{Fd} - k_1\cCa =
    \frac{2}{Fd} \left(\gCa(\ECa - V) - \frac{Fdk_1}{2}\cCa \right)
  \end{split}
\end{equation}
 This can be solved:
\begin{equation}
  \label{tests:eq:2}
  V(t) = V(t_0) + (V_\infty - V(t_0))(1-\exp((t-t_0)/\tau))
\end{equation}
Where 
\begin{equation}
  \label{tests:eq:5}
  V_\infty = \frac{g\ECa + \Cmem k_1 V(t_0)}{g + \Cmem k_1} \quad
  \mbox{and} \quad \tau = \frac{\Cmem}{g + k_1\Cmem}
\end{equation}
For the dimensions of our quantities we need:
\begin{equation}
  \label{tests:eq:5}
  V_\infty = \frac{10^3g\ECa + \Cmem k_1 V(t_0)}{10^3g + \Cmem k_1} \quad
  \mbox{and} \quad \tau = \frac{\Cmem}{10^3g + k_1\Cmem}
\end{equation}

\clearpage

\section{Test 3 - Ca accumulation with nonlinear pump}
\label{tests:sec:test-3-ca}

\begin{itemize}
\item 1 compartment, length $L$, diameter $d$, membrane capacitance
  \Cmem, membrane potential $V$.
\item Calcium channel current $\ICa^\mathrm{chan}=\gCa(V-\ECa)$, where
  $g$ is conductance and $\ECa$ is calcium reversal potential.
\item Pump is modelled using a pump molecule P with starting density
  $[\ce{P}]_0$ and pump reactions:
  \begin{equation}
    \label{tests:eq:3}
    \begin{aligned}
      \textrm{Ca binding:}\quad & \ce{P + Ca  ->[k_1] P.Ca} \\
      \textrm{Ca release:}\quad & \ce{P.Ca  ->[k_2] P}
    \end{aligned}
  \end{equation}
\item Thus the calcium pump current $\ICa^\mathrm{pump}=-
  \frac{Fdk_2}{2}[\ce{P.Ca}]$, where $k_1$ is a constant.
\item $g$ is 0 apart from when it is set to $\overline{g}$ from $t_1$
  to $t_2$.
\end{itemize}

ODEs describing membrane potential and calcium concentration:
\begin{equation}
  \begin{aligned}
    \Cmem\frac{\dif V}{\dif t}  &
    %= -\ICa^\mathrm{chan} - \ICa^\mathrm{pump} 
    = \gCa(\ECa - V) - \frac{Fdk_2}{2}[\ce{P.Ca}] ) 
    = \gCa(\ECa - V) - \frac{Fdk_2}{2}([\ce{P}]_0 - [\ce{P}] ) \\
    \frac{\dif\cCa}{\dif t} &
    = -\frac{2\ICa^\mathrm{chan}}{Fd}     - k_1[\ce{P}][\ce{Ca}] 
    = \frac{2}{Fd} \left(\gCa(\ECa - V) - k_1[\ce{P}][\ce{Ca}] \right) \\
    \frac{\dif[\ce{P}]}{\dif t} &
    =  -k_1[\ce{P}][\ce{Ca}] + k_2[\ce{P.Ca}] 
    = -k_1[\ce{P}][\ce{Ca}] + k_2([\ce{P}]_0 - [\ce{P}])
  \end{aligned}
\end{equation}

This pump is nonlinear, even with fixed $E_{\mathrm{Ca}}$. Thus an
analytical solution is harder, if not impossible. However, we can say
the following:
\begin{itemize}
\item If $k_2=0$, Ca and voltage will rise during pulse, then voltage
  will remain steady, but Ca concentration will decline.
\end{itemize}




\end{document}
