diff --git a/docs/appendix.tex b/docs/appendix.tex new file mode 100644 index 0000000000000000000000000000000000000000..81a04377c2f6db62dc7f51e03705b21a6d657a9a --- /dev/null +++ b/docs/appendix.tex @@ -0,0 +1,26 @@ +%----------------------------------- +\subsection{The conic frustrum} +%----------------------------------- +The derivation of the surface area of conic frustrum. +The edge length $l$ is defined +\begin{equation} + l = \sqrt{(x_r - x_l)^2 + (a_r - a_l)^2} = \sqrt{\Delta x^2 + \Delta a^2}. +\end{equation} +The lateral area of the surface is found by integrating along surface of rotation: +\begin{align} + \sigma_{\text{lateral}} + &= \int_{0}^{l} {2\pi a(s)} \deriv{s} \nonumber \\ + &= 2\pi \int_{0}^{l} {a_{\ell} + \frac{s}{l}\left( a_r - a_\ell \right)} \deriv{s} \nonumber \\ + &= 2\pi \left[ a_{\ell}s + \frac{s^2}{2l}\left( a_r - a_\ell \right) \right]_0^l \nonumber \\ + &= \pi l \left( a_{\ell} + a_r \right) \nonumber \\ + &= \pi \left( a_{\ell} + a_r \right) \sqrt{\Delta x^2 + \Delta a^2}. \label{eq:frustrum_area} +\end{align} + +There are two degenerate cases of interest. The first is the \emph{cylinder}, for which the radii at each end are euqal, i.e. $a_\ell = a_r = a$. In this case the lateral area of the surface is +\begin{equation} + \sigma_{\text{lateral}} = 2\pi a \Delta x. +\end{equation} +The second is a cone, for which $a_\ell=0$ and $a_r=a$: +\begin{equation} + \sigma_{\text{lateral}} = \pi a \sqrt{\Delta x^2 + a^2}. +\end{equation} diff --git a/docs/formulation.tex b/docs/formulation.tex index bc8254764a6cc8305ae48d36b1a2de1829a63da8..755817f70323b0eb0901490e7d0c05cf57a3d245 100644 --- a/docs/formulation.tex +++ b/docs/formulation.tex @@ -54,29 +54,32 @@ where Note that the standard convention is followed, whereby membrane and synapse currents ($i_m$) are positive when outward, and electrod currents ($i_e$) are positive inward. The PDE in (\ref{eq:cable}) is derived from the following mass balance expression for a cable segment $i$: -\begin{align} - \int_{\Omega}{c_m \pder{V}{t} } \deriv{v} = - & - \sum_{j\in\mathcal{N}_i} {\int_{\Gamma_{i,j}} \frac{1}{r_L}\pder{V}{x} n_{i,j} \deriv{s} } \nonumber \\ - & - \int_{\Gamma_{ext}} {(i_m - i_e)} \deriv{s} +%\begin{align} + %\int_{\Omega_i}{c_m \pder{V}{t} } \deriv{v} = + %& + \sum_{j\in\mathcal{N}_i} {\int_{\Gamma_{i,j}} \frac{1}{r_L}\pder{V}{x} n_{i,j} \deriv{s} } \nonumber \\ + %& + \int_{\Gamma_{ext}} {(i_m - i_e)} \deriv{s} + %\label{eq:cable_balance} +%\end{align} +\begin{equation} + \int_{\Omega_i}{c_m \pder{V}{t} } \deriv{v} = + + \sum_{j\in\mathcal{N}_i} {\int_{\Gamma_{i,j}} q_{i,j} \deriv{s} } + + \int_{\Gamma_{ext}} {q_i} \deriv{s} \label{eq:cable_balance} -\end{align} -where $\int_\Omega \cdot \deriv{v}$ is shorthand for the volume integral over the segment $\Omega$, and $\int_\Gamma \cdot \deriv{s}$ is shorthand for the surface integral over the surface $\Gamma$. +\end{equation} +where +\begin{itemize} + \item $\int_\Omega \cdot \deriv{v}$ is shorthand for the volume integral over the segment $\Omega_i$ + \item $\int_\Gamma \cdot \deriv{s}$ is shorthand for the surface integral over the surface $\Gamma$ + \item $q_{i,j}=-\frac{1}{r_L}\pder{V}{x} n_{i,j}$ is the flux per unit area of current \emph{from segment $i$ to segment $j$} over the interface $\Gamma_{i,j}$ between the two segments. + \item $q_i=i_m - i_e$ is the flux per unit area over the cell membrane $\Gamma_i$ due to ion channels, synapses and electrodes. + \item the set $\mathcal{N}_i$ is the set of segments that are neighbours of $\Omega_i$ +\end{itemize} The surface of the cable segment is sub-divided into the internal and external surfaces. The external surface $\Gamma_{ext}$ is the cell membrane at the interface between the extra-cellular and intra-cellular regions. The current, which is the conserved quantity in our conservation law, over the surface is composed of the synapse and ion channel contributions. This is derived from a thin film approximation to the cell membrane, whereby the membrane is treated as an infinitesimally thin interface between the intra and extra cellular regions. -The internal surfaces are the interface between the cable segment and its neighbour segments which are denoted by the set $\mathcal{N}_i$. -Equation~\eq{eq:cable_balance} handles the general case where a cable might lie at a branch, and can be simplified for a one dimensional segment: -\begin{align} - \int_{\Omega}{c_m \pder{V}{t} } \deriv{v} = - \quad & \int_{\Gamma_{\text{left}}} \left( \frac{1}{r_L}\pder{V}{x} \right) \deriv{s} \nonumber \\ - -& \int_{\Gamma_{\text{right}}} \left( \frac{1}{r_L}\pder{V}{x} \right) \deriv{s} \nonumber \\ - -& \int_{\Gamma_{ext}} {(i_m - i_e)} \deriv{s} - \label{eq:cable_balance_1D} -\end{align} - Note that some information is lost when going from a three-dimensional description of a neuron to a system of branching one-dimensional cable segments. If the cell is represented by cylinders or frustrums\footnote{a frustrum is a truncated cone, where the truncation plane is parallel to the base of the cone.}, the three-dimensional values for volume and surface area at branch points can't be retrieved from the one-dimensional description. @@ -104,7 +107,7 @@ The finite volume method is a natural choice for the solution of the conservatio %------------------------------------------------------------------------------- We proceed by defining the \emph{volume average} of a quantity $\varphi$ as follows: \begin{equation} - \bar{\varphi}_i = \frac{1}{v_i} \int_{\Omega_i}{\varphi}\deriv{v}, + \bar{\varphi}_i = \frac{1}{\Delta_i} \int_{\Omega_i}{\varphi}\deriv{v}, \end{equation} where $\Omega_i$ is the control volume with the point $x_i$ at its centroid illustrated in \fig{fig:segment}, and $v_i$ is the volume of the control volume $\Omega_i$. The integral one the left hand side of~\eq{eq:cable_balance} can be expressed in terms of the volume average of $V$ @@ -149,7 +152,7 @@ where $\sigma_{i,j}=\pi a_{i,j}^2$ is the area of the surface $\Gamma_{i,j}$, wh Some symmetries \begin{itemize} \item $\sigma_{i,j}=\sigma_{j,i}$ : surface area of $\Gamma_{i,j}$ - \item $\Delta_{i,j}=\Delta_{j,i}$ : distance between $x_i$ and $x_j$ + \item $\Delta x_{i,j}=\Delta x_{j,i}$ : distance between $x_i$ and $x_j$ \item $n_{i,j}=-n_{j,i}$ : surface ``norm''/orientation \item $q_{i,j}=n_{j,i}q_{i,j}=-q_{j,i}$ : charge flux over $\Gamma_{i,j}$ \end{itemize} @@ -173,23 +176,53 @@ The current terms are an average per unit area, therefore the total flux where $\sigma_i$ is the surface area the of the exterior of the cable segment, i.e. the surface corresponding to the cell membrane. Each cable segment is a conical frustrum, as illustrated in \fig{fig:segment}. -The lateral surface area of a frustrum with height $\Delta x_i$ and radii of $a_{i,\ell}$ and $a_{i,r}$ is +The lateral surface area of a frustrum with height $\Delta x_i$ and radii of is +The area of the external surface $\Gamma_{i}$ is \begin{equation} - \sigma_i = \pi (a_{i,\ell} + a_{i,r})+\sqrt{\Delta x_i^2 + (a_{i,\ell} - a_{i,r})^2}. - \label{eq:frustrum_volume} + \sigma_i = \pi (a_{i,\ell} + a_{i,r}) \sqrt{\Delta x_i^2 + (a_{i,\ell} - a_{i,r})^2}, + \label{eq:cv_volume} \end{equation} - +where $a_{i,\ell}$ and $a_{i,r}$ are the radii of at the left and right end of the segment respectively (see~\eq{eq:frustrum_area} for derivation of this formula). %------------------------------------------------------------------------------- \subsubsection{Putting it all together} %------------------------------------------------------------------------------- -By substituting the volume averaging of the temporal derivative in~\eq{eq:dvdt} approximations for the flux over the surfaces in~\eq{eq:q_ij} and~\eq{eq:frustrum_volume} respectively into the conservation equation~\eq{eq:cable_balance} we get the following ODE defined for each node in the cell +By substituting the volume averaging of the temporal derivative in~\eq{eq:dvdt} approximations for the flux over the surfaces in~\eq{eq:q_ij} and~\eq{eq:cv_volume} respectively into the conservation equation~\eq{eq:cable_balance} we get the following ODE defined for each node in the cell \begin{equation} \frac{c_m}{\Delta_i} \dder{\bar{V}_i}{t} = -\sum_{j\in\mathcal{N}_i} {\frac{\sigma_{i,j}}{r_L \Delta x_{i,j}} (V_i-V_j)} + \sigma_i\cdot(i_m(V_i) - i_e(x_i)), \label{eq:ode} \end{equation} where -\begin{itemize} - \item $\sigma_{i,j}=\pi a_{i,j}^2$ is the area of the surface between two adjacent segments $i$ and $j$. Care must be taken if the neighbour is a child or parent of the other at a branch point. In this case, the radius is that of the child segment (which ever has the largest index in the minimum degree ordering used for numbering segments). \todo{what about if we balance the tree so that the parent-child relationship is swapped?, maybe the relationship ``farther from soma'' has to used to choose.} - \item $\sigma_{i}=(a_{i,\ell} + a_{i,r})+\sqrt{\Delta x_i^2 + (a_{i,\ell} - a_{i,r})^2}.$ is the lateral area of the conical frustrum describing segment $i$. For this area, we take the value of the segment radius at the left and right of the frustrum iteself, regardless of whether either end lies at a branch point. -\end{itemize} +%\begin{itemize} +% \item $\sigma_{i,j}=\pi a_{i,j}^2$ is the area of the surface between two adjacent segments $i$ and $j$. +% \item $\sigma_{i}=\pi(a_{i,\ell} + a_{i,r})+\sqrt{\Delta x_i^2 + (a_{i,\ell} - a_{i,r})^2}.$ is the lateral area of the conical frustrum describing segment $i$. +% \item $\Delta_{i}=\frac{\pi\Delta x_i}{2} \left( a_{i,l}^2 + a_{i,r}^2 \right)$ is the volume of the segment $\Omega_i$. +%\end{itemize} +\begin{equation} + \sigma_{i,j} = \pi a_{i,j}^2 + \label{eq:sigma_ij} +\end{equation} +is the area of the surface between two adjacent segments $i$ and $j$, and +\begin{equation} + \sigma_{i} = \pi(a_{i,\ell} + a_{i,r}) \sqrt{\Delta x_i^2 + (a_{i,\ell} - a_{i,r})^2}, + \label{eq:sigma_i} +\end{equation} +is the lateral area of the conical frustrum describing segment $i$, and +\begin{equation} + \Delta_{i} = \frac{\pi\Delta x_i}{2} \left( a_{i,l}^2 + a_{i,r}^2 \right) + \label{eq:delta_i} +\end{equation} +is the volume of the segment $\Omega_i$. + +%------------------------------------------------------------------------------- +\subsubsection{Handling branches} +%------------------------------------------------------------------------------- +The value of the lateral area and volume, $\sigma_i$ and $\Delta_i$ in~\eq{eq:sigma_i} and~\eq{eq:delta_i} respetively, must include contributions from each branch at branch points. + +\todo{a picture of a branching point to illustrate} + +\todo{a picture of a soma to illustrate the ball and stick model with a sphere for the soma and sticks for the dendrites branching off the soma.} + +\begin{equation} + \sigma_i = \sum_{j\in\mathcal{N}_i} {} +\end{equation} diff --git a/docs/report.tex b/docs/report.tex index 4702f766a0a7b0bb30f80e939baff2a123930241..24d7f7657a0ac00703eede3999f132c79d108caa 100644 --- a/docs/report.tex +++ b/docs/report.tex @@ -94,6 +94,9 @@ \section{Formulation} \input{formulation.tex} +\section{Apendix} +\input{appendix.tex} + \section{Symbols and Units} \input{symbols.tex}