Generator

crosswind-slice

One function in the supg2d library, called 6 times across 6 essays. Below: what it draws at its defaults, what it draws at every value an essay asks for, the 14 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 the solution along a line across a flow at 30°. Four curves along the anti-diagonal of the grid, which at 45° is exactly a line across the flow. The exact solution depends on the flow coordinate alone, so on this line it never rises above 1.96·10⁻²³ — the region the layer has decayed to nothing by. The streamline scheme's answer there swings over a range 8.9·10¹² times that value and changes direction 9 times; upwinding turns 1 time and stays inside [0, 1] everywhere on the grid, where the streamline scheme leaves it at 50 nodes.

crosswind-slice 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.

The solution along a line across a flow at 30°Four curves along the anti-diagonal of the grid, which at 45° is exactly a line across the flow. The exact solution depends on the flow coordinate alone, so on this line it never rises above 1.96·10⁻²³ — the region the layer has decayed to nothing by. The streamline scheme's answer there swings over a range 8.9·10¹² times that value and changes direction 9 times; upwinding turns 1 time and stays inside [0, 1] everywhere on the grid, where the streamline scheme leaves it at 50 nodes.0246810121403.5·10⁻¹¹7·10⁻¹¹10⁻¹⁰1.4·10⁻¹⁰position across the flowcomputed valuestreamline onlywith crosswindexactwhat is left undampedturns along this line9swing, against the exact value8.9·10¹²nodes outside [0, 1]50with a crosswind term11upwind, for comparison0the exact solution is flat across the flowand the scheme aimed along it is not

Four curves along the anti-diagonal of the grid, which at 45° is exactly a line across the flow. The exact solution depends on the flow coordinate alone, so on this line it never rises above 1.96·10⁻²³ — the region the layer has decayed to nothing by. The streamline scheme's answer there swings over a range 8.9·10¹² times that value and changes direction 9 times; upwinding turns 1 time and stays inside [0, 1] everywhere on the grid, where the streamline scheme leaves it at 50 nodes.

deg: 45

The arguments are the ones A direction the smoother cannot see 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.

The solution along a line across a flow at 45°Four curves along the anti-diagonal of the grid, which at 45° is exactly a line across the flow. The exact solution depends on the flow coordinate alone, so on this line it never rises above 1.95·10⁻³¹ and is that same double at all fifteen nodes — the region the layer has decayed to nothing by. The streamline scheme's answer there swings over a range 3.4·10²¹ times that value and changes direction 11 times; upwinding turns 1 time and stays inside [0, 1] everywhere on the grid, where the streamline scheme leaves it at 48 nodes.0246810121401.3·10⁻¹⁰2.7·10⁻¹⁰4·10⁻¹⁰5.3·10⁻¹⁰position across the flowcomputed valuestreamline onlywith crosswindexactwhat is left undampedturns along this line11swing, against the exact value3.4·10²¹nodes outside [0, 1]48with a crosswind term0upwind, for comparison0the exact solution is flat across the flowand the scheme aimed along it is not

Four curves along the anti-diagonal of the grid, which at 45° is exactly a line across the flow. The exact solution depends on the flow coordinate alone, so on this line it never rises above 1.95·10⁻³¹ and is that same double at all fifteen nodes — the region the layer has decayed to nothing by. The streamline scheme's answer there swings over a range 3.4·10²¹ times that value and changes direction 11 times; upwinding turns 1 time and stays inside [0, 1] everywhere on the grid, where the streamline scheme leaves it at 48 nodes.

deg: 15

The arguments are the ones Aggregating what the matrix calls strong 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.

The solution along a line across a flow at 15°Four curves along the anti-diagonal of the grid, which at 45° is exactly a line across the flow. The exact solution depends on the flow coordinate alone, so on this line it never rises above 6.92·10⁻¹⁴ — the region the layer has decayed to nothing by. The streamline scheme's answer there swings over a range 257 times that value and changes direction 7 times; upwinding turns 1 time and stays inside [0, 1] everywhere on the grid, where the streamline scheme leaves it at 18 nodes.0246810121403.6·10⁻¹²7.1·10⁻¹²1.1·10⁻¹¹1.4·10⁻¹¹1.8·10⁻¹¹position across the flowcomputed valuestreamline onlywith crosswindexactwhat is left undampedturns along this line7swing, against the exact value257nodes outside [0, 1]18with a crosswind term9upwind, for comparison0the exact solution is flat across the flowand the scheme aimed along it is not

Four curves along the anti-diagonal of the grid, which at 45° is exactly a line across the flow. The exact solution depends on the flow coordinate alone, so on this line it never rises above 6.92·10⁻¹⁴ — the region the layer has decayed to nothing by. The streamline scheme's answer there swings over a range 257 times that value and changes direction 7 times; upwinding turns 1 time and stays inside [0, 1] everywhere on the grid, where the streamline scheme leaves it at 18 nodes.

deg: 30

The arguments are the ones Exact along one axis 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.

The solution along a line across a flow at 30°Four curves along the anti-diagonal of the grid, which at 45° is exactly a line across the flow. The exact solution depends on the flow coordinate alone, so on this line it never rises above 1.96·10⁻²³ — the region the layer has decayed to nothing by. The streamline scheme's answer there swings over a range 8.9·10¹² times that value and changes direction 9 times; upwinding turns 1 time and stays inside [0, 1] everywhere on the grid, where the streamline scheme leaves it at 50 nodes.0246810121403.5·10⁻¹¹7·10⁻¹¹10⁻¹⁰1.4·10⁻¹⁰position across the flowcomputed valuestreamline onlywith crosswindexactwhat is left undampedturns along this line9swing, against the exact value8.9·10¹²nodes outside [0, 1]50with a crosswind term11upwind, for comparison0the exact solution is flat across the flowand the scheme aimed along it is not

Four curves along the anti-diagonal of the grid, which at 45° is exactly a line across the flow. The exact solution depends on the flow coordinate alone, so on this line it never rises above 1.96·10⁻²³ — the region the layer has decayed to nothing by. The streamline scheme's answer there swings over a range 8.9·10¹² times that value and changes direction 9 times; upwinding turns 1 time and stays inside [0, 1] everywhere on the grid, where the streamline scheme leaves it at 50 nodes.

deg: 5

The arguments are the ones The diffusion that makes the answer exact 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.

The solution along a line across a flow at 5°Four curves along the anti-diagonal of the grid, which at 45° is exactly a line across the flow. The exact solution depends on the flow coordinate alone, so on this line it never rises above 5.59·10⁻⁷ — the region the layer has decayed to nothing by. The streamline scheme's answer there swings over a range 8.7 times that value and changes direction 0 times; upwinding turns 0 times and stays inside [0, 1] everywhere on the grid, where the streamline scheme leaves it at 13 nodes.0246810121407.1·10⁻⁶1.4·10⁻⁵2.1·10⁻⁵2.9·10⁻⁵3.6·10⁻⁵position across the flowcomputed valuestreamline onlywith crosswindexactwhat is left undampedturns along this line0swing, against the exact value8.7nodes outside [0, 1]13with a crosswind term8upwind, for comparison0the exact solution is flat across the flowand the scheme aimed along it is not

Four curves along the anti-diagonal of the grid, which at 45° is exactly a line across the flow. The exact solution depends on the flow coordinate alone, so on this line it never rises above 5.59·10⁻⁷ — the region the layer has decayed to nothing by. The streamline scheme's answer there swings over a range 8.7 times that value and changes direction 0 times; upwinding turns 0 times and stays inside [0, 1] everywhere on the grid, where the streamline scheme leaves it at 13 nodes.

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.

14 distinct claims across 5 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.

a diffusion small enough for a layer

a grid the dense solve is affordable at

an angle off the grid, where there is a crosswind at all

and near a grid direction neither does the streamline scheme

and the streamline scheme's swing across it is astronomically larger

and the streamline scheme's variation across it exceeds the answer

and upwinding barely turns on this line at any angle

and upwinding does not

LU is for square matrices

the exact solution decays along this line without turning

the exact solution is the same number at every node of this line

the tuned scheme leaves the interval somewhere on this grid

which the crosswind term reduces

while the streamline scheme does, once the flow is properly off it

Against the rule

The rule does not apply to it. It factorises nothing, so there is no residual it could be withholding. That is worth stating rather than leaving blank: a site that reported the rule as satisfied by every generator would be counting mostly generators the rule never reached.

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

A direction the smoother cannot see

Give the Laplacian a strong direction and multigrid stops working — from 0.2016 a cycle to 0.9565 — with every component unchanged and the condition number identical to twelve digits. The problem did not get harder. The link between the method's two halves broke.

Iterating, instead of factorising

Aggregating what the matrix calls strong

The depth phase measured every method it had on the 45°-rotated anisotropic operator — 0.784, 0.883, 0.844 — and diagnosed the failure as being in the discretisation rather than in the hierarchy. Smoothed aggregation is the standard answer to anisotropy. It returns 0.789.

Iterating, instead of factorising

Exact along one axis

The tuned diffusion makes the answer exact at every node, and in two dimensions it holds at exactly one flow angle. Five degrees off the grid the relative error goes from 1.2·10⁻¹⁴ to 6.9, and by twenty degrees the scheme is worse than the upwinding it was built to improve on.

Iterating, instead of factorising

The diffusion that makes the answer exact

Upwinding adds h/2 of artificial diffusion. Central differencing adds none. Add ε·ξ·Pe with ξ = coth(Pe) − 1/Pe and the computed solution is the exact one at every grid point, to 2.4·10⁻¹⁷ — at every Péclet number, on the problem it was derived from and on no other.

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