# src/test/swirl.c

# Boundary layer on a rotating disk

Von Kármán, 1921 showed that the steady flow of an incompressible liquid of kinematic viscosity $\nu $ induced by an infinite plane disk rotating at angular velocity $\Omega $ can be described by a similarity solution. In effect, using $\zeta =z\sqrt{\Omega /\nu}$ and setting the axial velocity $U$, radial velocity $V$ and azimuthal velocity $W$ as $$U=\sqrt{\nu \Omega}F(\zeta )\phantom{\rule{1em}{0ex}}V=\Omega rH(\zeta )\phantom{\rule{1em}{0ex}}W=\Omega rG(\zeta )$$ the Navier-Stokes equations reduce to a couple of ODEs: $$F\u2034-F\phantom{\rule{0.167em}{0ex}}F\u02ba+F{\u02b9}^{2}/2+2{G}^{2}=0\phantom{\rule{1em}{0ex}}\mathrm{\text{and}}\phantom{\rule{1em}{0ex}}G\u02ba-F\phantom{\rule{0.167em}{0ex}}G\u02b9+G\phantom{\rule{0.167em}{0ex}}F\u02b9=0$$ with boundary conditions $$F(0)=F\u02b9(0)=0\phantom{\rule{0.222em}{0ex}}G(0)=1.\phantom{\rule{1em}{0ex}}\mathrm{\text{and}}\phantom{\rule{1em}{0ex}}F\u02b9(\infty )=G(\infty )=0.$$ where the prime denotes differentiation with respect to $\zeta $.

To reproduce this solution numerically, we use the axisymmetric Navier–Stokes solver with azimuthal velocity (swirl).

```
#include "grid/multigrid.h"
#include "axi.h"
#include "navier-stokes/centered.h"
#include "navier-stokes/swirl.h"
```

The left boundary is the rotating disk with $\Omega =1$ and a no-slip condition for the tangential velocity i.e.

```
u.t[left] = dirichlet(0);
w[left] = dirichlet(y);
```

We use an open (outflow) boundary condition for the right boundary.

```
u.n[right] = neumann(0);
p[right] = dirichlet(0);
pf[right] = dirichlet(0);
```

The top boundary condition is more tricky but the following seems to work.

```
u.n[top] = neumann(0);
p[top] = neumann(0);
```

We use a constant viscosity but it needs to be weighted by the (axisymmetric) metric.

```
face vector muv[];
event properties (i++) {
foreach_face()
muv.x[] = 0.2*fm.x[];
}
```

The computational domain is $12\times 12$ and we limit the timestep.

```
int main()
{
size (12);
N = 128;
μ = muv;
DT = 2e-2;
run();
}
```

We wait until the boundary layer is fully developed and quasi-stationary. We only consider values close to the origin to minimize the influence of boundaries (von Kármán’s solution is valid in an infinite domain).

```
event end (t = 20)
{
foreach()
if (x*x + y*y < 8)
fprintf (stderr, "%g %g %.4g %.4g\n", x, y, u.x[], w[]);
}
```

## References

[karman1921] |
Th V Karman. Über laminare und turbulente reibung. |