M45. Drift in the modes of a shape

Package: A4, its tenth part: in time on a region of the plane, a drift with constant coefficients is propagated exactly where it is not too strong against the diffusion. \(a\nabla^2 u + \mathbf{b}\cdot\nabla u\) is \(\nabla\cdot(a\rho\nabla u)/\rho\) with the density \(\rho = e^{\mathbf{b}\cdot\mathbf{x}/a}\), which the modes hold since milestone 44.

What was built

  • The rewriting, where the equation is read (carried in shaped.rs): the first derivatives with constant coefficients leave the operator, and a coefficient in front, \(1/\rho\), with a medium inside the divergence, \(a\rho\), take the place of the Laplacian. Everything after that is milestone 44. The density is centred on the rectangle that holds the shape, so that it is 1 there.

  • When. If the ratio \(\mathbf{b}/a\) is real, if nothing else stands inside or in front of the second derivatives, and if the logarithm of the density ranges over at most 24 across the rectangle that holds the shape. Otherwise the drift is stepped as milestone 42 steps it, in an equation of first order in time, and refused in one of second order.

  • An equation of second order in time may hold a drift, which it could not.

  • The plan names the drift, not the density that stands for it, and says in its note on the method how far the density ranges and where the drift would be stepped.

What it reaches

\(u_t = \nabla^2 u - b\,u_x\) on a triangle that is 2 wide, with the solution \(e^{x + y/2 + (5/4 - b)t}\) and its value on the sides, by the planner’s choice:

Drift \(b\)

Range of \(\ln\rho\)

Method

Degree

Error

Time

2

4

propagated

10

\(1.5\cdot10^{-10}\)

0.6 s

6

12

propagated

12

\(2.6\cdot10^{-11}\)

3.8 s

10

20

propagated

14

\(2.4\cdot10^{-11}\)

12 s

12

24

propagated

16

\(4.7\cdot10^{-10}\)

22 s

20

40

stepped, 20 480 steps

8

\(1.7\cdot10^{-10}\)

138 s

Before, the drift of 2 was stepped: 5 120 steps and 37 s. With plans of the degrees 2, 4 and 6 its error is \(2.6\cdot10^{-3}\), \(2\cdot10^{-6}\) and \(6\cdot10^{-10}\). A wave equation with a drift, against a manufactured solution on a disk, is right to \(4\cdot10^{-13}\).

Decisions

D45.1. A drift is a density

Developer, 2026-11-19.

Decision D42.3 stepped a drift with constant coefficients because it makes the operator non-symmetric, and left open the modes of the non-symmetric operator. They are not needed. The operator is symmetric in the sum that is weighted with \(e^{\mathbf{b}\cdot\mathbf{x}/a}\), and since milestone 44 the modes take a weight. Nothing is changed but how the equation is read: the unknown stays the unknown, and a condition on its value or on its slope stays as it is given, because the flux that the weak form has on the boundary is the medium times the slope.

D45.2. Up to a range of 24

Developer, 2026-11-19.

The density spans a factor of \(e^{P}\) over the shape, with \(P = |\mathbf{b}|\,L/a\). The modes are orthogonal in the weighted sum, and turning their coefficients back into values divides by the square root of the density, so rounding errors grow by \(e^{P/2}\) where the density is smallest. At \(P = 24\) that is \(1.6\cdot10^{5}\), which leaves ten digits and more, and the table shows them. Beyond it the drift is stepped: that is also where stepping is at its best, since the steps are few where diffusion is weak. The range is taken over the rectangle that holds the shape, which is what is known when the equation is read.

The density must be resolved by the elements, which is why the degree in the table grows with the drift. The planner sees that by itself: it counts the density among what is given.

D45.3. A plan that steps stays valid, again

Developer, 2026-11-19.

For a drift of moderate strength the planner answered with element_stepping after milestone 42, and answers with element_propagator now. Milestone 42 was never published, so no plan of a published version changes its meaning. A plan that asks for stepping is still taken (decision D43.4): the drift is in the modes then too, and nothing is left to step.

What is left

  • A drift beside a medium or a density, a drift that is a gradient but not constant, and a drift whose ratio to the diffusion is not real.

  • A drift that is stronger than 24 in an equation of second order in time.