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

Related simulators

Continue with similar topics in this category — or all 85 in Math Visualization.

View category →
NewUniversity / research

Physarum Slime (Agents)

Launch Simulator

~4500 agents follow a deposited chemoattractant: deposit + diffusion + decay + 3-sensor steering grow path networks.

NewUniversity / research

Advection Schemes: Upwind / LW / MacCormack

Launch Simulator

Linear advection u_t + cu_x = 0 on a periodic grid: compare upwind diffusion, Lax-Wendroff and MacCormack dispersive ringing, exact pulse translation, L2 error, and CFL ν.

NewUniversity / research

Finite-Volume Advection-Diffusion 2D

Launch Simulator

Conservative scalar transport on a 2D grid: face fluxes, upwind vs central interpolation, Peclet number, CFL, and numerical diffusion.

NewUniversity / research

Heat Equation: Finite Differences

Launch Simulator

1D heat equation u_t = αu_xx with explicit FTCS and implicit backward Euler; tune CFL r = αΔt/Δx², watch explicit blow-up for r > 1/2, and compare numerical diffusion.

NewUniversity / research

MinD / MinE Oscillation (E. coli Rod)

Launch Simulator

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

NewUniversity / research

Multigrid Relaxation

Launch Simulator

1D Poisson error dynamics: Jacobi and Gauss-Seidel smooth high-frequency error, while a V-cycle uses residual restriction and coarse-grid correction to remove low-frequency modes.

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

∂ₜn = Dₙ∇²n − χ∇·(n∇c), ∂ₜc = D_c∇²c + αn − βc; bacteria follow attractant; collapse at high χ; 96² 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.545
max c0.000
Σn (mass)1940.56
sim time0.00

About this model

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

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.