CONICAL Demo 3:
A Passive Cable
Introduction
In this demonstration, a passive cable is created by linking a set of compartments into a chain. Current is
then injected, and the membrane
potential of each compartment is
followed over time.
Code Overview
The complete code for the program is contained in main.cpp. In summary:
- Define global parameters.
- Define a procedure to connect two compartments.
- Create the compartments, setting appropriate parameters.
- Loop through time. At each time step,
- Output membrane voltages
- Call each compartment's Step() method
(inherited from Stepper)
- Toggle gCurrent
Program Output
The actual output of this program is a table
of numbers, which has been graphed (by importing the data to
ClarisWorks)
below.
The current injector is attached at X =
0, so this end reaches the highest voltage. Compartments further away are also
charged due to the flow of current through the Links.
Note how each node's voltage changes only every other "tick" of
the simulation clock, and that the phase of this update cycle alternates
with each compartment. This is an aliasing effect, and can be reduced by
increasing the time resolution (i.e., decreasing DT) or
decreasing the individual compartment
size.
Building the Program
If you have the full set of CONICAL source code, you should be able to
simply copy main.cpp into your project and build
it. Of course, this will contain quite a few files you don't need. A
minimal project would contain just the following files: