Neuroscience & Medicine — Brain, Heart & Neural Models

Eight simulations built on the actual mathematical models used in clinical neuroscience and biomedical engineering: Hodgkin-Huxley action potentials, Wilson-Cowan thalamocortical oscillations, cardiac ion channels, MRI k-space reconstruction, and pharmacokinetics.

Neural Electrophysiology

The brain is an electrical organ. Every thought, perception, and movement is encoded as patterns of voltage spikes — action potentials — propagating through networks of neurons. The Hodgkin-Huxley model, published in 1952 and awarded the Nobel Prize in Physiology, gives us the equations from which every modern neural model descends.

Hodgkin-Huxley Model (simplified)

C_m dV/dt = I_ext − g_Na · m³h · (V − E_Na)  (sodium current)
                − g_K · n⁴ · (V − E_K)    (potassium current)
                − g_L · (V − E_L)        (leak current)

Gating variables m, h, n each satisfy: dx/dt = α_x(V)(1−x) − β_x(V)x
The voltage-dependent rate functions α, β are the model's empirical core.

Medical Imaging & Pharmacology

Why are neural ODEs so hard to simulate? The Hodgkin-Huxley system is stiff — the sodium activation variable m has a time constant ~0.1 ms while the full action potential lasts ~2 ms. A naive Euler integrator needs Δt < 0.01 ms for stability, costing 200+ steps per spike. Adaptive RK4 (or the implicit Crank-Nicolson method) reduces this to ~10–15 function evaluations per spike.

Algorithms at a Glance

Hodgkin-Huxley ODE Adaptive RK4 Leaky integrate-and-fire STDP learning Wilson-Cowan equations Bloch equations 2D DFT k-space Two-compartment PK SIMPLE Navier-Stokes Fick diffusion FDM

Suggested Learning Paths

📘 Biology / Pre-Med Students
  1. Cardiac Action Potential — ion channel basics
  2. ECG Simulator — from cell to clinical trace
  3. Drug Diffusion — pharmacokinetics concepts
  4. Membrane Diffusion — Fick's laws in biology
  5. Blood Flow — circulatory system physics
🎓 Biomedical / Computational Neuroscience
  1. Spiking Neural Network — LIF and STDP
  2. Brainwave Oscillations — neural mass models
  3. MRI Physics — Bloch equations and k-space
  4. Blood Flow — Navier-Stokes CFD in vessels
  5. Cardiac AP — Hodgkin-Huxley in depth