Numerical Methods

All books

Parabolic

You have one of these when the answer moves forward in time and smooths as it goes, so it forgets where it started.

Parabolic, not hyperbolic. What moves here smooths and forgets where it started. A hyperbolic answer keeps the shape of what was sent.

What you are modelling

A transient that settles. Heat spreading through a casting, a tyre warming, a damper heating, a pollutant dispersing. What is given at one moment is smoothed at the next, and sharp features disappear.

The model you write down

∂u∂t=∇⋅(k∇u)+f.\frac{\partial u}{\partial t} = \nabla \cdot \big(k \nabla u\big) + f .

The right-hand side is a balance of what flows in and out. There is no term for "what is carried along", which is what separates this class from the next one.

What it becomes on a computer

Worked number. On a mesh with Δx=0.1\Delta x=0.1, the explicit heat step is stable only while Δt≤Δx2/2=0.005\Delta t\le \Delta x^2/2=0.005.

Method of lines: discretise space, and what is left is a large system of ordinary differential equations in time,

u˙=F(u).\dot{u} = F(u) .

Then there is a choice, and it is the whole of this page:

The first limit decides whether a mesh is affordable, and the figure below is that arithmetic rather than a warning. Hold the time you want to reach fixed and count the steps. Twice the cells means a quarter of the time step, so four times as many steps. The plot counts those steps and nothing else; the work per step also doubles, so the total goes up eight times. Eight times the resolution is sixty-four times the steps.

Figure 1

The signature

Two properties, and both are testable:

So this class is the one where "it takes forever" usually means "the method is explicit and the mesh is fine".

Flags that matter here

Techniques

Every method named here is in Methods, A to Z, with its price and what it will not do.

Start from the model you have. Each row is a property of the model in front of you, the methods that fit it, and what the fit costs. The method-keyed table below is the same list sorted by name.

what your model is the methods that fit the price
a coarse mesh, a short interval, no stiffness Forward Euler, explicit Runge–Kutta the step is limited by the mesh
stiffness, which in practice is almost always Backward Euler, BDF, Radau, implicit Runge–Kutta a solve per step
accuracy at a moderate step Crank–Nicolson it can ring at a sharp start
a coefficient that depends on the answer Adaptive step control an outer loop
a rectangle, and a long interval ADI, spectral methods the geometry, or the regularity
advection as well as diffusion Exponential integrators the linear part has to be handled exactly
technique what it does when it wins when it is the wrong tool
Forward Euler, explicit Runge–Kutta Steps forward using the current rate Cheap steps, short intervals, coarse meshes Stiff problems: the step limit is brutal
Backward Euler Solves implicitly, unconditionally stable Stiff problems, steady settling Accuracy: it is only first order
Crank–Nicolson Averages the explicit and implicit sides Second order, stable, smooth answers Sharp transients: it rings
BDF Uses several past steps, implicitly Stiff problems with a smooth solution Starting up; the first steps need another method
Radau, implicit Runge–Kutta High order, stiffly stable, adaptive Stiff problems where accuracy matters Very large systems: the linear algebra is heavy
ADI Splits the operator by direction Rectangular grids in two or three dimensions Complicated geometry
Spectral methods Expands in smooth basis functions Smooth solutions, simple regions Shocks, or complex boundaries
Exponential integrators Treats the linear part exactly A dominant linear term, a small non-linear one The linear part is not the hard part
Adaptive step control Estimates the error and changes the step Any time-dependent problem You have not checked the error estimate is honest

Systems that live here

What goes wrong

symptom cause fix
The answer oscillates once the step is large The explicit stability limit was crossed Go implicit, or reduce the step
The step size collapses to nothing Stiff, with an explicit method An implicit method
It takes far more steps than expected The Δx2\Delta x^{2} limit, with a fine mesh Implicit method, or a coarser mesh with a check
The total quantity is not conserved A non-conservative discretisation Write the flux form, and check the balance
The early time is wrong and the late time is fine The initial data does not match the boundary Make them consistent before blaming the solver
Refining the time step changes the answer It is not converged in time Halve the step and compare; use an error estimate
The result depends on the mesh in a way the physics does not Numerical diffusion from the scheme Higher order, or a different discretisation

The first row of the table is the one to see rather than read. It is the other half of the limit: the count above says what a small time step costs, and this says what it protects. The figure starts a triangular temperature profile on a grid and runs the same scheme at two values of r=αΔt/Δx2r = \alpha\Delta t/\Delta x^2. At r=0.4r = 0.4 the kink smooths. At r=0.6r = 0.6 the same scheme grows, and that growth is the numerics failing rather than the physics.

Figure 2

Used in this collection

No page in this collection names this class yet.

Back to the map: the nine kinds puts this class among the other eight.

Settings

Colour scheme

Light or dark pages. Your colour and layout stay the same.

Colour

The paper, ink and lettering. Your layout stays the same.

Quiet colours
Bold colours
Layout

How pages are arranged. Your colours stay the same.

Reading offline

Keep this book on this device and read it offline.