Generator

crosswind-repair

One function in the supg2d library, called 6 times across 5 essays. Below: what it draws at its defaults, what it draws at every value an essay asks for, the 9 claims it put to the test while drawing them, and where it stands against the rule this site is named for.

At its defaults it draws streamline diffusion alone, and with 0.5 of it across the flow. Two bars an angle, on a logarithmic scale. On the axis both are at the level of rounding — the crosswind term costs nothing where the scheme was exact. At 45° the error falls from 0.0661 to 0.0281 and the nodes outside [0, 1] fall from 48 to 0.

crosswind-repair is one function in lib/figures/supg2d.js — the tuned diffusion in two dimensions — exact along one axis, and the direction it does not go. Everything below came out of it during this build, at arguments taken from the essays rather than invented for this page. A figure here is the figure a reader meets in an essay, and if the generator changes, this page changes with it.

At its defaults

Drawn even though every essay passes arguments — which on this site is every essay, at 100% of placements since the standard pass. A default nothing exercises is a trap for the next essay to call this with none, and this is the page where a default that has drifted from the figures around it becomes visible.

Streamline diffusion alone, and with 0.5 of it across the flowTwo bars an angle, on a logarithmic scale. On the axis both are at the level of rounding — the crosswind term costs nothing where the scheme was exact. At 45° the error falls from 0.0661 to 0.0281 and the nodes outside [0, 1] fall from 48 to 0.worst nodal error, and nodes outside the interval the equation guarantees0°, streamline only2.39·10⁻¹⁷ · 0 outside0°, with crosswind5.25·10⁻¹⁷ · 0 outside15°, streamline only0.032 · 18 outside15°, with crosswind0.0145 · 9 outside30°, streamline only0.0571 · 50 outside30°, with crosswind0.0247 · 11 outside45°, streamline only0.0661 · 48 outside45°, with crosswind0.0281 · 0 outsidewhat the crosswind term buyserror ratio at 0°0.45error ratio at 15°2.2error ratio at 30°2.3error ratio at 45°2.3free where the scheme was exactand half the error everywhere else

Two bars an angle, on a logarithmic scale. On the axis both are at the level of rounding — the crosswind term costs nothing where the scheme was exact. At 45° the error falls from 0.0661 to 0.0281 and the nodes outside [0, 1] fall from 48 to 0.

fraction: 0.25

The arguments are the ones Coarsening in one direction only passes. A value drawn at the generator's defaults instead would be a picture no essay asked for and no assertion has been run against.

Streamline diffusion alone, and with 0.25 of it across the flowTwo bars an angle, on a logarithmic scale. On the axis both are at the level of rounding — the crosswind term costs nothing where the scheme was exact. At 45° the error falls from 0.0661 to 0.0452 and the nodes outside [0, 1] fall from 48 to 34.worst nodal error, and nodes outside the interval the equation guarantees0°, streamline only2.39·10⁻¹⁷ · 0 outside0°, with crosswind2.67·10⁻¹⁷ · 0 outside15°, streamline only0.032 · 18 outside15°, with crosswind0.0225 · 14 outside30°, streamline only0.0571 · 50 outside30°, with crosswind0.0393 · 16 outside45°, streamline only0.0661 · 48 outside45°, with crosswind0.0452 · 34 outsidewhat the crosswind term buyserror ratio at 0°0.89error ratio at 15°1.4error ratio at 30°1.5error ratio at 45°1.5free where the scheme was exactand half the error everywhere else

Two bars an angle, on a logarithmic scale. On the axis both are at the level of rounding — the crosswind term costs nothing where the scheme was exact. At 45° the error falls from 0.0661 to 0.0452 and the nodes outside [0, 1] fall from 48 to 34.

fraction: 0.5

The arguments are the ones Smoothing a whole line at once passes. A value drawn at the generator's defaults instead would be a picture no essay asked for and no assertion has been run against.

Streamline diffusion alone, and with 0.5 of it across the flowTwo bars an angle, on a logarithmic scale. On the axis both are at the level of rounding — the crosswind term costs nothing where the scheme was exact. At 45° the error falls from 0.0661 to 0.0281 and the nodes outside [0, 1] fall from 48 to 0.worst nodal error, and nodes outside the interval the equation guarantees0°, streamline only2.39·10⁻¹⁷ · 0 outside0°, with crosswind5.25·10⁻¹⁷ · 0 outside15°, streamline only0.032 · 18 outside15°, with crosswind0.0145 · 9 outside30°, streamline only0.0571 · 50 outside30°, with crosswind0.0247 · 11 outside45°, streamline only0.0661 · 48 outside45°, with crosswind0.0281 · 0 outsidewhat the crosswind term buyserror ratio at 0°0.45error ratio at 15°2.2error ratio at 30°2.3error ratio at 45°2.3free where the scheme was exactand half the error everywhere else

Two bars an angle, on a logarithmic scale. On the axis both are at the level of rounding — the crosswind term costs nothing where the scheme was exact. At 45° the error falls from 0.0661 to 0.0281 and the nodes outside [0, 1] fall from 48 to 0.

fraction: 0.75

The arguments are the ones The stencil that is not symmetric passes. A value drawn at the generator's defaults instead would be a picture no essay asked for and no assertion has been run against.

Streamline diffusion alone, and with 0.75 of it across the flowTwo bars an angle, on a logarithmic scale. On the axis both are at the level of rounding — the crosswind term costs nothing where the scheme was exact. At 45° the error falls from 0.0661 to 0.0139 and the nodes outside [0, 1] fall from 48 to 0.worst nodal error, and nodes outside the interval the equation guarantees0°, streamline only2.39·10⁻¹⁷ · 0 outside0°, with crosswind2.34·10⁻¹⁷ · 0 outside15°, streamline only0.032 · 18 outside15°, with crosswind0.00788 · 4 outside30°, streamline only0.0571 · 50 outside30°, with crosswind0.0124 · 0 outside45°, streamline only0.0661 · 48 outside45°, with crosswind0.0139 · 0 outsidewhat the crosswind term buyserror ratio at 0°1error ratio at 15°4.1error ratio at 30°4.6error ratio at 45°4.8free where the scheme was exactand half the error everywhere else

Two bars an angle, on a logarithmic scale. On the axis both are at the level of rounding — the crosswind term costs nothing where the scheme was exact. At 45° the error falls from 0.0661 to 0.0139 and the nodes outside [0, 1] fall from 48 to 0.

What it checked while drawing

Every figure above asserted its own claims on the way to being drawn, and a claim that failed would have failed the build rather than drawn a wrong picture. Those assertions used to leave no trace at all: a passing one returned true and the only evidence the figure had checked anything was that nothing crashed. The list below is what they actually said, collected by running this generator with an observer installed — not a description of what it is believed to check.

9 distinct claims across 4 sets of arguments, grouped below by shape — because most of them are one sentence with a different number in it, and how many separate times that sentence was put to the test is the informative part.

and helps at 15° — asserted 3 times

a comparison that includes the aligned case

a crosswind coefficient below the streamline one

a diffusion small enough for a layer

LU is for square matrices

the crosswind term costs nothing on the axis

without adding violations

Against the rule

It draws a decomposition and prints its residual. It calls solve2d, and every figure above carries the badge — which residualcheck verifies by looking for it in the emitted SVG rather than by finding the call that builds one. A badge that is constructed and then left out of the body is the failure that check exists for.

Across the library: the rule bites on 70 of 151 generators — 55 print a residual and 15 are exempt with a published reason; 81 factorise nothing. Read from lib/residual-rule.js, which is the same body the gate enforces from, and the gate's last check fails the build if this page and it disagree about any generator.

Where it is called

Changing this generator changes every figure on this list. That is what makes the list worth publishing rather than keeping in a check script.

Iterating, instead of factorising

Coarsening in one direction only

Leave the smoother alone and halve only the strong direction, and the smoothing factor is 0.3340 — identical to line relaxation's, at every anisotropy and every weight, to twelve digits. The convergence factors are then a factor of three apart, and at 45° both repairs fail outright.

Iterating, instead of factorising

Smoothing a whole line at once

Solve every grid line in the strong direction exactly rather than sweeping over it, and the smoothing factor goes from 0.9993 back to 0.3340 — which is the one-dimensional answer, on a problem that is not one-dimensional. The repair replaces one ε in the closed form by a one.

Iterating, instead of factorising

The coarse problem is a different problem

In one dimension the Galerkin coarse operator is the coarse discretisation, entry for entry — this site asserted it. In two dimensions a five-point operator produces a nine-point coarse one, so the recursion solves a different discretisation at every level below the first, and converges at 0.20 a cycle regardless.

Iterating, instead of factorising

The direction the diffusion does not go

Streamline diffusion adds τbbᵀ, a rank-one tensor that annihilates every direction across the flow. That is the design. The price is 18, 50 and 48 nodes where the computed solution leaves the interval the equation guarantees — and half a coefficient of crosswind diffusion halves the error at every angle while costing exactly nothing where the scheme was exact.

Iterating, instead of factorising

The stencil that is not symmetric

Past a cell Péclet number of exactly one — measured by bisection at 1.0000000000000002 — the central-difference solution of a convection–diffusion problem oscillates from point to point and leaves the interval the equation guarantees, at 16 of 31 grid points. It is the exact solution of its own linear system, to 4.6·10⁻¹⁸. No solver was involved.

The whole library · All essays · What must fail