WEBVTT

00:00:00.035 --> 00:00:03.228
A plane channel is the simplest
wall-bounded turbulent flow we

00:00:03.228 --> 00:00:05.074
can simulate exactly.

00:00:05.271 --> 00:00:08.996
Two parallel walls, a fluid
driven along the gap between them,

00:00:09.079 --> 00:00:12.992
and every eddy in that gap resolved
on the grid rather than modelled.

00:00:13.789 --> 00:00:17.061
The two directions along the wall
are statistically homogeneous,

00:00:17.144 --> 00:00:19.073
so we take them periodic:

00:00:19.176 --> 00:00:22.367
x downstream, and z across the span.

00:00:22.450 --> 00:00:24.422
The remaining direction, y,

00:00:24.505 --> 00:00:29.220
runs across the gap, from minus one at
the lower wall to plus one at the upper.

00:00:30.133 --> 00:00:32.525
At each wall the fluid sticks:

00:00:32.722 --> 00:00:35.602
all three velocity
components vanish there.

00:00:35.705 --> 00:00:37.108
That single condition,

00:00:37.191 --> 00:00:41.952
no-slip on a solid boundary, is the source
of every difficulty in this lecture.

00:00:42.656 --> 00:00:46.117
Before deriving anything, let me
put the destination on the board.

00:00:46.430 --> 00:00:50.471
Kim, Moin and Moser
march two scalar fields.

00:00:51.085 --> 00:00:54.079
The first is the velocity
component normal to the walls,

00:00:54.162 --> 00:00:56.937
and its equation is fourth order in space.

00:00:57.734 --> 00:01:01.206
The second is the vorticity
component normal to the walls.

00:01:01.402 --> 00:01:04.895
Its own equation is a diffusion
equation with a source term,

00:01:04.978 --> 00:01:07.440
and it is only second order in space.

00:01:08.144 --> 00:01:09.652
And look at what is missing.

00:01:09.735 --> 00:01:12.022
There is no pressure in either line.

00:01:12.474 --> 00:01:16.246
Two scalars have replaced three
velocity components and a pressure,

00:01:16.329 --> 00:01:19.799
and every boundary condition the walls
hand us will turn out to be a condition

00:01:19.882 --> 00:01:22.390
on something we are genuinely solving for.

00:01:23.442 --> 00:01:25.963
Here is the system we normally write down.

00:01:26.159 --> 00:01:28.782
Momentum for each
of the three velocity components,

00:01:28.865 --> 00:01:33.568
with the pressure gradient sitting in it,
and incompressible continuity beside it.

00:01:34.364 --> 00:01:35.526
Count them:

00:01:35.630 --> 00:01:38.196
four unknowns and four equations.

00:01:38.393 --> 00:01:40.611
But look at where the pressure sits.

00:01:40.808 --> 00:01:42.584
It enters only through its gradient

00:01:42.584 --> 00:01:47.101
in the momentum equations,
and continuity does not contain it at all.

00:01:47.897 --> 00:01:51.855
Take the divergence
of the momentum equations, use continuity,

00:01:51.938 --> 00:01:54.249
and the time derivative drops out.

00:01:54.561 --> 00:01:56.882
What is left is an elliptic problem:

00:01:56.965 --> 00:02:01.737
a Poisson equation whose right hand
side is quadratic in the velocity.

00:02:02.441 --> 00:02:04.949
So the pressure is not marched at all.

00:02:05.146 --> 00:02:08.453
At every time step it
is determined, everywhere at once,

00:02:08.536 --> 00:02:11.379
by the velocity field everywhere at once.

00:02:11.462 --> 00:02:13.680
And that is where the trouble starts.

00:02:14.477 --> 00:02:17.343
The first difficulty
is the one we have just met.

00:02:17.426 --> 00:02:20.547
The pressure has no equation
to march, so it has to be recovered

00:02:20.630 --> 00:02:24.706
from an elliptic solve at every step,
over the whole channel at once.

00:02:25.410 --> 00:02:29.065
The second is that the velocity
has to come out divergence free.

00:02:29.148 --> 00:02:32.502
Solve the momentum equations
on their own and it will not.

00:02:32.585 --> 00:02:37.938
So velocity and pressure are two halves
of one solve, not two solves in sequence.

00:02:38.734 --> 00:02:43.562
The third is the sharpest. The walls
tell us the velocity there: it is zero.

00:02:43.645 --> 00:02:46.107
They tell us nothing
at all about the pressure.

00:02:46.559 --> 00:02:50.099
And yet an elliptic problem
demands a condition on every boundary,

00:02:50.182 --> 00:02:52.769
so whatever we supply
is a numerical invention,

00:02:52.852 --> 00:02:55.755
sitting exactly
where the interesting physics lives.

00:02:56.459 --> 00:02:59.975
Kim, Moin and Moser
take the obvious way out.

00:03:00.058 --> 00:03:04.146
If the pressure is the problem,
remove it from the equations altogether.

00:03:04.249 --> 00:03:06.895
That takes one vector
identity and two derivatives,

00:03:06.978 --> 00:03:08.952
and it is the next thing we do.

00:03:09.998 --> 00:03:12.469
Vorticity is the curl of the velocity,

00:03:12.552 --> 00:03:16.790
and the component we are going to need
points along the wall-normal direction.

00:03:17.103 --> 00:03:22.015
Here is a wall-parallel plane,
with the horizontal velocity drawn on it.

00:03:22.812 --> 00:03:25.097
This particular field circulates.

00:03:25.180 --> 00:03:28.825
It turns about the wall-normal
axis, which is perpendicular

00:03:28.825 --> 00:03:34.085
to the plane you are looking at, and that
turning is exactly what omega y measures.

00:03:34.998 --> 00:03:39.318
In components, only the two
wall-parallel derivatives appear:

00:03:39.514 --> 00:03:43.390
the rate at which the downstream
velocity varies across the span,

00:03:43.473 --> 00:03:47.642
minus the rate at which the spanwise
velocity varies downstream.

00:03:48.554 --> 00:03:50.297
Now the derivation.

00:03:50.493 --> 00:03:54.625
Collect every nonlinear
term into one symbol, N,

00:03:54.708 --> 00:03:57.170
so that the momentum equation reads:

00:03:57.273 --> 00:04:02.928
rate of change equals N, minus the
pressure gradient, plus viscous diffusion.

00:04:03.841 --> 00:04:05.955
Take the curl of that equation.

00:04:06.059 --> 00:04:07.614
The pressure term is the gradient

00:04:07.614 --> 00:04:13.478
of a scalar, and the curl of a gradient is
identically zero, so it simply disappears.

00:04:13.791 --> 00:04:18.668
That is the whole trick, and the rest
of this lecture is bookkeeping around it.

00:04:19.372 --> 00:04:24.920
What comes back is the vorticity transport
equation. Take its wall-normal component

00:04:25.004 --> 00:04:28.916
and the second of our two
governing equations is already there:

00:04:29.020 --> 00:04:30.818
omega y diffuses,

00:04:30.901 --> 00:04:35.592
and it is stirred by a source built
out of the nonlinear terms alone.

00:04:36.389 --> 00:04:39.141
The velocity equation takes more work.

00:04:39.245 --> 00:04:43.204
Start from the same momentum
equation and take its divergence.

00:04:43.517 --> 00:04:48.127
Continuity kills the time derivative,
and what is left is a Poisson equation

00:04:48.127 --> 00:04:52.528
for the pressure with a right
hand side made only of velocities.

00:04:53.928 --> 00:04:55.809
Now take the wall-normal component

00:04:55.809 --> 00:05:00.024
of the momentum equation and hit
the whole line with a Laplacian.

00:05:00.220 --> 00:05:02.845
Three of the four terms are harmless.

00:05:03.042 --> 00:05:08.778
The pressure term becomes the Laplacian of
a y derivative, which is the y derivative

00:05:08.778 --> 00:05:13.712
of a Laplacian, and we have just worked
out what the Laplacian of the pressure is.

00:05:14.509 --> 00:05:17.796
Substitute it
in and the pressure is gone for good.

00:05:18.410 --> 00:05:21.848
Rearranged,
this is the fourth-order equation:

00:05:22.044 --> 00:05:25.899
the Laplacian of v is what
evolves, viscosity acts

00:05:25.899 --> 00:05:31.160
through a fourth derivative, and the
source h collects the nonlinear terms.

00:05:32.071 --> 00:05:35.068
There is a neater way
to say what we just did.

00:05:35.264 --> 00:05:41.427
Minus the Laplacian of a divergence-free
velocity is the curl of its vorticity,

00:05:41.510 --> 00:05:42.822
so applying the Laplacian

00:05:42.822 --> 00:05:47.397
to the wall-normal momentum
equation is taking the curl twice.

00:05:47.849 --> 00:05:51.518
The fourth-order operator
is what a double curl looks like.

00:05:52.315 --> 00:05:54.347
So here they are together.

00:05:54.544 --> 00:05:58.014
A fourth-order equation
for the wall-normal velocity,

00:05:58.097 --> 00:06:01.847
and a second-order equation
for the wall-normal vorticity.

00:06:02.644 --> 00:06:06.032
They are coupled, but only
through the source terms h,

00:06:06.116 --> 00:06:10.935
which are quadratic in the velocity
and will be evaluated explicitly.

00:06:11.131 --> 00:06:15.208
The linear operators on the right
are completely independent of each other.

00:06:16.259 --> 00:06:18.173
Fourth order sounds expensive,

00:06:18.256 --> 00:06:22.692
and it is not, because we are about
to solve it in one direction only.

00:06:22.888 --> 00:06:25.328
Two questions are still open, though.

00:06:25.431 --> 00:06:28.099
Where did the other two
velocity components go,

00:06:28.182 --> 00:06:32.107
and what boundary conditions
does a fourth-order equation want?

00:06:32.420 --> 00:06:35.846
Both answers arrive as soon
as we go to Fourier space.

00:06:36.939 --> 00:06:40.571
Both wall-parallel directions
are homogeneous and periodic,

00:06:40.654 --> 00:06:42.849
so both get Fourier series.

00:06:43.046 --> 00:06:46.564
Write the wall-normal
velocity as a sum over modes:

00:06:46.668 --> 00:06:49.372
each mode carries a wavenumber in x,

00:06:49.455 --> 00:06:54.773
a wavenumber in z, and an amplitude
that still depends on y and on time.

00:06:55.477 --> 00:07:00.028
Inside a single mode the wall-parallel
derivatives are no longer derivatives.

00:07:00.225 --> 00:07:07.225
Differentiating in x multiplies by i k x,
differentiating in z multiplies by i k z,

00:07:07.551 --> 00:07:12.625
and the Laplacian collapses to a second
derivative in y minus k squared, where k

00:07:12.625 --> 00:07:14.901
squared is the sum of the two squares.

00:07:15.384 --> 00:07:17.983
That is the whole
content of the transform,

00:07:18.066 --> 00:07:20.749
and it has already done something drastic.

00:07:20.945 --> 00:07:25.520
Neither of our two governing
equations contains x or z at all any more.

00:07:26.131 --> 00:07:29.867
Put the two equations through that
transform and what is left in each one

00:07:29.950 --> 00:07:34.978
is an ordinary differential equation
in y alone, with time as a parameter.

00:07:35.593 --> 00:07:39.715
Fourth order for the velocity,
second order for the vorticity.

00:07:40.419 --> 00:07:43.612
And here is the payoff
the whole method is built on.

00:07:44.064 --> 00:07:47.012
Each pair of wavenumbers
gets its own pair of equations,

00:07:47.095 --> 00:07:50.892
and those equations know nothing
whatsoever about any other pair.

00:07:51.205 --> 00:07:53.921
The three-dimensional problem
has come apart into a lattice

00:07:53.921 --> 00:07:55.954
of one-dimensional problems.

00:07:56.750 --> 00:07:58.643
Walk across that lattice.

00:07:59.095 --> 00:08:00.547
Here is one mode.

00:08:00.744 --> 00:08:02.730
Here is another, further out.

00:08:02.927 --> 00:08:04.530
And here is a third.

00:08:04.842 --> 00:08:08.616
Three completely independent boundary
value problems, and the only thing

00:08:08.616 --> 00:08:12.842
that differs between them is the single
number k squared sitting in the operator.

00:08:13.546 --> 00:08:15.799
Where have u and w gone?

00:08:16.413 --> 00:08:17.447
Nowhere.

00:08:17.644 --> 00:08:19.328
They have become algebra.

00:08:19.780 --> 00:08:21.891
Continuity, transformed,

00:08:21.974 --> 00:08:26.225
is one linear relation between
the three transformed components.

00:08:27.021 --> 00:08:29.817
And the definition
of the wall-normal vorticity,

00:08:29.900 --> 00:08:34.290
transformed, is a second linear
relation between the same three.

00:08:34.486 --> 00:08:38.084
In both of them the y derivative
of v hat is already known,

00:08:38.167 --> 00:08:41.163
because v is what we have just marched.

00:08:41.646 --> 00:08:46.825
So set them side by side as a two
by two system for u hat and w hat.

00:08:47.137 --> 00:08:51.782
Multiply down one diagonal,
multiply down the other, and subtract.

00:08:52.095 --> 00:08:57.178
The determinant is k x squared
plus k z squared, which is k squared:

00:08:57.261 --> 00:09:02.092
nonzero for every mode but one,
and we will come back to that exception.

00:09:02.401 --> 00:09:05.815
Solve it and the horizontal
velocities fall out.

00:09:06.012 --> 00:09:12.117
u hat is one combination of the slope of v
hat and the vorticity, w hat is another,

00:09:12.200 --> 00:09:14.952
and both are divided by k squared.

00:09:15.865 --> 00:09:19.941
No linear solve,
no iteration, no elliptic problem:

00:09:20.045 --> 00:09:24.074
two multiplications
and an addition, per mode, per step.

00:09:24.178 --> 00:09:27.290
And continuity is not
being enforced here at all.

00:09:27.487 --> 00:09:28.485
It has been used,

00:09:28.485 --> 00:09:33.223
so the reconstructed field satisfies
it identically, to machine precision.

00:09:34.136 --> 00:09:37.526
One thing is still missing,
and it is not a small thing.

00:09:37.723 --> 00:09:40.415
This reconstruction divides by k squared,

00:09:40.498 --> 00:09:44.655
and there is exactly one mode
in the lattice where k squared is zero.

00:09:44.851 --> 00:09:48.149
That mode, and the boundary
conditions, come next.

00:09:49.259 --> 00:09:54.147
A fourth-order equation wants four
boundary conditions, two at each wall.

00:09:54.251 --> 00:09:56.806
A second-order equation wants two.

00:09:56.910 --> 00:10:01.458
So we need six, and the walls
appear to offer only one thing:

00:10:01.542 --> 00:10:03.470
the velocity vanishes.

00:10:04.267 --> 00:10:06.125
Start with what is given.

00:10:06.322 --> 00:10:11.195
At either wall all three components
are zero, for every x and every z,

00:10:11.279 --> 00:10:15.854
so mode by mode every one
of the three amplitudes is zero as well.

00:10:16.651 --> 00:10:18.808
That is v hat equal to zero

00:10:18.892 --> 00:10:23.165
at both walls: two conditions
for the fourth-order equation.

00:10:23.269 --> 00:10:28.285
For the other two, put the wall values
into the transformed continuity relation.

00:10:28.481 --> 00:10:31.195
Since u hat and w hat vanish there,

00:10:31.279 --> 00:10:35.262
the y derivative of v hat
has to vanish there too.

00:10:36.477 --> 00:10:39.032
So the picture at each wall is this:

00:10:39.136 --> 00:10:42.387
v hat pinned to zero, and pinned flat.

00:10:42.583 --> 00:10:46.938
Four conditions, and not one of them
was invented for numerical convenience.

00:10:47.734 --> 00:10:50.127
The vorticity is easier still.

00:10:50.323 --> 00:10:52.669
Wall-normal vorticity is built from u

00:10:52.669 --> 00:10:58.463
and w alone, and both of those are zero at
the wall, so omega y hat vanishes there.

00:10:58.659 --> 00:11:01.667
Two conditions
for a second-order equation.

00:11:02.580 --> 00:11:04.226
Let me count it once more,

00:11:04.310 --> 00:11:07.956
because this is the part that makes
the formulation feel inevitable.

00:11:08.152 --> 00:11:12.646
Each unknown, its order in y,
and what the walls hand us for it.

00:11:13.443 --> 00:11:17.553
The wall-normal velocity obeys
a fourth-order equation, and the walls

00:11:17.553 --> 00:11:23.463
give exactly four conditions: the value,
and the slope, at each of the two walls.

00:11:24.515 --> 00:11:28.065
The wall-normal vorticity
obeys a second-order equation,

00:11:28.149 --> 00:11:30.600
and the walls give exactly two.

00:11:30.796 --> 00:11:33.816
Nothing is left over,
and nothing has to be guessed.

00:11:34.128 --> 00:11:38.889
Compare that with a boundary condition
for the pressure, which does not exist.

00:11:39.686 --> 00:11:41.289
Now the exception.

00:11:41.903 --> 00:11:45.848
The reconstruction of the horizontal
velocities divided by k squared,

00:11:45.932 --> 00:11:49.308
and there is exactly one
mode where k squared is zero:

00:11:49.392 --> 00:11:53.073
no variation in x and no variation in z.

00:11:53.177 --> 00:11:57.295
That mode is the mean flow,
averaged over wall-parallel planes,

00:11:57.379 --> 00:12:00.805
and everything we have built
so far says nothing about it.

00:12:01.602 --> 00:12:03.727
One of its components is free.

00:12:03.831 --> 00:12:08.669
Continuity for that mode says
the y derivative of v hat is zero,

00:12:08.753 --> 00:12:14.838
and v hat is zero at the wall, so v hat
is identically zero right across the gap.

00:12:14.942 --> 00:12:19.749
There is no mean flow through the walls,
which is exactly what we should expect.

00:12:20.546 --> 00:12:23.852
The two horizontal means
are not determined algebraically,

00:12:23.936 --> 00:12:26.003
so they are marched directly.

00:12:26.316 --> 00:12:28.278
Average the x momentum equation

00:12:28.278 --> 00:12:32.643
over a wall-parallel plane and you get
a one-dimensional diffusion equation

00:12:32.643 --> 00:12:38.136
for u bar, forced by the mean nonlinear
term and by the mean pressure gradient.

00:12:39.048 --> 00:12:43.005
And there is the one piece of the pressure
that survives the whole construction:

00:12:43.089 --> 00:12:48.349
a single number, the mean streamwise
gradient, which is what drives the flow.

00:12:48.546 --> 00:12:52.737
Either you fix it and let the flow
rate settle, or you fix the flow rate

00:12:52.737 --> 00:12:54.642
and adjust it every step.

00:12:55.345 --> 00:12:59.804
The spanwise mean gets the same
treatment with no imposed gradient.

00:13:00.001 --> 00:13:04.062
Both are one-dimensional diffusion
equations with zero at each wall,

00:13:04.146 --> 00:13:07.141
and the machinery of the next
part solves them without noticing

00:13:07.141 --> 00:13:09.406
that anything special has happened.

00:13:10.543 --> 00:13:14.046
The wall-normal direction
is neither periodic nor homogeneous,

00:13:14.130 --> 00:13:16.732
so Fourier is the wrong basis there.

00:13:16.928 --> 00:13:19.526
Expand in Chebyshev polynomials instead,

00:13:19.610 --> 00:13:23.953
on the interval from minus one
to plus one, which is exactly the gap.

00:13:24.750 --> 00:13:26.759
The first few look like this.

00:13:26.863 --> 00:13:32.889
T one is just y. T four already
has four zeros inside the gap.

00:13:32.993 --> 00:13:36.604
T eight has eight,
and notice where they crowd:

00:13:36.708 --> 00:13:39.658
the oscillations bunch
up towards the two ends.

00:13:40.454 --> 00:13:46.396
So the expansion is a finite sum, N plus
one coefficients for each wavenumber pair,

00:13:46.480 --> 00:13:49.882
and those coefficients
are what the code actually stores.

00:13:50.679 --> 00:13:54.859
The collocation points come
with the basis rather than being chosen.

00:13:55.172 --> 00:13:57.735
They are cosines of equally spaced angles,

00:13:57.819 --> 00:14:01.361
and here they are across
the gap for N equal to eight.

00:14:01.902 --> 00:14:03.386
Look at the spacing.

00:14:03.470 --> 00:14:07.023
In the middle of the channel
the points are as coarse as they ever get.

00:14:07.564 --> 00:14:09.837
Against the wall they are packed tight,

00:14:09.921 --> 00:14:13.080
with a spacing that shrinks
like one over N squared.

00:14:13.183 --> 00:14:18.350
That is precisely the grid a wall-bounded
flow wants, because the whole difficulty

00:14:18.350 --> 00:14:21.903
of this problem is a thin
viscous layer against each wall.

00:14:22.607 --> 00:14:28.006
Now, what does the operator D squared
minus k squared look like in this basis?

00:14:28.110 --> 00:14:32.821
Written for the coefficients, either
as a tau formulation or as a Galerkin one,

00:14:32.905 --> 00:14:34.983
the second derivative
connects a coefficient

00:14:34.983 --> 00:14:37.085
to only a few of its neighbours.

00:14:37.537 --> 00:14:39.268
The matrix is banded.

00:14:40.064 --> 00:14:43.432
For the second-order operator
that means three diagonals.

00:14:43.535 --> 00:14:46.122
For the fourth-order operator, five.

00:14:46.206 --> 00:14:49.152
Either way it is a fixed
number of entries per row,

00:14:49.236 --> 00:14:54.949
whatever N is, so one solve costs order
N operations rather than order N cubed.

00:14:55.745 --> 00:14:59.972
Two further economies, and they
are the ones that matter in practice.

00:15:00.169 --> 00:15:05.518
The matrix depends on the wavenumbers only
through k squared, and on the time step,

00:15:05.602 --> 00:15:08.900
and neither of those changes
as the simulation runs.

00:15:09.097 --> 00:15:10.499
So it is factored once,

00:15:10.583 --> 00:15:14.984
before the first step, and every
step afterwards is a back substitution.

00:15:15.781 --> 00:15:18.104
And one more, which is free.

00:15:18.417 --> 00:15:21.525
The operator does not mix
even polynomials with odd ones,

00:15:21.609 --> 00:15:25.894
so each system splits into two
half-size systems, one per parity.

00:15:26.091 --> 00:15:29.667
All of that, for every
wavenumber pair independently.

00:15:30.787 --> 00:15:33.594
Here is one time step
for the vorticity equation,

00:15:33.678 --> 00:15:36.152
written the way it is usually implemented.

00:15:36.348 --> 00:15:38.482
The viscous term is treated implicitly,

00:15:38.566 --> 00:15:42.897
by Crank-Nicolson: half of it
at the old level, half at the new.

00:15:43.810 --> 00:15:49.105
The nonlinear source is treated
explicitly, by a two-step Adams-Bashforth:

00:15:49.208 --> 00:15:53.342
three halves of the current value,
minus a half of the previous one.

00:15:53.539 --> 00:15:57.278
No solve is involved,
because both are already known.

00:15:57.982 --> 00:16:00.525
And look at what the left hand side is.

00:16:00.629 --> 00:16:04.027
It is the banded, prefactored
operator from a moment ago,

00:16:04.111 --> 00:16:07.917
one per wavenumber pair,
unchanged from step to step.

00:16:08.001 --> 00:16:13.168
The whole advance is a back substitution
per mode, plus the work of forming h.

00:16:13.872 --> 00:16:18.679
Now the stability, which is the real
reason for treating viscosity implicitly.

00:16:18.875 --> 00:16:23.122
The time step is no longer limited
by the wall-normal spacing at all.

00:16:23.206 --> 00:16:26.816
That spacing goes like one
over N squared, so an explicit

00:16:26.816 --> 00:16:30.996
viscous treatment would need a step
going like one over N to the fourth.

00:16:31.100 --> 00:16:34.178
On a fine grid that is simply unusable.

00:16:35.090 --> 00:16:38.063
The velocity equation needs one more idea.

00:16:38.260 --> 00:16:39.966
It is fourth order, so rather

00:16:39.966 --> 00:16:44.414
than building a fourth-order operator we
split it into two second-order problems.

00:16:44.610 --> 00:16:48.024
First solve for phi,
the Laplacian of v hat.

00:16:48.337 --> 00:16:52.378
Then solve for v hat itself,
with phi as the source.

00:16:53.175 --> 00:16:55.916
There is a catch here,
and it is worth naming.

00:16:56.112 --> 00:16:59.511
All four boundary conditions
are conditions on v hat:

00:16:59.595 --> 00:17:01.941
two values and two slopes.

00:17:02.254 --> 00:17:05.435
Neither of the two second-order
problems has any natural condition

00:17:05.435 --> 00:17:07.073
on phi at the walls.

00:17:07.776 --> 00:17:10.595
The standard remedy
is a Green's function argument.

00:17:10.679 --> 00:17:14.821
Solve the pair once with the real
forcing and zero conditions on phi,

00:17:14.905 --> 00:17:19.131
then twice more with unit conditions
and no forcing, and take the combination

00:17:19.131 --> 00:17:23.009
of the three that makes the slope
of v hat vanish at both walls.

00:17:23.206 --> 00:17:27.920
That is a two by two solve per mode
on quantities computed before the run.

00:17:28.717 --> 00:17:33.103
That leaves the source terms h, which
are the only nonlinear work in the method,

00:17:33.187 --> 00:17:35.951
and they are evaluated pseudospectrally.

00:17:36.403 --> 00:17:39.306
Transform the modes
back to a physical grid.

00:17:39.410 --> 00:17:43.335
Form the products there,
where a product is just a multiplication.

00:17:43.531 --> 00:17:46.249
Then transform the result back to modes.

00:17:47.162 --> 00:17:50.077
Why not form the products
mode by mode instead?

00:17:50.389 --> 00:17:55.405
Because a product of two Fourier series is
a convolution, which costs order N squared

00:17:55.405 --> 00:18:01.234
per direction, while two transforms
and a multiplication cost order N log N.

00:18:01.546 --> 00:18:06.110
That single choice is what makes spectral
direct simulation affordable at all.

00:18:06.651 --> 00:18:08.567
The price is aliasing.

00:18:08.880 --> 00:18:14.116
A product of two modes inside the retained
band generates content outside it, and on

00:18:14.116 --> 00:18:19.063
a finite grid that content folds back
onto the modes you are keeping, as error.

00:18:19.859 --> 00:18:23.966
So in both wall-parallel directions the
products are formed on an enlarged grid

00:18:24.050 --> 00:18:28.277
and everything above the retained band
is thrown away rather than folded back.

00:18:28.474 --> 00:18:30.317
That is the three-halves rule,

00:18:30.401 --> 00:18:34.164
and a phase shift scheme
does the same job by a different route.

00:18:34.705 --> 00:18:37.082
So let me put the efficiency in one place.

00:18:37.166 --> 00:18:40.275
First: there is no elliptic
pressure solve, at any step,

00:18:40.359 --> 00:18:42.217
because there is no pressure.

00:18:42.530 --> 00:18:46.812
Second: the reconstructed velocity
is divergence free by construction,

00:18:46.896 --> 00:18:50.229
so nothing has to be projected
or corrected afterwards.

00:18:51.025 --> 00:18:55.225
Third: the Fourier transform
in the two homogeneous directions

00:18:55.309 --> 00:18:59.451
uncouples the three-dimensional
problem into an independent, banded,

00:18:59.535 --> 00:19:03.402
already-factored boundary value
problem for every wavenumber pair.

00:19:03.599 --> 00:19:06.118
Fourth: every boundary
condition the method

00:19:06.118 --> 00:19:10.879
needs is one the walls actually give, so
there is nothing invented near the wall.

00:19:11.676 --> 00:19:15.833
What is left, per step,
is dominated by the transforms:

00:19:16.285 --> 00:19:19.591
order N log N
in the wall-parallel directions,

00:19:19.675 --> 00:19:22.265
times the number of points across the gap.

00:19:22.369 --> 00:19:26.561
The solves themselves are linear
in the number of Chebyshev modes.

00:19:27.264 --> 00:19:28.925
That is the whole of it.

00:19:29.122 --> 00:19:31.259
Two curls removed the pressure.

00:19:31.456 --> 00:19:35.462
Fourier removed two of the three
space dimensions from every solve.

00:19:35.566 --> 00:19:38.466
Chebyshev put the points
where the walls need them.

00:19:38.550 --> 00:19:40.152
And no-slip turned out to supply

00:19:40.152 --> 00:19:44.077
exactly the six boundary conditions
the two equations were waiting for.