Real-time action potential simulation. Adjust injected current and watch the membrane voltage respond: threshold, spike, refractory period.
The Hodgkin-Huxley model (1952) describes how action potentials are initiated and propagated along the squid giant axon. It models the membrane as a capacitor in parallel with three conductances: voltage-gated Na+ channels (activation gate m, inactivation gate h), voltage-gated K+ channels (gate n), and a passive leak.
Below a threshold current (~6-7 uA/cm2 with default parameters), the neuron is silent. Above threshold, it fires. Increase the current further and firing becomes repetitive. The advanced parameters let you modify channel conductances and reversal potentials to explore how different ionic environments change excitability.
Integration uses the explicit Euler method at dt = 0.01 ms.
The phase portrait plots membrane voltage against its time derivative,
revealing the limit cycle structure of repetitive firing.