PhysSandbox
Classical MechanicsWaves & SoundElectricity & MagnetismOptics & LightGravity & OrbitsLabs
🌙Astronomy & The Sky🌡️Thermodynamics🌍Biophysics, Fluids & Geoscience📐Math Visualization🔧Engineering🧪Chemistry

More from Math Visualization

Other simulators in this category — or see all 66.

View category →
NewUniversity / research

MinD / MinE Oscillation (E. coli Rod)

1D reaction–diffusion: membrane MinD u, fast MinE v; pole-to-pole oscillation; division plane at time-averaged MinD minimum.

Launch Simulator
NewSchool

Sandpile (SOC)

BTW abelian model: add grains, ≥4 topples to neighbors; critical avalanches.

Launch Simulator
NewUniversity / research

Flow Field Particles

Synthetic v(x,y,t); advection with wrap; optional arrow grid.

Launch Simulator
NewSchool

Fractal Generator

Mandelbrot, Julia, Koch snowflake. Zoom infinitely.

Launch Simulator
NewKids

Conway's Game of Life

B3/S23 on a torus: paint cells, run, step — glider, LWSS, Gosper gun, pulsar, and more.

Launch Simulator
NewSchool

a → v → x

Integrate acceleration to velocity and position; stacked time graphs.

Launch Simulator
PhysSandbox

Interactive physics, chemistry, and engineering simulators for students, teachers, and curious minds.

Physics

  • Classical Mechanics
  • Waves & Sound
  • Electricity & Magnetism

Science

  • Optics & Light
  • Gravity & Orbits
  • Astronomy & The Sky

More

  • Thermodynamics
  • Biophysics, Fluids & Geoscience
  • Math Visualization
  • Engineering
  • Chemistry

© 2026 PhysSandbox. Free interactive science simulators.

PrivacyTermsContact
Home/Math Visualization/Keller–Segel Chemotaxis

Keller–Segel Chemotaxis

The Keller–Segel system is the standard minimal model of chemotaxis: cells with density n move up gradients of a self-secreted attractant c. In this simulator, ∂ₜn = Dₙ∇²n − χ∇·(n∇c) combines random spreading with directed drift along ∇c, expanded explicitly as −χ(∇n·∇c + n∇²c) on a periodic 96×96 grid. The attractant obeys ∂ₜc = D_c∇²c + αn − βc: diffusing, produced proportionally to local cell density, and linearly degraded. Bacteria seeded in a central bump secrete c, climb its gradient, and aggregate. When the chemotactic sensitivity χ exceeds a mass-dependent critical level, the continuum model predicts finite-time blow-up of density—chemotactic collapse—visible here as a sharpening peak in n (log-scaled colors). Lower χ yields milder clumps without a sharp spike. The scheme is explicit Euler with periodic boundaries; it is pedagogical, not calibrated to laboratory strains. Presets include high-χ collapse, moderate aggregation, and mild chemotaxis. Optional blue tint overlays attractant c.

Who it's for: Students of mathematical biology, PDEs, or pattern formation exploring how directed motion plus diffusion produces aggregation and collapse.

Key terms

  • Keller–Segel model
  • Chemotaxis
  • Attractant gradient
  • Chemotactic collapse
  • Reaction–diffusion
  • Cell density
  • Critical chemotactic parameter
  • Finite-difference grid

Keller–Segel parameters

14
0.16
0.5
1.1
0.1
0.04
3

Bacteria n drift up attractant gradients (−χ∇·(n∇c)); they secrete c. Above critical χ, mass concentrates into a collapsing peak. Periodic boundaries; explicit Euler.

Shortcuts

  • •Space / Enter — play / pause
  • •R — reseed

Measured values

max n2.547
max c0.000
Σn (mass)1937.34
sim time0.00

How it works

Minimal Keller–Segel chemotaxis on a 2D grid: cell density n follows attractant c with diffusion and sensitivity χ. Secretion αn and decay βc close the loop. High χ drives aggregation and finite-time collapse (blow-up in the continuum limit); lower χ yields milder clumping.

Key equations

∂ₜn = Dₙ∇²n − χ∇·(n∇c) = Dₙ∇²n − χ(∇n·∇c + n∇²c) · ∂ₜc = D_c∇²c + αn − βc

Frequently asked questions

What is chemotactic collapse in this model?
When χ is large enough relative to Dₙ and total mass, the continuum Keller–Segel equations can blow up in finite time: most cells pile into an ever-sharper peak. On a fixed grid you see max(n) surge and a bright hotspot—an discrete analogue of that singularity formation.
Why periodic boundaries?
They simplify the Laplacian and chemotactic divergence at edges so the demo focuses on bulk aggregation without boundary layers. Real petri dishes use no-flux walls; patterns are qualitatively similar for teaching purposes.
What does increasing α or decreasing β do?
Both raise steady attractant levels for a given n, steepening ∇c and strengthening effective chemotactic drift. Very strong secretion with slow decay can accelerate clumping; high β dissipates signal faster and spreads guidance more evenly.
Is the simulation stable for all slider values?
Explicit Euler can destabilize if Δt or χ is too large; defaults and presets are chosen to show collapse without immediate numerical blow-up from the scheme itself. If the field becomes noisy, lower χ or Δt and reseed.