Milestone 04

Author

Andreas Greiner, Lars Pastewka

Shear-wave decay

Introduction

In this milestone we will take a look at a method commonly used in computational physics to measure the kinematic viscosity of a fluid. The shear wave method consists in setting a sinusoidal velocity profile in our box and then measuring how fast it decays.

As a brief reminder, the discrete Boltzmann transport equation reads \[ f_i(\mathbf{r}+\Delta t\mathbf{c}_i,t+\Delta t) =f_i(\mathbf{r},t)+\omega\left(f_i^{eq}(\mathbf{r},t)-f_i(\mathbf{r},t)\right) \]

In the previous milestone we identified how \(f_i^{eq}(\mathbf{r})\) looks like. Instead of measuring \(\rho\) and \(\mathbf{u}\) to enter the equilibrium distribution function \[ f_i^{eq}(\rho(\mathbf{r}),\mathbf{u}(\mathbf{r}))=w_i\rho \left[1 +3\mathbf{c}_i\cdot\mathbf{u}(\mathbf{r}) +\frac{9}{2}\left(\mathbf{c}_i\cdot\mathbf{u}(\mathbf{r})\right)^2 -\frac{3}{2}\mathbf{u}(\mathbf{r})^2 \right] \] with \[ w_i= \begin{cases} \frac{4}{9} & \text{for}\,i=0\\ \frac{1}{9} & \text{for}\,i\in\{1,2,3,4\}\\ \frac{1}{36} & \text{for}\,i\in\{5,6,7,8\} \end{cases} \] we now prescribe the initial values of \(\rho\) and \(\mathbf{u}\) at time \(t=0\) and initialize the populations with the corresponding equilibrium distribution, \(f_i(\mathbf{r}, 0) = f_i^{eq}(\rho(\mathbf{r}), \mathbf{u}(\mathbf{r}))\).

Measuring the viscosity

The shear-wave decay method starts from an initial shear wave, a sinusoidal velocity perturbation that decays over time due to viscosity. For an initial perturbation \(u_x(y, 0) = \varepsilon \sin(ky)\) with wave vector \(k = 2\pi/n_y\), the linearized Navier-Stokes equations predict that the wave keeps its sinusoidal shape while its amplitude decays exponentially, \[ u_x(y, t) = \varepsilon\, e^{-\nu k^2 t} \sin(ky), \tag{1}\] where \(\nu\) is the kinematic viscosity. This gives a simple measurement procedure: record the amplitude \(\hat{u}_x(t)\) of the sine wave (e.g. the velocity at the position of the initial maximum, or the amplitude of the corresponding Fourier mode) at every time step, plot \(\ln \hat{u}_x\) versus \(t\), and fit a straight line. The slope of this line is \(-\nu k^2\), from which you obtain \(\nu\). The full measurement procedure, including the derivation of Equation 1, is described in the lecture notes on shear-wave decay.

Figure 1: Decay of a shear wave: the sinusoidal velocity profile \(u_x(y)\) keeps its shape while its amplitude decays exponentially in time with rate \(\nu k^2\).

Tasks

  • Choose an initial distribution of \(\rho(\mathbf{r})=1\) and \(u_x(\mathbf{r})=\varepsilon\sin\left(\frac{2\pi y}{n_y}\right)\) at \(t=0\), i.e. a sinusoidal variation of the velocities \(u_x\) with the position \(y\).
  • Observe what happens dynamically as well as in the long time limit \(t\rightarrow\infty\).
  • Assume that the initial conditions fulfill the Stokes flow condition, i.e. \[ \frac{\partial\mathbf{u}}{\partial t}=\nu\Delta\mathbf{u} \] and calculate the kinematic viscosity.

Notes

  • Choose \(\omega\) with care, i.e. \(0<\omega<2\).
  • Choose \(0<\rho<1\) and \(|\mathbf{u}|<0.1\).
  • For the fulfillment of the Stokes condition choose \(\varepsilon\) with care.
  • Your final presentation should contain plots of the evolution of the velocity profile with time. All plots must follow our figure rules.
  • The presentation should also report on the measured viscosity as a function of the parameter \(\omega\). The analytical relationship between the kinematic viscosity and the relaxation parameter (derived from the Chapman-Enskog expansion) is \[ \nu = \frac{1}{3}\left(\frac{1}{\omega} - \frac{1}{2}\right). \] Produce a plot that shows your numerical measurements alongside this analytical prediction.