How it Works
The axon is discretized into N compartments arranged along a line, each carrying its own membrane potential V and three Hodgkin-Huxley gating variables m, h and n that track the fraction of open sodium-activation, sodium-inactivation and potassium-activation gates. At every timestep the sodium and potassium conductances are computed from these gates and combined with a leak conductance to give the total membrane current, which is integrated forward with a small Euler step. Neighboring compartments are electrically coupled through an axial current proportional to the local second difference in voltage, exactly like current flowing along a resistive cable, so a spike in one compartment depolarizes its neighbors enough to trigger their own regenerative sodium influx, and the wave rolls forward.
Toggling myelination changes which compartments contain active channels. With myelination off, every compartment actively regenerates the spike, so the wave crawls forward compartment by compartment. With myelination on, only evenly spaced "nodes of Ranvier" carry Na/K channels while the insulated internodes between them are passive and conduct current almost instantly; the action potential effectively jumps from node to node (saltatory conduction), which the live conduction-velocity readout — computed from the time the depolarization wavefront takes to cross a fixed distance — shows to be substantially faster than the continuous case.
Icouple[i] = D·(V[i+1] − 2·V[i] + V[i−1])
dx/dt = α_x(V)·(1−x) − β_x(V)·x, x ∈ {m, h, n}
Myelinated internodes: gNa = gK = 0 (passive, D scaled up)
Frequently Asked Questions
What is an action potential?
An action potential is a rapid, self-propagating reversal of membrane voltage caused by the sequential opening and closing of voltage-gated sodium and potassium channels. It is the electrical signal neurons use to transmit information over long distances.
What do the m, h and n gating variables represent?
They are Hodgkin-Huxley state variables between 0 and 1: m is sodium channel activation, h is sodium channel inactivation, and n is potassium channel activation. Their voltage-dependent rate constants together reproduce the realistic shape of the action potential.
Why does the impulse only travel in one direction?
Immediately behind the advancing wavefront, sodium channels are inactivated (h is near zero), creating a refractory zone. This absolute refractory period prevents the impulse from re-triggering compartments it has just passed, forcing forward-only propagation.
What is saltatory conduction?
Saltatory conduction is the rapid "jumping" of an action potential between nodes of Ranvier in myelinated axons. Myelin insulates the internodes so the signal decays passively but quickly between nodes, letting the impulse regenerate only at the exposed nodes and skip most of the axon's length.
Why is myelinated conduction faster than unmyelinated conduction?
In unmyelinated axons every compartment must actively regenerate the spike, which takes time at each point. In myelinated axons, current spreads passively and almost instantly through insulated internodes, so the active regeneration step happens only at widely spaced nodes, cutting the total travel time dramatically.
What does the axial coupling current represent biologically?
It represents the flow of ions through the cytoplasm between adjacent patches of membrane, driven by the local voltage difference. This local-circuit current depolarizes neighboring membrane ahead of the wavefront, which is the physical mechanism that propagates the impulse.
What is the refractory period and why does it matter?
The refractory period is the brief interval after a spike during which a compartment cannot fire again because sodium channels remain inactivated and potassium channels remain open. It sets an upper limit on firing frequency and ensures action potentials only travel forward.
How is conduction velocity measured in this simulation?
The simulation tracks the time it takes the depolarization wavefront (the point where voltage first crosses a threshold) to travel a fixed distance along the axon, then divides distance by elapsed time to compute a live conduction velocity readout.
What happens if the stimulus amplitude is too low?
If the injected current is below the threshold needed to open enough sodium channels to overcome the leak and potassium currents, the membrane depolarizes only slightly and returns to rest without firing a full regenerative action potential.
Why do demyelinating diseases like multiple sclerosis slow nerve signals?
When myelin is damaged, internodal membrane is exposed and must actively regenerate the spike like unmyelinated tissue, and current also leaks out through the damaged insulation. Both effects slow conduction velocity and can cause the impulse to fail entirely.