This site is version 0.0.1. Most of the code on this site is drafted by an agent and needs review. I apologize for the AI-speak, we are working on rewriting it!
viv-lang.org

PDE solvers · A nonlinearity against diffusion (nonlinear parabolic)

The Fisher-KPP equation

Method
Strang splitting: the logistic reaction solved exactly, diffusion by Crank-Nicolson
Checked
the front speed against the KPP value 2, approached from below with Bramson's logarithmic correction

A population that grows logistically and spreads by diffusion: a gene through a species, a flame, an invading plant. Behind the front , ahead of it , and the front advances at a constant speed.

Which speed is the subtle part. Travelling waves exist for every ; what is selected, from any initial condition that starts out compact, is the slowest, — set entirely by the linearized growth at the front's leading edge, where is tiny.

And it is approached slowly. Bramson showed the front sits at , so the speed measured between two times is , below 2 by an amount that dies only like . Measure between and and the prediction is , not .

The reaction alone is the logistic equation, which has a closed form, so that half of the split has no time-stepping error at all.

What the run shows

A Fisher-KPP front, twenty time units apart
t = 20t = 40
00.51.020406080100120xu
  • the front advances at the KPP speed 2, to within four percent
  • and from BELOW: the selected front is the slowest one, approached slowly
  • the shortfall is Bramson's logarithmic correction: 2 - (3/2) ln(t2/t1) / (t2 - t1)
x1
38.4412
x2
77.4425
speed
1.95007
bramson
1.94801

Computed when this page was built, by the same interpreter that runs it in your browser: 3 of 3 tests, under 0.1 s. The numbers above are the program's show lines.

The program

77 lines, 3 functions. It is editable: change it and press Run (or ⌘/Ctrl + Enter). The tests at the bottom run too, so if your change breaks the solver, a test fails.

react
The logistic equation u' = u (1 - u), solved exactly over a time dt.
diffuse
One Crank-Nicolson diffusion step, with u = 1 held at the left wall and 0 at the right.
front
Where the front is: the u = 1/2 crossing, by linear interpolation.
Viv [1]

Open in the workbench The atlas Download fisher_kpp.viv