Velocity profile of a viscously damped wave 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?
 A: Make sure you've normalized everything correctly in both the analytical and numerical solutions so you're comparing apples to apples.  Is $n_x$ the wavelength?  If so, then the factor of $\cos\left(k_x\frac{n_x}{4} \right)$ is just 0.  That seems right, since $u'_x$ is then $\pi/2$ out of phase with $\Delta \rho$, and the velocity perturbation is symmetrical.  Try setting $\omega_r = 0$ for a more transparent solution.  Otherwise, everything looks fine with the analytical solution.
A: I would go about the theoretical discussion differently. 
First consider irrotational inviscid waves, governed by Laplace's equation in the interior, i.e.
$$\nabla^2 \phi = 0$$
where $\phi=\phi(x,z,t)$ is the velocity potential, $z$ is the vertical and $x$ the horizontal direction. 
The boundary conditions for water waves, in the absence of viscosity, are 
$$ \phi_t+\frac{1}{2}(\nabla\phi)^2 +gz =0;\quad \eta_t+\phi_x\eta_x = \phi_z \quad @z=\eta;$$ 
where $\eta$ is the free surface displacement, and both boundary conditions are evaluated at the free surface. Finally, we have $\phi_z=0$ at $z=-h$, with $h$ the depth of the water, taken to tend towards infinity. Note, the governing equation is linear, but the boundary conditions are nonlinear, and more strikingly, are evaluated at a dependent variable of the system. The later of which is the reason why these equations are very difficult to solve. 
Now, a linear standing wave can be thought of as two oppositely traveling waves of equal amplitude, frequency. Take $\omega$ to be the angular frequency, and $k$ the wavenumber, then it is easy to show that the linearized boundary conditions together with Laplace's equation implies 
$$\phi = \frac{a\omega}{k} \cos kx \sin\omega t\ e^{kz}; \quad \eta=a\cos kx \cos \omega t$$
where $\omega=\sqrt{gk}$. 
Now, to add viscosity. 
The motion described above can exist even with viscosity if we apply the following normal and tangential surface stresses: 
$$\vec{F}\cdot \hat{z} =-p +2\mu \frac{\partial v}{\partial y} = -p+2\mu k^2\frac{a\omega}{k}\cos kx \sin \omega t\ e^{kz}$$
and 
$$\vec{F}\cdot \hat{x} = \mu\left(\frac{\partial v}{\partial x}+\frac{\partial u}{\partial y}\right)= -2\mu k^2 a\frac{\omega}{k} \sin kx \sin \omega t\ e^{kz}$$
with $\mu$ the dynamic viscosity and $(u,v)=(\phi_x,\phi_z)$. Therefore, the work done by these forces, averaged over a wavelength and over a wave period
$$\frac{1}{T}\frac{1}{\lambda} \int_0^T\int_0^{\lambda} \vec{u}\cdot \vec{F} dx =\mu k^2 a^2, $$
where we assume that the wave amplitude varies slowly compared with the frequency of the wave. 
Next, the total energy in a standing wave is $E=\frac{1}{2} \rho g a^2$, so that in the absence of surface forces, we must have 
$$\frac{d}{dt}E = 2\mu k^2 a^2 \omega \implies a=a_o^{-\nu k^2t}.$$
We note that kinematic viscosity $\nu =\mu/\rho$ is much more effective at annihilating shorter waves, as we would naively expect from the form of the dissipation given in the Navier Stokes equations. 
The theoretical free surface profile and velocity potential are
$$\eta= a_o^{-\nu k^2t}\cos kx \cos \omega ; \quad \phi =\frac{a_o^{-\nu k^2t} \omega}{k}\cos kx \sin \omega .$$
and finally the velocity fields are
$$(u,v) = a_o^{-\nu k^2t} \omega\sin \omega t \ e^{kz} (-\sin kx, cos kx).$$
Reference: Lamb (1932, $\S$ 348)
