Fundamentals / Numerical mathematics / Numerical partial differential equations

Transport weights and pressure spaces

Locate the onset of a sign error and test which discrete pressure differences actually drive a velocity.

Resolve a layer

Let \(a=3\) m/s, \(\kappa=0.06\) m²/s on a 1 m interval. Find the minimum number of equal cells for the centred operator's nonpositive neighbour coefficients, and the number giving five cells per physical layer length. Estimate the upwind artificial diffusivity at each resolution.

Worked solution

The layer length is

\[\ell=\kappa/a=0.02\,\mathrm{m}.\]

The sign test requires \(h\le2\ell=0.04\) m, hence at least 25 cells. Five cells across \(\ell\) require \(h\le0.004\) m or 250 cells.

The upwind addition \(ah/2\) is 0.06 m²/s at 25 cells and 0.006 at 250. The monotonicity threshold and satisfactory physical resolution describe quite different demands.

Explore the related calculation with adjustable inputs. Change the parameters in the corresponding calculation and compare its independently recomputed values with the equation derived in this solution.

Change transport direction

On an equally spaced grid take \(a<0\). Derive the upstream discrete derivative, its leading artificial diffusivity in \(a u'-\kappa u''\), and the boundary near which a thin outflow layer forms for fixed unequal Dirichlet values.

Worked solution

With flow toward decreasing \(x\), upstream information lies to the right, giving \((u_{j+1}-u_j)/h=u'_j+hu''_j/2+O(h^2)\).

Multiplying by a negative speed gives the modified coefficient \(-(\kappa+|a|h/2)u''\). On \([0,L]\) inflow is at \(L\) and outflow at zero. The term \(e^{ax/\kappa}\) decays away from zero, locating a possible outflow boundary layer there.

Explore the related calculation with adjustable inputs. Change the parameters in the corresponding calculation and compare its independently recomputed values with the equation derived in this solution.

Find the pressure nullspace

For an even periodic grid with six pressure nodes, solve \(p_{j+1}-p_{j-1}=0\) for all \(j\). Remove the constant ambiguity and give the dimension of the remaining nullspace. Repeat the argument for five nodes.

Worked solution

The relation is

\[p_{j+2}=p_j.\]

Six nodes split into independent even and odd cycles, giving two arbitrary amplitudes. Removing the constant leaves one alternating mode.

With five nodes, increments of two cycle through every index, so all entries agree. Only the constant remains and zero mean removes it. This finite odd-grid observation by itself does not establish a mesh-independent mixed stability bound.

Explore the related calculation with adjustable inputs. Change the parameters in the corresponding calculation and compare its independently recomputed values with the equation derived in this solution.