Milestone 04
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 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 choose the initial values of \(\rho\) and \(\mathbf{u}\) at time \(t=0\)
Measuring the viscosity
The shear-wave decay methods starts from an initial shear wave. We choose an initial distribution of \(\rho(\mathbf{r})\) at \(t=0\) as \(\rho(\mathbf{r},0)=\rho_0+\varepsilon\sin\left(\frac{2\pi x}{n_x}\right)\) and then observe what happens with the 2D density distribution in time.
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 in both cases 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 density and velocity profiles with time.
- The presentation should also report on the measured viscosity as a function of the parameter \(\omega\). Produce a plot that shows your numerical measurements alongside the analytical prediction for this dependency.