For a test case, I want to determine the velocity profile of a viscously damped standing wave.
By linearizing the density ($\rho=\rho_0+\rho'$) and velocity ($ux=ux'$), the continuity and Navier-Stokes equations result in, respectively:
\begin{align} \partial_t\rho' + \rho_0\partial_xu_x' &= 0 \tag{1} \\ \partial_t^2\rho' &= \partial_x^2\rho'c_s^2 + \nu\partial_t\partial_x\rho' \tag{2} \end{align}
The $c_s$ is just a constant indicating we are dealing with an ideal pressure term ($p=\rho c_s^2$)
A solution for the density to $(2)$ is given by:
$$\rho=\rho_0+\Delta\rho\sin(k_xx)\cos(\omega_it)\exp(-\omega_rt)$$
where $$k_x=2\pi/n_x, \quad \omega_r=\frac{1}{2}k_x^2\nu, \quad \omega_i=k_xc_s\sqrt{1-\left(\frac{1}{2}\frac{k_x\nu}{c_s} \right)^2} \, .$$
Now I want to determine the velocity; it would seem straightforward to use $(1)$ to get
$$\partial_xu_x'=-\partial_t\rho'/\rho_0=\frac{\triangle\rho}{\rho_{0}}\sin\left(k_{x}x\right)\left[\omega_{r}\cos\left(\omega_{i}t\right)-\omega_{i}\sin\left(\omega_{i}t\right)\right]\exp\left(-\omega_{r}t\right)$$
and integrate to get
$$u_{x}'=-\frac{1}{k_{x}}\frac{\triangle\rho}{\rho_{0}}\cos\left(k_{x}x\right)\left[\omega_{r}\cos\left(\omega_{i}t\right)-\omega_{i}\sin\left(\omega_{i}t\right)\right]\exp\left(-\omega_{r}t\right)+K$$
where $K$ is an integration constant. My approach was to determine $K$ by setting the velocity zero at a antinode (at $x=n_x/4$), to get
$$u_{x}'=-\frac{1}{k_{x}}\frac{\triangle\rho}{\rho_{0}}\cos\left(k_{x}x\right)\left[\omega_{r}\cos\left(\omega_{i}t\right)-\omega_{i}\sin\left(\omega_{i}t\right)\right]\exp\left(-\omega_{r}t\right) \, .$$
However, comparing the simulation with the analytical solution it seems that the amplitude of the velocity is much larger in the simulation.
Is my approach described above at all correct?