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:
  1. Define global parameters.
  2. Define a procedure to connect two compartments.
  3. Create the compartments, setting appropriate parameters.
  4. Loop through time. At each time step,
    1. Output membrane voltages
    2. Call each compartment's Step() method (inherited from Stepper)
    3. 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:

Source FilesHeader Files
CONICAL.cpp
Cmprtmnt.cpp
Cylinder.cpp
main.cpp
Stepmstr.cpp
VSink.cpp
Cmprtmnt.h
Current.h
Cylinder.h
Injector.h
Link.h
Stepmstr.h
VSink.h
VSource.h