Stitching the patches
Here's the deal: I like Lagrangian (sometimes characteristic) methods for doing
fluid dynamics codes. Why? - because they are fast, they are reliable, and
they can be fixed up to deal with supersonic flows in ridiculously simple ways. What
it involves (in two dimensions) is being able to look backward in time, to t=t-dt,
at places where x was x-udt and y was y-vdt (and perhaps to where x was
x-(u±c)dt and y was y-(v±c)dt, or maybe x-(1±a)udt and y-(1±a)vdt,
but not necessarily).
What that implies in the context of The world according to fred
is interpolations in the equilateral triangles that cover the eight
faces of an octahedral computational grid. That would easy enough to do if linear
interpolation were satisfactory, but linear interpolation introduces
systematic errors (sometimes called numerical dissipation), and they
can't be corrected by simply using finer and finer grids.
Higher order interpolations can be implemented if we add an external layer
of equilateral triangles to
surround those on each of the faces. The data at the external vertices is
interpolated data that comes from the neighboring faces. The picture for
the ENA-face is:
w p
x N x
x a e x
x o o o x
x o o o o x
x n x n o o o n x n x
w A e w A e o o a E p a E p
s x s x x x x x s x s
Here, the vertices marked 'x' represent data that is to be found by interpolation.
The marks 'n s e w a p' indicate vertices located on great circles that pass through
the 'N S E W A P' poles. Data on these and on the vertices marked 'o' is known.
(The physical positions of vertices near the Atlantic and East poles are shown at
the left and right.)
The stitching of patches takes place on strips that
contain three great circles, as depicted below:
AEPWA circle (equator)
n o o n o o n o o n o o n
n x x x x n x x x x n x x x x n x x x x n
A E P W A
s x x x x s x x x x s x x x x s x x x x s
s o o s o o s o o s o o s
NASPN circle (Greenwich meridian)
e o o e o o e o o e o o e
e x x x x e x x x x e x x x x e x x x x e
N A S P N
w x x x x w x x x x w x x x x w x x x x w
w o o w o o w o o w o o w
NESWN circle (Galapagos meridian)
p o o p o o p o o p o o p
p x x x x p x x x x p x x x x p x x x x p
N E S W N
a x x x x a x x x x a x x x x a x x x x a
a o o a o o a o o a o o a
In each interpolation, the number of x's at an edge is the number of o's plus two.
For the application at hand in this piece, there are 12 cases like this example in
which N=5:
specified data:
one row north: * o o o o *
on the equator: o A o o o o E o
one row south: * o o o o *
common domains: [0,1] = [0,4]/4 = [0,5]/5 = [0,6]/6
interpolated: n x x x x x n
one row north: * n o o o n *
on the equator: o A o o o o E o
one row south: * s o o o s *
interpolated: s x x x x x s
northern face:
one row north: * n o o o n *
on the equator: o A o o o o E o
one row south: s x x x x x s
southern face:
one row north: n x x x x x n
on the equator: o A o o o o E o
one row south: * s o o o s *
(Note the data marked '*' that comes from four other faces.)
With all of that, every triangle on every face of the octahedron is
is surrounded by nine nodes, arranged as
o o o o o
o o o o o o o
or
o o o o o o o
o o o o o
Schemes that use some or all of the vertices marked 'o' to fully compensate for
the numerical dissipation in linear interpolation are introduced in
On not doing cubic interpolation. Some
one-dimensional algorithms that can be applied to stitching the
patches are developed in Correcting linear interpolation.